@connectedxm/zpl-generator 0.0.5 → 0.0.7
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 +8 -7
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3105,7 +3105,7 @@ function Gs(e, t, n) {
|
|
|
3105
3105
|
case "qrcode":
|
|
3106
3106
|
return nc(e, r);
|
|
3107
3107
|
case "image":
|
|
3108
|
-
return rc(e);
|
|
3108
|
+
return rc(e, r);
|
|
3109
3109
|
default: {
|
|
3110
3110
|
const o = e;
|
|
3111
3111
|
throw new Error(`Unsupported field type: ${o.type}`);
|
|
@@ -3193,12 +3193,12 @@ function Xs(e, t) {
|
|
|
3193
3193
|
s = Math.min(c, e.maxLines);
|
|
3194
3194
|
}
|
|
3195
3195
|
const i = `^FB${e.maxWidth},${s},${e.lineSpacing},${e.alignment},${e.hangingIndent}`;
|
|
3196
|
-
return e.alignment === $t.Center && (t = t + "
|
|
3196
|
+
return e.alignment === $t.Center && (t = t + "\\&"), `${o}${e.x},${e.y}${r}${i}^FD${t}^FS`;
|
|
3197
3197
|
}
|
|
3198
3198
|
function Qs(e, t) {
|
|
3199
3199
|
if (e.measuredWidth !== void 0 && e.maxWidth > 0)
|
|
3200
3200
|
return Math.max(1, Math.ceil(e.measuredWidth / e.maxWidth));
|
|
3201
|
-
const n = t.split("
|
|
3201
|
+
const n = t.split("&"), r = e.charsPerLine ?? 0;
|
|
3202
3202
|
return ec(n, r);
|
|
3203
3203
|
}
|
|
3204
3204
|
function ec(e, t) {
|
|
@@ -3213,7 +3213,7 @@ function tc(e, t) {
|
|
|
3213
3213
|
let n = "^FO";
|
|
3214
3214
|
e.verticalAlignment === K.End && (n = "^FT");
|
|
3215
3215
|
const r = `^BY${e.barWidth}`, o = `^BC${e.orientation},${e.height},${e.line},${e.lineAbove},${e.checkDigit},N`;
|
|
3216
|
-
return `${n}${e.x},${e.y}${r}${o}^FD
|
|
3216
|
+
return `${n}${e.x},${e.y}${r}${o}^FD${t}^FS`;
|
|
3217
3217
|
}
|
|
3218
3218
|
function nc(e, t) {
|
|
3219
3219
|
let n = "^FO";
|
|
@@ -3221,9 +3221,10 @@ function nc(e, t) {
|
|
|
3221
3221
|
const r = `^BQ${e.orientation},${e.model},${e.magnification},${e.errorCorrection},${e.mask}`;
|
|
3222
3222
|
return `${n}${e.x},${e.y}${r}^FDQA,${t}^FS`;
|
|
3223
3223
|
}
|
|
3224
|
-
function rc(e) {
|
|
3225
|
-
|
|
3226
|
-
|
|
3224
|
+
function rc(e, t) {
|
|
3225
|
+
if (t === "") return "";
|
|
3226
|
+
let n = "^FO";
|
|
3227
|
+
return e.verticalAlignment === K.End && (n = "^FT"), `${n}${e.x},${e.y}^GF${e.data}^FS`;
|
|
3227
3228
|
}
|
|
3228
3229
|
export {
|
|
3229
3230
|
Is as AllMediaMode,
|