@maildeno/editor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +426 -0
  3. package/dist/RowPreviewLegacyComponent-CXsY4P-R.js +439 -0
  4. package/dist/RowPreviewLegacyComponent-osWbuByc.js +439 -0
  5. package/dist/RowPreviewRow-D-U1mV4v.js +107 -0
  6. package/dist/RowPreviewRow-MSc_unf3.js +107 -0
  7. package/dist/adapters/index.d.ts +7 -0
  8. package/dist/adapters/localStorageAdapter.d.ts +6 -0
  9. package/dist/adapters/types.d.ts +83 -0
  10. package/dist/baseStyles.d.ts +13 -0
  11. package/dist/blocks/canvasStyleHelpers.d.ts +17 -0
  12. package/dist/blocks/definitions/anchor.d.ts +2 -0
  13. package/dist/blocks/definitions/button.d.ts +2 -0
  14. package/dist/blocks/definitions/divider.d.ts +2 -0
  15. package/dist/blocks/definitions/heading.d.ts +2 -0
  16. package/dist/blocks/definitions/image.d.ts +2 -0
  17. package/dist/blocks/definitions/list.d.ts +2 -0
  18. package/dist/blocks/definitions/menu.d.ts +2 -0
  19. package/dist/blocks/definitions/paragraph.d.ts +2 -0
  20. package/dist/blocks/definitions/socials.d.ts +2 -0
  21. package/dist/blocks/definitions/spacer.d.ts +2 -0
  22. package/dist/blocks/definitions/video.d.ts +2 -0
  23. package/dist/blocks/index.d.ts +8 -0
  24. package/dist/blocks/registry.d.ts +23 -0
  25. package/dist/blocks/types.d.ts +73 -0
  26. package/dist/composables/emailBuilder/components/useComponentStyleEditor.d.ts +72 -0
  27. package/dist/composables/emailBuilder/components/useProductRowActions.d.ts +3 -0
  28. package/dist/composables/emailBuilder/components/useProductRows.d.ts +59 -0
  29. package/dist/composables/emailBuilder/core/config/componentConfig.d.ts +29 -0
  30. package/dist/composables/emailBuilder/core/link-tags/useLinkTagInsert.d.ts +13 -0
  31. package/dist/composables/emailBuilder/core/merge-tags/mergeTagDefinitions.d.ts +64 -0
  32. package/dist/composables/emailBuilder/core/merge-tags/resolveMergeTags.d.ts +27 -0
  33. package/dist/composables/emailBuilder/core/ui/useLayerHoverScroll.d.ts +20 -0
  34. package/dist/composables/emailBuilder/core/ui/useLayoutDrag.d.ts +85 -0
  35. package/dist/composables/emailBuilder/core/ui/useRichTextEditors.d.ts +6 -0
  36. package/dist/composables/emailBuilder/core/ui/visibilityBadgeHelpers.d.ts +22 -0
  37. package/dist/composables/emailBuilder/core/useEmailBuilder.d.ts +274 -0
  38. package/dist/composables/emailBuilder/core/useEmailBuilderDefault.d.ts +507 -0
  39. package/dist/composables/emailBuilder/core/useEmailBuilderOperations.d.ts +31 -0
  40. package/dist/composables/emailBuilder/core/useEmailBuilderVisibility.d.ts +31 -0
  41. package/dist/composables/emailBuilder/export/actions/download.d.ts +24 -0
  42. package/dist/composables/emailBuilder/export/generators/html.d.ts +3 -0
  43. package/dist/composables/emailBuilder/export/generators/mjml.d.ts +6 -0
  44. package/dist/composables/emailBuilder/export/generators/react-email.d.ts +61 -0
  45. package/dist/composables/emailBuilder/export/helpers/generatorHelpers.d.ts +53 -0
  46. package/dist/composables/emailBuilder/export/logic/espLogicWrapper.d.ts +76 -0
  47. package/dist/composables/emailBuilder/export/logic/reactLogicWrapper.d.ts +31 -0
  48. package/dist/composables/emailBuilder/export/merge-tags/mergeTagMapper.d.ts +42 -0
  49. package/dist/composables/emailBuilder/export/merge-tags/reactMergeTagMapper.d.ts +26 -0
  50. package/dist/composables/emailBuilder/export/shared/containers.d.ts +18 -0
  51. package/dist/composables/emailBuilder/export/shared/styles.d.ts +12 -0
  52. package/dist/composables/emailBuilder/export/shared/tagIdentifier.d.ts +1 -0
  53. package/dist/composables/emailBuilder/export/targets/htmlExport.d.ts +20 -0
  54. package/dist/composables/emailBuilder/export/targets/jsonExport.d.ts +28 -0
  55. package/dist/composables/emailBuilder/export/targets/mjmlExport.d.ts +19 -0
  56. package/dist/composables/emailBuilder/export/targets/reactEmailExport.d.ts +20 -0
  57. package/dist/composables/emailBuilder/export/transformers/espWrapper.d.ts +2 -0
  58. package/dist/composables/emailBuilder/export/transformers/formatting.d.ts +3 -0
  59. package/dist/composables/emailBuilder/export/transformers/minify.d.ts +33 -0
  60. package/dist/composables/emailBuilder/export/transformers/tagMapper.d.ts +29 -0
  61. package/dist/composables/emailBuilder/export/types/export.d.ts +24 -0
  62. package/dist/composables/emailBuilder/export/useEmailExportEngine.d.ts +63 -0
  63. package/dist/composables/emailBuilder/export/useEmailExportMobileStyles.d.ts +3 -0
  64. package/dist/composables/emailBuilder/export/useExportSettings.d.ts +5 -0
  65. package/dist/composables/emailBuilder/health/accessibilityChecker.d.ts +64 -0
  66. package/dist/composables/emailBuilder/health/healthIndicator.d.ts +19 -0
  67. package/dist/composables/emailBuilder/history/useEmailBuilderHistory.d.ts +26 -0
  68. package/dist/composables/emailBuilder/history/useHistory.d.ts +16 -0
  69. package/dist/composables/emailBuilder/persistence/useEmailBuilderPersistence.d.ts +38 -0
  70. package/dist/composables/emailBuilder/preview/useClientPreview.d.ts +127 -0
  71. package/dist/composables/emailBuilder/transform/pipeline/hydrate.d.ts +54 -0
  72. package/dist/composables/emailBuilder/transform/pipeline/optimize.d.ts +101 -0
  73. package/dist/composables/emailBuilder/transform/pipeline/optimizeAI.d.ts +125 -0
  74. package/dist/composables/emailBuilder/types/emailBuilder.d.ts +79 -0
  75. package/dist/composables/system/useColor.d.ts +26 -0
  76. package/dist/composables/system/useDeviceDetection.d.ts +5 -0
  77. package/dist/composables/system/useGoogleFonts.d.ts +11 -0
  78. package/dist/composables/system/useImageUpload.d.ts +23 -0
  79. package/dist/composables/system/useSavedRowsPanel.d.ts +35 -0
  80. package/dist/composables/ui/useConfirm.d.ts +33 -0
  81. package/dist/composables/ui/useInfoDialog.d.ts +22 -0
  82. package/dist/composables/ui/useTeleportTarget.d.ts +49 -0
  83. package/dist/composables/ui/useToast.d.ts +32 -0
  84. package/dist/devStyleMirror.d.ts +20 -0
  85. package/dist/documentScopedStyles.d.ts +39 -0
  86. package/dist/editor.css +2411 -0
  87. package/dist/element-DN22fZmQ.js +72000 -0
  88. package/dist/element-scoped-styles.css +2411 -0
  89. package/dist/element.d.ts +6 -0
  90. package/dist/element.js +2 -0
  91. package/dist/esp/registry.d.ts +33 -0
  92. package/dist/estree-C12ASyI-.js +7993 -0
  93. package/dist/html-DGrfikay.js +7353 -0
  94. package/dist/index.d.ts +12 -0
  95. package/dist/index.js +71955 -0
  96. package/dist/init.d.ts +85 -0
  97. package/dist/init.js +130 -0
  98. package/dist/lightDom.d.ts +30 -0
  99. package/dist/merge-tags/registry.d.ts +33 -0
  100. package/dist/shadowStyles.d.ts +8 -0
  101. package/dist/standalone-Bd2oQFm3.js +3639 -0
  102. package/dist/theme.d.ts +132 -0
  103. package/dist/typescript-D-z2dDu9.js +23190 -0
  104. package/dist/utils/generateId.d.ts +1 -0
  105. package/dist/utils/shadowDom.d.ts +30 -0
  106. package/dist/vue.runtime.esm-bundler-DwQEK7WO.js +9028 -0
  107. package/package.json +99 -0
