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.
@@ -0,0 +1,36 @@
1
+ import { b as d } from "./standalone-DwQRIC9h.js";
2
+ const m = "eb:lib:templates", a = "eb:lib:themes", b = "eb:lib:sections", p = "eb:lib:layouts", g = "eb:lib:primitives", c = "eb:lib:seeded";
3
+ function l(e) {
4
+ try {
5
+ const s = localStorage.getItem(e), o = s ? JSON.parse(s) : [];
6
+ return Array.isArray(o) ? o : [];
7
+ } catch {
8
+ return [];
9
+ }
10
+ }
11
+ function n(e, s) {
12
+ if (!s?.length) return;
13
+ const o = l(e), r = new Set(o.map((t) => t.id)), i = s.filter((t) => !r.has(t.id));
14
+ i.length && localStorage.setItem(e, JSON.stringify([...o, ...i]));
15
+ }
16
+ async function f() {
17
+ const { default: e } = await import("./localPresets-57l3x2SK.js"), s = e.version ?? "1";
18
+ if (localStorage.getItem(c) !== s) {
19
+ if (n(m, e.templates), n(b, e.sections), n(p, e.layouts), n(g, e.primitives), e.themes?.length) {
20
+ const o = l(a), r = new Set(o.map((t) => t.id)), i = e.themes.filter((t) => !r.has(t.id)).map((t) => ({
21
+ id: t.id,
22
+ name: t.name,
23
+ description: t.description,
24
+ createdAt: t.createdAt,
25
+ updatedAt: t.updatedAt,
26
+ globals: t.globals,
27
+ blocks: t.blocks
28
+ }));
29
+ i.length && localStorage.setItem(a, JSON.stringify([...o, ...i]));
30
+ }
31
+ localStorage.setItem(c, s), d();
32
+ }
33
+ }
34
+ export {
35
+ f as seedLocalLibrary
36
+ };
@@ -0,0 +1,36 @@
1
+ import { b as d } from "./index-DFHcCVv7.js";
2
+ const m = "eb:lib:templates", a = "eb:lib:themes", b = "eb:lib:sections", p = "eb:lib:layouts", g = "eb:lib:primitives", c = "eb:lib:seeded";
3
+ function l(e) {
4
+ try {
5
+ const s = localStorage.getItem(e), o = s ? JSON.parse(s) : [];
6
+ return Array.isArray(o) ? o : [];
7
+ } catch {
8
+ return [];
9
+ }
10
+ }
11
+ function n(e, s) {
12
+ if (!s?.length) return;
13
+ const o = l(e), r = new Set(o.map((t) => t.id)), i = s.filter((t) => !r.has(t.id));
14
+ i.length && localStorage.setItem(e, JSON.stringify([...o, ...i]));
15
+ }
16
+ async function f() {
17
+ const { default: e } = await import("./localPresets-57l3x2SK.js"), s = e.version ?? "1";
18
+ if (localStorage.getItem(c) !== s) {
19
+ if (n(m, e.templates), n(b, e.sections), n(p, e.layouts), n(g, e.primitives), e.themes?.length) {
20
+ const o = l(a), r = new Set(o.map((t) => t.id)), i = e.themes.filter((t) => !r.has(t.id)).map((t) => ({
21
+ id: t.id,
22
+ name: t.name,
23
+ description: t.description,
24
+ createdAt: t.createdAt,
25
+ updatedAt: t.updatedAt,
26
+ globals: t.globals,
27
+ blocks: t.blocks
28
+ }));
29
+ i.length && localStorage.setItem(a, JSON.stringify([...o, ...i]));
30
+ }
31
+ localStorage.setItem(c, s), d();
32
+ }
33
+ }
34
+ export {
35
+ f as seedLocalLibrary
36
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-BatJsONT.cjs"),b="eb:lib:templates",a="eb:lib:themes",m="eb:lib:sections",g="eb:lib:layouts",S="eb:lib:primitives",c="eb:lib:seeded";function l(t){try{const s=localStorage.getItem(t),r=s?JSON.parse(s):[];return Array.isArray(r)?r:[]}catch{return[]}}function o(t,s){if(!s?.length)return;const r=l(t),n=new Set(r.map(e=>e.id)),i=s.filter(e=>!n.has(e.id));i.length&&localStorage.setItem(t,JSON.stringify([...r,...i]))}async function u(){const{default:t}=await Promise.resolve().then(()=>require("./localPresets-CdsQZFO1.cjs")),s=t.version??"1";if(localStorage.getItem(c)!==s){if(o(b,t.templates),o(m,t.sections),o(g,t.layouts),o(S,t.primitives),t.themes?.length){const r=l(a),n=new Set(r.map(e=>e.id)),i=t.themes.filter(e=>!n.has(e.id)).map(e=>({id:e.id,name:e.name,description:e.description,createdAt:e.createdAt,updatedAt:e.updatedAt,globals:e.globals,blocks:e.blocks}));i.length&&localStorage.setItem(a,JSON.stringify([...r,...i]))}localStorage.setItem(c,s),d.bumpComponentsLibraryRefresh()}}exports.seedLocalLibrary=u;