email-builder-online 3.5.1 → 3.5.2

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/dist/index.mjs CHANGED
@@ -20562,54 +20562,54 @@ const Fl = {
20562
20562
  size: "medium",
20563
20563
  buttonBackgroundColor: "#999999"
20564
20564
  };
20565
- function IU({ style: t, props: e, blockId: n }) {
20566
- const i = Qv(), r = yi(), o = !Kv(), s = e?.text ?? Fl.text, l = e?.url ?? Fl.url, c = r === "desktop" ? e?.fullWidth ?? !1 : e?.fullWidthMobile ?? e?.fullWidth ?? !1, u = t?.buttonTextColor ?? e?.buttonTextColor ?? i.textColor, d = t?.buttonBackgroundColor ?? e?.buttonBackgroundColor ?? Fl.buttonBackgroundColor, p = {
20565
+ function IU({ style: t, props: e, blockId: n, isNotClient: i = !1 }) {
20566
+ const r = Qv(), a = yi(), s = !Kv() && !i, l = e?.text ?? Fl.text, c = e?.url ?? Fl.url, u = a === "desktop" ? e?.fullWidth ?? !1 : e?.fullWidthMobile ?? e?.fullWidth ?? !1, d = t?.buttonTextColor ?? e?.buttonTextColor ?? r.textColor, p = t?.buttonBackgroundColor ?? e?.buttonBackgroundColor ?? Fl.buttonBackgroundColor, f = {
20567
20567
  backgroundColor: t?.backgroundColor ?? void 0,
20568
- textAlign: r == "desktop" ? t?.textAlign ?? void 0 : t?.textAlignMobile ?? t?.textAlign,
20569
- padding: uue(r == "desktop" ? t?.padding : t?.mobilePadding ?? t?.padding)
20570
- }, f = {
20571
- color: u,
20572
- fontSize: r == "desktop" ? t?.fontSize ?? 16 : t?.fontSizeMobile ?? t?.fontSize ?? 16,
20568
+ textAlign: a == "desktop" ? t?.textAlign ?? void 0 : t?.textAlignMobile ?? t?.textAlign,
20569
+ padding: uue(a == "desktop" ? t?.padding : t?.mobilePadding ?? t?.padding)
20570
+ }, m = {
20571
+ color: d,
20572
+ fontSize: a == "desktop" ? t?.fontSize ?? 16 : t?.fontSizeMobile ?? t?.fontSize ?? 16,
20573
20573
  fontFamily: ic(t?.fontFamily),
20574
20574
  fontWeight: t?.fontWeight ?? "bold",
20575
20575
  display: "inline-block",
20576
20576
  textDecoration: "none"
20577
- }, m = {
20577
+ }, h = {
20578
20578
  color: t?.borderColor,
20579
- top: r == "desktop" ? t?.borderTop ?? void 0 : t?.borderTopMobile ?? t?.borderTop,
20580
- bottom: r == "desktop" ? t?.borderBottom ?? void 0 : t?.borderBottomMobile ?? t?.borderBottom,
20581
- left: r == "desktop" ? t?.borderLeft ?? void 0 : t?.borderLeftMobile ?? t?.borderLeft,
20582
- right: r == "desktop" ? t?.borderRight ?? void 0 : t?.borderRightMobile ?? t?.borderRight
20583
- }, h = t?.background ?? "", g = t?.backgroundColor, b = g ? Bu(h, g) : h, y = xA(t), E = Zt(n);
20579
+ top: a == "desktop" ? t?.borderTop ?? void 0 : t?.borderTopMobile ?? t?.borderTop,
20580
+ bottom: a == "desktop" ? t?.borderBottom ?? void 0 : t?.borderBottomMobile ?? t?.borderBottom,
20581
+ left: a == "desktop" ? t?.borderLeft ?? void 0 : t?.borderLeftMobile ?? t?.borderLeft,
20582
+ right: a == "desktop" ? t?.borderRight ?? void 0 : t?.borderRightMobile ?? t?.borderRight
20583
+ }, g = t?.background ?? "", b = t?.backgroundColor, y = b ? Bu(g, b) : g, E = xA(t), v = Zt(n);
20584
20584
  return /* @__PURE__ */ _(
20585
20585
  sa,
20586
20586
  {
20587
- background: b,
20588
- backgroundColor: g,
20589
- padding: p.padding,
20590
- align: p.textAlign,
20587
+ background: y,
20588
+ backgroundColor: b,
20589
+ padding: f.padding,
20590
+ align: f.textAlign,
20591
20591
  width: "100%",
20592
- className: `c${E}`,
20592
+ className: `c${v}`,
20593
20593
  children: /* @__PURE__ */ _(
20594
20594
  "a",
20595
20595
  {
20596
- href: wA(l),
20596
+ href: wA(c),
20597
20597
  target: "_blank",
20598
- className: `abtn-${E}`,
20599
- onClick: o ? (v) => v.preventDefault() : void 0,
20598
+ className: `abtn-${v}`,
20599
+ onClick: s ? (T) => T.preventDefault() : void 0,
20600
20600
  children: /* @__PURE__ */ _(
20601
20601
  sa,
20602
20602
  {
20603
- className: E,
20604
- padding: r == "desktop" ? QO(e?.size) : QO(e?.sizeMobile ?? e?.size),
20605
- borderRadius: y,
20606
- background: d,
20607
- backgroundColor: d,
20603
+ className: v,
20604
+ padding: a == "desktop" ? QO(e?.size) : QO(e?.sizeMobile ?? e?.size),
20605
+ borderRadius: E,
20606
+ background: p,
20607
+ backgroundColor: p,
20608
20608
  isParent: !1,
20609
20609
  align: "center",
20610
- width: c ? "100%" : void 0,
20611
- border: m,
20612
- children: /* @__PURE__ */ _("span", { className: `btn${E}`, style: f, children: s })
20610
+ width: u ? "100%" : void 0,
20611
+ border: h,
20612
+ children: /* @__PURE__ */ _("span", { className: `btn${v}`, style: m, children: l })
20613
20613
  }
20614
20614
  )
20615
20615
  }
@@ -24328,7 +24328,7 @@ const $f = ot().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(), _8 = kt({
24328
24328
  }
24329
24329
  ) })
24330
24330
  ] });
