agentreel 0.3.5 → 0.4.1
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/README.md +49 -23
- package/bin/agentreel.mjs +250 -69
- package/package.json +1 -1
- package/scripts/cli_demo.py +24 -2
- package/src/CastVideo.tsx +187 -215
- package/src/Root.tsx +18 -7
- package/src/types.ts +1 -0
- package/public/browser-demo.mp4 +0 -0
- package/public/music.mp3 +0 -0
- package/public/screenshot.png +0 -0
package/src/Root.tsx
CHANGED
|
@@ -2,26 +2,37 @@ import { Composition } from "remotion";
|
|
|
2
2
|
import { CastVideo } from "./CastVideo";
|
|
3
3
|
import { defaultProps, CastProps } from "./types";
|
|
4
4
|
|
|
5
|
+
// Duration constants per mode
|
|
6
|
+
const REEL = { title: 2.5, termHighlight: 4.5, browserHighlight: 7.0, end: 3.5 };
|
|
7
|
+
const DEMO = { title: 2.0, termHighlight: 12.0, browserHighlight: 10.0, end: 3.0 };
|
|
8
|
+
|
|
5
9
|
export const RemotionRoot: React.FC = () => {
|
|
6
10
|
return (
|
|
7
11
|
<Composition
|
|
8
12
|
id="CastVideo"
|
|
9
|
-
component={CastVideo}
|
|
13
|
+
component={CastVideo as unknown as React.FC<Record<string, unknown>>}
|
|
10
14
|
durationInFrames={450}
|
|
11
15
|
fps={30}
|
|
12
16
|
width={1080}
|
|
13
17
|
height={1080}
|
|
14
|
-
defaultProps={defaultProps}
|
|
15
|
-
calculateMetadata={({ props }
|
|
18
|
+
defaultProps={defaultProps as unknown as Record<string, unknown>}
|
|
19
|
+
calculateMetadata={({ props }) => {
|
|
20
|
+
const p = props as unknown as CastProps;
|
|
16
21
|
const fps = 30;
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
22
|
+
const isDemo = p.mode === "demo";
|
|
23
|
+
const timing = isDemo ? DEMO : REEL;
|
|
24
|
+
|
|
25
|
+
const titleFrames = Math.round(timing.title * fps);
|
|
26
|
+
const highlightFrames = p.highlights.reduce((sum, h) => {
|
|
27
|
+
const dur = h.videoSrc ? timing.browserHighlight : timing.termHighlight;
|
|
20
28
|
return sum + Math.round(dur * fps);
|
|
21
29
|
}, 0);
|
|
22
|
-
const endFrames = Math.round(
|
|
30
|
+
const endFrames = Math.round(timing.end * fps);
|
|
31
|
+
|
|
23
32
|
return {
|
|
24
33
|
durationInFrames: titleFrames + highlightFrames + endFrames,
|
|
34
|
+
width: isDemo ? 1920 : 1080,
|
|
35
|
+
height: isDemo ? 1080 : 1080,
|
|
25
36
|
};
|
|
26
37
|
}}
|
|
27
38
|
/>
|
package/src/types.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface CastProps {
|
|
|
38
38
|
endText?: string; // closing CTA command, e.g. "npx agentreel"
|
|
39
39
|
endUrl?: string; // URL shown under CTA, e.g. "github.com/islo-labs/agentreel"
|
|
40
40
|
gradient?: [string, string]; // background gradient colors
|
|
41
|
+
mode?: "reel" | "demo"; // "reel" = 1080x1080 marketing clip, "demo" = 1920x1080 chapter walkthrough
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
export const defaultProps: CastProps = {
|
package/public/browser-demo.mp4
DELETED
|
Binary file
|
package/public/music.mp3
DELETED
|
Binary file
|
package/public/screenshot.png
DELETED
|
Binary file
|