diff --git a/video-production/connect-videos/package-lock.json b/video-production/connect-videos/package-lock.json index dc659229..cd3a7a8a 100644 --- a/video-production/connect-videos/package-lock.json +++ b/video-production/connect-videos/package-lock.json @@ -12,7 +12,6 @@ "@remotion/bundler": "^4.0.0", "@remotion/captions": "^4.0.0", "@remotion/cli": "^4.0.0", - "@remotion/gif": "^4.0.460", "@remotion/google-fonts": "^4.0.460", "@remotion/renderer": "^4.0.0", "react": "^18.3.0", @@ -1417,19 +1416,6 @@ "win32" ] }, - "node_modules/@remotion/gif": { - "version": "4.0.460", - "resolved": "https://registry.npmjs.org/@remotion/gif/-/gif-4.0.460.tgz", - "integrity": "sha512-G8ryV1EhAvzMpIkPbkl/57gF+VbJ7B6LN+DbH7LHKcpPjEztVe4QRtbg6tpesPFMzZ3kjicGA6QicIdgzaVl7g==", - "license": "SEE LICENSE IN LICENSE.md", - "dependencies": { - "remotion": "4.0.460" - }, - "peerDependencies": { - "react": ">=16.8.0", - "react-dom": ">=16.8.0" - } - }, "node_modules/@remotion/google-fonts": { "version": "4.0.460", "resolved": "https://registry.npmjs.org/@remotion/google-fonts/-/google-fonts-4.0.460.tgz", diff --git a/video-production/connect-videos/package.json b/video-production/connect-videos/package.json index a4360754..93babdd2 100644 --- a/video-production/connect-videos/package.json +++ b/video-production/connect-videos/package.json @@ -24,7 +24,6 @@ "@remotion/bundler": "^4.0.0", "@remotion/captions": "^4.0.0", "@remotion/cli": "^4.0.0", - "@remotion/gif": "^4.0.460", "@remotion/google-fonts": "^4.0.460", "@remotion/renderer": "^4.0.0", "react": "^18.3.0", diff --git a/video-production/connect-videos/public/cycle/deliver.gif b/video-production/connect-videos/public/cycle/deliver.gif deleted file mode 100644 index 44a16f7c..00000000 Binary files a/video-production/connect-videos/public/cycle/deliver.gif and /dev/null differ diff --git a/video-production/connect-videos/public/cycle/learn.gif b/video-production/connect-videos/public/cycle/learn.gif deleted file mode 100644 index 4eb007c5..00000000 Binary files a/video-production/connect-videos/public/cycle/learn.gif and /dev/null differ diff --git a/video-production/connect-videos/public/cycle/pay.gif b/video-production/connect-videos/public/cycle/pay.gif deleted file mode 100644 index ffdd8677..00000000 Binary files a/video-production/connect-videos/public/cycle/pay.gif and /dev/null differ diff --git a/video-production/connect-videos/public/cycle/verify.gif b/video-production/connect-videos/public/cycle/verify.gif deleted file mode 100644 index 8774e167..00000000 Binary files a/video-production/connect-videos/public/cycle/verify.gif and /dev/null differ diff --git a/video-production/connect-videos/src/components/CycleStep.tsx b/video-production/connect-videos/src/components/CycleStep.tsx index 0b9ef394..20018ed9 100644 --- a/video-production/connect-videos/src/components/CycleStep.tsx +++ b/video-production/connect-videos/src/components/CycleStep.tsx @@ -1,5 +1,4 @@ -import { Gif } from "@remotion/gif"; -import { spring, staticFile, useCurrentFrame, useVideoConfig, interpolate } from "remotion"; +import { spring, useCurrentFrame, useVideoConfig, interpolate } from "remotion"; import { theme } from "../theme"; interface Props { @@ -9,18 +8,76 @@ interface Props { active?: boolean; } -// Each cycle step has a matching animated gif fetched from -// connect.dimagi.com's prelogin marketing surface (downloaded into -// public/cycle/). Using @remotion/gif means each frame of the gif is -// composited into the rendered mp4 (vs. which would freeze on -// frame 0). Falls back gracefully — if the gif fails to load (cache -// miss, broken file), Remotion renders nothing and the surrounding -// label/ring still indicate which step is highlighted. -const GIF_PATH: Record = { - Learn: "cycle/learn.gif", - Deliver: "cycle/deliver.gif", - Verify: "cycle/verify.gif", - Pay: "cycle/pay.gif", +// Each cycle step has a brand color and a matching glyph, lifted from +// the "click a step" graphic on connect.dimagi.com's prelogin homepage. +// Two visual states per step: +// +// active = filled circle in BRAND[label], glyph stroked in white +// passive = white-fill circle outlined in BRAND[label], glyph stroked +// in BRAND[label] +// +// SVG path data is inlined (not loaded from public/) so the renderer +// has zero asset-loading risk for this template element. Bake-once, +// render-everywhere. +const BRAND: Record = { + Learn: "#16006D", + Deliver: "#5D70D2", + Verify: "#FC5F36", + Pay: "#1B998B", +}; + +// Inline icon glyphs centered on (0,0), drawn with stroke=currentColor. +// Sized to fit comfortably inside a 144px-diameter circle. +const Glyph: React.FC<{ label: Props["label"] }> = ({ label }) => { + const stroke = { stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" } as const; + switch (label) { + case "Learn": + // A laptop/screen with three text-lines and two stand legs — + // mirrors the homepage "Learn" glyph. + return ( + + + + + + + + + ); + case "Deliver": + // Heart with a small + (cross) inside — the "care" mark. + return ( + + + + + + ); + case "Verify": + // Shield with checkmark — the verification mark. + return ( + + + + + ); + case "Pay": + // Dollar sign — drawn as a glyph so it inherits currentColor. + return ( + + $ + + ); + } }; export const CycleStep: React.FC = ({ label, index, active = false }) => { @@ -38,7 +95,9 @@ export const CycleStep: React.FC = ({ label, index, active = false }) => to: active ? 1 : 0, }); const scale = interpolate(focus, [0, 1], [0.88, 1.06]); - const dim = interpolate(focus, [0, 1], [0.35, 1]); + const dim = interpolate(focus, [0, 1], [0.55, 1]); + + const brand = BRAND[label]; return (
= ({ label, index, active = false }) => display: "flex", flexDirection: "column", alignItems: "center", - gap: 12, + gap: 14, opacity: enter * dim, transform: `translateY(${(1 - enter) * 20}px) scale(${scale})`, transition: "none", @@ -54,33 +113,30 @@ export const CycleStep: React.FC = ({ label, index, active = false }) => color: theme.colors.foreground, }} > -
- -
+ +