@emailmaker/emailmaker 1.1.49 → 1.1.53

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 (34) hide show
  1. package/{emailmaker-core.686599cb.js → emailmaker-core.2cbaea2b.js} +6 -6
  2. package/emailmaker-esm.js +3 -3
  3. package/emailmaker.js +3 -3
  4. package/iframe/js/amp.V09Q6hy6.js +1 -1
  5. package/iframe/js/iframe-eblock.js +1 -1
  6. package/iframe/js/iframe.js +1 -1
  7. package/iframe/js/rules.B-wCbIo7.js +1 -1
  8. package/npm-publish.manifest.json +7 -7
  9. package/package.json +1 -1
  10. package/runtime/THIRD_PARTY_LICENSES.txt +1 -1
  11. package/singlepage_headless_plugin.html +1 -1
  12. package/static/core/342d650a.js +467 -0
  13. package/static/core/{28d0ee07.js → 3bff559e.js} +321 -321
  14. package/static/core/{1724d302.js → 4a0c3723.js} +179 -173
  15. package/static/core/{2638406e.js → 4a151a86.js} +41 -41
  16. package/static/core/{c78634e5.js → 4f1afec5.js} +616 -611
  17. package/static/core/{7b48c5bf.js → 57d41489.js} +524 -510
  18. package/static/core/{b61ea992.js → 61a44678.js} +4028 -3892
  19. package/static/core/{cf9b492f.js → 704587a1.js} +34 -34
  20. package/static/core/{f5401fe7.js → 75e0e02f.js} +31 -31
  21. package/static/core/{e19a9688.js → 7e999d72.js} +514 -494
  22. package/static/core/{c9f81757.js → 7f43dc55.js} +7 -7
  23. package/static/core/{dde3447a.js → 83b6ffb1.js} +12970 -12926
  24. package/static/core/{bfec1c65.js → 956da3cd.js} +5156 -5116
  25. package/static/core/{23692b142.js → 9e7e9aa52.js} +10 -10
  26. package/static/core/{5cd9928a.js → abb0338c.js} +107 -107
  27. package/static/core/{35b2febf.js → b3475019.js} +3 -3
  28. package/static/core/{5a79f04d.js → cc1487fb.js} +3 -3
  29. package/static/core/{67b72215.js → d745f656.js} +1267 -1265
  30. package/two_step_headless_plugin.html +1 -1
  31. package/ui-kit/index.js +49 -47
  32. package/static/core/2c90e83d.js +0 -467
  33. /package/iframe/{iframe-eblock.686599cb.html → iframe-eblock.2cbaea2b.html} +0 -0
  34. /package/iframe/{iframe.686599cb.html → iframe.2cbaea2b.html} +0 -0
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <title>Two-step flow: design → subject/preheader (headless)</title>
6
- <script id="plugin-script" type="text/javascript" src="emailmaker.js?686599cb"></script>
6
+ <script id="plugin-script" type="text/javascript" src="emailmaker.js?2cbaea2b"></script>
7
7
  <style>
8
8
  body {
9
9
  margin: 0;
package/ui-kit/index.js CHANGED
@@ -4910,51 +4910,52 @@ var { Option: Pp } = of, Fp = ({ options: e, position: t, setPosition: n, unit:
4910
4910
  className: "limits-counter-extra",
4911
4911
  children: o
4912
4912
  })]
