@lssm-tech/lib.video-gen 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -0
- package/dist/browser/compositions/api-overview.js +1 -0
- package/dist/browser/compositions/index.js +1 -0
- package/dist/browser/compositions/primitives/animated-text.js +1 -0
- package/dist/browser/compositions/primitives/brand-frame.js +1 -0
- package/dist/browser/compositions/primitives/code-block.js +1 -0
- package/dist/browser/compositions/primitives/index.js +1 -0
- package/dist/browser/compositions/primitives/progress-bar.js +1 -0
- package/dist/browser/compositions/primitives/terminal.js +1 -0
- package/dist/browser/compositions/primitives/transition.js +1 -0
- package/dist/browser/compositions/social-clip.js +1 -0
- package/dist/browser/compositions/terminal-demo.js +1 -0
- package/dist/browser/design/index.js +1 -0
- package/dist/browser/design/layouts.js +1 -0
- package/dist/browser/design/motion.js +1 -0
- package/dist/browser/design/tokens.js +1 -0
- package/dist/browser/design/typography.js +1 -0
- package/dist/browser/docs/compositions.docblock.js +1 -0
- package/dist/browser/docs/design.docblock.js +172 -0
- package/dist/browser/docs/generators.docblock.js +165 -0
- package/dist/browser/docs/rendering.docblock.js +175 -0
- package/dist/browser/docs/video-gen.docblock.js +126 -0
- package/dist/browser/generators/index.js +82 -0
- package/dist/browser/generators/scene-planner.js +82 -0
- package/dist/browser/generators/script-generator.js +82 -0
- package/dist/browser/generators/video-generator.js +82 -0
- package/dist/browser/i18n/catalogs/en.js +28 -0
- package/dist/browser/i18n/catalogs/es.js +28 -0
- package/dist/browser/i18n/catalogs/fr.js +28 -0
- package/dist/browser/i18n/catalogs/index.js +82 -0
- package/dist/browser/i18n/index.js +82 -0
- package/dist/browser/i18n/keys.js +1 -0
- package/dist/browser/i18n/locale.js +1 -0
- package/dist/browser/i18n/messages.js +82 -0
- package/dist/browser/index.js +82 -0
- package/dist/browser/player/demo-player.js +1 -0
- package/dist/browser/player/index.js +1 -0
- package/dist/browser/remotion/Root.js +19 -0
- package/dist/browser/remotion/index.js +19 -0
- package/dist/browser/renderers/config.js +1 -0
- package/dist/browser/renderers/index.js +1 -0
- package/dist/browser/renderers/local.js +1 -0
- package/dist/browser/types.js +1 -0
- package/dist/browser/video-gen.feature.js +1 -0
- package/dist/compositions/api-overview.d.ts +16 -0
- package/dist/compositions/api-overview.js +2 -0
- package/dist/compositions/index.d.ts +7 -0
- package/dist/compositions/index.js +2 -0
- package/dist/compositions/primitives/animated-text.d.ts +22 -0
- package/dist/compositions/primitives/animated-text.js +2 -0
- package/dist/compositions/primitives/brand-frame.d.ts +14 -0
- package/dist/compositions/primitives/brand-frame.js +2 -0
- package/dist/compositions/primitives/code-block.d.ts +18 -0
- package/dist/compositions/primitives/code-block.js +2 -0
- package/dist/compositions/primitives/index.d.ts +12 -0
- package/dist/compositions/primitives/index.js +2 -0
- package/dist/compositions/primitives/progress-bar.d.ts +12 -0
- package/dist/compositions/primitives/progress-bar.js +2 -0
- package/dist/compositions/primitives/terminal.d.ts +24 -0
- package/dist/compositions/primitives/terminal.js +2 -0
- package/dist/compositions/primitives/transition.d.ts +14 -0
- package/dist/compositions/primitives/transition.js +2 -0
- package/dist/compositions/social-clip.d.ts +16 -0
- package/dist/compositions/social-clip.js +2 -0
- package/dist/compositions/terminal-demo.d.ts +17 -0
- package/dist/compositions/terminal-demo.js +2 -0
- package/dist/design/index.d.ts +4 -0
- package/dist/design/index.js +2 -0
- package/dist/design/layouts.d.ts +69 -0
- package/dist/design/layouts.js +2 -0
- package/dist/design/motion.d.ts +72 -0
- package/dist/design/motion.js +2 -0
- package/dist/design/tokens.d.ts +31 -0
- package/dist/design/tokens.js +2 -0
- package/dist/design/typography.d.ts +61 -0
- package/dist/design/typography.js +2 -0
- package/dist/docs/compositions.docblock.d.ts +1 -0
- package/dist/docs/compositions.docblock.js +2 -0
- package/dist/docs/design.docblock.d.ts +1 -0
- package/dist/docs/design.docblock.js +173 -0
- package/dist/docs/generators.docblock.d.ts +1 -0
- package/dist/docs/generators.docblock.js +166 -0
- package/dist/docs/rendering.docblock.d.ts +1 -0
- package/dist/docs/rendering.docblock.js +176 -0
- package/dist/docs/video-gen.docblock.d.ts +1 -0
- package/dist/docs/video-gen.docblock.js +127 -0
- package/dist/generators/index.d.ts +3 -0
- package/dist/generators/index.js +83 -0
- package/dist/generators/scene-planner.d.ts +31 -0
- package/dist/generators/scene-planner.js +83 -0
- package/dist/generators/script-generator.d.ts +57 -0
- package/dist/generators/script-generator.js +83 -0
- package/dist/generators/video-generator.d.ts +21 -0
- package/dist/generators/video-generator.js +83 -0
- package/dist/i18n/catalogs/en.d.ts +8 -0
- package/dist/i18n/catalogs/en.js +29 -0
- package/dist/i18n/catalogs/es.d.ts +6 -0
- package/dist/i18n/catalogs/es.js +29 -0
- package/dist/i18n/catalogs/fr.d.ts +6 -0
- package/dist/i18n/catalogs/fr.js +29 -0
- package/dist/i18n/catalogs/index.d.ts +8 -0
- package/dist/i18n/catalogs/index.js +83 -0
- package/dist/i18n/i18n.test.d.ts +1 -0
- package/dist/i18n/index.d.ts +22 -0
- package/dist/i18n/index.js +83 -0
- package/dist/i18n/keys.d.ts +116 -0
- package/dist/i18n/keys.js +2 -0
- package/dist/i18n/locale.d.ts +8 -0
- package/dist/i18n/locale.js +2 -0
- package/dist/i18n/messages.d.ts +14 -0
- package/dist/i18n/messages.js +83 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +83 -0
- package/dist/node/compositions/api-overview.js +1 -0
- package/dist/node/compositions/index.js +1 -0
- package/dist/node/compositions/primitives/animated-text.js +1 -0
- package/dist/node/compositions/primitives/brand-frame.js +1 -0
- package/dist/node/compositions/primitives/code-block.js +1 -0
- package/dist/node/compositions/primitives/index.js +1 -0
- package/dist/node/compositions/primitives/progress-bar.js +1 -0
- package/dist/node/compositions/primitives/terminal.js +1 -0
- package/dist/node/compositions/primitives/transition.js +1 -0
- package/dist/node/compositions/social-clip.js +1 -0
- package/dist/node/compositions/terminal-demo.js +1 -0
- package/dist/node/design/index.js +1 -0
- package/dist/node/design/layouts.js +1 -0
- package/dist/node/design/motion.js +1 -0
- package/dist/node/design/tokens.js +1 -0
- package/dist/node/design/typography.js +1 -0
- package/dist/node/docs/compositions.docblock.js +1 -0
- package/dist/node/docs/design.docblock.js +172 -0
- package/dist/node/docs/generators.docblock.js +165 -0
- package/dist/node/docs/rendering.docblock.js +175 -0
- package/dist/node/docs/video-gen.docblock.js +126 -0
- package/dist/node/generators/index.js +82 -0
- package/dist/node/generators/scene-planner.js +82 -0
- package/dist/node/generators/script-generator.js +82 -0
- package/dist/node/generators/video-generator.js +82 -0
- package/dist/node/i18n/catalogs/en.js +28 -0
- package/dist/node/i18n/catalogs/es.js +28 -0
- package/dist/node/i18n/catalogs/fr.js +28 -0
- package/dist/node/i18n/catalogs/index.js +82 -0
- package/dist/node/i18n/index.js +82 -0
- package/dist/node/i18n/keys.js +1 -0
- package/dist/node/i18n/locale.js +1 -0
- package/dist/node/i18n/messages.js +82 -0
- package/dist/node/index.js +82 -0
- package/dist/node/player/demo-player.js +1 -0
- package/dist/node/player/index.js +1 -0
- package/dist/node/remotion/Root.js +19 -0
- package/dist/node/remotion/index.js +19 -0
- package/dist/node/renderers/config.js +1 -0
- package/dist/node/renderers/index.js +1 -0
- package/dist/node/renderers/local.js +1 -0
- package/dist/node/types.js +1 -0
- package/dist/node/video-gen.feature.js +1 -0
- package/dist/player/demo-player.d.ts +55 -0
- package/dist/player/demo-player.js +2 -0
- package/dist/player/index.d.ts +2 -0
- package/dist/player/index.js +2 -0
- package/dist/remotion/Root.d.ts +2 -0
- package/dist/remotion/Root.js +20 -0
- package/dist/remotion/index.d.ts +1 -0
- package/dist/remotion/index.js +20 -0
- package/dist/renderers/config.d.ts +28 -0
- package/dist/renderers/config.js +2 -0
- package/dist/renderers/index.d.ts +3 -0
- package/dist/renderers/index.js +2 -0
- package/dist/renderers/local.d.ts +17 -0
- package/dist/renderers/local.js +2 -0
- package/dist/types.d.ts +85 -0
- package/dist/types.js +2 -0
- package/dist/video-gen.feature.d.ts +1 -0
- package/dist/video-gen.feature.js +2 -0
- package/package.json +675 -0
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @contractspec/lib.video-gen
|
|
2
|
+
|
|
3
|
+
**AI-powered video generation with Remotion: compositions, rendering, and design integration.**
|
|
4
|
+
|
|
5
|
+
## What It Provides
|
|
6
|
+
|
|
7
|
+
- **Layer**: lib.
|
|
8
|
+
- **Consumers**: bundles, video-studio app.
|
|
9
|
+
- `src/docs/` contains docblocks and documentation-facing exports.
|
|
10
|
+
- Related ContractSpec packages include `@contractspec/lib.ai-providers`, `@contractspec/lib.content-gen`, `@contractspec/lib.contracts-integrations`, `@contractspec/lib.contracts-spec`, `@contractspec/lib.design-system`, `@contractspec/lib.image-gen`, ...
|
|
11
|
+
- `src/docs/` contains docblocks and documentation-facing exports.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
`npm install @contractspec/lib.video-gen`
|
|
16
|
+
|
|
17
|
+
or
|
|
18
|
+
|
|
19
|
+
`bun add @contractspec/lib.video-gen`
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
Import the root entrypoint from `@contractspec/lib.video-gen`, or choose a documented subpath when you only need one part of the package surface.
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
- `src/compositions` is part of the package's public or composition surface.
|
|
28
|
+
- `src/design` is part of the package's public or composition surface.
|
|
29
|
+
- `src/docs/` contains docblocks and documentation-facing exports.
|
|
30
|
+
- `src/generators` is part of the package's public or composition surface.
|
|
31
|
+
- `src/i18n` is part of the package's public or composition surface.
|
|
32
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
33
|
+
- `src/player` is part of the package's public or composition surface.
|
|
34
|
+
- `src/types.ts` is shared public type definitions.
|
|
35
|
+
|
|
36
|
+
## Public Entry Points
|
|
37
|
+
|
|
38
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
39
|
+
- Export `./compositions` resolves through `./src/compositions/index.ts`.
|
|
40
|
+
- Export `./compositions/api-overview` resolves through `./src/compositions/api-overview.tsx`.
|
|
41
|
+
- Export `./compositions/primitives` resolves through `./src/compositions/primitives/index.ts`.
|
|
42
|
+
- Export `./compositions/primitives/animated-text` resolves through `./src/compositions/primitives/animated-text.tsx`.
|
|
43
|
+
- Export `./compositions/primitives/brand-frame` resolves through `./src/compositions/primitives/brand-frame.tsx`.
|
|
44
|
+
- Export `./compositions/primitives/code-block` resolves through `./src/compositions/primitives/code-block.tsx`.
|
|
45
|
+
- Export `./compositions/primitives/progress-bar` resolves through `./src/compositions/primitives/progress-bar.tsx`.
|
|
46
|
+
- Export `./compositions/primitives/terminal` resolves through `./src/compositions/primitives/terminal.tsx`.
|
|
47
|
+
- Export `./compositions/primitives/transition` resolves through `./src/compositions/primitives/transition.tsx`.
|
|
48
|
+
- The package publishes 42 total export subpaths; keep docs aligned with `package.json`.
|
|
49
|
+
|
|
50
|
+
## Local Commands
|
|
51
|
+
|
|
52
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
53
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
54
|
+
- `bun run test` — bun test --pass-with-no-tests
|
|
55
|
+
- `bun run lint` — bun lint:fix
|
|
56
|
+
- `bun run lint:check` — biome check .
|
|
57
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
58
|
+
- `bun run typecheck` — tsc --noEmit
|
|
59
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
60
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
61
|
+
- `bun run clean` — rimraf dist .turbo
|
|
62
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
63
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
64
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
65
|
+
|
|
66
|
+
## Recent Updates
|
|
67
|
+
|
|
68
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
69
|
+
- Resolve lint, build, and type errors across nine packages.
|
|
70
|
+
- Add first-class transport, auth, versioning, and BYOK support across all integrations.
|
|
71
|
+
- Add AI provider ranking system with ranking-driven model selection.
|
|
72
|
+
- Resolve lint/test regressions after voice capability updates.
|
|
73
|
+
- Add @contractspec/lib.voice package for TTS, STT, and conversational voice.
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
|
|
77
|
+
- Remotion composition API is version-sensitive — pin and test upgrades carefully.
|
|
78
|
+
- Renderer interface is the adapter boundary — do not leak Remotion internals.
|
|
79
|
+
- Depends on voice, content-gen, image-gen, design-system — coordinate cross-lib changes.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var GH=((H)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(H,{get:(J,K)=>(typeof require<"u"?require:J)[K]}):H)(function(H){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+H+'" is not supported')});import{Easing as R}from"remotion";var L={entrance:R.out(R.exp),exit:R.in(R.exp),emphasis:R.out(R.back(1.4)),linear:R.linear,gentle:R.bezier(0.25,0.1,0.25,1),spring:R.out(R.back(1.7))},I={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},XH={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 V}from"@contractspec/lib.design-system";var C={canvasBackground:V.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:V.colors.accent,gradientStart:V.colors.primary,gradientEnd:V.colors.accent},B={...V,video:C};var k={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function F(H,J){let K=J/1920;return{...H,fontSize:Math.round(H.fontSize*K),letterSpacing:H.letterSpacing?Math.round(H.letterSpacing*K*10)/10:void 0}}import{interpolate as D,useCurrentFrame as o,useVideoConfig as s}from"remotion";import{jsx as i}from"react/jsx-runtime";var S=({text:H,variant:J="body",style:K,enterAt:Q=0,exitAt:$,color:z="#ffffff",align:X="left"})=>{let G=o(),{width:N}=s(),W=k[J],P={...F(W,N),...K},q=D(G,[Q,Q+I.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),M=D(q,[0,1],[0,1],{easing:L.entrance}),Y=D(q,[0,1],[30,0],{easing:L.entrance}),Z=1,y=0;if($!==void 0){let f=D(G,[$,$+I.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=D(f,[0,1],[1,0],{easing:L.exit}),y=D(f,[0,1],[0,-20],{easing:L.exit})}let d=M*Z,n=Y+y;return i("div",{style:{fontSize:P.fontSize,lineHeight:P.lineHeight,fontWeight:P.fontWeight,letterSpacing:P.letterSpacing,color:z,textAlign:X,opacity:d,transform:`translateY(${n}px)`,willChange:"opacity, transform"},children:H})};import{VIDEO_FORMATS as A}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var DH=30,E={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function h(H){let J=H.width/1920,K=H.height/1080;return{horizontal:Math.round(E.horizontal*J),vertical:Math.round(E.vertical*K),contentWidth:Math.round(E.contentWidth*J),contentHeight:Math.round(E.contentHeight*K)}}var wH={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 VH(){return[A.landscape,A.square,A.portrait]}import{interpolate as x,useCurrentFrame as r,useVideoConfig as a}from"remotion";import{jsx as j,jsxs as t}from"react/jsx-runtime";var p=({styleOverrides:H,showBranding:J=!0,animateEntrance:K=!0,variant:Q="gradient",children:$})=>{let z=r(),{width:X,height:G}=a(),N=B,W=h({type:"custom",width:X,height:G}),_=H?.primaryColor??N.colors.primary,P=H?.accentColor??N.colors.accent,q=H?.darkMode??!0,M;switch(Q){case"solid":M=q?"#0a0a0a":N.colors.background;break;case"gradient":M=q?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${N.colors.background} 0%, ${N.colors.muted} 100%)`;break;case"dark":M="#000000";break}let Y=K?x(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}):1,Z=J?x(z,[I.brandReveal,I.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return t("div",{style:{width:X,height:G,background:M,position:"relative",overflow:"hidden",opacity:Y},children:[Q==="gradient"&&j("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${_}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),j("div",{style:{position:"absolute",left:W.horizontal,top:W.vertical,width:W.contentWidth,height:W.contentHeight,display:"flex",flexDirection:"column"},children:$}),J&&j("div",{style:{position:"absolute",bottom:W.vertical/2,right:W.horizontal,opacity:Z,color:q?"#ffffff":"#000000",fontSize:Math.round(16*(X/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as u,useCurrentFrame as e,useVideoConfig as HH}from"remotion";import{jsx as w,jsxs as T}from"react/jsx-runtime";var g=({code:H,language:J="typescript",startAt:K=0,typeAnimation:Q=!0,backgroundColor:$=C.codeBackground,textColor:z="#abb2bf",filename:X})=>{let G=e(),{width:N}=HH(),W=F(k.code,N),_=H.length,P=_*I.codeTypingPerChar,q=Q?Math.floor(u(G,[K,K+P],[0,_],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):_,M=H.slice(0,q),Y=u(G,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),Z=Q&&q<_&&G%16<10;return T("div",{style:{backgroundColor:$,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[T("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[T("div",{style:{display:"flex",gap:8},children:[w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),w("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:W.fontSize*0.7,fontFamily:"monospace"},children:X??J})]}),w("div",{style:{padding:"24px 32px"},children:T("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:W.fontSize,lineHeight:W.lineHeight,color:z,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[M,Z&&w("span",{style:{backgroundColor:z,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as JH,useVideoConfig as KH}from"remotion";import{jsx as c}from"react/jsx-runtime";var m=({height:H=4,color:J=B.colors.primary,backgroundColor:K="rgba(255,255,255,0.1)",position:Q="bottom"})=>{let $=JH(),{durationInFrames:z,width:X}=KH(),G=$/z;return c("div",{style:{position:"absolute",[Q]:0,left:0,width:X,height:H,backgroundColor:K,zIndex:100},children:c("div",{style:{width:`${G*100}%`,height:"100%",backgroundColor:J,transition:"none"}})})};import{AbsoluteFill as QH,interpolate as b,Sequence as v,useCurrentFrame as l,useVideoConfig as UH}from"remotion";import{jsx as U,jsxs as O}from"react/jsx-runtime";var sH=({specName:H,method:J="POST",endpoint:K="/api/users",specCode:Q,generatedOutputs:$=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:z="One spec. Every surface."})=>{let{durationInFrames:X}=UH(),G=B,N=60,W=45,_=210,P=180,q=X-90;return O(QH,{children:[O(p,{variant:"gradient",showBranding:!0,children:[U(v,{from:0,durationInFrames:210,children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[O("div",{style:{display:"flex",alignItems:"center",gap:16},children:[U($H,{method:J,enterAt:10}),U(S,{text:K,variant:"subheading",enterAt:15,color:G.colors.mutedForeground})]}),U(S,{text:H,variant:"title",enterAt:5,color:"#ffffff"}),U("div",{style:{flex:1,marginTop:24},children:U(g,{code:Q,language:"typescript",filename:`${H.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),U(v,{from:180,durationInFrames:X-180,children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[U(S,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),U("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:$.map((M,Y)=>U(zH,{label:M,index:Y,startFrame:20+Y*8},M))}),U(v,{from:q-180,children:U("div",{style:{marginTop:48},children:U(S,{text:z,variant:"heading",enterAt:0,color:G.colors.accent,align:"center"})})})]})})]}),U(m,{})]})},$H=({method:H,enterAt:J})=>{let K=l(),Q=b(K,[J,J+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),$=b(K,[J,J+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return U("div",{style:{opacity:Q,transform:`scale(${$})`,backgroundColor:z[H]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:H})},zH=({label:H,startFrame:J})=>{let K=l(),Q=b(K,[J,J+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),$=b(K,[J,J+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z=b(K,[J,J+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis});return U("div",{style:{opacity:Q,transform:`translateY(${$}px) scale(${z})`,backgroundColor:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.15)",color:"#ffffff",padding:"16px 32px",borderRadius:12,fontSize:28,fontWeight:500},children:H})};export{sH as ApiOverview};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var xH=((J)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(J,{get:(H,K)=>(typeof require<"u"?require:H)[K]}):J)(function(J){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+J+'" is not supported')});import{Easing as w}from"remotion";var L={entrance:w.out(w.exp),exit:w.in(w.exp),emphasis:w.out(w.back(1.4)),linear:w.linear,gentle:w.bezier(0.25,0.1,0.25,1),spring:w.out(w.back(1.7))},I={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},cH={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as A}from"@contractspec/lib.design-system";var f={canvasBackground:A.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:A.colors.accent,gradientStart:A.colors.primary,gradientEnd:A.colors.accent},V={...A,video:f};var T={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function F(J,H){let K=H/1920;return{...J,fontSize:Math.round(J.fontSize*K),letterSpacing:J.letterSpacing?Math.round(J.letterSpacing*K*10)/10:void 0}}import{interpolate as C,useCurrentFrame as XH,useVideoConfig as LH}from"remotion";import{jsx as PH}from"react/jsx-runtime";var _=({text:J,variant:H="body",style:K,enterAt:Q=0,exitAt:$,color:z="#ffffff",align:G="left"})=>{let X=XH(),{width:N}=LH(),P=T[H],R={...F(P,N),...K},U=C(X,[Q,Q+I.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),M=C(U,[0,1],[0,1],{easing:L.entrance}),W=C(U,[0,1],[30,0],{easing:L.entrance}),Y=1,k=0;if($!==void 0){let d=C(X,[$,$+I.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Y=C(d,[0,1],[1,0],{easing:L.exit}),k=C(d,[0,1],[0,-20],{easing:L.exit})}let E=M*Y,m=W+k;return PH("div",{style:{fontSize:R.fontSize,lineHeight:R.lineHeight,fontWeight:R.fontWeight,letterSpacing:R.letterSpacing,color:z,textAlign:G,opacity:E,transform:`translateY(${m}px)`,willChange:"opacity, transform"},children:J})};import{VIDEO_FORMATS as l}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var eH=30,p={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function t(J){let H=J.width/1920,K=J.height/1080;return{horizontal:Math.round(p.horizontal*H),vertical:Math.round(p.vertical*K),contentWidth:Math.round(p.contentWidth*H),contentHeight:Math.round(p.contentHeight*K)}}var HJ={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 JJ(){return[l.landscape,l.square,l.portrait]}import{interpolate as e,useCurrentFrame as MH,useVideoConfig as NH}from"remotion";import{jsx as o,jsxs as qH}from"react/jsx-runtime";var b=({styleOverrides:J,showBranding:H=!0,animateEntrance:K=!0,variant:Q="gradient",children:$})=>{let z=MH(),{width:G,height:X}=NH(),N=V,P=t({type:"custom",width:G,height:X}),q=J?.primaryColor??N.colors.primary,R=J?.accentColor??N.colors.accent,U=J?.darkMode??!0,M;switch(Q){case"solid":M=U?"#0a0a0a":N.colors.background;break;case"gradient":M=U?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${N.colors.background} 0%, ${N.colors.muted} 100%)`;break;case"dark":M="#000000";break}let W=K?e(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}):1,Y=H?e(z,[I.brandReveal,I.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return qH("div",{style:{width:G,height:X,background:M,position:"relative",overflow:"hidden",opacity:W},children:[Q==="gradient"&&o("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${q}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),o("div",{style:{position:"absolute",left:P.horizontal,top:P.vertical,width:P.contentWidth,height:P.contentHeight,display:"flex",flexDirection:"column"},children:$}),H&&o("div",{style:{position:"absolute",bottom:P.vertical/2,right:P.horizontal,opacity:Y,color:U?"#ffffff":"#000000",fontSize:Math.round(16*(G/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as HH,useCurrentFrame as RH,useVideoConfig as YH}from"remotion";import{jsx as v,jsxs as j}from"react/jsx-runtime";var n=({code:J,language:H="typescript",startAt:K=0,typeAnimation:Q=!0,backgroundColor:$=f.codeBackground,textColor:z="#abb2bf",filename:G})=>{let X=RH(),{width:N}=YH(),P=F(T.code,N),q=J.length,R=q*I.codeTypingPerChar,U=Q?Math.floor(HH(X,[K,K+R],[0,q],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):q,M=J.slice(0,U),W=HH(X,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),Y=Q&&U<q&&X%16<10;return j("div",{style:{backgroundColor:$,borderRadius:16,padding:0,opacity:W,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[j("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[j("div",{style:{display:"flex",gap:8},children:[v("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),v("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),v("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),v("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:P.fontSize*0.7,fontFamily:"monospace"},children:G??H})]}),v("div",{style:{padding:"24px 32px"},children:j("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:P.fontSize,lineHeight:P.lineHeight,color:z,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[M,Y&&v("span",{style:{backgroundColor:z,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as BH,useVideoConfig as ZH}from"remotion";import{jsx as JH}from"react/jsx-runtime";var S=({height:J=4,color:H=V.colors.primary,backgroundColor:K="rgba(255,255,255,0.1)",position:Q="bottom"})=>{let $=BH(),{durationInFrames:z,width:G}=ZH(),X=$/z;return JH("div",{style:{position:"absolute",[Q]:0,left:0,width:G,height:J,backgroundColor:K,zIndex:100},children:JH("div",{style:{width:`${X*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{AbsoluteFill as _H,interpolate as h,Sequence as r,useCurrentFrame as KH,useVideoConfig as DH}from"remotion";import{jsx as B,jsxs as y}from"react/jsx-runtime";var wH=({specName:J,method:H="POST",endpoint:K="/api/users",specCode:Q,generatedOutputs:$=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:z="One spec. Every surface."})=>{let{durationInFrames:G}=DH(),X=V,N=60,P=45,q=210,R=180,U=G-90;return y(_H,{children:[y(b,{variant:"gradient",showBranding:!0,children:[B(r,{from:0,durationInFrames:210,children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[y("div",{style:{display:"flex",alignItems:"center",gap:16},children:[B(IH,{method:H,enterAt:10}),B(_,{text:K,variant:"subheading",enterAt:15,color:X.colors.mutedForeground})]}),B(_,{text:J,variant:"title",enterAt:5,color:"#ffffff"}),B("div",{style:{flex:1,marginTop:24},children:B(n,{code:Q,language:"typescript",filename:`${J.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),B(r,{from:180,durationInFrames:G-180,children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[B(_,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),B("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:$.map((M,W)=>B(VH,{label:M,index:W,startFrame:20+W*8},M))}),B(r,{from:U-180,children:B("div",{style:{marginTop:48},children:B(_,{text:z,variant:"heading",enterAt:0,color:X.colors.accent,align:"center"})})})]})})]}),B(S,{})]})},IH=({method:J,enterAt:H})=>{let K=KH(),Q=h(K,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),$=h(K,[H,H+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return B("div",{style:{opacity:Q,transform:`scale(${$})`,backgroundColor:z[J]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:J})},VH=({label:J,startFrame:H})=>{let K=KH(),Q=h(K,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),$=h(K,[H,H+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z=h(K,[H,H+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis});return B("div",{style:{opacity:Q,transform:`translateY(${$}px) scale(${z})`,backgroundColor:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.15)",color:"#ffffff",padding:"16px 32px",borderRadius:12,fontSize:28,fontWeight:500},children:J})};import{interpolate as s,useCurrentFrame as OH,useVideoConfig as kH}from"remotion";import{jsx as O,jsxs as x}from"react/jsx-runtime";var QH={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},a=({lines:J,startAt:H=0,prompt:K="$ ",title:Q="Terminal",backgroundColor:$=f.terminalBackground,typingSpeed:z=I.codeTypingPerChar})=>{let G=OH(),{width:X}=kH(),N=F(T.code,X),P=[],q=H;for(let U of J){let M=U.delay??10,W=q+M;if(U.type==="command"){let Y=U.text.length*z;P.push({startFrame:W,endFrame:W+Y}),q=W+Y}else P.push({startFrame:W,endFrame:W+5}),q=W+5}let R=s(G,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance});return x("div",{style:{backgroundColor:$,borderRadius:16,overflow:"hidden",opacity:R,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[x("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[x("div",{style:{display:"flex",gap:8},children:[O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),O("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:N.fontSize*0.7,fontFamily:"monospace"},children:Q})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:J.map((U,M)=>{let W=P[M];if(!W||G<W.startFrame)return null;let Y=U.type==="command",k=QH[U.type],E=U.text;if(Y){let UH=s(G,[W.startFrame,W.endFrame],[0,U.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=U.text.slice(0,Math.floor(UH))}let m=Y?1:s(G,[W.startFrame,W.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),WH=Y&&G>=W.startFrame&&G<=W.endFrame&&G%16<10;return x("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:N.fontSize,lineHeight:1.8,color:k,opacity:m,whiteSpace:"pre-wrap"},children:[Y&&O("span",{style:{color:"#3fb950"},children:K}),U.type==="comment"&&O("span",{style:{color:QH.comment},children:"# "}),E,WH&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${M}-${U.text.slice(0,20)}`)})})]})};import{interpolate as EH,useCurrentFrame as bH}from"remotion";import{jsx as $H,Fragment as FH}from"react/jsx-runtime";var SH=({type:J,durationInFrames:H,direction:K,startAt:Q=0,children:$})=>{let z=bH();if(J==="none"||H===0)return $H(FH,{children:$});let G=EH(z,[Q,Q+H],K==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),X=TH(J,G);return $H("div",{style:X,children:$})};function TH(J,H){let K=L.entrance(H);switch(J){case"fade":return{opacity:K,width:"100%",height:"100%"};case"slide-left":return{opacity:K,transform:`translateX(${(1-K)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:K,transform:`translateX(${(1-K)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-K)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as CH,interpolate as u,Sequence as g,useCurrentFrame as zH,useVideoConfig as vH}from"remotion";import{jsx as Z,jsxs as c}from"react/jsx-runtime";var AH=({hook:J,message:H,points:K=[],cta:Q="Learn more",ctaUrl:$="contractspec.dev",accentColor:z})=>{let{durationInFrames:G,width:X,height:N}=vH(),q=z??V.colors.accent,R=N>X,U=75,M=60,W=120,Y=G-90;return c(CH,{children:[Z(b,{variant:"gradient",showBranding:!0,children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:R?48:32,textAlign:"center",padding:R?"0 20px":0},children:[Z(g,{from:0,durationInFrames:105,children:Z("div",{style:{width:"100%"},children:Z(_,{text:J,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),Z(g,{from:60,children:Z("div",{style:{width:"100%"},children:Z(_,{text:H,variant:R?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),K.length>0&&Z(g,{from:120,children:Z("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:R?"flex-start":"center",width:"100%",maxWidth:R?"100%":"80%",marginTop:16},children:K.map((k,E)=>Z(fH,{text:k,index:E,startFrame:E*15,accent:q},k))})}),Z(g,{from:Y,children:Z(yH,{cta:Q,url:$,accent:q})})]})}),Z(S,{color:q})]})},fH=({text:J,startFrame:H,accent:K})=>{let Q=zH(),$=u(Q,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),z=u(Q,[H,H+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance});return c("div",{style:{opacity:$,transform:`translateX(${z}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[Z("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:K,flexShrink:0}}),J]})},yH=({cta:J,url:H,accent:K})=>{let Q=zH(),$=u(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),z=u(Q,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis});return c("div",{style:{opacity:$,transform:`scale(${z})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[Z("div",{style:{backgroundColor:K,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:J}),Z("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:H})]})};import{AbsoluteFill as hH,Sequence as GH,useVideoConfig as pH}from"remotion";import{jsx as D,jsxs as i}from"react/jsx-runtime";var jH=({title:J,subtitle:H,lines:K,terminalTitle:Q="Terminal",prompt:$="$ ",summary:z})=>{let{durationInFrames:G}=pH(),X=V,N=40,P=G-90;return i(hH,{children:[D(b,{variant:"dark",showBranding:!0,children:i("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[i("div",{children:[D(_,{text:J,variant:"heading",enterAt:5,color:"#ffffff"}),H&&D("div",{style:{marginTop:8},children:D(_,{text:H,variant:"body",enterAt:15,color:X.colors.mutedForeground})})]}),D(GH,{from:40,children:D("div",{style:{flex:1},children:D(a,{lines:K,startAt:0,prompt:$,title:Q})})}),z&&D(GH,{from:P,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(_,{text:z,variant:"subheading",enterAt:0,color:X.colors.accent,align:"center"})})})]})}),D(S,{})]})};export{jH as TerminalDemo,a as Terminal,AH as SocialClip,SH as SceneTransitionWrapper,S as ProgressBar,n as CodeBlock,b as BrandFrame,wH as ApiOverview,_ as AnimatedText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=((k)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(k,{get:(G,z)=>(typeof require<"u"?require:G)[z]}):k)(function(k){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+k+'" is not supported')});import{Easing as q}from"remotion";var H={entrance:q.out(q.exp),exit:q.in(q.exp),emphasis:q.out(q.back(1.4)),linear:q.linear,gentle:q.bezier(0.25,0.1,0.25,1),spring:q.out(q.back(1.7))},K={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},h={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};var X={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function Z(k,G){let z=G/1920;return{...k,fontSize:Math.round(k.fontSize*z),letterSpacing:k.letterSpacing?Math.round(k.letterSpacing*z*10)/10:void 0}}import{interpolate as B,useCurrentFrame as D,useVideoConfig as W}from"remotion";import{jsx as Y}from"react/jsx-runtime";var E=({text:k,variant:G="body",style:z,enterAt:L=0,exitAt:J,color:_="#ffffff",align:$="left"})=>{let M=D(),{width:F}=W(),V=X[G],I={...Z(V,F),...z},N=B(M,[L,L+K.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),b=B(N,[0,1],[0,1],{easing:H.entrance}),j=B(N,[0,1],[30,0],{easing:H.entrance}),Q=1,R=0;if(J!==void 0){let U=B(M,[J,J+K.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Q=B(U,[0,1],[1,0],{easing:H.exit}),R=B(U,[0,1],[0,-20],{easing:H.exit})}let w=b*Q,C=j+R;return Y("div",{style:{fontSize:I.fontSize,lineHeight:I.lineHeight,fontWeight:I.fontWeight,letterSpacing:I.letterSpacing,color:_,textAlign:$,opacity:w,transform:`translateY(${C}px)`,willChange:"opacity, transform"},children:k})};export{E as AnimatedText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(H,J)=>(typeof require<"u"?require:H)[J]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{Easing as G}from"remotion";var M={entrance:G.out(G.exp),exit:G.in(G.exp),emphasis:G.out(G.back(1.4)),linear:G.linear,gentle:G.bezier(0.25,0.1,0.25,1),spring:G.out(G.back(1.7))},z={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},Z={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 N}from"@contractspec/lib.design-system";var V={canvasBackground:N.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:N.colors.accent,gradientStart:N.colors.primary,gradientEnd:N.colors.accent},R={...N,video:V};import{VIDEO_FORMATS as P}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var h=30,U={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function _(q){let H=q.width/1920,J=q.height/1080;return{horizontal:Math.round(U.horizontal*H),vertical:Math.round(U.vertical*J),contentWidth:Math.round(U.contentWidth*H),contentHeight:Math.round(U.contentHeight*J)}}var u={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 m(){return[P.landscape,P.square,P.portrait]}import{interpolate as j,useCurrentFrame as p,useVideoConfig as D}from"remotion";import{jsx as X,jsxs as S}from"react/jsx-runtime";var r=({styleOverrides:q,showBranding:H=!0,animateEntrance:J=!0,variant:Y="gradient",children:B})=>{let A=p(),{width:W,height:I}=D(),L=R,K=_({type:"custom",width:W,height:I}),F=q?.primaryColor??L.colors.primary,b=q?.accentColor??L.colors.accent,$=q?.darkMode??!0,Q;switch(Y){case"solid":Q=$?"#0a0a0a":L.colors.background;break;case"gradient":Q=$?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${L.colors.background} 0%, ${L.colors.muted} 100%)`;break;case"dark":Q="#000000";break}let x=J?j(A,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:M.entrance}):1,C=H?j(A,[z.brandReveal,z.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return S("div",{style:{width:W,height:I,background:Q,position:"relative",overflow:"hidden",opacity:x},children:[Y==="gradient"&&X("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${F}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),X("div",{style:{position:"absolute",left:K.horizontal,top:K.vertical,width:K.contentWidth,height:K.contentHeight,display:"flex",flexDirection:"column"},children:B}),H&&X("div",{style:{position:"absolute",bottom:K.vertical/2,right:K.horizontal,opacity:C,color:$?"#ffffff":"#000000",fontSize:Math.round(16*(W/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};export{r as BrandFrame};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(H,B)=>(typeof require<"u"?require:H)[B]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{Easing as z}from"remotion";var U={entrance:z.out(z.exp),exit:z.in(z.exp),emphasis:z.out(z.back(1.4)),linear:z.linear,gentle:z.bezier(0.25,0.1,0.25,1),spring:z.out(z.back(1.7))},X={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},T={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 I}from"@contractspec/lib.design-system";var N={canvasBackground:I.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:I.colors.accent,gradientStart:I.colors.primary,gradientEnd:I.colors.accent},x={...I,video:N};var Y={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function Z(q,H){let B=H/1920;return{...q,fontSize:Math.round(q.fontSize*B),letterSpacing:q.letterSpacing?Math.round(q.letterSpacing*B*10)/10:void 0}}import{interpolate as _,useCurrentFrame as V,useVideoConfig as v}from"remotion";import{jsx as G,jsxs as K}from"react/jsx-runtime";var y=({code:q,language:H="typescript",startAt:B=0,typeAnimation:O=!0,backgroundColor:$=N.codeBackground,textColor:Q="#abb2bf",filename:P})=>{let L=V(),{width:D}=v(),M=Z(Y.code,D),J=q.length,F=J*X.codeTypingPerChar,R=O?Math.floor(_(L,[B,B+F],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,W=q.slice(0,R),w=_(L,[B,B+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.entrance}),S=O&&R<J&&L%16<10;return K("div",{style:{backgroundColor:$,borderRadius:16,padding:0,opacity:w,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[K("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[K("div",{style:{display:"flex",gap:8},children:[G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),G("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),G("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:P??H})]}),G("div",{style:{padding:"24px 32px"},children:K("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:M.fontSize,lineHeight:M.lineHeight,color:Q,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[W,S&&G("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};export{y as CodeBlock};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var XG=((G)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(G,{get:(J,H)=>(typeof require<"u"?require:J)[H]}):G)(function(G){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+G+'" is not supported')});import{Easing as R}from"remotion";var X={entrance:R.out(R.exp),exit:R.in(R.exp),emphasis:R.out(R.back(1.4)),linear:R.linear,gentle:R.bezier(0.25,0.1,0.25,1),spring:R.out(R.back(1.7))},Y={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},RG={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as F}from"@contractspec/lib.design-system";var b={canvasBackground:F.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:F.colors.accent,gradientStart:F.colors.primary,gradientEnd:F.colors.accent},O={...F,video:b};var Z={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function D(G,J){let H=J/1920;return{...G,fontSize:Math.round(G.fontSize*H),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*H*10)/10:void 0}}import{interpolate as V,useCurrentFrame as l,useVideoConfig as o}from"remotion";import{jsx as s}from"react/jsx-runtime";var r=({text:G,variant:J="body",style:H,enterAt:q=0,exitAt:P,color:B="#ffffff",align:U="left"})=>{let z=l(),{width:L}=o(),$=Z[J],_={...D($,L),...H},K=V(z,[q,q+Y.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),N=V(K,[0,1],[0,1],{easing:X.entrance}),Q=V(K,[0,1],[30,0],{easing:X.entrance}),W=1,k=0;if(P!==void 0){let C=V(z,[P,P+Y.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});W=V(C,[0,1],[1,0],{easing:X.exit}),k=V(C,[0,1],[0,-20],{easing:X.exit})}let T=N*W,j=Q+k;return s("div",{style:{fontSize:_.fontSize,lineHeight:_.lineHeight,fontWeight:_.fontWeight,letterSpacing:_.letterSpacing,color:B,textAlign:U,opacity:T,transform:`translateY(${j}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as x}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var TG=30,S={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function p(G){let J=G.width/1920,H=G.height/1080;return{horizontal:Math.round(S.horizontal*J),vertical:Math.round(S.vertical*H),contentWidth:Math.round(S.contentWidth*J),contentHeight:Math.round(S.contentHeight*H)}}var OG={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 SG(){return[x.landscape,x.square,x.portrait]}import{interpolate as h,useCurrentFrame as n,useVideoConfig as a}from"remotion";import{jsx as v,jsxs as t}from"react/jsx-runtime";var i=({styleOverrides:G,showBranding:J=!0,animateEntrance:H=!0,variant:q="gradient",children:P})=>{let B=n(),{width:U,height:z}=a(),L=O,$=p({type:"custom",width:U,height:z}),M=G?.primaryColor??L.colors.primary,_=G?.accentColor??L.colors.accent,K=G?.darkMode??!0,N;switch(q){case"solid":N=K?"#0a0a0a":L.colors.background;break;case"gradient":N=K?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${L.colors.background} 0%, ${L.colors.muted} 100%)`;break;case"dark":N="#000000";break}let Q=H?h(B,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:X.entrance}):1,W=J?h(B,[Y.brandReveal,Y.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return t("div",{style:{width:U,height:z,background:N,position:"relative",overflow:"hidden",opacity:Q},children:[q==="gradient"&&v("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${M}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),v("div",{style:{position:"absolute",left:$.horizontal,top:$.vertical,width:$.contentWidth,height:$.contentHeight,display:"flex",flexDirection:"column"},children:P}),J&&v("div",{style:{position:"absolute",bottom:$.vertical/2,right:$.horizontal,opacity:W,color:K?"#ffffff":"#000000",fontSize:Math.round(16*(U/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as y,useCurrentFrame as e,useVideoConfig as GG}from"remotion";import{jsx as w,jsxs as E}from"react/jsx-runtime";var HG=({code:G,language:J="typescript",startAt:H=0,typeAnimation:q=!0,backgroundColor:P=b.codeBackground,textColor:B="#abb2bf",filename:U})=>{let z=e(),{width:L}=GG(),$=D(Z.code,L),M=G.length,_=M*Y.codeTypingPerChar,K=q?Math.floor(y(z,[H,H+_],[0,M],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):M,N=G.slice(0,K),Q=y(z,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:X.entrance}),W=q&&K<M&&z%16<10;return E("div",{style:{backgroundColor:P,borderRadius:16,padding:0,opacity:Q,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[E("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[E("div",{style:{display:"flex",gap:8},children:[w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),w("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),w("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:$.fontSize*0.7,fontFamily:"monospace"},children:U??J})]}),w("div",{style:{padding:"24px 32px"},children:E("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:$.fontSize,lineHeight:$.lineHeight,color:B,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[N,W&&w("span",{style:{backgroundColor:B,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]})})]})};import{useCurrentFrame as JG,useVideoConfig as KG}from"remotion";import{jsx as u}from"react/jsx-runtime";var QG=({height:G=4,color:J=O.colors.primary,backgroundColor:H="rgba(255,255,255,0.1)",position:q="bottom"})=>{let P=JG(),{durationInFrames:B,width:U}=KG(),z=P/B;return u("div",{style:{position:"absolute",[q]:0,left:0,width:U,height:G,backgroundColor:H,zIndex:100},children:u("div",{style:{width:`${z*100}%`,height:"100%",backgroundColor:J,transition:"none"}})})};import{interpolate as f,useCurrentFrame as UG,useVideoConfig as $G}from"remotion";import{jsx as I,jsxs as A}from"react/jsx-runtime";var m={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},qG=({lines:G,startAt:J=0,prompt:H="$ ",title:q="Terminal",backgroundColor:P=b.terminalBackground,typingSpeed:B=Y.codeTypingPerChar})=>{let U=UG(),{width:z}=$G(),L=D(Z.code,z),$=[],M=J;for(let K of G){let N=K.delay??10,Q=M+N;if(K.type==="command"){let W=K.text.length*B;$.push({startFrame:Q,endFrame:Q+W}),M=Q+W}else $.push({startFrame:Q,endFrame:Q+5}),M=Q+5}let _=f(U,[J,J+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:X.entrance});return A("div",{style:{backgroundColor:P,borderRadius:16,overflow:"hidden",opacity:_,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[A("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[A("div",{style:{display:"flex",gap:8},children:[I("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),I("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),I("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),I("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:L.fontSize*0.7,fontFamily:"monospace"},children:q})]}),I("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((K,N)=>{let Q=$[N];if(!Q||U<Q.startFrame)return null;let W=K.type==="command",k=m[K.type],T=K.text;if(W){let d=f(U,[Q.startFrame,Q.endFrame],[0,K.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});T=K.text.slice(0,Math.floor(d))}let j=W?1:f(U,[Q.startFrame,Q.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),g=W&&U>=Q.startFrame&&U<=Q.endFrame&&U%16<10;return A("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:L.fontSize,lineHeight:1.8,color:k,opacity:j,whiteSpace:"pre-wrap"},children:[W&&I("span",{style:{color:"#3fb950"},children:H}),K.type==="comment"&&I("span",{style:{color:m.comment},children:"# "}),T,g&&I("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${N}-${K.text.slice(0,20)}`)})})]})};import{interpolate as zG,useCurrentFrame as PG}from"remotion";import{jsx as c,Fragment as NG}from"react/jsx-runtime";var WG=({type:G,durationInFrames:J,direction:H,startAt:q=0,children:P})=>{let B=PG();if(G==="none"||J===0)return c(NG,{children:P});let U=zG(B,[q,q+J],H==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),z=BG(G,U);return c("div",{style:z,children:P})};function BG(G,J){let H=X.entrance(J);switch(G){case"fade":return{opacity:H,width:"100%",height:"100%"};case"slide-left":return{opacity:H,transform:`translateX(${(1-H)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:H,transform:`translateX(${(1-H)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-H)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}export{qG as Terminal,WG as SceneTransitionWrapper,QG as ProgressBar,HG as CodeBlock,i as BrandFrame,r as AnimatedText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var R=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(A,D)=>(typeof require<"u"?require:A)[D]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{defaultTokens as z}from"@contractspec/lib.design-system";var N={canvasBackground:z.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:z.colors.accent,gradientStart:z.colors.primary,gradientEnd:z.colors.accent},E={...z,video:N};import{useCurrentFrame as O,useVideoConfig as Q}from"remotion";import{jsx as G}from"react/jsx-runtime";var Z=({height:q=4,color:A=E.colors.primary,backgroundColor:D="rgba(255,255,255,0.1)",position:H="bottom"})=>{let J=O(),{durationInFrames:K,width:L}=Q(),M=J/K;return G("div",{style:{position:"absolute",[H]:0,left:0,width:L,height:q,backgroundColor:D,zIndex:100},children:G("div",{style:{width:`${M*100}%`,height:"100%",backgroundColor:A,transition:"none"}})})};export{Z as ProgressBar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var C=((z)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(z,{get:(J,Q)=>(typeof require<"u"?require:J)[Q]}):z)(function(z){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+z+'" is not supported')});import{Easing as G}from"remotion";var D={entrance:G.out(G.exp),exit:G.in(G.exp),emphasis:G.out(G.back(1.4)),linear:G.linear,gentle:G.bezier(0.25,0.1,0.25,1),spring:G.out(G.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},u={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as U}from"@contractspec/lib.design-system";var N={canvasBackground:U.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:U.colors.accent,gradientStart:U.colors.primary,gradientEnd:U.colors.accent},c={...U,video:N};var w={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function L(z,J){let Q=J/1920;return{...z,fontSize:Math.round(z.fontSize*Q),letterSpacing:z.letterSpacing?Math.round(z.letterSpacing*Q*10)/10:void 0}}import{interpolate as R,useCurrentFrame as S,useVideoConfig as E}from"remotion";import{jsx as H,jsxs as Z}from"react/jsx-runtime";var P={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},a=({lines:z,startAt:J=0,prompt:Q="$ ",title:_="Terminal",backgroundColor:O=N.terminalBackground,typingSpeed:A=V.codeTypingPerChar})=>{let K=S(),{width:F}=E(),W=L(w.code,F),$=[],I=J;for(let B of z){let X=B.delay??10,q=I+X;if(B.type==="command"){let M=B.text.length*A;$.push({startFrame:q,endFrame:q+M}),I=q+M}else $.push({startFrame:q,endFrame:q+5}),I=q+5}let b=R(K,[J,J+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:D.entrance});return Z("div",{style:{backgroundColor:O,borderRadius:16,overflow:"hidden",opacity:b,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[Z("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[Z("div",{style:{display:"flex",gap:8},children:[H("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),H("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),H("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),H("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:W.fontSize*0.7,fontFamily:"monospace"},children:_})]}),H("div",{style:{padding:"24px 32px",minHeight:200},children:z.map((B,X)=>{let q=$[X];if(!q||K<q.startFrame)return null;let M=B.type==="command",v=P[B.type],Y=B.text;if(M){let j=R(K,[q.startFrame,q.endFrame],[0,B.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Y=B.text.slice(0,Math.floor(j))}let k=M?1:R(K,[q.startFrame,q.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),h=M&&K>=q.startFrame&&K<=q.endFrame&&K%16<10;return Z("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:W.fontSize,lineHeight:1.8,color:v,opacity:k,whiteSpace:"pre-wrap"},children:[M&&H("span",{style:{color:"#3fb950"},children:Q}),B.type==="comment"&&H("span",{style:{color:P.comment},children:"# "}),Y,h&&H("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${X}-${B.text.slice(0,20)}`)})})]})};export{a as Terminal};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var V=((B)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(B,{get:(D,k)=>(typeof require<"u"?require:D)[k]}):B)(function(B){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+B+'" is not supported')});import{Easing as z}from"remotion";var J={entrance:z.out(z.exp),exit:z.in(z.exp),emphasis:z.out(z.back(1.4)),linear:z.linear,gentle:z.bezier(0.25,0.1,0.25,1),spring:z.out(z.back(1.7))},Y={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},Z={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{interpolate as O,useCurrentFrame as Q}from"remotion";import{jsx as K,Fragment as U}from"react/jsx-runtime";var q=({type:B,durationInFrames:D,direction:k,startAt:G=0,children:H})=>{let L=Q();if(B==="none"||D===0)return K(U,{children:H});let M=O(L,[G,G+D],k==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),N=R(B,M);return K("div",{style:N,children:H})};function R(B,D){let k=J.entrance(D);switch(B){case"fade":return{opacity:k,width:"100%",height:"100%"};case"slide-left":return{opacity:k,transform:`translateX(${(1-k)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:k,transform:`translateX(${(1-k)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-k)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}export{q as SceneTransitionWrapper};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var HG=((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{Easing as z}from"remotion";var U={entrance:z.out(z.exp),exit:z.in(z.exp),emphasis:z.out(z.back(1.4)),linear:z.linear,gentle:z.bezier(0.25,0.1,0.25,1),spring:z.out(z.back(1.7))},B={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},LG={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as P}from"@contractspec/lib.design-system";var g={canvasBackground:P.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:P.colors.accent,gradientStart:P.colors.primary,gradientEnd:P.colors.accent},D={...P,video:g};var j={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function v(G,H){let J=H/1920;return{...G,fontSize:Math.round(G.fontSize*J),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*J*10)/10:void 0}}import{interpolate as Z,useCurrentFrame as c,useVideoConfig as d}from"remotion";import{jsx as l}from"react/jsx-runtime";var S=({text:G,variant:H="body",style:J,enterAt:L=0,exitAt:N,color:Q="#ffffff",align:W="left"})=>{let X=c(),{width:q}=d(),M=j[H],$={...v(M,q),...J},R=Z(X,[L,L+B.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),_=Z(R,[0,1],[0,1],{easing:U.entrance}),w=Z(R,[0,1],[30,0],{easing:U.entrance}),I=1,V=0;if(N!==void 0){let T=Z(X,[N,N+B.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});I=Z(T,[0,1],[1,0],{easing:U.exit}),V=Z(T,[0,1],[0,-20],{easing:U.exit})}let b=_*I,m=w+V;return l("div",{style:{fontSize:$.fontSize,lineHeight:$.lineHeight,fontWeight:$.fontWeight,letterSpacing:$.letterSpacing,color:Q,textAlign:W,opacity:b,transform:`translateY(${m}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as k}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var _G=30,C={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function y(G){let H=G.width/1920,J=G.height/1080;return{horizontal:Math.round(C.horizontal*H),vertical:Math.round(C.vertical*J),contentWidth:Math.round(C.contentWidth*H),contentHeight:Math.round(C.contentHeight*J)}}var YG={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 IG(){return[k.landscape,k.square,k.portrait]}import{interpolate as h,useCurrentFrame as o,useVideoConfig as n}from"remotion";import{jsx as E,jsxs as s}from"react/jsx-runtime";var f=({styleOverrides:G,showBranding:H=!0,animateEntrance:J=!0,variant:L="gradient",children:N})=>{let Q=o(),{width:W,height:X}=n(),q=D,M=y({type:"custom",width:W,height:X}),Y=G?.primaryColor??q.colors.primary,$=G?.accentColor??q.colors.accent,R=G?.darkMode??!0,_;switch(L){case"solid":_=R?"#0a0a0a":q.colors.background;break;case"gradient":_=R?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${q.colors.background} 0%, ${q.colors.muted} 100%)`;break;case"dark":_="#000000";break}let w=J?h(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.entrance}):1,I=H?h(Q,[B.brandReveal,B.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return s("div",{style:{width:W,height:X,background:_,position:"relative",overflow:"hidden",opacity:w},children:[L==="gradient"&&E("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${Y}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),E("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:N}),H&&E("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:I,color:R?"#ffffff":"#000000",fontSize:Math.round(16*(W/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{useCurrentFrame as r,useVideoConfig as i}from"remotion";import{jsx as p}from"react/jsx-runtime";var u=({height:G=4,color:H=D.colors.primary,backgroundColor:J="rgba(255,255,255,0.1)",position:L="bottom"})=>{let N=r(),{durationInFrames:Q,width:W}=i(),X=N/Q;return p("div",{style:{position:"absolute",[L]:0,left:0,width:W,height:G,backgroundColor:J,zIndex:100},children:p("div",{style:{width:`${X*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{AbsoluteFill as a,interpolate as F,Sequence as A,useCurrentFrame as x,useVideoConfig as t}from"remotion";import{jsx as K,jsxs as O}from"react/jsx-runtime";var yG=({hook:G,message:H,points:J=[],cta:L="Learn more",ctaUrl:N="contractspec.dev",accentColor:Q})=>{let{durationInFrames:W,width:X,height:q}=t(),Y=Q??D.colors.accent,$=q>X,R=75,_=60,w=120,I=W-90;return O(a,{children:[K(f,{variant:"gradient",showBranding:!0,children:O("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:$?48:32,textAlign:"center",padding:$?"0 20px":0},children:[K(A,{from:0,durationInFrames:105,children:K("div",{style:{width:"100%"},children:K(S,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),K(A,{from:60,children:K("div",{style:{width:"100%"},children:K(S,{text:H,variant:$?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),J.length>0&&K(A,{from:120,children:K("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:$?"flex-start":"center",width:"100%",maxWidth:$?"100%":"80%",marginTop:16},children:J.map((V,b)=>K(e,{text:V,index:b,startFrame:b*15,accent:Y},V))})}),K(A,{from:I,children:K(GG,{cta:L,url:N,accent:Y})})]})}),K(u,{color:Y})]})},e=({text:G,startFrame:H,accent:J})=>{let L=x(),N=F(L,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=F(L,[H,H+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.entrance});return O("div",{style:{opacity:N,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[K("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:J,flexShrink:0}}),G]})},GG=({cta:G,url:H,accent:J})=>{let L=x(),N=F(L,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=F(L,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:U.emphasis});return O("div",{style:{opacity:N,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[K("div",{style:{backgroundColor:J,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),K("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:H})]})};export{yG as SocialClip};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var zG=((G)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(G,{get:(H,Q)=>(typeof require<"u"?require:H)[Q]}):G)(function(G){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+G+'" is not supported')});import{Easing as R}from"remotion";var Y={entrance:R.out(R.exp),exit:R.in(R.exp),emphasis:R.out(R.back(1.4)),linear:R.linear,gentle:R.bezier(0.25,0.1,0.25,1),spring:R.out(R.back(1.7))},_={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},NG={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as w}from"@contractspec/lib.design-system";var j={canvasBackground:w.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:w.colors.accent,gradientStart:w.colors.primary,gradientEnd:w.colors.accent},D={...w,video:j};var b={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function A(G,H){let Q=H/1920;return{...G,fontSize:Math.round(G.fontSize*Q),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*Q*10)/10:void 0}}import{interpolate as V,useCurrentFrame as a,useVideoConfig as r}from"remotion";import{jsx as n}from"react/jsx-runtime";var O=({text:G,variant:H="body",style:Q,enterAt:N=0,exitAt:W,color:X="#ffffff",align:$="left"})=>{let U=a(),{width:L}=r(),z=b[H],P={...A(z,L),...Q},K=V(U,[N,N+_.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),M=V(K,[0,1],[0,1],{easing:Y.entrance}),J=V(K,[0,1],[30,0],{easing:Y.entrance}),q=1,F=0;if(W!==void 0){let T=V(U,[W,W+_.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});q=V(T,[0,1],[1,0],{easing:Y.exit}),F=V(T,[0,1],[0,-20],{easing:Y.exit})}let k=M*q,S=J+F;return n("div",{style:{fontSize:P.fontSize,lineHeight:P.lineHeight,fontWeight:P.fontWeight,letterSpacing:P.letterSpacing,color:X,textAlign:$,opacity:k,transform:`translateY(${S}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as v}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var ZG=30,C={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function x(G){let H=G.width/1920,Q=G.height/1080;return{horizontal:Math.round(C.horizontal*H),vertical:Math.round(C.vertical*Q),contentWidth:Math.round(C.contentWidth*H),contentHeight:Math.round(C.contentHeight*Q)}}var DG={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 VG(){return[v.landscape,v.square,v.portrait]}import{interpolate as p,useCurrentFrame as i,useVideoConfig as t}from"remotion";import{jsx as h,jsxs as e}from"react/jsx-runtime";var u=({styleOverrides:G,showBranding:H=!0,animateEntrance:Q=!0,variant:N="gradient",children:W})=>{let X=i(),{width:$,height:U}=t(),L=D,z=x({type:"custom",width:$,height:U}),Z=G?.primaryColor??L.colors.primary,P=G?.accentColor??L.colors.accent,K=G?.darkMode??!0,M;switch(N){case"solid":M=K?"#0a0a0a":L.colors.background;break;case"gradient":M=K?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${L.colors.background} 0%, ${L.colors.muted} 100%)`;break;case"dark":M="#000000";break}let J=Q?p(X,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:Y.entrance}):1,q=H?p(X,[_.brandReveal,_.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return e("div",{style:{width:$,height:U,background:M,position:"relative",overflow:"hidden",opacity:J},children:[N==="gradient"&&h("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${Z}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),h("div",{style:{position:"absolute",left:z.horizontal,top:z.vertical,width:z.contentWidth,height:z.contentHeight,display:"flex",flexDirection:"column"},children:W}),H&&h("div",{style:{position:"absolute",bottom:z.vertical/2,right:z.horizontal,opacity:q,color:K?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{useCurrentFrame as GG,useVideoConfig as HG}from"remotion";import{jsx as c}from"react/jsx-runtime";var g=({height:G=4,color:H=D.colors.primary,backgroundColor:Q="rgba(255,255,255,0.1)",position:N="bottom"})=>{let W=GG(),{durationInFrames:X,width:$}=HG(),U=W/X;return c("div",{style:{position:"absolute",[N]:0,left:0,width:$,height:G,backgroundColor:Q,zIndex:100},children:c("div",{style:{width:`${U*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{interpolate as f,useCurrentFrame as JG,useVideoConfig as KG}from"remotion";import{jsx as B,jsxs as E}from"react/jsx-runtime";var d={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},m=({lines:G,startAt:H=0,prompt:Q="$ ",title:N="Terminal",backgroundColor:W=j.terminalBackground,typingSpeed:X=_.codeTypingPerChar})=>{let $=JG(),{width:U}=KG(),L=A(b.code,U),z=[],Z=H;for(let K of G){let M=K.delay??10,J=Z+M;if(K.type==="command"){let q=K.text.length*X;z.push({startFrame:J,endFrame:J+q}),Z=J+q}else z.push({startFrame:J,endFrame:J+5}),Z=J+5}let P=f($,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:Y.entrance});return E("div",{style:{backgroundColor:W,borderRadius:16,overflow:"hidden",opacity:P,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[E("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[E("div",{style:{display:"flex",gap:8},children:[B("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),B("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),B("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),B("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:L.fontSize*0.7,fontFamily:"monospace"},children:N})]}),B("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((K,M)=>{let J=z[M];if(!J||$<J.startFrame)return null;let q=K.type==="command",F=d[K.type],k=K.text;if(q){let s=f($,[J.startFrame,J.endFrame],[0,K.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});k=K.text.slice(0,Math.floor(s))}let S=q?1:f($,[J.startFrame,J.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),o=q&&$>=J.startFrame&&$<=J.endFrame&&$%16<10;return E("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:L.fontSize,lineHeight:1.8,color:F,opacity:S,whiteSpace:"pre-wrap"},children:[q&&B("span",{style:{color:"#3fb950"},children:Q}),K.type==="comment"&&B("span",{style:{color:d.comment},children:"# "}),k,o&&B("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:" "})]},`${M}-${K.text.slice(0,20)}`)})})]})};import{AbsoluteFill as QG,Sequence as l,useVideoConfig as $G}from"remotion";import{jsx as I,jsxs as y}from"react/jsx-runtime";var oG=({title:G,subtitle:H,lines:Q,terminalTitle:N="Terminal",prompt:W="$ ",summary:X})=>{let{durationInFrames:$}=$G(),U=D,L=40,z=$-90;return y(QG,{children:[I(u,{variant:"dark",showBranding:!0,children:y("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[y("div",{children:[I(O,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),H&&I("div",{style:{marginTop:8},children:I(O,{text:H,variant:"body",enterAt:15,color:U.colors.mutedForeground})})]}),I(l,{from:40,children:I("div",{style:{flex:1},children:I(m,{lines:Q,startAt:0,prompt:W,title:N})})}),X&&I(l,{from:z,children:I("div",{style:{marginTop:"auto",paddingTop:24},children:I(O,{text:X,variant:"subheading",enterAt:0,color:U.colors.accent,align:"center"})})})]})}),I(g,{})]})};export{oG as TerminalDemo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var K=((x)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(z,q)=>(typeof require<"u"?require:z)[q]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});import{Easing as j}from"remotion";var Q={entrance:j.out(j.exp),exit:j.in(j.exp),emphasis:j.out(j.back(1.4)),linear:j.linear,gentle:j.bezier(0.25,0.1,0.25,1),spring:j.out(j.back(1.7))},U={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},$={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as B}from"@contractspec/lib.design-system";var J={canvasBackground:B.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:B.colors.accent,gradientStart:B.colors.primary,gradientEnd:B.colors.accent},C={...B,video:J};var X={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function Y(x,z){let q=z/1920;return{...x,fontSize:Math.round(x.fontSize*q),letterSpacing:x.letterSpacing?Math.round(x.letterSpacing*q*10)/10:void 0}}import{VIDEO_FORMATS as H}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var A=30,G={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function D(x){let z=x.width/1920,q=x.height/1080;return{horizontal:Math.round(G.horizontal*z),vertical:Math.round(G.vertical*q),contentWidth:Math.round(G.contentWidth*z),contentHeight:Math.round(G.contentHeight*q)}}var F={center:{x:960,y:540},topLeft:{x:120,y:80},topRight:{x:1800,y:80},bottomLeft:{x:120,y:1000},bottomRight:{x:1800,y:1000},bottomCenter:{x:960,y:960}};function I(){return[H.landscape,H.square,H.portrait]}export{X as videoTypography,$ as videoTransitions,G as videoSafeZone,F as videoPositions,Q as videoEasing,U as videoDurations,Y as scaleTypography,D as scaleSafeZone,I as getAllFormatVariants,C as defaultVideoTheme,J as defaultVideoColors,B as defaultTokens,H as VIDEO_FORMATS,A as DEFAULT_FPS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=((h)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(j,k)=>(typeof require<"u"?require:j)[k]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});import{VIDEO_FORMATS as u}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var z=30,q={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function B(h){let j=h.width/1920,k=h.height/1080;return{horizontal:Math.round(q.horizontal*j),vertical:Math.round(q.vertical*k),contentWidth:Math.round(q.contentWidth*j),contentHeight:Math.round(q.contentHeight*k)}}var C={center:{x:960,y:540},topLeft:{x:120,y:80},topRight:{x:1800,y:80},bottomLeft:{x:120,y:1000},bottomRight:{x:1800,y:1000},bottomCenter:{x:960,y:960}};function G(){return[u.landscape,u.square,u.portrait]}export{q as videoSafeZone,C as videoPositions,B as scaleSafeZone,G as getAllFormatVariants,u as VIDEO_FORMATS,z as DEFAULT_FPS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var p=((h)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(h,{get:(j,k)=>(typeof require<"u"?require:j)[k]}):h)(function(h){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+h+'" is not supported')});import{Easing as d}from"remotion";var w={entrance:d.out(d.exp),exit:d.in(d.exp),emphasis:d.out(d.back(1.4)),linear:d.linear,gentle:d.bezier(0.25,0.1,0.25,1),spring:d.out(d.back(1.7))},x={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},y={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};export{y as videoTransitions,w as videoEasing,x as videoDurations};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var D=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(z,A)=>(typeof require<"u"?require:z)[A]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{defaultTokens as j}from"@contractspec/lib.design-system";var B={canvasBackground:j.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:j.colors.accent,gradientStart:j.colors.primary,gradientEnd:j.colors.accent},G={...j,video:B};export{G as defaultVideoTheme,B as defaultVideoColors,j as defaultTokens};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=((b)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(k,j)=>(typeof require<"u"?require:k)[j]}):b)(function(b){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var u={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function z(b,k){let j=k/1920;return{...b,fontSize:Math.round(b.fontSize*j),letterSpacing:b.letterSpacing?Math.round(b.letterSpacing*j*10)/10:void 0}}export{u as videoTypography,z as scaleTypography};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.compositions",title:"Video Compositions & Primitives",summary:"Remotion composition components and reusable primitives for building programmatic videos.",kind:"reference",visibility:"public",route:"/docs/video-gen/compositions",tags:["video","remotion","compositions","primitives","react"],owners:["@contractspec/lib.video-gen"],body:'# Video Compositions & Primitives\n\nCompositions are React components rendered by Remotion. They use `useCurrentFrame()`, `useVideoConfig()`, and `interpolate()` to produce frame-accurate animations. All compositions must be **deterministic**: same props = same visual output.\n\n## Primitive Components\n\nPrimitives are reusable building blocks for constructing full compositions.\n\n```ts\nimport {\n AnimatedText,\n CodeBlock,\n Terminal,\n BrandFrame,\n ProgressBar,\n SceneTransitionWrapper,\n} from "@contractspec/lib.video-gen/compositions/primitives";\n```\n\n### AnimatedText\n\nText with entrance/exit slide + fade animations.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `text` | `string` | -- | Text content |\n| `variant` | `keyof videoTypography` | `"body"` | Typography preset (title, heading, subheading, body, code, caption, label) |\n| `enterAt` | `number` | `0` | Frame at which text enters |\n| `exitAt` | `number` | -- | Frame at which text exits (omit to keep visible) |\n| `color` | `string` | `"#ffffff"` | Text color |\n| `align` | `"left" \\| "center" \\| "right"` | `"left"` | Text alignment |\n\n### CodeBlock\n\nSyntax-aware code display with typing animation and macOS-style title bar.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `code` | `string` | -- | Code string to display |\n| `language` | `string` | `"typescript"` | Language label in the title bar |\n| `startAt` | `number` | `0` | Frame at which typing starts |\n| `typeAnimation` | `boolean` | `true` | Animate character-by-character typing |\n| `filename` | `string` | -- | Filename in the title bar (overrides language) |\n\n### Terminal\n\nCLI simulator with command typing, output lines, and cursor animation.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `lines` | `TerminalLine[]` | -- | Lines to display in sequence |\n| `startAt` | `number` | `0` | Frame at which terminal appears |\n| `prompt` | `string` | `"$ "` | Prompt string before commands |\n| `title` | `string` | `"Terminal"` | Title bar text |\n| `typingSpeed` | `number` | `2` | Frames per character for commands |\n\n`TerminalLine` types: `command` (typed), `output` (faded in), `error` (red), `success` (green), `comment` (dimmed with `#` prefix).\n\n### BrandFrame\n\nBranded container with safe-zone padding, gradient/solid/dark backgrounds, and optional watermark.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `variant` | `"solid" \\| "gradient" \\| "dark"` | `"gradient"` | Background style |\n| `showBranding` | `boolean` | `true` | Show "ContractSpec" watermark |\n| `animateEntrance` | `boolean` | `true` | Fade-in on first frames |\n| `styleOverrides` | `VideoStyleOverrides` | -- | Override colors, fonts, dark mode |\n\n### ProgressBar\n\nThin progress indicator at the top or bottom of the frame.\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `height` | `number` | `4` | Bar height in pixels |\n| `color` | `string` | primary color | Bar fill color |\n| `position` | `"top" \\| "bottom"` | `"bottom"` | Placement |\n\n### SceneTransitionWrapper\n\nWraps children with entrance/exit transitions (fade, slide-left, slide-right, wipe).\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `type` | `SceneTransitionType` | -- | Transition type |\n| `durationInFrames` | `number` | -- | Transition duration |\n| `direction` | `"in" \\| "out"` | -- | Entering or exiting |\n\n## Full Compositions\n\nFull compositions combine primitives into complete video templates. They are registered in Remotion Studio via `RemotionRoot`.\n\n### ApiOverview\n\nVisualizes a ContractSpec definition generating a full API surface. Used for homepage demos and documentation.\n\n```tsx\nimport { ApiOverview } from "@contractspec/lib.video-gen/compositions/api-overview";\n\n<ApiOverview\n specName="CreateUser"\n method="POST"\n endpoint="/api/users"\n specCode={`export const createUser = defineCommand({...})`}\n generatedOutputs={["REST Endpoint", "GraphQL Mutation", "Prisma Model"]}\n tagline="One spec. Every surface."\n/>\n```\n\n**Scenes**: Title + method badge -> Code typing animation -> Generated outputs fan-out -> Tagline.\n\n### SocialClip\n\nShort-form marketing content for LinkedIn, X, YouTube Shorts. Adapts layout for landscape (16:9), square (1:1), and portrait (9:16).\n\n```tsx\nimport { SocialClip } from "@contractspec/lib.video-gen/compositions/social-clip";\n\n<SocialClip\n hook="Stop rewriting the same API logic."\n message="Generate REST, GraphQL, DB, SDK from a single spec."\n points={["Deterministic output", "Fully ejectable", "No lock-in"]}\n cta="Try ContractSpec"\n ctaUrl="contractspec.dev"\n/>\n```\n\n**Scenes**: Hook (attention grabber) -> Main message -> Supporting points -> CTA button.\n\n### TerminalDemo\n\nCLI command walkthrough with animated terminal. Used in documentation and tutorial videos.\n\n```tsx\nimport { TerminalDemo } from "@contractspec/lib.video-gen/compositions/terminal-demo";\n\n<TerminalDemo\n title="Getting Started with ContractSpec"\n subtitle="Define once, generate everything."\n lines={[\n { type: "command", text: "npx contractspec init my-api" },\n { type: "output", text: "Created my-api/ with 3 sample contracts" },\n { type: "command", text: "npx contractspec build" },\n { type: "success", text: "Built 3 contracts -> 18 generated files" },\n ]}\n summary="Ship faster. Stay coherent."\n/>\n```\n\n**Scenes**: Title + subtitle -> Terminal typing animation -> Summary.\n\n## Creating New Compositions\n\n1. Create a new `.tsx` file in `src/compositions/`.\n2. Use primitives from `./primitives/` and design tokens from `../design/`.\n3. Use `useCurrentFrame()` and `interpolate()` for frame-based animations.\n4. Register in `src/remotion/Root.tsx` with a `<Composition>` entry.\n5. Export from `src/compositions/index.ts`.\n6. Add the export path to `package.json` (both workspace and publishConfig).\n\n### Guardrails\n\n- Keep compositions **pure**: no side effects, no network calls, no randomness.\n- Use `scaleSafeZone()` and `scaleTypography()` to support multiple formats.\n- All timing should be frame-based (not time-based) for deterministic output.\n'}];f(h);
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.video-gen.design",title:"Video Design System",summary:"Design tokens, motion primitives, typography scale, and layout system optimized for programmatic video.",kind:"reference",visibility:"public",route:"/docs/video-gen/design",tags:["video","design-tokens","motion","typography","layout"],owners:["@contractspec/lib.video-gen"],body:`# Video Design System
|
|
2
|
+
|
|
3
|
+
The design layer bridges \`@contractspec/lib.design-system\` brand tokens with video-specific extensions for motion, typography, and spatial layout. All values are optimized for 1920x1080 (landscape) and scale proportionally for other formats.
|
|
4
|
+
|
|
5
|
+
\`\`\`ts
|
|
6
|
+
import {
|
|
7
|
+
defaultVideoTheme,
|
|
8
|
+
videoEasing,
|
|
9
|
+
videoDurations,
|
|
10
|
+
videoTypography,
|
|
11
|
+
videoSafeZone,
|
|
12
|
+
scaleSafeZone,
|
|
13
|
+
} from "@contractspec/lib.video-gen/design";
|
|
14
|
+
\`\`\`
|
|
15
|
+
|
|
16
|
+
## Tokens
|
|
17
|
+
|
|
18
|
+
### Brand Bridge
|
|
19
|
+
|
|
20
|
+
\`VideoThemeTokens\` extends the design-system \`ThemeTokens\` with a \`video\` namespace for video-specific colors:
|
|
21
|
+
|
|
22
|
+
\`\`\`ts
|
|
23
|
+
import { defaultVideoTheme } from "@contractspec/lib.video-gen/design/tokens";
|
|
24
|
+
|
|
25
|
+
// Brand tokens (from @contractspec/lib.design-system)
|
|
26
|
+
defaultVideoTheme.colors.primary; // brand primary
|
|
27
|
+
defaultVideoTheme.colors.accent; // brand accent
|
|
28
|
+
|
|
29
|
+
// Video-specific extensions
|
|
30
|
+
defaultVideoTheme.video.canvasBackground; // frame background
|
|
31
|
+
defaultVideoTheme.video.codeBackground; // "#1e1e2e"
|
|
32
|
+
defaultVideoTheme.video.terminalBackground; // "#0d1117"
|
|
33
|
+
defaultVideoTheme.video.terminalForeground; // "#c9d1d9"
|
|
34
|
+
defaultVideoTheme.video.highlight; // accent color
|
|
35
|
+
defaultVideoTheme.video.gradientStart; // primary
|
|
36
|
+
defaultVideoTheme.video.gradientEnd; // accent
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
> Do not duplicate brand color values. Import and extend from \`@contractspec/lib.design-system\`.
|
|
40
|
+
|
|
41
|
+
## Motion
|
|
42
|
+
|
|
43
|
+
### Easing Functions
|
|
44
|
+
|
|
45
|
+
Pre-configured easing curves for use with Remotion's \`interpolate()\`:
|
|
46
|
+
|
|
47
|
+
| Key | Easing | Use Case |
|
|
48
|
+
|-----|--------|----------|
|
|
49
|
+
| \`entrance\` | \`Easing.out(Easing.exp)\` | Objects appearing |
|
|
50
|
+
| \`exit\` | \`Easing.in(Easing.exp)\` | Objects disappearing |
|
|
51
|
+
| \`emphasis\` | \`Easing.out(Easing.back(1.4))\` | Drawing attention, bounce |
|
|
52
|
+
| \`linear\` | \`Easing.linear\` | Progress bars, typing |
|
|
53
|
+
| \`gentle\` | \`Easing.bezier(0.25, 0.1, 0.25, 1)\` | Subtle movements |
|
|
54
|
+
| \`spring\` | \`Easing.out(Easing.back(1.7))\` | Playful movements |
|
|
55
|
+
|
|
56
|
+
\`\`\`ts
|
|
57
|
+
import { interpolate } from "remotion";
|
|
58
|
+
import { videoEasing } from "@contractspec/lib.video-gen/design/motion";
|
|
59
|
+
|
|
60
|
+
const opacity = interpolate(frame, [0, 15], [0, 1], {
|
|
61
|
+
easing: videoEasing.entrance,
|
|
62
|
+
extrapolateLeft: "clamp",
|
|
63
|
+
extrapolateRight: "clamp",
|
|
64
|
+
});
|
|
65
|
+
\`\`\`
|
|
66
|
+
|
|
67
|
+
### Durations (frames at 30fps)
|
|
68
|
+
|
|
69
|
+
| Key | Frames | Seconds | Use Case |
|
|
70
|
+
|-----|--------|---------|----------|
|
|
71
|
+
| \`sceneTransition\` | 20 | 0.67s | Between scenes |
|
|
72
|
+
| \`textEntrance\` | 15 | 0.5s | Text slide-in |
|
|
73
|
+
| \`textExit\` | 12 | 0.4s | Text slide-out |
|
|
74
|
+
| \`codeTypingPerChar\` | 2 | 0.07s | Code typing speed |
|
|
75
|
+
| \`sectionPause\` | 30 | 1.0s | Pause after concept |
|
|
76
|
+
| \`emphasisPause\` | 15 | 0.5s | Brief emphasis |
|
|
77
|
+
| \`brandReveal\` | 25 | 0.83s | Logo/watermark |
|
|
78
|
+
| \`minScene\` | 60 | 2.0s | Minimum scene length |
|
|
79
|
+
| \`shortScene\` | 60 | 2.0s | Short scene |
|
|
80
|
+
| \`mediumScene\` | 120 | 4.0s | Medium scene |
|
|
81
|
+
| \`longScene\` | 240 | 8.0s | Long scene |
|
|
82
|
+
|
|
83
|
+
### Transition Presets
|
|
84
|
+
|
|
85
|
+
\`\`\`ts
|
|
86
|
+
import { videoTransitions } from "@contractspec/lib.video-gen/design/motion";
|
|
87
|
+
|
|
88
|
+
// { type: "fade", durationInFrames: 20 }
|
|
89
|
+
videoTransitions.fade;
|
|
90
|
+
|
|
91
|
+
// { type: "slide-left", durationInFrames: 20 }
|
|
92
|
+
videoTransitions.slideLeft;
|
|
93
|
+
\`\`\`
|
|
94
|
+
|
|
95
|
+
## Typography
|
|
96
|
+
|
|
97
|
+
### Type Scale (1920x1080 baseline)
|
|
98
|
+
|
|
99
|
+
| Key | Size | Weight | Use Case |
|
|
100
|
+
|-----|------|--------|----------|
|
|
101
|
+
| \`title\` | 72px | 700 | Main title |
|
|
102
|
+
| \`heading\` | 56px | 600 | Section heading |
|
|
103
|
+
| \`subheading\` | 40px | 500 | Subheading |
|
|
104
|
+
| \`body\` | 32px | 400 | Body text |
|
|
105
|
+
| \`code\` | 28px | 400 | Monospace code |
|
|
106
|
+
| \`caption\` | 24px | 400 | Small caption |
|
|
107
|
+
| \`label\` | 20px | 600 | Badge / label |
|
|
108
|
+
|
|
109
|
+
### Scaling for Other Formats
|
|
110
|
+
|
|
111
|
+
Use \`scaleTypography()\` to proportionally scale for non-landscape formats:
|
|
112
|
+
|
|
113
|
+
\`\`\`ts
|
|
114
|
+
import {
|
|
115
|
+
videoTypography,
|
|
116
|
+
scaleTypography,
|
|
117
|
+
} from "@contractspec/lib.video-gen/design/typography";
|
|
118
|
+
|
|
119
|
+
// Scale heading for 1080x1080 (square)
|
|
120
|
+
const squareHeading = scaleTypography(videoTypography.heading, 1080);
|
|
121
|
+
// -> fontSize: 32, lineHeight: 1.2, fontWeight: 600
|
|
122
|
+
\`\`\`
|
|
123
|
+
|
|
124
|
+
## Layouts
|
|
125
|
+
|
|
126
|
+
### Safe Zones
|
|
127
|
+
|
|
128
|
+
Content-safe padding for text within video frames (1920x1080 baseline):
|
|
129
|
+
|
|
130
|
+
\`\`\`ts
|
|
131
|
+
import {
|
|
132
|
+
videoSafeZone,
|
|
133
|
+
scaleSafeZone,
|
|
134
|
+
} from "@contractspec/lib.video-gen/design/layouts";
|
|
135
|
+
|
|
136
|
+
videoSafeZone.horizontal; // 120px
|
|
137
|
+
videoSafeZone.vertical; // 80px
|
|
138
|
+
videoSafeZone.contentWidth; // 1680px
|
|
139
|
+
videoSafeZone.contentHeight; // 920px
|
|
140
|
+
|
|
141
|
+
// Scale for portrait (1080x1920)
|
|
142
|
+
const portrait = scaleSafeZone({ type: "portrait", width: 1080, height: 1920 });
|
|
143
|
+
\`\`\`
|
|
144
|
+
|
|
145
|
+
### Standard Positions
|
|
146
|
+
|
|
147
|
+
\`\`\`ts
|
|
148
|
+
import { videoPositions } from "@contractspec/lib.video-gen/design/layouts";
|
|
149
|
+
|
|
150
|
+
videoPositions.center; // { x: 960, y: 540 }
|
|
151
|
+
videoPositions.topLeft; // { x: 120, y: 80 }
|
|
152
|
+
videoPositions.bottomRight; // { x: 1800, y: 1000 } -- logos, watermarks
|
|
153
|
+
videoPositions.bottomCenter; // { x: 960, y: 960 } -- captions
|
|
154
|
+
\`\`\`
|
|
155
|
+
|
|
156
|
+
### Format Variants
|
|
157
|
+
|
|
158
|
+
\`\`\`ts
|
|
159
|
+
import {
|
|
160
|
+
VIDEO_FORMATS,
|
|
161
|
+
getAllFormatVariants,
|
|
162
|
+
DEFAULT_FPS,
|
|
163
|
+
} from "@contractspec/lib.video-gen/design/layouts";
|
|
164
|
+
|
|
165
|
+
VIDEO_FORMATS.landscape; // { type: "landscape", width: 1920, height: 1080 }
|
|
166
|
+
VIDEO_FORMATS.portrait; // { type: "portrait", width: 1080, height: 1920 }
|
|
167
|
+
VIDEO_FORMATS.square; // { type: "square", width: 1080, height: 1080 }
|
|
168
|
+
|
|
169
|
+
getAllFormatVariants(); // [landscape, square, portrait]
|
|
170
|
+
DEFAULT_FPS; // 30
|
|
171
|
+
\`\`\`
|
|
172
|
+
`}];f(h);
|