@useinsider/guido 3.27.0-beta.ee85b86 → 3.27.1-beta.4ca8aae

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +5 -10
  2. package/dist/components/Guido.vue.js +7 -7
  3. package/dist/components/Guido.vue2.js +83 -86
  4. package/dist/composables/useHtmlCompiler.js +8 -9
  5. package/dist/composables/useModuleRepair.js +32 -63
  6. package/dist/composables/useStripo.js +43 -44
  7. package/dist/config/compiler/htmlCompilerRules.js +6 -16
  8. package/dist/config/migrator/unsubscribeMigrator.js +112 -100
  9. package/dist/extensions/Blocks/Recommendation/controls/image/index.js +58 -40
  10. package/dist/extensions/Blocks/Unsubscribe/block.js +104 -96
  11. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +4 -3
  12. package/dist/extensions/Blocks/Unsubscribe/utils/swapMergeTagInHref.js +5 -0
  13. package/dist/guido.css +1 -1
  14. package/dist/package.json.js +3 -3
  15. package/dist/src/@types/generic.d.ts +0 -7
  16. package/dist/src/composables/useModuleRepair.d.ts +0 -6
  17. package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +2 -0
  18. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
  19. package/dist/src/extensions/Blocks/Unsubscribe/utils/swapMergeTagInHref.d.ts +1 -0
  20. package/dist/src/utils/dynamicContentConverter.d.ts +18 -20
  21. package/dist/src/utils/genericUtil.d.ts +8 -4
  22. package/dist/static/stripo-runtime-manifest.json.js +2 -2
  23. package/dist/utils/dynamicContentConverter.js +27 -41
  24. package/dist/utils/genericUtil.js +39 -39
  25. package/dist/utils/templatePreparation.js +9 -9
  26. package/package.json +2 -2
  27. package/dist/components/organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js +0 -24
  28. package/dist/components/organisms/dynamic-content/AmbiguousDynamicContentModal.vue2.js +0 -59
  29. package/dist/composables/useAmbiguousDynamicContent.js +0 -72
  30. package/dist/enums/dynamic-content.js +0 -4
  31. package/dist/src/components/organisms/dynamic-content/AmbiguousDynamicContentModal.vue.d.ts +0 -2
  32. package/dist/src/composables/useAmbiguousDynamicContent.d.ts +0 -7
  33. package/dist/src/enums/dynamic-content.d.ts +0 -3
  34. package/dist/src/stores/module-dynamic-content.d.ts +0 -30
  35. package/dist/src/utils/dynamicContentPendingMarker.d.ts +0 -2
  36. package/dist/stores/module-dynamic-content.js +0 -20
  37. package/dist/utils/dynamicContentPendingMarker.js +0 -6
