@connectedxm/zpl-generator 0.0.22 → 0.0.23
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/dist/index.es.js +108 -102
- package/dist/src/validate.d.ts +8 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -43,7 +43,7 @@ class Ge extends Error {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
const Ke = {};
|
|
46
|
-
function
|
|
46
|
+
function j(e) {
|
|
47
47
|
return Ke;
|
|
48
48
|
}
|
|
49
49
|
function Xe(e) {
|
|
@@ -116,7 +116,7 @@ function P(...e) {
|
|
|
116
116
|
function Ze(e) {
|
|
117
117
|
return JSON.stringify(e);
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Rt(e) {
|
|
120
120
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
121
121
|
}
|
|
122
122
|
const qe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
@@ -124,7 +124,7 @@ const qe = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
124
124
|
function B(e) {
|
|
125
125
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const jt = ce(() => {
|
|
128
128
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
129
129
|
return !1;
|
|
130
130
|
try {
|
|
@@ -146,7 +146,7 @@ function V(e) {
|
|
|
146
146
|
function Qe(e) {
|
|
147
147
|
return V(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const Ct = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
150
150
|
function M(e) {
|
|
151
151
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
152
152
|
}
|
|
@@ -325,7 +325,7 @@ function et(e, t) {
|
|
|
325
325
|
function K(e) {
|
|
326
326
|
return typeof e == "string" ? e : e?.message;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function C(e, t, n) {
|
|
329
329
|
const r = { ...e, path: e.path ?? [] };
|
|
330
330
|
if (!e.message) {
|
|
331
331
|
const o = K(e.inst?._zod.def?.error?.(e)) ?? K(t?.error?.(e)) ?? K(n.customError?.(e)) ?? K(n.localeError?.(e)) ?? "Invalid input";
|
|
@@ -389,7 +389,7 @@ const ze = (e) => (t, n, r, o) => {
|
|
|
389
389
|
if (i instanceof Promise)
|
|
390
390
|
throw new L();
|
|
391
391
|
if (i.issues.length) {
|
|
392
|
-
const c = new (o?.Err ?? e)(i.issues.map((a) =>
|
|
392
|
+
const c = new (o?.Err ?? e)(i.issues.map((a) => C(a, s, j())));
|
|
393
393
|
throw qe(c, o?.callee), c;
|
|
394
394
|
}
|
|
395
395
|
return i.value;
|
|
@@ -397,7 +397,7 @@ const ze = (e) => (t, n, r, o) => {
|
|
|
397
397
|
const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
398
398
|
let i = t._zod.run({ value: n, issues: [] }, s);
|
|
399
399
|
if (i instanceof Promise && (i = await i), i.issues.length) {
|
|
400
|
-
const c = new (o?.Err ?? e)(i.issues.map((a) =>
|
|
400
|
+
const c = new (o?.Err ?? e)(i.issues.map((a) => C(a, s, j())));
|
|
401
401
|
throw qe(c, o?.callee), c;
|
|
402
402
|
}
|
|
403
403
|
return i.value;
|
|
@@ -407,14 +407,14 @@ const ze = (e) => (t, n, r, o) => {
|
|
|
407
407
|
throw new L();
|
|
408
408
|
return s.issues.length ? {
|
|
409
409
|
success: !1,
|
|
410
|
-
error: new (e ?? nt)(s.issues.map((i) =>
|
|
410
|
+
error: new (e ?? nt)(s.issues.map((i) => C(i, o, j())))
|
|
411
411
|
} : { success: !0, data: s.value };
|
|
412
412
|
}, Gt = /* @__PURE__ */ ae(rt), ue = (e) => async (t, n, r) => {
|
|
413
413
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
414
414
|
let s = t._zod.run({ value: n, issues: [] }, o);
|
|
415
415
|
return s instanceof Promise && (s = await s), s.issues.length ? {
|
|
416
416
|
success: !1,
|
|
417
|
-
error: new e(s.issues.map((i) =>
|
|
417
|
+
error: new e(s.issues.map((i) => C(i, o, j())))
|
|
418
418
|
} : { success: !0, data: s.value };
|
|
419
419
|
}, Kt = /* @__PURE__ */ ue(rt), Xt = (e) => (t, n, r) => {
|
|
420
420
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
@@ -449,7 +449,7 @@ function Sn(e) {
|
|
|
449
449
|
const Zn = (e) => {
|
|
450
450
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
451
451
|
return new RegExp(`^${t}$`);
|
|
452
|
-
}, On = /^-?\d+$/, Tn = /^-?\d+(?:\.\d+)?$/,
|
|
452
|
+
}, On = /^-?\d+$/, Tn = /^-?\d+(?:\.\d+)?$/, En = /^(?:true|false)$/i, An = /^[^A-Z]*$/, In = /^[^a-z]*$/, T = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
453
453
|
var n;
|
|
454
454
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
455
455
|
}), ct = {
|
|
@@ -590,7 +590,7 @@ const Zn = (e) => {
|
|
|
590
590
|
continue: !t.abort
|
|
591
591
|
});
|
|
592
592
|
};
|
|
593
|
-
}),
|
|
593
|
+
}), Rn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
594
594
|
var n;
|
|
595
595
|
T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
596
596
|
const o = r.value;
|
|
@@ -613,7 +613,7 @@ const Zn = (e) => {
|
|
|
613
613
|
continue: !t.abort
|
|
614
614
|
});
|
|
615
615
|
};
|
|
616
|
-
}),
|
|
616
|
+
}), jn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
617
617
|
var n;
|
|
618
618
|
T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
619
619
|
const o = r.value;
|
|
@@ -653,7 +653,7 @@ const Zn = (e) => {
|
|
|
653
653
|
});
|
|
654
654
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
655
655
|
});
|
|
656
|
-
}),
|
|
656
|
+
}), Cn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
|
|
657
657
|
le.init(e, t), e._zod.check = (n) => {
|
|
658
658
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
659
659
|
origin: "string",
|
|
@@ -666,7 +666,7 @@ const Zn = (e) => {
|
|
|
666
666
|
});
|
|
667
667
|
};
|
|
668
668
|
}), Fn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
|
|
669
|
-
t.pattern ?? (t.pattern =
|
|
669
|
+
t.pattern ?? (t.pattern = An), le.init(e, t);
|
|
670
670
|
}), Dn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
671
671
|
t.pattern ?? (t.pattern = In), le.init(e, t);
|
|
672
672
|
}), Ln = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
@@ -1049,7 +1049,7 @@ const gr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1049
1049
|
}), _r = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
|
|
1050
1050
|
Pn.init(e, t), ft.init(e, t);
|
|
1051
1051
|
}), vr = /* @__PURE__ */ u("$ZodBoolean", (e, t) => {
|
|
1052
|
-
y.init(e, t), e._zod.pattern =
|
|
1052
|
+
y.init(e, t), e._zod.pattern = En, e._zod.parse = (n, r) => {
|
|
1053
1053
|
if (t.coerce)
|
|
1054
1054
|
try {
|
|
1055
1055
|
n.value = !!n.value;
|
|
@@ -1198,39 +1198,39 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1198
1198
|
G[I] = `key_${It++}`;
|
|
1199
1199
|
m.write("const newResult = {};");
|
|
1200
1200
|
for (const I of z.keys) {
|
|
1201
|
-
const O = G[I],
|
|
1201
|
+
const O = G[I], A = Ze(I), Pt = p[I]?._zod?.optout === "optional";
|
|
1202
1202
|
m.write(`const ${O} = ${$(I)};`), Pt ? m.write(`
|
|
1203
1203
|
if (${O}.issues.length) {
|
|
1204
|
-
if (${
|
|
1204
|
+
if (${A} in input) {
|
|
1205
1205
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
1206
1206
|
...iss,
|
|
1207
|
-
path: iss.path ? [${
|
|
1207
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
1208
1208
|
})));
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
1211
|
|
|
1212
1212
|
if (${O}.value === undefined) {
|
|
1213
|
-
if (${
|
|
1214
|
-
newResult[${
|
|
1213
|
+
if (${A} in input) {
|
|
1214
|
+
newResult[${A}] = undefined;
|
|
1215
1215
|
}
|
|
1216
1216
|
} else {
|
|
1217
|
-
newResult[${
|
|
1217
|
+
newResult[${A}] = ${O}.value;
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
`) : m.write(`
|
|
1221
1221
|
if (${O}.issues.length) {
|
|
1222
1222
|
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
1223
1223
|
...iss,
|
|
1224
|
-
path: iss.path ? [${
|
|
1224
|
+
path: iss.path ? [${A}, ...iss.path] : [${A}]
|
|
1225
1225
|
})));
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
if (${O}.value === undefined) {
|
|
1229
|
-
if (${
|
|
1230
|
-
newResult[${
|
|
1229
|
+
if (${A} in input) {
|
|
1230
|
+
newResult[${A}] = undefined;
|
|
1231
1231
|
}
|
|
1232
1232
|
} else {
|
|
1233
|
-
newResult[${
|
|
1233
|
+
newResult[${A}] = ${O}.value;
|
|
1234
1234
|
}
|
|
1235
1235
|
|
|
1236
1236
|
`);
|
|
@@ -1240,7 +1240,7 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1240
1240
|
return (I, O) => Nt(p, I, O);
|
|
1241
1241
|
};
|
|
1242
1242
|
let s;
|
|
1243
|
-
const i = B, c = !Ke.jitless, l = c &&
|
|
1243
|
+
const i = B, c = !Ke.jitless, l = c && jt.value, f = t.catchall;
|
|
1244
1244
|
let h;
|
|
1245
1245
|
e._zod.parse = (p, m) => {
|
|
1246
1246
|
h ?? (h = r.value);
|
|
@@ -1253,7 +1253,7 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1253
1253
|
}), p);
|
|
1254
1254
|
};
|
|
1255
1255
|
});
|
|
1256
|
-
function
|
|
1256
|
+
function Ee(e, t, n, r) {
|
|
1257
1257
|
for (const s of e)
|
|
1258
1258
|
if (s.issues.length === 0)
|
|
1259
1259
|
return t.value = s.value, t;
|
|
@@ -1262,7 +1262,7 @@ function Ae(e, t, n, r) {
|
|
|
1262
1262
|
code: "invalid_union",
|
|
1263
1263
|
input: t.value,
|
|
1264
1264
|
inst: n,
|
|
1265
|
-
errors: e.map((s) => s.issues.map((i) =>
|
|
1265
|
+
errors: e.map((s) => s.issues.map((i) => C(i, r, j())))
|
|
1266
1266
|
}), t);
|
|
1267
1267
|
}
|
|
1268
1268
|
const ht = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
@@ -1294,7 +1294,7 @@ const ht = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
|
1294
1294
|
c.push(l);
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
return i ? Promise.all(c).then((a) =>
|
|
1297
|
+
return i ? Promise.all(c).then((a) => Ee(a, o, e, s)) : Ee(c, o, e, s);
|
|
1298
1298
|
};
|
|
1299
1299
|
}), kr = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (e, t) => {
|
|
1300
1300
|
t.inclusive = !1, ht.init(e, t);
|
|
@@ -1350,7 +1350,7 @@ const ht = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
|
1350
1350
|
}), Sr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1351
1351
|
y.init(e, t), e._zod.parse = (n, r) => {
|
|
1352
1352
|
const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
|
|
1353
|
-
return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) =>
|
|
1353
|
+
return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, l]) => Ae(n, a, l)) : Ae(n, s, i);
|
|
1354
1354
|
};
|
|
1355
1355
|
});
|
|
1356
1356
|
function _e(e, t) {
|
|
@@ -1388,7 +1388,7 @@ function _e(e, t) {
|
|
|
1388
1388
|
}
|
|
1389
1389
|
return { valid: !1, mergeErrorPath: [] };
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function Ae(e, t, n) {
|
|
1392
1392
|
const r = /* @__PURE__ */ new Map();
|
|
1393
1393
|
let o;
|
|
1394
1394
|
for (const c of t.issues)
|
|
@@ -1415,7 +1415,7 @@ function Ee(e, t, n) {
|
|
|
1415
1415
|
const Zr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
1416
1416
|
y.init(e, t);
|
|
1417
1417
|
const n = Xe(t.entries), r = new Set(n);
|
|
1418
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
1418
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Ct.has(typeof o)).map((o) => typeof o == "string" ? M(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
|
|
1419
1419
|
const i = o.value;
|
|
1420
1420
|
return r.has(i) || o.issues.push({
|
|
1421
1421
|
code: "invalid_value",
|
|
@@ -1463,9 +1463,9 @@ const mt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
1465
1465
|
};
|
|
1466
|
-
}),
|
|
1466
|
+
}), Er = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
|
|
1467
1467
|
mt.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
1468
|
-
}),
|
|
1468
|
+
}), Ar = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
1469
1469
|
y.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
|
|
1470
1470
|
const n = t.innerType._zod.pattern;
|
|
1471
1471
|
return n ? new RegExp(`^(${ye(n.source)}|null)$`) : void 0;
|
|
@@ -1510,18 +1510,18 @@ const xr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
|
1510
1510
|
return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
|
|
1511
1511
|
...n,
|
|
1512
1512
|
error: {
|
|
1513
|
-
issues: s.issues.map((i) =>
|
|
1513
|
+
issues: s.issues.map((i) => C(i, r, j()))
|
|
1514
1514
|
},
|
|
1515
1515
|
input: n.value
|
|
1516
1516
|
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
1517
1517
|
...n,
|
|
1518
1518
|
error: {
|
|
1519
|
-
issues: o.issues.map((s) =>
|
|
1519
|
+
issues: o.issues.map((s) => C(s, r, j()))
|
|
1520
1520
|
},
|
|
1521
1521
|
input: n.value
|
|
1522
1522
|
}), n.issues = []), n);
|
|
1523
1523
|
};
|
|
1524
|
-
}),
|
|
1524
|
+
}), Rr = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
1525
1525
|
y.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
1526
1526
|
if (r.direction === "backward") {
|
|
1527
1527
|
const s = t.out._zod.run(n, r);
|
|
@@ -1534,7 +1534,7 @@ const xr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
|
1534
1534
|
function X(e, t, n) {
|
|
1535
1535
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
1536
1536
|
}
|
|
1537
|
-
const
|
|
1537
|
+
const jr = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
1538
1538
|
y.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
1539
1539
|
if (r.direction === "backward")
|
|
1540
1540
|
return t.innerType._zod.run(n, r);
|
|
@@ -1545,15 +1545,15 @@ const Cr = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
|
1545
1545
|
function xe(e) {
|
|
1546
1546
|
return e.value = Object.freeze(e.value), e;
|
|
1547
1547
|
}
|
|
1548
|
-
const
|
|
1548
|
+
const Cr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
1549
1549
|
T.init(e, t), y.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
1550
1550
|
const r = n.value, o = t.fn(r);
|
|
1551
1551
|
if (o instanceof Promise)
|
|
1552
|
-
return o.then((s) =>
|
|
1553
|
-
|
|
1552
|
+
return o.then((s) => Re(s, n, r, e));
|
|
1553
|
+
Re(o, n, r, e);
|
|
1554
1554
|
};
|
|
1555
1555
|
});
|
|
1556
|
-
function
|
|
1556
|
+
function Re(e, t, n, r) {
|
|
1557
1557
|
if (!e) {
|
|
1558
1558
|
const o = {
|
|
1559
1559
|
code: "custom",
|
|
@@ -1568,7 +1568,7 @@ function je(e, t, n, r) {
|
|
|
1568
1568
|
r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(H(o));
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
|
-
var
|
|
1571
|
+
var je;
|
|
1572
1572
|
class Fr {
|
|
1573
1573
|
constructor() {
|
|
1574
1574
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
@@ -1601,7 +1601,7 @@ class Fr {
|
|
|
1601
1601
|
function Dr() {
|
|
1602
1602
|
return new Fr();
|
|
1603
1603
|
}
|
|
1604
|
-
(
|
|
1604
|
+
(je = globalThis).__zod_globalRegistry ?? (je.__zod_globalRegistry = Dr());
|
|
1605
1605
|
const J = globalThis.__zod_globalRegistry;
|
|
1606
1606
|
// @__NO_SIDE_EFFECTS__
|
|
1607
1607
|
function Lr(e, t) {
|
|
@@ -1621,7 +1621,7 @@ function Mr(e, t) {
|
|
|
1621
1621
|
});
|
|
1622
1622
|
}
|
|
1623
1623
|
// @__NO_SIDE_EFFECTS__
|
|
1624
|
-
function
|
|
1624
|
+
function Ce(e, t) {
|
|
1625
1625
|
return new e({
|
|
1626
1626
|
type: "string",
|
|
1627
1627
|
format: "guid",
|
|
@@ -1965,7 +1965,7 @@ function gt(e, t) {
|
|
|
1965
1965
|
}
|
|
1966
1966
|
// @__NO_SIDE_EFFECTS__
|
|
1967
1967
|
function te(e, t) {
|
|
1968
|
-
return new
|
|
1968
|
+
return new Rn({
|
|
1969
1969
|
check: "min_length",
|
|
1970
1970
|
...d(t),
|
|
1971
1971
|
minimum: e
|
|
@@ -1973,7 +1973,7 @@ function te(e, t) {
|
|
|
1973
1973
|
}
|
|
1974
1974
|
// @__NO_SIDE_EFFECTS__
|
|
1975
1975
|
function _t(e, t) {
|
|
1976
|
-
return new
|
|
1976
|
+
return new jn({
|
|
1977
1977
|
check: "length_equals",
|
|
1978
1978
|
...d(t),
|
|
1979
1979
|
length: e
|
|
@@ -1981,7 +1981,7 @@ function _t(e, t) {
|
|
|
1981
1981
|
}
|
|
1982
1982
|
// @__NO_SIDE_EFFECTS__
|
|
1983
1983
|
function vo(e, t) {
|
|
1984
|
-
return new
|
|
1984
|
+
return new Cn({
|
|
1985
1985
|
check: "string_format",
|
|
1986
1986
|
format: "regex",
|
|
1987
1987
|
...d(t),
|
|
@@ -2056,10 +2056,10 @@ function Oo() {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
// @__NO_SIDE_EFFECTS__
|
|
2058
2058
|
function To() {
|
|
2059
|
-
return /* @__PURE__ */ U((e) =>
|
|
2059
|
+
return /* @__PURE__ */ U((e) => Rt(e));
|
|
2060
2060
|
}
|
|
2061
2061
|
// @__NO_SIDE_EFFECTS__
|
|
2062
|
-
function
|
|
2062
|
+
function Eo(e, t, n) {
|
|
2063
2063
|
return new e({
|
|
2064
2064
|
type: "array",
|
|
2065
2065
|
element: t,
|
|
@@ -2070,7 +2070,7 @@ function Ao(e, t, n) {
|
|
|
2070
2070
|
});
|
|
2071
2071
|
}
|
|
2072
2072
|
// @__NO_SIDE_EFFECTS__
|
|
2073
|
-
function
|
|
2073
|
+
function Ao(e, t, n) {
|
|
2074
2074
|
return new e({
|
|
2075
2075
|
type: "custom",
|
|
2076
2076
|
check: "custom",
|
|
@@ -2338,7 +2338,7 @@ const Po = (e, t = {}) => (n) => {
|
|
|
2338
2338
|
json_string: "json-string",
|
|
2339
2339
|
regex: ""
|
|
2340
2340
|
// do not set
|
|
2341
|
-
},
|
|
2341
|
+
}, Ro = (e, t, n, r) => {
|
|
2342
2342
|
const o = n;
|
|
2343
2343
|
o.type = "string";
|
|
2344
2344
|
const { minimum: s, maximum: i, format: c, patterns: a, contentEncoding: l } = e._zod.bag;
|
|
@@ -2351,10 +2351,10 @@ const Po = (e, t = {}) => (n) => {
|
|
|
2351
2351
|
}))
|
|
2352
2352
|
]);
|
|
2353
2353
|
}
|
|
2354
|
-
},
|
|
2354
|
+
}, jo = (e, t, n, r) => {
|
|
2355
2355
|
const o = n, { minimum: s, maximum: i, format: c, multipleOf: a, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
|
|
2356
2356
|
typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f), typeof s == "number" && (o.minimum = s, typeof f == "number" && t.target !== "draft-04" && (f >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l), typeof i == "number" && (o.maximum = i, typeof l == "number" && t.target !== "draft-04" && (l <= i ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
|
|
2357
|
-
},
|
|
2357
|
+
}, Co = (e, t, n, r) => {
|
|
2358
2358
|
n.type = "boolean";
|
|
2359
2359
|
}, Fo = (e, t, n, r) => {
|
|
2360
2360
|
n.not = {};
|
|
@@ -2521,9 +2521,9 @@ const ui = (e, t) => {
|
|
|
2521
2521
|
// enumerable: false,
|
|
2522
2522
|
}
|
|
2523
2523
|
});
|
|
2524
|
-
},
|
|
2524
|
+
}, E = u("ZodError", ui, {
|
|
2525
2525
|
Parent: Error
|
|
2526
|
-
}), li = /* @__PURE__ */ ze(
|
|
2526
|
+
}), li = /* @__PURE__ */ ze(E), fi = /* @__PURE__ */ $e(E), pi = /* @__PURE__ */ ae(E), di = /* @__PURE__ */ ue(E), hi = /* @__PURE__ */ Xt(E), mi = /* @__PURE__ */ qt(E), gi = /* @__PURE__ */ Qt(E), _i = /* @__PURE__ */ en(E), vi = /* @__PURE__ */ tn(E), bi = /* @__PURE__ */ nn(E), yi = /* @__PURE__ */ rn(E), wi = /* @__PURE__ */ on(E), w = /* @__PURE__ */ u("ZodType", (e, t) => (y.init(e, t), Object.assign(e["~standard"], {
|
|
2527
2527
|
jsonSchema: {
|
|
2528
2528
|
input: ne(e, "input"),
|
|
2529
2529
|
output: ne(e, "output")
|
|
@@ -2549,11 +2549,11 @@ const ui = (e, t) => {
|
|
|
2549
2549
|
const r = e.clone();
|
|
2550
2550
|
return J.add(r, n[0]), r;
|
|
2551
2551
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), zt = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
2552
|
-
ke.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) =>
|
|
2552
|
+
ke.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) => Ro(e, r, o);
|
|
2553
2553
|
const n = e._zod.bag;
|
|
2554
2554
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ vo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ wo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ zo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ $o(...r)), e.min = (...r) => e.check(/* @__PURE__ */ te(...r)), e.max = (...r) => e.check(/* @__PURE__ */ gt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ _t(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ te(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ bo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ yo(r)), e.trim = () => e.check(/* @__PURE__ */ So()), e.normalize = (...r) => e.check(/* @__PURE__ */ ko(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Zo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Oo()), e.slugify = () => e.check(/* @__PURE__ */ To());
|
|
2555
2555
|
}), zi = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2556
|
-
ke.init(e, t), zt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Mr($i, n)), e.url = (n) => e.check(/* @__PURE__ */ Vr(ki, n)), e.jwt = (n) => e.check(/* @__PURE__ */ co(Di, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Hr(Si, n)), e.guid = (n) => e.check(/* @__PURE__ */
|
|
2556
|
+
ke.init(e, t), zt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Mr($i, n)), e.url = (n) => e.check(/* @__PURE__ */ Vr(ki, n)), e.jwt = (n) => e.check(/* @__PURE__ */ co(Di, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Hr(Si, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ce(Me, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Ur(q, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Jr(q, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Wr(q, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Br(q, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Yr(Zi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ce(Me, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Gr(Oi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Kr(Ti, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Xr(Ei, n)), e.base64 = (n) => e.check(/* @__PURE__ */ oo(ji, n)), e.base64url = (n) => e.check(/* @__PURE__ */ io(Ci, n)), e.xid = (n) => e.check(/* @__PURE__ */ qr(Ai, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Qr(Ii, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ eo(Ni, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ to(Pi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ no(xi, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ ro(Ri, n)), e.e164 = (n) => e.check(/* @__PURE__ */ so(Fi, n)), e.datetime = (n) => e.check(ni(n)), e.date = (n) => e.check(oi(n)), e.time = (n) => e.check(si(n)), e.duration = (n) => e.check(ai(n));
|
|
2557
2557
|
});
|
|
2558
2558
|
function N(e) {
|
|
2559
2559
|
return /* @__PURE__ */ Lr(zi, e);
|
|
@@ -2576,9 +2576,9 @@ const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2576
2576
|
qn.init(e, t), b.init(e, t);
|
|
2577
2577
|
}), Ti = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
|
|
2578
2578
|
Qn.init(e, t), b.init(e, t);
|
|
2579
|
-
}),
|
|
2579
|
+
}), Ei = /* @__PURE__ */ u("ZodULID", (e, t) => {
|
|
2580
2580
|
er.init(e, t), b.init(e, t);
|
|
2581
|
-
}),
|
|
2581
|
+
}), Ai = /* @__PURE__ */ u("ZodXID", (e, t) => {
|
|
2582
2582
|
tr.init(e, t), b.init(e, t);
|
|
2583
2583
|
}), Ii = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
|
|
2584
2584
|
nr.init(e, t), b.init(e, t);
|
|
@@ -2588,18 +2588,18 @@ const b = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
|
2588
2588
|
ar.init(e, t), b.init(e, t);
|
|
2589
2589
|
}), xi = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
2590
2590
|
ur.init(e, t), b.init(e, t);
|
|
2591
|
-
}),
|
|
2591
|
+
}), Ri = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
2592
2592
|
lr.init(e, t), b.init(e, t);
|
|
2593
|
-
}),
|
|
2593
|
+
}), ji = /* @__PURE__ */ u("ZodBase64", (e, t) => {
|
|
2594
2594
|
fr.init(e, t), b.init(e, t);
|
|
2595
|
-
}),
|
|
2595
|
+
}), Ci = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
|
|
2596
2596
|
dr.init(e, t), b.init(e, t);
|
|
2597
2597
|
}), Fi = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
2598
2598
|
hr.init(e, t), b.init(e, t);
|
|
2599
2599
|
}), Di = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
2600
2600
|
gr.init(e, t), b.init(e, t);
|
|
2601
2601
|
}), $t = /* @__PURE__ */ u("ZodNumber", (e, t) => {
|
|
2602
|
-
ft.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) =>
|
|
2602
|
+
ft.init(e, t), w.init(e, t), e._zod.processJSONSchema = (r, o, s) => jo(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ De(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ he(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ he(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Fe(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ de(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ de(r, o)), e.int = (r) => e.check(Ue(r)), e.safe = (r) => e.check(Ue(r)), e.positive = (r) => e.check(/* @__PURE__ */ De(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ he(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Fe(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ de(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Le(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Le(r, o)), e.finite = () => e;
|
|
2603
2603
|
const n = e._zod.bag;
|
|
2604
2604
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2605
2605
|
});
|
|
@@ -2613,7 +2613,7 @@ function Ue(e) {
|
|
|
2613
2613
|
return /* @__PURE__ */ ho(Li, e);
|
|
2614
2614
|
}
|
|
2615
2615
|
const Mi = /* @__PURE__ */ u("ZodBoolean", (e, t) => {
|
|
2616
|
-
vr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) =>
|
|
2616
|
+
vr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Co(e, n, r);
|
|
2617
2617
|
});
|
|
2618
2618
|
function Je(e) {
|
|
2619
2619
|
return /* @__PURE__ */ mo(Mi, e);
|
|
@@ -2634,7 +2634,7 @@ const Bi = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
|
2634
2634
|
wr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ te(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ te(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ gt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ _t(n, r)), e.unwrap = () => e.element;
|
|
2635
2635
|
});
|
|
2636
2636
|
function re(e, t) {
|
|
2637
|
-
return /* @__PURE__ */
|
|
2637
|
+
return /* @__PURE__ */ Eo(Bi, e, t);
|
|
2638
2638
|
}
|
|
2639
2639
|
const Vi = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
2640
2640
|
$r.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), g(e, "shape", () => t.shape), e.keyof = () => St(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: We() }), e.loose = () => e.clone({ ...e._zod.def, catchall: We() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Wi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Ut(e, n), e.safeExtend = (n) => Jt(e, n), e.merge = (n) => Wt(e, n), e.pick = (n) => Lt(e, n), e.omit = (n) => Mt(e, n), e.partial = (...n) => Bt(Zt, e, n[0]), e.required = (...n) => Vt(Ot, e, n[0]);
|
|
@@ -2733,7 +2733,7 @@ const qi = /* @__PURE__ */ u("ZodLiteral", (e, t) => {
|
|
|
2733
2733
|
}
|
|
2734
2734
|
});
|
|
2735
2735
|
});
|
|
2736
|
-
function
|
|
2736
|
+
function R(e, t) {
|
|
2737
2737
|
return new qi({
|
|
2738
2738
|
type: "literal",
|
|
2739
2739
|
values: Array.isArray(e) ? e : [e],
|
|
@@ -2772,7 +2772,7 @@ function Be(e) {
|
|
|
2772
2772
|
});
|
|
2773
2773
|
}
|
|
2774
2774
|
const ts = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
|
|
2775
|
-
|
|
2775
|
+
Er.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => wt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2776
2776
|
});
|
|
2777
2777
|
function ns(e) {
|
|
2778
2778
|
return new ts({
|
|
@@ -2781,7 +2781,7 @@ function ns(e) {
|
|
|
2781
2781
|
});
|
|
2782
2782
|
}
|
|
2783
2783
|
const rs = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
2784
|
-
|
|
2784
|
+
Ar.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Yo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2785
2785
|
});
|
|
2786
2786
|
function Ve(e) {
|
|
2787
2787
|
return new rs({
|
|
@@ -2834,7 +2834,7 @@ function ls(e, t) {
|
|
|
2834
2834
|
});
|
|
2835
2835
|
}
|
|
2836
2836
|
const fs = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
2837
|
-
|
|
2837
|
+
Rr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Qo(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
2838
2838
|
});
|
|
2839
2839
|
function He(e, t) {
|
|
2840
2840
|
return new fs({
|
|
@@ -2845,7 +2845,7 @@ function He(e, t) {
|
|
|
2845
2845
|
});
|
|
2846
2846
|
}
|
|
2847
2847
|
const ps = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
|
|
2848
|
-
|
|
2848
|
+
jr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => ei(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2849
2849
|
});
|
|
2850
2850
|
function ds(e) {
|
|
2851
2851
|
return new ps({
|
|
@@ -2854,10 +2854,10 @@ function ds(e) {
|
|
|
2854
2854
|
});
|
|
2855
2855
|
}
|
|
2856
2856
|
const hs = /* @__PURE__ */ u("ZodCustom", (e, t) => {
|
|
2857
|
-
|
|
2857
|
+
Cr.init(e, t), w.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uo(e, n);
|
|
2858
2858
|
});
|
|
2859
2859
|
function ms(e, t = {}) {
|
|
2860
|
-
return /* @__PURE__ */
|
|
2860
|
+
return /* @__PURE__ */ Ao(hs, e, t);
|
|
2861
2861
|
}
|
|
2862
2862
|
function gs(e) {
|
|
2863
2863
|
return /* @__PURE__ */ Io(e);
|
|
@@ -2897,10 +2897,10 @@ const _s = {
|
|
|
2897
2897
|
Half: "B"
|
|
2898
2898
|
}, Ts = k(
|
|
2899
2899
|
Os
|
|
2900
|
-
),
|
|
2900
|
+
), Es = {
|
|
2901
2901
|
Enable: "Y",
|
|
2902
2902
|
Disable: "N"
|
|
2903
|
-
},
|
|
2903
|
+
}, As = k(Es), Is = {
|
|
2904
2904
|
TearOff: "T",
|
|
2905
2905
|
PeelOff: "P",
|
|
2906
2906
|
Rewind: "R",
|
|
@@ -2912,20 +2912,20 @@ const _s = {
|
|
|
2912
2912
|
}, Ns = k(Is), Ps = {
|
|
2913
2913
|
Prepeel: "Y",
|
|
2914
2914
|
NoPrepeel: "N"
|
|
2915
|
-
}, xs = k(Ps),
|
|
2915
|
+
}, xs = k(Ps), Rs = {
|
|
2916
2916
|
AllMedia: "Y",
|
|
2917
2917
|
ContinuousOnly: "N"
|
|
2918
|
-
},
|
|
2918
|
+
}, js = k(Rs), ve = {
|
|
2919
2919
|
NoRotation: "N",
|
|
2920
2920
|
Rotate90: "R",
|
|
2921
2921
|
Rotate180: "I",
|
|
2922
2922
|
Rotate270: "B"
|
|
2923
|
-
}, Tt = k(ve),
|
|
2923
|
+
}, Tt = k(ve), Et = {
|
|
2924
2924
|
Left: "L",
|
|
2925
2925
|
Right: "R",
|
|
2926
2926
|
Center: "C",
|
|
2927
2927
|
Justified: "J"
|
|
2928
|
-
},
|
|
2928
|
+
}, Cs = k(Et), Q = {
|
|
2929
2929
|
Left: "L",
|
|
2930
2930
|
Right: "R",
|
|
2931
2931
|
Center: "C"
|
|
@@ -2969,7 +2969,7 @@ const _s = {
|
|
|
2969
2969
|
hideEmpty: Je(),
|
|
2970
2970
|
editable: Je()
|
|
2971
2971
|
}), Hs = pe.extend({
|
|
2972
|
-
type:
|
|
2972
|
+
type: R("text"),
|
|
2973
2973
|
// ^A font, height
|
|
2974
2974
|
font: N().regex(/^[A-Z0-9]$/, "Font must be a single character A-Z or 0-9"),
|
|
2975
2975
|
fontOrientation: Tt,
|
|
@@ -2978,7 +2978,7 @@ const _s = {
|
|
|
2978
2978
|
maxWidth: _().int().min(0).max(9999),
|
|
2979
2979
|
maxLines: _().int().min(1).max(9999),
|
|
2980
2980
|
lineSpacing: _().int().min(-9999).max(9999),
|
|
2981
|
-
alignment:
|
|
2981
|
+
alignment: Cs,
|
|
2982
2982
|
hangingIndent: _().int().min(0).max(9999),
|
|
2983
2983
|
// CUSTOM
|
|
2984
2984
|
charsPerLine: _().int().min(1).max(100),
|
|
@@ -2988,7 +2988,7 @@ const _s = {
|
|
|
2988
2988
|
wordWidths: re(Vs).optional(),
|
|
2989
2989
|
minFontHeight: _().int().min(1).max(32e3).optional()
|
|
2990
2990
|
}), Ys = pe.extend({
|
|
2991
|
-
type:
|
|
2991
|
+
type: R("barcode"),
|
|
2992
2992
|
// ^BY barWidth
|
|
2993
2993
|
barWidth: _().int().min(1).max(100),
|
|
2994
2994
|
// ^BC orientation, height, line, lineAbove, checkDigit
|
|
@@ -3005,15 +3005,15 @@ const _s = {
|
|
|
3005
3005
|
// End → ^FT bottom edge), so the two fields combine to address 6 anchor points.
|
|
3006
3006
|
alignment: Fs.optional()
|
|
3007
3007
|
}), Gs = pe.extend({
|
|
3008
|
-
type:
|
|
3008
|
+
type: R("qrcode"),
|
|
3009
3009
|
// ^BQ orientation, model, magnification, errorCorrection, mask
|
|
3010
|
-
orientation:
|
|
3011
|
-
model:
|
|
3010
|
+
orientation: R("N"),
|
|
3011
|
+
model: R("2"),
|
|
3012
3012
|
magnification: _().int().min(1).max(100),
|
|
3013
3013
|
errorCorrection: Ls,
|
|
3014
3014
|
mask: _().int().min(0).max(7)
|
|
3015
3015
|
}), Ks = pe.extend({
|
|
3016
|
-
type:
|
|
3016
|
+
type: R("image"),
|
|
3017
3017
|
// ^CF imagePath
|
|
3018
3018
|
data: N(),
|
|
3019
3019
|
// When set, the image renders only if the resolved source value equals the
|
|
@@ -3042,7 +3042,10 @@ const _s = {
|
|
|
3042
3042
|
"Paris",
|
|
3043
3043
|
"London",
|
|
3044
3044
|
"GT Walsheim",
|
|
3045
|
-
"Domain Display"
|
|
3045
|
+
"Domain Display",
|
|
3046
|
+
// PAPARAZZI
|
|
3047
|
+
"Editors Note Light",
|
|
3048
|
+
"Editors Note Medium"
|
|
3046
3049
|
])
|
|
3047
3050
|
}), Qs = {
|
|
3048
3051
|
// DEFAULT
|
|
@@ -3059,9 +3062,12 @@ const _s = {
|
|
|
3059
3062
|
Paris: "PARIS.TTF",
|
|
3060
3063
|
London: "LONDON.TTF",
|
|
3061
3064
|
"GT Walsheim": "GT_WALSHEIM.TTF",
|
|
3062
|
-
"Domain Display": "DOMAIN_DISPLAY.TTF"
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
+
"Domain Display": "DOMAIN_DISPLAY.TTF",
|
|
3066
|
+
// PAPARAZZI
|
|
3067
|
+
"Editors Note Light": "EDITORS_NOTE_LIGHT.TTF",
|
|
3068
|
+
"Editors Note Medium": "EDITORS_NOTE_MEDIUM.TTF"
|
|
3069
|
+
}, At = fe({
|
|
3070
|
+
type: R("thermal"),
|
|
3065
3071
|
// ~TA adjustment
|
|
3066
3072
|
tearOffAdjustment: _().int().min(0).max(120),
|
|
3067
3073
|
// ~JS sequence
|
|
@@ -3087,7 +3093,7 @@ const _s = {
|
|
|
3087
3093
|
// ~SD darkness
|
|
3088
3094
|
darkness: _().int().min(0).max(30),
|
|
3089
3095
|
// ^LR reverse
|
|
3090
|
-
reverse:
|
|
3096
|
+
reverse: As,
|
|
3091
3097
|
// ^MM mode, prepeel
|
|
3092
3098
|
postPrintMode: Ns,
|
|
3093
3099
|
prepeel: xs,
|
|
@@ -3095,16 +3101,16 @@ const _s = {
|
|
|
3095
3101
|
printWidth: _().int().min(2),
|
|
3096
3102
|
// ^LL length, allMedia
|
|
3097
3103
|
labelLength: _().int().min(1).max(32e3),
|
|
3098
|
-
allMedia:
|
|
3104
|
+
allMedia: js,
|
|
3099
3105
|
// Fields
|
|
3100
3106
|
fields: re(Xs),
|
|
3101
3107
|
fonts: re(qs)
|
|
3102
3108
|
});
|
|
3103
3109
|
function mc(e) {
|
|
3104
|
-
return
|
|
3110
|
+
return At.safeParse(e);
|
|
3105
3111
|
}
|
|
3106
3112
|
function gc(e) {
|
|
3107
|
-
return
|
|
3113
|
+
return At.parse(e);
|
|
3108
3114
|
}
|
|
3109
3115
|
const ie = 1.05;
|
|
3110
3116
|
function _c(e, t, n) {
|
|
@@ -3255,7 +3261,7 @@ function ic(e, t) {
|
|
|
3255
3261
|
i = Math.min(a, e.maxLines);
|
|
3256
3262
|
}
|
|
3257
3263
|
const c = `^FB${e.maxWidth},${i},${e.lineSpacing},${e.alignment},${e.hangingIndent}`;
|
|
3258
|
-
return e.alignment ===
|
|
3264
|
+
return e.alignment === Et.Center && (t = t + "\\&"), `${s}${e.x},${e.y}${o}${c}^FD${t}^FS`;
|
|
3259
3265
|
}
|
|
3260
3266
|
function sc(e) {
|
|
3261
3267
|
return e.split("\\&").map((t) => t.split(/\s+/).filter(Boolean));
|
|
@@ -3359,7 +3365,7 @@ function dc(e, t) {
|
|
|
3359
3365
|
return e.verticalAlignment === Y.End && (n = "^FT"), `${n}${e.x},${e.y}^GF${e.data}^FS`;
|
|
3360
3366
|
}
|
|
3361
3367
|
export {
|
|
3362
|
-
|
|
3368
|
+
Rs as AllMediaMode,
|
|
3363
3369
|
_s as BackfeedAction,
|
|
3364
3370
|
Q as BarcodeAlignment,
|
|
3365
3371
|
Qs as FontFamilyToFontZPLName,
|
|
@@ -3371,17 +3377,17 @@ export {
|
|
|
3371
3377
|
Os as PrintDensityAdjustment,
|
|
3372
3378
|
$s as PrintOrientation,
|
|
3373
3379
|
Ds as QRCodeErrorCorrection,
|
|
3374
|
-
|
|
3380
|
+
Es as ReverseMode,
|
|
3375
3381
|
Js as SourceType,
|
|
3376
|
-
|
|
3382
|
+
Et as TextAlignment,
|
|
3377
3383
|
W as TextTransformation,
|
|
3378
3384
|
ws as ThermalMediaType,
|
|
3379
3385
|
Y as VerticalAlignment,
|
|
3380
3386
|
Ms as YesNo,
|
|
3381
|
-
|
|
3387
|
+
js as allMediaModeSchema,
|
|
3382
3388
|
oc as applyTextTransformation,
|
|
3383
3389
|
vs as backfeedActionSchema,
|
|
3384
|
-
|
|
3390
|
+
At as badgeSchema,
|
|
3385
3391
|
Fs as barcodeAlignmentSchema,
|
|
3386
3392
|
Ys as barcodeFieldSchema,
|
|
3387
3393
|
ac as calculateFittedFontHeight,
|
|
@@ -3401,9 +3407,9 @@ export {
|
|
|
3401
3407
|
ks as printOrientationSchema,
|
|
3402
3408
|
Ls as qrCodeErrorCorrectionSchema,
|
|
3403
3409
|
Gs as qrcodeFieldSchema,
|
|
3404
|
-
|
|
3410
|
+
As as reverseModeSchema,
|
|
3405
3411
|
Ws as sourceTypeSchema,
|
|
3406
|
-
|
|
3412
|
+
Cs as textAlignmentSchema,
|
|
3407
3413
|
Hs as textFieldSchema,
|
|
3408
3414
|
Bs as textTransformationSchema,
|
|
3409
3415
|
zs as thermalMediaTypeSchema,
|
package/dist/src/validate.d.ts
CHANGED
|
@@ -587,6 +587,8 @@ export declare const fontSchema: z.ZodObject<{
|
|
|
587
587
|
London: "London";
|
|
588
588
|
"GT Walsheim": "GT Walsheim";
|
|
589
589
|
"Domain Display": "Domain Display";
|
|
590
|
+
"Editors Note Light": "Editors Note Light";
|
|
591
|
+
"Editors Note Medium": "Editors Note Medium";
|
|
590
592
|
}>;
|
|
591
593
|
}, z.core.$strip>;
|
|
592
594
|
export type Font = z.infer<typeof fontSchema>;
|
|
@@ -604,6 +606,8 @@ export declare const FontFamilyToFontZPLName: {
|
|
|
604
606
|
London: string;
|
|
605
607
|
"GT Walsheim": string;
|
|
606
608
|
"Domain Display": string;
|
|
609
|
+
"Editors Note Light": string;
|
|
610
|
+
"Editors Note Medium": string;
|
|
607
611
|
};
|
|
608
612
|
export declare const badgeSchema: z.ZodObject<{
|
|
609
613
|
type: z.ZodLiteral<"thermal">;
|
|
@@ -857,6 +861,8 @@ export declare const badgeSchema: z.ZodObject<{
|
|
|
857
861
|
London: "London";
|
|
858
862
|
"GT Walsheim": "GT Walsheim";
|
|
859
863
|
"Domain Display": "Domain Display";
|
|
864
|
+
"Editors Note Light": "Editors Note Light";
|
|
865
|
+
"Editors Note Medium": "Editors Note Medium";
|
|
860
866
|
}>;
|
|
861
867
|
}, z.core.$strip>>;
|
|
862
868
|
}, z.core.$strip>;
|
|
@@ -984,7 +990,7 @@ export declare function validateBadge(data: Badge): z.ZodSafeParseResult<{
|
|
|
984
990
|
})[];
|
|
985
991
|
fonts: {
|
|
986
992
|
alias: string;
|
|
987
|
-
name: "Arial" | "Open Sans" | "Roboto" | "Lato" | "Montserrat" | "Inter" | "Oswald" | "Raleway" | "Raleway Bold" | "Paris" | "London" | "GT Walsheim" | "Domain Display";
|
|
993
|
+
name: "Arial" | "Open Sans" | "Roboto" | "Lato" | "Montserrat" | "Inter" | "Oswald" | "Raleway" | "Raleway Bold" | "Paris" | "London" | "GT Walsheim" | "Domain Display" | "Editors Note Light" | "Editors Note Medium";
|
|
988
994
|
}[];
|
|
989
995
|
}>;
|
|
990
996
|
/**
|
|
@@ -1099,6 +1105,6 @@ export declare function validateBadgeOrThrow(data: Badge): {
|
|
|
1099
1105
|
})[];
|
|
1100
1106
|
fonts: {
|
|
1101
1107
|
alias: string;
|
|
1102
|
-
name: "Arial" | "Open Sans" | "Roboto" | "Lato" | "Montserrat" | "Inter" | "Oswald" | "Raleway" | "Raleway Bold" | "Paris" | "London" | "GT Walsheim" | "Domain Display";
|
|
1108
|
+
name: "Arial" | "Open Sans" | "Roboto" | "Lato" | "Montserrat" | "Inter" | "Oswald" | "Raleway" | "Raleway Bold" | "Paris" | "London" | "GT Walsheim" | "Domain Display" | "Editors Note Light" | "Editors Note Medium";
|
|
1103
1109
|
}[];
|
|
1104
1110
|
};
|