@emailmaker/emailmaker 1.1.56 → 1.1.60
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/emailmaker-core.dd403703.js +673 -0
- package/emailmaker-esm.js +886 -523
- package/emailmaker.d.ts +8 -0
- package/emailmaker.js +769 -401
- package/iframe/js/amp.V09Q6hy6.js +1 -1
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.B-wCbIo7.js +1 -1
- package/npm-publish.manifest.json +7 -7
- package/package.json +1 -1
- package/singlepage_headless_plugin.html +1 -1
- package/static/core/{4de323c6.js → 1567a51d.js} +3 -3
- package/static/core/{270ea1f0.js → 3763d012.js} +221 -210
- package/static/core/{8c887aba.js → 5430829b.js} +11819 -11464
- package/static/core/{6bc4ff83.js → 5c5734a1.js} +7 -7
- package/static/core/{100f1a1f.js → 6115fe1b.js} +5 -5
- package/static/core/{8a4486b0.js → 8b2a4177.js} +248 -198
- package/static/core/{76f8b642.js → a88dd635.js} +3 -3
- package/static/core/{116ebe97.js → b6907f0c.js} +4 -4
- package/static/core/{c6089a51.js → c734b889.js} +138 -138
- package/static/core/{b654a72e.js → cbac193c.js} +4668 -4305
- package/static/core/{916b241e.js → e437b0b0.js} +762 -764
- package/static/core/{41907e94.js → e900413d.js} +2119 -2036
- package/static/core/{6dcd0dc9.js → f25e08d3.js} +7 -7
- package/static/esm/7cd4296a.js +131 -0
- package/static/esm/{8b0bebd1.js → adb3ef80.js} +48 -48
- package/two_step_headless_plugin.html +1 -1
- package/emailmaker-core.80c7793f.js +0 -643
- package/static/esm/aec29e9e.js +0 -127
- /package/iframe/{iframe-eblock.80c7793f.html → iframe-eblock.dd403703.html} +0 -0
- /package/iframe/{iframe.80c7793f.html → iframe.dd403703.html} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/f25e08d3.js", [
|
|
2
2
|
"require",
|
|
3
3
|
"exports",
|
|
4
4
|
"module",
|
|
5
|
-
"static/core/
|
|
6
|
-
"static/core/
|
|
7
|
-
"static/core/
|
|
5
|
+
"static/core/cbac193c.js",
|
|
6
|
+
"static/core/3763d012.js",
|
|
7
|
+
"static/core/a88dd635.js",
|
|
8
8
|
"static/core/99b9545a.js",
|
|
9
|
-
"static/core/
|
|
9
|
+
"static/core/8b2a4177.js"
|
|
10
10
|
], function(g, F, N) {
|
|
11
|
-
const h = g("./
|
|
12
|
-
g("./
|
|
11
|
+
const h = g("./cbac193c.js"), S = g("./3763d012.js"), P = g("./a88dd635.js"), f = g("./99b9545a.js");
|
|
12
|
+
g("./8b2a4177.js");
|
|
13
13
|
var _;
|
|
14
14
|
(function(l) {
|
|
15
15
|
function e(s, a, n = (i, o) => i === o) {
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { a as P, i as _ } from "./adb3ef80.js";
|
|
2
|
+
import "@emailmaker/emailmaker/runtime/react";
|
|
3
|
+
function i(r) {
|
|
4
|
+
if (r instanceof DOMException && r.name === "AbortError") return r;
|
|
5
|
+
const E = r === void 0 ? "The operation was aborted." : typeof r == "string" ? r : r instanceof Error ? r.message : String(r);
|
|
6
|
+
return new DOMException(E, "AbortError");
|
|
7
|
+
}
|
|
8
|
+
function s(r) {
|
|
9
|
+
if (r?.aborted) throw i(r.reason);
|
|
10
|
+
}
|
|
11
|
+
function h(r, E) {
|
|
12
|
+
return E ? (s(E), new Promise((I, t) => {
|
|
13
|
+
const n = () => {
|
|
14
|
+
N(), t(i(E.reason));
|
|
15
|
+
}, N = () => {
|
|
16
|
+
E.removeEventListener("abort", n);
|
|
17
|
+
};
|
|
18
|
+
E.addEventListener("abort", n), r.then((D) => {
|
|
19
|
+
N(), I(D);
|
|
20
|
+
}, (D) => {
|
|
21
|
+
N(), t(D);
|
|
22
|
+
});
|
|
23
|
+
})) : r;
|
|
24
|
+
}
|
|
25
|
+
function p(r) {
|
|
26
|
+
return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(r) : r.replace(/([^a-zA-Z0-9_-])/g, "\\$1");
|
|
27
|
+
}
|
|
28
|
+
function c(r, E = document) {
|
|
29
|
+
try {
|
|
30
|
+
const t = E.querySelector(r);
|
|
31
|
+
if (t) return t;
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const I = E.querySelectorAll("*");
|
|
36
|
+
for (let t = 0; t < I.length; t++) {
|
|
37
|
+
const n = I[t]?.shadowRoot;
|
|
38
|
+
if (!n) continue;
|
|
39
|
+
const N = c(r, n);
|
|
40
|
+
if (N) return N;
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
function f(r, E = []) {
|
|
45
|
+
const I = r.querySelectorAll("*");
|
|
46
|
+
for (let t = 0; t < I.length; t++) {
|
|
47
|
+
const n = I[t]?.shadowRoot;
|
|
48
|
+
n && (E.push(n), f(n, E));
|
|
49
|
+
}
|
|
50
|
+
return E;
|
|
51
|
+
}
|
|
52
|
+
function M(r, E, I) {
|
|
53
|
+
if (r.isConnected) return r;
|
|
54
|
+
const t = r.id?.trim();
|
|
55
|
+
return t ? b(`#${p(t)}`, E, I) : Promise.reject(i("Editor mount element was disconnected and has no id — pass a CSS selector or call init() again after the host remounts the container."));
|
|
56
|
+
}
|
|
57
|
+
function b(r, E, I) {
|
|
58
|
+
if (s(I), typeof r < "u") {
|
|
59
|
+
if (typeof r == "string") {
|
|
60
|
+
const t = r, n = c(t);
|
|
61
|
+
if (n) return n;
|
|
62
|
+
const N = E.addDisposable(new P());
|
|
63
|
+
return new Promise((D, a) => {
|
|
64
|
+
const O = (e) => {
|
|
65
|
+
N.dispose(), e();
|
|
66
|
+
}, T = () => {
|
|
67
|
+
O(() => a(i(I?.reason)));
|
|
68
|
+
};
|
|
69
|
+
if (I?.aborted) {
|
|
70
|
+
T();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
I?.addEventListener("abort", T), N.addDispose(() => I?.removeEventListener("abort", T));
|
|
74
|
+
const A = document.body ?? document.documentElement;
|
|
75
|
+
if (!A) {
|
|
76
|
+
O(() => a(i("Document is not ready to observe mount element")));
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const u = /* @__PURE__ */ new Set(), L = new MutationObserver(() => {
|
|
80
|
+
const e = c(t);
|
|
81
|
+
if (e) {
|
|
82
|
+
O(() => D(e));
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
d();
|
|
86
|
+
}), S = (e) => {
|
|
87
|
+
u.has(e) || (u.add(e), L.observe(e, {
|
|
88
|
+
attributes: !0,
|
|
89
|
+
childList: !0,
|
|
90
|
+
subtree: !0
|
|
91
|
+
}));
|
|
92
|
+
}, d = () => {
|
|
93
|
+
const e = document.documentElement;
|
|
94
|
+
if (e) for (const C of f(e)) S(C);
|
|
95
|
+
};
|
|
96
|
+
S(A), d(), N.addDispose(() => L.disconnect());
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return r instanceof Element ? M(r, E, I) : r;
|
|
100
|
+
}
|
|
101
|
+
return r;
|
|
102
|
+
}
|
|
103
|
+
var w = /* @__PURE__ */ new Map();
|
|
104
|
+
_("ELEMENT_INSERT_HTML_PIPELINE");
|
|
105
|
+
_("BLOCK_INSERT_HTML_PIPELINE");
|
|
106
|
+
_("DomComponentRegistry");
|
|
107
|
+
_("ComponentRegistry");
|
|
108
|
+
function o(r) {
|
|
109
|
+
return _(r);
|
|
110
|
+
}
|
|
111
|
+
var R;
|
|
112
|
+
(function(r) {
|
|
113
|
+
r.BEFORE_SAVE_EMAIL = o(), r.ON_SAVEBUTTON_CLICK_ID = o(), r.ON_NEXTBUTTON_CLICK_ID = o(), r.ON_PREVIOUSBUTTON_CLICK_ID = o(), r.ON_MODEL_CHANGE = o(), r.WILL_EMAIL_INIT_ID = o(), r.ON_EMAIL_INIT_ID = o(), r.ON_BLOCK_INIT_ID = o(), r.ON_CONTENT_CHANGED_ID = o(), r.ON_PREHEADER_CHANGED_ID = o(), r.ON_SUBJECT_CHANGED_ID = o(), r.ON_EMAIL_CHANGED_ID = o(), r.ON_BLOCK_CHANGED_ID = o(), r.ON_CHUNKS_LOADED = o(), r.ON_SEND_TESTEMAIL_ID = o(), r.ON_SEND_LIVEPREVIEW_ID = o(), r.ON_SHARE_ID = o(), r.ON_SHOW_PREVIEW_ID = o(), r.ON_EMAIL_CLONE_ID = o(), r.ON_SEND_EMAIL_MODAL_ID = o(), r.ON_NOTIFICATION = o(), r.READ_LOCALE = o(), r.ON_TRANSLATE_ID = o(), r.ON_CODE_VALIDATE_ID = o(), r.UPLOAD_EVENT_ID = o(), r.PROXY_URL_EVENT_ID = o(), r.FILE_PROXY_EVENT_ID = o(), r.ON_LIMIT_ID = o(), r.ON_BROWSER_EXTENSION_DETECTED_ID = o(), r.ON_LAYOUT_CONVERT_REQUEST_ID = o(), r.ON_BROWSER_TRANSLATE_DETECTED_ID = o(), r.AI_TEXT_REQUEST_ID = o(), r.AI_IMAGE_REQUEST_ID = o(), r.AI_TEXT_PROGRESS_ID = o(), r.AI_IMAGE_PROGRESS_ID = o(), r.AI_TEXT_STREAM_ID = o();
|
|
114
|
+
})(R || (R = {}));
|
|
115
|
+
_();
|
|
116
|
+
_();
|
|
117
|
+
_("InitPipelineContext");
|
|
118
|
+
_();
|
|
119
|
+
_();
|
|
120
|
+
_();
|
|
121
|
+
_();
|
|
122
|
+
_();
|
|
123
|
+
_();
|
|
124
|
+
_();
|
|
125
|
+
_();
|
|
126
|
+
_("plugin.jwt.token");
|
|
127
|
+
_("plugin.jwt.error");
|
|
128
|
+
_("PluginCollection");
|
|
129
|
+
o("APP_LOAD_EVENT");
|
|
130
|
+
o("CONFIG_CHANGED_EVENT");
|
|
131
|
+
export { s as a, h as i, b as n, i as r, w as t };
|
|
@@ -33,10 +33,10 @@ var g = Object.defineProperty, E = (t, e) => {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
function
|
|
36
|
+
function _(t) {
|
|
37
37
|
return `service_container_${t}`;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var I = class h extends d {
|
|
40
40
|
_parent;
|
|
41
41
|
_injectCallbacks = [];
|
|
42
42
|
_injections = /* @__PURE__ */ Object.create(null);
|
|
@@ -82,24 +82,24 @@ var D = class h extends d {
|
|
|
82
82
|
return typeof r == "function" ? Promise.resolve(r()) : new Promise((n) => this._onInject(e, () => n(this.getInstance(e))));
|
|
83
83
|
}
|
|
84
84
|
addService(e, r) {
|
|
85
|
-
const n =
|
|
85
|
+
const n = _(e);
|
|
86
86
|
this.injectFactory(n, (i, o = []) => o.indexOf(r) < 0 ? [...o, r] : o);
|
|
87
87
|
const s = new d();
|
|
88
88
|
return s.addDispose(() => {
|
|
89
|
-
this.injectFactory(n, (i, o = []) => o.filter((
|
|
89
|
+
this.injectFactory(n, (i, o = []) => o.filter((c) => c !== r));
|
|
90
90
|
}), s;
|
|
91
91
|
}
|
|
92
92
|
addServiceFactory(e, r, n) {
|
|
93
|
-
const s =
|
|
93
|
+
const s = _(e);
|
|
94
94
|
let i;
|
|
95
|
-
this.injectFactory(s, (
|
|
95
|
+
this.injectFactory(s, (c, a = []) => (i = r(c, i), i === void 0 ? a : a.indexOf(i) < 0 ? [...a, i] : a), n);
|
|
96
96
|
const o = new d();
|
|
97
97
|
return o.addDispose(() => {
|
|
98
|
-
this.injectFactory(s, (
|
|
98
|
+
this.injectFactory(s, (c, a = []) => i === void 0 ? a : a.filter((D) => D !== i));
|
|
99
99
|
}), o;
|
|
100
100
|
}
|
|
101
101
|
getServices(e) {
|
|
102
|
-
const r =
|
|
102
|
+
const r = _(e);
|
|
103
103
|
return [...this.getInstance(r, !1) || [], ...this._parent?.getServices(e) || []];
|
|
104
104
|
}
|
|
105
105
|
createChild() {
|
|
@@ -123,23 +123,23 @@ function A(t) {
|
|
|
123
123
|
const e = p(t), r = globalThis;
|
|
124
124
|
return r[e] ??= {};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function T(t) {
|
|
127
127
|
return t != null && typeof t == "object" && typeof t.inject == "function" && typeof t.getInstance == "function";
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function C(t) {
|
|
130
130
|
if (t) return p(t);
|
|
131
131
|
return p("emailmaker".trim());
|
|
132
132
|
}
|
|
133
133
|
function y(t) {
|
|
134
|
-
const e = A(
|
|
135
|
-
if (
|
|
136
|
-
const r = new
|
|
134
|
+
const e = A(C(t));
|
|
135
|
+
if (T(e.container)) return e.container;
|
|
136
|
+
const r = new I(null);
|
|
137
137
|
return e.container = r, r;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function m(t) {
|
|
140
140
|
return y(t);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function O() {
|
|
143
143
|
let t = (/* @__PURE__ */ new Date()).getTime(), e = typeof performance < "u" && performance.now && performance.now() * 1e3 || 0;
|
|
144
144
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(r) {
|
|
145
145
|
let n = Math.random() * 16;
|
|
@@ -147,17 +147,17 @@ function m() {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
function N() {
|
|
150
|
-
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() :
|
|
150
|
+
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : O();
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function f(t = N()) {
|
|
153
153
|
return t;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function S() {
|
|
156
156
|
return "esm".trim();
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function b(t) {
|
|
159
159
|
if (typeof globalThis > "u") return;
|
|
160
|
-
const e =
|
|
160
|
+
const e = S(), r = globalThis[t] ?? {};
|
|
161
161
|
globalThis[t] = r;
|
|
162
162
|
const n = r.__diagnostics ??= {}, s = n.diModuleEval ??= {
|
|
163
163
|
evalCount: 0,
|
|
@@ -169,31 +169,31 @@ function R(t) {
|
|
|
169
169
|
stack: (/* @__PURE__ */ new Error()).stack
|
|
170
170
|
}), s.evalCount += 1;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function w() {
|
|
173
173
|
return `__${"emailmaker".trim()}__`;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
if (
|
|
177
|
-
const r =
|
|
175
|
+
function R(t, e) {
|
|
176
|
+
if (b(e), typeof globalThis > "u") return t;
|
|
177
|
+
const r = S(), n = globalThis, s = n[e] = n[e] || {}, i = s.__diagnostics = s.__diagnostics || {}, o = i.dependencyResolver = i.dependencyResolver || { entries: [] }, c = {
|
|
178
178
|
container: t,
|
|
179
179
|
source: "packages/runtime-core/di/index.ts",
|
|
180
180
|
buildSource: r,
|
|
181
181
|
timestamp: Date.now(),
|
|
182
182
|
stack: (/* @__PURE__ */ new Error()).stack
|
|
183
183
|
};
|
|
184
|
-
return o.entries.push(
|
|
184
|
+
return o.entries.push(c), t;
|
|
185
185
|
}
|
|
186
|
-
var
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
189
|
-
const t =
|
|
190
|
-
return
|
|
186
|
+
var l;
|
|
187
|
+
function M() {
|
|
188
|
+
if (l) return l;
|
|
189
|
+
const t = w();
|
|
190
|
+
return l = R(y(t), t), l;
|
|
191
191
|
}
|
|
192
192
|
new Proxy({}, { get(t, e, r) {
|
|
193
|
-
const n =
|
|
193
|
+
const n = M(), s = Reflect.get(n, e, r);
|
|
194
194
|
return typeof s == "function" ? s.bind(n) : s;
|
|
195
195
|
} });
|
|
196
|
-
function
|
|
196
|
+
function j(t, e = "BackendError") {
|
|
197
197
|
switch (t) {
|
|
198
198
|
case 400: return "ValidationError";
|
|
199
199
|
case 401: return "AuthenticationFailed";
|
|
@@ -208,7 +208,7 @@ function L(t, e = "BackendError") {
|
|
|
208
208
|
default: return e;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var L = class {
|
|
212
212
|
_plugins = /* @__PURE__ */ new Map();
|
|
213
213
|
_listeners = /* @__PURE__ */ new Map();
|
|
214
214
|
_getOrCreateEntry(t) {
|
|
@@ -368,20 +368,20 @@ var j = class {
|
|
|
368
368
|
forContext() {
|
|
369
369
|
return this.target().forContext();
|
|
370
370
|
}
|
|
371
|
-
},
|
|
372
|
-
function
|
|
373
|
-
return t.getOrCreateInstance(
|
|
371
|
+
}, F = "PluginRegistry";
|
|
372
|
+
function U(t = m()) {
|
|
373
|
+
return t.getOrCreateInstance(F, () => new L());
|
|
374
374
|
}
|
|
375
|
-
var G = new P(() =>
|
|
376
|
-
function
|
|
377
|
-
return
|
|
375
|
+
var G = new P(() => U());
|
|
376
|
+
function u(t) {
|
|
377
|
+
return f(t);
|
|
378
378
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
var
|
|
379
|
+
u("HANDLE_ATOM_INSERT");
|
|
380
|
+
u("SETTINGS_PANEL_EVENT");
|
|
381
|
+
u("MODAL_SHOW_EVENT");
|
|
382
|
+
u("MODAL_CLOSE_EVENT");
|
|
383
|
+
u("MODAL_UPDATE_EVENT");
|
|
384
|
+
var K = /* @__PURE__ */ E({ FileManagerApiError: () => k }), k = class x extends Error {
|
|
385
385
|
code;
|
|
386
386
|
status;
|
|
387
387
|
details;
|
|
@@ -389,7 +389,7 @@ var oe = /* @__PURE__ */ E({ FileManagerApiError: () => V }), V = class S extend
|
|
|
389
389
|
return this.status;
|
|
390
390
|
}
|
|
391
391
|
constructor(e, r, n, s) {
|
|
392
|
-
super(e), this.name = "FileManagerApiError", this.code = r, this.status = n, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this,
|
|
392
|
+
super(e), this.name = "FileManagerApiError", this.code = r, this.status = n, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this, x);
|
|
393
393
|
}
|
|
394
|
-
},
|
|
395
|
-
export { d as a,
|
|
394
|
+
}, ee = /* @__PURE__ */ E({ mapHttpStatusToErrorCode: () => j });
|
|
395
|
+
export { d as a, f as i, K as n, G as r, ee as t };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<title>Two-step flow: design → subject/preheader (headless)</title>
|
|
6
|
-
<script id="plugin-script" type="text/javascript" src="emailmaker.js?
|
|
6
|
+
<script id="plugin-script" type="text/javascript" src="emailmaker.js?dd403703"></script>
|
|
7
7
|
<style>
|
|
8
8
|
body {
|
|
9
9
|
margin: 0;
|