@contractspec/lib.video-gen 2.7.20 → 2.7.22

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.
@@ -1,4 +1,4 @@
1
- var R1=((G)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(G,{get:(K,L)=>(typeof require<"u"?require:K)[L]}):G)(function(G){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+G+'" is not supported')});import{Easing as w}from"remotion";var R={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))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},_1={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 y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={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,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as P8,useVideoConfig as O8}from"remotion";import{jsx as k8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=P8(),{width:U}=O8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return k8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,x={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(x.horizontal*K),vertical:Math.round(x.vertical*L),contentWidth:Math.round(x.contentWidth*K),contentHeight:Math.round(x.contentHeight*L)}}var T1={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 C1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as E8,useVideoConfig as S8}from"remotion";import{jsx as a,jsxs as T8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=E8(),{width:$,height:W}=S8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return T8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as C8,useVideoConfig as v8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=C8(),{width:U}=v8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("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:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as A8,useVideoConfig as F8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=A8(),{durationInFrames:Q,width:$}=F8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as b8,interpolate as f,Sequence as i,useCurrentFrame as X8,useVideoConfig as y8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var h8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=y8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(b8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(f8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(x8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},f8=({method:G,enterAt:K})=>{let L=X8(),z=f(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=f(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},x8=({label:G,startFrame:K})=>{let L=X8(),z=f(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=f(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=f(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,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:G})};import{interpolate as s,useCurrentFrame as j8,useVideoConfig as p8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=j8(),{width:W}=p8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("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:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as g8,useCurrentFrame as u8}from"remotion";import{jsx as N8,Fragment as l8}from"react/jsx-runtime";var m8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=u8();if(G==="none"||K===0)return N8(l8,{children:H});let $=g8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=d8(G,$);return N8("div",{style:W,children:H})};function d8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as c8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as o8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var r8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=o8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(c8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(a8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(n8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},a8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},n8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as i8,Sequence as Y8,useVideoConfig as s8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var t8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=s8(),W=P,U=40,M=$-90;return e(i8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as e8}from"@contractspec/lib.contracts-spec/translations";var G8=e8({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
1
+ var B1=((G)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(G,{get:(K,L)=>(typeof require<"u"?require:K)[L]}):G)(function(G){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+G+'" is not supported')});import{Easing as w}from"remotion";var R={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))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},q1={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 y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={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,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as P8,useVideoConfig as O8}from"remotion";import{jsx as k8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=P8(),{width:U}=O8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return k8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,f={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(f.horizontal*K),vertical:Math.round(f.vertical*L),contentWidth:Math.round(f.contentWidth*K),contentHeight:Math.round(f.contentHeight*L)}}var C1={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 v1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as E8,useVideoConfig as S8}from"remotion";import{jsx as a,jsxs as T8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=E8(),{width:$,height:W}=S8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return T8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as C8,useVideoConfig as v8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=C8(),{width:U}=v8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("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:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as A8,useVideoConfig as F8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=A8(),{durationInFrames:Q,width:$}=F8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as b8,interpolate as x,Sequence as i,useCurrentFrame as X8,useVideoConfig as y8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var h8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=y8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(b8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(x8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(f8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},x8=({method:G,enterAt:K})=>{let L=X8(),z=x(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=x(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},f8=({label:G,startFrame:K})=>{let L=X8(),z=x(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=x(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=x(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,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:G})};import{interpolate as s,useCurrentFrame as j8,useVideoConfig as p8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=j8(),{width:W}=p8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("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:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as g8,useCurrentFrame as u8}from"remotion";import{jsx as N8,Fragment as l8}from"react/jsx-runtime";var m8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=u8();if(G==="none"||K===0)return N8(l8,{children:H});let $=g8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=d8(G,$);return N8("div",{style:W,children:H})};function d8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as c8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as o8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var r8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=o8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(c8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(a8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(n8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},a8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},n8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as i8,Sequence as Y8,useVideoConfig as s8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var t8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=s8(),W=P,U=40,M=$-90;return e(i8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as e8}from"@contractspec/lib.contracts-spec/translations";var G8=e8({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
2
2
  Write a narration script for a short video (30-60 seconds).
3
3
  {styleGuide}
4
4
 
@@ -79,4 +79,4 @@ Retournez un objet JSON avec la forme :
79
79
  }
80
80
 
81
81
  Gardez la durée totale autour de {targetSeconds} secondes.
82
- Privilégiez la clarté et le rythme. Chaque scène doit communiquer une idée.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique précis. Soyez détaillé et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le défi : {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution : {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les résultats : {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le problème",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le problème : {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution : {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Résultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Génère :",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modèle Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},L1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as z1,isSupportedLocale as H1,resolveLocale as J1,SUPPORTED_LOCALES as Q1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as $1}from"@contractspec/lib.contracts-spec/translations";var z8=$1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,W1=z8.getDefault,X1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as U1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??U1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:N1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function N1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},M1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function Y1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as kK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";export{C as videoTypography,_1 as videoTransitions,x as videoSafeZone,T1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,Y1 as resolveRenderConfig,D8 as qualityPresets,C1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,M1 as codecFormatMap,q8 as VideoGenerator,t8 as TerminalDemo,t as Terminal,r8 as SocialClip,m8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,h8 as ApiOverview,I as AnimatedText};
82
+ Privilégiez la clarté et le rythme. Chaque scène doit communiquer une idée.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique précis. Soyez détaillé et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le défi : {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution : {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les résultats : {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le problème",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le problème : {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution : {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Résultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Génère :",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modèle Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},L1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as z1,isSupportedLocale as H1,resolveLocale as J1,SUPPORTED_LOCALES as Q1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as $1}from"@contractspec/lib.contracts-spec/translations";var z8=$1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,W1=z8.getDefault,X1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as U1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??U1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:N1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function N1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},M1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function Y1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as EK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";import{defineFeature as R1}from"@contractspec/lib.contracts-spec/features";var TK=R1({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{C as videoTypography,q1 as videoTransitions,f as videoSafeZone,C1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,Y1 as resolveRenderConfig,D8 as qualityPresets,v1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,M1 as codecFormatMap,q8 as VideoGenerator,TK as VideoGenFeature,t8 as TerminalDemo,t as Terminal,r8 as SocialClip,m8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,h8 as ApiOverview,I as AnimatedText};
@@ -0,0 +1 @@
1
+ var m=((g)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(g,{get:(h,j)=>(typeof require<"u"?require:h)[j]}):g)(function(g){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+g+'" is not supported')});import{defineFeature as k}from"@contractspec/lib.contracts-spec/features";var w=k({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{w as VideoGenFeature};
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './generators';
4
4
  export type { QualityPreset } from './renderers/config';
5
5
  export { codecFormatMap, defaultRenderConfig, qualityPresets, resolveRenderConfig, } from './renderers/config';
6
6
  export * from './types';
7
+ export * from './video-gen.feature';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- var R1=import.meta.require;import{Easing as w}from"remotion";var R={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))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},_1={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 y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={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,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as P8,useVideoConfig as O8}from"remotion";import{jsx as k8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=P8(),{width:U}=O8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return k8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,x={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(x.horizontal*K),vertical:Math.round(x.vertical*L),contentWidth:Math.round(x.contentWidth*K),contentHeight:Math.round(x.contentHeight*L)}}var T1={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 C1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as E8,useVideoConfig as S8}from"remotion";import{jsx as a,jsxs as T8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=E8(),{width:$,height:W}=S8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return T8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as C8,useVideoConfig as v8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=C8(),{width:U}=v8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("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:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]})})]})};import{useCurrentFrame as A8,useVideoConfig as F8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=A8(),{durationInFrames:Q,width:$}=F8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as b8,interpolate as f,Sequence as i,useCurrentFrame as X8,useVideoConfig as y8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var h8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=y8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(b8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(f8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(x8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},f8=({method:G,enterAt:K})=>{let L=X8(),z=f(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=f(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},x8=({label:G,startFrame:K})=>{let L=X8(),z=f(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=f(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=f(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,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:G})};import{interpolate as s,useCurrentFrame as j8,useVideoConfig as p8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=j8(),{width:W}=p8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("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:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as g8,useCurrentFrame as u8}from"remotion";import{jsx as N8,Fragment as l8}from"react/jsx-runtime";var m8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=u8();if(G==="none"||K===0)return N8(l8,{children:H});let $=g8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=d8(G,$);return N8("div",{style:W,children:H})};function d8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as c8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as o8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var r8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=o8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(c8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(a8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(n8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},a8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},n8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as i8,Sequence as Y8,useVideoConfig as s8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var t8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=s8(),W=P,U=40,M=$-90;return e(i8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as e8}from"@contractspec/lib.contracts-spec/translations";var G8=e8({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
2
+ var B1=import.meta.require;import{Easing as w}from"remotion";var R={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))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},q1={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 y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={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,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as P8,useVideoConfig as O8}from"remotion";import{jsx as k8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=P8(),{width:U}=O8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return k8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,f={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(f.horizontal*K),vertical:Math.round(f.vertical*L),contentWidth:Math.round(f.contentWidth*K),contentHeight:Math.round(f.contentHeight*L)}}var C1={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 v1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as E8,useVideoConfig as S8}from"remotion";import{jsx as a,jsxs as T8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=E8(),{width:$,height:W}=S8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return T8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as C8,useVideoConfig as v8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=C8(),{width:U}=v8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("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:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]})})]})};import{useCurrentFrame as A8,useVideoConfig as F8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=A8(),{durationInFrames:Q,width:$}=F8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as b8,interpolate as x,Sequence as i,useCurrentFrame as X8,useVideoConfig as y8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var h8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=y8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(b8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(x8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(f8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},x8=({method:G,enterAt:K})=>{let L=X8(),z=x(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=x(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},f8=({label:G,startFrame:K})=>{let L=X8(),z=x(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=x(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=x(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,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:G})};import{interpolate as s,useCurrentFrame as j8,useVideoConfig as p8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=j8(),{width:W}=p8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("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:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as g8,useCurrentFrame as u8}from"remotion";import{jsx as N8,Fragment as l8}from"react/jsx-runtime";var m8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=u8();if(G==="none"||K===0)return N8(l8,{children:H});let $=g8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=d8(G,$);return N8("div",{style:W,children:H})};function d8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as c8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as o8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var r8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=o8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(c8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(a8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(n8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},a8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},n8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as i8,Sequence as Y8,useVideoConfig as s8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var t8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=s8(),W=P,U=40,M=$-90;return e(i8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as e8}from"@contractspec/lib.contracts-spec/translations";var G8=e8({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
3
3
  Write a narration script for a short video (30-60 seconds).
4
4
  {styleGuide}
5
5
 
@@ -80,4 +80,4 @@ Retournez un objet JSON avec la forme\xA0:
80
80
  }
81
81
 
82
82
  Gardez la dur\xE9e totale autour de {targetSeconds} secondes.
83
- Privil\xE9giez la clart\xE9 et le rythme. Chaque sc\xE8ne doit communiquer une id\xE9e.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique pr\xE9cis. Soyez d\xE9taill\xE9 et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le d\xE9fi\xA0: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution\xA0: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les r\xE9sultats\xA0: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le probl\xE8me",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le probl\xE8me\xA0: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution\xA0: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"R\xE9sultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"G\xE9n\xE8re\xA0:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Mod\xE8le Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},L1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as z1,isSupportedLocale as H1,resolveLocale as J1,SUPPORTED_LOCALES as Q1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as $1}from"@contractspec/lib.contracts-spec/translations";var z8=$1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,W1=z8.getDefault,X1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as U1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??U1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:N1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function N1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},M1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function Y1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as kK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";export{C as videoTypography,_1 as videoTransitions,x as videoSafeZone,T1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,Y1 as resolveRenderConfig,D8 as qualityPresets,C1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,M1 as codecFormatMap,q8 as VideoGenerator,t8 as TerminalDemo,t as Terminal,r8 as SocialClip,m8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,h8 as ApiOverview,I as AnimatedText};
83
+ Privil\xE9giez la clart\xE9 et le rythme. Chaque sc\xE8ne doit communiquer une id\xE9e.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique pr\xE9cis. Soyez d\xE9taill\xE9 et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le d\xE9fi\xA0: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution\xA0: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les r\xE9sultats\xA0: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le probl\xE8me",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le probl\xE8me\xA0: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution\xA0: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"R\xE9sultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"G\xE9n\xE8re\xA0:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Mod\xE8le Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},L1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as z1,isSupportedLocale as H1,resolveLocale as J1,SUPPORTED_LOCALES as Q1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as $1}from"@contractspec/lib.contracts-spec/translations";var z8=$1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,W1=z8.getDefault,X1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as U1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??U1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:N1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function N1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},M1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function Y1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as EK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";import{defineFeature as R1}from"@contractspec/lib.contracts-spec/features";var TK=R1({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{C as videoTypography,q1 as videoTransitions,f as videoSafeZone,C1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,Y1 as resolveRenderConfig,D8 as qualityPresets,v1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,M1 as codecFormatMap,q8 as VideoGenerator,TK as VideoGenFeature,t8 as TerminalDemo,t as Terminal,r8 as SocialClip,m8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,h8 as ApiOverview,I as AnimatedText};
@@ -1,4 +1,4 @@
1
- import{createRequire as P8}from"node:module";var Z1=P8(import.meta.url);import{Easing as w}from"remotion";var R={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))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},I1={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 y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={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,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as O8,useVideoConfig as k8}from"remotion";import{jsx as E8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=O8(),{width:U}=k8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return E8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,x={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(x.horizontal*K),vertical:Math.round(x.vertical*L),contentWidth:Math.round(x.contentWidth*K),contentHeight:Math.round(x.contentHeight*L)}}var v1={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 A1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as S8,useVideoConfig as T8}from"remotion";import{jsx as a,jsxs as C8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=S8(),{width:$,height:W}=T8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return C8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as v8,useVideoConfig as A8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=v8(),{width:U}=A8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("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:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as F8,useVideoConfig as b8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=F8(),{durationInFrames:Q,width:$}=b8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as y8,interpolate as f,Sequence as i,useCurrentFrame as X8,useVideoConfig as h8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var f8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=h8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(y8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(x8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(j8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},x8=({method:G,enterAt:K})=>{let L=X8(),z=f(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=f(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},j8=({label:G,startFrame:K})=>{let L=X8(),z=f(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=f(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=f(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,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:G})};import{interpolate as s,useCurrentFrame as p8,useVideoConfig as g8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=p8(),{width:W}=g8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("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:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as u8,useCurrentFrame as m8}from"remotion";import{jsx as N8,Fragment as c8}from"react/jsx-runtime";var d8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=m8();if(G==="none"||K===0)return N8(c8,{children:H});let $=u8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=l8(G,$);return N8("div",{style:W,children:H})};function l8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as o8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as r8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var a8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=r8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(o8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(n8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(i8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},n8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},i8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as s8,Sequence as Y8,useVideoConfig as t8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var e8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=t8(),W=P,U=40,M=$-90;return e(s8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as G1}from"@contractspec/lib.contracts-spec/translations";var G8=G1({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
1
+ import{createRequire as P8}from"node:module";var _1=P8(import.meta.url);import{Easing as w}from"remotion";var R={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))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},D1={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 y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={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,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as O8,useVideoConfig as k8}from"remotion";import{jsx as E8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=O8(),{width:U}=k8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return E8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,f={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(f.horizontal*K),vertical:Math.round(f.vertical*L),contentWidth:Math.round(f.contentWidth*K),contentHeight:Math.round(f.contentHeight*L)}}var A1={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 F1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as S8,useVideoConfig as T8}from"remotion";import{jsx as a,jsxs as C8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=S8(),{width:$,height:W}=T8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return C8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as v8,useVideoConfig as A8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=v8(),{width:U}=A8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("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:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as F8,useVideoConfig as b8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=F8(),{durationInFrames:Q,width:$}=b8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as y8,interpolate as x,Sequence as i,useCurrentFrame as X8,useVideoConfig as h8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var x8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=h8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(y8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(f8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(j8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},f8=({method:G,enterAt:K})=>{let L=X8(),z=x(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=x(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},j8=({label:G,startFrame:K})=>{let L=X8(),z=x(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=x(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=x(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,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:G})};import{interpolate as s,useCurrentFrame as p8,useVideoConfig as g8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=p8(),{width:W}=g8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("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:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as u8,useCurrentFrame as m8}from"remotion";import{jsx as N8,Fragment as c8}from"react/jsx-runtime";var d8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=m8();if(G==="none"||K===0)return N8(c8,{children:H});let $=u8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=l8(G,$);return N8("div",{style:W,children:H})};function l8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as o8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as r8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var a8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=r8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(o8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(n8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(i8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},n8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},i8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as s8,Sequence as Y8,useVideoConfig as t8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var e8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=t8(),W=P,U=40,M=$-90;return e(s8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as G1}from"@contractspec/lib.contracts-spec/translations";var G8=G1({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
2
2
  Write a narration script for a short video (30-60 seconds).
3
3
  {styleGuide}
4
4
 
@@ -79,4 +79,4 @@ Retournez un objet JSON avec la forme :
79
79
  }
80
80
 
81
81
  Gardez la durée totale autour de {targetSeconds} secondes.
82
- Privilégiez la clarté et le rythme. Chaque scène doit communiquer une idée.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique précis. Soyez détaillé et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le défi : {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution : {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les résultats : {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le problème",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le problème : {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution : {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Résultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Génère :",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modèle Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},z1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as H1,isSupportedLocale as J1,resolveLocale as Q1,SUPPORTED_LOCALES as $1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as W1}from"@contractspec/lib.contracts-spec/translations";var z8=W1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,X1=z8.getDefault,U1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as N1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??N1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:M1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function M1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},Y1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function R1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as SK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";export{C as videoTypography,I1 as videoTransitions,x as videoSafeZone,v1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,R1 as resolveRenderConfig,D8 as qualityPresets,A1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,Y1 as codecFormatMap,q8 as VideoGenerator,e8 as TerminalDemo,t as Terminal,a8 as SocialClip,d8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,f8 as ApiOverview,I as AnimatedText};
82
+ Privilégiez la clarté et le rythme. Chaque scène doit communiquer une idée.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique précis. Soyez détaillé et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le défi : {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution : {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les résultats : {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le problème",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le problème : {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution : {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Résultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Génère :",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modèle Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},z1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as H1,isSupportedLocale as J1,resolveLocale as Q1,SUPPORTED_LOCALES as $1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as W1}from"@contractspec/lib.contracts-spec/translations";var z8=W1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,X1=z8.getDefault,U1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as N1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??N1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:M1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function M1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},Y1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function R1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as TK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";import{defineFeature as B1}from"@contractspec/lib.contracts-spec/features";var vK=B1({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{C as videoTypography,D1 as videoTransitions,f as videoSafeZone,A1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,R1 as resolveRenderConfig,D8 as qualityPresets,F1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,Y1 as codecFormatMap,q8 as VideoGenerator,vK as VideoGenFeature,e8 as TerminalDemo,t as Terminal,a8 as SocialClip,d8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,x8 as ApiOverview,I as AnimatedText};
@@ -0,0 +1 @@
1
+ import{createRequire as g}from"node:module";var k=g(import.meta.url);import{defineFeature as h}from"@contractspec/lib.contracts-spec/features";var v=h({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{v as VideoGenFeature};
@@ -0,0 +1 @@
1
+ export declare const VideoGenFeature: import("@contractspec/lib.contracts-spec").FeatureModuleSpec;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var h=import.meta.require;import{defineFeature as g}from"@contractspec/lib.contracts-spec/features";var m=g({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{m as VideoGenFeature};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.video-gen",
3
- "version": "2.7.20",
3
+ "version": "2.7.22",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -25,31 +25,30 @@
25
25
  "typecheck": "tsc --noEmit"
26
26
  },
27
27
  "dependencies": {
28
- "@contractspec/lib.contracts-spec": "5.4.0",
29
- "@contractspec/lib.contracts-integrations": "3.8.12",
30
- "@contractspec/lib.ai-providers": "3.7.13",
31
- "@contractspec/lib.voice": "1.7.20",
32
- "@contractspec/lib.content-gen": "3.7.20",
33
- "@contractspec/lib.design-system": "3.10.0",
34
- "@contractspec/lib.image-gen": "1.7.20",
28
+ "@contractspec/lib.contracts-spec": "5.5.0",
29
+ "@contractspec/lib.contracts-integrations": "3.8.13",
30
+ "@contractspec/lib.ai-providers": "3.7.14",
31
+ "@contractspec/lib.voice": "1.7.21",
32
+ "@contractspec/lib.content-gen": "3.7.21",
33
+ "@contractspec/lib.design-system": "3.11.0",
34
+ "@contractspec/lib.image-gen": "1.7.21",
35
35
  "remotion": "^4.0.447"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@contractspec/tool.typescript": "3.7.13",
39
- "@contractspec/tool.bun": "3.7.14",
39
+ "@contractspec/tool.bun": "3.7.15",
40
40
  "typescript": "^5.9.3",
41
41
  "@remotion/bundler": "^4.0.447",
42
42
  "@remotion/cli": "^4.0.447",
43
43
  "@remotion/player": "^4.0.447",
44
44
  "@remotion/renderer": "^4.0.447",
45
45
  "@types/react": "^19.0.0",
46
- "react": "^19.2.4",
47
- "react-dom": "^19.2.4",
48
- "tsdown": "^0.21.7"
46
+ "react": "19.2.0",
47
+ "react-dom": "19.2.0"
49
48
  },
50
49
  "peerDependencies": {
51
- "react": "^19.2.4",
52
- "react-dom": "^19.2.4",
50
+ "react": "19.2.0",
51
+ "react-dom": "19.2.0",
53
52
  "@remotion/player": "^4.0.0"
54
53
  },
55
54
  "peerDependenciesMeta": {
@@ -356,6 +355,13 @@
356
355
  "bun": "./dist/types.js",
357
356
  "node": "./dist/node/types.js",
358
357
  "default": "./dist/types.js"
358
+ },
359
+ "./video-gen.feature": {
360
+ "types": "./dist/video-gen.feature.d.ts",
361
+ "browser": "./dist/browser/video-gen.feature.js",
362
+ "bun": "./dist/video-gen.feature.js",
363
+ "node": "./dist/node/video-gen.feature.js",
364
+ "default": "./dist/video-gen.feature.js"
359
365
  }
360
366
  },
361
367
  "publishConfig": {
@@ -654,6 +660,13 @@
654
660
  "bun": "./dist/types.js",
655
661
  "node": "./dist/node/types.js",
656
662
  "default": "./dist/types.js"
663
+ },
664
+ "./video-gen.feature": {
665
+ "types": "./dist/video-gen.feature.d.ts",
666
+ "browser": "./dist/browser/video-gen.feature.js",
667
+ "bun": "./dist/video-gen.feature.js",
668
+ "node": "./dist/node/video-gen.feature.js",
669
+ "default": "./dist/video-gen.feature.js"
657
670
  }
658
671
  }
659
672
  }