@boxcc/maildeno-editor 0.4.13 → 0.4.14
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 +1 -0
- package/dist/{HealthIndicator-4Iw6N-g_.js → HealthIndicator-BLID6Ty0.js} +2 -2
- package/dist/{HealthIndicator-ZohgzF2_.js → HealthIndicator-DfzqzPNw.js} +1 -1
- package/dist/{PreviewCanvas-QN4C68KA.js → PreviewCanvas-D3SpILsV.js} +3 -3
- package/dist/{PreviewCanvas-DzpLghCo.js → PreviewCanvas-PtW1UL1J.js} +3 -3
- package/dist/{RichTextEditor-CmM4XRFC.js → RichTextEditor-D6DQqbJg.js} +2 -2
- package/dist/{RichTextEditor-Cz1-_ZtA.js → RichTextEditor-DDEfKPZm.js} +3 -3
- package/dist/RowPreviewChildren-BGnilx-K.js +4 -0
- package/dist/RowPreviewChildren-CalQWx1C.js +4 -0
- package/dist/{RowPreviewRow-DPaSbxmB.js → RowPreviewRow-C2XAe5Xs.js} +1 -1
- package/dist/{RowPreviewRow-Dx4ExtSN.js → RowPreviewRow-DG4AdMrv.js} +1 -1
- package/dist/{SavedRowsPanel-DqSHB6Jk.js → SavedRowsPanel-2JBfYdxN.js} +37 -37
- package/dist/{SavedRowsPanel-DyXjSOEt.js → SavedRowsPanel-B6_VHQZm.js} +33 -33
- package/dist/components/features/emailBuilder/EmailEditor.vue.d.ts +1 -0
- package/dist/{element-B3gq8Xvd.js → element-DQw3HLit.js} +4689 -4649
- package/dist/element.js +1 -1
- package/dist/index.js +4213 -4173
- package/dist/init.d.ts +2 -0
- package/dist/init.js +31 -25
- package/dist/{useEmailBuilder-BR4wfai1.js → useEmailBuilder-2yCUzRx2.js} +470 -460
- package/dist/{useEmailBuilder-B19p-2yp.js → useEmailBuilder-D3uV7dwL.js} +833 -823
- package/dist/{useToast-DD11IxqP.js → useToast-D1GgDMqQ.js} +7 -7
- package/package.json +1 -1
- package/dist/RowPreviewChildren-BYaMZID3.js +0 -4
- package/dist/RowPreviewChildren-_A9gPQCs.js +0 -4
package/dist/init.d.ts
CHANGED
|
@@ -127,6 +127,8 @@ export interface EditorHandle {
|
|
|
127
127
|
* mechanism that applies it on initial mount. Calling this again after
|
|
128
128
|
* mount is the actual "live" part, not just initial configuration. */
|
|
129
129
|
setTheme(theme: ThemeOptions): void;
|
|
130
|
+
/** Updates the name used by the header, saves and exports. Empty clears it. */
|
|
131
|
+
setTemplateName(name: string): void;
|
|
130
132
|
/** These four call EmailEditor.vue's defineExpose'd methods, which Vue's
|
|
131
133
|
* own defineCustomElement implementation forwards directly onto the
|
|
132
134
|
* custom element instance (confirmed: _instance.exposed is read and
|
package/dist/init.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { O as o, at as c, i as u, st as g } from "./vue.runtime.esm-bundler-D2AjRP90.js";
|
|
2
|
-
import { G as f, a as
|
|
3
|
-
import { D as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (!(
|
|
7
|
-
|
|
2
|
+
import { G as f, a as T, i as H, n as v, r as S } from "./element-DQw3HLit.js";
|
|
3
|
+
import { D as w, K as A, O as C, c as N, k as J, l as M, m as I, p as R } from "./useEmailBuilder-2yCUzRx2.js";
|
|
4
|
+
var d = !1;
|
|
5
|
+
function p() {
|
|
6
|
+
if (!(d || typeof document > "u")) {
|
|
7
|
+
d = !0;
|
|
8
8
|
for (const e of f()) {
|
|
9
9
|
if (!e) continue;
|
|
10
10
|
const l = document.createElement("style");
|
|
@@ -12,22 +12,22 @@ function h() {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
15
|
+
function h(e, l) {
|
|
16
|
+
p();
|
|
17
17
|
const t = c({ ...l }), i = /* @__PURE__ */ new Set(), a = g(null), r = document.createElement("div");
|
|
18
18
|
r.style.height = "100%", e.appendChild(r);
|
|
19
19
|
const n = u({ setup() {
|
|
20
20
|
return () => o(S, {
|
|
21
21
|
...t,
|
|
22
22
|
ref: a,
|
|
23
|
-
onSave: (s) => i.forEach((
|
|
23
|
+
onSave: (s) => i.forEach((m) => m(s))
|
|
24
24
|
});
|
|
25
25
|
} });
|
|
26
26
|
return n.mount(r), {
|
|
27
27
|
element: r,
|
|
28
28
|
exposed: () => a.value ?? null,
|
|
29
|
-
setProp: (s,
|
|
30
|
-
t[s] =
|
|
29
|
+
setProp: (s, m) => {
|
|
30
|
+
t[s] = m;
|
|
31
31
|
},
|
|
32
32
|
addSaveHandler: (s) => i.add(s),
|
|
33
33
|
removeSaveHandler: (s) => i.delete(s),
|
|
@@ -36,11 +36,11 @@ function E(e, l) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
async function
|
|
39
|
+
async function j(e) {
|
|
40
40
|
const l = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
41
41
|
if (!l) throw new Error(`[maildeno-editor] init() couldn't find a container${typeof e.container == "string" ? ` matching "${e.container}"` : ""}.`);
|
|
42
42
|
if (e.shadowDom === !1) {
|
|
43
|
-
const a =
|
|
43
|
+
const a = h(l, {
|
|
44
44
|
templateId: e.templateId,
|
|
45
45
|
storageAdapter: e.storageAdapter,
|
|
46
46
|
theme: e.theme,
|
|
@@ -53,14 +53,17 @@ async function N(e) {
|
|
|
53
53
|
});
|
|
54
54
|
await new Promise((n) => setTimeout(n, 0));
|
|
55
55
|
const r = (n, ...s) => {
|
|
56
|
-
const
|
|
57
|
-
return typeof
|
|
56
|
+
const m = a.exposed()?.[n];
|
|
57
|
+
return typeof m == "function" ? m(...s) : null;
|
|
58
58
|
};
|
|
59
59
|
return {
|
|
60
60
|
element: a.element,
|
|
61
61
|
on: (n, s) => a.addSaveHandler(s),
|
|
62
62
|
off: (n, s) => a.removeSaveHandler(s),
|
|
63
63
|
setTheme: (n) => a.setProp("theme", n),
|
|
64
|
+
setTemplateName: (n) => {
|
|
65
|
+
r("setTemplateName", n);
|
|
66
|
+
},
|
|
64
67
|
getHtml: (n = "prune") => r("getHtml", n),
|
|
65
68
|
getMjml: (n = "prune") => r("getMjml", n),
|
|
66
69
|
getReactEmail: (n = "prune") => r("getReactEmail", n),
|
|
@@ -92,6 +95,9 @@ async function N(e) {
|
|
|
92
95
|
setTheme(a) {
|
|
93
96
|
t.theme = a;
|
|
94
97
|
},
|
|
98
|
+
setTemplateName(a) {
|
|
99
|
+
t.setTemplateName?.(a);
|
|
100
|
+
},
|
|
95
101
|
getHtml(a = "prune") {
|
|
96
102
|
return t.getHtml ? t.getHtml(a) : null;
|
|
97
103
|
},
|
|
@@ -123,15 +129,15 @@ async function N(e) {
|
|
|
123
129
|
};
|
|
124
130
|
}
|
|
125
131
|
export {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
A as createLocalStorageAdapter,
|
|
133
|
+
w as getAllBlocks,
|
|
134
|
+
C as getBlock,
|
|
135
|
+
N as getRegisteredCustomESPs,
|
|
136
|
+
R as getRegisteredMergeTagIds,
|
|
137
|
+
j as init,
|
|
138
|
+
H as palette,
|
|
133
139
|
J as registerBlock,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
140
|
+
M as registerESPSyntax,
|
|
141
|
+
I as registerMergeTags,
|
|
142
|
+
T as setEditorTheme
|
|
137
143
|
};
|