@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.
Files changed (127) hide show
  1. package/dist/browser/compositions/api-overview.js +1 -645
  2. package/dist/browser/compositions/index.js +1 -1133
  3. package/dist/browser/compositions/primitives/animated-text.js +1 -144
  4. package/dist/browser/compositions/primitives/brand-frame.js +1 -181
  5. package/dist/browser/compositions/primitives/code-block.js +1 -226
  6. package/dist/browser/compositions/primitives/index.js +1 -656
  7. package/dist/browser/compositions/primitives/progress-bar.js +1 -59
  8. package/dist/browser/compositions/primitives/terminal.js +1 -265
  9. package/dist/browser/compositions/primitives/transition.js +1 -98
  10. package/dist/browser/compositions/social-clip.js +1 -500
  11. package/dist/browser/compositions/terminal-demo.js +1 -558
  12. package/dist/browser/design/index.js +1 -155
  13. package/dist/browser/design/layouts.js +1 -50
  14. package/dist/browser/design/motion.js +1 -43
  15. package/dist/browser/design/tokens.js +1 -28
  16. package/dist/browser/design/typography.js +1 -61
  17. package/dist/browser/docs/compositions.docblock.js +1 -182
  18. package/dist/browser/docs/design.docblock.js +2 -17
  19. package/dist/browser/docs/generators.docblock.js +2 -24
  20. package/dist/browser/docs/rendering.docblock.js +2 -24
  21. package/dist/browser/docs/video-gen.docblock.js +2 -17
  22. package/dist/browser/generators/index.js +7 -769
  23. package/dist/browser/generators/scene-planner.js +7 -651
  24. package/dist/browser/generators/script-generator.js +7 -599
  25. package/dist/browser/generators/video-generator.js +7 -768
  26. package/dist/browser/i18n/catalogs/en.js +3 -135
  27. package/dist/browser/i18n/catalogs/es.js +3 -135
  28. package/dist/browser/i18n/catalogs/fr.js +3 -135
  29. package/dist/browser/i18n/catalogs/index.js +7 -387
  30. package/dist/browser/i18n/index.js +7 -459
  31. package/dist/browser/i18n/keys.js +1 -54
  32. package/dist/browser/i18n/locale.js +1 -21
  33. package/dist/browser/i18n/messages.js +7 -399
  34. package/dist/browser/index.js +7 -1903
  35. package/dist/browser/player/demo-player.js +1 -1136
  36. package/dist/browser/player/index.js +1 -1136
  37. package/dist/browser/remotion/Root.js +2 -1172
  38. package/dist/browser/remotion/index.js +2 -1173
  39. package/dist/browser/renderers/config.js +1 -40
  40. package/dist/browser/renderers/index.js +1 -160
  41. package/dist/browser/renderers/local.js +1 -156
  42. package/dist/browser/types.js +1 -13
  43. package/dist/compositions/api-overview.js +1 -639
  44. package/dist/compositions/index.js +1 -1127
  45. package/dist/compositions/primitives/animated-text.js +1 -138
  46. package/dist/compositions/primitives/brand-frame.js +1 -175
  47. package/dist/compositions/primitives/code-block.js +1 -220
  48. package/dist/compositions/primitives/index.js +1 -650
  49. package/dist/compositions/primitives/progress-bar.js +1 -53
  50. package/dist/compositions/primitives/terminal.js +1 -259
  51. package/dist/compositions/primitives/transition.js +1 -92
  52. package/dist/compositions/social-clip.js +1 -494
  53. package/dist/compositions/terminal-demo.js +1 -552
  54. package/dist/design/index.js +1 -149
  55. package/dist/design/layouts.js +1 -44
  56. package/dist/design/motion.js +1 -37
  57. package/dist/design/tokens.js +1 -22
  58. package/dist/design/typography.js +1 -55
  59. package/dist/docs/compositions.docblock.js +1 -182
  60. package/dist/docs/design.docblock.js +2 -17
  61. package/dist/docs/generators.docblock.js +2 -24
  62. package/dist/docs/rendering.docblock.js +2 -24
  63. package/dist/docs/video-gen.docblock.js +2 -17
  64. package/dist/generators/index.js +7 -763
  65. package/dist/generators/scene-planner.js +7 -645
  66. package/dist/generators/script-generator.js +7 -593
  67. package/dist/generators/video-generator.js +7 -762
  68. package/dist/i18n/catalogs/en.js +3 -129
  69. package/dist/i18n/catalogs/es.js +3 -129
  70. package/dist/i18n/catalogs/fr.js +3 -129
  71. package/dist/i18n/catalogs/index.js +7 -381
  72. package/dist/i18n/index.js +7 -453
  73. package/dist/i18n/keys.js +1 -48
  74. package/dist/i18n/locale.js +1 -15
  75. package/dist/i18n/messages.js +7 -393
  76. package/dist/index.js +7 -1897
  77. package/dist/node/compositions/api-overview.js +1 -640
  78. package/dist/node/compositions/index.js +1 -1128
  79. package/dist/node/compositions/primitives/animated-text.js +1 -139
  80. package/dist/node/compositions/primitives/brand-frame.js +1 -176
  81. package/dist/node/compositions/primitives/code-block.js +1 -221
  82. package/dist/node/compositions/primitives/index.js +1 -651
  83. package/dist/node/compositions/primitives/progress-bar.js +1 -54
  84. package/dist/node/compositions/primitives/terminal.js +1 -260
  85. package/dist/node/compositions/primitives/transition.js +1 -93
  86. package/dist/node/compositions/social-clip.js +1 -495
  87. package/dist/node/compositions/terminal-demo.js +1 -553
  88. package/dist/node/design/index.js +1 -150
  89. package/dist/node/design/layouts.js +1 -45
  90. package/dist/node/design/motion.js +1 -38
  91. package/dist/node/design/tokens.js +1 -23
  92. package/dist/node/design/typography.js +1 -56
  93. package/dist/node/docs/compositions.docblock.js +1 -182
  94. package/dist/node/docs/design.docblock.js +2 -17
  95. package/dist/node/docs/generators.docblock.js +2 -24
  96. package/dist/node/docs/rendering.docblock.js +2 -24
  97. package/dist/node/docs/video-gen.docblock.js +2 -17
  98. package/dist/node/generators/index.js +7 -764
  99. package/dist/node/generators/scene-planner.js +7 -646
  100. package/dist/node/generators/script-generator.js +7 -594
  101. package/dist/node/generators/video-generator.js +7 -763
  102. package/dist/node/i18n/catalogs/en.js +3 -130
  103. package/dist/node/i18n/catalogs/es.js +3 -130
  104. package/dist/node/i18n/catalogs/fr.js +3 -130
  105. package/dist/node/i18n/catalogs/index.js +7 -382
  106. package/dist/node/i18n/index.js +7 -454
  107. package/dist/node/i18n/keys.js +1 -49
  108. package/dist/node/i18n/locale.js +1 -16
  109. package/dist/node/i18n/messages.js +7 -394
  110. package/dist/node/index.js +7 -1898
  111. package/dist/node/player/demo-player.js +1 -1131
  112. package/dist/node/player/index.js +1 -1131
  113. package/dist/node/remotion/Root.js +2 -1167
  114. package/dist/node/remotion/index.js +2 -1168
  115. package/dist/node/renderers/config.js +1 -35
  116. package/dist/node/renderers/index.js +1 -155
  117. package/dist/node/renderers/local.js +1 -151
  118. package/dist/node/types.js +1 -8
  119. package/dist/player/demo-player.js +1 -1130
  120. package/dist/player/index.js +1 -1130
  121. package/dist/remotion/Root.js +2 -1166
  122. package/dist/remotion/index.js +2 -1167
  123. package/dist/renderers/config.js +1 -34
  124. package/dist/renderers/index.js +1 -154
  125. package/dist/renderers/local.js +1 -150
  126. package/dist/types.js +1 -7
  127. package/package.json +18 -18
