ugcinc-render 1.8.83 → 1.8.85

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.js CHANGED
@@ -2885,9 +2885,11 @@ function DebugOverlay({
2885
2885
  scrollY,
2886
2886
  referenceVisible,
2887
2887
  onZoomChange,
2888
- onToggleReference
2888
+ onToggleReference,
2889
+ currentProps
2889
2890
  }) {
2890
2891
  const [mousePos, setMousePos] = (0, import_react7.useState)(null);
2892
+ const [copyFeedback, setCopyFeedback] = (0, import_react7.useState)(null);
2891
2893
  const [crosshairPos, setCrosshairPos] = (0, import_react7.useState)(null);
2892
2894
  const [viewportPos, setViewportPos] = (0, import_react7.useState)(null);
2893
2895
  const [pinnedPos, setPinnedPos] = (0, import_react7.useState)(null);
@@ -2995,6 +2997,23 @@ function DebugOverlay({
2995
2997
  },
2996
2998
  [zoom, zoomScale, scrollX, scrollY, viewportPos, onZoomChange]
2997
2999
  );
3000
+ const handleCopyDefaults = (0, import_react7.useCallback)(() => {
3001
+ if (!currentProps) return;
3002
+ const lines = Object.entries(currentProps).filter(([key]) => !["showDebugOverlay", "referenceImageUrl", "showReferenceImage", "referenceOpacity", "durationInFrames", "fps"].includes(key)).map(([key, value]) => {
3003
+ if (typeof value === "string") {
3004
+ return ` ${key}: '${value}',`;
3005
+ }
3006
+ return ` ${key}: ${value},`;
3007
+ });
3008
+ const code = lines.join("\n");
3009
+ navigator.clipboard.writeText(code).then(() => {
3010
+ setCopyFeedback("Copied!");
3011
+ setTimeout(() => setCopyFeedback(null), 2e3);
3012
+ }).catch(() => {
3013
+ setCopyFeedback("Failed to copy");
3014
+ setTimeout(() => setCopyFeedback(null), 2e3);
3015
+ });
3016
+ }, [currentProps]);
2998
3017
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2999
3018
  "div",
3000
3019
  {
@@ -3180,6 +3199,24 @@ function DebugOverlay({
3180
3199
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { color: "#FFFFFF", fontSize: 16 }, children: "Show Reference" })
3181
3200
  ]
3182
3201
  }
3202
+ ),
3203
+ currentProps && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3204
+ "button",
3205
+ {
3206
+ onClick: handleCopyDefaults,
3207
+ style: {
3208
+ marginTop: 12,
3209
+ padding: "8px 16px",
3210
+ backgroundColor: copyFeedback === "Copied!" ? "#4CAF50" : "#333",
3211
+ color: "#FFFFFF",
3212
+ border: "1px solid #555",
3213
+ borderRadius: 4,
3214
+ cursor: "pointer",
3215
+ fontSize: 14,
3216
+ fontFamily: "monospace"
3217
+ },
3218
+ children: copyFeedback || "Copy Defaults"
3219
+ }
3183
3220
  )
3184
3221
  ]
3185
3222
  }
@@ -3204,9 +3241,9 @@ var DEFAULTS = {
3204
3241
  cameraBtnRight: 141,
3205
3242
  cameraBtnBgColor: "#5354fc",
3206
3243
  cameraIconTop: 2400,
3207
- cameraIconBottom: 2454,
3208
- cameraIconLeft: 62,
3209
- cameraIconRight: 118
3244
+ cameraIconBottom: 2455,
3245
+ cameraIconLeft: 61,
3246
+ cameraIconRight: 119
3210
3247
  };
