@useinsider/guido 3.12.0-beta.00cbb4c → 3.12.0-beta.256a452
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 +4 -0
- package/dist/@types/config/schemas.js +63 -50
- package/dist/components/organisms/header/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +1 -1
- package/dist/composables/useSave.js +43 -24
- package/dist/composables/validators/useAllowlistValidator.js +31 -0
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +29 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/validators/useAllowlistValidator.d.ts +9 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -161,11 +161,15 @@ const config: GuidoConfigInput = {
|
|
|
161
161
|
modulesDisabled?: boolean, // Default: false - Disable modules panel
|
|
162
162
|
liquidSyntax?: boolean, // Default: false - Enable Liquid template syntax
|
|
163
163
|
autosave?: boolean, // Default: false - Show the Auto Save toggle in the header. See wiki/AUTOSAVE.md.
|
|
164
|
+
allowlistEnabled?: boolean, // Default: false - Pre-save domain-allowlist check (opt-in). Pair with callbacks.resolveAllowlistToast.
|
|
164
165
|
},
|
|
165
166
|
|
|
166
167
|
// Optional: Callbacks
|
|
167
168
|
callbacks?: {
|
|
168
169
|
externalValidation?: (data: SavedTemplateDetails) => Promise<boolean>, // Return false to cancel save
|
|
170
|
+
// Supplies the block toaster when features.allowlistEnabled blocks a save on a non-allowlisted domain.
|
|
171
|
+
// The host owns role-gating, the settings deep-link, and copy; Guido renders the result. Return null/void to block silently.
|
|
172
|
+
resolveAllowlistToast?: (blockedDomains: string[]) => { message: string, actionButton?: { text: string, onClick: () => void } } | null | void,
|
|
169
173
|
},
|
|
170
174
|
|
|
171
175
|
// Optional: Block configuration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as y } from "../../enums/defaults.js";
|
|
2
|
-
import { object as a, number as n, optional as e, string as t, picklist as
|
|
2
|
+
import { object as a, number as n, optional as e, string as t, picklist as i, pipe as p, minLength as b, custom as S, boolean as o, array as c, record as k, fallback as C, literal as m, looseObject as g, variant as R, union as h, unknown as l, lazy as T } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const d = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -30,7 +30,7 @@ const d = {
|
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), v = a({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: p(
|
|
36
36
|
t(),
|
|
@@ -38,7 +38,7 @@ const d = {
|
|
|
38
38
|
),
|
|
39
39
|
/** Product type identifier */
|
|
40
40
|
productType: e(
|
|
41
|
-
|
|
41
|
+
i([
|
|
42
42
|
r.EMAIL,
|
|
43
43
|
r.ARCHITECT,
|
|
44
44
|
r.UNSUBSCRIBE_PAGES
|
|
@@ -47,14 +47,14 @@ const d = {
|
|
|
47
47
|
),
|
|
48
48
|
/** Message type (promotional or transactional) */
|
|
49
49
|
messageType: e(
|
|
50
|
-
|
|
50
|
+
i([d.PROMOTIONAL, d.TRANSACTIONAL]),
|
|
51
51
|
d.PROMOTIONAL
|
|
52
52
|
),
|
|
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
56
|
fallbackFont: e(I)
|
|
57
|
-
}),
|
|
57
|
+
}), L = a({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -68,40 +68,40 @@ const d = {
|
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}),
|
|
71
|
+
}), f = T(() => g({
|
|
72
72
|
text: e(t()),
|
|
73
73
|
// eslint-disable-next-line camelcase -- backend field name
|
|
74
74
|
tag_text: e(t()),
|
|
75
75
|
value: e(t()),
|
|
76
|
-
children: e(c(
|
|
76
|
+
children: e(c(f)),
|
|
77
77
|
// eslint-disable-next-line camelcase -- backend field name
|
|
78
|
-
select_items: e(c(
|
|
79
|
-
})),
|
|
78
|
+
select_items: e(c(f))
|
|
79
|
+
})), E = k(
|
|
80
80
|
t(),
|
|
81
|
-
C(c(
|
|
82
|
-
),
|
|
81
|
+
C(c(f), [])
|
|
82
|
+
), P = g({
|
|
83
83
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
84
84
|
id: e(n()),
|
|
85
85
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
86
86
|
decimalCount: e(h([t(), n()])),
|
|
87
87
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
88
|
-
productIds: e(c(
|
|
88
|
+
productIds: e(c(l())),
|
|
89
89
|
/** Whether the block requested live products at send time */
|
|
90
90
|
sendProductRequestFlag: e(o()),
|
|
91
91
|
/** Whether to randomize product order */
|
|
92
92
|
shuffleProducts: e(o()),
|
|
93
93
|
/** Filter rules driving product selection */
|
|
94
|
-
filters: e(c(
|
|
94
|
+
filters: e(c(l())),
|
|
95
95
|
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
96
96
|
currency: e(t()),
|
|
97
97
|
/** Currency display settings (separators, alignment, decimals) */
|
|
98
|
-
currencySettings: e(
|
|
98
|
+
currencySettings: e(l()),
|
|
99
99
|
/** Locale (e.g. 'nl_NL') */
|
|
100
100
|
language: e(t()),
|
|
101
101
|
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
102
102
|
strategy: e(t()),
|
|
103
103
|
/** Snapshot of products as rendered by the legacy block */
|
|
104
|
-
recommendedProducts: e(c(
|
|
104
|
+
recommendedProducts: e(c(l())),
|
|
105
105
|
/** Number of product cards per row */
|
|
106
106
|
cardsInRow: e(n()),
|
|
107
107
|
/** Mobile-only padding (right) */
|
|
@@ -124,7 +124,7 @@ const d = {
|
|
|
124
124
|
isPriceMovedToNextLine: e(o()),
|
|
125
125
|
/** Legacy "Hide if same as discounted" / delete-price-for-zero-sale toggle */
|
|
126
126
|
isPriceDeletedForZeroSale: e(o())
|
|
127
|
-
}),
|
|
127
|
+
}), D = a({
|
|
128
128
|
/**
|
|
129
129
|
* Legacy recommendation block configs keyed by block ID.
|
|
130
130
|
* Pass this when loading a template authored with the v1
|
|
@@ -132,7 +132,7 @@ const d = {
|
|
|
132
132
|
* strategy, currency, locale, and layout data.
|
|
133
133
|
*/
|
|
134
134
|
recommendationConfigs: e(
|
|
135
|
-
k(t(),
|
|
135
|
+
k(t(), P),
|
|
136
136
|
{}
|
|
137
137
|
)
|
|
138
138
|
}), M = a({
|
|
@@ -142,7 +142,7 @@ const d = {
|
|
|
142
142
|
css: e(t(), ""),
|
|
143
143
|
/** Preselected dynamic content items */
|
|
144
144
|
preselectedDynamicContent: e(
|
|
145
|
-
c(
|
|
145
|
+
c(L),
|
|
146
146
|
[]
|
|
147
147
|
),
|
|
148
148
|
/**
|
|
@@ -151,7 +151,7 @@ const d = {
|
|
|
151
151
|
* (first) partner's leaf attributes into the label→token map that repairs
|
|
152
152
|
* label-form placeholders (`{{ Phone Number }}`) in dropped saved modules.
|
|
153
153
|
*/
|
|
154
|
-
dynamicContentList: e(
|
|
154
|
+
dynamicContentList: e(E, {}),
|
|
155
155
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
156
156
|
customFieldAttributes: e(c(t()), []),
|
|
157
157
|
/** Selected unsubscribe page IDs */
|
|
@@ -159,7 +159,7 @@ const d = {
|
|
|
159
159
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
160
160
|
forceRecreate: e(o(), !1),
|
|
161
161
|
/** Migration-only inputs (legacy block configs) */
|
|
162
|
-
migration: e(
|
|
162
|
+
migration: e(D, {})
|
|
163
163
|
}), N = a({
|
|
164
164
|
/** Sender display name */
|
|
165
165
|
senderName: e(t(), ""),
|
|
@@ -201,8 +201,10 @@ const d = {
|
|
|
201
201
|
/** Enable Liquid template syntax */
|
|
202
202
|
liquidSyntax: e(o(), !1),
|
|
203
203
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
204
|
-
autosave: e(o(), !1)
|
|
205
|
-
|
|
204
|
+
autosave: e(o(), !1),
|
|
205
|
+
/** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
|
|
206
|
+
allowlistEnabled: e(o(), !1)
|
|
207
|
+
}), w = i([
|
|
206
208
|
"amp-accordion",
|
|
207
209
|
"amp-carousel",
|
|
208
210
|
"amp-form-controls",
|
|
@@ -216,7 +218,7 @@ const d = {
|
|
|
216
218
|
"text-block",
|
|
217
219
|
"timer-block",
|
|
218
220
|
"video-block"
|
|
219
|
-
]),
|
|
221
|
+
]), U = i([
|
|
220
222
|
"dynamic-content",
|
|
221
223
|
"checkbox-block",
|
|
222
224
|
"radio-button-block",
|
|
@@ -224,18 +226,18 @@ const d = {
|
|
|
224
226
|
"unsubscribe-block",
|
|
225
227
|
"coupon-block",
|
|
226
228
|
"items-block"
|
|
227
|
-
]),
|
|
229
|
+
]), B = a({
|
|
228
230
|
/** Default blocks to exclude from the editor */
|
|
229
231
|
excludeDefaults: e(
|
|
230
|
-
c(
|
|
232
|
+
c(w),
|
|
231
233
|
[]
|
|
232
234
|
),
|
|
233
235
|
/** Custom blocks to include in the editor */
|
|
234
236
|
includeCustoms: e(
|
|
235
|
-
c(
|
|
237
|
+
c(U),
|
|
236
238
|
[]
|
|
237
239
|
)
|
|
238
|
-
}),
|
|
240
|
+
}), u = a({
|
|
239
241
|
/** Unique identifier for the rule */
|
|
240
242
|
id: t(),
|
|
241
243
|
/** Human-readable description */
|
|
@@ -243,8 +245,8 @@ const d = {
|
|
|
243
245
|
/** Priority for rule ordering (lower = earlier) */
|
|
244
246
|
priority: n()
|
|
245
247
|
}), H = a({
|
|
246
|
-
...
|
|
247
|
-
type:
|
|
248
|
+
...u.entries,
|
|
249
|
+
type: m("replace"),
|
|
248
250
|
/** String to search for */
|
|
249
251
|
search: t(),
|
|
250
252
|
/** Replacement string */
|
|
@@ -252,8 +254,8 @@ const d = {
|
|
|
252
254
|
/** Replace all occurrences (default: false) */
|
|
253
255
|
replaceAll: e(o())
|
|
254
256
|
}), _ = a({
|
|
255
|
-
...
|
|
256
|
-
type:
|
|
257
|
+
...u.entries,
|
|
258
|
+
type: m("regex"),
|
|
257
259
|
/** Regex pattern string */
|
|
258
260
|
pattern: t(),
|
|
259
261
|
/** Replacement string (supports $1, $2, etc.) */
|
|
@@ -261,16 +263,16 @@ const d = {
|
|
|
261
263
|
/** Regex flags (e.g., 'gi') */
|
|
262
264
|
flags: e(t())
|
|
263
265
|
}), j = a({
|
|
264
|
-
...
|
|
265
|
-
type:
|
|
266
|
+
...u.entries,
|
|
267
|
+
type: m("remove"),
|
|
266
268
|
/** Strings or patterns to remove */
|
|
267
269
|
targets: c(t())
|
|
268
270
|
}), q = a({
|
|
269
|
-
...
|
|
270
|
-
type:
|
|
271
|
+
...u.entries,
|
|
272
|
+
type: m("custom"),
|
|
271
273
|
/** Custom processor function */
|
|
272
|
-
processor:
|
|
273
|
-
(
|
|
274
|
+
processor: S(
|
|
275
|
+
(s) => typeof s == "function",
|
|
274
276
|
"processor must be a function"
|
|
275
277
|
)
|
|
276
278
|
}), G = R("type", [
|
|
@@ -289,17 +291,28 @@ const d = {
|
|
|
289
291
|
* Return false to cancel the save operation.
|
|
290
292
|
*/
|
|
291
293
|
externalValidation: e(
|
|
292
|
-
|
|
293
|
-
(
|
|
294
|
+
S(
|
|
295
|
+
(s) => typeof s == "function",
|
|
294
296
|
"externalValidation must be a function"
|
|
295
297
|
)
|
|
298
|
+
),
|
|
299
|
+
/**
|
|
300
|
+
* Resolves the block toaster's content when the domain-allowlist check (features.allowlistEnabled)
|
|
301
|
+
* blocks a save. Host-supplied so role-gating, the settings deep-link, and copy stay host-side.
|
|
302
|
+
* Returning null/void blocks the save with no toaster.
|
|
303
|
+
*/
|
|
304
|
+
resolveAllowlistToast: e(
|
|
305
|
+
S(
|
|
306
|
+
(s) => typeof s == "function",
|
|
307
|
+
"resolveAllowlistToast must be a function"
|
|
308
|
+
)
|
|
296
309
|
)
|
|
297
310
|
}), K = a({
|
|
298
311
|
// Required sections
|
|
299
312
|
/** Identity configuration (required) */
|
|
300
313
|
identity: A,
|
|
301
314
|
/** Partner configuration (required) */
|
|
302
|
-
partner:
|
|
315
|
+
partner: v,
|
|
303
316
|
// Optional sections (with defaults)
|
|
304
317
|
/** Template content and presets */
|
|
305
318
|
template: e(M, {}),
|
|
@@ -310,37 +323,37 @@ const d = {
|
|
|
310
323
|
/** Feature toggles */
|
|
311
324
|
features: e(F, {}),
|
|
312
325
|
/** Block configuration */
|
|
313
|
-
blocks: e(
|
|
326
|
+
blocks: e(B, {}),
|
|
314
327
|
/** Compiler configuration */
|
|
315
328
|
compiler: e(V, {}),
|
|
316
329
|
/** Callbacks and event handlers */
|
|
317
330
|
callbacks: e(z, {})
|
|
318
331
|
});
|
|
319
332
|
export {
|
|
320
|
-
|
|
333
|
+
B as BlocksSchema,
|
|
321
334
|
z as CallbacksSchema,
|
|
322
335
|
G as CompilerRuleSchema,
|
|
323
336
|
V as CompilerSchema,
|
|
324
|
-
|
|
337
|
+
U as CustomBlockTypeSchema,
|
|
325
338
|
q as CustomRuleSchema,
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
339
|
+
w as DefaultBlockTypeSchema,
|
|
340
|
+
E as DynamicContentListSchema,
|
|
341
|
+
f as DynamicContentNodeSchema,
|
|
342
|
+
L as DynamicContentSchema,
|
|
330
343
|
O as EditorSchema,
|
|
331
344
|
N as EmailHeaderSchema,
|
|
332
345
|
I as FallbackFontSchema,
|
|
333
346
|
F as FeaturesSchema,
|
|
334
347
|
K as GuidoConfigSchema,
|
|
335
348
|
A as IdentitySchema,
|
|
336
|
-
|
|
349
|
+
P as LegacyRecommendationConfigSchema,
|
|
337
350
|
d as MessageType,
|
|
338
|
-
|
|
351
|
+
v as PartnerSchema,
|
|
339
352
|
r as ProductType,
|
|
340
353
|
_ as RegexRuleSchema,
|
|
341
354
|
j as RemoveRuleSchema,
|
|
342
355
|
H as ReplaceRuleSchema,
|
|
343
|
-
|
|
356
|
+
D as TemplateMigrationSchema,
|
|
344
357
|
M as TemplateSchema,
|
|
345
358
|
x as UISchema
|
|
346
359
|
};
|
|
@@ -1,32 +1,51 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import { useConfig as
|
|
3
|
-
import { useSaveStart as
|
|
4
|
-
import { useSyncModuleExtractor as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { useActionsApi as k } from "./useActionsApi.js";
|
|
2
|
+
import { useConfig as B } from "./useConfig.js";
|
|
3
|
+
import { useSaveStart as E, useSaveComplete as q } from "./useGuidoActions.js";
|
|
4
|
+
import { useSyncModuleExtractor as C } from "./useSyncModuleExtractor.js";
|
|
5
|
+
import { ToasterTypeOptions as A } from "../enums/toaster.js";
|
|
6
|
+
import { useStripoApi as D } from "../services/stripoApi.js";
|
|
7
|
+
import { useTemplatePreparation as L } from "../utils/templatePreparation.js";
|
|
8
|
+
import { useHtmlValidator as P } from "./useHtmlValidator.js";
|
|
9
|
+
import { useToaster as U } from "./useToaster.js";
|
|
10
|
+
import { useAllowlistValidator as M } from "./validators/useAllowlistValidator.js";
|
|
11
|
+
import { useCouponBlockValidator as h } from "./validators/useCouponBlockValidator.js";
|
|
12
|
+
import { useLiquidValidator as F } from "./validators/useLiquidValidator.js";
|
|
13
|
+
import { useUnsubscribeBlockValidator as O } from "./validators/useUnsubscribeBlockValidator.js";
|
|
14
|
+
const tt = () => {
|
|
15
|
+
const d = E(), c = q(), { validateHtml: m } = P(), { validateLiquidSyntax: u } = F(), { validateCouponBlockTags: p } = h(), { validateUnsubscribeBlockUniqueness: f, validateUnsubscribeBlockHasTemplate: v } = O(), { callbacks: a, isFeatureEnabled: s } = B(), { extractSyncModuleData: S } = C(), { setSyncModuleUnsubscriptionPages: b } = D(), { editorSave: V } = k(), { showToaster: w } = U(), { getBlockedDomains: y } = M();
|
|
16
|
+
return { save: async (H = !1, r = !1) => {
|
|
17
|
+
var l, e, n;
|
|
18
|
+
d();
|
|
19
|
+
const { prepareTemplateDetails: g } = L(), t = await g();
|
|
20
|
+
if (!p(t.compiledHtml) || !f(t.compiledHtml) || !v(t.compiledHtml))
|
|
18
21
|
return;
|
|
19
|
-
if (
|
|
20
|
-
if (!await
|
|
22
|
+
if (s("liquidSyntax")) {
|
|
23
|
+
if (!await u(t.compiledHtml))
|
|
21
24
|
return;
|
|
22
|
-
} else if (!await
|
|
25
|
+
} else if (!await m(t.compiledHtml, t.dynamicContentList, !0))
|
|
23
26
|
return;
|
|
24
|
-
if ((
|
|
27
|
+
if ((l = a.value) != null && l.externalValidation && !await a.value.externalValidation(t))
|
|
25
28
|
return;
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
if (s("allowlistEnabled")) {
|
|
30
|
+
const o = await y(t.compiledHtml, t.css);
|
|
31
|
+
if (o.length) {
|
|
32
|
+
if (!r) {
|
|
33
|
+
const i = (n = (e = a.value) == null ? void 0 : e.resolveAllowlistToast) == null ? void 0 : n.call(e, o);
|
|
34
|
+
i != null && i.message && w({
|
|
35
|
+
type: A.Warning,
|
|
36
|
+
message: i.message,
|
|
37
|
+
actionButton: i.actionButton
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (!await V())
|
|
44
|
+
return;
|
|
45
|
+
const { unsubscribePayload: x, stripoModules: T } = S(t.rawHtml);
|
|
46
|
+
return await b(x), t.modules = T, H || c({ ...t, silent: r }), t;
|
|
28
47
|
} };
|
|
29
48
|
};
|
|
30
49
|
export {
|
|
31
|
-
|
|
50
|
+
tt as useSave
|
|
32
51
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { base64EncodeWithSpecialChars as d } from "../../utils/base64.js";
|
|
2
|
+
import { useHttp as p } from "../useHttp.js";
|
|
3
|
+
const w = "/allowlist/check-single-item", h = /(?:https?:\/\/|www\.)[^\s"'<>()]+/gi, u = /"\/\//gi, D = () => {
|
|
4
|
+
const { get: i } = p(), r = (e, o) => {
|
|
5
|
+
const c = `${e || ""} ${o || ""}`.replace(u, "https://").match(h) || [], t = /* @__PURE__ */ new Set();
|
|
6
|
+
return c.forEach((n) => {
|
|
7
|
+
const m = /^https?:\/\//i.test(n) ? n : `https://${n}`;
|
|
8
|
+
try {
|
|
9
|
+
const { hostname: a } = new URL(m);
|
|
10
|
+
a && t.add(a.replace(/^www\./i, "").toLowerCase());
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
}), [...t];
|
|
14
|
+
}, l = async (e) => {
|
|
15
|
+
const o = encodeURIComponent(d(`https://${e}`)), { data: s } = await i(`${w}?item=${o}&type=domain`);
|
|
16
|
+
return s.type === "success";
|
|
17
|
+
};
|
|
18
|
+
return { getBlockedDomains: async (e, o) => {
|
|
19
|
+
try {
|
|
20
|
+
const s = r(e, o);
|
|
21
|
+
return s.length ? (await Promise.all(
|
|
22
|
+
s.map(async (t) => ({ domain: t, allowlisted: await l(t) }))
|
|
23
|
+
)).filter((t) => !t.allowlisted).map((t) => t.domain) : [];
|
|
24
|
+
} catch (s) {
|
|
25
|
+
return console.error("[GUIDO_ALLOWLIST] getBlockedDomains failed", s), [];
|
|
26
|
+
}
|
|
27
|
+
} };
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
D as useAllowlistValidator
|
|
31
|
+
};
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-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-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-50dac6de]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-50dac6de]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-50dac6de]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-06afaecb]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-06afaecb]{min-height:504px}.iframe-wrapper[data-v-cbafc185]{width:258px}.iframe-scaled[data-v-cbafc185]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { DynamicContentNode } from '../generic';
|
|
9
9
|
import type { SavedTemplateDetails } from '../stripo';
|
|
10
|
+
import type { ActionButton } from '../toaster';
|
|
10
11
|
import * as v from 'valibot';
|
|
11
12
|
/**
|
|
12
13
|
* Handler function for external validation before save
|
|
@@ -14,6 +15,18 @@ import * as v from 'valibot';
|
|
|
14
15
|
* @returns Promise<boolean> - true if valid, false to cancel save
|
|
15
16
|
*/
|
|
16
17
|
export type ExternalValidationHandler = (data: Omit<SavedTemplateDetails, 'metadata'>) => Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Content for the domain-allowlist block toaster, supplied by the host. The host owns
|
|
20
|
+
* role-gating, the settings deep-link, and translated copy; Guido renders the result via
|
|
21
|
+
* its own toaster. `actionButton.onClick` runs the host action (e.g. the "Add to allowlist"
|
|
22
|
+
* deep-link). Returning null/void blocks the save with no toaster.
|
|
23
|
+
* @param blockedDomains - the non-allowlisted domains found in the template
|
|
24
|
+
*/
|
|
25
|
+
export interface AllowlistToastContent {
|
|
26
|
+
message: string;
|
|
27
|
+
actionButton?: ActionButton;
|
|
28
|
+
}
|
|
29
|
+
export type ResolveAllowlistToastHandler = (blockedDomains: string[]) => AllowlistToastContent | null | void;
|
|
17
30
|
/**
|
|
18
31
|
* Message type constants for email templates
|
|
19
32
|
*/
|
|
@@ -377,6 +390,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
377
390
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
378
391
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
379
392
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
393
|
+
/** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
|
|
394
|
+
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
380
395
|
}, undefined>;
|
|
381
396
|
/**
|
|
382
397
|
* Default block types available in Stripo
|
|
@@ -582,6 +597,12 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
582
597
|
* Return false to cancel the save operation.
|
|
583
598
|
*/
|
|
584
599
|
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
600
|
+
/**
|
|
601
|
+
* Resolves the block toaster's content when the domain-allowlist check (features.allowlistEnabled)
|
|
602
|
+
* blocks a save. Host-supplied so role-gating, the settings deep-link, and copy stay host-side.
|
|
603
|
+
* Returning null/void blocks the save with no toaster.
|
|
604
|
+
*/
|
|
605
|
+
readonly resolveAllowlistToast: v.OptionalSchema<v.CustomSchema<ResolveAllowlistToastHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
585
606
|
}, undefined>;
|
|
586
607
|
/**
|
|
587
608
|
* Complete Guido configuration schema
|
|
@@ -764,6 +785,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
764
785
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
765
786
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
766
787
|
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
788
|
+
/** Enable pre-save domain-allowlist validation (opt-in; host supplies the block toaster via callbacks.resolveAllowlistToast) */
|
|
789
|
+
readonly allowlistEnabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
767
790
|
}, undefined>, {}>;
|
|
768
791
|
/** Block configuration */
|
|
769
792
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -834,5 +857,11 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
834
857
|
* Return false to cancel the save operation.
|
|
835
858
|
*/
|
|
836
859
|
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
860
|
+
/**
|
|
861
|
+
* Resolves the block toaster's content when the domain-allowlist check (features.allowlistEnabled)
|
|
862
|
+
* blocks a save. Host-supplied so role-gating, the settings deep-link, and copy stay host-side.
|
|
863
|
+
* Returning null/void blocks the save with no toaster.
|
|
864
|
+
*/
|
|
865
|
+
readonly resolveAllowlistToast: v.OptionalSchema<v.CustomSchema<ResolveAllowlistToastHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
837
866
|
}, undefined>, {}>;
|
|
838
867
|
}, undefined>;
|
|
@@ -96,6 +96,7 @@ export declare const useConfig: () => {
|
|
|
96
96
|
modulesDisabled: boolean;
|
|
97
97
|
liquidSyntax: boolean;
|
|
98
98
|
autosave: boolean;
|
|
99
|
+
allowlistEnabled: boolean;
|
|
99
100
|
};
|
|
100
101
|
blocks: {
|
|
101
102
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -135,6 +136,7 @@ export declare const useConfig: () => {
|
|
|
135
136
|
};
|
|
136
137
|
callbacks: {
|
|
137
138
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
139
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
138
140
|
};
|
|
139
141
|
} | null>;
|
|
140
142
|
initialized: import("vue").Ref<boolean>;
|
|
@@ -227,6 +229,7 @@ export declare const useConfig: () => {
|
|
|
227
229
|
modulesDisabled: boolean;
|
|
228
230
|
liquidSyntax: boolean;
|
|
229
231
|
autosave: boolean;
|
|
232
|
+
allowlistEnabled: boolean;
|
|
230
233
|
} | null>;
|
|
231
234
|
blocks: import("vue").ComputedRef<{
|
|
232
235
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -266,6 +269,7 @@ export declare const useConfig: () => {
|
|
|
266
269
|
} | null>;
|
|
267
270
|
callbacks: import("vue").ComputedRef<{
|
|
268
271
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
272
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
269
273
|
} | null>;
|
|
270
274
|
templateId: import("vue").ComputedRef<string>;
|
|
271
275
|
userId: import("vue").ComputedRef<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-save domain-allowlist validation. Extracts every external domain from the compiled
|
|
3
|
+
* HTML/CSS and asks the backend whether each is allowlisted, so an un-allowlisted link can
|
|
4
|
+
* block the save BEFORE anything is persisted. Gated by `features.allowlistEnabled` in
|
|
5
|
+
* `useSave`; the block toaster is rendered by Guido from host-supplied content.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useAllowlistValidator: () => {
|
|
8
|
+
getBlockedDomains: (html: string, css: string) => Promise<string[]>;
|
|
9
|
+
};
|
|
@@ -101,6 +101,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
101
101
|
modulesDisabled: boolean;
|
|
102
102
|
liquidSyntax: boolean;
|
|
103
103
|
autosave: boolean;
|
|
104
|
+
allowlistEnabled: boolean;
|
|
104
105
|
};
|
|
105
106
|
blocks: {
|
|
106
107
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -140,6 +141,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
140
141
|
};
|
|
141
142
|
callbacks: {
|
|
142
143
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
144
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
143
145
|
};
|
|
144
146
|
} | null;
|
|
145
147
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => IdentityConfig | null;
|
|
@@ -238,6 +240,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
238
240
|
modulesDisabled: boolean;
|
|
239
241
|
liquidSyntax: boolean;
|
|
240
242
|
autosave: boolean;
|
|
243
|
+
allowlistEnabled: boolean;
|
|
241
244
|
};
|
|
242
245
|
blocks: {
|
|
243
246
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -277,6 +280,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
277
280
|
};
|
|
278
281
|
callbacks: {
|
|
279
282
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
283
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
280
284
|
};
|
|
281
285
|
} | null;
|
|
282
286
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => PartnerConfig | null;
|
|
@@ -375,6 +379,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
375
379
|
modulesDisabled: boolean;
|
|
376
380
|
liquidSyntax: boolean;
|
|
377
381
|
autosave: boolean;
|
|
382
|
+
allowlistEnabled: boolean;
|
|
378
383
|
};
|
|
379
384
|
blocks: {
|
|
380
385
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -414,6 +419,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
414
419
|
};
|
|
415
420
|
callbacks: {
|
|
416
421
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
422
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
417
423
|
};
|
|
418
424
|
} | null;
|
|
419
425
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => TemplateConfig | null;
|
|
@@ -512,6 +518,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
512
518
|
modulesDisabled: boolean;
|
|
513
519
|
liquidSyntax: boolean;
|
|
514
520
|
autosave: boolean;
|
|
521
|
+
allowlistEnabled: boolean;
|
|
515
522
|
};
|
|
516
523
|
blocks: {
|
|
517
524
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -551,6 +558,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
551
558
|
};
|
|
552
559
|
callbacks: {
|
|
553
560
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
561
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
554
562
|
};
|
|
555
563
|
} | null;
|
|
556
564
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => EditorConfig | null;
|
|
@@ -649,6 +657,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
649
657
|
modulesDisabled: boolean;
|
|
650
658
|
liquidSyntax: boolean;
|
|
651
659
|
autosave: boolean;
|
|
660
|
+
allowlistEnabled: boolean;
|
|
652
661
|
};
|
|
653
662
|
blocks: {
|
|
654
663
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -688,6 +697,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
688
697
|
};
|
|
689
698
|
callbacks: {
|
|
690
699
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
700
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
691
701
|
};
|
|
692
702
|
} | null;
|
|
693
703
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => UIConfig | null;
|
|
@@ -786,6 +796,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
786
796
|
modulesDisabled: boolean;
|
|
787
797
|
liquidSyntax: boolean;
|
|
788
798
|
autosave: boolean;
|
|
799
|
+
allowlistEnabled: boolean;
|
|
789
800
|
};
|
|
790
801
|
blocks: {
|
|
791
802
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -825,6 +836,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
825
836
|
};
|
|
826
837
|
callbacks: {
|
|
827
838
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
839
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
828
840
|
};
|
|
829
841
|
} | null;
|
|
830
842
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => FeaturesConfig | null;
|
|
@@ -923,6 +935,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
923
935
|
modulesDisabled: boolean;
|
|
924
936
|
liquidSyntax: boolean;
|
|
925
937
|
autosave: boolean;
|
|
938
|
+
allowlistEnabled: boolean;
|
|
926
939
|
};
|
|
927
940
|
blocks: {
|
|
928
941
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -962,6 +975,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
962
975
|
};
|
|
963
976
|
callbacks: {
|
|
964
977
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
978
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
965
979
|
};
|
|
966
980
|
} | null;
|
|
967
981
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => BlocksConfig | null;
|
|
@@ -1060,6 +1074,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1060
1074
|
modulesDisabled: boolean;
|
|
1061
1075
|
liquidSyntax: boolean;
|
|
1062
1076
|
autosave: boolean;
|
|
1077
|
+
allowlistEnabled: boolean;
|
|
1063
1078
|
};
|
|
1064
1079
|
blocks: {
|
|
1065
1080
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1099,6 +1114,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1099
1114
|
};
|
|
1100
1115
|
callbacks: {
|
|
1101
1116
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1117
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1102
1118
|
};
|
|
1103
1119
|
} | null;
|
|
1104
1120
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CompilerConfig | null;
|
|
@@ -1197,6 +1213,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1197
1213
|
modulesDisabled: boolean;
|
|
1198
1214
|
liquidSyntax: boolean;
|
|
1199
1215
|
autosave: boolean;
|
|
1216
|
+
allowlistEnabled: boolean;
|
|
1200
1217
|
};
|
|
1201
1218
|
blocks: {
|
|
1202
1219
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1236,6 +1253,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1236
1253
|
};
|
|
1237
1254
|
callbacks: {
|
|
1238
1255
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1256
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1239
1257
|
};
|
|
1240
1258
|
} | null;
|
|
1241
1259
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => CallbacksConfig | null;
|
|
@@ -1334,6 +1352,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1334
1352
|
modulesDisabled: boolean;
|
|
1335
1353
|
liquidSyntax: boolean;
|
|
1336
1354
|
autosave: boolean;
|
|
1355
|
+
allowlistEnabled: boolean;
|
|
1337
1356
|
};
|
|
1338
1357
|
blocks: {
|
|
1339
1358
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1373,6 +1392,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1373
1392
|
};
|
|
1374
1393
|
callbacks: {
|
|
1375
1394
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1395
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1376
1396
|
};
|
|
1377
1397
|
} | null;
|
|
1378
1398
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
@@ -1471,6 +1491,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1471
1491
|
modulesDisabled: boolean;
|
|
1472
1492
|
liquidSyntax: boolean;
|
|
1473
1493
|
autosave: boolean;
|
|
1494
|
+
allowlistEnabled: boolean;
|
|
1474
1495
|
};
|
|
1475
1496
|
blocks: {
|
|
1476
1497
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1510,6 +1531,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1510
1531
|
};
|
|
1511
1532
|
callbacks: {
|
|
1512
1533
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1534
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1513
1535
|
};
|
|
1514
1536
|
} | null;
|
|
1515
1537
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
@@ -1608,6 +1630,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1608
1630
|
modulesDisabled: boolean;
|
|
1609
1631
|
liquidSyntax: boolean;
|
|
1610
1632
|
autosave: boolean;
|
|
1633
|
+
allowlistEnabled: boolean;
|
|
1611
1634
|
};
|
|
1612
1635
|
blocks: {
|
|
1613
1636
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1647,6 +1670,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1647
1670
|
};
|
|
1648
1671
|
callbacks: {
|
|
1649
1672
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1673
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1650
1674
|
};
|
|
1651
1675
|
} | null;
|
|
1652
1676
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
@@ -1745,6 +1769,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1745
1769
|
modulesDisabled: boolean;
|
|
1746
1770
|
liquidSyntax: boolean;
|
|
1747
1771
|
autosave: boolean;
|
|
1772
|
+
allowlistEnabled: boolean;
|
|
1748
1773
|
};
|
|
1749
1774
|
blocks: {
|
|
1750
1775
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1784,6 +1809,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1784
1809
|
};
|
|
1785
1810
|
callbacks: {
|
|
1786
1811
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1812
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1787
1813
|
};
|
|
1788
1814
|
} | null;
|
|
1789
1815
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
@@ -1882,6 +1908,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1882
1908
|
modulesDisabled: boolean;
|
|
1883
1909
|
liquidSyntax: boolean;
|
|
1884
1910
|
autosave: boolean;
|
|
1911
|
+
allowlistEnabled: boolean;
|
|
1885
1912
|
};
|
|
1886
1913
|
blocks: {
|
|
1887
1914
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1921,6 +1948,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1921
1948
|
};
|
|
1922
1949
|
callbacks: {
|
|
1923
1950
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1951
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
1924
1952
|
};
|
|
1925
1953
|
} | null;
|
|
1926
1954
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
@@ -2019,6 +2047,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2019
2047
|
modulesDisabled: boolean;
|
|
2020
2048
|
liquidSyntax: boolean;
|
|
2021
2049
|
autosave: boolean;
|
|
2050
|
+
allowlistEnabled: boolean;
|
|
2022
2051
|
};
|
|
2023
2052
|
blocks: {
|
|
2024
2053
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2058,6 +2087,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2058
2087
|
};
|
|
2059
2088
|
callbacks: {
|
|
2060
2089
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2090
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
2061
2091
|
};
|
|
2062
2092
|
} | null;
|
|
2063
2093
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => number;
|
|
@@ -2156,6 +2186,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2156
2186
|
modulesDisabled: boolean;
|
|
2157
2187
|
liquidSyntax: boolean;
|
|
2158
2188
|
autosave: boolean;
|
|
2189
|
+
allowlistEnabled: boolean;
|
|
2159
2190
|
};
|
|
2160
2191
|
blocks: {
|
|
2161
2192
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2195,6 +2226,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2195
2226
|
};
|
|
2196
2227
|
callbacks: {
|
|
2197
2228
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2229
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
2198
2230
|
};
|
|
2199
2231
|
} | null;
|
|
2200
2232
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
@@ -2293,6 +2325,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2293
2325
|
modulesDisabled: boolean;
|
|
2294
2326
|
liquidSyntax: boolean;
|
|
2295
2327
|
autosave: boolean;
|
|
2328
|
+
allowlistEnabled: boolean;
|
|
2296
2329
|
};
|
|
2297
2330
|
blocks: {
|
|
2298
2331
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2332,6 +2365,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2332
2365
|
};
|
|
2333
2366
|
callbacks: {
|
|
2334
2367
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2368
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
2335
2369
|
};
|
|
2336
2370
|
} | null;
|
|
2337
2371
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => boolean;
|
|
@@ -2430,6 +2464,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2430
2464
|
modulesDisabled: boolean;
|
|
2431
2465
|
liquidSyntax: boolean;
|
|
2432
2466
|
autosave: boolean;
|
|
2467
|
+
allowlistEnabled: boolean;
|
|
2433
2468
|
};
|
|
2434
2469
|
blocks: {
|
|
2435
2470
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2469,6 +2504,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2469
2504
|
};
|
|
2470
2505
|
callbacks: {
|
|
2471
2506
|
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
2507
|
+
resolveAllowlistToast?: import("../@types/config/schemas").ResolveAllowlistToastHandler | undefined;
|
|
2472
2508
|
};
|
|
2473
2509
|
} | null;
|
|
2474
2510
|
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => (feature: keyof FeaturesConfig) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.12.0-beta.
|
|
3
|
+
"version": "3.12.0-beta.256a452",
|
|
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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"license": "ISC",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@stripoinc/ui-editor-extensions": "3.8.0",
|
|
47
|
-
"@useinsider/design-system-vue": "
|
|
47
|
+
"@useinsider/design-system-vue": "1.3.0",
|
|
48
48
|
"@vueuse/core": "11.3.0",
|
|
49
49
|
"lodash-es": "4.17.21",
|
|
50
50
|
"pinia": "2.3.1",
|