reelme 0.2.2 → 0.4.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.
Files changed (59) hide show
  1. package/README.md +10 -3
  2. package/assets/audio/PROVENANCE.md +16 -0
  3. package/assets/audio/bright-sparks.mp3 +0 -0
  4. package/assets/audio/calm-keys.mp3 +0 -0
  5. package/assets/audio/circuit-pulse.mp3 +0 -0
  6. package/assets/audio/clean-horizon.mp3 +0 -0
  7. package/assets/audio/generate-tracks.mjs +218 -0
  8. package/assets/audio/manifest.json +83 -0
  9. package/assets/audio/midnight-protocol.mp3 +0 -0
  10. package/assets/audio/pixel-bounce.mp3 +0 -0
  11. package/assets/audio/steady-launch.mp3 +0 -0
  12. package/assets/audio/sunny-loop.mp3 +0 -0
  13. package/assets/audio/vector-grid.mp3 +0 -0
  14. package/package.json +9 -2
  15. package/src/cache.mjs +155 -14
  16. package/src/cli.mjs +20 -11
  17. package/src/render.mjs +172 -9
  18. package/template/package.json +6 -5
  19. package/template/pnpm-lock.yaml +186 -116
  20. package/template/pnpm-workspace.yaml +2 -0
  21. package/template/src/Root.tsx +73 -51
  22. package/template/src/audio.ts +24 -0
  23. package/template/src/benchmark.ts +18 -0
  24. package/template/src/brief.json +7 -6
  25. package/template/src/brief.ts +73 -5
  26. package/template/src/cinematic/Atmosphere.tsx +139 -0
  27. package/template/src/cinematic/Camera.tsx +54 -0
  28. package/template/src/cinematic/look.ts +106 -0
  29. package/template/src/cinematic/transitions.tsx +110 -0
  30. package/template/src/components/primitives/Bar.tsx +86 -0
  31. package/template/src/components/primitives/Caption.tsx +5 -4
  32. package/template/src/components/primitives/Icon.tsx +7 -0
  33. package/template/src/components/primitives/KeyPill.tsx +1 -1
  34. package/template/src/components/primitives/Kicker.tsx +46 -0
  35. package/template/src/components/primitives/Label.tsx +22 -25
  36. package/template/src/components/primitives/Loop.tsx +65 -0
  37. package/template/src/components/primitives/RevealText.tsx +123 -0
  38. package/template/src/components/primitives/Stage.tsx +62 -0
  39. package/template/src/components/primitives/Terminal.tsx +11 -0
  40. package/template/src/components/scenes/Benchmark.tsx +83 -0
  41. package/template/src/components/scenes/BrowserFrame.tsx +5 -4
  42. package/template/src/components/scenes/CTA.tsx +67 -58
  43. package/template/src/components/scenes/Clip.tsx +131 -0
  44. package/template/src/components/scenes/CodeReveal.tsx +10 -8
  45. package/template/src/components/scenes/DataFlow.tsx +5 -4
  46. package/template/src/components/scenes/FeatureList.tsx +80 -78
  47. package/template/src/components/scenes/FileTree.tsx +5 -4
  48. package/template/src/components/scenes/Hook.tsx +55 -0
  49. package/template/src/components/scenes/HotkeyScene.tsx +8 -6
  50. package/template/src/components/scenes/MobileScreen.tsx +308 -155
  51. package/template/src/components/scenes/OSWindowScene.tsx +8 -7
  52. package/template/src/components/scenes/Problem.tsx +29 -30
  53. package/template/src/components/scenes/SplitComparison.tsx +65 -92
  54. package/template/src/components/scenes/StatCallout.tsx +162 -18
  55. package/template/src/components/scenes/TerminalScene.tsx +16 -16
  56. package/template/src/duration.ts +23 -2
  57. package/template/src/index.ts +7 -5
  58. package/template/src/platforms.ts +4 -0
  59. package/template/src/timing.ts +49 -0
