ugcinc-render 1.8.180 → 1.8.181
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 +20 -8
- package/dist/index.d.ts +20 -8
- package/dist/index.js +114 -78
- package/dist/index.mjs +114 -78
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1136,14 +1136,26 @@ interface IMessageDmCompositionProps {
|
|
|
1136
1136
|
messageHeaderLeft?: number;
|
|
1137
1137
|
messageHeaderRight?: number;
|
|
1138
1138
|
showMessageTails?: boolean;
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1139
|
+
recipientTailTipX?: number;
|
|
1140
|
+
recipientTailTipY?: number;
|
|
1141
|
+
recipientTailSideX?: number;
|
|
1142
|
+
recipientTailSideY?: number;
|
|
1143
|
+
recipientTailBottomX?: number;
|
|
1144
|
+
recipientTailBottomY?: number;
|
|
1145
|
+
recipientTailTopCurveX?: number;
|
|
1146
|
+
recipientTailTopCurveY?: number;
|
|
1147
|
+
recipientTailBottomCurveX?: number;
|
|
1148
|
+
recipientTailBottomCurveY?: number;
|
|
1149
|
+
senderTailTipX?: number;
|
|
1150
|
+
senderTailTipY?: number;
|
|
1151
|
+
senderTailSideX?: number;
|
|
1152
|
+
senderTailSideY?: number;
|
|
1153
|
+
senderTailBottomX?: number;
|
|
1154
|
+
senderTailBottomY?: number;
|
|
1155
|
+
senderTailTopCurveX?: number;
|
|
1156
|
+
senderTailTopCurveY?: number;
|
|
1157
|
+
senderTailBottomCurveX?: number;
|
|
1158
|
+
senderTailBottomCurveY?: number;
|
|
1147
1159
|
showReadReceipt?: boolean;
|
|
1148
1160
|
readReceiptText?: string;
|
|
1149
1161
|
readReceiptGap?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1136,14 +1136,26 @@ interface IMessageDmCompositionProps {
|
|
|
1136
1136
|
messageHeaderLeft?: number;
|
|
1137
1137
|
messageHeaderRight?: number;
|
|
1138
1138
|
showMessageTails?: boolean;
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1139
|
+
recipientTailTipX?: number;
|
|
1140
|
+
recipientTailTipY?: number;
|
|
1141
|
+
recipientTailSideX?: number;
|
|
1142
|
+
recipientTailSideY?: number;
|
|
1143
|
+
recipientTailBottomX?: number;
|
|
1144
|
+
recipientTailBottomY?: number;
|
|
1145
|
+
recipientTailTopCurveX?: number;
|
|
1146
|
+
recipientTailTopCurveY?: number;
|
|
1147
|
+
recipientTailBottomCurveX?: number;
|
|
1148
|
+
recipientTailBottomCurveY?: number;
|
|
1149
|
+
senderTailTipX?: number;
|
|
1150
|
+
senderTailTipY?: number;
|
|
1151
|
+
senderTailSideX?: number;
|
|
1152
|
+
senderTailSideY?: number;
|
|
1153
|
+
senderTailBottomX?: number;
|
|
1154
|
+
senderTailBottomY?: number;
|
|
1155
|
+
senderTailTopCurveX?: number;
|
|
1156
|
+
senderTailTopCurveY?: number;
|
|
1157
|
+
senderTailBottomCurveX?: number;
|
|
1158
|
+
senderTailBottomCurveY?: number;
|
|
1147
1159
|
showReadReceipt?: boolean;
|
|
1148
1160
|
readReceiptText?: string;
|
|
1149
1161
|
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
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
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,32 @@ 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
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5940
|
+
// Recipient tail anchor points (offsets from message left & bottom)
|
|
5941
|
+
recipientTailTipX: -16,
|
|
5942
|
+
recipientTailTipY: 0,
|
|
5943
|
+
recipientTailSideX: 0,
|
|
5944
|
+
recipientTailSideY: -47,
|
|
5945
|
+
recipientTailBottomX: 18,
|
|
5946
|
+
recipientTailBottomY: -11,
|
|
5947
|
+
// Recipient tail curve control points (offsets from message left & bottom)
|
|
5948
|
+
recipientTailTopCurveX: -16,
|
|
5949
|
+
recipientTailTopCurveY: -25,
|
|
5950
|
+
recipientTailBottomCurveX: 0,
|
|
5951
|
+
recipientTailBottomCurveY: 0,
|
|
5952
|
+
// Sender tail anchor points (offsets from message right & bottom)
|
|
5953
|
+
senderTailTipX: 16,
|
|
5954
|
+
senderTailTipY: 1,
|
|
5955
|
+
senderTailSideX: 0,
|
|
5956
|
+
senderTailSideY: -47,
|
|
5957
|
+
senderTailBottomX: -18,
|
|
5958
|
+
senderTailBottomY: -11,
|
|
5959
|
+
// Sender tail curve control points (offsets from message right & bottom)
|
|
5960
|
+
senderTailTopCurveX: 16,
|
|
5961
|
+
senderTailTopCurveY: -25,
|
|
5962
|
+
senderTailBottomCurveX: 0,
|
|
5963
|
+
senderTailBottomCurveY: 1,
|
|
5984
5964
|
// Read receipt (under last sender message)
|
|
5985
5965
|
showReadReceipt: true,
|
|
5986
5966
|
readReceiptText: "Read 12:16 PM",
|
|
@@ -6151,8 +6131,31 @@ var IMessageDmComposition = (props) => {
|
|
|
6151
6131
|
messageTextFontSize = 48,
|
|
6152
6132
|
messageTextColor = "#8e8e93",
|
|
6153
6133
|
messageText = "iMessage",
|
|
6154
|
-
//
|
|
6155
|
-
senderBubbleColor = "#1a42d5"
|
|
6134
|
+
// Bubble colors
|
|
6135
|
+
senderBubbleColor = "#1a42d5",
|
|
6136
|
+
recipientBubbleColor = "#303032",
|
|
6137
|
+
// Tail props - recipient (offsets from message left & bottom)
|
|
6138
|
+
recipientTailTipX = -16,
|
|
6139
|
+
recipientTailTipY = 0,
|
|
6140
|
+
recipientTailSideX = 0,
|
|
6141
|
+
recipientTailSideY = -47,
|
|
6142
|
+
recipientTailBottomX = 18,
|
|
6143
|
+
recipientTailBottomY = -11,
|
|
6144
|
+
recipientTailTopCurveX = -16,
|
|
6145
|
+
recipientTailTopCurveY = -25,
|
|
6146
|
+
recipientTailBottomCurveX = 0,
|
|
6147
|
+
recipientTailBottomCurveY = 0,
|
|
6148
|
+
// Tail props - sender (offsets from message right & bottom)
|
|
6149
|
+
senderTailTipX = 16,
|
|
6150
|
+
senderTailTipY = 1,
|
|
6151
|
+
senderTailSideX = 0,
|
|
6152
|
+
senderTailSideY = -47,
|
|
6153
|
+
senderTailBottomX = -18,
|
|
6154
|
+
senderTailBottomY = -11,
|
|
6155
|
+
senderTailTopCurveX = 16,
|
|
6156
|
+
senderTailTopCurveY = -25,
|
|
6157
|
+
senderTailBottomCurveX = 0,
|
|
6158
|
+
senderTailBottomCurveY = 1
|
|
6156
6159
|
} = mergedProps;
|
|
6157
6160
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
6158
6161
|
BaseDmComposition,
|
|
@@ -6403,21 +6406,38 @@ var IMessageDmComposition = (props) => {
|
|
|
6403
6406
|
children: messageText
|
|
6404
6407
|
}
|
|
6405
6408
|
),
|
|
6406
|
-
conversionResult.tails.map((tail) =>
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
tail.
|
|
6420
|
-
|
|
6409
|
+
conversionResult.tails.map((tail) => {
|
|
6410
|
+
const refX = tail.isUser ? tail.messageRight : tail.messageLeft;
|
|
6411
|
+
const refY = tail.messageBottom;
|
|
6412
|
+
const tipX = refX + (tail.isUser ? senderTailTipX : recipientTailTipX);
|
|
6413
|
+
const tipY = refY + (tail.isUser ? senderTailTipY : recipientTailTipY);
|
|
6414
|
+
const sideX = refX + (tail.isUser ? senderTailSideX : recipientTailSideX);
|
|
6415
|
+
const sideY = refY + (tail.isUser ? senderTailSideY : recipientTailSideY);
|
|
6416
|
+
const bottomX = refX + (tail.isUser ? senderTailBottomX : recipientTailBottomX);
|
|
6417
|
+
const bottomY = refY + (tail.isUser ? senderTailBottomY : recipientTailBottomY);
|
|
6418
|
+
const topCurveX = refX + (tail.isUser ? senderTailTopCurveX : recipientTailTopCurveX);
|
|
6419
|
+
const topCurveY = refY + (tail.isUser ? senderTailTopCurveY : recipientTailTopCurveY);
|
|
6420
|
+
const bottomCurveX = refX + (tail.isUser ? senderTailBottomCurveX : recipientTailBottomCurveX);
|
|
6421
|
+
const bottomCurveY = refY + (tail.isUser ? senderTailBottomCurveY : recipientTailBottomCurveY);
|
|
6422
|
+
const fillColor = tail.isUser ? senderBubbleColor : recipientBubbleColor;
|
|
6423
|
+
const pathD = `M ${sideX} ${sideY} Q ${topCurveX} ${topCurveY} ${tipX} ${tipY} Q ${bottomCurveX} ${bottomCurveY} ${bottomX} ${bottomY} Z`;
|
|
6424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
6425
|
+
"svg",
|
|
6426
|
+
{
|
|
6427
|
+
style: {
|
|
6428
|
+
position: "absolute",
|
|
6429
|
+
top: 0,
|
|
6430
|
+
left: 0,
|
|
6431
|
+
width,
|
|
6432
|
+
height,
|
|
6433
|
+
zIndex: 4,
|
|
6434
|
+
pointerEvents: "none"
|
|
6435
|
+
},
|
|
6436
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: pathD, fill: fillColor })
|
|
6437
|
+
},
|
|
6438
|
+
tail.id
|
|
6439
|
+
);
|
|
6440
|
+
}),
|
|
6421
6441
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
6422
6442
|
ImageEditorComposition,
|
|
6423
6443
|
{
|
|
@@ -7351,16 +7371,32 @@ var iMessageDmPropsSchema = import_zod.z.object({
|
|
|
7351
7371
|
messageHeaderLetterSpacing: import_zod.z.number().optional(),
|
|
7352
7372
|
messageHeaderLeft: import_zod.z.number().optional(),
|
|
7353
7373
|
messageHeaderRight: import_zod.z.number().optional(),
|
|
7354
|
-
// Message tails
|
|
7374
|
+
// Message tails (SVG-based)
|
|
7355
7375
|
showMessageTails: import_zod.z.boolean().optional(),
|
|
7356
|
-
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7376
|
+
// Recipient tail anchor points
|
|
7377
|
+
recipientTailTipX: import_zod.z.number().optional(),
|
|
7378
|
+
recipientTailTipY: import_zod.z.number().optional(),
|
|
7379
|
+
recipientTailSideX: import_zod.z.number().optional(),
|
|
7380
|
+
recipientTailSideY: import_zod.z.number().optional(),
|
|
7381
|
+
recipientTailBottomX: import_zod.z.number().optional(),
|
|
7382
|
+
recipientTailBottomY: import_zod.z.number().optional(),
|
|
7383
|
+
// Recipient tail curve control points
|
|
7384
|
+
recipientTailTopCurveX: import_zod.z.number().optional(),
|
|
7385
|
+
recipientTailTopCurveY: import_zod.z.number().optional(),
|
|
7386
|
+
recipientTailBottomCurveX: import_zod.z.number().optional(),
|
|
7387
|
+
recipientTailBottomCurveY: import_zod.z.number().optional(),
|
|
7388
|
+
// Sender tail anchor points
|
|
7389
|
+
senderTailTipX: import_zod.z.number().optional(),
|
|
7390
|
+
senderTailTipY: import_zod.z.number().optional(),
|
|
7391
|
+
senderTailSideX: import_zod.z.number().optional(),
|
|
7392
|
+
senderTailSideY: import_zod.z.number().optional(),
|
|
7393
|
+
senderTailBottomX: import_zod.z.number().optional(),
|
|
7394
|
+
senderTailBottomY: import_zod.z.number().optional(),
|
|
7395
|
+
// Sender tail curve control points
|
|
7396
|
+
senderTailTopCurveX: import_zod.z.number().optional(),
|
|
7397
|
+
senderTailTopCurveY: import_zod.z.number().optional(),
|
|
7398
|
+
senderTailBottomCurveX: import_zod.z.number().optional(),
|
|
7399
|
+
senderTailBottomCurveY: import_zod.z.number().optional(),
|
|
7364
7400
|
// Read receipt
|
|
7365
7401
|
showReadReceipt: import_zod.z.boolean().optional(),
|
|
7366
7402
|
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
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
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,32 @@ 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
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
4986
|
+
// Recipient tail anchor points (offsets from message left & bottom)
|
|
4987
|
+
recipientTailTipX: -16,
|
|
4988
|
+
recipientTailTipY: 0,
|
|
4989
|
+
recipientTailSideX: 0,
|
|
4990
|
+
recipientTailSideY: -47,
|
|
4991
|
+
recipientTailBottomX: 18,
|
|
4992
|
+
recipientTailBottomY: -11,
|
|
4993
|
+
// Recipient tail curve control points (offsets from message left & bottom)
|
|
4994
|
+
recipientTailTopCurveX: -16,
|
|
4995
|
+
recipientTailTopCurveY: -25,
|
|
4996
|
+
recipientTailBottomCurveX: 0,
|
|
4997
|
+
recipientTailBottomCurveY: 0,
|
|
4998
|
+
// Sender tail anchor points (offsets from message right & bottom)
|
|
4999
|
+
senderTailTipX: 16,
|
|
5000
|
+
senderTailTipY: 1,
|
|
5001
|
+
senderTailSideX: 0,
|
|
5002
|
+
senderTailSideY: -47,
|
|
5003
|
+
senderTailBottomX: -18,
|
|
5004
|
+
senderTailBottomY: -11,
|
|
5005
|
+
// Sender tail curve control points (offsets from message right & bottom)
|
|
5006
|
+
senderTailTopCurveX: 16,
|
|
5007
|
+
senderTailTopCurveY: -25,
|
|
5008
|
+
senderTailBottomCurveX: 0,
|
|
5009
|
+
senderTailBottomCurveY: 1,
|
|
5030
5010
|
// Read receipt (under last sender message)
|
|
5031
5011
|
showReadReceipt: true,
|
|
5032
5012
|
readReceiptText: "Read 12:16 PM",
|
|
@@ -5197,8 +5177,31 @@ var IMessageDmComposition = (props) => {
|
|
|
5197
5177
|
messageTextFontSize = 48,
|
|
5198
5178
|
messageTextColor = "#8e8e93",
|
|
5199
5179
|
messageText = "iMessage",
|
|
5200
|
-
//
|
|
5201
|
-
senderBubbleColor = "#1a42d5"
|
|
5180
|
+
// Bubble colors
|
|
5181
|
+
senderBubbleColor = "#1a42d5",
|
|
5182
|
+
recipientBubbleColor = "#303032",
|
|
5183
|
+
// Tail props - recipient (offsets from message left & bottom)
|
|
5184
|
+
recipientTailTipX = -16,
|
|
5185
|
+
recipientTailTipY = 0,
|
|
5186
|
+
recipientTailSideX = 0,
|
|
5187
|
+
recipientTailSideY = -47,
|
|
5188
|
+
recipientTailBottomX = 18,
|
|
5189
|
+
recipientTailBottomY = -11,
|
|
5190
|
+
recipientTailTopCurveX = -16,
|
|
5191
|
+
recipientTailTopCurveY = -25,
|
|
5192
|
+
recipientTailBottomCurveX = 0,
|
|
5193
|
+
recipientTailBottomCurveY = 0,
|
|
5194
|
+
// Tail props - sender (offsets from message right & bottom)
|
|
5195
|
+
senderTailTipX = 16,
|
|
5196
|
+
senderTailTipY = 1,
|
|
5197
|
+
senderTailSideX = 0,
|
|
5198
|
+
senderTailSideY = -47,
|
|
5199
|
+
senderTailBottomX = -18,
|
|
5200
|
+
senderTailBottomY = -11,
|
|
5201
|
+
senderTailTopCurveX = 16,
|
|
5202
|
+
senderTailTopCurveY = -25,
|
|
5203
|
+
senderTailBottomCurveX = 0,
|
|
5204
|
+
senderTailBottomCurveY = 1
|
|
5202
5205
|
} = mergedProps;
|
|
5203
5206
|
return /* @__PURE__ */ jsxs10(
|
|
5204
5207
|
BaseDmComposition,
|
|
@@ -5449,21 +5452,38 @@ var IMessageDmComposition = (props) => {
|
|
|
5449
5452
|
children: messageText
|
|
5450
5453
|
}
|
|
5451
5454
|
),
|
|
5452
|
-
conversionResult.tails.map((tail) =>
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
tail.
|
|
5466
|
-
|
|
5455
|
+
conversionResult.tails.map((tail) => {
|
|
5456
|
+
const refX = tail.isUser ? tail.messageRight : tail.messageLeft;
|
|
5457
|
+
const refY = tail.messageBottom;
|
|
5458
|
+
const tipX = refX + (tail.isUser ? senderTailTipX : recipientTailTipX);
|
|
5459
|
+
const tipY = refY + (tail.isUser ? senderTailTipY : recipientTailTipY);
|
|
5460
|
+
const sideX = refX + (tail.isUser ? senderTailSideX : recipientTailSideX);
|
|
5461
|
+
const sideY = refY + (tail.isUser ? senderTailSideY : recipientTailSideY);
|
|
5462
|
+
const bottomX = refX + (tail.isUser ? senderTailBottomX : recipientTailBottomX);
|
|
5463
|
+
const bottomY = refY + (tail.isUser ? senderTailBottomY : recipientTailBottomY);
|
|
5464
|
+
const topCurveX = refX + (tail.isUser ? senderTailTopCurveX : recipientTailTopCurveX);
|
|
5465
|
+
const topCurveY = refY + (tail.isUser ? senderTailTopCurveY : recipientTailTopCurveY);
|
|
5466
|
+
const bottomCurveX = refX + (tail.isUser ? senderTailBottomCurveX : recipientTailBottomCurveX);
|
|
5467
|
+
const bottomCurveY = refY + (tail.isUser ? senderTailBottomCurveY : recipientTailBottomCurveY);
|
|
5468
|
+
const fillColor = tail.isUser ? senderBubbleColor : recipientBubbleColor;
|
|
5469
|
+
const pathD = `M ${sideX} ${sideY} Q ${topCurveX} ${topCurveY} ${tipX} ${tipY} Q ${bottomCurveX} ${bottomCurveY} ${bottomX} ${bottomY} Z`;
|
|
5470
|
+
return /* @__PURE__ */ jsx12(
|
|
5471
|
+
"svg",
|
|
5472
|
+
{
|
|
5473
|
+
style: {
|
|
5474
|
+
position: "absolute",
|
|
5475
|
+
top: 0,
|
|
5476
|
+
left: 0,
|
|
5477
|
+
width,
|
|
5478
|
+
height,
|
|
5479
|
+
zIndex: 4,
|
|
5480
|
+
pointerEvents: "none"
|
|
5481
|
+
},
|
|
5482
|
+
children: /* @__PURE__ */ jsx12("path", { d: pathD, fill: fillColor })
|
|
5483
|
+
},
|
|
5484
|
+
tail.id
|
|
5485
|
+
);
|
|
5486
|
+
}),
|
|
5467
5487
|
/* @__PURE__ */ jsx12(
|
|
5468
5488
|
ImageEditorComposition,
|
|
5469
5489
|
{
|
|
@@ -6114,16 +6134,32 @@ var iMessageDmPropsSchema = z.object({
|
|
|
6114
6134
|
messageHeaderLetterSpacing: z.number().optional(),
|
|
6115
6135
|
messageHeaderLeft: z.number().optional(),
|
|
6116
6136
|
messageHeaderRight: z.number().optional(),
|
|
6117
|
-
// Message tails
|
|
6137
|
+
// Message tails (SVG-based)
|
|
6118
6138
|
showMessageTails: z.boolean().optional(),
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6139
|
+
// Recipient tail anchor points
|
|
6140
|
+
recipientTailTipX: z.number().optional(),
|
|
6141
|
+
recipientTailTipY: z.number().optional(),
|
|
6142
|
+
recipientTailSideX: z.number().optional(),
|
|
6143
|
+
recipientTailSideY: z.number().optional(),
|
|
6144
|
+
recipientTailBottomX: z.number().optional(),
|
|
6145
|
+
recipientTailBottomY: z.number().optional(),
|
|
6146
|
+
// Recipient tail curve control points
|
|
6147
|
+
recipientTailTopCurveX: z.number().optional(),
|
|
6148
|
+
recipientTailTopCurveY: z.number().optional(),
|
|
6149
|
+
recipientTailBottomCurveX: z.number().optional(),
|
|
6150
|
+
recipientTailBottomCurveY: z.number().optional(),
|
|
6151
|
+
// Sender tail anchor points
|
|
6152
|
+
senderTailTipX: z.number().optional(),
|
|
6153
|
+
senderTailTipY: z.number().optional(),
|
|
6154
|
+
senderTailSideX: z.number().optional(),
|
|
6155
|
+
senderTailSideY: z.number().optional(),
|
|
6156
|
+
senderTailBottomX: z.number().optional(),
|
|
6157
|
+
senderTailBottomY: z.number().optional(),
|
|
6158
|
+
// Sender tail curve control points
|
|
6159
|
+
senderTailTopCurveX: z.number().optional(),
|
|
6160
|
+
senderTailTopCurveY: z.number().optional(),
|
|
6161
|
+
senderTailBottomCurveX: z.number().optional(),
|
|
6162
|
+
senderTailBottomCurveY: z.number().optional(),
|
|
6127
6163
|
// Read receipt
|
|
6128
6164
|
showReadReceipt: z.boolean().optional(),
|
|
6129
6165
|
readReceiptText: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.181",
|
|
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",
|