@emailmaker/emailmaker 1.0.116 → 1.0.117-alpha.1
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.
- package/README.md +275 -109
- package/asset-manifest.json +27 -27
- package/emailmaker-esm.js +1 -1
- package/emailmaker.d.ts +235 -38
- package/emailmaker.js +1 -1
- package/iframe/429.js +1 -1
- package/iframe/766.js +1 -1
- package/iframe/iframe-eblock.3b8240bd8d75c6ee2a77.html +1 -0
- package/iframe/iframe.3b8240bd8d75c6ee2a77.html +1 -0
- package/iframe/index.html +1 -1
- package/iframe/js/525.7e478fc1.js +1 -0
- package/iframe/js/667.4d0450c5.js +1 -0
- package/iframe/js/882.46943f9a.js +1 -0
- package/iframe/sandbox-eblock.js +1 -1
- package/package.json +1 -1
- package/static/css/{369.d740f134.chunk.css → 5072.f959228f.chunk.css} +2 -2
- package/static/css/{main.8c8bed31.css → main.f5e75ca4.css} +2 -2
- package/static/js/{1902.9e9ca2af.js → 1902.fa7e9fe6.js} +3 -3
- package/static/js/{2854.10396f08.js → 2854.95e1c8d0.js} +2 -2
- package/static/js/5072.e5ce1614.js +3 -0
- package/static/js/598.61e6a78a.js +2 -0
- package/static/js/8430.12bfa59b.js +2 -0
- package/static/js/{8580.4f3e7c56.js → 8580.47fa4f83.js} +2 -2
- package/static/js/{8727.97602af2.js → 8727.ef480f4b.js} +2 -2
- package/static/js/{emailmaker_core.d07551cd.js → emailmaker_core.1f145e15.js} +2 -2
- package/iframe/iframe-eblock.612f5e3292f38c64ed91.html +0 -1
- package/iframe/iframe.612f5e3292f38c64ed91.html +0 -1
- package/iframe/js/525.5461ecf3.js +0 -1
- package/iframe/js/667.25c21b63.js +0 -1
- package/iframe/js/882.de4b06e1.js +0 -1
- package/static/js/369.05739401.js +0 -3
- package/static/js/5215.a9897c36.js +0 -2
- package/static/js/6438.78acfa4a.js +0 -2
- /package/iframe/js/{525.5461ecf3.js.LICENSE.txt → 525.7e478fc1.js.LICENSE.txt} +0 -0
- /package/iframe/js/{667.25c21b63.js.LICENSE.txt → 667.4d0450c5.js.LICENSE.txt} +0 -0
- /package/iframe/js/{882.de4b06e1.js.LICENSE.txt → 882.46943f9a.js.LICENSE.txt} +0 -0
- /package/static/js/{1902.9e9ca2af.js.LICENSE.txt → 1902.fa7e9fe6.js.LICENSE.txt} +0 -0
- /package/static/js/{369.05739401.js.LICENSE.txt → 5072.e5ce1614.js.LICENSE.txt} +0 -0
package/emailmaker.d.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import * as FileManager from './fileManager';
|
|
2
2
|
|
|
3
3
|
export { FileManager };
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* **`@emailmaker/emailmaker`** — public typings for bundler plugin integration (`init`, `Options`, `Instance`).
|
|
7
|
+
*
|
|
8
|
+
* **`ExportedApi`**: repeating `export declare namespace ExportedApi` blocks merge. The effective
|
|
9
|
+
* **`ExportedApi.Options`** and **`ExportedApi.Instance`** types come from merging every **`interface Options` /
|
|
10
|
+
* `interface Instance`** declaration in those blocks below.
|
|
11
|
+
*/
|
|
12
|
+
|
|
4
13
|
export type MayBePromise<T> = T | Promise<T>;
|
|
5
14
|
export type PromiseWrap<T> = Promise<Awaited<T>>;
|
|
6
15
|
export type RecursivePartial<T> = {
|
|
7
16
|
[K in keyof T]?: T[K] extends number | string | boolean | bigint ? T[K] : RecursivePartial<T[K]>;
|
|
8
17
|
};
|
|
9
18
|
export type AppListener<Value, Result = void> = (value: Value) => MayBePromise<Result>;
|
|
19
|
+
/** Subscribe helper used for `handle*` APIs: call with a listener → returns unsubscribe `() => void`. */
|
|
10
20
|
export type AppEvent<Listener extends AppListener<any, any>> = (
|
|
11
21
|
listener: Listener,
|
|
12
22
|
priority?: number,
|
|
@@ -50,11 +60,126 @@ export type RemoveEvent<T> = AppEvent<RemoveListener<T>>;
|
|
|
50
60
|
export type CreateListener<T> = AppListener<CreateEventPayload<T>, T | undefined | void>;
|
|
51
61
|
export type CreateEvent<T> = AppEvent<CreateListener<T>>;
|
|
52
62
|
|
|
63
|
+
/** Result of AMP-aware parsing (`parseAMP`): regular HTML preview vs AMP MIME document. */
|
|
53
64
|
export interface ParsedAMP {
|
|
65
|
+
/** Original or normalized markup string (depending on caller). */
|
|
54
66
|
code: string;
|
|
67
|
+
/** Plain HTML usable outside strict AMP tooling. */
|
|
55
68
|
html: string;
|
|
69
|
+
/** AMP HTML document fragment/content for AMP-compliant mailers. */
|
|
56
70
|
ampHtml: string;
|
|
57
71
|
}
|
|
72
|
+
|
|
73
|
+
/** Single border side (`width` / `style` / `color`). */
|
|
74
|
+
export interface CommonStylesBorderSide {
|
|
75
|
+
width?: number | null;
|
|
76
|
+
style?: string | null;
|
|
77
|
+
color?: string | null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Border preset used by buttons, cards, etc. */
|
|
81
|
+
export interface CommonStylesBorder {
|
|
82
|
+
all?: CommonStylesBorderSide | null;
|
|
83
|
+
top?: CommonStylesBorderSide | null;
|
|
84
|
+
right?: CommonStylesBorderSide | null;
|
|
85
|
+
bottom?: CommonStylesBorderSide | null;
|
|
86
|
+
left?: CommonStylesBorderSide | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface CommonStylesBorderRadius {
|
|
90
|
+
all?: number | null;
|
|
91
|
+
topLeft?: number | null;
|
|
92
|
+
topRight?: number | null;
|
|
93
|
+
bottomRight?: number | null;
|
|
94
|
+
bottomLeft?: number | null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface CommonStylesPadding {
|
|
98
|
+
all?: number | null;
|
|
99
|
+
top?: number | null;
|
|
100
|
+
right?: number | null;
|
|
101
|
+
bottom?: number | null;
|
|
102
|
+
left?: number | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface CommonStylesText {
|
|
106
|
+
fontFamily?: string[];
|
|
107
|
+
fontSize?: number;
|
|
108
|
+
fontSizeDim?: string;
|
|
109
|
+
lineHeight?: number;
|
|
110
|
+
lineHeightDim?: string;
|
|
111
|
+
color?: string;
|
|
112
|
+
contrastColor?: string;
|
|
113
|
+
textAlign?: string;
|
|
114
|
+
paddingBottom?: number;
|
|
115
|
+
paddingBottomDim?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface CommonStylesHeading extends CommonStylesText {
|
|
119
|
+
paddingTop?: number;
|
|
120
|
+
paddingTopDim?: string;
|
|
121
|
+
letterSpacing?: number;
|
|
122
|
+
letterSpacingDim?: string;
|
|
123
|
+
bold?: boolean;
|
|
124
|
+
italic?: boolean;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface CommonStylesLink {
|
|
128
|
+
color?: string;
|
|
129
|
+
contrastColor?: string;
|
|
130
|
+
underline?: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface CommonStylesButton {
|
|
134
|
+
fontFamily?: string[];
|
|
135
|
+
fontSize?: number;
|
|
136
|
+
fontSizeDim?: string;
|
|
137
|
+
letterSpacing?: number;
|
|
138
|
+
letterSpacingDim?: string;
|
|
139
|
+
color?: string;
|
|
140
|
+
contrastColor?: string;
|
|
141
|
+
bold?: boolean;
|
|
142
|
+
italic?: boolean;
|
|
143
|
+
backgroundColor?: string;
|
|
144
|
+
contrastBackgroundColor?: string;
|
|
145
|
+
marginTop?: number;
|
|
146
|
+
marginTopDim?: string;
|
|
147
|
+
marginBottom?: number;
|
|
148
|
+
marginBottomDim?: string;
|
|
149
|
+
border?: CommonStylesBorder;
|
|
150
|
+
borderRadius?: CommonStylesBorderRadius;
|
|
151
|
+
textAlign?: string;
|
|
152
|
+
padding?: CommonStylesPadding;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface CommonStylesBlock {
|
|
156
|
+
backgroundColor?: string;
|
|
157
|
+
contrastBackgroundColor?: string;
|
|
158
|
+
padding?: CommonStylesPadding;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface CommonStylesCard {
|
|
162
|
+
contrastBackgroundColor?: string;
|
|
163
|
+
contrastTextColor?: string;
|
|
164
|
+
baseBackgroundColor?: string;
|
|
165
|
+
baseTextColor?: string;
|
|
166
|
+
border?: CommonStylesBorder;
|
|
167
|
+
borderRadius?: CommonStylesBorderRadius;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Content appearance preset (`common_styles` / `init({ commonStyles })`).
|
|
172
|
+
* Runtime accepts partial trees; they are deep-merged with {@link COMMON_STYLES}.
|
|
173
|
+
*/
|
|
174
|
+
export interface CommonStyles {
|
|
175
|
+
text?: CommonStylesText;
|
|
176
|
+
headings?: CommonStylesHeading;
|
|
177
|
+
links?: CommonStylesLink;
|
|
178
|
+
buttons?: CommonStylesButton;
|
|
179
|
+
block?: CommonStylesBlock;
|
|
180
|
+
cards?: CommonStylesCard;
|
|
181
|
+
}
|
|
182
|
+
|
|
58
183
|
export type Notify = {
|
|
59
184
|
type?: 'success' | 'info' | 'error' | 'warning';
|
|
60
185
|
message: string | HTMLElement;
|
|
@@ -533,6 +658,7 @@ export declare namespace ExportedApi {
|
|
|
533
658
|
Deprecated = 2,
|
|
534
659
|
}
|
|
535
660
|
|
|
661
|
+
/** Single validation/diagnostic marker for embedded HTML/email code (line/column spans). */
|
|
536
662
|
interface CodeError {
|
|
537
663
|
severity: CodeErrorSeverity;
|
|
538
664
|
message: string;
|
|
@@ -619,6 +745,7 @@ export declare namespace ExportedApi {
|
|
|
619
745
|
}
|
|
620
746
|
}
|
|
621
747
|
export declare namespace ExportedApi {
|
|
748
|
+
/** Monaco (code editor) options passed through the email editor chrome. */
|
|
622
749
|
type EditorOptions = {
|
|
623
750
|
fontSize?: number;
|
|
624
751
|
fontFamily?: string;
|
|
@@ -713,6 +840,7 @@ export declare namespace ExportedApi {
|
|
|
713
840
|
}
|
|
714
841
|
}
|
|
715
842
|
export declare namespace ExportedApi {
|
|
843
|
+
/** Opaque palette/typography blob for a theme id; keep **`any`** until a public theme schema is exported. */
|
|
716
844
|
export type ThemeConfig = any;
|
|
717
845
|
}
|
|
718
846
|
export declare namespace ExportedApi {
|
|
@@ -720,6 +848,7 @@ export declare namespace ExportedApi {
|
|
|
720
848
|
export type Locale = 'en_US' | 'ru_RU';
|
|
721
849
|
export type ConfigMods = 'pro' | 'editor' | 'simple' | 'freeUserBlocks';
|
|
722
850
|
|
|
851
|
+
/** Declared merge-tag delimiters (**`syntax`**) and hierarchical items for picker UI. */
|
|
723
852
|
export interface MergeTagsInfo {
|
|
724
853
|
syntax: string[];
|
|
725
854
|
items: MergeTag[];
|
|
@@ -732,24 +861,39 @@ export declare namespace ExportedApi {
|
|
|
732
861
|
type TraslatePayload = { input: string; locale?: string };
|
|
733
862
|
type TraslateListener = AppListener<TraslatePayload, string>;
|
|
734
863
|
|
|
864
|
+
/** Named alternate configs (e.g. per-mode overrides) passed into `config.advancedConfigs`. */
|
|
735
865
|
interface AdvancedConfigs {
|
|
736
866
|
[key: string]: Config;
|
|
737
867
|
}
|
|
738
868
|
|
|
869
|
+
/** Usage counters returned to the host for quota / billing UI (**`handleLimitUsage`**). */
|
|
739
870
|
interface Counters {
|
|
871
|
+
/** Optimization analyzer runs consumed in the current billing period. */
|
|
740
872
|
optimization_counter: number;
|
|
873
|
+
/** AI chat / completion requests consumed. */
|
|
741
874
|
ai_counter: number;
|
|
875
|
+
/** AI image generations consumed. */
|
|
742
876
|
ai_img_counter: number;
|
|
877
|
+
/** Long-form AI generator completions consumed. */
|
|
743
878
|
ai_generator_limit: number;
|
|
744
879
|
}
|
|
745
880
|
|
|
881
|
+
/** Quota ceilings paired with **`counters`** for limit messaging. */
|
|
746
882
|
interface Limits {
|
|
883
|
+
/** Max optimization runs per period (`undefined`/`0` = unlimited). */
|
|
747
884
|
optimization_limit: number;
|
|
885
|
+
/** AI chat / completion cap per period. */
|
|
748
886
|
ai_limit: number;
|
|
887
|
+
/** AI image generations cap per period. */
|
|
749
888
|
ai_img_limit: number;
|
|
889
|
+
/** AI long-form generator cap per period. */
|
|
750
890
|
ai_generator_limit: number;
|
|
751
891
|
}
|
|
752
892
|
|
|
893
|
+
/**
|
|
894
|
+
* Full editor chrome: themes, toolbox visibility, export actions, palette blocks, and image-center behavior.
|
|
895
|
+
* Pass via **`init({ config })`**; after **`init`**, use **`instance.setConfig`** / **`updateConfig`** (**`Partial<Config>`**).
|
|
896
|
+
*/
|
|
753
897
|
interface Config {
|
|
754
898
|
/** Application mode */
|
|
755
899
|
mode?: ConfigMods;
|
|
@@ -760,12 +904,13 @@ export declare namespace ExportedApi {
|
|
|
760
904
|
/** billing page url */
|
|
761
905
|
billingPageUrl?: string;
|
|
762
906
|
|
|
907
|
+
/** External URL opened for “image info” / metadata tooling (toolbar integration). */
|
|
763
908
|
imageInfoToolUrl?: string;
|
|
764
|
-
/**
|
|
909
|
+
/** Injected stylesheet bundle key or URL resolving to editor-scope CSS for the iframe. */
|
|
765
910
|
styles: string;
|
|
766
|
-
/**
|
|
911
|
+
/** Registered theme preset id consumed by **`themes`**. */
|
|
767
912
|
theme: string;
|
|
768
|
-
/**
|
|
913
|
+
/** Registered theme presets (colors, densities) keyed by id; **`theme`** selects the active one. */
|
|
769
914
|
themes: { [P in string]: ThemeConfig };
|
|
770
915
|
/** showing the back arrow */
|
|
771
916
|
headerArrowBackVisible: boolean;
|
|
@@ -773,7 +918,6 @@ export declare namespace ExportedApi {
|
|
|
773
918
|
headerTitleVisible: boolean;
|
|
774
919
|
/** showing the Preheader field */
|
|
775
920
|
headerPreheaderVisible: boolean;
|
|
776
|
-
/** showing the Header field */
|
|
777
921
|
/** showing breadcrumbs in an iframe */
|
|
778
922
|
pathEnabled: boolean;
|
|
779
923
|
/** showing copy-paste of a block in an iframe */
|
|
@@ -816,6 +960,7 @@ export declare namespace ExportedApi {
|
|
|
816
960
|
saveButtonEnabled: boolean;
|
|
817
961
|
/** text of the main button */
|
|
818
962
|
saveButtonText: string;
|
|
963
|
+
/** Primary / command row of actions (extended toolbar cluster). */
|
|
819
964
|
commandButtonsEnabled?: boolean;
|
|
820
965
|
/** displaying the email ID */
|
|
821
966
|
emailIdShow: boolean;
|
|
@@ -838,14 +983,21 @@ export declare namespace ExportedApi {
|
|
|
838
983
|
/** default setting of the opening tab (""/"common"/"empty") */
|
|
839
984
|
defaultBuildPanel: string;
|
|
840
985
|
|
|
841
|
-
/**
|
|
986
|
+
/** Comments panel / thread in sidebar. */
|
|
842
987
|
commentsEnabled: boolean;
|
|
988
|
+
/** Optimization checklist / recommendations in sidebar. */
|
|
843
989
|
optimizeEnabled: boolean;
|
|
990
|
+
/** Global settings panel in sidebar. */
|
|
844
991
|
settingsEnabled: boolean;
|
|
992
|
+
/** UTM parameters section in sidebar. */
|
|
845
993
|
UTMEnabled: boolean;
|
|
994
|
+
/** Subject line field in sidebar. */
|
|
846
995
|
subjectEnabled: boolean;
|
|
996
|
+
/** Preheader field in sidebar. */
|
|
847
997
|
preheaderEnabled: boolean;
|
|
998
|
+
/** Description / meta description field in sidebar. */
|
|
848
999
|
descriptionEnabled: boolean;
|
|
1000
|
+
/** Tags field in sidebar. */
|
|
849
1001
|
tagsEnabled: boolean;
|
|
850
1002
|
/** showing the mobile properties switch */
|
|
851
1003
|
switchDesktopMobilePropsEnabled: boolean;
|
|
@@ -906,72 +1058,102 @@ export declare namespace ExportedApi {
|
|
|
906
1058
|
/** showing replacer button */
|
|
907
1059
|
formTextFieldReplacerEnabled: boolean;
|
|
908
1060
|
|
|
1061
|
+
/** Enables revision / version history service (autosave revisions UI). */
|
|
909
1062
|
revisionService: boolean;
|
|
910
1063
|
|
|
911
|
-
/**
|
|
1064
|
+
/** Image block — show in palette. */
|
|
912
1065
|
elementImageEnabled: boolean;
|
|
1066
|
+
/** Text block — show in palette. */
|
|
913
1067
|
elementTextEnabled: boolean;
|
|
1068
|
+
/** Heading block — show in palette. */
|
|
914
1069
|
elementHeaderEnabled: boolean;
|
|
1070
|
+
/** Button block — show in palette. */
|
|
915
1071
|
elementButtonEnabled: boolean;
|
|
1072
|
+
/** Bullet list — show in palette. */
|
|
916
1073
|
elementListULEnabled: boolean;
|
|
1074
|
+
/** Numbered list — show in palette. */
|
|
917
1075
|
elementListOLEnabled: boolean;
|
|
1076
|
+
/** Divider block — show in palette. */
|
|
918
1077
|
elementDividerEnabled: boolean;
|
|
1078
|
+
/** Spacer block — show in palette. */
|
|
919
1079
|
elementSpacerEnabled: boolean;
|
|
1080
|
+
/** Social icons block — show in palette. */
|
|
920
1081
|
elementSocialEnabled: boolean;
|
|
1082
|
+
/** Table block — show in palette. */
|
|
921
1083
|
elementTableEnabled: boolean;
|
|
1084
|
+
/** Countdown/timer block — show in palette. */
|
|
922
1085
|
elementCountdownEnabled: boolean;
|
|
1086
|
+
/** Video block — show in palette. */
|
|
923
1087
|
elementVideoEnabled: boolean;
|
|
1088
|
+
/** AI image block — show in palette. */
|
|
924
1089
|
elementAIimageEnabled: boolean;
|
|
1090
|
+
/** AI text block — show in palette. */
|
|
925
1091
|
elementAItextEnabled: boolean;
|
|
1092
|
+
/** Carousel block — show in palette. */
|
|
926
1093
|
elementCarouselEnabled: boolean;
|
|
1094
|
+
/** Form block — show in palette. */
|
|
927
1095
|
elementFormEnabled: boolean;
|
|
1096
|
+
/** Accordion block — show in palette. */
|
|
928
1097
|
elementAccordionEnabled: boolean;
|
|
929
1098
|
|
|
930
|
-
/**
|
|
1099
|
+
/** If `true`, Image Center uses file-manager style UI; if `false`, simpler inline image flow. */
|
|
931
1100
|
imageCenterFileManagerView: boolean;
|
|
932
1101
|
|
|
933
|
-
/**
|
|
1102
|
+
/** Local “upload from computer” entry in Image Center. */
|
|
934
1103
|
imageCenterLocalUploadEnabled: boolean;
|
|
935
1104
|
|
|
1105
|
+
/** Stock photo tab in Image Center / file manager. */
|
|
936
1106
|
imageCenterStockEnabled: boolean;
|
|
1107
|
+
/** GIF / animated stock tab in Image Center. */
|
|
937
1108
|
imageCenterGifEnabled: boolean;
|
|
938
|
-
/**
|
|
1109
|
+
/** Icon stock (e.g. Streamline) tab; `false` hides like other optional stock tabs. */
|
|
939
1110
|
imageCenterIconStockEnabled: boolean;
|
|
1111
|
+
/** Built-in image crop / edit step in Image Center. */
|
|
940
1112
|
imageCenterEditorEnabled: boolean;
|
|
1113
|
+
/** Max upload size for compression path (bytes; typical default ~5 MiB in product). */
|
|
941
1114
|
compressMaxSize: number;
|
|
1115
|
+
/** Longest edge cap when resizing images for compression (pixels). */
|
|
942
1116
|
compressMaxWidthOrHeight: number;
|
|
943
1117
|
|
|
1118
|
+
/** Monaco options for HTML/code editing surface. */
|
|
944
1119
|
editor: EditorOptions;
|
|
945
1120
|
|
|
1121
|
+
/** UI locale (`en_US` / `ru_RU`). */
|
|
946
1122
|
locale: Locale;
|
|
947
1123
|
|
|
1124
|
+
/** Placement of the code-mode panel relative to the canvas (`none` hides code split). */
|
|
948
1125
|
codeModeDirection: CodeModeDirection;
|
|
949
1126
|
|
|
1127
|
+
/** When `true`, suppresses analytics/telemetry payloads to EmailMaker services (privacy / air-gapped). */
|
|
950
1128
|
preventSendDataToEM?: boolean;
|
|
951
1129
|
|
|
1130
|
+
/** Merge-tag syntax and tree for the merge-tag picker. */
|
|
952
1131
|
mergeTags?: MergeTagsInfo;
|
|
953
1132
|
|
|
954
|
-
/**
|
|
1133
|
+
/** Toolbar / sidebar button that opens merge-tag picker (independent from **`mergeTags`** data presence). */
|
|
955
1134
|
mergeTagsShow?: boolean;
|
|
956
1135
|
|
|
1136
|
+
/** Preset addresses for “send test email” quick-pick (UI convenience). */
|
|
957
1137
|
testEmails?: string[];
|
|
958
1138
|
|
|
959
|
-
/**
|
|
1139
|
+
/** Sidebar UI switch for alternate/simple configuration layout (persisted runtime key **`configSwither`**). */
|
|
960
1140
|
configSwither?: boolean;
|
|
961
|
-
/**
|
|
1141
|
+
/** Idle delay (ms) before autosave drafts / revisions fire; `undefined`/`0` may disable interval autosave. */
|
|
962
1142
|
autosaveTimeout?: number;
|
|
963
|
-
/**
|
|
1143
|
+
/** Per-plugin or per-mode overlays (see **`AdvancedConfigs`**). */
|
|
964
1144
|
advancedConfigs?: AdvancedConfigs;
|
|
1145
|
+
/** Forces code-only tooling on narrow/mobile breakpoints (minimal visual toolbar). */
|
|
965
1146
|
onlyCodeModeInMobile?: boolean;
|
|
966
1147
|
|
|
1148
|
+
/** Enables GTM/event hooks for outbound integration (product-specific). */
|
|
967
1149
|
pushToGTM?: boolean;
|
|
968
|
-
/** header
|
|
1150
|
+
/** Top application header strip (brand, breadcrumbs host). */
|
|
969
1151
|
headerShow?: boolean;
|
|
970
|
-
/**
|
|
1152
|
+
/** Public “web version” / hosted preview link tooling. */
|
|
971
1153
|
webversionEnabled?: boolean;
|
|
972
|
-
/**
|
|
1154
|
+
/** Shared / global stylesheet editor for reused block styles across email. */
|
|
973
1155
|
commonStylesEnabled?: boolean;
|
|
974
|
-
/**
|
|
1156
|
+
/** Responsive breakpoints / fluid layout controls inside the preview. */
|
|
975
1157
|
emailResponsiveControlEnabled?: boolean;
|
|
976
1158
|
/** show export to text */
|
|
977
1159
|
exportTextEnabled?: boolean;
|
|
@@ -989,7 +1171,7 @@ export declare namespace ExportedApi {
|
|
|
989
1171
|
exportPdfEnabled?: boolean;
|
|
990
1172
|
/** show export to PNG */
|
|
991
1173
|
exportPngEnabled?: boolean;
|
|
992
|
-
/** AI assistant
|
|
1174
|
+
/** Sidebar “AI assistant” entry (persisted runtime key **`aiAssistentEnabled`**). */
|
|
993
1175
|
aiAssistentEnabled?: boolean;
|
|
994
1176
|
/** link check display */
|
|
995
1177
|
optimizeLinksEnabled?: boolean;
|
|
@@ -999,7 +1181,7 @@ export declare namespace ExportedApi {
|
|
|
999
1181
|
optimizeSpamAssassinEnabled?: boolean;
|
|
1000
1182
|
/** code check display */
|
|
1001
1183
|
optimizeCheckCodeEnabled?: boolean;
|
|
1002
|
-
/**
|
|
1184
|
+
/** Exposes explicit “template” metadata vs one-off campaign fields. */
|
|
1003
1185
|
isTemplateEnabled?: boolean;
|
|
1004
1186
|
/** block menu display */
|
|
1005
1187
|
blocksSectionsShow?: boolean;
|
|
@@ -1015,11 +1197,11 @@ export declare namespace ExportedApi {
|
|
|
1015
1197
|
blocksSearchEnabled?: boolean;
|
|
1016
1198
|
/** showing the panel for adding a block in the visual editor */
|
|
1017
1199
|
blocksAddPanelEnabled?: boolean;
|
|
1018
|
-
/**
|
|
1200
|
+
/** Read-only templates: forbid structure edits beyond allowed regions. */
|
|
1019
1201
|
lockEditor?: boolean;
|
|
1020
|
-
/**
|
|
1202
|
+
/** Disables editing of preheader / title chrome when integrated with locking flows. */
|
|
1021
1203
|
lockPreheaderAndTitle?: boolean;
|
|
1022
|
-
/**
|
|
1204
|
+
/** Collapses or hides the main side navigation strip. */
|
|
1023
1205
|
disableSideMenu?: boolean;
|
|
1024
1206
|
/** Showing a drop-down card with a path to the picture */
|
|
1025
1207
|
imagePathDropdownEnabled?: boolean;
|
|
@@ -1053,12 +1235,19 @@ export declare namespace ExportedApi {
|
|
|
1053
1235
|
handleReadLocale?: LocaleListener;
|
|
1054
1236
|
handleLimitUsage?: LimitListener;
|
|
1055
1237
|
handleTranslate?: TraslateListener;
|
|
1238
|
+
/**
|
|
1239
|
+
* Default content styles for previews and block insertion when the email has no `common_styles` of its own.
|
|
1240
|
+
* If omitted, the build's COMMON_STYLES preset is used (TS constants).
|
|
1241
|
+
* To clear an override stored in the plugin store: `reset({ ..., commonStyles: undefined })` or `updateConfig({ commonStyles: undefined })`.
|
|
1242
|
+
* Partial objects are deep-merged at runtime with {@link COMMON_STYLES}. Saved email `common_styles` from the server override these defaults when present.
|
|
1243
|
+
*/
|
|
1244
|
+
commonStyles?: RecursivePartial<CommonStyles>;
|
|
1056
1245
|
}
|
|
1057
1246
|
|
|
1058
1247
|
interface Instance {
|
|
1059
|
-
setConfig(config: Partial<Config>): Promise<void>;
|
|
1248
|
+
setConfig(config: Partial<Config> & { commonStyles?: RecursivePartial<CommonStyles> }): Promise<void>;
|
|
1060
1249
|
getConfig(): Partial<Config>;
|
|
1061
|
-
updateConfig(config: Partial<Config>): Promise<void>;
|
|
1250
|
+
updateConfig(config: Partial<Config> & { commonStyles?: RecursivePartial<CommonStyles> }): Promise<void>;
|
|
1062
1251
|
handleReadLocale: AppEvent<LocaleListener>;
|
|
1063
1252
|
handleLimitUsage?: AppEvent<LimitListener>;
|
|
1064
1253
|
handleTranslate: AppEvent<TraslateListener>;
|
|
@@ -1772,7 +1961,7 @@ export interface StorageProvider {
|
|
|
1772
1961
|
* using the `url` property from the `FileInfo` object.
|
|
1773
1962
|
*
|
|
1774
1963
|
* @param file - File object
|
|
1775
|
-
* @param options -
|
|
1964
|
+
* @param options - See {@link GetFileDataOptions}
|
|
1776
1965
|
* @returns File contents as a Blob
|
|
1777
1966
|
*/
|
|
1778
1967
|
getFileData?: (file: FileSystemItem, options?: GetFileDataOptions) => MayBePromise<Blob>;
|
|
@@ -1883,8 +2072,8 @@ export interface StorageProvider {
|
|
|
1883
2072
|
* @param url - File URL
|
|
1884
2073
|
* @param folderId - Target folder (or undefined for root). If not specified,
|
|
1885
2074
|
* uses the root folder.
|
|
1886
|
-
* @param options - Optional. eventSource —
|
|
1887
|
-
* (
|
|
2075
|
+
* @param options - Optional. eventSource — upload origin for integrator logic
|
|
2076
|
+
* (e.g. disable proxy when uploading from stock sources: imageStock, iconStock, gif).
|
|
1888
2077
|
* @returns The uploaded or existing complete file object
|
|
1889
2078
|
*/
|
|
1890
2079
|
uploadFileByUrl: (
|
|
@@ -2222,6 +2411,11 @@ export declare namespace ExportedApi {
|
|
|
2222
2411
|
};
|
|
2223
2412
|
}
|
|
2224
2413
|
|
|
2414
|
+
/**
|
|
2415
|
+
* **`Config`** extension: file-manager options when **`imageCenterFileManagerView`** /
|
|
2416
|
+
**`storageProvider`** integrations are enabled, plus optional resource/backend proxy overrides.
|
|
2417
|
+
* Merges with the larger **`ExportedApi.Config`** above.
|
|
2418
|
+
*/
|
|
2225
2419
|
type ResourceProxyResourceType = 'generic' | 'stockImages' | 'emFiles' | 'cdn';
|
|
2226
2420
|
|
|
2227
2421
|
type ResourceProxyMatchContext = {
|
|
@@ -2290,6 +2484,7 @@ export declare namespace ExportedApi {
|
|
|
2290
2484
|
};
|
|
2291
2485
|
|
|
2292
2486
|
export interface Config {
|
|
2487
|
+
/** UI + behavior for bundled file picker (timeouts, paging, trash, thumbnails, providers). */
|
|
2293
2488
|
fileManager?: FileManagerOptions;
|
|
2294
2489
|
resourceProxy?: ResourceProxyConfig;
|
|
2295
2490
|
resourceProxyPolicy?: ResourceProxyPolicy;
|
|
@@ -2313,35 +2508,37 @@ export declare namespace ExportedApi {
|
|
|
2313
2508
|
|
|
2314
2509
|
export declare namespace ExportedApi {
|
|
2315
2510
|
interface Instance {
|
|
2316
|
-
/**
|
|
2511
|
+
/** Replace options and reload app state (`init`-equivalent for an existing mount; avoid duplicate `init` on same DOM node). */
|
|
2317
2512
|
reset(options: Options): Promise<Instance>;
|
|
2318
2513
|
}
|
|
2319
2514
|
}
|
|
2320
2515
|
|
|
2516
|
+
/** Application instance after `init()`; merged from all `ExportedApi.Instance` declarations. */
|
|
2321
2517
|
export type Instance = ExportedApi.Instance;
|
|
2322
2518
|
|
|
2519
|
+
/** Options for `init()`; merged from all `ExportedApi.Options` declarations (handlers, content, auth, config, …). */
|
|
2323
2520
|
export type Options = ExportedApi.Options;
|
|
2324
2521
|
|
|
2325
2522
|
/**
|
|
2326
|
-
*
|
|
2327
|
-
* @param {
|
|
2328
|
-
* @returns
|
|
2523
|
+
* Initialize the EmailMaker / plugin application instance.
|
|
2524
|
+
* @param options - Full option bag; see {@link Options} / `ExportedApi` in this package’s `.d.ts`.
|
|
2525
|
+
* @returns Promise resolving to the runtime instance (events, `show`, `save`, `destroy`, …).
|
|
2329
2526
|
*/
|
|
2330
2527
|
export function init(options: Options): Promise<Instance>;
|
|
2331
2528
|
/**
|
|
2332
|
-
*
|
|
2333
|
-
* @param {code}
|
|
2334
|
-
* @returns object, contains pure html and AMP code
|
|
2529
|
+
* Parse AMP-aware email source into **`ParsedAMP`** (HTML preview, AMP part, opaque `code`).
|
|
2530
|
+
* @param code - Raw markup string **or** wrapper `{ code: string }` as accepted by the runtime.
|
|
2335
2531
|
*/
|
|
2336
2532
|
export function parseAMP(code: string | { code: string }): Promise<ParsedAMP>;
|
|
2337
2533
|
/**
|
|
2338
|
-
*
|
|
2534
|
+
* Default content-styles preset for the current product build. Spread into `init({ commonStyles })` as needed.
|
|
2535
|
+
* Partial option trees are deep-merged with this object at runtime; persisted email `common_styles` override plugin defaults when loaded.
|
|
2339
2536
|
*/
|
|
2537
|
+
export declare const COMMON_STYLES: Readonly<CommonStyles>;
|
|
2538
|
+
/** Build/version string exposed at runtime (`package.json` counterpart for the bundled SDK). */
|
|
2340
2539
|
export const version: string;
|
|
2341
2540
|
|
|
2342
|
-
/**
|
|
2343
|
-
* errors
|
|
2344
|
-
*/
|
|
2541
|
+
/** File manager and integration errors surfaced to host apps (subset used by storage layers). */
|
|
2345
2542
|
export declare namespace errors {
|
|
2346
2543
|
/**
|
|
2347
2544
|
* FileManagerApiError
|
package/emailmaker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.emailmaker=t():e.emailmaker=t()}(globalThis,()=>(()=>{var e={2783:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FileManagerApiError:()=>a});class a extends Error{constructor(e,t,r,n){super(e),this.code=void 0,this.httpStatus=void 0,this.details=void 0,this.name="FileManagerApiError",this.code=t,this.httpStatus=r,this.details=n,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}},32431:(e,t,r)=>{var a;let n="https://unpkg.com/@emailmaker/emailmaker@1.0.
|
|
1
|
+
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.emailmaker=t():e.emailmaker=t()}(globalThis,()=>(()=>{var e={2783:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FileManagerApiError:()=>a});class a extends Error{constructor(e,t,r,n){super(e),this.code=void 0,this.httpStatus=void 0,this.details=void 0,this.name="FileManagerApiError",this.code=t,this.httpStatus=r,this.details=n,Error.captureStackTrace&&Error.captureStackTrace(this,a)}}},32431:(e,t,r)=>{var a;let n="https://unpkg.com/@emailmaker/emailmaker@1.0.117-alpha.1/";const o="emailmaker";if("object"===typeof EmailmakerEnvironment&&null!==(a=EmailmakerEnvironment)&&void 0!==a&&a.publicPath){var c;n=null===(c=EmailmakerEnvironment)||void 0===c?void 0:c.publicPath}else{let e="";const t=document.querySelector(`script[src*=${o}\\.js]`)||document.querySelector(`script[src*=${o}-esm\\.js]`);t instanceof HTMLScriptElement&&(e=t.src),e&&(n=e.replaceAll("\\","/").split("/").slice(0,-1).join("/")+"/")}r.p=new URL(n,window.location.origin).href}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.exports}r.m=e,r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(a,n){if(1&n&&(a=this(a)),8&n)return a;if("object"===typeof a&&a){if(4&n&&a.__esModule)return a;if(16&n&&"function"===typeof a.then)return a}var o=Object.create(null);r.r(o);var c={};e=e||[null,t({}),t([]),t(t)];for(var i=2&n&&a;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>c[e]=()=>a[e]);return c.default=()=>a,r.d(o,c),o}})(),r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,a)=>(r.f[a](e,t),t),[])),r.u=e=>6369===e?"static/js/6369.5a01396a.js":3158===e?"static/js/3158.afc3bdd1.js":1532===e?"static/js/1532.5ef52703.js":2022===e?"static/js/2022.b4591f7e.js":5333===e?"static/js/5333.afbfef64.js":1716===e?"static/js/1716.2d977604.js":598===e?"static/js/598.61e6a78a.js":8430===e?"static/js/8430.12bfa59b.js":"static/js/"+e+"."+{77:"9fcf0459",197:"6d76c202",262:"19eb7dd4",284:"7faba600",290:"b615a90b",494:"447cdadd",737:"b395c2b2",1241:"e3e56034",1330:"ef930318",1332:"0cb959b4",1377:"2c61acc1",1454:"84d2c0a8",1502:"8a2f6e6b",1510:"e74cce46",1626:"3320a5f3",1640:"27be7178",1729:"a0be903e",1788:"d2bc729b",1807:"2f873ba8",1872:"43ec6943",1902:"fa7e9fe6",1940:"e77ca441",2066:"c62582aa",2114:"e385ca42",2139:"775a0a57",2278:"29663e62",2408:"c5572548",2438:"712814b0",2466:"a3a4151a",2642:"b60a63f6",2827:"36a23b69",2844:"54191136",2854:"95e1c8d0",2917:"a6e819bf",2988:"2496986e",3302:"84e32b62",3411:"311c6ae0",3624:"c30f383e",3711:"102a68ee",3718:"76cec3de",3816:"8f941c79",3914:"72124e24",4425:"47aa4461",4504:"4f3bb0b0",4607:"f88cf27a",4686:"180d7a12",4702:"eb86f466",4813:"b282e8cb",4823:"ddb0914d",4863:"bc61c6b4",5072:"e5ce1614",5108:"b3eccf14",5261:"8499aaa1",5322:"413feb5a",5365:"cc28300d",5432:"a1089dad",5466:"50904f4e",5653:"016de6aa",5827:"9dcc9443",5862:"faad8f74",5864:"6033ee51",5902:"33cce976",5980:"d73d6b51",6033:"eb6097f0",6135:"3b810692",6418:"59058d0d",6428:"57a30f96",6552:"271c84f5",6618:"feb19bcb",6764:"2a43d6d5",6832:"2e6f8499",6859:"a585514c",7231:"9ca1301e",7288:"efae06f4",7426:"1de30709",7974:"db4992e0",8466:"44341e69",8534:"a012d026",8580:"47fa4f83",8590:"3e646adc",8682:"b39ae089",8722:"cfde4eb7",8727:"ef480f4b",8796:"27f3a38e",8839:"75fb5ef2",9169:"a1d48107",9200:"f1b7e119",9487:"6209c75a",9508:"4fb40b12",9716:"e99deec1",9830:"6890d559"}[e]+".js",r.miniCssF=e=>"static/css/"+e+"."+{2854:"257728de",5072:"f959228f",8580:"aeb3f0bc",8727:"2f8ba497"}[e]+".chunk.css",r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="email-maker:";r.l=(a,n,o,c)=>{if(e[a])e[a].push(n);else{var i,d;if(void 0!==o)for(var s=document.getElementsByTagName("script"),f=0;f<s.length;f++){var l=s[f];if(l.getAttribute("src")==a||l.getAttribute("data-webpack")==t+o){i=l;break}}i||(d=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",t+o),i.src=a),e[a]=[n];var u=(t,r)=>{i.onerror=i.onload=null,clearTimeout(b);var n=e[a];if(delete e[a],i.parentNode&&i.parentNode.removeChild(i),n&&n.forEach(e=>e(r)),t)return t(r)},b=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),d&&document.head.appendChild(i)}}})(),r.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",(()=>{if("undefined"!==typeof document){var e=e=>new Promise((t,a)=>{var n=r.miniCssF(e),o=r.p+n;if(((e,t)=>{for(var r=document.getElementsByTagName("link"),a=0;a<r.length;a++){var n=(c=r[a]).getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(n===e||n===t))return c}var o=document.getElementsByTagName("style");for(a=0;a<o.length;a++){var c;if((n=(c=o[a]).getAttribute("data-href"))===e||n===t)return c}})(n,o))return t();((e,t,a,n,o)=>{var c=document.createElement("link");c.setAttribute("data-emailmaker","true"),c.rel="stylesheet",c.type="text/css",r.nc&&(c.nonce=r.nc),c.onerror=c.onload=r=>{if(c.onerror=c.onload=null,"load"===r.type)n();else{var a=r&&r.type,i=r&&r.target&&r.target.href||t,d=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+i+")");d.name="ChunkLoadError",d.code="CSS_CHUNK_LOAD_FAILED",d.type=a,d.request=i,c.parentNode&&c.parentNode.removeChild(c),o(d)}},c.href=t,a?a.parentNode.insertBefore(c,a.nextSibling):document.head.appendChild(c)})(e,o,null,t,a)}),t={7391:0,1849:0};r.f.miniCss=(r,a)=>{t[r]?a.push(t[r]):0!==t[r]&&{2854:1,5072:1,8580:1,8727:1}[r]&&a.push(t[r]=e(r).then(()=>{t[r]=0},e=>{throw delete t[r],e}))}}})(),(()=>{var e={7391:0,1849:0};r.f.j=(t,a)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)a.push(n[2]);else{var o=new Promise((r,a)=>n=e[t]=[r,a]);a.push(n[2]=o);var c=r.p+r.u(t),i=new Error;r.l(c,a=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=a&&("load"===a.type?"missing":a.type),c=a&&a.target&&a.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+c+")",i.name="ChunkLoadError",i.type=o,i.request=c,n[1](i)}},"chunk-"+t,t)}};var t=(t,a)=>{var n,o,[c,i,d]=a,s=0;if(c.some(t=>0!==e[t])){for(n in i)r.o(i,n)&&(r.m[n]=i[n]);if(d)d(r)}for(t&&t(a);s<c.length;s++)o=c[s],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0},a=globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),r.nc=void 0;var a={};return(()=>{"use strict";r.r(a),r.d(a,{errors:()=>t,helpers:()=>e,init:()=>i,parseAMP:()=>d,version:()=>s});var e={};r.r(e),r.d(e,{mapHttpStatusToErrorCode:()=>n});r(32431);var t=r(2783);function n(e,t="BackendError"){switch(e){case 400:return"ValidationError";case 401:return"AuthenticationFailed";case 403:return"AuthorizationFailed";case 404:return"FileNotFound";case 413:return"PayloadTooLarge";case 415:return"UnsupportedMediaType";case 429:return"RateLimitExceeded";case 500:return"BackendError";case 503:return"ServiceUnavailable";case 504:return"Timeout";default:return t}}let o,c;function i(e){return o||(o=r.e(1902).then(r.bind(r,71902))),o.then(t=>t.init(e))}function d(e){return c||(c=r.e(1807).then(r.bind(r,24188))),c.then(t=>t.parseAMP(e))}const s="1.0.117-alpha.1"})(),a})());
|
|
2
2
|
//# sourceMappingURL=emailmaker.js.map
|