@useinsider/guido 3.2.0-beta.803b92e → 3.2.0-beta.8a7fef9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +1 -25
  2. package/dist/@types/config/schemas.js +36 -38
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +34 -35
  5. package/dist/components/organisms/header/RightSlot.vue.js +8 -8
  6. package/dist/components/organisms/header/RightSlot.vue2.js +8 -9
  7. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
  8. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
  9. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
  10. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
  11. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
  12. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
  13. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
  14. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
  15. package/dist/composables/useRibbonOffset.js +21 -0
  16. package/dist/composables/useSave.js +17 -14
  17. package/dist/composables/validators/useCouponBlockValidator.js +24 -0
  18. package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
  19. package/dist/enums/onboarding.js +7 -2
  20. package/dist/enums/unsubscribe.js +34 -27
  21. package/dist/guido.css +1 -1
  22. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +258 -235
  23. package/dist/package.json.js +1 -1
  24. package/dist/src/@types/config/schemas.d.ts +0 -4
  25. package/dist/src/components/Guido.vue.d.ts +1 -1
  26. package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
  27. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
  28. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
  29. package/dist/src/composables/useConfig.d.ts +0 -2
  30. package/dist/src/composables/useRibbonOffset.d.ts +4 -0
  31. package/dist/src/composables/useSave.d.ts +1 -1
  32. package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
  33. package/dist/src/enums/onboarding.d.ts +6 -0
  34. package/dist/src/enums/unsubscribe.d.ts +5 -0
  35. package/dist/src/stores/config.d.ts +0 -18
  36. package/dist/src/stores/onboarding.d.ts +4 -0
  37. package/dist/stores/onboarding.js +4 -0
  38. package/package.json +3 -3
  39. package/dist/components/organisms/AutoSaveController.vue.js +0 -17
  40. package/dist/components/organisms/AutoSaveController.vue2.js +0 -13
  41. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  42. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  43. package/dist/composables/useAutoSave.js +0 -68
  44. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +0 -2
  45. package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +0 -2
  46. package/dist/src/composables/useAutoSave.d.ts +0 -3
  47. package/dist/src/stores/autosave.d.ts +0 -6
  48. package/dist/src/utils/timeUtil.d.ts +0 -8
  49. package/dist/stores/autosave.js +0 -11
  50. package/dist/utils/timeUtil.js +0 -19
package/README.md CHANGED
@@ -143,8 +143,7 @@ const config: GuidoConfigInput = {
143
143
  displayConditions?: boolean, // Default: true
144
144
  unsubscribe?: boolean, // Default: true
145
145
  modulesDisabled?: boolean, // Default: false - Disable modules panel
146
- liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
147
- autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
146
+ liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
148
147
  },
149
148
 
150
149
  // Optional: Callbacks
@@ -203,7 +202,6 @@ interface SavedTemplateDetails {
203
202
  config: number[];
204
203
  };
205
204
  metadata: Metadata;
206
- silent: boolean; // true when triggered by autosave, false when user clicked Save
207
205
  }
208
206
 