@@ -3,210 +3,363 @@ import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Img
3
3
  import { MobileScene as MobileBrief } from "../../brief";
4
4
  import { Theme } from "../../theme";
5
5
  import { Caption } from "../primitives/Caption";
6
+ import { Icon } from "../primitives/Icon";
6
7
 
7
8
  interface Props {
8
9
  scene: MobileBrief;
9
10
  theme: Theme;
11
+ bottomInset?: number;
10
12
  }
11
13
 
12
- const PHONE_W = 340;
13
- const PHONE_H = 720;
14
- const NOTCH_H = 30;
15
- const RADIUS = 40;
14
+ const PHONE_W = 384;
15
+ const PHONE_H = 808;
16
+ const NOTCH_H = 32;
17
+ const RADIUS = 46;
16
18
 
17
- export const MobileScreen: React.FC<Props> = ({ scene, theme }) => {
19
+ export const MobileScreen: React.FC<Props> = ({ scene, theme, bottomInset = 0 }) => {
18
20
  const frame = useCurrentFrame();
19
- const { fps } = useVideoConfig();
21
+ const { fps, width, height } = useVideoConfig();
22
+ const portrait = height > width;
23
+ const hasCopy = Boolean(scene.headline || (scene.points && scene.points.length > 0));
20
24
 
25
+ // Phone entrance.
21
26
  const progress = spring({ frame, fps, config: theme.motion });
22
27
  const opacity = interpolate(progress, [0, 1], [0, 1]);
23
28
  const translateY = interpolate(progress, [0, 1], [60, 0]);
24
- const scale = interpolate(progress, [0, 1], [0.88, 1]);
29
+ const enterScale = interpolate(progress, [0, 1], [0.9, 1]);
30
+
31
+ // The phone is a fixed 384×808 device; scale it to the frame. With copy beside
32
+ // it (landscape) or above it (vertical) it sits a touch smaller to share the
33
+ // frame; on its own it grows to command the height.
34
+ const targetH = hasCopy
35
+ ? (portrait ? height * 0.56 : height * 0.84)
36
+ : (portrait ? height * 0.74 : height * 0.84);
37
+ const fit = targetH / PHONE_H;
38
+
39
+ // The wrapper takes the *scaled* footprint so the device occupies a real
40
+ // layout slot — a bare transform:scale would resize the phone visually while
41
+ // its box stayed 808px tall, overlapping copy stacked above it on vertical cuts.
42
+ const phone = (
43
+ <div
44
+ style={{
45
+ width: PHONE_W * fit,
46
+ height: PHONE_H * fit,
47
+ flexShrink: 0,
48
+ opacity,
49
+ translate: `0 ${translateY}px`,
50
+ }}
51
+ >
52
+ <div style={{ scale: String(enterScale * fit), transformOrigin: "top left" }}>
53
+ <PhoneFrame scene={scene} theme={theme} frame={frame} fps={fps} />
54
+ </div>
55
+ </div>
56
+ );
57
+
58
+ // Single centered device when no copy is supplied (composed symmetric margins).
59
+ if (!hasCopy) {
60
+ return (
61
+ <AbsoluteFill style={{ background: "transparent", display: "flex", alignItems: "center", justifyContent: "center" }}>
62
+ {phone}
63
+ {scene.caption && <Caption text={scene.caption} theme={theme} startFrame={50} bottomInset={bottomInset} />}
64
+ </AbsoluteFill>
65
+ );
66
+ }
67
+
68
+ const copy = <CopyColumn scene={scene} theme={theme} frame={frame} fps={fps} portrait={portrait} width={width} />;
25
69
 
26
70
  return (
27
71
  <AbsoluteFill
28
72
  style={{
29
- background: theme.bg,
73
+ background: "transparent",
30
74
  display: "flex",
75
+ flexDirection: portrait ? "column" : "row",
31
76
  alignItems: "center",
32
- justifyContent: "center",
77
+ justifyContent: portrait ? "center" : "space-between",
78
+ gap: portrait ? 12 : 80,
79
+ padding: portrait ? "0 80px" : "0 130px",
80
+ }}
81
+ >
82
+ {copy}
83
+ {phone}
84
+ {scene.caption && <Caption text={scene.caption} theme={theme} startFrame={50} bottomInset={bottomInset} />}
85
+ </AbsoluteFill>
86
+ );
87
+ };
88
+
89
+ /** Headline + supporting bullets that balance the device. */
90
+ const CopyColumn: React.FC<{
91
+ scene: MobileBrief;
92
+ theme: Theme;
93
+ frame: number;
94
+ fps: number;
95
+ portrait: boolean;
96
+ width: number;
97
+ }> = ({ scene, theme, frame, fps, portrait, width }) => {
98
+ const headlineSize = portrait ? Math.round(width * 0.06) : Math.round(width * 0.032);
99
+ const pointSize = portrait ? Math.round(width * 0.032) : Math.round(width * 0.019);
100
+
101
+ const headP = spring({ frame: frame - 6, fps, config: theme.motion });
102
+ const headOpacity = interpolate(headP, [0, 1], [0, 1]);
103
+ const headShift = interpolate(headP, [0, 1], [portrait ? 18 : -28, 0]);
104
+
105
+ return (
106
+ <div
107
+ style={{
108
+ display: "flex",
109
+ flexDirection: "column",
110
+ gap: portrait ? 22 : 30,
111
+ maxWidth: portrait ? width * 0.82 : width * 0.44,
112
+ alignItems: portrait ? "center" : "flex-start",
113
+ textAlign: portrait ? "center" : "left",
33
114
  }}
34
115
  >
116
+ {scene.headline && (
117
+ <div
118
+ style={{
119
+ opacity: headOpacity,
120
+ translate: portrait ? `0 ${headShift}px` : `${headShift}px 0`,
121
+ fontFamily: theme.fontSans,
122
+ fontSize: headlineSize,
123
+ fontWeight: 800,
124
+ lineHeight: 1.08,
125
+ letterSpacing: "-0.03em",
126
+ color: theme.text,
127
+ }}
128
+ >
129
+ {scene.headline}
130
+ </div>
131
+ )}
132
+
133
+ {scene.points && scene.points.length > 0 && (
134
+ <div style={{ display: "flex", flexDirection: "column", gap: portrait ? 16 : 20 }}>
135
+ {scene.points.map((point, i) => {
136
+ const p = spring({ frame: frame - 18 - i * 7, fps, config: theme.motion });
137
+ return (
138
+ <div
139
+ key={i}
140
+ style={{
141
+ display: "flex",
142
+ alignItems: "center",
143
+ gap: 16,
144
+ opacity: interpolate(p, [0, 1], [0, 1]),
145
+ translate: `${interpolate(p, [0, 1], [portrait ? 0 : -16, 0])}px 0`,
146
+ }}
147
+ >
148
+ <Icon name="check" size={Math.round(pointSize * 0.95)} color={theme.accent} />
149
+ <span style={{ fontFamily: theme.fontSans, fontSize: pointSize, fontWeight: 500, color: theme.text, lineHeight: 1.3 }}>
150
+ {point}
151
+ </span>
152
+ </div>
153
+ );
154
+ })}
155
+ </div>
156
+ )}
157
+ </div>
158
+ );
159
+ };
160
+
161
+ /** The fixed-size device. Scaled to the frame by its parent. */
162
+ const PhoneFrame: React.FC<{ scene: MobileBrief; theme: Theme; frame: number; fps: number }> = ({ scene, theme, frame, fps }) => {
163
+ return (
164
+ <div
165
+ style={{
166
+ width: PHONE_W,
167
+ height: PHONE_H,
168
+ borderRadius: RADIUS,
169
+ border: `3px solid ${theme.border}`,
170
+ background: theme.surface,
171
+ boxShadow: `0 50px 120px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.05)`,
172
+ position: "relative",
173
+ overflow: "hidden",
174
+ }}
175
+ >
176
+ {/* Notch */}
35
177
  <div
36
178
  style={{
37
- width: PHONE_W,
38
- height: PHONE_H,
39
- borderRadius: RADIUS,
40
- border: `3px solid ${theme.border}`,
179
+ position: "absolute",
180
+ top: 0,
181
+ left: "50%",
182
+ transform: "translateX(-50%)",
183
+ width: 120,
184
+ height: NOTCH_H,
41
185
  background: theme.surface,
42
- boxShadow: `0 40px 100px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.05)`,
43
- position: "relative",
44
- overflow: "hidden",
45
- opacity,
46
- transform: `translateY(${translateY}px) scale(${scale})`,
186
+ borderBottomLeftRadius: 18,
187
+ borderBottomRightRadius: 18,
188
+ zIndex: 10,
47
189
  }}
48
- >
49
- {/* Notch */}
50
- <div
51
- style={{
52
- position: "absolute",
53
- top: 0,
54
- left: "50%",
55
- transform: "translateX(-50%)",
56
- width: 110,
57
- height: NOTCH_H,
58
- background: theme.surface,
59
- borderBottomLeftRadius: 16,
60
- borderBottomRightRadius: 16,
61
- zIndex: 10,
62
- }}
63
- />
190
+ />
64
191
 
65
- {/* Screen */}
192
+ {/* Screen */}
193
+ <div style={{ position: "absolute", inset: 0, background: theme.bg, display: "flex", flexDirection: "column" }}>
194
+ {/* Status bar */}
66
195
  <div
67
196
  style={{
68
- position: "absolute",
69
- inset: 0,
70
- background: theme.bg,
197
+ height: NOTCH_H + 2,
71
198
  display: "flex",
72
- flexDirection: "column",
199
+ alignItems: "flex-end",
200
+ justifyContent: "space-between",
201
+ paddingLeft: 22,
202
+ paddingRight: 22,
203
+ paddingBottom: 4,
204
+ fontFamily: theme.fontSans,
205
+ fontSize: 12,
206
+ fontWeight: 600,
207
+ color: theme.text,
208
+ flexShrink: 0,
73
209
  }}
74
210
  >
75
- {/* Status bar */}
211
+ <span>9:41</span>
212
+ <span style={{ letterSpacing: 1 }}>●●●</span>
213
+ </div>
214
+
215
+ {/* App header */}
216
+ {scene.title && (
76
217
  <div
77
218
  style={{
78
- height: NOTCH_H + 2,
219
+ height: 52,
79
220
  display: "flex",
80
- alignItems: "flex-end",
81
- justifyContent: "space-between",
82
- paddingLeft: 20,
83
- paddingRight: 20,
84
- paddingBottom: 4,
221
+ alignItems: "center",
222
+ gap: 10,
223
+ padding: "0 18px",
224
+ borderBottom: `1px solid ${theme.border}`,
85
225
  fontFamily: theme.fontSans,
86
- fontSize: 11,
87
- fontWeight: 600,
88
- color: theme.textMuted,
226
+ fontSize: 17,
227
+ fontWeight: 700,
228
+ color: theme.text,
229
+ flexShrink: 0,
89
230
  }}
90
231
  >
91
- <span>9:41</span>
92
- <span>●●●</span>
232
+ <div style={{ width: 12, height: 12, borderRadius: "50%", background: theme.accent }} />
233
+ {scene.title}
93
234
  </div>
235
+ )}
236
+
237
+ {/* Content */}
238
+ <div style={{ flex: 1, overflow: "hidden", position: "relative" }}>
239
+ {scene.screenshot ? (
240
+ <KenBurns frame={frame}>
241
+ <Img
242
+ src={staticFile(scene.screenshot)}
243
+ style={{ width: "100%", height: "100%", objectFit: "cover", display: "block" }}
244
+ />
245
+ </KenBurns>
246
+ ) : (
247
+ <MockFeed theme={theme} frame={frame} fps={fps} />
248
+ )}
249
+ </div>
94
250
 
95
- {/* App header */}
96
- {scene.title && (
251
+ {/* Bottom nav */}
252
+ <div
253
+ style={{
254
+ height: 56,
255
+ borderTop: `1px solid ${theme.border}`,
256
+ display: "flex",
257
+ alignItems: "center",
258
+ justifyContent: "space-around",
259
+ flexShrink: 0,
260
+ background: theme.surface,
261
+ }}
262
+ >
263
+ {["⌂", "⊞", "♡", "◉"].map((icon, i) => (
97
264
  <div
265
+ key={i}
98
266
  style={{
99
- height: 48,
267
+ width: 38,
268
+ height: 38,
100
269
  display: "flex",
101
270
  alignItems: "center",
102
271
  justifyContent: "center",
103
- borderBottom: `1px solid ${theme.border}`,
104
- fontFamily: theme.fontSans,
105
- fontSize: 16,
106
- fontWeight: 600,
107
- color: theme.text,
108
- flexShrink: 0,
272
+ fontSize: 19,
273
+ color: i === 0 ? theme.accent : theme.textMuted,
109
274
  }}
110
275
  >
111
- {scene.title}
276
+ {icon}
112
277
  </div>
113
- )}
114
-
115
- {/* Content */}
116
- <div style={{ flex: 1, overflow: "hidden", position: "relative" }}>
117
- {scene.image ? (
118
- <Img
119
- src={staticFile(scene.image)}
120
- style={{ width: "100%", height: "100%", objectFit: "cover" }}
121
- />
122
- ) : (
123
- <div style={{ padding: 14, display: "flex", flexDirection: "column", gap: 10 }}>
124
- {/* Search bar */}
125
- <div
126
- style={{
127
- height: 34,
128
- background: theme.surface,
129
- borderRadius: 8,
130
- border: `1px solid ${theme.border}`,
131
- display: "flex",
132
- alignItems: "center",
133
- paddingLeft: 12,
134
- paddingRight: 12,
135
- fontFamily: theme.fontSans,
136
- fontSize: 12,
137
- color: theme.textMuted,
138
- }}
139
- >
140
- Search...
141
- </div>
142
- {/* List items */}
143
- {[72, 56, 60, 54, 58].map((_, i) => (
144
- <div
145
- key={i}
146
- style={{
147
- height: 58,
148
- background: theme.surface,
149
- borderRadius: 10,
150
- border: `1px solid ${theme.border}`,
151
- display: "flex",
152
- alignItems: "center",
153
- gap: 10,
154
- paddingLeft: 10,
155
- paddingRight: 10,
156
- }}
157
- >
158
- <div
159
- style={{
160
- width: 32,
161
- height: 32,
162
- borderRadius: "50%",
163
- background: theme.accentMuted,
164
- border: `1.5px solid ${theme.accent}`,
165
- flexShrink: 0,
166
- }}
167
- />
168
- <div style={{ flex: 1, display: "flex", flexDirection: "column", gap: 6 }}>
169
- <div style={{ height: 11, background: theme.border, borderRadius: 4, width: `${58 + i * 8}%` }} />
170
- <div style={{ height: 9, background: theme.border, borderRadius: 4, width: `${38 + i * 6}%`, opacity: 0.6 }} />
171
- </div>
172
- </div>
173
- ))}
174
- </div>
175
- )}
176
- </div>
177
-
178
- {/* Bottom nav */}
179
- <div
180
- style={{
181
- height: 52,
182
- borderTop: `1px solid ${theme.border}`,
183
- display: "flex",
184
- alignItems: "center",
185
- justifyContent: "space-around",
186
- flexShrink: 0,
187
- }}
188
- >
189
- {["⌂", "⊞", "♡", "◉"].map((icon, i) => (
190
- <div
191
- key={i}
192
- style={{
193
- width: 36,
194
- height: 36,
195
- display: "flex",
196
- alignItems: "center",
197
- justifyContent: "center",
198
- fontSize: 18,
199
- color: i === 0 ? theme.accent : theme.textMuted,
200
- }}
201
- >
202
- {icon}
203
- </div>
204
- ))}
205
- </div>
278
+ ))}
206
279
  </div>
207
280
  </div>
281
+ </div>
282
+ );
283
+ };
208
284
 
209
- {scene.caption && <Caption text={scene.caption} theme={theme} startFrame={50} />}
285
+ /** Slow ken-burns push so a real screenshot reads as alive footage, not a still. */
286
+ const KenBurns: React.FC<{ frame: number; children: React.ReactNode }> = ({ frame, children }) => {
287
+ const s = interpolate(frame, [0, 240], [1.0, 1.1], { extrapolateRight: "clamp" });
288
+ const y = interpolate(frame, [0, 240], [0, -3], { extrapolateRight: "clamp" });
289
+ return (
290
+ <AbsoluteFill style={{ transform: `scale(${s}) translateY(${y}%)`, transformOrigin: "center top" }}>
291
+ {children}
210
292
  </AbsoluteFill>
211
293
  );
212
294
  };
295
+
296
+ /** An app-like feed that builds in and gently scrolls, when no screenshot is given. */
297
+ const MockFeed: React.FC<{ theme: Theme; frame: number; fps: number }> = ({ theme, frame, fps }) => {
298
+ const scrollY = interpolate(frame, [24, 200], [0, -46], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
299
+
300
+ const Item: React.FC<{ index: number; children: React.ReactNode }> = ({ index, children }) => {
301
+ const p = spring({ frame: frame - 8 - index * 7, fps, config: theme.motion });
302
+ return (
303
+ <div style={{ opacity: interpolate(p, [0, 1], [0, 1]), translate: `0 ${interpolate(p, [0, 1], [16, 0])}px` }}>
304
+ {children}
305
+ </div>
306
+ );
307
+ };
308
+
309
+ const cardBase: React.CSSProperties = {
310
+ background: theme.surface,
311
+ borderRadius: 14,
312
+ border: `1px solid ${theme.border}`,
313
+ };
314
+
315
+ return (
316
+ <div style={{ padding: 16, display: "flex", flexDirection: "column", gap: 12, translate: `0 ${scrollY}px` }}>
317
+ <Item index={0}>
318
+ <div style={{ ...cardBase, height: 36, display: "flex", alignItems: "center", padding: "0 14px", fontFamily: theme.fontSans, fontSize: 13, color: theme.textMuted }}>
319
+ Search
320
+ </div>
321
+ </Item>
322
+
323
+ {/* Featured hero card */}
324
+ <Item index={1}>
325
+ <div
326
+ style={{
327
+ height: 132,
328
+ borderRadius: 16,
329
+ background: `linear-gradient(135deg, ${theme.accent} 0%, ${theme.accentMuted} 100%)`,
330
+ padding: 16,
331
+ display: "flex",
332
+ flexDirection: "column",
333
+ justifyContent: "flex-end",
334
+ gap: 8,
335
+ }}
336
+ >
337
+ <div style={{ height: 13, width: "62%", background: "rgba(255,255,255,0.92)", borderRadius: 5 }} />
338
+ <div style={{ height: 10, width: "40%", background: "rgba(255,255,255,0.6)", borderRadius: 5 }} />
339
+ </div>
340
+ </Item>
341
+
342
+ {[0, 1, 2, 3].map((i) => (
343
+ <Item key={i} index={2 + i}>
344
+ <div style={{ ...cardBase, height: 70, display: "flex", alignItems: "center", gap: 12, padding: "0 12px" }}>
345
+ <div
346
+ style={{
347
+ width: 44,
348
+ height: 44,
349
+ borderRadius: 12,
350
+ background: theme.accentMuted,
351
+ border: `1.5px solid ${theme.accent}`,
352
+ flexShrink: 0,
353
+ }}
354
+ />
355
+ <div style={{ flex: 1, display: "flex", flexDirection: "column", gap: 7 }}>
356
+ <div style={{ height: 11, background: theme.text, opacity: 0.85, borderRadius: 4, width: `${70 - i * 8}%` }} />
357
+ <div style={{ height: 9, background: theme.textMuted, opacity: 0.5, borderRadius: 4, width: `${48 - i * 5}%` }} />
358
+ </div>
359
+ <div style={{ width: 30, height: 18, borderRadius: 6, background: theme.accentMuted, flexShrink: 0 }} />
360
+ </div>
361
+ </Item>
362
+ ))}
363
+ </div>
364
+ );
365
+ };
@@ -2,12 +2,13 @@ import React from "react";
2
2
  import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate } from "remotion";
3
3
  import { OSWindowScene as OSWindowBrief } from "../../brief";
4
4
  import { Theme } from "../../theme";
5
- import { Icon } from "../primitives/Icon";
5
+ import { Icon, hasIcon } from "../primitives/Icon";
6
6
  import { Caption } from "../primitives/Caption";
7
7
 
8
8
  interface Props {
9
9
  scene: OSWindowBrief;
10
10
  theme: Theme;
11
+ bottomInset?: number;
11
12
  }
12
13
 
13
14
  const WINDOW_WIDTH = 600;
@@ -18,7 +19,7 @@ const FRAMES_PER_ITEM = 20;
18
19
 
19
20
  const TRAFFIC_LIGHTS = ["#ff5f57", "#ffbd2e", "#28c941"] as const;
20
21
 
21
- export const OSWindow: React.FC<Props> = ({ scene, theme }) => {
22
+ export const OSWindow: React.FC<Props> = ({ scene, theme, bottomInset = 0 }) => {
22
23
  const frame = useCurrentFrame();
23
24
  const { fps } = useVideoConfig();
24
25
 
@@ -37,7 +38,7 @@ export const OSWindow: React.FC<Props> = ({ scene, theme }) => {
37
38
 
38
39
  return (
39
40
  <AbsoluteFill
40
- style={{ background: theme.bg, display: "flex", alignItems: "center", justifyContent: "center" }}
41
+ style={{ background: "transparent", display: "flex", alignItems: "center", justifyContent: "center" }}
41
42
  >
42
43
  <div
43
44
  style={{
@@ -47,7 +48,7 @@ export const OSWindow: React.FC<Props> = ({ scene, theme }) => {
47
48
  background: theme.surface,
48
49
  border: `1px solid ${theme.border}`,
49
50
  boxShadow: "0 40px 100px rgba(0,0,0,0.45), 0 0 0 0.5px rgba(255,255,255,0.05)",
50
- transform: `scale(${windowScale})`,
51
+ scale: String(windowScale),
51
52
  opacity: windowOpacity,
52
53
  }}
53
54
  >
@@ -124,10 +125,10 @@ export const OSWindow: React.FC<Props> = ({ scene, theme }) => {
124
125
  padding: "9px 14px",
125
126
  background: item.highlighted ? theme.accentMuted : "transparent",
126
127
  opacity,
127
- transform: `translateX(${tx}px)`,
128
+ translate: `${tx}px 0`,
128
129
  }}
129
130
  >
130
- {item.icon && (
131
+ {item.icon && hasIcon(item.icon) && (
131
132
  <div
132
133
  style={{
133
134
  width: 30,
@@ -160,7 +161,7 @@ export const OSWindow: React.FC<Props> = ({ scene, theme }) => {
160
161
  </div>
161
162
  </div>
162
163
 
163
- {scene.caption && <Caption text={scene.caption} theme={theme} startFrame={captionStart} />}
164
+ {scene.caption && <Caption text={scene.caption} theme={theme} startFrame={captionStart} bottomInset={bottomInset} />}
164
165
  </AbsoluteFill>
165
166
  );
166
167
  };