@contractspec/lib.video-gen 2.7.16 → 2.7.18
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 +1 -645
- package/dist/browser/compositions/index.js +1 -1133
- package/dist/browser/compositions/primitives/animated-text.js +1 -144
- package/dist/browser/compositions/primitives/brand-frame.js +1 -181
- package/dist/browser/compositions/primitives/code-block.js +1 -226
- package/dist/browser/compositions/primitives/index.js +1 -656
- package/dist/browser/compositions/primitives/progress-bar.js +1 -59
- package/dist/browser/compositions/primitives/terminal.js +1 -265
- package/dist/browser/compositions/primitives/transition.js +1 -98
- package/dist/browser/compositions/social-clip.js +1 -500
- package/dist/browser/compositions/terminal-demo.js +1 -558
- package/dist/browser/design/index.js +1 -155
- package/dist/browser/design/layouts.js +1 -50
- package/dist/browser/design/motion.js +1 -43
- package/dist/browser/design/tokens.js +1 -28
- package/dist/browser/design/typography.js +1 -61
- package/dist/browser/docs/compositions.docblock.js +1 -182
- package/dist/browser/docs/design.docblock.js +2 -17
- package/dist/browser/docs/generators.docblock.js +2 -24
- package/dist/browser/docs/rendering.docblock.js +2 -24
- package/dist/browser/docs/video-gen.docblock.js +2 -17
- package/dist/browser/generators/index.js +7 -769
- package/dist/browser/generators/scene-planner.js +7 -651
- package/dist/browser/generators/script-generator.js +7 -599
- package/dist/browser/generators/video-generator.js +7 -768
- package/dist/browser/i18n/catalogs/en.js +3 -135
- package/dist/browser/i18n/catalogs/es.js +3 -135
- package/dist/browser/i18n/catalogs/fr.js +3 -135
- package/dist/browser/i18n/catalogs/index.js +7 -387
- package/dist/browser/i18n/index.js +7 -459
- package/dist/browser/i18n/keys.js +1 -54
- package/dist/browser/i18n/locale.js +1 -21
- package/dist/browser/i18n/messages.js +7 -399
- package/dist/browser/index.js +7 -1903
- package/dist/browser/player/demo-player.js +1 -1136
- package/dist/browser/player/index.js +1 -1136
- package/dist/browser/remotion/Root.js +2 -1172
- package/dist/browser/remotion/index.js +2 -1173
- package/dist/browser/renderers/config.js +1 -40
- package/dist/browser/renderers/index.js +1 -160
- package/dist/browser/renderers/local.js +1 -156
- package/dist/browser/types.js +1 -13
- package/dist/compositions/api-overview.js +1 -639
- package/dist/compositions/index.js +1 -1127
- package/dist/compositions/primitives/animated-text.js +1 -138
- package/dist/compositions/primitives/brand-frame.js +1 -175
- package/dist/compositions/primitives/code-block.js +1 -220
- package/dist/compositions/primitives/index.js +1 -650
- package/dist/compositions/primitives/progress-bar.js +1 -53
- package/dist/compositions/primitives/terminal.js +1 -259
- package/dist/compositions/primitives/transition.js +1 -92
- package/dist/compositions/social-clip.js +1 -494
- package/dist/compositions/terminal-demo.js +1 -552
- package/dist/design/index.js +1 -149
- package/dist/design/layouts.js +1 -44
- package/dist/design/motion.js +1 -37
- package/dist/design/tokens.js +1 -22
- package/dist/design/typography.js +1 -55
- package/dist/docs/compositions.docblock.js +1 -182
- package/dist/docs/design.docblock.js +2 -17
- package/dist/docs/generators.docblock.js +2 -24
- package/dist/docs/rendering.docblock.js +2 -24
- package/dist/docs/video-gen.docblock.js +2 -17
- package/dist/generators/index.js +7 -763
- package/dist/generators/scene-planner.js +7 -645
- package/dist/generators/script-generator.js +7 -593
- package/dist/generators/video-generator.js +7 -762
- package/dist/i18n/catalogs/en.js +3 -129
- package/dist/i18n/catalogs/es.js +3 -129
- package/dist/i18n/catalogs/fr.js +3 -129
- package/dist/i18n/catalogs/index.js +7 -381
- package/dist/i18n/index.js +7 -453
- package/dist/i18n/keys.js +1 -48
- package/dist/i18n/locale.js +1 -15
- package/dist/i18n/messages.js +7 -393
- package/dist/index.js +7 -1897
- package/dist/node/compositions/api-overview.js +1 -640
- package/dist/node/compositions/index.js +1 -1128
- package/dist/node/compositions/primitives/animated-text.js +1 -139
- package/dist/node/compositions/primitives/brand-frame.js +1 -176
- package/dist/node/compositions/primitives/code-block.js +1 -221
- package/dist/node/compositions/primitives/index.js +1 -651
- package/dist/node/compositions/primitives/progress-bar.js +1 -54
- package/dist/node/compositions/primitives/terminal.js +1 -260
- package/dist/node/compositions/primitives/transition.js +1 -93
- package/dist/node/compositions/social-clip.js +1 -495
- package/dist/node/compositions/terminal-demo.js +1 -553
- package/dist/node/design/index.js +1 -150
- package/dist/node/design/layouts.js +1 -45
- package/dist/node/design/motion.js +1 -38
- package/dist/node/design/tokens.js +1 -23
- package/dist/node/design/typography.js +1 -56
- package/dist/node/docs/compositions.docblock.js +1 -182
- package/dist/node/docs/design.docblock.js +2 -17
- package/dist/node/docs/generators.docblock.js +2 -24
- package/dist/node/docs/rendering.docblock.js +2 -24
- package/dist/node/docs/video-gen.docblock.js +2 -17
- package/dist/node/generators/index.js +7 -764
- package/dist/node/generators/scene-planner.js +7 -646
- package/dist/node/generators/script-generator.js +7 -594
- package/dist/node/generators/video-generator.js +7 -763
- package/dist/node/i18n/catalogs/en.js +3 -130
- package/dist/node/i18n/catalogs/es.js +3 -130
- package/dist/node/i18n/catalogs/fr.js +3 -130
- package/dist/node/i18n/catalogs/index.js +7 -382
- package/dist/node/i18n/index.js +7 -454
- package/dist/node/i18n/keys.js +1 -49
- package/dist/node/i18n/locale.js +1 -16
- package/dist/node/i18n/messages.js +7 -394
- package/dist/node/index.js +7 -1898
- package/dist/node/player/demo-player.js +1 -1131
- package/dist/node/player/index.js +1 -1131
- package/dist/node/remotion/Root.js +2 -1167
- package/dist/node/remotion/index.js +2 -1168
- package/dist/node/renderers/config.js +1 -35
- package/dist/node/renderers/index.js +1 -155
- package/dist/node/renderers/local.js +1 -151
- package/dist/node/types.js +1 -8
- package/dist/player/demo-player.js +1 -1130
- package/dist/player/index.js +1 -1130
- package/dist/remotion/Root.js +2 -1166
- package/dist/remotion/index.js +2 -1167
- package/dist/renderers/config.js +1 -34
- package/dist/renderers/index.js +1 -154
- package/dist/renderers/local.js +1 -150
- package/dist/types.js +1 -7
- package/package.json +18 -18
|
@@ -1,640 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
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/animated-text.tsx
|
|
102
|
-
import { interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
103
|
-
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
104
|
-
var AnimatedText = ({
|
|
105
|
-
text,
|
|
106
|
-
variant = "body",
|
|
107
|
-
style: styleOverride,
|
|
108
|
-
enterAt = 0,
|
|
109
|
-
exitAt,
|
|
110
|
-
color = "#ffffff",
|
|
111
|
-
align = "left"
|
|
112
|
-
}) => {
|
|
113
|
-
const frame = useCurrentFrame();
|
|
114
|
-
const { width } = useVideoConfig();
|
|
115
|
-
const baseStyle = videoTypography[variant];
|
|
116
|
-
const scaled = scaleTypography(baseStyle, width);
|
|
117
|
-
const finalStyle = { ...scaled, ...styleOverride };
|
|
118
|
-
const enterProgress = interpolate(frame, [enterAt, enterAt + videoDurations.textEntrance], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
119
|
-
const enterOpacity = interpolate(enterProgress, [0, 1], [0, 1], {
|
|
120
|
-
easing: videoEasing.entrance
|
|
121
|
-
});
|
|
122
|
-
const enterTranslateY = interpolate(enterProgress, [0, 1], [30, 0], {
|
|
123
|
-
easing: videoEasing.entrance
|
|
124
|
-
});
|
|
125
|
-
let exitOpacity = 1;
|
|
126
|
-
let exitTranslateY = 0;
|
|
127
|
-
if (exitAt !== undefined) {
|
|
128
|
-
const exitProgress = interpolate(frame, [exitAt, exitAt + videoDurations.textExit], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
|
|
129
|
-
exitOpacity = interpolate(exitProgress, [0, 1], [1, 0], {
|
|
130
|
-
easing: videoEasing.exit
|
|
131
|
-
});
|
|
132
|
-
exitTranslateY = interpolate(exitProgress, [0, 1], [0, -20], {
|
|
133
|
-
easing: videoEasing.exit
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
const opacity = enterOpacity * exitOpacity;
|
|
137
|
-
const translateY = enterTranslateY + exitTranslateY;
|
|
138
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
139
|
-
style: {
|
|
140
|
-
fontSize: finalStyle.fontSize,
|
|
141
|
-
lineHeight: finalStyle.lineHeight,
|
|
142
|
-
fontWeight: finalStyle.fontWeight,
|
|
143
|
-
letterSpacing: finalStyle.letterSpacing,
|
|
144
|
-
color,
|
|
145
|
-
textAlign: align,
|
|
146
|
-
opacity,
|
|
147
|
-
transform: `translateY(${translateY}px)`,
|
|
148
|
-
willChange: "opacity, transform"
|
|
149
|
-
},
|
|
150
|
-
children: text
|
|
151
|
-
}, undefined, false, undefined, this);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
// src/design/layouts.ts
|
|
155
|
-
import { VIDEO_FORMATS } from "@contractspec/lib.contracts-integrations/integrations/providers/video";
|
|
156
|
-
var DEFAULT_FPS = 30;
|
|
157
|
-
var videoSafeZone = {
|
|
158
|
-
horizontal: 120,
|
|
159
|
-
vertical: 80,
|
|
160
|
-
contentWidth: 1680,
|
|
161
|
-
contentHeight: 920
|
|
162
|
-
};
|
|
163
|
-
function scaleSafeZone(format) {
|
|
164
|
-
const scaleX = format.width / 1920;
|
|
165
|
-
const scaleY = format.height / 1080;
|
|
166
|
-
return {
|
|
167
|
-
horizontal: Math.round(videoSafeZone.horizontal * scaleX),
|
|
168
|
-
vertical: Math.round(videoSafeZone.vertical * scaleY),
|
|
169
|
-
contentWidth: Math.round(videoSafeZone.contentWidth * scaleX),
|
|
170
|
-
contentHeight: Math.round(videoSafeZone.contentHeight * scaleY)
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
var videoPositions = {
|
|
174
|
-
center: { x: 960, y: 540 },
|
|
175
|
-
topLeft: { x: 120, y: 80 },
|
|
176
|
-
topRight: { x: 1800, y: 80 },
|
|
177
|
-
bottomLeft: { x: 120, y: 1000 },
|
|
178
|
-
bottomRight: { x: 1800, y: 1000 },
|
|
179
|
-
bottomCenter: { x: 960, y: 960 }
|
|
180
|
-
};
|
|
181
|
-
function getAllFormatVariants() {
|
|
182
|
-
return [
|
|
183
|
-
VIDEO_FORMATS.landscape,
|
|
184
|
-
VIDEO_FORMATS.square,
|
|
185
|
-
VIDEO_FORMATS.portrait
|
|
186
|
-
];
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
// src/compositions/primitives/brand-frame.tsx
|
|
190
|
-
import { interpolate as interpolate2, useCurrentFrame as useCurrentFrame2, useVideoConfig as useVideoConfig2 } from "remotion";
|
|
191
|
-
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
192
|
-
var BrandFrame = ({
|
|
193
|
-
styleOverrides,
|
|
194
|
-
showBranding = true,
|
|
195
|
-
animateEntrance = true,
|
|
196
|
-
variant = "gradient",
|
|
197
|
-
children
|
|
198
|
-
}) => {
|
|
199
|
-
const frame = useCurrentFrame2();
|
|
200
|
-
const { width, height } = useVideoConfig2();
|
|
201
|
-
const theme = defaultVideoTheme;
|
|
202
|
-
const safeZone = scaleSafeZone({ type: "custom", width, height });
|
|
203
|
-
const primaryColor = styleOverrides?.primaryColor ?? theme.colors.primary;
|
|
204
|
-
const _accentColor = styleOverrides?.accentColor ?? theme.colors.accent;
|
|
205
|
-
const isDark = styleOverrides?.darkMode ?? true;
|
|
206
|
-
let background;
|
|
207
|
-
switch (variant) {
|
|
208
|
-
case "solid":
|
|
209
|
-
background = isDark ? "#0a0a0a" : theme.colors.background;
|
|
210
|
-
break;
|
|
211
|
-
case "gradient":
|
|
212
|
-
background = isDark ? `linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)` : `linear-gradient(135deg, ${theme.colors.background} 0%, ${theme.colors.muted} 100%)`;
|
|
213
|
-
break;
|
|
214
|
-
case "dark":
|
|
215
|
-
background = "#000000";
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
const entranceOpacity = animateEntrance ? interpolate2(frame, [0, 15], [0, 1], {
|
|
219
|
-
extrapolateLeft: "clamp",
|
|
220
|
-
extrapolateRight: "clamp",
|
|
221
|
-
easing: videoEasing.entrance
|
|
222
|
-
}) : 1;
|
|
223
|
-
const brandOpacity = showBranding ? interpolate2(frame, [videoDurations.brandReveal, videoDurations.brandReveal + 15], [0, 0.3], {
|
|
224
|
-
extrapolateLeft: "clamp",
|
|
225
|
-
extrapolateRight: "clamp"
|
|
226
|
-
}) : 0;
|
|
227
|
-
return /* @__PURE__ */ jsxDEV2("div", {
|
|
228
|
-
style: {
|
|
229
|
-
width,
|
|
230
|
-
height,
|
|
231
|
-
background,
|
|
232
|
-
position: "relative",
|
|
233
|
-
overflow: "hidden",
|
|
234
|
-
opacity: entranceOpacity
|
|
235
|
-
},
|
|
236
|
-
children: [
|
|
237
|
-
variant === "gradient" && /* @__PURE__ */ jsxDEV2("div", {
|
|
238
|
-
style: {
|
|
239
|
-
position: "absolute",
|
|
240
|
-
top: "-20%",
|
|
241
|
-
right: "-10%",
|
|
242
|
-
width: "50%",
|
|
243
|
-
height: "50%",
|
|
244
|
-
background: `radial-gradient(circle, ${primaryColor}15 0%, transparent 70%)`,
|
|
245
|
-
borderRadius: "50%",
|
|
246
|
-
pointerEvents: "none"
|
|
247
|
-
}
|
|
248
|
-
}, undefined, false, undefined, this),
|
|
249
|
-
/* @__PURE__ */ jsxDEV2("div", {
|
|
250
|
-
style: {
|
|
251
|
-
position: "absolute",
|
|
252
|
-
left: safeZone.horizontal,
|
|
253
|
-
top: safeZone.vertical,
|
|
254
|
-
width: safeZone.contentWidth,
|
|
255
|
-
height: safeZone.contentHeight,
|
|
256
|
-
display: "flex",
|
|
257
|
-
flexDirection: "column"
|
|
258
|
-
},
|
|
259
|
-
children
|
|
260
|
-
}, undefined, false, undefined, this),
|
|
261
|
-
showBranding && /* @__PURE__ */ jsxDEV2("div", {
|
|
262
|
-
style: {
|
|
263
|
-
position: "absolute",
|
|
264
|
-
bottom: safeZone.vertical / 2,
|
|
265
|
-
right: safeZone.horizontal,
|
|
266
|
-
opacity: brandOpacity,
|
|
267
|
-
color: isDark ? "#ffffff" : "#000000",
|
|
268
|
-
fontSize: Math.round(16 * (width / 1920)),
|
|
269
|
-
fontWeight: 500,
|
|
270
|
-
letterSpacing: 1
|
|
271
|
-
},
|
|
272
|
-
children: "ContractSpec"
|
|
273
|
-
}, undefined, false, undefined, this)
|
|
274
|
-
]
|
|
275
|
-
}, undefined, true, undefined, this);
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
// src/compositions/primitives/code-block.tsx
|
|
279
|
-
import { interpolate as interpolate3, useCurrentFrame as useCurrentFrame3, useVideoConfig as useVideoConfig3 } from "remotion";
|
|
280
|
-
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
281
|
-
var CodeBlock = ({
|
|
282
|
-
code,
|
|
283
|
-
language = "typescript",
|
|
284
|
-
startAt = 0,
|
|
285
|
-
typeAnimation = true,
|
|
286
|
-
backgroundColor = defaultVideoColors.codeBackground,
|
|
287
|
-
textColor = "#abb2bf",
|
|
288
|
-
filename
|
|
289
|
-
}) => {
|
|
290
|
-
const frame = useCurrentFrame3();
|
|
291
|
-
const { width } = useVideoConfig3();
|
|
292
|
-
const codeStyle = scaleTypography(videoTypography.code, width);
|
|
293
|
-
const totalChars = code.length;
|
|
294
|
-
const typingDuration = totalChars * videoDurations.codeTypingPerChar;
|
|
295
|
-
const charsVisible = typeAnimation ? Math.floor(interpolate3(frame, [startAt, startAt + typingDuration], [0, totalChars], {
|
|
296
|
-
extrapolateLeft: "clamp",
|
|
297
|
-
extrapolateRight: "clamp"
|
|
298
|
-
})) : totalChars;
|
|
299
|
-
const visibleCode = code.slice(0, charsVisible);
|
|
300
|
-
const opacity = interpolate3(frame, [startAt, startAt + 10], [0, 1], {
|
|
301
|
-
extrapolateLeft: "clamp",
|
|
302
|
-
extrapolateRight: "clamp",
|
|
303
|
-
easing: videoEasing.entrance
|
|
304
|
-
});
|
|
305
|
-
const showCursor = typeAnimation && charsVisible < totalChars && frame % 16 < 10;
|
|
306
|
-
return /* @__PURE__ */ jsxDEV3("div", {
|
|
307
|
-
style: {
|
|
308
|
-
backgroundColor,
|
|
309
|
-
borderRadius: 16,
|
|
310
|
-
padding: 0,
|
|
311
|
-
opacity,
|
|
312
|
-
overflow: "hidden",
|
|
313
|
-
boxShadow: "0 8px 32px rgba(0,0,0,0.3)"
|
|
314
|
-
},
|
|
315
|
-
children: [
|
|
316
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
317
|
-
style: {
|
|
318
|
-
display: "flex",
|
|
319
|
-
alignItems: "center",
|
|
320
|
-
padding: "12px 20px",
|
|
321
|
-
backgroundColor: "rgba(0,0,0,0.2)",
|
|
322
|
-
gap: 8
|
|
323
|
-
},
|
|
324
|
-
children: [
|
|
325
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
326
|
-
style: { display: "flex", gap: 8 },
|
|
327
|
-
children: [
|
|
328
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
329
|
-
style: {
|
|
330
|
-
width: 12,
|
|
331
|
-
height: 12,
|
|
332
|
-
borderRadius: "50%",
|
|
333
|
-
backgroundColor: "#ff5f57"
|
|
334
|
-
}
|
|
335
|
-
}, undefined, false, undefined, this),
|
|
336
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
337
|
-
style: {
|
|
338
|
-
width: 12,
|
|
339
|
-
height: 12,
|
|
340
|
-
borderRadius: "50%",
|
|
341
|
-
backgroundColor: "#febc2e"
|
|
342
|
-
}
|
|
343
|
-
}, undefined, false, undefined, this),
|
|
344
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
345
|
-
style: {
|
|
346
|
-
width: 12,
|
|
347
|
-
height: 12,
|
|
348
|
-
borderRadius: "50%",
|
|
349
|
-
backgroundColor: "#28c840"
|
|
350
|
-
}
|
|
351
|
-
}, undefined, false, undefined, this)
|
|
352
|
-
]
|
|
353
|
-
}, undefined, true, undefined, this),
|
|
354
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
355
|
-
style: {
|
|
356
|
-
flex: 1,
|
|
357
|
-
textAlign: "center",
|
|
358
|
-
color: "#666",
|
|
359
|
-
fontSize: codeStyle.fontSize * 0.7,
|
|
360
|
-
fontFamily: "monospace"
|
|
361
|
-
},
|
|
362
|
-
children: filename ?? language
|
|
363
|
-
}, undefined, false, undefined, this)
|
|
364
|
-
]
|
|
365
|
-
}, undefined, true, undefined, this),
|
|
366
|
-
/* @__PURE__ */ jsxDEV3("div", {
|
|
367
|
-
style: { padding: "24px 32px" },
|
|
368
|
-
children: /* @__PURE__ */ jsxDEV3("pre", {
|
|
369
|
-
style: {
|
|
370
|
-
margin: 0,
|
|
371
|
-
fontFamily: "'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",
|
|
372
|
-
fontSize: codeStyle.fontSize,
|
|
373
|
-
lineHeight: codeStyle.lineHeight,
|
|
374
|
-
color: textColor,
|
|
375
|
-
whiteSpace: "pre-wrap",
|
|
376
|
-
wordBreak: "break-word"
|
|
377
|
-
},
|
|
378
|
-
children: [
|
|
379
|
-
visibleCode,
|
|
380
|
-
showCursor && /* @__PURE__ */ jsxDEV3("span", {
|
|
381
|
-
style: {
|
|
382
|
-
backgroundColor: textColor,
|
|
383
|
-
width: "2px",
|
|
384
|
-
display: "inline-block",
|
|
385
|
-
height: "1.2em",
|
|
386
|
-
verticalAlign: "text-bottom"
|
|
387
|
-
},
|
|
388
|
-
children: "\xA0"
|
|
389
|
-
}, undefined, false, undefined, this)
|
|
390
|
-
]
|
|
391
|
-
}, undefined, true, undefined, this)
|
|
392
|
-
}, undefined, false, undefined, this)
|
|
393
|
-
]
|
|
394
|
-
}, undefined, true, undefined, this);
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
// src/compositions/primitives/progress-bar.tsx
|
|
398
|
-
import { useCurrentFrame as useCurrentFrame4, useVideoConfig as useVideoConfig4 } from "remotion";
|
|
399
|
-
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
400
|
-
var ProgressBar = ({
|
|
401
|
-
height = 4,
|
|
402
|
-
color = defaultVideoTheme.colors.primary,
|
|
403
|
-
backgroundColor = "rgba(255,255,255,0.1)",
|
|
404
|
-
position = "bottom"
|
|
405
|
-
}) => {
|
|
406
|
-
const frame = useCurrentFrame4();
|
|
407
|
-
const { durationInFrames, width } = useVideoConfig4();
|
|
408
|
-
const progress = frame / durationInFrames;
|
|
409
|
-
return /* @__PURE__ */ jsxDEV4("div", {
|
|
410
|
-
style: {
|
|
411
|
-
position: "absolute",
|
|
412
|
-
[position]: 0,
|
|
413
|
-
left: 0,
|
|
414
|
-
width,
|
|
415
|
-
height,
|
|
416
|
-
backgroundColor,
|
|
417
|
-
zIndex: 100
|
|
418
|
-
},
|
|
419
|
-
children: /* @__PURE__ */ jsxDEV4("div", {
|
|
420
|
-
style: {
|
|
421
|
-
width: `${progress * 100}%`,
|
|
422
|
-
height: "100%",
|
|
423
|
-
backgroundColor: color,
|
|
424
|
-
transition: "none"
|
|
425
|
-
}
|
|
426
|
-
}, undefined, false, undefined, this)
|
|
427
|
-
}, undefined, false, undefined, this);
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
// src/compositions/api-overview.tsx
|
|
431
|
-
import {
|
|
432
|
-
AbsoluteFill,
|
|
433
|
-
interpolate as interpolate4,
|
|
434
|
-
Sequence,
|
|
435
|
-
useCurrentFrame as useCurrentFrame5,
|
|
436
|
-
useVideoConfig as useVideoConfig5
|
|
437
|
-
} from "remotion";
|
|
438
|
-
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
439
|
-
var ApiOverview = ({
|
|
440
|
-
specName,
|
|
441
|
-
method = "POST",
|
|
442
|
-
endpoint = "/api/users",
|
|
443
|
-
specCode,
|
|
444
|
-
generatedOutputs = [
|
|
445
|
-
"REST Endpoint",
|
|
446
|
-
"GraphQL Mutation",
|
|
447
|
-
"Prisma Model",
|
|
448
|
-
"TypeScript SDK",
|
|
449
|
-
"MCP Tool",
|
|
450
|
-
"OpenAPI Spec"
|
|
451
|
-
],
|
|
452
|
-
tagline = "One spec. Every surface."
|
|
453
|
-
}) => {
|
|
454
|
-
const { durationInFrames } = useVideoConfig5();
|
|
455
|
-
const theme = defaultVideoTheme;
|
|
456
|
-
const INTRO_END = 60;
|
|
457
|
-
const CODE_START = 45;
|
|
458
|
-
const CODE_END = INTRO_END + 150;
|
|
459
|
-
const OUTPUTS_START = CODE_END - 30;
|
|
460
|
-
const TAGLINE_START = durationInFrames - 90;
|
|
461
|
-
return /* @__PURE__ */ jsxDEV5(AbsoluteFill, {
|
|
462
|
-
children: [
|
|
463
|
-
/* @__PURE__ */ jsxDEV5(BrandFrame, {
|
|
464
|
-
variant: "gradient",
|
|
465
|
-
showBranding: true,
|
|
466
|
-
children: [
|
|
467
|
-
/* @__PURE__ */ jsxDEV5(Sequence, {
|
|
468
|
-
from: 0,
|
|
469
|
-
durationInFrames: CODE_END,
|
|
470
|
-
children: /* @__PURE__ */ jsxDEV5("div", {
|
|
471
|
-
style: {
|
|
472
|
-
flex: 1,
|
|
473
|
-
display: "flex",
|
|
474
|
-
flexDirection: "column",
|
|
475
|
-
gap: 16
|
|
476
|
-
},
|
|
477
|
-
children: [
|
|
478
|
-
/* @__PURE__ */ jsxDEV5("div", {
|
|
479
|
-
style: { display: "flex", alignItems: "center", gap: 16 },
|
|
480
|
-
children: [
|
|
481
|
-
/* @__PURE__ */ jsxDEV5(MethodBadge, {
|
|
482
|
-
method,
|
|
483
|
-
enterAt: 10
|
|
484
|
-
}, undefined, false, undefined, this),
|
|
485
|
-
/* @__PURE__ */ jsxDEV5(AnimatedText, {
|
|
486
|
-
text: endpoint,
|
|
487
|
-
variant: "subheading",
|
|
488
|
-
enterAt: 15,
|
|
489
|
-
color: theme.colors.mutedForeground
|
|
490
|
-
}, undefined, false, undefined, this)
|
|
491
|
-
]
|
|
492
|
-
}, undefined, true, undefined, this),
|
|
493
|
-
/* @__PURE__ */ jsxDEV5(AnimatedText, {
|
|
494
|
-
text: specName,
|
|
495
|
-
variant: "title",
|
|
496
|
-
enterAt: 5,
|
|
497
|
-
color: "#ffffff"
|
|
498
|
-
}, undefined, false, undefined, this),
|
|
499
|
-
/* @__PURE__ */ jsxDEV5("div", {
|
|
500
|
-
style: { flex: 1, marginTop: 24 },
|
|
501
|
-
children: /* @__PURE__ */ jsxDEV5(CodeBlock, {
|
|
502
|
-
code: specCode,
|
|
503
|
-
language: "typescript",
|
|
504
|
-
filename: `${specName.toLowerCase()}.contract.ts`,
|
|
505
|
-
startAt: CODE_START,
|
|
506
|
-
typeAnimation: true
|
|
507
|
-
}, undefined, false, undefined, this)
|
|
508
|
-
}, undefined, false, undefined, this)
|
|
509
|
-
]
|
|
510
|
-
}, undefined, true, undefined, this)
|
|
511
|
-
}, undefined, false, undefined, this),
|
|
512
|
-
/* @__PURE__ */ jsxDEV5(Sequence, {
|
|
513
|
-
from: OUTPUTS_START,
|
|
514
|
-
durationInFrames: durationInFrames - OUTPUTS_START,
|
|
515
|
-
children: /* @__PURE__ */ jsxDEV5("div", {
|
|
516
|
-
style: {
|
|
517
|
-
flex: 1,
|
|
518
|
-
display: "flex",
|
|
519
|
-
flexDirection: "column",
|
|
520
|
-
justifyContent: "center",
|
|
521
|
-
alignItems: "center",
|
|
522
|
-
gap: 24
|
|
523
|
-
},
|
|
524
|
-
children: [
|
|
525
|
-
/* @__PURE__ */ jsxDEV5(AnimatedText, {
|
|
526
|
-
text: "Generates:",
|
|
527
|
-
variant: "heading",
|
|
528
|
-
enterAt: 0,
|
|
529
|
-
color: "#ffffff",
|
|
530
|
-
align: "center"
|
|
531
|
-
}, undefined, false, undefined, this),
|
|
532
|
-
/* @__PURE__ */ jsxDEV5("div", {
|
|
533
|
-
style: {
|
|
534
|
-
display: "flex",
|
|
535
|
-
flexWrap: "wrap",
|
|
536
|
-
gap: 16,
|
|
537
|
-
justifyContent: "center",
|
|
538
|
-
maxWidth: "80%",
|
|
539
|
-
marginTop: 32
|
|
540
|
-
},
|
|
541
|
-
children: generatedOutputs.map((output, i) => /* @__PURE__ */ jsxDEV5(OutputChip, {
|
|
542
|
-
label: output,
|
|
543
|
-
index: i,
|
|
544
|
-
startFrame: 20 + i * 8
|
|
545
|
-
}, output, false, undefined, this))
|
|
546
|
-
}, undefined, false, undefined, this),
|
|
547
|
-
/* @__PURE__ */ jsxDEV5(Sequence, {
|
|
548
|
-
from: TAGLINE_START - OUTPUTS_START,
|
|
549
|
-
children: /* @__PURE__ */ jsxDEV5("div", {
|
|
550
|
-
style: { marginTop: 48 },
|
|
551
|
-
children: /* @__PURE__ */ jsxDEV5(AnimatedText, {
|
|
552
|
-
text: tagline,
|
|
553
|
-
variant: "heading",
|
|
554
|
-
enterAt: 0,
|
|
555
|
-
color: theme.colors.accent,
|
|
556
|
-
align: "center"
|
|
557
|
-
}, undefined, false, undefined, this)
|
|
558
|
-
}, undefined, false, undefined, this)
|
|
559
|
-
}, undefined, false, undefined, this)
|
|
560
|
-
]
|
|
561
|
-
}, undefined, true, undefined, this)
|
|
562
|
-
}, undefined, false, undefined, this)
|
|
563
|
-
]
|
|
564
|
-
}, undefined, true, undefined, this),
|
|
565
|
-
/* @__PURE__ */ jsxDEV5(ProgressBar, {}, undefined, false, undefined, this)
|
|
566
|
-
]
|
|
567
|
-
}, undefined, true, undefined, this);
|
|
568
|
-
};
|
|
569
|
-
var MethodBadge = ({
|
|
570
|
-
method,
|
|
571
|
-
enterAt
|
|
572
|
-
}) => {
|
|
573
|
-
const frame = useCurrentFrame5();
|
|
574
|
-
const opacity = interpolate4(frame, [enterAt, enterAt + 10], [0, 1], {
|
|
575
|
-
extrapolateLeft: "clamp",
|
|
576
|
-
extrapolateRight: "clamp",
|
|
577
|
-
easing: videoEasing.entrance
|
|
578
|
-
});
|
|
579
|
-
const scale = interpolate4(frame, [enterAt, enterAt + 12], [0.8, 1], {
|
|
580
|
-
extrapolateLeft: "clamp",
|
|
581
|
-
extrapolateRight: "clamp",
|
|
582
|
-
easing: videoEasing.emphasis
|
|
583
|
-
});
|
|
584
|
-
const methodColors = {
|
|
585
|
-
GET: "#61afef",
|
|
586
|
-
POST: "#98c379",
|
|
587
|
-
PUT: "#e5c07b",
|
|
588
|
-
PATCH: "#d19a66",
|
|
589
|
-
DELETE: "#e06c75"
|
|
590
|
-
};
|
|
591
|
-
return /* @__PURE__ */ jsxDEV5("div", {
|
|
592
|
-
style: {
|
|
593
|
-
opacity,
|
|
594
|
-
transform: `scale(${scale})`,
|
|
595
|
-
backgroundColor: methodColors[method] ?? "#61afef",
|
|
596
|
-
color: "#000",
|
|
597
|
-
padding: "8px 20px",
|
|
598
|
-
borderRadius: 8,
|
|
599
|
-
fontSize: 24,
|
|
600
|
-
fontWeight: 700,
|
|
601
|
-
fontFamily: "monospace",
|
|
602
|
-
letterSpacing: 1
|
|
603
|
-
},
|
|
604
|
-
children: method
|
|
605
|
-
}, undefined, false, undefined, this);
|
|
606
|
-
};
|
|
607
|
-
var OutputChip = ({ label, startFrame }) => {
|
|
608
|
-
const frame = useCurrentFrame5();
|
|
609
|
-
const opacity = interpolate4(frame, [startFrame, startFrame + 12], [0, 1], {
|
|
610
|
-
extrapolateLeft: "clamp",
|
|
611
|
-
extrapolateRight: "clamp"
|
|
612
|
-
});
|
|
613
|
-
const translateY = interpolate4(frame, [startFrame, startFrame + 15], [20, 0], {
|
|
614
|
-
extrapolateLeft: "clamp",
|
|
615
|
-
extrapolateRight: "clamp",
|
|
616
|
-
easing: videoEasing.emphasis
|
|
617
|
-
});
|
|
618
|
-
const scale = interpolate4(frame, [startFrame, startFrame + 15], [0.9, 1], {
|
|
619
|
-
extrapolateLeft: "clamp",
|
|
620
|
-
extrapolateRight: "clamp",
|
|
621
|
-
easing: videoEasing.emphasis
|
|
622
|
-
});
|
|
623
|
-
return /* @__PURE__ */ jsxDEV5("div", {
|
|
624
|
-
style: {
|
|
625
|
-
opacity,
|
|
626
|
-
transform: `translateY(${translateY}px) scale(${scale})`,
|
|
627
|
-
backgroundColor: "rgba(255,255,255,0.08)",
|
|
628
|
-
border: "1px solid rgba(255,255,255,0.15)",
|
|
629
|
-
color: "#ffffff",
|
|
630
|
-
padding: "16px 32px",
|
|
631
|
-
borderRadius: 12,
|
|
632
|
-
fontSize: 28,
|
|
633
|
-
fontWeight: 500
|
|
634
|
-
},
|
|
635
|
-
children: label
|
|
636
|
-
}, undefined, false, undefined, this);
|
|
637
|
-
};
|
|
638
|
-
export {
|
|
639
|
-
ApiOverview
|
|
640
|
-
};
|
|
2
|
+
var GH=import.meta.require;import{Easing as R}from"remotion";var L={entrance:R.out(R.exp),exit:R.in(R.exp),emphasis:R.out(R.back(1.4)),linear:R.linear,gentle:R.bezier(0.25,0.1,0.25,1),spring:R.out(R.back(1.7))},I={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},XH={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as V}from"@contractspec/lib.design-system";var C={canvasBackground:V.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:V.colors.accent,gradientStart:V.colors.primary,gradientEnd:V.colors.accent},B={...V,video:C};var k={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function F(J,H){let K=H/1920;return{...J,fontSize:Math.round(J.fontSize*K),letterSpacing:J.letterSpacing?Math.round(J.letterSpacing*K*10)/10:void 0}}import{interpolate as D,useCurrentFrame as o,useVideoConfig as s}from"remotion";import{jsx as i}from"react/jsx-runtime";var S=({text:J,variant:H="body",style:K,enterAt:Q=0,exitAt:$,color:z="#ffffff",align:X="left"})=>{let G=o(),{width:N}=s(),W=k[H],P={...F(W,N),...K},q=D(G,[Q,Q+I.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),M=D(q,[0,1],[0,1],{easing:L.entrance}),Y=D(q,[0,1],[30,0],{easing:L.entrance}),Z=1,y=0;if($!==void 0){let f=D(G,[$,$+I.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=D(f,[0,1],[1,0],{easing:L.exit}),y=D(f,[0,1],[0,-20],{easing:L.exit})}let d=M*Z,n=Y+y;return i("div",{style:{fontSize:P.fontSize,lineHeight:P.lineHeight,fontWeight:P.fontWeight,letterSpacing:P.letterSpacing,color:z,textAlign:X,opacity:d,transform:`translateY(${n}px)`,willChange:"opacity, transform"},children:J})};import{VIDEO_FORMATS as A}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var DH=30,E={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function h(J){let H=J.width/1920,K=J.height/1080;return{horizontal:Math.round(E.horizontal*H),vertical:Math.round(E.vertical*K),contentWidth:Math.round(E.contentWidth*H),contentHeight:Math.round(E.contentHeight*K)}}var wH={center:{x:960,y:540},topLeft:{x:120,y:80},topRight:{x:1800,y:80},bottomLeft:{x:120,y:1000},bottomRight:{x:1800,y:1000},bottomCenter:{x:960,y:960}};function VH(){return[A.landscape,A.square,A.portrait]}import{interpolate as x,useCurrentFrame as r,useVideoConfig as a}from"remotion";import{jsx as j,jsxs as t}from"react/jsx-runtime";var p=({styleOverrides:J,showBranding:H=!0,animateEntrance:K=!0,variant:Q="gradient",children:$})=>{let z=r(),{width:X,height:G}=a(),N=B,W=h({type:"custom",width:X,height:G}),_=J?.primaryColor??N.colors.primary,P=J?.accentColor??N.colors.accent,q=J?.darkMode??!0,M;switch(Q){case"solid":M=q?"#0a0a0a":N.colors.background;break;case"gradient":M=q?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${N.colors.background} 0%, ${N.colors.muted} 100%)`;break;case"dark":M="#000000";break}let Y=K?x(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}):1,Z=H?x(z,[I.brandReveal,I.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return t("div",{style:{width:X,height:G,background:M,position:"relative",overflow:"hidden",opacity:Y},children:[Q==="gradient"&&j("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${_}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),j("div",{style:{position:"absolute",left:W.horizontal,top:W.vertical,width:W.contentWidth,height:W.contentHeight,display:"flex",flexDirection:"column"},children:$}),H&&j("div",{style:{position:"absolute",bottom:W.vertical/2,right:W.horizontal,opacity:Z,color:q?"#ffffff":"#000000",fontSize:Math.round(16*(X/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as u,useCurrentFrame as e,useVideoConfig as HH}from"remotion";import{jsx as w,jsxs as T}from"react/jsx-runtime";var g=({code:J,language:H="typescript",startAt:K=0,typeAnimation:Q=!0,backgroundColor:$=C.codeBackground,textColor:z="#abb2bf",filename:X})=>{let G=e(),{width:N}=HH(),W=F(k.code,N),_=J.length,P=_*I.codeTypingPerChar,q=Q?Math.floor(u(G,[K,K+P],[0,_],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):_,M=J.slice(0,q),Y=u(G,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),Z=Q&&q<_&&G%16<10;return T("div",{style:{backgroundColor:$,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[T("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[T("div",{style:{display:"flex",gap:8},children:[w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),w("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:W.fontSize*0.7,fontFamily:"monospace"},children:X??H})]}),w("div",{style:{padding:"24px 32px"},children:T("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:W.fontSize,lineHeight:W.lineHeight,color:z,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[M,Z&&w("span",{style:{backgroundColor:z,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]})})]})};import{useCurrentFrame as JH,useVideoConfig as KH}from"remotion";import{jsx as c}from"react/jsx-runtime";var m=({height:J=4,color:H=B.colors.primary,backgroundColor:K="rgba(255,255,255,0.1)",position:Q="bottom"})=>{let $=JH(),{durationInFrames:z,width:X}=KH(),G=$/z;return c("div",{style:{position:"absolute",[Q]:0,left:0,width:X,height:J,backgroundColor:K,zIndex:100},children:c("div",{style:{width:`${G*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{AbsoluteFill as QH,interpolate as b,Sequence as v,useCurrentFrame as l,useVideoConfig as UH}from"remotion";import{jsx as U,jsxs as O}from"react/jsx-runtime";var sH=({specName:J,method:H="POST",endpoint:K="/api/users",specCode:Q,generatedOutputs:$=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:z="One spec. Every surface."})=>{let{durationInFrames:X}=UH(),G=B,N=60,W=45,_=210,P=180,q=X-90;return O(QH,{children:[O(p,{variant:"gradient",showBranding:!0,children:[U(v,{from:0,durationInFrames:210,children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[O("div",{style:{display:"flex",alignItems:"center",gap:16},children:[U($H,{method:H,enterAt:10}),U(S,{text:K,variant:"subheading",enterAt:15,color:G.colors.mutedForeground})]}),U(S,{text:J,variant:"title",enterAt:5,color:"#ffffff"}),U("div",{style:{flex:1,marginTop:24},children:U(g,{code:Q,language:"typescript",filename:`${J.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),U(v,{from:180,durationInFrames:X-180,children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[U(S,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),U("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:$.map((M,Y)=>U(zH,{label:M,index:Y,startFrame:20+Y*8},M))}),U(v,{from:q-180,children:U("div",{style:{marginTop:48},children:U(S,{text:z,variant:"heading",enterAt:0,color:G.colors.accent,align:"center"})})})]})})]}),U(m,{})]})},$H=({method:J,enterAt:H})=>{let K=l(),Q=b(K,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),$=b(K,[H,H+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return U("div",{style:{opacity:Q,transform:`scale(${$})`,backgroundColor:z[J]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:J})},zH=({label:J,startFrame:H})=>{let K=l(),Q=b(K,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),$=b(K,[H,H+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z=b(K,[H,H+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis});return U("div",{style:{opacity:Q,transform:`translateY(${$}px) scale(${z})`,backgroundColor:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.15)",color:"#ffffff",padding:"16px 32px",borderRadius:12,fontSize:28,fontWeight:500},children:J})};export{sH as ApiOverview};
|