209
207
  interface Metadata {
@@ -329,28 +327,6 @@ const config: GuidoConfigInput = {
329
327
 
330
328
  ---
331
329
 
332
- ## Autosave
333
-
334
- Guido ships an opt-in **autosave** that saves on a 3-minute interval and when the user leaves the tab. Enable it with the `features.autosave` feature flag — this **shows an "Auto Save" toggle in the editor header**; the end user switches autosave on per session.
335
-
336
- ```typescript
337
- const config: GuidoConfigInput = {
338
- identity: { templateId: 'tpl-123', userId: 'user-456' },
339
- partner: { name: 'partner' },
340
- features: {
341
- autosave: true, // Default: false — shows the Auto Save toggle in the header
342
- },
343
- };
344
- ```
345
-
346
- - Default is `false` — integrations see no change unless they opt in.
347
- - Autosave reuses the same save pipeline as the Save button, so your existing `@save:complete` handler receives autosave output identically to a manual save. No new events or callbacks.
348
- - Toggle state is **session-only** (Pinia) — resets to OFF on reload.
349
-
350
- For a deep dive on triggers, guards, and limitations, see **[wiki/AUTOSAVE.md](wiki/AUTOSAVE.md)**.
351
-
352
- ---
353
-
354
330
  ## HTML Compiler Rules
355
331
 
356
332
  Add custom rules to transform HTML during export:
@@ -1,5 +1,5 @@
1
1
  import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
2
- import { object as a, number as p, optional as e, string as t, pipe as u, picklist as n, minLength as d, custom as S, boolean as o, array as c, literal as l, variant as k } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, minLength as d, custom as S, boolean as a, array as c, literal as l, variant as k } from "../../node_modules/valibot/dist/index.js";
3
3
  const m = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -12,7 +12,7 @@ const m = {
12
12
  ARCHITECT: 49,
13
13
  /** Unsubscribe page builder */
14
14
  UNSUBSCRIBE_PAGES: 97
15
- }, h = a({
15
+ }, h = o({
16
16
  /** Unique identifier for the template being edited */
17
17
  templateId: u(
18
18
  t(),
@@ -25,12 +25,12 @@ const m = {
25
25
  ),
26
26
  /** Optional variation ID for A/B testing */
27
27
  variationId: e(t())
28
- }), f = a({
28
+ }), y = o({
29
29
  /** Fallback font name (e.g., "Georgia") */
30
30
  name: t(),
31
31
  /** Fallback font family (e.g., "serif" or "sans-serif") */
32
32
  family: t()
33
- }), y = a({
33
+ }), f = o({
34
34
  /** Partner/organization name (required) */
35
35
  name: u(
36
36
  t(),
@@ -53,8 +53,8 @@ const m = {
53
53
  /** Display name for the current user */
54
54
  username: e(t(), "Guido User"),
55
55
  /** Fallback font settings from partner settings — used to match backend size calculation */
56
- fallbackFont: e(f)
57
- }), A = a({
56
+ fallbackFont: e(y)
57
+ }), A = o({
58
58
  /** Display text for the dynamic content */
59
59
  text: t(),
60
60
  /** Template variable value (e.g., {{username}}) */
@@ -63,12 +63,12 @@ const m = {
63
63
  fallback: e(t()),
64
64
  /** Optional formatting options */
65
65
  format: e(
66
- a({
66
+ o({
67
67
  key: t(),
68
68
  value: t()
69
69
  })
70
70
  )
71
- }), R = a({
71
+ }), R = o({
72
72
  /** Initial HTML content */
73
73
  html: e(t(), ""),
74
74
  /** Initial CSS content */
@@ -83,13 +83,13 @@ const m = {
83
83
  /** Selected unsubscribe page IDs */
84
84
  selectedUnsubscribePages: e(c(p()), []),
85
85
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
86
- forceRecreate: e(o(), !1)
87
- }), C = a({
86
+ forceRecreate: e(a(), !1)
87
+ }), C = o({
88
88
  /** Sender display name */
89
89
  senderName: e(t(), ""),
90
90
  /** Email subject line */
91
91
  subject: e(t(), "")
92
- }), T = a({
92
+ }), T = o({
93
93
  /** Locale for the editor UI */
94
94
  locale: e(t(), "en"),
95
95
  /** Path to translations object */
@@ -102,30 +102,28 @@ const m = {
102
102
  savedModulesFolderName: e(t(), b.SAVED_MODULES),
103
103
  /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
104
104
  defaultModulesFolderName: e(t(), b.DEFAULT_MODULES)
105
- }), I = a({
105
+ }), I = o({
106
106
  /** Whether to show the header bar */
107
- showHeader: e(o(), !0),
107
+ showHeader: e(a(), !0),
108
108
  /** Custom label for back button (if shown) */
109
109
  backButtonLabel: e(t())
110
- }), E = a({
110
+ }), E = o({
111
111
  /** Enable dynamic content insertion */
112
- dynamicContent: e(o(), !0),
112
+ dynamicContent: e(a(), !0),
113
113
  /** Enable save as template functionality */
114
- saveAsTemplate: e(o(), !0),
114
+ saveAsTemplate: e(a(), !0),
115
115
  /** Enable version history */
116
- versionHistory: e(o(), !0),
116
+ versionHistory: e(a(), !0),
117
117
  /** Enable test message sending */
118
- testMessage: e(o(), !0),
118
+ testMessage: e(a(), !0),
119
119
  /** Enable display conditions */
120
- displayConditions: e(o(), !0),
120
+ displayConditions: e(a(), !0),
121
121
  /** Enable unsubscribe block */
122
- unsubscribe: e(o(), !0),
122
+ unsubscribe: e(a(), !0),
123
123
  /** Disable modules panel in the editor */
124
- modulesDisabled: e(o(), !1),
124
+ modulesDisabled: e(a(), !1),
125
125
  /** Enable Liquid template syntax */
126
- liquidSyntax: e(o(), !1),
127
- /** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
128
- autosave: e(o(), !1)
126
+ liquidSyntax: e(a(), !1)
129
127
  }), g = n([
130
128
  "amp-accordion",
131
129
  "amp-carousel",
@@ -148,7 +146,7 @@ const m = {
148
146
  "unsubscribe-block",
149
147
  "coupon-block",
150
148
  "items-block"
151
- ]), L = a({
149
+ ]), L = o({
152
150
  /** Default blocks to exclude from the editor */
153
151
  excludeDefaults: e(
154
152
  c(g),
@@ -159,14 +157,14 @@ const m = {
159
157
  c(O),
160
158
  []
161
159
  )
162
- }), r = a({
160
+ }), r = o({
163
161
  /** Unique identifier for the rule */
164
162
  id: t(),
165
163
  /** Human-readable description */
166
164
  description: e(t()),
167
165
  /** Priority for rule ordering (lower = earlier) */
168
166
  priority: p()
169
- }), M = a({
167
+ }), M = o({
170
168
  ...r.entries,
171
169
  type: l("replace"),
172
170
  /** String to search for */
@@ -174,8 +172,8 @@ const m = {
174
172
  /** Replacement string */
175
173
  replacement: t(),
176
174
  /** Replace all occurrences (default: false) */
177
- replaceAll: e(o())
178
- }), N = a({
175
+ replaceAll: e(a())
176
+ }), N = o({
179
177
  ...r.entries,
180
178
  type: l("regex"),
181
179
  /** Regex pattern string */
@@ -184,12 +182,12 @@ const m = {
184
182
  replacement: t(),
185
183
  /** Regex flags (e.g., 'gi') */
186
184
  flags: e(t())
187
- }), D = a({
185
+ }), D = o({
188
186
  ...r.entries,
189
187
  type: l("remove"),
190
188
  /** Strings or patterns to remove */
191
189
  targets: c(t())
192
- }), v = a({
190
+ }), v = o({
193
191
  ...r.entries,
194
192
  type: l("custom"),
195
193
  /** Custom processor function */
@@ -202,12 +200,12 @@ const m = {
202
200
  N,
203
201
  D,
204
202
  v
205
- ]), U = a({
203
+ ]), U = o({
206
204
  /** Custom compiler rules to apply */
207
205
  customRules: e(c(x), []),
208
206
  /** Skip default compiler rules */
209
- ignoreDefaultRules: e(o(), !1)
210
- }), B = a({
207
+ ignoreDefaultRules: e(a(), !1)
208
+ }), B = o({
211
209
  /**
212
210
  * External validation handler called before save completes.
213
211
  * Return false to cancel the save operation.
@@ -218,12 +216,12 @@ const m = {
218
216
  "externalValidation must be a function"
219
217
  )
220
218
  )
221
- }), H = a({
219
+ }), H = o({
222
220
  // Required sections
223
221
  /** Identity configuration (required) */
224
222
  identity: h,
225
223
  /** Partner configuration (required) */
226
- partner: y,
224
+ partner: f,
227
225
  // Optional sections (with defaults)
228
226
  /** Template content and presets */
229
227
  template: e(R, {}),
@@ -251,12 +249,12 @@ export {
251
249
  A as DynamicContentSchema,
252
250
  T as EditorSchema,
253
251
  C as EmailHeaderSchema,
254
- f as FallbackFontSchema,
252
+ y as FallbackFontSchema,
255
253
  E as FeaturesSchema,
256
254
  H as GuidoConfigSchema,
257
255
  h as IdentitySchema,
258
256
  m as MessageType,
259
- y as PartnerSchema,
257
+ f as PartnerSchema,
260
258
  s as ProductType,
261
259
  N as RegexRuleSchema,
262
260
  D as RemoveRuleSchema,
@@ -3,7 +3,7 @@ import i from "./Guido.vue2.js";
3
3
  import a from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var t = function() {
5
5
  var o = this, r = o._self._c, e = o._self._setupProxy;
6
- return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), r(e.AutoSaveController), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
6
+ return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
7
7
  return e.emit("onboarding:finished");
8
8
  } } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
9
9
  }, n = [], s = /* @__PURE__ */ a(
@@ -12,9 +12,9 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "fffc13d6"
15
+ "25780af6"
16
16
  );
17
- const l = s.exports;
17
+ const u = s.exports;
18
18
  export {
19
- l as default
19
+ u as default
20
20
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, defineAsyncComponent as N, ref as R, computed as I, watch as J, onMounted as Q, onUnmounted as X } from "vue";
1
+ import { defineComponent as j, defineAsyncComponent as R, ref as A, computed as I, watch as J, onMounted as Q, onUnmounted as X } from "vue";
2
2
  import { provideGuidoActions as Y } from "../composables/useGuidoActions.js";
3
3
  import { usePartner as Z } from "../composables/usePartner.js";
4
4
  import { useStripo as ee } from "../composables/useStripo.js";
@@ -6,43 +6,42 @@ import { useTimerClone as te } from "../composables/useTimerClone.js";
6
6
  import { migrate as W } from "../config/migrator/index.js";
7
7
  import { ModuleFolderDefaults as B } from "../enums/defaults.js";
8
8
  import { RIBBON_SELECTOR as oe } from "../enums/onboarding.js";
9
- import ne from "./organisms/AutoSaveController.vue.js";
10
- import re from "./organisms/base/Toaster.vue.js";
9
+ import ne from "./organisms/base/Toaster.vue.js";
11
10
  import se from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
12
- import ce from "./organisms/header/HeaderWrapper.vue.js";
13
- import ae from "./organisms/LoadingWrapper.vue.js";
14
- import ie from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
15
- import me from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
16
- import { useStripoApi as de } from "../services/stripoApi.js";
17
- import { useConfigStore as le } from "../stores/config.js";
18
- import { useDynamicContentStore as ue } from "../stores/dynamic-content.js";
19
- import { useEditorStore as pe } from "../stores/editor.js";
20
- import { usePreviewStore as fe } from "../stores/preview.js";
21
- import { useUnsubscribeStore as ve } from "../stores/unsubscribe.js";
22
- const Ie = /* @__PURE__ */ j({
11
+ import re from "./organisms/header/HeaderWrapper.vue.js";
12
+ import ce from "./organisms/LoadingWrapper.vue.js";
13
+ import ae from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
14
+ import ie from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
15
+ import { useStripoApi as me } from "../services/stripoApi.js";
16
+ import { useConfigStore as de } from "../stores/config.js";
17
+ import { useDynamicContentStore as le } from "../stores/dynamic-content.js";
18
+ import { useEditorStore as ue } from "../stores/editor.js";
19
+ import { usePreviewStore as pe } from "../stores/preview.js";
20
+ import { useUnsubscribeStore as fe } from "../stores/unsubscribe.js";
21
+ const Re = /* @__PURE__ */ j({
23
22
  __name: "Guido",
24
23
  props: {
25
24
  config: null
26
25
  },
27
26
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
28
- setup(H, { expose: x, emit: r }) {
29
- const S = H, G = N(
27
+ setup(H, { expose: x, emit: s }) {
28
+ const b = H, G = R(
30
29
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
31
- ), z = N(
30
+ ), z = R(
32
31
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
33
- ), b = R(), d = R(), l = ue(), g = ve(), a = le();
34
- a.init(S.config);
35
- const u = pe(), q = fe(), i = I(() => u.hasChanges), { isTestPartner: K } = Z(), w = () => {
32
+ ), S = A(), d = A(), l = le(), g = fe(), a = de();
33
+ a.init(b.config);
34
+ const u = ue(), q = pe(), i = I(() => u.hasChanges), { isTestPartner: K } = Z(), w = () => {
36
35
  var e;
37
- return (e = b.value) == null ? void 0 : e.handleSave(!0);
36
+ return (e = S.value) == null ? void 0 : e.handleSave(!0);
38
37
  }, {
39
38
  templateId: p,
40
39
  userId: E,
41
40
  partnerName: D,
42
41
  username: C,
43
42
  template: t,
44
- editor: s
45
- } = a, m = (t == null ? void 0 : t.html) || "", T = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], k = (s == null ? void 0 : s.savedModulesFolderName) || B.SAVED_MODULES, F = (s == null ? void 0 : s.defaultModulesFolderName) || B.DEFAULT_MODULES;
43
+ editor: r
44
+ } = a, m = (t == null ? void 0 : t.html) || "", T = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], k = (r == null ? void 0 : r.savedModulesFolderName) || B.SAVED_MODULES, F = (r == null ? void 0 : r.defaultModulesFolderName) || B.DEFAULT_MODULES;
46
45
  u.templateId = p;
47
46
  const v = {
48
47
  emailId: p,
@@ -54,38 +53,38 @@ const Ie = /* @__PURE__ */ j({
54
53
  }, L = {
55
54
  preselectedDynamicContentList: f,
56
55
  onReady: () => {
57
- console.debug("guido:ready"), r("ready");
56
+ console.debug("guido:ready"), s("ready");
58
57
  }
59
- }, { initPlugin: U } = ee(v, L), { getDefaultTemplate: _ } = de(), { cloneTimersOnSave: M, hasTimerBlocks: O } = te(), V = I(() => {
58
+ }, { initPlugin: U } = ee(v, L), { getDefaultTemplate: _ } = me(), { cloneTimersOnSave: M, hasTimerBlocks: O } = te(), V = I(() => {
60
59
  var e;
61
60
  return !((e = a.ui) != null && e.showHeader);
62
61
  });
63
62
  Y({
64
63
  onBack: () => {
65
- console.debug("guido:back"), r("back");
64
+ console.debug("guido:back"), s("back");
66
65
  },
67
66
  onSaveStart: () => {
68
- console.debug("guido:save:start"), r("save:start");
67
+ console.debug("guido:save:start"), s("save:start");
69
68
  },
70
69
  onSaveComplete: (e) => {
71
70
  const n = { ...e, metadata: v };
72
- console.debug("guido:save:complete", n), r("save:complete", n);
71
+ console.debug("guido:save:complete", n), s("save:complete", n);
73
72
  },
74
73
  onTestEmailClick: () => {
75
- console.debug("guido:test-email:click"), r("test-email:click");
74
+ console.debug("guido:test-email:click"), s("test-email:click");
76
75
  }
77
76
  });
78
77
  const P = (e) => {
79
78
  console.debug("dynamic-content:close", e), l.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
80
- }, A = () => {
79
+ }, N = () => {
81
80
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
82
81
  };
83
82
  J(() => i.value, () => {
84
- r("on-change", i.value);
83
+ s("on-change", i.value);
85
84
  });
86
85
  const y = (e) => {
87
86
  const n = e, { attribute: o, position: $ } = n.detail;
88
- console.debug("dynamic-content:open", n.detail), r("dynamic-content:open", o, $);
87
+ console.debug("dynamic-content:open", n.detail), s("dynamic-content:open", o, $);
89
88
  };
90
89
  let c = null;
91
90
  const h = () => {
@@ -120,13 +119,13 @@ const Ie = /* @__PURE__ */ j({
120
119
  }), x({
121
120
  dynamicContent: {
122
121
  insert: P,
123
- close: A
122
+ close: N
124
123
  },
125
124
  hasChanges: i,
126
125
  saveSilent: w
127
- }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: z, headerWrapperRef: b, wrapperRef: d, dynamicContentStore: l, unsubscribeStore: g, props: S, configStore: a, editorStore: u, previewStore: q, hasChanges: i, isTestPartner: K, saveSilent: w, templateId: p, userId: E, partnerName: D, username: C, templateConfig: t, editorConfig: s, html: m, css: T, preselectedDynamicContentList: f, savedModulesFolderName: k, defaultModulesFolderName: F, emit: r, metadata: v, options: L, initPlugin: U, getDefaultTemplate: _, cloneTimersOnSave: M, hasTimerBlocks: O, noHeader: V, insertDynamicContent: P, closeDynamicContent: A, handleDynamicContentOpen: y, ribbonObserver: c, updateRibbonOffset: h, AutoSaveController: ne, Toaster: re, FilterSelectionDrawer: se, HeaderWrapper: ce, LoadingWrapper: ae, SaveAsTemplateDrawer: ie, UnsubscribeWrapper: me };
126
+ }), { __sfc: !0, PreviewContainer: G, OnboardingWrapper: z, headerWrapperRef: S, wrapperRef: d, dynamicContentStore: l, unsubscribeStore: g, props: b, configStore: a, editorStore: u, previewStore: q, hasChanges: i, isTestPartner: K, saveSilent: w, templateId: p, userId: E, partnerName: D, username: C, templateConfig: t, editorConfig: r, html: m, css: T, preselectedDynamicContentList: f, savedModulesFolderName: k, defaultModulesFolderName: F, emit: s, metadata: v, options: L, initPlugin: U, getDefaultTemplate: _, cloneTimersOnSave: M, hasTimerBlocks: O, noHeader: V, insertDynamicContent: P, closeDynamicContent: N, handleDynamicContentOpen: y, ribbonObserver: c, updateRibbonOffset: h, Toaster: ne, FilterSelectionDrawer: se, HeaderWrapper: re, LoadingWrapper: ce, SaveAsTemplateDrawer: ae, UnsubscribeWrapper: ie };
128
127
  }
129
128
  });
130
129
  export {
131
- Ie as default
130
+ Re as default
132
131
  };
@@ -1,11 +1,11 @@
1
- import s from "./RightSlot.vue2.js";
2
- import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var r = function() {
4
- var i = this, e = i._self._c, t = i._self._setupProxy;
5
- return e("div", { staticClass: "d-f a-i-c" }, [t.editorStore.isVersionHistoryOpen ? i._e() : e(t.AutoSaveToggle), t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-1", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : i._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
- }, a = [], n = /* @__PURE__ */ o(
7
- s,
8
- r,
1
+ import i from "./RightSlot.vue2.js";
2
+ import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var o = function() {
4
+ var s = this, e = s._self._c, t = s._self._setupProxy;
5
+ return e("div", { staticClass: "d-f a-i-c" }, [t.isLiquidEnabled && !t.editorStore.isVersionHistoryOpen ? e(t.InChips, { staticClass: "mr-3", attrs: { id: "guido__liquid-tag-chip", styles: "stroke", type: "default", value: "liquid-tags", "close-button": !1, "disabled-status": t.editorStore.loadingStatus, interactive: !1, text: t.trans("email-editor.liquid-tags-enabled") } }) : s._e(), t.editorStore.isVersionHistoryOpen ? e(t.RestoreButton) : e(t.EditorActions, { ref: "editorActionsRef" })], 1);
6
+ }, a = [], n = /* @__PURE__ */ r(
7
+ i,
8
+ o,
9
9
  a,
10
10
  !1,
11
11
  null,
@@ -1,23 +1,22 @@
1
1
  import { defineComponent as a, ref as f, computed as p } from "vue";
2
2
  import { useConfig as u } from "../../../composables/useConfig.js";
3
3
  import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import { useEditorStore as l } from "../../../stores/editor.js";
5
- import { InChips as c } from "@useinsider/design-system-vue";
6
- import _ from "./AutoSaveToggle.vue.js";
7
- import S from "./EditorActions.vue.js";
8
- import g from "./version-history/RestoreButton.vue.js";
9
- const T = /* @__PURE__ */ a({
4
+ import { useEditorStore as c } from "../../../stores/editor.js";
5
+ import { InChips as l } from "@useinsider/design-system-vue";
6
+ import _ from "./EditorActions.vue.js";
7
+ import S from "./version-history/RestoreButton.vue.js";
8
+ const x = /* @__PURE__ */ a({
10
9
  __name: "RightSlot",
11
10
  setup(h, { expose: r }) {
12
- const { isFeatureEnabled: o } = u(), i = d(), n = l(), t = f(null), s = p(() => o("liquidSyntax"));
11
+ const { isFeatureEnabled: o } = u(), n = d(), i = c(), t = f(null), s = p(() => o("liquidSyntax"));
13
12
  return r({
14
13
  handleSave: (m) => {
15
14
  var e;
16
15
  return (e = t.value) == null ? void 0 : e.handleSave(m);
17
16
  }
18
- }), { __sfc: !0, isFeatureEnabled: o, trans: i, editorStore: n, editorActionsRef: t, isLiquidEnabled: s, InChips: c, AutoSaveToggle: _, EditorActions: S, RestoreButton: g };
17
+ }), { __sfc: !0, isFeatureEnabled: o, trans: n, editorStore: i, editorActionsRef: t, isLiquidEnabled: s, InChips: l, EditorActions: _, RestoreButton: S };
19
18
  }
20
19
  });
21
20
  export {
22
- T as default
21
+ x as default
23
22
  };
@@ -1,37 +1,57 @@
1
- import { defineComponent as p, computed as e, watch as m } from "vue";
2
- import { useTranslations as g } from "../../../composables/useTranslations.js";
3
- import { useOnboardingStore as u } from "../../../stores/onboarding.js";
4
- import { InOnboard as b } from "@useinsider/design-system-vue";
5
- const O = /* @__PURE__ */ p({
1
+ import { defineComponent as u, computed as d, watch as b, nextTick as f } from "vue";
2
+ import { useTranslations as C } from "../../../composables/useTranslations.js";
3
+ import { HEADER_SELECTOR as O, AMP_TOGGLE_BUTTON_SELECTOR as _, AMP_TOGGLE_WRAPPER_SELECTOR as T, POPOVER_LEFT_OFFSET as g, POPOVER_TOP_GAP as E } from "../../../enums/onboarding.js";
4
+ import { useOnboardingStore as x } from "../../../stores/onboarding.js";
5
+ import { InOnboard as P } from "@useinsider/design-system-vue";
6
+ const G = /* @__PURE__ */ u({
6
7
  __name: "AMPOnboarding",
7
- setup(l) {
8
- const i = g(), o = u(), r = e(() => `${window.innerWidth / 2 - 110}px`), a = e(() => [
9
- {
10
- classes: "guido-amp-onboarding",
11
- left: r.value,
12
- top: "70px",
13
- position: "Top Center",
14
- title: i("email-editor.onboarding-amp-title"),
15
- description: i("email-editor.onboarding-amp-description"),
16
- imageSource: "",
17
- backButtonClick: () => {
18
- },
19
- nextButtonType: "text",
20
- nextButtonText: i("action-builder.ok"),
21
- nextButtonClick: () => void o.close("ampOnboarding")
22
- }
23
- ]), d = e(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), s = () => {
24
- var n, t;
25
- (t = (n = o.getAmpCurrentCard) == null ? void 0 : n.nextButtonClick) == null || t.call(n);
26
- }, c = () => {
27
- var n, t;
28
- (t = (n = o.getAmpCurrentCard) == null ? void 0 : n.backButtonClick) == null || t.call(n);
8
+ setup(R) {
9
+ const e = C(), o = x(), r = () => {
10
+ const t = document.querySelector(O), n = document.querySelector(_), c = n == null ? void 0 : n.closest(T);
11
+ if (!c || !t)
12
+ return {
13
+ left: `${((t == null ? void 0 : t.offsetWidth) ?? window.innerWidth) / 2 - g}px`,
14
+ top: "68px"
15
+ };
16
+ const s = t.getBoundingClientRect(), i = c.getBoundingClientRect();
17
+ return {
18
+ left: `${i.left - s.left + i.width / 2 - g}px`,
19
+ top: `${i.bottom - s.top + E}px`
20
+ };
21
+ }, a = d(() => {
22
+ const { left: t, top: n } = r();
23
+ return [
24
+ {
25
+ classes: "guido-amp-onboarding",
26
+ left: t,
27
+ top: n,
28
+ position: "Top Center",
29
+ title: e("email-editor.onboarding-amp-title"),
30
+ description: e("email-editor.onboarding-amp-description"),
31
+ imageSource: "",
32
+ backButtonClick: () => {
33
+ },
34
+ nextButtonType: "text",
35
+ nextButtonText: e("action-builder.ok"),
36
+ nextButtonClick: () => void o.close("ampOnboarding")
37
+ }
38
+ ];
39
+ }), l = d(() => o.onboardings.ampOnboarding.config.length > 0 && o.onboardings.ampOnboarding.isActive), p = () => {
40
+ var t, n;
41
+ (n = (t = o.getAmpCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
42
+ }, m = () => {
43
+ var t, n;
44
+ (n = (t = o.getAmpCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
29
45
  };
30
- return m(() => o.onboardings.ampOnboarding.isActive, (n) => {
31
- n && o.setConfig("ampOnboarding", a.value);
32
- }, { immediate: !0 }), { __sfc: !0, trans: i, onboardingStore: o, centerLeft: r, onboardingCardsConfig: a, isVisible: d, handleNext: s, handleBack: c, InOnboard: b };
46
+ return b(
47
+ () => o.onboardings.ampOnboarding.isActive,
48
+ async (t) => {
49
+ t && (await f(), o.setConfig("ampOnboarding", a.value));
50
+ },
51
+ { immediate: !0 }
52
+ ), { __sfc: !0, trans: e, onboardingStore: o, getTogglePosition: r, onboardingCardsConfig: a, isVisible: l, handleNext: p, handleBack: m, InOnboard: P };
33
53
  }
34
54
  });
35
55
  export {
36
- O as default
56
+ G as default
37
57
  };
@@ -13,7 +13,7 @@ var l = function() {
13
13
  p,
14
14
  !1,
15
15
  null,
16
- "29b9af29"
16
+ "7419ae06"
17
17
  );
18
18
  const S = _.exports;
19
19
  export {
@@ -1,23 +1,24 @@
1
- import { defineComponent as l, computed as i, watch as b } from "vue";
2
- import { useTranslations as x } from "../../../composables/useTranslations.js";
3
- import { SERVICE_HOVER_SELECTORS as m } from "../../../enums/onboarding.js";
4
- import { useOnboardingStore as k } from "../../../stores/onboarding.js";
5
- import { InOnboard as f } from "@useinsider/design-system-vue";
6
- const S = /* @__PURE__ */ l({
1
+ import { defineComponent as l, computed as r, watch as m } from "vue";
2
+ import { useRibbonOffset as x } from "../../../composables/useRibbonOffset.js";
3
+ import { useTranslations as f } from "../../../composables/useTranslations.js";
4
+ import { SERVICE_HOVER_SELECTORS as k } from "../../../enums/onboarding.js";
5
+ import { useOnboardingStore as B } from "../../../stores/onboarding.js";
6
+ import { InOnboard as C } from "@useinsider/design-system-vue";
7
+ const y = /* @__PURE__ */ l({
7
8
  __name: "GenericOnboarding",
8
- setup(B) {
9
- const e = x(), o = k(), r = i(() => `${window.innerWidth / 2 - 160}px`), c = () => {
9
+ setup(T) {
10
+ const e = f(), o = B(), { getTopPosition: i } = x(), s = r(() => `${window.innerWidth / 2 - 146}px`), c = () => {
10
11
  const t = document.querySelector("ui-editor");
11
- t != null && t.shadowRoot && m.forEach((n) => {
12
- var d;
13
- const a = (d = t.shadowRoot) == null ? void 0 : d.querySelector(n);
14
- a && a.classList.add("hover");
12
+ t != null && t.shadowRoot && k.forEach((n) => {
13
+ var g;
14
+ const d = (g = t.shadowRoot) == null ? void 0 : g.querySelector(n);
15
+ d && d.classList.add("hover");
15
16
  });
16
- }, s = i(() => [
17
+ }, a = r(() => [
17
18
  {
18
19
  classes: "guido-onboarding-blocks",
19
20
  left: "90px",
20
- top: "90px",
21
+ top: i(90),
21
22
  position: "Left Top",
22
23
  title: e("email-editor.onboarding-blocks-title"),
23
24
  description: e("email-editor.onboarding-blocks-description"),
@@ -51,8 +52,8 @@ const S = /* @__PURE__ */ l({
51
52
  },
52
53
  {
53
54
  classes: "guido-onboarding-preview",
54
- left: r.value,
55
- top: "90px",
55
+ left: s.value,
56
+ top: i(68),
56
57
  position: "Top Center",
57
58
  title: e("email-editor.onboarding-preview-title"),
58
59
  description: e("email-editor.onboarding-preview-description"),
@@ -66,18 +67,18 @@ const S = /* @__PURE__ */ l({
66
67
  o.close("genericOnboarding");
67
68
  }
68
69
  }
69
- ]), g = i(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), p = () => {
70
+ ]), p = r(() => o.onboardings.genericOnboarding.config.length > 0 && o.onboardings.genericOnboarding.isActive), u = () => {
70
71
  var t, n;
71
72
  (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
72
- }, u = () => {
73
+ }, b = () => {
73
74
  var t, n;
74
75
  (n = (t = o.getGenericCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
75
76
  };
76
- return b(() => o.onboardings.genericOnboarding.isActive, (t) => {
77
- t && o.setConfig("genericOnboarding", s.value);
78
- }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, centerLeft: r, addHoverToServiceElements: c, onboardingCardsConfig: s, isVisible: g, handleNext: p, handleBack: u, InOnboard: f };
77
+ return m(() => o.onboardings.genericOnboarding.isActive, (t) => {
78
+ t && o.setConfig("genericOnboarding", a.value);
79
+ }, { immediate: !0 }), { __sfc: !0, trans: e, onboardingStore: o, getTopPosition: i, centerLeft: s, addHoverToServiceElements: c, onboardingCardsConfig: a, isVisible: p, handleNext: u, handleBack: b, InOnboard: C };
79
80
  }
80
81
  });
81
82
  export {
82
- S as default
83
+ y as default
83
84
  };