ugcinc-render 1.8.180 → 1.8.182

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.
package/dist/index.d.mts CHANGED
@@ -1136,14 +1136,22 @@ interface IMessageDmCompositionProps {
1136
1136
  messageHeaderLeft?: number;
1137
1137
  messageHeaderRight?: number;
1138
1138
  showMessageTails?: boolean;
1139
- recipientTailOffsetLeft?: number;
1140
- recipientTailOffsetRight?: number;
1141
- recipientTailOffsetTop?: number;
1142
- recipientTailOffsetBottom?: number;
1143
- senderTailOffsetLeft?: number;
1144
- senderTailOffsetRight?: number;
1145
- senderTailOffsetTop?: number;
1146
- senderTailOffsetBottom?: number;
1139
+ recipientTailSideY?: number;
1140
+ recipientTailCurveStartY?: number;
1141
+ recipientTailTipX?: number;
1142
+ recipientTailTipY?: number;
1143
+ recipientTailBottomX?: number;
1144
+ recipientTailBottomY?: number;
1145
+ recipientTailTopBend?: number;
1146
+ recipientTailBottomBend?: number;
1147
+ senderTailSideY?: number;
1148
+ senderTailCurveStartY?: number;
1149
+ senderTailTipX?: number;
1150
+ senderTailTipY?: number;
1151
+ senderTailBottomX?: number;
1152
+ senderTailBottomY?: number;
1153
+ senderTailTopBend?: number;
1154
+ senderTailBottomBend?: number;
1147
1155
  showReadReceipt?: boolean;
1148
1156
  readReceiptText?: string;
1149
1157
  readReceiptGap?: number;
package/dist/index.d.ts CHANGED
@@ -1136,14 +1136,22 @@ interface IMessageDmCompositionProps {
1136
1136
  messageHeaderLeft?: number;
1137
1137
  messageHeaderRight?: number;
1138
1138
  showMessageTails?: boolean;
1139
- recipientTailOffsetLeft?: number;
1140
- recipientTailOffsetRight?: number;
1141
- recipientTailOffsetTop?: number;
1142
- recipientTailOffsetBottom?: number;
1143
- senderTailOffsetLeft?: number;
1144
- senderTailOffsetRight?: number;
1145
- senderTailOffsetTop?: number;
1146
- senderTailOffsetBottom?: number;
1139
+ recipientTailSideY?: number;
1140
+ recipientTailCurveStartY?: number;
1141
+ recipientTailTipX?: number;
1142
+ recipientTailTipY?: number;
1143
+ recipientTailBottomX?: number;
1144
+ recipientTailBottomY?: number;
1145
+ recipientTailTopBend?: number;
1146
+ recipientTailBottomBend?: number;
1147
+ senderTailSideY?: number;
1148
+ senderTailCurveStartY?: number;
1149
+ senderTailTipX?: number;
1150
+ senderTailTipY?: number;
1151
+ senderTailBottomX?: number;
1152
+ senderTailBottomY?: number;
1153
+ senderTailTopBend?: number;
1154
+ senderTailBottomBend?: number;
1147
1155
  showReadReceipt?: boolean;
1148
1156
  readReceiptText?: string;
1149
1157
  readReceiptGap?: number;
package/dist/index.js CHANGED
@@ -5306,16 +5306,6 @@ var MESSAGE_DEFAULTS2 = {
5306
5306
  messageHeaderRight: 1206,
5307
5307
  // Message tails (on last message in group)
5308
5308
  showMessageTails: true,
5309
- // Recipient tail offsets (from message left & bottom)
5310
- recipientTailOffsetLeft: -16,
5311
- recipientTailOffsetRight: 18,
5312
- recipientTailOffsetTop: -47,
5313
- recipientTailOffsetBottom: 0,
5314
- // Sender tail offsets (from message right & bottom)
5315
- senderTailOffsetLeft: -18,
5316
- senderTailOffsetRight: 16,
5317
- senderTailOffsetTop: -47,
5318
- senderTailOffsetBottom: 1,
5319
5309
  // Read receipt (under last sender message)
5320
5310
  showReadReceipt: true,
5321
5311
  readReceiptText: "Read 12:16 PM",
@@ -5629,42 +5619,18 @@ function generateTailData(props, calculatedMessages) {
5629
5619
  return [];
5630
5620
  }
5631
5621
  const tails = [];
5632
- const recipientTailOffsetLeft = props.recipientTailOffsetLeft ?? MESSAGE_DEFAULTS2.recipientTailOffsetLeft;
5633
- const recipientTailOffsetRight = props.recipientTailOffsetRight ?? MESSAGE_DEFAULTS2.recipientTailOffsetRight;
5634
- const recipientTailOffsetTop = props.recipientTailOffsetTop ?? MESSAGE_DEFAULTS2.recipientTailOffsetTop;
5635
- const recipientTailOffsetBottom = props.recipientTailOffsetBottom ?? MESSAGE_DEFAULTS2.recipientTailOffsetBottom;
5636
- const senderTailOffsetLeft = props.senderTailOffsetLeft ?? MESSAGE_DEFAULTS2.senderTailOffsetLeft;
5637
- const senderTailOffsetRight = props.senderTailOffsetRight ?? MESSAGE_DEFAULTS2.senderTailOffsetRight;
5638
- const senderTailOffsetTop = props.senderTailOffsetTop ?? MESSAGE_DEFAULTS2.senderTailOffsetTop;
5639
- const senderTailOffsetBottom = props.senderTailOffsetBottom ?? MESSAGE_DEFAULTS2.senderTailOffsetBottom;
5640
5622
  for (let i = 0; i < calculatedMessages.length; i++) {
5641
5623
  const cm = calculatedMessages[i];
5642
5624
  if (!cm.isLastInGroup) {
5643
5625
  continue;
5644
5626
  }
5645
- const isUser = cm.message.sender === "user";
5646
- const messageLeft = cm.left;
5647
- const messageRight = cm.left + cm.width;
5648
- const messageBottom = cm.bottom;
5649
- if (isUser) {
5650
- tails.push({
5651
- id: `tail-${cm.message.id}`,
5652
- x: messageRight + senderTailOffsetLeft,
5653
- y: messageBottom + senderTailOffsetTop,
5654
- width: senderTailOffsetRight - senderTailOffsetLeft,
5655
- height: senderTailOffsetBottom - senderTailOffsetTop,
5656
- image: "imsg-sender-tail.png"
5657
- });
5658
- } else {
5659
- tails.push({
5660
- id: `tail-${cm.message.id}`,
5661
- x: messageLeft + recipientTailOffsetLeft,
5662
- y: messageBottom + recipientTailOffsetTop,
5663
- width: recipientTailOffsetRight - recipientTailOffsetLeft,
5664
- height: recipientTailOffsetBottom - recipientTailOffsetTop,
5665
- image: "imsg-recv-tail.png"
5666
- });
5667
- }
5627
+ tails.push({
5628
+ id: `tail-${cm.message.id}`,
5629
+ isUser: cm.message.sender === "user",
5630
+ messageLeft: cm.left,
5631
+ messageRight: cm.left + cm.width,
5632
+ messageBottom: cm.bottom
5633
+ });
5668
5634
  }
5669
5635
  return tails;
5670
5636
  }
@@ -5969,18 +5935,36 @@ var defaultIMessageDmProps = {
5969
5935
  messageHeaderLetterSpacing: 1.25,
5970
5936
  messageHeaderLeft: 0,
5971
5937
  messageHeaderRight: 1206,
5972
- // Message tails (on last message in group)
5938
+ // Message tails (SVG-based, on last message in group)
5973
5939
  showMessageTails: true,
5974
- // Recipient tail offsets (from message left & bottom)
5975
- recipientTailOffsetLeft: -16,
5976
- recipientTailOffsetRight: 18,
5977
- recipientTailOffsetTop: -47,
5978
- recipientTailOffsetBottom: 0,
5979
- // Sender tail offsets (from message right & bottom)
5980
- senderTailOffsetLeft: -18,
5981
- senderTailOffsetRight: 16,
5982
- senderTailOffsetTop: -47,
5983
- senderTailOffsetBottom: 1,
5940
+ // Recipient tail anchor points (offsets from message left & bottom)
5941
+ recipientTailSideY: -47,
5942
+ // Y where tail meets bubble (top of straight line)
5943
+ recipientTailCurveStartY: -20,
5944
+ // Y where straight line ends and curve begins
5945
+ recipientTailTipX: -16,
5946
+ recipientTailTipY: 0,
5947
+ recipientTailBottomX: 18,
5948
+ recipientTailBottomY: -11,
5949
+ // Recipient tail curve bend (-1 to 1, negative = inward, positive = outward)
5950
+ recipientTailTopBend: -0.5,
5951
+ // Top curve bends inward
5952
+ recipientTailBottomBend: 0.5,
5953
+ // Bottom curve bends outward
5954
+ // Sender tail anchor points (offsets from message right & bottom)
5955
+ senderTailSideY: -47,
5956
+ // Y where tail meets bubble (top of straight line)
5957
+ senderTailCurveStartY: -20,
5958
+ // Y where straight line ends and curve begins
5959
+ senderTailTipX: 16,
5960
+ senderTailTipY: 1,
5961
+ senderTailBottomX: -18,
5962
+ senderTailBottomY: -11,
5963
+ // Sender tail curve bend (-1 to 1, negative = inward, positive = outward)
5964
+ senderTailTopBend: -0.5,
5965
+ // Top curve bends inward
5966
+ senderTailBottomBend: 0.5,
5967
+ // Bottom curve bends outward
5984
5968
  // Read receipt (under last sender message)
5985
5969
  showReadReceipt: true,
5986
5970
  readReceiptText: "Read 12:16 PM",
@@ -6151,8 +6135,27 @@ var IMessageDmComposition = (props) => {
6151
6135
  messageTextFontSize = 48,
6152
6136
  messageTextColor = "#8e8e93",
6153
6137
  messageText = "iMessage",
6154
- // Sender bubble color (for unread badge background)
6155
- senderBubbleColor = "#1a42d5"
6138
+ // Bubble colors
6139
+ senderBubbleColor = "#1a42d5",
6140
+ recipientBubbleColor = "#303032",
6141
+ // Tail props - recipient (offsets from message left & bottom)
6142
+ recipientTailSideY = -47,
6143
+ recipientTailCurveStartY = -20,
6144
+ recipientTailTipX = -16,
6145
+ recipientTailTipY = 0,
6146
+ recipientTailBottomX = 18,
6147
+ recipientTailBottomY = -11,
6148
+ recipientTailTopBend = -0.5,
6149
+ recipientTailBottomBend = 0.5,
6150
+ // Tail props - sender (offsets from message right & bottom)
6151
+ senderTailSideY = -47,
6152
+ senderTailCurveStartY = -20,
6153
+ senderTailTipX = 16,
6154
+ senderTailTipY = 1,
6155
+ senderTailBottomX = -18,
6156
+ senderTailBottomY = -11,
6157
+ senderTailTopBend = -0.5,
6158
+ senderTailBottomBend = 0.5
6156
6159
  } = mergedProps;
6157
6160
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
6158
6161
  BaseDmComposition,
@@ -6403,21 +6406,56 @@ var IMessageDmComposition = (props) => {
6403
6406
  children: messageText
6404
6407
  }
6405
6408
  ),
6406
- conversionResult.tails.map((tail) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
6407
- import_remotion10.Img,
6408
- {
6409
- src: (0, import_remotion10.staticFile)(tail.image),
6410
- style: {
6411
- position: "absolute",
6412
- top: tail.y,
6413
- left: tail.x,
6414
- width: tail.width,
6415
- height: tail.height,
6416
- zIndex: 4
6417
- }
6418
- },
6419
- tail.id
6420
- )),
6409
+ conversionResult.tails.map((tail) => {
6410
+ const refX = tail.isUser ? tail.messageRight : tail.messageLeft;
6411
+ const refY = tail.messageBottom;
6412
+ const sideY = refY + (tail.isUser ? senderTailSideY : recipientTailSideY);
6413
+ const curveStartY = refY + (tail.isUser ? senderTailCurveStartY : recipientTailCurveStartY);
6414
+ const tipX = refX + (tail.isUser ? senderTailTipX : recipientTailTipX);
6415
+ const tipY = refY + (tail.isUser ? senderTailTipY : recipientTailTipY);
6416
+ const bottomX = refX + (tail.isUser ? senderTailBottomX : recipientTailBottomX);
6417
+ const bottomY = refY + (tail.isUser ? senderTailBottomY : recipientTailBottomY);
6418
+ const topBend = tail.isUser ? senderTailTopBend : recipientTailTopBend;
6419
+ const bottomBend = tail.isUser ? senderTailBottomBend : recipientTailBottomBend;
6420
+ const sideX = refX;
6421
+ const curveStartX = refX;
6422
+ const topMidX = (curveStartX + tipX) / 2;
6423
+ const topMidY = (curveStartY + tipY) / 2;
6424
+ const topDx = tipX - curveStartX;
6425
+ const topDy = tipY - curveStartY;
6426
+ const topLen = Math.sqrt(topDx * topDx + topDy * topDy);
6427
+ const topPerpX = tail.isUser ? topDy / topLen : -topDy / topLen;
6428
+ const topPerpY = tail.isUser ? -topDx / topLen : topDx / topLen;
6429
+ const topCurveX = topMidX + topPerpX * topBend * topLen;
6430
+ const topCurveY = topMidY + topPerpY * topBend * topLen;
6431
+ const bottomMidX = (tipX + bottomX) / 2;
6432
+ const bottomMidY = (tipY + bottomY) / 2;
6433
+ const bottomDx = bottomX - tipX;
6434
+ const bottomDy = bottomY - tipY;
6435
+ const bottomLen = Math.sqrt(bottomDx * bottomDx + bottomDy * bottomDy);
6436
+ const bottomPerpX = tail.isUser ? bottomDy / bottomLen : -bottomDy / bottomLen;
6437
+ const bottomPerpY = tail.isUser ? -bottomDx / bottomLen : bottomDx / bottomLen;
6438
+ const bottomCurveX = bottomMidX + bottomPerpX * bottomBend * bottomLen;
6439
+ const bottomCurveY = bottomMidY + bottomPerpY * bottomBend * bottomLen;
6440
+ const fillColor = tail.isUser ? senderBubbleColor : recipientBubbleColor;
6441
+ const pathD = `M ${sideX} ${sideY} L ${curveStartX} ${curveStartY} Q ${topCurveX} ${topCurveY} ${tipX} ${tipY} Q ${bottomCurveX} ${bottomCurveY} ${bottomX} ${bottomY} Z`;
6442
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
6443
+ "svg",
6444
+ {
6445
+ style: {
6446
+ position: "absolute",
6447
+ top: 0,
6448
+ left: 0,
6449
+ width,
6450
+ height,
6451
+ zIndex: 4,
6452
+ pointerEvents: "none"
6453
+ },
6454
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: pathD, fill: fillColor })
6455
+ },
6456
+ tail.id
6457
+ );
6458
+ }),
6421
6459
  /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
