@useinsider/guido 2.1.0-beta.71300f0 → 2.1.0-beta.76217f3

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
@@ -122,8 +122,8 @@ const config: GuidoConfigInput = {
122
122
  senderName?: string,
123
123
  subject?: string,
124
124
  },
125
- savedModulesFolderName?: string, // Default: 'savedModules' sent as guido_{partnerName}_{value}
126
- defaultModulesFolderName?: string, // Default: 'defaultModules' sent as guido_{value}
125
+ savedModulesFolderName?: string, // Default: 'savedModules' - folder name for user-saved modules
126
+ defaultModulesFolderName?: string, // Default: 'defaultModules' - folder name for default/prebuilt modules
127
127
  },
128
128
 
129
129
  // Optional: UI settings
@@ -260,39 +260,30 @@ const config: GuidoConfigInput = {
260
260
 
261
261
  ## Module Folder Configuration
262
262
 
263
- Customize the Stripo module folder names for saved and default modules:
263
+ Customize the Stripo module folder names for saved and default modules. These values are passed to Stripo metadata and the dynamic folder paths are constructed in the Stripo plugin panel configuration.
264
264
 
265
265
  ```typescript
266
266
  const config: GuidoConfigInput = {
267
267
  identity: { templateId: 'tpl-123', userId: 'user-456' },
268
268
  partner: { name: 'acme' },
269
269
  editor: {
270
- // Custom folder for user-saved modules
271
- // Sent to Stripo as: guido_acme_myCustomModules
272
- savedModulesFolderName: 'myCustomModules',
270
+ // Folder name for user-saved modules
271
+ savedModulesFolderName: 'savedModules',
273
272
 
274
- // Custom folder for default/prebuilt modules
275
- // Sent to Stripo as: guido_myPrebuilts
276
- defaultModulesFolderName: 'myPrebuilts',
273
+ // Folder name for default/prebuilt modules
274
+ defaultModulesFolderName: 'defaultModules',
277
275
  },
278
276
  };
279
277
  ```
280
278
 
281
- ### Folder Naming Convention
279
+ ### Default Values
282
280
 
283
- | Config Option | Default Value | Stripo Folder Name |
284
- |--------------|---------------|-------------------|
285
- | `savedModulesFolderName` | `'savedModules'` | `guido_{partnerName}_{value}` |
286
- | `defaultModulesFolderName` | `'defaultModules'` | `guido_{value}` |
281
+ | Config Option | Default Value |
282
+ |--------------|---------------|
283
+ | `savedModulesFolderName` | `'savedModules'` |
284
+ | `defaultModulesFolderName` | `'defaultModules'` |
287
285
 
288
- **Examples with partner name `acme`:**
289
-
290
- | Config Value | Result |
291
- |--------------|--------|
292
- | `savedModulesFolderName: 'savedModules'` (default) | `guido_acme_savedModules` |
293
- | `savedModulesFolderName: 'v2_modules'` | `guido_acme_v2_modules` |
294
- | `defaultModulesFolderName: 'defaultModules'` (default) | `guido_defaultModules` |
295
- | `defaultModulesFolderName: 'prebuilts'` | `guido_prebuilts` |
286
+ > **Note:** The actual folder paths (e.g., `guido_acme_savedModules`) are configured in the Stripo plugin panel using variable substitution like `${savedModulesFolderName}`.
296
287
 
297
288
  ---
298
289
 
@@ -1,4 +1,5 @@
1
- import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, custom as b, boolean as a, array as c, minLength as d, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
1
+ import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
2
+ import { object as o, number as p, optional as e, string as t, pipe as u, picklist as n, custom as S, boolean as a, array as c, minLength as d, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
2
3
  const m = {
3
4
  /** Promotional/marketing emails */
4
5
  PROMOTIONAL: 1,
@@ -11,7 +12,7 @@ const m = {
11
12
  ARCHITECT: 49,
12
13
  /** Unsubscribe page builder */
13
14
  UNSUBSCRIBE_PAGES: 97
14
- }, S = o({
15
+ }, h = o({
15
16
  /** Unique identifier for the template being edited */
16
17
  templateId: u(
17
18
  t(),
@@ -24,7 +25,7 @@ const m = {
24
25
  ),
25
26
  /** Optional variation ID for A/B testing */
26
27
  variationId: e(t())
27
- }), h = o({
28
+ }), y = o({
28
29
  /** Partner/organization name (required) */
29
30
  name: u(
30
31
  t(),
@@ -46,7 +47,7 @@ const m = {
46
47
  ),
47
48
  /** Display name for the current user */
48
49
  username: e(t(), "Guido User")
49
- }), y = o({
50
+ }), f = o({
50
51
  /** Display text for the dynamic content */
51
52
  text: t(),
52
53
  /** Template variable value (e.g., {{username}}) */
@@ -60,21 +61,21 @@ const m = {
60
61
  value: t()
61
62
  })
62
63
  )
63
- }), f = o({
64
+ }), R = o({
64
65
  /** Initial HTML content */
65
66
  html: e(t(), ""),
66
67
  /** Initial CSS content */
67
68
  css: e(t(), ""),
68
69
  /** Preselected dynamic content items */
69
70
  preselectedDynamicContent: e(
70
- c(y),
71
+ c(f),
71
72
  []
72
73
  ),
73
74
  /** Selected unsubscribe page IDs */
74
75
  selectedUnsubscribePages: e(c(p()), []),
75
76
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
76
77
  forceRecreate: e(a(), !1)
77
- }), R = o({
78
+ }), A = o({
78
79
  /** Sender display name */
79
80
  senderName: e(t(), ""),
80
81
  /** Email subject line */
@@ -87,17 +88,17 @@ const m = {
87
88
  /** Migration date for template compatibility */
88
89
  migrationDate: e(p(), 1759696858),
89
90
  /** Email header settings */
90
- emailHeader: e(R, { senderName: "", subject: "" }),
91
- /** Custom folder name for user-saved modules (sent to Stripo as guido_{partnerName}_{savedModulesFolderName}) */
92
- savedModulesFolderName: e(t(), "savedModules"),
93
- /** Custom folder name for default/prebuilt modules (sent to Stripo as guido_{defaultModulesFolderName}) */
94
- defaultModulesFolderName: e(t(), "defaultModules")
95
- }), I = o({
91
+ emailHeader: e(A, { senderName: "", subject: "" }),
92
+ /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
93
+ savedModulesFolderName: e(t(), b.SAVED_MODULES),
94
+ /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
95
+ defaultModulesFolderName: e(t(), b.DEFAULT_MODULES)
96
+ }), T = o({
96
97
  /** Whether to show the header bar */
97
98
  showHeader: e(a(), !0),
98
99
  /** Custom label for back button (if shown) */
99
100
  backButtonLabel: e(t())
100
- }), T = o({
101
+ }), I = o({
101
102
  /** Enable dynamic content insertion */
102
103
  dynamicContent: e(a(), !0),
103
104
  /** Enable save as template functionality */
@@ -112,7 +113,7 @@ const m = {
112
113
  unsubscribe: e(a(), !0),
113
114
  /** Disable modules panel in the editor */
114
115
  modulesDisabled: e(a(), !1)
115
- }), A = n([
116
+ }), E = n([
116
117
  "amp-accordion",
117
118
  "amp-carousel",
118
119
  "amp-form-controls",
@@ -134,10 +135,10 @@ const m = {
134
135
  "unsubscribe-block",
135
136
  "coupon-block",
136
137
  "items-block"
137
- ]), N = o({
138
+ ]), O = o({
138
139
  /** Default blocks to exclude from the editor */
139
140
  excludeDefaults: e(
140
- c(A),
141
+ c(E),
141
142
  []
142
143
  ),
143
144
  /** Custom blocks to include in the editor */
@@ -152,7 +153,7 @@ const m = {
152
153
  description: e(t()),
153
154
  /** Priority for rule ordering (lower = earlier) */
154
155
  priority: p()
155
- }), M = o({
156
+ }), L = o({
156
157
  ...l.entries,
157
158
  type: r("replace"),
158
159
  /** String to search for */
@@ -161,7 +162,7 @@ const m = {
161
162
  replacement: t(),
162
163
  /** Replace all occurrences (default: false) */
163
164
  replaceAll: e(a())
164
- }), O = o({
165
+ }), M = o({
165
166
  ...l.entries,
166
167
  type: r("regex"),
167
168
  /** Regex pattern string */
@@ -170,82 +171,82 @@ const m = {
170
171
  replacement: t(),
171
172
  /** Regex flags (e.g., 'gi') */
172
173
  flags: e(t())
173
- }), v = o({
174
+ }), N = o({
174
175
  ...l.entries,
175
176
  type: r("remove"),
176
177
  /** Strings or patterns to remove */
177
178
  targets: c(t())
178
- }), E = o({
179
+ }), D = o({
179
180
  ...l.entries,
180
181
  type: r("custom"),
181
182
  /** Custom processor function */
182
- processor: b(
183
+ processor: S(
183
184
  (i) => typeof i == "function",
184
185
  "processor must be a function"
185
186
  )
186
- }), L = k("type", [
187
+ }), v = k("type", [
188
+ L,
187
189
  M,
188
- O,
189
- v,
190
- E
191
- ]), x = o({
190
+ N,
191
+ D
192
+ ]), U = o({
192
193
  /** Custom compiler rules to apply */
193
- customRules: e(c(L), []),
194
+ customRules: e(c(v), []),
194
195
  /** Skip default compiler rules */
195
196
  ignoreDefaultRules: e(a(), !1)
196
- }), B = o({
197
+ }), x = o({
197
198
  /**
198
199
  * External validation handler called before save completes.
199
200
  * Return false to cancel the save operation.
200
201
  */
201
202
  externalValidation: e(
202
- b(
203
+ S(
203
204
  (i) => typeof i == "function",
204
205
  "externalValidation must be a function"
205
206
  )
206
207
  )
207
- }), D = o({
208
+ }), H = o({
208
209
  // Required sections
209
210
  /** Identity configuration (required) */
210
- identity: S,
211
+ identity: h,
211
212
  /** Partner configuration (required) */
212
- partner: h,
213
+ partner: y,
213
214
  // Optional sections (with defaults)
214
215
  /** Template content and presets */
215
- template: e(f, {}),
216
+ template: e(R, {}),
216
217
  /** Editor settings */
217
218
  editor: e(C, {}),
218
219
  /** UI configuration */
219
- ui: e(I, {}),
220
+ ui: e(T, {}),
220
221
  /** Feature toggles */
221
- features: e(T, {}),
222
+ features: e(I, {}),
222
223
  /** Block configuration */
223
- blocks: e(N, {}),
224
+ blocks: e(O, {}),
224
225
  /** Compiler configuration */
225
- compiler: e(x, {}),
226
+ compiler: e(U, {}),
226
227
  /** Callbacks and event handlers */
227
- callbacks: e(B, {})
228
+ callbacks: e(x, {})
228
229
  });
229
230
  export {
230
- N as BlocksSchema,
231
- B as CallbacksSchema,
232
- L as CompilerRuleSchema,
233
- x as CompilerSchema,
231
+ O as BlocksSchema,
232
+ x as CallbacksSchema,
233
+ v as CompilerRuleSchema,
234
+ U as CompilerSchema,
234
235
  g as CustomBlockTypeSchema,
235
- E as CustomRuleSchema,
236
- A as DefaultBlockTypeSchema,
237
- y as DynamicContentSchema,
236
+ D as CustomRuleSchema,
237
+ E as DefaultBlockTypeSchema,
238
+ f as DynamicContentSchema,
238
239
  C as EditorSchema,
239
- R as EmailHeaderSchema,
240
- T as FeaturesSchema,
241
- D as GuidoConfigSchema,
242
- S as IdentitySchema,
240
+ A as EmailHeaderSchema,
241
+ I as FeaturesSchema,
242
+ H as GuidoConfigSchema,
243
+ h as IdentitySchema,
243
244
  m as MessageType,
244
- h as PartnerSchema,
245
+ y as PartnerSchema,
245
246
  s as ProductType,
246
- O as RegexRuleSchema,
247
- v as RemoveRuleSchema,
248
- M as ReplaceRuleSchema,
249
- f as TemplateSchema,
250
- I as UISchema
247
+ M as RegexRuleSchema,
248
+ N as RemoveRuleSchema,
249
+ L as ReplaceRuleSchema,
250
+ R as TemplateSchema,
251
+ T as UISchema
251
252
  };
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "d2b19ebc"
15
+ "16abb398"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,64 +1,65 @@
1
- import { defineComponent as B, defineAsyncComponent as N, ref as R, computed as P, watch as z, onMounted as K, onUnmounted as j } from "vue";
2
- import { provideGuidoActions as q } from "../composables/useGuidoActions.js";
3
- import { usePartner as J } from "../composables/usePartner.js";
4
- import { useStripo as Q } from "../composables/useStripo.js";
5
- import { useTimerClone as V } from "../composables/useTimerClone.js";
6
- import { migrate as U } from "../config/migrator/index.js";
7
- import X from "./organisms/base/Toaster.vue.js";
8
- import Y from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
- import Z from "./organisms/header/HeaderWrapper.vue.js";
10
- import ee from "./organisms/LoadingWrapper.vue.js";
11
- import oe from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
- import te from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
- import { useStripoApi as ne } from "../services/stripoApi.js";
1
+ import { defineComponent as z, defineAsyncComponent as M, ref as K, computed as _, watch as V, onMounted as j, onUnmounted as q } from "vue";
2
+ import { provideGuidoActions as J } from "../composables/useGuidoActions.js";
3
+ import { usePartner as Q } from "../composables/usePartner.js";
4
+ import { useStripo as X } from "../composables/useStripo.js";
5
+ import { useTimerClone as Y } from "../composables/useTimerClone.js";
6
+ import { migrate as P } from "../config/migrator/index.js";
7
+ import { ModuleFolderDefaults as A } from "../enums/defaults.js";
8
+ import Z from "./organisms/base/Toaster.vue.js";
9
+ import $ from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
10
+ import ee from "./organisms/header/HeaderWrapper.vue.js";
11
+ import oe from "./organisms/LoadingWrapper.vue.js";
12
+ import te from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
13
+ import ne from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
14
+ import { useStripoApi as re } from "../services/stripoApi.js";
14
15
  import { useConfigStore as se } from "../stores/config.js";
15
- import { useDynamicContentStore as re } from "../stores/dynamic-content.js";
16
- import { useEditorStore as ce } from "../stores/editor.js";
17
- import { usePreviewStore as ae } from "../stores/preview.js";
18
- import { useUnsubscribeStore as ie } from "../stores/unsubscribe.js";
19
- const Me = /* @__PURE__ */ B({
16
+ import { useDynamicContentStore as ce } from "../stores/dynamic-content.js";
17
+ import { useEditorStore as ae } from "../stores/editor.js";
18
+ import { usePreviewStore as ie } from "../stores/preview.js";
19
+ import { useUnsubscribeStore as de } from "../stores/unsubscribe.js";
20
+ const Le = /* @__PURE__ */ z({
20
21
  __name: "Guido",
21
22
  props: {
22
23
  config: null
23
24
  },
24
25
  emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
25
- setup(W, { expose: I, emit: t }) {
26
- const p = W, L = N(
26
+ setup(N, { expose: W, emit: t }) {
27
+ const u = N, I = M(
27
28
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
28
- ), A = N(
29
+ ), O = M(
29
30
  () => import("./organisms/onboarding/OnboardingWrapper.vue.js")
30
- ), v = R(), a = re(), y = ie(), s = se();
31
- s.init(p.config);
32
- const i = ce(), G = ae(), r = P(() => i.hasChanges), { isTestPartner: H } = J(), h = () => {
31
+ ), p = K(), a = ce(), v = de(), r = se();
32
+ r.init(u.config);
33
+ const i = ae(), G = ie(), s = _(() => i.hasChanges), { isTestPartner: H } = Q(), y = () => {
33
34
  var e;
34
- return (e = v.value) == null ? void 0 : e.handleSave(!0);
35
+ return (e = p.value) == null ? void 0 : e.handleSave(!0);
35
36
  }, {
36
37
  templateId: d,
37
- userId: f,
38
- partnerName: m,
38
+ userId: h,
39
+ partnerName: f,
39
40
  productType: b,
40
- username: g,
41
+ username: S,
41
42
  template: o,
42
43
  editor: n
43
- } = s, c = (o == null ? void 0 : o.html) || "", S = (o == null ? void 0 : o.css) || "", l = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || "savedModules", C = (n == null ? void 0 : n.defaultModulesFolderName) || "defaultModules";
44
+ } = r, c = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [], w = (n == null ? void 0 : n.savedModulesFolderName) || A.SAVED_MODULES, D = (n == null ? void 0 : n.defaultModulesFolderName) || A.DEFAULT_MODULES;
44
45
  i.templateId = d;
45
- const { initPlugin: D } = Q({
46
+ const { initPlugin: E } = X({
46
47
  emailId: d,
47
- userId: f,
48
- username: g,
49
- partnerName: m,
48
+ userId: h,
49
+ username: S,
50
+ partnerName: f,
50
51
  productType: b,
51
- preselectedDynamicContentList: l,
52
- savedModulesFolderName: `guido_${m}_${w}`,
53
- defaultModulesFolderName: `guido_${C}`,
52
+ preselectedDynamicContentList: m,
53
+ savedModulesFolderName: w,
54
+ defaultModulesFolderName: D,
54
55
  onReady: () => {
55
56
  console.debug("guido:ready"), t("ready");
56
57
  }
57
- }), { getDefaultTemplate: E } = ne(), { cloneTimersOnSave: k, hasTimerBlocks: F } = V(), O = P(() => {
58
+ }), { getDefaultTemplate: C } = re(), { cloneTimersOnSave: T, hasTimerBlocks: k } = Y(), x = _(() => {
58
59
  var e;
59
- return !((e = s.ui) != null && e.showHeader);
60
+ return !((e = r.ui) != null && e.showHeader);
60
61
  });
61
- q({
62
+ J({
62
63
  onBack: () => {
63
64
  console.debug("guido:back"), t("back");
64
65
  },
@@ -72,49 +73,49 @@ const Me = /* @__PURE__ */ B({
72
73
  console.debug("guido:test-email:click"), t("test-email:click");
73
74
  }
74
75
  });
75
- const M = (e) => {
76
+ const F = (e) => {
76
77
  console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
77
- }, T = () => {
78
+ }, U = () => {
78
79
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
79
80
  };
80
- z(() => r.value, () => {
81
- t("on-change", r.value);
81
+ V(() => s.value, () => {
82
+ t("on-change", s.value);
82
83
  });
83
- const u = (e) => {
84
- const _ = e, { attribute: $, position: x } = _.detail;
85
- console.debug("dynamic-content:open", _.detail), t("dynamic-content:open", $, x);
84
+ const l = (e) => {
85
+ const L = e, { attribute: B, position: R } = L.detail;
86
+ console.debug("dynamic-content:open", L.detail), t("dynamic-content:open", B, R);
86
87
  };
87
- return K(async () => {
88
+ return j(async () => {
88
89
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
89
90
  try {
90
- y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
91
+ v.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
91
92
  let e = {
92
- html: c && await U(c),
93
- css: S
93
+ html: c && await P(c),
94
+ css: g
94
95
  };
95
- e.html || (e = await E(), e.html = await U(e.html)), F(e.html) && (e.html = await k(e.html)), await D(e), a.selectedDynamicContentList = l;
96
+ e.html || (e = await C(), e.html = await P(e.html)), k(e.html) && (e.html = await T(e.html)), await E(e), a.selectedDynamicContentList = m;
96
97
  } catch (e) {
97
98
  console.error("Failed to initialize Stripo editor:", e);
98
99
  }
99
- document.addEventListener("dynamic-content:open", u);
100
- }), j(() => {
101
- document.removeEventListener("dynamic-content:open", u);
100
+ document.addEventListener("dynamic-content:open", l);
101
+ }), q(() => {
102
+ document.removeEventListener("dynamic-content:open", l);
102
103
  try {
103
104
  window.UIEditor.removeEditor();
104
105
  } catch {
105
106
  console.debug("Failed to remove Stripo editor: No editor found");
106
107
  }
107
- s.reset();
108
- }), I({
108
+ r.reset();
109
+ }), W({
109
110
  dynamicContent: {
110
- insert: M,
111
- close: T
111
+ insert: F,
112
+ close: U
112
113
  },
113
- hasChanges: r,
114
- saveSilent: h
115
- }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: v, dynamicContentStore: a, unsubscribeStore: y, props: p, configStore: s, editorStore: i, previewStore: G, hasChanges: r, isTestPartner: H, saveSilent: h, templateId: d, userId: f, partnerName: m, productType: b, username: g, templateConfig: o, editorConfig: n, html: c, css: S, preselectedDynamicContentList: l, savedModulesFolderName: w, defaultModulesFolderName: C, emit: t, initPlugin: D, getDefaultTemplate: E, cloneTimersOnSave: k, hasTimerBlocks: F, noHeader: O, insertDynamicContent: M, closeDynamicContent: T, handleDynamicContentOpen: u, Toaster: X, FilterSelectionDrawer: Y, HeaderWrapper: Z, LoadingWrapper: ee, SaveAsTemplateDrawer: oe, UnsubscribeWrapper: te };
114
+ hasChanges: s,
115
+ saveSilent: y
116
+ }), { __sfc: !0, PreviewContainer: I, OnboardingWrapper: O, headerWrapperRef: p, dynamicContentStore: a, unsubscribeStore: v, props: u, configStore: r, editorStore: i, previewStore: G, hasChanges: s, isTestPartner: H, saveSilent: y, templateId: d, userId: h, partnerName: f, productType: b, username: S, templateConfig: o, editorConfig: n, html: c, css: g, preselectedDynamicContentList: m, savedModulesFolderName: w, defaultModulesFolderName: D, emit: t, initPlugin: E, getDefaultTemplate: C, cloneTimersOnSave: T, hasTimerBlocks: k, noHeader: x, insertDynamicContent: F, closeDynamicContent: U, handleDynamicContentOpen: l, Toaster: Z, FilterSelectionDrawer: $, HeaderWrapper: ee, LoadingWrapper: oe, SaveAsTemplateDrawer: te, UnsubscribeWrapper: ne };
116
117
  }
117
118
  });
118
119
  export {
119
- Me as default
120
+ Le as default
120
121
  };
@@ -1,5 +1,6 @@
1
- import { useConfigStore as a } from "../stores/config.js";
2
- const r = {
1
+ import r from "../extensions/ModulesTabIcons/extension.js";
2
+ import { useConfigStore as l } from "../stores/config.js";
3
+ const a = {
3
4
  "amp-accordion": "ampAccordionEnabled",
4
5
  "amp-carousel": "ampCarouselEnabled",
5
6
  "amp-form-controls": "ampFormControlsEnabled",
@@ -13,7 +14,7 @@ const r = {
13
14
  "text-block": "textEnabled",
14
15
  "timer-block": "timerEnabled",
15
16
  "video-block": "videoEnabled"
16
- }, l = {
17
+ }, s = {
17
18
  "dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
18
19
  "checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
19
20
  "radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
@@ -21,40 +22,40 @@ const r = {
21
22
  "unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
22
23
  "coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
23
24
  "items-block": () => import("../extensions/Blocks/Items/extension.js")
24
- }, s = (o) => {
25
- if (!o || !o.length)
25
+ }, i = (n) => {
26
+ if (!n || !n.length)
26
27
  return {};
27
28
  const t = {};
28
- return o.forEach((n) => {
29
- const e = r[n];
29
+ return n.forEach((o) => {
30
+ const e = a[o];
30
31
  e && (t[e] = !1);
31
32
  }), t;
32
- }, i = async () => [(await import("../extensions/ModulesTabIcons/extension.js")).default], b = async (o) => {
33
- const t = await i();
34
- if (!o || !o.length)
33
+ }, b = () => [r], m = async (n) => {
34
+ const t = b();
35
+ if (!n || !n.length)
35
36
  return t;
36
- const n = await Promise.all(
37
- o.map(async (e) => {
38
- const c = l[e];
37
+ const o = await Promise.all(
38
+ n.map(async (e) => {
39
+ const c = s[e];
39
40
  return c ? (await c()).default : null;
40
41
  })
41
42
  );
42
43
  return [
43
44
  ...t,
44
- ...n.filter((e) => e !== null)
45
+ ...o.filter((e) => e !== null)
45
46
  ];
46
- }, u = () => {
47
- const o = a();
47
+ }, E = () => {
48
+ const n = l();
48
49
  return {
49
50
  getStripoBlocksConfig: async () => {
50
- const n = o.blocks;
51
+ const o = n.blocks;
51
52
  return {
52
- baseBlocks: s(n == null ? void 0 : n.excludeDefaults),
53
- extensions: await b(n == null ? void 0 : n.includeCustoms)
53
+ baseBlocks: i(o == null ? void 0 : o.excludeDefaults),
54
+ extensions: await m(o == null ? void 0 : o.includeCustoms)
54
55
  };
55
56
  }
56
57
  };
57
58
  };
58
59
  export {
59
- u as useBlocksConfig
60
+ E as useBlocksConfig
60
61
  };
@@ -1,8 +1,12 @@
1
- const t = {
1
+ const e = {
2
2
  transactional: 2
3
- }, o = 2, T = 13;
3
+ }, o = 2, t = 13, s = {
4
+ SAVED_MODULES: "savedModules",
5
+ DEFAULT_MODULES: "defaultModules"
6
+ };
4
7
  export {
5
8
  o as EditorType,
6
- T as MAX_DEFAULT_TEMPLATE_ID,
7
- t as TemplateTypes
9
+ t as MAX_DEFAULT_TEMPLATE_ID,
10
+ s as ModuleFolderDefaults,
11
+ e as TemplateTypes
8
12
  };
@@ -1,16 +1,17 @@
1
- import { ExtensionBuilder as t, BlocksPanel as n } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
2
- class l extends n {
3
- getModulesTabIconName(s) {
4
- const { key: e } = s;
5
- if (e.endsWith("_modules") && !e.startsWith("amp"))
6
- return "modules";
7
- if (e.endsWith("_generalPreBuilts"))
1
+ import { ModuleFolderDefaults as n } from "../../enums/defaults.js";
2
+ import { ExtensionBuilder as t, BlocksPanel as r } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
3
+ class u extends r {
4
+ getModulesTabIconName(o) {
5
+ const { key: e } = o, { SAVED_MODULES: l, DEFAULT_MODULES: s } = n;
6
+ if (e.includes(l))
8
7
  return "user-profile";
8
+ if (e.includes(s))
9
+ return "modules";
9
10
  if (e === "amp_modules")
10
11
  return "mail-template";
11
12
  }
12
13
  }
13
- const i = new t().withBlocksPanel(l).build();
14
+ const c = new t().withBlocksPanel(u).build();
14
15
  export {
15
- i as default
16
+ c as default
16
17
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .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-913a3417] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-d2b19ebc]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-d2b19ebc]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-d2b19ebc]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .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-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{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-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
1
+ .gap-16[data-v-6562e38c],.gap-16[data-v-1ccb6d4a]{gap:16px}[data-v-cd76c125] .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-913a3417] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-16abb398]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-16abb398]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-16abb398]{height:calc(100vh - 75px)}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-a86fc486]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-a86fc486]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-a86fc486]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-a86fc486]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-a86fc486]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .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-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{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-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -129,9 +129,9 @@ export declare const EditorSchema: v.ObjectSchema<{
129
129
  readonly senderName: "";
130
130
  readonly subject: "";
131
131
  }>;
132
- /** Custom folder name for user-saved modules (sent to Stripo as guido_{partnerName}_{savedModulesFolderName}) */
132
+ /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
133
133
  readonly savedModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "savedModules">;
134
- /** Custom folder name for default/prebuilt modules (sent to Stripo as guido_{defaultModulesFolderName}) */
134
+ /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
135
135
  readonly defaultModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "defaultModules">;
136
136
  }, undefined>;
137
137
  /**
@@ -445,9 +445,9 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
445
445
  readonly senderName: "";
446
446
  readonly subject: "";
447
447
  }>;
448
- /** Custom folder name for user-saved modules (sent to Stripo as guido_{partnerName}_{savedModulesFolderName}) */
448
+ /** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
449
449
  readonly savedModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "savedModules">;
450
- /** Custom folder name for default/prebuilt modules (sent to Stripo as guido_{defaultModulesFolderName}) */
450
+ /** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
451
451
  readonly defaultModulesFolderName: v.OptionalSchema<v.StringSchema<undefined>, "defaultModules">;
452
452
  }, undefined>, {}>;
453
453
  /** UI configuration */
@@ -9,3 +9,7 @@ export declare const TemplateTypes: {
9
9
  export declare const EditorType: number;
10
10
  export declare const MAX_DEFAULT_TEMPLATE_ID = 13;
11
11
  export declare const ProductIds: Record<string, number>;
12
+ export declare const ModuleFolderDefaults: {
13
+ readonly SAVED_MODULES: "savedModules";
14
+ readonly DEFAULT_MODULES: "defaultModules";
15
+ };
@@ -4,6 +4,7 @@ const n = `ue-notifications-container {
4
4
  bottom: 32px;
5
5
  top: unset;
6
6
  width: unset;
7
+ position: fixed;
7
8
  }
8
9
 
9
10
  ue-notifications-container ue-message + ue-message {
@@ -1,4 +1,4 @@
1
- const o = `.patch-session-container {
1
+ const n = `.patch-session-container {
2
2
  row-gap: 16px;
3
3
  }
4
4
 
@@ -24,7 +24,15 @@ ue-vh-patch.selected .patch-wrapper {
24
24
  background-color: var(--guido-color-primary-100);
25
25
  box-shadow: 0 0 0 1px var(--guido-color-primary-500);
26
26
  }
27
+
28
+ .change-history-panel-wrapper .control-panel-header {
29
+ padding: 16px 0 16px 16px;
30
+ }
31
+
32
+ .change-history-panel-wrapper .header-control-panel-label {
33
+ grid-area: 1 / 1 / 2 / 12;
34
+ }
27
35
  `;
28
36
  export {
29
- o as default
37
+ n as default
30
38
  };
@@ -60,7 +60,6 @@ ue-control-panel,
60
60
 
61
61
  .control-panel-header {
62
62
  grid-template-columns: repeat(12, 1fr);
63
- padding: 16px 0px 16px 16px;
64
63
  }
65
64
 
66
65
  .control-panel-header > * {
@@ -94,7 +93,9 @@ ue-control-panel,
94
93
  .container.droppable-header-container ue-button:last-child {
95
94
  margin-right: 0;
96
95
  }
97
-
96
+ .container.droppable-header-container {
97
+ margin-top: 13px;
98
+ }
98
99
  .secondary-control-group {
99
100
  gap: 16px;
100
101
  }
@@ -133,6 +134,21 @@ ue-label.accent-dot:after {
133
134
  font-size: 13px;
134
135
  }
135
136
 
137
+ .e2e-container-video-size {
138
+ grid-template-columns: 1fr !important;
139
+ }
140
+
141
+ .e2e-container-video-size .control-shadow-wrapper:not(ue-button) {
142
+ display: flex;
143
+ width: 100%;
144
+ justify-content: flex-end;
145
+ background-color: transparent !important;
146
+ }
147
+
148
+ .e2e-container-video-size .control-shadow-wrapper input {
149
+ background-color: var(--guido-color-gray-0);
150
+ }
151
+
136
152
  .e2e-size,
137
153
  .e2e-timer-size {
138
154
  grid-auto-flow: row;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "2.1.0-beta.71300f0",
3
+ "version": "2.1.0-beta.76217f3",
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",