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
|
|
625
|
-
if (
|
|
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
|
|
1284
|
-
if (
|
|
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
package/dist/utils/index.js
CHANGED
|
@@ -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
|
|
698
|
-
if (
|
|
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
|
}
|
package/dist/utils/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
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",
|