email-builder-online 4.1.13 → 4.1.15
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/LICENSE +661 -661
- package/README.md +1034 -1034
- package/dist/{index-BORDx2NL.cjs → index-BatJsONT.cjs} +169 -169
- package/dist/{index-BGFPP7q7.js → index-DFHcCVv7.js} +22450 -23140
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +1 -1
- package/dist/lazyThumbnailGenerator-BZlGvJjL.js +55 -0
- package/dist/lazyThumbnailGenerator-CPvTa1OS.js +55 -0
- package/dist/lazyThumbnailGenerator-CxousRtK.cjs +1 -0
- package/dist/localPresets-57l3x2SK.js +11 -0
- package/dist/localPresets-CdsQZFO1.cjs +1 -0
- package/dist/seedLocalLibrary-CKIQbOie.js +36 -0
- package/dist/seedLocalLibrary-Ct5I8GHM.js +36 -0
- package/dist/seedLocalLibrary-Dp3QfNd2.cjs +1 -0
- package/dist/{standalone-QpPEEu_A.js → standalone-DwQRIC9h.js} +28457 -29146
- package/dist/standalone.js +218 -218
- package/dist/standalone.mjs +1 -1
- package/package.json +3 -3
- package/vite.config.standalone.ts +95 -95
- package/dist/lazyThumbnailGenerator-B_X8zwAa.cjs +0 -1
- package/dist/lazyThumbnailGenerator-Bb9drzyo.js +0 -64
- package/dist/lazyThumbnailGenerator-CDFvk5_J.js +0 -64
- package/dist/localPresets-Bqt2Z5-T.cjs +0 -1
- package/dist/localPresets-zfQXhBg0.js +0 -17
- package/dist/seedLocalLibrary-BEbXcwJY.js +0 -36
- package/dist/seedLocalLibrary-C4qVLhqT.cjs +0 -1
- package/dist/seedLocalLibrary-DSdtiOMs.js +0 -36
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react/jsx-runtime");const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react/jsx-runtime");const e=require("./index-BatJsONT.cjs");require("react");exports.BLOCK_TYPES=e.BLOCK_TYPES;exports.ButtonPropsSchema=e.ButtonPropsSchema;exports.COLOR_SCHEMA=e.COLOR_SCHEMA;exports.ColumnsContainerPropsSchema=e.ColumnsContainerPropsSchema;exports.ContainerPropsSchema=e.ContainerPropsSchema;exports.DividerPropsSchema=e.DividerPropsSchema;exports.EditorBlockSchema=e.EditorBlockSchema;exports.EditorConfigurationSchema=e.EditorConfigurationSchema;exports.EmailBuilder=e.EmailBuilder;exports.EmailLayoutPropsSchema=e.EmailLayoutPropsSchema;exports.FONT_FAMILY_NAMES=e.FONT_FAMILY_NAMES;exports.FONT_FAMILY_SCHEMA=e.FONT_FAMILY_SCHEMA;exports.ImagePropsSchema=e.ImagePropsSchema;exports.NotionTextPropsSchema=e.NotionTextPropsSchema;exports.PADDING_SCHEMA=e.PADDING_SCHEMA;exports.SHAPE_SCHEMA=e.SHAPE_SCHEMA;exports.SocialMediaPropsSchema=e.SocialMediaPropsSchema;exports.SpacerPropsSchema=e.SpacerPropsSchema;exports.default=e.EmailBuilder;exports.registerEmailBuilder=e.registerEmailBuilder;exports.validateDocument=e.validateDocument;
|
package/dist/index.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ export declare interface EmailBuilderProps {
|
|
|
186
186
|
componentsStorage?: 'backend' | 'local';
|
|
187
187
|
/** When false, hides "Save as template" and the Templates tab in the library drawer. Defaults to true. */
|
|
188
188
|
templateSaving?: boolean;
|
|
189
|
+
/** When true, shows the "Save as theme" button in the root inspector panel. Defaults to false. */
|
|
190
|
+
themeSaving?: boolean;
|
|
189
191
|
}
|
|
190
192
|
|
|
191
193
|
export declare interface EmailBuilderRef {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { n as r, B as i, C as m, e as S, f as t, D as c, l as E, m as p, E as P, i as h, d as l, F as n, I as C, N as d, P as A, S as u, j as M, k as _, E as B, r as N, v as D } from "./index-
|
|
2
|
+
import { n as r, B as i, C as m, e as S, f as t, D as c, l as E, m as p, E as P, i as h, d as l, F as n, I as C, N as d, P as A, S as u, j as M, k as _, E as B, r as N, v as D } from "./index-DFHcCVv7.js";
|
|
3
3
|
import "react";
|
|
4
4
|
export {
|
|
5
5
|
r as BLOCK_TYPES,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { g as f, h as d, a as y, c as T, s as g, b as p } from "./standalone-DwQRIC9h.js";
|
|
2
|
+
const h = 200, w = 6e3;
|
|
3
|
+
let n = !1, M = !1;
|
|
4
|
+
function S(e) {
|
|
5
|
+
return new Promise((t, a) => {
|
|
6
|
+
const o = new FileReader();
|
|
7
|
+
o.onload = () => t(o.result), o.onerror = a, o.readAsDataURL(e);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function c(e) {
|
|
11
|
+
return new Promise((t) => setTimeout(t, e));
|
|
12
|
+
}
|
|
13
|
+
function A(e) {
|
|
14
|
+
try {
|
|
15
|
+
const t = localStorage.getItem(e), a = t ? JSON.parse(t) : [];
|
|
16
|
+
return Array.isArray(a) ? a : [];
|
|
17
|
+
} catch {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function R() {
|
|
22
|
+
if (n || f() !== "local") return;
|
|
23
|
+
n = !0;
|
|
24
|
+
let e = 0;
|
|
25
|
+
try {
|
|
26
|
+
const t = [
|
|
27
|
+
{ storageKey: "eb:lib:sections", isTemplate: !1 },
|
|
28
|
+
{ storageKey: "eb:lib:layouts", isTemplate: !1 },
|
|
29
|
+
{ storageKey: "eb:lib:templates", isTemplate: !0 }
|
|
30
|
+
];
|
|
31
|
+
for (const { storageKey: a, isTemplate: o } of t) {
|
|
32
|
+
const u = A(a);
|
|
33
|
+
for (const s of u)
|
|
34
|
+
if (!(d(s.id) || !s.blocks?.length)) {
|
|
35
|
+
for (; M; ) await c(500);
|
|
36
|
+
try {
|
|
37
|
+
const l = {};
|
|
38
|
+
for (const r of s.blocks) l[r.id] = r.block;
|
|
39
|
+
const b = o ? "root" : s.blocks[0].id, m = y(l, b), i = await T(m, { timeoutMs: w });
|
|
40
|
+
if (i) {
|
|
41
|
+
const r = await S(i);
|
|
42
|
+
g(s.id, r), e++;
|
|
43
|
+
}
|
|
44
|
+
} catch {
|
|
45
|
+
}
|
|
46
|
+
await c(h);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} finally {
|
|
50
|
+
n = !1, e > 0 && p();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
R as generateMissingThumbnails
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { g as f, h as d, a as y, c as T, s as g, b as p } from "./index-DFHcCVv7.js";
|
|
2
|
+
const h = 200, w = 6e3;
|
|
3
|
+
let n = !1, M = !1;
|
|
4
|
+
function S(e) {
|
|
5
|
+
return new Promise((t, a) => {
|
|
6
|
+
const o = new FileReader();
|
|
7
|
+
o.onload = () => t(o.result), o.onerror = a, o.readAsDataURL(e);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function c(e) {
|
|
11
|
+
return new Promise((t) => setTimeout(t, e));
|
|
12
|
+
}
|
|
13
|
+
function A(e) {
|
|
14
|
+
try {
|
|
15
|
+
const t = localStorage.getItem(e), a = t ? JSON.parse(t) : [];
|
|
16
|
+
return Array.isArray(a) ? a : [];
|
|
17
|
+
} catch {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function R() {
|
|
22
|
+
if (n || f() !== "local") return;
|
|
23
|
+
n = !0;
|
|
24
|
+
let e = 0;
|
|
25
|
+
try {
|
|
26
|
+
const t = [
|
|
27
|
+
{ storageKey: "eb:lib:sections", isTemplate: !1 },
|
|
28
|
+
{ storageKey: "eb:lib:layouts", isTemplate: !1 },
|
|
29
|
+
{ storageKey: "eb:lib:templates", isTemplate: !0 }
|
|
30
|
+
];
|
|
31
|
+
for (const { storageKey: a, isTemplate: o } of t) {
|
|
32
|
+
const u = A(a);
|
|
33
|
+
for (const s of u)
|
|
34
|
+
if (!(d(s.id) || !s.blocks?.length)) {
|
|
35
|
+
for (; M; ) await c(500);
|
|
36
|
+
try {
|
|
37
|
+
const l = {};
|
|
38
|
+
for (const r of s.blocks) l[r.id] = r.block;
|
|
39
|
+
const b = o ? "root" : s.blocks[0].id, m = y(l, b), i = await T(m, { timeoutMs: w });
|
|
40
|
+
if (i) {
|
|
41
|
+
const r = await S(i);
|
|
42
|
+
g(s.id, r), e++;
|
|
43
|
+
}
|
|
44
|
+
} catch {
|
|
45
|
+
}
|
|
46
|
+
await c(h);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} finally {
|
|
50
|
+
n = !1, e > 0 && p();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
R as generateMissingThumbnails
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BatJsONT.cjs"),d=200,g=6e3;let i=!1,y=!1;function T(e){return new Promise((t,a)=>{const o=new FileReader;o.onload=()=>t(o.result),o.onerror=a,o.readAsDataURL(e)})}function u(e){return new Promise(t=>setTimeout(t,e))}function p(e){try{const t=localStorage.getItem(e),a=t?JSON.parse(t):[];return Array.isArray(a)?a:[]}catch{return[]}}async function h(){if(i||r.getComponentsStorageMode()!=="local")return;i=!0;let e=0;try{const t=[{storageKey:"eb:lib:sections",isTemplate:!1},{storageKey:"eb:lib:layouts",isTemplate:!1},{storageKey:"eb:lib:templates",isTemplate:!0}];for(const{storageKey:a,isTemplate:o}of t){const b=p(a);for(const n of b)if(!(r.hasLocalThumbnail(n.id)||!n.blocks?.length)){for(;y;)await u(500);try{const l={};for(const s of n.blocks)l[s.id]=s.block;const m=o?"root":n.blocks[0].id,f=r.buildSubtreeHtml(l,m),c=await r.captureSubtreeThumbnail(f,{timeoutMs:g});if(c){const s=await T(c);r.setLocalThumbnail(n.id,s),e++}}catch{}await u(d)}}}finally{i=!1,e>0&&r.bumpComponentsLibraryRefresh()}}exports.generateMissingThumbnails=h;
|