@charisol/plexo-sdk 1.0.13 → 1.0.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.
Files changed (2) hide show
  1. package/dist/compiler.js +18 -9
  2. package/package.json +1 -1
package/dist/compiler.js CHANGED
@@ -352,11 +352,20 @@ var t = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
352
352
  "htmlTitle"
353
353
  ]) s[e] === void 0 && (a[e] === void 0 ? n[e] !== void 0 && (s[e] = n[e]) : s[e] = a[e]);
354
354
  s.backgroundColor && !s.background ? s.background = s.backgroundColor : s.background && !s.backgroundColor && (s.backgroundColor = s.background), s.textColor && !s.color && (s.color = s.textColor);
355
- let c = t(s), l = typeof s.htmlTitle == "string" && s.htmlTitle.trim() ? s.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", u = i("id", s.htmlId), d = i("class", s.htmlClass), f = typeof s.customCss == "string" && s.customCss.trim() ? s.customCss.trim() : "", p = typeof s.customJs == "string" && s.customJs.trim() ? s.customJs.trim() : "", m = `<!DOCTYPE html>
355
+ let c = [
356
+ "htmlTitle",
357
+ "htmlId",
358
+ "htmlClass",
359
+ "customCss",
360
+ "customJs",
361
+ "textColor"
362
+ ], l = {};
363
+ for (let e of Object.keys(s)) c.includes(e) || (l[e] = s[e]);
364
+ let u = t(l), d = typeof s.htmlTitle == "string" && s.htmlTitle.trim() ? s.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", f = i("id", s.htmlId), p = i("class", s.htmlClass), m = typeof s.customCss == "string" && s.customCss.trim() ? s.customCss.trim() : "", h = typeof s.customJs == "string" && s.customJs.trim() ? s.customJs.trim() : "", g = `<!DOCTYPE html>
356
365
  <html>
357
366
  <head>
358
367
  <meta charset="utf-8">
359
- <title>${r(l)}</title>
368
+ <title>${r(d)}</title>
360
369
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
361
370
  <style>
362
371
  body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
@@ -375,15 +384,15 @@ var t = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
375
384
  }
376
385
  }
377
386
  </style>
378
- ${f ? `<style>\n${f}\n </style>` : ""}
387
+ ${m ? `<style>\n${m}\n </style>` : ""}
379
388
  </head>
380
- <body${u}${d} style="${c}">
381
- <div style="max-width: 1200px; margin: 0 auto; width: 100%;">`, h = Array.isArray(a.rows) ? a.rows : Array.isArray(n.rows) ? n.rows : Array.isArray(e.rows) ? e.rows : [];
382
- for (let e of h) m += o(e);
383
- return m += `\n </div>
384
- ${p ? ` <script>\n${p}\n <\/script>` : ""}
389
+ <body${f}${p} style="${u}">
390
+ <div style="max-width: 1200px; margin: 0 auto; width: 100%;">`, _ = Array.isArray(a.rows) ? a.rows : Array.isArray(n.rows) ? n.rows : Array.isArray(e.rows) ? e.rows : [];
391
+ for (let e of _) g += o(e);
392
+ return g += `\n </div>
393
+ ${h ? ` <script>\n${h}\n <\/script>` : ""}
385
394
  </body>
386
- </html>`, m;
395
+ </html>`, g;
387
396
  };
388
397
  function c(e) {
389
398
  return s(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.0.13",
4
+ "version": "1.0.14",
5
5
  "description": "Plexo visual email and landing page builder SDK — drag-and-drop template editor with AI integration.",
6
6
  "keywords": [
7
7
  "email-builder",