@@ -0,0 +1,507 @@
1
+ export declare const useEmailBuilderDefaults: () => {
2
+ defaultProps: {
3
+ paragraph: {
4
+ visibility: import('./config/componentConfig').VisibilityConfig;
5
+ desktopHide: boolean;
6
+ mobileHide: boolean;
7
+ content: string;
8
+ fontSize: number;
9
+ lineHeight: number;
10
+ color: string;
11
+ fontWeight: string;
12
+ fontFamily: string;
13
+ fontStyle: string;
14
+ letterSpacing: number;
15
+ backgroundColor: string;
16
+ backgroundGradient: {
17
+ useGradient: boolean;
18
+ solid: string;
19
+ gradient: {
20
+ type: "linear";
21
+ direction: string;
22
+ colors: {
23
+ color: string;
24
+ position: number;
25
+ }[];
26
+ };
27
+ };
28
+ margin: {
29
+ top: number;
30
+ right: number;
31
+ bottom: number;
32
+ left: number;
33
+ };
34
+ padding: {
35
+ top: number;
36
+ right: number;
37
+ bottom: number;
38
+ left: number;
39
+ };
40
+ textTransform: string;
41
+ textDecoration: string;
42
+ align: string;
43
+ mobile: {
44
+ fontSize: null;
45
+ lineHeight: null;
46
+ color: null;
47
+ fontWeight: null;
48
+ fontFamily: null;
49
+ fontStyle: null;
50
+ letterSpacing: null;
51
+ backgroundColor: null;
52
+ backgroundGradient: null;
53
+ textTransform: null;
54
+ textDecoration: null;
55
+ align: null;
56
+ margin: null;
57
+ padding: null;
58
+ };
59
+ };
60
+ heading: {
61
+ visibility: import('./config/componentConfig').VisibilityConfig;
62
+ desktopHide: boolean;
63
+ mobileHide: boolean;
64
+ content: string;
65
+ level: string;
66
+ fontSize: number;
67
+ lineHeight: number;
68
+ color: string;
69
+ fontWeight: string;
70
+ fontFamily: string;
71
+ letterSpacing: number;
72
+ backgroundColor: string;
73
+ backgroundGradient: {
74
+ useGradient: boolean;
75
+ solid: string;
76
+ gradient: {
77
+ type: "linear";
78
+ direction: string;
79
+ colors: {
80
+ color: string;
81
+ position: number;
82
+ }[];
83
+ };
84
+ };
85
+ margin: {
86
+ top: number;
87
+ right: number;
88
+ bottom: number;
89
+ left: number;
90
+ };
91
+ padding: {
92
+ top: number;
93
+ right: number;
94
+ bottom: number;
95
+ left: number;
96
+ };
97
+ textTransform: string;
98
+ textDecoration: string;
99
+ align: string;
100
+ mobile: {
101
+ fontSize: null;
102
+ lineHeight: null;
103
+ color: null;
104
+ fontWeight: null;
105
+ fontFamily: null;
106
+ letterSpacing: null;
107
+ backgroundColor: null;
108
+ backgroundGradient: null;
109
+ textTransform: null;
110
+ textDecoration: null;
111
+ align: null;
112
+ margin: null;
113
+ padding: null;
114
+ };
115
+ };
116
+ image: {
117
+ visibility: import('./config/componentConfig').VisibilityConfig;
118
+ desktopHide: boolean;
119
+ mobileHide: boolean;
120
+ src: string;
121
+ alt: string;
122
+ width: number;
123
+ height: string;
124
+ align: string;
125
+ link: string;
126
+ enabled: boolean;
127
+ margin: {
128
+ top: number;
129
+ right: number;
130
+ bottom: number;
131
+ left: number;
132
+ };
133
+ padding: {
134
+ top: number;
135
+ right: number;
136
+ bottom: number;
137
+ left: number;
138
+ };
139
+ borderRadius: number;
140
+ border: {
141
+ width: number;
142
+ color: string;
143
+ style: string;
144
+ };
145
+ mobile: {
146
+ width: null;
147
+ height: null;
148
+ align: null;
149
+ margin: null;
150
+ padding: null;
151
+ borderRadius: null;
152
+ border: null;
153
+ };
154
+ };
155
+ video: {
156
+ visibility: import('./config/componentConfig').VisibilityConfig;
157
+ desktopHide: boolean;
158
+ mobileHide: boolean;
159
+ fallbackLink: string;
160
+ src: string;
161
+ coverImage: string;
162
+ alt: string;
163
+ width: number;
164
+ height: string;
165
+ align: string;
166
+ margin: {
167
+ top: number;
168
+ right: number;
169
+ bottom: number;
170
+ left: number;
171
+ };
172
+ padding: {
173
+ top: number;
174
+ right: number;
175
+ bottom: number;
176
+ left: number;
177
+ };
178
+ borderRadius: number;
179
+ border: {
180
+ width: number;
181
+ color: string;
182
+ style: string;
183
+ };
184
+ mobile: {
185
+ width: null;
186
+ height: null;
187
+ align: null;
188
+ margin: null;
189
+ padding: null;
190
+ borderRadius: null;
191
+ border: null;
192
+ };
193
+ };
194
+ list: {
195
+ visibility: import('./config/componentConfig').VisibilityConfig;
196
+ desktopHide: boolean;
197
+ mobileHide: boolean;
198
+ content: string;
199
+ fontSize: number;
200
+ lineHeight: number;
201
+ fontFamily: string;
202
+ letterSpacing: number;
203
+ color: string;
204
+ backgroundColor: string;
205
+ backgroundGradient: {
206
+ useGradient: boolean;
207
+ solid: string;
208
+ gradient: {
209
+ type: "linear";
210
+ direction: string;
211
+ colors: {
212
+ color: string;
213
+ position: number;
214
+ }[];
215
+ };
216
+ };
217
+ margin: {
218
+ top: number;
219
+ right: number;
220
+ bottom: number;
221
+ left: number;
222
+ };
223
+ padding: {
224
+ top: number;
225
+ right: number;
226
+ bottom: number;
227
+ left: number;
228
+ };
229
+ itemSpacing: number;
230
+ mobile: {
231
+ fontSize: null;
232
+ lineHeight: null;
233
+ fontFamily: null;
234
+ letterSpacing: null;
235
+ color: null;
236
+ backgroundColor: null;
237
+ backgroundGradient: null;
238
+ margin: null;
239
+ padding: null;
240
+ itemSpacing: null;
241
+ };
242
+ };
243
+ button: {
244
+ visibility: import('./config/componentConfig').VisibilityConfig;
245
+ desktopHide: boolean;
246
+ mobileHide: boolean;
247
+ text: string;
248
+ link: string;
249
+ backgroundColor: string;
250
+ backgroundGradient: {
251
+ useGradient: boolean;
252
+ solid: string;
253
+ gradient: {
254
+ type: "linear";
255
+ direction: string;
256
+ colors: {
257
+ color: string;
258
+ position: number;
259
+ }[];
260
+ };
261
+ };
262
+ color: string;
263
+ fontSize: number;
264
+ fontWeight: string;
265
+ fontFamily: string;
266
+ letterSpacing: number;
267
+ margin: {
268
+ top: number;
269
+ right: number;
270
+ bottom: number;
271
+ left: number;
272
+ };
273
+ padding: {
274
+ top: number;
275
+ right: number;
276
+ bottom: number;
277
+ left: number;
278
+ };
279
+ borderRadius: number;
280
+ border: {
281
+ width: number;
282
+ color: string;
283
+ style: string;
284
+ };
285
+ align: string;
286
+ icon: string;
287
+ iconAlt: string;
288
+ iconPosition: string;
289
+ iconSize: number;
290
+ iconGap: number;
291
+ mobile: {
292
+ fontSize: null;
293
+ fontWeight: null;
294
+ fontFamily: null;
295
+ letterSpacing: null;
296
+ backgroundColor: null;
297
+ backgroundGradient: null;
298
+ color: null;
299
+ padding: null;
300
+ margin: null;
301
+ borderRadius: null;
302
+ border: null;
303
+ align: null;
304
+ };
305
+ };
306
+ anchor: {
307
+ visibility: import('./config/componentConfig').VisibilityConfig;
308
+ desktopHide: boolean;
309
+ mobileHide: boolean;
310
+ text: string;
311
+ link: string;
312
+ color: string;
313
+ fontSize: number;
314
+ fontWeight: string;
315
+ fontFamily: string;
316
+ letterSpacing: number;
317
+ textDecoration: string;
318
+ margin: {
319
+ top: number;
320
+ right: number;
321
+ bottom: number;
322
+ left: number;
323
+ };
324
+ padding: {
325
+ top: number;
326
+ right: number;
327
+ bottom: number;
328
+ left: number;
329
+ };
330
+ align: string;
331
+ mobile: {
332
+ fontSize: null;
333
+ fontWeight: null;
334
+ fontFamily: null;
335
+ letterSpacing: null;
336
+ color: null;
337
+ textDecoration: null;
338
+ margin: null;
339
+ padding: null;
340
+ align: null;
341
+ };
342
+ };
343
+ divider: {
344
+ visibility: import('./config/componentConfig').VisibilityConfig;
345
+ desktopHide: boolean;
346
+ mobileHide: boolean;
347
+ backgroundColor: string;
348
+ backgroundGradient: {
349
+ useGradient: boolean;
350
+ solid: string;
351
+ gradient: {
352
+ type: "linear";
353
+ direction: string;
354
+ colors: {
355
+ color: string;
356
+ position: number;
357
+ }[];
358
+ };
359
+ };
360
+ height: number;
361
+ width: number;
362
+ margin: {
363
+ top: number;
364
+ right: number;
365
+ bottom: number;
366
+ left: number;
367
+ };
368
+ padding: {
369
+ top: number;
370
+ right: number;
371
+ bottom: number;
372
+ left: number;
373
+ };
374
+ align: string;
375
+ mobile: {
376
+ backgroundColor: null;
377
+ backgroundGradient: null;
378
+ height: null;
379
+ width: null;
380
+ margin: null;
381
+ padding: null;
382
+ align: null;
383
+ };
384
+ };
385
+ spacer: {
386
+ visibility: import('./config/componentConfig').VisibilityConfig;
387
+ desktopHide: boolean;
388
+ mobileHide: boolean;
389
+ height: number;
390
+ backgroundColor: string;
391
+ backgroundGradient: {
392
+ useGradient: boolean;
393
+ solid: string;
394
+ gradient: {
395
+ type: "linear";
396
+ direction: string;
397
+ colors: {
398
+ color: string;
399
+ position: number;
400
+ }[];
401
+ };
402
+ };
403
+ mobile: {
404
+ height: null;
405
+ backgroundColor: null;
406
+ backgroundGradient: null;
407
+ };
408
+ };
409
+ menu: {
410
+ visibility: import('./config/componentConfig').VisibilityConfig;
411
+ desktopHide: boolean;
412
+ mobileHide: boolean;
413
+ items: {
414
+ label: string;
415
+ link: string;
416
+ enabled: boolean;
417
+ }[];
418
+ fontSize: number;
419
+ lineHeight: number;
420
+ fontWeight: string;
421
+ fontFamily: string;
422
+ fontStyle: string;
423
+ letterSpacing: number;
424
+ color: string;
425
+ textTransform: string;
426
+ textDecoration: string;
427
+ backgroundColor: string;
428
+ backgroundGradient: {
429
+ useGradient: boolean;
430
+ solid: string;
431
+ gradient: {
432
+ type: "linear";
433
+ direction: string;
434
+ colors: {
435
+ color: string;
436
+ position: number;
437
+ }[];
438
+ };
439
+ };
440
+ spacing: number;
441
+ align: string;
442
+ margin: {
443
+ top: number;
444
+ right: number;
445
+ bottom: number;
446
+ left: number;
447
+ };
448
+ padding: {
449
+ top: number;
450
+ right: number;
451
+ bottom: number;
452
+ left: number;
453
+ };
454
+ mobileStack: boolean;
455
+ mobile: {
456
+ fontSize: null;
457
+ lineHeight: null;
458
+ fontWeight: null;
459
+ fontFamily: null;
460
+ fontStyle: null;
461
+ letterSpacing: null;
462
+ color: null;
463
+ textTransform: null;
464
+ textDecoration: null;
465
+ backgroundColor: null;
466
+ backgroundGradient: null;
467
+ spacing: null;
468
+ align: null;
469
+ margin: null;
470
+ padding: null;
471
+ };
472
+ };
473
+ socials: {
474
+ visibility: import('./config/componentConfig').VisibilityConfig;
475
+ desktopHide: boolean;
476
+ mobileHide: boolean;
477
+ platforms: {
478
+ name: string;
479
+ link: string;
480
+ enabled: boolean;
481
+ icon: string;
482
+ }[];
483
+ iconSize: number;
484
+ spacing: number;
485
+ align: string;
486
+ margin: {
487
+ top: number;
488
+ right: number;
489
+ bottom: number;
490
+ left: number;
491
+ };
492
+ padding: {
493
+ top: number;
494
+ right: number;
495
+ bottom: number;
496
+ left: number;
497
+ };
498
+ mobile: {
499
+ iconSize: null;
500
+ spacing: null;
501
+ align: null;
502
+ margin: null;
503
+ padding: null;
504
+ };
505
+ };
506
+ };
507
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Converts a human-readable label to a snake_case name.
3
+ * e.g. "Hero Home Section" → "hero_home_section"
4
+ */
5
+ export declare const toRowName: (label: string) => string;
6
+ /**
7
+ * Converts a snake_case row name to a human-readable display name.
8
+ * e.g. "hero_home_section" → "Hero Home Section"
9
+ */
10
+ export declare const displayName: (name: string) => string;
11
+ export declare const useEmailBuilderOperations: (rows: any, selectedId: any, defaultProps: any, saveToHistoryFn: (action: string) => void, saveToHistoryDebouncedFn?: (action: string) => void) => {
12
+ addRow: (layout: number | number[], silent?: boolean) => void;
13
+ addNestedRow: (parentRowId: any, columnId: string, layout: number | number[], insertIndex?: number) => void;
14
+ findRow: (id: any) => any;
15
+ deleteRow: (id: any) => void;
16
+ moveRow: (rowId: any, direction: "up" | "down") => void;
17
+ moveNestedRow: (rowId: any, targetRowId: any, targetColumnId: string | null, targetIndex: number) => void;
18
+ reorderRows: (fromIndex: any, toIndex: any, silent?: boolean) => void;
19
+ addSpacer: (silent?: boolean) => void;
20
+ duplicateRow: (rowId: any) => void;
21
+ duplicateRowSpacer: (spacerId: any) => void;
22
+ addComponent: (rowId: any, columnId: string, type: string) => void;
23
+ addComponentAtIndex: (rowId: any, columnId: string, type: string, index: any) => void;
24
+ deleteComponent: (id: any) => void;
25
+ moveComponent: (componentId: any, direction: "up" | "down") => void;
26
+ moveComponentBetweenColumns: (componentId: any, targetRowId: any, targetColumnId: string, targetIndex: any) => void;
27
+ findComponent: (id: any) => any;
28
+ updateComponent: (id: any, props: any) => void;
29
+ duplicateComponent: (componentId: any) => void;
30
+ rebuildIdRegistry: () => void;
31
+ };
@@ -0,0 +1,31 @@
1
+ export type VisibilityOperator = "==" | "!=" | "contains" | "not_contains" | "starts_with" | "ends_with" | "in" | "not_in" | ">" | "<" | ">=" | "<=" | "is_empty" | "is_not_empty" | "date_before" | "date_after" | "date_on";
2
+ export type VisibilityRule = {
3
+ tag: string;
4
+ operator: VisibilityOperator;
5
+ value: string;
6
+ };
7
+ export type VisibilityGroup = {
8
+ match: "all" | "any";
9
+ rules: VisibilityRule[];
10
+ };
11
+ export type VisibilityConfig = {
12
+ enabled: boolean;
13
+ match: "all" | "any";
14
+ rules: VisibilityRule[];
15
+ groups?: VisibilityGroup[];
16
+ };
17
+ export declare const VALUELESS_OPERATORS: VisibilityOperator[];
18
+ export declare const LIST_OPERATORS: VisibilityOperator[];
19
+ export declare const NUMERIC_OPERATORS: VisibilityOperator[];
20
+ export declare const DATE_OPERATORS: VisibilityOperator[];
21
+ export declare const OPERATOR_OPTIONS: {
22
+ label: string;
23
+ value: VisibilityOperator;
24
+ }[];
25
+ export declare const evaluateRule: (rule: VisibilityRule, context: Record<string, string>) => boolean;
26
+ export declare const evaluateGroup: (group: VisibilityGroup, context: Record<string, string>) => boolean;
27
+ export declare const useEmailBuilderVisibility: () => {
28
+ evaluateVisibility: (visibility: VisibilityConfig | undefined, context: Record<string, string>) => boolean;
29
+ evaluateRule: (rule: VisibilityRule, context: Record<string, string>) => boolean;
30
+ evaluateGroup: (group: VisibilityGroup, context: Record<string, string>) => boolean;
31
+ };
@@ -0,0 +1,24 @@
1
+ export type DownloadMimeType = "text/html" | "text/plain" | "application/json";
2
+ interface DownloadOptions {
3
+ content: string;
4
+ filename: string;
5
+ mimeType: DownloadMimeType;
6
+ }
7
+ /**
8
+ * Triggers a browser file download with the given content.
9
+ * Uses a short-lived object URL which is immediately revoked after the
10
+ * anchor click to avoid memory leaks.
11
+ */
12
+ export declare const downloadFile: ({ content, filename, mimeType, }: DownloadOptions) => void;
13
+ /**
14
+ * Derives a safe kebab-case filename stem from a template name.
15
+ * e.g. "My Template Name" → "my-template-name"
16
+ */
17
+ export declare const toFileStem: (templateName: string) => string;
18
+ /**
19
+ * Appends the export mode suffix to a filename stem.
20
+ * "wrap" mode files are "master" templates for the ESP;
21
+ * "prune" mode files are "snapshot" outputs for a specific audience.
22
+ */
23
+ export declare const withModeSuffix: (stem: string, mode: "prune" | "wrap") => string;
24
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const htmlGenerator: () => {
2
+ generateHTMLComponent: (comp: any) => string;
3
+ };
@@ -0,0 +1,6 @@
1
+ export declare const mjmlGenerator: () => {
2
+ generateMJMLComponent: (comp: any) => string;
3
+ assembleMJML: (templateName: string, rowsMjml: string, canvasStyles: any, googleFontUrl: string, mobileOverridesCss: string, mobileBreakpoint?: number, backgroundStylesCss?: string) => string;
4
+ resolveSolidColor: (bgGradient: any, bgColorFallback: string) => string;
5
+ padAttr: (padding?: any) => string;
6
+ };
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Normalize self-closing `<br>` to `<br />` for JSX compatibility.
3
+ * Handles: <br>, <br/>, <br /> → all become <br />
4
+ */
5
+ export declare const normalizeBrTags: (html: string) => string;
6
+ /**
7
+ * Normalize font-family CSS values by stripping wrapping single quotes
8
+ * from individual font names.
9
+ *
10
+ * Examples:
11
+ * "'Roboto', Arial" → "Roboto, Arial"
12
+ * "'Open Sans', 'Helvetica'" → "Open Sans, Helvetica"
13
+ * "Arial, sans-serif" → "Arial, sans-serif" (unchanged)
14
+ *
15
+ * The pattern targets a single quote that either:
16
+ * - immediately follows a colon+optional-space (start of value), OR
17
+ * - immediately follows a comma+optional-space (subsequent font name)
18
+ * - immediately precedes a comma, OR
19
+ * - is the last character before the end of the string / semicolon
20
+ */
21
+ export declare const normalizeFontFamily: (value: string) => string;
22
+ /**
23
+ * Apply all normalizations to a raw CSS string or inline style value.
24
+ * Call this on any style attribute value before writing it to JSX output.
25
+ *
26
+ * Currently applies:
27
+ * - normalizeFontFamily (strips wrapping quotes from font-family tokens)
28
+ *
29
+ * Note: normalizeBrTags is applied on the final HTML string, not per-style.
30
+ */
31
+ export declare const normalizeStyleValue: (style: string) => string;
32
+ /**
33
+ * Normalize all HTML inline `style="..."` attributes inside a rich-text HTML
34
+ * string to JSX `style={{ ... }}` object syntax.
35
+ *
36
+ * This is required because content from the rich-text editor is emitted with
37
+ * plain HTML style strings (e.g. `<span style="color: rgb(87, 84, 78);">`),
38
+ * which are invalid in JSX. This normalizer rewrites every such attribute to
39
+ * the React object form (e.g. `<span style={{ color: "rgb(87, 84, 78)" }}`).
40
+ *
41
+ * Additionally applies:
42
+ * - normalizeBrTags — <br> → <br />
43
+ * - normalizeAttributesToReact — converts React-incompatible attributes
44
+ * - normalizeStyleValue per declaration (font-family quote stripping, etc.)
45
+ *
46
+ * Safe to call on strings that have already been br-normalized or that contain
47
+ * no inline style attributes — both cases are handled without mutation.
48
+ *
49
+ * @param html Raw HTML string from the rich-text editor
50
+ * @returns HTML string with all style attributes rewritten for JSX
51
+ *
52
+ * @example
53
+ * normalizeInlineStylesToReact(
54
+ * '<span style="color: rgb(87, 84, 78); font-size: 14px;">Hello</span>'
55
+ * )
56
+ * // → '<span style={{ color: "rgb(87, 84, 78)", fontSize: "14px" }}>Hello</span>'
57
+ */
58
+ export declare const normalizeInlineStylesToReact: (html: string) => string;
59
+ export declare const reactEmailGenerator: () => {
60
+ generateReactEmailComponent: (comp: any) => string;
61
+ };