@useinsider/guido 3.21.0-beta.ed1d11f → 3.21.0-beta.f545026

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.
@@ -12,7 +12,7 @@ var t = function() {
12
12
  s,
13
13
  !1,
14
14
  null,
15
- "c5146fc5"
15
+ "65036aaf"
16
16
  );
17
17
  const v = n.exports;
18
18
  export {
@@ -4,33 +4,34 @@ import { useEditorLock as le } from "../composables/useEditorLock.js";
4
4
  import { provideGuidoActions as ue } from "../composables/useGuidoActions.js";
5
5
  import { useGuidoStateBridge as pe } from "../composables/useGuidoStateBridge.js";
6
6
  import { usePartner as fe } from "../composables/usePartner.js";
7
- import { useSaveValidationRollout as ye } from "../composables/useSaveValidationRollout.js";
8
- import { useStripo as ge } from "../composables/useStripo.js";
7
+ import { useSaveValidationRollout as ge } from "../composables/useSaveValidationRollout.js";
8
+ import { useStripo as ye } from "../composables/useStripo.js";
9
9
  import { useTimerClone as Se } from "../composables/useTimerClone.js";
10
- import { migrate as V } from "../config/migrator/index.js";
11
- import { ModuleFolderDefaults as $ } from "../enums/defaults.js";
10
+ import { migrate as H } from "../config/migrator/index.js";
11
+ import { ModuleFolderDefaults as V } from "../enums/defaults.js";
12
12
  import { RIBBON_SELECTOR as ve } from "../enums/onboarding.js";
13
- import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as be } from "../extensions/Blocks/Recommendation/store/recommendation.js";
14
- import { disposeUnsubscribeListeners as he } from "../extensions/Blocks/Unsubscribe/block.js";
15
- import Ee from "./organisms/AutoSaveController.vue.js";
16
- import we from "./organisms/base/AuthErrorModal.vue.js";
17
- import De from "./organisms/base/Toaster.vue.js";
18
- import Ce from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
19
- import ke from "./organisms/header/HeaderWrapper.vue.js";
20
- import Re from "./organisms/LoadingWrapper.vue.js";
21
- import Fe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
22
- import Le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
23
- import Me from "./organisms/validation/ValidationErrorDrawer.vue.js";
24
- import { useStripoApi as Te } from "../services/stripoApi.js";
25
- import { useConfigStore as Ie } from "../stores/config.js";
26
- import { useDynamicContentStore as Ue } from "../stores/dynamic-content.js";
13
+ import { forgetHeightBounds as be } from "../extensions/Blocks/Recommendation/controls/image/index.js";
14
+ import { useRecommendationExtensionStore as $, disposeStrategyPageReturnListeners as he } from "../extensions/Blocks/Recommendation/store/recommendation.js";
15
+ import { disposeUnsubscribeListeners as Ee } from "../extensions/Blocks/Unsubscribe/block.js";
16
+ import we from "./organisms/AutoSaveController.vue.js";
17
+ import De from "./organisms/base/AuthErrorModal.vue.js";
18
+ import Ce from "./organisms/base/Toaster.vue.js";
19
+ import ke from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
20
+ import Re from "./organisms/header/HeaderWrapper.vue.js";
21
+ import Fe from "./organisms/LoadingWrapper.vue.js";
22
+ import Le from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
23
+ import Me from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
24
+ import Te from "./organisms/validation/ValidationErrorDrawer.vue.js";
25
+ import { useStripoApi as Ie } from "../services/stripoApi.js";
26
+ import { useConfigStore as Ue } from "../stores/config.js";
27
+ import { useDynamicContentStore as Be } from "../stores/dynamic-content.js";
27
28
  import { useEditorStore as E } from "../stores/editor.js";
28
29
  import { usePreviewStore as Ae } from "../stores/preview.js";
