@shotstack/shotstack-canvas 1.5.1 → 1.5.2

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.
@@ -1698,16 +1698,16 @@ async function createNodePainter(opts) {
1698
1698
  for (const op of ops) {
1699
1699
  if (op.op === "BeginFrame") {
1700
1700
  const dpr = op.pixelRatio ?? opts.pixelRatio;
1701
- const wantW = Math.floor(op.width * dpr);
1702
- const wantH = Math.floor(op.height * dpr);
1701
+ const wantW = Math.floor(op.width);
1702
+ const wantH = Math.floor(op.height);
1703
1703
  if (canvas.width !== wantW || canvas.height !== wantH) {
1704
1704
  canvas.width = wantW;
1705
1705
  canvas.height = wantH;
1706
1706
  offscreenCanvas.width = wantW;
1707
1707
  offscreenCanvas.height = wantH;
1708
1708
  }
1709
- ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
1710
- offscreenCtx.setTransform(dpr, 0, 0, dpr, 0, 0);
1709
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
1710
+ offscreenCtx.setTransform(1, 0, 0, 1, 0, 0);
1711
1711
  const hasBackground = !!(op.bg && op.bg.color);
1712
1712
  needsAlphaExtraction = !hasBackground;
1713
1713
  if (op.bg && op.bg.color) {
@@ -1659,16 +1659,16 @@ async function createNodePainter(opts) {
1659
1659
  for (const op of ops) {
1660
1660
  if (op.op === "BeginFrame") {
1661
1661
  const dpr = op.pixelRatio ?? opts.pixelRatio;
1662
- const wantW = Math.floor(op.width * dpr);
1663
- const wantH = Math.floor(op.height * dpr);
1662
+ const wantW = Math.floor(op.width);
1663
+ const wantH = Math.floor(op.height);
1664
1664
  if (canvas.width !== wantW || canvas.height !== wantH) {
1665
1665
  canvas.width = wantW;
1666
1666
  canvas.height = wantH;
1667
1667
  offscreenCanvas.width = wantW;
1668
1668
  offscreenCanvas.height = wantH;
1669
1669
  }
1670
- ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
1671
- offscreenCtx.setTransform(dpr, 0, 0, dpr, 0, 0);
1670
+ ctx.setTransform(1, 0, 0, 1, 0, 0);
1671
+ offscreenCtx.setTransform(1, 0, 0, 1, 0, 0);
1672
1672
  const hasBackground = !!(op.bg && op.bg.color);
1673
1673
  needsAlphaExtraction = !hasBackground;
1674
1674
  if (op.bg && op.bg.color) {
package/dist/entry.web.js CHANGED
@@ -336,12 +336,12 @@ async function initHB(wasmBaseURL) {
336
336
  console.log(`\u{1F30D} Set global Module.wasmBinary (${wasmBinary.byteLength} bytes)`);
337
337
  }
338
338
  console.log("\u{1F504} Importing harfbuzzjs/hb.js (factory)");
339
- const hbModule = await import("./hb-KXF2MJ2J.js");
339
+ const hbModule = await import("./hb-ODWKSLMB.js");
340
340
  const hbFactory = hbModule.default || hbModule;
341
341
  console.log("\u{1F504} Calling hb factory with wasmBinary");
342
342
  const hbInstance = await hbFactory({ wasmBinary });
343
343
  console.log("\u{1F504} Importing harfbuzzjs/hbjs.js (wrapper)");
344
- const hbjsModule = await import("./hbjs-ZTRARROF.js");
344
+ const hbjsModule = await import("./hbjs-HHU2TAW7.js");
345
345
  const hbjsWrapper = hbjsModule.default || hbjsModule;
346
346
  console.log("\u{1F504} Wrapping hb instance");
347
347
  const hb = hbjsWrapper(hbInstance);
@@ -4,9 +4,9 @@ import {
4
4
  __require
5
5
  } from "./chunk-HYGMWVDX.js";
6
6
 
7
- // node_modules/harfbuzzjs/hb.js
7
+ // node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hb.js
8
8
  var require_hb = __commonJS({
9
- "node_modules/harfbuzzjs/hb.js"(exports, module) {
9
+ "node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hb.js"(exports, module) {
10
10
  var createHarfBuzz = (() => {
11
11
  var _scriptName = typeof document != "undefined" ? document.currentScript?.src : void 0;
12
12
  return async function(moduleArg = {}) {
@@ -2,9 +2,9 @@ import {
2
2
  __commonJS
3
3
  } from "./chunk-HYGMWVDX.js";
4
4
 
5
- // node_modules/harfbuzzjs/hbjs.js
5
+ // node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hbjs.js
6
6
  var require_hbjs = __commonJS({
7
- "node_modules/harfbuzzjs/hbjs.js"(exports, module) {
7
+ "node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hbjs.js"(exports, module) {
8
8
  function hbjs(Module) {
9
9
  "use strict";
10
10
  var exports2 = Module.wasmExports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/shotstack-canvas",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Text layout & animation engine (HarfBuzz) for Node & Web - fully self-contained.",
5
5
  "type": "module",
6
6
  "main": "./dist/entry.node.cjs",