@useinsider/guido 2.1.0-beta.71300f0 → 2.1.0-beta.786853a

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,6 @@ 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}
127
125
  },
128
126
 
129
127
  // Optional: UI settings
@@ -143,11 +141,6 @@ const config: GuidoConfigInput = {
143
141
  modulesDisabled?: boolean, // Default: false - Disable modules panel
144
142
  },
145
143
 
146
- // Optional: Callbacks
147
- callbacks?: {
148
- externalValidation?: (data: SavedTemplateDetails) => Promise<boolean>, // Return false to cancel save
149
- },
150
-
151
144
  // Optional: Block configuration
152
145
  blocks?: {
153
146
  excludeDefaults?: DefaultBlockType[],
@@ -258,44 +251,6 @@ const config: GuidoConfigInput = {
258
251
 
259
252
  ---
260
253
 
261
- ## Module Folder Configuration
262
-
263
- Customize the Stripo module folder names for saved and default modules:
264
-
265
- ```typescript
266
- const config: GuidoConfigInput = {
267
- identity: { templateId: 'tpl-123', userId: 'user-456' },
268
- partner: { name: 'acme' },
269
- editor: {
270
- // Custom folder for user-saved modules
271
- // Sent to Stripo as: guido_acme_myCustomModules
272
- savedModulesFolderName: 'myCustomModules',
273
-
274
- // Custom folder for default/prebuilt modules
275
- // Sent to Stripo as: guido_myPrebuilts
276
- defaultModulesFolderName: 'myPrebuilts',
277
- },
278
- };
279
- ```
280
-
281
- ### Folder Naming Convention
282
-
283
- | Config Option | Default Value | Stripo Folder Name |
284
- |--------------|---------------|-------------------|
285
- | `savedModulesFolderName` | `'savedModules'` | `guido_{partnerName}_{value}` |
286
- | `defaultModulesFolderName` | `'defaultModules'` | `guido_{value}` |
287
-
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` |
296
-
297
- ---
298
-
299
254
  ## HTML Compiler Rules
300
255
 
301
256
  Add custom rules to transform HTML during export:
@@ -1,4 +1,4 @@
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 { object as o, number as b, optional as e, string as t, pipe as u, picklist as n, custom as d, boolean as c, array as a, minLength as p, literal as r, variant as k } from "../../node_modules/valibot/dist/index.js";
2
2
  const m = {
3
3
  /** Promotional/marketing emails */
4
4
  PROMOTIONAL: 1,
@@ -15,12 +15,12 @@ const m = {
15
15
  /** Unique identifier for the template being edited */
16
16
  templateId: u(
17
17
  t(),
18
- d(1, "templateId is required")
18
+ p(1, "templateId is required")
19
19
  ),
20
20
  /** Unique identifier for the user editing the template */
21
21
  userId: u(
22
22
  t(),
23
- d(1, "userId is required")
23
+ p(1, "userId is required")
24
24
  ),
25
25
  /** Optional variation ID for A/B testing */
26
26
  variationId: e(t())
@@ -28,7 +28,7 @@ const m = {
28
28
  /** Partner/organization name (required) */
29
29
  name: u(
30
30
  t(),
31
- d(1, "partner.name is required")
31
+ p(1, "partner.name is required")
32
32
  ),
33
33
  /** Product type identifier */
34
34
  productType: e(
@@ -60,21 +60,21 @@ const m = {
60
60
  value: t()
61
61
  })
62
62
  )
63
- }), f = o({
63
+ }), R = o({
64
64
  /** Initial HTML content */
65
65
  html: e(t(), ""),
66
66
  /** Initial CSS content */
67
67
  css: e(t(), ""),
68
68
  /** Preselected dynamic content items */
69
69
  preselectedDynamicContent: e(
70
- c(y),
70
+ a(y),
71
71
  []
72
72
  ),
73
73
  /** Selected unsubscribe page IDs */
74
- selectedUnsubscribePages: e(c(p()), []),
74
+ selectedUnsubscribePages: e(a(b()), []),
75
75
  /** Force recreate template in Stripo storage (use true when updating externally modified templates) */
76
- forceRecreate: e(a(), !1)
77
- }), R = o({
76
+ forceRecreate: e(c(), !1)
77
+ }), f = o({
78
78
  /** Sender display name */
79
79
  senderName: e(t(), ""),
80
80
  /** Email subject line */
@@ -85,33 +85,29 @@ const m = {
85
85
  /** Path to translations object */
86
86
  translationsPath: e(t(), "window.trans[Object.keys(window.trans)[0]]"),
87
87
  /** Migration date for template compatibility */
88
- migrationDate: e(p(), 1759696858),
88
+ migrationDate: e(b(), 1759696858),
89
89
  /** 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")
90
+ emailHeader: e(f, { senderName: "", subject: "" })
95
91
  }), I = o({
96
92
  /** Whether to show the header bar */
97
- showHeader: e(a(), !0),
93
+ showHeader: e(c(), !0),
98
94
  /** Custom label for back button (if shown) */
99
95
  backButtonLabel: e(t())
100
96
  }), T = o({
101
97
  /** Enable dynamic content insertion */
102
- dynamicContent: e(a(), !0),
98
+ dynamicContent: e(c(), !0),
103
99
  /** Enable save as template functionality */
104
- saveAsTemplate: e(a(), !0),
100
+ saveAsTemplate: e(c(), !0),
105
101
  /** Enable version history */
106
- versionHistory: e(a(), !0),
102
+ versionHistory: e(c(), !0),
107
103
  /** Enable test message sending */
108
- testMessage: e(a(), !0),
104
+ testMessage: e(c(), !0),
109
105
  /** Enable display conditions */
110
- displayConditions: e(a(), !0),
106
+ displayConditions: e(c(), !0),
111
107
  /** Enable unsubscribe block */
112
- unsubscribe: e(a(), !0),
108
+ unsubscribe: e(c(), !0),
113
109
  /** Disable modules panel in the editor */
114
- modulesDisabled: e(a(), !1)
110
+ modulesDisabled: e(c(), !1)
115
111
  }), A = n([
116
112
  "amp-accordion",
117
113
  "amp-carousel",
@@ -134,15 +130,15 @@ const m = {
134
130
  "unsubscribe-block",
135
131
  "coupon-block",
136
132
  "items-block"
137
- ]), N = o({
133
+ ]), O = o({
138
134
  /** Default blocks to exclude from the editor */
139
135
  excludeDefaults: e(
140
- c(A),
136
+ a(A),
141
137
  []
142
138
  ),
143
139
  /** Custom blocks to include in the editor */
144
140
  includeCustoms: e(
145
- c(g),
141
+ a(g),
146
142
  []
147
143
  )
148
144
  }), l = o({
@@ -151,8 +147,8 @@ const m = {
151
147
  /** Human-readable description */
152
148
  description: e(t()),
153
149
  /** Priority for rule ordering (lower = earlier) */
154
- priority: p()
155
- }), M = o({
150
+ priority: b()
151
+ }), E = o({
156
152
  ...l.entries,
157
153
  type: r("replace"),
158
154
  /** String to search for */
@@ -160,8 +156,8 @@ const m = {
160
156
  /** Replacement string */
161
157
  replacement: t(),
162
158
  /** Replace all occurrences (default: false) */
163
- replaceAll: e(a())
164
- }), O = o({
159
+ replaceAll: e(c())
160
+ }), N = o({
165
161
  ...l.entries,
166
162
  type: r("regex"),
167
163
  /** Regex pattern string */
@@ -170,36 +166,36 @@ const m = {
170
166
  replacement: t(),
171
167
  /** Regex flags (e.g., 'gi') */
172
168
  flags: e(t())
173
- }), v = o({
169
+ }), L = o({
174
170
  ...l.entries,
175
171
  type: r("remove"),
176
172
  /** Strings or patterns to remove */
177
- targets: c(t())
178
- }), E = o({
173
+ targets: a(t())
174
+ }), v = o({
179
175
  ...l.entries,
180
176
  type: r("custom"),
181
177
  /** Custom processor function */
182
- processor: b(
178
+ processor: d(
183
179
  (i) => typeof i == "function",
184
180
  "processor must be a function"
185
181
  )
186
- }), L = k("type", [
187
- M,
188
- O,
189
- v,
190
- E
191
- ]), x = o({
182
+ }), x = k("type", [
183
+ E,
184
+ N,
185
+ L,
186
+ v
187
+ ]), B = o({
192
188
  /** Custom compiler rules to apply */
193
- customRules: e(c(L), []),
189
+ customRules: e(a(x), []),
194
190
  /** Skip default compiler rules */
195
- ignoreDefaultRules: e(a(), !1)
196
- }), B = o({
191
+ ignoreDefaultRules: e(c(), !1)
192
+ }), P = o({
197
193
  /**
198
194
  * External validation handler called before save completes.
199
195
  * Return false to cancel the save operation.
200
196
  */
201
197
  externalValidation: e(
202
- b(
198
+ d(
203
199
  (i) => typeof i == "function",
204
200
  "externalValidation must be a function"
205
201
  )
@@ -212,7 +208,7 @@ const m = {
212
208
  partner: h,
213
209
  // Optional sections (with defaults)
214
210
  /** Template content and presets */
215
- template: e(f, {}),
211
+ template: e(R, {}),
216
212
  /** Editor settings */
217
213
  editor: e(C, {}),
218
214
  /** UI configuration */
@@ -220,32 +216,32 @@ const m = {
220
216
  /** Feature toggles */
221
217
  features: e(T, {}),
222
218
  /** Block configuration */
223
- blocks: e(N, {}),
219
+ blocks: e(O, {}),
224
220
  /** Compiler configuration */
225
- compiler: e(x, {}),
221
+ compiler: e(B, {}),
226
222
  /** Callbacks and event handlers */
227
- callbacks: e(B, {})
223
+ callbacks: e(P, {})
228
224
  });
229
225
  export {
230
- N as BlocksSchema,
231
- B as CallbacksSchema,
232
- L as CompilerRuleSchema,
233
- x as CompilerSchema,
226
+ O as BlocksSchema,
227
+ P as CallbacksSchema,
228
+ x as CompilerRuleSchema,
229
+ B as CompilerSchema,
234
230
  g as CustomBlockTypeSchema,
235
- E as CustomRuleSchema,
231
+ v as CustomRuleSchema,
236
232
  A as DefaultBlockTypeSchema,
237
233
  y as DynamicContentSchema,
238
234
  C as EditorSchema,
239
- R as EmailHeaderSchema,
235
+ f as EmailHeaderSchema,
240
236
  T as FeaturesSchema,
241
237
  D as GuidoConfigSchema,
242
238
  S as IdentitySchema,
243
239
  m as MessageType,
244
240
  h as PartnerSchema,
245
241
  s as ProductType,
246
- O as RegexRuleSchema,
247
- v as RemoveRuleSchema,
248
- M as ReplaceRuleSchema,
249
- f as TemplateSchema,
242
+ N as RegexRuleSchema,
243
+ L as RemoveRuleSchema,
244
+ E as ReplaceRuleSchema,
245
+ R as TemplateSchema,
250
246
  I as UISchema
251
247
  };
@@ -12,7 +12,7 @@ var t = function() {
12
12
  n,
13
13
  !1,
14
14
  null,
15
- "d2b19ebc"
15
+ "890b5336"
16
16
  );
17
17
  const v = s.exports;
18
18
  export {
@@ -1,64 +1,54 @@
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";
14
- 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({
1
+ import { defineComponent as B, defineAsyncComponent as P, ref as N, computed as U, watch as R, onMounted as z, onUnmounted as K } from "vue";
2
+ import { provideGuidoActions as M } 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 J } from "../composables/useTimerClone.js";
6
+ import { migrate as W } from "../config/migrator/index.js";
7
+ import Q from "./organisms/base/Toaster.vue.js";
8
+ import V from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
9
+ import X from "./organisms/header/HeaderWrapper.vue.js";
10
+ import Y from "./organisms/LoadingWrapper.vue.js";
11
+ import Z from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
12
+ import $ from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
13
+ import { useStripoApi as ee } from "../services/stripoApi.js";
14
+ import { useConfigStore as oe } from "../stores/config.js";
15
+ import { useDynamicContentStore as te } from "../stores/dynamic-content.js";
16
+ import { useEditorStore as ne } from "../stores/editor.js";
17
+ import { usePreviewStore as re } from "../stores/preview.js";
18
+ import { useUnsubscribeStore as se } from "../stores/unsubscribe.js";
19
+ const Ee = /* @__PURE__ */ B({
20
20
  __name: "Guido",
21
21
  props: {
22
22
  config: null
23
23
  },
24
24
  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(
25
+ setup(_, { expose: I, emit: t }) {
26
+ const l = _, L = P(
27
27
  () => import("./organisms/email-preview/PreviewContainer.vue.js")
28
- ), A = N(
28
+ ), A = P(
29
29
  () => 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 = () => {
30
+ ), p = N(), c = te(), u = se(), n = oe();
31
+ n.init(l.config);
32
+ const i = ne(), F = re(), r = U(() => i.hasChanges), { isTestPartner: G } = j(), v = () => {
33
33
  var e;
34
- return (e = v.value) == null ? void 0 : e.handleSave(!0);
35
- }, {
36
- templateId: d,
37
- userId: f,
38
- partnerName: m,
34
+ return (e = p.value) == null ? void 0 : e.handleSave(!0);
35
+ }, { templateId: a, userId: y, partnerName: h, productType: b, username: f, template: o } = n, s = (o == null ? void 0 : o.html) || "", g = (o == null ? void 0 : o.css) || "", m = (o == null ? void 0 : o.preselectedDynamicContent) || [];
36
+ i.templateId = a;
37
+ const { initPlugin: S } = q({
38
+ emailId: a,
39
+ userId: y,
40
+ username: f,
41
+ partnerName: h,
39
42
  productType: b,
40
- username: g,
41
- template: o,
42
- 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
- i.templateId = d;
45
- const { initPlugin: D } = Q({
46
- emailId: d,
47
- userId: f,
48
- username: g,
49
- partnerName: m,
50
- productType: b,
51
- preselectedDynamicContentList: l,
52
- savedModulesFolderName: `guido_${m}_${w}`,
53
- defaultModulesFolderName: `guido_${C}`,
43
+ preselectedDynamicContentList: m,
54
44
  onReady: () => {
55
45
  console.debug("guido:ready"), t("ready");
56
46
  }
57
- }), { getDefaultTemplate: E } = ne(), { cloneTimersOnSave: k, hasTimerBlocks: F } = V(), O = P(() => {
47
+ }), { getDefaultTemplate: w } = ee(), { cloneTimersOnSave: C, hasTimerBlocks: D } = J(), H = U(() => {
58
48
  var e;
59
- return !((e = s.ui) != null && e.showHeader);
49
+ return !((e = n.ui) != null && e.showHeader);
60
50
  });
61
- q({
51
+ M({
62
52
  onBack: () => {
63
53
  console.debug("guido:back"), t("back");
64
54
  },
@@ -72,49 +62,49 @@ const Me = /* @__PURE__ */ B({
72
62
  console.debug("guido:test-email:click"), t("test-email:click");
73
63
  }
74
64
  });
75
- const M = (e) => {
76
- console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
77
- }, T = () => {
65
+ const E = (e) => {
66
+ console.debug("dynamic-content:close", e), c.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
67
+ }, k = () => {
78
68
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
79
69
  };
80
- z(() => r.value, () => {
70
+ R(() => r.value, () => {
81
71
  t("on-change", r.value);
82
72
  });
83
- const u = (e) => {
84
- const _ = e, { attribute: $, position: x } = _.detail;
85
- console.debug("dynamic-content:open", _.detail), t("dynamic-content:open", $, x);
73
+ const d = (e) => {
74
+ const T = e, { attribute: O, position: x } = T.detail;
75
+ console.debug("dynamic-content:open", T.detail), t("dynamic-content:open", O, x);
86
76
  };
87
- return K(async () => {
77
+ return z(async () => {
88
78
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
89
79
  try {
90
- y.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
80
+ u.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
91
81
  let e = {
92
- html: c && await U(c),
93
- css: S
82
+ html: s && await W(s),
83
+ css: g
94
84
  };
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;
85
+ e.html || (e = await w(), e.html = await W(e.html)), D(e.html) && (e.html = await C(e.html)), await S(e), c.selectedDynamicContentList = m;
96
86
  } catch (e) {
97
87
  console.error("Failed to initialize Stripo editor:", e);
98
88
  }
99
- document.addEventListener("dynamic-content:open", u);
100
- }), j(() => {
101
- document.removeEventListener("dynamic-content:open", u);
89
+ document.addEventListener("dynamic-content:open", d);
90
+ }), K(() => {
91
+ document.removeEventListener("dynamic-content:open", d);
102
92
  try {
103
93
  window.UIEditor.removeEditor();
104
94
  } catch {
105
95
  console.debug("Failed to remove Stripo editor: No editor found");
106
96
  }
107
- s.reset();
97
+ n.reset();
108
98
  }), I({
109
99
  dynamicContent: {
110
- insert: M,
111
- close: T
100
+ insert: E,
101
+ close: k
112
102
  },
113
103
  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 };
104
+ saveSilent: v
105
+ }), { __sfc: !0, PreviewContainer: L, OnboardingWrapper: A, headerWrapperRef: p, dynamicContentStore: c, unsubscribeStore: u, props: l, configStore: n, editorStore: i, previewStore: F, hasChanges: r, isTestPartner: G, saveSilent: v, templateId: a, userId: y, partnerName: h, productType: b, username: f, templateConfig: o, html: s, css: g, preselectedDynamicContentList: m, emit: t, initPlugin: S, getDefaultTemplate: w, cloneTimersOnSave: C, hasTimerBlocks: D, noHeader: H, insertDynamicContent: E, closeDynamicContent: k, handleDynamicContentOpen: d, Toaster: Q, FilterSelectionDrawer: V, HeaderWrapper: X, LoadingWrapper: Y, SaveAsTemplateDrawer: Z, UnsubscribeWrapper: $ };
116
106
  }
117
107
  });
118
108
  export {
119
- Me as default
109
+ Ee as default
120
110
  };
@@ -1,4 +1,4 @@
1
- import { useConfigStore as a } from "../stores/config.js";
1
+ import { useConfigStore as l } from "../stores/config.js";
2
2
  const r = {
3
3
  "amp-accordion": "ampAccordionEnabled",
4
4
  "amp-carousel": "ampCarouselEnabled",
@@ -13,7 +13,7 @@ const r = {
13
13
  "text-block": "textEnabled",
14
14
  "timer-block": "timerEnabled",
15
15
  "video-block": "videoEnabled"
16
- }, l = {
16
+ }, c = {
17
17
  "dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
18
18
  "checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
19
19
  "radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
@@ -21,40 +21,31 @@ const r = {
21
21
  "unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
22
22
  "coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
23
23
  "items-block": () => import("../extensions/Blocks/Items/extension.js")
24
- }, s = (o) => {
25
- if (!o || !o.length)
24
+ }, a = (n) => {
25
+ if (!n || !n.length)
26
26
  return {};
27
- const t = {};
28
- return o.forEach((n) => {
29
- const e = r[n];
30
- e && (t[e] = !1);
31
- }), t;
32
- }, i = async () => [(await import("../extensions/ModulesTabIcons/extension.js")).default], b = async (o) => {
33
- const t = await i();
34
- if (!o || !o.length)
35
- return t;
36
- const n = await Promise.all(
37
- o.map(async (e) => {
38
- const c = l[e];
39
- return c ? (await c()).default : null;
40
- })
41
- );
42
- return [
43
- ...t,
44
- ...n.filter((e) => e !== null)
45
- ];
46
- }, u = () => {
47
- const o = a();
27
+ const e = {};
28
+ return n.forEach((o) => {
29
+ const t = r[o];
30
+ t && (e[t] = !1);
31
+ }), e;
32
+ }, i = async (n) => !n || !n.length ? [] : (await Promise.all(
33
+ n.map(async (o) => {
34
+ const t = c[o];
35
+ return t ? (await t()).default : null;
36
+ })
37
+ )).filter((o) => o !== null), m = () => {
38
+ const n = l();
48
39
  return {
49
40
  getStripoBlocksConfig: async () => {
50
- const n = o.blocks;
41
+ const o = n.blocks;
51
42
  return {
52
- baseBlocks: s(n == null ? void 0 : n.excludeDefaults),
53
- extensions: await b(n == null ? void 0 : n.includeCustoms)
43
+ baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
44
+ extensions: await i(o == null ? void 0 : o.includeCustoms)
54
45
  };
55
46
  }
56
47
  };
57
48
  };
58
49
  export {
59
- u as useBlocksConfig
50
+ m as useBlocksConfig
60
51
  };
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-890b5336]{position:relative;width:100%;height:calc(100vh - 128px)}.guido-editor__container[data-v-890b5336]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-890b5336]{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}