@useinsider/guido 3.0.0-beta.5c24c6a → 3.0.0-beta.6536dae

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.
@@ -3,7 +3,7 @@ import i from "./Guido.vue2.js";
3
3
  import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
6
+ return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(_) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
9
  }, n = [], s = /* @__PURE__ */ a(
@@ -12,9 +12,9 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "25780af6"
15
+ "a26d7792"
16
16
  );
17
- const u = s.exports;
17
+ const v = s.exports;
18
18
  export {
19
- u as default
19
+ v as default
20
20
  };
@@ -1,131 +1,121 @@
1
- import { defineComponent as j, defineAsyncComponent as R, ref as A, computed as I, watch as J, onMounted as Q, onUnmounted as X } from "vue";
2
- import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
3
- import { usePartner as Z } from "../composables/usePartner.js";
4
- import { useStripo as ee } from "../composables/useStripo.js";
5
- import { useTimerClone as te } from "../composables/useTimerClone.js";
6
- import { migrate as W } from "../config/migrator/index.js";
7
- import { ModuleFolderDefaults as B } from "../enums/defaults.js";
8
- import { RIBBON_SELECTOR as oe } from "../enums/onboarding.js";
9
- import ne from "./organisms/base/Toaster.vue.js";
10
- import se from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
11
- import re from "./organisms/header/HeaderWrapper.vue.js";
12
- import ce from "./organisms/LoadingWrapper.vue.js";
13
- import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
14
- import ie from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
15
- import { useStripoApi as me } from "../services/stripoApi.js";
16
- import { useConfigStore as de } from "../stores/config.js";
17
- import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
18
- import { useEditorStore as ue } from "../stores/editor.js";
19
- import { usePreviewStore as pe } from "../stores/preview.js";
20
- import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
21
- const Re = /* @__PURE__ */ j({
1
+ import { defineComponent as K, defineAsyncComponent as _, ref as V, computed as P, watch as j, onMounted as q, onUnmounted as J } from "vue";
2
+ import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
3
+ import { usePartner as X } from "../composables/usePartner.js";
4
+ import { useStripo as Y } from "../composables/useStripo.js";
5
+ import { useTimerClone as Z } from "../composables/useTimerClone.js";
6
+ import { migrate as A } from "../config/migrator/index.js";
7
+ import { ModuleFolderDefaults as N } from "../enums/defaults.js";
8
+ import $ from "./organisms/base/Toaster.vue.js";
9
+ import ee from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
+ import oe from "./organisms/header/HeaderWrapper.vue.js";
11
+ import te from "./organisms/LoadingWrapper.vue.js";
12
+ import ne from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
+ import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
14
+ import { useStripoApi as re } from "../services/stripoApi.js";
15
+ import { useConfigStore as ce } from "../stores/config.js";
16
+ import { useDynamicContentStore as ae } from "../stores/dynamic-content.js";
17
+ import { useEditorStore as ie } from "../stores/editor.js";
18
+ import { usePreviewStore as me } from "../stores/preview.js";
19
+ import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
20
+ const Me = /* @__PURE__ */ K({
22
21
  __name: "Guido",
23
22
  props: {
24
23
  config: null
25
24
  },
26
25
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
27
- setup(H, { expose: x, emit: s }) {
28
- const b = H, G = R(
26
+ setup(W, { expose: I, emit: t }) {
27
+ const v = W, O = _(
29
28
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
30
- ), z = R(
29
+ ), G = _(
31
30
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
32
- ), S = A(), d = A(), l = le(), g = fe(), a = de();
33
- a.init(b.config);
34
- const u = ue(), q = pe(), i = I(() => u.hasChanges), { isTestPartner: K } = Z(), w = () => {
31
+ ), h = V(), i = ae(), y = de(), s = ce();
32
+ s.init(v.config);
33
+ const m = ie(), H = me(), c = P(() => m.hasChanges), { isTestPartner: x } = X(), f = () => {
35
34
  var e;
36
- return (e = S.value) == null ? void 0 : e.handleSave(!0);
35
+ return (e = h.value) == null ? void 0 : e.handleSave(!0);
37
36
  }, {
38
- templateId: p,
39
- userId: E,
40
- partnerName: D,
41
- username: C,
42
- template: t,
43
- editor: r
44
- } = a, m = (t == null ? void 0 : t.html) || "", T = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], k = (r == null ? void 0 : r.savedModulesFolderName) || B.SAVED_MODULES, F = (r == null ? void 0 : r.defaultModulesFolderName) || B.DEFAULT_MODULES;
45
- u.templateId = p;
46
- const v = {
47
- emailId: p,
48
- userId: E,
49
- username: C,
50
- partnerName: D,
51
- savedModulesFolderName: k,
52
- defaultModulesFolderName: F
53
- }, L = {
54
- preselectedDynamicContentList: f,
37
+ templateId: d,
38
+ userId: b,
39
+ partnerName: S,
40
+ username: g,
41
+ template: o,
42
+ editor: n
43
+ } = s, a = (o == null ? void 0 : o.html) || "", D = (o == null ? void 0 : o.css) || "", l = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || N.SAVED_MODULES, E = (n == null ? void 0 : n.defaultModulesFolderName) || N.DEFAULT_MODULES;
44
+ m.templateId = d;
45
+ const u = {
46
+ emailId: d,
47
+ userId: b,
48
+ username: g,
49
+ partnerName: S,
50
+ savedModulesFolderName: w,
51
+ defaultModulesFolderName: E
52
+ }, C = {
53
+ preselectedDynamicContentList: l,
55
54
  onReady: () => {
56
- console.debug("guido:ready"), s("ready");
55
+ console.debug("guido:ready"), t("ready");
57
56
  }
58
- }, { initPlugin: U } = ee(v, L), { getDefaultTemplate: _ } = me(), { cloneTimersOnSave: M, hasTimerBlocks: O } = te(), V = I(() => {
57
+ }, { initPlugin: T } = Y(u, C), { getDefaultTemplate: k } = re(), { cloneTimersOnSave: F, hasTimerBlocks: U } = Z(), B = P(() => {
59
58
  var e;
60
- return !((e = a.ui) != null && e.showHeader);
59
+ return !((e = s.ui) != null && e.showHeader);
61
60
  });
62
- Y({
61
+ Q({
63
62
  onBack: () => {
64
- console.debug("guido:back"), s("back");
63
+ console.debug("guido:back"), t("back");
65
64
  },
66
65
  onSaveStart: () => {
67
- console.debug("guido:save:start"), s("save:start");
66
+ console.debug("guido:save:start"), t("save:start");
68
67
  },
69
68
  onSaveComplete: (e) => {
70
- const n = { ...e, metadata: v };
71
- console.debug("guido:save:complete", n), s("save:complete", n);
69
+ const r = { ...e, metadata: u };
70
+ console.debug("guido:save:complete", r), t("save:complete", r);
72
71
  },
73
72
  onTestEmailClick: () => {
74
- console.debug("guido:test-email:click"), s("test-email:click");
73
+ console.debug("guido:test-email:click"), t("test-email:click");
75
74
  }
76
75
  });
77
- const P = (e) => {
78
- console.debug("dynamic-content:close", e), l.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
79
- }, N = () => {
76
+ const L = (e) => {
77
+ console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
78
+ }, M = () => {
80
79
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
81
80
  };
82
- J(() => i.value, () => {
83
- s("on-change", i.value);
81
+ j(() => c.value, () => {
82
+ t("on-change", c.value);
84
83
  });
85
- const y = (e) => {
86
- const n = e, { attribute: o, position: $ } = n.detail;
87
- console.debug("dynamic-content:open", n.detail), s("dynamic-content:open", o, $);
84
+ const p = (e) => {
85
+ const r = e, { attribute: R, position: z } = r.detail;
86
+ console.debug("dynamic-content:open", r.detail), t("dynamic-content:open", R, z);
88
87
  };
89
- let c = null;
90
- const h = () => {
91
- var n;
92
- const e = document.querySelector(oe);
93
- (n = d.value) == null || n.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
94
- };
95
- return Q(async () => {
96
- var n;
97
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), h();
98
- const e = (n = d.value) == null ? void 0 : n.parentElement;
99
- e && (c = new ResizeObserver(h), c.observe(e));
88
+ return q(async () => {
89
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
100
90
  try {
101
- g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
102
- let o = {
103
- html: m && await W(m),
104
- css: T
91
+ y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
92
+ let e = {
93
+ html: a && await A(a),
94
+ css: D
105
95
  };
106
- o.html || (o = await _(), o.html = await W(o.html)), O(o.html) && (o.html = await M(o.html)), await U(o), l.selectedDynamicContentList = f;
107
- } catch (o) {
108
- console.error("Failed to initialize Stripo editor:", o);
96
+ e.html || (e = await k(), e.html = await A(e.html)), U(e.html) && (e.html = await F(e.html)), await T(e), i.selectedDynamicContentList = l;
97
+ } catch (e) {
98
+ console.error("Failed to initialize Stripo editor:", e);
109
99
  }
110
- document.addEventListener("dynamic-content:open", y);
111
- }), X(() => {
112
- c == null || c.disconnect(), document.removeEventListener("dynamic-content:open", y);
100
+ document.addEventListener("dynamic-content:open", p);
101
+ }), J(() => {
102
+ document.removeEventListener("dynamic-content:open", p);
113
103
  try {
114
104
  window.UIEditor.removeEditor();
115
105
  } catch {
116
106
  console.debug("Failed to remove Stripo editor: No editor found");
117
107
  }
118
- a.reset();
119
- }), x({
108
+ s.reset();
109
+ }), I({
120
110
  dynamicContent: {
121
- insert: P,
122
- close: N
111
+ insert: L,
112
+ close: M
123
113
  },
124
- hasChanges: i,
125
- saveSilent: w
126
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: z, headerWrapperRef: S, wrapperRef: d, dynamicContentStore: l, unsubscribeStore: g, props: b, configStore: a, editorStore: u, previewStore: q, hasChanges: i, isTestPartner: K, saveSilent: w, templateId: p, userId: E, partnerName: D, username: C, templateConfig: t, editorConfig: r, html: m, css: T, preselectedDynamicContentList: f, savedModulesFolderName: k, defaultModulesFolderName: F, emit: s, metadata: v, options: L, initPlugin: U, getDefaultTemplate: _, cloneTimersOnSave: M, hasTimerBlocks: O, noHeader: V, insertDynamicContent: P, closeDynamicContent: N, handleDynamicContentOpen: y, ribbonObserver: c, updateRibbonOffset: h, Toaster: ne, FilterSelectionDrawer: se, HeaderWrapper: re, LoadingWrapper: ce, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ie };
114
+ hasChanges: c,
115
+ saveSilent: f
116
+ }), { __sfc: !0, PreviewContainer: O, OnboardingWrapper: G, headerWrapperRef: h, dynamicContentStore: i, unsubscribeStore: y, props: v, configStore: s, editorStore: m, previewStore: H, hasChanges: c, isTestPartner: x, saveSilent: f, templateId: d, userId: b, partnerName: S, username: g, templateConfig: o, editorConfig: n, html: a, css: D, preselectedDynamicContentList: l, savedModulesFolderName: w, defaultModulesFolderName: E, emit: t, metadata: u, options: C, initPlugin: T, getDefaultTemplate: k, cloneTimersOnSave: F, hasTimerBlocks: U, noHeader: B, insertDynamicContent: L, closeDynamicContent: M, handleDynamicContentOpen: p, Toaster: $, FilterSelectionDrawer: ee, HeaderWrapper: oe, LoadingWrapper: te, SaveAsTemplateDrawer: ne, UnsubscribeWrapper: se };
127
117
  }
128
118
  });
129
119
  export {
130
- Re as default
120
+ Me as default
131
121
  };
@@ -75,7 +75,8 @@ const e = {
75
75
  "The image with the invalid link cannot be saved to the image gallery": "Enter a valid image link to continue.",
76
76
  "The data source link is unavailable. Please, make sure there is an access to the data source.": "Enter an accessible Data Source Link to contiue.",
77
77
  "The file should not exceed the maximum resolution of {maxImageResolution}px.": "Upload files up to 1024x512 pixels to continue.",
78
- "The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor."
78
+ "The option is disabled because was overridden in the Code editor": "The option is disabled because it was overridden in the Code Editor.",
79
+ "Dropdown with a list of available data services, preliminarily created in the Data section → Services tab of the Account.": "Service for Data Collection lets you enter a form submission URL for the recipients to submit."
79
80
  };
80
81
  export {
81
82
  e as default
@@ -40,6 +40,9 @@ class T extends B {
40
40
  this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
41
41
  );
42
42
  }
43
+ allowInnerBlocksDND() {
44
+ return !1;
45
+ }
43
46
  /**
44
47
  * Returns the template HTML for a new recommendation block.
45
48
  * Generates a unique recommendation ID and embeds the instance class
@@ -148,7 +151,7 @@ class T extends B {
148
151
  if (e && e.includes(c))
149
152
  return t;
150
153
  }
151
- return "querySelector" in t ? t.querySelector(`.${c}`) : null;
154
+ return "querySelector" in t ? t.querySelector(`.${c}`) ?? null : null;
152
155
  }
153
156
  /**
154
157
  * Migrate configuration from legacy format
@@ -16,7 +16,7 @@ function A(t) {
16
16
  if (e && e.includes(M))
17
17
  return t;
18
18
  }
19
- return "querySelector" in t ? t.querySelector(`.${M}`) : null;
19
+ return "querySelector" in t ? t.querySelector(`.${M}`) ?? null : null;
20
20
  }
21
21
  function b(t) {
22
22
  const e = A(t);
@@ -1,15 +1,15 @@
1
- var G = Object.defineProperty;
2
- var R = (p, c, t) => c in p ? G(p, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[c] = t;
3
- var h = (p, c, t) => R(p, typeof c != "symbol" ? c + "" : c, t);
4
- import { EditorStatePropertyType as y, PreviewDeviceMode as w, ModificationDescription as g } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
- import { CommonControl as V } from "../../../common-control.js";
6
- import { DESKTOP_CONTAINER_SELECTOR as m, MOBILE_CONTAINER_SELECTOR as E } from "../../constants/selectors.js";
7
- import { SPACING_STEP as S, MAX_SPACING as _, MIN_SPACING as N, DEFAULT_COLUMN_SPACING as C, DEFAULT_ROW_SPACING as P } from "../../constants/layout.js";
1
+ var R = Object.defineProperty;
2
+ var w = (u, s, t) => s in u ? R(u, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[s] = t;
3
+ var C = (u, s, t) => w(u, typeof s != "symbol" ? s + "" : s, t);
4
+ import { EditorStatePropertyType as E, PreviewDeviceMode as V, ModificationDescription as m } from "../../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
5
+ import { CommonControl as B } from "../../../common-control.js";
6
+ import { DESKTOP_CONTAINER_SELECTOR as S, MOBILE_CONTAINER_SELECTOR as P } from "../../constants/selectors.js";
7
+ import { SPACING_STEP as _, MAX_SPACING as N, MIN_SPACING as b, DEFAULT_COLUMN_SPACING as g, DEFAULT_ROW_SPACING as G } from "../../constants/layout.js";
8
8
  import { RecommendationConfigService as d } from "../../services/configService.js";
9
- import { useRecommendationExtensionStore as B } from "../../store/recommendation.js";
10
- import { safeGetStyle as A, safeGetParent as U } from "../../utils/tagName.js";
11
- import { getCurrentLayout as b, getBlockElement as x } from "../main/utils.js";
12
- import { useDebounceFn as f } from "../../../../../node_modules/@vueuse/shared/index.js";
9
+ import { useRecommendationExtensionStore as U } from "../../store/recommendation.js";
10
+ import { safeGetStyle as L, safeGetParent as I } from "../../utils/tagName.js";
11
+ import { getCurrentLayout as f, getBlockElement as x } from "../main/utils.js";
12
+ import { useDebounceFn as O } from "../../../../../node_modules/@vueuse/shared/index.js";
13
13
  const W = "recommendation-spacing-control", i = {
14
14
  COLUMN_SPACING: "columnSpacing",
15
15
  COLUMN_SPACING_LABEL: "columnSpacingLabel",
@@ -19,46 +19,46 @@ const W = "recommendation-spacing-control", i = {
19
19
  MOBILE_COLUMN_SPACING_LABEL: "mobileColumnSpacingLabel",
20
20
  MOBILE_ROW_SPACING: "mobileRowSpacing",
21
21
  MOBILE_ROW_SPACING_LABEL: "mobileRowSpacingLabel"
22
- }, O = {
22
+ }, A = {
23
23
  COLUMN_SPACING: "data-column-spacing",
24
24
  ROW_SPACING: "data-row-spacing",
25
25
  MOBILE_COLUMN_SPACING: "data-mobile-column-spacing",
26
26
  MOBILE_ROW_SPACING: "data-mobile-row-spacing"
27
27
  };
28
- function L(p, c) {
29
- if (!p)
30
- return c;
31
- const t = parseFloat(p);
32
- return Number.isNaN(t) ? c : t;
28
+ function M(u, s) {
29
+ if (!u)
30
+ return s;
31
+ const t = parseFloat(u);
32
+ return Number.isNaN(t) ? s : t;
33
33
  }
34
- class X extends V {
34
+ class X extends B {
35
35
  constructor() {
36
36
  super(...arguments);
37
- h(this, "store", B());
38
- h(this, "unsubscribeOrientation", null);
37
+ C(this, "store", U());
38
+ C(this, "unsubscribeOrientation", null);
39
39
  /**
40
40
  * Debounced version of _onColumnSpacingChange
41
41
  * Prevents excessive DOM updates when user rapidly adjusts the counter
42
42
  */
43
- h(this, "_debouncedOnColumnSpacingChange", f((t) => {
43
+ C(this, "_debouncedOnColumnSpacingChange", O((t) => {
44
44
  this._onColumnSpacingChange(t);
45
45
  }, 300));
46
46
  /**
47
47
  * Debounced version of _onRowSpacingChange
48
48
  */
49
- h(this, "_debouncedOnRowSpacingChange", f((t) => {
49
+ C(this, "_debouncedOnRowSpacingChange", O((t) => {
50
50
  this._onRowSpacingChange(t);
51
51
  }, 300));
52
52
  /**
53
53
  * Debounced version of _onMobileColumnSpacingChange
54
54
  */
55
- h(this, "_debouncedOnMobileColumnSpacingChange", f((t) => {
55
+ C(this, "_debouncedOnMobileColumnSpacingChange", O((t) => {
56
56
  this._onMobileColumnSpacingChange(t);
57
57
  }, 300));
58
58
  /**
59
59
  * Debounced version of _onMobileRowSpacingChange
60
60
  */
61
- h(this, "_debouncedOnMobileRowSpacingChange", f((t) => {
61
+ C(this, "_debouncedOnMobileRowSpacingChange", O((t) => {
62
62
  this._onMobileRowSpacingChange(t);
63
63
  }, 300));
64
64
  }
@@ -72,16 +72,16 @@ class X extends V {
72
72
  this._GuLabel({ text: "Column Spacing on Desktop (px)", name: i.COLUMN_SPACING_LABEL }),
73
73
  this._GuCounter({
74
74
  name: i.COLUMN_SPACING,
75
- minValue: N,
76
- maxValue: _,
77
- step: S
75
+ minValue: b,
76
+ maxValue: N,
77
+ step: _
78
78
  }),
79
79
  this._GuLabel({ text: "Row Spacing on Desktop (px)", name: i.ROW_SPACING_LABEL }),
80
80
  this._GuCounter({
81
81
  name: i.ROW_SPACING,
82
- minValue: N,
83
- maxValue: _,
84
- step: S
82
+ minValue: b,
83
+ maxValue: N,
84
+ step: _
85
85
  }),
86
86
  this._GuLabel({
87
87
  text: "Column Spacing on Mobile (px)",
@@ -89,16 +89,16 @@ class X extends V {
89
89
  }),
90
90
  this._GuCounter({
91
91
  name: i.MOBILE_COLUMN_SPACING,
92
- minValue: N,
93
- maxValue: _,
94
- step: S
92
+ minValue: b,
93
+ maxValue: N,
94
+ step: _
95
95
  }),
96
96
  this._GuLabel({ text: "Row Spacing on Mobile (px)", name: i.MOBILE_ROW_SPACING_LABEL }),
97
97
  this._GuCounter({
98
98
  name: i.MOBILE_ROW_SPACING,
99
- minValue: N,
100
- maxValue: _,
101
- step: S
99
+ minValue: b,
100
+ maxValue: N,
101
+ step: _
102
102
  })
103
103
  ])}
104
104
  </div>
@@ -118,7 +118,7 @@ class X extends V {
118
118
  * using Stripo's EditorStatePropertyType API.
119
119
  */
120
120
  _isMobileMode() {
121
- return this.api.getEditorState()[y.previewDeviceMode] === w.MOBILE;
121
+ return this.api.getEditorState()[E.previewDeviceMode] === V.MOBILE;
122
122
  }
123
123
  /**
124
124
  * Updates spacing control visibility based on layout orientation, editor mode,
@@ -132,8 +132,8 @@ class X extends V {
132
132
  _updateSpacingVisibility() {
133
133
  if (!this.api)
134
134
  return;
135
- const t = d.getConfig(this.currentNode), e = this.store.recommendationConfigs.orientation, n = t.layout || e || b(this.currentNode), o = n === "grid", a = n === "list", r = this._isMobileMode(), l = t.cardsInRow > 1, u = t.mobileCardsInRow > 1;
136
- this.api.setVisibility(i.COLUMN_SPACING, o && !r && l), this.api.setVisibility(i.COLUMN_SPACING_LABEL, o && !r && l), this.api.setVisibility(i.ROW_SPACING, a || !r), this.api.setVisibility(i.ROW_SPACING_LABEL, a || !r), this.api.setVisibility(i.MOBILE_COLUMN_SPACING, o && r && u), this.api.setVisibility(i.MOBILE_COLUMN_SPACING_LABEL, o && r && u), this.api.setVisibility(i.MOBILE_ROW_SPACING, !a && r), this.api.setVisibility(i.MOBILE_ROW_SPACING_LABEL, !a && r);
135
+ const t = d.getConfig(this.currentNode), e = this.store.recommendationConfigs.orientation, n = t.layout || e || f(this.currentNode), o = n === "grid", a = n === "list", r = this._isMobileMode(), c = t.cardsInRow > 1, l = t.mobileCardsInRow > 1;
136
+ this.api.setVisibility(i.COLUMN_SPACING, o && !r && c), this.api.setVisibility(i.COLUMN_SPACING_LABEL, o && !r && c), this.api.setVisibility(i.ROW_SPACING, a || !r), this.api.setVisibility(i.ROW_SPACING_LABEL, a || !r), this.api.setVisibility(i.MOBILE_COLUMN_SPACING, o && r && l), this.api.setVisibility(i.MOBILE_COLUMN_SPACING_LABEL, o && r && l), this.api.setVisibility(i.MOBILE_ROW_SPACING, !a && r), this.api.setVisibility(i.MOBILE_ROW_SPACING_LABEL, !a && r);
137
137
  }
138
138
  /**
139
139
  * Reads spacing values from node config first, falls back to DOM styles.
@@ -159,20 +159,20 @@ class X extends V {
159
159
  */
160
160
  _getStoredColumnSpacing() {
161
161
  if (!this.currentNode)
162
- return C;
163
- const t = this.currentNode.querySelector(m) ?? this.currentNode;
164
- if (b(this.currentNode) === "grid") {
165
- const u = t.querySelector(".recommendation-attribute-row"), s = u == null ? void 0 : u.querySelector("td"), I = A(s, "padding");
166
- if (!I)
167
- return C;
168
- const M = I.trim().split(/\s+/);
169
- return M.length < 2 ? C : L(M[1], C / 2) * 2;
162
+ return g;
163
+ const t = this.currentNode.querySelector(S) ?? this.currentNode;
164
+ if (f(this.currentNode) === "grid") {
165
+ const l = t.querySelector(".recommendation-attribute-row"), p = l == null ? void 0 : l.querySelector("td"), h = L(p, "padding");
166
+ if (!h)
167
+ return g;
168
+ const y = h.trim().split(/\s+/);
169
+ return y.length < 2 ? g : M(y[1], g / 2) * 2;
170
170
  }
171
- const n = t.querySelector(".product-card-wrapper"), o = U(n), a = A(o, "padding");
171
+ const n = t.querySelector(".product-card-wrapper"), o = I(n), a = L(o, "padding");
172
172
  if (!a)
173
- return C;
173
+ return g;
174
174
  const r = a.trim().split(/\s+/);
175
- return r.length < 2 ? C : L(r[1], C / 2) * 2;
175
+ return r.length < 2 ? g : M(r[1], g / 2) * 2;
176
176
  }
177
177
  /**
178
178
  * Gets stored row spacing from the first spacer element's height style
@@ -180,9 +180,9 @@ class X extends V {
180
180
  */
181
181
  _getStoredRowSpacing() {
182
182
  if (!this.currentNode)
183
- return P;
184
- const e = (this.currentNode.querySelector(m) ?? this.currentNode).querySelector(".spacer"), n = A(e, "height");
185
- return L(n, P);
183
+ return G;
184
+ const e = (this.currentNode.querySelector(S) ?? this.currentNode).querySelector(".spacer"), n = L(e, "height");
185
+ return M(n, G);
186
186
  }
187
187
  // ========================================================================
188
188
  // Desktop Spacing Handlers
@@ -199,17 +199,18 @@ class X extends V {
199
199
  this.currentNode,
200
200
  { columnSpacing: t },
201
201
  `Changed column spacing to ${t}px`
202
- ), this._storeDataAttribute(O.COLUMN_SPACING, t);
203
- const n = d.getConfig(this.currentNode).layout || b(this.currentNode), o = this.api.getDocumentModifier(), r = `0 ${t / 2}px`, l = this.currentNode.querySelector(m);
204
- l && (n === "grid" ? Array.from(
205
- l.querySelectorAll(".attribute-cell")
206
- ).forEach((s) => {
207
- o.modifyHtml(s).setStyle("padding", r);
202
+ ), this._storeDataAttribute(A.COLUMN_SPACING, t);
203
+ const n = d.getConfig(this.currentNode).layout || f(this.currentNode), o = this.api.getDocumentModifier(), r = `0 ${t / 2}px`, c = this.currentNode.querySelector(S);
204
+ c && (n === "grid" ? Array.from(
205
+ c.querySelectorAll(".attribute-cell")
206
+ ).forEach((p) => {
207
+ o.modifyHtml(p).setStyle("padding", r);
208
208
  }) : Array.from(
209
- l.querySelectorAll(".product-card-wrapper")
210
- ).forEach((s) => {
211
- "parent" in s && s.parent() && o.modifyHtml(s.parent()).setStyle("padding", r);
212
- }), o.apply(new g(`Update column spacing to ${t}px`)));
209
+ c.querySelectorAll(".product-card-wrapper")
210
+ ).forEach((p) => {
211
+ const h = I(p);
212
+ h && o.modifyHtml(h).setStyle("padding", r);
213
+ }), o.apply(new m(`Update column spacing to ${t}px`)));
213
214
  }
214
215
  /**
215
216
  * Handles row spacing changes for desktop.
@@ -223,8 +224,8 @@ class X extends V {
223
224
  this.currentNode,
224
225
  { rowSpacing: t },
225
226
  `Changed row spacing to ${t}px`
226
- ), this._storeDataAttribute(O.ROW_SPACING, t);
227
- const e = this.currentNode.querySelector(m);
227
+ ), this._storeDataAttribute(A.ROW_SPACING, t);
228
+ const e = this.currentNode.querySelector(S);
228
229
  if (!e)
229
230
  return;
230
231
  const n = Array.from(
@@ -235,7 +236,7 @@ class X extends V {
235
236
  const o = this.api.getDocumentModifier(), a = `${t}px`;
236
237
  n.forEach((r) => {
237
238
  o.modifyHtml(r).setStyle("height", a);
238
- }), o.apply(new g(`Update row spacing to ${t}px`));
239
+ }), o.apply(new m(`Update row spacing to ${t}px`));
239
240
  }
240
241
  // ========================================================================
241
242
  // Mobile Spacing Handlers
@@ -252,17 +253,18 @@ class X extends V {
252
253
  this.currentNode,
253
254
  { mobileColumnSpacing: t },
254
255
  `Changed mobile column spacing to ${t}px`
255
- ), this._storeDataAttribute(O.MOBILE_COLUMN_SPACING, t);
256
- const n = d.getConfig(this.currentNode).layout || b(this.currentNode), o = this.api.getDocumentModifier(), r = `0 ${t / 2}px`, l = this.currentNode.querySelector(E);
257
- l && (n === "grid" ? Array.from(
258
- l.querySelectorAll(".attribute-cell")
259
- ).forEach((s) => {
260
- o.modifyHtml(s).setStyle("padding", r);
256
+ ), this._storeDataAttribute(A.MOBILE_COLUMN_SPACING, t);
257
+ const n = d.getConfig(this.currentNode).layout || f(this.currentNode), o = this.api.getDocumentModifier(), r = `0 ${t / 2}px`, c = this.currentNode.querySelector(P);
258
+ c && (n === "grid" ? Array.from(
259
+ c.querySelectorAll(".attribute-cell")
260
+ ).forEach((p) => {
261
+ o.modifyHtml(p).setStyle("padding", r);
261
262
  }) : Array.from(
262
- l.querySelectorAll(".product-card-wrapper")
263
- ).forEach((s) => {
264
- "parent" in s && s.parent() && o.modifyHtml(s.parent()).setStyle("padding", r);
265
- }), o.apply(new g(`Update mobile column spacing to ${t}px`)));
263
+ c.querySelectorAll(".product-card-wrapper")
264
+ ).forEach((p) => {
265
+ const h = I(p);
266
+ h && o.modifyHtml(h).setStyle("padding", r);
267
+ }), o.apply(new m(`Update mobile column spacing to ${t}px`)));
266
268
  }
267
269
  /**
268
270
  * Handles row spacing changes for mobile.
@@ -276,8 +278,8 @@ class X extends V {
276
278
  this.currentNode,
277
279
  { mobileRowSpacing: t },
278
280
  `Changed mobile row spacing to ${t}px`
279
- ), this._storeDataAttribute(O.MOBILE_ROW_SPACING, t);
280
- const e = this.currentNode.querySelector(E);
281
+ ), this._storeDataAttribute(A.MOBILE_ROW_SPACING, t);
282
+ const e = this.currentNode.querySelector(P);
281
283
  if (!e)
282
284
  return;
283
285
  const n = Array.from(
@@ -288,7 +290,7 @@ class X extends V {
288
290
  const o = this.api.getDocumentModifier(), a = `${t}px`;
289
291
  n.forEach((r) => {
290
292
  o.modifyHtml(r).setStyle("height", a);
291
- }), o.apply(new g(`Update mobile row spacing to ${t}px`));
293
+ }), o.apply(new m(`Update mobile row spacing to ${t}px`));
292
294
  }
293
295
  // ========================================================================
294
296
  // Data Attribute Storage
@@ -298,7 +300,7 @@ class X extends V {
298
300
  */
299
301
  _storeDataAttribute(t, e) {
300
302
  const n = x(this.currentNode);
301
- n && this.api.getDocumentModifier().modifyHtml(n).setAttribute(t, e.toString()).apply(new g(`Store ${t}`));
303
+ n && this.api.getDocumentModifier().modifyHtml(n).setAttribute(t, e.toString()).apply(new m(`Store ${t}`));
302
304
  }
303
305
  // ========================================================================
304
306
  // Event Listeners
@@ -333,7 +335,7 @@ class X extends V {
333
335
  */
334
336
  _subscribeToEditorModeChanges() {
335
337
  this.api.onEditorStatePropUpdated(
336
- y.previewDeviceMode,
338
+ E.previewDeviceMode,
337
339
  () => {
338
340
  this._updateSpacingVisibility();
339
341
  }
@@ -1,10 +1,10 @@
1
1
  function a(t) {
2
2
  return typeof t == "object" && t !== null && "tagName" in t && typeof t.tagName == "string";
3
3
  }
4
- function r(t) {
4
+ function n(t) {
5
5
  return typeof t == "object" && t !== null && "getTagName" in t && typeof t.getTagName == "function";
6
6
  }
7
- function n(t) {
7
+ function r(t) {
8
8
  return typeof t == "object" && t !== null && "getStyle" in t && typeof t.getStyle == "function";
9
9
  }
10
10
  function u(t) {
@@ -14,13 +14,13 @@ function g(t) {
14
14
  return typeof t == "object" && t !== null && "tagName" in t && t.tagName === "TD";
15
15
  }
16
16
  function p(t, e) {
17
- return !t || !n(t) ? null : t.getStyle(e);
17
+ return !t || !r(t) ? null : t.getStyle(e);
18
18
  }
19
19
  function N(t) {
20
- return !t || !u(t) ? null : t.parent();
20
+ return !t || !u(t) ? null : t.parent() ?? null;
21
21
  }
22
22
  function l(t, e = "UNKNOWN") {
23
- return t ? a(t) ? t.tagName.toUpperCase() : r(t) ? t.getTagName().toUpperCase() : e : e;
23
+ return t ? a(t) ? t.tagName.toUpperCase() : n(t) ? t.getTagName().toUpperCase() : e : e;
24
24
  }
25
25
  const f = /* @__PURE__ */ new Set(["TD", "BLOCK_IMAGE", "BLOCK_BUTTON"]);
26
26
  function i(t) {
@@ -36,7 +36,7 @@ function s(t) {
36
36
  export {
37
37
  s as getTableDisplayValue,
38
38
  l as getTagName,
39
- n as hasGetStyle,
39
+ r as hasGetStyle,
40
40
  u as hasParent,
41
41
  c as isTableCellNode,
42
42
  i as isTableCellTag,