@useinsider/guido 3.5.1-beta.4b9dd49 → 3.5.1-beta.62862ff
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ModuleFolderDefaults as
|
|
2
|
-
import { object as o, number as n, optional as e, string as t, picklist as l, pipe as
|
|
1
|
+
import { ModuleFolderDefaults as p } from "../../enums/defaults.js";
|
|
2
|
+
import { object as o, number as n, optional as e, string as t, picklist as l, pipe as S, minLength as f, nullish as k, custom as h, boolean as a, array as c, record as y, literal as i, looseObject as g, variant as R, union as b, unknown as s } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const d = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -12,29 +12,33 @@ const d = {
|
|
|
12
12
|
ARCHITECT: 49,
|
|
13
13
|
/** Unsubscribe page builder */
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
},
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
}, C = o({
|
|
16
|
+
/**
|
|
17
|
+
* Unique identifier for the template being edited.
|
|
18
|
+
*
|
|
19
|
+
* Optional: a brand-new newsletter being designed has no saved template yet,
|
|
20
|
+
* so hosts may pass `null`/`undefined`. Normalizes to `''` to match the
|
|
21
|
+
* library's own internal handling (config getter, state bridge, editor stores
|
|
22
|
+
* all default templateId to `''`).
|
|
23
|
+
*/
|
|
24
|
+
templateId: k(t(), ""),
|
|
21
25
|
/** Unique identifier for the user editing the template */
|
|
22
|
-
userId:
|
|
26
|
+
userId: S(
|
|
23
27
|
t(),
|
|
24
|
-
|
|
28
|
+
f(1, "userId is required")
|
|
25
29
|
),
|
|
26
30
|
/** Optional variation ID for A/B testing */
|
|
27
31
|
variationId: e(t())
|
|
28
|
-
}),
|
|
32
|
+
}), T = o({
|
|
29
33
|
/** Fallback font name (e.g., "Georgia") */
|
|
30
34
|
name: t(),
|
|
31
35
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
36
|
family: t()
|
|
33
|
-
}),
|
|
37
|
+
}), A = o({
|
|
34
38
|
/** Partner/organization name (required) */
|
|
35
|
-
name:
|
|
39
|
+
name: S(
|
|
36
40
|
t(),
|
|
37
|
-
|
|
41
|
+
f(1, "partner.name is required")
|
|
38
42
|
),
|
|
39
43
|
/** Product type identifier */
|
|
40
44
|
productType: e(
|
|
@@ -53,8 +57,8 @@ const d = {
|
|
|
53
57
|
/** Display name for the current user */
|
|
54
58
|
username: e(t(), "Guido User"),
|
|
55
59
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
|
-
fallbackFont: e(
|
|
57
|
-
}),
|
|
60
|
+
fallbackFont: e(T)
|
|
61
|
+
}), I = o({
|
|
58
62
|
/** Display text for the dynamic content */
|
|
59
63
|
text: t(),
|
|
60
64
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -68,11 +72,11 @@ const d = {
|
|
|
68
72
|
value: t()
|
|
69
73
|
})
|
|
70
74
|
)
|
|
71
|
-
}),
|
|
75
|
+
}), E = g({
|
|
72
76
|
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
73
77
|
id: e(n()),
|
|
74
78
|
/** Decimal places for price display (legacy data may use string or number) */
|
|
75
|
-
decimalCount: e(
|
|
79
|
+
decimalCount: e(b([t(), n()])),
|
|
76
80
|
/** Pinned product IDs (empty array when filter-driven) */
|
|
77
81
|
productIds: e(c(s())),
|
|
78
82
|
/** Whether the block requested live products at send time */
|
|
@@ -106,10 +110,10 @@ const d = {
|
|
|
106
110
|
/** Block type marker used by some legacy variants */
|
|
107
111
|
blockType: e(t()),
|
|
108
112
|
/** Size variant marker (legacy data may use string or number) */
|
|
109
|
-
size: e(
|
|
113
|
+
size: e(b([t(), n()])),
|
|
110
114
|
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
111
115
|
verticalResponsiveness: e(a())
|
|
112
|
-
}),
|
|
116
|
+
}), L = o({
|
|
113
117
|
/**
|
|
114
118
|
* Legacy recommendation block configs keyed by block ID.
|
|
115
119
|
* Pass this when loading a template authored with the v1
|
|
@@ -117,17 +121,17 @@ const d = {
|
|
|
117
121
|
* strategy, currency, locale, and layout data.
|
|
118
122
|
*/
|
|
119
123
|
recommendationConfigs: e(
|
|
120
|
-
|
|
124
|
+
y(t(), E),
|
|
121
125
|
{}
|
|
122
126
|
)
|
|
123
|
-
}),
|
|
127
|
+
}), O = o({
|
|
124
128
|
/** Initial HTML content */
|
|
125
129
|
html: e(t(), ""),
|
|
126
130
|
/** Initial CSS content */
|
|
127
131
|
css: e(t(), ""),
|
|
128
132
|
/** Preselected dynamic content items */
|
|
129
133
|
preselectedDynamicContent: e(
|
|
130
|
-
c(
|
|
134
|
+
c(I),
|
|
131
135
|
[]
|
|
132
136
|
),
|
|
133
137
|
/** Valid custom field attribute names from the partner's categorized fields */
|
|
@@ -137,13 +141,13 @@ const d = {
|
|
|
137
141
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
138
142
|
forceRecreate: e(a(), !1),
|
|
139
143
|
/** Migration-only inputs (legacy block configs) */
|
|
140
|
-
migration: e(
|
|
141
|
-
}),
|
|
144
|
+
migration: e(L, {})
|
|
145
|
+
}), v = o({
|
|
142
146
|
/** Sender display name */
|
|
143
147
|
senderName: e(t(), ""),
|
|
144
148
|
/** Email subject line */
|
|
145
149
|
subject: e(t(), "")
|
|
146
|
-
}),
|
|
150
|
+
}), M = o({
|
|
147
151
|
/** Locale for the editor UI */
|
|
148
152
|
locale: e(t(), "en"),
|
|
149
153
|
/** Path to translations object */
|
|
@@ -151,17 +155,17 @@ const d = {
|
|
|
151
155
|
/** Migration date for template compatibility */
|
|
152
156
|
migrationDate: e(n(), 1759696858),
|
|
153
157
|
/** Email header settings */
|
|
154
|
-
emailHeader: e(
|
|
158
|
+
emailHeader: e(v, { senderName: "", subject: "" }),
|
|
155
159
|
/** Folder name for user-saved modules (used by Stripo plugin panel for path construction) */
|
|
156
|
-
savedModulesFolderName: e(t(),
|
|
160
|
+
savedModulesFolderName: e(t(), p.SAVED_MODULES),
|
|
157
161
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
158
|
-
defaultModulesFolderName: e(t(),
|
|
159
|
-
}),
|
|
162
|
+
defaultModulesFolderName: e(t(), p.DEFAULT_MODULES)
|
|
163
|
+
}), P = o({
|
|
160
164
|
/** Whether to show the header bar */
|
|
161
165
|
showHeader: e(a(), !0),
|
|
162
166
|
/** Custom label for back button (if shown) */
|
|
163
167
|
backButtonLabel: e(t())
|
|
164
|
-
}),
|
|
168
|
+
}), N = o({
|
|
165
169
|
/** Enable dynamic content insertion */
|
|
166
170
|
dynamicContent: e(a(), !0),
|
|
167
171
|
/** Enable save as template functionality */
|
|
@@ -180,7 +184,7 @@ const d = {
|
|
|
180
184
|
liquidSyntax: e(a(), !1),
|
|
181
185
|
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
182
186
|
autosave: e(a(), !1)
|
|
183
|
-
}),
|
|
187
|
+
}), D = l([
|
|
184
188
|
"amp-accordion",
|
|
185
189
|
"amp-carousel",
|
|
186
190
|
"amp-form-controls",
|
|
@@ -194,7 +198,7 @@ const d = {
|
|
|
194
198
|
"text-block",
|
|
195
199
|
"timer-block",
|
|
196
200
|
"video-block"
|
|
197
|
-
]),
|
|
201
|
+
]), x = l([
|
|
198
202
|
"dynamic-content",
|
|
199
203
|
"checkbox-block",
|
|
200
204
|
"radio-button-block",
|
|
@@ -202,15 +206,15 @@ const d = {
|
|
|
202
206
|
"unsubscribe-block",
|
|
203
207
|
"coupon-block",
|
|
204
208
|
"items-block"
|
|
205
|
-
]),
|
|
209
|
+
]), F = o({
|
|
206
210
|
/** Default blocks to exclude from the editor */
|
|
207
211
|
excludeDefaults: e(
|
|
208
|
-
c(
|
|
212
|
+
c(D),
|
|
209
213
|
[]
|
|
210
214
|
),
|
|
211
215
|
/** Custom blocks to include in the editor */
|
|
212
216
|
includeCustoms: e(
|
|
213
|
-
c(
|
|
217
|
+
c(x),
|
|
214
218
|
[]
|
|
215
219
|
)
|
|
216
220
|
}), m = o({
|
|
@@ -220,7 +224,7 @@ const d = {
|
|
|
220
224
|
description: e(t()),
|
|
221
225
|
/** Priority for rule ordering (lower = earlier) */
|
|
222
226
|
priority: n()
|
|
223
|
-
}),
|
|
227
|
+
}), U = o({
|
|
224
228
|
...m.entries,
|
|
225
229
|
type: i("replace"),
|
|
226
230
|
/** String to search for */
|
|
@@ -229,7 +233,7 @@ const d = {
|
|
|
229
233
|
replacement: t(),
|
|
230
234
|
/** Replace all occurrences (default: false) */
|
|
231
235
|
replaceAll: e(a())
|
|
232
|
-
}),
|
|
236
|
+
}), B = o({
|
|
233
237
|
...m.entries,
|
|
234
238
|
type: i("regex"),
|
|
235
239
|
/** Regex pattern string */
|
|
@@ -238,12 +242,12 @@ const d = {
|
|
|
238
242
|
replacement: t(),
|
|
239
243
|
/** Regex flags (e.g., 'gi') */
|
|
240
244
|
flags: e(t())
|
|
241
|
-
}),
|
|
245
|
+
}), w = o({
|
|
242
246
|
...m.entries,
|
|
243
247
|
type: i("remove"),
|
|
244
248
|
/** Strings or patterns to remove */
|
|
245
249
|
targets: c(t())
|
|
246
|
-
}),
|
|
250
|
+
}), H = o({
|
|
247
251
|
...m.entries,
|
|
248
252
|
type: i("custom"),
|
|
249
253
|
/** Custom processor function */
|
|
@@ -251,17 +255,17 @@ const d = {
|
|
|
251
255
|
(u) => typeof u == "function",
|
|
252
256
|
"processor must be a function"
|
|
253
257
|
)
|
|
254
|
-
}),
|
|
255
|
-
F,
|
|
258
|
+
}), j = R("type", [
|
|
256
259
|
U,
|
|
257
260
|
B,
|
|
258
|
-
w
|
|
259
|
-
|
|
261
|
+
w,
|
|
262
|
+
H
|
|
263
|
+
]), q = o({
|
|
260
264
|
/** Custom compiler rules to apply */
|
|
261
|
-
customRules: e(c(
|
|
265
|
+
customRules: e(c(j), []),
|
|
262
266
|
/** Skip default compiler rules */
|
|
263
267
|
ignoreDefaultRules: e(a(), !1)
|
|
264
|
-
}),
|
|
268
|
+
}), G = o({
|
|
265
269
|
/**
|
|
266
270
|
* External validation handler called before save completes.
|
|
267
271
|
* Return false to cancel the save operation.
|
|
@@ -272,51 +276,51 @@ const d = {
|
|
|
272
276
|
"externalValidation must be a function"
|
|
273
277
|
)
|
|
274
278
|
)
|
|
275
|
-
}),
|
|
279
|
+
}), z = o({
|
|
276
280
|
// Required sections
|
|
277
281
|
/** Identity configuration (required) */
|
|
278
|
-
identity:
|
|
282
|
+
identity: C,
|
|
279
283
|
/** Partner configuration (required) */
|
|
280
|
-
partner:
|
|
284
|
+
partner: A,
|
|
281
285
|
// Optional sections (with defaults)
|
|
282
286
|
/** Template content and presets */
|
|
283
|
-
template: e(
|
|
287
|
+
template: e(O, {}),
|
|
284
288
|
/** Editor settings */
|
|
285
|
-
editor: e(
|
|
289
|
+
editor: e(M, {}),
|
|
286
290
|
/** UI configuration */
|
|
287
|
-
ui: e(
|
|
291
|
+
ui: e(P, {}),
|
|
288
292
|
/** Feature toggles */
|
|
289
|
-
features: e(
|
|
293
|
+
features: e(N, {}),
|
|
290
294
|
/** Block configuration */
|
|
291
|
-
blocks: e(
|
|
295
|
+
blocks: e(F, {}),
|
|
292
296
|
/** Compiler configuration */
|
|
293
|
-
compiler: e(
|
|
297
|
+
compiler: e(q, {}),
|
|
294
298
|
/** Callbacks and event handlers */
|
|
295
|
-
callbacks: e(
|
|
299
|
+
callbacks: e(G, {})
|
|
296
300
|
});
|
|
297
301
|
export {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
302
|
+
F as BlocksSchema,
|
|
303
|
+
G as CallbacksSchema,
|
|
304
|
+
j as CompilerRuleSchema,
|
|
305
|
+
q as CompilerSchema,
|
|
306
|
+
x as CustomBlockTypeSchema,
|
|
307
|
+
H as CustomRuleSchema,
|
|
308
|
+
D as DefaultBlockTypeSchema,
|
|
309
|
+
I as DynamicContentSchema,
|
|
310
|
+
M as EditorSchema,
|
|
311
|
+
v as EmailHeaderSchema,
|
|
312
|
+
T as FallbackFontSchema,
|
|
313
|
+
N as FeaturesSchema,
|
|
314
|
+
z as GuidoConfigSchema,
|
|
315
|
+
C as IdentitySchema,
|
|
316
|
+
E as LegacyRecommendationConfigSchema,
|
|
313
317
|
d as MessageType,
|
|
314
|
-
|
|
318
|
+
A as PartnerSchema,
|
|
315
319
|
r as ProductType,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
B as RegexRuleSchema,
|
|
321
|
+
w as RemoveRuleSchema,
|
|
322
|
+
U as ReplaceRuleSchema,
|
|
323
|
+
L as TemplateMigrationSchema,
|
|
324
|
+
O as TemplateSchema,
|
|
325
|
+
P as UISchema
|
|
322
326
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let m;
|
|
2
2
|
// @__NO_SIDE_EFFECTS__
|
|
3
|
-
function
|
|
3
|
+
function _(n) {
|
|
4
4
|
return {
|
|
5
5
|
lang: (n == null ? void 0 : n.lang) ?? (m == null ? void 0 : m.lang),
|
|
6
6
|
message: n == null ? void 0 : n.message,
|
|
@@ -8,30 +8,30 @@ function j(n) {
|
|
|
8
8
|
abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (m == null ? void 0 : m.abortPipeEarly)
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
let
|
|
11
|
+
let x;
|
|
12
12
|
// @__NO_SIDE_EFFECTS__
|
|
13
13
|
function A(n) {
|
|
14
|
-
return
|
|
14
|
+
return x == null ? void 0 : x.get(n);
|
|
15
15
|
}
|
|
16
|
-
let
|
|
16
|
+
let E;
|
|
17
17
|
// @__NO_SIDE_EFFECTS__
|
|
18
18
|
function q(n) {
|
|
19
|
-
return
|
|
19
|
+
return E == null ? void 0 : E.get(n);
|
|
20
20
|
}
|
|
21
|
-
let
|
|
21
|
+
let j;
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
23
|
function K(n, s) {
|
|
24
24
|
var e;
|
|
25
|
-
return (e =
|
|
25
|
+
return (e = j == null ? void 0 : j.get(n)) == null ? void 0 : e.get(s);
|
|
26
26
|
}
|
|
27
27
|
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function
|
|
29
|
-
var e,
|
|
28
|
+
function D(n) {
|
|
29
|
+
var e, r;
|
|
30
30
|
const s = typeof n;
|
|
31
|
-
return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((
|
|
31
|
+
return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((r = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : r.name)) ?? "null" : s;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
const l =
|
|
33
|
+
function f(n, s, e, r, t) {
|
|
34
|
+
const l = t && "input" in t ? t.input : e.value, i = (t == null ? void 0 : t.expected) ?? n.expects ?? null, p = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ D(l), u = {
|
|
35
35
|
kind: n.kind,
|
|
36
36
|
type: n.type,
|
|
37
37
|
input: l,
|
|
@@ -39,12 +39,12 @@ function y(n, s, e, t, r) {
|
|
|
39
39
|
received: p,
|
|
40
40
|
message: `Invalid ${s}: ${i ? `Expected ${i} but r` : "R"}eceived ${p}`,
|
|
41
41
|
requirement: n.requirement,
|
|
42
|
-
path:
|
|
43
|
-
issues:
|
|
44
|
-
lang:
|
|
45
|
-
abortEarly:
|
|
46
|
-
abortPipeEarly:
|
|
47
|
-
}, a = n.kind === "schema", c = (
|
|
42
|
+
path: t == null ? void 0 : t.path,
|
|
43
|
+
issues: t == null ? void 0 : t.issues,
|
|
44
|
+
lang: r.lang,
|
|
45
|
+
abortEarly: r.abortEarly,
|
|
46
|
+
abortPipeEarly: r.abortPipeEarly
|
|
47
|
+
}, a = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ K(n.reference, u.lang) ?? (a ? /* @__PURE__ */ q(u.lang) : null) ?? r.message ?? /* @__PURE__ */ A(u.lang);
|
|
48
48
|
c !== void 0 && (u.message = typeof c == "function" ? c(u) : c), a && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
|
|
49
49
|
}
|
|
50
50
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -53,7 +53,7 @@ function o(n) {
|
|
|
53
53
|
version: 1,
|
|
54
54
|
vendor: "valibot",
|
|
55
55
|
validate(s) {
|
|
56
|
-
return n["~run"]({ value: s }, /* @__PURE__ */
|
|
56
|
+
return n["~run"]({ value: s }, /* @__PURE__ */ _());
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -62,7 +62,7 @@ function S(n, s) {
|
|
|
62
62
|
return Object.hasOwn(n, s) && s !== "__proto__" && s !== "prototype" && s !== "constructor";
|
|
63
63
|
}
|
|
64
64
|
// @__NO_SIDE_EFFECTS__
|
|
65
|
-
function
|
|
65
|
+
function P(n, s) {
|
|
66
66
|
const e = [...new Set(n)];
|
|
67
67
|
return e.length > 1 ? `(${e.join(` ${s} `)})` : e[0] ?? "never";
|
|
68
68
|
}
|
|
@@ -76,8 +76,8 @@ function M(n, s) {
|
|
|
76
76
|
expects: null,
|
|
77
77
|
requirement: n,
|
|
78
78
|
message: s,
|
|
79
|
-
async "~run"(e,
|
|
80
|
-
return e.typed && !await this.requirement(e.value) &&
|
|
79
|
+
async "~run"(e, r) {
|
|
80
|
+
return e.typed && !await this.requirement(e.value) && f(this, "input", e, r), e;
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
}
|
|
@@ -91,8 +91,8 @@ function V(n, s) {
|
|
|
91
91
|
expects: `<=${n}`,
|
|
92
92
|
requirement: n,
|
|
93
93
|
message: s,
|
|
94
|
-
"~run"(e,
|
|
95
|
-
return e.typed && e.value.length > this.requirement &&
|
|
94
|
+
"~run"(e, r) {
|
|
95
|
+
return e.typed && e.value.length > this.requirement && f(this, "length", e, r, { received: `${e.value.length}` }), e;
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}
|
|
@@ -106,8 +106,8 @@ function G(n, s) {
|
|
|
106
106
|
expects: `>=${n}`,
|
|
107
107
|
requirement: n,
|
|
108
108
|
message: s,
|
|
109
|
-
"~run"(e,
|
|
110
|
-
return e.typed && e.value.length < this.requirement &&
|
|
109
|
+
"~run"(e, r) {
|
|
110
|
+
return e.typed && e.value.length < this.requirement && f(this, "length", e, r, { received: `${e.value.length}` }), e;
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
}
|
|
@@ -121,7 +121,7 @@ function L(n) {
|
|
|
121
121
|
expects: "!0",
|
|
122
122
|
message: n,
|
|
123
123
|
"~run"(s, e) {
|
|
124
|
-
return s.typed && s.value.length === 0 &&
|
|
124
|
+
return s.typed && s.value.length === 0 && f(this, "length", s, e, { received: "0" }), s;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
@@ -142,7 +142,7 @@ function I(n, s, e) {
|
|
|
142
142
|
return typeof n.fallback == "function" ? n.fallback(s, e) : n.fallback;
|
|
143
143
|
}
|
|
144
144
|
// @__NO_SIDE_EFFECTS__
|
|
145
|
-
function
|
|
145
|
+
function g(n, s, e) {
|
|
146
146
|
return typeof n.default == "function" ? n.default(s, e) : n.default;
|
|
147
147
|
}
|
|
148
148
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -158,31 +158,31 @@ function C(n, s) {
|
|
|
158
158
|
get "~standard"() {
|
|
159
159
|
return /* @__PURE__ */ o(this);
|
|
160
160
|
},
|
|
161
|
-
"~run"(e,
|
|
161
|
+
"~run"(e, r) {
|
|
162
162
|
var l;
|
|
163
|
-
const
|
|
164
|
-
if (Array.isArray(
|
|
163
|
+
const t = e.value;
|
|
164
|
+
if (Array.isArray(t)) {
|
|
165
165
|
e.typed = !0, e.value = [];
|
|
166
|
-
for (let i = 0; i <
|
|
167
|
-
const p =
|
|
166
|
+
for (let i = 0; i < t.length; i++) {
|
|
167
|
+
const p = t[i], u = this.item["~run"]({ value: p }, r);
|
|
168
168
|
if (u.issues) {
|
|
169
169
|
const a = {
|
|
170
170
|
type: "array",
|
|
171
171
|
origin: "value",
|
|
172
|
-
input:
|
|
172
|
+
input: t,
|
|
173
173
|
key: i,
|
|
174
174
|
value: p
|
|
175
175
|
};
|
|
176
176
|
for (const c of u.issues)
|
|
177
177
|
c.path ? c.path.unshift(a) : c.path = [a], (l = e.issues) == null || l.push(c);
|
|
178
|
-
if (e.issues || (e.issues = u.issues),
|
|
178
|
+
if (e.issues || (e.issues = u.issues), r.abortEarly) {
|
|
179
179
|
e.typed = !1;
|
|
180
180
|
break;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
u.typed || (e.typed = !1), e.value.push(u.value);
|
|
184
184
|
}
|
|
185
|
-
} else
|
|
185
|
+
} else f(this, "type", e, r);
|
|
186
186
|
return e;
|
|
187
187
|
}
|
|
188
188
|
};
|
|
@@ -200,7 +200,7 @@ function F(n) {
|
|
|
200
200
|
return /* @__PURE__ */ o(this);
|
|
201
201
|
},
|
|
202
202
|
"~run"(s, e) {
|
|
203
|
-
return typeof s.value == "boolean" ? s.typed = !0 :
|
|
203
|
+
return typeof s.value == "boolean" ? s.typed = !0 : f(this, "type", s, e), s;
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
}
|
|
@@ -217,8 +217,8 @@ function R(n, s) {
|
|
|
217
217
|
get "~standard"() {
|
|
218
218
|
return /* @__PURE__ */ o(this);
|
|
219
219
|
},
|
|
220
|
-
"~run"(e,
|
|
221
|
-
return this.check(e.value) ? e.typed = !0 :
|
|
220
|
+
"~run"(e, r) {
|
|
221
|
+
return this.check(e.value) ? e.typed = !0 : f(this, "type", e, r), e;
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
}
|
|
@@ -228,15 +228,15 @@ function z(n, s) {
|
|
|
228
228
|
kind: "schema",
|
|
229
229
|
type: "literal",
|
|
230
230
|
reference: z,
|
|
231
|
-
expects: /* @__PURE__ */
|
|
231
|
+
expects: /* @__PURE__ */ D(n),
|
|
232
232
|
async: !1,
|
|
233
233
|
literal: n,
|
|
234
234
|
message: s,
|
|
235
235
|
get "~standard"() {
|
|
236
236
|
return /* @__PURE__ */ o(this);
|
|
237
237
|
},
|
|
238
|
-
"~run"(e,
|
|
239
|
-
return e.value === this.literal ? e.typed = !0 :
|
|
238
|
+
"~run"(e, r) {
|
|
239
|
+
return e.value === this.literal ? e.typed = !0 : f(this, "type", e, r), e;
|
|
240
240
|
}
|
|
241
241
|
};
|
|
242
242
|
}
|
|
@@ -253,58 +253,76 @@ function B(n, s) {
|
|
|
253
253
|
get "~standard"() {
|
|
254
254
|
return /* @__PURE__ */ o(this);
|
|
255
255
|
},
|
|
256
|
-
"~run"(e,
|
|
256
|
+
"~run"(e, r) {
|
|
257
257
|
var l;
|
|
258
|
-
const
|
|
259
|
-
if (
|
|
258
|
+
const t = e.value;
|
|
259
|
+
if (t && typeof t == "object") {
|
|
260
260
|
e.typed = !0, e.value = {};
|
|
261
261
|
for (const i in this.entries) {
|
|
262
262
|
const p = this.entries[i];
|
|
263
|
-
if (i in
|
|
264
|
-
const u = i in
|
|
263
|
+
if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && p.default !== void 0) {
|
|
264
|
+
const u = i in t ? t[i] : /* @__PURE__ */ g(p), a = p["~run"]({ value: u }, r);
|
|
265
265
|
if (a.issues) {
|
|
266
266
|
const c = {
|
|
267
267
|
type: "object",
|
|
268
268
|
origin: "value",
|
|
269
|
-
input:
|
|
269
|
+
input: t,
|
|
270
270
|
key: i,
|
|
271
271
|
value: u
|
|
272
272
|
};
|
|
273
|
-
for (const
|
|
274
|
-
|
|
275
|
-
if (e.issues || (e.issues = a.issues),
|
|
273
|
+
for (const y of a.issues)
|
|
274
|
+
y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
|
|
275
|
+
if (e.issues || (e.issues = a.issues), r.abortEarly) {
|
|
276
276
|
e.typed = !1;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
a.typed || (e.typed = !1), e.value[i] = a.value;
|
|
281
281
|
} else if (p.fallback !== void 0) e.value[i] = /* @__PURE__ */ I(p);
|
|
282
|
-
else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (
|
|
282
|
+
else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (f(this, "key", e, r, {
|
|
283
283
|
input: void 0,
|
|
284
284
|
expected: `"${i}"`,
|
|
285
285
|
path: [{
|
|
286
286
|
type: "object",
|
|
287
287
|
origin: "key",
|
|
288
|
-
input:
|
|
288
|
+
input: t,
|
|
289
289
|
key: i,
|
|
290
|
-
value:
|
|
290
|
+
value: t[i]
|
|
291
291
|
}]
|
|
292
|
-
}),
|
|
292
|
+
}), r.abortEarly))
|
|
293
293
|
break;
|
|
294
294
|
}
|
|
295
|
-
if (!e.issues || !
|
|
296
|
-
for (const i in
|
|
297
|
-
} else
|
|
295
|
+
if (!e.issues || !r.abortEarly)
|
|
296
|
+
for (const i in t) /* @__PURE__ */ S(t, i) && !(i in this.entries) && (e.value[i] = t[i]);
|
|
297
|
+
} else f(this, "type", e, r);
|
|
298
298
|
return e;
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
302
|
// @__NO_SIDE_EFFECTS__
|
|
303
|
-
function H(n) {
|
|
303
|
+
function H(n, s) {
|
|
304
304
|
return {
|
|
305
305
|
kind: "schema",
|
|
306
|
-
type: "
|
|
306
|
+
type: "nullish",
|
|
307
307
|
reference: H,
|
|
308
|
+
expects: `(${n.expects} | null | undefined)`,
|
|
309
|
+
async: !1,
|
|
310
|
+
wrapped: n,
|
|
311
|
+
default: s,
|
|
312
|
+
get "~standard"() {
|
|
313
|
+
return /* @__PURE__ */ o(this);
|
|
314
|
+
},
|
|
315
|
+
"~run"(e, r) {
|
|
316
|
+
return (e.value === null || e.value === void 0) && (this.default !== void 0 && (e.value = /* @__PURE__ */ g(this, e, r)), e.value === null || e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
// @__NO_SIDE_EFFECTS__
|
|
321
|
+
function J(n) {
|
|
322
|
+
return {
|
|
323
|
+
kind: "schema",
|
|
324
|
+
type: "number",
|
|
325
|
+
reference: J,
|
|
308
326
|
expects: "number",
|
|
309
327
|
async: !1,
|
|
310
328
|
message: n,
|
|
@@ -312,16 +330,16 @@ function H(n) {
|
|
|
312
330
|
return /* @__PURE__ */ o(this);
|
|
313
331
|
},
|
|
314
332
|
"~run"(s, e) {
|
|
315
|
-
return typeof s.value == "number" && !isNaN(s.value) ? s.typed = !0 :
|
|
333
|
+
return typeof s.value == "number" && !isNaN(s.value) ? s.typed = !0 : f(this, "type", s, e), s;
|
|
316
334
|
}
|
|
317
335
|
};
|
|
318
336
|
}
|
|
319
337
|
// @__NO_SIDE_EFFECTS__
|
|
320
|
-
function
|
|
338
|
+
function Q(n, s) {
|
|
321
339
|
return {
|
|
322
340
|
kind: "schema",
|
|
323
341
|
type: "object",
|
|
324
|
-
reference:
|
|
342
|
+
reference: Q,
|
|
325
343
|
expects: "Object",
|
|
326
344
|
async: !1,
|
|
327
345
|
entries: n,
|
|
@@ -329,56 +347,56 @@ function J(n, s) {
|
|
|
329
347
|
get "~standard"() {
|
|
330
348
|
return /* @__PURE__ */ o(this);
|
|
331
349
|
},
|
|
332
|
-
"~run"(e,
|
|
350
|
+
"~run"(e, r) {
|
|
333
351
|
var l;
|
|
334
|
-
const
|
|
335
|
-
if (
|
|
352
|
+
const t = e.value;
|
|
353
|
+
if (t && typeof t == "object") {
|
|
336
354
|
e.typed = !0, e.value = {};
|
|
337
355
|
for (const i in this.entries) {
|
|
338
356
|
const p = this.entries[i];
|
|
339
|
-
if (i in
|
|
340
|
-
const u = i in
|
|
357
|
+
if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && p.default !== void 0) {
|
|
358
|
+
const u = i in t ? t[i] : /* @__PURE__ */ g(p), a = p["~run"]({ value: u }, r);
|
|
341
359
|
if (a.issues) {
|
|
342
360
|
const c = {
|
|
343
361
|
type: "object",
|
|
344
362
|
origin: "value",
|
|
345
|
-
input:
|
|
363
|
+
input: t,
|
|
346
364
|
key: i,
|
|
347
365
|
value: u
|
|
348
366
|
};
|
|
349
|
-
for (const
|
|
350
|
-
|
|
351
|
-
if (e.issues || (e.issues = a.issues),
|
|
367
|
+
for (const y of a.issues)
|
|
368
|
+
y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
|
|
369
|
+
if (e.issues || (e.issues = a.issues), r.abortEarly) {
|
|
352
370
|
e.typed = !1;
|
|
353
371
|
break;
|
|
354
372
|
}
|
|
355
373
|
}
|
|
356
374
|
a.typed || (e.typed = !1), e.value[i] = a.value;
|
|
357
375
|
} else if (p.fallback !== void 0) e.value[i] = /* @__PURE__ */ I(p);
|
|
358
|
-
else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (
|
|
376
|
+
else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (f(this, "key", e, r, {
|
|
359
377
|
input: void 0,
|
|
360
378
|
expected: `"${i}"`,
|
|
361
379
|
path: [{
|
|
362
380
|
type: "object",
|
|
363
381
|
origin: "key",
|
|
364
|
-
input:
|
|
382
|
+
input: t,
|
|
365
383
|
key: i,
|
|
366
|
-
value:
|
|
384
|
+
value: t[i]
|
|
367
385
|
}]
|
|
368
|
-
}),
|
|
386
|
+
}), r.abortEarly))
|
|
369
387
|
break;
|
|
370
388
|
}
|
|
371
|
-
} else
|
|
389
|
+
} else f(this, "type", e, r);
|
|
372
390
|
return e;
|
|
373
391
|
}
|
|
374
392
|
};
|
|
375
393
|
}
|
|
376
394
|
// @__NO_SIDE_EFFECTS__
|
|
377
|
-
function
|
|
395
|
+
function T(n, s) {
|
|
378
396
|
return {
|
|
379
397
|
kind: "schema",
|
|
380
398
|
type: "optional",
|
|
381
|
-
reference:
|
|
399
|
+
reference: T,
|
|
382
400
|
expects: `(${n.expects} | undefined)`,
|
|
383
401
|
async: !1,
|
|
384
402
|
wrapped: n,
|
|
@@ -386,35 +404,35 @@ function Q(n, s) {
|
|
|
386
404
|
get "~standard"() {
|
|
387
405
|
return /* @__PURE__ */ o(this);
|
|
388
406
|
},
|
|
389
|
-
"~run"(e,
|
|
390
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
407
|
+
"~run"(e, r) {
|
|
408
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ g(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
|
|
391
409
|
}
|
|
392
410
|
};
|
|
393
411
|
}
|
|
394
412
|
// @__NO_SIDE_EFFECTS__
|
|
395
|
-
function
|
|
413
|
+
function U(n, s) {
|
|
396
414
|
return {
|
|
397
415
|
kind: "schema",
|
|
398
416
|
type: "picklist",
|
|
399
|
-
reference:
|
|
400
|
-
expects: /* @__PURE__ */
|
|
417
|
+
reference: U,
|
|
418
|
+
expects: /* @__PURE__ */ P(n.map(D), "|"),
|
|
401
419
|
async: !1,
|
|
402
420
|
options: n,
|
|
403
421
|
message: s,
|
|
404
422
|
get "~standard"() {
|
|
405
423
|
return /* @__PURE__ */ o(this);
|
|
406
424
|
},
|
|
407
|
-
"~run"(e,
|
|
408
|
-
return this.options.includes(e.value) ? e.typed = !0 :
|
|
425
|
+
"~run"(e, r) {
|
|
426
|
+
return this.options.includes(e.value) ? e.typed = !0 : f(this, "type", e, r), e;
|
|
409
427
|
}
|
|
410
428
|
};
|
|
411
429
|
}
|
|
412
430
|
// @__NO_SIDE_EFFECTS__
|
|
413
|
-
function
|
|
431
|
+
function W(n, s, e) {
|
|
414
432
|
return {
|
|
415
433
|
kind: "schema",
|
|
416
434
|
type: "record",
|
|
417
|
-
reference:
|
|
435
|
+
reference: W,
|
|
418
436
|
expects: "Object",
|
|
419
437
|
async: !1,
|
|
420
438
|
key: n,
|
|
@@ -423,13 +441,13 @@ function U(n, s, e) {
|
|
|
423
441
|
get "~standard"() {
|
|
424
442
|
return /* @__PURE__ */ o(this);
|
|
425
443
|
},
|
|
426
|
-
"~run"(
|
|
444
|
+
"~run"(r, t) {
|
|
427
445
|
var i, p;
|
|
428
|
-
const l =
|
|
446
|
+
const l = r.value;
|
|
429
447
|
if (l && typeof l == "object") {
|
|
430
|
-
|
|
448
|
+
r.typed = !0, r.value = {};
|
|
431
449
|
for (const u in l) if (/* @__PURE__ */ S(l, u)) {
|
|
432
|
-
const a = l[u], c = this.key["~run"]({ value: u },
|
|
450
|
+
const a = l[u], c = this.key["~run"]({ value: u }, t);
|
|
433
451
|
if (c.issues) {
|
|
434
452
|
const b = {
|
|
435
453
|
type: "object",
|
|
@@ -439,14 +457,14 @@ function U(n, s, e) {
|
|
|
439
457
|
value: a
|
|
440
458
|
};
|
|
441
459
|
for (const h of c.issues)
|
|
442
|
-
h.path = [b], (i =
|
|
443
|
-
if (
|
|
444
|
-
|
|
460
|
+
h.path = [b], (i = r.issues) == null || i.push(h);
|
|
461
|
+
if (r.issues || (r.issues = c.issues), t.abortEarly) {
|
|
462
|
+
r.typed = !1;
|
|
445
463
|
break;
|
|
446
464
|
}
|
|
447
465
|
}
|
|
448
|
-
const
|
|
449
|
-
if (
|
|
466
|
+
const y = this.value["~run"]({ value: a }, t);
|
|
467
|
+
if (y.issues) {
|
|
450
468
|
const b = {
|
|
451
469
|
type: "object",
|
|
452
470
|
origin: "value",
|
|
@@ -454,26 +472,26 @@ function U(n, s, e) {
|
|
|
454
472
|
key: u,
|
|
455
473
|
value: a
|
|
456
474
|
};
|
|
457
|
-
for (const h of
|
|
458
|
-
h.path ? h.path.unshift(b) : h.path = [b], (p =
|
|
459
|
-
if (
|
|
460
|
-
|
|
475
|
+
for (const h of y.issues)
|
|
476
|
+
h.path ? h.path.unshift(b) : h.path = [b], (p = r.issues) == null || p.push(h);
|
|
477
|
+
if (r.issues || (r.issues = y.issues), t.abortEarly) {
|
|
478
|
+
r.typed = !1;
|
|
461
479
|
break;
|
|
462
480
|
}
|
|
463
481
|
}
|
|
464
|
-
(!c.typed || !
|
|
482
|
+
(!c.typed || !y.typed) && (r.typed = !1), c.typed && (r.value[c.value] = y.value);
|
|
465
483
|
}
|
|
466
|
-
} else
|
|
467
|
-
return
|
|
484
|
+
} else f(this, "type", r, t);
|
|
485
|
+
return r;
|
|
468
486
|
}
|
|
469
487
|
};
|
|
470
488
|
}
|
|
471
489
|
// @__NO_SIDE_EFFECTS__
|
|
472
|
-
function
|
|
490
|
+
function X(n) {
|
|
473
491
|
return {
|
|
474
492
|
kind: "schema",
|
|
475
493
|
type: "string",
|
|
476
|
-
reference:
|
|
494
|
+
reference: X,
|
|
477
495
|
expects: "string",
|
|
478
496
|
async: !1,
|
|
479
497
|
message: n,
|
|
@@ -481,7 +499,7 @@ function W(n) {
|
|
|
481
499
|
return /* @__PURE__ */ o(this);
|
|
482
500
|
},
|
|
483
501
|
"~run"(s, e) {
|
|
484
|
-
return typeof s.value == "string" ? s.typed = !0 :
|
|
502
|
+
return typeof s.value == "string" ? s.typed = !0 : f(this, "type", s, e), s;
|
|
485
503
|
}
|
|
486
504
|
};
|
|
487
505
|
}
|
|
@@ -492,47 +510,47 @@ function O(n) {
|
|
|
492
510
|
return s;
|
|
493
511
|
}
|
|
494
512
|
// @__NO_SIDE_EFFECTS__
|
|
495
|
-
function
|
|
513
|
+
function Y(n, s) {
|
|
496
514
|
return {
|
|
497
515
|
kind: "schema",
|
|
498
516
|
type: "union",
|
|
499
|
-
reference:
|
|
500
|
-
expects: /* @__PURE__ */
|
|
517
|
+
reference: Y,
|
|
518
|
+
expects: /* @__PURE__ */ P(n.map((e) => e.expects), "|"),
|
|
501
519
|
async: !1,
|
|
502
520
|
options: n,
|
|
503
521
|
message: s,
|
|
504
522
|
get "~standard"() {
|
|
505
523
|
return /* @__PURE__ */ o(this);
|
|
506
524
|
},
|
|
507
|
-
"~run"(e,
|
|
508
|
-
let
|
|
525
|
+
"~run"(e, r) {
|
|
526
|
+
let t, l, i;
|
|
509
527
|
for (const p of this.options) {
|
|
510
|
-
const u = p["~run"]({ value: e.value },
|
|
528
|
+
const u = p["~run"]({ value: e.value }, r);
|
|
511
529
|
if (u.typed) if (u.issues) l ? l.push(u) : l = [u];
|
|
512
530
|
else {
|
|
513
|
-
|
|
531
|
+
t = u;
|
|
514
532
|
break;
|
|
515
533
|
}
|
|
516
534
|
else i ? i.push(u) : i = [u];
|
|
517
535
|
}
|
|
518
|
-
if (
|
|
536
|
+
if (t) return t;
|
|
519
537
|
if (l) {
|
|
520
538
|
if (l.length === 1) return l[0];
|
|
521
|
-
|
|
539
|
+
f(this, "type", e, r, { issues: /* @__PURE__ */ O(l) }), e.typed = !0;
|
|
522
540
|
} else {
|
|
523
541
|
if ((i == null ? void 0 : i.length) === 1) return i[0];
|
|
524
|
-
|
|
542
|
+
f(this, "type", e, r, { issues: /* @__PURE__ */ O(i) });
|
|
525
543
|
}
|
|
526
544
|
return e;
|
|
527
545
|
}
|
|
528
546
|
};
|
|
529
547
|
}
|
|
530
548
|
// @__NO_SIDE_EFFECTS__
|
|
531
|
-
function
|
|
549
|
+
function Z() {
|
|
532
550
|
return {
|
|
533
551
|
kind: "schema",
|
|
534
552
|
type: "unknown",
|
|
535
|
-
reference:
|
|
553
|
+
reference: Z,
|
|
536
554
|
expects: "unknown",
|
|
537
555
|
async: !1,
|
|
538
556
|
get "~standard"() {
|
|
@@ -544,11 +562,11 @@ function Y() {
|
|
|
544
562
|
};
|
|
545
563
|
}
|
|
546
564
|
// @__NO_SIDE_EFFECTS__
|
|
547
|
-
function
|
|
565
|
+
function $(n, s, e) {
|
|
548
566
|
return {
|
|
549
567
|
kind: "schema",
|
|
550
568
|
type: "variant",
|
|
551
|
-
reference:
|
|
569
|
+
reference: $,
|
|
552
570
|
expects: "Object",
|
|
553
571
|
async: !1,
|
|
554
572
|
key: n,
|
|
@@ -557,28 +575,28 @@ function Z(n, s, e) {
|
|
|
557
575
|
get "~standard"() {
|
|
558
576
|
return /* @__PURE__ */ o(this);
|
|
559
577
|
},
|
|
560
|
-
"~run"(
|
|
561
|
-
const l =
|
|
578
|
+
"~run"(r, t) {
|
|
579
|
+
const l = r.value;
|
|
562
580
|
if (l && typeof l == "object") {
|
|
563
581
|
let i, p = 0, u = this.key, a = [];
|
|
564
|
-
const c = (
|
|
565
|
-
for (const h of
|
|
582
|
+
const c = (y, b) => {
|
|
583
|
+
for (const h of y.options) {
|
|
566
584
|
if (h.type === "variant") c(h, new Set(b).add(h.key));
|
|
567
585
|
else {
|
|
568
586
|
let w = !0, k = 0;
|
|
569
587
|
for (const v of b) {
|
|
570
|
-
const
|
|
571
|
-
if (v in l ?
|
|
588
|
+
const d = h.entries[v];
|
|
589
|
+
if (v in l ? d["~run"]({
|
|
572
590
|
typed: !1,
|
|
573
591
|
value: l[v]
|
|
574
|
-
}, { abortEarly: !0 }).issues :
|
|
592
|
+
}, { abortEarly: !0 }).issues : d.type !== "exact_optional" && d.type !== "optional" && d.type !== "nullish") {
|
|
575
593
|
w = !1, u !== v && (p < k || p === k && v in l && !(u in l)) && (p = k, u = v, a = []), u === v && a.push(h.entries[v].expects);
|
|
576
594
|
break;
|
|
577
595
|
}
|
|
578
596
|
k++;
|
|
579
597
|
}
|
|
580
598
|
if (w) {
|
|
581
|
-
const v = h["~run"]({ value: l },
|
|
599
|
+
const v = h["~run"]({ value: l }, t);
|
|
582
600
|
(!i || !i.typed && v.typed) && (i = v);
|
|
583
601
|
}
|
|
584
602
|
}
|
|
@@ -586,9 +604,9 @@ function Z(n, s, e) {
|
|
|
586
604
|
}
|
|
587
605
|
};
|
|
588
606
|
if (c(this, /* @__PURE__ */ new Set([this.key])), i) return i;
|
|
589
|
-
|
|
607
|
+
f(this, "type", r, t, {
|
|
590
608
|
input: l[u],
|
|
591
|
-
expected: /* @__PURE__ */
|
|
609
|
+
expected: /* @__PURE__ */ P(a, "|"),
|
|
592
610
|
path: [{
|
|
593
611
|
type: "object",
|
|
594
612
|
origin: "value",
|
|
@@ -597,13 +615,13 @@ function Z(n, s, e) {
|
|
|
597
615
|
value: l[u]
|
|
598
616
|
}]
|
|
599
617
|
});
|
|
600
|
-
} else
|
|
601
|
-
return
|
|
618
|
+
} else f(this, "type", r, t);
|
|
619
|
+
return r;
|
|
602
620
|
}
|
|
603
621
|
};
|
|
604
622
|
}
|
|
605
623
|
// @__NO_SIDE_EFFECTS__
|
|
606
|
-
function
|
|
624
|
+
function ee(...n) {
|
|
607
625
|
return {
|
|
608
626
|
...n[0],
|
|
609
627
|
pipe: n,
|
|
@@ -611,19 +629,19 @@ function $(...n) {
|
|
|
611
629
|
return /* @__PURE__ */ o(this);
|
|
612
630
|
},
|
|
613
631
|
"~run"(s, e) {
|
|
614
|
-
for (const
|
|
615
|
-
if (s.issues && (
|
|
632
|
+
for (const r of n) if (r.kind !== "metadata") {
|
|
633
|
+
if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
|
|
616
634
|
s.typed = !1;
|
|
617
635
|
break;
|
|
618
636
|
}
|
|
619
|
-
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s =
|
|
637
|
+
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = r["~run"](s, e));
|
|
620
638
|
}
|
|
621
639
|
return s;
|
|
622
640
|
}
|
|
623
641
|
};
|
|
624
642
|
}
|
|
625
643
|
// @__NO_SIDE_EFFECTS__
|
|
626
|
-
function
|
|
644
|
+
function ne(...n) {
|
|
627
645
|
return {
|
|
628
646
|
...n[0],
|
|
629
647
|
pipe: n,
|
|
@@ -632,50 +650,50 @@ function ee(...n) {
|
|
|
632
650
|
return /* @__PURE__ */ o(this);
|
|
633
651
|
},
|
|
634
652
|
async "~run"(s, e) {
|
|
635
|
-
for (const
|
|
636
|
-
if (s.issues && (
|
|
653
|
+
for (const r of n) if (r.kind !== "metadata") {
|
|
654
|
+
if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
|
|
637
655
|
s.typed = !1;
|
|
638
656
|
break;
|
|
639
657
|
}
|
|
640
|
-
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await
|
|
658
|
+
(!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await r["~run"](s, e));
|
|
641
659
|
}
|
|
642
660
|
return s;
|
|
643
661
|
}
|
|
644
662
|
};
|
|
645
663
|
}
|
|
646
664
|
// @__NO_SIDE_EFFECTS__
|
|
647
|
-
function
|
|
648
|
-
const
|
|
665
|
+
function se(n, s, e) {
|
|
666
|
+
const r = n["~run"]({ value: s }, /* @__PURE__ */ _(e));
|
|
649
667
|
return {
|
|
650
|
-
typed:
|
|
651
|
-
success: !
|
|
652
|
-
output:
|
|
653
|
-
issues:
|
|
668
|
+
typed: r.typed,
|
|
669
|
+
success: !r.issues,
|
|
670
|
+
output: r.value,
|
|
671
|
+
issues: r.issues
|
|
654
672
|
};
|
|
655
673
|
}
|
|
656
674
|
// @__NO_SIDE_EFFECTS__
|
|
657
|
-
async function
|
|
658
|
-
const
|
|
675
|
+
async function re(n, s, e) {
|
|
676
|
+
const r = await n["~run"]({ value: s }, /* @__PURE__ */ _(e));
|
|
659
677
|
return {
|
|
660
|
-
typed:
|
|
661
|
-
success: !
|
|
662
|
-
output:
|
|
663
|
-
issues:
|
|
678
|
+
typed: r.typed,
|
|
679
|
+
success: !r.issues,
|
|
680
|
+
output: r.value,
|
|
681
|
+
issues: r.issues
|
|
664
682
|
};
|
|
665
683
|
}
|
|
666
684
|
export {
|
|
667
|
-
|
|
685
|
+
f as _addIssue,
|
|
668
686
|
o as _getStandardProps,
|
|
669
687
|
S as _isValidObjectKey,
|
|
670
|
-
|
|
671
|
-
|
|
688
|
+
P as _joinExpects,
|
|
689
|
+
D as _stringify,
|
|
672
690
|
C as array,
|
|
673
691
|
F as boolean,
|
|
674
692
|
M as checkAsync,
|
|
675
693
|
R as custom,
|
|
676
|
-
|
|
694
|
+
g as getDefault,
|
|
677
695
|
I as getFallback,
|
|
678
|
-
|
|
696
|
+
_ as getGlobalConfig,
|
|
679
697
|
A as getGlobalMessage,
|
|
680
698
|
q as getSchemaMessage,
|
|
681
699
|
K as getSpecificMessage,
|
|
@@ -684,18 +702,19 @@ export {
|
|
|
684
702
|
V as maxLength,
|
|
685
703
|
G as minLength,
|
|
686
704
|
L as nonEmpty,
|
|
687
|
-
H as
|
|
688
|
-
J as
|
|
689
|
-
Q as
|
|
690
|
-
T as
|
|
691
|
-
|
|
692
|
-
ee as
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
se as
|
|
696
|
-
|
|
705
|
+
H as nullish,
|
|
706
|
+
J as number,
|
|
707
|
+
Q as object,
|
|
708
|
+
T as optional,
|
|
709
|
+
U as picklist,
|
|
710
|
+
ee as pipe,
|
|
711
|
+
ne as pipeAsync,
|
|
712
|
+
W as record,
|
|
713
|
+
se as safeParse,
|
|
714
|
+
re as safeParseAsync,
|
|
715
|
+
X as string,
|
|
697
716
|
N as trim,
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
717
|
+
Y as union,
|
|
718
|
+
Z as unknown,
|
|
719
|
+
$ as variant
|
|
701
720
|
};
|
|
@@ -37,8 +37,15 @@ export declare const ProductType: {
|
|
|
37
37
|
* Identity configuration - identifies the template and user
|
|
38
38
|
*/
|
|
39
39
|
export declare const IdentitySchema: v.ObjectSchema<{
|
|
40
|
-
/**
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Unique identifier for the template being edited.
|
|
42
|
+
*
|
|
43
|
+
* Optional: a brand-new newsletter being designed has no saved template yet,
|
|
44
|
+
* so hosts may pass `null`/`undefined`. Normalizes to `''` to match the
|
|
45
|
+
* library's own internal handling (config getter, state bridge, editor stores
|
|
46
|
+
* all default templateId to `''`).
|
|
47
|
+
*/
|
|
48
|
+
readonly templateId: v.NullishSchema<v.StringSchema<undefined>, "">;
|
|
42
49
|
/** Unique identifier for the user editing the template */
|
|
43
50
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
44
51
|
/** Optional variation ID for A/B testing */
|
|
@@ -565,8 +572,15 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
565
572
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
566
573
|
/** Identity configuration (required) */
|
|
567
574
|
readonly identity: v.ObjectSchema<{
|
|
568
|
-
/**
|
|
569
|
-
|
|
575
|
+
/**
|
|
576
|
+
* Unique identifier for the template being edited.
|
|
577
|
+
*
|
|
578
|
+
* Optional: a brand-new newsletter being designed has no saved template yet,
|
|
579
|
+
* so hosts may pass `null`/`undefined`. Normalizes to `''` to match the
|
|
580
|
+
* library's own internal handling (config getter, state bridge, editor stores
|
|
581
|
+
* all default templateId to `''`).
|
|
582
|
+
*/
|
|
583
|
+
readonly templateId: v.NullishSchema<v.StringSchema<undefined>, "">;
|
|
570
584
|
/** Unique identifier for the user editing the template */
|
|
571
585
|
readonly userId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "userId is required">]>;
|
|
572
586
|
/** Optional variation ID for A/B testing */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.5.1-beta.
|
|
3
|
+
"version": "3.5.1-beta.62862ff",
|
|
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",
|