@@ -1,1128 +1 @@
1
- import { createRequire } from "node:module";
2
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
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: " "
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
-
639
- // src/compositions/primitives/terminal.tsx
640
- import { interpolate as interpolate5, useCurrentFrame as useCurrentFrame6, useVideoConfig as useVideoConfig6 } from "remotion";
641
- import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
642
- var LINE_TYPE_COLORS = {
643
- command: "#c9d1d9",
644
- output: "#8b949e",
645
- error: "#f85149",
646
- success: "#3fb950",
647
- comment: "#6e7681"
648
- };
649
- var Terminal = ({
650
- lines,
651
- startAt = 0,
652
- prompt = "$ ",
653
- title = "Terminal",
654
- backgroundColor = defaultVideoColors.terminalBackground,
655
- typingSpeed = videoDurations.codeTypingPerChar
656
- }) => {
657
- const frame = useCurrentFrame6();
658
- const { width } = useVideoConfig6();
659
- const codeStyle = scaleTypography(videoTypography.code, width);
660
- const lineTimings = [];
661
- let currentFrame = startAt;
662
- for (const line of lines) {
663
- const delay = line.delay ?? 10;
664
- const lineStart = currentFrame + delay;
665
- if (line.type === "command") {
666
- const typeDuration = line.text.length * typingSpeed;
667
- lineTimings.push({
668
- startFrame: lineStart,
669
- endFrame: lineStart + typeDuration
670
- });
671
- currentFrame = lineStart + typeDuration;
672
- } else {
673
- lineTimings.push({ startFrame: lineStart, endFrame: lineStart + 5 });
674
- currentFrame = lineStart + 5;
675
- }
676
- }
677
- const opacity = interpolate5(frame, [startAt, startAt + 10], [0, 1], {
678
- extrapolateLeft: "clamp",
679
- extrapolateRight: "clamp",
680
- easing: videoEasing.entrance
681
- });
682
- return /* @__PURE__ */ jsxDEV6("div", {
683
- style: {
684
- backgroundColor,
685
- borderRadius: 16,
686
- overflow: "hidden",
687
- opacity,
688
- boxShadow: "0 8px 32px rgba(0,0,0,0.3)"
689
- },
690
- children: [
691
- /* @__PURE__ */ jsxDEV6("div", {
692
- style: {
693
- display: "flex",
694
- alignItems: "center",
695
- padding: "12px 20px",
696
- backgroundColor: "rgba(255,255,255,0.05)",
697
- gap: 8
698
- },
699
- children: [
700
- /* @__PURE__ */ jsxDEV6("div", {
701
- style: { display: "flex", gap: 8 },
702
- children: [
703
- /* @__PURE__ */ jsxDEV6("div", {
704
- style: {
705
- width: 12,
706
- height: 12,
707
- borderRadius: "50%",
708
- backgroundColor: "#ff5f57"
709
- }
710
- }, undefined, false, undefined, this),
711
- /* @__PURE__ */ jsxDEV6("div", {
712
- style: {
713
- width: 12,
714
- height: 12,
715
- borderRadius: "50%",
716
- backgroundColor: "#febc2e"
717
- }
718
- }, undefined, false, undefined, this),
719
- /* @__PURE__ */ jsxDEV6("div", {
720
- style: {
721
- width: 12,
722
- height: 12,
723
- borderRadius: "50%",
724
- backgroundColor: "#28c840"
725
- }
726
- }, undefined, false, undefined, this)
727
- ]
728
- }, undefined, true, undefined, this),
729
- /* @__PURE__ */ jsxDEV6("div", {
730
- style: {
731
- flex: 1,
732
- textAlign: "center",
733
- color: "#484f58",
734
- fontSize: codeStyle.fontSize * 0.7,
735
- fontFamily: "monospace"
736
- },
737
- children: title
738
- }, undefined, false, undefined, this)
739
- ]
740
- }, undefined, true, undefined, this),
741
- /* @__PURE__ */ jsxDEV6("div", {
742
- style: { padding: "24px 32px", minHeight: 200 },
743
- children: lines.map((line, i) => {
744
- const timing = lineTimings[i];
745
- if (!timing || frame < timing.startFrame)
746
- return null;
747
- const isCommand = line.type === "command";
748
- const lineColor = LINE_TYPE_COLORS[line.type];
749
- let visibleText = line.text;
750
- if (isCommand) {
751
- const typingProgress = interpolate5(frame, [timing.startFrame, timing.endFrame], [0, line.text.length], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
752
- visibleText = line.text.slice(0, Math.floor(typingProgress));
753
- }
754
- const lineOpacity = isCommand ? 1 : interpolate5(frame, [timing.startFrame, timing.startFrame + 5], [0, 1], {
755
- extrapolateLeft: "clamp",
756
- extrapolateRight: "clamp"
757
- });
758
- const isTyping = isCommand && frame >= timing.startFrame && frame <= timing.endFrame;
759
- const showCursor = isTyping && frame % 16 < 10;
760
- return /* @__PURE__ */ jsxDEV6("div", {
761
- style: {
762
- fontFamily: "'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",
763
- fontSize: codeStyle.fontSize,
764
- lineHeight: 1.8,
765
- color: lineColor,
766
- opacity: lineOpacity,
767
- whiteSpace: "pre-wrap"
768
- },
769
- children: [
770
- isCommand && /* @__PURE__ */ jsxDEV6("span", {
771
- style: { color: "#3fb950" },
772
- children: prompt
773
- }, undefined, false, undefined, this),
774
- line.type === "comment" && /* @__PURE__ */ jsxDEV6("span", {
775
- style: { color: LINE_TYPE_COLORS.comment },
776
- children: "# "
777
- }, undefined, false, undefined, this),
778
- visibleText,
779
- showCursor && /* @__PURE__ */ jsxDEV6("span", {
780
- style: {
781
- backgroundColor: "#c9d1d9",
782
- width: "2px",
783
- display: "inline-block",
784
- height: "1.2em",
785
- verticalAlign: "text-bottom"
786
- },
787
- children: " "
788
- }, undefined, false, undefined, this)
789
- ]
790
- }, `${i}-${line.text.slice(0, 20)}`, true, undefined, this);
791
- })
792
- }, undefined, false, undefined, this)
793
- ]
794
- }, undefined, true, undefined, this);
795
- };
796
-
797
- // src/compositions/primitives/transition.tsx
798
- import { interpolate as interpolate6, useCurrentFrame as useCurrentFrame7 } from "remotion";
799
- import { jsxDEV as jsxDEV7, Fragment } from "react/jsx-dev-runtime";
800
- var SceneTransitionWrapper = ({
801
- type,
802
- durationInFrames,
803
- direction,
804
- startAt = 0,
805
- children
806
- }) => {
807
- const frame = useCurrentFrame7();
808
- if (type === "none" || durationInFrames === 0) {
809
- return /* @__PURE__ */ jsxDEV7(Fragment, {
810
- children
811
- }, undefined, false, undefined, this);
812
- }
813
- const progress = interpolate6(frame, [startAt, startAt + durationInFrames], direction === "in" ? [0, 1] : [1, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });
814
- const styles = getTransitionStyles(type, progress);
815
- return /* @__PURE__ */ jsxDEV7("div", {
816
- style: styles,
817
- children
818
- }, undefined, false, undefined, this);
819
- };
820
- function getTransitionStyles(type, progress) {
821
- const eased = videoEasing.entrance(progress);
822
- switch (type) {
823
- case "fade":
824
- return {
825
- opacity: eased,
826
- width: "100%",
827
- height: "100%"
828
- };
829
- case "slide-left":
830
- return {
831
- opacity: eased,
832
- transform: `translateX(${(1 - eased) * 100}%)`,
833
- width: "100%",
834
- height: "100%"
835
- };
836
- case "slide-right":
837
- return {
838
- opacity: eased,
839
- transform: `translateX(${(1 - eased) * -100}%)`,
840
- width: "100%",
841
- height: "100%"
842
- };
843
- case "wipe":
844
- return {
845
- clipPath: `inset(0 ${(1 - eased) * 100}% 0 0)`,
846
- width: "100%",
847
- height: "100%"
848
- };
849
- default:
850
- return { width: "100%", height: "100%" };
851
- }
852
- }
853
- // src/compositions/social-clip.tsx
854
- import {
855
- AbsoluteFill as AbsoluteFill2,
856
- interpolate as interpolate7,
857
- Sequence as Sequence2,
858
- useCurrentFrame as useCurrentFrame8,
859
- useVideoConfig as useVideoConfig7
860
- } from "remotion";
861
- import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
862
- var SocialClip = ({
863
- hook,
864
- message,
865
- points = [],
866
- cta = "Learn more",
867
- ctaUrl = "contractspec.dev",
868
- accentColor
869
- }) => {
870
- const { durationInFrames, width, height } = useVideoConfig7();
871
- const theme = defaultVideoTheme;
872
- const accent = accentColor ?? theme.colors.accent;
873
- const isPortrait = height > width;
874
- const HOOK_DURATION = 75;
875
- const MESSAGE_START = 60;
876
- const POINTS_START = MESSAGE_START + 60;
877
- const CTA_START = durationInFrames - 90;
878
- return /* @__PURE__ */ jsxDEV8(AbsoluteFill2, {
879
- children: [
880
- /* @__PURE__ */ jsxDEV8(BrandFrame, {
881
- variant: "gradient",
882
- showBranding: true,
883
- children: /* @__PURE__ */ jsxDEV8("div", {
884
- style: {
885
- flex: 1,
886
- display: "flex",
887
- flexDirection: "column",
888
- justifyContent: "center",
889
- alignItems: "center",
890
- gap: isPortrait ? 48 : 32,
891
- textAlign: "center",
892
- padding: isPortrait ? "0 20px" : 0
893
- },
894
- children: [
895
- /* @__PURE__ */ jsxDEV8(Sequence2, {
896
- from: 0,
897
- durationInFrames: HOOK_DURATION + 30,
898
- children: /* @__PURE__ */ jsxDEV8("div", {
899
- style: { width: "100%" },
900
- children: /* @__PURE__ */ jsxDEV8(AnimatedText, {
901
- text: hook,
902
- variant: "title",
903
- enterAt: 5,
904
- exitAt: HOOK_DURATION,
905
- color: "#ffffff",
906
- align: "center"
907
- }, undefined, false, undefined, this)
908
- }, undefined, false, undefined, this)
909
- }, undefined, false, undefined, this),
910
- /* @__PURE__ */ jsxDEV8(Sequence2, {
911
- from: MESSAGE_START,
912
- children: /* @__PURE__ */ jsxDEV8("div", {
913
- style: { width: "100%" },
914
- children: /* @__PURE__ */ jsxDEV8(AnimatedText, {
915
- text: message,
916
- variant: isPortrait ? "subheading" : "heading",
917
- enterAt: 0,
918
- color: "#ffffff",
919
- align: "center"
920
- }, undefined, false, undefined, this)
921
- }, undefined, false, undefined, this)
922
- }, undefined, false, undefined, this),
923
- points.length > 0 && /* @__PURE__ */ jsxDEV8(Sequence2, {
924
- from: POINTS_START,
925
- children: /* @__PURE__ */ jsxDEV8("div", {
926
- style: {
927
- display: "flex",
928
- flexDirection: "column",
929
- gap: 16,
930
- alignItems: isPortrait ? "flex-start" : "center",
931
- width: "100%",
932
- maxWidth: isPortrait ? "100%" : "80%",
933
- marginTop: 16
934
- },
935
- children: points.map((point, i) => /* @__PURE__ */ jsxDEV8(PointItem, {
936
- text: point,
937
- index: i,
938
- startFrame: i * 15,
939
- accent
940
- }, point, false, undefined, this))
941
- }, undefined, false, undefined, this)
942
- }, undefined, false, undefined, this),
943
- /* @__PURE__ */ jsxDEV8(Sequence2, {
944
- from: CTA_START,
945
- children: /* @__PURE__ */ jsxDEV8(CTABlock, {
946
- cta,
947
- url: ctaUrl,
948
- accent
949
- }, undefined, false, undefined, this)
950
- }, undefined, false, undefined, this)
951
- ]
952
- }, undefined, true, undefined, this)
953
- }, undefined, false, undefined, this),
954
- /* @__PURE__ */ jsxDEV8(ProgressBar, {
955
- color: accent
956
- }, undefined, false, undefined, this)
957
- ]
958
- }, undefined, true, undefined, this);
959
- };
960
- var PointItem = ({ text, startFrame, accent }) => {
961
- const frame = useCurrentFrame8();
962
- const opacity = interpolate7(frame, [startFrame, startFrame + 12], [0, 1], {
963
- extrapolateLeft: "clamp",
964
- extrapolateRight: "clamp"
965
- });
966
- const translateX = interpolate7(frame, [startFrame, startFrame + 15], [-30, 0], {
967
- extrapolateLeft: "clamp",
968
- extrapolateRight: "clamp",
969
- easing: videoEasing.entrance
970
- });
971
- return /* @__PURE__ */ jsxDEV8("div", {
972
- style: {
973
- opacity,
974
- transform: `translateX(${translateX}px)`,
975
- display: "flex",
976
- alignItems: "center",
977
- gap: 16,
978
- fontSize: 28,
979
- color: "#ffffff"
980
- },
981
- children: [
982
- /* @__PURE__ */ jsxDEV8("div", {
983
- style: {
984
- width: 8,
985
- height: 8,
986
- borderRadius: "50%",
987
- backgroundColor: accent,
988
- flexShrink: 0
989
- }
990
- }, undefined, false, undefined, this),
991
- text
992
- ]
993
- }, undefined, true, undefined, this);
994
- };
995
- var CTABlock = ({ cta, url, accent }) => {
996
- const frame = useCurrentFrame8();
997
- const opacity = interpolate7(frame, [0, 15], [0, 1], {
998
- extrapolateLeft: "clamp",
999
- extrapolateRight: "clamp"
1000
- });
1001
- const scale = interpolate7(frame, [0, 18], [0.9, 1], {
1002
- extrapolateLeft: "clamp",
1003
- extrapolateRight: "clamp",
1004
- easing: videoEasing.emphasis
1005
- });
1006
- return /* @__PURE__ */ jsxDEV8("div", {
1007
- style: {
1008
- opacity,
1009
- transform: `scale(${scale})`,
1010
- display: "flex",
1011
- flexDirection: "column",
1012
- alignItems: "center",
1013
- gap: 12,
1014
- marginTop: 24
1015
- },
1016
- children: [
1017
- /* @__PURE__ */ jsxDEV8("div", {
1018
- style: {
1019
- backgroundColor: accent,
1020
- color: "#ffffff",
1021
- padding: "16px 48px",
1022
- borderRadius: 12,
1023
- fontSize: 28,
1024
- fontWeight: 600
1025
- },
1026
- children: cta
1027
- }, undefined, false, undefined, this),
1028
- /* @__PURE__ */ jsxDEV8("div", {
1029
- style: { color: "rgba(255,255,255,0.5)", fontSize: 20 },
1030
- children: url
1031
- }, undefined, false, undefined, this)
1032
- ]
1033
- }, undefined, true, undefined, this);
1034
- };
1035
-
1036
- // src/compositions/terminal-demo.tsx
1037
- import { AbsoluteFill as AbsoluteFill3, Sequence as Sequence3, useVideoConfig as useVideoConfig8 } from "remotion";
1038
- import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
1039
- var TerminalDemo = ({
1040
- title,
1041
- subtitle,
1042
- lines,
1043
- terminalTitle = "Terminal",
1044
- prompt = "$ ",
1045
- summary
1046
- }) => {
1047
- const { durationInFrames } = useVideoConfig8();
1048
- const theme = defaultVideoTheme;
1049
- const TERMINAL_START = 40;
1050
- const SUMMARY_START = durationInFrames - 90;
1051
- return /* @__PURE__ */ jsxDEV9(AbsoluteFill3, {
1052
- children: [
1053
- /* @__PURE__ */ jsxDEV9(BrandFrame, {
1054
- variant: "dark",
1055
- showBranding: true,
1056
- children: /* @__PURE__ */ jsxDEV9("div", {
1057
- style: {
1058
- flex: 1,
1059
- display: "flex",
1060
- flexDirection: "column",
1061
- gap: 24
1062
- },
1063
- children: [
1064
- /* @__PURE__ */ jsxDEV9("div", {
1065
- children: [
1066
- /* @__PURE__ */ jsxDEV9(AnimatedText, {
1067
- text: title,
1068
- variant: "heading",
1069
- enterAt: 5,
1070
- color: "#ffffff"
1071
- }, undefined, false, undefined, this),
1072
- subtitle && /* @__PURE__ */ jsxDEV9("div", {
1073
- style: { marginTop: 8 },
1074
- children: /* @__PURE__ */ jsxDEV9(AnimatedText, {
1075
- text: subtitle,
1076
- variant: "body",
1077
- enterAt: 15,
1078
- color: theme.colors.mutedForeground
1079
- }, undefined, false, undefined, this)
1080
- }, undefined, false, undefined, this)
1081
- ]
1082
- }, undefined, true, undefined, this),
1083
- /* @__PURE__ */ jsxDEV9(Sequence3, {
1084
- from: TERMINAL_START,
1085
- children: /* @__PURE__ */ jsxDEV9("div", {
1086
- style: { flex: 1 },
1087
- children: /* @__PURE__ */ jsxDEV9(Terminal, {
1088
- lines,
1089
- startAt: 0,
1090
- prompt,
1091
- title: terminalTitle
1092
- }, undefined, false, undefined, this)
1093
- }, undefined, false, undefined, this)
1094
- }, undefined, false, undefined, this),
1095
- summary && /* @__PURE__ */ jsxDEV9(Sequence3, {
1096
- from: SUMMARY_START,
1097
- children: /* @__PURE__ */ jsxDEV9("div", {
1098
- style: {
1099
- marginTop: "auto",
1100
- paddingTop: 24
1101
- },
1102
- children: /* @__PURE__ */ jsxDEV9(AnimatedText, {
1103
- text: summary,
1104
- variant: "subheading",
1105
- enterAt: 0,
1106
- color: theme.colors.accent,
1107
- align: "center"
1108
- }, undefined, false, undefined, this)
1109
- }, undefined, false, undefined, this)
1110
- }, undefined, false, undefined, this)
1111
- ]
1112
- }, undefined, true, undefined, this)
1113
- }, undefined, false, undefined, this),
1114
- /* @__PURE__ */ jsxDEV9(ProgressBar, {}, undefined, false, undefined, this)
1115
- ]
1116
- }, undefined, true, undefined, this);
1117
- };
1118
- export {
1119
- TerminalDemo,
1120
- Terminal,
1121
- SocialClip,
1122
- SceneTransitionWrapper,
1123
- ProgressBar,
1124
- CodeBlock,
1125
- BrandFrame,
1126
- ApiOverview,
1127
- AnimatedText
1128
- };
1
+ import{createRequire as XH}from"node:module";var uH=XH(import.meta.url);import{Easing as w}from"remotion";var L={entrance:w.out(w.exp),exit:w.in(w.exp),emphasis:w.out(w.back(1.4)),linear:w.linear,gentle:w.bezier(0.25,0.1,0.25,1),spring:w.out(w.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},dH={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 A}from"@contractspec/lib.design-system";var f={canvasBackground:A.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:A.colors.accent,gradientStart:A.colors.primary,gradientEnd:A.colors.accent},V={...A,video:f};var T={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(K,H){let J=H/1920;return{...K,fontSize:Math.round(K.fontSize*J),letterSpacing:K.letterSpacing?Math.round(K.letterSpacing*J*10)/10:void 0}}import{interpolate as C,useCurrentFrame as LH,useVideoConfig as PH}from"remotion";import{jsx as MH}from"react/jsx-runtime";var _=({text:K,variant:H="body",style:J,enterAt:Q=0,exitAt:$,color:z="#ffffff",align:G="left"})=>{let X=LH(),{width:N}=PH(),P=T[H],R={...F(P,N),...J},U=C(X,[Q,Q+I.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),M=C(U,[0,1],[0,1],{easing:L.entrance}),W=C(U,[0,1],[30,0],{easing:L.entrance}),Y=1,k=0;if($!==void 0){let d=C(X,[$,$+I.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Y=C(d,[0,1],[1,0],{easing:L.exit}),k=C(d,[0,1],[0,-20],{easing:L.exit})}let E=M*Y,m=W+k;return MH("div",{style:{fontSize:R.fontSize,lineHeight:R.lineHeight,fontWeight:R.fontWeight,letterSpacing:R.letterSpacing,color:z,textAlign:G,opacity:E,transform:`translateY(${m}px)`,willChange:"opacity, transform"},children:K})};import{VIDEO_FORMATS as l}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var JJ=30,p={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function t(K){let H=K.width/1920,J=K.height/1080;return{horizontal:Math.round(p.horizontal*H),vertical:Math.round(p.vertical*J),contentWidth:Math.round(p.contentWidth*H),contentHeight:Math.round(p.contentHeight*J)}}var KJ={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 QJ(){return[l.landscape,l.square,l.portrait]}import{interpolate as e,useCurrentFrame as NH,useVideoConfig as qH}from"remotion";import{jsx as o,jsxs as RH}from"react/jsx-runtime";var b=({styleOverrides:K,showBranding:H=!0,animateEntrance:J=!0,variant:Q="gradient",children:$})=>{let z=NH(),{width:G,height:X}=qH(),N=V,P=t({type:"custom",width:G,height:X}),q=K?.primaryColor??N.colors.primary,R=K?.accentColor??N.colors.accent,U=K?.darkMode??!0,M;switch(Q){case"solid":M=U?"#0a0a0a":N.colors.background;break;case"gradient":M=U?"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 W=J?e(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}):1,Y=H?e(z,[I.brandReveal,I.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return RH("div",{style:{width:G,height:X,background:M,position:"relative",overflow:"hidden",opacity:W},children:[Q==="gradient"&&o("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${q}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),o("div",{style:{position:"absolute",left:P.horizontal,top:P.vertical,width:P.contentWidth,height:P.contentHeight,display:"flex",flexDirection:"column"},children:$}),H&&o("div",{style:{position:"absolute",bottom:P.vertical/2,right:P.horizontal,opacity:Y,color:U?"#ffffff":"#000000",fontSize:Math.round(16*(G/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as HH,useCurrentFrame as YH,useVideoConfig as BH}from"remotion";import{jsx as v,jsxs as j}from"react/jsx-runtime";var n=({code:K,language:H="typescript",startAt:J=0,typeAnimation:Q=!0,backgroundColor:$=f.codeBackground,textColor:z="#abb2bf",filename:G})=>{let X=YH(),{width:N}=BH(),P=F(T.code,N),q=K.length,R=q*I.codeTypingPerChar,U=Q?Math.floor(HH(X,[J,J+R],[0,q],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):q,M=K.slice(0,U),W=HH(X,[J,J+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),Y=Q&&U<q&&X%16<10;return j("div",{style:{backgroundColor:$,borderRadius:16,padding:0,opacity:W,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[j("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[j("div",{style:{display:"flex",gap:8},children:[v("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),v("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),v("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),v("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:P.fontSize*0.7,fontFamily:"monospace"},children:G??H})]}),v("div",{style:{padding:"24px 32px"},children:j("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:P.fontSize,lineHeight:P.lineHeight,color:z,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[M,Y&&v("span",{style:{backgroundColor:z,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as ZH,useVideoConfig as _H}from"remotion";import{jsx as JH}from"react/jsx-runtime";var S=({height:K=4,color:H=V.colors.primary,backgroundColor:J="rgba(255,255,255,0.1)",position:Q="bottom"})=>{let $=ZH(),{durationInFrames:z,width:G}=_H(),X=$/z;return JH("div",{style:{position:"absolute",[Q]:0,left:0,width:G,height:K,backgroundColor:J,zIndex:100},children:JH("div",{style:{width:`${X*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{AbsoluteFill as DH,interpolate as h,Sequence as r,useCurrentFrame as KH,useVideoConfig as wH}from"remotion";import{jsx as B,jsxs as y}from"react/jsx-runtime";var IH=({specName:K,method:H="POST",endpoint:J="/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:G}=wH(),X=V,N=60,P=45,q=210,R=180,U=G-90;return y(DH,{children:[y(b,{variant:"gradient",showBranding:!0,children:[B(r,{from:0,durationInFrames:210,children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[y("div",{style:{display:"flex",alignItems:"center",gap:16},children:[B(VH,{method:H,enterAt:10}),B(_,{text:J,variant:"subheading",enterAt:15,color:X.colors.mutedForeground})]}),B(_,{text:K,variant:"title",enterAt:5,color:"#ffffff"}),B("div",{style:{flex:1,marginTop:24},children:B(n,{code:Q,language:"typescript",filename:`${K.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),B(r,{from:180,durationInFrames:G-180,children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[B(_,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),B("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:$.map((M,W)=>B(OH,{label:M,index:W,startFrame:20+W*8},M))}),B(r,{from:U-180,children:B("div",{style:{marginTop:48},children:B(_,{text:z,variant:"heading",enterAt:0,color:X.colors.accent,align:"center"})})})]})})]}),B(S,{})]})},VH=({method:K,enterAt:H})=>{let J=KH(),Q=h(J,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),$=h(J,[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 B("div",{style:{opacity:Q,transform:`scale(${$})`,backgroundColor:z[K]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:K})},OH=({label:K,startFrame:H})=>{let J=KH(),Q=h(J,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),$=h(J,[H,H+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z=h(J,[H,H+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis});return B("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:K})};import{interpolate as s,useCurrentFrame as kH,useVideoConfig as EH}from"remotion";import{jsx as O,jsxs as x}from"react/jsx-runtime";var QH={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},a=({lines:K,startAt:H=0,prompt:J="$ ",title:Q="Terminal",backgroundColor:$=f.terminalBackground,typingSpeed:z=I.codeTypingPerChar})=>{let G=kH(),{width:X}=EH(),N=F(T.code,X),P=[],q=H;for(let U of K){let M=U.delay??10,W=q+M;if(U.type==="command"){let Y=U.text.length*z;P.push({startFrame:W,endFrame:W+Y}),q=W+Y}else P.push({startFrame:W,endFrame:W+5}),q=W+5}let R=s(G,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance});return x("div",{style:{backgroundColor:$,borderRadius:16,overflow:"hidden",opacity:R,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[x("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[x("div",{style:{display:"flex",gap:8},children:[O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),O("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:N.fontSize*0.7,fontFamily:"monospace"},children:Q})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:K.map((U,M)=>{let W=P[M];if(!W||G<W.startFrame)return null;let Y=U.type==="command",k=QH[U.type],E=U.text;if(Y){let UH=s(G,[W.startFrame,W.endFrame],[0,U.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=U.text.slice(0,Math.floor(UH))}let m=Y?1:s(G,[W.startFrame,W.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),WH=Y&&G>=W.startFrame&&G<=W.endFrame&&G%16<10;return x("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:N.fontSize,lineHeight:1.8,color:k,opacity:m,whiteSpace:"pre-wrap"},children:[Y&&O("span",{style:{color:"#3fb950"},children:J}),U.type==="comment"&&O("span",{style:{color:QH.comment},children:"# "}),E,WH&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${M}-${U.text.slice(0,20)}`)})})]})};import{interpolate as bH,useCurrentFrame as SH}from"remotion";import{jsx as $H,Fragment as CH}from"react/jsx-runtime";var TH=({type:K,durationInFrames:H,direction:J,startAt:Q=0,children:$})=>{let z=SH();if(K==="none"||H===0)return $H(CH,{children:$});let G=bH(z,[Q,Q+H],J==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),X=FH(K,G);return $H("div",{style:X,children:$})};function FH(K,H){let J=L.entrance(H);switch(K){case"fade":return{opacity:J,width:"100%",height:"100%"};case"slide-left":return{opacity:J,transform:`translateX(${(1-J)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:J,transform:`translateX(${(1-J)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-J)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as vH,interpolate as u,Sequence as g,useCurrentFrame as zH,useVideoConfig as AH}from"remotion";import{jsx as Z,jsxs as c}from"react/jsx-runtime";var fH=({hook:K,message:H,points:J=[],cta:Q="Learn more",ctaUrl:$="contractspec.dev",accentColor:z})=>{let{durationInFrames:G,width:X,height:N}=AH(),q=z??V.colors.accent,R=N>X,U=75,M=60,W=120,Y=G-90;return c(vH,{children:[Z(b,{variant:"gradient",showBranding:!0,children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:R?48:32,textAlign:"center",padding:R?"0 20px":0},children:[Z(g,{from:0,durationInFrames:105,children:Z("div",{style:{width:"100%"},children:Z(_,{text:K,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),Z(g,{from:60,children:Z("div",{style:{width:"100%"},children:Z(_,{text:H,variant:R?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),J.length>0&&Z(g,{from:120,children:Z("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:R?"flex-start":"center",width:"100%",maxWidth:R?"100%":"80%",marginTop:16},children:J.map((k,E)=>Z(yH,{text:k,index:E,startFrame:E*15,accent:q},k))})}),Z(g,{from:Y,children:Z(hH,{cta:Q,url:$,accent:q})})]})}),Z(S,{color:q})]})},yH=({text:K,startFrame:H,accent:J})=>{let Q=zH(),$=u(Q,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),z=u(Q,[H,H+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance});return c("div",{style:{opacity:$,transform:`translateX(${z}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[Z("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:J,flexShrink:0}}),K]})},hH=({cta:K,url:H,accent:J})=>{let Q=zH(),$=u(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),z=u(Q,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis});return c("div",{style:{opacity:$,transform:`scale(${z})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[Z("div",{style:{backgroundColor:J,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:K}),Z("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:H})]})};import{AbsoluteFill as pH,Sequence as GH,useVideoConfig as jH}from"remotion";import{jsx as D,jsxs as i}from"react/jsx-runtime";var xH=({title:K,subtitle:H,lines:J,terminalTitle:Q="Terminal",prompt:$="$ ",summary:z})=>{let{durationInFrames:G}=jH(),X=V,N=40,P=G-90;return i(pH,{children:[D(b,{variant:"dark",showBranding:!0,children:i("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[i("div",{children:[D(_,{text:K,variant:"heading",enterAt:5,color:"#ffffff"}),H&&D("div",{style:{marginTop:8},children:D(_,{text:H,variant:"body",enterAt:15,color:X.colors.mutedForeground})})]}),D(GH,{from:40,children:D("div",{style:{flex:1},children:D(a,{lines:J,startAt:0,prompt:$,title:Q})})}),z&&D(GH,{from:P,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(_,{text:z,variant:"subheading",enterAt:0,color:X.colors.accent,align:"center"})})})]})}),D(S,{})]})};export{xH as TerminalDemo,a as Terminal,fH as SocialClip,TH as SceneTransitionWrapper,S as ProgressBar,n as CodeBlock,b as BrandFrame,IH as ApiOverview,_ as AnimatedText};