@charisol/plexo-sdk 1.4.12 → 1.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.
@@ -698,7 +698,7 @@ var q = (g) => {
698
698
  case "order_confirmation":
699
699
  case "order_tracking": {
700
700
  let e = g.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = P(_);
701
- return `<div${C} data-plexo-commerce-${e}="true"${V("data-plexo-product-id", S.productId)}${V("data-plexo-service-id", S.serviceId)}${V("data-plexo-commerce-mode", S.mode)} style="${t}"></div>`;
701
+ return `<div${C} data-plexo-commerce-${e}="true"${V("data-plexo-product-id", S.productId)}${V("data-plexo-service-id", S.serviceId)}${V("data-plexo-commerce-mode", S.mode)}${S.storeMode === !1 ? " data-plexo-commerce-store-mode=\"false\"" : ""}${V("data-plexo-commerce-limit", S.limit)}${V("data-plexo-commerce-category", S.category)}${V("data-plexo-commerce-sort", S.sort)}${V("data-plexo-commerce-items-per-row", S.itemsPerRow)}${V("data-plexo-commerce-items-per-page", S.itemsPerPage)}${S.paginated ? " data-plexo-commerce-paginated=\"true\"" : ""} style="${t}"></div>`;
702
702
  }
703
703
  case "social": {
704
704
  let e = r(g), t = _.textAlign === "center" ? "center" : _.textAlign === "right" ? "flex-end" : "flex-start";
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./compiler-CbOB0Sbc.js";
1
+ import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./compiler-CHtTI8Yn.js";
2
2
  export { l as DEFAULT_BODY_FONT_FAMILY, a as FORM_NON_CSS_STYLE_KEYS, s as collectResponsiveRule, r as compileToHTML, e as compileToHTMLWithStrataAuto, o as compileToPlainText, c as convertSectionRowToPlexoRow, t as getFormDefaultStyle, i as getInlineStylesImportant, u as htmlToPlainText, n as injectStrataBundle };
@@ -333,7 +333,7 @@ var v = "https://cdn.jsdelivr.net/npm/@charisol/plexo-sdk@latest/dist/social-ico
333
333
  case "cart_summary":
334
334
  case "checkout_flow":
335
335
  case "order_confirmation":
336
- case "order_tracking": return `${j}<div${h}${y} data-plexo-commerce-${l.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${p.productId ? ` data-plexo-product-id="${b(p.productId)}"` : ""}${p.serviceId ? ` data-plexo-service-id="${b(p.serviceId)}"` : ""}${p.mode ? ` data-plexo-commerce-mode="${b(p.mode)}"` : ""} style="${m}"></div>`;
336
+ case "order_tracking": return `${j}<div${h}${y} data-plexo-commerce-${l.type.replace(/_([a-z])/g, (e, t) => t.toUpperCase())}="true"${p.productId ? ` data-plexo-product-id="${b(p.productId)}"` : ""}${p.serviceId ? ` data-plexo-service-id="${b(p.serviceId)}"` : ""}${p.mode ? ` data-plexo-commerce-mode="${b(p.mode)}"` : ""}${p.storeMode === !1 ? " data-plexo-commerce-store-mode=\"false\"" : ""}${p.limit ? ` data-plexo-commerce-limit="${b(String(p.limit))}"` : ""}${p.category ? ` data-plexo-commerce-category="${b(p.category)}"` : ""}${p.sort ? ` data-plexo-commerce-sort="${b(p.sort)}"` : ""}${p.itemsPerRow ? ` data-plexo-commerce-items-per-row="${b(String(p.itemsPerRow))}"` : ""}${p.itemsPerPage ? ` data-plexo-commerce-items-per-page="${b(String(p.itemsPerPage))}"` : ""}${p.paginated ? " data-plexo-commerce-paginated=\"true\"" : ""} style="${m}"></div>`;
337
337
  default: return `${j}<div${h}${y} style="${m}">${b(p.text || "")}</div>`;
338
338
  }
339
339
  }, z = (e, t, n) => {
@@ -1,2 +1,2 @@
1
- import { t as e } from "./compilerClient-vhOvubPV.js";
1
+ import { t as e } from "./compilerClient-BIrZIgfG.js";
2
2
  export { e as parseJsonToTargetFormat };
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { i as e, n as t, o as n, r, s as i, t as a } from "./sanitizeCompiledHtml-CxbxAYRH.js";
1
+ import { i as e, n as t, o as n, r, s as i, t as a } from "./sanitizeCompiledHtml-DoiJcfDC.js";
2
2
  import { S as o, _ as s, a as c, b as l, c as u, f as d, h as f, i as p, l as m, o as h, p as g, s as _, u as v, x as y, y as b } from "./iconSvgStatic-CGue7nyp.js";
3
- import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-CbOB0Sbc.js";
4
- import { t as ne } from "./compilerClient-vhOvubPV.js";
3
+ import { a as x, d as S, f as C, i as ee, o as te, u as w } from "./compiler-CHtTI8Yn.js";
4
+ import { t as ne } from "./compilerClient-BIrZIgfG.js";
5
5
  import T, { createContext as re, createElement as ie, forwardRef as ae, useCallback as oe, useContext as se, useEffect as E, useImperativeHandle as ce, useMemo as D, useRef as O, useState as k } from "react";
6
6
  import { DndContext as le, DragOverlay as ue, MeasuringStrategy as de, PointerSensor as fe, TouchSensor as pe, pointerWithin as me, rectIntersection as he, useDraggable as A, useDroppable as ge, useSensor as j, useSensors as _e } from "@dnd-kit/core";
7
7
  import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
@@ -1895,7 +1895,7 @@ async function Et(e, t) {
1895
1895
  let n = ne(e, "email", {
1896
1896
  instrument: !0,
1897
1897
  canvasEditorPadding: !0
1898
- }), { compileMjmlInBrowser: i } = await import("./mjmlBrowser-v13G5nO0.js"), { html: a, errors: o } = i(n, { validationLevel: "soft" });
1898
+ }), { compileMjmlInBrowser: i } = await import("./mjmlBrowser-CpKNB3HB.js"), { html: a, errors: o } = i(n, { validationLevel: "soft" });
1899
1899
  return {
1900
1900
  html: a,
1901
1901
  error: o.length > 0 ? o.map((e) => e.message ?? e.formattedMessage ?? "Unknown MJML error").join("; ") : null
@@ -8697,6 +8697,7 @@ var Gu = [
8697
8697
  };
8698
8698
  case "product": return { productId: null };
8699
8699
  case "booking": return { serviceId: null };
8700
+ case "shop_grid": return { storeMode: !0 };
8700
8701
  default: return {};
8701
8702
  }
