@contractspec/lib.video-gen 1.42.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/dist/browser/compositions/api-overview.js +645 -0
- package/dist/browser/compositions/index.js +1133 -0
- package/dist/browser/compositions/primitives/animated-text.js +144 -0
- package/dist/browser/compositions/primitives/brand-frame.js +181 -0
- package/dist/browser/compositions/primitives/code-block.js +226 -0
- package/dist/browser/compositions/primitives/index.js +656 -0
- package/dist/browser/compositions/primitives/progress-bar.js +59 -0
- package/dist/browser/compositions/primitives/terminal.js +265 -0
- package/dist/browser/compositions/primitives/transition.js +98 -0
- package/dist/browser/compositions/social-clip.js +500 -0
- package/dist/browser/compositions/terminal-demo.js +558 -0
- package/dist/browser/design/index.js +155 -0
- package/dist/browser/design/layouts.js +50 -0
- package/dist/browser/design/motion.js +43 -0
- package/dist/browser/design/tokens.js +28 -0
- package/dist/browser/design/typography.js +61 -0
- package/dist/browser/docs/compositions.docblock.js +182 -0
- package/dist/browser/docs/design.docblock.js +187 -0
- package/dist/browser/docs/generators.docblock.js +187 -0
- package/dist/browser/docs/rendering.docblock.js +197 -0
- package/dist/browser/docs/video-gen.docblock.js +141 -0
- package/dist/browser/generators/index.js +416 -0
- package/dist/browser/generators/scene-planner.js +205 -0
- package/dist/browser/generators/script-generator.js +147 -0
- package/dist/browser/generators/video-generator.js +414 -0
- package/dist/browser/index.js +1550 -0
- package/dist/browser/player/demo-player.js +1136 -0
- package/dist/browser/player/index.js +1136 -0
- package/dist/browser/remotion/Root.js +1189 -0
- package/dist/browser/remotion/index.js +1190 -0
- package/dist/browser/renderers/config.js +40 -0
- package/dist/browser/renderers/index.js +160 -0
- package/dist/browser/renderers/local.js +156 -0
- package/dist/browser/types.js +13 -0
- package/dist/compositions/api-overview.d.ts +16 -0
- package/dist/compositions/api-overview.js +640 -0
- package/dist/compositions/index.d.ts +7 -0
- package/dist/compositions/index.js +1128 -0
- package/dist/compositions/primitives/animated-text.d.ts +22 -0
- package/dist/compositions/primitives/animated-text.js +139 -0
- package/dist/compositions/primitives/brand-frame.d.ts +14 -0
- package/dist/compositions/primitives/brand-frame.js +176 -0
- package/dist/compositions/primitives/code-block.d.ts +18 -0
- package/dist/compositions/primitives/code-block.js +221 -0
- package/dist/compositions/primitives/index.d.ts +12 -0
- package/dist/compositions/primitives/index.js +651 -0
- package/dist/compositions/primitives/progress-bar.d.ts +12 -0
- package/dist/compositions/primitives/progress-bar.js +54 -0
- package/dist/compositions/primitives/terminal.d.ts +24 -0
- package/dist/compositions/primitives/terminal.js +260 -0
- package/dist/compositions/primitives/transition.d.ts +14 -0
- package/dist/compositions/primitives/transition.js +93 -0
- package/dist/compositions/social-clip.d.ts +16 -0
- package/dist/compositions/social-clip.js +495 -0
- package/dist/compositions/terminal-demo.d.ts +17 -0
- package/dist/compositions/terminal-demo.js +553 -0
- package/dist/design/index.d.ts +4 -0
- package/dist/design/index.js +150 -0
- package/dist/design/layouts.d.ts +69 -0
- package/dist/design/layouts.js +45 -0
- package/dist/design/motion.d.ts +72 -0
- package/dist/design/motion.js +38 -0
- package/dist/design/tokens.d.ts +31 -0
- package/dist/design/tokens.js +23 -0
- package/dist/design/typography.d.ts +61 -0
- package/dist/design/typography.js +56 -0
- package/dist/docs/compositions.docblock.d.ts +1 -0
- package/dist/docs/compositions.docblock.js +183 -0
- package/dist/docs/design.docblock.d.ts +1 -0
- package/dist/docs/design.docblock.js +188 -0
- package/dist/docs/generators.docblock.d.ts +1 -0
- package/dist/docs/generators.docblock.js +188 -0
- package/dist/docs/rendering.docblock.d.ts +1 -0
- package/dist/docs/rendering.docblock.js +198 -0
- package/dist/docs/video-gen.docblock.d.ts +1 -0
- package/dist/docs/video-gen.docblock.js +142 -0
- package/dist/generators/index.d.ts +5 -0
- package/dist/generators/index.js +411 -0
- package/dist/generators/scene-planner.d.ts +23 -0
- package/dist/generators/scene-planner.js +200 -0
- package/dist/generators/script-generator.d.ts +49 -0
- package/dist/generators/script-generator.js +142 -0
- package/dist/generators/video-generator.d.ts +20 -0
- package/dist/generators/video-generator.js +409 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1545 -0
- package/dist/node/compositions/api-overview.js +640 -0
- package/dist/node/compositions/index.js +1128 -0
- package/dist/node/compositions/primitives/animated-text.js +139 -0
- package/dist/node/compositions/primitives/brand-frame.js +176 -0
- package/dist/node/compositions/primitives/code-block.js +221 -0
- package/dist/node/compositions/primitives/index.js +651 -0
- package/dist/node/compositions/primitives/progress-bar.js +54 -0
- package/dist/node/compositions/primitives/terminal.js +260 -0
- package/dist/node/compositions/primitives/transition.js +93 -0
- package/dist/node/compositions/social-clip.js +495 -0
- package/dist/node/compositions/terminal-demo.js +553 -0
- package/dist/node/design/index.js +150 -0
- package/dist/node/design/layouts.js +45 -0
- package/dist/node/design/motion.js +38 -0
- package/dist/node/design/tokens.js +23 -0
- package/dist/node/design/typography.js +56 -0
- package/dist/node/docs/compositions.docblock.js +182 -0
- package/dist/node/docs/design.docblock.js +187 -0
- package/dist/node/docs/generators.docblock.js +187 -0
- package/dist/node/docs/rendering.docblock.js +197 -0
- package/dist/node/docs/video-gen.docblock.js +141 -0
- package/dist/node/generators/index.js +411 -0
- package/dist/node/generators/scene-planner.js +200 -0
- package/dist/node/generators/script-generator.js +142 -0
- package/dist/node/generators/video-generator.js +409 -0
- package/dist/node/index.js +1545 -0
- package/dist/node/player/demo-player.js +1131 -0
- package/dist/node/player/index.js +1131 -0
- package/dist/node/remotion/Root.js +1184 -0
- package/dist/node/remotion/index.js +1185 -0
- package/dist/node/renderers/config.js +35 -0
- package/dist/node/renderers/index.js +155 -0
- package/dist/node/renderers/local.js +151 -0
- package/dist/node/types.js +8 -0
- package/dist/player/demo-player.d.ts +55 -0
- package/dist/player/demo-player.js +1131 -0
- package/dist/player/index.d.ts +2 -0
- package/dist/player/index.js +1131 -0
- package/dist/remotion/Root.d.ts +2 -0
- package/dist/remotion/Root.js +1184 -0
- package/dist/remotion/index.d.ts +1 -0
- package/dist/remotion/index.js +1185 -0
- package/dist/renderers/config.d.ts +28 -0
- package/dist/renderers/config.js +35 -0
- package/dist/renderers/index.d.ts +3 -0
- package/dist/renderers/index.js +155 -0
- package/dist/renderers/local.d.ts +17 -0
- package/dist/renderers/local.js +151 -0
- package/dist/types.d.ts +63 -0
- package/dist/types.js +8 -0
- package/package.json +637 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
4
|
+
// src/design/tokens.ts
|
|
5
|
+
import { defaultTokens } from "@contractspec/lib.design-system";
|
|
6
|
+
var defaultVideoColors = {
|
|
7
|
+
canvasBackground: defaultTokens.colors.background,
|
|
8
|
+
codeBackground: "#1e1e2e",
|
|
9
|
+
terminalBackground: "#0d1117",
|
|
10
|
+
terminalForeground: "#c9d1d9",
|
|
11
|
+
highlight: defaultTokens.colors.accent,
|
|
12
|
+
gradientStart: defaultTokens.colors.primary,
|
|
13
|
+
gradientEnd: defaultTokens.colors.accent
|
|
14
|
+
};
|
|
15
|
+
var defaultVideoTheme = {
|
|
16
|
+
...defaultTokens,
|
|
17
|
+
video: defaultVideoColors
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/compositions/primitives/progress-bar.tsx
|
|
21
|
+
import { useCurrentFrame, useVideoConfig } from "remotion";
|
|
22
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
23
|
+
var ProgressBar = ({
|
|
24
|
+
height = 4,
|
|
25
|
+
color = defaultVideoTheme.colors.primary,
|
|
26
|
+
backgroundColor = "rgba(255,255,255,0.1)",
|
|
27
|
+
position = "bottom"
|
|
28
|
+
}) => {
|
|
29
|
+
const frame = useCurrentFrame();
|
|
30
|
+
const { durationInFrames, width } = useVideoConfig();
|
|
31
|
+
const progress = frame / durationInFrames;
|
|
32
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
33
|
+
style: {
|
|
34
|
+
position: "absolute",
|
|
35
|
+
[position]: 0,
|
|
36
|
+
left: 0,
|
|
37
|
+
width,
|
|
38
|
+
height,
|
|
39
|
+
backgroundColor,
|
|
40
|
+
zIndex: 100
|
|
41
|
+
},
|
|
42
|
+
children: /* @__PURE__ */ jsxDEV("div", {
|
|
43
|
+
style: {
|
|
44
|
+
width: `${progress * 100}%`,
|
|
45
|
+
height: "100%",
|
|
46
|
+
backgroundColor: color,
|
|
47
|
+
transition: "none"
|
|
48
|
+
}
|
|
49
|
+
}, undefined, false, undefined, this)
|
|
50
|
+
}, undefined, false, undefined, this);
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
ProgressBar
|
|
54
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TerminalLine {
|
|
3
|
+
/** The text content */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Line type determines styling */
|
|
6
|
+
type: 'command' | 'output' | 'error' | 'success' | 'comment';
|
|
7
|
+
/** Delay in frames before this line appears (relative to previous line end) */
|
|
8
|
+
delay?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface TerminalProps {
|
|
11
|
+
/** Lines to display in sequence */
|
|
12
|
+
lines: TerminalLine[];
|
|
13
|
+
/** Frame at which the terminal appears */
|
|
14
|
+
startAt?: number;
|
|
15
|
+
/** Terminal prompt string */
|
|
16
|
+
prompt?: string;
|
|
17
|
+
/** Terminal title */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** Background color */
|
|
20
|
+
backgroundColor?: string;
|
|
21
|
+
/** Typing speed in frames per character (for command lines) */
|
|
22
|
+
typingSpeed?: number;
|
|
23
|
+
}
|
|
24
|
+
export declare const Terminal: React.FC<TerminalProps>;
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
4
|
+
// src/design/motion.ts
|
|
5
|
+
import { Easing } from "remotion";
|
|
6
|
+
var videoEasing = {
|
|
7
|
+
entrance: Easing.out(Easing.exp),
|
|
8
|
+
exit: Easing.in(Easing.exp),
|
|
9
|
+
emphasis: Easing.out(Easing.back(1.4)),
|
|
10
|
+
linear: Easing.linear,
|
|
11
|
+
gentle: Easing.bezier(0.25, 0.1, 0.25, 1),
|
|
12
|
+
spring: Easing.out(Easing.back(1.7))
|
|
13
|
+
};
|
|
14
|
+
var videoDurations = {
|
|
15
|
+
sceneTransition: 20,
|
|
16
|
+
textEntrance: 15,
|
|
17
|
+
textExit: 12,
|
|
18
|
+
codeTypingPerChar: 2,
|
|
19
|
+
sectionPause: 30,
|
|
20
|
+
emphasisPause: 15,
|
|
21
|
+
brandReveal: 25,
|
|
22
|
+
minScene: 60,
|
|
23
|
+
shortScene: 60,
|
|
24
|
+
mediumScene: 120,
|
|
25
|
+
longScene: 240
|
|
26
|
+
};
|
|
27
|
+
var videoTransitions = {
|
|
28
|
+
fade: { type: "fade", durationInFrames: 20 },
|
|
29
|
+
slideLeft: { type: "slide-left", durationInFrames: 20 },
|
|
30
|
+
slideRight: { type: "slide-right", durationInFrames: 20 },
|
|
31
|
+
wipe: { type: "wipe", durationInFrames: 15 },
|
|
32
|
+
none: { type: "none", durationInFrames: 0 }
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/design/tokens.ts
|
|
36
|
+
import { defaultTokens } from "@contractspec/lib.design-system";
|
|
37
|
+
var defaultVideoColors = {
|
|
38
|
+
canvasBackground: defaultTokens.colors.background,
|
|
39
|
+
codeBackground: "#1e1e2e",
|
|
40
|
+
terminalBackground: "#0d1117",
|
|
41
|
+
terminalForeground: "#c9d1d9",
|
|
42
|
+
highlight: defaultTokens.colors.accent,
|
|
43
|
+
gradientStart: defaultTokens.colors.primary,
|
|
44
|
+
gradientEnd: defaultTokens.colors.accent
|
|
45
|
+
};
|
|
46
|
+
var defaultVideoTheme = {
|
|
47
|
+
...defaultTokens,
|
|
48
|
+
video: defaultVideoColors
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// src/design/typography.ts
|
|
52
|
+
var videoTypography = {
|
|
53
|
+
title: {
|
|
54
|
+
fontSize: 72,
|
|
55
|
+
lineHeight: 1.1,
|
|
56
|
+
fontWeight: 700,
|
|
57
|
+
letterSpacing: -1
|
|
58
|
+
},
|
|
59
|
+
heading: {
|
|
60
|
+
fontSize: 56,
|
|
61
|
+
lineHeight: 1.2,
|
|
62
|
+
fontWeight: 600,
|
|
63
|
+
letterSpacing: -0.5
|
|
64
|
+
},
|
|
65
|
+
subheading: {
|
|
66
|
+
fontSize: 40,
|
|
67
|
+
lineHeight: 1.25,
|
|
68
|
+
fontWeight: 500
|
|
69
|
+
},
|
|
70
|
+
body: {
|
|
71
|
+
fontSize: 32,
|
|
72
|
+
lineHeight: 1.5,
|
|
73
|
+
fontWeight: 400
|
|
74
|
+
},
|
|
75
|
+
code: {
|
|
76
|
+
fontSize: 28,
|
|
77
|
+
lineHeight: 1.6,
|
|
78
|
+
fontWeight: 400
|
|
79
|
+
},
|
|
80
|
+
caption: {
|
|
81
|
+
fontSize: 24,
|
|
82
|
+
lineHeight: 1.4,
|
|
83
|
+
fontWeight: 400
|
|
84
|
+
},
|
|
85
|
+
label: {
|
|
86
|
+
fontSize: 20,
|
|
87
|
+
lineHeight: 1.3,
|
|
88
|
+
fontWeight: 600,
|
|
89
|
+
letterSpacing: 1
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
function scaleTypography(style, targetWidth) {
|
|
93
|
+
const scale = targetWidth / 1920;
|
|
94
|
+
return {
|
|
95
|
+
...style,
|
|
96
|
+
fontSize: Math.round(style.fontSize * scale),
|
|
97
|
+
letterSpacing: style.letterSpacing ? Math.round(style.letterSpacing * scale * 10) / 10 : undefined
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/compositions/primitives/terminal.tsx
|
|
102
|
+
import { interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
103
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
104
|
+
var LINE_TYPE_COLORS = {
|
|
105
|
+
command: "#c9d1d9",
|
|
106
|
+
output: "#8b949e",
|
|
107
|
+
error: "#f85149",
|
|
108
|
+
success: "#3fb950",
|
|
109
|
+
comment: "#6e7681"
|
|
110
|
+
};
|
|
111
|
+
var Terminal = ({
|
|
112
|
+
lines,
|
|
113
|
+
startAt = 0,
|
|
114
|
+
prompt = "$ ",
|
|
115
|
+
title = "Terminal",
|
|
116
|
+
backgroundColor = defaultVideoColors.terminalBackground,
|
|
117
|
+
typingSpeed = videoDurations.codeTypingPerChar
|
|
118
|
+
}) => {
|
|
119
|
+
const frame = useCurrentFrame();
|
|
120
|
+
const { width } = useVideoConfig();
|
|
121
|
+
const codeStyle = scaleTypography(videoTypography.code, width);
|
|
122
|
+
const lineTimings = [];
|
|
123
|
+
let currentFrame = startAt;
|
|
124
|
+
for (const line of lines) {
|
|
125
|
+
const delay = line.delay ?? 10;
|
|
126
|
+
const lineStart = currentFrame + delay;
|
|
127
|
+
if (line.type === "command") {
|
|
128
|
+
const typeDuration = line.text.length * typingSpeed;
|
|
129
|
+
lineTimings.push({
|
|
130
|
+
startFrame: lineStart,
|
|
131
|
+
endFrame: lineStart + typeDuration
|
|
132
|
+
});
|
|
133
|
+
currentFrame = lineStart + typeDuration;
|
|
134
|
+
} else {
|
|
135
|
+
lineTimings.push({ startFrame: lineStart, endFrame: lineStart + 5 });
|
|
136
|
+
currentFrame = lineStart + 5;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
const opacity = interpolate(frame, [startAt, startAt + 10], [0, 1], {
|
|
140
|
+
extrapolateLeft: "clamp",
|
|
141
|
+
extrapolateRight: "clamp",
|
|
142
|
+
easing: videoEasing.entrance
|
|
143
|
+
});
|
|
144
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
145
|
+
style: {
|
|
146
|
+
backgroundColor,
|
|
147
|
+
borderRadius: 16,
|
|
148
|
+
overflow: "hidden",
|
|
149
|
+
opacity,
|
|
150
|
+
boxShadow: "0 8px 32px rgba(0,0,0,0.3)"
|
|
151
|
+
},
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
154
|
+
style: {
|
|
155
|
+
display: "flex",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
padding: "12px 20px",
|
|
158
|
+
backgroundColor: "rgba(255,255,255,0.05)",
|
|
159
|
+
gap: 8
|
|
160
|
+
},
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
163
|
+
style: { display: "flex", gap: 8 },
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
166
|
+
style: {
|
|
167
|
+
width: 12,
|
|
168
|
+
height: 12,
|
|
169
|
+
borderRadius: "50%",
|
|
170
|
+
backgroundColor: "#ff5f57"
|
|
171
|
+
}
|
|
172
|
+
}, undefined, false, undefined, this),
|
|
173
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
174
|
+
style: {
|
|
175
|
+
width: 12,
|
|
176
|
+
height: 12,
|
|
177
|
+
borderRadius: "50%",
|
|
178
|
+
backgroundColor: "#febc2e"
|
|
179
|
+
}
|
|
180
|
+
}, undefined, false, undefined, this),
|
|
181
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
182
|
+
style: {
|
|
183
|
+
width: 12,
|
|
184
|
+
height: 12,
|
|
185
|
+
borderRadius: "50%",
|
|
186
|
+
backgroundColor: "#28c840"
|
|
187
|
+
}
|
|
188
|
+
}, undefined, false, undefined, this)
|
|
189
|
+
]
|
|
190
|
+
}, undefined, true, undefined, this),
|
|
191
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
192
|
+
style: {
|
|
193
|
+
flex: 1,
|
|
194
|
+
textAlign: "center",
|
|
195
|
+
color: "#484f58",
|
|
196
|
+
fontSize: codeStyle.fontSize * 0.7,
|
|
197
|
+
fontFamily: "monospace"
|
|
198
|
+
},
|
|
199
|
+
children: title
|
|
200
|
+
}, undefined, false, undefined, this)
|
|
201
|
+
]
|
|
202
|
+
}, undefined, true, undefined, this),
|
|
203
|
+
/* @__PURE__ */ jsxDEV("div", {
|
|
204
|
+
style: { padding: "24px 32px", minHeight: 200 },
|
|
205
|
+
children: lines.map((line, i) => {
|
|
206
|
+
const timing = lineTimings[i];
|
|
207
|
+
if (!timing || frame < timing.startFrame)
|
|
208
|
+
return null;
|
|
209
|
+
const isCommand = line.type === "command";
|
|
210
|
+
const lineColor = LINE_TYPE_COLORS[line.type];
|
|
211
|
+
let visibleText = line.text;
|
|
212
|
+
if (isCommand) {
|
|
213
|
+
const typingProgress = interpolate(frame, [timing.startFrame, timing.endFrame], [0, line.text.length], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
214
|
+
visibleText = line.text.slice(0, Math.floor(typingProgress));
|
|
215
|
+
}
|
|
216
|
+
const lineOpacity = isCommand ? 1 : interpolate(frame, [timing.startFrame, timing.startFrame + 5], [0, 1], {
|
|
217
|
+
extrapolateLeft: "clamp",
|
|
218
|
+
extrapolateRight: "clamp"
|
|
219
|
+
});
|
|
220
|
+
const isTyping = isCommand && frame >= timing.startFrame && frame <= timing.endFrame;
|
|
221
|
+
const showCursor = isTyping && frame % 16 < 10;
|
|
222
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
223
|
+
style: {
|
|
224
|
+
fontFamily: "'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",
|
|
225
|
+
fontSize: codeStyle.fontSize,
|
|
226
|
+
lineHeight: 1.8,
|
|
227
|
+
color: lineColor,
|
|
228
|
+
opacity: lineOpacity,
|
|
229
|
+
whiteSpace: "pre-wrap"
|
|
230
|
+
},
|
|
231
|
+
children: [
|
|
232
|
+
isCommand && /* @__PURE__ */ jsxDEV("span", {
|
|
233
|
+
style: { color: "#3fb950" },
|
|
234
|
+
children: prompt
|
|
235
|
+
}, undefined, false, undefined, this),
|
|
236
|
+
line.type === "comment" && /* @__PURE__ */ jsxDEV("span", {
|
|
237
|
+
style: { color: LINE_TYPE_COLORS.comment },
|
|
238
|
+
children: "# "
|
|
239
|
+
}, undefined, false, undefined, this),
|
|
240
|
+
visibleText,
|
|
241
|
+
showCursor && /* @__PURE__ */ jsxDEV("span", {
|
|
242
|
+
style: {
|
|
243
|
+
backgroundColor: "#c9d1d9",
|
|
244
|
+
width: "2px",
|
|
245
|
+
display: "inline-block",
|
|
246
|
+
height: "1.2em",
|
|
247
|
+
verticalAlign: "text-bottom"
|
|
248
|
+
},
|
|
249
|
+
children: "\xA0"
|
|
250
|
+
}, undefined, false, undefined, this)
|
|
251
|
+
]
|
|
252
|
+
}, `${i}-${line.text.slice(0, 20)}`, true, undefined, this);
|
|
253
|
+
})
|
|
254
|
+
}, undefined, false, undefined, this)
|
|
255
|
+
]
|
|
256
|
+
}, undefined, true, undefined, this);
|
|
257
|
+
};
|
|
258
|
+
export {
|
|
259
|
+
Terminal
|
|
260
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SceneTransitionType } from '@contractspec/lib.contracts-integrations/integrations/providers/video';
|
|
3
|
+
export interface SceneTransitionProps {
|
|
4
|
+
/** Transition type */
|
|
5
|
+
type: SceneTransitionType;
|
|
6
|
+
/** Duration of the transition in frames */
|
|
7
|
+
durationInFrames: number;
|
|
8
|
+
/** 'in' = entering, 'out' = exiting */
|
|
9
|
+
direction: 'in' | 'out';
|
|
10
|
+
/** Frame at which the transition starts (relative to sequence) */
|
|
11
|
+
startAt?: number;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const SceneTransitionWrapper: React.FC<SceneTransitionProps>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
4
|
+
// src/design/motion.ts
|
|
5
|
+
import { Easing } from "remotion";
|
|
6
|
+
var videoEasing = {
|
|
7
|
+
entrance: Easing.out(Easing.exp),
|
|
8
|
+
exit: Easing.in(Easing.exp),
|
|
9
|
+
emphasis: Easing.out(Easing.back(1.4)),
|
|
10
|
+
linear: Easing.linear,
|
|
11
|
+
gentle: Easing.bezier(0.25, 0.1, 0.25, 1),
|
|
12
|
+
spring: Easing.out(Easing.back(1.7))
|
|
13
|
+
};
|
|
14
|
+
var videoDurations = {
|
|
15
|
+
sceneTransition: 20,
|
|
16
|
+
textEntrance: 15,
|
|
17
|
+
textExit: 12,
|
|
18
|
+
codeTypingPerChar: 2,
|
|
19
|
+
sectionPause: 30,
|
|
20
|
+
emphasisPause: 15,
|
|
21
|
+
brandReveal: 25,
|
|
22
|
+
minScene: 60,
|
|
23
|
+
shortScene: 60,
|
|
24
|
+
mediumScene: 120,
|
|
25
|
+
longScene: 240
|
|
26
|
+
};
|
|
27
|
+
var videoTransitions = {
|
|
28
|
+
fade: { type: "fade", durationInFrames: 20 },
|
|
29
|
+
slideLeft: { type: "slide-left", durationInFrames: 20 },
|
|
30
|
+
slideRight: { type: "slide-right", durationInFrames: 20 },
|
|
31
|
+
wipe: { type: "wipe", durationInFrames: 15 },
|
|
32
|
+
none: { type: "none", durationInFrames: 0 }
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// src/compositions/primitives/transition.tsx
|
|
36
|
+
import { interpolate, useCurrentFrame } from "remotion";
|
|
37
|
+
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
38
|
+
var SceneTransitionWrapper = ({
|
|
39
|
+
type,
|
|
40
|
+
durationInFrames,
|
|
41
|
+
direction,
|
|
42
|
+
startAt = 0,
|
|
43
|
+
children
|
|
44
|
+
}) => {
|
|
45
|
+
const frame = useCurrentFrame();
|
|
46
|
+
if (type === "none" || durationInFrames === 0) {
|
|
47
|
+
return /* @__PURE__ */ jsxDEV(Fragment, {
|
|
48
|
+
children
|
|
49
|
+
}, undefined, false, undefined, this);
|
|
50
|
+
}
|
|
51
|
+
const progress = interpolate(frame, [startAt, startAt + durationInFrames], direction === "in" ? [0, 1] : [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
52
|
+
const styles = getTransitionStyles(type, progress);
|
|
53
|
+
return /* @__PURE__ */ jsxDEV("div", {
|
|
54
|
+
style: styles,
|
|
55
|
+
children
|
|
56
|
+
}, undefined, false, undefined, this);
|
|
57
|
+
};
|
|
58
|
+
function getTransitionStyles(type, progress) {
|
|
59
|
+
const eased = videoEasing.entrance(progress);
|
|
60
|
+
switch (type) {
|
|
61
|
+
case "fade":
|
|
62
|
+
return {
|
|
63
|
+
opacity: eased,
|
|
64
|
+
width: "100%",
|
|
65
|
+
height: "100%"
|
|
66
|
+
};
|
|
67
|
+
case "slide-left":
|
|
68
|
+
return {
|
|
69
|
+
opacity: eased,
|
|
70
|
+
transform: `translateX(${(1 - eased) * 100}%)`,
|
|
71
|
+
width: "100%",
|
|
72
|
+
height: "100%"
|
|
73
|
+
};
|
|
74
|
+
case "slide-right":
|
|
75
|
+
return {
|
|
76
|
+
opacity: eased,
|
|
77
|
+
transform: `translateX(${(1 - eased) * -100}%)`,
|
|
78
|
+
width: "100%",
|
|
79
|
+
height: "100%"
|
|
80
|
+
};
|
|
81
|
+
case "wipe":
|
|
82
|
+
return {
|
|
83
|
+
clipPath: `inset(0 ${(1 - eased) * 100}% 0 0)`,
|
|
84
|
+
width: "100%",
|
|
85
|
+
height: "100%"
|
|
86
|
+
};
|
|
87
|
+
default:
|
|
88
|
+
return { width: "100%", height: "100%" };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
SceneTransitionWrapper
|
|
93
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SocialClipProps {
|
|
3
|
+
/** Hook line -- the attention grabber (first 3 seconds) */
|
|
4
|
+
hook: string;
|
|
5
|
+
/** Main message / value proposition */
|
|
6
|
+
message: string;
|
|
7
|
+
/** Supporting points (shown as a list) */
|
|
8
|
+
points?: string[];
|
|
9
|
+
/** Call to action */
|
|
10
|
+
cta?: string;
|
|
11
|
+
/** CTA URL (displayed, not clickable in video) */
|
|
12
|
+
ctaUrl?: string;
|
|
13
|
+
/** Accent color override */
|
|
14
|
+
accentColor?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const SocialClip: React.FC<SocialClipProps>;
|