@useinsider/guido 3.30.0-beta.4a936b5 → 3.30.0-beta.4c3dba9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -173,6 +173,7 @@ const config: GuidoConfigInput = {
173
173
  allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Guido self-serves the block toaster (role lookup, deep-link, copy from window.trans).
174
174
  allowSaveWithErrors?: boolean, // Default: true - Allow the validation drawer's "Save and Continue" soft-save. Set false to hard-block invalid saves (transactional + unsubscribe pages).
175
175
  reusableRecommendationStrategy?: boolean, // Default: false - Assign an RRS strategy to recommendation blocks instead of per-block algorithm/filters/shuffle/product-count settings.
176
+ dynamicContentSpecialLinks?: boolean, // Default: false - List the catalogue's URL attributes (token ends in `url` or `url_<n>`) and every Call an API variable as Stripo special links (Personalization tab of the link type selector)
176
177
  legacyUnsubscribeConversion?: boolean, // Default: false - Convert legacy unsubscribe blocks that have no unsubscribe link into text blocks (on load and on module drop/copy) and show a warning modal.
177
178
  accessibilityTesting?: boolean, // Default: false - Show the Accessibility Test entry in the header kebab menu (Stripo's checker: contrast, image alternatives, colour-vision simulation) and the tab-bar onboarding tour that points at it.
178
179
  itemsPriceFormatting?: boolean, // Default: false - Items block price formatting: thousand/decimal separator + decimal count on the block root, raw price tags in the export (formatted at send time).
@@ -690,6 +691,22 @@ const closeModal = () => {
690
691
  </script>
691
692
  ```
692
693
 
694
+ ### Special links in the link type selector
695
+
696
+ Behind `features.dynamicContentSpecialLinks` (default `false`). Guido passes the `template.dynamicContentList`
697
+ catalogue to Stripo as `specialLinks`, one group per top-level category, keeping only the attributes whose
698
+ token ends in `url` or `url_<n>` (`last_visited_product_url`, `ins_apr_url_1`), each entry valued `{{token}}`.
699
+ Call an API variables are the exception: their tokens are id-based (`call_an_api_response_<id>`) and carry no
700
+ usable type, so the whole category is listed as its own group regardless of suffix. The link type dropdown of
701
+ link fields gains a **Personalization** tab with those groups and a search box; picking an entry writes the
702
+ token into the URL field and the dropdown label shows the entry's label.
703
+
704
+ - When no attribute matches (or the host passes no catalogue), `specialLinks` is not passed and the tab is not shown.
705
+ - Link fields only: the image path, alt text and button text are not covered; they keep Stripo's native
706
+ merge-tag dropdown fed by `mergeTags`.
707
+ - The list is fixed at editor init and the host picker is not involved, so nothing is added to the selected
708
+ list; `template.customFieldAttributes` must list every token for save validation.
709
+
693
710
  ### Saved-module token repair
694
711
 
695
712
  Legacy or hand-written **saved modules** may carry tokens by display label
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
2
- import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as k, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as h } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as o, number as c, optional as e, string as t, picklist as m, pipe as r, minLength as p, custom as h, boolean as a, array as n, transform as S, unknown as i, record as g, fallback as R, literal as u, lazy as T, looseObject as C, variant as I, union as k } from "../../node_modules/valibot/dist/index.js";
3
3
  const b = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -91,7 +91,7 @@ const b = {
91
91
  /** Block ID (matches the dictionary key and the legacy HTML element id) */
92
92
  id: e(c()),
93
93
  /** Decimal places for price display (legacy data may use string or number) */
94
- decimalCount: e(h([t(), c()])),
94
+ decimalCount: e(k([t(), c()])),
95
95
  /** Pinned product IDs (empty array when filter-driven) */
96
96
  productIds: e(n(i())),
97
97
  /** Whether the block requested live products at send time */
@@ -125,7 +125,7 @@ const b = {
125
125
  /** Block type marker used by some legacy variants */
126
126
  blockType: e(t()),
127
127
  /** Size variant marker (legacy data may use string or number) */
128
- size: e(h([t(), c()])),
128
+ size: e(k([t(), c()])),
129
129
  /** Vertical responsiveness flag (legacy size=1 variants) */
130
130
  verticalResponsiveness: e(a()),
131
131
  /** Legacy "Move to next line" price placement toggle (cardPricePlacement.js) */
@@ -247,6 +247,8 @@ const b = {
247
247
  /** Allow persisting a template that still has validation errors (drawer "Save and Continue" soft-save). Host sets false for transactional + unsubscribe. */
248
248
  allowSaveWithErrors: e(a(), !0),
249
249
  reusableRecommendationStrategy: e(a(), !1),
250
+ /** List the dynamic-content catalogue as Stripo special links in the link type selector */
251
+ dynamicContentSpecialLinks: e(a(), !1),
250
252
  /** Convert linkless legacy unsubscribe blocks into text blocks and warn with a modal (opt-in) */
251
253
  legacyUnsubscribeConversion: e(a(), !1),
252
254
  /** Items block: Recommendation-style price formatting (root currency-* attrs, raw price tags). Released dark. */
@@ -320,7 +322,7 @@ const b = {
320
322
  ...d.entries,
321
323
  type: u("custom"),
322
324
  /** Custom processor function */
323
- processor: k(
325
+ processor: h(
324
326
  (s) => typeof s == "function",
325
327
  "processor must be a function"
326
328
  )
@@ -340,7 +342,7 @@ const b = {
340
342
  * Return false to cancel the save operation.
341
343
  */
342
344
  externalValidation: e(
343
- k(
345
+ h(
344
346
  (s) => typeof s == "function",
345
347
  "externalValidation must be a function"
346
348
  )
@@ -12,7 +12,7 @@ var n = function() {
12
12
  t,
13
13
  !1,
14
14
  null,
15
- "0c5f11a1"
15
+ "da8cab7f"
16
16
  );
17
17
  const u = s.exports;
18
18
  export {
@@ -1,21 +1,21 @@
1
1
  import { defineComponent as Se, defineAsyncComponent as a, ref as W, computed as l, watch as $, onMounted as he, onUnmounted as Ee } from "vue";
2
2
  import { useCortexBlueprintBridge as Ce } from "../composables/useCortexBlueprintBridge.js";
3
3
  import { useEditorLock as De } from "../composables/useEditorLock.js";
4
- import { startEditorOpenMetrics as we } from "../composables/useEditorOpenMetrics.js";
4
+ import { startEditorOpenMetrics as ke } from "../composables/useEditorOpenMetrics.js";
5
5
  import { provideGuidoActions as Te } from "../composables/useGuidoActions.js";
6
- import { useGuidoStateBridge as ke } from "../composables/useGuidoStateBridge.js";
6
+ import { useGuidoStateBridge as we } from "../composables/useGuidoStateBridge.js";
7
7
  import { usePartner as Fe } from "../composables/usePartner.js";
8
8
  import { useSaveValidationRollout as Me } from "../composables/useSaveValidationRollout.js";
9
- import { useStripo as Ie } from "../composables/useStripo.js";
10
- import { useTimerClone as Le } from "../composables/useTimerClone.js";
9
+ import { useStripo as Le } from "../composables/useStripo.js";
10
+ import { useTimerClone as Ie } from "../composables/useTimerClone.js";
11
11
  import { useToaster as Re } from "../composables/useToaster.js";
12
12
  import { useTranslations as Oe } from "../composables/useTranslations.js";
13
13
  import { migrate as Ue } from "../config/migrator/index.js";
14
14
  import { ModuleFolderDefaults as G } from "../enums/defaults.js";
15
15
  import { RIBBON_SELECTOR as Ae } from "../enums/onboarding.js";
16
16
  import { ToasterTypeOptions as Ne } from "../enums/toaster.js";
17
- import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as _e } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
- import { disposeUnsubscribeListeners as Pe } from "../extensions/Blocks/Unsubscribe/block.js";
17
+ import { useRecommendationExtensionStore as z, disposeStrategyPageReturnListeners as Pe } from "../extensions/Blocks/Recommendation/store/recommendation.js";
18
+ import { disposeUnsubscribeListeners as _e } from "../extensions/Blocks/Unsubscribe/block.js";
19
19
  import { disposeDisplayConditionRequest as xe } from "../extensions/DisplayConditions/bridge.js";
20
20
  import Be from "./organisms/AutoSaveController.vue.js";
21
21
  import He from "./organisms/base/AuthErrorModal.vue.js";
@@ -36,8 +36,9 @@ import { usePreviewStore as Ye } from "../stores/preview.js";
36
36
  import { useSaveValidationStore as Ze } from "../stores/save-validation.js";
37
37
  import { useTemplateStore as et } from "../stores/template.js";
38
38
  import { useUnsubscribeStore as tt } from "../stores/unsubscribe.js";
39
+ import { disposeLinkTokenPaste as ot } from "../utils/linkTokenPaste.js";
39
40
  import { readTrackFloor as K } from "../utils/linkTrackingIds.js";
40
- const Vt = /* @__PURE__ */ Se({
41
+ const $t = /* @__PURE__ */ Se({
41
42
  __name: "Guido",
42
43
  props: {
43
44
  config: null,
@@ -45,7 +46,7 @@ const Vt = /* @__PURE__ */ Se({
45
46
  },
46
47
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
47
48
  setup(j, { expose: J, emit: i }) {
48
- const c = j, r = we(), Q = a(
49
+ const c = j, r = ke(), Q = a(
49
50
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
50
51
  ), X = a(
51
52
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
@@ -61,22 +62,22 @@ const Vt = /* @__PURE__ */ Se({
61
62
  () => import("./organisms/unsubscribe/LegacyUnsubscribeConvertedModal.vue.js")
62
63
  ), ne = a(
63
64
  () => import("./organisms/dynamic-content/AmbiguousDynamicContentModal.vue.js")
64
- ), y = W(), g = Qe(), w = tt(), re = q(), o = Je();
65
+ ), y = W(), g = Qe(), k = tt(), re = q(), o = Je();
65
66
  c.ready && o.init(c.config);
66
- const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: k } = Re(), F = Oe(), M = () => {
67
+ const d = C(), ie = Ye(), p = l(() => d.hasChanges), { isTestPartner: se } = Fe(), { isEnabled: ae, loadRollout: T } = Me(), { showToaster: w } = Re(), F = Oe(), M = () => {
67
68
  var t;
68
69
  if (d.isVersionHistoryOpen) {
69
- console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), k({
70
+ console.debug("guido:save:silent:blocked", { isVersionHistoryOpen: !0 }), w({
70
71
  type: Ne.Warning,
71
72
  message: F("email-editor.save-blocked-outside-editor")
72
73
  });
73
74
  return;
74
75
  }
75
76
  return (t = D.value) == null ? void 0 : t.saveSilent();
76
- }, I = (t) => {
77
+ }, L = (t) => {
77
78
  d.loadingStatus = t;
78
79
  };
79
- Ce(), ke();
80
+ Ce(), we();
80
81
  const b = () => {
81
82
  var t, e;
82
83
  return {
@@ -87,9 +88,9 @@ const Vt = /* @__PURE__ */ Se({
87
88
  savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || G.SAVED_MODULES,
88
89
  defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || G.DEFAULT_MODULES
89
90
  };
90
- }, { initPlugin: L, preloadRuntime: R } = Ie(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
91
+ }, { initPlugin: I, preloadRuntime: R } = Le(r), { runExclusive: O, beginMount: U, isCurrentMount: v } = De();
91
92
  let f = 0;
92
- const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: _ } = Le(), ce = l(() => {
93
+ const { getDefaultTemplate: A } = je(), { cloneTimersOnSave: N, hasTimerBlocks: P } = Ie(), ce = l(() => {
93
94
  var t;
94
95
  return !((t = o.ui) != null && t.showHeader);
95
96
  }), de = l(() => o.isFeatureEnabled("reusableRecommendationStrategy")), me = l(() => o.externalDisplayConditions), le = l(
@@ -112,7 +113,7 @@ const Vt = /* @__PURE__ */ Se({
112
113
  console.debug("guido:test-email:click"), i("test-email:click");
113
114
  }
114
115
  });
115
- const P = (t) => {
116
+ const _ = (t) => {
116
117
  console.debug("dynamic-content:close", t), g.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
117
118
  }, x = () => {
118
119
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
@@ -140,7 +141,7 @@ const Vt = /* @__PURE__ */ Se({
140
141
  variationId: o.variationId
141
142
  });
142
143
  const e = o.template, s = (e == null ? void 0 : e.html) || "", u = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
143
- w.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
144
+ k.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
144
145
  const pe = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, H = o.isFeatureEnabled("linkTrackingIds"), fe = {
145
146
  partnerName: o.partnerName,
146
147
  campaignUrls: e == null ? void 0 : e.recommendationCampaignUrls,
@@ -157,14 +158,14 @@ const Vt = /* @__PURE__ */ Se({
157
158
  };
158
159
  n.html || (n = await r.timed("default_template", () => A()), n.html = await V(n.html));
159
160
  const ge = H ? K(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
160
- _(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
161
+ P(n.html) && (n.html = await r.timed("timer_clone", () => N(n.html))), H && (d.trackIdSessionFloor = Math.max(ge, K(n.html)));
161
162
  const be = {
162
163
  preselectedDynamicContentList: B,
163
164
  onReady: () => {
164
165
  console.debug("guido:ready"), i("ready");
165
166
  }
166
167
  };
167
- f = U(), await L(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
168
+ f = U(), await I(n, b(), be, n.html !== s), g.selectedDynamicContentList = B;
168
169
  } catch (e) {
169
170
  console.error("Failed to initialize Stripo editor:", e), r.markFailed();
170
171
  }
@@ -182,8 +183,8 @@ const Vt = /* @__PURE__ */ Se({
182
183
  }
183
184
  document.addEventListener("dynamic-content:open", S);
184
185
  }), Ee(() => {
185
- if (Pe(), _e(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
186
- xe();
186
+ if (_e(), Pe(), r.dispose(), m == null || m.disconnect(), document.removeEventListener("dynamic-content:open", S), v(f)) {
187
+ xe(), ot();
187
188
  try {
188
189
  const t = C();
189
190
  t.isStripoInitialized = !1, t.isAccessibilityTestingOpen = !1, t.imagesHidden = !1, t.colorVisionDeficiency = "";
@@ -201,15 +202,15 @@ const Vt = /* @__PURE__ */ Se({
201
202
  }), o.reset();
202
203
  }), J({
203
204
  dynamicContent: {
204
- insert: P,
205
+ insert: _,
205
206
  close: x
206
207
  },
207
208
  hasChanges: p,
208
209
  saveSilent: M,
209
- setLoading: I
210
- }), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: w, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: k, trans: F, saveSilent: M, setLoading: I, emit: i, buildMetadata: b, initPlugin: L, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: _, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: P, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Be, AuthErrorModal: He, Toaster: Ve, FilterSelectionDrawer: We, HeaderWrapper: $e, LoadingWrapper: Ge, SaveAsTemplateDrawer: ze, UnsubscribeWrapper: qe, ValidationErrorDrawer: Ke };
210
+ setLoading: L
211
+ }), { __sfc: !0, openMetrics: r, PreviewContainer: Q, OnboardingWrapper: X, AssignStrategyDrawer: Y, RemoveStrategyModal: Z, DisplayConditionsHost: ee, autoSaveControllerRef: D, LegacyStrategyUpdatedModal: te, LegacyUnsubscribeConvertedModal: oe, AmbiguousDynamicContentModal: ne, wrapperRef: y, dynamicContentStore: g, unsubscribeStore: k, moduleDynamicContentStore: re, props: c, configStore: o, editorStore: d, previewStore: ie, hasChanges: p, isTestPartner: se, isSaveValidationEnabled: ae, loadRollout: T, showToaster: w, trans: F, saveSilent: M, setLoading: L, emit: i, buildMetadata: b, initPlugin: I, preloadRuntime: R, runExclusive: O, beginMount: U, isCurrentMount: v, mountGeneration: f, getDefaultTemplate: A, cloneTimersOnSave: N, hasTimerBlocks: P, noHeader: ce, isRrsEnabled: de, isExternalDisplayConditionsEnabled: me, isLegacyUnsubscribeConversionEnabled: le, hasAssignedStrategy: ue, insertDynamicContent: _, closeDynamicContent: x, handleDynamicContentOpen: S, ribbonObserver: m, updateRibbonOffset: h, startEditor: E, AutoSaveController: Be, AuthErrorModal: He, Toaster: Ve, FilterSelectionDrawer: We, HeaderWrapper: $e, LoadingWrapper: Ge, SaveAsTemplateDrawer: ze, UnsubscribeWrapper: qe, ValidationErrorDrawer: Ke };
211
212
  }
212
213
  });
213
214
  export {
214
- Vt as default
215
+ $t as default
215
216
  };
@@ -2,17 +2,17 @@ import i from "./EditorActionsMenu.vue2.js";
2
2
  /* empty css */
3
3
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
- var o = this, e = o._self._c, t = o._self._setupProxy;
6
- return e("div", { staticClass: "editor-actions-menu p-r" }, [e(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isEditorUnavailable, "label-text-status": !1, "selected-status": t.isPanelOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(c) {
5
+ var e = this, o = e._self._c, t = e._self._setupProxy;
6
+ return o("div", { staticClass: "editor-actions-menu p-r" }, [o(t.InButtonV2, { attrs: { id: "guido__kebab-button", "data-testid": "Editor Actions Menu", "left-icon": "line-more-vertical", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.loadingStatus, "label-text-status": !1, "selected-status": t.isPanelOpen, "tooltip-options": t.getTooltipOptions("guido__kebab-button"), "tooltip-text": t.trans("email-editor.more-actions") }, on: { click: function(d) {
7
7
  t.isOpen = !t.isOpen;
8
- } } }), e(t.InDropdownMenu, { staticClass: "editor-actions-menu__dropdown", attrs: { id: "guido__kebab-menu", "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, "max-height": 400, options: t.options, "select-all-option-status": !1, status: t.isPanelOpen }, on: { clickOutside: t.close, optionClick: t.handleOptionClick } })], 1);
8
+ } } }), o(t.InDropdownMenu, { staticClass: "editor-actions-menu__dropdown", attrs: { id: "guido__kebab-menu", "box-width": "basedOnLongestItem", "static-position": "bottom right", "dynamic-position": !1, "max-height": 400, options: t.options, "select-all-option-status": !1, status: t.isPanelOpen }, on: { clickOutside: t.close, optionClick: t.handleOptionClick } })], 1);
9
9
  }, a = [], r = /* @__PURE__ */ s(
10
10
  i,
11
11
  n,
12
12
  a,
13
13
  !1,
14
14
  null,
15
- "0e63ebe1"
15
+ "bdb3b37a"
16
16
  );
17
17
  const _ = r.exports;
18
18
  export {
@@ -1,9 +1,9 @@
1
- import { defineComponent as D, ref as C, computed as s, watch as L } from "vue";
2
- import { useAccessibilityApi as U } from "../../../composables/useAccessibilityApi.js";
3
- import { useConfig as R } from "../../../composables/useConfig.js";
4
- import { useExport as Y } from "../../../composables/useExport.js";
5
- import { useTranslations as F } from "../../../composables/useTranslations.js";
6
- import { useVersionHistoryApi as N } from "../../../composables/useVersionHistoryApi.js";
1
+ import { defineComponent as D, ref as C, computed as i, watch as L } from "vue";
2
+ import { useAccessibilityApi as R } from "../../../composables/useAccessibilityApi.js";
3
+ import { useConfig as Y } from "../../../composables/useConfig.js";
4
+ import { useExport as F } from "../../../composables/useExport.js";
5
+ import { useTranslations as N } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as U } from "../../../composables/useVersionHistoryApi.js";
7
7
  import { useAutosaveStore as X } from "../../../stores/autosave.js";
8
8
  import { useEditorStore as j } from "../../../stores/editor.js";
9
9
  import { useOnboardingStore as q } from "../../../stores/onboarding.js";
@@ -12,22 +12,22 @@ import { InToggle as G, InDropdownMenu as J, InButtonV2 as K } from "@useinsider
12
12
  const ce = /* @__PURE__ */ D({
13
13
  __name: "EditorActionsMenu",
14
14
  setup(Q) {
15
- const c = "guido__kebab-autosave", u = "guido__kebab-version-history", p = "guido__kebab-accessibility", d = "guido__kebab-save-as", v = "guido__kebab-export", { config: b, isFeatureEnabled: m } = R(), { exportHtml: y } = Y(), { openVersionHistory: A, closeVersionHistory: _ } = N(), { toggleAccessibilityTestingMode: O } = U(), e = j(), a = X(), f = q(), o = F(), g = C(!1), M = s(() => g.value || f.isEditorActionsMenuPinned), r = C(!1), S = s(() => m("autosave")), E = s(
15
+ const c = "guido__kebab-autosave", u = "guido__kebab-version-history", p = "guido__kebab-accessibility", d = "guido__kebab-save-as", v = "guido__kebab-export", { config: m, isFeatureEnabled: b } = Y(), { exportHtml: y } = F(), { openVersionHistory: A, closeVersionHistory: S } = U(), { toggleAccessibilityTestingMode: _ } = R(), e = j(), a = X(), f = q(), o = N(), g = C(!1), M = i(() => g.value || f.isEditorActionsMenuPinned), r = C(!1), O = i(() => b("autosave")), x = i(
16
16
  () => {
17
- var t, i;
18
- return !!((i = (t = b.value) == null ? void 0 : t.features) != null && i.versionHistory) && !e.isPreviewModeOpen;
17
+ var t, s;
18
+ return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.versionHistory) && !e.isPreviewModeOpen;
19
19
  }
20
- ), x = s(
21
- () => m("accessibilityTesting") && !e.isPreviewModeOpen
22
- ), h = s(() => {
23
- var t, i;
24
- return !!((i = (t = b.value) == null ? void 0 : t.features) != null && i.saveAsTemplate);
25
- }), V = s(() => S.value ? [
20
+ ), h = i(
21
+ () => b("accessibilityTesting") && !e.isPreviewModeOpen
22
+ ), V = i(() => {
23
+ var t, s;
24
+ return !!((s = (t = m.value) == null ? void 0 : t.features) != null && s.saveAsTemplate);
25
+ }), E = i(() => O.value ? [
26
26
  { categoryText: o("email-editor.preferences") },
27
27
  {
28
28
  text: o("email-editor.auto-save"),
29
29
  value: c,
30
- disable: e.isEditorUnavailable,
30
+ disable: e.loadingStatus,
31
31
  rightSlotComponent: G,
32
32
  rightSlotProps: {
33
33
  // InDropdownMenu fills attrs.id with its own positional test id, and v-bind
@@ -35,25 +35,25 @@ const ce = /* @__PURE__ */ D({
35
35
  name: "guido-kebab-autosave-toggle",
36
36
  class: "p-e-n",
37
37
  checked: a.isOn,
38
- disable: e.isEditorUnavailable
38
+ disable: e.loadingStatus
39
39
  }
40
40
  },
41
41
  { divider: "solid" }
42
- ] : []), T = s(() => [
42
+ ] : []), T = i(() => [
43
43
  { categoryText: o("email-editor.actions") },
44
- ...E.value ? [{
44
+ ...x.value ? [{
45
45
  text: o("newsletter.version-history"),
46
46
  value: u,
47
47
  iconLeft: "line-architect-version-history",
48
48
  disable: e.isVersionHistoryButtonDisabled
49
49
  }] : [],
50
- ...x.value ? [{
50
+ ...h.value ? [{
51
51
  text: o("email-editor.accessibility-test"),
52
52
  value: p,
53
53
  iconLeft: "line-accessibility",
54
- disable: e.isEditorUnavailable
54
+ disable: e.loadingStatus
55
55
  }] : [],
56
- ...h.value ? [{
56
+ ...V.value ? [{
57
57
  text: o("newsletter.save-templates"),
58
58
  value: d,
59
59
  iconLeft: "line-newsletter-save-as-template",
@@ -65,7 +65,7 @@ const ce = /* @__PURE__ */ D({
65
65
  iconLeft: "line-export",
66
66
  disable: r.value || e.isExportButtonDisabled
67
67
  }
68
- ]), P = s(() => [...V.value, ...T.value]), n = () => {
68
+ ]), P = i(() => [...E.value, ...T.value]), n = () => {
69
69
  g.value = !1;
70
70
  };
71
71
  L(() => f.isEditorActionsMenuPinned, (t) => {
@@ -74,9 +74,9 @@ const ce = /* @__PURE__ */ D({
74
74
  const k = () => {
75
75
  a.isOn = !a.isOn;
76
76
  }, w = () => {
77
- e.isVersionHistoryOpen ? _() : A(), n();
77
+ e.isVersionHistoryOpen ? S() : A(), n();
78
78
  }, H = () => {
79
- O(), n();
79
+ _(), n();
80
80
  }, I = () => {
81
81
  e.isSaveAsTemplateDrawerOpen = !0, n();
82
82
  }, B = async () => {
@@ -88,9 +88,9 @@ const ce = /* @__PURE__ */ D({
88
88
  [d]: I,
89
89
  [v]: B
90
90
  };
91
- return { __sfc: !0, AUTOSAVE: c, VERSION_HISTORY: u, ACCESSIBILITY: p, SAVE_AS: d, EXPORT: v, config: b, isFeatureEnabled: m, exportHtml: y, openVersionHistory: A, closeVersionHistory: _, toggleAccessibilityTestingMode: O, editorStore: e, autosaveStore: a, onboardingStore: f, trans: o, isOpen: g, isPanelOpen: M, isExporting: r, isAutosaveVisible: S, isVersionHistoryVisible: E, isAccessibilityVisible: x, isSaveAsVisible: h, preferenceOptions: V, actionOptions: T, options: P, close: n, toggleAutosave: k, handleVersionHistory: w, handleAccessibility: H, handleSaveAs: I, handleExport: B, optionHandlers: l, handleOptionClick: ({ value: t }) => {
92
- var i;
93
- return (i = l[t]) == null ? void 0 : i.call(l);
91
+ return { __sfc: !0, AUTOSAVE: c, VERSION_HISTORY: u, ACCESSIBILITY: p, SAVE_AS: d, EXPORT: v, config: m, isFeatureEnabled: b, exportHtml: y, openVersionHistory: A, closeVersionHistory: S, toggleAccessibilityTestingMode: _, editorStore: e, autosaveStore: a, onboardingStore: f, trans: o, isOpen: g, isPanelOpen: M, isExporting: r, isAutosaveVisible: O, isVersionHistoryVisible: x, isAccessibilityVisible: h, isSaveAsVisible: V, preferenceOptions: E, actionOptions: T, options: P, close: n, toggleAutosave: k, handleVersionHistory: w, handleAccessibility: H, handleSaveAs: I, handleExport: B, optionHandlers: l, handleOptionClick: ({ value: t }) => {
92
+ var s;
93
+ return (s = l[t]) == null ? void 0 : s.call(l);
94
94
  }, getTooltipOptions: z, InButtonV2: K, InDropdownMenu: J };
95
95
  }
96
96
  });
@@ -3,9 +3,9 @@ import { useEditorLock as y } from "./useEditorLock.js";
3
3
  import { useAutosaveStore as I, AUTOSAVE_STATUS as a } from "../stores/autosave.js";
4
4
  import { useEditorStore as L } from "../stores/editor.js";
5
5
  import { computed as w, watch as V, onUnmounted as k } from "vue";
6
- const D = 18e4, b = 6e4, U = (g, { clearsChanges: h = () => !0 } = {}) => {
6
+ const D = 18e4, b = 6e4, _ = (g, { clearsChanges: h = () => !0 } = {}) => {
7
7
  const { isFeatureEnabled: m } = p(), s = L(), t = I(), { isEditorBusy: f } = y();
8
- let i = null, l = 0, u = -1;
8
+ let o = null, l = 0, u = -1;
9
9
  const d = w(
10
10
  () => m("autosave") && t.isOn
11
11
  ), A = () => s.hasChanges && s.isInSaveableState && s.changeSeq !== u, E = () => ({
@@ -30,43 +30,43 @@ const D = 18e4, b = 6e4, U = (g, { clearsChanges: h = () => !0 } = {}) => {
30
30
  return;
31
31
  }
32
32
  e === "visibility" && (l = Date.now()), console.debug("guido:autosave:save-start", { trigger: e }), t.status = a.SAVING;
33
- const o = s.changeSeq;
33
+ const n = s.changeSeq;
34
34
  try {
35
35
  if (await g() === void 0) {
36
36
  console.debug("guido:autosave:blocked", { trigger: e, reason: "save-returned-undefined" }), t.status = a.ERROR;
37
37
  return;
38
38
  }
39
- u = o, h() && s.changeSeq === o && (s.hasChanges = !1), t.status = a.SAVED, t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
39
+ u = n, h() && (s.hasChanges = !1), t.status = a.SAVED, t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
40
40
  } catch (S) {
41
41
  console.debug("guido:autosave:error", { trigger: e, error: S }), t.status = a.ERROR;
42
42
  }
43
- }, n = () => {
43
+ }, i = () => {
44
44
  const { visibilityState: e } = document;
45
45
  if (console.debug("guido:autosave:visibility-change", {
46
46
  visibilityState: e,
47
47
  isActive: d.value
48
48
  }), e !== "hidden")
49
49
  return;
50
- const o = Date.now() - l;
51
- if (o < b) {
50
+ const n = Date.now() - l;
51
+ if (n < b) {
52
52
  console.debug("guido:autosave:visibility-debounced", {
53
- sinceLastMs: o,
53
+ sinceLastMs: n,
54
54
  debounceMs: b
55
55
  });
56
56
  return;
57
57
  }
58
58
  r("visibility");
59
59
  }, c = () => {
60
- i && (clearInterval(i), i = null);
60
+ o && (clearInterval(o), o = null);
61
61
  }, v = () => {
62
- document.removeEventListener("visibilitychange", n), window.removeEventListener("pagehide", n);
62
+ document.removeEventListener("visibilitychange", i), window.removeEventListener("pagehide", i);
63
63
  };
64
64
  V(
65
65
  d,
66
66
  (e) => {
67
- console.debug("guido:autosave:active-changed", { active: e }), e ? (c(), i = setInterval(() => {
67
+ console.debug("guido:autosave:active-changed", { active: e }), e ? (c(), o = setInterval(() => {
68
68
  console.debug("guido:autosave:interval-tick"), r("interval");
69
- }, D), document.addEventListener("visibilitychange", n), window.addEventListener("pagehide", n)) : (c(), v(), t.status = a.IDLE);
69
+ }, D), document.addEventListener("visibilitychange", i), window.addEventListener("pagehide", i)) : (c(), v(), t.status = a.IDLE);
70
70
  },
71
71
  { immediate: !0 }
72
72
  ), k(() => {
@@ -74,5 +74,5 @@ const D = 18e4, b = 6e4, U = (g, { clearsChanges: h = () => !0 } = {}) => {
74
74
  });
75
75
  };
76
76
  export {
77
- U as useAutoSave
77
+ _ as useAutoSave
78
78
  };
@@ -8,8 +8,8 @@ import { socialCompilerRules as H } from "../config/compiler/socialCompilerRules
8
8
  import { unsubscribeCompilerRules as b } from "../config/compiler/unsubscribeCompilerRules.js";
9
9
  import { createHtmlCompiler as n } from "../utils/htmlCompiler.js";
10
10
  import { computed as p } from "vue";
11
- import { useConfig as x } from "./useConfig.js";
12
- const A = /* @__PURE__ */ new Set([
11
+ import { useConfig as k } from "./useConfig.js";
12
+ const x = /* @__PURE__ */ new Set([
13
13
  // URL/tag encoding fixes — keep merge-tag and placeholder integrity intact.
14
14
  "fix-url-encoding-start",
15
15
  "fix-url-encoding-end",
@@ -31,6 +31,8 @@ const A = /* @__PURE__ */ new Set([
31
31
  "add-universal-link-flags",
32
32
  // Coupon placeholder replacement (only present when liquidSyntax is enabled).
33
33
  "liquid-coupon-code",
34
+ // Liquid only: swaps the quotes inside {{ }} of href/src values, attribute-value edit only.
35
+ "liquid-single-quote-links",
34
36
  // Pongo only: collapses line breaks inside {% %} tags, which pongo2 cannot parse in AMP either.
35
37
  "pongo-single-line-tags",
36
38
  // Editor-only attribute strip — AMP4EMAIL has no `contenteditable`, so leaving
@@ -38,29 +40,29 @@ const A = /* @__PURE__ */ new Set([
38
40
  "remove-contenteditable",
39
41
  "remove-dc-pending-marker"
40
42
  ]), M = () => {
41
- const { compiler: i, isFeatureEnabled: a, partner: u } = x(), c = p(() => {
42
- var t, l;
43
- const e = ((t = i.value) == null ? void 0 : t.customRules) || [];
43
+ const { compiler: m, isFeatureEnabled: u, partner: a } = k(), c = p(() => {
44
+ var i, l;
45
+ const e = ((i = m.value) == null ? void 0 : i.customRules) || [];
44
46
  return [
45
- ...!!((l = i.value) != null && l.ignoreDefaultRules) ? [] : d,
47
+ ...!!((l = m.value) != null && l.ignoreDefaultRules) ? [] : d,
46
48
  ...C,
47
49
  ...b,
48
50
  ...f,
49
51
  ...R,
50
52
  ...H,
51
- ...a("liquidSyntax") ? g : v,
52
- ...e.map((m, o) => ({
53
- ...m,
54
- priority: m.priority + 1e3 + o
53
+ ...u("liquidSyntax") ? g : v,
54
+ ...e.map((t, o) => ({
55
+ ...t,
56
+ priority: t.priority + 1e3 + o
55
57
  // Ensure additional rules run after default rules
56
58
  }))
57
59
  ];
58
60
  }), r = p(() => {
59
- var m;
60
- const e = c.value, s = n(e), t = n(e.filter((o) => A.has(o.id))), l = (m = u.value) == null ? void 0 : m.fallbackFont;
61
+ var t;
62
+ const e = c.value, s = n(e), i = n(e.filter((o) => x.has(o.id))), l = (t = a.value) == null ? void 0 : t.fallbackFont;
61
63
  return {
62
64
  compileHtml: (o) => s.compile(o, void 0, l),
63
- compileAmpHtml: (o) => t.compile(o, void 0, l)
65
+ compileAmpHtml: (o) => i.compile(o, void 0, l)
64
66
  };
65
67
  });
66
68
  return { compileHtml: (e) => r.value.compileHtml(e), compileAmpHtml: (e) => r.value.compileAmpHtml(e) };