3211
3248
  function IgMessageFooter({
3212
3249
  theme,
@@ -3289,7 +3326,24 @@ var defaultInstagramDmProps = {
3289
3326
  height: 2622,
3290
3327
  durationInFrames: 90,
3291
3328
  fps: 30,
3292
- theme: "dark"
3329
+ theme: "dark",
3330
+ // Footer defaults
3331
+ footerTop: 2363,
3332
+ footerBottom: 2496,
3333
+ footerLeft: 24,
3334
+ footerRight: 1181,
3335
+ footerBgColor: "#0a0a0a",
3336
+ // Camera button defaults
3337
+ cameraBtnTop: 2379,
3338
+ cameraBtnBottom: 2481,
3339
+ cameraBtnLeft: 39,
3340
+ cameraBtnRight: 141,
3341
+ cameraBtnBgColor: "#5354fc",
3342
+ // Camera icon defaults
3343
+ cameraIconTop: 2400,
3344
+ cameraIconBottom: 2455,
3345
+ cameraIconLeft: 61,
3346
+ cameraIconRight: 119
3293
3347
  };
3294
3348
  function InstagramDmComposition({
3295
3349
  showDebugOverlay = false,
@@ -3445,7 +3499,26 @@ function InstagramDmComposition({
3445
3499
  scrollY,
3446
3500
  referenceVisible,
3447
3501
  onZoomChange: handleZoomChange,
3448
- onToggleReference: handleToggleReference
3502
+ onToggleReference: handleToggleReference,
3503
+ currentProps: {
3504
+ width,
3505
+ height,
3506
+ theme,
3507
+ footerTop,
3508
+ footerBottom,
3509
+ footerLeft,
3510
+ footerRight,
3511
+ footerBgColor,
3512
+ cameraBtnTop,
3513
+ cameraBtnBottom,
3514
+ cameraBtnLeft,
3515
+ cameraBtnRight,
3516
+ cameraBtnBgColor,
3517
+ cameraIconTop,
3518
+ cameraIconBottom,
3519
+ cameraIconLeft,
3520
+ cameraIconRight
3521
+ }
3449
3522
  }
3450
3523
  )
3451
3524
  ]
@@ -4405,9 +4478,9 @@ var instagramDmSchema = import_zod.z.object({
4405
4478
  cameraBtnBgColor: import_zod.z.string().optional().default("#5354fc").describe("Camera button background color"),
4406
4479
  // Camera icon position
4407
4480
  cameraIconTop: import_zod.z.number().optional().default(2400).describe("Camera icon top Y"),
4408
- cameraIconBottom: import_zod.z.number().optional().default(2454).describe("Camera icon bottom Y"),
4409
- cameraIconLeft: import_zod.z.number().optional().default(62).describe("Camera icon left X"),
4410
- cameraIconRight: import_zod.z.number().optional().default(118).describe("Camera icon right X")
4481
+ cameraIconBottom: import_zod.z.number().optional().default(2455).describe("Camera icon bottom Y"),
4482
+ cameraIconLeft: import_zod.z.number().optional().default(61).describe("Camera icon left X"),
4483
+ cameraIconRight: import_zod.z.number().optional().default(119).describe("Camera icon right X")
4411
4484
  });
4412
4485
  var ImageComp = ImageEditorComposition;
4413
4486
  var VideoComp = VideoEditorComposition;
package/dist/index.mjs CHANGED
@@ -1993,9 +1993,11 @@ function DebugOverlay({
1993
1993
  scrollY,
1994
1994
  referenceVisible,
1995
1995
  onZoomChange,
1996
- onToggleReference
1996
+ onToggleReference,
1997
+ currentProps
1997
1998
  }) {
1998
1999
  const [mousePos, setMousePos] = useState2(null);
2000
+ const [copyFeedback, setCopyFeedback] = useState2(null);
1999
2001
  const [crosshairPos, setCrosshairPos] = useState2(null);
2000
2002
  const [viewportPos, setViewportPos] = useState2(null);
2001
2003
  const [pinnedPos, setPinnedPos] = useState2(null);
@@ -2103,6 +2105,23 @@ function DebugOverlay({
2103
2105
  },
2104
2106
  [zoom, zoomScale, scrollX, scrollY, viewportPos, onZoomChange]
2105
2107
  );
2108
+ const handleCopyDefaults = useCallback(() => {
2109
+ if (!currentProps) return;
2110
+ const lines = Object.entries(currentProps).filter(([key]) => !["showDebugOverlay", "referenceImageUrl", "showReferenceImage", "referenceOpacity", "durationInFrames", "fps"].includes(key)).map(([key, value]) => {
2111
+ if (typeof value === "string") {
2112
+ return ` ${key}: '${value}',`;
2113
+ }
2114
+ return ` ${key}: ${value},`;
2115
+ });
2116
+ const code = lines.join("\n");
2117
+ navigator.clipboard.writeText(code).then(() => {
2118
+ setCopyFeedback("Copied!");
2119
+ setTimeout(() => setCopyFeedback(null), 2e3);
2120
+ }).catch(() => {
2121
+ setCopyFeedback("Failed to copy");
2122
+ setTimeout(() => setCopyFeedback(null), 2e3);
2123
+ });
2124
+ }, [currentProps]);
2106
2125
  return /* @__PURE__ */ jsxs7(
2107
2126
  "div",
2108
2127
  {
@@ -2288,6 +2307,24 @@ function DebugOverlay({
2288
2307
  /* @__PURE__ */ jsx9("span", { style: { color: "#FFFFFF", fontSize: 16 }, children: "Show Reference" })
2289
2308
  ]
2290
2309
  }
2310
+ ),
2311
+ currentProps && /* @__PURE__ */ jsx9(
2312
+ "button",
2313
+ {
2314
+ onClick: handleCopyDefaults,
2315
+ style: {
2316
+ marginTop: 12,
2317
+ padding: "8px 16px",
2318
+ backgroundColor: copyFeedback === "Copied!" ? "#4CAF50" : "#333",
2319
+ color: "#FFFFFF",
2320
+ border: "1px solid #555",
2321
+ borderRadius: 4,
2322
+ cursor: "pointer",
2323
+ fontSize: 14,
2324
+ fontFamily: "monospace"
2325
+ },
2326
+ children: copyFeedback || "Copy Defaults"
2327
+ }
2291
2328
  )
2292
2329
  ]
2293
2330
  }
@@ -2312,9 +2349,9 @@ var DEFAULTS = {
2312
2349
  cameraBtnRight: 141,
2313
2350
  cameraBtnBgColor: "#5354fc",
2314
2351
  cameraIconTop: 2400,
2315
- cameraIconBottom: 2454,
2316
- cameraIconLeft: 62,
2317
- cameraIconRight: 118
2352
+ cameraIconBottom: 2455,
2353
+ cameraIconLeft: 61,
2354
+ cameraIconRight: 119
2318
2355
  };
2319
2356
  function IgMessageFooter({
2320
2357
  theme,
@@ -2397,7 +2434,24 @@ var defaultInstagramDmProps = {
2397
2434
  height: 2622,
2398
2435
  durationInFrames: 90,
2399
2436
  fps: 30,
2400
- theme: "dark"
2437
+ theme: "dark",
2438
+ // Footer defaults
2439
+ footerTop: 2363,
2440
+ footerBottom: 2496,
2441
+ footerLeft: 24,
2442
+ footerRight: 1181,
2443
+ footerBgColor: "#0a0a0a",
2444
+ // Camera button defaults
2445
+ cameraBtnTop: 2379,
2446
+ cameraBtnBottom: 2481,
2447
+ cameraBtnLeft: 39,
2448
+ cameraBtnRight: 141,
2449
+ cameraBtnBgColor: "#5354fc",
2450
+ // Camera icon defaults
2451
+ cameraIconTop: 2400,
2452
+ cameraIconBottom: 2455,
2453
+ cameraIconLeft: 61,
2454
+ cameraIconRight: 119
2401
2455
  };
2402
2456
  function InstagramDmComposition({
2403
2457
  showDebugOverlay = false,
@@ -2553,7 +2607,26 @@ function InstagramDmComposition({
2553
2607
  scrollY,
2554
2608
  referenceVisible,
2555
2609
  onZoomChange: handleZoomChange,
2556
- onToggleReference: handleToggleReference
2610
+ onToggleReference: handleToggleReference,
2611
+ currentProps: {
2612
+ width,
2613
+ height,
2614
+ theme,
2615
+ footerTop,
2616
+ footerBottom,
2617
+ footerLeft,
2618
+ footerRight,
2619
+ footerBgColor,
2620
+ cameraBtnTop,
2621
+ cameraBtnBottom,
2622
+ cameraBtnLeft,
2623
+ cameraBtnRight,
2624
+ cameraBtnBgColor,
2625
+ cameraIconTop,
2626
+ cameraIconBottom,
2627
+ cameraIconLeft,
2628
+ cameraIconRight
2629
+ }
2557
2630
  }
2558
2631
  )
2559
2632
  ]
@@ -3230,9 +3303,9 @@ var instagramDmSchema = z.object({
3230
3303
  cameraBtnBgColor: z.string().optional().default("#5354fc").describe("Camera button background color"),
3231
3304
  // Camera icon position
3232
3305
  cameraIconTop: z.number().optional().default(2400).describe("Camera icon top Y"),
3233
- cameraIconBottom: z.number().optional().default(2454).describe("Camera icon bottom Y"),
3234
- cameraIconLeft: z.number().optional().default(62).describe("Camera icon left X"),
3235
- cameraIconRight: z.number().optional().default(118).describe("Camera icon right X")
3306
+ cameraIconBottom: z.number().optional().default(2455).describe("Camera icon bottom Y"),
3307
+ cameraIconLeft: z.number().optional().default(61).describe("Camera icon left X"),
3308
+ cameraIconRight: z.number().optional().default(119).describe("Camera icon right X")
3236
3309
  });
3237
3310
  var ImageComp = ImageEditorComposition;
3238
3311
  var VideoComp = VideoEditorComposition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.8.83",
3
+ "version": "1.8.85",
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",