From 56880256e598fa8b0995985e433ddcae4b306999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20Do=C4=9Fan=20=C3=96zban?= Date: Mon, 27 Jul 2026 18:28:07 +0200 Subject: [PATCH] Enlarge watermark badge for preview/encode parity and document video title fields. Fix double-scaled badge preview, bump default watermark to 42% frame width, and update OSS docs/API for title vs songTitle separation and shared typography. Co-authored-by: Cursor --- components/LayoutStudio.tsx | 22 +++++++++---- lib/ffmpeg/encode.ts | 8 +++-- lib/preview-typography.ts | 4 +-- scripts/preview-typography.test.ts | 2 +- website/docs/api/endpoints.md | 27 +++++++++------- website/docs/getting-started.md | 2 +- website/docs/intro.md | 5 +-- website/docs/video-editing.md | 51 +++++++++++++++++++----------- 8 files changed, 76 insertions(+), 45 deletions(-) diff --git a/components/LayoutStudio.tsx b/components/LayoutStudio.tsx index f608ddb..6379b0b 100644 --- a/components/LayoutStudio.tsx +++ b/components/LayoutStudio.tsx @@ -87,12 +87,16 @@ function watermarkOverlayStyle( position: WatermarkPosition, offsetX: number, offsetY: number, + sizedBox = false, ): CSSProperties { const base: CSSProperties = { position: "absolute", - maxWidth: "32%", + maxWidth: `${WATERMARK_WIDTH_FRACTION * 100}%`, pointerEvents: "none", zIndex: 5, + ...(sizedBox + ? { width: `${WATERMARK_WIDTH_FRACTION * 100}%` } + : null), }; const ox = `${offsetX}px`; const oy = `${offsetY}px`; @@ -347,8 +351,14 @@ export function LayoutStudio({ ); const wmOverlay = useMemo( - () => watermarkOverlayStyle(W.position, W.offsetX, W.offsetY), - [W.position, W.offsetX, W.offsetY], + () => + watermarkOverlayStyle( + W.position, + W.offsetX, + W.offsetY, + W.mode === "default" || W.mode === "logo", + ), + [W.position, W.offsetX, W.offsetY, W.mode], ); const textFontStyle = useMemo( @@ -569,16 +579,14 @@ export function LayoutStudio({ ) : W.mode === "logo" && logoPreviewUrl ? ( // eslint-disable-next-line @next/next/no-img-element ) : W.mode === "text" ? (