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/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 }: { props: CastProps }) => {
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 titleFrames = Math.round(2.5 * fps);
18
- const highlightFrames = props.highlights.reduce((sum, h) => {
19
- const dur = h.videoSrc ? 7.0 : 4.5;
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(3.5 * fps);
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 = {
Binary file
package/public/music.mp3 DELETED
Binary file
Binary file