@useinsider/guido 3.3.0-beta.3708c8a → 3.3.0-beta.6d597b3

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
1
  import { ModuleFolderDefaults as S } from "../../enums/defaults.js";
2
- import { object as o, number as n, optional as e, string as t, pipe as p, picklist as l, minLength as b, custom as h, boolean as a, array as c, record as k, looseObject as y, literal as i, variant as g, union as f, unknown as s } from "../../node_modules/valibot/dist/index.js";
2
+ import { object as o, number as n, optional as e, string as t, picklist as l, pipe as p, minLength as b, custom as h, boolean as a, array as c, record as k, literal as i, looseObject as y, variant as g, union as f, unknown as s } from "../../node_modules/valibot/dist/index.js";
3
3
  const d = {
4
4
  /** Promotional/marketing emails */
5
5
  PROMOTIONAL: 1,
@@ -1,5 +1,5 @@
1
1
  import { useDebounce as p } from "./useDebounce.js";
2
- import { ResponsivePreviewRegex as c, ResponsivePreviewSelectors as v, ResponsivePreviewConfig as a } from "../enums/preview.js";
2
+ import { ResponsivePreviewRegex as c, ResponsivePreviewConfig as a, ResponsivePreviewSelectors as v } from "../enums/preview.js";
3
3
  let i = null, l = null;
4
4
  const { debounce: y } = p(), h = (t) => {
5
5
  if (!t)
@@ -2,7 +2,7 @@ import { RecommendationBlockId as s } from "../../constants/blockIds.js";
2
2
  import { ATTR_PRODUCT_ATTR as b, ATTR_PRODUCT_BUTTON as u, ATTR_PRODUCT_OMNIBUS_DISCOUNT as m, ATTR_PRODUCT_OMNIBUS_PRICE as h, ATTR_PRODUCT_OLD_PRICE as y, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as f, ATTR_PRODUCT_IMAGE as x } from "../../constants/selectors.js";
3
3
  import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
4
4
  import { formatPrice as $ } from "../../utils/priceFormatter.js";
5
- import { sanitizeImageUrl as C, CUSTOM_CELL_HTML as R } from "../utils.js";
5
+ import { CUSTOM_CELL_HTML as C, sanitizeImageUrl as R } from "../utils.js";
6
6
  const a = "0 5px", l = "attribute-cell";
7
7
  function p() {
8
8
  const t = _(), { currencySettings: e } = t.recommendationConfigs;
@@ -40,7 +40,7 @@ const I = {
40
40
  esd-extension-block-id="${s.IMAGE}">
41
41
  <a target="_blank" href="${t.url}">
42
42
  <img
43
- src="${C(t.image_url)}"
43
+ src="${R(t.image_url)}"
44
44
  alt="${t.name}"
45
45
  style="display: block; max-width: 100%; height: auto;"
46
46
  class="adapt-img">
@@ -236,7 +236,7 @@ const I = {
236
236
  * @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
237
237
  * @param content - Display content for the cell
238
238
  */
239
- [R]: (t, e) => `
239
+ [C]: (t, e) => `
240
240
  <td class="${l}" style="padding: ${a}; height: 100%;" valign="middle">
241
241
  <table
242
242
  class="product-card-segment"
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_PRODUCTS_PER_ROW as L } from "../../constants/layout.js";
2
- import { getDefaultProducts as E, createBlockTemplate as I, DEFAULTS as _, DEFAULT_CARD_COMPOSITION as S, spacer as b, buildElementRenderer as A, DEFAULT_CARD_VISIBILITY as f } from "../utils.js";
2
+ import { getDefaultProducts as E, DEFAULTS as I, createBlockTemplate as _, DEFAULT_CARD_COMPOSITION as S, spacer as b, buildElementRenderer as A, DEFAULT_CARD_VISIBILITY as f } from "../utils.js";
3
3
  import { ATTRIBUTE_CELL_CLASS as w, DEFAULT_CELL_PADDING as D, gridElementRenderer as C } from "./elementRenderer.js";
4
4
  const O = `
5
5
  <tr class="recommendation-product-row">
@@ -53,8 +53,8 @@ function h(t, e, o, r = {}) {
53
53
  return U(t, e, C, o, r);
54
54
  }
55
55
  function F(t) {
56
- const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o = I("grid", e), r = E(), n = h(r, L);
57
- return o.replace("{-{-TITLE-}-}", _.TITLE).replace("{-{-PRODUCT_ROWS-}-}", n).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
56
+ const e = t ? `ins-recommendation-v3-block-${t}` : void 0, o = _("grid", e), r = E(), n = h(r, L);
57
+ return o.replace("{-{-TITLE-}-}", I.TITLE).replace("{-{-PRODUCT_ROWS-}-}", n).replace("{-{-MOBILE_PRODUCT_ROWS-}-}", "");
58
58
  }
59
59
  export {
60
60
  F as getDefaultTemplate,
@@ -2,7 +2,7 @@ import { RecommendationBlockId as o } from "../../constants/blockIds.js";
2
2
  import { ATTR_PRODUCT_ATTR as m, ATTR_PRODUCT_BUTTON as c, ATTR_PRODUCT_IMAGE as d, ATTR_PRODUCT_OMNIBUS_DISCOUNT as u, ATTR_PRODUCT_OMNIBUS_PRICE as g, ATTR_PRODUCT_OLD_PRICE as f, ATTR_PRODUCT_PRICE as T, ATTR_PRODUCT_NAME as x } from "../../constants/selectors.js";
3
3
  import { useRecommendationExtensionStore as _ } from "../../store/recommendation.js";
4
4
  import { formatPrice as R } from "../../utils/priceFormatter.js";
5
- import { sanitizeImageUrl as y, CUSTOM_CELL_HTML as C } from "../utils.js";
5
+ import { CUSTOM_CELL_HTML as y, sanitizeImageUrl as C } from "../utils.js";
6
6
  function p() {
7
7
  const t = _(), { currencySettings: e } = t.recommendationConfigs;
8
8
  return {
@@ -37,7 +37,7 @@ const U = {
37
37
  valign="middle">
38
38
  <a target="_blank" href="${t.url}">
39
39
  <img
40
- src="${y(t.image_url)}"
40
+ src="${C(t.image_url)}"
41
41
  alt="${t.name}"
42
42
  style="display: block; max-width: 100%; height: auto;"
43
43
  class="adapt-img product-image">
@@ -179,7 +179,7 @@ const U = {
179
179
  * @param productAttrValue - Resolved product-attr value (e.g., "brand" for default, "product_attribute.rating_star" for custom)
180
180
  * @param content - Display content for the cell
181
181
  */
182
- [C]: (t, e) => `
182
+ [y]: (t, e) => `
183
183
  <tr>
184
184
  <td
185
185
  ${m}="${t}"
@@ -1,4 +1,4 @@
1
- var m;
1
+ let m;
2
2
  // @__NO_SIDE_EFFECTS__
3
3
  function j(n) {
4
4
  return {
@@ -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
- var d;
11
+ let d;
12
12
  // @__NO_SIDE_EFFECTS__
13
- function I(n) {
13
+ function A(n) {
14
14
  return d == null ? void 0 : d.get(n);
15
15
  }
16
- var x;
16
+ let x;
17
17
  // @__NO_SIDE_EFFECTS__
18
- function A(n) {
18
+ function q(n) {
19
19
  return x == null ? void 0 : x.get(n);
20
20
  }
21
- var E;
21
+ let E;
22
22
  // @__NO_SIDE_EFFECTS__
23
- function q(n, s) {
23
+ function K(n, s) {
24
24
  var e;
25
25
  return (e = E == null ? void 0 : E.get(n)) == null ? void 0 : e.get(s);
26
26
  }
27
27
  // @__NO_SIDE_EFFECTS__
28
28
  function _(n) {
29
- var e, r;
29
+ var e, t;
30
30
  const s = typeof 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;
31
+ return s === "string" ? `"${n}"` : s === "number" || s === "bigint" || s === "boolean" ? `${n}` : s === "object" || s === "function" ? (n && ((t = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : t.name)) ?? "null" : s;
32
32
  }
33
- function y(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__ */ _(l), u = {
33
+ function y(n, s, e, t, r) {
34
+ const l = r && "input" in r ? r.input : e.value, i = (r == null ? void 0 : r.expected) ?? n.expects ?? null, p = (r == null ? void 0 : r.received) ?? /* @__PURE__ */ _(l), u = {
35
35
  kind: n.kind,
36
36
  type: n.type,
37
37
  input: l,
@@ -39,16 +39,13 @@ function y(n, s, e, r, t) {
39
39
  received: p,
40
40
  message: `Invalid ${s}: ${i ? `Expected ${i} but r` : "R"}eceived ${p}`,
41
41
  requirement: n.requirement,
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__ */ q(n.reference, u.lang) ?? (a ? /* @__PURE__ */ A(u.lang) : null) ?? r.message ?? /* @__PURE__ */ I(u.lang);
48
- c !== void 0 && (u.message = typeof c == "function" ? (
49
- // @ts-expect-error
50
- c(u)
51
- ) : c), a && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
42
+ path: r == null ? void 0 : r.path,
43
+ issues: r == null ? void 0 : r.issues,
44
+ lang: t.lang,
45
+ abortEarly: t.abortEarly,
46
+ abortPipeEarly: t.abortPipeEarly
47
+ }, a = n.kind === "schema", c = (r == null ? void 0 : r.message) ?? n.message ?? /* @__PURE__ */ K(n.reference, u.lang) ?? (a ? /* @__PURE__ */ q(u.lang) : null) ?? t.message ?? /* @__PURE__ */ A(u.lang);
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];
52
49
  }
53
50
  // @__NO_SIDE_EFFECTS__
54
51
  function o(n) {
@@ -61,85 +58,79 @@ function o(n) {
61
58
  };
62
59
  }
63
60
  // @__NO_SIDE_EFFECTS__
64
- function O(n, s) {
61
+ function S(n, s) {
65
62
  return Object.hasOwn(n, s) && s !== "__proto__" && s !== "prototype" && s !== "constructor";
66
63
  }
67
64
  // @__NO_SIDE_EFFECTS__
68
- function $(n, s) {
65
+ function D(n, s) {
69
66
  const e = [...new Set(n)];
70
67
  return e.length > 1 ? `(${e.join(` ${s} `)})` : e[0] ?? "never";
71
68
  }
72
69
  // @__NO_SIDE_EFFECTS__
73
- function K(n, s) {
70
+ function M(n, s) {
74
71
  return {
75
72
  kind: "validation",
76
73
  type: "check",
77
- reference: K,
74
+ reference: M,
78
75
  async: !0,
79
76
  expects: null,
80
77
  requirement: n,
81
78
  message: s,
82
- async "~run"(e, r) {
83
- return e.typed && !await this.requirement(e.value) && y(this, "input", e, r), e;
79
+ async "~run"(e, t) {
80
+ return e.typed && !await this.requirement(e.value) && y(this, "input", e, t), e;
84
81
  }
85
82
  };
86
83
  }
87
84
  // @__NO_SIDE_EFFECTS__
88
- function M(n, s) {
85
+ function V(n, s) {
89
86
  return {
90
87
  kind: "validation",
91
88
  type: "max_length",
92
- reference: M,
89
+ reference: V,
93
90
  async: !1,
94
91
  expects: `<=${n}`,
95
92
  requirement: n,
96
93
  message: s,
97
- "~run"(e, r) {
98
- return e.typed && e.value.length > this.requirement && y(this, "length", e, r, {
99
- received: `${e.value.length}`
100
- }), e;
94
+ "~run"(e, t) {
95
+ return e.typed && e.value.length > this.requirement && y(this, "length", e, t, { received: `${e.value.length}` }), e;
101
96
  }
102
97
  };
103
98
  }
104
99
  // @__NO_SIDE_EFFECTS__
105
- function V(n, s) {
100
+ function G(n, s) {
106
101
  return {
107
102
  kind: "validation",
108
103
  type: "min_length",
109
- reference: V,
104
+ reference: G,
110
105
  async: !1,
111
106
  expects: `>=${n}`,
112
107
  requirement: n,
113
108
  message: s,
114
- "~run"(e, r) {
115
- return e.typed && e.value.length < this.requirement && y(this, "length", e, r, {
116
- received: `${e.value.length}`
117
- }), e;
109
+ "~run"(e, t) {
110
+ return e.typed && e.value.length < this.requirement && y(this, "length", e, t, { received: `${e.value.length}` }), e;
118
111
  }
119
112
  };
120
113
  }
121
114
  // @__NO_SIDE_EFFECTS__
122
- function G(n) {
115
+ function L(n) {
123
116
  return {
124
117
  kind: "validation",
125
118
  type: "non_empty",
126
- reference: G,
119
+ reference: L,
127
120
  async: !1,
128
121
  expects: "!0",
129
122
  message: n,
130
123
  "~run"(s, e) {
131
- return s.typed && s.value.length === 0 && y(this, "length", s, e, {
132
- received: "0"
133
- }), s;
124
+ return s.typed && s.value.length === 0 && y(this, "length", s, e, { received: "0" }), s;
134
125
  }
135
126
  };
136
127
  }
137
128
  // @__NO_SIDE_EFFECTS__
138
- function L() {
129
+ function N() {
139
130
  return {
140
131
  kind: "transformation",
141
132
  type: "trim",
142
- reference: L,
133
+ reference: N,
143
134
  async: !1,
144
135
  "~run"(n) {
145
136
  return n.value = n.value.trim(), n;
@@ -147,31 +138,19 @@ function L() {
147
138
  };
148
139
  }
149
140
  // @__NO_SIDE_EFFECTS__
150
- function S(n, s, e) {
151
- return typeof n.fallback == "function" ? (
152
- // @ts-expect-error
153
- n.fallback(s, e)
154
- ) : (
155
- // @ts-expect-error
156
- n.fallback
157
- );
141
+ function I(n, s, e) {
142
+ return typeof n.fallback == "function" ? n.fallback(s, e) : n.fallback;
158
143
  }
159
144
  // @__NO_SIDE_EFFECTS__
160
- function D(n, s, e) {
161
- return typeof n.default == "function" ? (
162
- // @ts-expect-error
163
- n.default(s, e)
164
- ) : (
165
- // @ts-expect-error
166
- n.default
167
- );
145
+ function P(n, s, e) {
146
+ return typeof n.default == "function" ? n.default(s, e) : n.default;
168
147
  }
169
148
  // @__NO_SIDE_EFFECTS__
170
- function N(n, s) {
149
+ function C(n, s) {
171
150
  return {
172
151
  kind: "schema",
173
152
  type: "array",
174
- reference: N,
153
+ reference: C,
175
154
  expects: "Array",
176
155
  async: !1,
177
156
  item: n,
@@ -179,42 +158,41 @@ function N(n, s) {
179
158
  get "~standard"() {
180
159
  return /* @__PURE__ */ o(this);
181
160
  },
182
- "~run"(e, r) {
161
+ "~run"(e, t) {
183
162
  var l;
184
- const t = e.value;
185
- if (Array.isArray(t)) {
163
+ const r = e.value;
164
+ if (Array.isArray(r)) {
186
165
  e.typed = !0, e.value = [];
187
- for (let i = 0; i < t.length; i++) {
188
- const p = t[i], u = this.item["~run"]({ value: p }, r);
166
+ for (let i = 0; i < r.length; i++) {
167
+ const p = r[i], u = this.item["~run"]({ value: p }, t);
189
168
  if (u.issues) {
190
169
  const a = {
191
170
  type: "array",
192
171
  origin: "value",
193
- input: t,
172
+ input: r,
194
173
  key: i,
195
174
  value: p
196
175
  };
197
176
  for (const c of u.issues)
198
177
  c.path ? c.path.unshift(a) : c.path = [a], (l = e.issues) == null || l.push(c);
199
- if (e.issues || (e.issues = u.issues), r.abortEarly) {
178
+ if (e.issues || (e.issues = u.issues), t.abortEarly) {
200
179
  e.typed = !1;
201
180
  break;
202
181
  }
203
182
  }
204
183
  u.typed || (e.typed = !1), e.value.push(u.value);
205
184
  }
206
- } else
207
- y(this, "type", e, r);
185
+ } else y(this, "type", e, t);
208
186
  return e;
209
187
  }
210
188
  };
211
189
  }
212
190
  // @__NO_SIDE_EFFECTS__
213
- function C(n) {
191
+ function F(n) {
214
192
  return {
215
193
  kind: "schema",
216
194
  type: "boolean",
217
- reference: C,
195
+ reference: F,
218
196
  expects: "boolean",
219
197
  async: !1,
220
198
  message: n,
@@ -227,11 +205,11 @@ function C(n) {
227
205
  };
228
206
  }
229
207
  // @__NO_SIDE_EFFECTS__
230
- function F(n, s) {
208
+ function R(n, s) {
231
209
  return {
232
210
  kind: "schema",
233
211
  type: "custom",
234
- reference: F,
212
+ reference: R,
235
213
  expects: "unknown",
236
214
  async: !1,
237
215
  check: n,
@@ -239,17 +217,17 @@ function F(n, s) {
239
217
  get "~standard"() {
240
218
  return /* @__PURE__ */ o(this);
241
219
  },
242
- "~run"(e, r) {
243
- return this.check(e.value) ? e.typed = !0 : y(this, "type", e, r), e;
220
+ "~run"(e, t) {
221
+ return this.check(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
244
222
  }
245
223
  };
246
224
  }
247
225
  // @__NO_SIDE_EFFECTS__
248
- function R(n, s) {
226
+ function z(n, s) {
249
227
  return {
250
228
  kind: "schema",
251
229
  type: "literal",
252
- reference: R,
230
+ reference: z,
253
231
  expects: /* @__PURE__ */ _(n),
254
232
  async: !1,
255
233
  literal: n,
@@ -257,17 +235,17 @@ function R(n, s) {
257
235
  get "~standard"() {
258
236
  return /* @__PURE__ */ o(this);
259
237
  },
260
- "~run"(e, r) {
261
- return e.value === this.literal ? e.typed = !0 : y(this, "type", e, r), e;
238
+ "~run"(e, t) {
239
+ return e.value === this.literal ? e.typed = !0 : y(this, "type", e, t), e;
262
240
  }
263
241
  };
264
242
  }
265
243
  // @__NO_SIDE_EFFECTS__
266
- function z(n, s) {
244
+ function B(n, s) {
267
245
  return {
268
246
  kind: "schema",
269
247
  type: "loose_object",
270
- reference: z,
248
+ reference: B,
271
249
  expects: "Object",
272
250
  async: !1,
273
251
  entries: n,
@@ -275,68 +253,58 @@ function z(n, s) {
275
253
  get "~standard"() {
276
254
  return /* @__PURE__ */ o(this);
277
255
  },
278
- "~run"(e, r) {
256
+ "~run"(e, t) {
279
257
  var l;
280
- const t = e.value;
281
- if (t && typeof t == "object") {
258
+ const r = e.value;
259
+ if (r && typeof r == "object") {
282
260
  e.typed = !0, e.value = {};
283
261
  for (const i in this.entries) {
284
262
  const p = this.entries[i];
285
- if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && // @ts-expect-error
286
- p.default !== void 0) {
287
- const u = i in t ? (
288
- // @ts-expect-error
289
- t[i]
290
- ) : /* @__PURE__ */ D(p), a = p["~run"]({ value: u }, r);
263
+ if (i in r || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && p.default !== void 0) {
264
+ const u = i in r ? r[i] : /* @__PURE__ */ P(p), a = p["~run"]({ value: u }, t);
291
265
  if (a.issues) {
292
266
  const c = {
293
267
  type: "object",
294
268
  origin: "value",
295
- input: t,
269
+ input: r,
296
270
  key: i,
297
271
  value: u
298
272
  };
299
273
  for (const f of a.issues)
300
274
  f.path ? f.path.unshift(c) : f.path = [c], (l = e.issues) == null || l.push(f);
301
- if (e.issues || (e.issues = a.issues), r.abortEarly) {
275
+ if (e.issues || (e.issues = a.issues), t.abortEarly) {
302
276
  e.typed = !1;
303
277
  break;
304
278
  }
305
279
  }
306
280
  a.typed || (e.typed = !1), e.value[i] = a.value;
307
- } else if (p.fallback !== void 0)
308
- e.value[i] = /* @__PURE__ */ S(p);
309
- else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (y(this, "key", e, r, {
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" && (y(this, "key", e, t, {
310
283
  input: void 0,
311
284
  expected: `"${i}"`,
312
- path: [
313
- {
314
- type: "object",
315
- origin: "key",
316
- input: t,
317
- key: i,
318
- // @ts-expect-error
319
- value: t[i]
320
- }
321
- ]
322
- }), r.abortEarly))
285
+ path: [{
286
+ type: "object",
287
+ origin: "key",
288
+ input: r,
289
+ key: i,
290
+ value: r[i]
291
+ }]
292
+ }), t.abortEarly))
323
293
  break;
324
294
  }
325
- if (!e.issues || !r.abortEarly)
326
- for (const i in t)
327
- /* @__PURE__ */ O(t, i) && !(i in this.entries) && (e.value[i] = t[i]);
328
- } else
329
- y(this, "type", e, r);
295
+ if (!e.issues || !t.abortEarly)
296
+ for (const i in r) /* @__PURE__ */ S(r, i) && !(i in this.entries) && (e.value[i] = r[i]);
297
+ } else y(this, "type", e, t);
330
298
  return e;
331
299
  }
332
300
  };
333
301
  }
334
302
  // @__NO_SIDE_EFFECTS__
335
- function B(n) {
303
+ function H(n) {
336
304
  return {
337
305
  kind: "schema",
338
306
  type: "number",
339
- reference: B,
307
+ reference: H,
340
308
  expects: "number",
341
309
  async: !1,
342
310
  message: n,
@@ -349,11 +317,11 @@ function B(n) {
349
317
  };
350
318
  }
351
319
  // @__NO_SIDE_EFFECTS__
352
- function H(n, s) {
320
+ function J(n, s) {
353
321
  return {
354
322
  kind: "schema",
355
323
  type: "object",
356
- reference: H,
324
+ reference: J,
357
325
  expects: "Object",
358
326
  async: !1,
359
327
  entries: n,
@@ -361,65 +329,56 @@ function H(n, s) {
361
329
  get "~standard"() {
362
330
  return /* @__PURE__ */ o(this);
363
331
  },
364
- "~run"(e, r) {
332
+ "~run"(e, t) {
365
333
  var l;
366
- const t = e.value;
367
- if (t && typeof t == "object") {
334
+ const r = e.value;
335
+ if (r && typeof r == "object") {
368
336
  e.typed = !0, e.value = {};
369
337
  for (const i in this.entries) {
370
338
  const p = this.entries[i];
371
- if (i in t || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && // @ts-expect-error
372
- p.default !== void 0) {
373
- const u = i in t ? (
374
- // @ts-expect-error
375
- t[i]
376
- ) : /* @__PURE__ */ D(p), a = p["~run"]({ value: u }, r);
339
+ if (i in r || (p.type === "exact_optional" || p.type === "optional" || p.type === "nullish") && p.default !== void 0) {
340
+ const u = i in r ? r[i] : /* @__PURE__ */ P(p), a = p["~run"]({ value: u }, t);
377
341
  if (a.issues) {
378
342
  const c = {
379
343
  type: "object",
380
344
  origin: "value",
381
- input: t,
345
+ input: r,
382
346
  key: i,
383
347
  value: u
384
348
  };
385
349
  for (const f of a.issues)
386
350
  f.path ? f.path.unshift(c) : f.path = [c], (l = e.issues) == null || l.push(f);
387
- if (e.issues || (e.issues = a.issues), r.abortEarly) {
351
+ if (e.issues || (e.issues = a.issues), t.abortEarly) {
388
352
  e.typed = !1;
389
353
  break;
390
354
  }
391
355
  }
392
356
  a.typed || (e.typed = !1), e.value[i] = a.value;
393
- } else if (p.fallback !== void 0)
394
- e.value[i] = /* @__PURE__ */ S(p);
395
- else if (p.type !== "exact_optional" && p.type !== "optional" && p.type !== "nullish" && (y(this, "key", e, r, {
357
+ } 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" && (y(this, "key", e, t, {
396
359
  input: void 0,
397
360
  expected: `"${i}"`,
398
- path: [
399
- {
400
- type: "object",
401
- origin: "key",
402
- input: t,
403
- key: i,
404
- // @ts-expect-error
405
- value: t[i]
406
- }
407
- ]
408
- }), r.abortEarly))
361
+ path: [{
362
+ type: "object",
363
+ origin: "key",
364
+ input: r,
365
+ key: i,
366
+ value: r[i]
367
+ }]
368
+ }), t.abortEarly))
409
369
  break;
410
370
  }
411
- } else
412
- y(this, "type", e, r);
371
+ } else y(this, "type", e, t);
413
372
  return e;
414
373
  }
415
374
  };
416
375
  }
417
376
  // @__NO_SIDE_EFFECTS__
418
- function J(n, s) {
377
+ function Q(n, s) {
419
378
  return {
420
379
  kind: "schema",
421
380
  type: "optional",
422
- reference: J,
381
+ reference: Q,
423
382
  expects: `(${n.expects} | undefined)`,
424
383
  async: !1,
425
384
  wrapped: n,
@@ -427,35 +386,35 @@ function J(n, s) {
427
386
  get "~standard"() {
428
387
  return /* @__PURE__ */ o(this);
429
388
  },
430
- "~run"(e, r) {
431
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ D(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
389
+ "~run"(e, t) {
390
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ P(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
432
391
  }
433
392
  };
434
393
  }
435
394
  // @__NO_SIDE_EFFECTS__
436
- function Q(n, s) {
395
+ function T(n, s) {
437
396
  return {
438
397
  kind: "schema",
439
398
  type: "picklist",
440
- reference: Q,
441
- expects: /* @__PURE__ */ $(n.map(_), "|"),
399
+ reference: T,
400
+ expects: /* @__PURE__ */ D(n.map(_), "|"),
442
401
  async: !1,
443
402
  options: n,
444
403
  message: s,
445
404
  get "~standard"() {
446
405
  return /* @__PURE__ */ o(this);
447
406
  },
448
- "~run"(e, r) {
449
- return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, r), e;
407
+ "~run"(e, t) {
408
+ return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
450
409
  }
451
410
  };
452
411
  }
453
412
  // @__NO_SIDE_EFFECTS__
454
- function T(n, s, e) {
413
+ function U(n, s, e) {
455
414
  return {
456
415
  kind: "schema",
457
416
  type: "record",
458
- reference: T,
417
+ reference: U,
459
418
  expects: "Object",
460
419
  async: !1,
461
420
  key: n,
@@ -464,62 +423,57 @@ function T(n, s, e) {
464
423
  get "~standard"() {
465
424
  return /* @__PURE__ */ o(this);
466
425
  },
467
- "~run"(r, t) {
426
+ "~run"(t, r) {
468
427
  var i, p;
469
- const l = r.value;
428
+ const l = t.value;
470
429
  if (l && typeof l == "object") {
471
- r.typed = !0, r.value = {};
472
- for (const u in l)
473
- if (/* @__PURE__ */ O(l, u)) {
474
- const a = l[u], c = this.key["~run"]({ value: u }, t);
475
- if (c.issues) {
476
- const b = {
477
- type: "object",
478
- origin: "key",
479
- input: l,
480
- key: u,
481
- value: a
482
- };
483
- for (const h of c.issues)
484
- h.path = [b], (i = r.issues) == null || i.push(h);
485
- if (r.issues || (r.issues = c.issues), t.abortEarly) {
486
- r.typed = !1;
487
- break;
488
- }
430
+ t.typed = !0, t.value = {};
431
+ for (const u in l) if (/* @__PURE__ */ S(l, u)) {
432
+ const a = l[u], c = this.key["~run"]({ value: u }, r);
433
+ if (c.issues) {
434
+ const b = {
435
+ type: "object",
436
+ origin: "key",
437
+ input: l,
438
+ key: u,
439
+ value: a
440
+ };
441
+ for (const h of c.issues)
442
+ h.path = [b], (i = t.issues) == null || i.push(h);
443
+ if (t.issues || (t.issues = c.issues), r.abortEarly) {
444
+ t.typed = !1;
445
+ break;
489
446
  }
490
- const f = this.value["~run"](
491
- { value: a },
492
- t
493
- );
494
- if (f.issues) {
495
- const b = {
496
- type: "object",
497
- origin: "value",
498
- input: l,
499
- key: u,
500
- value: a
501
- };
502
- for (const h of f.issues)
503
- h.path ? h.path.unshift(b) : h.path = [b], (p = r.issues) == null || p.push(h);
504
- if (r.issues || (r.issues = f.issues), t.abortEarly) {
505
- r.typed = !1;
506
- break;
507
- }
447
+ }
448
+ const f = this.value["~run"]({ value: a }, r);
449
+ if (f.issues) {
450
+ const b = {
451
+ type: "object",
452
+ origin: "value",
453
+ input: l,
454
+ key: u,
455
+ value: a
456
+ };
457
+ for (const h of f.issues)
458
+ h.path ? h.path.unshift(b) : h.path = [b], (p = t.issues) == null || p.push(h);
459
+ if (t.issues || (t.issues = f.issues), r.abortEarly) {
460
+ t.typed = !1;
461
+ break;
508
462
  }
509
- (!c.typed || !f.typed) && (r.typed = !1), c.typed && (r.value[c.value] = f.value);
510
463
  }
511
- } else
512
- y(this, "type", r, t);
513
- return r;
464
+ (!c.typed || !f.typed) && (t.typed = !1), c.typed && (t.value[c.value] = f.value);
465
+ }
466
+ } else y(this, "type", t, r);
467
+ return t;
514
468
  }
515
469
  };
516
470
  }
517
471
  // @__NO_SIDE_EFFECTS__
518
- function U(n) {
472
+ function W(n) {
519
473
  return {
520
474
  kind: "schema",
521
475
  type: "string",
522
- reference: U,
476
+ reference: W,
523
477
  expects: "string",
524
478
  async: !1,
525
479
  message: n,
@@ -532,68 +486,53 @@ function U(n) {
532
486
  };
533
487
  }
534
488
  // @__NO_SIDE_EFFECTS__
535
- function w(n) {
489
+ function O(n) {
536
490
  let s;
537
- if (n)
538
- for (const e of n)
539
- s ? s.push(...e.issues) : s = e.issues;
491
+ if (n) for (const e of n) s ? s.push(...e.issues) : s = e.issues;
540
492
  return s;
541
493
  }
542
494
  // @__NO_SIDE_EFFECTS__
543
- function W(n, s) {
495
+ function X(n, s) {
544
496
  return {
545
497
  kind: "schema",
546
498
  type: "union",
547
- reference: W,
548
- expects: /* @__PURE__ */ $(
549
- n.map((e) => e.expects),
550
- "|"
551
- ),
499
+ reference: X,
500
+ expects: /* @__PURE__ */ D(n.map((e) => e.expects), "|"),
552
501
  async: !1,
553
502
  options: n,
554
503
  message: s,
555
504
  get "~standard"() {
556
505
  return /* @__PURE__ */ o(this);
557
506
  },
558
- "~run"(e, r) {
559
- let t, l, i;
507
+ "~run"(e, t) {
508
+ let r, l, i;
560
509
  for (const p of this.options) {
561
- const u = p["~run"]({ value: e.value }, r);
562
- if (u.typed)
563
- if (u.issues)
564
- l ? l.push(u) : l = [u];
565
- else {
566
- t = u;
567
- break;
568
- }
569
- else
570
- i ? i.push(u) : i = [u];
510
+ const u = p["~run"]({ value: e.value }, t);
511
+ if (u.typed) if (u.issues) l ? l.push(u) : l = [u];
512
+ else {
513
+ r = u;
514
+ break;
515
+ }
516
+ else i ? i.push(u) : i = [u];
571
517
  }
572
- if (t)
573
- return t;
518
+ if (r) return r;
574
519
  if (l) {
575
- if (l.length === 1)
576
- return l[0];
577
- y(this, "type", e, r, {
578
- issues: /* @__PURE__ */ w(l)
579
- }), e.typed = !0;
520
+ if (l.length === 1) return l[0];
521
+ y(this, "type", e, t, { issues: /* @__PURE__ */ O(l) }), e.typed = !0;
580
522
  } else {
581
- if ((i == null ? void 0 : i.length) === 1)
582
- return i[0];
583
- y(this, "type", e, r, {
584
- issues: /* @__PURE__ */ w(i)
585
- });
523
+ if ((i == null ? void 0 : i.length) === 1) return i[0];
524
+ y(this, "type", e, t, { issues: /* @__PURE__ */ O(i) });
586
525
  }
587
526
  return e;
588
527
  }
589
528
  };
590
529
  }
591
530
  // @__NO_SIDE_EFFECTS__
592
- function X() {
531
+ function Y() {
593
532
  return {
594
533
  kind: "schema",
595
534
  type: "unknown",
596
- reference: X,
535
+ reference: Y,
597
536
  expects: "unknown",
598
537
  async: !1,
599
538
  get "~standard"() {
@@ -605,11 +544,11 @@ function X() {
605
544
  };
606
545
  }
607
546
  // @__NO_SIDE_EFFECTS__
608
- function Y(n, s, e) {
547
+ function Z(n, s, e) {
609
548
  return {
610
549
  kind: "schema",
611
550
  type: "variant",
612
- reference: Y,
551
+ reference: Z,
613
552
  expects: "Object",
614
553
  async: !1,
615
554
  key: n,
@@ -618,64 +557,53 @@ function Y(n, s, e) {
618
557
  get "~standard"() {
619
558
  return /* @__PURE__ */ o(this);
620
559
  },
621
- "~run"(r, t) {
622
- const l = r.value;
560
+ "~run"(t, r) {
561
+ const l = t.value;
623
562
  if (l && typeof l == "object") {
624
563
  let i, p = 0, u = this.key, a = [];
625
564
  const c = (f, b) => {
626
565
  for (const h of f.options) {
627
- if (h.type === "variant")
628
- c(h, new Set(b).add(h.key));
566
+ if (h.type === "variant") c(h, new Set(b).add(h.key));
629
567
  else {
630
- let P = !0, k = 0;
568
+ let w = !0, k = 0;
631
569
  for (const v of b) {
632
570
  const g = h.entries[v];
633
- if (v in l ? g["~run"](
634
- // @ts-expect-error
635
- { typed: !1, value: l[v] },
636
- { abortEarly: !0 }
637
- ).issues : g.type !== "exact_optional" && g.type !== "optional" && g.type !== "nullish") {
638
- P = !1, u !== v && (p < k || p === k && v in l && !(u in l)) && (p = k, u = v, a = []), u === v && a.push(
639
- h.entries[v].expects
640
- );
571
+ if (v in l ? g["~run"]({
572
+ typed: !1,
573
+ value: l[v]
574
+ }, { abortEarly: !0 }).issues : g.type !== "exact_optional" && g.type !== "optional" && g.type !== "nullish") {
575
+ 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);
641
576
  break;
642
577
  }
643
578
  k++;
644
579
  }
645
- if (P) {
646
- const v = h["~run"]({ value: l }, t);
580
+ if (w) {
581
+ const v = h["~run"]({ value: l }, r);
647
582
  (!i || !i.typed && v.typed) && (i = v);
648
583
  }
649
584
  }
650
- if (i && !i.issues)
651
- break;
585
+ if (i && !i.issues) break;
652
586
  }
653
587
  };
654
- if (c(this, /* @__PURE__ */ new Set([this.key])), i)
655
- return i;
656
- y(this, "type", r, t, {
657
- // @ts-expect-error
588
+ if (c(this, /* @__PURE__ */ new Set([this.key])), i) return i;
589
+ y(this, "type", t, r, {
658
590
  input: l[u],
659
- expected: /* @__PURE__ */ $(a, "|"),
660
- path: [
661
- {
662
- type: "object",
663
- origin: "value",
664
- input: l,
665
- key: u,
666
- // @ts-expect-error
667
- value: l[u]
668
- }
669
- ]
591
+ expected: /* @__PURE__ */ D(a, "|"),
592
+ path: [{
593
+ type: "object",
594
+ origin: "value",
595
+ input: l,
596
+ key: u,
597
+ value: l[u]
598
+ }]
670
599
  });
671
- } else
672
- y(this, "type", r, t);
673
- return r;
600
+ } else y(this, "type", t, r);
601
+ return t;
674
602
  }
675
603
  };
676
604
  }
677
605
  // @__NO_SIDE_EFFECTS__
678
- function Z(...n) {
606
+ function $(...n) {
679
607
  return {
680
608
  ...n[0],
681
609
  pipe: n,
@@ -683,14 +611,13 @@ function Z(...n) {
683
611
  return /* @__PURE__ */ o(this);
684
612
  },
685
613
  "~run"(s, e) {
686
- for (const r of n)
687
- if (r.kind !== "metadata") {
688
- if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
689
- s.typed = !1;
690
- break;
691
- }
692
- (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = r["~run"](s, e));
614
+ for (const t of n) if (t.kind !== "metadata") {
615
+ if (s.issues && (t.kind === "schema" || t.kind === "transformation")) {
616
+ s.typed = !1;
617
+ break;
693
618
  }
619
+ (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = t["~run"](s, e));
620
+ }
694
621
  return s;
695
622
  }
696
623
  };
@@ -705,74 +632,70 @@ function ee(...n) {
705
632
  return /* @__PURE__ */ o(this);
706
633
  },
707
634
  async "~run"(s, e) {
708
- for (const r of n)
709
- if (r.kind !== "metadata") {
710
- if (s.issues && (r.kind === "schema" || r.kind === "transformation")) {
711
- s.typed = !1;
712
- break;
713
- }
714
- (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await r["~run"](s, e));
635
+ for (const t of n) if (t.kind !== "metadata") {
636
+ if (s.issues && (t.kind === "schema" || t.kind === "transformation")) {
637
+ s.typed = !1;
638
+ break;
715
639
  }
640
+ (!s.issues || !e.abortEarly && !e.abortPipeEarly) && (s = await t["~run"](s, e));
641
+ }
716
642
  return s;
717
643
  }
718
644
  };
719
645
  }
720
646
  // @__NO_SIDE_EFFECTS__
721
647
  function ne(n, s, e) {
722
- const r = n["~run"]({ value: s }, /* @__PURE__ */ j(e));
648
+ const t = n["~run"]({ value: s }, /* @__PURE__ */ j(e));
723
649
  return {
724
- typed: r.typed,
725
- success: !r.issues,
726
- output: r.value,
727
- issues: r.issues
650
+ typed: t.typed,
651
+ success: !t.issues,
652
+ output: t.value,
653
+ issues: t.issues
728
654
  };
729
655
  }
730
656
  // @__NO_SIDE_EFFECTS__
731
657
  async function se(n, s, e) {
732
- const r = await n["~run"](
733
- { value: s },
734
- /* @__PURE__ */ j(e)
735
- );
658
+ const t = await n["~run"]({ value: s }, /* @__PURE__ */ j(e));
736
659
  return {
737
- typed: r.typed,
738
- success: !r.issues,
739
- output: r.value,
740
- issues: r.issues
660
+ typed: t.typed,
661
+ success: !t.issues,
662
+ output: t.value,
663
+ issues: t.issues
741
664
  };
742
665
  }
743
666
  export {
744
667
  y as _addIssue,
745
668
  o as _getStandardProps,
746
- O as _isValidObjectKey,
747
- $ as _joinExpects,
669
+ S as _isValidObjectKey,
670
+ D as _joinExpects,
748
671
  _ as _stringify,
749
- N as array,
750
- C as boolean,
751
- K as checkAsync,
752
- F as custom,
753
- D as getDefault,
754
- S as getFallback,
672
+ C as array,
673
+ F as boolean,
674
+ M as checkAsync,
675
+ R as custom,
676
+ P as getDefault,
677
+ I as getFallback,
755
678
  j as getGlobalConfig,
756
- I as getGlobalMessage,
757
- A as getSchemaMessage,
758
- q as getSpecificMessage,
759
- R as literal,
760
- z as looseObject,
761
- M as maxLength,
762
- V as minLength,
763
- G as nonEmpty,
764
- B as number,
765
- H as object,
766
- J as optional,
767
- Q as picklist,
768
- Z as pipe,
679
+ A as getGlobalMessage,
680
+ q as getSchemaMessage,
681
+ K as getSpecificMessage,
682
+ z as literal,
683
+ B as looseObject,
684
+ V as maxLength,
685
+ G as minLength,
686
+ L as nonEmpty,
687
+ H as number,
688
+ J as object,
689
+ Q as optional,
690
+ T as picklist,
691
+ $ as pipe,
769
692
  ee as pipeAsync,
770
- T as record,
693
+ U as record,
771
694
  ne as safeParse,
772
695
  se as safeParseAsync,
773
- U as string,
774
- L as trim,
775
- W as union,
776
- X as unknown,
777
- Y as variant
696
+ W as string,
697
+ N as trim,
698
+ X as union,
699
+ Y as unknown,
700
+ Z as variant
778
701
  };
@@ -1,4 +1,4 @@
1
- const o = { stripo: { version: "2.63.1" } }, s = {
1
+ const o = { stripo: { version: "2.62.0" } }, s = {
2
2
  guido: o
3
3
  };
4
4
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.3.0-beta.3708c8a",
3
+ "version": "3.3.0-beta.6d597b3",
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",
@@ -39,7 +39,7 @@
39
39
  "@vueuse/core": "11.3.0",
40
40
  "lodash-es": "4.17.21",
41
41
  "pinia": "2.3.1",
42
- "valibot": "1.1.0",
42
+ "valibot": "1.2.0",
43
43
  "vite": "6.3.5",
44
44
  "vue": "2.7.14"
45
45
  },
@@ -82,15 +82,42 @@
82
82
  "vue-tsc": "2.2.10"
83
83
  },
84
84
  "overrides": {
85
+ "@isaacs/brace-expansion": "^5.0.1",
86
+ "axios": "^1.8.2",
87
+ "follow-redirects": "^1.14.7",
88
+ "flatted": "^3.4.0",
89
+ "immutable": "^4.3.8",
85
90
  "micromatch": "4.0.8",
86
- "path-to-regexp": "6.3.0"
91
+ "minimatch": "^3.1.3",
92
+ "@microsoft/api-extractor": {
93
+ "minimatch": "^10.2.1"
94
+ },
95
+ "@typescript-eslint/typescript-estree": {
96
+ "minimatch": "^9.0.6"
97
+ },
98
+ "@vue/language-core": {
99
+ "minimatch": "^9.0.6"
100
+ },
101
+ "path-to-regexp": "6.3.0",
102
+ "picomatch": "^2.3.2",
103
+ "@rollup/pluginutils": {
104
+ "picomatch": "^4.0.4"
105
+ },
106
+ "@stylistic/eslint-plugin": {
107
+ "picomatch": "^4.0.4"
108
+ },
109
+ "fdir": {
110
+ "picomatch": "^4.0.4"
111
+ },
112
+ "ag-grid-community": "^31.3.4",
113
+ "ag-grid-enterprise": "^31.3.4"
87
114
  },
88
115
  "msw": {
89
116
  "workerDirectory": "public"
90
117
  },
91
118
  "guido": {
92
119
  "stripo": {
93
- "version": "2.63.1"
120
+ "version": "2.62.0"
94
121
  }
95
122
  }
96
123
  }