@useinsider/guido 3.17.0-beta.ec0523a → 3.17.0-beta.ec8eabb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "b0d3b445"
15
+ "915d61d5"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,152 +1,153 @@
1
- import { defineComponent as j, defineAsyncComponent as R, ref as B, computed as U, watch as _, onMounted as J, onUnmounted as Q } from "vue";
2
- import { useCortexBlueprintBridge as X } from "../composables/useCortexBlueprintBridge.js";
3
- import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
4
- import { useGuidoStateBridge as Z } from "../composables/useGuidoStateBridge.js";
5
- import { usePartner as ee } from "../composables/usePartner.js";
6
- import { useStripo as te } from "../composables/useStripo.js";
7
- import { useTimerClone as oe } from "../composables/useTimerClone.js";
8
- import { migrate as N } from "../config/migrator/index.js";
9
- import { ModuleFolderDefaults as O } from "../enums/defaults.js";
10
- import { RIBBON_SELECTOR as ne } from "../enums/onboarding.js";
11
- import { useRecommendationExtensionStore as re } from "../extensions/Blocks/Recommendation/store/recommendation.js";
12
- import se from "./organisms/AutoSaveController.vue.js";
13
- import ae from "./organisms/base/Toaster.vue.js";
14
- import ie from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
15
- import ce from "./organisms/header/HeaderWrapper.vue.js";
16
- import de from "./organisms/LoadingWrapper.vue.js";
17
- import me from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
18
- import le from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
19
- import { useStripoApi as ue } from "../services/stripoApi.js";
20
- import { useConfigStore as pe } from "../stores/config.js";
21
- import { useDynamicContentStore as fe } from "../stores/dynamic-content.js";
22
- import { useEditorStore as P } from "../stores/editor.js";
23
- import { usePreviewStore as ye } from "../stores/preview.js";
24
- import { useTemplateStore as ve } from "../stores/template.js";
25
- import { useUnsubscribeStore as he } from "../stores/unsubscribe.js";
1
+ import { defineComponent as J, defineAsyncComponent as B, ref as U, computed as _, watch as N, onMounted as Q, onUnmounted as X } from "vue";
2
+ import { useCortexBlueprintBridge as Y } from "../composables/useCortexBlueprintBridge.js";
3
+ import { useEditorLock as Z } from "../composables/useEditorLock.js";
4
+ import { provideGuidoActions as ee } from "../composables/useGuidoActions.js";
5
+ import { useGuidoStateBridge as oe } from "../composables/useGuidoStateBridge.js";
6
+ import { usePartner as te } from "../composables/usePartner.js";
7
+ import { useStripo as ne } from "../composables/useStripo.js";
8
+ import { useTimerClone as re } from "../composables/useTimerClone.js";
9
+ import { migrate as O } from "../config/migrator/index.js";
10
+ import { ModuleFolderDefaults as P } from "../enums/defaults.js";
11
+ import { RIBBON_SELECTOR as se } from "../enums/onboarding.js";
12
+ import { useRecommendationExtensionStore as ie } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
+ import ae from "./organisms/AutoSaveController.vue.js";
14
+ import ce from "./organisms/base/Toaster.vue.js";
15
+ import de from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
+ import me from "./organisms/header/HeaderWrapper.vue.js";
17
+ import le from "./organisms/LoadingWrapper.vue.js";
18
+ import ue from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
+ import pe from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
+ import { useStripoApi as fe } from "../services/stripoApi.js";
21
+ import { useConfigStore as ve } from "../stores/config.js";
22
+ import { useDynamicContentStore as ye } from "../stores/dynamic-content.js";
23
+ import { useEditorStore as x } from "../stores/editor.js";
24
+ import { usePreviewStore as he } from "../stores/preview.js";
25
+ import { useTemplateStore as Se } from "../stores/template.js";
26
+ import { useUnsubscribeStore as ge } from "../stores/unsubscribe.js";
26
27
  import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
