ugcinc-render 1.8.138 → 1.8.140
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +56 -9
- package/dist/index.mjs +56 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3504,9 +3504,9 @@ var HEADER_DEFAULTS = {
|
|
|
3504
3504
|
var STORY_REPLY_DEFAULTS = {
|
|
3505
3505
|
storyReplyImageWidth: 263,
|
|
3506
3506
|
storyReplyImageHeight: 467,
|
|
3507
|
-
storyReplyImageRight:
|
|
3507
|
+
storyReplyImageRight: 1133,
|
|
3508
3508
|
storyReplyImageGap: 24,
|
|
3509
|
-
storyReplyImageBorderRadius:
|
|
3509
|
+
storyReplyImageBorderRadius: 44,
|
|
3510
3510
|
storyReplyBarLeft: 1170,
|
|
3511
3511
|
storyReplyBarRight: 1181,
|
|
3512
3512
|
storyReplyTextLeft: 728,
|
|
@@ -4370,21 +4370,62 @@ function buildImageUrls(props) {
|
|
|
4370
4370
|
}
|
|
4371
4371
|
return imageUrls;
|
|
4372
4372
|
}
|
|
4373
|
+
var DIVIDER_DEFAULTS = {
|
|
4374
|
+
dividerLineY: 353,
|
|
4375
|
+
dividerLineColor: "#25282d"
|
|
4376
|
+
};
|
|
4377
|
+
function generateDividerLineElements(props) {
|
|
4378
|
+
const width = props.width ?? 1206;
|
|
4379
|
+
const dividerLineY = props.dividerLineY ?? DIVIDER_DEFAULTS.dividerLineY;
|
|
4380
|
+
const dividerLineColor = props.dividerLineColor ?? DIVIDER_DEFAULTS.dividerLineColor;
|
|
4381
|
+
return [{
|
|
4382
|
+
id: "divider-line",
|
|
4383
|
+
type: "text",
|
|
4384
|
+
x: 0,
|
|
4385
|
+
y: dividerLineY,
|
|
4386
|
+
width,
|
|
4387
|
+
height: 1,
|
|
4388
|
+
zIndex: 25,
|
|
4389
|
+
text: "",
|
|
4390
|
+
backgroundColor: dividerLineColor,
|
|
4391
|
+
backgroundOpacity: 100
|
|
4392
|
+
}];
|
|
4393
|
+
}
|
|
4394
|
+
function generateHeaderBackgroundElements(props) {
|
|
4395
|
+
const width = props.width ?? 1206;
|
|
4396
|
+
const dividerLineY = props.dividerLineY ?? DIVIDER_DEFAULTS.dividerLineY;
|
|
4397
|
+
return [{
|
|
4398
|
+
id: "header-background",
|
|
4399
|
+
type: "text",
|
|
4400
|
+
x: 0,
|
|
4401
|
+
y: 0,
|
|
4402
|
+
width,
|
|
4403
|
+
height: dividerLineY,
|
|
4404
|
+
zIndex: 25,
|
|
4405
|
+
text: "",
|
|
4406
|
+
backgroundColor: "#000000",
|
|
4407
|
+
backgroundOpacity: 100
|
|
4408
|
+
}];
|
|
4409
|
+
}
|
|
4373
4410
|
function convertPropsToElements(props) {
|
|
4374
4411
|
const calculatedMessages = calculateMessagePositions(props);
|
|
4375
4412
|
const headerElements = generateHeaderElements(props);
|
|
4413
|
+
const headerBackgroundElements = generateHeaderBackgroundElements(props);
|
|
4376
4414
|
const footerElements = generateFooterElements(props);
|
|
4377
4415
|
const footerIconElements = generateFooterIconElements(props);
|
|
4378
4416
|
const messageElements = generateMessageElements(props, calculatedMessages);
|
|
4379
4417
|
const profilePicElements = generateProfilePicElements(props, calculatedMessages);
|
|
4380
4418
|
const storyReplyElements = generateStoryReplyElements(props, calculatedMessages);
|
|
4419
|
+
const dividerLineElements = generateDividerLineElements(props);
|
|
4381
4420
|
const elements = [
|
|
4382
4421
|
...headerElements,
|
|
4422
|
+
...headerBackgroundElements,
|
|
4383
4423
|
...footerElements,
|
|
4384
4424
|
...footerIconElements,
|
|
4385
4425
|
...messageElements,
|
|
4386
4426
|
...profilePicElements,
|
|
4387
|
-
...storyReplyElements
|
|
4427
|
+
...storyReplyElements,
|
|
4428
|
+
...dividerLineElements
|
|
4388
4429
|
].sort((a, b) => a.zIndex - b.zIndex);
|
|
4389
4430
|
const imageUrls = buildImageUrls(props);
|
|
4390
4431
|
return { elements, imageUrls };
|
|
@@ -4597,9 +4638,9 @@ var defaultInstagramDmProps = {
|
|
|
4597
4638
|
// Story reply (sender) - image
|
|
4598
4639
|
storyReplyImageWidth: 263,
|
|
4599
4640
|
storyReplyImageHeight: 467,
|
|
4600
|
-
storyReplyImageRight:
|
|
4641
|
+
storyReplyImageRight: 1133,
|
|
4601
4642
|
storyReplyImageGap: 24,
|
|
4602
|
-
storyReplyImageBorderRadius:
|
|
4643
|
+
storyReplyImageBorderRadius: 44,
|
|
4603
4644
|
// Story reply (sender) - side bar
|
|
4604
4645
|
storyReplyBarLeft: 1170,
|
|
4605
4646
|
storyReplyBarRight: 1181,
|
|
@@ -4607,7 +4648,10 @@ var defaultInstagramDmProps = {
|
|
|
4607
4648
|
storyReplyTextLeft: 728,
|
|
4608
4649
|
storyReplyTextGap: 22,
|
|
4609
4650
|
storyReplyTextFontSize: 36,
|
|
4610
|
-
storyReplyTextLetterSpacing: 2.25
|
|
4651
|
+
storyReplyTextLetterSpacing: 2.25,
|
|
4652
|
+
// Divider line
|
|
4653
|
+
dividerLineY: 353,
|
|
4654
|
+
dividerLineColor: "#25282d"
|
|
4611
4655
|
};
|
|
4612
4656
|
function InstagramDmComposition(props) {
|
|
4613
4657
|
const {
|
|
@@ -6001,9 +6045,9 @@ var instagramDmSchema = import_zod.z.object({
|
|
|
6001
6045
|
// Story reply (sender) - image
|
|
6002
6046
|
storyReplyImageWidth: import_zod.z.number().optional().default(263).describe("Story reply image width"),
|
|
6003
6047
|
storyReplyImageHeight: import_zod.z.number().optional().default(467).describe("Story reply image height"),
|
|
6004
|
-
storyReplyImageRight: import_zod.z.number().optional().default(
|
|
6048
|
+
storyReplyImageRight: import_zod.z.number().optional().default(1133).describe("Story reply image right X"),
|
|
6005
6049
|
storyReplyImageGap: import_zod.z.number().optional().default(24).describe("Gap between story image and message"),
|
|
6006
|
-
storyReplyImageBorderRadius: import_zod.z.number().optional().default(
|
|
6050
|
+
storyReplyImageBorderRadius: import_zod.z.number().optional().default(44).describe("Story reply image corner radius"),
|
|
6007
6051
|
// Story reply (sender) - side bar
|
|
6008
6052
|
storyReplyBarLeft: import_zod.z.number().optional().default(1170).describe("Story reply bar left X"),
|
|
6009
6053
|
storyReplyBarRight: import_zod.z.number().optional().default(1181).describe("Story reply bar right X"),
|
|
@@ -6011,7 +6055,10 @@ var instagramDmSchema = import_zod.z.object({
|
|
|
6011
6055
|
storyReplyTextLeft: import_zod.z.number().optional().default(728).describe("Story reply text left X"),
|
|
6012
6056
|
storyReplyTextGap: import_zod.z.number().optional().default(22).describe("Gap between text and story image"),
|
|
6013
6057
|
storyReplyTextFontSize: import_zod.z.number().optional().default(36).describe("Story reply text font size"),
|
|
6014
|
-
storyReplyTextLetterSpacing: import_zod.z.number().optional().default(2.25).describe("Story reply text letter spacing")
|
|
6058
|
+
storyReplyTextLetterSpacing: import_zod.z.number().optional().default(2.25).describe("Story reply text letter spacing"),
|
|
6059
|
+
// Divider line
|
|
6060
|
+
dividerLineY: import_zod.z.number().optional().default(353).describe("Divider line Y position"),
|
|
6061
|
+
dividerLineColor: import_zod.z.string().optional().default("#25282d").describe("Divider line color")
|
|
6015
6062
|
});
|
|
6016
6063
|
var ImageComp = ImageEditorComposition;
|
|
6017
6064
|
var VideoComp = VideoEditorComposition;
|
package/dist/index.mjs
CHANGED
|
@@ -2573,9 +2573,9 @@ var HEADER_DEFAULTS = {
|
|
|
2573
2573
|
var STORY_REPLY_DEFAULTS = {
|
|
2574
2574
|
storyReplyImageWidth: 263,
|
|
2575
2575
|
storyReplyImageHeight: 467,
|
|
2576
|
-
storyReplyImageRight:
|
|
2576
|
+
storyReplyImageRight: 1133,
|
|
2577
2577
|
storyReplyImageGap: 24,
|
|
2578
|
-
storyReplyImageBorderRadius:
|
|
2578
|
+
storyReplyImageBorderRadius: 44,
|
|
2579
2579
|
storyReplyBarLeft: 1170,
|
|
2580
2580
|
storyReplyBarRight: 1181,
|
|
2581
2581
|
storyReplyTextLeft: 728,
|
|
@@ -3439,21 +3439,62 @@ function buildImageUrls(props) {
|
|
|
3439
3439
|
}
|
|
3440
3440
|
return imageUrls;
|
|
3441
3441
|
}
|
|
3442
|
+
var DIVIDER_DEFAULTS = {
|
|
3443
|
+
dividerLineY: 353,
|
|
3444
|
+
dividerLineColor: "#25282d"
|
|
3445
|
+
};
|
|
3446
|
+
function generateDividerLineElements(props) {
|
|
3447
|
+
const width = props.width ?? 1206;
|
|
3448
|
+
const dividerLineY = props.dividerLineY ?? DIVIDER_DEFAULTS.dividerLineY;
|
|
3449
|
+
const dividerLineColor = props.dividerLineColor ?? DIVIDER_DEFAULTS.dividerLineColor;
|
|
3450
|
+
return [{
|
|
3451
|
+
id: "divider-line",
|
|
3452
|
+
type: "text",
|
|
3453
|
+
x: 0,
|
|
3454
|
+
y: dividerLineY,
|
|
3455
|
+
width,
|
|
3456
|
+
height: 1,
|
|
3457
|
+
zIndex: 25,
|
|
3458
|
+
text: "",
|
|
3459
|
+
backgroundColor: dividerLineColor,
|
|
3460
|
+
backgroundOpacity: 100
|
|
3461
|
+
}];
|
|
3462
|
+
}
|
|
3463
|
+
function generateHeaderBackgroundElements(props) {
|
|
3464
|
+
const width = props.width ?? 1206;
|
|
3465
|
+
const dividerLineY = props.dividerLineY ?? DIVIDER_DEFAULTS.dividerLineY;
|
|
3466
|
+
return [{
|
|
3467
|
+
id: "header-background",
|
|
3468
|
+
type: "text",
|
|
3469
|
+
x: 0,
|
|
3470
|
+
y: 0,
|
|
3471
|
+
width,
|
|
3472
|
+
height: dividerLineY,
|
|
3473
|
+
zIndex: 25,
|
|
3474
|
+
text: "",
|
|
3475
|
+
backgroundColor: "#000000",
|
|
3476
|
+
backgroundOpacity: 100
|
|
3477
|
+
}];
|
|
3478
|
+
}
|
|
3442
3479
|
function convertPropsToElements(props) {
|
|
3443
3480
|
const calculatedMessages = calculateMessagePositions(props);
|
|
3444
3481
|
const headerElements = generateHeaderElements(props);
|
|
3482
|
+
const headerBackgroundElements = generateHeaderBackgroundElements(props);
|
|
3445
3483
|
const footerElements = generateFooterElements(props);
|
|
3446
3484
|
const footerIconElements = generateFooterIconElements(props);
|
|
3447
3485
|
const messageElements = generateMessageElements(props, calculatedMessages);
|
|
3448
3486
|
const profilePicElements = generateProfilePicElements(props, calculatedMessages);
|
|
3449
3487
|
const storyReplyElements = generateStoryReplyElements(props, calculatedMessages);
|
|
3488
|
+
const dividerLineElements = generateDividerLineElements(props);
|
|
3450
3489
|
const elements = [
|
|
3451
3490
|
...headerElements,
|
|
3491
|
+
...headerBackgroundElements,
|
|
3452
3492
|
...footerElements,
|
|
3453
3493
|
...footerIconElements,
|
|
3454
3494
|
...messageElements,
|
|
3455
3495
|
...profilePicElements,
|
|
3456
|
-
...storyReplyElements
|
|
3496
|
+
...storyReplyElements,
|
|
3497
|
+
...dividerLineElements
|
|
3457
3498
|
].sort((a, b) => a.zIndex - b.zIndex);
|
|
3458
3499
|
const imageUrls = buildImageUrls(props);
|
|
3459
3500
|
return { elements, imageUrls };
|
|
@@ -3666,9 +3707,9 @@ var defaultInstagramDmProps = {
|
|
|
3666
3707
|
// Story reply (sender) - image
|
|
3667
3708
|
storyReplyImageWidth: 263,
|
|
3668
3709
|
storyReplyImageHeight: 467,
|
|
3669
|
-
storyReplyImageRight:
|
|
3710
|
+
storyReplyImageRight: 1133,
|
|
3670
3711
|
storyReplyImageGap: 24,
|
|
3671
|
-
storyReplyImageBorderRadius:
|
|
3712
|
+
storyReplyImageBorderRadius: 44,
|
|
3672
3713
|
// Story reply (sender) - side bar
|
|
3673
3714
|
storyReplyBarLeft: 1170,
|
|
3674
3715
|
storyReplyBarRight: 1181,
|
|
@@ -3676,7 +3717,10 @@ var defaultInstagramDmProps = {
|
|
|
3676
3717
|
storyReplyTextLeft: 728,
|
|
3677
3718
|
storyReplyTextGap: 22,
|
|
3678
3719
|
storyReplyTextFontSize: 36,
|
|
3679
|
-
storyReplyTextLetterSpacing: 2.25
|
|
3720
|
+
storyReplyTextLetterSpacing: 2.25,
|
|
3721
|
+
// Divider line
|
|
3722
|
+
dividerLineY: 353,
|
|
3723
|
+
dividerLineColor: "#25282d"
|
|
3680
3724
|
};
|
|
3681
3725
|
function InstagramDmComposition(props) {
|
|
3682
3726
|
const {
|
|
@@ -4787,9 +4831,9 @@ var instagramDmSchema = z.object({
|
|
|
4787
4831
|
// Story reply (sender) - image
|
|
4788
4832
|
storyReplyImageWidth: z.number().optional().default(263).describe("Story reply image width"),
|
|
4789
4833
|
storyReplyImageHeight: z.number().optional().default(467).describe("Story reply image height"),
|
|
4790
|
-
storyReplyImageRight: z.number().optional().default(
|
|
4834
|
+
storyReplyImageRight: z.number().optional().default(1133).describe("Story reply image right X"),
|
|
4791
4835
|
storyReplyImageGap: z.number().optional().default(24).describe("Gap between story image and message"),
|
|
4792
|
-
storyReplyImageBorderRadius: z.number().optional().default(
|
|
4836
|
+
storyReplyImageBorderRadius: z.number().optional().default(44).describe("Story reply image corner radius"),
|
|
4793
4837
|
// Story reply (sender) - side bar
|
|
4794
4838
|
storyReplyBarLeft: z.number().optional().default(1170).describe("Story reply bar left X"),
|
|
4795
4839
|
storyReplyBarRight: z.number().optional().default(1181).describe("Story reply bar right X"),
|
|
@@ -4797,7 +4841,10 @@ var instagramDmSchema = z.object({
|
|
|
4797
4841
|
storyReplyTextLeft: z.number().optional().default(728).describe("Story reply text left X"),
|
|
4798
4842
|
storyReplyTextGap: z.number().optional().default(22).describe("Gap between text and story image"),
|
|
4799
4843
|
storyReplyTextFontSize: z.number().optional().default(36).describe("Story reply text font size"),
|
|
4800
|
-
storyReplyTextLetterSpacing: z.number().optional().default(2.25).describe("Story reply text letter spacing")
|
|
4844
|
+
storyReplyTextLetterSpacing: z.number().optional().default(2.25).describe("Story reply text letter spacing"),
|
|
4845
|
+
// Divider line
|
|
4846
|
+
dividerLineY: z.number().optional().default(353).describe("Divider line Y position"),
|
|
4847
|
+
dividerLineColor: z.string().optional().default("#25282d").describe("Divider line color")
|
|
4801
4848
|
});
|
|
4802
4849
|
var ImageComp = ImageEditorComposition;
|
|
4803
4850
|
var VideoComp = VideoEditorComposition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.140",
|
|
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",
|