4913
- }), Lp = "draggable-input-number__handle", $ = t.forwardRef(({ dragspeed: e = 1, prefix: t, ...n }, r) => {
4914
- let [i, a] = f(!1), [s, l] = f(0), [u, d] = f(n.value || n.defaultValue || null), [p, m] = f(n.value || n.defaultValue || null), h = (e) => {
4915
- e.target.closest?.(`.${Lp}`) && (e.preventDefault(), a(!0), l(e.clientX), d(p));
4916
- }, g = () => a(!1), _ = o((t) => {
4917
- if (i) {
4918
- let r = t.clientX - s, i = (u || 0) + r * e;
4919
- i = Math.max(0, Math.round(i)), n.max !== void 0 && (i = Math.min(i, Number(n.max))), n.min !== void 0 && (i = Math.max(i, Number(n.min))), m(i), n.onChange && n.onChange(i);
4913
+ }), Lp = "draggable-input-number__handle", $ = t.forwardRef(({ dragspeed: e = 1, prefix: t, onChange: n, ...r }, i) => {
4914
+ let [a, s] = f(!1), [l, u] = f(0), [d, p] = f(null), m = r.value !== void 0, [h, g] = f(!1), [_, v] = f(null), [y, b] = f(null), x = h ? _ : r.defaultValue ?? null, S = a && y !== null ? y : m ? r.value ?? null : x, C = o((e) => {
4915
+ m || (g(!0), v(e));
4916
+ }, [m]), w = o((e) => {
4917
+ C(e), n?.(e);
4918
+ }, [C, n]), T = (e) => {
4919
+ e.target.closest?.(`.${Lp}`) && (e.preventDefault(), s(!0), u(e.clientX), p(S));
4920
+ }, E = o(() => {
4921
+ s(!1), b(null);
4922
+ }, []), D = o((t) => {
4923
+ if (a) {
4924
+ let i = t.clientX - l, a = (d || 0) + i * e;
4925
+ a = Math.max(0, Math.round(a)), r.max !== void 0 && (a = Math.min(a, Number(r.max))), r.min !== void 0 && (a = Math.max(a, Number(r.min))), b(a), C(a), n?.(a);
4920
4926
  }
4921
4927
  }, [
4922
- i,
4923
- n.onChange,
4924
- n.max,
4925
- n.min,
4926
- u,
4927
- s,
4928
- e
4929
- ]);
4930
- c(() => {
4931
- n.value !== void 0 && n.value !== null ? m(n.value) : n.defaultValue !== void 0 && n.defaultValue !== null ? m(n.defaultValue) : m(null);
4932
- }, [n.value, n.defaultValue]), c(() => (document.addEventListener("mouseup", g), document.addEventListener("mousemove", _), () => {
4933
- document.removeEventListener("mouseup", g), document.removeEventListener("mousemove", _);
4934
- }), [
4935
- i,
4936
- s,
4937
- u,
4938
- _
4928
+ a,
4929
+ n,
4930
+ r.max,
4931
+ r.min,
4932
+ d,
4933
+ l,
4934
+ e,
4935
+ C
4939
4936
  ]);
4940
- let v = t == null ? t : /* @__PURE__ */ F("span", {
4937
+ c(() => (document.addEventListener("mouseup", E), document.addEventListener("mousemove", D), () => {
4938
+ document.removeEventListener("mouseup", E), document.removeEventListener("mousemove", D);
4939
+ }), [E, D]);
4940
+ let ee = t == null ? t : /* @__PURE__ */ F("span", {
4941
4941
  role: "none",
4942
4942
  className: Lp,
4943
4943
  children: t
4944
4944
  });
4945
4945
  return /* @__PURE__ */ I("div", {
4946
4946
  role: "none",
4947
- onMouseDown: h,
4947
+ onMouseDown: T,
4948
4948
  children: [/* @__PURE__ */ F($d, {
4949
- ...n,
4950
- ref: r,
4951
- value: p,
4952
- prefix: v,
4949
+ ...r,
4950
+ ref: i,
4951
+ value: S,
4952
+ onChange: w,
4953
+ prefix: ee,
4953
4954
  className: "input-draggable"
4954
- }), i && /* @__PURE__ */ F("div", {
4955
+ }), a && /* @__PURE__ */ F("div", {
4955
4956
  role: "none",
4956
4957
  className: "draggable-input-number-overlay",
4957
- onMouseUp: g
4958
+ onMouseUp: E
4958
4959
  })]
4959
4960
  });
4960
4961
  }), Rp = (e) => e?.closest(".blocks-app") || (e?.ownerDocument?.body ?? document.body);
@@ -4971,13 +4972,13 @@ function Bp(e) {
4971
4972
  }))
4972
4973
  }));
4973
4974
  }
