@useinsider/guido 3.17.0-beta.f7536b7 → 3.17.1-beta.1291eaa

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
@@ -633,16 +633,16 @@ toaster fires (useful before the host has wired the catalog).
633
633
 
634
634
  ```bash
635
635
  # Install
636
- bun install
636
+ npm install
637
637
 
638
638
  # Start dev server
639
- bun start
639
+ npm start
640
640
 
641
641
  # Build
642
- bun run build
642
+ npm run build
643
643
 
644
644
  # Lint & type-check
645
- bun run lint
645
+ npm run lint
646
646
  ```
647
647
 
648
648
  ### Environment Variables
@@ -660,7 +660,7 @@ VITE_STRIPO_USER=your_user
660
660
 
661
661
  ```bash
662
662
  # Build the package
663
- bun run build
663
+ npm run build
664
664
 
665
665
  # Create tarball
666
666
  npm pack
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "1f2703e5"
15
+ "b0d3b445"
16
16
  );
17
17
  const l = s.exports;
18
18
  export {
@@ -1,51 +1,50 @@
1
- import { defineComponent as Y, defineAsyncComponent as N, ref as O, computed as P, watch as x, onMounted as Z, onUnmounted as ee } from "vue";
2
- import { useCortexBlueprintBridge as te } from "../composables/useCortexBlueprintBridge.js";
3
- import { useEditorLock as oe } from "../composables/useEditorLock.js";
4
- import { provideGuidoActions as ne } from "../composables/useGuidoActions.js";
5
- import { useGuidoStateBridge as re } from "../composables/useGuidoStateBridge.js";
6
- import { usePartner as se } from "../composables/usePartner.js";
7
- import { useStripo as ie } from "../composables/useStripo.js";
8
- import { useTimerClone as ae } from "../composables/useTimerClone.js";
9
- import { migrate as A } from "../config/migrator/index.js";
10
- import { ModuleFolderDefaults as W } from "../enums/defaults.js";
11
- import { RIBBON_SELECTOR as ce } from "../enums/onboarding.js";
12
- import { useRecommendationExtensionStore as de } from "../extensions/Blocks/Recommendation/store/recommendation.js";
13
- import me from "./organisms/AutoSaveController.vue.js";
14
- import le from "./organisms/base/Toaster.vue.js";
15
- import ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
16
- import pe from "./organisms/header/HeaderWrapper.vue.js";
17
- import fe from "./organisms/LoadingWrapper.vue.js";
18
- import ve from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
19
- import ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
20
- import { useStripoApi as ge } from "../services/stripoApi.js";
21
- import { useConfigStore as he } from "../stores/config.js";
22
- import { useDynamicContentStore as Se } from "../stores/dynamic-content.js";
23
- import { useEditorStore as G } from "../stores/editor.js";
24
- import { usePreviewStore as be } from "../stores/preview.js";
25
- import { useTemplateStore as Ee } from "../stores/template.js";
26
- import { useUnsubscribeStore as we } from "../stores/unsubscribe.js";
27
- import { readTrackFloor as H } from "../utils/linkTrackingIds.js";
28
- const Qe = /* @__PURE__ */ Y({
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";
26
+ import { readTrackFloor as A } from "../utils/linkTrackingIds.js";
27
+ const ze = /* @__PURE__ */ j({
29
28
  __name: "Guido",
30
29
  props: {
31
30
  config: null,
32
31
  ready: { type: Boolean, default: !0 }
33
32
  },
34
33
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
35
- setup($, { expose: z, emit: r }) {
36
- const i = $, q = N(
34
+ setup(W, { expose: x, emit: r }) {
35
+ const a = W, G = R(
37
36
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
38
- ), K = N(
37
+ ), H = R(
39
38
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
40
- ), h = O(), l = O(), u = Se(), S = we(), o = he();
41
- i.ready && o.init(i.config);
42
- const c = G(), V = be(), m = P(() => c.hasChanges), { isTestPartner: j } = se(), b = () => {
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 = () => {
43
42
  var t;
44
43
  return (t = h.value) == null ? void 0 : t.handleSave(!0);
45
- }, E = (t) => {
44
+ }, b = (t) => {
46
45
  c.loadingStatus = t;
47
46
  };
48
- te(), re();
47
+ X(), Z();
49
48
  const p = () => {
50
49
  var t, e;
51
50
  return {
@@ -53,16 +52,14 @@ const Qe = /* @__PURE__ */ Y({
53
52
  userId: o.userId,
54
53
  username: o.username,
55
54
  partnerName: o.partnerName,
56
- savedModulesFolderName: ((t = o.editor) == null ? void 0 : t.savedModulesFolderName) || W.SAVED_MODULES,
57
- defaultModulesFolderName: ((e = o.editor) == null ? void 0 : e.defaultModulesFolderName) || W.DEFAULT_MODULES
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
58
57
  };
59
- }, { initPlugin: w, preloadRuntime: C } = ie(), { runExclusive: k, beginMount: D, isCurrentMount: T } = oe();
60
- let f = 0;
61
- const { getDefaultTemplate: F } = ge(), { cloneTimersOnSave: I, hasTimerBlocks: L } = ae(), J = P(() => {
58
+ }, { initPlugin: E, preloadRuntime: w } = te(), { getDefaultTemplate: C } = ue(), { cloneTimersOnSave: D, hasTimerBlocks: k } = oe(), q = U(() => {
62
59
  var t;
63
60
  return !((t = o.ui) != null && t.showHeader);
64
61
  });
65
- ne({
62
+ Y({
66
63
  onBack: () => {
67
64
  console.debug("guido:back"), r("back");
68
65
  },
@@ -77,80 +74,79 @@ const Qe = /* @__PURE__ */ Y({
77
74
  console.debug("guido:test-email:click"), r("test-email:click");
78
75
  }
79
76
  });
80
- const M = (t) => {
77
+ const T = (t) => {
81
78
  console.debug("dynamic-content:close", t), u.setSelectedDynamicContent(t), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: t }));
82
- }, R = () => {
79
+ }, F = () => {
83
80
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
84
81
  };
85
- x(() => m.value, () => {
82
+ _(() => m.value, () => {
86
83
  r("on-change", m.value);
87
84
  });
88
- const v = (t) => {
85
+ const f = (t) => {
89
86
  const e = t, { attribute: s, position: d } = e.detail;
90
87
  console.debug("dynamic-content:open", e.detail), r("dynamic-content:open", s, d);
91
88
  };
92
- let a = null;
89
+ let i = null;
93
90
  const y = () => {
94
91
  var e;
95
- const t = document.querySelector(ce);
92
+ const t = document.querySelector(ne);
96
93
  (e = l.value) == null || e.style.setProperty("--ribbon-offset", `${(t == null ? void 0 : t.offsetHeight) ?? 0}px`);
97
- }, g = async () => {
94
+ }, v = async () => {
98
95
  var t;
99
96
  try {
100
- o.initialized || o.init(i.config), c.templateId = o.templateId;
101
- const e = o.template, s = (e == null ? void 0 : e.html) || "", d = (e == null ? void 0 : e.css) || "", B = (e == null ? void 0 : e.preselectedDynamicContent) || [];
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) || [];
102
99
  S.selectedUnsubscribePages = (e == null ? void 0 : e.selectedUnsubscribePages) || [];
103
- const U = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, _ = o.isFeatureEnabled("linkTrackingIds");
100
+ const L = ((t = e == null ? void 0 : e.migration) == null ? void 0 : t.recommendationConfigs) ?? {}, M = o.isFeatureEnabled("linkTrackingIds");
104
101
  let n = {
105
- html: s && await A(s, U),
102
+ html: s && await N(s, L),
106
103
  css: d
107
104
  };
108
- n.html || (n = await F(), n.html = await A(n.html, U));
109
- const Q = _ ? H(n.html, (e == null ? void 0 : e.trackIdCounter) || 0) : 0;
110
- L(n.html) && (n.html = await I(n.html)), _ && (c.trackIdSessionFloor = Math.max(Q, H(n.html)));
111
- const X = {
112
- preselectedDynamicContentList: B,
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,
113
110
  onReady: () => {
114
111
  console.debug("guido:ready"), r("ready");
115
112
  }
116
113
  };
117
- f = D(), await w(n, p(), X), u.selectedDynamicContentList = B;
114
+ await E(n, p(), V), u.selectedDynamicContentList = I;
118
115
  } catch (e) {
119
116
  console.error("Failed to initialize Stripo editor:", e);
120
117
  }
121
118
  };
122
- return Z(async () => {
119
+ return J(async () => {
123
120
  var e;
124
- console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), de().$reset(), G().$reset(), Ee().$reset(), y();
121
+ console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), re().$reset(), P().$reset(), ve().$reset(), y();
125
122
  const t = (e = l.value) == null ? void 0 : e.parentElement;
126
- if (t && (a = new ResizeObserver(y), a.observe(t)), C(), i.ready)
127
- await g();
123
+ if (t && (i = new ResizeObserver(y), i.observe(t)), w(), a.ready)
124
+ await v();
128
125
  else {
129
- const s = x(() => i.ready, (d) => {
130
- d && (s(), g());
126
+ const s = _(() => a.ready, (d) => {
127
+ d && (s(), v());
131
128
  });
132
129
  }
133
- document.addEventListener("dynamic-content:open", v);
134
- }), ee(() => {
135
- a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", v), k(async () => {
136
- if (T(f))
137
- try {
138
- window.UIEditor.removeEditor();
139
- } catch {
140
- console.debug("Failed to remove Stripo editor: No editor found");
141
- }
142
- }), o.reset();
143
- }), z({
130
+ 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({
144
140
  dynamicContent: {
145
- insert: M,
146
- close: R
141
+ insert: T,
142
+ close: F
147
143
  },
148
144
  hasChanges: m,
149
- saveSilent: b,
150
- setLoading: E
151
- }), { __sfc: !0, PreviewContainer: q, OnboardingWrapper: K, headerWrapperRef: h, wrapperRef: l, dynamicContentStore: u, unsubscribeStore: S, props: i, configStore: o, editorStore: c, previewStore: V, hasChanges: m, isTestPartner: j, saveSilent: b, setLoading: E, emit: r, buildMetadata: p, initPlugin: w, preloadRuntime: C, runExclusive: k, beginMount: D, isCurrentMount: T, mountGeneration: f, getDefaultTemplate: F, cloneTimersOnSave: I, hasTimerBlocks: L, noHeader: J, insertDynamicContent: M, closeDynamicContent: R, handleDynamicContentOpen: v, ribbonObserver: a, updateRibbonOffset: y, startEditor: g, AutoSaveController: me, Toaster: le, FilterSelectionDrawer: ue, HeaderWrapper: pe, LoadingWrapper: fe, SaveAsTemplateDrawer: ve, UnsubscribeWrapper: ye };
145
+ saveSilent: g,
146
+ 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 };
152
148
  }
153
149
  });
154
150
  export {
155
- Qe as default
151
+ ze as default
156
152
  };
@@ -9,15 +9,15 @@ var u = function() {
9
9
  } } }), e(t.MigrationConfirmModal, { ref: "migrationModalRef", on: { confirm: function(r) {
10
10
  return t.executeSave(!1);
11
11
  } } })], 1);
12
- }, c = [], p = /* @__PURE__ */ d(
12
+ }, p = [], c = /* @__PURE__ */ d(
13
13
  l,
14
14
  u,
15
- c,
15
+ p,
16
16
  !1,
17
17
  null,
18
- "c61cc8ea"
18
+ "6e711fd7"
19
19
  );
20
- const v = p.exports;
20
+ const v = c.exports;
21
21
  export {
22
22
  v as default
23
23
  };
@@ -1,77 +1,66 @@
1
- import { defineComponent as q, ref as n, 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__ */ q({
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({
19
18
  __name: "EditorActions",
20
- setup(W, { expose: w }) {
21
- const { config: l, isFeatureEnabled: m } = k(), { exportHtml: c } = B(), { save: p } = R(), { openVersionHistory: u, closeVersionHistory: f } = P(), { getCompiledEmail: d } = b(), { compileHtml: v } = L(), { validateLiquidSyntax: y } = j(), { handleError: r } = z(), e = G(), g = J(), { hasMigrations: S } = Q(g), s = I(), i = n(!1), a = n(!1), H = n(), h = D(), _ = () => {
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 = () => {
22
21
  if (e.isVersionHistoryOpen) {
23
- f();
22
+ p();
24
23
  return;
25
24
  }
26
- u();
27
- }, C = async () => {
28
- i.value = !0, await c(), i.value = !1;
29
- }, A = () => {
25
+ c();
26
+ }, w = async () => {
27
+ i.value = !0, await m(), i.value = !1;
28
+ }, _ = () => {
30
29
  e.isSaveAsTemplateDrawerOpen = !0;
31
- }, M = x(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), O = x(
30
+ }, C = h(() => e.isVersionHistoryOpen ? s("newsletter.close-version-history") : s("newsletter.version-history")), A = h(
32
31
  () => {
33
32
  var t, o;
34
- return ((o = (t = l.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
33
+ return ((o = (t = a.value) == null ? void 0 : t.features) == null ? void 0 : o.versionHistory) && !e.isPreviewModeOpen;
35
34
  }
36
35
  ), V = async (t) => {
37
- a.value = !0, t || (e.loadingStatus = !0);
38
- let o;
39
- try {
40
- o = await p(t);
41
- } catch (T) {
42
- r(T, "Failed to save template");
43
- } finally {
44
- a.value = !1, !t && !o && (e.loadingStatus = !1);
45
- }
46
- return o;
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;
47
39
  }, E = (t) => {
48
40
  var o;
49
- if (!t && S.value) {
50
- (o = H.value) == null || o.open();
41
+ if (!t && g.value) {
42
+ (o = S.value) == null || o.open();
51
43
  return;
52
44
  }
53
45
  return V(t);
54
- }, F = async () => {
55
- if (m("liquidSyntax")) {
46
+ }, M = async () => {
47
+ if (l("liquidSyntax")) {
56
48
  e.loadingStatus = !0;
57
49
  try {
58
- const { html: t } = await d({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = v(t);
59
- if (!await y(o))
50
+ const { html: t } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: o } = d(t);
51
+ if (!await v(o))
60
52
  return;
61
- } catch (t) {
62
- r(t, "Failed to prepare test email");
63
- return;
64
53
  } finally {
65
54
  e.loadingStatus = !1;
66
55
  }
67
56
  }
68
- h();
57
+ H();
69
58
  };
70
- return w({
59
+ return x({
71
60
  handleSave: E
72
- }), { __sfc: !0, config: l, isFeatureEnabled: m, exportHtml: c, save: p, openVersionHistory: u, closeVersionHistory: f, getCompiledEmail: d, compileHtml: v, validateLiquidSyntax: y, handleError: r, editorStore: e, templateStore: g, hasMigrations: S, trans: s, isExporting: i, isSaving: a, migrationModalRef: H, testEmailClick: h, handleVersionHistory: _, handleExport: C, handleSaveAs: A, versionHistoryTooltipText: M, isVersionHistoryButtonVisible: O, executeSave: V, handleSave: E, handleTestEmail: F, getTooltipOptions: K, InButtonV2: N, MigrationConfirmModal: U };
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 };
73
62
  }
74
63
  });
75
64
  export {
76
- ft as default
65
+ ut as default
77
66
  };
@@ -1,68 +1,52 @@
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
- );
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
+ });
49
37
  return {
50
38
  getCompiledEmail: l,
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
- ),
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
+ }),
66
50
  activateCustomViewStyles: (t = !0) => {
67
51
  window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
68
52
  },
@@ -81,7 +65,7 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
81
65
  displayConditions: a
82
66
  };
83
67
  } catch (e) {
84
- return n(e, "Error loading preview"), {
68
+ return r(e, "Error loading preview"), {
85
69
  html: "",
86
70
  ampHtml: "",
87
71
  ampErrors: [],
@@ -97,33 +81,34 @@ const D = 1e4, d = 3e4, s = (n, l, u) => new Promise((T, m) => {
97
81
  }
98
82
  try {
99
83
  window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((i, o) => {
100
- i ? (n(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
84
+ i ? (r(i, "Failed to update timer in cloned template"), t(null)) : t(o || null);
101
85
  });
102
86
  } catch (i) {
103
- n(i, "Failed to call updateTimerInClonedTemplate"), t(null);
87
+ r(i, "Failed to call updateTimerInClonedTemplate"), t(null);
104
88
  }
105
89
  }),
106
90
  updateHtmlAndCss: (t, e) => {
107
91
  const { actionsApi: a } = window.StripoEditorApi;
108
- return s("updateHtmlAndCss", D, (i) => {
109
- a.updateHtmlAndCss(t, e, () => i());
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
+ });
110
99
  });
111
100
  },
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
- )
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
+ })
125
110
  };
126
111
  };
127
112
  export {
128
- I as useActionsApi
113
+ D as useActionsApi
129
114
  };
@@ -1,22 +1,21 @@
1
- import { useConfig as E } from "./useConfig.js";
2
- import { useEditorLock as p } from "./useEditorLock.js";
1
+ import { useConfig as m } from "./useConfig.js";
3
2
  import { useAutosaveStore as A, AUTOSAVE_STATUS as s } from "../stores/autosave.js";
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();
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();
8
7
  let i = null, c = 0;
9
- const u = y(
8
+ const u = f(
10
9
  () => S("autosave") && t.isOn
11
- ), m = () => o.hasChanges && o.isInSaveableState, h = () => ({
12
- hasChanges: o.hasChanges,
13
- isInSaveableState: o.isInSaveableState
14
- }), r = async (e) => {
10
+ ), g = () => a.hasChanges && a.isInSaveableState, h = () => ({
11
+ hasChanges: a.hasChanges,
12
+ isInSaveableState: a.isInSaveableState
13
+ }), l = async (e) => {
15
14
  if (!u.value) {
16
15
  console.debug("guido:autosave:skipped", { trigger: e, reason: "not-active" });
17
16
  return;
18
17
  }
19
- if (!m()) {
18
+ if (!g()) {
20
19
  console.debug("guido:autosave:skipped", { trigger: e, reason: "gates-blocked", gates: h() });
21
20
  return;
22
21
  }
@@ -24,19 +23,15 @@ const w = 18e4, v = 6e4, R = (b) => {
24
23
  console.debug("guido:autosave:skipped", { trigger: e, reason: "already-saving" });
25
24
  return;
26
25
  }
27
- if (g()) {
28
- console.debug("guido:autosave:skipped", { trigger: e, reason: "editor-busy" });
29
- return;
30
- }
31
26
  console.debug("guido:autosave:save-start", { trigger: e }), t.status = s.SAVING;
32
27
  try {
33
28
  if (await b() === void 0) {
34
29
  console.debug("guido:autosave:blocked", { trigger: e, reason: "save-returned-undefined" }), t.status = s.ERROR;
35
30
  return;
36
31
  }
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;
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;
40
35
  }
41
36
  }, n = () => {
42
37
  const { visibilityState: e } = document;
@@ -45,32 +40,32 @@ const w = 18e4, v = 6e4, R = (b) => {
45
40
  isActive: u.value
46
41
  }), e !== "hidden")
47
42
  return;
48
- const a = Date.now() - c;
49
- if (a < v) {
43
+ const o = Date.now() - c;
44
+ if (o < r) {
50
45
  console.debug("guido:autosave:visibility-debounced", {
51
- sinceLastMs: a,
52
- debounceMs: v
46
+ sinceLastMs: o,
47
+ debounceMs: r
53
48
  });
54
49
  return;
55
50
  }
56
- c = Date.now(), r("visibility");
51
+ c = Date.now(), l("visibility");
57
52
  }, d = () => {
58
53
  i && (clearInterval(i), i = null);
59
- }, l = () => {
54
+ }, v = () => {
60
55
  document.removeEventListener("visibilitychange", n), window.removeEventListener("pagehide", n);
61
56
  };
62
- I(
57
+ p(
63
58
  u,
64
59
  (e) => {
65
60
  console.debug("guido:autosave:active-changed", { active: e }), e ? (d(), i = setInterval(() => {
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);
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);
68
63
  },
69
64
  { immediate: !0 }
70
- ), L(() => {
71
- d(), l(), t.status = s.IDLE, t.lastSavedAt = null;
65
+ ), y(() => {
66
+ d(), v(), t.status = s.IDLE, t.lastSavedAt = null;
72
67
  });
73
68
  };
74
69
  export {
75
- R as useAutoSave
70
+ T as useAutoSave
76
71
  };
@@ -1,54 +1,48 @@
1
- import { useActionsApi as b } from "./useActionsApi.js";
2
- import { useEditorLock as v } from "./useEditorLock.js";
3
- import { useConfigStore as T } from "../stores/config.js";
4
- import { useEditorStore as w } from "../stores/editor.js";
5
- import { useGuidoEmailEditorStore as y } from "../stores/guido-email-editor.js";
6
- import { watch as a, onUnmounted as B } from "vue";
7
- const C = 500, L = () => {
8
- const i = w(), u = y(), l = T(), { getTemplateData: d } = b(), { runExclusive: m, isEditorBusy: p } = v();
9
- let o = null, s = !1;
10
- const n = () => {
11
- o && (clearTimeout(o), o = null);
12
- }, c = (t) => {
13
- n(), o = setTimeout(() => {
14
- o = null, t();
15
- }, C);
16
- }, e = async () => {
17
- var t, r;
18
- if (!(s || !i.isStripoInitialized)) {
19
- if (p()) {
20
- c(() => void e());
21
- return;
22
- }
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))
23
14
  try {
24
- const { html: E, css: g } = await m(d), I = ((r = (t = l.config) == null ? void 0 : t.identity) == null ? void 0 : r.templateId) ?? "";
25
- if (s)
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)
26
17
  return;
27
- u.$patch({
28
- html: E ?? "",
29
- css: g ?? "",
30
- templateId: I,
18
+ a.$patch({
19
+ html: f ?? "",
20
+ css: h ?? "",
21
+ templateId: S,
31
22
  lastUpdatedAt: Date.now()
32
23
  });
33
24
  } catch {
34
25
  }
35
- }
36
- }, f = () => c(() => void e()), h = a(
26
+ }, u = () => {
27
+ r(), e = setTimeout(() => {
28
+ e = null, s();
29
+ }, w);
30
+ }, d = c(
37
31
  () => i.isStripoInitialized,
38
32
  (t) => {
39
- t && e();
33
+ t && s();
40
34
  },
41
35
  { immediate: !0 }
42
- ), S = a(
36
+ ), p = c(
43
37
  () => i.hasChanges,
44
- (t, r) => {
45
- i.isStripoInitialized && (t ? f() : r && (n(), e()));
38
+ (t, o) => {
39
+ i.isStripoInitialized && (t ? u() : o && (r(), s()));
46
40
  }
47
41
  );
48
- B(() => {
49
- s = !0, n(), h(), S();
42
+ T(() => {
43
+ n = !0, r(), d(), p();
50
44
  });
51
45
  };
52
46
  export {
53
- L as useGuidoStateBridge
47
+ z as useGuidoStateBridge
54
48
  };
@@ -1,54 +1,51 @@
1
1
  import { useActionsApi as T } from "./useActionsApi.js";
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))
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))
21
21
  return;
22
- if (r("liquidSyntax")) {
22
+ if (a("liquidSyntax")) {
23
23
  if (!await d(t.compiledHtml))
24
24
  return;
25
- } else if (!await m(t.compiledHtml, t.dynamicContentList, !0))
25
+ } else if (!await c(t.compiledHtml, t.dynamicContentList, !0))
26
26
  return;
27
- if ((n = s.value) != null && n.externalValidation && !await s.value.externalValidation(t))
27
+ if ((r = e.value) != null && r.externalValidation && !await e.value.externalValidation(t))
28
28
  return;
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
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
38
38
  });
39
39
  }
40
40
  return;
41
41
  }
42
42
  }
43
- if (!await b())
43
+ if (!await S())
44
44
  return;
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
- () => E(a, e)
50
- ) };
45
+ const { unsubscribePayload: g, stripoModules: x } = f(t.rawHtml);
46
+ return await v(g), t.modules = x, y || l({ ...t, silent: s }), t;
47
+ } };
51
48
  };
52
49
  export {
53
- et as useSave
50
+ $ as useSave
54
51
  };
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-c61cc8ea]{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-1f2703e5]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-1f2703e5]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-1f2703e5]{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-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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.17.0-beta.f7536b7",
3
+ "version": "3.17.1-beta.1291eaa",
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",
@@ -25,7 +25,7 @@
25
25
  "start": "vite",
26
26
  "build": "vite build && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.app.json",
27
27
  "preview": "vite preview",
28
- "lint": "NODE_OPTIONS=--max-old-space-size=2048 eslint ./ && bun run type-check",
28
+ "lint": "NODE_OPTIONS=--max-old-space-size=2048 eslint ./ && npm run type-check",
29
29
  "lint:fix": "NODE_OPTIONS=--max-old-space-size=2048 eslint --fix ./",
30
30
  "lint:e2e-quality": "node scripts/lint-e2e-quality.mjs",
31
31
  "lint:e2e-quality:ci": "node scripts/lint-e2e-quality.mjs --ci",
@@ -1,20 +0,0 @@
1
- let o = Promise.resolve(), n = 0, e = 0;
2
- const s = () => n > 0, c = () => (e += 1, e), u = (t) => t > 0 && t === e, i = (t) => {
3
- const r = o.then(async () => {
4
- n += 1;
5
- try {
6
- return await t();
7
- } finally {
8
- n -= 1;
9
- }
10
- });
11
- return o = r.catch(() => {
12
- }), r;
13
- }, a = () => ({ runExclusive: i, isEditorBusy: s, beginMount: c, isCurrentMount: u });
14
- export {
15
- c as beginMount,
16
- u as isCurrentMount,
17
- s as isEditorBusy,
18
- i as runExclusive,
19
- a as useEditorLock
20
- };
@@ -1,10 +0,0 @@
1
- export declare const isEditorBusy: () => boolean;
2
- export declare const beginMount: () => number;
3
- export declare const isCurrentMount: (generation: number) => boolean;
4
- export declare const runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
5
- export declare const useEditorLock: () => {
6
- runExclusive: <T>(task: () => Promise<T>) => Promise<T>;
7
- isEditorBusy: () => boolean;
8
- beginMount: () => number;
9
- isCurrentMount: (generation: number) => boolean;
10
- };