ugcinc-render 1.8.119 → 1.8.121

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
@@ -768,6 +768,38 @@ interface InstagramDmCompositionProps {
768
768
  profilePicUrl?: string;
769
769
  profilePicSize?: number;
770
770
  profilePicGap?: number;
771
+ backArrowTop?: number;
772
+ backArrowBottom?: number;
773
+ backArrowLeft?: number;
774
+ backArrowRight?: number;
775
+ userPfpUrl?: string;
776
+ userPfpTop?: number;
777
+ userPfpBottom?: number;
778
+ userPfpLeft?: number;
779
+ userPfpRight?: number;
780
+ userHasStory?: boolean;
781
+ userStoryRingColor?: string;
782
+ userStoryRingTop?: number;
783
+ userStoryRingBottom?: number;
784
+ userStoryRingLeft?: number;
785
+ userStoryRingRight?: number;
786
+ userStoryRingWidth?: number;
787
+ noNotisTop?: number;
788
+ noNotisBottom?: number;
789
+ noNotisLeft?: number;
790
+ noNotisRight?: number;
791
+ smilePlusTop?: number;
792
+ smilePlusBottom?: number;
793
+ smilePlusLeft?: number;
794
+ smilePlusRight?: number;
795
+ phoneIconTop?: number;
796
+ phoneIconBottom?: number;
797
+ phoneIconLeft?: number;
798
+ phoneIconRight?: number;
799
+ videoIconTop?: number;
800
+ videoIconBottom?: number;
801
+ videoIconLeft?: number;
802
+ videoIconRight?: number;
771
803
  }
772
804
 