8702
8703
  }, ld = {
@@ -1,4 +1,4 @@
1
- import { a as e, s as t } from "./sanitizeCompiledHtml-CxbxAYRH.js";
1
+ import { a as e, s as t } from "./sanitizeCompiledHtml-DoiJcfDC.js";
2
2
  //#endregion
3
3
  //#region src/utilities/mjmlBrowser.ts
4
4
  var n = /* @__PURE__ */ t((/* @__PURE__ */ e(((e, t) => {
package/dist/sanitize.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-CxbxAYRH.js";
1
+ import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-DoiJcfDC.js";
2
2
  export { n as ALLOWED_ATTR, e as ALLOWED_TAGS, t as sanitizeCompiledHtml };
@@ -5043,7 +5043,7 @@ function ir(e) {
5043
5043
  }
5044
5044
  return n.join("; ");
5045
5045
  }
5046
- var ar = /* @__PURE__ */ "html.head.body.title.meta.style.link.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside".split("."), or = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.data-*".split("."), sr = [
5046
+ var ar = /* @__PURE__ */ "html.head.body.title.meta.style.link.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside.g.circle.rect.line.polyline.polygon.ellipse.defs.lineargradient.radialgradient.stop.clippath.use.text.tspan".split("."), or = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.cx.cy.r.rx.ry.x1.y1.x2.y2.points.transform.stroke-width.stroke-linecap.stroke-linejoin.stroke-dasharray.opacity.stop-color.stop-opacity.offset.clip-path.gradientunits.preserveaspectratio.text-anchor.dominant-baseline.font-size.letter-spacing.data-*".split("."), sr = [
5047
5047
  "javascript:",
5048
5048
  "vbscript:",
5049
5049
  "data:"
@@ -964,6 +964,7 @@ export declare const getDefaultAttributes: (type: string) => {
964
964
  items?: undefined;
965
965
  productId?: undefined;
966
966
  serviceId?: undefined;
967
+ storeMode?: undefined;
967
968
  } | {
968
969
  text: string;
969
970
  href: string;
@@ -999,6 +1000,7 @@ export declare const getDefaultAttributes: (type: string) => {
999
1000
  items?: undefined;
1000
1001
  productId?: undefined;
1001
1002
  serviceId?: undefined;
1003
+ storeMode?: undefined;
1002
1004
  } | {
1003
1005
  src: string;
1004
1006
  alt: string;
@@ -1034,6 +1036,7 @@ export declare const getDefaultAttributes: (type: string) => {
1034
1036
  items?: undefined;
1035
1037
  productId?: undefined;
1036
1038
  serviceId?: undefined;
1039
+ storeMode?: undefined;
1037
1040
  } | {
1038
1041
  title: string;
1039
1042
  description: string;
@@ -1069,6 +1072,7 @@ export declare const getDefaultAttributes: (type: string) => {
1069
1072
  items?: undefined;
1070
1073
  productId?: undefined;
1071
1074
  serviceId?: undefined;
1075
+ storeMode?: undefined;
1072
1076
  } | {
1073
1077
  formName: string;
1074
1078
  submitLabel: string;
@@ -1104,6 +1108,7 @@ export declare const getDefaultAttributes: (type: string) => {
1104
1108
  items?: undefined;
1105
1109
  productId?: undefined;
1106
1110
  serviceId?: undefined;
1111
+ storeMode?: undefined;
1107
1112
  } | {
1108
1113
  name: string;
1109
1114
  placeholder: string;
@@ -1139,6 +1144,7 @@ export declare const getDefaultAttributes: (type: string) => {
1139
1144
  items?: undefined;
1140
1145
  productId?: undefined;
1141
1146
  serviceId?: undefined;
1147
+ storeMode?: undefined;
1142
1148
  } | {
1143
1149
  name: string;
1144
1150
  options: {
@@ -1177,6 +1183,7 @@ export declare const getDefaultAttributes: (type: string) => {
1177
1183
  items?: undefined;
1178
1184
  productId?: undefined;
1179
1185
  serviceId?: undefined;
1186
+ storeMode?: undefined;
1180
1187
  } | {
1181
1188
  links: {
1182
1189
  label: string;
@@ -1215,6 +1222,7 @@ export declare const getDefaultAttributes: (type: string) => {
1215
1222
  items?: undefined;
1216
1223
  productId?: undefined;
1217
1224
  serviceId?: undefined;
1225
+ storeMode?: undefined;
1218
1226
  } | {
1219
1227
  htmlContent: string;
1220
1228
  text?: undefined;
@@ -1250,6 +1258,7 @@ export declare const getDefaultAttributes: (type: string) => {
1250
1258
  items?: undefined;
1251
1259
  productId?: undefined;
1252
1260
  serviceId?: undefined;
1261
+ storeMode?: undefined;
1253
1262
  } | {
1254
1263
  rowCount: number;
1255
1264
  colCount: number;
@@ -1285,6 +1294,7 @@ export declare const getDefaultAttributes: (type: string) => {
1285
1294
  items?: undefined;
1286
1295
  productId?: undefined;
1287
1296
  serviceId?: undefined;
1297
+ storeMode?: undefined;
1288
1298
  } | {
1289
1299
  targetDate: string;
1290
1300
  text?: undefined;
@@ -1320,6 +1330,7 @@ export declare const getDefaultAttributes: (type: string) => {
1320
1330
  items?: undefined;
1321
1331
  productId?: undefined;
1322
1332
  serviceId?: undefined;
1333
+ storeMode?: undefined;
1323
1334
  } | {
1324
1335
  videoUrl: string;
1325
1336
  text?: undefined;
@@ -1355,6 +1366,7 @@ export declare const getDefaultAttributes: (type: string) => {
1355
1366
  items?: undefined;
1356
1367
  productId?: undefined;
1357
1368
  serviceId?: undefined;
1369
+ storeMode?: undefined;
1358
1370
  } | {
1359
1371
  links: {
1360
1372
  provider: string;
@@ -1393,6 +1405,7 @@ export declare const getDefaultAttributes: (type: string) => {
1393
1405
  items?: undefined;
1394
1406
  productId?: undefined;
1395
1407
  serviceId?: undefined;
1408
+ storeMode?: undefined;
1396
1409
  } | {
1397
1410
  images: {
1398
1411
  src: string;
@@ -1431,6 +1444,7 @@ export declare const getDefaultAttributes: (type: string) => {
1431
1444
  items?: undefined;
1432
1445
  productId?: undefined;
1433
1446
  serviceId?: undefined;
1447
+ storeMode?: undefined;
1434
1448
  } | {
1435
1449
  iconName: string;
1436
1450
  iconSize: string;
@@ -1466,6 +1480,7 @@ export declare const getDefaultAttributes: (type: string) => {
1466
1480
  items?: undefined;
1467
1481
  productId?: undefined;
1468
1482
  serviceId?: undefined;
1483
+ storeMode?: undefined;
1469
1484
  } | {
1470
1485
  mode: string;
1471
1486
  iconStyle: string;
@@ -1507,6 +1522,7 @@ export declare const getDefaultAttributes: (type: string) => {
1507
1522
  iconSize?: undefined;
1508
1523
  productId?: undefined;
1509
1524
  serviceId?: undefined;
1525
+ storeMode?: undefined;
1510
1526
  } | {
1511
1527
  productId: null;
1512
1528
  text?: undefined;
@@ -1542,6 +1558,7 @@ export declare const getDefaultAttributes: (type: string) => {
1542
1558
  showDividers?: undefined;
1543
1559
  items?: undefined;
1544
1560
  serviceId?: undefined;
1561
+ storeMode?: undefined;
1545
1562
  } | {
1546
1563
  serviceId: null;
1547
1564
  text?: undefined;
@@ -1577,7 +1594,9 @@ export declare const getDefaultAttributes: (type: string) => {
1577
1594
  showDividers?: undefined;
1578
1595
  items?: undefined;
1579
1596
  productId?: undefined;
1597
+ storeMode?: undefined;
1580
1598
  } | {
1599
+ storeMode: boolean;
1581
1600
  text?: undefined;
1582
1601
  href?: undefined;
1583
1602
  openInNewTab?: undefined;
@@ -1612,4 +1631,40 @@ export declare const getDefaultAttributes: (type: string) => {
1612
1631
  items?: undefined;
1613
1632
  productId?: undefined;
1614
1633
  serviceId?: undefined;
1634
+ } | {
1635
+ text?: undefined;
1636
+ href?: undefined;
1637
+ openInNewTab?: undefined;
1638
+ autoWidth?: undefined;
1639
+ src?: undefined;
1640
+ alt?: undefined;
1641
+ linkType?: undefined;
1642
+ title?: undefined;
1643
+ description?: undefined;
1644
+ formName?: undefined;
1645
+ submitLabel?: undefined;
1646
+ fields?: undefined;
1647
+ buttonAutoWidth?: undefined;
1648
+ name?: undefined;
1649
+ placeholder?: undefined;
1650
+ required?: undefined;
1651
+ options?: undefined;
1652
+ links?: undefined;
1653
+ htmlContent?: undefined;
1654
+ rowCount?: undefined;
1655
+ colCount?: undefined;
1656
+ targetDate?: undefined;
1657
+ videoUrl?: undefined;
1658
+ images?: undefined;
1659
+ iconName?: undefined;
1660
+ iconSize?: undefined;
1661
+ mode?: undefined;
1662
+ iconStyle?: undefined;
1663
+ iconPosition?: undefined;
1664
+ animation?: undefined;
1665
+ showDividers?: undefined;
1666
+ items?: undefined;
1667
+ productId?: undefined;
1668
+ serviceId?: undefined;
1669
+ storeMode?: undefined;
1615
1670
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.4.12",
4
+ "version": "1.4.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",