ugcinc-render 1.8.210 → 1.8.211

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.
@@ -621,8 +621,8 @@ function resolveElementPositions(elements, textValues) {
621
621
  const resolvedX = /* @__PURE__ */ new Map();
622
622
  const resolvedY = /* @__PURE__ */ new Map();
623
623
  let measureCtx = null;
624
- const hasAutoWidthElements = elements.some((e) => e.type === "text" && e.autoWidth);
625
- if (hasAutoWidthElements && typeof document !== "undefined") {
624
+ const hasTextElements = elements.some((e) => e.type === "text");
625
+ if (hasTextElements && typeof document !== "undefined") {
626
626
  const canvas = document.createElement("canvas");
627
627
  measureCtx = canvas.getContext("2d");
628
628
  }
package/dist/index.js CHANGED
@@ -1280,8 +1280,8 @@ function resolveElementPositions(elements, textValues) {
1280
1280
  const resolvedX = /* @__PURE__ */ new Map();
1281
1281
  const resolvedY = /* @__PURE__ */ new Map();
1282
1282
  let measureCtx = null;
1283
- const hasAutoWidthElements = elements.some((e) => e.type === "text" && e.autoWidth);
1284
- if (hasAutoWidthElements && typeof document !== "undefined") {
1283
+ const hasTextElements = elements.some((e) => e.type === "text");
1284
+ if (hasTextElements && typeof document !== "undefined") {
1285
1285
  const canvas = document.createElement("canvas");
1286
1286
  measureCtx = canvas.getContext("2d");
1287
1287
  }
package/dist/index.mjs CHANGED
@@ -47,7 +47,7 @@ import {
47
47
  resolveCaptionStyle,
48
48
  resolveElementPositions,
49
49
  wrapText
50
- } from "./chunk-4EZKUSAN.mjs";
50
+ } from "./chunk-QLJ7MHUG.mjs";
51
51
 
52
52
  // src/types/element.ts
53
53
  var DIMENSION_PRESETS = {
@@ -694,8 +694,8 @@ function resolveElementPositions(elements, textValues) {
694
694
  const resolvedX = /* @__PURE__ */ new Map();
695
695
  const resolvedY = /* @__PURE__ */ new Map();
696
696
  let measureCtx = null;
697
- const hasAutoWidthElements = elements.some((e) => e.type === "text" && e.autoWidth);
698
- if (hasAutoWidthElements && typeof document !== "undefined") {
697
+ const hasTextElements = elements.some((e) => e.type === "text");
698
+ if (hasTextElements && typeof document !== "undefined") {
699
699
  const canvas = document.createElement("canvas");
700
700
  measureCtx = canvas.getContext("2d");
701
701
  }
@@ -47,7 +47,7 @@ import {
47
47
  resolveCaptionStyle,
48
48
  resolveElementPositions,
49
49
  wrapText
50
- } from "../chunk-4EZKUSAN.mjs";
50
+ } from "../chunk-QLJ7MHUG.mjs";
51
51
  export {
52
52
  APPLE_EMOJI_FONT,
53
53
  CAPTION_PRESETS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.8.210",
3
+ "version": "1.8.211",
4
4
  "description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",