@lssm-tech/lib.video-gen 3.0.10

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 (175) hide show
  1. package/README.md +79 -0
  2. package/dist/browser/compositions/api-overview.js +1 -0
  3. package/dist/browser/compositions/index.js +1 -0
  4. package/dist/browser/compositions/primitives/animated-text.js +1 -0
  5. package/dist/browser/compositions/primitives/brand-frame.js +1 -0
  6. package/dist/browser/compositions/primitives/code-block.js +1 -0
  7. package/dist/browser/compositions/primitives/index.js +1 -0
  8. package/dist/browser/compositions/primitives/progress-bar.js +1 -0
  9. package/dist/browser/compositions/primitives/terminal.js +1 -0
  10. package/dist/browser/compositions/primitives/transition.js +1 -0
  11. package/dist/browser/compositions/social-clip.js +1 -0
  12. package/dist/browser/compositions/terminal-demo.js +1 -0
  13. package/dist/browser/design/index.js +1 -0
  14. package/dist/browser/design/layouts.js +1 -0
  15. package/dist/browser/design/motion.js +1 -0
  16. package/dist/browser/design/tokens.js +1 -0
  17. package/dist/browser/design/typography.js +1 -0
  18. package/dist/browser/docs/compositions.docblock.js +1 -0
  19. package/dist/browser/docs/design.docblock.js +172 -0
  20. package/dist/browser/docs/generators.docblock.js +165 -0
  21. package/dist/browser/docs/rendering.docblock.js +175 -0
  22. package/dist/browser/docs/video-gen.docblock.js +126 -0
  23. package/dist/browser/generators/index.js +82 -0
  24. package/dist/browser/generators/scene-planner.js +82 -0
  25. package/dist/browser/generators/script-generator.js +82 -0
  26. package/dist/browser/generators/video-generator.js +82 -0
  27. package/dist/browser/i18n/catalogs/en.js +28 -0
  28. package/dist/browser/i18n/catalogs/es.js +28 -0
  29. package/dist/browser/i18n/catalogs/fr.js +28 -0
  30. package/dist/browser/i18n/catalogs/index.js +82 -0
  31. package/dist/browser/i18n/index.js +82 -0
  32. package/dist/browser/i18n/keys.js +1 -0
  33. package/dist/browser/i18n/locale.js +1 -0
  34. package/dist/browser/i18n/messages.js +82 -0
  35. package/dist/browser/index.js +82 -0
  36. package/dist/browser/player/demo-player.js +1 -0
  37. package/dist/browser/player/index.js +1 -0
  38. package/dist/browser/remotion/Root.js +19 -0
  39. package/dist/browser/remotion/index.js +19 -0
  40. package/dist/browser/renderers/config.js +1 -0
  41. package/dist/browser/renderers/index.js +1 -0
  42. package/dist/browser/renderers/local.js +1 -0
  43. package/dist/browser/types.js +1 -0
  44. package/dist/browser/video-gen.feature.js +1 -0
  45. package/dist/compositions/api-overview.d.ts +16 -0
  46. package/dist/compositions/api-overview.js +2 -0
  47. package/dist/compositions/index.d.ts +7 -0
  48. package/dist/compositions/index.js +2 -0
  49. package/dist/compositions/primitives/animated-text.d.ts +22 -0
  50. package/dist/compositions/primitives/animated-text.js +2 -0
  51. package/dist/compositions/primitives/brand-frame.d.ts +14 -0
  52. package/dist/compositions/primitives/brand-frame.js +2 -0
  53. package/dist/compositions/primitives/code-block.d.ts +18 -0
  54. package/dist/compositions/primitives/code-block.js +2 -0
  55. package/dist/compositions/primitives/index.d.ts +12 -0
  56. package/dist/compositions/primitives/index.js +2 -0
  57. package/dist/compositions/primitives/progress-bar.d.ts +12 -0
  58. package/dist/compositions/primitives/progress-bar.js +2 -0
  59. package/dist/compositions/primitives/terminal.d.ts +24 -0
  60. package/dist/compositions/primitives/terminal.js +2 -0
  61. package/dist/compositions/primitives/transition.d.ts +14 -0
  62. package/dist/compositions/primitives/transition.js +2 -0
  63. package/dist/compositions/social-clip.d.ts +16 -0
  64. package/dist/compositions/social-clip.js +2 -0
  65. package/dist/compositions/terminal-demo.d.ts +17 -0
  66. package/dist/compositions/terminal-demo.js +2 -0
  67. package/dist/design/index.d.ts +4 -0
  68. package/dist/design/index.js +2 -0
  69. package/dist/design/layouts.d.ts +69 -0
  70. package/dist/design/layouts.js +2 -0
  71. package/dist/design/motion.d.ts +72 -0
  72. package/dist/design/motion.js +2 -0
  73. package/dist/design/tokens.d.ts +31 -0
  74. package/dist/design/tokens.js +2 -0
  75. package/dist/design/typography.d.ts +61 -0
  76. package/dist/design/typography.js +2 -0
  77. package/dist/docs/compositions.docblock.d.ts +1 -0
  78. package/dist/docs/compositions.docblock.js +2 -0
  79. package/dist/docs/design.docblock.d.ts +1 -0
  80. package/dist/docs/design.docblock.js +173 -0
  81. package/dist/docs/generators.docblock.d.ts +1 -0
  82. package/dist/docs/generators.docblock.js +166 -0
  83. package/dist/docs/rendering.docblock.d.ts +1 -0
  84. package/dist/docs/rendering.docblock.js +176 -0
  85. package/dist/docs/video-gen.docblock.d.ts +1 -0
  86. package/dist/docs/video-gen.docblock.js +127 -0
  87. package/dist/generators/index.d.ts +3 -0
  88. package/dist/generators/index.js +83 -0
  89. package/dist/generators/scene-planner.d.ts +31 -0
  90. package/dist/generators/scene-planner.js +83 -0
  91. package/dist/generators/script-generator.d.ts +57 -0
  92. package/dist/generators/script-generator.js +83 -0
  93. package/dist/generators/video-generator.d.ts +21 -0
  94. package/dist/generators/video-generator.js +83 -0
  95. package/dist/i18n/catalogs/en.d.ts +8 -0
  96. package/dist/i18n/catalogs/en.js +29 -0
  97. package/dist/i18n/catalogs/es.d.ts +6 -0
  98. package/dist/i18n/catalogs/es.js +29 -0
  99. package/dist/i18n/catalogs/fr.d.ts +6 -0
  100. package/dist/i18n/catalogs/fr.js +29 -0
  101. package/dist/i18n/catalogs/index.d.ts +8 -0
  102. package/dist/i18n/catalogs/index.js +83 -0
  103. package/dist/i18n/i18n.test.d.ts +1 -0
  104. package/dist/i18n/index.d.ts +22 -0
  105. package/dist/i18n/index.js +83 -0
  106. package/dist/i18n/keys.d.ts +116 -0
  107. package/dist/i18n/keys.js +2 -0
  108. package/dist/i18n/locale.d.ts +8 -0
  109. package/dist/i18n/locale.js +2 -0
  110. package/dist/i18n/messages.d.ts +14 -0
  111. package/dist/i18n/messages.js +83 -0
  112. package/dist/index.d.ts +7 -0
  113. package/dist/index.js +83 -0
  114. package/dist/node/compositions/api-overview.js +1 -0
  115. package/dist/node/compositions/index.js +1 -0
  116. package/dist/node/compositions/primitives/animated-text.js +1 -0
  117. package/dist/node/compositions/primitives/brand-frame.js +1 -0
  118. package/dist/node/compositions/primitives/code-block.js +1 -0
  119. package/dist/node/compositions/primitives/index.js +1 -0
  120. package/dist/node/compositions/primitives/progress-bar.js +1 -0
  121. package/dist/node/compositions/primitives/terminal.js +1 -0
  122. package/dist/node/compositions/primitives/transition.js +1 -0
  123. package/dist/node/compositions/social-clip.js +1 -0
  124. package/dist/node/compositions/terminal-demo.js +1 -0
  125. package/dist/node/design/index.js +1 -0
  126. package/dist/node/design/layouts.js +1 -0
  127. package/dist/node/design/motion.js +1 -0
  128. package/dist/node/design/tokens.js +1 -0
  129. package/dist/node/design/typography.js +1 -0
  130. package/dist/node/docs/compositions.docblock.js +1 -0
  131. package/dist/node/docs/design.docblock.js +172 -0
  132. package/dist/node/docs/generators.docblock.js +165 -0
  133. package/dist/node/docs/rendering.docblock.js +175 -0
  134. package/dist/node/docs/video-gen.docblock.js +126 -0
  135. package/dist/node/generators/index.js +82 -0
  136. package/dist/node/generators/scene-planner.js +82 -0
  137. package/dist/node/generators/script-generator.js +82 -0
  138. package/dist/node/generators/video-generator.js +82 -0
  139. package/dist/node/i18n/catalogs/en.js +28 -0
  140. package/dist/node/i18n/catalogs/es.js +28 -0
  141. package/dist/node/i18n/catalogs/fr.js +28 -0
  142. package/dist/node/i18n/catalogs/index.js +82 -0
  143. package/dist/node/i18n/index.js +82 -0
  144. package/dist/node/i18n/keys.js +1 -0
  145. package/dist/node/i18n/locale.js +1 -0
  146. package/dist/node/i18n/messages.js +82 -0
  147. package/dist/node/index.js +82 -0
  148. package/dist/node/player/demo-player.js +1 -0
  149. package/dist/node/player/index.js +1 -0
  150. package/dist/node/remotion/Root.js +19 -0
  151. package/dist/node/remotion/index.js +19 -0
  152. package/dist/node/renderers/config.js +1 -0
  153. package/dist/node/renderers/index.js +1 -0
  154. package/dist/node/renderers/local.js +1 -0
  155. package/dist/node/types.js +1 -0
  156. package/dist/node/video-gen.feature.js +1 -0
  157. package/dist/player/demo-player.d.ts +55 -0
  158. package/dist/player/demo-player.js +2 -0
  159. package/dist/player/index.d.ts +2 -0
  160. package/dist/player/index.js +2 -0
  161. package/dist/remotion/Root.d.ts +2 -0
  162. package/dist/remotion/Root.js +20 -0
  163. package/dist/remotion/index.d.ts +1 -0
  164. package/dist/remotion/index.js +20 -0
  165. package/dist/renderers/config.d.ts +28 -0
  166. package/dist/renderers/config.js +2 -0
  167. package/dist/renderers/index.d.ts +3 -0
  168. package/dist/renderers/index.js +2 -0
  169. package/dist/renderers/local.d.ts +17 -0
  170. package/dist/renderers/local.js +2 -0
  171. package/dist/types.d.ts +85 -0
  172. package/dist/types.js +2 -0
  173. package/dist/video-gen.feature.d.ts +1 -0
  174. package/dist/video-gen.feature.js +2 -0
  175. package/package.json +675 -0
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
1
+ import{createRequire as D}from"node:module";var S=D(import.meta.url);import{Easing as k}from"remotion";var B={entrance:k.out(k.exp),exit:k.in(k.exp),emphasis:k.out(k.back(1.4)),linear:k.linear,gentle:k.bezier(0.25,0.1,0.25,1),spring:k.out(k.back(1.7))},K={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},u={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}};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 Z(q,I){let G=I/1920;return{...q,fontSize:Math.round(q.fontSize*G),letterSpacing:q.letterSpacing?Math.round(q.letterSpacing*G*10)/10:void 0}}import{interpolate as z,useCurrentFrame as W,useVideoConfig as Y}from"remotion";import{jsx as O}from"react/jsx-runtime";var d=({text:q,variant:I="body",style:G,enterAt:L=0,exitAt:J,color:_="#ffffff",align:$="left"})=>{let M=W(),{width:F}=Y(),V=X[I],H={...Z(V,F),...G},N=z(M,[L,L+K.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),b=z(N,[0,1],[0,1],{easing:B.entrance}),j=z(N,[0,1],[30,0],{easing:B.entrance}),Q=1,R=0;if(J!==void 0){let U=z(M,[J,J+K.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Q=z(U,[0,1],[1,0],{easing:B.exit}),R=z(U,[0,1],[0,-20],{easing:B.exit})}let w=b*Q,C=j+R;return O("div",{style:{fontSize:H.fontSize,lineHeight:H.lineHeight,fontWeight:H.fontWeight,letterSpacing:H.letterSpacing,color:_,textAlign:$,opacity:w,transform:`translateY(${C}px)`,willChange:"opacity, transform"},children:q})};export{d as AnimatedText};
@@ -0,0 +1 @@
1
+ import{createRequire as V}from"node:module";var T=V(import.meta.url);import{Easing as q}from"remotion";var M={entrance:q.out(q.exp),exit:q.in(q.exp),emphasis:q.out(q.back(1.4)),linear:q.linear,gentle:q.bezier(0.25,0.1,0.25,1),spring:q.out(q.back(1.7))},z={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},O={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 L}from"@contractspec/lib.design-system";var p={canvasBackground:L.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:L.colors.accent,gradientStart:L.colors.primary,gradientEnd:L.colors.accent},R={...L,video:p};import{VIDEO_FORMATS as P}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var m=30,U={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function _(G){let J=G.width/1920,N=G.height/1080;return{horizontal:Math.round(U.horizontal*J),vertical:Math.round(U.vertical*N),contentWidth:Math.round(U.contentWidth*J),contentHeight:Math.round(U.contentHeight*N)}}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 g(){return[P.landscape,P.square,P.portrait]}import{interpolate as j,useCurrentFrame as D,useVideoConfig as S}from"remotion";import{jsx as X,jsxs as b}from"react/jsx-runtime";var t=({styleOverrides:G,showBranding:J=!0,animateEntrance:N=!0,variant:Y="gradient",children:B})=>{let A=D(),{width:W,height:I}=S(),K=R,H=_({type:"custom",width:W,height:I}),F=G?.primaryColor??K.colors.primary,w=G?.accentColor??K.colors.accent,$=G?.darkMode??!0,Q;switch(Y){case"solid":Q=$?"#0a0a0a":K.colors.background;break;case"gradient":Q=$?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${K.colors.background} 0%, ${K.colors.muted} 100%)`;break;case"dark":Q="#000000";break}let x=N?j(A,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:M.entrance}):1,C=J?j(A,[z.brandReveal,z.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return b("div",{style:{width:W,height:I,background:Q,position:"relative",overflow:"hidden",opacity:x},children:[Y==="gradient"&&X("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${F}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),X("div",{style:{position:"absolute",left:H.horizontal,top:H.vertical,width:H.contentWidth,height:H.contentHeight,display:"flex",flexDirection:"column"},children:B}),J&&X("div",{style:{position:"absolute",bottom:H.vertical/2,right:H.horizontal,opacity:C,color:$?"#ffffff":"#000000",fontSize:Math.round(16*(W/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};export{t as BrandFrame};
@@ -0,0 +1 @@
1
+ import{createRequire as V}from"node:module";var k=V(import.meta.url);import{Easing as q}from"remotion";var U={entrance:q.out(q.exp),exit:q.in(q.exp),emphasis:q.out(q.back(1.4)),linear:q.linear,gentle:q.bezier(0.25,0.1,0.25,1),spring:q.out(q.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},E={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 H}from"@contractspec/lib.design-system";var N={canvasBackground:H.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:H.colors.accent,gradientStart:H.colors.primary,gradientEnd:H.colors.accent},f={...H,video:N};var Y={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(z,K){let B=K/1920;return{...z,fontSize:Math.round(z.fontSize*B),letterSpacing:z.letterSpacing?Math.round(z.letterSpacing*B*10)/10:void 0}}import{interpolate as _,useCurrentFrame as v,useVideoConfig as b}from"remotion";import{jsx as G,jsxs as J}from"react/jsx-runtime";var g=({code:z,language:K="typescript",startAt:B=0,typeAnimation:O=!0,backgroundColor:$=N.codeBackground,textColor:Q="#abb2bf",filename:P})=>{let L=v(),{width:D}=b(),M=Z(Y.code,D),I=z.length,F=I*X.codeTypingPerChar,R=O?Math.floor(_(L,[B,B+F],[0,I],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):I,W=z.slice(0,R),w=_(L,[B,B+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.entrance}),S=O&&R<I&&L%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:[G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),G("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:P??K})]}),G("div",{style:{padding:"24px 32px"},children:J("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:M.fontSize,lineHeight:M.lineHeight,color:Q,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[W,S&&G("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};export{g as CodeBlock};
@@ -0,0 +1 @@
1
+ import{createRequire as l}from"node:module";var MG=l(import.meta.url);import{Easing as R}from"remotion";var X={entrance:R.out(R.exp),exit:R.in(R.exp),emphasis:R.out(R.back(1.4)),linear:R.linear,gentle:R.bezier(0.25,0.1,0.25,1),spring:R.out(R.back(1.7))},Y={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},_G={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 F}from"@contractspec/lib.design-system";var b={canvasBackground:F.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:F.colors.accent,gradientStart:F.colors.primary,gradientEnd:F.colors.accent},O={...F,video:b};var Z={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 D(H,J){let G=J/1920;return{...H,fontSize:Math.round(H.fontSize*G),letterSpacing:H.letterSpacing?Math.round(H.letterSpacing*G*10)/10:void 0}}import{interpolate as V,useCurrentFrame as o,useVideoConfig as r}from"remotion";import{jsx as n}from"react/jsx-runtime";var s=({text:H,variant:J="body",style:G,enterAt:q=0,exitAt:P,color:B="#ffffff",align:U="left"})=>{let z=o(),{width:L}=r(),$=Z[J],_={...D($,L),...G},K=V(z,[q,q+Y.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),N=V(K,[0,1],[0,1],{easing:X.entrance}),Q=V(K,[0,1],[30,0],{easing:X.entrance}),W=1,k=0;if(P!==void 0){let C=V(z,[P,P+Y.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});W=V(C,[0,1],[1,0],{easing:X.exit}),k=V(C,[0,1],[0,-20],{easing:X.exit})}let T=N*W,j=Q+k;return n("div",{style:{fontSize:_.fontSize,lineHeight:_.lineHeight,fontWeight:_.fontWeight,letterSpacing:_.letterSpacing,color:B,textAlign:U,opacity:T,transform:`translateY(${j}px)`,willChange:"opacity, transform"},children:H})};import{VIDEO_FORMATS as x}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var SG=30,S={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function p(H){let J=H.width/1920,G=H.height/1080;return{horizontal:Math.round(S.horizontal*J),vertical:Math.round(S.vertical*G),contentWidth:Math.round(S.contentWidth*J),contentHeight:Math.round(S.contentHeight*G)}}var EG={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 AG(){return[x.landscape,x.square,x.portrait]}import{interpolate as h,useCurrentFrame as a,useVideoConfig as i}from"remotion";import{jsx as v,jsxs as e}from"react/jsx-runtime";var t=({styleOverrides:H,showBranding:J=!0,animateEntrance:G=!0,variant:q="gradient",children:P})=>{let B=a(),{width:U,height:z}=i(),L=O,$=p({type:"custom",width:U,height:z}),M=H?.primaryColor??L.colors.primary,_=H?.accentColor??L.colors.accent,K=H?.darkMode??!0,N;switch(q){case"solid":N=K?"#0a0a0a":L.colors.background;break;case"gradient":N=K?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${L.colors.background} 0%, ${L.colors.muted} 100%)`;break;case"dark":N="#000000";break}let Q=G?h(B,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:X.entrance}):1,W=J?h(B,[Y.brandReveal,Y.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return e("div",{style:{width:U,height:z,background:N,position:"relative",overflow:"hidden",opacity:Q},children:[q==="gradient"&&v("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${M}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),v("div",{style:{position:"absolute",left:$.horizontal,top:$.vertical,width:$.contentWidth,height:$.contentHeight,display:"flex",flexDirection:"column"},children:P}),J&&v("div",{style:{position:"absolute",bottom:$.vertical/2,right:$.horizontal,opacity:W,color:K?"#ffffff":"#000000",fontSize:Math.round(16*(U/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as y,useCurrentFrame as GG,useVideoConfig as HG}from"remotion";import{jsx as w,jsxs as E}from"react/jsx-runtime";var JG=({code:H,language:J="typescript",startAt:G=0,typeAnimation:q=!0,backgroundColor:P=b.codeBackground,textColor:B="#abb2bf",filename:U})=>{let z=GG(),{width:L}=HG(),$=D(Z.code,L),M=H.length,_=M*Y.codeTypingPerChar,K=q?Math.floor(y(z,[G,G+_],[0,M],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):M,N=H.slice(0,K),Q=y(z,[G,G+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:X.entrance}),W=q&&K<M&&z%16<10;return E("div",{style:{backgroundColor:P,borderRadius:16,padding:0,opacity:Q,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[E("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[E("div",{style:{display:"flex",gap:8},children:[w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),w("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:$.fontSize*0.7,fontFamily:"monospace"},children:U??J})]}),w("div",{style:{padding:"24px 32px"},children:E("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:$.fontSize,lineHeight:$.lineHeight,color:B,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[N,W&&w("span",{style:{backgroundColor:B,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as KG,useVideoConfig as QG}from"remotion";import{jsx as u}from"react/jsx-runtime";var UG=({height:H=4,color:J=O.colors.primary,backgroundColor:G="rgba(255,255,255,0.1)",position:q="bottom"})=>{let P=KG(),{durationInFrames:B,width:U}=QG(),z=P/B;return u("div",{style:{position:"absolute",[q]:0,left:0,width:U,height:H,backgroundColor:G,zIndex:100},children:u("div",{style:{width:`${z*100}%`,height:"100%",backgroundColor:J,transition:"none"}})})};import{interpolate as f,useCurrentFrame as $G,useVideoConfig as qG}from"remotion";import{jsx as I,jsxs as A}from"react/jsx-runtime";var m={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},zG=({lines:H,startAt:J=0,prompt:G="$ ",title:q="Terminal",backgroundColor:P=b.terminalBackground,typingSpeed:B=Y.codeTypingPerChar})=>{let U=$G(),{width:z}=qG(),L=D(Z.code,z),$=[],M=J;for(let K of H){let N=K.delay??10,Q=M+N;if(K.type==="command"){let W=K.text.length*B;$.push({startFrame:Q,endFrame:Q+W}),M=Q+W}else $.push({startFrame:Q,endFrame:Q+5}),M=Q+5}let _=f(U,[J,J+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:X.entrance});return A("div",{style:{backgroundColor:P,borderRadius:16,overflow:"hidden",opacity:_,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[A("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[A("div",{style:{display:"flex",gap:8},children:[I("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),I("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),I("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),I("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:L.fontSize*0.7,fontFamily:"monospace"},children:q})]}),I("div",{style:{padding:"24px 32px",minHeight:200},children:H.map((K,N)=>{let Q=$[N];if(!Q||U<Q.startFrame)return null;let W=K.type==="command",k=m[K.type],T=K.text;if(W){let d=f(U,[Q.startFrame,Q.endFrame],[0,K.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});T=K.text.slice(0,Math.floor(d))}let j=W?1:f(U,[Q.startFrame,Q.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),g=W&&U>=Q.startFrame&&U<=Q.endFrame&&U%16<10;return A("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:L.fontSize,lineHeight:1.8,color:k,opacity:j,whiteSpace:"pre-wrap"},children:[W&&I("span",{style:{color:"#3fb950"},children:G}),K.type==="comment"&&I("span",{style:{color:m.comment},children:"# "}),T,g&&I("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${N}-${K.text.slice(0,20)}`)})})]})};import{interpolate as PG,useCurrentFrame as WG}from"remotion";import{jsx as c,Fragment as XG}from"react/jsx-runtime";var BG=({type:H,durationInFrames:J,direction:G,startAt:q=0,children:P})=>{let B=WG();if(H==="none"||J===0)return c(XG,{children:P});let U=PG(B,[q,q+J],G==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),z=NG(H,U);return c("div",{style:z,children:P})};function NG(H,J){let G=X.entrance(J);switch(H){case"fade":return{opacity:G,width:"100%",height:"100%"};case"slide-left":return{opacity:G,transform:`translateX(${(1-G)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:G,transform:`translateX(${(1-G)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-G)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}export{zG as Terminal,BG as SceneTransitionWrapper,UG as ProgressBar,JG as CodeBlock,t as BrandFrame,s as AnimatedText};
@@ -0,0 +1 @@
1
+ import{createRequire as N}from"node:module";var U=N(import.meta.url);import{defaultTokens as q}from"@contractspec/lib.design-system";var O={canvasBackground:q.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:q.colors.accent,gradientStart:q.colors.primary,gradientEnd:q.colors.accent},z={...q,video:O};import{useCurrentFrame as Q,useVideoConfig as R}from"remotion";import{jsx as A}from"react/jsx-runtime";var $=({height:D=4,color:E=z.colors.primary,backgroundColor:G="rgba(255,255,255,0.1)",position:H="bottom"})=>{let J=Q(),{durationInFrames:K,width:L}=R(),M=J/K;return A("div",{style:{position:"absolute",[H]:0,left:0,width:L,height:D,backgroundColor:G,zIndex:100},children:A("div",{style:{width:`${M*100}%`,height:"100%",backgroundColor:E,transition:"none"}})})};export{$ as ProgressBar};
@@ -0,0 +1 @@
1
+ import{createRequire as S}from"node:module";var f=S(import.meta.url);import{Easing as B}from"remotion";var D={entrance:B.out(B.exp),exit:B.in(B.exp),emphasis:B.out(B.back(1.4)),linear:B.linear,gentle:B.bezier(0.25,0.1,0.25,1),spring:B.out(B.back(1.7))},V={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}};import{defaultTokens as Q}from"@contractspec/lib.design-system";var N={canvasBackground:Q.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:Q.colors.accent,gradientStart:Q.colors.primary,gradientEnd:Q.colors.accent},g={...Q,video:N};var w={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 L(H,M){let U=M/1920;return{...H,fontSize:Math.round(H.fontSize*U),letterSpacing:H.letterSpacing?Math.round(H.letterSpacing*U*10)/10:void 0}}import{interpolate as R,useCurrentFrame as E,useVideoConfig as T}from"remotion";import{jsx as G,jsxs as Z}from"react/jsx-runtime";var P={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},n=({lines:H,startAt:M=0,prompt:U="$ ",title:_="Terminal",backgroundColor:O=N.terminalBackground,typingSpeed:A=V.codeTypingPerChar})=>{let J=E(),{width:F}=T(),W=L(w.code,F),$=[],I=M;for(let z of H){let X=z.delay??10,q=I+X;if(z.type==="command"){let K=z.text.length*A;$.push({startFrame:q,endFrame:q+K}),I=q+K}else $.push({startFrame:q,endFrame:q+5}),I=q+5}let b=R(J,[M,M+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:D.entrance});return Z("div",{style:{backgroundColor:O,borderRadius:16,overflow:"hidden",opacity:b,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[Z("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[Z("div",{style:{display:"flex",gap:8},children:[G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),G("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:W.fontSize*0.7,fontFamily:"monospace"},children:_})]}),G("div",{style:{padding:"24px 32px",minHeight:200},children:H.map((z,X)=>{let q=$[X];if(!q||J<q.startFrame)return null;let K=z.type==="command",v=P[z.type],Y=z.text;if(K){let j=R(J,[q.startFrame,q.endFrame],[0,z.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Y=z.text.slice(0,Math.floor(j))}let k=K?1:R(J,[q.startFrame,q.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),h=K&&J>=q.startFrame&&J<=q.endFrame&&J%16<10;return Z("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:W.fontSize,lineHeight:1.8,color:v,opacity:k,whiteSpace:"pre-wrap"},children:[K&&G("span",{style:{color:"#3fb950"},children:U}),z.type==="comment"&&G("span",{style:{color:P.comment},children:"# "}),Y,h&&G("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${X}-${z.text.slice(0,20)}`)})})]})};export{n as Terminal};
@@ -0,0 +1 @@
1
+ import{createRequire as O}from"node:module";var X=O(import.meta.url);import{Easing as k}from"remotion";var J={entrance:k.out(k.exp),exit:k.in(k.exp),emphasis:k.out(k.back(1.4)),linear:k.linear,gentle:k.bezier(0.25,0.1,0.25,1),spring:k.out(k.back(1.7))},_={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{interpolate as Q,useCurrentFrame as R}from"remotion";import{jsx as K,Fragment as V}from"react/jsx-runtime";var C=({type:B,durationInFrames:D,direction:z,startAt:G=0,children:H})=>{let L=R();if(B==="none"||D===0)return K(V,{children:H});let M=Q(L,[G,G+D],z==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),N=U(B,M);return K("div",{style:N,children:H})};function U(B,D){let z=J.entrance(D);switch(B){case"fade":return{opacity:z,width:"100%",height:"100%"};case"slide-left":return{opacity:z,transform:`translateX(${(1-z)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:z,transform:`translateX(${(1-z)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-z)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}export{C as SceneTransitionWrapper};
@@ -0,0 +1 @@
1
+ import{createRequire as g}from"node:module";var KG=g(import.meta.url);import{Easing as z}from"remotion";var U={entrance:z.out(z.exp),exit:z.in(z.exp),emphasis:z.out(z.back(1.4)),linear:z.linear,gentle:z.bezier(0.25,0.1,0.25,1),spring:z.out(z.back(1.7))},B={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},QG={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 P}from"@contractspec/lib.design-system";var c={canvasBackground:P.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:P.colors.accent,gradientStart:P.colors.primary,gradientEnd:P.colors.accent},D={...P,video:c};var j={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 v(G,H){let J=H/1920;return{...G,fontSize:Math.round(G.fontSize*J),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*J*10)/10:void 0}}import{interpolate as Z,useCurrentFrame as d,useVideoConfig as l}from"remotion";import{jsx as o}from"react/jsx-runtime";var S=({text:G,variant:H="body",style:J,enterAt:L=0,exitAt:N,color:Q="#ffffff",align:W="left"})=>{let X=d(),{width:q}=l(),M=j[H],$={...v(M,q),...J},R=Z(X,[L,L+B.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),_=Z(R,[0,1],[0,1],{easing:U.entrance}),w=Z(R,[0,1],[30,0],{easing:U.entrance}),I=1,V=0;if(N!==void 0){let T=Z(X,[N,N+B.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});I=Z(T,[0,1],[1,0],{easing:U.exit}),V=Z(T,[0,1],[0,-20],{easing:U.exit})}let b=_*I,m=w+V;return o("div",{style:{fontSize:$.fontSize,lineHeight:$.lineHeight,fontWeight:$.fontWeight,letterSpacing:$.letterSpacing,color:Q,textAlign:W,opacity:b,transform:`translateY(${m}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as k}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var IG=30,C={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function y(G){let H=G.width/1920,J=G.height/1080;return{horizontal:Math.round(C.horizontal*H),vertical:Math.round(C.vertical*J),contentWidth:Math.round(C.contentWidth*H),contentHeight:Math.round(C.contentHeight*J)}}var BG={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 DG(){return[k.landscape,k.square,k.portrait]}import{interpolate as h,useCurrentFrame as n,useVideoConfig as s}from"remotion";import{jsx as E,jsxs as r}from"react/jsx-runtime";var f=({styleOverrides:G,showBranding:H=!0,animateEntrance:J=!0,variant:L="gradient",children:N})=>{let Q=n(),{width:W,height:X}=s(),q=D,M=y({type:"custom",width:W,height:X}),Y=G?.primaryColor??q.colors.primary,$=G?.accentColor??q.colors.accent,R=G?.darkMode??!0,_;switch(L){case"solid":_=R?"#0a0a0a":q.colors.background;break;case"gradient":_=R?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${q.colors.background} 0%, ${q.colors.muted} 100%)`;break;case"dark":_="#000000";break}let w=J?h(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.entrance}):1,I=H?h(Q,[B.brandReveal,B.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return r("div",{style:{width:W,height:X,background:_,position:"relative",overflow:"hidden",opacity:w},children:[L==="gradient"&&E("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${Y}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),E("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:N}),H&&E("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:I,color:R?"#ffffff":"#000000",fontSize:Math.round(16*(W/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{useCurrentFrame as i,useVideoConfig as a}from"remotion";import{jsx as p}from"react/jsx-runtime";var u=({height:G=4,color:H=D.colors.primary,backgroundColor:J="rgba(255,255,255,0.1)",position:L="bottom"})=>{let N=i(),{durationInFrames:Q,width:W}=a(),X=N/Q;return p("div",{style:{position:"absolute",[L]:0,left:0,width:W,height:G,backgroundColor:J,zIndex:100},children:p("div",{style:{width:`${X*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{AbsoluteFill as t,interpolate as F,Sequence as A,useCurrentFrame as x,useVideoConfig as e}from"remotion";import{jsx as K,jsxs as O}from"react/jsx-runtime";var fG=({hook:G,message:H,points:J=[],cta:L="Learn more",ctaUrl:N="contractspec.dev",accentColor:Q})=>{let{durationInFrames:W,width:X,height:q}=e(),Y=Q??D.colors.accent,$=q>X,R=75,_=60,w=120,I=W-90;return O(t,{children:[K(f,{variant:"gradient",showBranding:!0,children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:$?48:32,textAlign:"center",padding:$?"0 20px":0},children:[K(A,{from:0,durationInFrames:105,children:K("div",{style:{width:"100%"},children:K(S,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),K(A,{from:60,children:K("div",{style:{width:"100%"},children:K(S,{text:H,variant:$?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),J.length>0&&K(A,{from:120,children:K("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:$?"flex-start":"center",width:"100%",maxWidth:$?"100%":"80%",marginTop:16},children:J.map((V,b)=>K(GG,{text:V,index:b,startFrame:b*15,accent:Y},V))})}),K(A,{from:I,children:K(HG,{cta:L,url:N,accent:Y})})]})}),K(u,{color:Y})]})},GG=({text:G,startFrame:H,accent:J})=>{let L=x(),N=F(L,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=F(L,[H,H+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.entrance});return O("div",{style:{opacity:N,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[K("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:J,flexShrink:0}}),G]})},HG=({cta:G,url:H,accent:J})=>{let L=x(),N=F(L,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=F(L,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.emphasis});return O("div",{style:{opacity:N,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[K("div",{style:{backgroundColor:J,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),K("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:H})]})};export{fG as SocialClip};
@@ -0,0 +1 @@
1
+ import{createRequire as a}from"node:module";var qG=a(import.meta.url);import{Easing as R}from"remotion";var Y={entrance:R.out(R.exp),exit:R.in(R.exp),emphasis:R.out(R.back(1.4)),linear:R.linear,gentle:R.bezier(0.25,0.1,0.25,1),spring:R.out(R.back(1.7))},_={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},XG={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 w}from"@contractspec/lib.design-system";var j={canvasBackground:w.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:w.colors.accent,gradientStart:w.colors.primary,gradientEnd:w.colors.accent},D={...w,video:j};var b={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 A(G,J){let $=J/1920;return{...G,fontSize:Math.round(G.fontSize*$),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*$*10)/10:void 0}}import{interpolate as V,useCurrentFrame as r,useVideoConfig as n}from"remotion";import{jsx as i}from"react/jsx-runtime";var O=({text:G,variant:J="body",style:$,enterAt:N=0,exitAt:W,color:X="#ffffff",align:Q="left"})=>{let U=r(),{width:L}=n(),z=b[J],P={...A(z,L),...$},K=V(U,[N,N+_.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),M=V(K,[0,1],[0,1],{easing:Y.entrance}),H=V(K,[0,1],[30,0],{easing:Y.entrance}),q=1,F=0;if(W!==void 0){let T=V(U,[W,W+_.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});q=V(T,[0,1],[1,0],{easing:Y.exit}),F=V(T,[0,1],[0,-20],{easing:Y.exit})}let k=M*q,S=H+F;return i("div",{style:{fontSize:P.fontSize,lineHeight:P.lineHeight,fontWeight:P.fontWeight,letterSpacing:P.letterSpacing,color:X,textAlign:Q,opacity:k,transform:`translateY(${S}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as v}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var VG=30,C={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function x(G){let J=G.width/1920,$=G.height/1080;return{horizontal:Math.round(C.horizontal*J),vertical:Math.round(C.vertical*$),contentWidth:Math.round(C.contentWidth*J),contentHeight:Math.round(C.contentHeight*$)}}var wG={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 FG(){return[v.landscape,v.square,v.portrait]}import{interpolate as p,useCurrentFrame as t,useVideoConfig as e}from"remotion";import{jsx as h,jsxs as GG}from"react/jsx-runtime";var u=({styleOverrides:G,showBranding:J=!0,animateEntrance:$=!0,variant:N="gradient",children:W})=>{let X=t(),{width:Q,height:U}=e(),L=D,z=x({type:"custom",width:Q,height:U}),Z=G?.primaryColor??L.colors.primary,P=G?.accentColor??L.colors.accent,K=G?.darkMode??!0,M;switch(N){case"solid":M=K?"#0a0a0a":L.colors.background;break;case"gradient":M=K?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${L.colors.background} 0%, ${L.colors.muted} 100%)`;break;case"dark":M="#000000";break}let H=$?p(X,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:Y.entrance}):1,q=J?p(X,[_.brandReveal,_.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return GG("div",{style:{width:Q,height:U,background:M,position:"relative",overflow:"hidden",opacity:H},children:[N==="gradient"&&h("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${Z}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),h("div",{style:{position:"absolute",left:z.horizontal,top:z.vertical,width:z.contentWidth,height:z.contentHeight,display:"flex",flexDirection:"column"},children:W}),J&&h("div",{style:{position:"absolute",bottom:z.vertical/2,right:z.horizontal,opacity:q,color:K?"#ffffff":"#000000",fontSize:Math.round(16*(Q/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{useCurrentFrame as HG,useVideoConfig as JG}from"remotion";import{jsx as c}from"react/jsx-runtime";var g=({height:G=4,color:J=D.colors.primary,backgroundColor:$="rgba(255,255,255,0.1)",position:N="bottom"})=>{let W=HG(),{durationInFrames:X,width:Q}=JG(),U=W/X;return c("div",{style:{position:"absolute",[N]:0,left:0,width:Q,height:G,backgroundColor:$,zIndex:100},children:c("div",{style:{width:`${U*100}%`,height:"100%",backgroundColor:J,transition:"none"}})})};import{interpolate as f,useCurrentFrame as KG,useVideoConfig as QG}from"remotion";import{jsx as B,jsxs as E}from"react/jsx-runtime";var d={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},m=({lines:G,startAt:J=0,prompt:$="$ ",title:N="Terminal",backgroundColor:W=j.terminalBackground,typingSpeed:X=_.codeTypingPerChar})=>{let Q=KG(),{width:U}=QG(),L=A(b.code,U),z=[],Z=J;for(let K of G){let M=K.delay??10,H=Z+M;if(K.type==="command"){let q=K.text.length*X;z.push({startFrame:H,endFrame:H+q}),Z=H+q}else z.push({startFrame:H,endFrame:H+5}),Z=H+5}let P=f(Q,[J,J+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:Y.entrance});return E("div",{style:{backgroundColor:W,borderRadius:16,overflow:"hidden",opacity:P,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[E("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[E("div",{style:{display:"flex",gap:8},children:[B("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),B("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),B("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),B("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:L.fontSize*0.7,fontFamily:"monospace"},children:N})]}),B("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((K,M)=>{let H=z[M];if(!H||Q<H.startFrame)return null;let q=K.type==="command",F=d[K.type],k=K.text;if(q){let s=f(Q,[H.startFrame,H.endFrame],[0,K.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});k=K.text.slice(0,Math.floor(s))}let S=q?1:f(Q,[H.startFrame,H.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),o=q&&Q>=H.startFrame&&Q<=H.endFrame&&Q%16<10;return E("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:L.fontSize,lineHeight:1.8,color:F,opacity:S,whiteSpace:"pre-wrap"},children:[q&&B("span",{style:{color:"#3fb950"},children:$}),K.type==="comment"&&B("span",{style:{color:d.comment},children:"# "}),k,o&&B("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${M}-${K.text.slice(0,20)}`)})})]})};import{AbsoluteFill as $G,Sequence as l,useVideoConfig as zG}from"remotion";import{jsx as I,jsxs as y}from"react/jsx-runtime";var aG=({title:G,subtitle:J,lines:$,terminalTitle:N="Terminal",prompt:W="$ ",summary:X})=>{let{durationInFrames:Q}=zG(),U=D,L=40,z=Q-90;return y($G,{children:[I(u,{variant:"dark",showBranding:!0,children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[y("div",{children:[I(O,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),J&&I("div",{style:{marginTop:8},children:I(O,{text:J,variant:"body",enterAt:15,color:U.colors.mutedForeground})})]}),I(l,{from:40,children:I("div",{style:{flex:1},children:I(m,{lines:$,startAt:0,prompt:W,title:N})})}),X&&I(l,{from:z,children:I("div",{style:{marginTop:"auto",paddingTop:24},children:I(O,{text:X,variant:"subheading",enterAt:0,color:U.colors.accent,align:"center"})})})]})}),I(g,{})]})};export{aG as TerminalDemo};
@@ -0,0 +1 @@
1
+ import{createRequire as J}from"node:module";var N=J(import.meta.url);import{Easing as x}from"remotion";var $={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))},P={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},w={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 K={canvasBackground:z.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:z.colors.accent,gradientStart:z.colors.primary,gradientEnd:z.colors.accent},X={...z,video:K};var m={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 p(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 F=30,G={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function I(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 M={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 R(){return[H.landscape,H.square,H.portrait]}export{m as videoTypography,w as videoTransitions,G as videoSafeZone,M as videoPositions,$ as videoEasing,P as videoDurations,p as scaleTypography,I as scaleSafeZone,R as getAllFormatVariants,X as defaultVideoTheme,K as defaultVideoColors,z as defaultTokens,H as VIDEO_FORMATS,F as DEFAULT_FPS};
@@ -0,0 +1 @@
1
+ import{createRequire as w}from"node:module";var y=w(import.meta.url);import{VIDEO_FORMATS as j}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var C=30,h={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function G(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 H={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 J(){return[j.landscape,j.square,j.portrait]}export{h as videoSafeZone,H as videoPositions,G as scaleSafeZone,J as getAllFormatVariants,j as VIDEO_FORMATS,C as DEFAULT_FPS};
@@ -0,0 +1 @@
1
+ import{createRequire as h}from"node:module";var k=h(import.meta.url);import{Easing as d}from"remotion";var v={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))},w={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},x={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{x as videoTransitions,v as videoEasing,w as videoDurations};
@@ -0,0 +1 @@
1
+ import{createRequire as q}from"node:module";var B=q(import.meta.url);import{defaultTokens as j}from"@contractspec/lib.design-system";var z={canvasBackground:j.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:j.colors.accent,gradientStart:j.colors.primary,gradientEnd:j.colors.accent},F={...j,video:z};export{F as defaultVideoTheme,z as defaultVideoColors,j as defaultTokens};
@@ -0,0 +1 @@
1
+ import{createRequire as m}from"node:module";var u=m(import.meta.url);var A={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 B(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{A as videoTypography,B as scaleTypography};
@@ -0,0 +1 @@
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);
@@ -0,0 +1,172 @@
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
2
+
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.
4
+
5
+ \`\`\`ts
6
+ import {
7
+ defaultVideoTheme,
8
+ videoEasing,
9
+ videoDurations,
10
+ videoTypography,
11
+ videoSafeZone,
12
+ scaleSafeZone,
13
+ } from "@contractspec/lib.video-gen/design";
14
+ \`\`\`
15
+
16
+ ## Tokens
17
+
18
+ ### Brand Bridge
19
+
20
+ \`VideoThemeTokens\` extends the design-system \`ThemeTokens\` with a \`video\` namespace for video-specific colors:
21
+
22
+ \`\`\`ts
23
+ import { defaultVideoTheme } from "@contractspec/lib.video-gen/design/tokens";
24
+
25
+ // Brand tokens (from @contractspec/lib.design-system)
26
+ defaultVideoTheme.colors.primary; // brand primary
27
+ defaultVideoTheme.colors.accent; // brand accent
28
+
29
+ // Video-specific extensions
30
+ defaultVideoTheme.video.canvasBackground; // frame background
31
+ defaultVideoTheme.video.codeBackground; // "#1e1e2e"
32
+ defaultVideoTheme.video.terminalBackground; // "#0d1117"
33
+ defaultVideoTheme.video.terminalForeground; // "#c9d1d9"
34
+ defaultVideoTheme.video.highlight; // accent color
35
+ defaultVideoTheme.video.gradientStart; // primary
36
+ defaultVideoTheme.video.gradientEnd; // accent
37
+ \`\`\`
38
+
39
+ > Do not duplicate brand color values. Import and extend from \`@contractspec/lib.design-system\`.
40
+
41
+ ## Motion
42
+
43
+ ### Easing Functions
44
+
45
+ Pre-configured easing curves for use with Remotion's \`interpolate()\`:
46
+
47
+ | Key | Easing | Use Case |
48
+ |-----|--------|----------|
49
+ | \`entrance\` | \`Easing.out(Easing.exp)\` | Objects appearing |
50
+ | \`exit\` | \`Easing.in(Easing.exp)\` | Objects disappearing |
51
+ | \`emphasis\` | \`Easing.out(Easing.back(1.4))\` | Drawing attention, bounce |
52
+ | \`linear\` | \`Easing.linear\` | Progress bars, typing |
53
+ | \`gentle\` | \`Easing.bezier(0.25, 0.1, 0.25, 1)\` | Subtle movements |
54
+ | \`spring\` | \`Easing.out(Easing.back(1.7))\` | Playful movements |
55
+
56
+ \`\`\`ts
57
+ import { interpolate } from "remotion";
58
+ import { videoEasing } from "@contractspec/lib.video-gen/design/motion";
59
+
60
+ const opacity = interpolate(frame, [0, 15], [0, 1], {
61
+ easing: videoEasing.entrance,
62
+ extrapolateLeft: "clamp",
63
+ extrapolateRight: "clamp",
64
+ });
65
+ \`\`\`
66
+
67
+ ### Durations (frames at 30fps)
68
+
69
+ | Key | Frames | Seconds | Use Case |
70
+ |-----|--------|---------|----------|
71
+ | \`sceneTransition\` | 20 | 0.67s | Between scenes |
72
+ | \`textEntrance\` | 15 | 0.5s | Text slide-in |
73
+ | \`textExit\` | 12 | 0.4s | Text slide-out |
74
+ | \`codeTypingPerChar\` | 2 | 0.07s | Code typing speed |
75
+ | \`sectionPause\` | 30 | 1.0s | Pause after concept |
76
+ | \`emphasisPause\` | 15 | 0.5s | Brief emphasis |
77
+ | \`brandReveal\` | 25 | 0.83s | Logo/watermark |
78
+ | \`minScene\` | 60 | 2.0s | Minimum scene length |
79
+ | \`shortScene\` | 60 | 2.0s | Short scene |
80
+ | \`mediumScene\` | 120 | 4.0s | Medium scene |
81
+ | \`longScene\` | 240 | 8.0s | Long scene |
82
+
83
+ ### Transition Presets
84
+
85
+ \`\`\`ts
86
+ import { videoTransitions } from "@contractspec/lib.video-gen/design/motion";
87
+
88
+ // { type: "fade", durationInFrames: 20 }
89
+ videoTransitions.fade;
90
+
91
+ // { type: "slide-left", durationInFrames: 20 }
92
+ videoTransitions.slideLeft;
93
+ \`\`\`
94
+
95
+ ## Typography
96
+
97
+ ### Type Scale (1920x1080 baseline)
98
+
99
+ | Key | Size | Weight | Use Case |
100
+ |-----|------|--------|----------|
101
+ | \`title\` | 72px | 700 | Main title |
102
+ | \`heading\` | 56px | 600 | Section heading |
103
+ | \`subheading\` | 40px | 500 | Subheading |
104
+ | \`body\` | 32px | 400 | Body text |
105
+ | \`code\` | 28px | 400 | Monospace code |
106
+ | \`caption\` | 24px | 400 | Small caption |
107
+ | \`label\` | 20px | 600 | Badge / label |
108
+
109
+ ### Scaling for Other Formats
110
+
111
+ Use \`scaleTypography()\` to proportionally scale for non-landscape formats:
112
+
113
+ \`\`\`ts
114
+ import {
115
+ videoTypography,
116
+ scaleTypography,
117
+ } from "@contractspec/lib.video-gen/design/typography";
118
+
119
+ // Scale heading for 1080x1080 (square)
120
+ const squareHeading = scaleTypography(videoTypography.heading, 1080);
121
+ // -> fontSize: 32, lineHeight: 1.2, fontWeight: 600
122
+ \`\`\`
123
+
124
+ ## Layouts
125
+
126
+ ### Safe Zones
127
+
128
+ Content-safe padding for text within video frames (1920x1080 baseline):
129
+
130
+ \`\`\`ts
131
+ import {
132
+ videoSafeZone,
133
+ scaleSafeZone,
134
+ } from "@contractspec/lib.video-gen/design/layouts";
135
+
136
+ videoSafeZone.horizontal; // 120px
137
+ videoSafeZone.vertical; // 80px
138
+ videoSafeZone.contentWidth; // 1680px
139
+ videoSafeZone.contentHeight; // 920px
140
+
141
+ // Scale for portrait (1080x1920)
142
+ const portrait = scaleSafeZone({ type: "portrait", width: 1080, height: 1920 });
143
+ \`\`\`
144
+
145
+ ### Standard Positions
146
+
147
+ \`\`\`ts
148
+ import { videoPositions } from "@contractspec/lib.video-gen/design/layouts";
149
+
150
+ videoPositions.center; // { x: 960, y: 540 }
151
+ videoPositions.topLeft; // { x: 120, y: 80 }
152
+ videoPositions.bottomRight; // { x: 1800, y: 1000 } -- logos, watermarks
153
+ videoPositions.bottomCenter; // { x: 960, y: 960 } -- captions
154
+ \`\`\`
155
+
156
+ ### Format Variants
157
+
158
+ \`\`\`ts
159
+ import {
160
+ VIDEO_FORMATS,
161
+ getAllFormatVariants,
162
+ DEFAULT_FPS,
163
+ } from "@contractspec/lib.video-gen/design/layouts";
164
+
165
+ VIDEO_FORMATS.landscape; // { type: "landscape", width: 1920, height: 1080 }
166
+ VIDEO_FORMATS.portrait; // { type: "portrait", width: 1080, height: 1920 }
167
+ VIDEO_FORMATS.square; // { type: "square", width: 1080, height: 1080 }
168
+
169
+ getAllFormatVariants(); // [landscape, square, portrait]
170
+ DEFAULT_FPS; // 30
171
+ \`\`\`
172
+ `}];f(h);
@@ -0,0 +1,165 @@
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
2
+
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.
4
+
5
+ \`\`\`
6
+ VideoBrief
7
+ |
8
+ v
9
+ ScenePlanner.plan(brief) --> ScenePlan (scenes + durations)
10
+ |
11
+ v
12
+ ScriptGenerator.generate(brief) --> NarrationScript (text + segments)
13
+ |
14
+ v
15
+ VoiceProvider.synthesize(text) --> AudioTrack (optional)
16
+ |
17
+ v
18
+ VideoGenerator.generate(brief) --> VideoProject (complete scene graph)
19
+ \`\`\`
20
+
21
+ ## VideoGenerator
22
+
23
+ The main orchestrator. Wires ScenePlanner, ScriptGenerator, and optional VoiceProvider into a single pipeline.
24
+
25
+ \`\`\`ts
26
+ import { VideoGenerator } from "@contractspec/lib.video-gen/generators";
27
+ import type { VideoBrief } from "@contractspec/lib.video-gen/types";
28
+
29
+ // Minimal (deterministic, no LLM, no voice)
30
+ const generator = new VideoGenerator({ fps: 30 });
31
+
32
+ // Full (with LLM for richer scenes + voice narration)
33
+ const generator = new VideoGenerator({
34
+ llm: myLLMProvider,
35
+ voice: myVoiceProvider,
36
+ model: "gpt-4o",
37
+ temperature: 0.4,
38
+ defaultVoiceId: "rachel",
39
+ fps: 30,
40
+ });
41
+
42
+ const project = await generator.generate(brief);
43
+ \`\`\`
44
+
45
+ ### Pipeline Steps
46
+
47
+ 1. **Scene planning** -- \`ScenePlanner.plan(brief)\` breaks the brief into concrete \`PlannedScene[]\` with composition IDs, props, and durations.
48
+ 2. **Script generation** -- If \`brief.narration.enabled\`, \`ScriptGenerator.generate()\` produces a \`NarrationScript\` with per-scene text segments.
49
+ 3. **Voice synthesis** -- If a \`VoiceProvider\` is configured and narration is enabled, synthesizes audio via \`voice.synthesize()\`.
50
+ 4. **Assembly** -- Combines scenes, audio, and metadata into a \`VideoProject\`.
51
+
52
+ ### Constructor Options
53
+
54
+ | Option | Type | Default | Description |
55
+ |--------|------|---------|-------------|
56
+ | \`llm\` | \`LLMProvider\` | -- | Optional LLM for enhanced generation |
57
+ | \`voice\` | \`VoiceProvider\` | -- | Optional voice synthesis provider |
58
+ | \`model\` | \`string\` | -- | LLM model override |
59
+ | \`temperature\` | \`number\` | \`0.4\` | LLM temperature (lower = more deterministic) |
60
+ | \`defaultVoiceId\` | \`string\` | -- | Default voice for narration |
61
+ | \`fps\` | \`number\` | \`30\` | Frames per second |
62
+
63
+ ## ScenePlanner
64
+
65
+ Breaks a \`VideoBrief\` into concrete scenes mapped to registered compositions.
66
+
67
+ \`\`\`ts
68
+ import { ScenePlanner } from "@contractspec/lib.video-gen/generators";
69
+
70
+ const planner = new ScenePlanner({ fps: 30 });
71
+ const plan = await planner.plan(brief);
72
+
73
+ plan.scenes; // PlannedScene[]
74
+ plan.estimatedDurationSeconds; // total estimated duration
75
+ plan.narrationScript; // combined narration text
76
+ \`\`\`
77
+
78
+ ### Deterministic Path (no LLM)
79
+
80
+ Maps brief sections to \`SocialClip\` compositions:
81
+
82
+ | Brief Section | Scene | Duration |
83
+ |---------------|-------|----------|
84
+ | \`title\` + \`summary\` | Hook / title | 3s |
85
+ | \`problems\` | Problem statement | 4s |
86
+ | \`solutions\` | Solution showcase | 5s |
87
+ | \`metrics\` | Proof / results | 3s |
88
+ | \`callToAction\` | CTA | 2s |
89
+
90
+ If \`brief.targetDurationSeconds\` is set, all scene durations are scaled proportionally.
91
+
92
+ ### LLM-Enhanced Path
93
+
94
+ With an \`LLMProvider\`, the planner sends the brief to the LLM and requests a scene breakdown as JSON. The LLM can choose from \`ApiOverview\`, \`SocialClip\`, or \`TerminalDemo\` compositions. Falls back to deterministic on any failure.
95
+
96
+ ## ScriptGenerator
97
+
98
+ Produces narration text from a \`ContentBrief\` with style control.
99
+
100
+ \`\`\`ts
101
+ import { ScriptGenerator } from "@contractspec/lib.video-gen/generators";
102
+
103
+ const scriptGen = new ScriptGenerator({ temperature: 0.5 });
104
+ const script = await scriptGen.generate(brief.content, brief.narration);
105
+
106
+ script.fullText; // complete narration
107
+ script.segments; // NarrationSegment[] (per-scene text)
108
+ script.estimatedDurationSeconds; // at ~150 words/min
109
+ script.style; // "professional" | "casual" | "technical"
110
+ \`\`\`
111
+
112
+ ### Narration Styles
113
+
114
+ | Style | Tone |
115
+ |-------|------|
116
+ | \`professional\` | Clear, authoritative, concise |
117
+ | \`casual\` | Friendly, conversational, approachable |
118
+ | \`technical\` | Precise, detailed, accurate |
119
+
120
+ ### NarrationSegment
121
+
122
+ Each segment maps to a scene and provides timing estimates:
123
+
124
+ \`\`\`ts
125
+ interface NarrationSegment {
126
+ sceneId: string; // "intro", "problems", "solutions", "metrics", "cta"
127
+ text: string; // narration text for this segment
128
+ estimatedDurationSeconds: number; // at ~150 words/min
129
+ }
130
+ \`\`\`
131
+
132
+ ## Input Types
133
+
134
+ ### VideoBrief
135
+
136
+ \`\`\`ts
137
+ interface VideoBrief {
138
+ content: ContentBrief; // from @contractspec/lib.content-gen
139
+ format: VideoFormat; // landscape, portrait, square, or custom
140
+ targetDurationSeconds?: number; // auto-calculated if omitted
141
+ narration?: NarrationConfig; // { enabled, voiceId, language, style }
142
+ style?: VideoStyleOverrides; // colors, fonts, dark mode
143
+ compositionId?: string; // force a specific composition
144
+ }
145
+ \`\`\`
146
+
147
+ ### PlannedScene
148
+
149
+ \`\`\`ts
150
+ interface PlannedScene {
151
+ compositionId: string; // maps to a registered Remotion composition
152
+ props: Record<string, unknown>; // input props for the composition
153
+ durationInFrames: number; // scene duration
154
+ narrationText?: string; // narrator text for this scene
155
+ notes?: string; // planning notes (LLM path only)
156
+ }
157
+ \`\`\`
158
+
159
+ ## Guardrails
160
+
161
+ - Generators are **stateless** -- no side effects, no caching. Call \`generate()\` / \`plan()\` for each video.
162
+ - LLM responses are parsed as JSON; any parse failure falls back to deterministic.
163
+ - Temperature defaults are conservative (0.3-0.5) for reproducibility.
164
+ - Duration estimates use 150 words/min speaking rate.
165
+ `}];f(h);