@@ -1,48 +1,49 @@
1
- var y = Object.defineProperty;
2
- var I = (c, o, e) => o in c ? y(c, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[o] = e;
3
- var g = (c, o, e) => I(c, typeof o != "symbol" ? o + "" : o, e);
4
- import { useToaster as L } from "../../../composables/useToaster.js";
5
- import { ToasterTypeOptions as C } from "../../../enums/toaster.js";
6
- import { PAGE_TYPES as m } from "../../../enums/unsubscribe.js";
7
- import { useEditorStore as N } from "../../../stores/editor.js";
8
- import { useUnsubscribeStore as a } from "../../../stores/unsubscribe.js";
9
- import { Block as U, BlockCompositionType as R, ContextActionType as f, ModificationDescription as u, BlockType as v } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
10
- import { getDefaultTemplate as D } from "./template.js";
11
- import { UNSUBSCRIBE_BLOCK_SELECTOR as B, DATA_ATTRIBUTES as n, UNSUBSCRIBE_EVENTS as h } from "./utils/constants.js";
12
- import { parsePageList as S } from "./utils/utils.js";
13
- const w = "unsubscribe-block", E = 'a[data-unsubscribe-link="true"]', P = "{{ins-unsubscribe-link}}", x = "https://academy.insiderone.com/docs/adding-unsubscribe-pages-into-emails", G = "Removing the unsubscribe text leaves an empty block, but an active unsubscribe link is required. Undo your last action to restore the text, or delete the unsubscribe block entirely.", M = {
14
- [m.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
15
- [m.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
16
- }, O = 3;
17
- let d = null, p = null;
18
- const A = () => {
19
- d && (document.removeEventListener(h.SELECT, d), d = null);
20
- }, T = () => {
21
- p && (document.removeEventListener(h.CANCEL, p), p = null);
22
- }, q = () => {
23
- A(), T();
1
+ var R = Object.defineProperty;
2
+ var v = (l, c, e) => c in l ? R(l, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[c] = e;
3
+ var h = (l, c, e) => v(l, typeof c != "symbol" ? c + "" : c, e);
4
+ import { useToaster as D } from "../../../composables/useToaster.js";
5
+ import { ToasterTypeOptions as w } from "../../../enums/toaster.js";
6
+ import { PAGE_TYPES as B } from "../../../enums/unsubscribe.js";
7
+ import { useEditorStore as G } from "../../../stores/editor.js";
8
+ import { useUnsubscribeStore as u } from "../../../stores/unsubscribe.js";
9
+ import { Block as P, BlockCompositionType as x, ContextActionType as y, ModificationDescription as k, BlockType as M } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
10
+ import { getDefaultTemplate as O } from "./template.js";
11
+ import { UNSUBSCRIBE_BLOCK_SELECTOR as f, DATA_ATTRIBUTES as o, UNSUBSCRIBE_EVENTS as E, UNSUBSCRIBE_MERGE_TAG_REGEX as I } from "./utils/constants.js";
12
+ import { swapMergeTagInHref as q } from "./utils/swapMergeTagInHref.js";
13
+ import { parsePageList as L } from "./utils/utils.js";
14
+ const F = "unsubscribe-block", _ = 'a[data-unsubscribe-link="true"]', C = "{{ins-unsubscribe-link}}", K = "https://academy.insiderone.com/docs/adding-unsubscribe-pages-into-emails", H = "Removing the unsubscribe text leaves an empty block, but an active unsubscribe link is required. Undo your last action to restore the text, or delete the unsubscribe block entirely.", Y = {
15
+ [B.GLOBAL_UNSUBSCRIBE]: "{{ins-global-unsubscribe-link}}",
16
+ [B.SUBSCRIPTION_PREFERENCE_CENTER]: "{{ins-preferences-unsubscribe-link}}"
17
+ }, V = 3;
18
+ let d = null, b = null;
19
+ const N = () => {
20
+ d && (document.removeEventListener(E.SELECT, d), d = null);
21
+ }, U = () => {
22
+ b && (document.removeEventListener(E.CANCEL, b), b = null);
23
+ }, W = () => {
24
+ N(), U();
24
25
  };
25
- class J extends U {
26
+ class se extends P {
26
27
  constructor() {
27
28
  super();
28
- g(this, "currentNode");
29
+ h(this, "currentNode");
29
30
  // Per-block "did this instance have a link last time we saw it?" tracking.
30
31
  // Keyed by the stable `data-unsubscribe-block-id` we assign, because
31
32
  // ImmutableHtmlNode instances are recreated on every document mutation and
32
33
  // can't be used as Map keys directly. A singleton boolean here would be
33
34
  // polluted across blocks since Stripo fires onDocumentChanged per-instance.
34
- g(this, "linkStateByBlockId", /* @__PURE__ */ new Map());
35
+ h(this, "linkStateByBlockId", /* @__PURE__ */ new Map());
35
36
  // Per-block prepend retry counter for the leading text guard (SD-143097).
36
- g(this, "guardAttemptsByBlockId", /* @__PURE__ */ new Map());
37
+ h(this, "guardAttemptsByBlockId", /* @__PURE__ */ new Map());
37
38
  }
38
39
  getId() {
39
- return w;
40
+ return F;
40
41
  }
41
42
  getIcon() {
42
43
  return "unsubscribe-icon";
43
44
  }
44
45
  getBlockCompositionType() {
45
- return R.BLOCK;
46
+ return x.BLOCK;
46
47
  }
47
48
  getName() {
48
49
  return this.api.translate("Unsubscribe Block");
@@ -51,16 +52,16 @@ class J extends U {
51
52
  return this.api.translate("Unsubscribe Block Description");
52
53
  }
53
54
  getTemplate() {
54
- return D();
55
+ return O();
55
56
  }
56
57
  getContextActionsIds() {
57
- return [f.MOVE, f.REMOVE];
58
+ return [y.MOVE, y.REMOVE];
58
59
  }
59
60
  onSelect(e) {
60
- if (this.currentNode = e, N().isPreviewModeOpen)
61
+ if (this.currentNode = e, G().isPreviewModeOpen)
61
62
  return;
62
63
  const t = this._getOrAssignBlockId(e);
63
- t && this.linkStateByBlockId.set(t, this._hasUnsubscribeLink(e)), this._setupSelectEventListener(), this._setupCancelEventListener(t), !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), t && (a().pendingBlockId = t), this._loadBlockState(e), this._checkExistingBlocks(), this._openDrawer());
64
+ t && this.linkStateByBlockId.set(t, this._hasUnsubscribeLink(e)), this._setupSelectEventListener(), this._setupCancelEventListener(t), !("getAttribute" in e && e.getAttribute("data-migration")) && (this._resetStoreState(), t && (u().pendingBlockId = t), this._loadBlockState(e), this._checkExistingBlocks(), this._openDrawer());
64
65
  }
65
66
  onCreated(e) {
66
67
  this._ensureLeadingTextGuard(e);
@@ -68,7 +69,7 @@ class J extends U {
68
69
  onDocumentInit() {
69
70
  try {
70
71
  const e = this.api.getDocumentRoot();
71
- e && "querySelectorAll" in e && e.querySelectorAll(B).forEach((t) => {
72
+ e && "querySelectorAll" in e && e.querySelectorAll(f).forEach((t) => {
72
73
  this._ensureLeadingTextGuard(t);
73
74
  });
74
75
  } catch {
@@ -79,11 +80,11 @@ class J extends U {
79
80
  const t = this._getOrAssignBlockId(e);
80
81
  if (!t)
81
82
  return;
82
- const s = this._hasUnsubscribeLink(e);
83
- this.linkStateByBlockId.get(t) === !0 && !s && this._warnLinkRemoved(), this.linkStateByBlockId.set(t, s);
83
+ const i = this._hasUnsubscribeLink(e);
84
+ this.linkStateByBlockId.get(t) === !0 && !i && this._warnLinkRemoved(), this.linkStateByBlockId.set(t, i);
84
85
  }
85
86
  onDelete(e) {
86
- q(), this._removeBlockTemplatesFromStore(e), this._resetStoreState();
87
+ W(), this._removeBlockTemplatesFromStore(e), this._resetStoreState();
87
88
  const t = this._readBlockId(e);
88
89
  t && (this.linkStateByBlockId.delete(t), this.guardAttemptsByBlockId.delete(t));
89
90
  }
@@ -95,38 +96,38 @@ class J extends U {
95
96
  _ensureLeadingTextGuard(e) {
96
97
  if (!("querySelector" in e))
97
98
  return;
98
- const t = e.querySelector(E);
99
+ const t = e.querySelector(_);
99
100
  if (!t)
100
101
  return;
101
- let s = t, r = s.parent();
102
+ let i = t, r = i.parent();
102
103
  for (; r && "getTagName" in r && r.getTagName().toLowerCase() !== "p"; )
103
- s = r, r = r.parent();
104
+ i = r, r = r.parent();
104
105
  if (!r || !("getTagName" in r) || r.getTagName().toLowerCase() !== "p")
105
106
  return;
106
- const i = s.previousSibling();
107
- if (!!(i && i.getType() === "text" && i.getTextContent())) {
108
- const b = this._readBlockId(e);
109
- b && this.guardAttemptsByBlockId.delete(b);
107
+ const s = i.previousSibling();
108
+ if (!!(s && s.getType() === "text" && s.getTextContent())) {
109
+ const a = this._readBlockId(e);
110
+ a && this.guardAttemptsByBlockId.delete(a);
110
111
  return;
111
112
  }
112
- const k = this._getOrAssignBlockId(e);
113
- if (!k)
113
+ const g = this._getOrAssignBlockId(e);
114
+ if (!g)
114
115
  return;
115
- const _ = this.guardAttemptsByBlockId.get(k) ?? 0;
116
- if (!(_ >= O)) {
117
- this.guardAttemptsByBlockId.set(k, _ + 1);
116
+ const p = this.guardAttemptsByBlockId.get(g) ?? 0;
117
+ if (!(p >= V)) {
118
+ this.guardAttemptsByBlockId.set(g, p + 1);
118
119
  try {
119
- this.api.getDocumentModifier().modifyHtml(r).prepend(" ").apply(new u("Ensure unsubscribe link text guard"));
120
- } catch (b) {
121
- console.warn("[UnsubscribeBlock] Failed to ensure link text guard:", b);
120
+ this.api.getDocumentModifier().modifyHtml(r).prepend(" ").apply(new k("Ensure unsubscribe link text guard"));
121
+ } catch (a) {
122
+ console.warn("[UnsubscribeBlock] Failed to ensure link text guard:", a);
122
123
  }
123
124
  }
124
125
  }
125
126
  _hasUnsubscribeLink(e) {
126
- return "querySelector" in e ? !!e.querySelector(E) : !1;
127
+ return "querySelector" in e ? !!e.querySelector(_) : !1;
127
128
  }
128
129
  _readBlockId(e) {
129
- return "getAttribute" in e ? e.getAttribute(n.BLOCK_ID) : null;
130
+ return "getAttribute" in e ? e.getAttribute(o.BLOCK_ID) : null;
130
131
  }
131
132
  /**
132
133
  * Returns the block's stable id, assigning one via the document modifier if
@@ -140,13 +141,13 @@ class J extends U {
140
141
  return t;
141
142
  if (!("getAttribute" in e))
142
143
  return null;
143
- const s = this._generateNextBlockId();
144
+ const i = this._generateNextBlockId();
144
145
  try {
145
- this.api.getDocumentModifier().modifyHtml(e).setAttribute(n.BLOCK_ID, s).apply(new u(`Assign unsubscribe block id ${s}`));
146
+ this.api.getDocumentModifier().modifyHtml(e).setAttribute(o.BLOCK_ID, i).apply(new k(`Assign unsubscribe block id ${i}`));
146
147
  } catch (r) {
147
148
  return console.warn("[UnsubscribeBlock] Failed to assign block id:", r), null;
148
149
  }
149
- return s;
150
+ return i;
150
151
  }
151
152
  /**
152
153
  * Generates a unique id by scanning the document for the highest existing
@@ -157,10 +158,10 @@ class J extends U {
157
158
  let e = 0;
158
159
  try {
159
160
  const t = this.api.getDocumentRoot();
160
- t && "querySelectorAll" in t && t.querySelectorAll(B).forEach((r) => {
161
+ t && "querySelectorAll" in t && t.querySelectorAll(f).forEach((r) => {
161
162
  if ("getAttribute" in r) {
162
- const i = r.getAttribute(n.BLOCK_ID), l = i ? parseInt(i) : 0;
163
- l > e && (e = l);
163
+ const s = r.getAttribute(o.BLOCK_ID), n = s ? parseInt(s) : 0;
164
+ n > e && (e = n);
164
165
  }
165
166
  });
166
167
  } catch {
@@ -169,14 +170,14 @@ class J extends U {
169
170
  }
170
171
  _warnLinkRemoved() {
171
172
  try {
172
- const { showToaster: e } = L();
173
+ const { showToaster: e } = D();
173
174
  e({
174
- type: C.Warning,
175
- message: this.api.translate(G),
175
+ type: w.Warning,
176
+ message: this.api.translate(H),
176
177
  actionButton: {
177
178
  text: this.api.translate("Visit Academy"),
178
179
  onClick: () => {
179
- window.open(x, "_blank", "noopener,noreferrer");
180
+ window.open(K, "_blank", "noopener,noreferrer");
180
181
  }
181
182
  }
182
183
  });
@@ -185,55 +186,62 @@ class J extends U {
185
186
  }
186
187
  }
187
188
  _setupSelectEventListener() {
188
- A(), d = (e) => {
189
- const t = e, { collectionType: s, selectedPages: r } = t.detail;
190
- this._updateBlock(s, r.join(","));
191
- }, document.addEventListener(h.SELECT, d);
189
+ N(), d = (e) => {
190
+ const t = e, { collectionType: i, selectedPages: r } = t.detail;
191
+ this._updateBlock(i, r.join(","));
192
+ }, document.addEventListener(E.SELECT, d);
192
193
  }
193
194
  _setupCancelEventListener(e) {
194
- T(), p = (t) => {
195
- const { detail: s } = t;
196
- ((s == null ? void 0 : s.blockId) ?? null) === e && this._handleCancel();
197
- }, document.addEventListener(h.CANCEL, p);
195
+ U(), b = (t) => {
196
+ const { detail: i } = t;
197
+ ((i == null ? void 0 : i.blockId) ?? null) === e && this._handleCancel();
198
+ }, document.addEventListener(E.CANCEL, b);
198
199
  }
199
200
  _handleCancel() {
200
201
  try {
201
202
  if (!this.currentNode)
202
203
  return;
203
- this.api.getDocumentModifier().modifyHtml(this.currentNode).replaceWith(`<${v.EMPTY_CONTAINER}/>`).apply(new u("Removed unsubscribe block due to cancel"));
204
+ this.api.getDocumentModifier().modifyHtml(this.currentNode).replaceWith(`<${M.EMPTY_CONTAINER}/>`).apply(new k("Removed unsubscribe block due to cancel"));
204
205
  } catch (e) {
205
206
  console.warn("[UnsubscribeBlock] Failed to remove unsubscribe block:", e);
206
207
  }
207
208
  }
208
209
  _updateBlock(e, t) {
210
+ var a;
209
211
  if (!this.currentNode || !("querySelector" in this.currentNode))
210
212
  return;
211
- const s = this.currentNode.querySelector(E);
212
- if (!s)
213
+ const i = this.currentNode.querySelector(_);
214
+ if (!i)
213
215
  return;
214
- const r = this._getMergeTag(e);
215
- this.api.getDocumentModifier().modifyHtml(s).setAttribute("href", r).apply(new u(`Updated unsubscribe link to ${r}`)), this.api.getDocumentModifier().modifyHtml(this.currentNode).setAttribute(n.PAGE_TYPE, e.toString()).setAttribute(n.PAGE_LIST, t).apply(new u("Updated unsubscribe block metadata"));
216
+ const r = this._getMergeTag(e), s = this.api.getDocumentModifier(), n = "getAttribute" in i ? i.getAttribute("href") : null, p = [(a = n == null ? void 0 : n.match(I)) == null ? void 0 : a[0], C];
217
+ s.modifyHtml(i).setAttribute("href", r), this.currentNode.querySelectorAll("a[href]").forEach((m) => {
218
+ var T;
219
+ if (!("getAttribute" in m) || m.getAttribute("data-unsubscribe-link") === "true")
220
+ return;
221
+ const S = m.getAttribute("href") ?? "", A = (T = S.match(I)) == null ? void 0 : T[0];
222
+ A && p.includes(A) && s.modifyHtml(m).setAttribute("href", q(S, r));
223
+ }), s.modifyHtml(this.currentNode).setAttribute(o.PAGE_TYPE, e.toString()).setAttribute(o.PAGE_LIST, t), s.apply(new k(`Updated unsubscribe link to ${r}`));
216
224
  }
217
225
  _getMergeTag(e) {
218
- return M[e] ?? P;
226
+ return Y[e] ?? C;
219
227
  }
220
228
  _openDrawer() {
221
229
  if (!(this.currentNode && this.currentNode.getAttribute("data-unsubscribe-page-type")))
222
230
  try {
223
- const e = a();
231
+ const e = u();
224
232
  e.typeSelectionDrawerStatus = !0;
225
233
  } catch (e) {
226
234
  console.error("[UnsubscribeBlock] Failed to open drawer:", e);
227
235
  }
228
236
  }
229
237
  _checkExistingBlocks() {
230
- const e = a();
231
- e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(B).forEach((s) => {
232
- if ("getAttribute" in s) {
233
- const r = s.getAttribute(n.PAGE_TYPE);
238
+ const e = u();
239
+ e.isGlobalUnsubscribeDisabled = !1, e.isSubscriptionPreferencesCenterDisabled = !1, this.api.getDocumentRoot().querySelectorAll(f).forEach((i) => {
240
+ if ("getAttribute" in i) {
241
+ const r = i.getAttribute(o.PAGE_TYPE);
234
242
  if (r) {
235
- const i = Number(r);
236
- i === m.GLOBAL_UNSUBSCRIBE ? e.isGlobalUnsubscribeDisabled = !0 : i === m.SUBSCRIPTION_PREFERENCE_CENTER && (e.isSubscriptionPreferencesCenterDisabled = !0);
243
+ const s = Number(r);
244
+ s === B.GLOBAL_UNSUBSCRIBE ? e.isGlobalUnsubscribeDisabled = !0 : s === B.SUBSCRIPTION_PREFERENCE_CENTER && (e.isSubscriptionPreferencesCenterDisabled = !0);
237
245
  }
238
246
  }
239
247
  });
@@ -241,27 +249,27 @@ class J extends U {
241
249
  async _loadBlockState(e) {
242
250
  if (!("getAttribute" in e))
243
251
  return;
244
- const t = e.getAttribute(n.PAGE_TYPE), s = e.getAttribute(n.PAGE_LIST);
245
- if (!t || !s)
252
+ const t = e.getAttribute(o.PAGE_TYPE), i = e.getAttribute(o.PAGE_LIST);
253
+ if (!t || !i)
246
254
  return;
247
- const r = a(), i = Number(t), l = S(s);
248
- await r.fetchTemplates(), r.setCollectionWithoutAutoSelection(i), r.loadSelectedTemplates(l);
255
+ const r = u(), s = Number(t), n = L(i);
256
+ await r.fetchTemplates(), r.setCollectionWithoutAutoSelection(s), r.loadSelectedTemplates(n);
249
257
  }
250
258
  _resetStoreState() {
251
- a().$reset();
259
+ u().$reset();
252
260
  }
253
261
  _removeBlockTemplatesFromStore(e) {
254
262
  if (!("getAttribute" in e))
255
263
  return;
256
- const t = e.getAttribute(n.PAGE_LIST);
264
+ const t = e.getAttribute(o.PAGE_LIST);
257
265
  if (!t)
258
266
  return;
259
- const s = a(), r = S(t);
260
- s.removeUnsubscribePages(r);
267
+ const i = u(), r = L(t);
268
+ i.removeUnsubscribePages(r);
261
269
  }
262
270
  }
263
271
  export {
264
- w as UNSUBSCRIBE_BLOCK_ID,
265
- J as UnsubscribeBlock,
266
- q as disposeUnsubscribeListeners
272
+ F as UNSUBSCRIBE_BLOCK_ID,
273
+ se as UnsubscribeBlock,
274
+ W as disposeUnsubscribeListeners
267
275
  };
@@ -5,10 +5,11 @@ const s = {
5
5
  PAGE_TYPE: "data-unsubscribe-page-type",
6
6
  PAGE_LIST: "data-unsubscribe-page-list",
7
7
  BLOCK_ID: "data-unsubscribe-block-id"
8
- }, c = ".unsubscribe-block-v2", u = 'a[data-unsubscribe-link="true"], a.unsubscribe-link';
8
+ }, e = ".unsubscribe-block-v2", E = /{{ins-(?:global-)?(?:preferences-)?unsubscribe-link}}/, c = 'a[data-unsubscribe-link="true"], a.unsubscribe-link';
9
9
  export {
10
10
  b as DATA_ATTRIBUTES,
11
- c as UNSUBSCRIBE_BLOCK_SELECTOR,
11
+ e as UNSUBSCRIBE_BLOCK_SELECTOR,
12
12
  s as UNSUBSCRIBE_EVENTS,
13
- u as UNSUBSCRIBE_LINK_SELECTOR
13
+ c as UNSUBSCRIBE_LINK_SELECTOR,
14
+ E as UNSUBSCRIBE_MERGE_TAG_REGEX
14
15
  };
@@ -0,0 +1,5 @@
1
+ import { UNSUBSCRIBE_MERGE_TAG_REGEX as E } from "./constants.js";
2
+ const o = (r, p) => r.replace(E, () => p).replace(`${p}?`, () => `${p}&`);
3
+ export {
4
+ o as swapMergeTagInHref
5
+ };
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-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.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}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{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-0c5f11a1]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-0c5f11a1]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-0c5f11a1]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{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}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .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}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
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-9d988e4b] .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}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.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}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{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-8fc59697]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-8fc59697]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-8fc59697]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{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}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .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}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}
@@ -1,9 +1,9 @@
1
- const o = "3.27.0-beta.ee85b86", e = { stripo: { version: "2.83.1" } }, s = {
1
+ const o = "3.27.1-beta.4ca8aae", a = { stripo: { version: "2.86.1" } }, s = {
2
2
  version: o,
3
- guido: e
3
+ guido: a
4
4
  };
5
5
  export {
6
6
  s as default,
7
- e as guido,
7
+ a as guido,
8
8
  o as version
9
9
  };
@@ -31,13 +31,6 @@ export type DynamicContentNode = {
31
31
  * flattens the active (first) partner's leaf attributes into a `DynamicContent[]`.
32
32
  */
33
33
  export type DynamicContentList = Record<string, DynamicContentNode[]>;
34
- /** A leaf attribute with both backend labels and its category path (root → parent). */
35
- export type DynamicContentCandidate = {
36
- value: string;
37
- text: string;
38
- tagText: string;
39
- path: string[];
40
- };
41
34
  export type MergeTag = BaseDynamicContent & {
42
35
  label: string;
43
36
  selStart?: number;
@@ -1,15 +1,9 @@
1
- import type { DynamicContentCandidate } from '@@/Types/generic';
2
1
  import type { ModuleAddData, ModuleModifier } from '@@/Types/stripo';
3
- import { type DynamicContentConversionResult } from '@@/Utils/dynamicContentConverter';
4
2
  export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
5
- export declare const registerUsedAttributes: (html: string, candidates: DynamicContentCandidate[]) => void;
6
3
  /**
7
4
  * Repairs dropped/copied saved modules (items currency, linkless legacy unsubscribe → text block,
8
5
  * dynamic-content labels → tokens) in one write-back; wired via Stripo's `onModuleAdd` (see `useStripo`).
9
6
  */
10
7
  export declare const useModuleRepair: () => {
11
8
  handleModuleAdd: (data: ModuleAddData, modifier: ModuleModifier) => void;
12
- convertDynamicContent: (html: string) => DynamicContentConversionResult & {
13
- candidates: DynamicContentCandidate[];
14
- };
15
9
  };
@@ -25,7 +25,9 @@ declare const SizeControl_base: {
25
25
  };
26
26
  };
27
27
  declare class SizeControl extends SizeControl_base {
28
+ getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
28
29
  getAdditionalModifications(root: ImmutableHtmlNode): TemplateModifier<HtmlNodeModifier, CssNodeModifier> | undefined;
30
+ private isMobilePreview;
29
31
  private getFitStyles;
30
32
  }
31
33
  /**
@@ -9,4 +9,5 @@ export declare const DATA_ATTRIBUTES: {
9
9
  readonly BLOCK_ID: "data-unsubscribe-block-id";
10
10
  };
11
11
  export declare const UNSUBSCRIBE_BLOCK_SELECTOR = ".unsubscribe-block-v2";
12
+ export declare const UNSUBSCRIBE_MERGE_TAG_REGEX: RegExp;
12
13
  export declare const UNSUBSCRIBE_LINK_SELECTOR = "a[data-unsubscribe-link=\"true\"], a.unsubscribe-link";
@@ -0,0 +1 @@
1
+ export declare const swapMergeTagInHref: (href: string, mergeTag: string) => string;
@@ -1,29 +1,27 @@
1
- import type { DynamicContentCandidate } from '@@/Types/generic';
2
- type DynamicContentLookup = Map<string, DynamicContentCandidate[]>;
3
- export interface AmbiguousDynamicContent {
4
- /** The label as the author wrote it (first occurrence). */
5
- label: string;
6
- /** Every exact token name that resolved to this label, so a choice never touches a valid token. */
7
- spellings: string[];
8
- candidates: DynamicContentCandidate[];
9
- }
1
+ import type { DynamicContent } from '@@/Types/generic';
10
2
  export interface DynamicContentConversionResult {
11
3
  html: string;
12
4
  /** Distinct tokens that matched neither a known value nor a known label (reported to the user). */
13
5
  unresolved: string[];
14
- /** Labels shared by several attributes; left untouched for the user to choose. */
15
- ambiguous: AmbiguousDynamicContent[];
16
6
  }
17
7
  /**
18
- * Builds a label → candidates lookup keyed by both backend labels (`text`, `tag_text`),
19
- * normalized (trimmed, lowercased). A label shared by several attributes keeps all of them.
8
+ * Builds a label→item lookup from one or more dynamic-content lists, keyed by
9
+ * normalized label (trimmed, lowercased). When lists overlap, a later list wins
10
+ * for a shared key.
20
11
  */
21
- export declare const buildDynamicContentLookup: (candidates: DynamicContentCandidate[]) => DynamicContentLookup;
12
+ export declare const buildDynamicContentLookup: (...lists: DynamicContent[][]) => Map<string, DynamicContent>;
22
13
  /**
23
- * Rewrites label tokens with one candidate; exact values/`validTokens` stay. Several candidates
24
- * → `ambiguous`, none → `unresolved`; reported text is never changed.
14
+ * Repairs dynamic-content tokens in a dropped module's HTML, using `lookup`
15
+ * (label→item) built from the account's full dynamic-content list. Returns the
16
+ * rewritten HTML plus the tokens it could not resolve.
17
+ *
18
+ * A token is rewritten to its canonical `{{value}}` form when its name matches a
19
+ * display label (`{{ Phone Number }}` → `{{phone_number}}`). Left untouched: an
20
+ * exact canonical value (already correct — this also stops a valid token being
21
+ * rewritten just because it coincides with an unrelated label), Liquid nested
22
+ * tokens (dotted, e.g. `coupon.code`), recommendation-block variables
23
+ * (`123_0_attr`), allowed system tokens, and `data-*` product tags. The account
24
+ * list is exhaustive, so any remaining token matching neither a value nor a label
25
+ * is reported in `unresolved`; the text itself is always left in place.
25
26
  */
26
- export declare const convertModuleDynamicContent: (html: string, lookup: DynamicContentLookup, validTokens?: string[]) => DynamicContentConversionResult;
27
- /** Rewrites every token whose exact name the user resolved (`spelling → value`), keeping tails. */
28
- export declare const applyDynamicContentChoices: (html: string, choices: Map<string, string>) => string;
29
- export {};
27
+ export declare const convertModuleDynamicContent: (html: string, lookup: Map<string, DynamicContent>, liquidSyntax: boolean) => DynamicContentConversionResult;
@@ -1,11 +1,15 @@
1
- import type { DynamicContent, DynamicContentCandidate, DynamicContentList, MergeTag } from '@@/Types/generic';
1
+ import type { DynamicContent, DynamicContentList, MergeTag } from '@@/Types/generic';
2
2
  export declare const mergeTagToDynamicContent: (mergeTag: MergeTag) => DynamicContent;
3
3
  export declare const dynamicContentToMergeTags: (dynamicContentList: DynamicContent[], liquidSyntax?: boolean) => MergeTag[];
4
4
  /**
5
- * Flattens the ACTIVE (first) partner's tree into deduped leaf attributes with both labels and
6
- * their category path; category nodes (`children`/`select_items`) are walked, never collected.
5
+ * Flattens the partner-keyed dynamic-content tree into a deduped flat list of the
6
+ * ACTIVE partner's leaf attributes. A single editor session targets one partner,
7
+ * so only the FIRST partner entry is used (the sole entry for a single-partner
8
+ * host like email-fe; merging all partners would risk cross-partner label
9
+ * collisions). A node carrying `children`/`select_items` is a category grouping:
10
+ * recursed into but never collected itself — only real leaf attributes
11
+ * (`text`/`tag_text` + `value`) become `{ text, value }` pairs.
7
12
  */
8
- export declare const flattenDynamicContentCandidates: (list: DynamicContentList | undefined | null) => DynamicContentCandidate[];
9
13
  export declare const flattenDynamicContentList: (list: DynamicContentList | undefined | null) => DynamicContent[];
10
14
  /**
11
15
  * Builds the editor merge-tag entries from the template's preselected list plus
@@ -1,9 +1,9 @@
1
- const s = "2.83.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-OTN2PYRT.js", "chunk-62K3AMOD.js", "chunk-6RGJBGUG.js", "chunk-6W43DTQG.js", "chunk-EC4WGEOZ.js", "chunk-GLBBUJ54.js", "chunk-GPJLJCMF.js", "chunk-MDCDEJUH.js", "chunk-P7HQTFJV.js", "chunk-PA4WGBC4.js", "chunk-QMDAV6OU.js", "chunk-R2F3ADM2.js", "chunk-YSKQ2TWF.js", "chunk-ZU5ASRKR.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], i = {
1
+ const s = "2.86.1", n = ["UIEditor.js", "zone.js", "styles-BWH3PMR4.css", "polyfills-FF3RLU5F.js", "main-QEKXZ3YR.js", "chunk-5T7CEBI5.js", "chunk-62K3AMOD.js", "chunk-66LFOY5U.js", "chunk-AMCKJHBC.js", "chunk-BOERNIOQ.js", "chunk-BVZUBVXH.js", "chunk-I2DLD5I4.js", "chunk-IEC5XOV2.js", "chunk-ILRQX7FO.js", "chunk-LBYVYY25.js", "chunk-LC3XAPU2.js", "chunk-OZSNTS6D.js", "chunk-PBUSX63H.js", "chunk-PYISBD2D.js", "assets/css/uiEditor.css", "assets/i18n/en.json", "assets/icons/ui-editor-icons.sprite.svg", "assets/icons/ui-editor-icons.map.json", "assets/imageeditor/scripts.min.js", "assets/imageeditor/assets/icons/merged.svg"], c = {
2
2
  version: s,
3
3
  files: n
4
4
  };
5
5
  export {
6
- i as default,
6
+ c as default,
7
7
  n as files,
8
8
  s as version
9
9
  };