29
- import { useSaveValidationStore as Be } from "../stores/save-validation.js";
30
- import { useTemplateStore as Ne } from "../stores/template.js";
31
- import { useUnsubscribeStore as Pe } from "../stores/unsubscribe.js";
32
- import { readTrackFloor as H } from "../utils/linkTrackingIds.js";
33
- const yt = /* @__PURE__ */ ie({
30
+ import { useSaveValidationStore as Ne } from "../stores/save-validation.js";
31
+ import { useTemplateStore as Pe } from "../stores/template.js";
32
+ import { useUnsubscribeStore as _e } from "../stores/unsubscribe.js";
33
+ import { readTrackFloor as z } from "../utils/linkTrackingIds.js";
34
+ const St = /* @__PURE__ */ ie({
34
35
  __name: "Guido",
35
36
  props: {
36
37
  config: null,
@@ -48,32 +49,32 @@ const yt = /* @__PURE__ */ ie({
48
49
  () => import("./organisms/extensions/recommendation/RemoveStrategyModal.vue.js")
49
50
  ), Y = m(
50
51
  () => import("./organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js")
51
- ), w = W(), f = W(), y = Ue(), D = Pe(), o = Ie();
52
+ ), w = W(), f = W(), g = Be(), D = _e(), o = Ue();
52
53
  s.ready && o.init(s.config);
53
- const c = E(), Z = Ae(), l = p(() => c.hasChanges), { isTestPartner: ee } = fe(), { isEnabled: te, loadRollout: C } = ye(), k = () => {
54
+ const c = E(), Z = Ae(), l = p(() => c.hasChanges), { isTestPartner: ee } = fe(), { isEnabled: te, loadRollout: C } = ge(), k = () => {
54
55
  var t;
55
56
  return (t = w.value) == null ? void 0 : t.handleSave(!0);
56
57
  }, R = (t) => {
57
58
  c.loadingStatus = t;
58
59
  };
59
60
  me(), pe();
60
- const g = () => {
61
+ const y = () => {
61
62
  var t, e;
62
63
  return {
63
64
  emailId: o.templateId,
64
65
  userId: o.userId,
65
66
  username: o.username,
66
67
  partnerName: o.partnerName,
67
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || $.SAVED_MODULES,
68
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || $.DEFAULT_MODULES
68
+ savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || V.SAVED_MODULES,
69
+ defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || V.DEFAULT_MODULES
69
70
  };
70
- }, { initPlugin: F, preloadRuntime: L } = ge(), { runExclusive: M, beginMount: T, isCurrentMount: S } = le();
71
+ }, { initPlugin: F, preloadRuntime: L } = ye(), { runExclusive: M, beginMount: T, isCurrentMount: S } = le();
71
72
  let u = 0;
72
- const { getDefaultTemplate: I } = Te(), { cloneTimersOnSave: U, hasTimerBlocks: A } = Se(), oe = p(() => {
73
+ const { getDefaultTemplate: I } = Ie(), { cloneTimersOnSave: U, hasTimerBlocks: B } = Se(), oe = p(() => {
73
74
  var t;
74
75
  return !((t = o.ui) != null && t.showHeader);
75
76
  }), ne = p(() => o.isFeatureEnabled("reusableRecommendationStrategy")), re = p(
76
- () => !!z().recommendationConfigs.strategyId
77
+ () => !!$().recommendationConfigs.strategyId
77
78
  );
78
79
  ue({
79
80
  onBack: () => {
@@ -83,15 +84,15 @@ const yt = /* @__PURE__ */ ie({
83
84
  console.debug("guido:save:start"), r("save:start");
84
85
  },
85
86
  onSaveComplete: (t) => {
86
- const e = { ...t, metadata: g() };
87
+ const e = { ...t, metadata: y() };
87
88
  console.debug("guido:save:complete", e), r("save:complete", e);
88
89
  },
89
90
  onTestEmailClick: () => {
90
91
  console.debug("guido:test-email:click"), r("test-email:click");
91
92
  }
92
93
  });
93
- const B = (t) => {
94
- console.debug("dynamic-content:close", t), y.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
94
+ const A = (t) => {
95
+ console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
95
96
  }, N = () => {
96
97
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
97
98
  };
@@ -119,26 +120,26 @@ const yt = /* @__PURE__ */ ie({
119
120
  rrsEnabled: o.isFeatureEnabled("reusableRecommendationStrategy")
120
121
  };
121
122
  let n = {
122
- html: a && await V(a, _, x),
123
+ html: a && await H(a, _, x),
123
124
  css: d
124
125
  };
125
- n.html || (n = await I(), n.html = await V(n.html, _, x));
126
- const ae = O ? H(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
127
- A(n.html) && (n.html = await U(n.html)), O && (c.trackIdSessionFloor = Math.max(ae, H(n.html)));
126
+ n.html || (n = await I(), n.html = await H(n.html, _, x));
127
+ const ae = O ? z(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
128
+ B(n.html) && (n.html = await U(n.html)), O && (c.trackIdSessionFloor = Math.max(ae, z(n.html)));
128
129
  const se = {
129
130
  preselectedDynamicContentList: P,
130
131
  onReady: () => {
131
132
  console.debug("guido:ready"), r("ready");
132
133
  }
133
134
  };
134
- u = T(), await F(n, g(), se), y.selectedDynamicContentList = P;
135
+ u = T(), await F(n, y(), se), g.selectedDynamicContentList = P;
135
136
  } catch (e) {
136
137
  console.error("Failed to initialize Stripo editor:", e);
137
138
  }
138
139
  };
139
140
  return ce(async () => {
140
141
  var e;
141
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), z().$reset(), E().$reset(), Ne().$reset(), Be().$reset(), C(), b();
142
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), $().$reset(), E().$reset(), Pe().$reset(), Ne().$reset(), C(), b();
142
143
  const t = (e = f.value) == null ? void 0 : e.parentElement;
143
144
  if (t && (i = new ResizeObserver(b), i.observe(t)), L(), s.ready)
144
145
  await h();
@@ -149,7 +150,7 @@ const yt = /* @__PURE__ */ ie({
149
150
  }
150
151
  document.addEventListener("dynamic-content:open", v);
151
152
  }), de(() => {
152
- if (he(), be(), i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), S(u))
153
+ if (Ee(), he(), be(), i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", v), S(u))
153
154
  try {
154
155
  E().isStripoInitialized = !1;
155
156
  } catch (t) {
@@ -165,15 +166,15 @@ const yt = /* @__PURE__ */ ie({
165
166
  }), o.reset();
166
167
  }), K({
167
168
  dynamicContent: {
168
- insert: B,
169
+ insert: A,
169
170
  close: N
170
171
  },
171
172
  hasChanges: l,
172
173
  saveSilent: k,
173
174
  setLoading: R
174
- }), { __sfc: !0, PreviewContainer: j, OnboardingWrapper: J, AssignStrategyDrawer: Q, RemoveStrategyModal: X, LegacyStrategyUpdatedModal: Y, headerWrapperRef: w, wrapperRef: f, dynamicContentStore: y, unsubscribeStore: D, props: s, configStore: o, editorStore: c, previewStore: Z, hasChanges: l, isTestPartner: ee, isSaveValidationEnabled: te, loadRollout: C, saveSilent: k, setLoading: R, emit: r, buildMetadata: g, initPlugin: F, preloadRuntime: L, runExclusive: M, beginMount: T, isCurrentMount: S, mountGeneration: u, getDefaultTemplate: I, cloneTimersOnSave: U, hasTimerBlocks: A, noHeader: oe, isRrsEnabled: ne, hasAssignedStrategy: re, insertDynamicContent: B, closeDynamicContent: N, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: b, startEditor: h, AutoSaveController: Ee, AuthErrorModal: we, Toaster: De, FilterSelectionDrawer: Ce, HeaderWrapper: ke, LoadingWrapper: Re, SaveAsTemplateDrawer: Fe, UnsubscribeWrapper: Le, ValidationErrorDrawer: Me };
175
+ }), { __sfc: !0, PreviewContainer: j, OnboardingWrapper: J, AssignStrategyDrawer: Q, RemoveStrategyModal: X, LegacyStrategyUpdatedModal: Y, headerWrapperRef: w, wrapperRef: f, dynamicContentStore: g, unsubscribeStore: D, props: s, configStore: o, editorStore: c, previewStore: Z, hasChanges: l, isTestPartner: ee, isSaveValidationEnabled: te, loadRollout: C, saveSilent: k, setLoading: R, emit: r, buildMetadata: y, initPlugin: F, preloadRuntime: L, runExclusive: M, beginMount: T, isCurrentMount: S, mountGeneration: u, getDefaultTemplate: I, cloneTimersOnSave: U, hasTimerBlocks: B, noHeader: oe, isRrsEnabled: ne, hasAssignedStrategy: re, insertDynamicContent: A, closeDynamicContent: N, handleDynamicContentOpen: v, ribbonObserver: i, updateRibbonOffset: b, startEditor: h, AutoSaveController: we, AuthErrorModal: De, Toaster: Ce, FilterSelectionDrawer: ke, HeaderWrapper: Re, LoadingWrapper: Fe, SaveAsTemplateDrawer: Le, UnsubscribeWrapper: Me, ValidationErrorDrawer: Te };
175
176
  }
176
177
  });
177
178
  export {
178
- yt as default
179
+ St as default
179
180
  };
@@ -1,20 +1,21 @@
1
- import { filterAmpErrors as y } from "../utils/ampErrorFilter.js";
2
- import { getEditorApi as s } from "../utils/stripoEditorApi.js";
1
+ import { forgetHeightBounds as y } from "../extensions/Blocks/Recommendation/controls/image/index.js";
2
+ import { filterAmpErrors as h } from "../utils/ampErrorFilter.js";
3
+ import { getEditorApi as r } from "../utils/stripoEditorApi.js";
3
4
  import { useToaster as D } from "./useToaster.js";
4
- const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
5
- const f = setTimeout(
5
+ const H = 1e4, T = 3e4, m = (n, l, A) => new Promise((f, p) => {
6
+ const C = setTimeout(
6
7
  () => p(new Error(`${n} did not report completion within ${l}ms`)),
7
8
  l
8
9
  ), c = (t) => (e) => {
9
- clearTimeout(f), t(e);
10
+ clearTimeout(C), t(e);
10
11
  }, d = c(p);
11
12
  try {
12
- A(c(C), d);
13
+ A(c(f), d);
13
14
  } catch (t) {
14
15
  d(t);
15
16
  }
16
- }), P = () => {
17
- const { handleError: n } = D(), l = (t = {}) => r(
17
+ }), b = () => {
18
+ const { handleError: n } = D(), l = (t = {}) => m(
18
19
  "compileEmail",
19
20
  T,
20
21
  (e, i) => {
@@ -38,38 +39,38 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
38
39
  resetDataSavedFlag: !1,
39
40
  disableLineHeightsReplace: !0
40
41
  }, ...t }, u = {
41
- callback: (m, g, w, S, v) => {
42
- m ? i(m) : e({
43
- html: g,
42
+ callback: (s, E, w, S, v) => {
43
+ s ? i(s) : e({
44
+ html: E,
44
45
  ampHtml: w,
45
- ampErrors: y(S ?? []),
46
+ ampErrors: h(S ?? []),
46
47
  displayConditions: v
47
48
  });
48
49
  },
49
50
  ...o
50
51
  };
51
- s().actionsApi.compileEmail(u);
52
+ r().actionsApi.compileEmail(u);
52
53
  }
53
54
  );
54
55
  return {
55
56
  getCompiledEmail: l,
56
- getTemplateData: () => r(
57
+ getTemplateData: () => m(
57
58
  "getTemplateData",
58
59
  T,
59
60
  (t) => {
60
- const e = ({ html: i, css: a, width: o, height: E, utmParams: u, syncModulesIds: m }) => t({
61
+ const e = ({ html: i, css: a, width: o, height: g, utmParams: u, syncModulesIds: s }) => t({
61
62
  html: i,
62
63
  css: a,
63
64
  width: o,
64
- height: E,
65
+ height: g,
65
66
  utmParams: u,
66
- syncModulesIds: m
67
+ syncModulesIds: s
67
68
  });
68
- s().actionsApi.getTemplateData(e);
69
+ r().actionsApi.getTemplateData(e);
69
70
  }
70
71
  ),
71
72
  activateCustomViewStyles: (t = !0) => {
72
- s().actionsApi.activateCustomViewStyles(t);
73
+ r().actionsApi.activateCustomViewStyles(t);
73
74
  },
74
75
  getPreviewData: async (t) => {
75
76
  try {
@@ -109,16 +110,16 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
109
110
  }
110
111
  }),
111
112
  updateHtmlAndCss: (t, e) => {
112
- const { actionsApi: i } = s();
113
- return r("updateHtmlAndCss", h, (a) => {
113
+ const { actionsApi: i } = r();
114
+ return y(), m("updateHtmlAndCss", H, (a) => {
114
115
  i.updateHtmlAndCss(t, e, () => a());
115
116
  });
116
117
  },
117
- editorSave: () => r(
118
+ editorSave: () => m(
118
119
  "save",
119
120
  T,
120
121
  (t) => {
121
- s().actionsApi.save((e) => {
122
+ r().actionsApi.save((e) => {
122
123
  if (e) {
123
124
  n(e, "Failed to save template"), t(!1);
124
125
  return;
@@ -130,5 +131,5 @@ const h = 1e4, T = 3e4, r = (n, l, A) => new Promise((C, p) => {
130
131
  };
131
132
  };
132
133
  export {
133
- P as useActionsApi
134
+ b as useActionsApi
134
135
  };
@@ -7,13 +7,13 @@ function L(t, r, e, o, c = "") {
7
7
  const i = `{{${c}${t}_${r}_${e}}}`, n = `{{${c}${t}_${r}_currency}}`;
8
8
  return o === "before" ? `${n} ${i}` : `${i} ${n}`;
9
9
  }
10
- function _(t) {
10
+ function A(t) {
11
11
  let r = t;
12
12
  for (; r.children.length === 1; )
13
13
  [r] = r.children;
14
14
  return r;
15
15
  }
16
- function A(t, r, e, o, c, i) {
16
+ function y(t, r, e, o, c, i) {
17
17
  switch (r) {
18
18
  case "productImage": {
19
19
  const n = t.querySelector("img");
@@ -24,7 +24,7 @@ function A(t, r, e, o, c, i) {
24
24
  }
25
25
  case "productName": {
26
26
  const n = t.querySelector("p");
27
- n && (_(n).textContent = `{{${i}${e}_${o}_name}}`);
27
+ n && (A(n).textContent = `{{${i}${e}_${o}_name}}`);
28
28
  break;
29
29
  }
30
30
  // Inline mode ("Move to next line" OFF) merges BOTH prices into one row
@@ -32,16 +32,16 @@ function A(t, r, e, o, c, i) {
32
32
  // substitute by cell content, not by the row's anchor (SD-145161).
33
33
  case "productPrice":
34
34
  case "productOldPrice": {
35
- const n = (l, d) => {
36
- l && (_(l).textContent = L(
35
+ const n = (a, l) => {
36
+ a && (A(a).textContent = L(
37
37
  e,
38
38
  o,
39
- d,
39
+ l,
40
40
  c,
41
41
  i
42
42
  ));
43
- }, s = t.querySelector(".product-price p"), a = t.querySelector(".product-old-price p"), u = !s && !a ? t.querySelector("p") : null;
44
- n(s ?? (r === "productPrice" ? u : null), "price"), n(a ?? (r === "productOldPrice" ? u : null), "original_price");
43
+ }, s = t.querySelector(".product-price p"), d = t.querySelector(".product-old-price p"), u = !s && !d ? t.querySelector("p") : null;
44
+ n(s ?? (r === "productPrice" ? u : null), "price"), n(d ?? (r === "productOldPrice" ? u : null), "original_price");
45
45
  break;
46
46
  }
47
47
  case "productButton": {
@@ -70,8 +70,8 @@ function A(t, r, e, o, c, i) {
70
70
  default: {
71
71
  const n = t.getAttribute("product-attr") ? t : t.querySelector("[product-attr]");
72
72
  if (n) {
73
- const s = n.getAttribute("product-attr"), a = n.querySelector("p");
74
- a && (_(a).textContent = `{{${i}${e}_${o}_${s}}}`);
73
+ const s = n.getAttribute("product-attr"), d = n.querySelector("p");
74
+ d && (A(d).textContent = `{{${i}${e}_${o}_${s}}}`);
75
75
  }
76
76
  break;
77
77
  }
@@ -88,54 +88,54 @@ function b(t, r, e, o) {
88
88
  function R(t, r, e) {
89
89
  return b(t, r, 0, e);
90
90
  }
91
- function D(t, r, e, o) {
91
+ function w(t, r, e, o) {
92
92
  if (!t.innerHTML.includes("{{"))
93
93
  return;
94
94
  const { open: c, close: i } = b(t.ownerDocument, r, e, o);
95
95
  t.insertBefore(c, t.firstChild), t.appendChild(i);
96
96
  }
97
- function w(t, r, e, o) {
97
+ function D(t, r, e, o) {
98
98
  var n, s;
99
99
  if (!t.innerHTML.includes("{{"))
100
100
  return;
101
101
  const { open: c, close: i } = b(t.ownerDocument, r, e, o);
102
102
  (n = t.parentNode) == null || n.insertBefore(c, t), (s = t.parentNode) == null || s.insertBefore(i, t.nextSibling);
103
103
  }
104
- function W(t, r, e, o) {
104
+ function v(t, r, e, o) {
105
105
  t.querySelectorAll(".recommendation-product-row").forEach((i, n) => {
106
- i.querySelectorAll("[data-attribute-type]").forEach((a) => {
107
- const u = a.getAttribute("data-attribute-type") || "", l = a.querySelectorAll(".attribute-cell");
108
- l.length > 0 ? l.forEach((d) => {
109
- A(d, u, r, n, e, o);
110
- }) : A(a, u, r, n, e, o);
111
- }), w(i, r, n, o);
106
+ i.querySelectorAll("[data-attribute-type]").forEach((d) => {
107
+ const u = d.getAttribute("data-attribute-type") || "", a = d.querySelectorAll(".attribute-cell");
108
+ a.length > 0 ? a.forEach((l) => {
109
+ y(l, u, r, n, e, o);
110
+ }) : y(d, u, r, n, e, o);
111
+ }), D(i, r, n, o);
112
112
  });
113
113
  }
114
- function v(t, r, e, o) {
114
+ function H(t, r, e, o) {
115
115
  const c = t.querySelectorAll(".recommendation-product-row");
116
116
  if (!c.length)
117
117
  return;
118
118
  const [i] = c, n = i.querySelector("[data-attribute-type]"), s = n ? n.querySelectorAll(".attribute-cell").length : 1;
119
- c.forEach((a, u) => {
120
- a.querySelectorAll("[data-attribute-type]").forEach((d) => {
121
- const p = d.getAttribute("data-attribute-type") || "";
122
- d.querySelectorAll(".attribute-cell").forEach((f, m) => {
123
- const h = u * s + m;
124
- A(f, p, r, h, e, o), D(f, r, h, o);
119
+ c.forEach((d, u) => {
120
+ d.querySelectorAll("[data-attribute-type]").forEach((l) => {
121
+ const p = l.getAttribute("data-attribute-type") || "";
122
+ l.querySelectorAll(".attribute-cell").forEach((f, h) => {
123
+ const S = u * s + h;
124
+ y(f, p, r, S, e, o), w(f, r, S, o);
125
125
  });
126
126
  });
127
127
  });
128
128
  }
129
- function H(t, r, e, o) {
129
+ function W(t, r, e, o) {
130
130
  t.querySelectorAll(".ins-recommendation-product-container").forEach((i) => {
131
- v(i, r, e, o);
131
+ H(i, r, e, o);
132
132
  });
133
133
  }
134
134
  function F(t, r, e) {
135
135
  const o = t.getAttribute("data-layout") || "grid", c = t.getAttribute("currency-alignment") || "after";
136
- o === "list" ? W(t, r, c, e) : H(t, r, c, e);
136
+ o === "list" ? v(t, r, c, e) : W(t, r, c, e);
137
137
  }
138
- function y(t, r, e) {
138
+ function _(t, r, e) {
139
139
  const o = new RegExp(`${r}\\s*:\\s*(\\d+)\\s*px`, "i"), c = t.match(o);
140
140
  return c ? parseInt(c[1]) : e;
141
141
  }
@@ -150,7 +150,7 @@ function C(t) {
150
150
  const e = (t.getAttribute("style") || "").match(/(?:^|[;\s])width\s*:\s*(\d+(?:\.\d+)?(?:px|%))/i);
151
151
  return e && $(e[1]) ? e[1] : null;
152
152
  }
153
- function G(t, r) {
153
+ function x(t, r) {
154
154
  let e = t.parentElement;
155
155
  for (; e && e !== r; ) {
156
156
  if (e.tagName === "TD" && C(e))
@@ -159,35 +159,37 @@ function G(t, r) {
159
159
  }
160
160
  return null;
161
161
  }
162
- function V(t) {
163
- const r = t.getAttribute("style") || "", e = y(r, "width", 600), o = y(r, "padding", 0) * 2, c = Math.max(0, e - o);
162
+ function G(t) {
163
+ const r = t.getAttribute("style") || "", e = _(r, "width", 600), o = _(r, "padding", 0) * 2, c = Math.max(0, e - o);
164
164
  c !== 0 && t.querySelectorAll("img.adapt-img").forEach((i) => {
165
165
  if (i.hasAttribute("width"))
166
166
  return;
167
- const n = G(i, t);
167
+ const n = x(i, t);
168
168
  if (!n)
169
169
  return;
170
- const s = C(n), a = y(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), l = Math.max(1, u - a);
171
- i.setAttribute("width", String(l));
172
- const d = i.getAttribute("style") || "";
173
- if (!/\bwidth\s*:\s*\d/i.test(d)) {
174
- const p = d && !d.trim().endsWith(";") ? "; " : "";
175
- i.setAttribute("style", `${d}${p}width: ${l}px`);
170
+ const s = C(n), d = _(n.getAttribute("style") || "", "padding", 0) * 2, u = s.endsWith("%") ? Math.floor(c * parseFloat(s) / 100) : parseInt(s), a = Math.max(1, u - d), l = i.getAttribute("style") || "", p = /(?:^|[;\s])max-height\s*:\s*(\d+(?:\.\d+)?)px/i.exec(l);
171
+ if (p) {
172
+ i.setAttribute("width", String(Math.max(1, Math.min(a, Math.floor(parseFloat(p[1])))))), i.removeAttribute("height");
173
+ return;
174
+ }
175
+ if (i.setAttribute("width", String(a)), !/\bwidth\s*:\s*\d/i.test(l)) {
176
+ const m = l && !l.trim().endsWith(";") ? "; " : "";
177
+ i.setAttribute("style", `${l}${m}width: ${a}px`);
176
178
  }
177
179
  });
178
180
  }
179
- const E = "MSO_MOBILE_HIDE_START", U = "MSO_MOBILE_HIDE_END";
180
- function X(t, r) {
181
+ const E = "MSO_MOBILE_HIDE_START", V = "MSO_MOBILE_HIDE_END";
182
+ function U(t, r) {
181
183
  t.querySelectorAll(q).forEach((e) => {
182
184
  var i, n;
183
185
  const o = e.querySelector(M);
184
186
  if (!o || o.children.length === 0)
185
187
  return;
186
188
  const c = e.previousSibling;
187
- (c == null ? void 0 : c.nodeType) === Node.COMMENT_NODE && c.data === E || ((i = e.parentNode) == null || i.insertBefore(r.createComment(E), e), (n = e.parentNode) == null || n.insertBefore(r.createComment(U), e.nextSibling));
189
+ (c == null ? void 0 : c.nodeType) === Node.COMMENT_NODE && c.data === E || ((i = e.parentNode) == null || i.insertBefore(r.createComment(E), e), (n = e.parentNode) == null || n.insertBefore(r.createComment(V), e.nextSibling));
188
190
  });
189
191
  }
190
- function j(t, r) {
192
+ function X(t, r) {
191
193
  const e = t.match(/<!DOCTYPE[^>]*>/i);
192
194
  return (e ? `${e[0]}
193
195
  ` : "") + r.documentElement.outerHTML;
@@ -200,17 +202,17 @@ function Q(t) {
200
202
  i.recommendationCampaignUrls = {};
201
203
  const { isFeatureEnabled: n } = g(), s = n("liquidSyntax") ? "reco_" : "";
202
204
  return o.forEach((u) => {
203
- var d, p, S, f;
204
- const l = u.getAttribute("recommendation-id");
205
- if (l) {
206
- if ((d = u.parentNode) == null || d.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((m) => m.remove()), c(l), X(u, e), !T(u)) {
207
- F(u, l, s);
208
- const { open: m, close: h } = R(e, l, s);
209
- (S = u.parentNode) == null || S.insertBefore(m, u), (f = u.parentNode) == null || f.insertBefore(h, u.nextSibling);
205
+ var l, p, m, f;
206
+ const a = u.getAttribute("recommendation-id");
207
+ if (a) {
208
+ if ((l = u.parentNode) == null || l.insertBefore(e.createComment("REC_START"), u), (p = u.parentNode) == null || p.insertBefore(e.createComment("REC_END"), u.nextSibling), u.querySelectorAll('[data-visibility="0"]').forEach((h) => h.remove()), c(a), U(u, e), !T(u)) {
209
+ F(u, a, s);
210
+ const { open: h, close: S } = R(e, a, s);
211
+ (m = u.parentNode) == null || m.insertBefore(h, u), (f = u.parentNode) == null || f.insertBefore(S, u.nextSibling);
210
212
  }
211
- V(u);
213
+ G(u);
212
214
  }
213
- }), j(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
215
+ }), X(r, e).replaceAll("<!--{%", "{%").replaceAll("%}-->", "%}").replaceAll("&lt;!--{%", "{%").replaceAll("%}--&gt;", "%}");
214
216
  }
215
217
  export {
216
218
  L as formatPriceVariable,
@@ -1,23 +1,24 @@
1
- var B = Object.defineProperty;
2
- var b = (a, l, t) => l in a ? B(a, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[l] = t;
3
- var d = (a, l, t) => b(a, typeof l != "symbol" ? l + "" : l, t);
1
+ var b = Object.defineProperty;
2
+ var D = (a, l, t) => l in a ? b(a, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[l] = t;
3
+ var d = (a, l, t) => D(a, typeof l != "symbol" ? l + "" : l, t);
4
4
  import { useConfig as g } from "../../../composables/useConfig.js";
5
5
  import { BlockId as C } from "../../../enums/block.js";
6
6
  import { getMigrationBannerHtml as A } from "../../../utils/migrationBannerHtml.js";
7
7
  import { Block as E, BlockCompositionType as S, ModificationDescription as p } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
8
- import { CURRENT_CONFIG_VERSION as N, PRE_RRS_CONFIG_VERSION as w } from "./constants/defaultConfig.js";
8
+ import { CURRENT_CONFIG_VERSION as N, PRE_RRS_CONFIG_VERSION as M } from "./constants/defaultConfig.js";
9
9
  import { RECOMMENDATION_ID_ATTR as m } from "./constants/selectors.js";
10
- import { regenerateMobileProductRows as M } from "./controls/main/utils.js";
11
- import { ensureMobileCssRulesExist as I, setMobileLayoutOptOut as R, hasMobileLayoutOptOut as O } from "./controls/mobileLayout/cssRules.js";
10
+ import { forgetHeightBounds as w, ensureMobileFitRule as O, syncHeightBound as H } from "./controls/image/index.js";
11
+ import { regenerateMobileProductRows as x } from "./controls/main/utils.js";
12
+ import { ensureMobileCssRulesExist as I, setMobileLayoutOptOut as R, hasMobileLayoutOptOut as T } from "./controls/mobileLayout/cssRules.js";
12
13
  import { RecommendationConfigService as s } from "./services/configService.js";
13
14
  import { useRecommendationExtensionStore as h } from "./store/recommendation.js";
14
- import { getDefaultTemplate as x } from "./templates/grid/template.js";
15
- import { useRecommendationBlockWarning as T } from "./useRecommendationBlockWarning.js";
16
- import { registerNodeConfigWriter as H } from "./utils/nodeConfigWriter.js";
17
- import { refreshDuplicatedStrategyBlocks as $ } from "./utils/strategyCommit.js";
18
- const k = C.Recommendation, u = "recommendation-block-v2", D = "hide-price";
19
- let y = !1;
20
- class Y extends E {
15
+ import { getDefaultTemplate as F } from "./templates/grid/template.js";
16
+ import { useRecommendationBlockWarning as $ } from "./useRecommendationBlockWarning.js";
17
+ import { registerNodeConfigWriter as v } from "./utils/nodeConfigWriter.js";
18
+ import { refreshDuplicatedStrategyBlocks as L } from "./utils/strategyCommit.js";
19
+ const k = C.Recommendation, u = "recommendation-block-v2", y = "hide-price";
20
+ let B = !1;
21
+ class it extends E {
21
22
  constructor() {
22
23
  super();
23
24
  /**
@@ -72,7 +73,7 @@ class Y extends E {
72
73
  */
73
74
  getTemplate() {
74
75
  const t = this._generateNextId();
75
- return this._pendingBlockId = t, x(t);
76
+ return this._pendingBlockId = t, F(t);
76
77
  }
77
78
  /**
78
79
  * Called when a new block is dropped into the template
@@ -84,7 +85,7 @@ class Y extends E {
84
85
  onCreated(t) {
85
86
  const e = this._getRecommendationId(t);
86
87
  if (e !== null && e > 0) {
87
- if (this._detectDuplicate(e)) {
88
+ if (this._ensureMobileFitRule(t), this._detectDuplicate(e)) {
88
89
  this._handleDuplicate(t, e), this._scheduleArrivalReset(t);
89
90
  return;
90
91
  }
@@ -100,7 +101,7 @@ class Y extends E {
100
101
  t,
101
102
  {
102
103
  recommendationId: i,
103
- configVersion: n ? N : w,
104
+ configVersion: n ? N : M,
104
105
  ...o ? { partnerName: g().partnerName.value } : {},
105
106
  // An RRS block picks a strategy, not an algorithm, and its algorithm control is
106
107
  // hidden. Keeping the `mostPopular` default would bake a most-popular feed URL
@@ -111,7 +112,7 @@ class Y extends E {
111
112
  if (f.setCurrentBlock(i), this._stampHidePrice(t, r.priceHideIfSameAsDiscounted), c) {
112
113
  I(this.api);
113
114
  const _ = this._getBlockElement(t);
114
- _ && (R(this.api, _, !0), M({
115
+ _ && (R(this.api, _, !0), x({
115
116
  currentNode: t,
116
117
  documentModifier: this.api.getDocumentModifier()
117
118
  }));
@@ -136,13 +137,13 @@ class Y extends E {
136
137
  "Assign recommendation ID to legacy block"
137
138
  );
138
139
  }
139
- this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t);
140
+ this._healLingeringDuplicate(t), s.needsMigration(t) && this._migrateFromLegacy(t), this._healHidePriceAttr(t), this._ensureMobileFitRule(t), this._syncHeightBound(t);
140
141
  try {
141
- y || (I(this.api), y = !0);
142
+ B || (I(this.api), B = !0);
142
143
  const e = s.getConfig(t), i = this._getBlockElement(t);
143
144
  if (i) {
144
145
  const n = !e.mobileLayoutEnabled;
145
- O(i) !== n && R(this.api, i, n);
146
+ T(i) !== n && R(this.api, i, n);
146
147
  }
147
148
  } catch {
148
149
  }
@@ -156,7 +157,21 @@ class Y extends E {
156
157
  */
157
158
  onDelete(t) {
158
159
  const e = this._getRecommendationId(t);
159
- e && h().removeBlockState(e);
160
+ e && (h().removeBlockState(e), w(String(e)));
161
+ }
162
+ _ensureMobileFitRule(t) {
163
+ try {
164
+ O(this.api, t);
165
+ } catch {
166
+ }
167
+ }
168
+ _syncHeightBound(t) {
169
+ const e = this._getRecommendationId(t);
170
+ if (e)
171
+ try {
172
+ H(this.api, t, String(e));
173
+ } catch {
174
+ }
160
175
  }
161
176
  /**
162
177
  * Warns (dark advisory toaster) when the design holds more than one live
@@ -172,7 +187,7 @@ class Y extends E {
172
187
  */
173
188
  _warnIfMultipleBlocks() {
174
189
  try {
175
- T().warnIfMultipleBlocks(this.api.getDocumentRootHtmlNode());
190
+ $().warnIfMultipleBlocks(this.api.getDocumentRootHtmlNode());
176
191
  } catch {
177
192
  }
178
193
  }
@@ -264,7 +279,7 @@ class Y extends E {
264
279
  /** Assigns a fresh id to a duplicated block and syncs DOM, node config and store. */
265
280
  _handleDuplicate(t, e) {
266
281
  const i = this._reassignDuplicateId(t, e), n = h();
267
- n.cloneBlockState(e, i), n.setCurrentBlock(i), g().isFeatureEnabled("reusableRecommendationStrategy") && (this._resetSourceIds.add(e), H(this.api), $(e, i, s.getConfig(t)).catch((o) => console.error("[recommendation] refreshing a duplicated strategy failed", o))), this._warnIfMultipleBlocks();
282
+ n.cloneBlockState(e, i), n.setCurrentBlock(i), g().isFeatureEnabled("reusableRecommendationStrategy") && (this._resetSourceIds.add(e), v(this.api), L(e, i, s.getConfig(t)).catch((o) => console.error("[recommendation] refreshing a duplicated strategy failed", o))), this._warnIfMultipleBlocks();
268
283
  }
269
284
  /**
270
285
  * Core id-reassignment for a duplicated block: rewrites the DOM
@@ -320,7 +335,7 @@ class Y extends E {
320
335
  */
321
336
  _stampHidePrice(t, e) {
322
337
  const i = this._getBlockElement(t);
323
- i && this.api.getDocumentModifier().modifyHtml(i).setAttribute(D, String(e)).apply(new p("Stamp hide-price"));
338
+ i && this.api.getDocumentModifier().modifyHtml(i).setAttribute(y, String(e)).apply(new p("Stamp hide-price"));
324
339
  }
325
340
  /**
326
341
  * Stamps `hide-price` from config only when the block lacks the attribute —
@@ -328,7 +343,7 @@ class Y extends E {
328
343
  */
329
344
  _healHidePriceAttr(t) {
330
345
  const e = this._getBlockElement(t);
331
- if (!e || !("getAttribute" in e) || e.getAttribute(D) !== null)
346
+ if (!e || !("getAttribute" in e) || e.getAttribute(y) !== null)
332
347
  return;
333
348
  const { priceHideIfSameAsDiscounted: i } = s.getConfig(t);
334
349
  this._stampHidePrice(t, i);
@@ -366,5 +381,5 @@ class Y extends E {
366
381
  }
367
382
  export {
368
383
  k as BLOCK_ID,
369
- Y as RecommendationBlock
384
+ it as RecommendationBlock
370
385
  };
@@ -1,19 +1,89 @@
1
- import { createImageMarginsControl as m, createImageSizeControl as n } from "../../../controlFactories.js";
2
- import { RecommendationBlockId as o } from "../../constants/blockIds.js";
3
- import { RecommendationControlId as r } from "../../constants/controlIds.js";
4
- import { BLOCK_ROOT_SELECTOR as t } from "../../constants/selectors.js";
5
- const e = n(
6
- r.IMAGE_SIZE,
7
- o.IMAGE,
8
- t
9
- ), i = m(
10
- r.IMAGE_MARGINS,
11
- o.IMAGE,
12
- t
13
- ), C = {
14
- size: e,
15
- margins: i
1
+ import { EditorStatePropertyType as E, PreviewDeviceMode as M, ModificationDescription as d } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
+ import { createImageSizeControl as x, createImageMarginsControl as I } from "../../../controlFactories.js";
3
+ import { RecommendationBlockId as u } from "../../constants/blockIds.js";
4
+ import { RecommendationControlId as f } from "../../constants/controlIds.js";
5
+ import { BLOCK_ROOT_SELECTOR as g } from "../../constants/selectors.js";
6
+ import { hasGetStyle as c, hasGetAttribute as C } from "../../utils/tagName.js";
7
+ const R = { width: "", height: "auto", "max-height": "" }, S = `${g} img.adapt-img`, B = `*${g.slice(1)}`, p = `@media only screen and (max-width: 600px) { ${S} { max-height: none !important; } }`;
8
+ function A(e) {
9
+ return { width: "auto", height: "auto", "max-height": `${e}px` };
10
+ }
11
+ function H(e) {
12
+ return e.querySelectorAll(B).some((t) => "getSelector" in t && t.getSelector() === S);
13
+ }
14
+ function O(e, t) {
15
+ return c(e) && Object.entries(t).some(([o, n]) => (e.getStyle(o) ?? "") !== n);
16
+ }
17
+ function y(e) {
18
+ const t = e.getDocumentRootCssNode();
19
+ return t && !H(t) ? t : null;
20
+ }
21
+ function N(e, t) {
22
+ const n = t.querySelectorAll("img").some((s) => c(s) && !!s.getStyle("max-height")) ? y(e) : null;
23
+ if (!n)
24
+ return;
25
+ const i = e.getDocumentModifier();
26
+ i.modifyCss(n).appendRule(p), i.apply(new d("Add the reco image mobile fit rule"));
27
+ }
28
+ const m = /* @__PURE__ */ new Map();
29
+ function T(e) {
30
+ return {
31
+ height: C(e) ? Number(e.getAttribute("height")) : 0,
32
+ maxHeight: c(e) ? e.getStyle("max-height") ?? "" : ""
33
+ };
34
+ }
35
+ function _(e, t) {
36
+ return !!(e && t.maxHeight && t.height > 0) && (e == null ? void 0 : e.maxHeight) === t.maxHeight && e.height !== t.height && t.maxHeight !== `${t.height}px`;
37
+ }
38
+ function z(e, t, o) {
39
+ const n = t.querySelectorAll("img"), i = n.map(T), s = m.get(o), a = i.map((r, h) => _(s == null ? void 0 : s[h], r));
40
+ if (!a.includes(!0)) {
41
+ m.set(o, i);
42
+ return;
43
+ }
44
+ const l = e.getDocumentModifier();
45
+ n.forEach((r, h) => {
46
+ a[h] && l.modifyHtml(r).setStyle("max-height", `${i[h].height}px`);
47
+ }), l.apply(new d("Sync the reco image height bound")), m.set(o, i.map((r, h) => a[h] ? { ...r, maxHeight: `${r.height}px` } : r));
48
+ }
49
+ function U(e) {
50
+ e === void 0 ? m.clear() : m.delete(e);
51
+ }
52
+ class F extends x(
53
+ f.IMAGE_SIZE,
54
+ u.IMAGE,
55
+ g
56
+ ) {
57
+ getAdditionalModifications(t) {
58
+ if (this.api.getEditorState()[E.previewDeviceMode] === M.MOBILE)
59
+ return;
60
+ const o = this.getFitStyles(), n = this.getTargetNodes(t).map((a) => a.querySelector("img")).filter((a) => O(a, o)), i = o["max-height"] ? y(this.api) : null;
61
+ if (!n.length && !i)
62
+ return;
63
+ const s = this.api.getDocumentModifier();
64
+ return i && s.modifyCss(i).appendRule(p), n.forEach((a) => {
65
+ const l = s.modifyHtml(a);
66
+ Object.entries(o).forEach(([r, h]) => {
67
+ h ? l.setStyle(r, h) : l.removeStyle(r);
68
+ });
69
+ }), s;
70
+ }
71
+ getFitStyles() {
72
+ const { size: t } = this.api.getValues();
73
+ return (t == null ? void 0 : t.type) === "height" && t.value ? A(t.value) : R;
74
+ }
75
+ }
76
+ const w = I(
77
+ f.IMAGE_MARGINS,
78
+ u.IMAGE,
79
+ g
80
+ ), j = {
81
+ size: F,
82
+ margins: w
16
83
  };
17
84
  export {
18
- C as ImageControls
85
+ j as ImageControls,
86
+ N as ensureMobileFitRule,
87
+ U as forgetHeightBounds,
88
+ z as syncHeightBound
19
89
  };
@@ -1,10 +1,10 @@
1
1
  import { extractWrapperTags as A } from "../../../../utils/preserveTextStyles.js";
2
2
  import { RecommendationBlockId as c } from "../constants/blockIds.js";
3
- import { DESKTOP_CONTAINER_SELECTOR as b, ATTR_PRODUCT_NAME as k, ATTR_PRODUCT_PRICE as y, ATTR_PRODUCT_OLD_PRICE as p, ATTR_PRODUCT_OMNIBUS_PRICE as R, ATTR_PRODUCT_OMNIBUS_DISCOUNT as _, ATTR_PRODUCT_BUTTON as x, ATTR_PRODUCT_IMAGE as q, ATTR_PRODUCT_ATTR as v } from "../constants/selectors.js";
3
+ import { DESKTOP_CONTAINER_SELECTOR as g, ATTR_PRODUCT_NAME as k, ATTR_PRODUCT_PRICE as y, ATTR_PRODUCT_OLD_PRICE as p, ATTR_PRODUCT_OMNIBUS_PRICE as R, ATTR_PRODUCT_OMNIBUS_DISCOUNT as _, ATTR_PRODUCT_BUTTON as x, ATTR_PRODUCT_IMAGE as q, ATTR_PRODUCT_ATTR as v } from "../constants/selectors.js";
4
4
  import { CSS_CLASS_TEXT_TRIM as B } from "../controls/shared/textTrimCssRules.js";
5
5
  import { toCustomCompositionKey as U } from "../templates/utils.js";
6
6
  import { resolveRowVisibilityKeys as N, isMergedInlinePriceRow as C } from "./compositionKeys.js";
7
- import { hasQuerySelectorAll as I, hasGetAttribute as l, hasGetStyle as O, hasGetComputedStyle as M } from "./tagName.js";
7
+ import { hasQuerySelectorAll as I, hasGetAttribute as l, hasGetStyle as h, hasGetComputedStyle as M } from "./tagName.js";
8
8
  const s = [
9
9
  "font-size",
10
10
  "font-family",
@@ -37,9 +37,10 @@ const s = [
37
37
  "width",
38
38
  "height",
39
39
  "max-width",
40
+ "max-height",
40
41
  "border-radius",
41
42
  "margin"
42
- ], g = /* @__PURE__ */ new Set(["transparent", "rgba(0, 0, 0, 0)"]), L = [
43
+ ], b = /* @__PURE__ */ new Set(["transparent", "rgba(0, 0, 0, 0)"]), L = [
43
44
  { attrKey: k, blockId: c.NAME, kind: "text" },
44
45
  { attrKey: y, blockId: c.PRICE, kind: "text" },
45
46
  { attrKey: p, blockId: c.OLD_PRICE, kind: "text" },
@@ -48,14 +49,14 @@ const s = [
48
49
  { attrKey: x, blockId: c.BUTTON, kind: "button" },
49
50
  { attrKey: q, blockId: c.IMAGE, kind: "image" }
50
51
  ];
51
- function h(t) {
52
+ function O(t) {
52
53
  return t && "getInnerHTML" in t && typeof t.getInnerHTML == "function" ? t.getInnerHTML().trim() : "";
53
54
  }
54
55
  function K(t) {
55
56
  return t && "getInnerText" in t && typeof t.getInnerText == "function" ? t.getInnerText().trim() : "";
56
57
  }
57
58
  function a(t, e, r) {
58
- !e || !O(e) || r.forEach((n) => {
59
+ !e || !h(e) || r.forEach((n) => {
59
60
  const o = e.getStyle(n);
60
61
  o && o !== "inherit" && o !== "initial" && (t[n] = o);
61
62
  });
@@ -64,10 +65,10 @@ function E(t) {
64
65
  return Object.entries(t).map(([e, r]) => `${e}: ${r};`).join(" ");
65
66
  }
66
67
  function P(t) {
67
- if (!t || !O(t))
68
+ if (!t || !h(t))
68
69
  return;
69
70
  const e = t.getStyle("background-color") || t.getStyle("background");
70
- return e && !g.has(e) ? e : void 0;
71
+ return e && !b.has(e) ? e : void 0;
71
72
  }
72
73
  function S(t, e) {
73
74
  const r = {};
@@ -76,11 +77,11 @@ function S(t, e) {
76
77
  function $(t) {
77
78
  const e = t.querySelector("p"), r = {};
78
79
  a(r, t, s), a(r, e, s), a(r, t.querySelector("strong"), s), a(r, t.querySelector("em"), s), a(r, t.querySelector("s"), s);
79
- const n = E(r), { openTags: o, closeTags: i } = A(h(e));
80
+ const n = E(r), { openTags: o, closeTags: i } = A(O(e));
80
81
  return !n && !o ? null : { pStyle: n || void 0, openTags: o, closeTags: i };
81
82
  }
82
83
  function H(t) {
83
- const e = t.querySelector(".es-button-border"), r = t.querySelector("a.es-button") ?? t.querySelector("a"), n = S(e, D), o = S(r, w), i = e && "getAttribute" in e ? e.getAttribute("class") ?? "" : "", u = /\bes-fw\b/.test(i), { openTags: T, closeTags: d } = A(h(r)), m = K(r);
84
+ const e = t.querySelector(".es-button-border"), r = t.querySelector("a.es-button") ?? t.querySelector("a"), n = S(e, D), o = S(r, w), i = e && "getAttribute" in e ? e.getAttribute("class") ?? "" : "", u = /\bes-fw\b/.test(i), { openTags: T, closeTags: d } = A(O(r)), m = K(r);
84
85
  return !n && !o && !u && !T && !m ? null : {
85
86
  buttonBorderStyle: n || void 0,
86
87
  buttonAnchorStyle: o || void 0,
@@ -100,7 +101,7 @@ function j(t, e) {
100
101
  function f(t, e) {
101
102
  if (!t || !("querySelector" in t))
102
103
  return;
103
- const r = t.querySelector(b) ?? t;
104
+ const r = t.querySelector(g) ?? t;
104
105
  if (L.forEach(({ attrKey: i, blockId: u, kind: T }) => {
105
106
  const d = r.querySelector(`[esd-extension-block-id="${u}"]`);
106
107
  d && e(d, i, T);
@@ -126,20 +127,20 @@ function V(t) {
126
127
  function X(t) {
127
128
  if (!t || !("querySelector" in t))
128
129
  return;
129
- const e = t.querySelector(b) ?? t, r = e.querySelector(".product-card-segment") ?? e.querySelector(".product-card-wrapper");
130
+ const e = t.querySelector(g) ?? t, r = e.querySelector(".product-card-segment") ?? e.querySelector(".product-card-wrapper");
130
131
  return P(r);
131
132
  }
132
133
  function z(t) {
133
134
  if (!t)
134
135
  return;
135
136
  const e = l(t) ? t.getAttribute("bgcolor") : null;
136
- if (e && !g.has(e))
137
+ if (e && !b.has(e))
137
138
  return e;
138
139
  const r = P(t);
139
140
  if (r)
140
141
  return r;
141
142
  const n = M(t) ? t.getComputedStyle("background-color") : void 0;
142
- return n && !g.has(n) ? n : void 0;
143
+ return n && !b.has(n) ? n : void 0;
143
144
  }
144
145
  function Q(t) {
145
146
  const e = {};
@@ -170,7 +171,7 @@ function J(t) {
170
171
  function Z(t) {
171
172
  if (!t || !("querySelector" in t))
172
173
  return !1;
173
- const e = t.querySelector(b) ?? t;
174
+ const e = t.querySelector(g) ?? t;
174
175
  return C(e.querySelector(`[data-attribute-type="${y}"]`)) || C(e.querySelector(`[data-attribute-type="${p}"]`));
175
176
  }
176
177
  function tt(t) {
@@ -195,7 +196,7 @@ function rt(t) {
195
196
  const e = {};
196
197
  if (!t || !("querySelector" in t))
197
198
  return e;
198
- const r = t.querySelector(b) ?? t;
199
+ const r = t.querySelector(g) ?? t;
199
200
  return I(r) && r.querySelectorAll(".recommendation-attribute-row").forEach((n) => {
200
201
  if (!l(n))
201
202
  return;
@@ -1,7 +1,7 @@
1
- import { TextAlignBuiltInControl as C, TextColorBuiltInControl as x, TextSizeBuiltInControl as T, TextStyleBuiltInControl as B, TextFontFamilyBuiltInControl as m, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as y, ImageSizeBuiltInControl as b, ImageMarginsBuiltInControl as I, ButtonAlignBuiltInControl as S, ButtonBorderBuiltInControl as A, ButtonBorderRadiusBuiltInControl as k, ButtonColorBuiltInControl as N, ButtonFontFamilyBuiltInControl as h, ButtonMarginsBuiltInControl as p, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as q, ButtonTextSizeBuiltInControl as F, ButtonTextStyleAndFontColorBuiltInControl as v, ButtonFitToContainerBuiltInControl as R, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
1
+ import { ImageSizeBuiltInControl as C, ImageMarginsBuiltInControl as x, TextAlignBuiltInControl as T, TextColorBuiltInControl as B, TextSizeBuiltInControl as m, TextStyleBuiltInControl as y, TextFontFamilyBuiltInControl as b, ButtonBackgroundColorBuiltInControl as d, TextPaddingsBuiltInControl as I, ButtonAlignBuiltInControl as S, ButtonBorderBuiltInControl as A, ButtonBorderRadiusBuiltInControl as k, ButtonColorBuiltInControl as N, ButtonFontFamilyBuiltInControl as h, ButtonMarginsBuiltInControl as p, ButtonPaddingsBuiltInControl as $, ButtonTextBuiltInControl as q, ButtonTextSizeBuiltInControl as F, ButtonTextStyleAndFontColorBuiltInControl as v, ButtonFitToContainerBuiltInControl as R, TextLineSpacingBuiltInControl as M } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
2
  const O = "buttonTextStyleForm", a = "backgroundColor", g = /* @__PURE__ */ new Set(["", "transparent", "rgba(0, 0, 0, 0)"]), _ = ["elementColor", a], E = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
3
3
  function P(o, e, r) {
4
- return class extends C {
4
+ return class extends T {
5
5
  getId() {
6
6
  return o;
7
7
  }
@@ -14,7 +14,7 @@ function P(o, e, r) {
14
14
  };
15
15
  }
16
16
  function H(o, e, r) {
17
- return class extends x {
17
+ return class extends B {
18
18
  getId() {
19
19
  return o;
20
20
  }
@@ -27,7 +27,7 @@ function H(o, e, r) {
27
27
  };
28
28
  }
29
29
  function U(o, e, r) {
30
- return class extends T {
30
+ return class extends m {
31
31
  getId() {
32
32
  return o;
33
33
  }
@@ -40,7 +40,7 @@ function U(o, e, r) {
40
40
  };
41
41
  }
42
42
  function Y(o, e, r) {
43
- return class extends B {
43
+ return class extends y {
44
44
  getId() {
45
45
  return o;
46
46
  }
@@ -53,7 +53,7 @@ function Y(o, e, r) {
53
53
  };
54
54
  }
55
55
  function G(o, e, r) {
56
- return class extends m {
56
+ return class extends b {
57
57
  getId() {
58
58
  return o;
59
59
  }
@@ -149,7 +149,7 @@ function w(o, e) {
149
149
  };
150
150
  }
151
151
  function W(o, e, r) {
152
- return class extends y {
152
+ return class extends I {
153
153
  getId() {
154
154
  return o;
155
155
  }
@@ -318,7 +318,7 @@ function it(o, e, r) {
318
318
  };
319
319
  }
320
320
  function lt(o, e, r) {
321
- return class extends b {
321
+ return class extends C {
322
322
  getId() {
323
323
  return o;
324
324
  }
@@ -333,7 +333,7 @@ function lt(o, e, r) {
333
333
  };
334
334
  }
335
335
  function ct(o, e, r) {
336
- return class extends I {
336
+ return class extends x {
337
337
  getId() {
338
338
  return o;
339
339
  }
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-c5146fc5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-c5146fc5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-c5146fc5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
1
+ @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-b8f24f34] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-baf7a5dd]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-65036aaf]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-65036aaf]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-65036aaf]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-19d8cb42] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd]{width:100%;max-width:none}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-skeleton{width:100%!important}.assign-strategy-drawer-content .assign-strategy-select[data-v-6ce48dfd] .in-dropdown-box__container{width:413px}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
@@ -59,6 +59,8 @@ export declare class RecommendationBlock extends Block {
59
59
  * @param node - The block node being deleted
60
60
  */
61
61
  onDelete(node: ImmutableHtmlNode): void;
62
+ private _ensureMobileFitRule;
63
+ private _syncHeightBound;
62
64
  /**
63
65
  * Warns (dark advisory toaster) when the design holds more than one live
64
66
  * recommendation block. Triggered from the user-add paths only (fresh drop
@@ -3,35 +3,50 @@
3
3
  *
4
4
  * Controls for styling the product image element in recommendation cards.
5
5
  */
6
+ import type { CssNodeModifier, HtmlNodeModifier, ImmutableCssNode, ImmutableHtmlNode, TemplateModifier } from '@stripoinc/ui-editor-extensions';
7
+ import { ModificationDescription } from '@stripoinc/ui-editor-extensions';
8
+ interface FitRuleApi {
9
+ getDocumentRootCssNode: () => ImmutableCssNode | null;
10
+ getDocumentModifier: () => TemplateModifier<HtmlNodeModifier, CssNodeModifier>;
11
+ }
12
+ export declare function ensureMobileFitRule(api: FitRuleApi, block: ImmutableHtmlNode): void;
13
+ export declare function syncHeightBound(api: Pick<FitRuleApi, 'getDocumentModifier'>, block: ImmutableHtmlNode, blockKey: string): void;
14
+ export declare function forgetHeightBounds(blockKey?: string): void;
15
+ declare const SizeControl_base: {
16
+ new (): {
17
+ getId(): string;
18
+ getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
19
+ getParentControlId(): string;
20
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
21
+ getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
22
+ getModificationDescription(): ModificationDescription | undefined;
23
+ getAdditionalModifications(_root: ImmutableHtmlNode): TemplateModifier<HtmlNodeModifier, CssNodeModifier> | undefined;
24
+ isVisible(_node: ImmutableHtmlNode): boolean;
25
+ getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
26
+ };
27
+ };
28
+ declare class SizeControl extends SizeControl_base {
29
+ getAdditionalModifications(root: ImmutableHtmlNode): TemplateModifier<HtmlNodeModifier, CssNodeModifier> | undefined;
30
+ private getFitStyles;
31
+ }
6
32
  /**
7
33
  * Grouped Image Controls
8
34
  * Use this object for cleaner imports in extension.ts
9
35
  */
10
36
  export declare const ImageControls: {
11
- readonly size: {
12
- new (): {
13
- getId(): string;
14
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
15
- getParentControlId(): string;
16
- api: import("@stripoinc/ui-editor-extensions").ControlApi;
17
- getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
18
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
19
- getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
20
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
21
- getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
22
- };
23
- };
37
+ readonly size: typeof SizeControl;
24
38
  readonly margins: {
25
39
  new (): {
26
40
  getId(): string;
27
- getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
41
+ getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
28
42
  getParentControlId(): string;
29
43
  api: import("@stripoinc/ui-editor-extensions").ControlApi;
30
44
  getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
31
- getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
32
- getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
33
- isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
45
+ getModificationDescription(): ModificationDescription | undefined;
46
+ getAdditionalModifications(_root: ImmutableHtmlNode): TemplateModifier<HtmlNodeModifier, CssNodeModifier> | undefined;
47
+ isVisible(_node: ImmutableHtmlNode): boolean;
34
48
  getElementLockCategory(): import("@stripoinc/ui-editor-extensions").ElementLockCategory | undefined;
35
49
  };
36
50
  };
37
51
  };
52
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.21.0-beta.ed1d11f",
3
+ "version": "3.21.0-beta.f545026",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",