makaron-cli 0.17.0 → 0.18.0
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/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +5 -4
- package/README.md +47 -1
- package/bin/makaron.mjs +22 -8
- package/craft/manifest.json +2877 -0
- package/craft/prompts/agent-coding.md +220 -0
- package/craft/prompts/agent.md +86 -0
- package/craft/prompts/animate.md +448 -0
- package/craft/prompts/audio.md +261 -0
- package/craft/prompts/captions.md +220 -0
- package/craft/prompts/coding-submission.md +31 -0
- package/craft/prompts/coding-workflow.md +26 -0
- package/craft/prompts/creative.md +108 -0
- package/craft/prompts/cutout.md +81 -0
- package/craft/prompts/enhance.md +123 -0
- package/craft/prompts/generate_image_tool.md +26 -0
- package/craft/prompts/image.md +222 -0
- package/craft/prompts/legacy/agent.md +123 -0
- package/craft/prompts/legacy/coding-tool.md +31 -0
- package/craft/prompts/legacy/video-tool.md +38 -0
- package/craft/prompts/legacy/workspace-authoring.md +13 -0
- package/craft/prompts/niji.md +117 -0
- package/craft/prompts/pony_translate.md +42 -0
- package/craft/prompts/remotion-composition.md +405 -0
- package/craft/prompts/video-reverse.md +170 -0
- package/craft/prompts/video-submission.md +44 -0
- package/craft/prompts/video-workflow.md +42 -0
- package/craft/prompts/wai_translate.md +28 -0
- package/craft/prompts/web-search.md +1 -0
- package/craft/prompts/wild.md +119 -0
- package/craft/prompts/workspace-authoring.md +13 -0
- package/craft/skills/SKILL_README.md +249 -0
- package/craft/skills/_shared/aesthetic-lens-contract.md +68 -0
- package/craft/skills/_shared/native-audiovisual.md +44 -0
- package/craft/skills/_shared/remotion-director-contract.md +133 -0
- package/craft/skills/_shared/remotion-video-director/README.md +140 -0
- package/craft/skills/_shared/remotion-video-director/SKILL.md +391 -0
- package/craft/skills/_shared/remotion-video-director/references/component-library.md +608 -0
- package/craft/skills/_shared/remotion-video-director/references/expert-definitions.md +214 -0
- package/craft/skills/_shared/remotion-video-director/references/music-and-audio.md +186 -0
- package/craft/skills/_shared/remotion-video-director/references/remotion-patterns.md +439 -0
- package/craft/skills/_shared/remotion-video-director/references/video-archetypes.md +395 -0
- package/craft/skills/_shared/speech-clock.md +63 -0
- package/craft/skills/_shared/spoken-caption.md +75 -0
- package/craft/skills/_shared/studio-production/audio-direction.md +60 -0
- package/craft/skills/_shared/studio-production/production-contract.md +188 -0
- package/craft/skills/_shared/studio-production/reference-analysis.md +37 -0
- package/craft/skills/_shared/studio-production/review-contract.md +77 -0
- package/craft/skills/_shared/studio-production/taste-direction.md +114 -0
- package/craft/skills/_shared/visual-asset-bridge/SKILL.md +57 -0
- package/craft/skills/_shared/visual-direction/SKILL.md +98 -0
- package/craft/skills/_shared/voice-translation.md +55 -0
- package/craft/skills/aesthetic-disney-character-motion/SKILL.md +66 -0
- package/craft/skills/aesthetic-lottiefiles-motion/SKILL.md +78 -0
- package/craft/skills/aesthetic-rampstack-direction/SKILL.md +68 -0
- package/craft/skills/ai-video-gen/SKILL.md +48 -0
- package/craft/skills/animated-explainer/SKILL.md +53 -0
- package/craft/skills/animation/SKILL.md +53 -0
- package/craft/skills/avatar-spokesperson/SKILL.md +66 -0
- package/craft/skills/canvas-procedural-animation/SKILL.md +48 -0
- package/craft/skills/character-animation/SKILL.md +57 -0
- package/craft/skills/character-animation-qa/SKILL.md +48 -0
- package/craft/skills/character-rigging/SKILL.md +48 -0
- package/craft/skills/cinematic/SKILL.md +53 -0
- package/craft/skills/cinematic-video/SKILL.md +65 -0
- package/craft/skills/clip-factory/SKILL.md +53 -0
- package/craft/skills/comfyui/SKILL.md +48 -0
- package/craft/skills/content-repurpose/SKILL.md +54 -0
- package/craft/skills/create-video/SKILL.md +48 -0
- package/craft/skills/documentary-montage/SKILL.md +53 -0
- package/craft/skills/doubao-tts/SKILL.md +51 -0
- package/craft/skills/explainer-aesthetic-disney/SKILL.md +33 -0
- package/craft/skills/explainer-aesthetic-lottiefiles/SKILL.md +33 -0
- package/craft/skills/explainer-aesthetic-rampstack/SKILL.md +33 -0
- package/craft/skills/explainer-video/SKILL.md +423 -0
- package/craft/skills/ffmpeg/SKILL.md +48 -0
- package/craft/skills/grok-media/SKILL.md +47 -0
- package/craft/skills/hybrid/SKILL.md +53 -0
- package/craft/skills/localization-dub/SKILL.md +59 -0
- package/craft/skills/long-video-anchor/SKILL.md +111 -0
- package/craft/skills/long-video-director/SKILL.md +217 -0
- package/craft/skills/long-video-storyboard/SKILL.md +102 -0
- package/craft/skills/makaron-mascot/SKILL.md +83 -0
- package/craft/skills/makaron-mascot/assets/character-sheet.jpg +0 -0
- package/craft/skills/makaron-mascot/assets/makaron-spark-pixel-wizard-concepts.png +0 -0
- package/craft/skills/media-use/SKILL.md +47 -0
- package/craft/skills/motion-design-video/SKILL.md +64 -0
- package/craft/skills/motion-graphics/SKILL.md +48 -0
- package/craft/skills/multi-angle-video/SKILL.md +533 -0
- package/craft/skills/music/SKILL.md +47 -0
- package/craft/skills/music-to-video/SKILL.md +60 -0
- package/craft/skills/photo-to-video/SKILL.md +60 -0
- package/craft/skills/podcast-repurpose/SKILL.md +53 -0
- package/craft/skills/pose-library-design/SKILL.md +48 -0
- package/craft/skills/reference-video-studio/SKILL.md +55 -0
- package/craft/skills/remotion/SKILL.md +48 -0
- package/craft/skills/remotion-best-practices/SKILL.md +48 -0
- package/craft/skills/screen-demo/SKILL.md +61 -0
- package/craft/skills/seedance-2-0/SKILL.md +48 -0
- package/craft/skills/seedance-2-5/SKILL.md +48 -0
- package/craft/skills/sound-effects/SKILL.md +47 -0
- package/craft/skills/source-video-studio/SKILL.md +68 -0
- package/craft/skills/speech-to-text/SKILL.md +47 -0
- package/craft/skills/sticker-maker/SKILL.md +178 -0
- package/craft/skills/svg-character-animation/SKILL.md +48 -0
- package/craft/skills/synthetic-screen-recording/SKILL.md +48 -0
- package/craft/skills/talking-head/SKILL.md +106 -0
- package/craft/skills/text-to-speech/SKILL.md +50 -0
- package/craft/skills/threejs-animation/SKILL.md +48 -0
- package/craft/skills/threejs-fundamentals/SKILL.md +48 -0
- package/craft/skills/threejs-geometry/SKILL.md +48 -0
- package/craft/skills/threejs-lighting/SKILL.md +48 -0
- package/craft/skills/threejs-materials/SKILL.md +48 -0
- package/craft/skills/threejs-shaders/SKILL.md +48 -0
- package/craft/skills/threejs-textures/SKILL.md +48 -0
- package/craft/skills/tiktok-video/SKILL.md +188 -0
- package/craft/skills/tiktok-video/references/audio-sync.md +58 -0
- package/craft/skills/tiktok-video/references/caption-direction.md +36 -0
- package/craft/skills/tiktok-video/references/delivery-qa.md +84 -0
- package/craft/skills/tiktok-video/references/platform-layout.md +62 -0
- package/craft/skills/video-edit/SKILL.md +144 -0
- package/craft/skills/video-edit/references/direct-reference-route.md +141 -0
- package/craft/skills/video-edit/references/editing-protocol.md +79 -0
- package/craft/skills/video-edit/references/frame-location.md +85 -0
- package/craft/skills/video-edit/references/replication-protocol.md +67 -0
- package/craft/skills/video-edit/references/shot-blueprint.md +116 -0
- package/craft/skills/video-edit/references/shot-blueprint.schema.json +143 -0
- package/craft/skills/video-edit/references/similarity-qa.md +47 -0
- package/craft/skills/video-edit/scripts/extract-shot-blueprint.mjs +313 -0
- package/craft/skills/video-ffmpeg-lab/SKILL.md +220 -0
- package/craft/skills/video-mature-themes/SKILL.md +175 -0
- package/craft/skills/video-segment-edit/SKILL.md +16 -0
- package/craft/skills/video-translate/SKILL.md +148 -0
- package/craft/skills/video-understand/SKILL.md +48 -0
- package/craft/skills/visual-style/SKILL.md +47 -0
- package/craft/skills/wan-3-0/SKILL.md +59 -0
- package/craft/skills/web-design-guidelines/SKILL.md +47 -0
- package/craft/skills/website-to-video/SKILL.md +61 -0
- package/craft-source.json +7 -0
- package/package.json +12 -5
- package/runtime/adapter.mjs +615 -0
- package/runtime/configure.mjs +28 -0
- package/runtime/tool-catalog.json +807 -0
- package/runtime/tool-cli.mjs +98 -0
- package/skills/makaron/SKILL.md +12 -0
- package/skills/makaron-native/SKILL.md +89 -0
|
@@ -0,0 +1,608 @@
|
|
|
1
|
+
# Reusable Component Library
|
|
2
|
+
|
|
3
|
+
Production-tested components extracted from real Remotion projects. Copy these directly into new projects.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Core Components
|
|
8
|
+
|
|
9
|
+
### FadeIn
|
|
10
|
+
|
|
11
|
+
Spring-animated fade with directional slide. The workhorse of entry animations.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import React from "react";
|
|
15
|
+
import { useCurrentFrame, useVideoConfig, interpolate, spring } from "remotion";
|
|
16
|
+
|
|
17
|
+
const GENTLE = { damping: 20, mass: 1, stiffness: 100 };
|
|
18
|
+
|
|
19
|
+
interface FadeInProps {
|
|
20
|
+
delay?: number;
|
|
21
|
+
direction?: "up" | "down" | "left" | "right";
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const FadeIn: React.FC<FadeInProps> = ({
|
|
27
|
+
delay = 0, direction = "up", children, style,
|
|
28
|
+
}) => {
|
|
29
|
+
const frame = useCurrentFrame();
|
|
30
|
+
const { fps } = useVideoConfig();
|
|
31
|
+
const progress = spring({ frame: frame - delay, fps, config: GENTLE });
|
|
32
|
+
const opacity = interpolate(frame - delay, [0, 30], [0, 1], {
|
|
33
|
+
extrapolateLeft: "clamp", extrapolateRight: "clamp",
|
|
34
|
+
});
|
|
35
|
+
const offset = 40;
|
|
36
|
+
const map = {
|
|
37
|
+
up: { x: 0, y: offset * (1 - progress) },
|
|
38
|
+
down: { x: 0, y: -offset * (1 - progress) },
|
|
39
|
+
left: { x: offset * (1 - progress), y: 0 },
|
|
40
|
+
right: { x: -offset * (1 - progress), y: 0 },
|
|
41
|
+
};
|
|
42
|
+
const { x, y } = map[direction];
|
|
43
|
+
return (
|
|
44
|
+
<div style={{ opacity, transform: `translate(${x}px, ${y}px)`, ...style }}>
|
|
45
|
+
{children}
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### TypingText
|
|
52
|
+
|
|
53
|
+
Character-by-character typewriter with blinking cursor.
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
import React from "react";
|
|
57
|
+
import { useCurrentFrame } from "remotion";
|
|
58
|
+
|
|
59
|
+
interface TypingTextProps {
|
|
60
|
+
text: string;
|
|
61
|
+
startFrame?: number;
|
|
62
|
+
speed?: number; // chars per frame (default 1.5)
|
|
63
|
+
fontSize?: number;
|
|
64
|
+
fontFamily?: string;
|
|
65
|
+
color?: string;
|
|
66
|
+
cursorColor?: string;
|
|
67
|
+
showCursor?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const TypingText: React.FC<TypingTextProps> = ({
|
|
71
|
+
text, startFrame = 0, speed = 1.5, fontSize = 28,
|
|
72
|
+
fontFamily = "monospace", color = "#F0F0F0",
|
|
73
|
+
cursorColor = "#4AB0A0", showCursor = true,
|
|
74
|
+
}) => {
|
|
75
|
+
const frame = useCurrentFrame();
|
|
76
|
+
const elapsed = Math.max(0, frame - startFrame);
|
|
77
|
+
const charsToShow = Math.min(Math.floor(elapsed * speed), text.length);
|
|
78
|
+
const visibleText = text.slice(0, charsToShow);
|
|
79
|
+
const isComplete = charsToShow >= text.length;
|
|
80
|
+
const cursorOpacity = isComplete ? (frame % 30 < 15 ? 1 : 0) : 1;
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<div style={{ fontFamily, fontSize, color, lineHeight: 1.5, whiteSpace: "pre-wrap" }}>
|
|
84
|
+
{visibleText}
|
|
85
|
+
{showCursor && (
|
|
86
|
+
<span style={{ opacity: cursorOpacity, color: cursorColor, fontWeight: "bold" }}>|</span>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### CodeBlock
|
|
94
|
+
|
|
95
|
+
Terminal-style code display with line-by-line reveal and macOS dots.
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
import React from "react";
|
|
99
|
+
import { useCurrentFrame, interpolate } from "remotion";
|
|
100
|
+
|
|
101
|
+
interface CodeBlockProps {
|
|
102
|
+
lines: string[];
|
|
103
|
+
startFrame?: number;
|
|
104
|
+
lineDelay?: number; // frames between each line (default 8)
|
|
105
|
+
fontSize?: number;
|
|
106
|
+
width?: number | string;
|
|
107
|
+
bgColor?: string;
|
|
108
|
+
textColor?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const CodeBlock: React.FC<CodeBlockProps> = ({
|
|
112
|
+
lines, startFrame = 0, lineDelay = 8, fontSize = 20,
|
|
113
|
+
width = "auto", bgColor = "#2B2B3B", textColor = "#E0E0E8",
|
|
114
|
+
}) => {
|
|
115
|
+
const frame = useCurrentFrame();
|
|
116
|
+
const elapsed = Math.max(0, frame - startFrame);
|
|
117
|
+
const clamp = { extrapolateLeft: "clamp" as const, extrapolateRight: "clamp" as const };
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<div style={{ backgroundColor: bgColor, borderRadius: 12, padding: "24px 32px", width, overflow: "hidden" }}>
|
|
121
|
+
<div style={{ display: "flex", gap: 8, marginBottom: 16 }}>
|
|
122
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#FF5F56" }} />
|
|
123
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#FFBD2E" }} />
|
|
124
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#27C93F" }} />
|
|
125
|
+
</div>
|
|
126
|
+
{lines.map((line, i) => {
|
|
127
|
+
const lineStart = i * lineDelay;
|
|
128
|
+
const opacity = interpolate(elapsed - lineStart, [0, 10], [0, 1], clamp);
|
|
129
|
+
return (
|
|
130
|
+
<div key={i} style={{
|
|
131
|
+
fontFamily: "monospace", fontSize, color: textColor,
|
|
132
|
+
lineHeight: 1.6, opacity, whiteSpace: "pre",
|
|
133
|
+
}}>
|
|
134
|
+
{line}
|
|
135
|
+
</div>
|
|
136
|
+
);
|
|
137
|
+
})}
|
|
138
|
+
</div>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### CrossDissolve
|
|
144
|
+
|
|
145
|
+
Scene-level fade envelope for smooth transitions.
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import React from "react";
|
|
149
|
+
import { useCurrentFrame, useVideoConfig, interpolate, AbsoluteFill } from "remotion";
|
|
150
|
+
|
|
151
|
+
interface CrossDissolveProps {
|
|
152
|
+
children: React.ReactNode;
|
|
153
|
+
envelopeFrames?: number; // default 8
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export const CrossDissolve: React.FC<CrossDissolveProps> = ({
|
|
157
|
+
children, envelopeFrames = 8,
|
|
158
|
+
}) => {
|
|
159
|
+
const frame = useCurrentFrame();
|
|
160
|
+
const { durationInFrames } = useVideoConfig();
|
|
161
|
+
const opacity = interpolate(
|
|
162
|
+
frame,
|
|
163
|
+
[0, envelopeFrames, durationInFrames - envelopeFrames, durationInFrames],
|
|
164
|
+
[0, 1, 1, 0],
|
|
165
|
+
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" }
|
|
166
|
+
);
|
|
167
|
+
return <AbsoluteFill style={{ opacity }}>{children}</AbsoluteFill>;
|
|
168
|
+
};
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Display Components
|
|
174
|
+
|
|
175
|
+
### TerminalWindow
|
|
176
|
+
|
|
177
|
+
Chrome-style terminal frame with title bar.
|
|
178
|
+
|
|
179
|
+
```tsx
|
|
180
|
+
import React from "react";
|
|
181
|
+
|
|
182
|
+
interface TerminalWindowProps {
|
|
183
|
+
title?: string;
|
|
184
|
+
children: React.ReactNode;
|
|
185
|
+
width?: number | string;
|
|
186
|
+
bgColor?: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export const TerminalWindow: React.FC<TerminalWindowProps> = ({
|
|
190
|
+
title = "Terminal", children, width = "100%", bgColor = "#0D1117",
|
|
191
|
+
}) => {
|
|
192
|
+
return (
|
|
193
|
+
<div style={{
|
|
194
|
+
width, borderRadius: 12, overflow: "hidden",
|
|
195
|
+
border: "1px solid #30363D", backgroundColor: bgColor,
|
|
196
|
+
}}>
|
|
197
|
+
<div style={{
|
|
198
|
+
display: "flex", alignItems: "center", padding: "10px 16px",
|
|
199
|
+
backgroundColor: "#161B22", borderBottom: "1px solid #30363D",
|
|
200
|
+
}}>
|
|
201
|
+
<div style={{ display: "flex", gap: 8 }}>
|
|
202
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#FF5F56" }} />
|
|
203
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#FFBD2E" }} />
|
|
204
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#27C93F" }} />
|
|
205
|
+
</div>
|
|
206
|
+
<div style={{
|
|
207
|
+
flex: 1, textAlign: "center", fontFamily: "monospace",
|
|
208
|
+
fontSize: 13, color: "#8B949E",
|
|
209
|
+
}}>
|
|
210
|
+
{title}
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
<div style={{ padding: "20px 24px" }}>
|
|
214
|
+
{children}
|
|
215
|
+
</div>
|
|
216
|
+
</div>
|
|
217
|
+
);
|
|
218
|
+
};
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### BrowserMockup
|
|
222
|
+
|
|
223
|
+
Browser chrome with URL bar for product demos.
|
|
224
|
+
|
|
225
|
+
```tsx
|
|
226
|
+
import React from "react";
|
|
227
|
+
|
|
228
|
+
interface BrowserMockupProps {
|
|
229
|
+
url?: string;
|
|
230
|
+
children: React.ReactNode;
|
|
231
|
+
width?: number | string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export const BrowserMockup: React.FC<BrowserMockupProps> = ({
|
|
235
|
+
url = "https://example.com", children, width = "100%",
|
|
236
|
+
}) => {
|
|
237
|
+
return (
|
|
238
|
+
<div style={{
|
|
239
|
+
width, borderRadius: 12, overflow: "hidden",
|
|
240
|
+
border: "1px solid #30363D", backgroundColor: "#FFFFFF",
|
|
241
|
+
boxShadow: "0 8px 32px rgba(0,0,0,0.3)",
|
|
242
|
+
}}>
|
|
243
|
+
<div style={{
|
|
244
|
+
display: "flex", alignItems: "center", padding: "8px 16px",
|
|
245
|
+
backgroundColor: "#F6F8FA", borderBottom: "1px solid #D1D5DB", gap: 12,
|
|
246
|
+
}}>
|
|
247
|
+
<div style={{ display: "flex", gap: 6 }}>
|
|
248
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#FF5F56" }} />
|
|
249
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#FFBD2E" }} />
|
|
250
|
+
<div style={{ width: 12, height: 12, borderRadius: "50%", backgroundColor: "#27C93F" }} />
|
|
251
|
+
</div>
|
|
252
|
+
<div style={{
|
|
253
|
+
flex: 1, backgroundColor: "#FFFFFF", borderRadius: 6,
|
|
254
|
+
padding: "4px 12px", fontSize: 13, color: "#6B7280",
|
|
255
|
+
fontFamily: "monospace", border: "1px solid #E5E7EB",
|
|
256
|
+
}}>
|
|
257
|
+
{url}
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
<div style={{ position: "relative" }}>
|
|
261
|
+
{children}
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
);
|
|
265
|
+
};
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### PersonaCard
|
|
269
|
+
|
|
270
|
+
Persona presentation card with spring animation and color-coded border.
|
|
271
|
+
|
|
272
|
+
```tsx
|
|
273
|
+
import React from "react";
|
|
274
|
+
import { useCurrentFrame, useVideoConfig, spring, interpolate } from "remotion";
|
|
275
|
+
|
|
276
|
+
const BOUNCE = { damping: 12, mass: 0.5, stiffness: 200 };
|
|
277
|
+
const clamp = { extrapolateLeft: "clamp" as const, extrapolateRight: "clamp" as const };
|
|
278
|
+
|
|
279
|
+
interface PersonaCardProps {
|
|
280
|
+
title: string;
|
|
281
|
+
description: string;
|
|
282
|
+
quote?: string;
|
|
283
|
+
change?: string;
|
|
284
|
+
color: string;
|
|
285
|
+
delay: number;
|
|
286
|
+
bgColor?: string;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export const PersonaCard: React.FC<PersonaCardProps> = ({
|
|
290
|
+
title, description, quote, change, color, delay, bgColor = "#0F3460",
|
|
291
|
+
}) => {
|
|
292
|
+
const frame = useCurrentFrame();
|
|
293
|
+
const { fps } = useVideoConfig();
|
|
294
|
+
const scale = spring({ frame: frame - delay, fps, config: BOUNCE });
|
|
295
|
+
const descOpacity = interpolate(frame - delay, [15, 30], [0, 1], clamp);
|
|
296
|
+
const quoteOpacity = interpolate(frame - delay, [25, 40], [0, 1], clamp);
|
|
297
|
+
const changeOpacity = interpolate(frame - delay, [35, 50], [0, 1], clamp);
|
|
298
|
+
|
|
299
|
+
return (
|
|
300
|
+
<div style={{
|
|
301
|
+
flex: 1, backgroundColor: bgColor, borderRadius: 16,
|
|
302
|
+
padding: "28px 24px", borderLeft: `4px solid ${color}`,
|
|
303
|
+
transform: `scale(${scale})`, transformOrigin: "top center",
|
|
304
|
+
display: "flex", flexDirection: "column", gap: 12,
|
|
305
|
+
}}>
|
|
306
|
+
<div style={{ fontSize: 24, fontWeight: 700, color }}>{title}</div>
|
|
307
|
+
<div style={{ fontSize: 18, color: "#A0A0B0", lineHeight: 1.4, opacity: descOpacity }}>
|
|
308
|
+
{description}
|
|
309
|
+
</div>
|
|
310
|
+
{quote && (
|
|
311
|
+
<div style={{
|
|
312
|
+
fontSize: 16, color: "#F0F0F0", fontStyle: "italic",
|
|
313
|
+
lineHeight: 1.4, opacity: quoteOpacity, marginTop: 8,
|
|
314
|
+
borderLeft: `2px solid ${color}40`, paddingLeft: 12,
|
|
315
|
+
}}>
|
|
316
|
+
"{quote}"
|
|
317
|
+
</div>
|
|
318
|
+
)}
|
|
319
|
+
{change && (
|
|
320
|
+
<div style={{
|
|
321
|
+
fontSize: 16, color, fontWeight: 600,
|
|
322
|
+
opacity: changeOpacity, marginTop: "auto",
|
|
323
|
+
}}>
|
|
324
|
+
{"\u2192"} {change}
|
|
325
|
+
</div>
|
|
326
|
+
)}
|
|
327
|
+
</div>
|
|
328
|
+
);
|
|
329
|
+
};
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### ChatBubble
|
|
333
|
+
|
|
334
|
+
Telegram/Slack-style chat message with avatar.
|
|
335
|
+
|
|
336
|
+
```tsx
|
|
337
|
+
import React from "react";
|
|
338
|
+
import { useCurrentFrame, interpolate, Img, staticFile } from "remotion";
|
|
339
|
+
|
|
340
|
+
const clamp = { extrapolateLeft: "clamp" as const, extrapolateRight: "clamp" as const };
|
|
341
|
+
|
|
342
|
+
interface ChatBubbleProps {
|
|
343
|
+
name: string;
|
|
344
|
+
text: string;
|
|
345
|
+
color: string;
|
|
346
|
+
delay: number;
|
|
347
|
+
isRight?: boolean;
|
|
348
|
+
avatar?: string; // Filename in public/ folder
|
|
349
|
+
bgColor?: string;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export const ChatBubble: React.FC<ChatBubbleProps> = ({
|
|
353
|
+
name, text, color, delay, isRight, avatar, bgColor = "#0F3460",
|
|
354
|
+
}) => {
|
|
355
|
+
const frame = useCurrentFrame();
|
|
356
|
+
const opacity = interpolate(frame - delay, [0, 12], [0, 1], clamp);
|
|
357
|
+
const translateY = interpolate(frame - delay, [0, 12], [20, 0], clamp);
|
|
358
|
+
|
|
359
|
+
const avatarEl = avatar ? (
|
|
360
|
+
<div style={{
|
|
361
|
+
flexShrink: 0, width: 44, height: 44, borderRadius: "50%",
|
|
362
|
+
overflow: "hidden", border: `2px solid ${color}`,
|
|
363
|
+
}}>
|
|
364
|
+
<Img src={staticFile(avatar)} style={{ width: "100%", height: "100%", objectFit: "cover" }} />
|
|
365
|
+
</div>
|
|
366
|
+
) : null;
|
|
367
|
+
|
|
368
|
+
return (
|
|
369
|
+
<div style={{
|
|
370
|
+
opacity, transform: `translateY(${translateY}px)`,
|
|
371
|
+
display: "flex", alignItems: "flex-start", gap: 10,
|
|
372
|
+
maxWidth: "80%", alignSelf: isRight ? "flex-end" : "flex-start",
|
|
373
|
+
}}>
|
|
374
|
+
{!isRight && avatarEl}
|
|
375
|
+
<div style={{ display: "flex", flexDirection: "column", alignItems: isRight ? "flex-end" : "flex-start" }}>
|
|
376
|
+
<div style={{ fontSize: 16, color, fontWeight: 700, marginBottom: 4 }}>{name}</div>
|
|
377
|
+
<div style={{
|
|
378
|
+
backgroundColor: bgColor, padding: "12px 18px",
|
|
379
|
+
borderRadius: isRight ? "16px 16px 4px 16px" : "16px 16px 16px 4px",
|
|
380
|
+
borderLeft: isRight ? "none" : `3px solid ${color}`,
|
|
381
|
+
borderRight: isRight ? `3px solid ${color}` : "none",
|
|
382
|
+
}}>
|
|
383
|
+
<div style={{ fontSize: 20, color: "#F0F0F0", lineHeight: 1.4 }}>{text}</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
{isRight && avatarEl}
|
|
387
|
+
</div>
|
|
388
|
+
);
|
|
389
|
+
};
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### FileTree
|
|
393
|
+
|
|
394
|
+
Animated recursive folder structure.
|
|
395
|
+
|
|
396
|
+
```tsx
|
|
397
|
+
import React from "react";
|
|
398
|
+
import { useCurrentFrame, interpolate } from "remotion";
|
|
399
|
+
|
|
400
|
+
const clamp = { extrapolateLeft: "clamp" as const, extrapolateRight: "clamp" as const };
|
|
401
|
+
|
|
402
|
+
export interface TreeNode {
|
|
403
|
+
name: string;
|
|
404
|
+
type: "folder" | "file";
|
|
405
|
+
children?: TreeNode[];
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function countNodes(node: TreeNode): number {
|
|
409
|
+
let count = 1;
|
|
410
|
+
if (node.children) {
|
|
411
|
+
for (const child of node.children) count += countNodes(child);
|
|
412
|
+
}
|
|
413
|
+
return count;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
const TreeItem: React.FC<{
|
|
417
|
+
node: TreeNode; depth: number; index: number;
|
|
418
|
+
startFrame: number; expandDelay: number;
|
|
419
|
+
folderColor?: string; fileColor?: string;
|
|
420
|
+
}> = ({ node, depth, index, startFrame, expandDelay, folderColor = "#4AB0A0", fileColor = "#A0A0B0" }) => {
|
|
421
|
+
const frame = useCurrentFrame();
|
|
422
|
+
const itemStart = startFrame + index * expandDelay;
|
|
423
|
+
const opacity = interpolate(frame - itemStart, [0, 12], [0, 1], clamp);
|
|
424
|
+
const translateX = interpolate(frame - itemStart, [0, 12], [20, 0], clamp);
|
|
425
|
+
|
|
426
|
+
let childIndex = index + 1;
|
|
427
|
+
return (
|
|
428
|
+
<div style={{ opacity, transform: `translateX(${translateX}px)` }}>
|
|
429
|
+
<div style={{
|
|
430
|
+
paddingLeft: depth * 24, fontFamily: "monospace", fontSize: 20,
|
|
431
|
+
color: node.type === "folder" ? folderColor : fileColor, lineHeight: 2,
|
|
432
|
+
}}>
|
|
433
|
+
{node.type === "folder" ? "\uD83D\uDCC1" : "\uD83D\uDCC4"} {node.name}
|
|
434
|
+
</div>
|
|
435
|
+
{node.children?.map((child) => {
|
|
436
|
+
const el = (
|
|
437
|
+
<TreeItem key={child.name} node={child} depth={depth + 1} index={childIndex}
|
|
438
|
+
startFrame={startFrame} expandDelay={expandDelay}
|
|
439
|
+
folderColor={folderColor} fileColor={fileColor} />
|
|
440
|
+
);
|
|
441
|
+
childIndex += countNodes(child);
|
|
442
|
+
return el;
|
|
443
|
+
})}
|
|
444
|
+
</div>
|
|
445
|
+
);
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
interface FileTreeProps {
|
|
449
|
+
tree: TreeNode;
|
|
450
|
+
startFrame?: number;
|
|
451
|
+
expandDelay?: number;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export const FileTree: React.FC<FileTreeProps> = ({ tree, startFrame = 0, expandDelay = 8 }) => {
|
|
455
|
+
return (
|
|
456
|
+
<div style={{ padding: 16 }}>
|
|
457
|
+
<TreeItem node={tree} depth={0} index={0} startFrame={startFrame} expandDelay={expandDelay} />
|
|
458
|
+
</div>
|
|
459
|
+
);
|
|
460
|
+
};
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### GradientText
|
|
464
|
+
|
|
465
|
+
Text with gradient fill for premium/keynote feel.
|
|
466
|
+
|
|
467
|
+
```tsx
|
|
468
|
+
import React from "react";
|
|
469
|
+
|
|
470
|
+
interface GradientTextProps {
|
|
471
|
+
text: string;
|
|
472
|
+
fontSize?: number;
|
|
473
|
+
fontFamily?: string;
|
|
474
|
+
fontWeight?: number;
|
|
475
|
+
from?: string;
|
|
476
|
+
to?: string;
|
|
477
|
+
direction?: string;
|
|
478
|
+
style?: React.CSSProperties;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
export const GradientText: React.FC<GradientTextProps> = ({
|
|
482
|
+
text, fontSize = 72, fontFamily = "Impact, 'Arial Black', sans-serif",
|
|
483
|
+
fontWeight = 900, from = "#00D4FF", to = "#A78BFA",
|
|
484
|
+
direction = "90deg", style,
|
|
485
|
+
}) => {
|
|
486
|
+
return (
|
|
487
|
+
<div style={{
|
|
488
|
+
fontSize, fontFamily, fontWeight, lineHeight: 1.1,
|
|
489
|
+
background: `linear-gradient(${direction}, ${from}, ${to})`,
|
|
490
|
+
WebkitBackgroundClip: "text",
|
|
491
|
+
WebkitTextFillColor: "transparent",
|
|
492
|
+
backgroundClip: "text",
|
|
493
|
+
...style,
|
|
494
|
+
}}>
|
|
495
|
+
{text}
|
|
496
|
+
</div>
|
|
497
|
+
);
|
|
498
|
+
};
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### KenBurnsImage
|
|
502
|
+
|
|
503
|
+
Slow zoom on background images for warmth and cinematic feel.
|
|
504
|
+
|
|
505
|
+
```tsx
|
|
506
|
+
import React from "react";
|
|
507
|
+
import { useCurrentFrame, useVideoConfig, interpolate, Img, staticFile } from "remotion";
|
|
508
|
+
|
|
509
|
+
interface KenBurnsImageProps {
|
|
510
|
+
src: string; // Filename in public/ folder
|
|
511
|
+
zoomStart?: number; // Starting scale (default 1.0)
|
|
512
|
+
zoomEnd?: number; // Ending scale (default 1.15)
|
|
513
|
+
direction?: "in" | "out";
|
|
514
|
+
style?: React.CSSProperties;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export const KenBurnsImage: React.FC<KenBurnsImageProps> = ({
|
|
518
|
+
src, zoomStart = 1.0, zoomEnd = 1.15, direction = "in", style,
|
|
519
|
+
}) => {
|
|
520
|
+
const frame = useCurrentFrame();
|
|
521
|
+
const { durationInFrames } = useVideoConfig();
|
|
522
|
+
const [from, to] = direction === "in" ? [zoomStart, zoomEnd] : [zoomEnd, zoomStart];
|
|
523
|
+
const scale = interpolate(frame, [0, durationInFrames], [from, to], {
|
|
524
|
+
extrapolateLeft: "clamp", extrapolateRight: "clamp",
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
return (
|
|
528
|
+
<div style={{
|
|
529
|
+
width: "100%", height: "100%", overflow: "hidden",
|
|
530
|
+
position: "absolute", top: 0, left: 0, ...style,
|
|
531
|
+
}}>
|
|
532
|
+
<Img
|
|
533
|
+
src={staticFile(src)}
|
|
534
|
+
style={{
|
|
535
|
+
width: "100%", height: "100%", objectFit: "cover",
|
|
536
|
+
transform: `scale(${scale})`,
|
|
537
|
+
}}
|
|
538
|
+
/>
|
|
539
|
+
</div>
|
|
540
|
+
);
|
|
541
|
+
};
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
## Theme Templates
|
|
547
|
+
|
|
548
|
+
### Dark Theme (Tech / Engineering)
|
|
549
|
+
|
|
550
|
+
```typescript
|
|
551
|
+
export const COLORS = {
|
|
552
|
+
bg: "#1A1A2E",
|
|
553
|
+
bgLight: "#16213E",
|
|
554
|
+
bgPanel: "#0F3460",
|
|
555
|
+
teal: "#4AB0A0",
|
|
556
|
+
coral: "#E86B6B",
|
|
557
|
+
cream: "#FAF7F2",
|
|
558
|
+
white: "#FFFFFF",
|
|
559
|
+
textPrimary: "#F0F0F0",
|
|
560
|
+
textSecondary: "#A0A0B0",
|
|
561
|
+
textMuted: "#606080",
|
|
562
|
+
codeBg: "#2B2B3B",
|
|
563
|
+
codeText: "#E0E0E8",
|
|
564
|
+
cursor: "#4AB0A0",
|
|
565
|
+
};
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Light Theme (B2B / Marketing)
|
|
569
|
+
|
|
570
|
+
```typescript
|
|
571
|
+
export const COLORS = {
|
|
572
|
+
bg: "#F8F6F3",
|
|
573
|
+
bgLight: "#FFFFFF",
|
|
574
|
+
bgPanel: "#F0EDE8",
|
|
575
|
+
accent: "#2563EB",
|
|
576
|
+
green: "#10B981",
|
|
577
|
+
red: "#EF4444",
|
|
578
|
+
dark: "#1A1A2E",
|
|
579
|
+
textPrimary: "#1A1A2E",
|
|
580
|
+
textSecondary: "#6B7280",
|
|
581
|
+
textMuted: "#9CA3AF",
|
|
582
|
+
codeBg: "#1E293B",
|
|
583
|
+
codeText: "#E0E0E8",
|
|
584
|
+
};
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
### Font Setup
|
|
588
|
+
|
|
589
|
+
```typescript
|
|
590
|
+
import { loadFont as loadInter } from "@remotion/google-fonts/Inter";
|
|
591
|
+
import { loadFont as loadJetBrainsMono } from "@remotion/google-fonts/JetBrainsMono";
|
|
592
|
+
import { loadFont as loadPlayfairDisplay } from "@remotion/google-fonts/PlayfairDisplay";
|
|
593
|
+
|
|
594
|
+
const { fontFamily: interFamily } = loadInter();
|
|
595
|
+
const { fontFamily: monoFamily } = loadJetBrainsMono();
|
|
596
|
+
const { fontFamily: serifFamily } = loadPlayfairDisplay();
|
|
597
|
+
|
|
598
|
+
export const FONTS = {
|
|
599
|
+
heading: serifFamily, // Use a different font for headings (swap per creative direction)
|
|
600
|
+
body: interFamily,
|
|
601
|
+
mono: monoFamily,
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
export const SIZES = {
|
|
605
|
+
h1: 64, h2: 48, h3: 36,
|
|
606
|
+
body: 28, small: 22, code: 20, label: 18,
|
|
607
|
+
};
|
|
608
|
+
```
|