773
805
  /**
package/dist/index.d.ts CHANGED
@@ -768,6 +768,38 @@ interface InstagramDmCompositionProps {
768
768
  profilePicUrl?: string;
769
769
  profilePicSize?: number;
770
770
  profilePicGap?: number;
771
+ backArrowTop?: number;
772
+ backArrowBottom?: number;
773
+ backArrowLeft?: number;
774
+ backArrowRight?: number;
775
+ userPfpUrl?: string;
776
+ userPfpTop?: number;
777
+ userPfpBottom?: number;
778
+ userPfpLeft?: number;
779
+ userPfpRight?: number;
780
+ userHasStory?: boolean;
781
+ userStoryRingColor?: string;
782
+ userStoryRingTop?: number;
783
+ userStoryRingBottom?: number;
784
+ userStoryRingLeft?: number;
785
+ userStoryRingRight?: number;
786
+ userStoryRingWidth?: number;
787
+ noNotisTop?: number;
788
+ noNotisBottom?: number;
789
+ noNotisLeft?: number;
790
+ noNotisRight?: number;
791
+ smilePlusTop?: number;
792
+ smilePlusBottom?: number;
793
+ smilePlusLeft?: number;
794
+ smilePlusRight?: number;
795
+ phoneIconTop?: number;
796
+ phoneIconBottom?: number;
797
+ phoneIconLeft?: number;
798
+ phoneIconRight?: number;
799
+ videoIconTop?: number;
800
+ videoIconBottom?: number;
801
+ videoIconLeft?: number;
802
+ videoIconRight?: number;
771
803
  }
772
804
 
773
805
  /**
package/dist/index.js CHANGED
@@ -3429,8 +3429,180 @@ var ICON_INPUT_IDS = {
3429
3429
  circlePlus: "ig-circle-plus",
3430
3430
  smileSticker: "ig-smile-sticker",
3431
3431
  cameraRoll: "ig-camera-roll",
3432
- microphone: "ig-microphone"
3432
+ microphone: "ig-microphone",
3433
+ // Header icons
3434
+ backArrow: "ig-back-arrow",
3435
+ noNotis: "ig-no-notis",
3436
+ smilePlus: "ig-smile-plus",
3437
+ phone: "ig-phone",
3438
+ video: "ig-video"
3433
3439
  };
3440
+ var USER_PFP_INPUT_ID = "user-pfp";
3441
+ var HEADER_DEFAULTS = {
3442
+ backArrowTop: 240,
3443
+ backArrowBottom: 299,
3444
+ backArrowLeft: 78,
3445
+ backArrowRight: 110,
3446
+ userPfpTop: 222,
3447
+ userPfpBottom: 317,
3448
+ userPfpLeft: 180,
3449
+ userPfpRight: 275,
3450
+ userStoryRingColor: "#5e656d",
3451
+ userStoryRingTop: 210,
3452
+ userStoryRingBottom: 329,
3453
+ userStoryRingLeft: 168,
3454
+ userStoryRingRight: 287,
3455
+ userStoryRingWidth: 7,
3456
+ noNotisTop: 77,
3457
+ noNotisBottom: 119,
3458
+ noNotisLeft: 272,
3459
+ noNotisRight: 311,
3460
+ smilePlusTop: 234,
3461
+ smilePlusBottom: 305,
3462
+ smilePlusLeft: 663,
3463
+ smilePlusRight: 734,
3464
+ phoneIconTop: 236,
3465
+ phoneIconBottom: 302,
3466
+ phoneIconLeft: 807,
3467
+ phoneIconRight: 873,
3468
+ videoIconTop: 240,
3469
+ videoIconBottom: 299,
3470
+ videoIconLeft: 948,
3471
+ videoIconRight: 1019
3472
+ };
3473
+ function generateHeaderElements(props) {
3474
+ const elements = [];
3475
+ const backArrowTop = props.backArrowTop ?? HEADER_DEFAULTS.backArrowTop;
3476
+ const backArrowBottom = props.backArrowBottom ?? HEADER_DEFAULTS.backArrowBottom;
3477
+ const backArrowLeft = props.backArrowLeft ?? HEADER_DEFAULTS.backArrowLeft;
3478
+ const backArrowRight = props.backArrowRight ?? HEADER_DEFAULTS.backArrowRight;
3479
+ const backArrowWidth = backArrowRight - backArrowLeft;
3480
+ const backArrowHeight = backArrowBottom - backArrowTop;
3481
+ elements.push({
3482
+ id: "back-arrow",
3483
+ type: "image",
3484
+ x: backArrowLeft,
3485
+ y: backArrowTop,
3486
+ width: backArrowWidth,
3487
+ height: backArrowHeight,
3488
+ zIndex: 30,
3489
+ inputId: ICON_INPUT_IDS.backArrow,
3490
+ fit: "fill"
3491
+ });
3492
+ const userHasStory = props.userHasStory ?? false;
3493
+ if (userHasStory) {
3494
+ const ringTop = props.userStoryRingTop ?? HEADER_DEFAULTS.userStoryRingTop;
3495
+ const ringBottom = props.userStoryRingBottom ?? HEADER_DEFAULTS.userStoryRingBottom;
3496
+ const ringLeft = props.userStoryRingLeft ?? HEADER_DEFAULTS.userStoryRingLeft;
3497
+ const ringRight = props.userStoryRingRight ?? HEADER_DEFAULTS.userStoryRingRight;
3498
+ const ringColor = props.userStoryRingColor ?? HEADER_DEFAULTS.userStoryRingColor;
3499
+ const ringWidth = ringRight - ringLeft;
3500
+ const ringHeight = ringBottom - ringTop;
3501
+ elements.push({
3502
+ id: "user-story-ring",
3503
+ type: "text",
3504
+ x: ringLeft,
3505
+ y: ringTop,
3506
+ width: ringWidth,
3507
+ height: ringHeight,
3508
+ zIndex: 29,
3509
+ text: "",
3510
+ backgroundColor: ringColor,
3511
+ backgroundOpacity: 100,
3512
+ backgroundBorderRadius: ringWidth / 2
3513
+ });
3514
+ }
3515
+ const userPfpTop = props.userPfpTop ?? HEADER_DEFAULTS.userPfpTop;
3516
+ const userPfpBottom = props.userPfpBottom ?? HEADER_DEFAULTS.userPfpBottom;
3517
+ const userPfpLeft = props.userPfpLeft ?? HEADER_DEFAULTS.userPfpLeft;
3518
+ const userPfpRight = props.userPfpRight ?? HEADER_DEFAULTS.userPfpRight;
3519
+ const userPfpWidth = userPfpRight - userPfpLeft;
3520
+ const userPfpHeight = userPfpBottom - userPfpTop;
3521
+ if (props.userPfpUrl) {
3522
+ elements.push({
3523
+ id: "user-pfp",
3524
+ type: "image",
3525
+ x: userPfpLeft,
3526
+ y: userPfpTop,
3527
+ width: userPfpWidth,
3528
+ height: userPfpHeight,
3529
+ zIndex: 30,
3530
+ inputId: USER_PFP_INPUT_ID,
3531
+ fit: "cover",
3532
+ borderRadius: userPfpWidth / 2
3533
+ // Circular
3534
+ });
3535
+ }
3536
+ const noNotisTop = props.noNotisTop ?? HEADER_DEFAULTS.noNotisTop;
3537
+ const noNotisBottom = props.noNotisBottom ?? HEADER_DEFAULTS.noNotisBottom;
3538
+ const noNotisLeft = props.noNotisLeft ?? HEADER_DEFAULTS.noNotisLeft;
3539
+ const noNotisRight = props.noNotisRight ?? HEADER_DEFAULTS.noNotisRight;
3540
+ const noNotisWidth = noNotisRight - noNotisLeft;
3541
+ const noNotisHeight = noNotisBottom - noNotisTop;
3542
+ elements.push({
3543
+ id: "no-notis-icon",
3544
+ type: "image",
3545
+ x: noNotisLeft,
3546
+ y: noNotisTop,
3547
+ width: noNotisWidth,
3548
+ height: noNotisHeight,
3549
+ zIndex: 30,
3550
+ inputId: ICON_INPUT_IDS.noNotis,
3551
+ fit: "fill"
3552
+ });
3553
+ const smilePlusTop = props.smilePlusTop ?? HEADER_DEFAULTS.smilePlusTop;
3554
+ const smilePlusBottom = props.smilePlusBottom ?? HEADER_DEFAULTS.smilePlusBottom;
3555
+ const smilePlusLeft = props.smilePlusLeft ?? HEADER_DEFAULTS.smilePlusLeft;
3556
+ const smilePlusRight = props.smilePlusRight ?? HEADER_DEFAULTS.smilePlusRight;
3557
+ const smilePlusWidth = smilePlusRight - smilePlusLeft;
3558
+ const smilePlusHeight = smilePlusBottom - smilePlusTop;
3559
+ elements.push({
3560
+ id: "smile-plus-icon",
3561
+ type: "image",
3562
+ x: smilePlusLeft,
3563
+ y: smilePlusTop,
3564
+ width: smilePlusWidth,
3565
+ height: smilePlusHeight,
3566
+ zIndex: 30,
3567
+ inputId: ICON_INPUT_IDS.smilePlus,
3568
+ fit: "fill"
3569
+ });
3570
+ const phoneIconTop = props.phoneIconTop ?? HEADER_DEFAULTS.phoneIconTop;
3571
+ const phoneIconBottom = props.phoneIconBottom ?? HEADER_DEFAULTS.phoneIconBottom;
3572
+ const phoneIconLeft = props.phoneIconLeft ?? HEADER_DEFAULTS.phoneIconLeft;
3573
+ const phoneIconRight = props.phoneIconRight ?? HEADER_DEFAULTS.phoneIconRight;
3574
+ const phoneIconWidth = phoneIconRight - phoneIconLeft;
3575
+ const phoneIconHeight = phoneIconBottom - phoneIconTop;
3576
+ elements.push({
3577
+ id: "phone-icon",
3578
+ type: "image",
3579
+ x: phoneIconLeft,
3580
+ y: phoneIconTop,
3581
+ width: phoneIconWidth,
3582
+ height: phoneIconHeight,
3583
+ zIndex: 30,
3584
+ inputId: ICON_INPUT_IDS.phone,
3585
+ fit: "fill"
3586
+ });
3587
+ const videoIconTop = props.videoIconTop ?? HEADER_DEFAULTS.videoIconTop;
3588
+ const videoIconBottom = props.videoIconBottom ?? HEADER_DEFAULTS.videoIconBottom;
3589
+ const videoIconLeft = props.videoIconLeft ?? HEADER_DEFAULTS.videoIconLeft;
3590
+ const videoIconRight = props.videoIconRight ?? HEADER_DEFAULTS.videoIconRight;
3591
+ const videoIconWidth = videoIconRight - videoIconLeft;
3592
+ const videoIconHeight = videoIconBottom - videoIconTop;
3593
+ elements.push({
3594
+ id: "video-icon",
3595
+ type: "image",
3596
+ x: videoIconLeft,
3597
+ y: videoIconTop,
3598
+ width: videoIconWidth,
3599
+ height: videoIconHeight,
3600
+ zIndex: 30,
3601
+ inputId: ICON_INPUT_IDS.video,
3602
+ fit: "fill"
3603
+ });
3604
+ return elements;
3605
+ }
3434
3606
  function generateFooterIconElements(props) {
3435
3607
  const elements = [];
3436
3608
  const cameraIconTop = props.cameraIconTop ?? ICON_DEFAULTS.cameraIconTop;
@@ -3925,18 +4097,28 @@ function buildImageUrls(props) {
3925
4097
  imageUrls[ICON_INPUT_IDS.smileSticker] = (0, import_remotion8.staticFile)("ig-smile-sticker.png");
3926
4098
  imageUrls[ICON_INPUT_IDS.cameraRoll] = (0, import_remotion8.staticFile)("ig-camera-roll.png");
3927
4099
  imageUrls[ICON_INPUT_IDS.microphone] = (0, import_remotion8.staticFile)("ig-microphone.png");
4100
+ imageUrls[ICON_INPUT_IDS.backArrow] = (0, import_remotion8.staticFile)("ig-header-left-arrow.png");
4101
+ imageUrls[ICON_INPUT_IDS.noNotis] = (0, import_remotion8.staticFile)("ig-no-notis.png");
4102
+ imageUrls[ICON_INPUT_IDS.smilePlus] = (0, import_remotion8.staticFile)("ig-smile-plus.png");
4103
+ imageUrls[ICON_INPUT_IDS.phone] = (0, import_remotion8.staticFile)("ig-phone.png");
4104
+ imageUrls[ICON_INPUT_IDS.video] = (0, import_remotion8.staticFile)("ig-video.png");
3928
4105
  if (props.profilePicUrl) {
3929
4106
  imageUrls[PROFILE_PIC_INPUT_ID] = props.profilePicUrl;
3930
4107
  }
4108
+ if (props.userPfpUrl) {
4109
+ imageUrls[USER_PFP_INPUT_ID] = props.userPfpUrl;
4110
+ }
3931
4111
  return imageUrls;
3932
4112
  }
3933
4113
  function convertPropsToElements(props) {
3934
4114
  const calculatedMessages = calculateMessagePositions(props);
4115
+ const headerElements = generateHeaderElements(props);
3935
4116
  const footerElements = generateFooterElements(props);
3936
4117
  const footerIconElements = generateFooterIconElements(props);
3937
4118
  const messageElements = generateMessageElements(props, calculatedMessages);
3938
4119
  const profilePicElements = generateProfilePicElements(props, calculatedMessages);
3939
4120
  const elements = [
4121
+ ...headerElements,
3940
4122
  ...footerElements,
3941
4123
  ...footerIconElements,
3942
4124
  ...messageElements,
@@ -4055,7 +4237,46 @@ var defaultInstagramDmProps = {
4055
4237
  bubbleMaxWidth: 866,
4056
4238
  profilePicUrl: "https://n14dcpakf8w1fekl.public.blob.vercel-storage.com/media/8ff1462b-13d7-4abe-9325-0a6ad19004f0/884a81ce74fa88e229f6be5f76f29385-3P4rjQqfbLidxtZ7OmvgaDQNMSSIGi.jpg",
4057
4239
  profilePicSize: 83,
4058
- profilePicGap: 37
4240
+ profilePicGap: 37,
4241
+ // Header - Back arrow
4242
+ backArrowTop: 240,
4243
+ backArrowBottom: 299,
4244
+ backArrowLeft: 78,
4245
+ backArrowRight: 110,
4246
+ // Header - User profile picture
4247
+ userPfpUrl: "https://n14dcpakf8w1fekl.public.blob.vercel-storage.com/media/8ff1462b-13d7-4abe-9325-0a6ad19004f0/884a81ce74fa88e229f6be5f76f29385-3P4rjQqfbLidxtZ7OmvgaDQNMSSIGi.jpg",
4248
+ userPfpTop: 222,
4249
+ userPfpBottom: 317,
4250
+ userPfpLeft: 180,
4251
+ userPfpRight: 275,
4252
+ // Header - User story ring
4253
+ userHasStory: false,
4254
+ userStoryRingColor: "#5e656d",
4255
+ userStoryRingTop: 210,
4256
+ userStoryRingBottom: 329,
4257
+ userStoryRingLeft: 168,
4258
+ userStoryRingRight: 287,
4259
+ userStoryRingWidth: 7,
4260
+ // Header - No notifications icon
4261
+ noNotisTop: 77,
4262
+ noNotisBottom: 119,
4263
+ noNotisLeft: 272,
4264
+ noNotisRight: 311,
4265
+ // Header - Smile plus icon
4266
+ smilePlusTop: 234,
4267
+ smilePlusBottom: 305,
4268
+ smilePlusLeft: 663,
4269
+ smilePlusRight: 734,
4270
+ // Header - Phone icon
4271
+ phoneIconTop: 236,
4272
+ phoneIconBottom: 302,
4273
+ phoneIconLeft: 807,
4274
+ phoneIconRight: 873,
4275
+ // Header - Video icon
4276
+ videoIconTop: 240,
4277
+ videoIconBottom: 299,
4278
+ videoIconLeft: 948,
4279
+ videoIconRight: 1019
4059
4280
  };
4060
4281
  function InstagramDmComposition(props) {
4061
4282
  const {
@@ -5223,7 +5444,46 @@ var instagramDmSchema = import_zod.z.object({
5223
5444
  // Profile picture
5224
5445
  profilePicUrl: import_zod.z.string().optional().default("").describe("Recipient profile picture URL"),
5225
5446
  profilePicSize: import_zod.z.number().optional().default(83).describe("Profile picture size"),
5226
- profilePicGap: import_zod.z.number().optional().default(37).describe("Gap between profile pic and bubble")
5447
+ profilePicGap: import_zod.z.number().optional().default(37).describe("Gap between profile pic and bubble"),
5448
+ // Header - Back arrow
5449
+ backArrowTop: import_zod.z.number().optional().default(240).describe("Back arrow top Y"),
5450
+ backArrowBottom: import_zod.z.number().optional().default(299).describe("Back arrow bottom Y"),
5451
+ backArrowLeft: import_zod.z.number().optional().default(78).describe("Back arrow left X"),
5452
+ backArrowRight: import_zod.z.number().optional().default(110).describe("Back arrow right X"),
5453
+ // Header - User profile picture
5454
+ userPfpUrl: import_zod.z.string().optional().default("").describe("User profile picture URL"),
5455
+ userPfpTop: import_zod.z.number().optional().default(222).describe("User pfp top Y"),
5456
+ userPfpBottom: import_zod.z.number().optional().default(317).describe("User pfp bottom Y"),
5457
+ userPfpLeft: import_zod.z.number().optional().default(180).describe("User pfp left X"),
5458
+ userPfpRight: import_zod.z.number().optional().default(275).describe("User pfp right X"),
5459
+ // Header - User story ring
5460
+ userHasStory: import_zod.z.boolean().optional().default(false).describe("Show story ring around user pfp"),
5461
+ userStoryRingColor: import_zod.z.string().optional().default("#5e656d").describe("Story ring color"),
5462
+ userStoryRingTop: import_zod.z.number().optional().default(210).describe("Story ring outer top Y"),
5463
+ userStoryRingBottom: import_zod.z.number().optional().default(329).describe("Story ring outer bottom Y"),
5464
+ userStoryRingLeft: import_zod.z.number().optional().default(168).describe("Story ring outer left X"),
5465
+ userStoryRingRight: import_zod.z.number().optional().default(287).describe("Story ring outer right X"),
5466
+ userStoryRingWidth: import_zod.z.number().optional().default(7).describe("Story ring width"),
5467
+ // Header - No notifications icon
5468
+ noNotisTop: import_zod.z.number().optional().default(77).describe("No notifications top Y"),
5469
+ noNotisBottom: import_zod.z.number().optional().default(119).describe("No notifications bottom Y"),
5470
+ noNotisLeft: import_zod.z.number().optional().default(272).describe("No notifications left X"),
5471
+ noNotisRight: import_zod.z.number().optional().default(311).describe("No notifications right X"),
5472
+ // Header - Smile plus icon
5473
+ smilePlusTop: import_zod.z.number().optional().default(234).describe("Smile plus top Y"),
5474
+ smilePlusBottom: import_zod.z.number().optional().default(305).describe("Smile plus bottom Y"),
5475
+ smilePlusLeft: import_zod.z.number().optional().default(663).describe("Smile plus left X"),
5476
+ smilePlusRight: import_zod.z.number().optional().default(734).describe("Smile plus right X"),
5477
+ // Header - Phone icon
5478
+ phoneIconTop: import_zod.z.number().optional().default(236).describe("Phone icon top Y"),
5479
+ phoneIconBottom: import_zod.z.number().optional().default(302).describe("Phone icon bottom Y"),
5480
+ phoneIconLeft: import_zod.z.number().optional().default(807).describe("Phone icon left X"),
5481
+ phoneIconRight: import_zod.z.number().optional().default(873).describe("Phone icon right X"),
5482
+ // Header - Video icon
5483
+ videoIconTop: import_zod.z.number().optional().default(240).describe("Video icon top Y"),
5484
+ videoIconBottom: import_zod.z.number().optional().default(299).describe("Video icon bottom Y"),
5485
+ videoIconLeft: import_zod.z.number().optional().default(948).describe("Video icon left X"),
5486
+ videoIconRight: import_zod.z.number().optional().default(1019).describe("Video icon right X")
5227
5487
  });
5228
5488
  var ImageComp = ImageEditorComposition;
5229
5489
  var VideoComp = VideoEditorComposition;
package/dist/index.mjs CHANGED
@@ -2498,8 +2498,180 @@ var ICON_INPUT_IDS = {
2498
2498
  circlePlus: "ig-circle-plus",
2499
2499
  smileSticker: "ig-smile-sticker",
2500
2500
  cameraRoll: "ig-camera-roll",
2501
- microphone: "ig-microphone"
2501
+ microphone: "ig-microphone",
2502
+ // Header icons
2503
+ backArrow: "ig-back-arrow",
2504
+ noNotis: "ig-no-notis",
2505
+ smilePlus: "ig-smile-plus",
2506
+ phone: "ig-phone",
2507
+ video: "ig-video"
2502
2508
  };
2509
+ var USER_PFP_INPUT_ID = "user-pfp";
2510
+ var HEADER_DEFAULTS = {
2511
+ backArrowTop: 240,
2512
+ backArrowBottom: 299,
2513
+ backArrowLeft: 78,
2514
+ backArrowRight: 110,
2515
+ userPfpTop: 222,
2516
+ userPfpBottom: 317,
2517
+ userPfpLeft: 180,
2518
+ userPfpRight: 275,
2519
+ userStoryRingColor: "#5e656d",
2520
+ userStoryRingTop: 210,
2521
+ userStoryRingBottom: 329,
2522
+ userStoryRingLeft: 168,
2523
+ userStoryRingRight: 287,
2524
+ userStoryRingWidth: 7,
2525
+ noNotisTop: 77,
2526
+ noNotisBottom: 119,
2527
+ noNotisLeft: 272,
2528
+ noNotisRight: 311,
2529
+ smilePlusTop: 234,
2530
+ smilePlusBottom: 305,
2531
+ smilePlusLeft: 663,
2532
+ smilePlusRight: 734,
2533
+ phoneIconTop: 236,
2534
+ phoneIconBottom: 302,
2535
+ phoneIconLeft: 807,
2536
+ phoneIconRight: 873,
2537
+ videoIconTop: 240,
2538
+ videoIconBottom: 299,
2539
+ videoIconLeft: 948,
2540
+ videoIconRight: 1019
2541
+ };
2542
+ function generateHeaderElements(props) {
2543
+ const elements = [];
2544
+ const backArrowTop = props.backArrowTop ?? HEADER_DEFAULTS.backArrowTop;
2545
+ const backArrowBottom = props.backArrowBottom ?? HEADER_DEFAULTS.backArrowBottom;
2546
+ const backArrowLeft = props.backArrowLeft ?? HEADER_DEFAULTS.backArrowLeft;
2547
+ const backArrowRight = props.backArrowRight ?? HEADER_DEFAULTS.backArrowRight;
2548
+ const backArrowWidth = backArrowRight - backArrowLeft;
2549
+ const backArrowHeight = backArrowBottom - backArrowTop;
2550
+ elements.push({
2551
+ id: "back-arrow",
2552
+ type: "image",
2553
+ x: backArrowLeft,
2554
+ y: backArrowTop,
2555
+ width: backArrowWidth,
2556
+ height: backArrowHeight,
2557
+ zIndex: 30,
2558
+ inputId: ICON_INPUT_IDS.backArrow,
2559
+ fit: "fill"
2560
+ });
2561
+ const userHasStory = props.userHasStory ?? false;
2562
+ if (userHasStory) {
2563
+ const ringTop = props.userStoryRingTop ?? HEADER_DEFAULTS.userStoryRingTop;
2564
+ const ringBottom = props.userStoryRingBottom ?? HEADER_DEFAULTS.userStoryRingBottom;
2565
+ const ringLeft = props.userStoryRingLeft ?? HEADER_DEFAULTS.userStoryRingLeft;
2566
+ const ringRight = props.userStoryRingRight ?? HEADER_DEFAULTS.userStoryRingRight;
2567
+ const ringColor = props.userStoryRingColor ?? HEADER_DEFAULTS.userStoryRingColor;
2568
+ const ringWidth = ringRight - ringLeft;
2569
+ const ringHeight = ringBottom - ringTop;
2570
+ elements.push({
2571
+ id: "user-story-ring",
2572
+ type: "text",
2573
+ x: ringLeft,
2574
+ y: ringTop,
2575
+ width: ringWidth,
2576
+ height: ringHeight,
2577
+ zIndex: 29,
2578
+ text: "",
2579
+ backgroundColor: ringColor,
2580
+ backgroundOpacity: 100,
2581
+ backgroundBorderRadius: ringWidth / 2
2582
+ });
2583
+ }
2584
+ const userPfpTop = props.userPfpTop ?? HEADER_DEFAULTS.userPfpTop;
2585
+ const userPfpBottom = props.userPfpBottom ?? HEADER_DEFAULTS.userPfpBottom;
2586
+ const userPfpLeft = props.userPfpLeft ?? HEADER_DEFAULTS.userPfpLeft;
2587
+ const userPfpRight = props.userPfpRight ?? HEADER_DEFAULTS.userPfpRight;
2588
+ const userPfpWidth = userPfpRight - userPfpLeft;
2589
+ const userPfpHeight = userPfpBottom - userPfpTop;
2590
+ if (props.userPfpUrl) {
2591
+ elements.push({
2592
+ id: "user-pfp",
2593
+ type: "image",
2594
+ x: userPfpLeft,
2595
+ y: userPfpTop,
2596
+ width: userPfpWidth,
2597
+ height: userPfpHeight,
2598
+ zIndex: 30,
2599
+ inputId: USER_PFP_INPUT_ID,
2600
+ fit: "cover",
2601
+ borderRadius: userPfpWidth / 2
2602
+ // Circular
2603
+ });
2604
+ }
2605
+ const noNotisTop = props.noNotisTop ?? HEADER_DEFAULTS.noNotisTop;
2606
+ const noNotisBottom = props.noNotisBottom ?? HEADER_DEFAULTS.noNotisBottom;
2607
+ const noNotisLeft = props.noNotisLeft ?? HEADER_DEFAULTS.noNotisLeft;
2608
+ const noNotisRight = props.noNotisRight ?? HEADER_DEFAULTS.noNotisRight;
2609
+ const noNotisWidth = noNotisRight - noNotisLeft;
2610
+ const noNotisHeight = noNotisBottom - noNotisTop;
2611
+ elements.push({
2612
+ id: "no-notis-icon",
2613
+ type: "image",
2614
+ x: noNotisLeft,
2615
+ y: noNotisTop,
2616
+ width: noNotisWidth,
2617
+ height: noNotisHeight,
2618
+ zIndex: 30,
2619
+ inputId: ICON_INPUT_IDS.noNotis,
2620
+ fit: "fill"
2621
+ });
2622
+ const smilePlusTop = props.smilePlusTop ?? HEADER_DEFAULTS.smilePlusTop;
2623
+ const smilePlusBottom = props.smilePlusBottom ?? HEADER_DEFAULTS.smilePlusBottom;
2624
+ const smilePlusLeft = props.smilePlusLeft ?? HEADER_DEFAULTS.smilePlusLeft;
2625
+ const smilePlusRight = props.smilePlusRight ?? HEADER_DEFAULTS.smilePlusRight;
2626
+ const smilePlusWidth = smilePlusRight - smilePlusLeft;
2627
+ const smilePlusHeight = smilePlusBottom - smilePlusTop;
2628
+ elements.push({
2629
+ id: "smile-plus-icon",
2630
+ type: "image",
2631
+ x: smilePlusLeft,
2632
+ y: smilePlusTop,
2633
+ width: smilePlusWidth,
2634
+ height: smilePlusHeight,
2635
+ zIndex: 30,
2636
+ inputId: ICON_INPUT_IDS.smilePlus,
2637
+ fit: "fill"
2638
+ });
2639
+ const phoneIconTop = props.phoneIconTop ?? HEADER_DEFAULTS.phoneIconTop;
2640
+ const phoneIconBottom = props.phoneIconBottom ?? HEADER_DEFAULTS.phoneIconBottom;
2641
+ const phoneIconLeft = props.phoneIconLeft ?? HEADER_DEFAULTS.phoneIconLeft;
2642
+ const phoneIconRight = props.phoneIconRight ?? HEADER_DEFAULTS.phoneIconRight;
2643
+ const phoneIconWidth = phoneIconRight - phoneIconLeft;
2644
+ const phoneIconHeight = phoneIconBottom - phoneIconTop;
2645
+ elements.push({
2646
+ id: "phone-icon",
2647
+ type: "image",
2648
+ x: phoneIconLeft,
2649
+ y: phoneIconTop,
2650
+ width: phoneIconWidth,
2651
+ height: phoneIconHeight,
2652
+ zIndex: 30,
2653
+ inputId: ICON_INPUT_IDS.phone,
2654
+ fit: "fill"
2655
+ });
2656
+ const videoIconTop = props.videoIconTop ?? HEADER_DEFAULTS.videoIconTop;
2657
+ const videoIconBottom = props.videoIconBottom ?? HEADER_DEFAULTS.videoIconBottom;
2658
+ const videoIconLeft = props.videoIconLeft ?? HEADER_DEFAULTS.videoIconLeft;
2659
+ const videoIconRight = props.videoIconRight ?? HEADER_DEFAULTS.videoIconRight;
2660
+ const videoIconWidth = videoIconRight - videoIconLeft;
2661
+ const videoIconHeight = videoIconBottom - videoIconTop;
2662
+ elements.push({
2663
+ id: "video-icon",
2664
+ type: "image",
2665
+ x: videoIconLeft,
2666
+ y: videoIconTop,
2667
+ width: videoIconWidth,
2668
+ height: videoIconHeight,
2669
+ zIndex: 30,
2670
+ inputId: ICON_INPUT_IDS.video,
2671
+ fit: "fill"
2672
+ });
2673
+ return elements;
2674
+ }
2503
2675
  function generateFooterIconElements(props) {
2504
2676
  const elements = [];
2505
2677
  const cameraIconTop = props.cameraIconTop ?? ICON_DEFAULTS.cameraIconTop;
@@ -2994,18 +3166,28 @@ function buildImageUrls(props) {
2994
3166
  imageUrls[ICON_INPUT_IDS.smileSticker] = staticFile("ig-smile-sticker.png");
2995
3167
  imageUrls[ICON_INPUT_IDS.cameraRoll] = staticFile("ig-camera-roll.png");
2996
3168
  imageUrls[ICON_INPUT_IDS.microphone] = staticFile("ig-microphone.png");
3169
+ imageUrls[ICON_INPUT_IDS.backArrow] = staticFile("ig-header-left-arrow.png");
3170
+ imageUrls[ICON_INPUT_IDS.noNotis] = staticFile("ig-no-notis.png");
3171
+ imageUrls[ICON_INPUT_IDS.smilePlus] = staticFile("ig-smile-plus.png");
3172
+ imageUrls[ICON_INPUT_IDS.phone] = staticFile("ig-phone.png");
3173
+ imageUrls[ICON_INPUT_IDS.video] = staticFile("ig-video.png");
2997
3174
  if (props.profilePicUrl) {
2998
3175
  imageUrls[PROFILE_PIC_INPUT_ID] = props.profilePicUrl;
2999
3176
  }
3177
+ if (props.userPfpUrl) {
3178
+ imageUrls[USER_PFP_INPUT_ID] = props.userPfpUrl;
3179
+ }
3000
3180
  return imageUrls;
3001
3181
  }
3002
3182
  function convertPropsToElements(props) {
3003
3183
  const calculatedMessages = calculateMessagePositions(props);
3184
+ const headerElements = generateHeaderElements(props);
3004
3185
  const footerElements = generateFooterElements(props);
3005
3186
  const footerIconElements = generateFooterIconElements(props);
3006
3187
  const messageElements = generateMessageElements(props, calculatedMessages);
3007
3188
  const profilePicElements = generateProfilePicElements(props, calculatedMessages);
3008
3189
  const elements = [
3190
+ ...headerElements,
3009
3191
  ...footerElements,
3010
3192
  ...footerIconElements,
3011
3193
  ...messageElements,
@@ -3124,7 +3306,46 @@ var defaultInstagramDmProps = {
3124
3306
  bubbleMaxWidth: 866,
3125
3307
  profilePicUrl: "https://n14dcpakf8w1fekl.public.blob.vercel-storage.com/media/8ff1462b-13d7-4abe-9325-0a6ad19004f0/884a81ce74fa88e229f6be5f76f29385-3P4rjQqfbLidxtZ7OmvgaDQNMSSIGi.jpg",
3126
3308
  profilePicSize: 83,
3127
- profilePicGap: 37
3309
+ profilePicGap: 37,
3310
+ // Header - Back arrow
3311
+ backArrowTop: 240,
3312
+ backArrowBottom: 299,
3313
+ backArrowLeft: 78,
3314
+ backArrowRight: 110,
3315
+ // Header - User profile picture
3316
+ userPfpUrl: "https://n14dcpakf8w1fekl.public.blob.vercel-storage.com/media/8ff1462b-13d7-4abe-9325-0a6ad19004f0/884a81ce74fa88e229f6be5f76f29385-3P4rjQqfbLidxtZ7OmvgaDQNMSSIGi.jpg",
3317
+ userPfpTop: 222,
3318
+ userPfpBottom: 317,
3319
+ userPfpLeft: 180,
3320
+ userPfpRight: 275,
3321
+ // Header - User story ring
3322
+ userHasStory: false,
3323
+ userStoryRingColor: "#5e656d",
3324
+ userStoryRingTop: 210,
3325
+ userStoryRingBottom: 329,
3326
+ userStoryRingLeft: 168,
3327
+ userStoryRingRight: 287,
3328
+ userStoryRingWidth: 7,
3329
+ // Header - No notifications icon
3330
+ noNotisTop: 77,
3331
+ noNotisBottom: 119,
3332
+ noNotisLeft: 272,
3333
+ noNotisRight: 311,
3334
+ // Header - Smile plus icon
3335
+ smilePlusTop: 234,
3336
+ smilePlusBottom: 305,
3337
+ smilePlusLeft: 663,
3338
+ smilePlusRight: 734,
3339
+ // Header - Phone icon
3340
+ phoneIconTop: 236,
3341
+ phoneIconBottom: 302,
3342
+ phoneIconLeft: 807,
3343
+ phoneIconRight: 873,
3344
+ // Header - Video icon
3345
+ videoIconTop: 240,
3346
+ videoIconBottom: 299,
3347
+ videoIconLeft: 948,
3348
+ videoIconRight: 1019
3128
3349
  };
3129
3350
  function InstagramDmComposition(props) {
3130
3351
  const {
@@ -4009,7 +4230,46 @@ var instagramDmSchema = z.object({
4009
4230
  // Profile picture
4010
4231
  profilePicUrl: z.string().optional().default("").describe("Recipient profile picture URL"),
4011
4232
  profilePicSize: z.number().optional().default(83).describe("Profile picture size"),
4012
- profilePicGap: z.number().optional().default(37).describe("Gap between profile pic and bubble")
4233
+ profilePicGap: z.number().optional().default(37).describe("Gap between profile pic and bubble"),
4234
+ // Header - Back arrow
4235
+ backArrowTop: z.number().optional().default(240).describe("Back arrow top Y"),
4236
+ backArrowBottom: z.number().optional().default(299).describe("Back arrow bottom Y"),
4237
+ backArrowLeft: z.number().optional().default(78).describe("Back arrow left X"),
4238
+ backArrowRight: z.number().optional().default(110).describe("Back arrow right X"),
4239
+ // Header - User profile picture
4240
+ userPfpUrl: z.string().optional().default("").describe("User profile picture URL"),
4241
+ userPfpTop: z.number().optional().default(222).describe("User pfp top Y"),
4242
+ userPfpBottom: z.number().optional().default(317).describe("User pfp bottom Y"),
4243
+ userPfpLeft: z.number().optional().default(180).describe("User pfp left X"),
4244
+ userPfpRight: z.number().optional().default(275).describe("User pfp right X"),
4245
+ // Header - User story ring
4246
+ userHasStory: z.boolean().optional().default(false).describe("Show story ring around user pfp"),
4247
+ userStoryRingColor: z.string().optional().default("#5e656d").describe("Story ring color"),
4248
+ userStoryRingTop: z.number().optional().default(210).describe("Story ring outer top Y"),
4249
+ userStoryRingBottom: z.number().optional().default(329).describe("Story ring outer bottom Y"),
4250
+ userStoryRingLeft: z.number().optional().default(168).describe("Story ring outer left X"),
4251
+ userStoryRingRight: z.number().optional().default(287).describe("Story ring outer right X"),
4252
+ userStoryRingWidth: z.number().optional().default(7).describe("Story ring width"),
4253
+ // Header - No notifications icon
4254
+ noNotisTop: z.number().optional().default(77).describe("No notifications top Y"),
4255
+ noNotisBottom: z.number().optional().default(119).describe("No notifications bottom Y"),
4256
+ noNotisLeft: z.number().optional().default(272).describe("No notifications left X"),
4257
+ noNotisRight: z.number().optional().default(311).describe("No notifications right X"),
4258
+ // Header - Smile plus icon
4259
+ smilePlusTop: z.number().optional().default(234).describe("Smile plus top Y"),
4260
+ smilePlusBottom: z.number().optional().default(305).describe("Smile plus bottom Y"),
4261
+ smilePlusLeft: z.number().optional().default(663).describe("Smile plus left X"),
4262
+ smilePlusRight: z.number().optional().default(734).describe("Smile plus right X"),
4263
+ // Header - Phone icon
4264
+ phoneIconTop: z.number().optional().default(236).describe("Phone icon top Y"),
4265
+ phoneIconBottom: z.number().optional().default(302).describe("Phone icon bottom Y"),
4266
+ phoneIconLeft: z.number().optional().default(807).describe("Phone icon left X"),
4267
+ phoneIconRight: z.number().optional().default(873).describe("Phone icon right X"),
4268
+ // Header - Video icon
4269
+ videoIconTop: z.number().optional().default(240).describe("Video icon top Y"),
4270
+ videoIconBottom: z.number().optional().default(299).describe("Video icon bottom Y"),
4271
+ videoIconLeft: z.number().optional().default(948).describe("Video icon left X"),
4272
+ videoIconRight: z.number().optional().default(1019).describe("Video icon right X")
4013
4273
  });
4014
4274
  var ImageComp = ImageEditorComposition;
4015
4275
  var VideoComp = VideoEditorComposition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.8.119",
3
+ "version": "1.8.121",
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",