4974
- var Vp = ({ value: e, onChange: t, textEditor: n = !1, safeFonts: r, googleFontsData: i, loadGoogleFonts: a, loading: s, getPopupContainer: l = Rp, style: d, placement: p = "bottomRight", labels: m, filterOptions: h }) => {
4975
- let [g, _] = f(), [v, y] = f(e), [b, x] = f(null), [S, C] = f(!!a), { __: w } = G(), T = u(() => ({
4976
- safeFonts: m?.safeFonts ?? w("Safe Fonts"),
4977
- googleFonts: m?.googleFonts ?? w("Google Fonts"),
4978
- sansSerif: m?.sansSerif ?? w("Sans Serif"),
4979
- serif: m?.serif ?? w("Serif")
4980
- }), [m, w]), E = h?.subsets ?? _p.subsets, D = h?.maxPopularity ?? _p.maxPopularity, ee = r ?? mp, O = i ?? b, k = s ?? S;
4975
+ var Vp = ({ value: e, onChange: t, textEditor: n = !1, safeFonts: r, googleFontsData: i, loadGoogleFonts: a, loading: s, getPopupContainer: l = Rp, style: p, placement: m = "bottomRight", labels: h, filterOptions: g }) => {
4976
+ let [_, v] = f(), y = d(e), [b, x] = f(null), [S, C] = f(!!a), { __: w } = G(), T = u(() => ({
4977
+ safeFonts: h?.safeFonts ?? w("Safe Fonts"),
4978
+ googleFonts: h?.googleFonts ?? w("Google Fonts"),
4979
+ sansSerif: h?.sansSerif ?? w("Sans Serif"),
4980
+ serif: h?.serif ?? w("Serif")
4981
+ }), [h, w]), E = g?.subsets ?? _p.subsets, D = g?.maxPopularity ?? _p.maxPopularity, ee = r ?? mp, O = i ?? b, k = s ?? S;
4981
4982
  c(() => {
4982
4983
  if (!a || i) return;
4983
4984
  let e = !1;
@@ -5001,23 +5002,24 @@ var Vp = ({ value: e, onChange: t, textEditor: n = !1, safeFonts: r, googleFonts
5001
5002
  D
5002
5003
  ]);
5003
5004
  c(() => {
5004
- O && (n && e !== v ? e ? e[1] === "Sans Serif" ? _([
5005
+ if (!O) return;
5006
+ let t = e !== y.current;
5007
+ y.current = e, n && t ? e ? e[1] === "Sans Serif" ? v([
5005
5008
  yp,
5006
5009
  bp,
5007
5010
  A.find((t) => t?.family.replace(/\s/g, "") === String(e[2]).replace(/\s/g, ""))?.family ?? "",
5008
5011
  String(e[3]).replace(/Italic/g, " Italic")
5009
- ]) : e[1] === "Serif" ? _([
5012
+ ]) : e[1] === "Serif" ? v([
5010
5013
  yp,
5011
5014
  xp,
5012
5015
  j.find((t) => t?.family.replace(/\s/g, "") === String(e[2]).replace(/\s/g, ""))?.family ?? "",
5013
5016
  String(e[3]).replace(/Italic/g, " Italic")
5014
- ]) : (e[0] === "Safe Fonts" || g === void 0) && _(e) : _([""]) : g === void 0 && v && _(e), n || _(e), y(e));
5017
+ ]) : (e[0] === "Safe Fonts" || _ === void 0) && v(e) : v([""]) : !t && _ === void 0 && v(e), !n && (t || _ === void 0) && v(e);
5015
5018
  }, [
5016
5019
  e,
5017
5020
  O,
5018
5021
  n,
5019
- v,
5020
- g,
5022
+ _,
5021
5023
  A,
5022
5024
  j
5023
5025
  ]);
@@ -5062,8 +5064,8 @@ var Vp = ({ value: e, onChange: t, textEditor: n = !1, safeFonts: r, googleFonts
5062
5064
  return /* @__PURE__ */ F(Bd, {
5063
5065
  allowClear: !1,
5064
5066
  showSearch: !0,
5065
- value: g,
5066
- placement: p,
5067
+ value: _,
5068
+ placement: m,
5067
5069
  popupClassName: "control-font-family-dropdown",
5068
5070
  options: ne,
5069
5071
  getPopupContainer: o((e) => {
@@ -5071,7 +5073,7 @@ var Vp = ({ value: e, onChange: t, textEditor: n = !1, safeFonts: r, googleFonts
5071
5073
  return r != null && (r.overflowX === "hidden" || r.overflowX === "clip" || r.overflow === "hidden" || r.overflow === "clip") ? t : n;
5072
5074
  }, [l]),
5073
5075
  onChange: N,
5074
- style: d
5076
+ style: p
5075
5077
  });
5076
5078
  };
5077
5079
  Vp.displayName = "ControlFontFamily";