@contractspec/lib.video-gen 2.7.17 → 2.7.19

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