6422
6460
  ImageEditorComposition,
6423
6461
  {
@@ -7351,16 +7389,28 @@ var iMessageDmPropsSchema = import_zod.z.object({
7351
7389
  messageHeaderLetterSpacing: import_zod.z.number().optional(),
7352
7390
  messageHeaderLeft: import_zod.z.number().optional(),
7353
7391
  messageHeaderRight: import_zod.z.number().optional(),
7354
- // Message tails
7392
+ // Message tails (SVG-based)
7355
7393
  showMessageTails: import_zod.z.boolean().optional(),
7356
- recipientTailOffsetLeft: import_zod.z.number().optional(),
7357
- recipientTailOffsetRight: import_zod.z.number().optional(),
7358
- recipientTailOffsetTop: import_zod.z.number().optional(),
7359
- recipientTailOffsetBottom: import_zod.z.number().optional(),
7360
- senderTailOffsetLeft: import_zod.z.number().optional(),
7361
- senderTailOffsetRight: import_zod.z.number().optional(),
7362
- senderTailOffsetTop: import_zod.z.number().optional(),
7363
- senderTailOffsetBottom: import_zod.z.number().optional(),
7394
+ // Recipient tail anchor points
7395
+ recipientTailSideY: import_zod.z.number().optional(),
7396
+ recipientTailCurveStartY: import_zod.z.number().optional(),
7397
+ recipientTailTipX: import_zod.z.number().optional(),
7398
+ recipientTailTipY: import_zod.z.number().optional(),
7399
+ recipientTailBottomX: import_zod.z.number().optional(),
7400
+ recipientTailBottomY: import_zod.z.number().optional(),
7401
+ // Recipient tail curve bend
7402
+ recipientTailTopBend: import_zod.z.number().optional(),
7403
+ recipientTailBottomBend: import_zod.z.number().optional(),
7404
+ // Sender tail anchor points
7405
+ senderTailSideY: import_zod.z.number().optional(),
7406
+ senderTailCurveStartY: import_zod.z.number().optional(),
7407
+ senderTailTipX: import_zod.z.number().optional(),
7408
+ senderTailTipY: import_zod.z.number().optional(),
7409
+ senderTailBottomX: import_zod.z.number().optional(),
7410
+ senderTailBottomY: import_zod.z.number().optional(),
7411
+ // Sender tail curve bend
7412
+ senderTailTopBend: import_zod.z.number().optional(),
7413
+ senderTailBottomBend: import_zod.z.number().optional(),
7364
7414
  // Read receipt
7365
7415
  showReadReceipt: import_zod.z.boolean().optional(),
7366
7416
  readReceiptText: import_zod.z.string().optional(),
package/dist/index.mjs CHANGED
@@ -4352,16 +4352,6 @@ var MESSAGE_DEFAULTS2 = {
4352
4352
  messageHeaderRight: 1206,
4353
4353
  // Message tails (on last message in group)
4354
4354
  showMessageTails: true,
4355
- // Recipient tail offsets (from message left & bottom)
4356
- recipientTailOffsetLeft: -16,
4357
- recipientTailOffsetRight: 18,
4358
- recipientTailOffsetTop: -47,
4359
- recipientTailOffsetBottom: 0,
4360
- // Sender tail offsets (from message right & bottom)
4361
- senderTailOffsetLeft: -18,
4362
- senderTailOffsetRight: 16,
4363
- senderTailOffsetTop: -47,
4364
- senderTailOffsetBottom: 1,
4365
4355
  // Read receipt (under last sender message)
4366
4356
  showReadReceipt: true,
4367
4357
  readReceiptText: "Read 12:16 PM",
@@ -4675,42 +4665,18 @@ function generateTailData(props, calculatedMessages) {
4675
4665
  return [];
4676
4666
  }
4677
4667
  const tails = [];
4678
- const recipientTailOffsetLeft = props.recipientTailOffsetLeft ?? MESSAGE_DEFAULTS2.recipientTailOffsetLeft;
4679
- const recipientTailOffsetRight = props.recipientTailOffsetRight ?? MESSAGE_DEFAULTS2.recipientTailOffsetRight;
4680
- const recipientTailOffsetTop = props.recipientTailOffsetTop ?? MESSAGE_DEFAULTS2.recipientTailOffsetTop;
4681
- const recipientTailOffsetBottom = props.recipientTailOffsetBottom ?? MESSAGE_DEFAULTS2.recipientTailOffsetBottom;
4682
- const senderTailOffsetLeft = props.senderTailOffsetLeft ?? MESSAGE_DEFAULTS2.senderTailOffsetLeft;
4683
- const senderTailOffsetRight = props.senderTailOffsetRight ?? MESSAGE_DEFAULTS2.senderTailOffsetRight;
4684
- const senderTailOffsetTop = props.senderTailOffsetTop ?? MESSAGE_DEFAULTS2.senderTailOffsetTop;
4685
- const senderTailOffsetBottom = props.senderTailOffsetBottom ?? MESSAGE_DEFAULTS2.senderTailOffsetBottom;
4686
4668
  for (let i = 0; i < calculatedMessages.length; i++) {
4687
4669
  const cm = calculatedMessages[i];
4688
4670
  if (!cm.isLastInGroup) {
4689
4671
  continue;
4690
4672
  }
4691
- const isUser = cm.message.sender === "user";
4692
- const messageLeft = cm.left;
4693
- const messageRight = cm.left + cm.width;
4694
- const messageBottom = cm.bottom;
4695
- if (isUser) {
4696
- tails.push({
4697
- id: `tail-${cm.message.id}`,
4698
- x: messageRight + senderTailOffsetLeft,
4699
- y: messageBottom + senderTailOffsetTop,
4700
- width: senderTailOffsetRight - senderTailOffsetLeft,
4701
- height: senderTailOffsetBottom - senderTailOffsetTop,
4702
- image: "imsg-sender-tail.png"
4703
- });
4704
- } else {
4705
- tails.push({
4706
- id: `tail-${cm.message.id}`,
4707
- x: messageLeft + recipientTailOffsetLeft,
4708
- y: messageBottom + recipientTailOffsetTop,
4709
- width: recipientTailOffsetRight - recipientTailOffsetLeft,
4710
- height: recipientTailOffsetBottom - recipientTailOffsetTop,
4711
- image: "imsg-recv-tail.png"
4712
- });
4713
- }
4673
+ tails.push({
4674
+ id: `tail-${cm.message.id}`,
4675
+ isUser: cm.message.sender === "user",
4676
+ messageLeft: cm.left,
4677
+ messageRight: cm.left + cm.width,
4678
+ messageBottom: cm.bottom
4679
+ });
4714
4680
  }
4715
4681
  return tails;
4716
4682
  }
@@ -5015,18 +4981,36 @@ var defaultIMessageDmProps = {
5015
4981
  messageHeaderLetterSpacing: 1.25,
5016
4982
  messageHeaderLeft: 0,
5017
4983
  messageHeaderRight: 1206,
5018
- // Message tails (on last message in group)
4984
+ // Message tails (SVG-based, on last message in group)
5019
4985
  showMessageTails: true,
5020
- // Recipient tail offsets (from message left & bottom)
5021
- recipientTailOffsetLeft: -16,
5022
- recipientTailOffsetRight: 18,
5023
- recipientTailOffsetTop: -47,
5024
- recipientTailOffsetBottom: 0,
5025
- // Sender tail offsets (from message right & bottom)
5026
- senderTailOffsetLeft: -18,
5027
- senderTailOffsetRight: 16,
5028
- senderTailOffsetTop: -47,
5029
- senderTailOffsetBottom: 1,
4986
+ // Recipient tail anchor points (offsets from message left & bottom)
4987
+ recipientTailSideY: -47,
4988
+ // Y where tail meets bubble (top of straight line)
4989
+ recipientTailCurveStartY: -20,
4990
+ // Y where straight line ends and curve begins
4991
+ recipientTailTipX: -16,
4992
+ recipientTailTipY: 0,
4993
+ recipientTailBottomX: 18,
4994
+ recipientTailBottomY: -11,
4995
+ // Recipient tail curve bend (-1 to 1, negative = inward, positive = outward)
4996
+ recipientTailTopBend: -0.5,
4997
+ // Top curve bends inward
4998
+ recipientTailBottomBend: 0.5,
4999
+ // Bottom curve bends outward
5000
+ // Sender tail anchor points (offsets from message right & bottom)
5001
+ senderTailSideY: -47,
5002
+ // Y where tail meets bubble (top of straight line)
5003
+ senderTailCurveStartY: -20,
5004
+ // Y where straight line ends and curve begins
5005
+ senderTailTipX: 16,
5006
+ senderTailTipY: 1,
5007
+ senderTailBottomX: -18,
5008
+ senderTailBottomY: -11,
5009
+ // Sender tail curve bend (-1 to 1, negative = inward, positive = outward)
5010
+ senderTailTopBend: -0.5,
5011
+ // Top curve bends inward
5012
+ senderTailBottomBend: 0.5,
5013
+ // Bottom curve bends outward
5030
5014
  // Read receipt (under last sender message)
5031
5015
  showReadReceipt: true,
5032
5016
  readReceiptText: "Read 12:16 PM",
@@ -5197,8 +5181,27 @@ var IMessageDmComposition = (props) => {
5197
5181
  messageTextFontSize = 48,
5198
5182
  messageTextColor = "#8e8e93",
5199
5183
  messageText = "iMessage",
5200
- // Sender bubble color (for unread badge background)
5201
- senderBubbleColor = "#1a42d5"
5184
+ // Bubble colors
5185
+ senderBubbleColor = "#1a42d5",
5186
+ recipientBubbleColor = "#303032",
5187
+ // Tail props - recipient (offsets from message left & bottom)
5188
+ recipientTailSideY = -47,
5189
+ recipientTailCurveStartY = -20,
5190
+ recipientTailTipX = -16,
5191
+ recipientTailTipY = 0,
5192
+ recipientTailBottomX = 18,
5193
+ recipientTailBottomY = -11,
5194
+ recipientTailTopBend = -0.5,
5195
+ recipientTailBottomBend = 0.5,
5196
+ // Tail props - sender (offsets from message right & bottom)
5197
+ senderTailSideY = -47,
5198
+ senderTailCurveStartY = -20,
5199
+ senderTailTipX = 16,
5200
+ senderTailTipY = 1,
5201
+ senderTailBottomX = -18,
5202
+ senderTailBottomY = -11,
5203
+ senderTailTopBend = -0.5,
5204
+ senderTailBottomBend = 0.5
5202
5205
  } = mergedProps;
5203
5206
  return /* @__PURE__ */ jsxs10(
5204
5207
  BaseDmComposition,
@@ -5449,21 +5452,56 @@ var IMessageDmComposition = (props) => {
5449
5452
  children: messageText
5450
5453
  }
5451
5454
  ),
5452
- conversionResult.tails.map((tail) => /* @__PURE__ */ jsx12(
5453
- Img5,
5454
- {
5455
- src: staticFile3(tail.image),
5456
- style: {
5457
- position: "absolute",
5458
- top: tail.y,
5459
- left: tail.x,
5460
- width: tail.width,
5461
- height: tail.height,
5462
- zIndex: 4
5463
- }
5464
- },
5465
- tail.id
5466
- )),
5455
+ conversionResult.tails.map((tail) => {
5456
+ const refX = tail.isUser ? tail.messageRight : tail.messageLeft;
5457
+ const refY = tail.messageBottom;
5458
+ const sideY = refY + (tail.isUser ? senderTailSideY : recipientTailSideY);
5459
+ const curveStartY = refY + (tail.isUser ? senderTailCurveStartY : recipientTailCurveStartY);
5460
+ const tipX = refX + (tail.isUser ? senderTailTipX : recipientTailTipX);
5461
+ const tipY = refY + (tail.isUser ? senderTailTipY : recipientTailTipY);
5462
+ const bottomX = refX + (tail.isUser ? senderTailBottomX : recipientTailBottomX);
5463
+ const bottomY = refY + (tail.isUser ? senderTailBottomY : recipientTailBottomY);
5464
+ const topBend = tail.isUser ? senderTailTopBend : recipientTailTopBend;
5465
+ const bottomBend = tail.isUser ? senderTailBottomBend : recipientTailBottomBend;
5466
+ const sideX = refX;
5467
+ const curveStartX = refX;
5468
+ const topMidX = (curveStartX + tipX) / 2;
5469
+ const topMidY = (curveStartY + tipY) / 2;
5470
+ const topDx = tipX - curveStartX;
5471
+ const topDy = tipY - curveStartY;
5472
+ const topLen = Math.sqrt(topDx * topDx + topDy * topDy);
5473
+ const topPerpX = tail.isUser ? topDy / topLen : -topDy / topLen;
5474
+ const topPerpY = tail.isUser ? -topDx / topLen : topDx / topLen;
5475
+ const topCurveX = topMidX + topPerpX * topBend * topLen;
5476
+ const topCurveY = topMidY + topPerpY * topBend * topLen;
5477
+ const bottomMidX = (tipX + bottomX) / 2;
5478
+ const bottomMidY = (tipY + bottomY) / 2;
5479
+ const bottomDx = bottomX - tipX;
5480
+ const bottomDy = bottomY - tipY;
5481
+ const bottomLen = Math.sqrt(bottomDx * bottomDx + bottomDy * bottomDy);
5482
+ const bottomPerpX = tail.isUser ? bottomDy / bottomLen : -bottomDy / bottomLen;
5483
+ const bottomPerpY = tail.isUser ? -bottomDx / bottomLen : bottomDx / bottomLen;
5484
+ const bottomCurveX = bottomMidX + bottomPerpX * bottomBend * bottomLen;
5485
+ const bottomCurveY = bottomMidY + bottomPerpY * bottomBend * bottomLen;
5486
+ const fillColor = tail.isUser ? senderBubbleColor : recipientBubbleColor;
5487
+ const pathD = `M ${sideX} ${sideY} L ${curveStartX} ${curveStartY} Q ${topCurveX} ${topCurveY} ${tipX} ${tipY} Q ${bottomCurveX} ${bottomCurveY} ${bottomX} ${bottomY} Z`;
5488
+ return /* @__PURE__ */ jsx12(
5489
+ "svg",
5490
+ {
5491
+ style: {
5492
+ position: "absolute",
5493
+ top: 0,
5494
+ left: 0,
5495
+ width,
5496
+ height,
5497
+ zIndex: 4,
5498
+ pointerEvents: "none"
5499
+ },
5500
+ children: /* @__PURE__ */ jsx12("path", { d: pathD, fill: fillColor })
5501
+ },
5502
+ tail.id
5503
+ );
5504
+ }),
5467
5505
  /* @__PURE__ */ jsx12(
5468
5506
  ImageEditorComposition,
5469
5507
  {
@@ -6114,16 +6152,28 @@ var iMessageDmPropsSchema = z.object({
6114
6152
  messageHeaderLetterSpacing: z.number().optional(),
6115
6153
  messageHeaderLeft: z.number().optional(),
6116
6154
  messageHeaderRight: z.number().optional(),
6117
- // Message tails
6155
+ // Message tails (SVG-based)
6118
6156
  showMessageTails: z.boolean().optional(),
6119
- recipientTailOffsetLeft: z.number().optional(),
6120
- recipientTailOffsetRight: z.number().optional(),
6121
- recipientTailOffsetTop: z.number().optional(),
6122
- recipientTailOffsetBottom: z.number().optional(),
6123
- senderTailOffsetLeft: z.number().optional(),
6124
- senderTailOffsetRight: z.number().optional(),
6125
- senderTailOffsetTop: z.number().optional(),
6126
- senderTailOffsetBottom: z.number().optional(),
6157
+ // Recipient tail anchor points
6158
+ recipientTailSideY: z.number().optional(),
6159
+ recipientTailCurveStartY: z.number().optional(),
6160
+ recipientTailTipX: z.number().optional(),
6161
+ recipientTailTipY: z.number().optional(),
6162
+ recipientTailBottomX: z.number().optional(),
6163
+ recipientTailBottomY: z.number().optional(),
6164
+ // Recipient tail curve bend
6165
+ recipientTailTopBend: z.number().optional(),
6166
+ recipientTailBottomBend: z.number().optional(),
6167
+ // Sender tail anchor points
6168
+ senderTailSideY: z.number().optional(),
6169
+ senderTailCurveStartY: z.number().optional(),
6170
+ senderTailTipX: z.number().optional(),
6171
+ senderTailTipY: z.number().optional(),
6172
+ senderTailBottomX: z.number().optional(),
6173
+ senderTailBottomY: z.number().optional(),
6174
+ // Sender tail curve bend
6175
+ senderTailTopBend: z.number().optional(),
6176
+ senderTailBottomBend: z.number().optional(),
6127
6177
  // Read receipt
6128
6178
  showReadReceipt: z.boolean().optional(),
6129
6179
  readReceiptText: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.8.180",
3
+ "version": "1.8.182",
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",