unlayer-types 0.0.0-dev-af8b1296

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 +3539 -0
  2. package/package.json +5 -0
package/embed.d.ts ADDED
@@ -0,0 +1,3539 @@
1
+ declare module "engine/config/editorSettings" {
2
+ export interface EditorSettings {
3
+ minHeaders?: number;
4
+ maxHeaders?: number;
5
+ minFooters?: number;
6
+ maxFooters?: number;
7
+ minRows?: number;
8
+ maxRows?: number;
9
+ contentType?: 'page' | 'block';
10
+ autoSelectOnDrop: boolean;
11
+ columns?: boolean;
12
+ confirmOnDelete?: boolean;
13
+ title?: string;
14
+ }
15
+ export function overrideEditorSettings(editorSettingsOverrides: EditorSettings): void;
16
+ export function getEditorSettings(): EditorSettings;
17
+ }
18
+ declare module "editor/components/editors/types" {
19
+ import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
20
+ import { AppearanceConfig, Device, DisplayMode, Location, UndoRedoBehavior, Variant } from "state/types/types";
21
+ export type LoadingState = 'not-loaded' | 'loading' | 'loaded' | 'error';
22
+ export type UpdatingState = 'updating' | undefined;
23
+ export type DeletionState = 'deleting' | 'failed' | undefined;
24
+ export interface EditorProps<Value, WidgetParams = object> {
25
+ value: Value | undefined;
26
+ defaultValue: Value | undefined;
27
+ updateValue: (newValue: Value | undefined, data?: object, options?: {
28
+ deviceOverride?: Device;
29
+ undoRedoBehavior?: UndoRedoBehavior;
30
+ }) => void;
31
+ name: string;
32
+ /** @deprecated Use widgetParams instead */
33
+ data?: WidgetParams;
34
+ disabled?: boolean;
35
+ isLocked?: boolean;
36
+ lockReason?: 'styleguide' | 'admin' | undefined;
37
+ widgetParams?: WidgetParams;
38
+ deviceName: Device;
39
+ displayMode: DisplayMode;
40
+ label?: string;
41
+ location: Location;
42
+ values: {
43
+ [key: string]: unknown;
44
+ containerPadding?: string;
45
+ };
46
+ rootValues: {
47
+ [key: string]: any;
48
+ _override?: {
49
+ [key: string]: any;
50
+ };
51
+ };
52
+ appearance: AppearanceConfig;
53
+ entitlements: {
54
+ audit?: boolean;
55
+ allowedDomains?: number;
56
+ branding?: boolean;
57
+ collaboration?: boolean;
58
+ displayConditions?: boolean;
59
+ customBlocks?: number;
60
+ customCSS?: boolean;
61
+ customFonts?: boolean;
62
+ customJS?: boolean;
63
+ customTools?: number;
64
+ customTabs?: number;
65
+ customThemes?: boolean;
66
+ imageEditor?: boolean;
67
+ selectImage?: boolean;
68
+ stockImages?: boolean;
69
+ userUploads?: boolean;
70
+ uploadMaxSize?: number;
71
+ };
72
+ item: {
73
+ id: string;
74
+ type?: string;
75
+ slug?: string;
76
+ location?: Location;
77
+ values?: Record<string, any>;
78
+ };
79
+ project: object;
80
+ onImageClick?: (url: string) => void;
81
+ }
82
+ export type HeadArguments = [
83
+ Record<string, any>,
84
+ Record<string, any>,
85
+ {
86
+ rowIndex: number | undefined;
87
+ rowCells: number[] | undefined;
88
+ rowValues: Record<string, any> | undefined;
89
+ columnIndex: number | undefined;
90
+ columnValues: Record<string, any> | undefined;
91
+ bodyValues: Record<string, any> | undefined;
92
+ displayMode: DisplayMode;
93
+ embeddedValues: Record<string, any>;
94
+ isViewer: boolean;
95
+ variant: Variant;
96
+ type?: string;
97
+ }
98
+ ];
99
+ export interface Head {
100
+ css?: (...args: HeadArguments) => string | void;
101
+ js?: (...args: HeadArguments) => string | void;
102
+ tags?: (...args: HeadArguments) => string[] | void;
103
+ }
104
+ export type CollaborationFilter = 'only_yours' | 'resolved';
105
+ export interface CollaborationFilterDetails {
106
+ label?: string;
107
+ }
108
+ export type CollaborationType = 'feedback' | 'idea' | 'question' | 'urgent';
109
+ export interface CollaborationTypeDetails {
110
+ label?: string;
111
+ icon: IconDefinition;
112
+ color: string | undefined;
113
+ }
114
+ export type CollaborationThreadStatus = 'open' | 'resolved';
115
+ export interface CollaborationThread {
116
+ id: number;
117
+ projectId: string | number;
118
+ designId: string;
119
+ user: CollaborationUser;
120
+ itemId: string;
121
+ type: CollaborationType;
122
+ status: CollaborationThreadStatus | null | undefined;
123
+ commentCount: number;
124
+ firstComment: CollaborationThreadComment;
125
+ createdAt: string;
126
+ updatedAt: string;
127
+ }
128
+ export interface CollaborationThreadComment {
129
+ id: number;
130
+ threadId: CollaborationThread['id'];
131
+ user: CollaborationUser;
132
+ text: string;
133
+ createdAt: string;
134
+ updatedAt: string;
135
+ }
136
+ export interface CollaborationUser {
137
+ id: string;
138
+ name: string | undefined;
139
+ avatar: string | undefined;
140
+ }
141
+ export type DeepPartial<T> = T extends object ? {
142
+ [P in keyof T]?: DeepPartial<T[P]>;
143
+ } : T;
144
+ export type LanguageOverride = {
145
+ [language: string]: {
146
+ [propertyName: string]: string;
147
+ };
148
+ };
149
+ export type LanguagesValue = {
150
+ _languages?: LanguageOverride;
151
+ };
152
+ }
153
+ declare module "state/types/RootState" {
154
+ import { StateType } from 'typesafe-actions';
155
+ import reducer from '../reducer';
156
+ export type RootState = StateType<typeof reducer>;
157
+ }
158
+ declare module "editor/themes/types" {
159
+ import { AppearanceConfig } from "state/types/types";
160
+ import { DeepPartial } from "editor/components/editors/types";
161
+ export type ThemeName = 'classic_light' | 'classic_dark' | 'modern_light' | 'modern_dark';
162
+ export type ThemeNamePlusLightDark = ThemeName | 'light' | 'dark';
163
+ export type Theme = {
164
+ name: ThemeName;
165
+ isCustom?: boolean;
166
+ isDark: boolean;
167
+ isClassic?: boolean;
168
+ mapping: {
169
+ [key: string]: Record<string, string>;
170
+ borderRadius: Record<BorderRadius, string>;
171
+ colors: Record<ThemeColor, string>;
172
+ };
173
+ components: {
174
+ textEditor: {
175
+ toolbar: {
176
+ backgroundColor: ColorValue;
177
+ borderColor: ColorValue;
178
+ separatorColor: ColorValue;
179
+ button: {
180
+ backgroundColor: ColorValue;
181
+ textColor: ColorValue;
182
+ borderColor: ColorValue;
183
+ ':hover'?: {
184
+ backgroundColor?: ColorValue;
185
+ textColor?: ColorValue;
186
+ borderColor?: ColorValue;
187
+ };
188
+ ':active'?: {
189
+ backgroundColor: ColorValue;
190
+ textColor?: ColorValue;
191
+ borderColor?: ColorValue;
192
+ };
193
+ };
194
+ };
195
+ };
196
+ actionBar?: (Partial<Theme['components']['bar']> & {
197
+ compact?: boolean;
198
+ defaultPlacement: NonNullable<AppearanceConfig['actionBar']>['placement'];
199
+ }) | undefined;
200
+ shimmerLoader: {
201
+ fromColor: ColorValue;
202
+ toColor: ColorValue;
203
+ };
204
+ audit: {
205
+ error: {
206
+ backgroundColor: ColorValue;
207
+ textColor: ColorValue;
208
+ iconColor: ColorValue;
209
+ borderColor: ColorValue;
210
+ borderRadius: BorderRadiusValue;
211
+ ':hover': {
212
+ backgroundColor?: ColorValue;
213
+ textColor?: ColorValue;
214
+ iconColor?: ColorValue;
215
+ borderColor?: ColorValue;
216
+ };
217
+ };
218
+ };
219
+ bannerMessage: Record<BannerMessageVariant, {
220
+ backgroundColor: ColorValue;
221
+ textColor: ColorValue;
222
+ borderColor: ColorValue;
223
+ iconColor: ColorValue;
224
+ }> & {
225
+ borderRadius: BorderRadiusValue;
226
+ };
227
+ bar: {
228
+ backgroundColor: ColorValue;
229
+ textColor?: ColorValue;
230
+ borderColor?: ColorValue;
231
+ borderRadius?: BorderRadiusValue;
232
+ button: {
233
+ backgroundColor: ColorValue;
234
+ textColor?: ColorValue;
235
+ borderColor?: ColorValue;
236
+ borderRadius?: BorderRadiusValue;
237
+ disabledTextColor?: string;
238
+ ':hover': {
239
+ backgroundColor: ColorValue;
240
+ textColor?: ColorValue;
241
+ borderColor?: ColorValue;
242
+ };
243
+ ':pressed': {
244
+ backgroundColor: ColorValue;
245
+ textColor?: ColorValue;
246
+ borderColor?: ColorValue;
247
+ };
248
+ ':selected': {
249
+ backgroundColor?: ColorValue;
250
+ textColor?: ColorValue;
251
+ borderColor?: ColorValue;
252
+ };
253
+ ':highlighted': {
254
+ backgroundColor?: ColorValue;
255
+ textColor?: ColorValue;
256
+ borderColor?: ColorValue;
257
+ };
258
+ ':destructive': {
259
+ backgroundColor?: ColorValue;
260
+ textColor?: ColorValue;
261
+ };
262
+ };
263
+ dropdown: {
264
+ item: {
265
+ backgroundColor: ColorValue | undefined;
266
+ textColor: ColorValue | undefined;
267
+ ':selected'?: {
268
+ textColor?: ColorValue;
269
+ };
270
+ };
271
+ };
272
+ separator: {
273
+ borderColor?: ColorValue;
274
+ };
275
+ };
276
+ badge: {
277
+ backgroundColor: ColorValue;
278
+ textColor?: ColorValue;
279
+ borderColor?: ColorValue;
280
+ borderRadius?: BorderRadiusValue;
281
+ };
282
+ buttons: Record<ThemeVariant, ButtonThemeObject & {
283
+ ':hover': Partial<ButtonThemeObject>;
284
+ ':pressed': Partial<ButtonThemeObject>;
285
+ }>;
286
+ checkbox: {
287
+ backgroundColor: ColorValue;
288
+ borderColor: ColorValue;
289
+ borderRadius: BorderRadiusValue;
290
+ checkColor?: ColorValue;
291
+ label: {
292
+ textColor?: ColorValue;
293
+ };
294
+ ':checked': {
295
+ backgroundColor: ColorValue;
296
+ borderColor?: ColorValue;
297
+ borderRadius?: BorderRadiusValue;
298
+ checkColor?: ColorValue;
299
+ label?: {
300
+ textColor?: ColorValue;
301
+ };
302
+ };
303
+ };
304
+ counter: {
305
+ button?: Theme['components']['buttons']['secondary'];
306
+ dropdown?: Partial<Theme['components']['dropdown']>;
307
+ input?: Theme['components']['input'];
308
+ };
309
+ dropdown: {
310
+ button: {
311
+ backgroundColor: ColorValue;
312
+ borderColor: ColorValue;
313
+ borderRadius: BorderRadiusValue;
314
+ textColor: ColorValue;
315
+ ':disabled'?: {
316
+ backgroundColor?: ColorValue;
317
+ borderColor?: ColorValue;
318
+ textColor?: ColorValue;
319
+ };
320
+ ':hover'?: {
321
+ backgroundColor?: ColorValue;
322
+ borderColor?: ColorValue;
323
+ textColor?: ColorValue;
324
+ };
325
+ ':open'?: {
326
+ backgroundColor?: ColorValue;
327
+ borderColor?: ColorValue;
328
+ borderRadius?: BorderRadiusValue;
329
+ textColor?: ColorValue;
330
+ };
331
+ };
332
+ popover: {
333
+ backgroundColor: ColorValue;
334
+ borderColor: ColorValue;
335
+ boxShadowColor?: ColorValue;
336
+ borderRadius: BorderRadiusValue;
337
+ textColor: ColorValue;
338
+ };
339
+ item: {
340
+ backgroundColor: ColorValue;
341
+ textColor: ColorValue;
342
+ ':hover'?: {
343
+ backgroundColor?: ColorValue;
344
+ textColor?: ColorValue;
345
+ };
346
+ ':selected'?: {
347
+ backgroundColor?: ColorValue;
348
+ textColor?: ColorValue;
349
+ };
350
+ ':highlighted'?: {
351
+ backgroundColor?: ColorValue;
352
+ textColor?: ColorValue;
353
+ };
354
+ };
355
+ separator: {
356
+ borderColor?: ColorValue;
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
+ syncedBlocks: {
400
+ backgroundColor: ColorValue;
401
+ borderRadius: BorderRadiusValue;
402
+ header: {
403
+ backgroundColor: ColorValue;
404
+ textColor: ColorValue;
405
+ buttonColor: ColorValue;
406
+ ':hover': {
407
+ backgroundColor: ColorValue;
408
+ };
409
+ };
410
+ content: {
411
+ backgroundColor: ColorValue;
412
+ textColor: ColorValue;
413
+ };
414
+ icon: {
415
+ color: ColorValue;
416
+ };
417
+ title: {
418
+ color: ColorValue;
419
+ };
420
+ subtext: {
421
+ color: ColorValue;
422
+ };
423
+ dialog: {
424
+ backgroundColor: ColorValue;
425
+ overlayColor: ColorValue;
426
+ borderRadius: BorderRadiusValue;
427
+ };
428
+ ':closed': {
429
+ header: {
430
+ backgroundColor: ColorValue;
431
+ textColor: ColorValue;
432
+ buttonColor: ColorValue;
433
+ };
434
+ };
435
+ };
436
+ backgroundColor: ColorValue;
437
+ borderColor: ColorValue;
438
+ header: {
439
+ backgroundColor?: ColorValue;
440
+ textColor?: ColorValue;
441
+ buttonColor?: ColorValue;
442
+ rightLabel: {
443
+ backgroundColor?: ColorValue;
444
+ textColor?: ColorValue;
445
+ };
446
+ ':hover'?: {
447
+ backgroundColor?: ColorValue;
448
+ };
449
+ };
450
+ content: {
451
+ backgroundColor?: ColorValue;
452
+ textColor?: ColorValue;
453
+ };
454
+ ':closed': {
455
+ borderColor?: ColorValue;
456
+ header?: {
457
+ backgroundColor?: ColorValue;
458
+ textColor?: ColorValue;
459
+ buttonColor?: ColorValue;
460
+ };
461
+ };
462
+ ai?: {
463
+ backgroundColor?: ColorValue;
464
+ header?: {
465
+ backgroundColor?: ColorValue;
466
+ textColor?: ColorValue;
467
+ aiIconColor?: ColorValue;
468
+ ':hover'?: {
469
+ backgroundColor?: ColorValue;
470
+ };
471
+ };
472
+ content?: {
473
+ backgroundColor?: ColorValue;
474
+ textColor?: ColorValue;
475
+ };
476
+ ':closed'?: {
477
+ borderColor?: ColorValue;
478
+ header?: {
479
+ backgroundColor?: ColorValue;
480
+ textColor?: ColorValue;
481
+ };
482
+ };
483
+ };
484
+ };
485
+ popover: {
486
+ backgroundColor: ColorValue;
487
+ textColor?: ColorValue;
488
+ borderColor?: ColorValue;
489
+ borderRadius?: BorderRadiusValue;
490
+ padding?: string;
491
+ offset?: number;
492
+ arrow?: {
493
+ enabled?: boolean;
494
+ };
495
+ };
496
+ radio: {
497
+ backgroundColor: ColorValue;
498
+ borderColor: ColorValue;
499
+ thumbColor?: ColorValue;
500
+ label: {
501
+ textColor?: ColorValue;
502
+ };
503
+ ':checked': {
504
+ backgroundColor: ColorValue;
505
+ borderColor?: ColorValue;
506
+ thumbColor?: ColorValue;
507
+ label?: {
508
+ textColor?: ColorValue;
509
+ };
510
+ };
511
+ };
512
+ segmentedControl: {
513
+ borderRadius: BorderRadiusValue;
514
+ item: {
515
+ backgroundColor: ColorValue;
516
+ textColor: ColorValue;
517
+ borderColor: ColorValue;
518
+ ':hover': {
519
+ backgroundColor: ColorValue;
520
+ textColor: ColorValue;
521
+ borderColor: ColorValue;
522
+ };
523
+ ':pressed': {
524
+ backgroundColor: ColorValue;
525
+ textColor: ColorValue;
526
+ borderColor: ColorValue;
527
+ };
528
+ ':selected': {
529
+ backgroundColor: ColorValue;
530
+ textColor: ColorValue;
531
+ borderColor: ColorValue;
532
+ };
533
+ };
534
+ };
535
+ tabs: {
536
+ backgroundColor: ColorValue;
537
+ borderRadius: BorderRadiusValue;
538
+ tab: {
539
+ backgroundColor: ColorValue;
540
+ textColor: ColorValue;
541
+ borderColor: ColorValue;
542
+ borderRadius: BorderRadiusValue;
543
+ ':hover': {
544
+ backgroundColor: ColorValue;
545
+ textColor: ColorValue;
546
+ borderColor: ColorValue;
547
+ };
548
+ ':pressed': {
549
+ backgroundColor: ColorValue;
550
+ textColor: ColorValue;
551
+ borderColor: ColorValue;
552
+ };
553
+ ':selected': {
554
+ backgroundColor: ColorValue;
555
+ textColor: ColorValue;
556
+ borderColor: ColorValue;
557
+ };
558
+ };
559
+ };
560
+ toast: Record<ToastVariant, {
561
+ backgroundColor: ColorValue;
562
+ textColor: ColorValue;
563
+ borderColor: ColorValue;
564
+ iconColor: ColorValue;
565
+ }> & {
566
+ borderRadius: BorderRadiusValue;
567
+ };
568
+ toggle: {
569
+ backgroundColor: ColorValue;
570
+ textColor: ColorValue;
571
+ thumbColor: ColorValue;
572
+ ':checked': {
573
+ backgroundColor: ColorValue;
574
+ thumbColor: ColorValue;
575
+ };
576
+ };
577
+ tooltip: {
578
+ backgroundColor: ColorValue;
579
+ textColor?: ColorValue;
580
+ borderColor?: ColorValue;
581
+ borderRadius?: BorderRadiusValue;
582
+ padding?: string;
583
+ offset?: number;
584
+ arrow?: {
585
+ enabled?: boolean;
586
+ };
587
+ };
588
+ modal: {
589
+ backgroundColor: ColorValue;
590
+ borderColor: ColorValue;
591
+ textColor?: ColorValue;
592
+ };
593
+ datePicker: {
594
+ border: ColorValue;
595
+ day: {
596
+ current_month: {
597
+ textColor: ColorValue;
598
+ ':selected': {
599
+ textColor?: ColorValue;
600
+ backgroundColor?: ColorValue;
601
+ };
602
+ };
603
+ outside_month: {
604
+ textColor: ColorValue;
605
+ };
606
+ };
607
+ month: {
608
+ backgroundColor: ColorValue;
609
+ };
610
+ header: {
611
+ backgroundColor: ColorValue;
612
+ };
613
+ };
614
+ avatar: {
615
+ backgroundColor: ColorValue;
616
+ textColor: ColorValue;
617
+ shadowColor: ColorValue;
618
+ };
619
+ placeholder: {
620
+ borderColor: ColorValue;
621
+ color: ColorValue;
622
+ backgroundColor: ColorValue;
623
+ };
624
+ inboxPreview: {
625
+ container: {
626
+ borderColor: ColorValue;
627
+ };
628
+ leftPanel: {
629
+ deviceHeader: {
630
+ backgroundColor: ColorValue;
631
+ borderColor: ColorValue;
632
+ };
633
+ preview: {
634
+ backgroundColor: ColorValue;
635
+ borderColor: ColorValue;
636
+ };
637
+ zoomControls: {
638
+ backgroundColor: string;
639
+ boxShadowColor: string;
640
+ button: {
641
+ backgroundColor: ColorValue;
642
+ borderColor: ColorValue;
643
+ textColor: ColorValue;
644
+ ':hover': {
645
+ backgroundColor: ColorValue;
646
+ };
647
+ ':active': {
648
+ backgroundColor: ColorValue;
649
+ };
650
+ };
651
+ };
652
+ loading: {
653
+ spinnerBorder: ColorValue;
654
+ spinnerAccent: ColorValue;
655
+ textColor: ColorValue;
656
+ };
657
+ };
658
+ rightPanel: {
659
+ title: {
660
+ textColor: ColorValue;
661
+ };
662
+ syncButton: {
663
+ textColor: ColorValue;
664
+ };
665
+ description: {
666
+ textColor: ColorValue;
667
+ };
668
+ message: {
669
+ error: {
670
+ textColor: ColorValue;
671
+ };
672
+ };
673
+ gallery: {
674
+ tabs: {
675
+ backgroundColor: ColorValue;
676
+ borderColor: ColorValue;
677
+ textColor: ColorValue;
678
+ ':active': {
679
+ backgroundColor: ColorValue;
680
+ borderColor: ColorValue;
681
+ };
682
+ };
683
+ preview: {
684
+ card: {
685
+ backgroundColor: ColorValue;
686
+ borderColor: ColorValue;
687
+ ':selected': {
688
+ borderColor: ColorValue;
689
+ };
690
+ };
691
+ image: {
692
+ ':selected': {
693
+ opacity: string;
694
+ };
695
+ };
696
+ title: {
697
+ textColor: ColorValue;
698
+ };
699
+ subtitle: {
700
+ textColor: ColorValue;
701
+ };
702
+ icon: {
703
+ default: ColorValue;
704
+ selected: ColorValue;
705
+ };
706
+ };
707
+ };
708
+ };
709
+ };
710
+ devTab: {
711
+ text: {
712
+ color: ColorValue;
713
+ };
714
+ container: {
715
+ backgroundColor: ColorValue;
716
+ separator: {
717
+ borderColor: ColorValue;
718
+ };
719
+ warning: {
720
+ borderColor: ColorValue;
721
+ };
722
+ };
723
+ taskItem: {
724
+ backgroundColor: ColorValue;
725
+ textColor: ColorValue;
726
+ borderColor: ColorValue;
727
+ ':hover': {
728
+ backgroundColor: ColorValue;
729
+ };
730
+ complete: {
731
+ textColor: ColorValue;
732
+ backgroundColor: ColorValue;
733
+ borderColor: ColorValue;
734
+ };
735
+ };
736
+ header: {
737
+ title: {
738
+ textColor: ColorValue;
739
+ fontSize: string;
740
+ backgroundColor?: ColorValue;
741
+ };
742
+ subtitle: {
743
+ textColor: ColorValue;
744
+ };
745
+ };
746
+ description: {
747
+ textColor: ColorValue;
748
+ fontSize: string;
749
+ };
750
+ versionInfo: {
751
+ textColor: ColorValue;
752
+ fontSize: string;
753
+ };
754
+ link: {
755
+ textColor: ColorValue;
756
+ fontSize: string;
757
+ ':hover': {
758
+ textColor: ColorValue;
759
+ };
760
+ };
761
+ icon: {
762
+ color: ColorValue;
763
+ help: {
764
+ color: ColorValue;
765
+ ':hover': {
766
+ color: ColorValue;
767
+ };
768
+ };
769
+ success: {
770
+ color: ColorValue;
771
+ };
772
+ warning: {
773
+ color: ColorValue;
774
+ };
775
+ error: {
776
+ color: ColorValue;
777
+ };
778
+ };
779
+ accordion: {
780
+ button: {
781
+ padding: string;
782
+ borderColor: ColorValue;
783
+ };
784
+ };
785
+ error: {
786
+ backgroundColor: ColorValue;
787
+ borderColor: ColorValue;
788
+ textColor: ColorValue;
789
+ };
790
+ login: {
791
+ textColor: ColorValue;
792
+ fontSize: string;
793
+ ':hover': {
794
+ textColor: ColorValue;
795
+ };
796
+ };
797
+ reload: {
798
+ textColor: ColorValue;
799
+ fontSize: string;
800
+ heading: {
801
+ textColor: ColorValue;
802
+ fontSize: string;
803
+ };
804
+ description: {
805
+ textColor: ColorValue;
806
+ fontSize: string;
807
+ };
808
+ button: {
809
+ textColor: ColorValue;
810
+ fontSize: string;
811
+ ':hover': {
812
+ textColor: ColorValue;
813
+ };
814
+ };
815
+ };
816
+ success: {
817
+ icon: {
818
+ color: ColorValue;
819
+ fontSize: string;
820
+ };
821
+ title: {
822
+ textColor: ColorValue;
823
+ fontSize: string;
824
+ };
825
+ description: {
826
+ textColor: ColorValue;
827
+ fontSize: string;
828
+ };
829
+ };
830
+ };
831
+ };
832
+ };
833
+ export type ThemeVariant = 'primary' | 'secondary' | 'tertiary' | 'ai' | 'ai_outline' | 'danger' | 'synced_blocks';
834
+ export type BannerMessageVariant = 'success' | 'warning' | 'default' | 'danger';
835
+ export type ToastVariant = 'success' | 'warning' | 'default' | 'danger';
836
+ 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' | 'sync_01' | 'sync_02' | 'sync_03' | 'sync_04' | 'sync_05' | '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';
837
+ export type ThemeExtension = {
838
+ name: string;
839
+ extends: ThemeName;
840
+ isDark: boolean;
841
+ isClassic?: boolean;
842
+ mapping?: DeepPartial<Theme['mapping']>;
843
+ components?: DeepPartial<Theme['components']>;
844
+ };
845
+ export type BorderRadius = 'none' | 'min' | 'mid' | 'max' | 'full';
846
+ export type ButtonThemeObject = {
847
+ backgroundColor: ColorValue;
848
+ textColor: ColorValue;
849
+ borderColor: ColorValue;
850
+ borderRadius?: BorderRadiusValue;
851
+ outlineColor?: ColorValue;
852
+ };
853
+ export type BorderRadiusValue = `{${BorderRadius}}`;
854
+ export type ColorValue = `{${ThemeColor}}` | `darken(${number}%, {${ThemeColor}})` | `fade(${number}%, {${ThemeColor}})` | `lighten(${number}%, {${ThemeColor}})`;
855
+ export type DeprecatedTheme = {
856
+ name: string;
857
+ /** @deprecated */
858
+ preferences: {
859
+ width: string;
860
+ smWidth: string;
861
+ padding: string;
862
+ backgroundColor: string;
863
+ borderColor: string;
864
+ tabs: {
865
+ width: string;
866
+ smWidth?: string;
867
+ backgroundColor: string;
868
+ textColor: string;
869
+ activeTextColor: string;
870
+ activeBackgroundColor: string;
871
+ activeBorderColor: string;
872
+ hoverTextColor: string;
873
+ hoverBackgroundColor: string;
874
+ notificationBadgeBackgroundColor: string;
875
+ notificationBadgeTextColor: string;
876
+ };
877
+ tools: {
878
+ width: string;
879
+ height: string;
880
+ smWidth: string;
881
+ smHeight: string;
882
+ backgroundColor: string;
883
+ textColor: string;
884
+ iconColor: string;
885
+ borderSize: string;
886
+ borderColor: string;
887
+ hoverBorderColor: string;
888
+ hoverShadowColor: string;
889
+ draggingBorderColor: string;
890
+ };
891
+ alerts: {
892
+ notice: {
893
+ backgroundColor: string;
894
+ textColor: string;
895
+ borderColor: string;
896
+ };
897
+ };
898
+ properties: {
899
+ header: {
900
+ backgroundColor: string;
901
+ fixedBackgroundColor: string;
902
+ borderColor: string;
903
+ title: {
904
+ textColor: string;
905
+ };
906
+ badge: {
907
+ backgroundColor: string;
908
+ textColor: string;
909
+ };
910
+ icon: {
911
+ color: string;
912
+ borderColor: string;
913
+ hoverBackgroundColor: string;
914
+ hoverColor: string;
915
+ destructiveHoverBackgroundColor: string;
916
+ destructiveHoverColor: string;
917
+ };
918
+ };
919
+ group: {
920
+ header: {
921
+ backgroundColor: string;
922
+ textColor: string;
923
+ iconColor: string;
924
+ collapseIconColor: string;
925
+ borderColor: string;
926
+ ':closed': {
927
+ backgroundColor: string;
928
+ textColor: string;
929
+ iconColor: string;
930
+ collapseIconColor: string;
931
+ borderColor: string;
932
+ };
933
+ };
934
+ expandButton: {
935
+ backgroundColor: string;
936
+ textColor: string;
937
+ hoverBackgroundColor: string;
938
+ hoverTextColor: string;
939
+ };
940
+ embedded: {
941
+ borderColor: string;
942
+ activeBorderColor: string;
943
+ hoverBorderColor: string;
944
+ textColor: string;
945
+ activeTextColor: string;
946
+ };
947
+ };
948
+ editor: {
949
+ label: {
950
+ default: {
951
+ textColor: string;
952
+ };
953
+ primary: {
954
+ textColor: string;
955
+ modified: {
956
+ backgroundColor: string;
957
+ textColor: string;
958
+ ':hover': {
959
+ backgroundColor: string;
960
+ textColor: string;
961
+ };
962
+ };
963
+ };
964
+ subheader: {
965
+ textColor: string;
966
+ };
967
+ secondary: {
968
+ textColor: string;
969
+ };
970
+ tertiary: {
971
+ textColor: string;
972
+ };
973
+ };
974
+ hint: {
975
+ textColor: string;
976
+ };
977
+ seperator: {
978
+ color: string;
979
+ };
980
+ columns: {
981
+ backgroundColor: string;
982
+ borderColor: string;
983
+ boxShadowColor: string;
984
+ textColor: string;
985
+ ':hover': {
986
+ backgroundColor: string;
987
+ borderColor: string;
988
+ };
989
+ ':selected': {
990
+ backgroundColor: string;
991
+ borderColor: string;
992
+ };
993
+ };
994
+ button: {
995
+ default: {
996
+ backgroundColor: string;
997
+ textColor: string;
998
+ borderColor: string;
999
+ iconColor?: string;
1000
+ hover: {
1001
+ backgroundColor?: string;
1002
+ textColor?: string;
1003
+ borderColor?: string;
1004
+ iconColor?: string;
1005
+ };
1006
+ active: {
1007
+ backgroundColor?: string;
1008
+ textColor?: string;
1009
+ borderColor?: string;
1010
+ iconColor?: string;
1011
+ };
1012
+ disabled: {
1013
+ backgroundColor?: string;
1014
+ };
1015
+ };
1016
+ primary: {
1017
+ backgroundColor: string;
1018
+ textColor: string;
1019
+ borderColor: string;
1020
+ hover: {
1021
+ backgroundColor?: string;
1022
+ textColor?: string;
1023
+ borderColor?: string;
1024
+ };
1025
+ };
1026
+ dashed: {
1027
+ textColor: string;
1028
+ borderColor: string;
1029
+ borderRadius: BorderRadiusValue;
1030
+ hover: {
1031
+ backgroundColor?: string;
1032
+ textColor?: string;
1033
+ borderColor?: string;
1034
+ };
1035
+ };
1036
+ secondary: {
1037
+ textColor: string;
1038
+ secondaryTextColor: string;
1039
+ backgroundColor: string;
1040
+ secondaryBackgroundColor: string;
1041
+ borderColor: string;
1042
+ secondaryBorderColor: string;
1043
+ };
1044
+ };
1045
+ input: {
1046
+ backgroundColor: string;
1047
+ textColor: string;
1048
+ borderColor: string;
1049
+ labelBackgroundColor: string;
1050
+ labelTextColor: string;
1051
+ labelBorderColor: string;
1052
+ errorBorderColor: string;
1053
+ errorShadowColor: string;
1054
+ placeholderTextColor: string;
1055
+ focus: {
1056
+ boxShadowColor?: string;
1057
+ };
1058
+ disabled: {
1059
+ backgroundColor?: string;
1060
+ textColor?: string;
1061
+ borderColor?: string;
1062
+ };
1063
+ };
1064
+ displayCondition: {
1065
+ backgroundColor: string;
1066
+ borderColor: string;
1067
+ titleColor: string;
1068
+ textColor: string;
1069
+ };
1070
+ card: {
1071
+ borderColor: string;
1072
+ };
1073
+ dropdown: {
1074
+ primary: {
1075
+ menu: {
1076
+ backgroundColor: string;
1077
+ borderColor: string;
1078
+ };
1079
+ item: {
1080
+ textColor: string;
1081
+ backgroundColor: string;
1082
+ focus: {
1083
+ textColor: string;
1084
+ backgroundColor: string;
1085
+ };
1086
+ hover: {
1087
+ textColor: string;
1088
+ backgroundColor: string;
1089
+ };
1090
+ active: {
1091
+ textColor: string;
1092
+ backgroundColor: string;
1093
+ hover: {
1094
+ textColor: string;
1095
+ backgroundColor: string;
1096
+ };
1097
+ };
1098
+ };
1099
+ };
1100
+ secondary: {
1101
+ menu: {
1102
+ backgroundColor: string;
1103
+ borderColor: string;
1104
+ hover: {
1105
+ color: string;
1106
+ backgroundColor: string;
1107
+ };
1108
+ };
1109
+ item: {
1110
+ textColor: string;
1111
+ backgroundColor: string;
1112
+ hover: {
1113
+ textColor: string;
1114
+ backgroundColor: string;
1115
+ };
1116
+ active: {
1117
+ textColor: string;
1118
+ backgroundColor: string;
1119
+ hover: {
1120
+ textColor: string;
1121
+ backgroundColor: string;
1122
+ };
1123
+ };
1124
+ };
1125
+ button: {
1126
+ textColor: string;
1127
+ backgroundColor: string;
1128
+ borderColor: string;
1129
+ active: {
1130
+ borderColor: string;
1131
+ };
1132
+ };
1133
+ icon: {
1134
+ active: {
1135
+ color: string;
1136
+ };
1137
+ };
1138
+ };
1139
+ };
1140
+ slider: {
1141
+ fillColor: string;
1142
+ emptyColor: string;
1143
+ handleColor: string;
1144
+ handleBorderColor: string;
1145
+ disabledColor: string;
1146
+ };
1147
+ colorpicker: {
1148
+ backgroundColor: string;
1149
+ borderColor: string;
1150
+ boxShadowColor: string;
1151
+ circleBorderColor: string;
1152
+ checkLightIconColor: string;
1153
+ checkDarkIconColor: string;
1154
+ transparentCircleBackgroundColor: string;
1155
+ };
1156
+ social: {
1157
+ textColor: ColorValue;
1158
+ backgroundColor: ColorValue;
1159
+ dotColor: ColorValue;
1160
+ };
1161
+ };
1162
+ card: {
1163
+ textColor: string;
1164
+ borderColor: string;
1165
+ backgroundColor: string;
1166
+ title: {
1167
+ textColor: string;
1168
+ };
1169
+ active: {
1170
+ textColor: string;
1171
+ };
1172
+ };
1173
+ };
1174
+ close: {
1175
+ backgroundColor: string;
1176
+ iconColor: string;
1177
+ borderColor: string;
1178
+ ':hover': {
1179
+ backgroundColor: string;
1180
+ iconColor: string;
1181
+ borderColor: string;
1182
+ };
1183
+ };
1184
+ branding: {
1185
+ height: string;
1186
+ backgroundColor: ColorValue;
1187
+ textColor: ColorValue;
1188
+ linkColor: ColorValue;
1189
+ iconColor: ColorValue;
1190
+ ':hover'?: {
1191
+ backgroundColor?: ColorValue;
1192
+ textColor?: ColorValue;
1193
+ linkColor?: ColorValue;
1194
+ iconColor?: ColorValue;
1195
+ };
1196
+ };
1197
+ };
1198
+ /** @deprecated */
1199
+ actions: {
1200
+ backgroundColor: string;
1201
+ foregroundColor: string;
1202
+ hoverForegroundColor: string;
1203
+ selectedForegroundColor: string;
1204
+ highlightBackgroundColor: string;
1205
+ highlightForegroundColor: string;
1206
+ separatorColor: string;
1207
+ borderColor: string;
1208
+ errorColor: string;
1209
+ };
1210
+ /** @deprecated */
1211
+ canvas: {
1212
+ backgroundColor: string;
1213
+ borderColor: string;
1214
+ backgroundCheckerColor: string;
1215
+ };
1216
+ /** @deprecated */
1217
+ preview: {
1218
+ padding: string;
1219
+ paddingV?: string;
1220
+ paddingH?: string;
1221
+ backgroundColor: string;
1222
+ borderColor: string;
1223
+ titleColor: string;
1224
+ dropdownValueColor: string;
1225
+ dropdownBorderColor: string;
1226
+ inboxPreviewButtonColor: string;
1227
+ iconColor: string;
1228
+ iconSelectedColor: string;
1229
+ iconHoverColor: string;
1230
+ iconHoverBorderColor: string;
1231
+ previewModalBackground: string;
1232
+ buttonBackgroundSelected: string;
1233
+ buttonBackgroundDefault: string;
1234
+ buttonDefaultColor: string;
1235
+ buttonSelectedColor: string;
1236
+ buttonDefaultBorder: string;
1237
+ buttonHoverBorderColor: string;
1238
+ buttonSelectedBorder: string;
1239
+ buttonSecondaryBackground: string;
1240
+ buttonSuccessBackground: string;
1241
+ buttonLoadingBackground: string;
1242
+ buttonErrorBackground: string;
1243
+ buttonSecondaryColor: string;
1244
+ buttonSuccessColor: string;
1245
+ buttonErrorColor: string;
1246
+ buttonLoadingColor: string;
1247
+ deviceContainerBorderColor: string;
1248
+ deviceHeaderBackgroundColor: string;
1249
+ deviceBackgroundSelected: string;
1250
+ deviceBackgroundDefault: string;
1251
+ separatorColor: string;
1252
+ darkModeBackgroundColor: string;
1253
+ darkModeIconColor: string;
1254
+ lightModeBackgroundColor: string;
1255
+ lightModeIconColor: string;
1256
+ galleryBackgroundColor: string;
1257
+ };
1258
+ /** @deprecated */
1259
+ panel: {
1260
+ backgroundColor: string;
1261
+ textColor: string;
1262
+ mutedColor: string;
1263
+ input: {
1264
+ backgroundColor: string;
1265
+ placeholderTextColor: string;
1266
+ textColor: string;
1267
+ };
1268
+ };
1269
+ /** @deprecated */
1270
+ list: {
1271
+ separatorColor: string;
1272
+ hoverBackgroundColor: string;
1273
+ };
1274
+ /** @deprecated */
1275
+ suggestions: {
1276
+ backgroundColor: string;
1277
+ borderColor: string;
1278
+ textColor: string;
1279
+ titleColor: string;
1280
+ subtitleColor: string;
1281
+ textCard: {
1282
+ backgroundColor: string;
1283
+ textColor: string;
1284
+ borderColor: string;
1285
+ boxShadowColor: string;
1286
+ number: {
1287
+ backgroundColor: string;
1288
+ textColor: string;
1289
+ borderColor: string;
1290
+ };
1291
+ hover: {
1292
+ backgroundColor: string;
1293
+ textColor: string;
1294
+ borderColor: string;
1295
+ boxShadowColor: string;
1296
+ };
1297
+ };
1298
+ closeButton: {
1299
+ iconColor: string;
1300
+ hover: {
1301
+ iconColor: string;
1302
+ };
1303
+ };
1304
+ loader: {
1305
+ backgroundColor: string;
1306
+ content: {
1307
+ backgroundColor: string;
1308
+ headingColor: string;
1309
+ textColor: string;
1310
+ };
1311
+ progressBar: {
1312
+ backgroundColor: string;
1313
+ };
1314
+ };
1315
+ };
1316
+ };
1317
+ }
1318
+ declare module "engine/constants" {
1319
+ export const displayModes: readonly ["email", "web", "popup", "document"];
1320
+ export const collections: readonly ["bodies", "columns", "contents", "footers", "headers", "pages", "rows"];
1321
+ export const HTMLInputTypeAttributes: readonly ["button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"];
1322
+ export const IS_CYPRESS: boolean;
1323
+ export const BROWSER: {
1324
+ IS_IE: boolean;
1325
+ IS_SAFARI: boolean;
1326
+ };
1327
+ }
1328
+ declare module "engine/utils/zod/schemas" {
1329
+ import { z } from 'zod/v4';
1330
+ /**
1331
+ * zod/v4 workaround for z.function support
1332
+ * Not supported by z.toJSONSchema
1333
+ * @see https://zod.dev/v4/changelog?id=zfunction
1334
+ * @see https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912
1335
+ */
1336
+ export const functionSchema: <T extends z.core.$ZodFunction>(schema: T) => any;
1337
+ export const createAsyncFunctionSchema: <T extends z.core.$ZodFunction>(schema: T) => any;
1338
+ export const locationSchema: any;
1339
+ export const DisplayConditionZodSchema: any;
1340
+ export const FontWeightZodSchema: any;
1341
+ export const FontZodSchema: any;
1342
+ export const HintZodSchema: any;
1343
+ export const PercentageZodSchema: any;
1344
+ export const SinglePxZodSchema: any;
1345
+ export const DoublePxZodSchema: any;
1346
+ export const TriplePxZodSchema: any;
1347
+ export const QuadruplePxZodSchema: any;
1348
+ export const MultiplePxZodSchema: any;
1349
+ }
1350
+ declare module "state/types/types" {
1351
+ import * as Ariakit from '@ariakit/react';
1352
+ import { MutableRefObject, ReactInstance } from 'react';
1353
+ import { z } from 'zod/v4';
1354
+ import { State as Design } from '../reducer/design';
1355
+ import { CollaborationThread } from "editor/components/editors/types";
1356
+ import { RootState } from "state/types/RootState";
1357
+ import { ThemeExtension, ThemeNamePlusLightDark } from "editor/themes/types";
1358
+ import { collections, displayModes } from "engine/constants";
1359
+ import { DisplayConditionZodSchema } from "engine/utils/zod/schemas";
1360
+ import { AppDispatch } from '../store';
1361
+ export type DesignMode = 'live' | 'edit';
1362
+ export type Device = 'desktop' | 'mobile' | 'tablet';
1363
+ export type Resolution = {
1364
+ value: number;
1365
+ name: string;
1366
+ };
1367
+ export type DisplayMode = ArrayItem<typeof displayModes>;
1368
+ export type Variant = 'amp' | null;
1369
+ export type Ui = 'none' | 'visual' | 'classic';
1370
+ export type UndoRedoBehavior = 'save' | 'replace' | 'skip';
1371
+ export interface MergeTag {
1372
+ name: string;
1373
+ value?: string;
1374
+ sample?: string;
1375
+ icon?: string;
1376
+ mergeTags?: MergeTags;
1377
+ rules?: {
1378
+ [key: string]: {
1379
+ name: string;
1380
+ before: string;
1381
+ after: string;
1382
+ sample?: boolean | Array<Record<string, string>>;
1383
+ };
1384
+ };
1385
+ }
1386
+ export interface MergeTags {
1387
+ [name: string]: MergeTag;
1388
+ }
1389
+ export type MergeTagsValues = Record<string, string | number | Record<string, boolean | Array<Record<string, string | number>>>>;
1390
+ export interface MergeTagsConfig {
1391
+ autocompleteTriggerChar?: string | null;
1392
+ sort?: boolean;
1393
+ }
1394
+ export type DisplayCondition = z.infer<typeof DisplayConditionZodSchema>;
1395
+ export type DisplayConditions = DisplayCondition[];
1396
+ export type SpecialLink = {
1397
+ name: string;
1398
+ href: string;
1399
+ target?: string;
1400
+ specialLinks?: undefined;
1401
+ } | {
1402
+ name: string;
1403
+ href?: undefined;
1404
+ target?: undefined;
1405
+ specialLinks: SpecialLinks;
1406
+ };
1407
+ export interface SpecialLinks {
1408
+ [name: string]: SpecialLink;
1409
+ }
1410
+ export type LinkTypeFieldOption = {
1411
+ value: string;
1412
+ label: string;
1413
+ enabled?: boolean;
1414
+ highlight?: boolean;
1415
+ onClick?: (_option: {
1416
+ label?: string;
1417
+ value: string;
1418
+ }, _meta: object, done: (result: {
1419
+ label?: string;
1420
+ value: string;
1421
+ }) => void) => void;
1422
+ } | {
1423
+ type: 'separator';
1424
+ };
1425
+ export interface LinkTypeField {
1426
+ name: string;
1427
+ label: string;
1428
+ defaultValue?: string | LinkTypeFieldOption[] | undefined;
1429
+ enabled?: boolean;
1430
+ placeholderText?: string;
1431
+ inputType?: Ariakit.FormInputProps['type'];
1432
+ isClearable?: boolean;
1433
+ isCreatable?: boolean;
1434
+ isMulti?: boolean;
1435
+ limit?: number;
1436
+ limitMessage?: string;
1437
+ validationRegex?: string;
1438
+ options?: LinkTypeFieldOption[];
1439
+ sortOptions?: boolean | (<Option extends {
1440
+ label: string;
1441
+ }>(options: Option[]) => Option[]);
1442
+ onCreateOption?: (inputValue: string, meta: object, done: (newOption: LinkTypeFieldOption) => void) => void;
1443
+ }
1444
+ export interface LinkType {
1445
+ name: string;
1446
+ label: string;
1447
+ enabled?: boolean;
1448
+ attrs?: {
1449
+ href?: string;
1450
+ target?: string;
1451
+ onClick?: string | Function;
1452
+ class?: string;
1453
+ download?: boolean;
1454
+ [key: string]: any;
1455
+ };
1456
+ fields?: LinkTypeField[];
1457
+ }
1458
+ export type LinkTypes = LinkType[];
1459
+ export type LinkTypesSharedConfig = Pick<LinkType, 'attrs' | 'fields'>;
1460
+ export interface CustomFont {
1461
+ label: string;
1462
+ value: string;
1463
+ url: string;
1464
+ weights?: number[] | Array<{
1465
+ label: string;
1466
+ value: number;
1467
+ } | number>;
1468
+ }
1469
+ export interface CustomFonts {
1470
+ [label: string]: CustomFont;
1471
+ }
1472
+ export type DesignTag = string;
1473
+ export interface DesignTags {
1474
+ [name: string]: DesignTag;
1475
+ }
1476
+ export interface DesignTagsConfig {
1477
+ delimiter: [string, string];
1478
+ }
1479
+ export type CustomCSS = string | string[] | undefined | null;
1480
+ export type CustomJS = string | string[] | undefined | null;
1481
+ export interface Translations {
1482
+ [name: string]: object;
1483
+ }
1484
+ export type Collection = ArrayItem<typeof collections>;
1485
+ export type Container = 'body' | 'row' | 'column' | 'content';
1486
+ export type AICopilotDataType = 'template_block' | 'page_block' | 'body_block' | 'row_block' | 'header_block' | 'footer_block' | 'column_block' | 'content_block' | 'text';
1487
+ export interface Location {
1488
+ collection: Collection;
1489
+ id: number | string;
1490
+ }
1491
+ export interface Selection {
1492
+ active: boolean;
1493
+ location: Location | null;
1494
+ parent: Location | null;
1495
+ threadId: CollaborationThread['id'] | null;
1496
+ selectedAt: number | null;
1497
+ }
1498
+ export interface LayerGroup {
1499
+ elementRef: MutableRefObject<ReactInstance | undefined> | null | undefined;
1500
+ layerCollection: Location['collection'];
1501
+ layerIndex?: Placeholder['index'];
1502
+ parentCollection: Location['collection'];
1503
+ parentId: Location['id'];
1504
+ placeholders: Partial<Record<NonNullable<Placeholder['index']>, Placeholder | undefined>>;
1505
+ }
1506
+ export interface Placeholder {
1507
+ elementRef: MutableRefObject<ReactInstance | undefined> | null | undefined;
1508
+ active?: boolean;
1509
+ index: number | 'first' | 'last' | undefined;
1510
+ layerGroupParentLocation: Location | undefined;
1511
+ }
1512
+ export interface Tool {
1513
+ active: boolean;
1514
+ type: string | null;
1515
+ slug?: string | null;
1516
+ }
1517
+ export interface Usage {
1518
+ brandStyleGuide?: boolean;
1519
+ collaboration?: boolean;
1520
+ countdownTimer?: boolean;
1521
+ customBlocks?: number;
1522
+ customBlocksProvider?: boolean;
1523
+ customCSS?: boolean;
1524
+ customFileManager?: boolean;
1525
+ customFonts?: number;
1526
+ customImageLibrary?: boolean;
1527
+ customJS?: boolean;
1528
+ customPreview?: boolean;
1529
+ customTabs?: number;
1530
+ customTools?: number;
1531
+ designMode?: DesignMode;
1532
+ designTags?: number;
1533
+ displayConditions?: number;
1534
+ displayMode?: DisplayMode;
1535
+ fileStorage?: boolean;
1536
+ inboxPreviews?: boolean;
1537
+ linkTypes?: number;
1538
+ localization?: string;
1539
+ mergeTags?: number;
1540
+ projectId?: number;
1541
+ premiumTools?: boolean;
1542
+ sendTestEmail?: boolean;
1543
+ specialLinks?: number;
1544
+ theme?: string;
1545
+ }
1546
+ export type ImageSource = 'unsplash' | 'pixabay' | 'pexel' | 'user';
1547
+ export interface Image {
1548
+ id: number | string;
1549
+ location: string;
1550
+ filename?: string;
1551
+ contentType: string;
1552
+ size: number;
1553
+ width: number | null;
1554
+ height: number | null;
1555
+ source: ImageSource | null;
1556
+ optimistic?: boolean;
1557
+ }
1558
+ export type ArrayItem<T> = T extends (infer I)[] ? I : T extends readonly (infer I)[] ? I : unknown;
1559
+ export type BodyItem = {
1560
+ id: string;
1561
+ cells: number[];
1562
+ columns: Array<{
1563
+ id: string;
1564
+ contents: Array<Design['contents']['0']>;
1565
+ values: Record<string, any>;
1566
+ }>;
1567
+ values: {
1568
+ sync?: {
1569
+ id: string;
1570
+ enabled?: boolean;
1571
+ updatedAt?: string;
1572
+ dirty?: boolean;
1573
+ };
1574
+ } & Record<string, any>;
1575
+ };
1576
+ export type JSONTemplate = {
1577
+ counters: Record<string, number>;
1578
+ body: {
1579
+ id: string | undefined;
1580
+ rows: BodyItem[];
1581
+ headers: BodyItem[];
1582
+ footers: BodyItem[];
1583
+ values: {};
1584
+ };
1585
+ schemaVersion?: number;
1586
+ };
1587
+ export type Fonts = {
1588
+ showDefaultFonts?: boolean;
1589
+ customFonts?: CustomFont[];
1590
+ };
1591
+ export type Icon = {
1592
+ name?: string;
1593
+ data?: string;
1594
+ url?: string;
1595
+ };
1596
+ export type AuditTool = {
1597
+ type: string;
1598
+ name?: string;
1599
+ slug?: string;
1600
+ labelPath?: Rule['labelPath'];
1601
+ };
1602
+ export type Rule = {
1603
+ id: string;
1604
+ icon: string | string[] | undefined;
1605
+ title: string;
1606
+ description: string;
1607
+ severity: 'ERROR' | 'WARNING';
1608
+ dismissable?: boolean;
1609
+ labelPath?: string | string[] | null;
1610
+ };
1611
+ export type Audit = {
1612
+ location?: Location;
1613
+ tool?: AuditTool;
1614
+ } & Rule;
1615
+ export type Validator = (info: {
1616
+ [id: string]: unknown;
1617
+ html?: string;
1618
+ defaultErrors?: Audit[];
1619
+ }) => Promise<Audit[]>;
1620
+ export type AuditApiResult = {
1621
+ status: 'FAIL' | 'PASS';
1622
+ errors: Audit[];
1623
+ };
1624
+ export type Tabs = {
1625
+ [tabName: string]: {
1626
+ enabled?: boolean;
1627
+ type?: string;
1628
+ position?: number;
1629
+ icon?: string;
1630
+ active?: boolean;
1631
+ };
1632
+ };
1633
+ export type AppearanceConfig = {
1634
+ actionBar?: {
1635
+ placement?: 'top' | 'bottom' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right' | undefined;
1636
+ };
1637
+ /** @deprecated Use unlayer.init({ features: { ... }}) instead */
1638
+ features?: object;
1639
+ loader?: {
1640
+ url?: string | undefined;
1641
+ html?: string | undefined;
1642
+ css?: string | undefined;
1643
+ };
1644
+ panels?: {
1645
+ tools?: {
1646
+ dock?: 'left' | 'right';
1647
+ collapsible?: boolean;
1648
+ forceUncollapseOnSelect?: boolean;
1649
+ tabs?: {
1650
+ body?: {
1651
+ visible?: boolean;
1652
+ };
1653
+ };
1654
+ };
1655
+ };
1656
+ theme?: ThemeNamePlusLightDark | ThemeExtension;
1657
+ };
1658
+ export interface ToolConfig {
1659
+ enabled?: boolean | undefined;
1660
+ position?: number | undefined;
1661
+ properties?: object | undefined;
1662
+ sections?: object | undefined;
1663
+ validator?: Validator;
1664
+ }
1665
+ export interface ToolsConfig {
1666
+ [key: string]: ToolConfig;
1667
+ }
1668
+ export type User = {
1669
+ id?: string | number;
1670
+ name?: string | null | undefined;
1671
+ avatar?: string | null | undefined;
1672
+ email?: string;
1673
+ signature?: string;
1674
+ };
1675
+ export type Language = {
1676
+ label: string;
1677
+ value: string;
1678
+ rtl?: boolean;
1679
+ default?: boolean;
1680
+ };
1681
+ export interface StyleGuideStyle {
1682
+ label: string;
1683
+ values: Record<string, any>;
1684
+ }
1685
+ export interface StyleGuideStyles {
1686
+ [styleGuideId: string]: StyleGuideStyle | undefined;
1687
+ }
1688
+ export interface StyleGuideToolConfig {
1689
+ styles?: StyleGuideStyles;
1690
+ }
1691
+ export interface StyleGuideConfig {
1692
+ tools?: {
1693
+ [toolId: string]: StyleGuideToolConfig | undefined;
1694
+ };
1695
+ }
1696
+ export type InsertItemAsync = (collection: Collection, toParent: Location, data: {
1697
+ [key: string]: any;
1698
+ type: string;
1699
+ values: {
1700
+ [id: string]: unknown;
1701
+ };
1702
+ }, placeholder: string) => (dispatch: AppDispatch, getState: () => RootState) => Promise<void>;
1703
+ export interface JSONSchema {
1704
+ }
1705
+ export interface SuggestedSelection {
1706
+ parent?: Location | null;
1707
+ location: Location | null;
1708
+ table?: {
1709
+ globalClickedCellId: string | null;
1710
+ };
1711
+ }
1712
+ export type TableValue = {
1713
+ headers: {
1714
+ cells: {
1715
+ id: string;
1716
+ text: string;
1717
+ }[];
1718
+ }[];
1719
+ rows: {
1720
+ cells: {
1721
+ id: string;
1722
+ text: string;
1723
+ }[];
1724
+ }[];
1725
+ };
1726
+ export type ExporterName = DisplayMode | 'ampWeb' | 'ampEmail' | 'classic';
1727
+ export type BodyContainerExporter = (innerHTML: string, bodyValues: Record<string, any>, // @deprecated use last param instead
1728
+ meta: {
1729
+ bodyValues: RootState['design']['bodies'][string]['values'];
1730
+ type: string;
1731
+ variant: Variant;
1732
+ }) => string;
1733
+ export type BodyContainerExporters = Partial<Record<ExporterName, BodyContainerExporter>>;
1734
+ export type RowContainerExporter = (innerHTML: string, rowValues: RootState['design']['rows'][string]['values'], // @deprecated use last param instead
1735
+ bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
1736
+ meta: {
1737
+ rowIndex: number;
1738
+ rowCells: number[];
1739
+ rowValues: RootState['design']['rows'][string]['values'];
1740
+ bodyValues: RootState['design']['bodies'][string]['values'];
1741
+ variant: Variant | undefined;
1742
+ language: string | undefined;
1743
+ collection: Collection;
1744
+ }) => string;
1745
+ export type RowContainerExporters = Partial<Record<ExporterName, RowContainerExporter>>;
1746
+ export type ColumnContainerExporter = (innerHTML: string, columnValues: Record<string, any>, // @deprecated use last param instead
1747
+ columnIndex: number, // @deprecated use last param instead
1748
+ rowCells: number[], // @deprecated use last param instead
1749
+ bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
1750
+ rowValues: RootState['design']['rows'][string]['values'], // @deprecated use last param instead
1751
+ meta: {
1752
+ columnIndex: number;
1753
+ columnValues: RootState['design']['columns'][string]['values'];
1754
+ rowIndex: number;
1755
+ rowCells: number[];
1756
+ rowValues: RootState['design']['rows'][string]['values'];
1757
+ bodyValues: RootState['design']['bodies'][string]['values'];
1758
+ variant: Variant;
1759
+ language: string;
1760
+ }) => string;
1761
+ export type ColumnContainerExporters = Partial<Record<ExporterName, ColumnContainerExporter>>;
1762
+ export type ContentContainerExporter = (innerHTML: string, contentValues: Record<string, any>, // @deprecated use last param instead
1763
+ bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
1764
+ meta: {
1765
+ index: number;
1766
+ columnIndex: number;
1767
+ columnValues: RootState['design']['columns'][string]['values'];
1768
+ rowIndex: number;
1769
+ rowCells: number[];
1770
+ rowValues: RootState['design']['rows'][string]['values'];
1771
+ bodyValues: RootState['design']['bodies'][string]['values'];
1772
+ variant: Variant | undefined;
1773
+ language: string | undefined;
1774
+ embeddedValues: Record<string, unknown>;
1775
+ mergeTagState: {
1776
+ mergeTagGroup: string;
1777
+ mergeTagRule: string;
1778
+ mergeTags: MergeTagsValues;
1779
+ };
1780
+ }) => string;
1781
+ export type ContentContainerExporters = Partial<Record<ExporterName, ContentContainerExporter>>;
1782
+ export type ItemExporter = (renderValues: Record<string, unknown>, index: number, // @deprecated use last param instead
1783
+ columnIndex: number, // @deprecated use last param instead
1784
+ rowCells: number[], // @deprecated use last param instead
1785
+ bodyValues: RootState['design']['bodies'][string]['values'], // @deprecated use last param instead
1786
+ rowValues: RootState['design']['rows'][string]['values'], // @deprecated use last param instead
1787
+ embeddedValues: Record<string, unknown>, // @deprecated use last param instead
1788
+ meta: {
1789
+ index: number;
1790
+ columnIndex: number;
1791
+ columnValues: RootState['design']['columns'][string]['values'];
1792
+ rowIndex: number;
1793
+ rowCells: number[];
1794
+ rowValues: RootState['design']['rows'][string]['values'];
1795
+ bodyValues: RootState['design']['bodies'][string]['values'];
1796
+ embeddedValues: Record<string, unknown>;
1797
+ mergeTagState: {
1798
+ mergeTagGroup: string;
1799
+ mergeTagRule: string;
1800
+ mergeTags: MergeTagsValues;
1801
+ };
1802
+ }) => string;
1803
+ export type ItemExporters = Partial<Record<ExporterName, ItemExporter>>;
1804
+ }
1805
+ declare module "engine/utils/pruneObj" {
1806
+ export function pruneObj<T extends Record<string, any>>(obj: T, options?: {
1807
+ deep?: boolean;
1808
+ }): Partial<T>;
1809
+ }
1810
+ declare module "engine/config/features" {
1811
+ import { Resolution, Language } from "state/types/types";
1812
+ export interface TextEditorCustomButton {
1813
+ name: string;
1814
+ icon: string;
1815
+ text: string;
1816
+ onSetup?: () => void;
1817
+ onAction: (data: {
1818
+ text: string;
1819
+ }, callback: (text: string) => void) => void;
1820
+ }
1821
+ export type ColorGroup = {} & ({
1822
+ id: 'brand_colors' | 'common_colors' | 'recent_colors' | 'template_colors' | (string & {});
1823
+ label?: string;
1824
+ colors?: string[];
1825
+ default?: boolean;
1826
+ } | {
1827
+ id?: never;
1828
+ label: string;
1829
+ colors: string[];
1830
+ default?: boolean;
1831
+ });
1832
+ export interface ColorPicker {
1833
+ /** @deprecated Use colors: string[] or colors: [{ id: "common_colors", label: 'Common Colors', colors: string[] }] instead */
1834
+ presets?: string[];
1835
+ /** @deprecated Use colors: [{ id: "brand_colors", label: 'Brand Colors', colors: string[] }] instead */
1836
+ brandColors?: string[];
1837
+ colors?: string[] | ColorGroup[];
1838
+ limit?: number;
1839
+ recentColors?: boolean | null;
1840
+ }
1841
+ export interface Features {
1842
+ audit?: boolean;
1843
+ beta?: boolean | {
1844
+ enabled?: boolean;
1845
+ feedback?: boolean;
1846
+ };
1847
+ blocks?: boolean;
1848
+ collaboration?: boolean;
1849
+ preview?: boolean | {
1850
+ enabled?: boolean;
1851
+ cleanup?: boolean;
1852
+ deviceResolutions?: {
1853
+ showDefaultResolutions?: boolean;
1854
+ customResolutions?: {
1855
+ desktop?: Resolution[];
1856
+ tablet?: Resolution[];
1857
+ mobile?: Resolution[];
1858
+ };
1859
+ };
1860
+ };
1861
+ imageEditor?: {
1862
+ enabled: boolean;
1863
+ tools?: {
1864
+ resize?: boolean;
1865
+ };
1866
+ } | boolean;
1867
+ preheaderText?: boolean;
1868
+ headersAndFooters?: boolean;
1869
+ stockImages?: {
1870
+ enabled: true;
1871
+ safeSearch: true;
1872
+ defaultSearchTerm: string;
1873
+ } | boolean;
1874
+ userUploads?: boolean | {
1875
+ enabled: boolean;
1876
+ search?: boolean;
1877
+ };
1878
+ devTab?: boolean;
1879
+ undoRedo?: boolean | {
1880
+ enabled: boolean;
1881
+ autoSelect?: boolean;
1882
+ autoFocus?: boolean;
1883
+ };
1884
+ textEditor?: {
1885
+ spellChecker?: boolean;
1886
+ tables?: boolean;
1887
+ cleanPaste?: boolean | 'basic' | 'confirm';
1888
+ emojis?: boolean;
1889
+ textDirection?: boolean | null;
1890
+ inlineColorGroups?: string[];
1891
+ inlineFontControls?: boolean;
1892
+ defaultFontSize?: string;
1893
+ customButtons?: TextEditorCustomButton[];
1894
+ };
1895
+ colorPicker?: ColorPicker;
1896
+ legacy?: {
1897
+ disableHoverButtonColors?: boolean;
1898
+ };
1899
+ inboxPreviews?: boolean;
1900
+ pageAnchors?: boolean;
1901
+ svgImageUpload?: boolean;
1902
+ smartMergeTags?: boolean;
1903
+ multiLanguage?: boolean | {
1904
+ enabled: boolean;
1905
+ languages?: Language[];
1906
+ };
1907
+ styleGuide?: boolean;
1908
+ ai?: boolean | {
1909
+ enabled?: boolean;
1910
+ copilot?: boolean;
1911
+ models?: boolean;
1912
+ magicImage?: boolean;
1913
+ smartButtons?: boolean;
1914
+ smartHeadings?: boolean;
1915
+ smartImageAltText?: boolean;
1916
+ smartText?: boolean;
1917
+ smartParagraph?: boolean;
1918
+ };
1919
+ sendTestEmail?: boolean;
1920
+ syncedBlocks?: boolean;
1921
+ }
1922
+ export const betaFeatures: readonly ["ai.copilot"];
1923
+ export const betaEntitlements: readonly ["copilot"];
1924
+ export function setFeatures(newFeatures: Features): void;
1925
+ export function getFeatureOverrides(): Features;
1926
+ export function setOverrideFeatures(newOverrideFeatures: Features, options?: {
1927
+ deepmerge?: boolean;
1928
+ }): void;
1929
+ export function getFeatures(): Features;
1930
+ export function getFeature<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path): Path extends keyof Features ? Features[Path] : any;
1931
+ export function normalizeFeatureAsObject<Object extends Record<string, any>, Feature extends boolean | Object>(feature: Feature | undefined): Partial<Feature & object>;
1932
+ export function getFeatureAsObject<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path): Partial<(Path extends keyof Features ? Features[Path] : any) & object>;
1933
+ export function hasFeature<Path extends keyof Features | [keyof Features, ...string[]]>(path: Path, checkEntitlement?: boolean | string): boolean;
1934
+ }
1935
+ declare module "engine/config/offline" {
1936
+ export function enableOffline(): void;
1937
+ export function isOffline(): boolean;
1938
+ }
1939
+ declare module "engine/config/callbacks" {
1940
+ import { Handler } from 'mitt';
1941
+ export type CallbackDoneFn = (result: any) => Promise<void> | void;
1942
+ export type CallbackFn = (data?: any, done?: CallbackDoneFn) => Promise<void> | void;
1943
+ export type CallbackMap = {
1944
+ [name: string]: CallbackFn | undefined;
1945
+ };
1946
+ export function getCallback(type: string): CallbackFn;
1947
+ export function hasCallback(type: string): boolean;
1948
+ export function registerCallback(type: string, callback: CallbackFn | null | undefined): void;
1949
+ export function unregisterCallback(type: string): void;
1950
+ export function triggerCallback(type: string, ...args: [...any[], CallbackDoneFn | undefined]): void;
1951
+ export function onRegisterCallback(handler: Handler<{
1952
+ type: string;
1953
+ callback: CallbackFn;
1954
+ }>): {
1955
+ remove: () => void;
1956
+ };
1957
+ export function onTriggerCallback(handler: Handler<{
1958
+ type: string;
1959
+ callback: CallbackFn;
1960
+ }>): {
1961
+ remove: () => void;
1962
+ };
1963
+ export function onUnregisterCallback(handler: Handler<{
1964
+ type: string;
1965
+ }>): {
1966
+ remove: () => void;
1967
+ };
1968
+ }
1969
+ declare module "engine/config/fonts" {
1970
+ import { z } from 'zod/v4';
1971
+ import { FontZodSchema } from "engine/utils/zod/schemas";
1972
+ export type Font = z.infer<typeof FontZodSchema>;
1973
+ export type FontList = Font[];
1974
+ export interface FontConfig {
1975
+ showDefaultFonts?: boolean;
1976
+ customFonts?: FontList;
1977
+ }
1978
+ export interface FontOptions {
1979
+ showCustomFonts?: boolean;
1980
+ showGlobalFont?: boolean;
1981
+ }
1982
+ export function loadFontConfig(newFontConfig?: FontConfig): void;
1983
+ export function disableBuiltinFonts(): void;
1984
+ export function setFonts(newFonts?: FontList): void;
1985
+ export function getFonts(options?: FontOptions): FontList;
1986
+ export function getFontsVersion(): number;
1987
+ export function getCustomFontsCount(): number;
1988
+ export const defaultFontWeights: number[];
1989
+ }
1990
+ declare module "engine/config/safeHtml" {
1991
+ import { Config } from 'dompurify';
1992
+ export interface SafeHtmlOptions {
1993
+ domPurifyOptions?: Config;
1994
+ }
1995
+ export function isSafeHtmlEnabled(): boolean;
1996
+ export function enableSafeHtml(): void;
1997
+ export function disableSafeHtml(): void;
1998
+ export function setSafeHtmlOptions(options?: SafeHtmlOptions): void;
1999
+ function _toSafeHtmlInternal(html: string, { allowOnClick, force }?: {
2000
+ allowOnClick?: boolean;
2001
+ force?: boolean;
2002
+ }): string;
2003
+ export const toSafeHtmlInternal: typeof _toSafeHtmlInternal & import("lodash").MemoizedFunction;
2004
+ function _toSafeHtml(html: string, { allowOnClick, force, domPurifyOptions, }?: {
2005
+ allowOnClick?: boolean;
2006
+ force?: boolean;
2007
+ domPurifyOptions?: SafeHtmlOptions['domPurifyOptions'];
2008
+ }): TrustedHTML;
2009
+ export const toSafeHtml: typeof _toSafeHtml & import("lodash").MemoizedFunction;
2010
+ }
2011
+ declare module "engine/translations/types" {
2012
+ import stockTranslations from '.';
2013
+ export type StockLocale = keyof typeof stockTranslations;
2014
+ }
2015
+ declare module "engine/config/intl" {
2016
+ import { StockLocale } from "engine/translations/types";
2017
+ export type Locale = StockLocale | 'en-US';
2018
+ export type TextDirection = 'ltr' | 'rtl';
2019
+ export const DEFAULT_LOCALE = "en-US";
2020
+ export const RTL_COUNTRIES: string[];
2021
+ export function getLocale(): Locale;
2022
+ export function setLocale(locale: Locale | null): void;
2023
+ export function getTextDirection(): TextDirection | undefined;
2024
+ export function getTextDirectionForLocale(locale: Locale): TextDirection | undefined;
2025
+ export function setTextDirection(textDirection: TextDirection | null): void;
2026
+ export function isRTL(locale: Locale): boolean;
2027
+ }
2028
+ declare module "embed/Config" {
2029
+ import { ValidationResult } from 'amphtml-validator';
2030
+ import { EditorSettings } from "engine/config/editorSettings";
2031
+ import { Features } from "engine/config/features";
2032
+ import { FontList } from "engine/config/fonts";
2033
+ import { SafeHtmlOptions } from "engine/config/safeHtml";
2034
+ import { TextDirection } from "engine/config/intl";
2035
+ import { AppearanceConfig, Audit, DesignTags, DesignTagsConfig, Device, DisplayConditions, DisplayMode, Fonts, JSONTemplate, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, MergeTagsValues, SpecialLinks, Tabs, ToolsConfig, User } from "state/types/types";
2036
+ import { DeepPartial } from "editor/components/editors/types";
2037
+ export interface Config {
2038
+ id?: string;
2039
+ className?: string;
2040
+ version?: string;
2041
+ source?: {
2042
+ name: string;
2043
+ version: string;
2044
+ };
2045
+ offline?: boolean;
2046
+ render?: boolean;
2047
+ amp?: boolean;
2048
+ defaultDevice?: Device;
2049
+ devices?: Device[];
2050
+ designId?: string;
2051
+ designMode?: string;
2052
+ displayMode?: DisplayMode;
2053
+ env?: Record<'API_V1_BASE_URL' | 'API_V2_BASE_URL' | 'API_V3_BASE_URL' | 'EVENTS_API_BASE_URL' | 'TOOLS_API_V1_BASE_URL' | 'TOOLS_CDN_BASE_URL' | 'CONSOLE_BASE_URL', string | undefined>;
2054
+ projectId?: number | null;
2055
+ user?: User;
2056
+ templateId?: number;
2057
+ stockTemplateId?: string;
2058
+ loadTimeout?: number;
2059
+ safeHtml?: boolean | SafeHtmlOptions;
2060
+ /** @deprecated use safeHtml instead */
2061
+ safeHTML?: boolean | SafeHtmlOptions;
2062
+ options?: object;
2063
+ tools?: ToolsConfig;
2064
+ excludeTools?: string[];
2065
+ blocks?: object[];
2066
+ editor?: Partial<EditorSettings>;
2067
+ fonts?: Fonts;
2068
+ linkTypes?: LinkTypes;
2069
+ linkTypesSharedConfig?: LinkTypesSharedConfig;
2070
+ mergeTags?: MergeTags;
2071
+ displayConditions?: DisplayConditions;
2072
+ specialLinks?: SpecialLinks;
2073
+ designTags?: DesignTags;
2074
+ customCSS?: string | string[];
2075
+ customJS?: string | string[];
2076
+ locale?: string;
2077
+ textDirection?: TextDirection;
2078
+ translations?: Record<string, Record<string, string>>;
2079
+ appearance?: DeepPartial<AppearanceConfig>;
2080
+ features?: Features;
2081
+ designTagsConfig?: DesignTagsConfig;
2082
+ mergeTagsConfig?: MergeTagsConfig;
2083
+ validator?: (info: {
2084
+ html: ExportHtmlResult;
2085
+ design: JSONTemplate;
2086
+ defaultErrors: Audit[];
2087
+ }) => Audit[] | Promise<Audit[]>;
2088
+ tabs?: Tabs;
2089
+ }
2090
+ export interface SaveDesignOptions {
2091
+ }
2092
+ export interface ExportHtmlOptions {
2093
+ amp?: boolean;
2094
+ cleanup?: boolean;
2095
+ inlineStyles?: boolean;
2096
+ textDirection?: TextDirection;
2097
+ isPreview?: boolean;
2098
+ language?: string;
2099
+ live?: boolean;
2100
+ mergeTags?: MergeTagsValues;
2101
+ minify?: boolean;
2102
+ popupId?: string;
2103
+ title?: string;
2104
+ validateAmp?: boolean;
2105
+ onlyHeader?: boolean;
2106
+ onlyFooter?: boolean;
2107
+ }
2108
+ export interface ExportHtmlResult {
2109
+ html: string;
2110
+ amp: {
2111
+ enabled: boolean;
2112
+ format: 'AMP' | 'AMP4EMAIL';
2113
+ html: string | undefined;
2114
+ validation: ValidationResult;
2115
+ };
2116
+ chunks: ExportChunksResult;
2117
+ design: JSONTemplate;
2118
+ }
2119
+ export interface ExportLiveHtmlOptions extends Omit<ExportHtmlOptions, 'live'> {
2120
+ }
2121
+ export interface ExportLiveHtmlResult extends ExportHtmlResult {
2122
+ }
2123
+ export interface ExportPlainTextOptions extends Omit<ExportHtmlOptions, 'cleanup' | 'minify'> {
2124
+ ignorePreheader?: boolean;
2125
+ }
2126
+ export interface ExportPlainTextResult {
2127
+ text: string;
2128
+ design: JSONTemplate;
2129
+ }
2130
+ export interface HtmlToPlainTextOptions {
2131
+ ignoreLinks?: boolean;
2132
+ ignoreImages?: boolean;
2133
+ }
2134
+ export interface ExportChunksResult {
2135
+ css: string;
2136
+ js: string;
2137
+ tags: string[];
2138
+ fonts: FontList;
2139
+ body: any;
2140
+ }
2141
+ export interface ExportPlainTextOptions {
2142
+ ignoreLinks?: boolean;
2143
+ ignoreImages?: boolean;
2144
+ ignorePreheader?: boolean;
2145
+ mergeTags?: Record<string, string>;
2146
+ }
2147
+ export interface ExportFromApiResult {
2148
+ design: JSONTemplate;
2149
+ url: string | null;
2150
+ error?: string;
2151
+ }
2152
+ interface BaseExportFromApiOptions {
2153
+ mergeTags?: Record<string, string>;
2154
+ language?: string;
2155
+ }
2156
+ export interface ExportImageFromApiOptions extends BaseExportFromApiOptions {
2157
+ width?: number;
2158
+ height?: number;
2159
+ fullPage?: boolean;
2160
+ deviceScaleFactor?: number;
2161
+ }
2162
+ export interface ExportPdfFromApiOptions extends BaseExportFromApiOptions {
2163
+ }
2164
+ export interface ExportZipFromApiOptions extends BaseExportFromApiOptions {
2165
+ }
2166
+ }
2167
+ declare module "engine/utils/findDeep" {
2168
+ export function findDeep<T = any>(item: Record<string, T> | Array<T> | T, eq: ((item: T) => boolean) | unknown, { _path, _visited }?: {
2169
+ _path?: string[];
2170
+ _visited?: WeakMap<WeakKey, any>;
2171
+ }): string[][];
2172
+ }
2173
+ declare module "embed/Frame" {
2174
+ export type Message = object;
2175
+ export interface MessageData {
2176
+ action: string;
2177
+ callbackId: number;
2178
+ doneId: number;
2179
+ result: unknown | undefined;
2180
+ resultArgs: unknown[] | undefined;
2181
+ }
2182
+ export class Frame {
2183
+ id: number;
2184
+ ready: boolean;
2185
+ iframe: HTMLIFrameElement | undefined;
2186
+ messages: any[];
2187
+ callbackId: number;
2188
+ callbacks: {
2189
+ [key: number]: Function | undefined;
2190
+ };
2191
+ constructor(src: string);
2192
+ createIframe(src: string): HTMLIFrameElement;
2193
+ destroy: () => void;
2194
+ appendTo(el: Element): void;
2195
+ onWindowMessage: (event: MessageEvent<any>) => void;
2196
+ postMessage(action: string, message: Message): void;
2197
+ withMessage(action: string, message: Message | undefined, callback?: Function): void;
2198
+ _preprocessMessageFunctions(message: Message): Message;
2199
+ preprocessMessage(message: Message): Message;
2200
+ scheduleMessage(message: Message): void;
2201
+ flushMessages(): void;
2202
+ handleMessage({ action, callbackId, doneId, result: _result, resultArgs: _resultArgs, }: MessageData): void;
2203
+ receiveMessage(event: any): void;
2204
+ }
2205
+ export const disableMultipleEditors: () => void;
2206
+ export const disableOriginalFunctionReferences: () => void;
2207
+ global {
2208
+ interface Window {
2209
+ __unlayer_lastFrameId: number;
2210
+ __unlayer_multipleEditors: boolean;
2211
+ __unlayer_originalFunctionReferences: boolean;
2212
+ }
2213
+ }
2214
+ }
2215
+ declare module "editor/components/common/Modal" {
2216
+ import React from 'react';
2217
+ import { Props as ReactModalProps } from 'react-modal';
2218
+ export interface ModalProps extends Omit<ReactModalProps, 'style'> {
2219
+ children: React.ReactNode;
2220
+ className?: string;
2221
+ contentStyle?: React.CSSProperties;
2222
+ innerContentStyle?: React.CSSProperties;
2223
+ overlayStyle?: React.CSSProperties;
2224
+ }
2225
+ export function Modal(props: ModalProps): React.JSX.Element;
2226
+ }
2227
+ declare module "editor/components/common/ConditionalWrap" {
2228
+ import React from 'react';
2229
+ export interface ConditionalWrapProps {
2230
+ children: any;
2231
+ condition: boolean;
2232
+ wrap: (children: React.ReactElement<any>) => React.ReactNode;
2233
+ }
2234
+ export function ConditionalWrap(props: ConditionalWrapProps): any;
2235
+ }
2236
+ declare module "editor/components/common/Loader" {
2237
+ import React from 'react';
2238
+ export interface LoaderProps {
2239
+ children?: React.ReactNode;
2240
+ color?: boolean | string | ((props: {
2241
+ theme: any;
2242
+ }) => string);
2243
+ fadeIn?: boolean;
2244
+ loaded?: boolean;
2245
+ loadedClassName?: string;
2246
+ loadingClassName?: string;
2247
+ size?: 'small' | 'normal';
2248
+ }
2249
+ export function Loader(props: LoaderProps): React.JSX.Element;
2250
+ }
2251
+ declare module "engine/utils/withHook" {
2252
+ import React from 'react';
2253
+ export function withHook<P extends object, C extends React.ComponentType<P>, HookName extends string, HookFn extends (props: P) => any>(Component: C, hookName: HookName, useHook: HookFn): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<unknown>>>;
2254
+ }
2255
+ declare module "editor/hooks/useForceRerender" {
2256
+ export function useForceRerender({ debounce, throttle, }?: {
2257
+ debounce?: boolean | number;
2258
+ throttle?: boolean | number;
2259
+ }): () => void;
2260
+ }
2261
+ declare module "editor/hooks/useConfig" {
2262
+ import React from 'react';
2263
+ export function useConfig(): any;
2264
+ export function withConfig<C extends React.ComponentType>(Component: C): React.MemoExoticComponent<React.ForwardRefExoticComponent<React.RefAttributes<unknown>>>;
2265
+ }
2266
+ declare module "engine/utils/position" {
2267
+ import { ArrayItem, DisplayMode } from "state/types/types";
2268
+ export const ENABLE_BACKGROUND_POSITION_FOR_EMAILS = true;
2269
+ export const positions: readonly ["top-left", "top-center", "top-right", "center-left", "center", "center-right", "bottom-left", "bottom-center", "bottom-right"];
2270
+ export type Position = ArrayItem<typeof positions>;
2271
+ 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"];
2272
+ export function positionToBackgroundPosition(position: Position | undefined): 'top left' | 'top center' | 'top right' | 'center left' | 'center center' | 'center right' | 'bottom left' | 'bottom center' | 'bottom right' | 'auto auto';
2273
+ export function valuesToBackgroundPositionCSS(values: {
2274
+ position: Position | 'custom' | undefined;
2275
+ customPosition: [string, string] | undefined;
2276
+ }, { displayMode }: {
2277
+ displayMode: DisplayMode;
2278
+ }): string;
2279
+ export function positionToPercentages(position: Position | 'custom' | undefined): [x: string, y: string] | undefined;
2280
+ export function normalizePosition(position: 'top' | 'top-left' | 'top-center' | 'top-right' | 'center' | 'center-left' | 'center-center' | 'center-right' | 'center-top' | 'center-bottom' | 'bottom' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'left' | 'left-top' | 'left-center' | 'left-bottom' | 'right' | 'right-top' | 'right-center' | 'right-bottom' | 'custom' | undefined): Position | undefined;
2281
+ }
2282
+ declare module "engine/utils/zod/zodSchemasToJsonSchemas" {
2283
+ import { z } from 'zod/v4';
2284
+ import { JSONSchema } from "state/types/types";
2285
+ export function zodSchemasToJsonSchemas<K extends string>(zodSchemas: Partial<Record<K, z.ZodType | undefined>>): Record<K, JSONSchema>;
2286
+ }
2287
+ declare module "engine/utils/zod/propertyEditorSchemas" {
2288
+ import { PropertyEditorZodSchemas } from '../../config';
2289
+ export function propertyEditorZodSchemas<ValueSchema extends PropertyEditorZodSchemas['value']>(zodSchemas: Omit<PropertyEditorZodSchemas, 'value' | 'value__simple'> & {
2290
+ value: ValueSchema;
2291
+ value__simple: ((valueSchema: ValueSchema) => PropertyEditorZodSchemas['value__simple']) | PropertyEditorZodSchemas['value__simple'] | null | undefined;
2292
+ }): {
2293
+ zodSchemas: {
2294
+ value__simple: any;
2295
+ value: ValueSchema;
2296
+ };
2297
+ schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>;
2298
+ };
2299
+ }
2300
+ declare module "engine/utils/zod/types" {
2301
+ import { z } from 'zod/v4';
2302
+ import { EditorProps } from "editor/components/editors/types";
2303
+ import { PropertyEditorZodSchemas } from '../../config';
2304
+ export type EditorPropsFromZodSchemas<T extends Partial<PropertyEditorZodSchemas>> = EditorProps<z.infer<T['value']>, z.infer<T['widgetParams']>>;
2305
+ }
2306
+ declare module "editor/components/editors/PositionEditor" {
2307
+ import React from 'react';
2308
+ import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
2309
+ export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
2310
+ value__simple: any;
2311
+ value: any;
2312
+ };
2313
+ export type PositionEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
2314
+ export function PositionEditor(props: PositionEditorProps): React.JSX.Element;
2315
+ export function PositionEditorBase(props: Pick<PositionEditorProps, 'updateValue' | 'value' | 'widgetParams'> & {
2316
+ className?: string;
2317
+ itemSize?: number;
2318
+ spacing?: number;
2319
+ style?: React.CSSProperties;
2320
+ valueLabelPosition?: 'left' | 'right' | 'none';
2321
+ }): React.JSX.Element;
2322
+ }
2323
+ declare module "editor/hooks/useDynamicRef" {
2324
+ export function useDynamicRef<T>(value: T): import("react").MutableRefObject<T>;
2325
+ }
2326
+ declare module "engine/utils/renderIcon" {
2327
+ import React from 'react';
2328
+ import * as config from '../../engine/config';
2329
+ import { Icon } from "state/types/types";
2330
+ import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2331
+ import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
2332
+ export function renderIcon(icon: Icon | Parameters<typeof config.normalizeIcon>[0] | undefined, { fallbackIcon, shouldShowFallbackIcon, size, divProps, }?: {
2333
+ shouldShowFallbackIcon?: boolean;
2334
+ fallbackIcon?: IconDefinition;
2335
+ size?: FontAwesomeIconProps['size'];
2336
+ divProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
2337
+ }): React.JSX.Element;
2338
+ }
2339
+ declare module "editor/design-system/components/Input" {
2340
+ import React from 'react';
2341
+ import * as Ariakit from '@ariakit/react';
2342
+ import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2343
+ import { Icon } from "state/types/types";
2344
+ export interface InputProps extends Omit<Ariakit.FormInputProps, 'as' | 'onSubmit' | 'onSubmitCapture'> {
2345
+ containerStyle?: React.CSSProperties;
2346
+ formStore?: Ariakit.FormStore<{
2347
+ value: string;
2348
+ }>;
2349
+ icon?: Icon | IconDefinition;
2350
+ inputFooter?: React.ReactNode;
2351
+ inputHeader?: React.ReactNode;
2352
+ inputStyle?: React.CSSProperties;
2353
+ label?: React.ReactNode;
2354
+ labelPosition?: 'top' | 'left' | 'right';
2355
+ maxRows?: number;
2356
+ minRows?: number;
2357
+ name: string;
2358
+ onClear?: () => void;
2359
+ onSubmit: (value: string | number) => void;
2360
+ placeholder?: string;
2361
+ required?: boolean;
2362
+ type?: Ariakit.FormInputProps['type'] | 'textarea';
2363
+ validationDOMTarget?: HTMLDivElement | null;
2364
+ validationMessage?: string;
2365
+ validationStatus?: 'error' | 'warn' | 'success';
2366
+ value: string | number;
2367
+ }
2368
+ export const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
2369
+ export const CSS: {
2370
+ label: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
2371
+ };
2372
+ export const S: {
2373
+ Form: import("styled-components").StyledComponent<any, any, any, any>;
2374
+ FormInputGroup: import("styled-components").StyledComponent<any, any, any, any>;
2375
+ FormLabel: import("styled-components").StyledComponent<any, any, any, any>;
2376
+ FormInputWrapper: import("styled-components").StyledComponent<"div", any, {
2377
+ className: "input-wrapper";
2378
+ }, "className">;
2379
+ FormInput: import("styled-components").StyledComponent<any, any, any, any>;
2380
+ Message: import("styled-components").StyledComponent<"div", any, {}, never>;
2381
+ ClearButton: import("styled-components").StyledComponent<any, any, any, any>;
2382
+ };
2383
+ }
2384
+ declare module "editor/helpers/extractStringsFromReactNode" {
2385
+ import React from 'react';
2386
+ export function extractStringsFromReactNode(node: React.ReactNode): string;
2387
+ }
2388
+ declare module "editor/design-system/components/Tooltip" {
2389
+ import React from 'react';
2390
+ import * as Ariakit from '@ariakit/react';
2391
+ export interface TooltipProps {
2392
+ arrow?: boolean;
2393
+ children?: Ariakit.TooltipAnchorProps['children'];
2394
+ className?: string;
2395
+ disabled?: boolean;
2396
+ gutter?: Ariakit.TooltipProps['gutter'];
2397
+ placement: Ariakit.TooltipStoreProps['placement'];
2398
+ style?: React.CSSProperties;
2399
+ timeout?: Ariakit.TooltipStoreProps['timeout'];
2400
+ tooltip: Ariakit.TooltipProps['children'];
2401
+ tooltipWrapper?: Ariakit.TooltipAnchorProps['render'];
2402
+ }
2403
+ export function Tooltip(props: TooltipProps): React.JSX.Element;
2404
+ }
2405
+ declare module "editor/design-system/components/Button" {
2406
+ import React from 'react';
2407
+ import * as Ariakit from '@ariakit/react';
2408
+ import { IconProp } from '@fortawesome/fontawesome-svg-core';
2409
+ import { Theme } from "editor/themes/types";
2410
+ import { TooltipProps } from "editor/design-system/components/Tooltip";
2411
+ export interface ButtonProps extends Ariakit.ButtonProps {
2412
+ children?: React.ReactNode;
2413
+ circle?: boolean;
2414
+ className?: string;
2415
+ contentAlign?: 'left' | 'center' | 'right';
2416
+ danger?: boolean;
2417
+ disabled?: boolean;
2418
+ icon?: IconProp;
2419
+ id?: string;
2420
+ loading?: boolean;
2421
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
2422
+ rounded?: boolean;
2423
+ size?: number | 'auto';
2424
+ style?: React.CSSProperties;
2425
+ tooltip?: string;
2426
+ tooltipPlacement?: TooltipProps['placement'];
2427
+ truncate?: boolean;
2428
+ type?: Ariakit.ButtonProps['type'];
2429
+ variant?: keyof Theme['components']['buttons'];
2430
+ }
2431
+ export const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<unknown>>;
2432
+ }
2433
+ declare module "editor/helpers/intl" {
2434
+ import _ from 'lodash';
2435
+ import { IntlShape } from 'react-intl';
2436
+ function _getIntlLabel<Label extends any>(intl: IntlShape, label: string | Label): string | Label;
2437
+ export const getIntlLabel: typeof _getIntlLabel & _.MemoizedFunction;
2438
+ }
2439
+ declare module "editor/design-system/components/Dropdown" {
2440
+ import React from 'react';
2441
+ import * as Ariakit from '@ariakit/react';
2442
+ import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2443
+ import { TooltipProps } from "editor/design-system/components/Tooltip";
2444
+ export interface SelectOption {
2445
+ icon?: IconDefinition;
2446
+ label: string;
2447
+ value: any;
2448
+ key?: string;
2449
+ tooltip?: string;
2450
+ tooltipPlacement?: TooltipProps['placement'];
2451
+ meta?: Record<string, unknown>;
2452
+ onClick?: (e: React.MouseEvent, selected: boolean) => void;
2453
+ selected: boolean;
2454
+ disabled?: boolean;
2455
+ toggle?: boolean;
2456
+ attrs?: Record<string, string | number | boolean | undefined>;
2457
+ }
2458
+ export interface SelectOptionGroup {
2459
+ name?: string;
2460
+ label?: string;
2461
+ icon?: IconDefinition;
2462
+ options: SelectOption[];
2463
+ meta?: object;
2464
+ }
2465
+ export type DropdownProps = {
2466
+ ariaLabel?: string;
2467
+ asLink?: boolean;
2468
+ badge?: number | boolean;
2469
+ className?: string;
2470
+ icon?: IconDefinition;
2471
+ caret?: boolean;
2472
+ disabled?: boolean;
2473
+ fallbackLabel?: string;
2474
+ id?: string;
2475
+ label?: React.ReactNode;
2476
+ multi?: boolean;
2477
+ triggerLabel?: string | React.ReactNode;
2478
+ placement?: Ariakit.PopoverStoreState['placement'];
2479
+ onChange?: (option: SelectOption) => void;
2480
+ onClose?: () => void;
2481
+ onOpen?: () => void;
2482
+ renderButton?: Ariakit.SelectProps['render'];
2483
+ renderFooter?: () => React.ReactNode;
2484
+ renderHeader?: () => React.ReactNode;
2485
+ style?: React.CSSProperties;
2486
+ customPopoverStyles?: React.CSSProperties;
2487
+ tooltip?: string;
2488
+ title?: string;
2489
+ tooltipPlacement?: TooltipProps['placement'];
2490
+ } & ({
2491
+ renderOption?: (option: SelectOption) => React.ReactNode;
2492
+ renderOptionLabel?: never;
2493
+ } | {
2494
+ renderOption?: never;
2495
+ renderOptionLabel?: (option: SelectOption) => React.ReactNode;
2496
+ }) & ({
2497
+ options?: never;
2498
+ groupedOptions?: Array<SelectOptionGroup | undefined>;
2499
+ renderOptionGroupHeader?: (optionGroup: SelectOptionGroup) => React.ReactNode;
2500
+ } | {
2501
+ options?: Array<SelectOption | undefined>;
2502
+ groupedOptions?: never;
2503
+ renderOptionGroupHeader?: never;
2504
+ });
2505
+ export function Dropdown(props: DropdownProps): React.JSX.Element;
2506
+ }
2507
+ declare module "editor/themes/helpers" {
2508
+ import { Theme, ThemeExtension } from "editor/themes/types";
2509
+ export function extendTheme<TE extends ThemeExtension, BT extends Theme>(themeExtension: TE, baseTheme: BT): BT;
2510
+ export function postprocessTheme<T extends Theme>(theme: T): T;
2511
+ export function parseThemeValues<T extends Theme>(theme: T): T;
2512
+ }
2513
+ declare module "editor/themes/modern/light" {
2514
+ import { DeprecatedTheme, Theme } from "editor/themes/types";
2515
+ export const unparsedTheme: Theme & DeprecatedTheme;
2516
+ }
2517
+ declare module "editor/themes/classic/light" {
2518
+ export const unparsedTheme: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2519
+ }
2520
+ declare module "editor/themes/modern/dark" {
2521
+ import { DeprecatedTheme, Theme } from "editor/themes/types";
2522
+ export const unparsedTheme: Theme & DeprecatedTheme;
2523
+ }
2524
+ declare module "editor/themes/classic/dark" {
2525
+ export const unparsedTheme: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2526
+ }
2527
+ declare module "editor/themes/index" {
2528
+ const themes: {
2529
+ classic_light: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2530
+ classic_dark: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2531
+ modern_light: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2532
+ modern_dark: import("editor/themes/types").Theme & import("editor/themes/types").DeprecatedTheme;
2533
+ };
2534
+ export default themes;
2535
+ }
2536
+ declare module "editor/hooks/useTheme" {
2537
+ import React from 'react';
2538
+ import { DeprecatedTheme, Theme } from "editor/themes/types";
2539
+ export function ThemeProvider(props: React.PropsWithChildren): React.JSX.Element;
2540
+ export function ThemeConsumer(props: {
2541
+ children: React.ReactNode | ((params: {
2542
+ theme: any;
2543
+ }) => React.ReactNode);
2544
+ }): React.ReactNode;
2545
+ export function useThemeInternal(): Theme & DeprecatedTheme;
2546
+ export function useTheme(): Theme & DeprecatedTheme;
2547
+ }
2548
+ declare module "editor/design-system/components/CounterInput" {
2549
+ import React from 'react';
2550
+ import { DisplayMode } from "state/types/types";
2551
+ import { InputProps } from "editor/design-system/components/Input";
2552
+ export interface CounterInputProps {
2553
+ absoluteBaseValue?: number;
2554
+ containerStyle?: React.CSSProperties;
2555
+ defaultUnit?: string;
2556
+ disabled?: boolean;
2557
+ displayMode: DisplayMode;
2558
+ inputStyle?: InputProps['style'];
2559
+ mainContainerStyle?: React.CSSProperties;
2560
+ maxValue?: number | null;
2561
+ minValue?: number | null;
2562
+ onChange: (value: number | string) => void;
2563
+ shouldRenderIncrementDecrementButtons?: boolean;
2564
+ step?: number;
2565
+ units?: string[];
2566
+ unitSupportedDisplayModes?: string[];
2567
+ validationDOMTarget?: InputProps['validationDOMTarget'];
2568
+ value: number | string;
2569
+ }
2570
+ export default function CounterInput(props: CounterInputProps): React.JSX.Element;
2571
+ }
2572
+ declare module "editor/components/editors/common/Counter" {
2573
+ import React from 'react';
2574
+ import { CounterInputProps } from "editor/design-system/components/CounterInput";
2575
+ export interface CounterProps extends Omit<CounterInputProps, 'displayMode'> {
2576
+ right?: boolean;
2577
+ }
2578
+ export default function Counter(props: CounterProps): React.JSX.Element;
2579
+ }
2580
+ declare module "engine/utils/sizeUtils" {
2581
+ import { DisplayMode } from "state/types/types";
2582
+ export const ENABLE_BACKGROUND_SIZE_FOR_EMAILS = false;
2583
+ export function normalizeFloat(n: number | string | undefined, decimalsPlace?: number): number;
2584
+ export function normalizeSize(size: number | string | undefined, { decimalsPlace }?: {
2585
+ decimalsPlace?: number;
2586
+ }): string;
2587
+ export function calculateExactSize(size: number | string, maxSize: number | undefined, options?: {
2588
+ decimalsPlace?: number;
2589
+ ifNumberConsiderAsPercentage?: boolean;
2590
+ }): number | undefined;
2591
+ export function valuesToBackgroundSizeCSS(values: {
2592
+ size: 'contain' | 'cover' | 'custom' | undefined;
2593
+ customSize: [string, string];
2594
+ }, { displayMode }: {
2595
+ displayMode: DisplayMode;
2596
+ }): string;
2597
+ }
2598
+ declare module "engine/config/mergeTags" {
2599
+ import { MergeTags } from "state/types/types";
2600
+ export function getMergeTags(): MergeTags;
2601
+ export function getMergeTagsVersion(): number;
2602
+ export function setMergeTags(_mergeTags: MergeTags): void;
2603
+ }
2604
+ declare module "engine/utils/htmlEntities" {
2605
+ export function encodeHtmlEntities(str: string | undefined, { modes }?: {
2606
+ modes?: Array<keyof typeof replacers>;
2607
+ }): string;
2608
+ const replacers: {
2609
+ accents: (str: string | undefined) => string;
2610
+ all: (str: string | undefined) => string;
2611
+ others: (str: string | undefined) => string;
2612
+ tags: (str: string | undefined) => string;
2613
+ };
2614
+ }
2615
+ declare module "engine/utils/encodeMergeTag" {
2616
+ export function encodeMergeTag(str: string | undefined): string;
2617
+ }
2618
+ declare module "engine/utils/escapeHtml" {
2619
+ export function escapeHtml(str: string | undefined, { escapeAndOperator, // This was causing issues by changing & in links to &amp;
2620
+ escapeLT, escapeGT, escapeDoubleQuotes, escapeSingleQuotes, }?: {
2621
+ escapeAndOperator?: boolean;
2622
+ escapeLT?: boolean;
2623
+ escapeGT?: boolean;
2624
+ escapeDoubleQuotes?: boolean;
2625
+ escapeSingleQuotes?: boolean;
2626
+ }): string;
2627
+ }
2628
+ declare module "engine/utils/escapeRegexString" {
2629
+ export function escapeRegexString(str: string): string;
2630
+ }
2631
+ declare module "engine/utils/getNumberOrString" {
2632
+ export function getNumberOrString(str: string | number): string | number;
2633
+ }
2634
+ declare module "engine/utils/flattenMergeTags" {
2635
+ import { MergeTag, MergeTags, MergeTagsConfig } from "state/types/types";
2636
+ export type MergeTagWithMeta = MergeTag & {
2637
+ _meta: {
2638
+ key: string;
2639
+ tree: Array<Omit<MergeTag, 'mergeTags'> & {
2640
+ _meta?: Omit<MergeTagWithMeta['_meta'], 'tree'>;
2641
+ }>;
2642
+ };
2643
+ };
2644
+ function _flattenMergeTags(mergeTags: Array<MergeTag | MergeTagWithMeta> | MergeTags, mergeTagsConfig?: Pick<MergeTagsConfig, 'sort'>, _internal?: Pick<MergeTagWithMeta['_meta'], 'tree'>): Array<MergeTagWithMeta>;
2645
+ export const flattenMergeTags: typeof _flattenMergeTags & import("lodash").MemoizedFunction;
2646
+ export function getMergeTagLabel(mergeTag: MergeTagWithMeta['_meta']['tree'][0] | undefined): string;
2647
+ export function getMergeTagFlatLabel(mergeTag: MergeTagWithMeta | undefined): string;
2648
+ }
2649
+ declare module "engine/utils/testBrowserFeatures" {
2650
+ export function supportsRegexLookAheadLookBehind(): boolean;
2651
+ export function replaceWithLookBehind(str: string, lookbBehindStr: string, regex: RegExp, replacement: string): string;
2652
+ }
2653
+ declare module "engine/utils/applyMergeTagsToHtml" {
2654
+ import { MergeTags, MergeTagsValues } from "state/types/types";
2655
+ export function applyMergeTagsToHtml(html: string | undefined, { mergeTagsSchema, mergeTagsValues: _mergeTagsValues, _skipTags, _useRawValue, }: {
2656
+ mergeTagsSchema: MergeTags | undefined;
2657
+ mergeTagsValues: MergeTagsValues | undefined;
2658
+ _skipTags?: boolean;
2659
+ _useRawValue?: boolean;
2660
+ }): string;
2661
+ }
2662
+ declare module "engine/utils/generateMergeTagHtml" {
2663
+ import { Icon, MergeTag } from "state/types/types";
2664
+ export function generateMergeTagHtml(mergeTag: Pick<MergeTag, 'name' | 'value' | 'sample'> & {
2665
+ icon?: Icon | string;
2666
+ }, tool?: 'paragraph' | 'text'): string;
2667
+ }
2668
+ declare module "engine/utils/applyMergeTagPreviewHtmlToText" {
2669
+ function _applyMergeTagPreviewHtmlToText(text: string | undefined, { type, tool, }?: {
2670
+ type?: 'smart' | 'raw';
2671
+ tool?: 'paragraph' | 'text';
2672
+ }): string;
2673
+ export const applyMergeTagPreviewHtmlToText: typeof _applyMergeTagPreviewHtmlToText & import("lodash").MemoizedFunction;
2674
+ }
2675
+ declare module "editor/design-system/components/SegmentedControl" {
2676
+ import React from 'react';
2677
+ import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
2678
+ export interface SegmentedControlItem {
2679
+ key?: string;
2680
+ icon?: IconDefinition;
2681
+ label?: string;
2682
+ onClick?: (e: React.MouseEvent) => void;
2683
+ selected?: boolean;
2684
+ disabled?: boolean;
2685
+ tooltip?: string;
2686
+ meta?: object;
2687
+ }
2688
+ export interface SegmentedControlProps {
2689
+ autoFocus?: boolean;
2690
+ className?: string;
2691
+ disabled?: boolean;
2692
+ items: SegmentedControlItem[];
2693
+ renderLabel?: (item: SegmentedControlItem) => React.ReactNode;
2694
+ }
2695
+ export function SegmentedControl(props: SegmentedControlProps): React.JSX.Element;
2696
+ }
2697
+ declare module "engine/config/env" {
2698
+ export const env: {
2699
+ API_V1_BASE_URL: string;
2700
+ API_V2_BASE_URL: string;
2701
+ API_V3_BASE_URL: string;
2702
+ EVENTS_API_BASE_URL: string;
2703
+ TOOLS_API_V1_BASE_URL: string;
2704
+ TOOLS_CDN_BASE_URL: string;
2705
+ CONSOLE_BASE_URL: string;
2706
+ };
2707
+ export function setIsTest(isTest: boolean): void;
2708
+ export function isTest(): boolean;
2709
+ global {
2710
+ interface Window {
2711
+ Cypress?: unknown;
2712
+ }
2713
+ }
2714
+ }
2715
+ declare module "editor/helpers/image" {
2716
+ import _ from 'lodash';
2717
+ export function fetchImage(imageURL: string, { proxyURL, retryWithoutProxy, }?: {
2718
+ proxyURL?: string;
2719
+ retryWithoutProxy?: boolean;
2720
+ }): Promise<{
2721
+ blob: Blob;
2722
+ url: string;
2723
+ }>;
2724
+ export function tryFetchImageBlob(imageURL: string, requestOptions?: RequestInit | HeadersInit, { cache }?: {
2725
+ cache?: boolean;
2726
+ }): Promise<Blob>;
2727
+ export function getImageUrlWithProxy(imageURL: string, { proxyURL }?: {
2728
+ proxyURL?: string;
2729
+ }): string;
2730
+ export function fetchImageViaProxy(imageURL: string, { proxyURL, retryWithoutProxy, }?: {
2731
+ proxyURL?: string;
2732
+ retryWithoutProxy?: boolean;
2733
+ }): Promise<{
2734
+ blob: Blob;
2735
+ url: string;
2736
+ }>;
2737
+ export const tryLoadImageFromStringOrBlob: ((imageSrcOrBlob: string | Blob) => Promise<{
2738
+ image: {
2739
+ width: number;
2740
+ height: number;
2741
+ src: string;
2742
+ };
2743
+ imgElement: HTMLImageElement;
2744
+ }>) & _.MemoizedFunction;
2745
+ export function loadImageDimensions(imageSrcOrBlob: string | Blob): Promise<{
2746
+ width: number | undefined;
2747
+ height: number | undefined;
2748
+ error?: string;
2749
+ }>;
2750
+ export function imageHasTransparency(imageSrcOrBlob: string | Blob, { minimumPercentageOfAlphaPixels, }?: {
2751
+ minimumPercentageOfAlphaPixels?: number;
2752
+ }): Promise<boolean | null>;
2753
+ }
2754
+ declare module "editor/hooks/useImageUploader" {
2755
+ import { useStore } from 'react-redux';
2756
+ import { ImageSource } from "state/types/types";
2757
+ type Store = Pick<ReturnType<typeof useStore>, 'dispatch' | 'getState'>;
2758
+ export interface Params {
2759
+ maxSize?: number | null;
2760
+ onErrorChange?: (error: Error | null) => void;
2761
+ onImageSelect?: (image?: {
2762
+ id?: string | number;
2763
+ url: string;
2764
+ width?: number;
2765
+ height?: number;
2766
+ size?: number;
2767
+ }) => void;
2768
+ onImageUpload?: (image: {
2769
+ id?: string | number;
2770
+ url: string;
2771
+ width?: number;
2772
+ height?: number;
2773
+ optimistic?: boolean;
2774
+ }) => void;
2775
+ onUploadProgressChange?: (progress: number) => void;
2776
+ onUploadStatusChange?: (isUploading: boolean) => void;
2777
+ shouldReloadUserUploadsAfterUpload?: boolean;
2778
+ shouldTriggerReduxOptimisticUpdate?: boolean;
2779
+ }
2780
+ export function useImageUploader(params: Params): {
2781
+ error: Error;
2782
+ isUploading: boolean;
2783
+ startUploadFlow: (images: FileList | Array<File | Blob | string> | null, source: ImageSource) => void;
2784
+ setError: import("react").Dispatch<import("react").SetStateAction<Error>>;
2785
+ triggerSelectImageCallback: () => void;
2786
+ uploadProgress: number;
2787
+ };
2788
+ function triggerImageUploadCallback(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onErrorOrNull, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
2789
+ maxSize?: Params['maxSize'];
2790
+ onErrorOrNull?: (error: Error | null) => void;
2791
+ onImageUpload?: Params['onImageUpload'];
2792
+ project: {
2793
+ id?: number;
2794
+ } | null;
2795
+ setIsUploading?: Params['onUploadStatusChange'];
2796
+ setUploadProgress?: Params['onUploadProgressChange'];
2797
+ shouldReloadUserUploadsAfterUpload?: Params['shouldReloadUserUploadsAfterUpload'];
2798
+ shouldTriggerReduxOptimisticUpdate?: Params['shouldTriggerReduxOptimisticUpdate'];
2799
+ store: Store;
2800
+ userId: string;
2801
+ }): Promise<void>;
2802
+ function uploadFiles(images: FileList | Array<File | Blob | string>, source: ImageSource, { maxSize, onErrorOrNull, onImageUpload, project, setIsUploading, setUploadProgress, shouldReloadUserUploadsAfterUpload, shouldTriggerReduxOptimisticUpdate, store, userId, }: {
2803
+ maxSize?: Params['maxSize'];
2804
+ onErrorOrNull?: (error: Error | null) => void;
2805
+ onImageUpload?: Params['onImageUpload'];
2806
+ project: {
2807
+ id?: number;
2808
+ storage?: boolean;
2809
+ } | null;
2810
+ setIsUploading?: Params['onUploadStatusChange'];
2811
+ setUploadProgress?: Params['onUploadProgressChange'];
2812
+ shouldReloadUserUploadsAfterUpload?: Params['shouldReloadUserUploadsAfterUpload'];
2813
+ shouldTriggerReduxOptimisticUpdate?: Params['shouldTriggerReduxOptimisticUpdate'];
2814
+ store: Store;
2815
+ userId: string;
2816
+ }): Promise<void>;
2817
+ export function startUploadFlow(images: FileList | Array<File | Blob | string> | null, source: ImageSource, params: Parameters<typeof triggerImageUploadCallback>[2] & Parameters<typeof uploadFiles>[2]): Promise<void>;
2818
+ export function convertImagesToFileOrBlob(images: FileList | Array<File | Blob | string | undefined | null> | undefined | null): Promise<Array<File | Blob>>;
2819
+ export class ImageMaxSizeExceededError extends Error {
2820
+ maxSize: number;
2821
+ size: number;
2822
+ constructor({ size, maxSize }: {
2823
+ size: number;
2824
+ maxSize: number;
2825
+ }, message?: string, ...params: any[]);
2826
+ }
2827
+ }
2828
+ declare module "editor/components/common/ImageUploadButton" {
2829
+ import React from 'react';
2830
+ import { ImageSource } from "state/types/types";
2831
+ import { ButtonProps } from "editor/design-system/components/Button";
2832
+ export interface ImageUploadButtonInstance {
2833
+ clearError: () => void;
2834
+ openPicker: () => void;
2835
+ startUploadFlow: (images: FileList | Array<File | Blob | string> | null, source: ImageSource) => void;
2836
+ }
2837
+ export interface ImageUploadButtonProps {
2838
+ buttonProps?: ButtonProps;
2839
+ disableProgressIndicator?: boolean;
2840
+ disabled?: boolean;
2841
+ maxSize?: number;
2842
+ onErrorChange?: (error: Error | null) => void;
2843
+ onImageSelect?: (image?: {
2844
+ id?: string | number;
2845
+ url: string;
2846
+ width?: number;
2847
+ height?: number;
2848
+ }) => void;
2849
+ onImageUpload?: (image: {
2850
+ id?: string | number;
2851
+ url: string;
2852
+ width?: number;
2853
+ height?: number;
2854
+ optimistic?: boolean;
2855
+ }) => void;
2856
+ onUploadProgressChange?: (progress: number) => void;
2857
+ onUploadStatusChange?: (isUploading: boolean) => void;
2858
+ shouldReloadUserUploadsAfterUpload?: boolean;
2859
+ shouldTriggerReduxOptimisticUpdate?: boolean;
2860
+ showError?: boolean;
2861
+ }
2862
+ export const ImageUploadButton: React.ForwardRefExoticComponent<ImageUploadButtonProps & React.RefAttributes<ImageUploadButtonInstance>>;
2863
+ }
2864
+ declare module "editor/design-system/components/Progress" {
2865
+ import React from 'react';
2866
+ export interface ProgressBarProps {
2867
+ progress: number;
2868
+ className?: string;
2869
+ color?: string;
2870
+ backgroundColor?: string;
2871
+ height?: string;
2872
+ animationDuration?: number;
2873
+ }
2874
+ export function Progress(props: ProgressBarProps): React.JSX.Element;
2875
+ }
2876
+ declare module "engine/utils/explodePaddingsOrMargins" {
2877
+ export function explodePaddingsOrMargins(value: number | string | undefined): {
2878
+ top: number | undefined;
2879
+ right: number | undefined;
2880
+ bottom: number | undefined;
2881
+ left: number | undefined;
2882
+ };
2883
+ }
2884
+ declare module "editor/components/editors/common/WidgetLabel" {
2885
+ import React from 'react';
2886
+ import { Device, Location } from "state/types/types";
2887
+ export type WidgetLabelProps = {
2888
+ children?: React.ReactNode;
2889
+ className?: string;
2890
+ defaultValue?: any;
2891
+ deviceName?: Device;
2892
+ disabled?: boolean;
2893
+ getValue?: (deviceName?: Device | undefined) => any;
2894
+ infoTooltip?: string;
2895
+ isLocked?: boolean;
2896
+ lockReason?: 'styleguide' | 'admin' | undefined;
2897
+ location?: Location;
2898
+ name?: string;
2899
+ onReset?: (data: {
2900
+ value: any;
2901
+ deviceName: Device | undefined;
2902
+ }) => void;
2903
+ };
2904
+ export function WidgetLabel(props: WidgetLabelProps): React.JSX.Element;
2905
+ export function getOptionModificationInfo({ defaultValue, deviceName, getValue, optionName, }: {
2906
+ defaultValue: any;
2907
+ deviceName: Device | null | undefined;
2908
+ getValue: NonNullable<WidgetLabelProps['getValue']>;
2909
+ optionName: string;
2910
+ }): {
2911
+ hasValue: boolean;
2912
+ isOverride: boolean;
2913
+ isSameValue: boolean;
2914
+ showResetButton: boolean;
2915
+ };
2916
+ }
2917
+ declare module "editor/design-system/components/ToggleSwitch" {
2918
+ import React from 'react';
2919
+ export interface ToggleSwitchProps {
2920
+ children?: React.ReactNode;
2921
+ className?: string;
2922
+ disabled?: boolean;
2923
+ isChecked: boolean;
2924
+ left?: React.ReactNode;
2925
+ onChange: (isChecked: boolean) => void;
2926
+ right?: React.ReactNode;
2927
+ toggleLeft?: React.ReactNode;
2928
+ size?: number;
2929
+ style?: React.CSSProperties;
2930
+ }
2931
+ export const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLLabelElement>>;
2932
+ }
2933
+ declare module "editor/components/editors/AutoWidthEditor" {
2934
+ import * as React from 'react';
2935
+ import { WidgetLabelProps } from "editor/components/editors/common/WidgetLabel";
2936
+ import { Device } from "state/types/types";
2937
+ import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
2938
+ export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
2939
+ value__simple: any;
2940
+ value: any;
2941
+ };
2942
+ export type AutoWidthEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
2943
+ export interface AutoWidthEditorBaseProps extends Pick<AutoWidthEditorProps, 'value' | 'defaultValue' | 'disabled' | 'isLocked' | 'lockReason'> {
2944
+ defaultWidthIsCalculated?: boolean;
2945
+ deviceName?: Device;
2946
+ widgetLabelProps: Omit<WidgetLabelProps, 'defaultValue' | 'onReset'>;
2947
+ handlers: {
2948
+ onToggleAutoWidth: (autoWidth: NonNullable<AutoWidthEditorProps['value']>['autoWidth']) => void;
2949
+ onChangeWidth: (width: number) => void;
2950
+ onReset: NonNullable<WidgetLabelProps['onReset']>;
2951
+ };
2952
+ }
2953
+ export const AutoWidthEditorBase: (props: AutoWidthEditorBaseProps) => React.JSX.Element;
2954
+ }
2955
+ declare module "engine/utils/isUrl" {
2956
+ export function isUrl(value: any): boolean;
2957
+ }
2958
+ declare module "editor/helpers/placeholders" {
2959
+ export const DEFAULT_IMAGE_PLACEHOLDER = "https://cdn.tools.unlayer.com/image/placeholder.png";
2960
+ export const DEFAULT_CAROUSEL_PLACEHOLDER = "https://cdn.tools.unlayer.com/carousel/placeholder.png";
2961
+ type ToolType = 'image' | 'carousel';
2962
+ export function getPlaceholderUrl(type: ToolType): string;
2963
+ }
2964
+ declare module "engine/utils/explodeBorder" {
2965
+ export function explodeBorder(value: number | string | {
2966
+ borderTopWidth?: string;
2967
+ borderTopStyle?: string;
2968
+ borderTopColor?: string;
2969
+ borderLeftWidth?: string;
2970
+ borderLeftStyle?: string;
2971
+ borderLeftColor?: string;
2972
+ borderRightWidth?: string;
2973
+ borderRightStyle?: string;
2974
+ borderRightColor?: string;
2975
+ borderBottomWidth?: string;
2976
+ borderBottomStyle?: string;
2977
+ borderBottomColor?: string;
2978
+ } | undefined): {
2979
+ top: number | undefined;
2980
+ right: number | undefined;
2981
+ bottom: number | undefined;
2982
+ left: number | undefined;
2983
+ };
2984
+ }
2985
+ declare module "engine/utils/imageRendering" {
2986
+ import { explodePaddingsOrMargins } from "engine/utils/explodePaddingsOrMargins";
2987
+ import { explodeBorder } from "engine/utils/explodeBorder";
2988
+ export function isFixedContentWidth(bodyValues?: {
2989
+ contentWidth: number | string;
2990
+ }): boolean;
2991
+ export function getBodyAvailableWidth({ body, fallbackBodyContentWidth, }: {
2992
+ body: {
2993
+ values: {
2994
+ contentWidth: number | string;
2995
+ padding?: Parameters<typeof explodePaddingsOrMargins>[0];
2996
+ border?: Parameters<typeof explodeBorder>[0];
2997
+ };
2998
+ };
2999
+ fallbackBodyContentWidth?: number;
3000
+ }): number;
3001
+ export function getRowAvailableWidth({ body, row, }: {
3002
+ body: Parameters<typeof getBodyAvailableWidth>[0]['body'];
3003
+ row: {
3004
+ values: {
3005
+ padding: Parameters<typeof explodePaddingsOrMargins>[0];
3006
+ border?: Parameters<typeof explodeBorder>[0];
3007
+ };
3008
+ };
3009
+ }): number;
3010
+ export function getColumnAvailableWidth({ body, row, column, }: {
3011
+ body: Parameters<typeof getRowAvailableWidth>[0]['body'];
3012
+ row: Parameters<typeof getRowAvailableWidth>[0]['row'] & {
3013
+ cells: number[];
3014
+ };
3015
+ column: {
3016
+ index: number;
3017
+ values: {
3018
+ padding: Parameters<typeof explodePaddingsOrMargins>[0];
3019
+ border: Parameters<typeof explodeBorder>[0];
3020
+ };
3021
+ };
3022
+ }): number;
3023
+ export function getContentAvailableWidth({ body, row, column, item, }: {
3024
+ body: Parameters<typeof getColumnAvailableWidth>[0]['body'];
3025
+ row: Parameters<typeof getColumnAvailableWidth>[0]['row'];
3026
+ column: Parameters<typeof getColumnAvailableWidth>[0]['column'];
3027
+ item: {
3028
+ values: {
3029
+ containerPadding?: Parameters<typeof explodePaddingsOrMargins>[0];
3030
+ border?: Parameters<typeof explodeBorder>[0];
3031
+ };
3032
+ };
3033
+ }): number;
3034
+ export function getAvailableWidth({ values, columnIndex, columnValues, rowCells, rowValues, bodyValues, }: {
3035
+ values: Parameters<typeof getContentAvailableWidth>[0]['item']['values'];
3036
+ columnIndex: Parameters<typeof getContentAvailableWidth>[0]['column']['index'];
3037
+ columnValues: Parameters<typeof getContentAvailableWidth>[0]['column']['values'];
3038
+ rowCells: Parameters<typeof getContentAvailableWidth>[0]['row']['cells'];
3039
+ rowValues: Parameters<typeof getContentAvailableWidth>[0]['row']['values'];
3040
+ bodyValues: Parameters<typeof getContentAvailableWidth>[0]['body']['values'];
3041
+ }): number;
3042
+ export function getImageWidthAndMaxWidth(widthValue: {
3043
+ autoWidth?: boolean;
3044
+ maxWidth?: number | string;
3045
+ width?: number;
3046
+ }, availableWidth?: number): {
3047
+ width: string;
3048
+ maxWidth: string;
3049
+ };
3050
+ export function getImageProperties(widthValue: {
3051
+ autoWidth?: boolean;
3052
+ maxWidth?: number | string;
3053
+ width?: number;
3054
+ }, availableWidth?: number, optionName?: string): {
3055
+ imageCSSClassName: string;
3056
+ imageStyleObj: {
3057
+ width: string;
3058
+ maxWidth: string;
3059
+ };
3060
+ imageCSSStyle: string;
3061
+ };
3062
+ export function getDynamicImageUrl(src: string | undefined, params: {
3063
+ allowUpscale?: boolean;
3064
+ dynamic?: boolean;
3065
+ resizeWidth: number | string | undefined;
3066
+ originalWidth: number | string | undefined;
3067
+ }): string;
3068
+ }
3069
+ declare module "editor/components/editors/pixie/pixie.umd" {
3070
+ const _exports: {
3071
+ new (t: any): {
3072
+ readonly state: any;
3073
+ readonly defaultConfig: any;
3074
+ open(t?: {}): Promise<any>;
3075
+ close(): void;
3076
+ setConfig(t: any): void;
3077
+ uploadAndAddImage(): any;
3078
+ uploadAndReplaceMainImage(): any;
3079
+ uploadAndOpenStateFile(): any;
3080
+ newCanvas(t: any, n: any, r: any): any;
3081
+ getState(t: any): string;
3082
+ setState(t: any): any;
3083
+ setStateFromUrl(t: any): Promise<any>;
3084
+ openTool(t: any): void;
3085
+ applyChanges(): void;
3086
+ cancelChanges(): void;
3087
+ resetEditor(t: any): Promise<void>;
3088
+ togglePanel(t: any, n: any): void;
3089
+ on(t: any, n: any): void;
3090
+ isDirty(): any;
3091
+ get(t: any): any;
3092
+ notify(t: any): void;
3093
+ };
3094
+ init(t: any): Promise<any>;
3095
+ };
3096
+ export = _exports;
3097
+ }
3098
+ declare module "editor/design-system/components/Popover" {
3099
+ import React from 'react';
3100
+ import * as Ariakit from '@ariakit/react';
3101
+ export type PopoverProps = {
3102
+ arrow?: boolean;
3103
+ autoFocusOnHide?: boolean;
3104
+ autoFocusOnShow?: boolean;
3105
+ children: Ariakit.PopoverAnchorProps['children'];
3106
+ className?: string;
3107
+ content: Ariakit.PopoverProps['children'];
3108
+ defaultOpen?: Ariakit.PopoverStoreProps['defaultOpen'];
3109
+ destroyOnHide?: boolean;
3110
+ disabled?: boolean;
3111
+ forcedOpenState?: boolean;
3112
+ gutter?: Ariakit.PopoverOptions['gutter'];
3113
+ onHide?: () => void;
3114
+ onShow?: () => void;
3115
+ placement: Ariakit.PopoverStoreProps['placement'];
3116
+ portal?: Ariakit.PopoverOptions['portal'];
3117
+ portalParent?: 'body' | 'editor';
3118
+ style?: React.CSSProperties;
3119
+ wrapper?: Ariakit.PopoverAnchorProps['render'];
3120
+ } & ({
3121
+ showOnHover?: false;
3122
+ hideTimeout?: never;
3123
+ showTimeout?: never;
3124
+ timeout?: never;
3125
+ } | {
3126
+ showOnHover?: true;
3127
+ hideTimeout?: Ariakit.HovercardStoreProps['hideTimeout'];
3128
+ showTimeout?: Ariakit.HovercardStoreProps['showTimeout'];
3129
+ timeout?: Ariakit.HovercardStoreProps['timeout'];
3130
+ });
3131
+ export interface PopoverInstance {
3132
+ isOpen: boolean;
3133
+ show: () => void;
3134
+ hide: () => void;
3135
+ }
3136
+ export const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<PopoverInstance>>;
3137
+ export const CSS: {
3138
+ popover: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
3139
+ anchor: import("styled-components").FlattenSimpleInterpolation;
3140
+ arrow: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
3141
+ };
3142
+ }
3143
+ declare module "editor/design-system/components/Bar" {
3144
+ import React, { ReactNode } from 'react';
3145
+ import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
3146
+ import { TooltipProps } from "editor/design-system/components/Tooltip";
3147
+ import { DropdownProps } from "editor/design-system/components/Dropdown";
3148
+ import { PopoverProps } from "editor/design-system/components/Popover";
3149
+ export const BAR_HEIGHT = 40;
3150
+ export const BAR_ITEM_WIDTH = 50;
3151
+ export const BAR_ITEM_COMPACT_WIDTH = 30;
3152
+ export interface SelectOption {
3153
+ icon?: IconDefinition;
3154
+ label: string;
3155
+ value: any;
3156
+ tooltip?: string;
3157
+ tooltipPlacement?: TooltipProps['placement'];
3158
+ meta?: object;
3159
+ onClick?: (e: React.MouseEvent, selected: boolean) => void;
3160
+ selected?: boolean;
3161
+ toggle?: boolean;
3162
+ }
3163
+ export interface SelectOptionGroup {
3164
+ name?: string;
3165
+ label?: string;
3166
+ icon?: IconDefinition;
3167
+ options: SelectOption[];
3168
+ meta?: object;
3169
+ }
3170
+ export interface BarTitleItem {
3171
+ key: string;
3172
+ type: 'title';
3173
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
3174
+ ai?: boolean;
3175
+ icon?: IconDefinition;
3176
+ text: string | React.ReactElement;
3177
+ tooltip?: string;
3178
+ tooltipPlacement?: TooltipProps['placement'];
3179
+ badge?: number | boolean;
3180
+ loading?: boolean;
3181
+ }
3182
+ export interface BarButtonItem {
3183
+ key: string;
3184
+ type: 'button';
3185
+ ai?: boolean;
3186
+ id?: string;
3187
+ className?: string;
3188
+ icon: IconDefinition | null | undefined;
3189
+ label?: string;
3190
+ tooltip?: string;
3191
+ tooltipPlacement?: TooltipProps['placement'];
3192
+ badge?: number | boolean;
3193
+ onClick?: (e: React.MouseEvent) => void;
3194
+ destructive?: boolean;
3195
+ disabled?: boolean;
3196
+ loading?: boolean;
3197
+ selected?: boolean;
3198
+ highlighted?: boolean;
3199
+ autoFocus?: boolean;
3200
+ }
3201
+ export interface BarToggleItem {
3202
+ key: string;
3203
+ type: 'toggle';
3204
+ icon: IconDefinition;
3205
+ tooltip?: string;
3206
+ tooltipPlacement?: TooltipProps['placement'];
3207
+ label?: string;
3208
+ badge?: number | boolean;
3209
+ onClick?: (e: React.MouseEvent) => void;
3210
+ onChange: (enabled: boolean) => void;
3211
+ disabled?: boolean;
3212
+ checked?: boolean;
3213
+ selected?: boolean;
3214
+ highlighted?: boolean;
3215
+ autoFocus?: boolean;
3216
+ error: ReactNode;
3217
+ }
3218
+ type BarDropdownItem = {
3219
+ key: string;
3220
+ className?: string;
3221
+ type: 'dropdown';
3222
+ ariaLabel?: string;
3223
+ icon?: IconDefinition;
3224
+ multi?: boolean;
3225
+ renderOption?: (option: SelectOption) => React.ReactNode;
3226
+ renderOptionLabel?: (option: SelectOption) => React.ReactNode;
3227
+ onChange?: (option: SelectOption) => void;
3228
+ badge?: number | boolean;
3229
+ disabled?: boolean;
3230
+ tooltip?: string;
3231
+ tooltipPlacement?: TooltipProps['placement'];
3232
+ dropdownProps?: DropdownProps;
3233
+ triggerLabel?: string | React.ReactNode;
3234
+ caret?: boolean;
3235
+ renderHeader?: () => React.ReactNode;
3236
+ } & ({
3237
+ options?: never;
3238
+ groupedOptions?: SelectOptionGroup[];
3239
+ renderOptionGroupHeader?: (optionGroup: SelectOptionGroup) => React.ReactNode;
3240
+ } | {
3241
+ options?: SelectOption[];
3242
+ groupedOptions?: never;
3243
+ renderOptionGroupHeader?: never;
3244
+ });
3245
+ export interface BarPopoverItem {
3246
+ key: string;
3247
+ type: 'popover';
3248
+ icon?: IconDefinition;
3249
+ ai?: boolean;
3250
+ label?: string;
3251
+ tooltip?: string;
3252
+ tooltipPlacement?: TooltipProps['placement'];
3253
+ badge?: number | boolean;
3254
+ onClick?: (e: React.MouseEvent) => void;
3255
+ className?: string;
3256
+ disabled?: boolean;
3257
+ open?: boolean;
3258
+ destructive?: boolean;
3259
+ selected?: boolean;
3260
+ highlighted?: boolean;
3261
+ autoFocus?: boolean;
3262
+ PopoverElement: React.ElementType;
3263
+ }
3264
+ export interface BarSeparatorItem {
3265
+ type: 'separator';
3266
+ }
3267
+ export type BarItem = BarTitleItem | BarButtonItem | BarToggleItem | BarDropdownItem | BarPopoverItem | BarSeparatorItem | false | undefined;
3268
+ export interface BarProps {
3269
+ as?: any;
3270
+ className?: string;
3271
+ compact?: boolean;
3272
+ leftItems?: BarItem[];
3273
+ items?: BarItem[];
3274
+ rightItems?: BarItem[];
3275
+ style?: React.CSSProperties;
3276
+ tooltipPlacement?: TooltipProps['placement'];
3277
+ popoverPlacement?: PopoverProps['placement'];
3278
+ }
3279
+ export function Bar(props: BarProps): React.JSX.Element;
3280
+ }
3281
+ declare module "editor/components/editors/pixie/PixieImageEditor" {
3282
+ import React from 'react';
3283
+ type ImageBlob = {
3284
+ lastModifiedDate?: Date;
3285
+ name?: string;
3286
+ } & Blob;
3287
+ export interface PixieImageEditorProps {
3288
+ imageUrl: string;
3289
+ toggleModal: () => void;
3290
+ onComplete: (blob: ImageBlob) => void;
3291
+ }
3292
+ const PixieImageEditor: (props: PixieImageEditorProps) => React.JSX.Element;
3293
+ export default PixieImageEditor;
3294
+ }
3295
+ declare module "editor/components/editors/ImageEditor" {
3296
+ import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
3297
+ export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
3298
+ value__simple: any;
3299
+ value: any;
3300
+ };
3301
+ export type ImageEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
3302
+ export function isDefaultImage(imageUrl: string | undefined, widgetParamsUrl?: string): boolean;
3303
+ }
3304
+ declare module "editor/components/common/Dropzone" {
3305
+ import React from 'react';
3306
+ import { DropzoneOptions } from 'react-dropzone';
3307
+ export interface DropzoneProps {
3308
+ children?: React.ReactNode;
3309
+ disabled?: boolean;
3310
+ isUploading?: boolean;
3311
+ maxSize?: number;
3312
+ options?: DropzoneOptions;
3313
+ uploadProgress?: number;
3314
+ imageUrl?: string;
3315
+ imageWidth?: number;
3316
+ imageHeight?: number;
3317
+ imageSize?: number;
3318
+ imageName?: string;
3319
+ isEditImageButtonDisabled?: boolean;
3320
+ onEditImageClick?: () => void;
3321
+ shouldRender?: {
3322
+ dropzone?: boolean;
3323
+ editImageButton?: boolean;
3324
+ imageInfo?: boolean;
3325
+ };
3326
+ }
3327
+ export function Dropzone(props: DropzoneProps): React.JSX.Element;
3328
+ }
3329
+ declare module "editor/components/common/ImageUploadErrorMessage" {
3330
+ import React from 'react';
3331
+ import { IntlShape } from 'react-intl';
3332
+ export interface ImageUploadErrorMessageProps {
3333
+ error: Error | boolean | null | undefined;
3334
+ maxSize?: number;
3335
+ onClick?: () => void;
3336
+ }
3337
+ export function getImageUploadErrorMessage(error: ImageUploadErrorMessageProps['error'], { maxSize, intl }: {
3338
+ maxSize: number;
3339
+ intl: IntlShape;
3340
+ }): any;
3341
+ export function ImageUploadErrorMessage(props: ImageUploadErrorMessageProps): React.JSX.Element;
3342
+ }
3343
+ declare module "editor/components/editors/ImageUploader" {
3344
+ import React, { RefObject } from 'react';
3345
+ import { DropEvent, FileRejection } from 'react-dropzone';
3346
+ import { ImageUploadButtonInstance, ImageUploadButtonProps } from "editor/components/common/ImageUploadButton";
3347
+ import { Location } from "state/types/types";
3348
+ export interface ImageUploaderProps {
3349
+ disabled?: boolean;
3350
+ shouldRender: {
3351
+ dropzone?: boolean;
3352
+ editImageButton?: boolean;
3353
+ /** @deprecated Use editImageButton instead */
3354
+ effects?: boolean;
3355
+ imageInfo?: boolean;
3356
+ moreImages?: boolean;
3357
+ stockImages?: boolean;
3358
+ uploadButton?: boolean;
3359
+ userUploads?: boolean;
3360
+ };
3361
+ label: string;
3362
+ optionName: string;
3363
+ location: Location;
3364
+ maxSize: number;
3365
+ intl: any;
3366
+ onDropAccepted: (files: File[]) => void;
3367
+ onDropRejected: (fileRejections: FileRejection[], event: DropEvent) => void;
3368
+ isUploading?: boolean;
3369
+ uploadProgress?: number;
3370
+ imageUrl?: string;
3371
+ imageWidth?: number;
3372
+ imageHeight?: number;
3373
+ imageSize?: number;
3374
+ togglePixieModal: () => void;
3375
+ imageExists?: boolean;
3376
+ error: boolean | Error | null;
3377
+ onImageSelect: ImageUploadButtonProps['onImageSelect'];
3378
+ onImageUpload: ImageUploadButtonProps['onImageUpload'];
3379
+ onUploadProgressChange: ImageUploadButtonProps['onUploadProgressChange'];
3380
+ onUploadStatusChange: ImageUploadButtonProps['onUploadStatusChange'];
3381
+ onErrorChange: (error: Error | null) => void;
3382
+ imageUploadButtonRef: RefObject<ImageUploadButtonInstance>;
3383
+ showError?: boolean;
3384
+ }
3385
+ export const ImageUploader: ({ disabled, shouldRender: _shouldRender, label, optionName, location, maxSize, intl, onDropAccepted, onDropRejected, isUploading, uploadProgress, imageUrl, imageWidth, imageHeight, imageSize, togglePixieModal, imageExists, error, onImageSelect, onImageUpload, onUploadProgressChange, onUploadStatusChange, onErrorChange, imageUploadButtonRef, showError, ...restProps }: ImageUploaderProps) => React.JSX.Element;
3386
+ }
3387
+ declare module "editor/components/editors/BackgroundImageEditor" {
3388
+ import { EditorPropsFromZodSchemas } from "engine/utils/zod/types";
3389
+ export const schemas: Record<"value" | "value__simple", import("state/types/types").JSONSchema>, zodSchemas: {
3390
+ value__simple: any;
3391
+ value: any;
3392
+ };
3393
+ export type BackgroundImageEditorProps = EditorPropsFromZodSchemas<typeof zodSchemas>;
3394
+ }
3395
+ declare module "engine/options/bodies" {
3396
+ import { BackgroundImageEditorProps } from "editor/components/editors/BackgroundImageEditor";
3397
+ export type BodyValues = {
3398
+ backgroundColor: string;
3399
+ backgroundImage: BackgroundImageEditorProps['value'];
3400
+ contentWidth: string;
3401
+ fontFamily: {
3402
+ label: string;
3403
+ value: string;
3404
+ };
3405
+ linkStyle: {
3406
+ body: boolean;
3407
+ linkColor: string;
3408
+ linkHoverColor: string;
3409
+ linkUnderline: boolean;
3410
+ linkHoverUnderline: boolean;
3411
+ };
3412
+ preheaderText: string;
3413
+ accessibilityTitle: string;
3414
+ };
3415
+ }
3416
+ declare module "engine/utils/stringifyFunction" {
3417
+ export function stringifyFunction(fn: Function): string;
3418
+ export function stringifyFunctionsFromObject(obj: object): {};
3419
+ }
3420
+ declare module "engine/utils/normalizeLinkTypes" {
3421
+ import { LinkType, LinkTypes, LinkTypesSharedConfig } from "state/types/types";
3422
+ export function normalizeLinkTypeSharedConfig(linkType: LinkTypesSharedConfig | null | undefined): LinkTypesSharedConfig & {
3423
+ attrs: {};
3424
+ };
3425
+ export function normalizeLinkType(linkType: LinkType): LinkTypesSharedConfig & {
3426
+ attrs: {};
3427
+ };
3428
+ export function normalizeLinkTypes(linkTypes: LinkTypes): (LinkTypesSharedConfig & {
3429
+ attrs: {};
3430
+ })[];
3431
+ }
3432
+ declare module "engine/utils/makeClassMethodsEnumerable" {
3433
+ export function makeClassMethodsEnumerable(instance: InstanceType<any>, ignoreList?: string[]): void;
3434
+ }
3435
+ declare module "embed/helpers" {
3436
+ export function convertReturnFunctionToDoneCallback<Fn extends (...args: [any]) => any>(fn: Fn): (info: Parameters<Fn>[0], done: Function) => void;
3437
+ }
3438
+ declare module "embed/Editor" {
3439
+ import { Frame } from "embed/Frame";
3440
+ import { Config, ExportFromApiResult, ExportHtmlOptions, ExportHtmlResult, ExportPlainTextResult, ExportImageFromApiOptions, ExportLiveHtmlOptions, ExportPdfFromApiOptions, ExportPlainTextOptions, ExportZipFromApiOptions, SaveDesignOptions, ExportLiveHtmlResult } from "embed/Config";
3441
+ import { AppearanceConfig, Audit, DesignMode, DesignTagsConfig, Device, DisplayConditions, DisplayMode, JSONTemplate, Language, LinkTypes, LinkTypesSharedConfig, MergeTags, MergeTagsConfig, SpecialLink, StyleGuideConfig, Tabs, Translations, User, Validator } from "state/types/types";
3442
+ import { BodyValues } from "engine/options/bodies";
3443
+ import { Locale, TextDirection } from "engine/config/intl";
3444
+ import { DeepPartial } from "editor/components/editors/types";
3445
+ import { ColorPicker } from "engine/config/features";
3446
+ export const LATEST_VERSION: string;
3447
+ export const STABLE_VERSION: string;
3448
+ export const ENV_VERSION: string;
3449
+ export class Editor {
3450
+ frame: Frame | null;
3451
+ constructor(config?: Config);
3452
+ init(config?: Config): void;
3453
+ destroy(): void;
3454
+ versions: {
3455
+ current: string | undefined;
3456
+ latest: string;
3457
+ stable: string;
3458
+ };
3459
+ get version(): string;
3460
+ loadEditor(config: Config): void;
3461
+ renderEditor(config: Config): void;
3462
+ initEditor(config: Config): void;
3463
+ registerColumns(cells: number[]): void;
3464
+ registerCallback(type: string, callback: Function): void;
3465
+ unregisterCallback(type: string): void;
3466
+ registerProvider(type: string, callback: Function): void;
3467
+ unregisterProvider(type: string): void;
3468
+ reloadProvider(type: string): void;
3469
+ addEventListener(type: string, callback: Function): void;
3470
+ removeEventListener(type: string): void;
3471
+ setDesignId(id: string | null): void;
3472
+ setDesignMode(designMode: DesignMode | null): void;
3473
+ setDisplayMode(displayMode: DisplayMode): void;
3474
+ loadProject(projectId: number): void;
3475
+ loadUser(user: User): void;
3476
+ loadTemplate(templateId: number): void;
3477
+ loadStockTemplate(stockTemplateId: string): void;
3478
+ setLinkTypes(linkTypes: LinkTypes): void;
3479
+ setLinkTypesSharedConfig(linkTypesSharedConfig: LinkTypesSharedConfig | null): void;
3480
+ setMergeTags(mergeTags: MergeTags): void;
3481
+ setSpecialLinks(specialLinks: SpecialLink[]): void;
3482
+ setDisplayConditions(displayConditions: DisplayConditions): void;
3483
+ setLocale(locale: Locale | null): void;
3484
+ setTextDirection(textDirection: TextDirection | null): void;
3485
+ setTranslations(translations: Translations): void;
3486
+ loadBlank(bodyValues?: object): void;
3487
+ loadDesign(design: JSONTemplate): void;
3488
+ saveDesign(callback: Function, options?: SaveDesignOptions): void;
3489
+ exportHtml(callback: (data: ExportHtmlResult) => void, options?: ExportHtmlOptions): void;
3490
+ exportLiveHtml(callback: (data: ExportLiveHtmlResult) => void, options?: ExportLiveHtmlOptions): void;
3491
+ exportPlainText(callback: (data: ExportPlainTextResult) => void, options?: ExportPlainTextOptions): void;
3492
+ exportImage(callback: (data: ExportFromApiResult) => void, options?: ExportImageFromApiOptions): void;
3493
+ exportPdf(callback: (data: ExportFromApiResult) => void, options?: ExportPdfFromApiOptions): void;
3494
+ exportZip(callback: (data: ExportFromApiResult) => void, options?: ExportZipFromApiOptions): void;
3495
+ setAppearance(appearance: DeepPartial<AppearanceConfig>): void;
3496
+ setTheme(theme: AppearanceConfig['theme']): void;
3497
+ setBodyValues(bodyValues: Partial<BodyValues>, bodyId?: number): void;
3498
+ setStyleGuide(styleGuide: StyleGuideConfig): void;
3499
+ setDesignTagsConfig(designTagsConfig: DesignTagsConfig): void;
3500
+ setMergeTagsConfig(mergeTagsConfig: MergeTagsConfig): void;
3501
+ showPreview(payload: {
3502
+ device?: Device;
3503
+ resolution?: number;
3504
+ }): void;
3505
+ hidePreview(): void;
3506
+ canUndo(callback: (result: boolean) => void): void;
3507
+ canRedo(callback: (result: boolean) => void): void;
3508
+ undo(): void;
3509
+ redo(): void;
3510
+ audit(callback: (data: {
3511
+ status: 'FAIL' | 'PASS';
3512
+ errors: Audit[];
3513
+ }) => void): void;
3514
+ setValidator(validator: Validator | null): void;
3515
+ setToolValidator(tool: string, validator: Validator | null): void;
3516
+ updateTabs(tabs: Tabs): void;
3517
+ clearValidators(): void;
3518
+ setCurrentLanguage(language: string): void;
3519
+ setLanguages(languages: Language[]): void;
3520
+ setColorPickerConfig(colorPickerConfig: ColorPicker): void;
3521
+ registerContainerExporter(): void;
3522
+ registerItemExporter(): void;
3523
+ registerTool(): void;
3524
+ registerPropertyEditor(): void;
3525
+ registerTab(): void;
3526
+ createPanel(): void;
3527
+ createViewer(): void;
3528
+ createWidget(): void;
3529
+ }
3530
+ }
3531
+ declare module "embed/index" {
3532
+ import { Editor } from "embed/Editor";
3533
+ import { Config } from "embed/Config";
3534
+ class Embed extends Editor {
3535
+ createEditor(config: Config): Editor;
3536
+ }
3537
+ const _default: Embed;
3538
+ export default _default;
3539
+ }