@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,150 +1,2 @@
1
1
  // @bun
2
- var __require = import.meta.require;
3
-
4
- // src/design/motion.ts
5
- import { Easing } from "remotion";
6
- var videoEasing = {
7
- entrance: Easing.out(Easing.exp),
8
- exit: Easing.in(Easing.exp),
9
- emphasis: Easing.out(Easing.back(1.4)),
10
- linear: Easing.linear,
11
- gentle: Easing.bezier(0.25, 0.1, 0.25, 1),
12
- spring: Easing.out(Easing.back(1.7))
13
- };
14
- var videoDurations = {
15
- sceneTransition: 20,
16
- textEntrance: 15,
17
- textExit: 12,
18
- codeTypingPerChar: 2,
19
- sectionPause: 30,
20
- emphasisPause: 15,
21
- brandReveal: 25,
22
- minScene: 60,
23
- shortScene: 60,
24
- mediumScene: 120,
25
- longScene: 240
26
- };
27
- var videoTransitions = {
28
- fade: { type: "fade", durationInFrames: 20 },
29
- slideLeft: { type: "slide-left", durationInFrames: 20 },
30
- slideRight: { type: "slide-right", durationInFrames: 20 },
31
- wipe: { type: "wipe", durationInFrames: 15 },
32
- none: { type: "none", durationInFrames: 0 }
33
- };
34
-
35
- // src/design/tokens.ts
36
- import { defaultTokens } from "@contractspec/lib.design-system";
37
- var defaultVideoColors = {
38
- canvasBackground: defaultTokens.colors.background,
39
- codeBackground: "#1e1e2e",
40
- terminalBackground: "#0d1117",
41
- terminalForeground: "#c9d1d9",
42
- highlight: defaultTokens.colors.accent,
43
- gradientStart: defaultTokens.colors.primary,
44
- gradientEnd: defaultTokens.colors.accent
45
- };
46
- var defaultVideoTheme = {
47
- ...defaultTokens,
48
- video: defaultVideoColors
49
- };
50
-
51
- // src/design/typography.ts
52
- var videoTypography = {
53
- title: {
54
- fontSize: 72,
55
- lineHeight: 1.1,
56
- fontWeight: 700,
57
- letterSpacing: -1
58
- },
59
- heading: {
60
- fontSize: 56,
61
- lineHeight: 1.2,
62
- fontWeight: 600,
63
- letterSpacing: -0.5
64
- },
65
- subheading: {
66
- fontSize: 40,
67
- lineHeight: 1.25,
68
- fontWeight: 500
69
- },
70
- body: {
71
- fontSize: 32,
72
- lineHeight: 1.5,
73
- fontWeight: 400
74
- },
75
- code: {
76
- fontSize: 28,
77
- lineHeight: 1.6,
78
- fontWeight: 400
79
- },
80
- caption: {
81
- fontSize: 24,
82
- lineHeight: 1.4,
83
- fontWeight: 400
84
- },
85
- label: {
86
- fontSize: 20,
87
- lineHeight: 1.3,
88
- fontWeight: 600,
89
- letterSpacing: 1
90
- }
91
- };
92
- function scaleTypography(style, targetWidth) {
93
- const scale = targetWidth / 1920;
94
- return {
95
- ...style,
96
- fontSize: Math.round(style.fontSize * scale),
97
- letterSpacing: style.letterSpacing ? Math.round(style.letterSpacing * scale * 10) / 10 : undefined
98
- };
99
- }
100
-
101
- // src/design/layouts.ts
102
- import { VIDEO_FORMATS } from "@contractspec/lib.contracts-integrations/integrations/providers/video";
103
- var DEFAULT_FPS = 30;
104
- var videoSafeZone = {
105
- horizontal: 120,
106
- vertical: 80,
107
- contentWidth: 1680,
108
- contentHeight: 920
109
- };
110
- function scaleSafeZone(format) {
111
- const scaleX = format.width / 1920;
112
- const scaleY = format.height / 1080;
113
- return {
114
- horizontal: Math.round(videoSafeZone.horizontal * scaleX),
115
- vertical: Math.round(videoSafeZone.vertical * scaleY),
116
- contentWidth: Math.round(videoSafeZone.contentWidth * scaleX),
117
- contentHeight: Math.round(videoSafeZone.contentHeight * scaleY)
118
- };
119
- }
120
- var videoPositions = {
121
- center: { x: 960, y: 540 },
122
- topLeft: { x: 120, y: 80 },
123
- topRight: { x: 1800, y: 80 },
124
- bottomLeft: { x: 120, y: 1000 },
125
- bottomRight: { x: 1800, y: 1000 },
126
- bottomCenter: { x: 960, y: 960 }
127
- };
128
- function getAllFormatVariants() {
129
- return [
130
- VIDEO_FORMATS.landscape,
131
- VIDEO_FORMATS.square,
132
- VIDEO_FORMATS.portrait
133
- ];
134
- }
135
- export {
136
- videoTypography,
137
- videoTransitions,
138
- videoSafeZone,
139
- videoPositions,
140
- videoEasing,
141
- videoDurations,
142
- scaleTypography,
143
- scaleSafeZone,
144
- getAllFormatVariants,
145
- defaultVideoTheme,
146
- defaultVideoColors,
147
- defaultTokens,
148
- VIDEO_FORMATS,
149
- DEFAULT_FPS
150
- };
2
+ var K=import.meta.require;import{Easing as x}from"remotion";var Q={entrance:x.out(x.exp),exit:x.in(x.exp),emphasis:x.out(x.back(1.4)),linear:x.linear,gentle:x.bezier(0.25,0.1,0.25,1),spring:x.out(x.back(1.7))},U={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},$={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 z}from"@contractspec/lib.design-system";var J={canvasBackground:z.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:z.colors.accent,gradientStart:z.colors.primary,gradientEnd:z.colors.accent},C={...z,video:J};var X={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 Y(j,B){let q=B/1920;return{...j,fontSize:Math.round(j.fontSize*q),letterSpacing:j.letterSpacing?Math.round(j.letterSpacing*q*10)/10:void 0}}import{VIDEO_FORMATS as H}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var A=30,G={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function D(j){let B=j.width/1920,q=j.height/1080;return{horizontal:Math.round(G.horizontal*B),vertical:Math.round(G.vertical*q),contentWidth:Math.round(G.contentWidth*B),contentHeight:Math.round(G.contentHeight*q)}}var F={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 I(){return[H.landscape,H.square,H.portrait]}export{X as videoTypography,$ as videoTransitions,G as videoSafeZone,F as videoPositions,Q as videoEasing,U as videoDurations,Y as scaleTypography,D as scaleSafeZone,I as getAllFormatVariants,C as defaultVideoTheme,J as defaultVideoColors,z as defaultTokens,H as VIDEO_FORMATS,A as DEFAULT_FPS};
@@ -1,45 +1,2 @@
1
1
  // @bun
2
- var __require = import.meta.require;
3
-
4
- // src/design/layouts.ts
5
- import { VIDEO_FORMATS } from "@contractspec/lib.contracts-integrations/integrations/providers/video";
6
- var DEFAULT_FPS = 30;
7
- var videoSafeZone = {
8
- horizontal: 120,
9
- vertical: 80,
10
- contentWidth: 1680,
11
- contentHeight: 920
12
- };
13
- function scaleSafeZone(format) {
14
- const scaleX = format.width / 1920;
15
- const scaleY = format.height / 1080;
16
- return {
17
- horizontal: Math.round(videoSafeZone.horizontal * scaleX),
18
- vertical: Math.round(videoSafeZone.vertical * scaleY),
19
- contentWidth: Math.round(videoSafeZone.contentWidth * scaleX),
20
- contentHeight: Math.round(videoSafeZone.contentHeight * scaleY)
21
- };
22
- }
23
- var videoPositions = {
24
- center: { x: 960, y: 540 },
25
- topLeft: { x: 120, y: 80 },
26
- topRight: { x: 1800, y: 80 },
27
- bottomLeft: { x: 120, y: 1000 },
28
- bottomRight: { x: 1800, y: 1000 },
29
- bottomCenter: { x: 960, y: 960 }
30
- };
31
- function getAllFormatVariants() {
32
- return [
33
- VIDEO_FORMATS.landscape,
34
- VIDEO_FORMATS.square,
35
- VIDEO_FORMATS.portrait
36
- ];
37
- }
38
- export {
39
- videoSafeZone,
40
- videoPositions,
41
- scaleSafeZone,
42
- getAllFormatVariants,
43
- VIDEO_FORMATS,
44
- DEFAULT_FPS
45
- };
2
+ var w=import.meta.require;import{VIDEO_FORMATS as j}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var z=30,h={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function B(k){let q=k.width/1920,u=k.height/1080;return{horizontal:Math.round(h.horizontal*q),vertical:Math.round(h.vertical*u),contentWidth:Math.round(h.contentWidth*q),contentHeight:Math.round(h.contentHeight*u)}}var C={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 G(){return[j.landscape,j.square,j.portrait]}export{h as videoSafeZone,C as videoPositions,B as scaleSafeZone,G as getAllFormatVariants,j as VIDEO_FORMATS,z as DEFAULT_FPS};
@@ -1,38 +1,2 @@
1
1
  // @bun
2
- var __require = import.meta.require;
3
-
4
- // src/design/motion.ts
5
- import { Easing } from "remotion";
6
- var videoEasing = {
7
- entrance: Easing.out(Easing.exp),
8
- exit: Easing.in(Easing.exp),
9
- emphasis: Easing.out(Easing.back(1.4)),
10
- linear: Easing.linear,
11
- gentle: Easing.bezier(0.25, 0.1, 0.25, 1),
12
- spring: Easing.out(Easing.back(1.7))
13
- };
14
- var videoDurations = {
15
- sceneTransition: 20,
16
- textEntrance: 15,
17
- textExit: 12,
18
- codeTypingPerChar: 2,
19
- sectionPause: 30,
20
- emphasisPause: 15,
21
- brandReveal: 25,
22
- minScene: 60,
23
- shortScene: 60,
24
- mediumScene: 120,
25
- longScene: 240
26
- };
27
- var videoTransitions = {
28
- fade: { type: "fade", durationInFrames: 20 },
29
- slideLeft: { type: "slide-left", durationInFrames: 20 },
30
- slideRight: { type: "slide-right", durationInFrames: 20 },
31
- wipe: { type: "wipe", durationInFrames: 15 },
32
- none: { type: "none", durationInFrames: 0 }
33
- };
34
- export {
35
- videoTransitions,
36
- videoEasing,
37
- videoDurations
38
- };
2
+ var h=import.meta.require;import{Easing as d}from"remotion";var p={entrance:d.out(d.exp),exit:d.in(d.exp),emphasis:d.out(d.back(1.4)),linear:d.linear,gentle:d.bezier(0.25,0.1,0.25,1),spring:d.out(d.back(1.7))},q={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},v={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}};export{v as videoTransitions,p as videoEasing,q as videoDurations};
@@ -1,23 +1,2 @@
1
1
  // @bun
2
- var __require = import.meta.require;
3
-
4
- // src/design/tokens.ts
5
- import { defaultTokens } from "@contractspec/lib.design-system";
6
- var defaultVideoColors = {
7
- canvasBackground: defaultTokens.colors.background,
8
- codeBackground: "#1e1e2e",
9
- terminalBackground: "#0d1117",
10
- terminalForeground: "#c9d1d9",
11
- highlight: defaultTokens.colors.accent,
12
- gradientStart: defaultTokens.colors.primary,
13
- gradientEnd: defaultTokens.colors.accent
14
- };
15
- var defaultVideoTheme = {
16
- ...defaultTokens,
17
- video: defaultVideoColors
18
- };
19
- export {
20
- defaultVideoTheme,
21
- defaultVideoColors,
22
- defaultTokens
23
- };
2
+ var z=import.meta.require;import{defaultTokens as j}from"@contractspec/lib.design-system";var q={canvasBackground:j.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:j.colors.accent,gradientStart:j.colors.primary,gradientEnd:j.colors.accent},D={...j,video:q};export{D as defaultVideoTheme,q as defaultVideoColors,j as defaultTokens};
@@ -1,56 +1,2 @@
1
1
  // @bun
2
- var __require = import.meta.require;
3
-
4
- // src/design/typography.ts
5
- var videoTypography = {
6
- title: {
7
- fontSize: 72,
8
- lineHeight: 1.1,
9
- fontWeight: 700,
10
- letterSpacing: -1
11
- },
12
- heading: {
13
- fontSize: 56,
14
- lineHeight: 1.2,
15
- fontWeight: 600,
16
- letterSpacing: -0.5
17
- },
18
- subheading: {
19
- fontSize: 40,
20
- lineHeight: 1.25,
21
- fontWeight: 500
22
- },
23
- body: {
24
- fontSize: 32,
25
- lineHeight: 1.5,
26
- fontWeight: 400
27
- },
28
- code: {
29
- fontSize: 28,
30
- lineHeight: 1.6,
31
- fontWeight: 400
32
- },
33
- caption: {
34
- fontSize: 24,
35
- lineHeight: 1.4,
36
- fontWeight: 400
37
- },
38
- label: {
39
- fontSize: 20,
40
- lineHeight: 1.3,
41
- fontWeight: 600,
42
- letterSpacing: 1
43
- }
44
- };
45
- function scaleTypography(style, targetWidth) {
46
- const scale = targetWidth / 1920;
47
- return {
48
- ...style,
49
- fontSize: Math.round(style.fontSize * scale),
50
- letterSpacing: style.letterSpacing ? Math.round(style.letterSpacing * scale * 10) / 10 : undefined
51
- };
52
- }
53
- export {
54
- videoTypography,
55
- scaleTypography
56
- };
2
+ var m=import.meta.require;var u={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 z(b,k){let j=k/1920;return{...b,fontSize:Math.round(b.fontSize*j),letterSpacing:b.letterSpacing?Math.round(b.letterSpacing*j*10)/10:void 0}}export{u as videoTypography,z as scaleTypography};
@@ -1,183 +1,2 @@
1
1
  // @bun
2
- // src/docs/compositions.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var compositionsDocBlocks = [
5
- {
6
- id: "docs.video-gen.compositions",
7
- title: "Video Compositions & Primitives",
8
- summary: "Remotion composition components and reusable primitives for building programmatic videos.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/video-gen/compositions",
12
- tags: ["video", "remotion", "compositions", "primitives", "react"],
13
- owners: ["@contractspec/lib.video-gen"],
14
- body: `# Video Compositions & Primitives
15
-
16
- Compositions are React components rendered by Remotion. They use \`useCurrentFrame()\`, \`useVideoConfig()\`, and \`interpolate()\` to produce frame-accurate animations. All compositions must be **deterministic**: same props = same visual output.
17
-
18
- ## Primitive Components
19
-
20
- Primitives are reusable building blocks for constructing full compositions.
21
-
22
- \`\`\`ts
23
- import {
24
- AnimatedText,
25
- CodeBlock,
26
- Terminal,
27
- BrandFrame,
28
- ProgressBar,
29
- SceneTransitionWrapper,
30
- } from "@contractspec/lib.video-gen/compositions/primitives";
31
- \`\`\`
32
-
33
- ### AnimatedText
34
-
35
- Text with entrance/exit slide + fade animations.
36
-
37
- | Prop | Type | Default | Description |
38
- |------|------|---------|-------------|
39
- | \`text\` | \`string\` | -- | Text content |
40
- | \`variant\` | \`keyof videoTypography\` | \`"body"\` | Typography preset (title, heading, subheading, body, code, caption, label) |
41
- | \`enterAt\` | \`number\` | \`0\` | Frame at which text enters |
42
- | \`exitAt\` | \`number\` | -- | Frame at which text exits (omit to keep visible) |
43
- | \`color\` | \`string\` | \`"#ffffff"\` | Text color |
44
- | \`align\` | \`"left" \\| "center" \\| "right"\` | \`"left"\` | Text alignment |
45
-
46
- ### CodeBlock
47
-
48
- Syntax-aware code display with typing animation and macOS-style title bar.
49
-
50
- | Prop | Type | Default | Description |
51
- |------|------|---------|-------------|
52
- | \`code\` | \`string\` | -- | Code string to display |
53
- | \`language\` | \`string\` | \`"typescript"\` | Language label in the title bar |
54
- | \`startAt\` | \`number\` | \`0\` | Frame at which typing starts |
55
- | \`typeAnimation\` | \`boolean\` | \`true\` | Animate character-by-character typing |
56
- | \`filename\` | \`string\` | -- | Filename in the title bar (overrides language) |
57
-
58
- ### Terminal
59
-
60
- CLI simulator with command typing, output lines, and cursor animation.
61
-
62
- | Prop | Type | Default | Description |
63
- |------|------|---------|-------------|
64
- | \`lines\` | \`TerminalLine[]\` | -- | Lines to display in sequence |
65
- | \`startAt\` | \`number\` | \`0\` | Frame at which terminal appears |
66
- | \`prompt\` | \`string\` | \`"$ "\` | Prompt string before commands |
67
- | \`title\` | \`string\` | \`"Terminal"\` | Title bar text |
68
- | \`typingSpeed\` | \`number\` | \`2\` | Frames per character for commands |
69
-
70
- \`TerminalLine\` types: \`command\` (typed), \`output\` (faded in), \`error\` (red), \`success\` (green), \`comment\` (dimmed with \`#\` prefix).
71
-
72
- ### BrandFrame
73
-
74
- Branded container with safe-zone padding, gradient/solid/dark backgrounds, and optional watermark.
75
-
76
- | Prop | Type | Default | Description |
77
- |------|------|---------|-------------|
78
- | \`variant\` | \`"solid" \\| "gradient" \\| "dark"\` | \`"gradient"\` | Background style |
79
- | \`showBranding\` | \`boolean\` | \`true\` | Show "ContractSpec" watermark |
80
- | \`animateEntrance\` | \`boolean\` | \`true\` | Fade-in on first frames |
81
- | \`styleOverrides\` | \`VideoStyleOverrides\` | -- | Override colors, fonts, dark mode |
82
-
83
- ### ProgressBar
84
-
85
- Thin progress indicator at the top or bottom of the frame.
86
-
87
- | Prop | Type | Default | Description |
88
- |------|------|---------|-------------|
89
- | \`height\` | \`number\` | \`4\` | Bar height in pixels |
90
- | \`color\` | \`string\` | primary color | Bar fill color |
91
- | \`position\` | \`"top" \\| "bottom"\` | \`"bottom"\` | Placement |
92
-
93
- ### SceneTransitionWrapper
94
-
95
- Wraps children with entrance/exit transitions (fade, slide-left, slide-right, wipe).
96
-
97
- | Prop | Type | Default | Description |
98
- |------|------|---------|-------------|
99
- | \`type\` | \`SceneTransitionType\` | -- | Transition type |
100
- | \`durationInFrames\` | \`number\` | -- | Transition duration |
101
- | \`direction\` | \`"in" \\| "out"\` | -- | Entering or exiting |
102
-
103
- ## Full Compositions
104
-
105
- Full compositions combine primitives into complete video templates. They are registered in Remotion Studio via \`RemotionRoot\`.
106
-
107
- ### ApiOverview
108
-
109
- Visualizes a ContractSpec definition generating a full API surface. Used for homepage demos and documentation.
110
-
111
- \`\`\`tsx
112
- import { ApiOverview } from "@contractspec/lib.video-gen/compositions/api-overview";
113
-
114
- <ApiOverview
115
- specName="CreateUser"
116
- method="POST"
117
- endpoint="/api/users"
118
- specCode={\`export const createUser = defineCommand({...})\`}
119
- generatedOutputs={["REST Endpoint", "GraphQL Mutation", "Prisma Model"]}
120
- tagline="One spec. Every surface."
121
- />
122
- \`\`\`
123
-
124
- **Scenes**: Title + method badge -> Code typing animation -> Generated outputs fan-out -> Tagline.
125
-
126
- ### SocialClip
127
-
128
- Short-form marketing content for LinkedIn, X, YouTube Shorts. Adapts layout for landscape (16:9), square (1:1), and portrait (9:16).
129
-
130
- \`\`\`tsx
131
- import { SocialClip } from "@contractspec/lib.video-gen/compositions/social-clip";
132
-
133
- <SocialClip
134
- hook="Stop rewriting the same API logic."
135
- message="Generate REST, GraphQL, DB, SDK from a single spec."
136
- points={["Deterministic output", "Fully ejectable", "No lock-in"]}
137
- cta="Try ContractSpec"
138
- ctaUrl="contractspec.dev"
139
- />
140
- \`\`\`
141
-
142
- **Scenes**: Hook (attention grabber) -> Main message -> Supporting points -> CTA button.
143
-
144
- ### TerminalDemo
145
-
146
- CLI command walkthrough with animated terminal. Used in documentation and tutorial videos.
147
-
148
- \`\`\`tsx
149
- import { TerminalDemo } from "@contractspec/lib.video-gen/compositions/terminal-demo";
150
-
151
- <TerminalDemo
152
- title="Getting Started with ContractSpec"
153
- subtitle="Define once, generate everything."
154
- lines={[
155
- { type: "command", text: "npx contractspec init my-api" },
156
- { type: "output", text: "Created my-api/ with 3 sample contracts" },
157
- { type: "command", text: "npx contractspec build" },
158
- { type: "success", text: "Built 3 contracts -> 18 generated files" },
159
- ]}
160
- summary="Ship faster. Stay coherent."
161
- />
162
- \`\`\`
163
-
164
- **Scenes**: Title + subtitle -> Terminal typing animation -> Summary.
165
-
166
- ## Creating New Compositions
167
-
168
- 1. Create a new \`.tsx\` file in \`src/compositions/\`.
169
- 2. Use primitives from \`./primitives/\` and design tokens from \`../design/\`.
170
- 3. Use \`useCurrentFrame()\` and \`interpolate()\` for frame-based animations.
171
- 4. Register in \`src/remotion/Root.tsx\` with a \`<Composition>\` entry.
172
- 5. Export from \`src/compositions/index.ts\`.
173
- 6. Add the export path to \`package.json\` (both workspace and publishConfig).
174
-
175
- ### Guardrails
176
-
177
- - Keep compositions **pure**: no side effects, no network calls, no randomness.
178
- - Use \`scaleSafeZone()\` and \`scaleTypography()\` to support multiple formats.
179
- - All timing should be frame-based (not time-based) for deterministic output.
180
- `
181
- }
182
- ];
183
- registerDocBlocks(compositionsDocBlocks);
2
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.compositions",title:"Video Compositions & Primitives",summary:"Remotion composition components and reusable primitives for building programmatic videos.",kind:"reference",visibility:"public",route:"/docs/video-gen/compositions",tags:["video","remotion","compositions","primitives","react"],owners:["@contractspec/lib.video-gen"],body:'# Video Compositions & Primitives\n\nCompositions are React components rendered by Remotion. They use `useCurrentFrame()`, `useVideoConfig()`, and `interpolate()` to produce frame-accurate animations. All compositions must be **deterministic**: same props = same visual output.\n\n## Primitive Components\n\nPrimitives are reusable building blocks for constructing full compositions.\n\n```ts\nimport {\n AnimatedText,\n CodeBlock,\n Terminal,\n BrandFrame,\n ProgressBar,\n SceneTransitionWrapper,\n} from "@contractspec/lib.video-gen/compositions/primitives";\n```\n\n### AnimatedText\n\nText with entrance/exit slide + fade animations.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `text` | `string` | -- | Text content |\n| `variant` | `keyof videoTypography` | `"body"` | Typography preset (title, heading, subheading, body, code, caption, label) |\n| `enterAt` | `number` | `0` | Frame at which text enters |\n| `exitAt` | `number` | -- | Frame at which text exits (omit to keep visible) |\n| `color` | `string` | `"#ffffff"` | Text color |\n| `align` | `"left" \\| "center" \\| "right"` | `"left"` | Text alignment |\n\n### CodeBlock\n\nSyntax-aware code display with typing animation and macOS-style title bar.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `code` | `string` | -- | Code string to display |\n| `language` | `string` | `"typescript"` | Language label in the title bar |\n| `startAt` | `number` | `0` | Frame at which typing starts |\n| `typeAnimation` | `boolean` | `true` | Animate character-by-character typing |\n| `filename` | `string` | -- | Filename in the title bar (overrides language) |\n\n### Terminal\n\nCLI simulator with command typing, output lines, and cursor animation.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `lines` | `TerminalLine[]` | -- | Lines to display in sequence |\n| `startAt` | `number` | `0` | Frame at which terminal appears |\n| `prompt` | `string` | `"$ "` | Prompt string before commands |\n| `title` | `string` | `"Terminal"` | Title bar text |\n| `typingSpeed` | `number` | `2` | Frames per character for commands |\n\n`TerminalLine` types: `command` (typed), `output` (faded in), `error` (red), `success` (green), `comment` (dimmed with `#` prefix).\n\n### BrandFrame\n\nBranded container with safe-zone padding, gradient/solid/dark backgrounds, and optional watermark.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `variant` | `"solid" \\| "gradient" \\| "dark"` | `"gradient"` | Background style |\n| `showBranding` | `boolean` | `true` | Show "ContractSpec" watermark |\n| `animateEntrance` | `boolean` | `true` | Fade-in on first frames |\n| `styleOverrides` | `VideoStyleOverrides` | -- | Override colors, fonts, dark mode |\n\n### ProgressBar\n\nThin progress indicator at the top or bottom of the frame.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `height` | `number` | `4` | Bar height in pixels |\n| `color` | `string` | primary color | Bar fill color |\n| `position` | `"top" \\| "bottom"` | `"bottom"` | Placement |\n\n### SceneTransitionWrapper\n\nWraps children with entrance/exit transitions (fade, slide-left, slide-right, wipe).\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `type` | `SceneTransitionType` | -- | Transition type |\n| `durationInFrames` | `number` | -- | Transition duration |\n| `direction` | `"in" \\| "out"` | -- | Entering or exiting |\n\n## Full Compositions\n\nFull compositions combine primitives into complete video templates. They are registered in Remotion Studio via `RemotionRoot`.\n\n### ApiOverview\n\nVisualizes a ContractSpec definition generating a full API surface. Used for homepage demos and documentation.\n\n```tsx\nimport { ApiOverview } from "@contractspec/lib.video-gen/compositions/api-overview";\n\n<ApiOverview\n specName="CreateUser"\n method="POST"\n endpoint="/api/users"\n specCode={`export const createUser = defineCommand({...})`}\n generatedOutputs={["REST Endpoint", "GraphQL Mutation", "Prisma Model"]}\n tagline="One spec. Every surface."\n/>\n```\n\n**Scenes**: Title + method badge -> Code typing animation -> Generated outputs fan-out -> Tagline.\n\n### SocialClip\n\nShort-form marketing content for LinkedIn, X, YouTube Shorts. Adapts layout for landscape (16:9), square (1:1), and portrait (9:16).\n\n```tsx\nimport { SocialClip } from "@contractspec/lib.video-gen/compositions/social-clip";\n\n<SocialClip\n hook="Stop rewriting the same API logic."\n message="Generate REST, GraphQL, DB, SDK from a single spec."\n points={["Deterministic output", "Fully ejectable", "No lock-in"]}\n cta="Try ContractSpec"\n ctaUrl="contractspec.dev"\n/>\n```\n\n**Scenes**: Hook (attention grabber) -> Main message -> Supporting points -> CTA button.\n\n### TerminalDemo\n\nCLI command walkthrough with animated terminal. Used in documentation and tutorial videos.\n\n```tsx\nimport { TerminalDemo } from "@contractspec/lib.video-gen/compositions/terminal-demo";\n\n<TerminalDemo\n title="Getting Started with ContractSpec"\n subtitle="Define once, generate everything."\n lines={[\n { type: "command", text: "npx contractspec init my-api" },\n { type: "output", text: "Created my-api/ with 3 sample contracts" },\n { type: "command", text: "npx contractspec build" },\n { type: "success", text: "Built 3 contracts -> 18 generated files" },\n ]}\n summary="Ship faster. Stay coherent."\n/>\n```\n\n**Scenes**: Title + subtitle -> Terminal typing animation -> Summary.\n\n## Creating New Compositions\n\n1. Create a new `.tsx` file in `src/compositions/`.\n2. Use primitives from `./primitives/` and design tokens from `../design/`.\n3. Use `useCurrentFrame()` and `interpolate()` for frame-based animations.\n4. Register in `src/remotion/Root.tsx` with a `<Composition>` entry.\n5. Export from `src/compositions/index.ts`.\n6. Add the export path to `package.json` (both workspace and publishConfig).\n\n### Guardrails\n\n- Keep compositions **pure**: no side effects, no network calls, no randomness.\n- Use `scaleSafeZone()` and `scaleTypography()` to support multiple formats.\n- All timing should be frame-based (not time-based) for deterministic output.\n'}];f(h);
@@ -1,17 +1,5 @@
1
1
  // @bun
2
- // src/docs/design.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var designDocBlocks = [
5
- {
6
- id: "docs.video-gen.design",
7
- title: "Video Design System",
8
- summary: "Design tokens, motion primitives, typography scale, and layout system optimized for programmatic video.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/video-gen/design",
12
- tags: ["video", "design-tokens", "motion", "typography", "layout"],
13
- owners: ["@contractspec/lib.video-gen"],
14
- body: `# Video Design System
2
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.design",title:"Video Design System",summary:"Design tokens, motion primitives, typography scale, and layout system optimized for programmatic video.",kind:"reference",visibility:"public",route:"/docs/video-gen/design",tags:["video","design-tokens","motion","typography","layout"],owners:["@contractspec/lib.video-gen"],body:`# Video Design System
15
3
 
16
4
  The design layer bridges \`@contractspec/lib.design-system\` brand tokens with video-specific extensions for motion, typography, and spatial layout. All values are optimized for 1920x1080 (landscape) and scale proportionally for other formats.
17
5
 
@@ -182,7 +170,4 @@ VIDEO_FORMATS.square; // { type: "square", width: 1080, height: 1080 }
182
170
  getAllFormatVariants(); // [landscape, square, portrait]
183
171
  DEFAULT_FPS; // 30
184
172
  \`\`\`
185
- `
186
- }
187
- ];
188
- registerDocBlocks(designDocBlocks);
173
+ `}];f(h);
@@ -1,24 +1,5 @@
1
1
  // @bun
2
- // src/docs/generators.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var generatorsDocBlocks = [
5
- {
6
- id: "docs.video-gen.generators",
7
- title: "Video Generation Pipeline",
8
- summary: "VideoGenerator, ScenePlanner, and ScriptGenerator -- from content brief to video project with optional LLM enhancement.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/video-gen/generators",
12
- tags: [
13
- "video",
14
- "generators",
15
- "scene-planner",
16
- "script-generator",
17
- "llm",
18
- "content-pipeline"
19
- ],
20
- owners: ["@contractspec/lib.video-gen"],
21
- body: `# Video Generation Pipeline
2
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.generators",title:"Video Generation Pipeline",summary:"VideoGenerator, ScenePlanner, and ScriptGenerator -- from content brief to video project with optional LLM enhancement.",kind:"reference",visibility:"public",route:"/docs/video-gen/generators",tags:["video","generators","scene-planner","script-generator","llm","content-pipeline"],owners:["@contractspec/lib.video-gen"],body:`# Video Generation Pipeline
22
3
 
23
4
  The generators layer converts a \`VideoBrief\` (content brief + video config) into a fully specified \`VideoProject\` (scene graph ready for rendering). It follows the \`@contractspec/lib.content-gen\` pattern: optional LLM, deterministic fallback.
24
5
 
@@ -182,7 +163,4 @@ interface PlannedScene {
182
163
  - LLM responses are parsed as JSON; any parse failure falls back to deterministic.
183
164
  - Temperature defaults are conservative (0.3-0.5) for reproducibility.
184
165
  - Duration estimates use 150 words/min speaking rate.
185
- `
186
- }
187
- ];
188
- registerDocBlocks(generatorsDocBlocks);
166
+ `}];f(h);
@@ -1,24 +1,5 @@
1
1
  // @bun
2
- // src/docs/rendering.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var renderingDocBlocks = [
5
- {
6
- id: "docs.video-gen.rendering",
7
- title: "Video Rendering & Playback",
8
- summary: "LocalRenderer for MP4 output, render configuration, quality presets, DemoPlayer for web embedding, and Remotion Studio setup.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/video-gen/rendering",
12
- tags: [
13
- "video",
14
- "rendering",
15
- "remotion",
16
- "player",
17
- "mp4",
18
- "quality-presets"
19
- ],
20
- owners: ["@contractspec/lib.video-gen"],
21
- body: `# Video Rendering & Playback
2
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.rendering",title:"Video Rendering & Playback",summary:"LocalRenderer for MP4 output, render configuration, quality presets, DemoPlayer for web embedding, and Remotion Studio setup.",kind:"reference",visibility:"public",route:"/docs/video-gen/rendering",tags:["video","rendering","remotion","player","mp4","quality-presets"],owners:["@contractspec/lib.video-gen"],body:`# Video Rendering & Playback
22
3
 
23
4
  The rendering layer wraps \`@remotion/renderer\` for MP4/WebM output and \`@remotion/player\` for interactive web embedding. It implements the \`VideoProvider\` contract from \`@contractspec/lib.contracts-integrations\`.
24
5
 
@@ -192,7 +173,4 @@ All compositions run at 30fps.
192
173
  - Import \`LocalRenderer\` from the \`/renderers/local\` subpath to avoid bundling \`@remotion/renderer\` in browser builds.
193
174
  - The \`remotion\` entry point (\`@contractspec/lib.video-gen/remotion\`) is a **side-effect module** that calls \`registerRoot()\`. Only import it from Remotion Studio or render scripts.
194
175
  - Use quality presets for consistency: \`draft\` for development, \`standard\` for CI, \`high\` for releases.
195
- `
196
- }
197
- ];
198
- registerDocBlocks(renderingDocBlocks);
176
+ `}];f(h);
@@ -1,17 +1,5 @@
1
1
  // @bun
2
- // src/docs/video-gen.docblock.ts
3
- import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
4
- var videoGenDocBlocks = [
5
- {
6
- id: "docs.video-gen.overview",
7
- title: "Video Generation Library",
8
- summary: "Programmatic video generation with Remotion -- from content brief to rendered MP4 in a single pipeline.",
9
- kind: "reference",
10
- visibility: "public",
11
- route: "/docs/video-gen/overview",
12
- tags: ["video", "remotion", "generation", "content-pipeline"],
13
- owners: ["@contractspec/lib.video-gen"],
14
- body: `# Video Generation Library
2
+ import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.overview",title:"Video Generation Library",summary:"Programmatic video generation with Remotion -- from content brief to rendered MP4 in a single pipeline.",kind:"reference",visibility:"public",route:"/docs/video-gen/overview",tags:["video","remotion","generation","content-pipeline"],owners:["@contractspec/lib.video-gen"],body:`# Video Generation Library
15
3
 
16
4
  \`@contractspec/lib.video-gen\` provides **programmatic video generation** using [Remotion](https://remotion.dev). It follows the same generator pattern as \`@contractspec/lib.content-gen\` and consumes provider contracts from \`@contractspec/lib.contracts-integrations/integrations/providers/video\`.
17
5
 
@@ -136,7 +124,4 @@ This matches the content-gen pattern: \`constructor({ llm? })\` -> \`generate(br
136
124
  - Design tokens bridge from \`@contractspec/lib.design-system\` -- do not duplicate brand values.
137
125
  - \`LocalRenderer\` works with Node.js and Bun. On Bun, SSR scripts may not auto-quit (see [Remotion Bun docs](https://www.remotion.dev/docs/bun)).
138
126
  - The \`remotion\` entry point is a side-effect module (calls \`registerRoot\`) -- import it only from Remotion Studio or render scripts.
139
- `
140
- }
141
- ];
142
- registerDocBlocks(videoGenDocBlocks);
127
+ `}];f(h);