@connectedxm/zpl-generator 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/dist/index.es.js +7 -6
  2. 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 + "&"), `${o}${e.x},${e.y}${r}${i}^FD${t}^FS`;
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("\\&"), r = e.charsPerLine ?? 0;
3201
+ const n = t.split("&"), r = e.charsPerLine ?? 0;
3202
3202
  return ec(n, r);
3203
3203
  }
3204
3204
  function ec(e, t) {
@@ -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
- let t = "^FO";
3226
- return e.verticalAlignment === K.End && (t = "^FT"), `${t}^GF${e.data}^FS`;
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/zpl-generator",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",