unlayer-types 1.16.0 → 1.19.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 (2) hide show
  1. package/embed.d.ts +982 -30
  2. package/package.json +1 -1
package/embed.d.ts CHANGED
@@ -61,8 +61,12 @@ declare module "engine/config/fonts" {
61
61
  export function getCustomFontsCount(): number;
62
62
  export const defaultFontWeights: number[];
63
63
  }
64
+ declare module "engine/translations/types" {
65
+ import stockTranslations from '.';
66
+ export type StockLocale = keyof typeof stockTranslations;
67
+ }
64
68
  declare module "engine/config/intl" {
65
- import { StockLocale } from '../translations/types';
69
+ import { StockLocale } from "engine/translations/types";
66
70
  export type Locale = StockLocale | 'en-US';
67
71
  export type TextDirection = 'ltr' | 'rtl';
68
72
  export const DEFAULT_LOCALE = "en-US";
@@ -76,7 +80,7 @@ declare module "engine/config/intl" {
76
80
  }
77
81
  declare module "editor/components/editors/types" {
78
82
  import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
79
- import { AppearanceConfig, Device, DisplayMode, Location, Variant } from '../../../state/types';
83
+ import { AppearanceConfig, Device, DisplayMode, Location, Variant } from "state/types/types";
80
84
  export type LoadingState = 'not-loaded' | 'loading' | 'loaded';
81
85
  export type UpdatingState = 'updating' | undefined;
82
86
  export type DeletionState = 'deleting' | 'failed' | undefined;
@@ -188,12 +192,954 @@ declare module "editor/components/editors/types" {
188
192
  [P in keyof T]?: DeepPartial<T[P]>;
189
193
  } : T;
190
194
  }
191
- declare module "state/types/index" {
195
+ declare module "editor/themes/types" {
196
+ import { AppearanceConfig } from "state/types/types";
197
+ export type Theme = {
198
+ name: 'classic_light' | 'classic_dark' | 'modern_light' | 'modern_dark';
199
+ isDark: boolean;
200
+ isClassic?: boolean;
201
+ mapping: {
202
+ [key: string]: Record<string, string>;
203
+ borderRadius: Record<BorderRadius, string>;
204
+ colors: Record<ThemeColor, string>;
205
+ };
206
+ components: {
207
+ actionBar?: (Partial<Theme['components']['bar']> & {
208
+ compact?: boolean;
209
+ defaultPlacement: NonNullable<AppearanceConfig['actionBar']>['placement'];
210
+ }) | undefined;
211
+ audit: {
212
+ error: {
213
+ backgroundColor: ColorValue;
214
+ textColor: ColorValue;
215
+ iconColor: ColorValue;
216
+ borderColor: ColorValue;
217
+ borderRadius: BorderRadiusValue;
218
+ ':hover': {
219
+ backgroundColor?: ColorValue;
220
+ textColor?: ColorValue;
221
+ iconColor?: ColorValue;
222
+ borderColor?: ColorValue;
223
+ };
224
+ };
225
+ };
226
+ bannerMessage: Record<BannerMessageVariant, {
227
+ backgroundColor: ColorValue;
228
+ textColor: ColorValue;
229
+ borderColor: ColorValue;
230
+ iconColor: ColorValue;
231
+ }> & {
232
+ borderRadius: BorderRadiusValue;
233
+ };
234
+ bar: {
235
+ backgroundColor: ColorValue;
236
+ textColor?: ColorValue;
237
+ borderColor?: ColorValue;
238
+ borderRadius?: BorderRadiusValue;
239
+ button: {
240
+ backgroundColor: ColorValue;
241
+ textColor?: ColorValue;
242
+ borderColor?: ColorValue;
243
+ borderRadius?: BorderRadiusValue;
244
+ disabledTextColor?: string;
245
+ ':hover': {
246
+ backgroundColor: ColorValue;
247
+ textColor?: ColorValue;
248
+ borderColor?: ColorValue;
249
+ };
250
+ ':pressed': {
251
+ backgroundColor: ColorValue;
252
+ textColor?: ColorValue;
253
+ borderColor?: ColorValue;
254
+ };
255
+ ':selected': {
256
+ backgroundColor?: ColorValue;
257
+ textColor?: ColorValue;
258
+ borderColor?: ColorValue;
259
+ };
260
+ ':highlighted': {
261
+ backgroundColor?: ColorValue;
262
+ textColor?: ColorValue;
263
+ borderColor?: ColorValue;
264
+ };
265
+ ':destructive': {
266
+ backgroundColor?: ColorValue;
267
+ textColor?: ColorValue;
268
+ };
269
+ };
270
+ dropdown: {
271
+ item: {
272
+ backgroundColor: ColorValue | undefined;
273
+ textColor: ColorValue | undefined;
274
+ ':selected'?: {
275
+ textColor?: ColorValue;
276
+ };
277
+ };
278
+ };
279
+ separator: {
280
+ borderColor?: ColorValue;
281
+ };
282
+ };
283
+ badge: {
284
+ backgroundColor: ColorValue;
285
+ textColor?: ColorValue;
286
+ borderColor?: ColorValue;
287
+ borderRadius?: BorderRadiusValue;
288
+ };
289
+ buttons: Record<ThemeVariant, ButtonThemeObject & {
290
+ ':hover': Partial<ButtonThemeObject>;
291
+ ':pressed': Partial<ButtonThemeObject>;
292
+ }>;
293
+ checkbox: {
294
+ backgroundColor: ColorValue;
295
+ borderColor: ColorValue;
296
+ borderRadius: BorderRadiusValue;
297
+ checkColor?: ColorValue;
298
+ label: {
299
+ textColor?: ColorValue;
300
+ };
301
+ ':checked': {
302
+ backgroundColor: ColorValue;
303
+ borderColor?: ColorValue;
304
+ borderRadius?: BorderRadiusValue;
305
+ checkColor?: ColorValue;
306
+ label?: {
307
+ textColor?: ColorValue;
308
+ };
309
+ };
310
+ };
311
+ counter: {
312
+ button?: Theme['components']['buttons']['secondary'];
313
+ dropdown?: Partial<Theme['components']['dropdown']>;
314
+ input?: Theme['components']['input'];
315
+ };
316
+ dropdown: {
317
+ button: {
318
+ backgroundColor: ColorValue;
319
+ borderColor: ColorValue;
320
+ borderRadius: BorderRadiusValue;
321
+ textColor: ColorValue;
322
+ ':disabled'?: {
323
+ backgroundColor?: ColorValue;
324
+ borderColor?: ColorValue;
325
+ textColor?: ColorValue;
326
+ };
327
+ ':hover'?: {
328
+ backgroundColor?: ColorValue;
329
+ borderColor?: ColorValue;
330
+ textColor?: ColorValue;
331
+ };
332
+ ':open'?: {
333
+ backgroundColor?: ColorValue;
334
+ borderColor?: ColorValue;
335
+ borderRadius?: BorderRadiusValue;
336
+ textColor?: ColorValue;
337
+ };
338
+ };
339
+ popover: {
340
+ backgroundColor: ColorValue;
341
+ borderColor: ColorValue;
342
+ boxShadowColor?: ColorValue;
343
+ borderRadius: BorderRadiusValue;
344
+ textColor: ColorValue;
345
+ };
346
+ item: {
347
+ backgroundColor: ColorValue;
348
+ textColor: ColorValue;
349
+ ':hover'?: {
350
+ backgroundColor?: ColorValue;
351
+ textColor?: ColorValue;
352
+ };
353
+ ':selected'?: {
354
+ backgroundColor?: ColorValue;
355
+ textColor?: ColorValue;
356
+ };
357
+ };
358
+ };
359
+ input: {
360
+ backgroundColor?: ColorValue;
361
+ borderColor?: ColorValue;
362
+ borderRadius?: BorderRadiusValue;
363
+ textColor?: ColorValue;
364
+ placeholderColor?: ColorValue;
365
+ label?: {
366
+ textColor?: ColorValue;
367
+ backgroundColor?: ColorValue;
368
+ borderColor?: ColorValue;
369
+ };
370
+ messages?: Record<'default' | 'info' | 'warning' | 'error' | 'success', {
371
+ textColor: ColorValue;
372
+ }>;
373
+ ':hover'?: {
374
+ backgroundColor?: ColorValue;
375
+ borderColor?: ColorValue;
376
+ borderRadius?: BorderRadiusValue;
377
+ textColor?: ColorValue;
378
+ placeholderColor?: ColorValue;
379
+ };
380
+ ':active'?: {
381
+ backgroundColor?: ColorValue;
382
+ borderColor?: ColorValue;
383
+ borderRadius?: BorderRadiusValue;
384
+ textColor?: ColorValue;
385
+ placeholderColor?: ColorValue;
386
+ };
387
+ ':disabled'?: {
388
+ backgroundColor?: ColorValue;
389
+ borderColor?: ColorValue;
390
+ textColor?: ColorValue;
391
+ label?: {
392
+ backgroundColor?: ColorValue;
393
+ textColor?: ColorValue;
394
+ };
395
+ };
396
+ };
397
+ previewBar?: Partial<Theme['components']['bar']> | undefined;
398
+ accordion: {
399
+ backgroundColor: ColorValue;
400
+ borderColor: ColorValue;
401
+ header: {
402
+ backgroundColor?: ColorValue;
403
+ textColor?: ColorValue;
404
+ buttonColor?: ColorValue;
405
+ rightLabel: {
406
+ backgroundColor?: ColorValue;
407
+ textColor?: ColorValue;
408
+ };
409
+ ':hover'?: {
410
+ backgroundColor?: ColorValue;
411
+ };
412
+ };
413
+ content: {
414
+ backgroundColor?: ColorValue;
415
+ textColor?: ColorValue;
416
+ };
417
+ ':closed': {
418
+ borderColor?: ColorValue;
419
+ header?: {
420
+ backgroundColor?: ColorValue;
421
+ textColor?: ColorValue;
422
+ buttonColor?: ColorValue;
423
+ };
424
+ };
425
+ ai?: {
426
+ backgroundColor?: ColorValue;
427
+ header?: {
428
+ backgroundColor?: ColorValue;
429
+ textColor?: ColorValue;
430
+ aiIconColor?: ColorValue;
431
+ ':hover'?: {
432
+ backgroundColor?: ColorValue;
433
+ };
434
+ };
435
+ content?: {
436
+ backgroundColor?: ColorValue;
437
+ textColor?: ColorValue;
438
+ };
439
+ ':closed'?: {
440
+ borderColor?: ColorValue;
441
+ header?: {
442
+ backgroundColor?: ColorValue;
443
+ textColor?: ColorValue;
444
+ };
445
+ };
446
+ };
447
+ };
448
+ popover: {
449
+ backgroundColor: ColorValue;
450
+ textColor?: ColorValue;
451
+ borderColor?: ColorValue;
452
+ borderRadius?: BorderRadiusValue;
453
+ padding?: string;
454
+ offset?: number;
455
+ arrow?: {
456
+ enabled?: boolean;
457
+ };
458
+ };
459
+ radio: {
460
+ backgroundColor: ColorValue;
461
+ borderColor: ColorValue;
462
+ thumbColor?: ColorValue;
463
+ label: {
464
+ textColor?: ColorValue;
465
+ };
466
+ ':checked': {
467
+ backgroundColor: ColorValue;
468
+ borderColor?: ColorValue;
469
+ thumbColor?: ColorValue;
470
+ label?: {
471
+ textColor?: ColorValue;
472
+ };
473
+ };
474
+ };
475
+ segmentedControl: {
476
+ borderRadius: BorderRadiusValue;
477
+ item: {
478
+ backgroundColor: ColorValue;
479
+ textColor: ColorValue;
480
+ borderColor: ColorValue;
481
+ ':hover': {
482
+ backgroundColor: ColorValue;
483
+ textColor: ColorValue;
484
+ borderColor: ColorValue;
485
+ };
486
+ ':pressed': {
487
+ backgroundColor: ColorValue;
488
+ textColor: ColorValue;
489
+ borderColor: ColorValue;
490
+ };
491
+ ':selected': {
492
+ backgroundColor: ColorValue;
493
+ textColor: ColorValue;
494
+ borderColor: ColorValue;
495
+ };
496
+ };
497
+ };
498
+ tabs: {
499
+ backgroundColor: ColorValue;
500
+ borderRadius: BorderRadiusValue;
501
+ tab: {
502
+ backgroundColor: ColorValue;
503
+ textColor: ColorValue;
504
+ borderColor: ColorValue;
505
+ borderRadius: BorderRadiusValue;
506
+ ':hover': {
507
+ backgroundColor: ColorValue;
508
+ textColor: ColorValue;
509
+ borderColor: ColorValue;
510
+ };
511
+ ':pressed': {
512
+ backgroundColor: ColorValue;
513
+ textColor: ColorValue;
514
+ borderColor: ColorValue;
515
+ };
516
+ ':selected': {
517
+ backgroundColor: ColorValue;
518
+ textColor: ColorValue;
519
+ borderColor: ColorValue;
520
+ };
521
+ };
522
+ };
523
+ toast: Record<ToastVariant, {
524
+ backgroundColor: ColorValue;
525
+ textColor: ColorValue;
526
+ borderColor: ColorValue;
527
+ iconColor: ColorValue;
528
+ }> & {
529
+ borderRadius: BorderRadiusValue;
530
+ };
531
+ toggle: {
532
+ backgroundColor: ColorValue;
533
+ textColor: ColorValue;
534
+ thumbColor: ColorValue;
535
+ ':checked': {
536
+ backgroundColor: ColorValue;
537
+ thumbColor: ColorValue;
538
+ };
539
+ };
540
+ tooltip: {
541
+ backgroundColor: ColorValue;
542
+ textColor?: ColorValue;
543
+ borderColor?: ColorValue;
544
+ borderRadius?: BorderRadiusValue;
545
+ padding?: string;
546
+ offset?: number;
547
+ arrow?: {
548
+ enabled?: boolean;
549
+ };
550
+ };
551
+ modal: {
552
+ backgroundColor: ColorValue;
553
+ borderColor: ColorValue;
554
+ textColor?: ColorValue;
555
+ };
556
+ datePicker: {
557
+ border: ColorValue;
558
+ day: {
559
+ current_month: {
560
+ textColor: ColorValue;
561
+ ':selected': {
562
+ textColor?: ColorValue;
563
+ backgroundColor?: ColorValue;
564
+ };
565
+ };
566
+ outside_month: {
567
+ textColor: ColorValue;
568
+ };
569
+ };
570
+ month: {
571
+ backgroundColor: ColorValue;
572
+ };
573
+ header: {
574
+ backgroundColor: ColorValue;
575
+ };
576
+ };
577
+ avatar: {
578
+ backgroundColor: ColorValue;
579
+ textColor: ColorValue;
580
+ shadowColor: ColorValue;
581
+ };
582
+ };
583
+ };
584
+ export type ThemeVariant = 'primary' | 'secondary' | 'tertiary' | 'ai' | 'ai_outline' | 'danger';
585
+ export type BannerMessageVariant = 'success' | 'warning' | 'default' | 'danger';
586
+ export type ToastVariant = 'success' | 'warning' | 'default' | 'danger';
587
+ export type ThemeColor = 'accent_01' | 'accent_02' | 'accent_03' | 'accent_04' | 'accent_05' | 'ai_01' | 'ai_02' | 'ai_03' | 'ai_04' | 'ai_05' | 'amp_01' | 'black_00' | 'black_01' | 'black_02' | 'black_03' | 'black_04' | 'black_05' | 'black_06' | 'black_07' | 'black_08' | 'black_09' | 'black_10' | 'destructive_01' | 'destructive_02' | 'destructive_03' | 'destructive_04' | 'destructive_05' | 'destructive_06' | 'destructive_07' | 'destructive_08' | 'destructive_09' | 'primary_01' | 'primary_02' | 'primary_03' | 'primary_04' | 'primary_05' | 'primary_06' | 'primary_07' | 'primary_08' | 'primary_09' | 'primary_10' | 'primary_11' | 'red_01' | 'success_01' | 'success_02' | 'success_03' | 'success_04' | 'success_05' | 'success_06' | 'success_07' | 'success_08' | 'success_09' | 'transparent' | 'warning_01' | 'warning_02' | 'warning_03' | 'warning_04' | 'warning_05' | 'warning_06' | 'warning_07' | 'warning_08' | 'warning_09' | 'white_00' | 'white_01' | 'white_02' | 'white_03' | 'white_04' | 'white_05' | 'white_06' | 'white_07' | 'white_08' | 'white_09';
588
+ export type BorderRadius = 'none' | 'min' | 'mid' | 'max' | 'full';
589
+ export type ButtonThemeObject = {
590
+ backgroundColor: ColorValue;
591
+ textColor: ColorValue;
592
+ borderColor: ColorValue;
593
+ borderRadius?: BorderRadiusValue;
594
+ outlineColor?: ColorValue;
595
+ };
596
+ export type BorderRadiusValue = `{${BorderRadius}}`;
597
+ export type ColorValue = `{${ThemeColor}}` | `darken(${number}%, {${ThemeColor}})` | `fade(${number}%, {${ThemeColor}})` | `lighten(${number}%, {${ThemeColor}})`;
598
+ export type DeprecatedTheme = {
599
+ name: string;
600
+ /** @deprecated */
601
+ preferences: {
602
+ width: string;
603
+ smWidth: string;
604
+ padding: string;
605
+ backgroundColor: string;
606
+ borderColor: string;
607
+ tabs: {
608
+ width: string;
609
+ backgroundColor: string;
610
+ textColor: string;
611
+ activeTextColor: string;
612
+ activeBackgroundColor: string;
613
+ activeBorderColor: string;
614
+ hoverTextColor: string;
615
+ hoverBackgroundColor: string;
616
+ notificationBadgeBackgroundColor: string;
617
+ notificationBadgeTextColor: string;
618
+ };
619
+ tools: {
620
+ width: string;
621
+ height: string;
622
+ smWidth: string;
623
+ smHeight: string;
624
+ backgroundColor: string;
625
+ textColor: string;
626
+ iconColor: string;
627
+ borderSize: string;
628
+ borderColor: string;
629
+ hoverBorderColor: string;
630
+ hoverShadowColor: string;
631
+ draggingBorderColor: string;
632
+ };
633
+ alerts: {
634
+ notice: {
635
+ backgroundColor: string;
636
+ textColor: string;
637
+ borderColor: string;
638
+ };
639
+ };
640
+ properties: {
641
+ header: {
642
+ backgroundColor: string;
643
+ fixedBackgroundColor: string;
644
+ borderColor: string;
645
+ title: {
646
+ textColor: string;
647
+ };
648
+ badge: {
649
+ backgroundColor: string;
650
+ textColor: string;
651
+ };
652
+ icon: {
653
+ color: string;
654
+ borderColor: string;
655
+ hoverBackgroundColor: string;
656
+ hoverColor: string;
657
+ destructiveHoverBackgroundColor: string;
658
+ destructiveHoverColor: string;
659
+ };
660
+ };
661
+ group: {
662
+ header: {
663
+ backgroundColor: string;
664
+ textColor: string;
665
+ iconColor: string;
666
+ collapseIconColor: string;
667
+ borderColor: string;
668
+ ':closed': {
669
+ backgroundColor: string;
670
+ textColor: string;
671
+ iconColor: string;
672
+ collapseIconColor: string;
673
+ borderColor: string;
674
+ };
675
+ };
676
+ expandButton: {
677
+ backgroundColor: string;
678
+ textColor: string;
679
+ hoverBackgroundColor: string;
680
+ hoverTextColor: string;
681
+ };
682
+ embedded: {
683
+ borderColor: string;
684
+ activeBorderColor: string;
685
+ hoverBorderColor: string;
686
+ textColor: string;
687
+ activeTextColor: string;
688
+ };
689
+ };
690
+ editor: {
691
+ label: {
692
+ default: {
693
+ textColor: string;
694
+ };
695
+ primary: {
696
+ textColor: string;
697
+ modified: {
698
+ backgroundColor: string;
699
+ textColor: string;
700
+ ':hover': {
701
+ backgroundColor: string;
702
+ textColor: string;
703
+ };
704
+ };
705
+ };
706
+ subheader: {
707
+ textColor: string;
708
+ };
709
+ secondary: {
710
+ textColor: string;
711
+ };
712
+ tertiary: {
713
+ textColor: string;
714
+ };
715
+ };
716
+ hint: {
717
+ textColor: string;
718
+ };
719
+ seperator: {
720
+ color: string;
721
+ };
722
+ columns: {
723
+ backgroundColor: string;
724
+ borderColor: string;
725
+ boxShadowColor: string;
726
+ textColor: string;
727
+ ':hover': {
728
+ backgroundColor: string;
729
+ borderColor: string;
730
+ };
731
+ ':selected': {
732
+ backgroundColor: string;
733
+ borderColor: string;
734
+ };
735
+ };
736
+ button: {
737
+ default: {
738
+ backgroundColor: string;
739
+ textColor: string;
740
+ borderColor: string;
741
+ iconColor?: string;
742
+ hover: {
743
+ backgroundColor?: string;
744
+ textColor?: string;
745
+ borderColor?: string;
746
+ iconColor?: string;
747
+ };
748
+ active: {
749
+ backgroundColor?: string;
750
+ textColor?: string;
751
+ borderColor?: string;
752
+ iconColor?: string;
753
+ };
754
+ disabled: {
755
+ backgroundColor?: string;
756
+ };
757
+ };
758
+ primary: {
759
+ backgroundColor: string;
760
+ textColor: string;
761
+ borderColor: string;
762
+ hover: {
763
+ backgroundColor?: string;
764
+ textColor?: string;
765
+ borderColor?: string;
766
+ };
767
+ };
768
+ dashed: {
769
+ textColor: string;
770
+ borderColor: string;
771
+ borderRadius: BorderRadiusValue;
772
+ hover: {
773
+ backgroundColor?: string;
774
+ textColor?: string;
775
+ borderColor?: string;
776
+ };
777
+ };
778
+ secondary: {
779
+ textColor: string;
780
+ secondaryTextColor: string;
781
+ backgroundColor: string;
782
+ secondaryBackgroundColor: string;
783
+ borderColor: string;
784
+ secondaryBorderColor: string;
785
+ };
786
+ };
787
+ input: {
788
+ backgroundColor: string;
789
+ textColor: string;
790
+ borderColor: string;
791
+ labelBackgroundColor: string;
792
+ labelTextColor: string;
793
+ labelBorderColor: string;
794
+ errorBorderColor: string;
795
+ errorShadowColor: string;
796
+ placeholderTextColor: string;
797
+ focus: {
798
+ boxShadowColor?: string;
799
+ };
800
+ disabled: {
801
+ backgroundColor?: string;
802
+ textColor?: string;
803
+ borderColor?: string;
804
+ };
805
+ };
806
+ displayCondition: {
807
+ backgroundColor: string;
808
+ borderColor: string;
809
+ titleColor: string;
810
+ textColor: string;
811
+ };
812
+ card: {
813
+ borderColor: string;
814
+ };
815
+ dropdown: {
816
+ primary: {
817
+ menu: {
818
+ backgroundColor: string;
819
+ borderColor: string;
820
+ };
821
+ item: {
822
+ textColor: string;
823
+ backgroundColor: string;
824
+ focus: {
825
+ textColor: string;
826
+ backgroundColor: string;
827
+ };
828
+ hover: {
829
+ textColor: string;
830
+ backgroundColor: string;
831
+ };
832
+ active: {
833
+ textColor: string;
834
+ backgroundColor: string;
835
+ hover: {
836
+ textColor: string;
837
+ backgroundColor: string;
838
+ };
839
+ };
840
+ };
841
+ };
842
+ secondary: {
843
+ menu: {
844
+ backgroundColor: string;
845
+ borderColor: string;
846
+ hover: {
847
+ color: string;
848
+ backgroundColor: string;
849
+ };
850
+ };
851
+ item: {
852
+ textColor: string;
853
+ backgroundColor: string;
854
+ hover: {
855
+ textColor: string;
856
+ backgroundColor: string;
857
+ };
858
+ active: {
859
+ textColor: string;
860
+ backgroundColor: string;
861
+ hover: {
862
+ textColor: string;
863
+ backgroundColor: string;
864
+ };
865
+ };
866
+ };
867
+ button: {
868
+ textColor: string;
869
+ backgroundColor: string;
870
+ borderColor: string;
871
+ active: {
872
+ borderColor: string;
873
+ };
874
+ };
875
+ icon: {
876
+ active: {
877
+ color: string;
878
+ };
879
+ };
880
+ };
881
+ };
882
+ slider: {
883
+ fillColor: string;
884
+ emptyColor: string;
885
+ handleColor: string;
886
+ handleBorderColor: string;
887
+ disabledColor: string;
888
+ };
889
+ colorpicker: {
890
+ backgroundColor: string;
891
+ borderColor: string;
892
+ boxShadowColor: string;
893
+ circleBorderColor: string;
894
+ checkLightIconColor: string;
895
+ checkDarkIconColor: string;
896
+ transparentCircleBackgroundColor: string;
897
+ };
898
+ social: {
899
+ textColor: ColorValue;
900
+ backgroundColor: ColorValue;
901
+ dotColor: ColorValue;
902
+ };
903
+ };
904
+ card: {
905
+ textColor: string;
906
+ borderColor: string;
907
+ backgroundColor: string;
908
+ title: {
909
+ textColor: string;
910
+ };
911
+ active: {
912
+ textColor: string;
913
+ };
914
+ };
915
+ };
916
+ close: {
917
+ backgroundColor: string;
918
+ iconColor: string;
919
+ borderColor: string;
920
+ ':hover': {
921
+ backgroundColor: string;
922
+ iconColor: string;
923
+ borderColor: string;
924
+ };
925
+ };
926
+ branding: {
927
+ height: string;
928
+ backgroundColor: ColorValue;
929
+ textColor: ColorValue;
930
+ linkColor: ColorValue;
931
+ iconColor: ColorValue;
932
+ ':hover'?: {
933
+ backgroundColor?: ColorValue;
934
+ textColor?: ColorValue;
935
+ linkColor?: ColorValue;
936
+ iconColor?: ColorValue;
937
+ };
938
+ };
939
+ };
940
+ /** @deprecated */
941
+ actions: {
942
+ backgroundColor: string;
943
+ foregroundColor: string;
944
+ hoverForegroundColor: string;
945
+ selectedForegroundColor: string;
946
+ highlightBackgroundColor: string;
947
+ highlightForegroundColor: string;
948
+ separatorColor: string;
949
+ borderColor: string;
950
+ errorColor: string;
951
+ };
952
+ /** @deprecated */
953
+ canvas: {
954
+ backgroundColor: string;
955
+ borderColor: string;
956
+ backgroundCheckerColor: string;
957
+ };
958
+ /** @deprecated */
959
+ preview: {
960
+ padding: string;
961
+ paddingV?: string;
962
+ paddingH?: string;
963
+ backgroundColor: string;
964
+ borderColor: string;
965
+ titleColor: string;
966
+ dropdownValueColor: string;
967
+ dropdownBorderColor: string;
968
+ inboxPreviewButtonColor: string;
969
+ iconColor: string;
970
+ iconSelectedColor: string;
971
+ iconHoverColor: string;
972
+ iconHoverBorderColor: string;
973
+ previewModalBackground: string;
974
+ buttonBackgroundSelected: string;
975
+ buttonBackgroundDefault: string;
976
+ buttonDefaultColor: string;
977
+ buttonSelectedColor: string;
978
+ buttonDefaultBorder: string;
979
+ buttonHoverBorderColor: string;
980
+ buttonSelectedBorder: string;
981
+ buttonSecondaryBackground: string;
982
+ buttonSuccessBackground: string;
983
+ buttonLoadingBackground: string;
984
+ buttonErrorBackground: string;
985
+ buttonSecondaryColor: string;
986
+ buttonSuccessColor: string;
987
+ buttonErrorColor: string;
988
+ buttonLoadingColor: string;
989
+ deviceContainerBorderColor: string;
990
+ deviceHeaderBackgroundColor: string;
991
+ deviceBackgroundSelected: string;
992
+ deviceBackgroundDefault: string;
993
+ separatorColor: string;
994
+ darkModeBackgroundColor: string;
995
+ darkModeIconColor: string;
996
+ lightModeBackgroundColor: string;
997
+ lightModeIconColor: string;
998
+ galleryBackgroundColor: string;
999
+ };
1000
+ /** @deprecated */
1001
+ panel: {
1002
+ backgroundColor: string;
1003
+ textColor: string;
1004
+ mutedColor: string;
1005
+ input: {
1006
+ backgroundColor: string;
1007
+ placeholderTextColor: string;
1008
+ textColor: string;
1009
+ };
1010
+ };
1011
+ /** @deprecated */
1012
+ toolbar: {
1013
+ backgroundColor: string;
1014
+ borderColor: string;
1015
+ separatorColor: string;
1016
+ button: {
1017
+ backgroundColor: string;
1018
+ textColor: string;
1019
+ borderColor: string;
1020
+ ':hover'?: {
1021
+ backgroundColor?: string;
1022
+ textColor?: string;
1023
+ borderColor?: string;
1024
+ };
1025
+ };
1026
+ };
1027
+ /** @deprecated */
1028
+ list: {
1029
+ separatorColor: string;
1030
+ hoverBackgroundColor: string;
1031
+ };
1032
+ /** @deprecated */
1033
+ suggestions: {
1034
+ backgroundColor: string;
1035
+ borderColor: string;
1036
+ textColor: string;
1037
+ titleColor: string;
1038
+ subtitleColor: string;
1039
+ textCard: {
1040
+ backgroundColor: string;
1041
+ textColor: string;
1042
+ borderColor: string;
1043
+ boxShadowColor: string;
1044
+ number: {
1045
+ backgroundColor: string;
1046
+ textColor: string;
1047
+ borderColor: string;
1048
+ };
1049
+ hover: {
1050
+ backgroundColor: string;
1051
+ textColor: string;
1052
+ borderColor: string;
1053
+ boxShadowColor: string;
1054
+ };
1055
+ };
1056
+ imageCard: {
1057
+ backgroundColor: string;
1058
+ textColor: string;
1059
+ boxShadowColor: string;
1060
+ hover: {
1061
+ backgroundColor: string;
1062
+ textColor: string;
1063
+ boxShadowColor: string;
1064
+ };
1065
+ };
1066
+ closeButton: {
1067
+ iconColor: string;
1068
+ hover: {
1069
+ iconColor: string;
1070
+ };
1071
+ };
1072
+ error: {
1073
+ icon: {
1074
+ textColor: string;
1075
+ };
1076
+ };
1077
+ footer: {
1078
+ backgroundColor: string;
1079
+ textColor: string;
1080
+ borderColor: string;
1081
+ boxShadowColor: string;
1082
+ };
1083
+ loader: {
1084
+ backgroundColor: string;
1085
+ content: {
1086
+ backgroundColor: string;
1087
+ headingColor: string;
1088
+ textColor: string;
1089
+ };
1090
+ progressBar: {
1091
+ backgroundColor: string;
1092
+ };
1093
+ };
1094
+ overlay: {
1095
+ backgroundColor: string;
1096
+ };
1097
+ recents: {
1098
+ backgroundColor: string;
1099
+ textColor: string;
1100
+ borderColor: string;
1101
+ boxShadowColor: string;
1102
+ hover: {
1103
+ backgroundColor: string;
1104
+ textColor: string;
1105
+ borderColor: string;
1106
+ };
1107
+ };
1108
+ score: {
1109
+ default: {
1110
+ backgroundColor: string;
1111
+ textColor: string;
1112
+ };
1113
+ good: {
1114
+ backgroundColor: string;
1115
+ textColor: string;
1116
+ };
1117
+ bad: {
1118
+ backgroundColor: string;
1119
+ textColor: string;
1120
+ };
1121
+ };
1122
+ /** @deprecated */
1123
+ warning: {
1124
+ backgroundColor: string;
1125
+ color: string;
1126
+ };
1127
+ };
1128
+ /** @deprecated */
1129
+ ai: {
1130
+ color: string;
1131
+ focus: {
1132
+ color: string;
1133
+ };
1134
+ };
1135
+ };
1136
+ }
1137
+ declare module "state/types/types" {
192
1138
  import * as Ariakit from '@ariakit/react';
193
1139
  import { MutableRefObject, ReactInstance } from 'react';
194
- import { State as Design } from '../../state/reducer/design';
1140
+ import { State as Design } from '../reducer/design';
195
1141
  import { CollaborationThread } from "editor/components/editors/types";
196
- import { Theme } from '../../editor/themes/types';
1142
+ import { Theme } from "editor/themes/types";
197
1143
  export type DesignMode = 'live' | 'edit';
198
1144
  export type Device = 'desktop' | 'mobile' | 'tablet';
199
1145
  export type DisplayMode = 'web' | 'email' | 'popup' | 'document';
@@ -494,7 +1440,7 @@ declare module "embed/Config" {
494
1440
  import { ValidationResult } from 'amphtml-validator';
495
1441
  import { FontList } from "engine/config/fonts";
496
1442
  import { TextDirection } from "engine/config/intl";
497
- import { AppearanceConfig, Audit, Device, DisplayConditions, DisplayMode, Fonts, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, MergeTagsValues, SpecialLinks, Tabs, ToolsConfig, User } from "state/types/index";
1443
+ import { AppearanceConfig, Audit, Device, DisplayConditions, DisplayMode, Fonts, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, MergeTagsValues, SpecialLinks, Tabs, ToolsConfig, User } from "state/types/types";
498
1444
  import { DeepPartial } from "editor/components/editors/types";
499
1445
  export interface Config {
500
1446
  id?: string;
@@ -625,7 +1571,7 @@ declare module "embed/Config" {
625
1571
  declare module "engine/utils/findDeep" {
626
1572
  export function findDeep<T = any>(item: Record<string, T> | Array<T> | T, eq: ((item: T) => boolean) | unknown, { _path, _visited }?: {
627
1573
  _path?: string[];
628
- _visited?: WeakMap<object, any>;
1574
+ _visited?: WeakMap<WeakKey, any>;
629
1575
  }): string[][];
630
1576
  }
631
1577
  declare module "embed/Frame" {
@@ -762,7 +1708,7 @@ declare module "editor/hooks/useConfig" {
762
1708
  export function withConfig<C extends React.ComponentType>(Component: C): React.MemoExoticComponent<React.ForwardRefExoticComponent<object & Record<"config", any> & React.RefAttributes<unknown>>>;
763
1709
  }
764
1710
  declare module "engine/utils/position" {
765
- import { DisplayMode } from '../../state/types';
1711
+ import { DisplayMode } from "state/types/types";
766
1712
  export const ENABLE_BACKGROUND_POSITION_FOR_EMAILS = true;
767
1713
  export type Position = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
768
1714
  export function positionToMarginArray(position: Position | undefined): string[] | readonly [0, "auto", "auto", 0] | readonly [0, "auto", "auto", "auto"] | readonly [0, 0, "auto", "auto"] | readonly ["auto", "auto", "auto", 0] | readonly ["auto"] | readonly ["auto", 0, "auto", "auto"] | readonly ["auto", "auto", 0, 0] | readonly ["auto", "auto", 0, "auto"] | readonly ["auto", 0, 0, "auto"];
@@ -815,17 +1761,17 @@ declare module "editor/design-system/components/Input" {
815
1761
  }
816
1762
  export const Input: React.ForwardRefExoticComponent<Pick<InputProps, keyof InputProps> & React.RefAttributes<HTMLInputElement>>;
817
1763
  export const S: {
818
- Form: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
819
- FormInputGroup: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
820
- FormLabel: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
821
- FormInput: import("styled-components").StyledComponent<any, any, object, string | number | symbol>;
1764
+ Form: import("styled-components").StyledComponent<any, any, any, any>;
1765
+ FormInputGroup: import("styled-components").StyledComponent<any, any, any, any>;
1766
+ FormLabel: import("styled-components").StyledComponent<any, any, any, any>;
1767
+ FormInput: import("styled-components").StyledComponent<any, any, any, any>;
822
1768
  Message: import("styled-components").StyledComponent<"div", any, {}, never>;
823
1769
  };
824
1770
  }
825
1771
  declare module "editor/design-system/components/Button" {
826
1772
  import React from 'react';
827
1773
  import * as Ariakit from '@ariakit/react';
828
- import { Theme } from '../../themes/types';
1774
+ import { Theme } from "editor/themes/types";
829
1775
  export interface ButtonProps extends Ariakit.ButtonProps {
830
1776
  children: React.ReactNode;
831
1777
  circle?: boolean;
@@ -919,7 +1865,7 @@ declare module "editor/design-system/components/Dropdown" {
919
1865
  export function Dropdown(props: DropdownProps): JSX.Element;
920
1866
  }
921
1867
  declare module "editor/design-system/components/CounterInput" {
922
- import { DisplayMode } from '../../../state/types';
1868
+ import { DisplayMode } from "state/types/types";
923
1869
  export interface CounterInputProps {
924
1870
  absoluteBaseValue?: number;
925
1871
  buttonSize?: 'lg' | 'md' | 'sm' | undefined;
@@ -944,7 +1890,7 @@ declare module "editor/components/editors/common/Counter" {
944
1890
  export default function Counter(props: CounterProps): JSX.Element;
945
1891
  }
946
1892
  declare module "engine/utils/sizeUtils" {
947
- import { DisplayMode } from '../../state/types';
1893
+ import { DisplayMode } from "state/types/types";
948
1894
  export const ENABLE_BACKGROUND_SIZE_FOR_EMAILS = false;
949
1895
  export function normalizeFloat(n: number | string | undefined, decimalsPlace?: number): number;
950
1896
  export function normalizeSize(size: number | string | undefined, { decimalsPlace }?: {
@@ -962,7 +1908,7 @@ declare module "engine/utils/sizeUtils" {
962
1908
  }): string;
963
1909
  }
964
1910
  declare module "engine/config/mergeTags" {
965
- import { MergeTags } from '../../state/types';
1911
+ import { MergeTags } from "state/types/types";
966
1912
  export function getMergeTags(): MergeTags;
967
1913
  export function getMergeTagsVersion(): number;
968
1914
  export function setMergeTags(_mergeTags: MergeTags): void;
@@ -998,7 +1944,7 @@ declare module "engine/utils/getNumberOrString" {
998
1944
  export function getNumberOrString(str: string | number): string | number;
999
1945
  }
1000
1946
  declare module "engine/utils/flattenMergeTags" {
1001
- import { MergeTag, MergeTags, MergeTagsConfig } from '../../state/types';
1947
+ import { MergeTag, MergeTags, MergeTagsConfig } from "state/types/types";
1002
1948
  export type MergeTagWithMeta = MergeTag & {
1003
1949
  _meta: {
1004
1950
  key: string;
@@ -1017,7 +1963,7 @@ declare module "engine/utils/testBrowserFeatures" {
1017
1963
  export function replaceWithLookBehind(str: string, lookbBehindStr: string, regex: RegExp, replacement: string): string;
1018
1964
  }
1019
1965
  declare module "engine/utils/applyMergeTagsToHtml" {
1020
- import { MergeTags, MergeTagsValues } from '../../state/types';
1966
+ import { MergeTags, MergeTagsValues } from "state/types/types";
1021
1967
  export function applyMergeTagsToHtml(html: string | undefined, { mergeTagsSchema, mergeTagsValues: _mergeTagsValues, _skipTags, _useRawValue, }: {
1022
1968
  mergeTagsSchema: MergeTags | undefined;
1023
1969
  mergeTagsValues: MergeTagsValues | undefined;
@@ -1026,7 +1972,7 @@ declare module "engine/utils/applyMergeTagsToHtml" {
1026
1972
  }): string;
1027
1973
  }
1028
1974
  declare module "engine/utils/generateMergeTagHtml" {
1029
- import { Icon, MergeTag } from '../../state/types';
1975
+ import { Icon, MergeTag } from "state/types/types";
1030
1976
  export function generateMergeTagHtml(mergeTag: Pick<MergeTag, 'name' | 'value' | 'sample'> & {
1031
1977
  icon?: Icon | string;
1032
1978
  }): string;
@@ -1066,7 +2012,7 @@ declare module "state/types/RootState" {
1066
2012
  }
1067
2013
  declare module "editor/hooks/useImageUploader" {
1068
2014
  import { useStore } from 'react-redux';
1069
- import { ImageSource } from '../../state/types';
2015
+ import { ImageSource } from "state/types/types";
1070
2016
  type Store = Pick<ReturnType<typeof useStore>, 'dispatch' | 'getState'>;
1071
2017
  export interface Params {
1072
2018
  maxSize?: number | null;
@@ -1137,7 +2083,7 @@ declare module "editor/hooks/useImageUploader" {
1137
2083
  }
1138
2084
  declare module "editor/components/common/ImageUploadButton" {
1139
2085
  import React from 'react';
1140
- import { ImageSource } from '../../../state/types';
2086
+ import { ImageSource } from "state/types/types";
1141
2087
  import { ButtonProps } from "editor/design-system/components/Button";
1142
2088
  export interface ImageUploadButtonInstance {
1143
2089
  clearError: () => void;
@@ -1248,11 +2194,11 @@ declare module "editor/components/editors/ImageUploader" {
1248
2194
  export const ImageUploader: ({ shouldRender, label, maxSize, updateImage, showImagesDropdown, showUploadsDropdown, intl, onDropAccepted, onDropRejected, isUploading, uploadProgress, postprocessedImageUrl, togglePixieModal, imageExists, error, onImageSelect, onImageUpload, onUploadProgressChange, onUploadStatusChange, onErrorChange, imageUploadButtonRef, showError, ...restProps }: ImageUploaderProps) => JSX.Element;
1249
2195
  }
1250
2196
  declare module "editor/themes/helpers" {
1251
- import { Theme } from './types';
2197
+ import { Theme } from "editor/themes/types";
1252
2198
  export function parseThemeValues<T extends Theme>(theme: T): T;
1253
2199
  }
1254
2200
  declare module "editor/themes/modern/light" {
1255
- import { DeprecatedTheme, Theme } from '../types';
2201
+ import { DeprecatedTheme, Theme } from "editor/themes/types";
1256
2202
  export const unparsedTheme: Theme & DeprecatedTheme;
1257
2203
  export const parsedTheme: Theme & DeprecatedTheme;
1258
2204
  }
@@ -1261,7 +2207,7 @@ declare module "editor/themes/classic/light" {
1261
2207
  export const parsedTheme: any;
1262
2208
  }
1263
2209
  declare module "editor/themes/modern/dark" {
1264
- import { DeprecatedTheme, Theme } from '../types';
2210
+ import { DeprecatedTheme, Theme } from "editor/themes/types";
1265
2211
  export const unparsedTheme: Theme & DeprecatedTheme;
1266
2212
  export const parsedTheme: Theme & DeprecatedTheme;
1267
2213
  }
@@ -1279,7 +2225,7 @@ declare module "editor/themes/index" {
1279
2225
  export default themes;
1280
2226
  }
1281
2227
  declare module "editor/hooks/useTheme" {
1282
- import { DeprecatedTheme, Theme } from '../themes/types';
2228
+ import { DeprecatedTheme, Theme } from "editor/themes/types";
1283
2229
  export function useTheme(): Theme & DeprecatedTheme;
1284
2230
  }
1285
2231
  declare module "editor/components/editors/pixie/pixie.umd" {
@@ -1497,10 +2443,16 @@ declare module "engine/utils/stringifyFunction" {
1497
2443
  export function stringifyFunctionsFromObject(obj: object): {};
1498
2444
  }
1499
2445
  declare module "engine/utils/normalizeLinkTypes" {
1500
- import { LinkType, LinkTypes, LinkTypesSharedConfig } from '../../state/types';
1501
- export function normalizeLinkTypeSharedConfig(linkType: LinkTypesSharedConfig | null | undefined): any;
1502
- export function normalizeLinkType(linkType: LinkType): any;
1503
- export function normalizeLinkTypes(linkTypes: LinkTypes): any[];
2446
+ import { LinkType, LinkTypes, LinkTypesSharedConfig } from "state/types/types";
2447
+ export function normalizeLinkTypeSharedConfig(linkType: LinkTypesSharedConfig | null | undefined): LinkTypesSharedConfig & {
2448
+ attrs: {};
2449
+ };
2450
+ export function normalizeLinkType(linkType: LinkType): LinkTypesSharedConfig & {
2451
+ attrs: {};
2452
+ };
2453
+ export function normalizeLinkTypes(linkTypes: LinkTypes): (LinkTypesSharedConfig & {
2454
+ attrs: {};
2455
+ })[];
1504
2456
  }
1505
2457
  declare module "engine/utils/makeClassMethodsEnumerable" {
1506
2458
  export function makeClassMethodsEnumerable(instance: InstanceType<any>, ignoreList?: string[]): void;
@@ -1511,7 +2463,7 @@ declare module "embed/helpers" {
1511
2463
  declare module "embed/Editor" {
1512
2464
  import { Frame } from "embed/Frame";
1513
2465
  import { Config, ExportFromApiResult, ExportHtmlOptions, ExportHtmlResult, ExportPlainTextResult, ExportImageFromApiOptions, ExportLiveHtmlOptions, ExportPdfFromApiOptions, ExportPlainTextOptions, ExportZipFromApiOptions, SaveDesignOptions, ExportLiveHtmlResult } from "embed/Config";
1514
- import { AppearanceConfig, Audit, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, Tabs, Translations, User, Validator } from "state/types/index";
2466
+ import { AppearanceConfig, Audit, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, Tabs, Translations, User, Validator } from "state/types/types";
1515
2467
  import { BodyValues } from "engine/options/bodies";
1516
2468
  import { Locale, TextDirection } from "engine/config/intl";
1517
2469
  import { DeepPartial } from "editor/components/editors/types";
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "unlayer-types",
3
- "version": "1.16.0",
3
+ "version": "1.19.0",
4
4
  "license": "MIT"
5
5
  }