@zebrash/core 1.0.2 → 1.0.3

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 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../src/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AA2CvE;;;;;GAKG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkB;IACjD,OAAO,CAAC,iBAAiB,CAAmC;gBAEhD,cAAc,CAAC,EAAE,aAAa,EAAE;IAI5C,8EAA8E;IAC9E,OAAO,CAAC,oBAAoB;IAO5B;;;;;;;;;;;OAWG;IACG,cAAc,CAClB,KAAK,EAAE,SAAS,EAChB,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM,GACnC,OAAO,CAAC,UAAU,CAAC;IAwEtB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAkF9F"}
1
+ {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../src/drawer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AA2CvE;;;;;GAKG;AACH,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkB;IACjD,OAAO,CAAC,iBAAiB,CAAmC;gBAEhD,cAAc,CAAC,EAAE,aAAa,EAAE;IAI5C,8EAA8E;IAC9E,OAAO,CAAC,oBAAoB;IAO5B;;;;;;;;;;;OAWG;IACG,cAAc,CAClB,KAAK,EAAE,SAAS,EAChB,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM,GACnC,OAAO,CAAC,UAAU,CAAC;IA+EtB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAkF9F"}
package/dist/drawer.js CHANGED
@@ -103,6 +103,11 @@ export class Drawer {
103
103
  wCtx.scale(-1, -1);
104
104
  }
105
105
  wCtx.drawImage(canvas, Math.floor((labelWidth - imageWidth) / 2), 0);
106
+ // @napi-rs/canvas's putImageData is affected by the active transform
107
+ // (spec violation — putImageData should write at raw pixel coords).
108
+ // encodeMonochrome / encodeGrayscale call putImageData below, so reset
109
+ // to identity here. No-op in browsers, which already follow the spec.
110
+ wCtx.setTransform(1, 0, 0, 1, 0, 0);
106
111
  finalCtx = wCtx;
107
112
  }
108
113
  return opts.grayscaleOutput
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zebrash/core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Engine for the @zebrash family — pure-TS ZPL parser + renderer. Internal package; consume @zebrash/node or @zebrash/browser.",
5
5
  "keywords": [
6
6
  "barcode",