From e3f708e73fef8a40da8e21e2bc686604dd0bf9a9 Mon Sep 17 00:00:00 2001 From: Satyam Rastogi Date: Sat, 30 May 2026 02:27:09 +0530 Subject: [PATCH] feat(film): theme tokens, blueprint background, caption component --- .../src/components/BlueprintBg.tsx | 16 ++++++ .../product-film/src/components/Caption.tsx | 54 +++++++++++++++++++ marketing/product-film/src/theme.ts | 15 ++++++ 3 files changed, 85 insertions(+) create mode 100644 marketing/product-film/src/components/BlueprintBg.tsx create mode 100644 marketing/product-film/src/components/Caption.tsx create mode 100644 marketing/product-film/src/theme.ts diff --git a/marketing/product-film/src/components/BlueprintBg.tsx b/marketing/product-film/src/components/BlueprintBg.tsx new file mode 100644 index 0000000..03c0c5b --- /dev/null +++ b/marketing/product-film/src/components/BlueprintBg.tsx @@ -0,0 +1,16 @@ +import { AbsoluteFill } from "remotion"; +import { theme } from "../theme"; + +export const BlueprintBg: React.FC<{ opacity?: number }> = ({ opacity = 0.4 }) => { + const line = "rgba(59,130,246,0.10)"; + return ( + + ); +}; diff --git a/marketing/product-film/src/components/Caption.tsx b/marketing/product-film/src/components/Caption.tsx new file mode 100644 index 0000000..be336b2 --- /dev/null +++ b/marketing/product-film/src/components/Caption.tsx @@ -0,0 +1,54 @@ +import { useCurrentFrame, interpolate, AbsoluteFill } from "remotion"; +import { theme } from "../theme"; + +type Position = "bottom" | "center"; + +export const Caption: React.FC<{ + text: string; + startFrame: number; + durationInFrames: number; + position?: Position; +}> = ({ text, startFrame, durationInFrames, position = "bottom" }) => { + const frame = useCurrentFrame(); + const local = frame - startFrame; + if (local < 0 || local > durationInFrames) return null; + + const opacity = interpolate( + local, + [0, 12, durationInFrames - 12, durationInFrames], + [0, 1, 1, 0], + { extrapolateLeft: "clamp", extrapolateRight: "clamp" } + ); + const y = interpolate(local, [0, 12], [20, 0], { extrapolateRight: "clamp" }); + + return ( + +
+ {text} +
+
+ ); +}; diff --git a/marketing/product-film/src/theme.ts b/marketing/product-film/src/theme.ts new file mode 100644 index 0000000..8dde1d0 --- /dev/null +++ b/marketing/product-film/src/theme.ts @@ -0,0 +1,15 @@ +export const theme = { + bg: "#09090b", + surface: "rgba(255,255,255,0.03)", + border: "rgba(255,255,255,0.10)", + text: "#ffffff", + textDim: "rgba(255,255,255,0.55)", + blue: "#3b82f6", + cyan: "#22d3ee", + emerald: "#10b981", + amber: "#f59e0b", + red: "#ef4444", + font: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif', + mono: 'ui-monospace, SFMono-Regular, Menlo, monospace', + brandGradient: "linear-gradient(90deg, #60a5fa, #3b82f6, #22d3ee)", +} as const;