24331
- }, ape = "email-builder-online", ope = "3.5.1", GS = {
24331
+ }, ape = "email-builder-online", ope = "3.5.2", GS = {
24332
24332
  name: ape,
24333
24333
  version: ope
24334
24334
  };
@@ -24583,12 +24583,12 @@ const mpe = kt({
24583
24583
  contentAlignment: Jn(["top", "middle", "bottom"]).optional().nullable()
24584
24584
  }).optional().nullable()
24585
24585
  }).passthrough();
24586
- function C8({ style: t, props: e, blockId: n }) {
24587
- const i = yi(), r = SA(), o = !Kv(), s = {
24588
- padding: tf(i == "desktop" ? t?.padding : t?.mobilePadding ?? t?.padding),
24586
+ function C8({ style: t, props: e, blockId: n, isNotClient: i = !1 }) {
24587
+ const r = yi(), a = SA(), s = !Kv() && !i, l = {
24588
+ padding: tf(r == "desktop" ? t?.padding : t?.mobilePadding ?? t?.padding),
24589
24589
  backgroundColor: t?.backgroundColor ?? void 0,
24590
- textAlign: i == "desktop" ? t?.textAlign ?? void 0 : t?.textAlignMobile ?? t?.textAlign ?? void 0
24591
- }, l = (y, E) => y === "fill" ? "100%" : y === "scale" ? `${E}%` : e?.width, c = e?.linkHref ?? null, u = i == "desktop" ? l(e?.size, e?.scale) : l(e?.sizeMobile, e?.scaleMobile), d = {
24590
+ textAlign: r == "desktop" ? t?.textAlign ?? void 0 : t?.textAlignMobile ?? t?.textAlign ?? void 0
24591
+ }, c = (E, v) => E === "fill" ? "100%" : E === "scale" ? `${v}%` : e?.width, u = e?.linkHref ?? null, d = r == "desktop" ? c(e?.size, e?.scale) : c(e?.sizeMobile, e?.scaleMobile), p = {
24592
24592
  position: "absolute",
24593
24593
  top: 0,
24594
24594
  left: 0,
@@ -24597,27 +24597,27 @@ function C8({ style: t, props: e, blockId: n }) {
24597
24597
  display: "flex",
24598
24598
  alignItems: "center",
24599
24599
  justifyContent: "center"
24600
- }, p = t?.background ?? "", f = t?.backgroundColor, m = f ? Bu(p, f) : p, h = (y) => {
24601
- const E = y.currentTarget;
24600
+ }, f = t?.background ?? "", m = t?.backgroundColor, h = m ? Bu(f, m) : f, g = (E) => {
24601
+ const v = E.currentTarget;
24602
24602
  setTimeout(() => {
24603
- if (!e?.width && E.offsetWidth) {
24604
- const v = E.offsetWidth;
24603
+ if (!e?.width && v.offsetWidth) {
24604
+ const T = v.offsetWidth;
24605
24605
  Ice(n, {
24606
24606
  ...e,
24607
- width: v
24607
+ width: T
24608
24608
  });
24609
24609
  }
24610
24610
  }, 100);
24611
- }, g = /* @__PURE__ */ U(it, { children: [
24611
+ }, b = /* @__PURE__ */ U(it, { children: [
24612
24612
  /* @__PURE__ */ _(
24613
24613
  "img",
24614
24614
  {
24615
24615
  alt: e?.alt ?? "",
24616
24616
  src: e?.url ?? "",
24617
- width: u,
24618
- onLoad: h,
24617
+ width: d,
24618
+ onLoad: g,
24619
24619
  style: {
24620
- width: u,
24620
+ width: d,
24621
24621
  height: "auto",
24622
24622
  outline: "none",
24623
24623
  border: "none",
@@ -24625,13 +24625,13 @@ function C8({ style: t, props: e, blockId: n }) {
24625
24625
  verticalAlign: e?.contentAlignment ?? "middle",
24626
24626
  display: "inline-block",
24627
24627
  maxWidth: "100%",
24628
- opacity: r.uploading && r.id === n ? 0.5 : 1,
24628
+ opacity: a.uploading && a.id === n ? 0.5 : 1,
24629
24629
  transition: "opacity 0.2s ease-in-out",
24630
24630
  borderRadius: xA(t)
24631
24631
  }
24632
24632
  }
24633
24633
  ),
24634
- r.uploading && r.id === n && /* @__PURE__ */ _("div", { style: d, children: /* @__PURE__ */ _(
24634
+ a.uploading && a.id === n && /* @__PURE__ */ _("div", { style: p, children: /* @__PURE__ */ _(
24635
24635
  "svg",
24636
24636
  {
24637
24637
  width: "24",
@@ -24651,23 +24651,23 @@ function C8({ style: t, props: e, blockId: n }) {
24651
24651
  children: /* @__PURE__ */ _("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
24652
24652
  }
24653
24653
  ) })
24654
- ] }), b = Zt(n);
24655
- return c ? /* @__PURE__ */ _(sa, { className: `${b}`, padding: s.padding, background: m, align: s.textAlign, width: "100%", children: /* @__PURE__ */ _(
24654
+ ] }), y = Zt(n);
24655
+ return u ? /* @__PURE__ */ _(sa, { className: `${y}`, padding: l.padding, background: h, align: l.textAlign, width: "100%", children: /* @__PURE__ */ _(
24656
24656
  "a",
24657
24657
  {
24658
- href: o ? void 0 : wA(c),
24658
+ href: s ? void 0 : wA(u),
24659
24659
  style: {
24660
24660
  textDecoration: "none",
24661
24661
  display: "block",
24662
24662
  width: "100%",
24663
24663
  height: "100%",
24664
- pointerEvents: o ? "none" : void 0
24664
+ pointerEvents: s ? "none" : void 0
24665
24665
  },
24666
- target: o ? void 0 : "_blank",
24667
- onClick: o ? (y) => y.preventDefault() : void 0,
24668
- children: g
24666
+ target: s ? void 0 : "_blank",
24667
+ onClick: s ? (E) => E.preventDefault() : void 0,
24668
+ children: b
24669
24669
  }
24670
- ) }) : /* @__PURE__ */ _(sa, { className: `${b}`, padding: s.padding, background: m, align: s.textAlign, width: "100%", children: g });
24670
+ ) }) : /* @__PURE__ */ _(sa, { className: `${y}`, padding: l.padding, background: h, align: l.textAlign, width: "100%", children: b });
24671
24671
  }
24672
24672
  const hpe = (t, e, n) => {
24673
24673
  const i = yi();
@@ -25362,16 +25362,38 @@ const SM = ot().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(), CM = kt({
25362
25362
  ),
25363
25363
  gapMobile: Pe().optional()
25364
25364
  }).passthrough();
25365
- function k8({ style: t, items: e, blockId: n, gap: i = 1, gapMobile: r }) {
25366
- const a = yi(), o = t?.background ?? "", s = t?.backgroundColor, l = s ? Bu(o, s) : o, c = (a === "desktop" ? t?.textAlign : t?.textAlignMobile ?? t?.textAlign) ?? void 0, u = {
25367
- background: l,
25365
+ function k8({
25366
+ style: t,
25367
+ items: e,
25368
+ blockId: n,
25369
+ gap: i = 1,
25370
+ gapMobile: r,
25371
+ isNotClient: a = !1
25372
+ }) {
25373
+ const o = yi(), s = t?.background ?? "", l = t?.backgroundColor, c = l ? Bu(s, l) : s, u = (o === "desktop" ? t?.textAlign : t?.textAlignMobile ?? t?.textAlign) ?? void 0, d = {
25374
+ background: c,
25368
25375
  backgroundColor: t?.backgroundColor,
25369
- textAlign: c,
25370
- padding: tf(a === "desktop" ? t?.padding : t?.mobilePadding ?? t?.padding)
25371
- }, d = a === "desktop" ? i : r ?? i, p = Zt(n), m = !Kv();
25372
- return /* @__PURE__ */ _(ype, { blockId: `${p}`, items: e, wStyle: u, gap: d, isEditorMode: m });
25376
+ textAlign: u,
25377
+ padding: tf(o === "desktop" ? t?.padding : t?.mobilePadding ?? t?.padding)
25378
+ }, p = o === "desktop" ? i : r ?? i, f = Zt(n), h = !Kv() && !a;
25379
+ return /* @__PURE__ */ _(
25380
+ ype,
25381
+ {
25382
+ blockId: `${f}`,
25383
+ items: e,
25384
+ wStyle: d,
25385
+ gap: p,
25386
+ guardLinksWhileEditingOnCanvas: h
25387
+ }
25388
+ );
25373
25389
  }
25374
- const ype = ({ items: t, blockId: e, wStyle: n, gap: i, isEditorMode: r }) => {
25390
+ const ype = ({
25391
+ items: t,
25392
+ blockId: e,
25393
+ wStyle: n,
25394
+ gap: i,
25395
+ guardLinksWhileEditingOnCanvas: r
25396
+ }) => {
25375
25397
  const a = (o) => {
25376
25398
  switch (o) {
25377
25399
  case 0:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "email-builder-online",
3
- "version": "3.5.1",
3
+ "version": "3.5.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",