-
Notifications
You must be signed in to change notification settings - Fork 30
/
configuration.ts
1803 lines (1733 loc) · 64.3 KB
/
configuration.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* An asset URI which will always be passed as a `string` to the native platform SDKs.
* In React Native an `AssetURI` can be assigned with an asset reference which can be
* obtained by, e.g., `require('./pathToStaticAssetResource.withExtension')` as `number`.
* Every `AssetURI` as `number` contained in the `Configuration` will be resolved to a URI
* as `string` when passed to the SDK.
*/
export type AssetURI = string | number
/**
* Configuration options and asset definitions for image and video editing tasks.
*/
export interface Configuration {
/**
* When set to `true`, the user is forced to crop the asset to one of the allowed crop ratios in
* `transform.items` before being able to use other features of the editor.
* The transform tool will only be presented if the image does not already fit one of the allowed
* aspect ratios. It will be presented automatically, if the user changes the orientation of the asset
* and the result does not match an allowed aspect ratio.
*
* This property has no effect unless `transform.allowFreeCrop` is set to `false` or `null`.
* @example // Defaults to:
* false
*/
forceCrop?: boolean;
/**
* Controls if the editor is used in single tool mode.
* Prerequisite is that only one tool is in `tools`.
*
* @example // Defaults to:
* true
*/
singleToolMode?: boolean;
/**
* Defines all allowed actions for the main screen that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @note The `CanvasAction.REMOVE_BACKGROUND` action is only shown when editing photos where a person could be detected. This feature is only supported on devices running iOS 15+.
* @note The `CanvasAction.SOUND_ON_OFF` and `CanvasAction.PLAY_PAUSE` action is only shown when editing videos.
* @example // Defaults to:
* [CanvasAction.SOUND_ON_OFF, CanvasAction.PLAY_PAUSE, CanvasAction.UNDO, CanvasAction.REDO]
*/
mainCanvasActions?: Array<
CanvasAction.REMOVE_BACKGROUND |
CanvasAction.SOUND_ON_OFF |
CanvasAction.PLAY_PAUSE |
CanvasAction.UNDO |
CanvasAction.REDO
>;
/**
* Controls if the user can zoom the preview image.
* @example // Defaults to:
* true
*/
enableZoom?: boolean;
/**
* Global snapping options for all sprites, e.g., stickers, texts, and text designs.
*/
snapping?: {
/**
* Snapping options for positioning sprites.
*/
position?: {
/**
* Whether sprites should snap to specific positions during pan interactions.
* This switch enables or disables position snapping.
* @example // Defaults to:
* true
*/
enabled?: boolean;
/**
* This threshold defines the distance of a pan gesture where snapping at a snap point occurs.
* It is measured in points.
* @example // Defaults to:
* 20
*/
threshold?: number;
/**
* If enabled a sprite's center snaps to the horizontal line through the center of the edited image.
* @example // Defaults to:
* true
*/
snapToHorizontalCenter?: boolean;
/**
* If enabled a sprite's center snaps to the vertical line through the center of the edited image.
* @example // Defaults to:
* true
*/
snapToVerticalCenter?: boolean;
/**
* The left side of a sprite's bounding box snaps to a vertical line which is shifted
* from the left side of the edited image towards its center by this value. The value is measured in normalized
* coordinates relative to the smaller side of the edited image.
* If this value is explicitly set to `null` this snapping line is disabled.
* @example // Defaults to:
* 0.1
*/
snapToLeft?: number | null;
/**
* The right side of a sprite's bounding box snaps to a vertical line which is shifted
* from the right side of the edited image towards its center by this value. The value is measured in normalized
* coordinates relative to the smaller side of the edited image.
* If this value is explicitly set to `null` this snapping line is disabled.
* @example // Defaults to:
* 0.1
*/
snapToRight?: number | null;
/**
* The top side of a sprite's bounding box snaps to a horizontal line which is shifted
* from the top side of the edited image towards its center by this value. The value is measured in normalized
* coordinates relative to the smaller side of the edited image.
* If this value is explicitly set to `null` this snapping line is disabled.
* @example // Defaults to:
* 0.1
*/
snapToTop?: number | null;
/**
* The bottom side of a sprite's bounding box snaps to a horizontal line which is shifted
* from the bottom side of the edited image towards its center by this value. The value is measured in normalized
* coordinates relative to the smaller side of the edited image.
* If this value is explicitly set to `null` this snapping line is disabled.
* @example // Defaults to:
* 0.1
*/
snapToBottom?: number | null;
}
/**
* Snapping options for rotating sprites.
*/
rotation?: {
/**
* Whether sprites should snap to specific orientations during rotation interactions.
* This switch enables or disables rotation snapping.
* @example // Defaults to:
* true
*/
enabled?: boolean;
/**
* This threshold defines the arc length of a rotation gesture where snapping at a snap angle occurs.
* It is measured in points.
* @example // Defaults to:
* 20
*/
threshold?: number;
/**
* Enabled snapping angles in degrees for rotating a sprite. The rotation angle is defined clockwise.
* @example // Defaults to:
* [0, 45, 90, 135, 180, 225, 270, 315]
*/
snapToAngles?: number[];
}
}
/**
* Global watermark options.
*/
watermark?: {
/**
* Input image for the watermark. No additional processing is performed on the image.
* Transparency must be supported by the file itself.
* If `null` no watermark will be applied.
* @note If the watermark is the only editing operation to be performed, `export.force` option
* must be enabled for the change to be applied.
* @example // Defaults to:
* null
*/
watermarkURI?: AssetURI;
/**
* The relative size of the watermark.
* This value is measured in relation to the smaller side of the transformed image/video that the user is editing
* and the longer side of the watermark image.
* @note Values outside (0.0, 1.0) will be clamped.
* @example // Defaults to:
* 0.2
*/
size?: number;
/**
* The relative spacing between the edges of the image/video and the watermark.
* This value is measured in relation to the smaller side of the transformed image/video that the user is editing.
* @note Values outside (0.0, 0.5) will be clamped.
* @example // Defaults to:
* 0.05.
*/
inset?: number;
/**
* It defines the layout of the watermark inside the canvas.
* @example // Defaults to:
* AlignmentMode.TOP_RIGHT
*/
alignment?: AlignmentMode
}
/**
* The menu items (or tools) to display in the main menu.
* @example // Defaults to:
* [Tool.COMPOSITION, Tool.TRANSFORM, Tool.FILTER, Tool.ADJUSTMENT, Tool.FOCUS, Tool.STICKER, Tool.TEXT, Tool.TEXT_DESIGN, Tool.OVERLAY, Tool.FRAME, Tool.BRUSH]
* // or if your license does not include `Tool.COMPOSITION`:
* [Tool.TRIM, Tool.TRANSFORM, Tool.FILTER, Tool.ADJUSTMENT, Tool.FOCUS, Tool.STICKER, Tool.TEXT, Tool.TEXT_DESIGN, Tool.OVERLAY, Tool.FRAME, Tool.BRUSH]
*/
tools?: Tool[];
/**
* Configuration options for `Tool.COMPOSITION`.
*/
composition?: {
/**
* Defines all available video clips in the video clip library. Each video clip must be assigned to a category.
* @note If this array is `null` the defaults are used. If this array is empty the video clip library won't be shown when the user
* taps the add button in the composition menu instead the device's media library will be shown directly when `personalVideoClips` is enabled.
* If `personalVideoClips` is disabled in this case the add button in the composition menu won't be shown at all.
* @example // Defaults to:
* []
*/
categories?: (VideoClipCategory)[];
/**
* Defines all allowed actions for the composition tool that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @example // Defaults to:
* [CanvasAction.PLAY_PAUSE]
*/
canvasActions?: Array<
CanvasAction.PLAY_PAUSE
>;
/**
* If enabled the user can add personal video clips from the device's media library. A button is added as last item in the composition
* menu or as first item in the video clip library menu in front of the video clip categories if any `categories` are defined.
* @example // Defaults to:
* true
*/
personalVideoClips?: boolean;
/**
* Configuration options for trimming individual video clips of the video composition.
*/
clipTrim?: {
/**
* Defines all allowed actions for the clip trim tool that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @example // Defaults to:
* [CanvasAction.DELETE, CanvasAction.PLAY_PAUSE]
*/
canvasActions?: Array<
CanvasAction.DELETE |
CanvasAction.PLAY_PAUSE
>;
}
}
/**
* Configuration options for `Tool.TRIM`.
*/
trim?: {
/**
* Defines all allowed actions for the trim tool that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @example // Defaults to:
* [CanvasAction.DELETE, CanvasAction.PLAY_PAUSE]
*/
canvasActions?: Array<
CanvasAction.PLAY_PAUSE
>;
/**
* Enforces a minimum allowed duration in seconds for the edited video for the trim and composition tool.
* The minimum allowed value is 0.5 seconds. See `forceMode` for additional options.
* @example // Defaults to:
* 0.5
*/
minimumDuration?: number;
/**
* Enforces a maximum allowed duration in seconds for the edited video for the trim and composition tool
* if set to a value different from `null`. See `forceMode` for additional options.
* @example // Defaults to:
* null
*/
maximumDuration?: number;
/**
* With the force trim option, you're able to enforce a `minimumDuration` and `maximumDuration` for a video composition
* in the composition tool and/or a single video in the trim tool. Thus users will not be able to export videos,
* which are not within the defined video duration limits. This feature is implemented as part of the user interface only.
* To be able to use this feature your subscription must include the trim feature.
* @example // Defaults to:
* ForceTrimMode.SILENT
*/
forceMode?: ForceTrimMode;
}
/**
* Configuration options for `Tool.AUDIO`.
*/
audio?: {
/**
* Defines all available audio clips in the audio clip library. Each audio clip must be assigned to a category.
* @example // Defaults to:
* []
*/
categories?: (AudioClipCategory)[];
/**
* Defines all allowed actions for the audio tool that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @example // Defaults to:
* [CanvasAction.DELETE]
*/
canvasActions?: Array<
CanvasAction.DELETE |
CanvasAction.PLAY_PAUSE
>;
}
/**
* Configuration options for `Tool.TRANSFORM`.
*/
transform?: {
/**
* Whether to show a reset button to reset the applied crop, rotation and tilt angle.
* @example // Defaults to:
* true
*/
showResetButton?: boolean;
/**
* Whether to allow free cropping. If this is enabled, free cropping is always the first available option.
* @example // Defaults to:
* true
*/
allowFreeCrop?: boolean;
/**
* Defines all allowed crop aspect ratios. The crop ratio buttons are shown in the given order.
* @example // Defaults to:
* [
* { width: 1, height: 1, name: "Square" },
* { width: 16, height: 9, toggleable: true },
* { width: 4, height: 3, toggleable: true },
* { width: 3, height: 2, toggleable: true },
* ]
*/
items?: CropRatio[];
}
/**
* Configuration options for `Tool.FILTER`.
*/
filter?: {
/**
* Defines all available filters. Each filter must be assigned to a category.
* New items and categories can be mixed and matched with existing ones.
* `NONE` is always added.
* @example // Defaults to:
* [
* { identifier: "imgly_filter_category_duotone", items: [
* { identifier: "imgly_duotone_desert" },
* { identifier: "imgly_duotone_peach" },
* { identifier: "imgly_duotone_clash" },
* { identifier: "imgly_duotone_plum" },
* { identifier: "imgly_duotone_breezy" },
* { identifier: "imgly_duotone_deepblue" },
* { identifier: "imgly_duotone_frog" },
* { identifier: "imgly_duotone_sunset" },
* ]},
* { identifier: "imgly_filter_category_bw", items: [
* { identifier: "imgly_lut_ad1920" },
* { identifier: "imgly_lut_bw" },
* { identifier: "imgly_lut_x400" },
* { identifier: "imgly_lut_litho" },
* { identifier: "imgly_lut_sepiahigh" },
* { identifier: "imgly_lut_plate" },
* { identifier: "imgly_lut_sin" },
* ]},
* { identifier: "imgly_filter_category_vintage", items: [
* { identifier: "imgly_lut_blues" },
* { identifier: "imgly_lut_front" },
* { identifier: "imgly_lut_texas" },
* { identifier: "imgly_lut_celsius" },
* { identifier: "imgly_lut_cool" },
* ]},
* { identifier: "imgly_filter_category_smooth", items: [
* { identifier: "imgly_lut_chest" },
* { identifier: "imgly_lut_winter" },
* { identifier: "imgly_lut_kdynamic" },
* { identifier: "imgly_lut_fall" },
* { identifier: "imgly_lut_lenin" },
* { identifier: "imgly_lut_pola669" },
* ]},
* { identifier: "imgly_filter_category_cold", items: [
* { identifier: "imgly_lut_elder" },
* { identifier: "imgly_lut_orchid" },
* { identifier: "imgly_lut_bleached" },
* { identifier: "imgly_lut_bleachedblue" },
* { identifier: "imgly_lut_breeze" },
* { identifier: "imgly_lut_blueshadows" },
* ]},
* { identifier: "imgly_filter_category_warm", items: [
* { identifier: "imgly_lut_sunset" },
* { identifier: "imgly_lut_eighties" },
* { identifier: "imgly_lut_evening" },
* { identifier: "imgly_lut_k2" },
* { identifier: "imgly_lut_nogreen" },
* ]},
* { identifier: "imgly_filter_category_legacy", items: [
* { identifier: "imgly_lut_ancient" },
* { identifier: "imgly_lut_cottoncandy" },
* { identifier: "imgly_lut_classic" },
* { identifier: "imgly_lut_colorful" },
* { identifier: "imgly_lut_creamy" },
* { identifier: "imgly_lut_fixie" },
* { identifier: "imgly_lut_food" },
* { identifier: "imgly_lut_fridge" },
* { identifier: "imgly_lut_glam" },
* { identifier: "imgly_lut_gobblin" },
* { identifier: "imgly_lut_highcontrast" },
* { identifier: "imgly_lut_highcarb" },
* { identifier: "imgly_lut_k1" },
* { identifier: "imgly_lut_k6" },
* { identifier: "imgly_lut_keen" },
* { identifier: "imgly_lut_lomo" },
* { identifier: "imgly_lut_lomo100" },
* { identifier: "imgly_lut_lucid" },
* { identifier: "imgly_lut_mellow" },
* { identifier: "imgly_lut_neat" },
* { identifier: "imgly_lut_pale" },
* { identifier: "imgly_lut_pitched" },
* { identifier: "imgly_lut_polasx" },
* { identifier: "imgly_lut_pro400" },
* { identifier: "imgly_lut_quozi" },
* { identifier: "imgly_lut_settled" },
* { identifier: "imgly_lut_seventies" },
* { identifier: "imgly_lut_soft" },
* { identifier: "imgly_lut_steel" },
* { identifier: "imgly_lut_summer" },
* { identifier: "imgly_lut_tender" },
* { identifier: "imgly_lut_twilight" },
* ]},
* ]
*/
categories?: (FilterCategory | ExistingFilterCategory)[];
/**
* Whether categories should be flattened which effectively hides the categories.
* If this is enabled all filters will be shown in the top-level of the filter selection tool
* orderer according to their parent category.
* @example // Defaults to:
* false
*/
flattenCategories?: boolean;
}
/**
* Configuration options for `Tool.ADJUSTMENT`.
*/
adjustment?: {
/**
* Whether to show a reset button to reset the applied adjustments.
* @example // Defaults to:
* true
*/
showResetButton?: boolean;
/**
* Defines all allowed adjustment tools. The adjustment tool buttons are always shown in the given order.
* @example // Defaults to:
* [AdjustmentTool.BRIGHTNESS, AdjustmentTool.CONTRAST, AdjustmentTool.SATURATION, AdjustmentTool.CLARITY, AdjustmentTool.SHADOWS, AdjustmentTool.HIGHLIGHTS, AdjustmentTool.EXPOSURE, AdjustmentTool.GAMMA, AdjustmentTool.BLACKS, AdjustmentTool.WHITES, AdjustmentTool.TEMPERATURE, AdjustmentTool.SHARPNESS]
*/
items?: AdjustmentTool[];
}
/**
* Configuration options for `Tool.FOCUS`.
*/
focus?: {
/**
* Defines all allowed focus tools. The focus tool buttons are shown in the given order.
* `NONE` is always added.
* @example // Defaults to:
* [FocusTool.NONE, FocusTool.RADIAL, FocusTool.MIRRORED, FocusTool.LINEAR, FocusTool.GAUSSIAN]
*/
items?: FocusTool[];
}
/**
* Configuration options for `Tool.STICKER`.
*/
sticker?: {
/**
* Defines all available stickers. Each sticker must be assigned to a category.
* New items and categories can be mixed and matched with existing ones.
* @note If this array is `null` the defaults are used but the sticker category
* with the identifier `imgly_sticker_category_animated` is only shown when editing videos.
* @example // Defaults to:
* [
* { identifier: "imgly_sticker_category_emoticons", items: [
* { identifier: "imgly_smart_sticker_weekday" },
* { identifier: "imgly_smart_sticker_date" },
* { identifier: "imgly_smart_sticker_time" },
* { identifier: "imgly_smart_sticker_time_clock" },
* { identifier: "imgly_sticker_emoticons_grin" },
* { identifier: "imgly_sticker_emoticons_laugh" },
* { identifier: "imgly_sticker_emoticons_smile" },
* { identifier: "imgly_sticker_emoticons_wink" },
* { identifier: "imgly_sticker_emoticons_tongue_out_wink" },
* { identifier: "imgly_sticker_emoticons_angel" },
* { identifier: "imgly_sticker_emoticons_kisses" },
* { identifier: "imgly_sticker_emoticons_loving" },
* { identifier: "imgly_sticker_emoticons_kiss" },
* { identifier: "imgly_sticker_emoticons_wave" },
* { identifier: "imgly_sticker_emoticons_nerd" },
* { identifier: "imgly_sticker_emoticons_cool" },
* { identifier: "imgly_sticker_emoticons_blush" },
* { identifier: "imgly_sticker_emoticons_duckface" },
* { identifier: "imgly_sticker_emoticons_furious" },
* { identifier: "imgly_sticker_emoticons_angry" },
* { identifier: "imgly_sticker_emoticons_steaming_furious" },
* { identifier: "imgly_sticker_emoticons_sad" },
* { identifier: "imgly_sticker_emoticons_anxious" },
* { identifier: "imgly_sticker_emoticons_cry" },
* { identifier: "imgly_sticker_emoticons_sobbing" },
* { identifier: "imgly_sticker_emoticons_loud_cry" },
* { identifier: "imgly_sticker_emoticons_wide_grin" },
* { identifier: "imgly_sticker_emoticons_impatient" },
* { identifier: "imgly_sticker_emoticons_tired" },
* { identifier: "imgly_sticker_emoticons_asleep" },
* { identifier: "imgly_sticker_emoticons_sleepy" },
* { identifier: "imgly_sticker_emoticons_deceased" },
* { identifier: "imgly_sticker_emoticons_attention" },
* { identifier: "imgly_sticker_emoticons_question" },
* { identifier: "imgly_sticker_emoticons_not_speaking_to_you" },
* { identifier: "imgly_sticker_emoticons_sick" },
* { identifier: "imgly_sticker_emoticons_pumpkin" },
* { identifier: "imgly_sticker_emoticons_boxer" },
* { identifier: "imgly_sticker_emoticons_idea" },
* { identifier: "imgly_sticker_emoticons_smoking" },
* { identifier: "imgly_sticker_emoticons_beer" },
* { identifier: "imgly_sticker_emoticons_skateboard" },
* { identifier: "imgly_sticker_emoticons_guitar" },
* { identifier: "imgly_sticker_emoticons_music" },
* { identifier: "imgly_sticker_emoticons_sunbathing" },
* { identifier: "imgly_sticker_emoticons_hippie" },
* { identifier: "imgly_sticker_emoticons_humourous" },
* { identifier: "imgly_sticker_emoticons_hitman" },
* { identifier: "imgly_sticker_emoticons_harry_potter" },
* { identifier: "imgly_sticker_emoticons_business" },
* { identifier: "imgly_sticker_emoticons_batman" },
* { identifier: "imgly_sticker_emoticons_skull" },
* { identifier: "imgly_sticker_emoticons_ninja" },
* { identifier: "imgly_sticker_emoticons_masked" },
* { identifier: "imgly_sticker_emoticons_alien" },
* { identifier: "imgly_sticker_emoticons_wrestler" },
* { identifier: "imgly_sticker_emoticons_devil" },
* { identifier: "imgly_sticker_emoticons_star" },
* { identifier: "imgly_sticker_emoticons_baby_chicken" },
* { identifier: "imgly_sticker_emoticons_rabbit" },
* { identifier: "imgly_sticker_emoticons_pig" },
* { identifier: "imgly_sticker_emoticons_chicken" },
* ]},
* { identifier: "imgly_sticker_category_shapes", items: [
* { identifier: "imgly_sticker_shapes_badge_01" },
* { identifier: "imgly_sticker_shapes_badge_04" },
* { identifier: "imgly_sticker_shapes_badge_12" },
* { identifier: "imgly_sticker_shapes_badge_06" },
* { identifier: "imgly_sticker_shapes_badge_13" },
* { identifier: "imgly_sticker_shapes_badge_36" },
* { identifier: "imgly_sticker_shapes_badge_08" },
* { identifier: "imgly_sticker_shapes_badge_11" },
* { identifier: "imgly_sticker_shapes_badge_35" },
* { identifier: "imgly_sticker_shapes_badge_28" },
* { identifier: "imgly_sticker_shapes_badge_32" },
* { identifier: "imgly_sticker_shapes_badge_15" },
* { identifier: "imgly_sticker_shapes_badge_20" },
* { identifier: "imgly_sticker_shapes_badge_18" },
* { identifier: "imgly_sticker_shapes_badge_19" },
* { identifier: "imgly_sticker_shapes_arrow_02" },
* { identifier: "imgly_sticker_shapes_arrow_03" },
* { identifier: "imgly_sticker_shapes_spray_01" },
* { identifier: "imgly_sticker_shapes_spray_04" },
* { identifier: "imgly_sticker_shapes_spray_03" },
* ]},
* { identifier: "imgly_sticker_category_animated", items: [
* { identifier: "imgly_sticker_animated_camera" },
* { identifier: "imgly_sticker_animated_clouds" },
* { identifier: "imgly_sticker_animated_coffee" },
* { identifier: "imgly_sticker_animated_fire" },
* { identifier: "imgly_sticker_animated_flower" },
* { identifier: "imgly_sticker_animated_gift" },
* { identifier: "imgly_sticker_animated_heart" },
* { identifier: "imgly_sticker_animated_movie_clap" },
* { identifier: "imgly_sticker_animated_rainbow" },
* { identifier: "imgly_sticker_animated_stars" },
* { identifier: "imgly_sticker_animated_sun" },
* { identifier: "imgly_sticker_animated_thumbs_up" },
* ]},
* ]
*/
categories?: (StickerCategory | ExistingStickerCategory | ExistingStickerProviderCategory)[];
/**
* Defines all available colors that can be applied to stickers with a `tintMode` other than `TintMode.NONE`.
* The color pipette is always added.
* @example // Defaults to:
* [
* { color: [0.00, 0.00, 0.00, 0], name: "Transparent" },
* { color: [1.00, 1.00, 1.00, 1], name: "White" },
* { color: [0.49, 0.49, 0.49, 1], name: "Gray" },
* { color: [0.00, 0.00, 0.00, 1], name: "Black" },
* { color: [0.40, 0.80, 1.00, 1], name: "Light blue" },
* { color: [0.40, 0.53, 1.00, 1], name: "Blue" },
* { color: [0.53, 0.40, 1.00, 1], name: "Purple" },
* { color: [0.87, 0.40, 1.00, 1], name: "Orchid" },
* { color: [1.00, 0.40, 0.80, 1], name: "Pink" },
* { color: [0.90, 0.31, 0.31, 1], name: "Red" },
* { color: [0.95, 0.53, 0.33, 1], name: "Orange" },
* { color: [1.00, 0.80, 0.40, 1], name: "Gold" },
* { color: [1.00, 0.97, 0.39, 1], name: "Yellow" },
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
* ]
*/
colors?: ColorPalette;
/**
* Defines all allowed actions for the sticker tool menu. Only buttons for allowed actions are visible and shown in the given order.
* @note The `StickerAction.REMOVE_BACKGROUND` action is only shown for personal and external (non-animated) stickers where a person could be detected. This feature is only supported on devices running iOS 15+.
* @note The `StickerAction.DURATION` action is only shown when editing videos.
* @example // Defaults to:
* [StickerAction.DURATION, StickerAction.REPLACE, StickerAction.OPACITY, StickerAction.COLOR, StickerAction.REMOVE_BACKGROUND]
*/
actions?: StickerAction[];
/**
* Defines all allowed actions for the sticker tool that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @example // Defaults to:
* [CanvasAction.ADD, CanvasAction.DELETE, CanvasAction.FLIP, CanvasAction.BRING_TO_FRONT, CanvasAction.UNDO, CanvasAction.REDO]
*/
canvasActions?: Array<
CanvasAction.UNDO |
CanvasAction.REDO |
CanvasAction.DELETE |
CanvasAction.BRING_TO_FRONT |
CanvasAction.ADD |
CanvasAction.FLIP
>;
/**
* If enabled the user can create personal stickers from the device's photo library. A button is added as first item
* in the menu in front of the sticker categories which modally presents an image selection dialog for personal sticker creation.
* Personal stickers will be added to a personal sticker category with the identifier `"imgly_sticker_category_personal"` which
* will be added between the button and the regular sticker categories if it does not exist.
* @example // Defaults to:
* false
*/
personalStickers?: boolean;
/**
* The default tint mode for personal stickers.
* @example // Defaults to:
* TintMode.NONE
*/
defaultPersonalStickerTintMode?: TintMode;
}
/**
* Configuration options for `Tool.TEXT`.
*/
text?: {
/**
* Defines all available fonts.
* New items can be mixed and matched with existing ones.
* @example // Defaults to:
* [
* { identifier: "imgly_font_open_sans_bold" },
* { identifier: "imgly_font_aleo_bold" },
* { identifier: "imgly_font_amaticsc" },
* { identifier: "imgly_font_archivo_black" },
* { identifier: "imgly_font_bungee_inline" },
* { identifier: "imgly_font_campton_bold" },
* { identifier: "imgly_font_carter_one" },
* { identifier: "imgly_font_codystar" },
* { identifier: "imgly_font_fira_sans_regular" },
* { identifier: "imgly_font_galano_grotesque_bold" },
* { identifier: "imgly_font_krona_one" },
* { identifier: "imgly_font_kumar_one_outline" },
* { identifier: "imgly_font_lobster" },
* { identifier: "imgly_font_molle" },
* { identifier: "imgly_font_monoton" },
* { identifier: "imgly_font_nixie_one" },
* { identifier: "imgly_font_notable" },
* { identifier: "imgly_font_ostrich_sans_black" },
* { identifier: "imgly_font_ostrich_sans_bold" },
* { identifier: "imgly_font_oswald_semi_bold" },
* { identifier: "imgly_font_palanquin_dark_semi_bold" },
* { identifier: "imgly_font_permanent_marker" },
* { identifier: "imgly_font_poppins" },
* { identifier: "imgly_font_roboto_black_italic" },
* { identifier: "imgly_font_roboto_light_italic" },
* { identifier: "imgly_font_sancreek" },
* { identifier: "imgly_font_stint_ultra_expanded" },
* { identifier: "imgly_font_trash_hand" },
* { identifier: "imgly_font_vt323" },
* { identifier: "imgly_font_yeseva_one" },
* ]
*/
fonts?: (Font | ExistingItem)[];
/**
* Defines all allowed actions for the text tool menu. Only buttons for allowed actions are visible and shown in the given order.
* @note The `TextAction.DURATION` action is only shown when editing videos.
* @example // Defaults to:
* [TextAction.DURATION, TextAction.FONT, TextAction.COLOR, TextAction.BACKGROUND_COLOR, TextAction.ALIGNMENT]
*/
actions?: TextAction[];
/**
* Defines all allowed actions for the text tool that are displayed as overlay buttons on the canvas.
* @example // Defaults to:
* [CanvasAction.ADD, CanvasAction.DELETE, CanvasAction.BRING_TO_FRONT, CanvasAction.UNDO, CanvasAction.REDO]
*/
canvasActions?: Array<
CanvasAction.UNDO |
CanvasAction.REDO |
CanvasAction.DELETE |
CanvasAction.BRING_TO_FRONT |
CanvasAction.ADD |
CanvasAction.FLIP
>;
/**
* Defines all available colors that can be applied to the text.
* The color pipette is always added.
* @example // Defaults to:
* [
* { color: [1.00, 1.00, 1.00, 1], name: "White" },
* { color: [0.49, 0.49, 0.49, 1], name: "Gray" },
* { color: [0.00, 0.00, 0.00, 1], name: "Black" },
* { color: [0.40, 0.80, 1.00, 1], name: "Light blue" },
* { color: [0.40, 0.53, 1.00, 1], name: "Blue" },
* { color: [0.53, 0.40, 1.00, 1], name: "Purple" },
* { color: [0.87, 0.40, 1.00, 1], name: "Orchid" },
* { color: [1.00, 0.40, 0.80, 1], name: "Pink" },
* { color: [0.90, 0.31, 0.31, 1], name: "Red" },
* { color: [0.95, 0.53, 0.33, 1], name: "Orange" },
* { color: [1.00, 0.80, 0.40, 1], name: "Gold" },
* { color: [1.00, 0.97, 0.39, 1], name: "Yellow" },
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
* ]
*/
textColors?: ColorPalette;
/**
* Defines all available colors that can be applied to the background.
* The color pipette is always added.
* @example // Defaults to:
* [
* { color: [0.00, 0.00, 0.00, 0], name: "Transparent" },
* { color: [1.00, 1.00, 1.00, 1], name: "White" },
* { color: [0.49, 0.49, 0.49, 1], name: "Gray" },
* { color: [0.00, 0.00, 0.00, 1], name: "Black" },
* { color: [0.40, 0.80, 1.00, 1], name: "Light blue" },
* { color: [0.40, 0.53, 1.00, 1], name: "Blue" },
* { color: [0.53, 0.40, 1.00, 1], name: "Purple" },
* { color: [0.87, 0.40, 1.00, 1], name: "Orchid" },
* { color: [1.00, 0.40, 0.80, 1], name: "Pink" },
* { color: [0.90, 0.31, 0.31, 1], name: "Red" },
* { color: [0.95, 0.53, 0.33, 1], name: "Orange" },
* { color: [1.00, 0.80, 0.40, 1], name: "Gold" },
* { color: [1.00, 0.97, 0.39, 1], name: "Yellow" },
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
* ]
*/
backgroundColors?: ColorPalette;
/**
* Defines the default text color for newly created text.
* @example // Defaults to:
* [1, 1, 1, 1]
*/
defaultTextColor?: Color;
/**
* Whether the user can use emojis as text input.
* @note Emojis are not cross-platform compatible. If you use the serialization feature to share edits
* across different platforms emojis will be renderd with the system's local set of emojis and will appear differently.
* @example // Defaults to:
* false
*/
allowEmojis?: boolean;
}
/**
* Configuration options for `Tool.TEXT_DESIGN`.
*/
textdesign?: {
/**
* Defines all available text designs.
* New items can be mixed and matched with existing ones.
* @example // Defaults to:
* [
* { identifier: "imgly_text_design_blocks" },
* { identifier: "imgly_text_design_rotated" },
* { identifier: "imgly_text_design_blocks_light" },
* { identifier: "imgly_text_design_equal_width" },
* { identifier: "imgly_text_design_masked" },
* { identifier: "imgly_text_design_celebrate" },
* { identifier: "imgly_text_design_sunshine" },
* { identifier: "imgly_text_design_masked_badge" },
* { identifier: "imgly_text_design_blocks_condensed" },
* { identifier: "imgly_text_design_celebrate_simple" },
* { identifier: "imgly_text_design_equal_width_fat" },
* { identifier: "imgly_text_design_watercolor" },
* { identifier: "imgly_text_design_particles" },
* { identifier: "imgly_text_design_masked_speech_bubble" },
* { identifier: "imgly_text_design_masked_speech_bubble_comic" },
* { identifier: "imgly_text_design_multiline" },
* ]
*/
items?: ExistingItem[];
/**
* Defines all allowed actions for the text design tool that are displayed as overlay buttons on the canvas.
* @example // Defaults to:
* [CanvasAction.ADD, CanvasAction.DELETE, CanvasAction.INVERT, CanvasAction.BRING_TO_FRONT, CanvasAction.UNDO, CanvasAction.REDO]
*/
canvasActions?: Array<
CanvasAction.UNDO |
CanvasAction.REDO |
CanvasAction.DELETE |
CanvasAction.BRING_TO_FRONT |
CanvasAction.ADD |
CanvasAction.INVERT
>;
/**
* Defines all available colors that can be applied to the text design.
* @example // Defaults to:
* [
* { color: [1.00, 1.00, 1.00, 1], name: "White" },
* { color: [0.49, 0.49, 0.49, 1], name: "Gray" },
* { color: [0.00, 0.00, 0.00, 1], name: "Black" },
* { color: [0.40, 0.80, 1.00, 1], name: "Light blue" },
* { color: [0.40, 0.53, 1.00, 1], name: "Blue" },
* { color: [0.53, 0.40, 1.00, 1], name: "Purple" },
* { color: [0.87, 0.40, 1.00, 1], name: "Orchid" },
* { color: [1.00, 0.40, 0.80, 1], name: "Pink" },
* { color: [0.90, 0.31, 0.31, 1], name: "Red" },
* { color: [0.95, 0.53, 0.33, 1], name: "Orange" },
* { color: [1.00, 0.80, 0.40, 1], name: "Gold" },
* { color: [1.00, 0.97, 0.39, 1], name: "Yellow" },
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
* ]
*/
colors?: ColorPalette;
}
/**
* Configuration options for `Tool.OVERLAY`.
*/
overlay?: {
/**
* Defines all available overlays.
* New items can be mixed and matched with existing ones.
* `NONE` is always added.
* @example // Defaults to:
* [
* { identifier: "imgly_overlay_golden" },
* { identifier: "imgly_overlay_lightleak1" },
* { identifier: "imgly_overlay_rain" },
* { identifier: "imgly_overlay_mosaic" },
* { identifier: "imgly_overlay_vintage" },
* { identifier: "imgly_overlay_paper" },
* ]
*/
items?: (Overlay | ExistingItem)[];
/**
* Defines all allowed blend modes for the overlays.
* @example // Defaults to:
* [BlendMode.NORMAL, BlendMode.MULTIPLY, BlendMode.OVERLAY, BlendMode.SCREEN, BlendMode.LIGHTEN, BlendMode.SOFT_LIGHT, BlendMode.HARD_LIGHT, BlendMode.DARKEN, BlendMode.COLOR_BURN]
*/
blendModes?: BlendMode[];
}
/**
* Configuration options for `Tool.FRAME`.
*/
frame?: {
/**
* Defines all available frames.
* New items can be mixed and matched with existing ones.
* `NONE` is always added.
* @example // Defaults to:
* [
* { identifier: "imgly_frame_dia" },
* { identifier: "imgly_frame_art_decor" },
* { identifier: "imgly_frame_black_passepartout" },
* { identifier: "imgly_frame_wood_passepartout" },
* ]
*/
items?: (Frame | ExistingItem)[];
/**
* Defines all allowed actions for the frame tool menu. Only buttons for allowed actions are visible and shown in the given order.
* @example // Defaults to:
* [FrameAction.REPLACE, FrameAction.WIDTH, FrameAction.OPACITY]
*/
actions?: FrameAction[];
}
/**
* Configuration options for `Tool.BRUSH`.
*/
brush?: {
/**
* Defines all allowed actions for the brush tool menu. Only buttons for allowed actions are visible and shown in the given order.
* @example // Defaults to:
* [BrushAction.COLOR, BrushAction.SIZE, BrushAction.HARDNESS]
*/
actions?: BrushAction[];
/**
* Defines all allowed actions for the brush tool that are displayed as overlay buttons on the canvas.
* Only buttons for allowed actions are visible.
* @example // Defaults to:
* [CanvasAction.DELETE, CanvasAction.BRING_TO_FRONT, CanvasAction.UNDO, CanvasAction.REDO]
*/
canvasActions?: Array<
CanvasAction.UNDO |
CanvasAction.REDO |
CanvasAction.DELETE |
CanvasAction.BRING_TO_FRONT
>;
/**
* Defines all available colors that can be applied to the brush.
* The color pipette is always added.
* @example // Defaults to:
* [
* { color: [1.00, 1.00, 1.00, 1], name: "White" },
* { color: [0.49, 0.49, 0.49, 1], name: "Gray" },
* { color: [0.00, 0.00, 0.00, 1], name: "Black" },
* { color: [0.40, 0.80, 1.00, 1], name: "Light blue" },
* { color: [0.40, 0.53, 1.00, 1], name: "Blue" },
* { color: [0.53, 0.40, 1.00, 1], name: "Purple" },
* { color: [0.87, 0.40, 1.00, 1], name: "Orchid" },
* { color: [1.00, 0.40, 0.80, 1], name: "Pink" },
* { color: [0.90, 0.31, 0.31, 1], name: "Red" },
* { color: [0.95, 0.53, 0.33, 1], name: "Orange" },
* { color: [1.00, 0.80, 0.40, 1], name: "Gold" },
* { color: [1.00, 0.97, 0.39, 1], name: "Yellow" },
* { color: [0.80, 1.00, 0.40, 1], name: "Olive" },
* { color: [0.33, 1.00, 0.53, 1], name: "Green" },
* { color: [0.33, 1.00, 0.92, 1], name: "Aquamarin" },
* ]
*/
colors?: ColorPalette;
/**
* Defines the default brush color.
* @example // Defaults to:
* [1, 1, 1, 1]
*/
defaultColor?: Color;
/**
* The minimum size that a brush can have. This value is measured in relation to the
* smaller side of the image that the user is editing. If the value is `null` the
* minimum brush size is set to the absolute size of a single pixel of the edited image.
* @example // Defaults to:
* null
*/
minimumSize?: number;
/**
* The maximum size that a brush can have. This value is measured in relation to the
* smaller side of the image that the user is editing.
* @example // Defaults to:
* 0.125
*/
maximumSize?: number;
/**
* The default size of the brush. This value is measured in relation to the
* smaller side of the image that the user is editing.
* @example // Defaults to:
* 0.05
*/
defaultSize?: number;
/**
* The minimum hardness factor a brush can have.
* @example // Defaults to:
* 0
*/
minimumHardness?: number;
/**
* The maximum hardness factor a brush can have.
* @example // Defaults to:
* 1
*/
maximumHardness?: number;
/**
* The default hardness factor of the brush.
* @example // Defaults to:
* 0.5
*/
defaultHardness?: number;
}
/**
* Export configuration options.
*/
export?: {
/**
* Image export configuration if the editor supports image editing.
*/
image?: {
/**
* The image export type.
* @example // Defaults to:
* ImageExportType.FILE_URL