27
- const ze = /* @__PURE__ */ j({
28
+ const Ve = /* @__PURE__ */ J({
28
29
  __name: "Guido",
29
30
  props: {
30
31
  config: null,
31
32
  ready: { type: Boolean, default: !0 }
32
33
  },
33
34
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
34
- setup(W, { expose: x, emit: r }) {
35
- const a = W, G = R(
35
+ setup(W, { expose: G, emit: r }) {
36
+ const i = W, H = B(
36
37
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
37
- ), H = R(
38
+ ), $ = B(
38
39
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
39
- ), h = B(), l = B(), u = fe(), S = he(), o = pe();
40
- a.ready && o.init(a.config);
41
- const c = P(), $ = ye(), m = U(() => c.hasChanges), { isTestPartner: z } = ee(), g = () => {
42
- var t;
43
- return (t = h.value) == null ? void 0 : t.handleSave(!0);
44
- }, b = (t) => {
45
- c.loadingStatus = t;
40
+ ), h = U(), l = U(), u = ye(), S = ge(), t = ve();
41
+ i.ready && t.init(i.config);
42
+ const c = x(), z = he(), m = _(() => c.hasChanges), { isTestPartner: q } = te(), g = () => {
43
+ var o;
44
+ return (o = h.value) == null ? void 0 : o.handleSave(!0);
45
+ }, b = (o) => {
46
+ c.loadingStatus = o;
46
47
  };
47
- X(), Z();
48
+ Y(), oe();
48
49
  const p = () => {
49
- var t, e;
50
+ var o, e;
50
51
  return {
51
- emailId: o.templateId,
52
- userId: o.userId,
53
- username: o.username,
54
- partnerName: o.partnerName,
55
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || O.SAVED_MODULES,
56
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || O.DEFAULT_MODULES
52
+ emailId: t.templateId,
53
+ userId: t.userId,
54
+ username: t.username,
55
+ partnerName: t.partnerName,
56
+ savedModulesFolderName: ((o = t.editor) == null ? void 0 : o.savedModulesFolderName) || P.SAVED_MODULES,
57
+ defaultModulesFolderName: ((e = t.editor) == null ? void 0 : e.defaultModulesFolderName) || P.DEFAULT_MODULES
57
58
  };
58
- }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
59
- var t;
60
- return !((t = o.ui) != null && t.showHeader);
59
+ }, { initPlugin: E, preloadRuntime: w } = ne(), { runExclusive: k } = Z(), { getDefaultTemplate: C } = fe(), { cloneTimersOnSave: D, hasTimerBlocks: T } = re(), K = _(() => {
60
+ var o;
61
+ return !((o = t.ui) != null && o.showHeader);
61
62
  });
62
- Y({
63
+ ee({
63
64
  onBack: () => {
64
65
  console.debug("guido:back"), r("back");
65
66
  },
66
67
  onSaveStart: () => {
67
68
  console.debug("guido:save:start"), r("save:start");
68
69
  },
69
- onSaveComplete: (t) => {
70
- const e = { ...t, metadata: p() };
70
+ onSaveComplete: (o) => {
71
+ const e = { ...o, metadata: p() };
71
72
  console.debug("guido:save:complete", e), r("save:complete", e);
72
73
  },
73
74
  onTestEmailClick: () => {
74
75
  console.debug("guido:test-email:click"), r("test-email:click");
75
76
  }
76
77
  });
77
- const T = (t) => {
78
- console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
79
- }, F = () => {
78
+ const F = (o) => {
79
+ console.debug("dynamic-content:close", o), u.setSelectedDynamicContent(o), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: o }));
80
+ }, I = () => {
80
81
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
81
82
  };
82
- _(() => m.value, () => {
83
+ N(() => m.value, () => {
83
84
  r("on-change", m.value);
84
85
  });
85
- const f = (t) => {
86
- const e = t, { attribute: s, position: d } = e.detail;
86
+ const f = (o) => {
87
+ const e = o, { attribute: s, position: d } = e.detail;
87
88
  console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
88
89
  };
89
- let i = null;
90
- const y = () => {
90
+ let a = null;
91
+ const v = () => {
91
92
  var e;
92
- const t = document.querySelector(ne);
93
- (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
94
- }, v = async () => {
95
- var t;
93
+ const o = document.querySelector(se);
94
+ (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(o == null ? void 0 : o.offsetHeight) ?? 0}px`);
95
+ }, y = async () => {
96
+ var o;
96
97
  try {
97
- o.initialized || o.init(a.config), c.templateId = o.templateId;
98
- const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", I = (e == null ? void 0 : e.preselectedDynamicContent) || [];
98
+ t.initialized || t.init(i.config), c.templateId = t.templateId;
99
+ const e = t.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", L = (e == null ? void 0 : e.preselectedDynamicContent) || [];
99
100
  S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
100
- const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
101
+ const M = ((o = e == null ? void 0 : e.migration) == null ? void 0 : o.recommendationConfigs) ?? {}, R = t.isFeatureEnabled("linkTrackingIds");
101
102
  let n = {
102
- html: s && await N(s, L),
103
+ html: s && await O(s, M),
103
104
  css: d
104
105
  };
105
- n.html || (n = await C(), n.html = await N(n.html, L));
106
- const K = M ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
107
- k(n.html) && (n.html = await D(n.html)), M && (c.trackIdSessionFloor = Math.max(K, A(n.html)));
108
- const V = {
109
- preselectedDynamicContentList: I,
106
+ n.html || (n = await C(), n.html = await O(n.html, M));
107
+ const V = R ? A(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
108
+ T(n.html) && (n.html = await D(n.html)), R && (c.trackIdSessionFloor = Math.max(V, A(n.html)));
109
+ const j = {
110
+ preselectedDynamicContentList: L,
110
111
  onReady: () => {
111
112
  console.debug("guido:ready"), r("ready");
112
113
  }
113
114
  };
114
- await E(n, p(), V), u.selectedDynamicContentList = I;
115
+ await E(n, p(), j), u.selectedDynamicContentList = L;
115
116
  } catch (e) {
116
117
  console.error("Failed to initialize Stripo editor:", e);
117
118
  }
118
119
  };
119
- return J(async () => {
120
+ return Q(async () => {
120
121
  var e;
121
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
122
- const t = (e = l.value) == null ? void 0 : e.parentElement;
123
- if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
124
- await v();
122
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), ie().$reset(), x().$reset(), Se().$reset(), v();
123
+ const o = (e = l.value) == null ? void 0 : e.parentElement;
124
+ if (o && (a = new ResizeObserver(v), a.observe(o)), w(), i.ready)
125
+ await y();
125
126
  else {
126
- const s = _(() => a.ready, (d) => {
127
- d && (s(), v());
127
+ const s = N(() => i.ready, (d) => {
128
+ d && (s(), y());
128
129
  });
129
130
  }
130
131
  document.addEventListener("dynamic-content:open", f);
131
- }), Q(() => {
132
- i == null || i.disconnect(), document.removeEventListener("dynamic-content:open", f);
133
- try {
134
- window.UIEditor.removeEditor();
135
- } catch {
136
- console.debug("Failed to remove Stripo editor: No editor found");
137
- }
138
- o.reset();
139
- }), x({
132
+ }), X(() => {
133
+ a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", f), k(async () => {
134
+ try {
135
+ window.UIEditor.removeEditor();
136
+ } catch {
137
+ console.debug("Failed to remove Stripo editor: No editor found");
138
+ }
139
+ }), t.reset();
140
+ }), G({
140
141
  dynamicContent: {
141
- insert: T,
142
- close: F
142
+ insert: F,
143
+ close: I
143
144
  },
144
145
  hasChanges: m,
145
146
  saveSilent: g,
146
147
  setLoading: b
147
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: H, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: a, configStore: o, editorStore: c, previewStore: $, hasChanges: m, isTestPartner: z, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: k, noHeader: q, insertDynamicContent: T, closeDynamicContent: F, handleDynamicContentOpen: f, ribbonObserver: i, updateRibbonOffset: y, startEditor: v, AutoSaveController: se, Toaster: ae, FilterSelectionDrawer: ie, HeaderWrapper: ce, LoadingWrapper: de, SaveAsTemplateDrawer: me, UnsubscribeWrapper: le };
148
+ }), { __sfc: !0, PreviewContainer: H, OnboardingWrapper: $, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: i, configStore: t, editorStore: c, previewStore: z, hasChanges: m, isTestPartner: q, saveSilent: g, setLoading: b, emit: r, buildMetadata: p, initPlugin: E, preloadRuntime: w, runExclusive: k, getDefaultTemplate: C, cloneTimersOnSave: D, hasTimerBlocks: T, noHeader: K, insertDynamicContent: F, closeDynamicContent: I, handleDynamicContentOpen: f, ribbonObserver: a, updateRibbonOffset: v, startEditor: y, AutoSaveController: ae, Toaster: ce, FilterSelectionDrawer: de, HeaderWrapper: me, LoadingWrapper: le, SaveAsTemplateDrawer: ue, UnsubscribeWrapper: pe };
148
149
  }
149
150
  });
150
151
  export {
151
- ze as default
152
+ Ve as default
152
153
  };
@@ -15,7 +15,7 @@ var u = function() {
15
15
  p,
16
16
  !1,
17
17
  null,
18
- "6e711fd7"
18
+ "fa75f9c3"
19
19
  );
20
20
  const v = c.exports;
21
21
  export {
@@ -1,49 +1,57 @@
1
- import { defineComponent as O, ref as n, computed as h } from "vue";
2
- import { useActionsApi as q } from "../../../composables/useActionsApi.js";
3
- import { useConfig as b } from "../../../composables/useConfig.js";
4
- import { useExport as k } from "../../../composables/useExport.js";
5
- import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
6
- import { useHtmlCompiler as D } from "../../../composables/useHtmlCompiler.js";
7
- import { useSave as F } from "../../../composables/useSave.js";
8
- import { useTranslations as L } from "../../../composables/useTranslations.js";
9
- import { useVersionHistoryApi as R } from "../../../composables/useVersionHistoryApi.js";
10
- import { useLiquidValidator as z } from "../../../composables/validators/useLiquidValidator.js";
11
- import { useEditorStore as I } from "../../../stores/editor.js";
12
- import { useTemplateStore as P } from "../../../stores/template.js";
13
- import { getTooltipOptions as j } from "../../../utils/tooltipUtils.js";
14
- import { InButtonV2 as G } from "@useinsider/design-system-vue";
15
- import { storeToRefs as J } from "pinia";
16
- import K from "./MigrationConfirmModal.vue.js";
17
- const ut = /* @__PURE__ */ O({
1
+ import { defineComponent as F, ref as a, computed as x } from "vue";
2
+ import { useActionsApi as b } from "../../../composables/useActionsApi.js";
3
+ import { useConfig as k } from "../../../composables/useConfig.js";
4
+ import { useExport as B } from "../../../composables/useExport.js";
5
+ import { useTestEmailClick as D } from "../../../composables/useGuidoActions.js";
6
+ import { useHtmlCompiler as L } from "../../../composables/useHtmlCompiler.js";
7
+ import { useSave as R } from "../../../composables/useSave.js";
8
+ import { useToaster as z } from "../../../composables/useToaster.js";
9
+ import { useTranslations as I } from "../../../composables/useTranslations.js";
10
+ import { useVersionHistoryApi as P } from "../../../composables/useVersionHistoryApi.js";
11
+ import { useLiquidValidator as j } from "../../../composables/validators/useLiquidValidator.js";
12
+ import { useEditorStore as G } from "../../../stores/editor.js";
13
+ import { useTemplateStore as J } from "../../../stores/template.js";
14
+ import { getTooltipOptions as K } from "../../../utils/tooltipUtils.js";
15
+ import { InButtonV2 as N } from "@useinsider/design-system-vue";
16
+ import { storeToRefs as Q } from "pinia";
17
+ import U from "./MigrationConfirmModal.vue.js";
18
+ const ft = /* @__PURE__ */ F({
18
19
  __name: "EditorActions",
19
- setup(N, { expose: x }) {
20
- const { config: a, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: u } = F(), { openVersionHistory: c, closeVersionHistory: p } = R(), { getCompiledEmail: f } = q(), { compileHtml: d } = D(), { validateLiquidSyntax: v } = z(), e = I(), y = P(), { hasMigrations: g } = J(y), s = L(), i = n(!1), r = n(!1), S = n(), H = B(), T = () => {
20
+ setup(W, { expose: w }) {
21
+ const { config: n, isFeatureEnabled: l } = k(), { exportHtml: m } = B(), { save: u } = R(), { openVersionHistory: c, closeVersionHistory: p } = P(), { getCompiledEmail: f } = b(), { compileHtml: d } = L(), { validateLiquidSyntax: v } = j(), { handleError: y } = z(), e = G(), g = J(), { hasMigrations: S } = Q(g), r = I(), s = a(!1), i = a(!1), H = a(), V = D(), _ = () => {
21
22
  if (e.isVersionHistoryOpen) {
22
23
  p();
23
24
  return;
24
25
  }
25
26
  c();
26
- }, w = async () => {
27
- i.value = !0, await m(), i.value = !1;
28
- }, _ = () => {
27
+ }, C = async () => {
28
+ s.value = !0, await m(), s.value = !1;
29
+ }, A = () => {
29
30
  e.isSaveAsTemplateDrawerOpen = !0;
30
- }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
31
+ }, M = x(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), O = x(
31
32
  () => {
32
33
  var t, o;
33
- return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
34
+ return ((o = (t = n.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
34
35
  }
35
- ), V = async (t) => {
36
- r.value = !0, t || (e.loadingStatus = !0);
37
- const o = await u(t);
38
- return r.value = !1, !t && !o && (e.loadingStatus = !1), o;
36
+ ), h = async (t) => {
37
+ i.value = !0, t || (e.loadingStatus = !0);
38
+ let o;
39
+ try {
40
+ o = await u(t);
41
+ } catch (T) {
42
+ y(T, "Failed to save template");
43
+ } finally {
44
+ i.value = !1, !t && !o && (e.loadingStatus = !1);
45
+ }
46
+ return o;
39
47
  }, E = (t) => {
40
48
  var o;
41
- if (!t && g.value) {
42
- (o = S.value) == null || o.open();
49
+ if (!t && S.value) {
50
+ (o = H.value) == null || o.open();
43
51
  return;
44
52
  }
45
- return V(t);
46
- }, M = async () => {
53
+ return h(t);
54
+ }, q = async () => {
47
55
  if (l("liquidSyntax")) {
48
56
  e.loadingStatus = !0;
49
57
  try {
@@ -54,13 +62,13 @@ const ut = /* @__PURE__ */ O({
54
62
  e.loadingStatus = !1;
55
63
  }
56
64
  }
57
- H();
65
+ V();
58
66
  };
59
- return x({
67
+ return w({
60
68
  handleSave: E
61
- }), { __sfc: !0, config: a, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, editorStore: e, templateStore: y, hasMigrations: g, trans: s, isExporting: i, isSaving: r, migrationModalRef: S, testEmailClick: H, handleVersionHistory: T, handleExport: w, handleSaveAs: _, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: A, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: j, InButtonV2: G, MigrationConfirmModal: K };
69
+ }), { __sfc: !0, config: n, isFeatureEnabled: l, exportHtml: m, save: u, openVersionHistory: c, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, handleError: y, editorStore: e, templateStore: g, hasMigrations: S, trans: r, isExporting: s, isSaving: i, migrationModalRef: H, testEmailClick: V, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: h, handleSave: E, handleTestEmail: q, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
62
70
  }
63
71
  });
64
72
  export {
65
- ut as default
73
+ ft as default
66
74
  };
@@ -1,52 +1,68 @@
1
- import { filterAmpErrors as T } from "../utils/ampErrorFilter.js";
2
- import { useToaster as A } from "./useToaster.js";
3
- const p = 1e4, D = () => {
4
- const { handleError: r } = A(), l = (t = {}) => new Promise((e, a) => {
5
- const o = { ...{
6
- minimize: !0,
7
- utmEntity: {
8
- utmSource: "",
9
- utmMedium: "",
10
- utmCampaign: "",
11
- utmContent: "",
12
- utmTerm: "",
13
- customUtms: [
14
- {
15
- name1: "val1",
16
- name2: "val2"
17
- }
18
- ]
19
- },
20
- mergeTags: ["Tag1", "Tag2"],
21
- forceAmp: !1,
22
- resetDataSavedFlag: !1,
23
- disableLineHeightsReplace: !0
24
- }, ...t }, n = {
25
- callback: (m, d, c, u, w) => {
26
- m ? a(m) : e({
27
- html: d,
28
- ampHtml: c,
29
- ampErrors: T(u ?? []),
30
- displayConditions: w
31
- });
32
- },
33
- ...o
34
- };
35
- window.StripoEditorApi.actionsApi.compileEmail(n);
36
- });
1
+ import { filterAmpErrors as v } from "../utils/ampErrorFilter.js";
2
+ import { useToaster as y } from "./useToaster.js";
3
+ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
4
+ const w = setTimeout(
5
+ () => m(new Error(`${n} did not report completion within ${l}ms`)),
6
+ l
7
+ ), p = (A) => (t) => {
8
+ clearTimeout(w), A(t);
9
+ };
10
+ u(p(T), p(m));
11
+ }), I = () => {
12
+ const { handleError: n } = y(), l = (t = {}) => s(
13
+ "compileEmail",
14
+ d,
15
+ (e, a) => {
16
+ const o = { ...{
17
+ minimize: !0,
18
+ utmEntity: {
19
+ utmSource: "",
20
+ utmMedium: "",
21
+ utmCampaign: "",
22
+ utmContent: "",
23
+ utmTerm: "",
24
+ customUtms: [
25
+ {
26
+ name1: "val1",
27
+ name2: "val2"
28
+ }
29
+ ]
30
+ },
31
+ mergeTags: ["Tag1", "Tag2"],
32
+ forceAmp: !1,
33
+ resetDataSavedFlag: !1,
34
+ disableLineHeightsReplace: !0
35
+ }, ...t }, c = {
36
+ callback: (r, C, f, S, g) => {
37
+ r ? a(r) : e({
38
+ html: C,
39
+ ampHtml: f,
40
+ ampErrors: v(S ?? []),
41
+ displayConditions: g
42
+ });
43
+ },
44
+ ...o
45
+ };
46
+ window.StripoEditorApi.actionsApi.compileEmail(c);
47
+ }
48
+ );
37
49
  return {
38
50
  getCompiledEmail: l,
39
- getTemplateData: () => new Promise((t) => {
40
- const e = ({ html: a, css: i, width: o, height: s, utmParams: n, syncModulesIds: m }) => t({
41
- html: a,
42
- css: i,
43
- width: o,
44
- height: s,
45
- utmParams: n,
46
- syncModulesIds: m
47
- });
48
- window.StripoEditorApi.actionsApi.getTemplateData(e);
49
- }),
51
+ getTemplateData: () => s(
52
+ "getTemplateData",
53
+ d,
54
+ (t) => {
55
+ const e = ({ html: a, css: i, width: o, height: E, utmParams: c, syncModulesIds: r }) => t({
56
+ html: a,
57
+ css: i,
58
+ width: o,
59
+ height: E,
60
+ utmParams: c,
61
+ syncModulesIds: r
62
+ });
63
+ window.StripoEditorApi.actionsApi.getTemplateData(e);
64
+ }
65
+ ),
50
66
  activateCustomViewStyles: (t = !0) => {
51
67
  window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
52
68
  },
@@ -65,7 +81,7 @@ const p = 1e4, D = () => {
65
81
  displayConditions: a
66
82
  };
67
83
  } catch (e) {
68
- return r(e, "Error loading preview"), {
84
+ return n(e, "Error loading preview"), {
69
85
  html: "",
70
86
  ampHtml: "",
71
87
  ampErrors: [],
@@ -81,34 +97,33 @@ const p = 1e4, D = () => {
81
97
  }
82
98
  try {
83
99
  window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
84
- i ? (r(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
100
+ i ? (n(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
85
101
  });
86
102
  } catch (i) {
87
- r(i, "Failed to call updateTimerInClonedTemplate"), t(null);
103
+ n(i, "Failed to call updateTimerInClonedTemplate"), t(null);
88
104
  }
89
105
  }),
90
106
  updateHtmlAndCss: (t, e) => {
91
107
  const { actionsApi: a } = window.StripoEditorApi;
92
- return new Promise((i, o) => {
93
- const s = new Error(
94
- `updateHtmlAndCss did not report completion within ${p}ms`
95
- ), n = setTimeout(() => o(s), p);
96
- a.updateHtmlAndCss(t, e, () => {
97
- clearTimeout(n), i();
98
- });
108
+ return s("updateHtmlAndCss", D, (i) => {
109
+ a.updateHtmlAndCss(t, e, () => i());
99
110
  });
100
111
  },
101
- editorSave: () => new Promise((t) => {
102
- window.StripoEditorApi.actionsApi.save((e) => {
103
- if (e) {
104
- r(e, "Failed to save template"), t(!1);
105
- return;
106
- }
107
- t(!0);
108
- });
109
- })
112
+ editorSave: () => s(
113
+ "save",
114
+ d,
115
+ (t) => {
116
+ window.StripoEditorApi.actionsApi.save((e) => {
117
+ if (e) {
118
+ n(e, "Failed to save template"), t(!1);
119
+ return;
120
+ }
121
+ t(!0);
122
+ });
123
+ }
124
+ )
110
125
  };
111
126
  };
112
127
  export {
113
- D as useActionsApi
128
+ I as useActionsApi
114
129
  };
@@ -1,21 +1,22 @@
1
- import { useConfig as m } from "./useConfig.js";
1
+ import { useConfig as E } from "./useConfig.js";
2
+ import { useEditorLock as p } from "./useEditorLock.js";
2
3
  import { useAutosaveStore as A, AUTOSAVE_STATUS as s } from "../stores/autosave.js";
3
- import { useEditorStore as E } from "../stores/editor.js";
4
- import { computed as f, watch as p, onUnmounted as y } from "vue";
5
- const I = 18e4, r = 6e4, T = (b) => {
6
- const { isFeatureEnabled: S } = m(), a = E(), t = A();
4
+ import { useEditorStore as f } from "../stores/editor.js";
5
+ import { computed as y, watch as I, onUnmounted as L } from "vue";
6
+ const w = 18e4, v = 6e4, R = (b) => {
7
+ const { isFeatureEnabled: S } = E(), o = f(), t = A(), { isEditorBusy: g } = p();
7
8
  let i = null, c = 0;
8
- const u = f(
9
+ const u = y(
9
10
  () => S("autosave") && t.isOn
10
- ), g = () => a.hasChanges && a.isInSaveableState, h = () => ({
11
- hasChanges: a.hasChanges,
12
- isInSaveableState: a.isInSaveableState
13
- }), l = async (e) => {
11
+ ), m = () => o.hasChanges && o.isInSaveableState, h = () => ({
12
+ hasChanges: o.hasChanges,
13
+ isInSaveableState: o.isInSaveableState
14
+ }), r = async (e) => {
14
15
  if (!u.value) {
15
16
  console.debug("guido:autosave:skipped", { trigger: e, reason: "not-active" });
16
17
  return;
17
18
  }
18
- if (!g()) {
19
+ if (!m()) {
19
20
  console.debug("guido:autosave:skipped", { trigger: e, reason: "gates-blocked", gates: h() });
20
21
  return;
21
22
  }
@@ -23,15 +24,19 @@ const I = 18e4, r = 6e4, T = (b) => {
23
24
  console.debug("guido:autosave:skipped", { trigger: e, reason: "already-saving" });
24
25
  return;
25
26
  }
27
+ if (g()) {
28
+ console.debug("guido:autosave:skipped", { trigger: e, reason: "editor-busy" });
29
+ return;
30
+ }
26
31
  console.debug("guido:autosave:save-start", { trigger: e }), t.status = s.SAVING;
27
32
  try {
28
33
  if (await b() === void 0) {
29
34
  console.debug("guido:autosave:blocked", { trigger: e, reason: "save-returned-undefined" }), t.status = s.ERROR;
30
35
  return;
31
36
  }
32
- a.hasChanges = !1, t.status = s.SAVED, t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
33
- } catch (o) {
34
- console.debug("guido:autosave:error", { trigger: e, error: o }), t.status = s.ERROR;
37
+ o.hasChanges = !1, t.status = s.SAVED, t.lastSavedAt = /* @__PURE__ */ new Date(), console.debug("guido:autosave:save-complete", { trigger: e, at: t.lastSavedAt });
38
+ } catch (a) {
39
+ console.debug("guido:autosave:error", { trigger: e, error: a }), t.status = s.ERROR;
35
40
  }
36
41
  }, n = () => {
37
42
  const { visibilityState: e } = document;
@@ -40,32 +45,32 @@ const I = 18e4, r = 6e4, T = (b) => {
40
45
  isActive: u.value
41
46
  }), e !== "hidden")
42
47
  return;
43
- const o = Date.now() - c;
44
- if (o < r) {
48
+ const a = Date.now() - c;
49
+ if (a < v) {
45
50
  console.debug("guido:autosave:visibility-debounced", {
46
- sinceLastMs: o,
47
- debounceMs: r
51
+ sinceLastMs: a,
52
+ debounceMs: v
48
53
  });
49
54
  return;
50
55
  }
51
- c = Date.now(), l("visibility");
56
+ c = Date.now(), r("visibility");
52
57
  }, d = () => {
53
58
  i && (clearInterval(i), i = null);
54
- }, v = () => {
59
+ }, l = () => {
55
60
  document.removeEventListener("visibilitychange", n), window.removeEventListener("pagehide", n);
56
61
  };
57
- p(
62
+ I(
58
63
  u,
59
64
  (e) => {
60
65
  console.debug("guido:autosave:active-changed", { active: e }), e ? (d(), i = setInterval(() => {
61
- console.debug("guido:autosave:interval-tick"), l("interval");
62
- }, I), document.addEventListener("visibilitychange", n), window.addEventListener("pagehide", n)) : (d(), v(), t.status = s.IDLE);
66
+ console.debug("guido:autosave:interval-tick"), r("interval");
67
+ }, w), document.addEventListener("visibilitychange", n), window.addEventListener("pagehide", n)) : (d(), l(), t.status = s.IDLE);
63
68
  },
64
69
  { immediate: !0 }
65
- ), y(() => {
66
- d(), v(), t.status = s.IDLE, t.lastSavedAt = null;
70
+ ), L(() => {
71
+ d(), l(), t.status = s.IDLE, t.lastSavedAt = null;
67
72
  });
68
73
  };
69
74
  export {
70
- T as useAutoSave
75
+ R as useAutoSave
71
76
  };
@@ -0,0 +1,18 @@
1
+ let n = Promise.resolve(), t = 0;
2
+ const c = () => t > 0, s = (r) => {
3
+ const e = n.then(async () => {
4
+ t += 1;
5
+ try {
6
+ return await r();
7
+ } finally {
8
+ t -= 1;
9
+ }
10
+ });
11
+ return n = e.catch(() => {
12
+ }), e;
13
+ }, o = () => ({ runExclusive: s, isEditorBusy: c });
14
+ export {
15
+ c as isEditorBusy,
16
+ s as runExclusive,
17
+ o as useEditorLock
18
+ };
@@ -1,48 +1,49 @@
1
- import { useActionsApi as g } from "./useActionsApi.js";
2
- import { useConfigStore as I } from "../stores/config.js";
3
- import { useEditorStore as b } from "../stores/editor.js";
4
- import { useGuidoEmailEditorStore as E } from "../stores/guido-email-editor.js";
5
- import { watch as c, onUnmounted as T } from "vue";
6
- const w = 500, z = () => {
7
- const i = b(), a = E(), l = I(), { getTemplateData: m } = g();
8
- let e = null, n = !1;
9
- const r = () => {
10
- e && (clearTimeout(e), e = null);
11
- }, s = async () => {
12
- var t, o;
13
- if (!(n || !i.isStripoInitialized))
1
+ import { useActionsApi as I } from "./useActionsApi.js";
2
+ import { useEditorLock as b } from "./useEditorLock.js";
3
+ import { useConfigStore as T } from "../stores/config.js";
4
+ import { useEditorStore as v } from "../stores/editor.js";
5
+ import { useGuidoEmailEditorStore as w } from "../stores/guido-email-editor.js";
6
+ import { watch as c, onUnmounted as y } from "vue";
7
+ const B = 500, G = () => {
8
+ const i = v(), a = w(), u = T(), { getTemplateData: l } = I(), { runExclusive: m, isEditorBusy: d } = b();
9
+ let o = null, r = !1;
10
+ const s = () => {
11
+ o && (clearTimeout(o), o = null);
12
+ }, n = async () => {
13
+ var t, e;
14
+ if (!(r || !i.isStripoInitialized || d()))
14
15
  try {
15
- const { html: f, css: h } = await m(), S = ((o = (t = l.config) == null ? void 0 : t.identity) == null ? void 0 : o.templateId) ?? "";
16
- if (n)
16
+ const { html: S, css: E } = await m(l), g = ((e = (t = u.config) == null ? void 0 : t.identity) == null ? void 0 : e.templateId) ?? "";
17
+ if (r)
17
18
  return;
18
19
  a.$patch({
19
- html: f ?? "",
20
- css: h ?? "",
21
- templateId: S,
20
+ html: S ?? "",
21
+ css: E ?? "",
22
+ templateId: g,
22
23
  lastUpdatedAt: Date.now()
23
24
  });
24
25
  } catch {
25
26
  }
26
- }, u = () => {
27
- r(), e = setTimeout(() => {
28
- e = null, s();
29
- }, w);
30
- }, d = c(
27
+ }, p = () => {
28
+ s(), o = setTimeout(() => {
29
+ o = null, n();
30
+ }, B);
31
+ }, f = c(
31
32
  () => i.isStripoInitialized,
32
33
  (t) => {
33
- t && s();
34
+ t && n();
34
35
  },
35
36
  { immediate: !0 }
36
- ), p = c(
37
+ ), h = c(
37
38
  () => i.hasChanges,
38
- (t, o) => {
39
- i.isStripoInitialized && (t ? u() : o && (r(), s()));
39
+ (t, e) => {
40
+ i.isStripoInitialized && (t ? p() : e && (s(), n()));
40
41
  }
41
42
  );
42
- T(() => {
43
- n = !0, r(), d(), p();
43
+ y(() => {
44
+ r = !0, s(), f(), h();
44
45
  });
45
46
  };
46
47
  export {
47
- z as useGuidoStateBridge
48
+ G as useGuidoStateBridge
48
49
  };
@@ -1,51 +1,55 @@
1
1
  import { useActionsApi as T } from "./useActionsApi.js";
2
- import { useConfig as k } from "./useConfig.js";
3
- import { useSaveStart as B, useSaveComplete as E } from "./useGuidoActions.js";
4
- import { useSyncModuleExtractor as q } from "./useSyncModuleExtractor.js";
5
- import { ToasterTypeOptions as C } from "../enums/toaster.js";
6
- import { useStripoApi as D } from "../services/stripoApi.js";
7
- import { useTemplatePreparation as L } from "../utils/templatePreparation.js";
8
- import { useAllowlist as P } from "./useAllowlist.js";
9
- import { useHtmlValidator as U } from "./useHtmlValidator.js";
10
- import { useToaster as A } from "./useToaster.js";
11
- import { useCouponBlockValidator as M } from "./validators/useCouponBlockValidator.js";
12
- import { useLiquidValidator as h } from "./validators/useLiquidValidator.js";
13
- import { useUnsubscribeBlockValidator as F } from "./validators/useUnsubscribeBlockValidator.js";
14
- const $ = () => {
15
- const n = B(), l = E(), { validateHtml: c } = U(), { validateLiquidSyntax: d } = h(), { validateCouponBlockTags: m } = M(), { validateUnsubscribeBlockUniqueness: u, validateUnsubscribeBlockHasTemplate: p } = F(), { callbacks: e, isFeatureEnabled: a } = k(), { extractSyncModuleData: f } = q(), { setSyncModuleUnsubscriptionPages: v } = D(), { editorSave: S } = T(), { showToaster: b } = A(), { getBlockedDomains: w, resolveToast: V } = P();
16
- return { save: async (y = !1, s = !1) => {
17
- var r;
18
- n();
19
- const { prepareTemplateDetails: H } = L(), t = await H();
20
- if (!m(t.compiledHtml) || !u(t.compiledHtml) || !p(t.compiledHtml))
2
+ import { useConfig as B } from "./useConfig.js";
3
+ import { useEditorLock as q } from "./useEditorLock.js";
4
+ import { useSaveStart as C, useSaveComplete as L } from "./useGuidoActions.js";
5
+ import { useSyncModuleExtractor as D } from "./useSyncModuleExtractor.js";
6
+ import { ToasterTypeOptions as P } from "../enums/toaster.js";
7
+ import { useStripoApi as U } from "../services/stripoApi.js";
8
+ import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
9
+ import { useAllowlist as M } from "./useAllowlist.js";
10
+ import { useHtmlValidator as h } from "./useHtmlValidator.js";
11
+ import { useToaster as F } from "./useToaster.js";
12
+ import { useCouponBlockValidator as O } from "./validators/useCouponBlockValidator.js";
13
+ import { useLiquidValidator as W } from "./validators/useLiquidValidator.js";
14
+ import { useUnsubscribeBlockValidator as j } from "./validators/useUnsubscribeBlockValidator.js";
15
+ const et = () => {
16
+ const l = C(), c = L(), { validateHtml: m } = h(), { validateLiquidSyntax: d } = W(), { validateCouponBlockTags: u } = O(), { validateUnsubscribeBlockUniqueness: p, validateUnsubscribeBlockHasTemplate: f } = j(), { callbacks: s, isFeatureEnabled: r } = B(), { extractSyncModuleData: v } = D(), { setSyncModuleUnsubscriptionPages: S } = U(), { editorSave: b } = T(), { showToaster: w } = F(), { getBlockedDomains: V, resolveToast: x } = M(), { runExclusive: y } = q(), E = async (a, e) => {
17
+ var n;
18
+ l();
19
+ const { prepareTemplateDetails: H } = A(), t = await H();
20
+ if (!u(t.compiledHtml) || !p(t.compiledHtml) || !f(t.compiledHtml))
21
21
  return;
22
- if (a("liquidSyntax")) {
22
+ if (r("liquidSyntax")) {
23
23
  if (!await d(t.compiledHtml))
24
24
  return;
25
- } else if (!await c(t.compiledHtml, t.dynamicContentList, !0))
25
+ } else if (!await m(t.compiledHtml, t.dynamicContentList, !0))
26
26
  return;
27
- if ((r = e.value) != null && r.externalValidation && !await e.value.externalValidation(t))
27
+ if ((n = s.value) != null && n.externalValidation && !await s.value.externalValidation(t))
28
28
  return;
29
- if (a("allowlistEnabled")) {
30
- const i = await w(t.compiledHtml, t.css);
31
- if (i.length) {
32
- if (!s) {
33
- const o = await V(i);
34
- o != null && o.message && b({
35
- type: C.Warning,
36
- message: o.message,
37
- actionButton: o.actionButton
29
+ if (r("allowlistEnabled")) {
30
+ const o = await V(t.compiledHtml, t.css);
31
+ if (o.length) {
32
+ if (!e) {
33
+ const i = await x(o);
34
+ i != null && i.message && w({
35
+ type: P.Warning,
36
+ message: i.message,
37
+ actionButton: i.actionButton
38
38
  });
39
39
  }
40
40
  return;
41
41
  }
42
42
  }
43
- if (!await S())
43
+ if (!await b())
44
44
  return;
45
- const { unsubscribePayload: g, stripoModules: x } = f(t.rawHtml);
46
- return await v(g), t.modules = x, y || l({ ...t, silent: s }), t;
47
- } };
45
+ const { unsubscribePayload: g, stripoModules: k } = v(t.rawHtml);
46
+ return await S(g), t.modules = k, a || c({ ...t, silent: e }), t;
47
+ };
48
+ return { save: (a = !1, e = !1) => y(
49
+ // Serialized so no other editor read/export runs while Stripo is exporting for this save.
50
+ () => E(a, e)
51
+ ) };
48
52
  };
49
53
  export {
50
- $ as useSave
54
+ et as useSave
51
55
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-b0d3b445]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-b0d3b445]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-b0d3b445]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-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}
1
+ .gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-fa75f9c3]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-915d61d5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-915d61d5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-915d61d5]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-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}
@@ -0,0 +1,11 @@
1
+ export declare const isEditorBusy: () => boolean;
2
+ /**
3
+ * Runs `task` once every previously queued task has settled — no two editor
4
+ * read/export/save operations ever overlap. A rejected task propagates to its
5
+ * caller but never wedges the queue.
6
+ */
7
+ export declare const runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
8
+ export declare const useEditorLock: () => {
9
+ runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
10
+ isEditorBusy: () => boolean;
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.17.0-beta.ec0523a",
3
+ "version": "3.17.0-beta.ec8eabb",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",