ugcinc-render 1.8.209 → 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
  }
@@ -4605,7 +4605,7 @@ function generateStoryReplyElements(props, calculatedMessages) {
4605
4605
  height: imageHeight,
4606
4606
  zIndex: 3,
4607
4607
  inputId: `${STORY_REPLY_INPUT_ID_PREFIX}${cm.message.id}`,
4608
- fit: "cover",
4608
+ fit: "contain",
4609
4609
  borderRadius: storyReplyImageBorderRadius
4610
4610
  });
4611
4611
  const barWidth = storyReplyBarRight - storyReplyBarLeft;
@@ -5795,7 +5795,7 @@ function generateMessageElements2(props, calculatedMessages) {
5795
5795
  zIndex: 5 + i,
5796
5796
  inputId: `${SENDER_IMAGE_INPUT_ID_PREFIX}${cm.message.id}`,
5797
5797
  borderRadius: senderImageBorderRadius,
5798
- fit: "cover"
5798
+ fit: "contain"
5799
5799
  });
5800
5800
  }
5801
5801
  const radii = getCornerRadii2(cm, bubbleRadiusNormal, bubbleRadiusGrouped);
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 = {
@@ -3651,7 +3651,7 @@ function generateStoryReplyElements(props, calculatedMessages) {
3651
3651
  height: imageHeight,
3652
3652
  zIndex: 3,
3653
3653
  inputId: `${STORY_REPLY_INPUT_ID_PREFIX}${cm.message.id}`,
3654
- fit: "cover",
3654
+ fit: "contain",
3655
3655
  borderRadius: storyReplyImageBorderRadius
3656
3656
  });
3657
3657
  const barWidth = storyReplyBarRight - storyReplyBarLeft;
@@ -4841,7 +4841,7 @@ function generateMessageElements2(props, calculatedMessages) {
4841
4841
  zIndex: 5 + i,
4842
4842
  inputId: `${SENDER_IMAGE_INPUT_ID_PREFIX}${cm.message.id}`,
4843
4843
  borderRadius: senderImageBorderRadius,
4844
- fit: "cover"
4844
+ fit: "contain"
4845
4845
  });
4846
4846
  }
4847
4847
  const radii = getCornerRadii2(cm, bubbleRadiusNormal, bubbleRadiusGrouped);
@@ -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.209",
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",