@shotstack/shotstack-canvas 1.5.0 → 1.5.1

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.
@@ -172,9 +172,7 @@ var RichTextAssetSchema = import_joi.default.object({
172
172
  padding: paddingSchema.optional(),
173
173
  align: alignmentSchema.optional(),
174
174
  animation: animationSchema.optional(),
175
- customFonts: import_joi.default.array().items(customFontSchema).optional(),
176
- cacheEnabled: import_joi.default.boolean().default(true),
177
- pixelRatio: import_joi.default.number().min(1).max(3).default(CANVAS_CONFIG.DEFAULTS.pixelRatio)
175
+ customFonts: import_joi.default.array().items(customFontSchema).optional()
178
176
  }).unknown(false);
179
177
 
180
178
  // src/wasm/hb-loader.ts
@@ -2435,7 +2433,7 @@ async function createTextEngine(opts = {}) {
2435
2433
  };
2436
2434
  const canvasW = (asset.width ?? width) + padding.left + padding.right;
2437
2435
  const canvasH = (asset.height ?? height) + padding.top + padding.bottom;
2438
- const canvasPR = asset.pixelRatio ?? pixelRatio;
2436
+ const canvasPR = pixelRatio;
2439
2437
  let ops0;
2440
2438
  try {
2441
2439
  ops0 = await buildDrawOps({
@@ -2524,7 +2522,7 @@ async function createTextEngine(opts = {}) {
2524
2522
  fps,
2525
2523
  duration: options.duration ?? 3,
2526
2524
  outputPath: options.outputPath ?? "output.mp4",
2527
- pixelRatio: asset.pixelRatio ?? pixelRatio,
2525
+ pixelRatio,
2528
2526
  hasAlpha: needsAlpha,
2529
2527
  ...options
2530
2528
  };
@@ -94,8 +94,6 @@ type RichTextValidated = Required<{
94
94
  style?: string;
95
95
  originalFamily?: string;
96
96
  }[];
97
- cacheEnabled: boolean;
98
- pixelRatio: number;
99
97
  }>;
100
98
 
101
99
  type RGBA = {
@@ -94,8 +94,6 @@ type RichTextValidated = Required<{
94
94
  style?: string;
95
95
  originalFamily?: string;
96
96
  }[];
97
- cacheEnabled: boolean;
98
- pixelRatio: number;
99
97
  }>;
100
98
 
101
99
  type RGBA = {
@@ -134,9 +134,7 @@ var RichTextAssetSchema = Joi.object({
134
134
  padding: paddingSchema.optional(),
135
135
  align: alignmentSchema.optional(),
136
136
  animation: animationSchema.optional(),
137
- customFonts: Joi.array().items(customFontSchema).optional(),
138
- cacheEnabled: Joi.boolean().default(true),
139
- pixelRatio: Joi.number().min(1).max(3).default(CANVAS_CONFIG.DEFAULTS.pixelRatio)
137
+ customFonts: Joi.array().items(customFontSchema).optional()
140
138
  }).unknown(false);
141
139
 
142
140
  // src/wasm/hb-loader.ts
@@ -2396,7 +2394,7 @@ async function createTextEngine(opts = {}) {
2396
2394
  };
2397
2395
  const canvasW = (asset.width ?? width) + padding.left + padding.right;
2398
2396
  const canvasH = (asset.height ?? height) + padding.top + padding.bottom;
2399
- const canvasPR = asset.pixelRatio ?? pixelRatio;
2397
+ const canvasPR = pixelRatio;
2400
2398
  let ops0;
2401
2399
  try {
2402
2400
  ops0 = await buildDrawOps({
@@ -2485,7 +2483,7 @@ async function createTextEngine(opts = {}) {
2485
2483
  fps,
2486
2484
  duration: options.duration ?? 3,
2487
2485
  outputPath: options.outputPath ?? "output.mp4",
2488
- pixelRatio: asset.pixelRatio ?? pixelRatio,
2486
+ pixelRatio,
2489
2487
  hasAlpha: needsAlpha,
2490
2488
  ...options
2491
2489
  };
@@ -94,8 +94,6 @@ type RichTextValidated = Required<{
94
94
  style?: string;
95
95
  originalFamily?: string;
96
96
  }[];
97
- cacheEnabled: boolean;
98
- pixelRatio: number;
99
97
  }>;
100
98
 
101
99
  type RGBA = {
package/dist/entry.web.js CHANGED
@@ -138,9 +138,7 @@ var RichTextAssetSchema = Joi.object({
138
138
  padding: paddingSchema.optional(),
139
139
  align: alignmentSchema.optional(),
140
140
  animation: animationSchema.optional(),
141
- customFonts: Joi.array().items(customFontSchema).optional(),
142
- cacheEnabled: Joi.boolean().default(true),
143
- pixelRatio: Joi.number().min(1).max(3).default(CANVAS_CONFIG.DEFAULTS.pixelRatio)
141
+ customFonts: Joi.array().items(customFontSchema).optional()
144
142
  }).unknown(false);
145
143
 
146
144
  // src/wasm/hb-loader.ts
@@ -2119,7 +2117,7 @@ async function createTextEngine(opts = {}) {
2119
2117
  };
2120
2118
  const canvasW = (asset.width ?? width) + padding.left + padding.right;
2121
2119
  const canvasH = (asset.height ?? height) + padding.top + padding.bottom;
2122
- const canvasPR = asset.pixelRatio ?? pixelRatio;
2120
+ const canvasPR = pixelRatio;
2123
2121
  let ops0;
2124
2122
  try {
2125
2123
  ops0 = await buildDrawOps({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/shotstack-canvas",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
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",