@lssm-tech/lib.video-gen 3.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/README.md +79 -0
  2. package/dist/browser/compositions/api-overview.js +1 -0
  3. package/dist/browser/compositions/index.js +1 -0
  4. package/dist/browser/compositions/primitives/animated-text.js +1 -0
  5. package/dist/browser/compositions/primitives/brand-frame.js +1 -0
  6. package/dist/browser/compositions/primitives/code-block.js +1 -0
  7. package/dist/browser/compositions/primitives/index.js +1 -0
  8. package/dist/browser/compositions/primitives/progress-bar.js +1 -0
  9. package/dist/browser/compositions/primitives/terminal.js +1 -0
  10. package/dist/browser/compositions/primitives/transition.js +1 -0
  11. package/dist/browser/compositions/social-clip.js +1 -0
  12. package/dist/browser/compositions/terminal-demo.js +1 -0
  13. package/dist/browser/design/index.js +1 -0
  14. package/dist/browser/design/layouts.js +1 -0
  15. package/dist/browser/design/motion.js +1 -0
  16. package/dist/browser/design/tokens.js +1 -0
  17. package/dist/browser/design/typography.js +1 -0
  18. package/dist/browser/docs/compositions.docblock.js +1 -0
  19. package/dist/browser/docs/design.docblock.js +172 -0
  20. package/dist/browser/docs/generators.docblock.js +165 -0
  21. package/dist/browser/docs/rendering.docblock.js +175 -0
  22. package/dist/browser/docs/video-gen.docblock.js +126 -0
  23. package/dist/browser/generators/index.js +82 -0
  24. package/dist/browser/generators/scene-planner.js +82 -0
  25. package/dist/browser/generators/script-generator.js +82 -0
  26. package/dist/browser/generators/video-generator.js +82 -0
  27. package/dist/browser/i18n/catalogs/en.js +28 -0
  28. package/dist/browser/i18n/catalogs/es.js +28 -0
  29. package/dist/browser/i18n/catalogs/fr.js +28 -0
  30. package/dist/browser/i18n/catalogs/index.js +82 -0
  31. package/dist/browser/i18n/index.js +82 -0
  32. package/dist/browser/i18n/keys.js +1 -0
  33. package/dist/browser/i18n/locale.js +1 -0
  34. package/dist/browser/i18n/messages.js +82 -0
  35. package/dist/browser/index.js +82 -0
  36. package/dist/browser/player/demo-player.js +1 -0
  37. package/dist/browser/player/index.js +1 -0
  38. package/dist/browser/remotion/Root.js +19 -0
  39. package/dist/browser/remotion/index.js +19 -0
  40. package/dist/browser/renderers/config.js +1 -0
  41. package/dist/browser/renderers/index.js +1 -0
  42. package/dist/browser/renderers/local.js +1 -0
  43. package/dist/browser/types.js +1 -0
  44. package/dist/browser/video-gen.feature.js +1 -0
  45. package/dist/compositions/api-overview.d.ts +16 -0
  46. package/dist/compositions/api-overview.js +2 -0
  47. package/dist/compositions/index.d.ts +7 -0
  48. package/dist/compositions/index.js +2 -0
  49. package/dist/compositions/primitives/animated-text.d.ts +22 -0
  50. package/dist/compositions/primitives/animated-text.js +2 -0
  51. package/dist/compositions/primitives/brand-frame.d.ts +14 -0
  52. package/dist/compositions/primitives/brand-frame.js +2 -0
  53. package/dist/compositions/primitives/code-block.d.ts +18 -0
  54. package/dist/compositions/primitives/code-block.js +2 -0
  55. package/dist/compositions/primitives/index.d.ts +12 -0
  56. package/dist/compositions/primitives/index.js +2 -0
  57. package/dist/compositions/primitives/progress-bar.d.ts +12 -0
  58. package/dist/compositions/primitives/progress-bar.js +2 -0
  59. package/dist/compositions/primitives/terminal.d.ts +24 -0
  60. package/dist/compositions/primitives/terminal.js +2 -0
  61. package/dist/compositions/primitives/transition.d.ts +14 -0
  62. package/dist/compositions/primitives/transition.js +2 -0
  63. package/dist/compositions/social-clip.d.ts +16 -0
  64. package/dist/compositions/social-clip.js +2 -0
  65. package/dist/compositions/terminal-demo.d.ts +17 -0
  66. package/dist/compositions/terminal-demo.js +2 -0
  67. package/dist/design/index.d.ts +4 -0
  68. package/dist/design/index.js +2 -0
  69. package/dist/design/layouts.d.ts +69 -0
  70. package/dist/design/layouts.js +2 -0
  71. package/dist/design/motion.d.ts +72 -0
  72. package/dist/design/motion.js +2 -0
  73. package/dist/design/tokens.d.ts +31 -0
  74. package/dist/design/tokens.js +2 -0
  75. package/dist/design/typography.d.ts +61 -0
  76. package/dist/design/typography.js +2 -0
  77. package/dist/docs/compositions.docblock.d.ts +1 -0
  78. package/dist/docs/compositions.docblock.js +2 -0
  79. package/dist/docs/design.docblock.d.ts +1 -0
  80. package/dist/docs/design.docblock.js +173 -0
  81. package/dist/docs/generators.docblock.d.ts +1 -0
  82. package/dist/docs/generators.docblock.js +166 -0
  83. package/dist/docs/rendering.docblock.d.ts +1 -0
  84. package/dist/docs/rendering.docblock.js +176 -0
  85. package/dist/docs/video-gen.docblock.d.ts +1 -0
  86. package/dist/docs/video-gen.docblock.js +127 -0
  87. package/dist/generators/index.d.ts +3 -0
  88. package/dist/generators/index.js +83 -0
  89. package/dist/generators/scene-planner.d.ts +31 -0
  90. package/dist/generators/scene-planner.js +83 -0
  91. package/dist/generators/script-generator.d.ts +57 -0
  92. package/dist/generators/script-generator.js +83 -0
  93. package/dist/generators/video-generator.d.ts +21 -0
  94. package/dist/generators/video-generator.js +83 -0
  95. package/dist/i18n/catalogs/en.d.ts +8 -0
  96. package/dist/i18n/catalogs/en.js +29 -0
  97. package/dist/i18n/catalogs/es.d.ts +6 -0
  98. package/dist/i18n/catalogs/es.js +29 -0
  99. package/dist/i18n/catalogs/fr.d.ts +6 -0
  100. package/dist/i18n/catalogs/fr.js +29 -0
  101. package/dist/i18n/catalogs/index.d.ts +8 -0
  102. package/dist/i18n/catalogs/index.js +83 -0
  103. package/dist/i18n/i18n.test.d.ts +1 -0
  104. package/dist/i18n/index.d.ts +22 -0
  105. package/dist/i18n/index.js +83 -0
  106. package/dist/i18n/keys.d.ts +116 -0
  107. package/dist/i18n/keys.js +2 -0
  108. package/dist/i18n/locale.d.ts +8 -0
  109. package/dist/i18n/locale.js +2 -0
  110. package/dist/i18n/messages.d.ts +14 -0
  111. package/dist/i18n/messages.js +83 -0
  112. package/dist/index.d.ts +7 -0
  113. package/dist/index.js +83 -0
  114. package/dist/node/compositions/api-overview.js +1 -0
  115. package/dist/node/compositions/index.js +1 -0
  116. package/dist/node/compositions/primitives/animated-text.js +1 -0
  117. package/dist/node/compositions/primitives/brand-frame.js +1 -0
  118. package/dist/node/compositions/primitives/code-block.js +1 -0
  119. package/dist/node/compositions/primitives/index.js +1 -0
  120. package/dist/node/compositions/primitives/progress-bar.js +1 -0
  121. package/dist/node/compositions/primitives/terminal.js +1 -0
  122. package/dist/node/compositions/primitives/transition.js +1 -0
  123. package/dist/node/compositions/social-clip.js +1 -0
  124. package/dist/node/compositions/terminal-demo.js +1 -0
  125. package/dist/node/design/index.js +1 -0
  126. package/dist/node/design/layouts.js +1 -0
  127. package/dist/node/design/motion.js +1 -0
  128. package/dist/node/design/tokens.js +1 -0
  129. package/dist/node/design/typography.js +1 -0
  130. package/dist/node/docs/compositions.docblock.js +1 -0
  131. package/dist/node/docs/design.docblock.js +172 -0
  132. package/dist/node/docs/generators.docblock.js +165 -0
  133. package/dist/node/docs/rendering.docblock.js +175 -0
  134. package/dist/node/docs/video-gen.docblock.js +126 -0
  135. package/dist/node/generators/index.js +82 -0
  136. package/dist/node/generators/scene-planner.js +82 -0
  137. package/dist/node/generators/script-generator.js +82 -0
  138. package/dist/node/generators/video-generator.js +82 -0
  139. package/dist/node/i18n/catalogs/en.js +28 -0
  140. package/dist/node/i18n/catalogs/es.js +28 -0
  141. package/dist/node/i18n/catalogs/fr.js +28 -0
  142. package/dist/node/i18n/catalogs/index.js +82 -0
  143. package/dist/node/i18n/index.js +82 -0
  144. package/dist/node/i18n/keys.js +1 -0
  145. package/dist/node/i18n/locale.js +1 -0
  146. package/dist/node/i18n/messages.js +82 -0
  147. package/dist/node/index.js +82 -0
  148. package/dist/node/player/demo-player.js +1 -0
  149. package/dist/node/player/index.js +1 -0
  150. package/dist/node/remotion/Root.js +19 -0
  151. package/dist/node/remotion/index.js +19 -0
  152. package/dist/node/renderers/config.js +1 -0
  153. package/dist/node/renderers/index.js +1 -0
  154. package/dist/node/renderers/local.js +1 -0
  155. package/dist/node/types.js +1 -0
  156. package/dist/node/video-gen.feature.js +1 -0
  157. package/dist/player/demo-player.d.ts +55 -0
  158. package/dist/player/demo-player.js +2 -0
  159. package/dist/player/index.d.ts +2 -0
  160. package/dist/player/index.js +2 -0
  161. package/dist/remotion/Root.d.ts +2 -0
  162. package/dist/remotion/Root.js +20 -0
  163. package/dist/remotion/index.d.ts +1 -0
  164. package/dist/remotion/index.js +20 -0
  165. package/dist/renderers/config.d.ts +28 -0
  166. package/dist/renderers/config.js +2 -0
  167. package/dist/renderers/index.d.ts +3 -0
  168. package/dist/renderers/index.js +2 -0
  169. package/dist/renderers/local.d.ts +17 -0
  170. package/dist/renderers/local.js +2 -0
  171. package/dist/types.d.ts +85 -0
  172. package/dist/types.js +2 -0
  173. package/dist/video-gen.feature.d.ts +1 -0
  174. package/dist/video-gen.feature.js +2 -0
  175. package/package.json +675 -0
@@ -0,0 +1,83 @@
1
+ // @bun
2
+ var _=import.meta.require;import{defineTranslation as d}from"@contractspec/lib.contracts-spec/translations";var e=d({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
3
+ Write a narration script for a short video (30-60 seconds).
4
+ {styleGuide}
5
+
6
+ Return JSON with shape:
7
+ {
8
+ "segments": [{ "sceneId": string, "text": string }],
9
+ "fullText": string
10
+ }
11
+
12
+ Scene IDs should be: "intro", "problems", "solutions", "metrics", "cta".
13
+ Only include segments that are relevant to the brief content.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`You are a video scene planner for ContractSpec marketing/documentation videos.
14
+ Given a content brief, break it into video scenes.
15
+
16
+ Each scene must have:
17
+ - compositionId: one of "ApiOverview", "SocialClip", "TerminalDemo"
18
+ - props: the input props for that composition (see type definitions)
19
+ - durationInFrames: duration at {fps}fps
20
+ - narrationText: what the narrator says during this scene
21
+
22
+ Return a JSON object with shape:
23
+ {
24
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
25
+ "narrationScript": string
26
+ }
27
+
28
+ Keep the total duration around {targetSeconds} seconds.
29
+ Prioritize clarity and pacing. Each scene should communicate one idea.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Use a clear, authoritative, professional tone. Be concise and direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Use a friendly, conversational tone. Be approachable and relatable.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Use precise technical language. Be detailed and accurate.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"The challenge: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"The solution: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"The results: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"Learn more",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"The Problem",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"The problem: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"The Solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"The solution: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Results",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Generates:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"One spec. Every surface.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"REST Endpoint",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"GraphQL Mutation",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Prisma Model",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"TypeScript SDK",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"MCP Tool",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"OpenAPI Spec",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"Learn more",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{defineTranslation as u}from"@contractspec/lib.contracts-spec/translations";var o=u({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"Spanish translations for the video-gen package",owners:["platform"],stability:"experimental"},locale:"es",fallback:"en",messages:{"prompt.script.system":{value:`Eres un redactor de guiones de narraci\xF3n para v\xEDdeo.
30
+ Escribe un gui\xF3n de narraci\xF3n para un v\xEDdeo corto (30-60 segundos).
31
+ {styleGuide}
32
+
33
+ Devuelve JSON con la forma:
34
+ {
35
+ "segments": [{ "sceneId": string, "text": string }],
36
+ "fullText": string
37
+ }
38
+
39
+ Los identificadores de escena deben ser: "intro", "problems", "solutions", "metrics", "cta".
40
+ Incluye solo los segmentos relevantes para el brief.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`Eres un planificador de escenas de v\xEDdeo para v\xEDdeos de marketing/documentaci\xF3n de ContractSpec.
41
+ Dado un brief de contenido, div\xEDdelo en escenas de v\xEDdeo.
42
+
43
+ Cada escena debe tener:
44
+ - compositionId: uno de "ApiOverview", "SocialClip", "TerminalDemo"
45
+ - props: las propiedades de entrada de esa composici\xF3n
46
+ - durationInFrames: duraci\xF3n a {fps} fps
47
+ - narrationText: lo que dice el narrador durante esta escena
48
+
49
+ Devuelve un objeto JSON con la forma:
50
+ {
51
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
52
+ "narrationScript": string
53
+ }
54
+
55
+ Mant\xE9n la duraci\xF3n total alrededor de {targetSeconds} segundos.
56
+ Prioriza la claridad y el ritmo. Cada escena debe comunicar una idea.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Usa un tono claro, autoritario y profesional. S\xE9 conciso y directo.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Usa un tono amigable y conversacional. S\xE9 accesible y cercano.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Usa un lenguaje t\xE9cnico preciso. S\xE9 detallado y exacto.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"El desaf\xEDo: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La soluci\xF3n: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Los resultados: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"M\xE1s informaci\xF3n",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"El problema",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"El problema: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La soluci\xF3n",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La soluci\xF3n: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Resultados",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Genera:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Una spec. Todas las superficies.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutaci\xF3n GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modelo Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Herramienta MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"M\xE1s informaci\xF3n",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{defineTranslation as f}from"@contractspec/lib.contracts-spec/translations";var m=f({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"French translations for the video-gen package",owners:["platform"],stability:"experimental"},locale:"fr",fallback:"en",messages:{"prompt.script.system":{value:`Vous \xEAtes un r\xE9dacteur de scripts de narration vid\xE9o.
57
+ \xC9crivez un script de narration pour une courte vid\xE9o (30-60 secondes).
58
+ {styleGuide}
59
+
60
+ Retournez du JSON avec la forme\xA0:
61
+ {
62
+ "segments": [{ "sceneId": string, "text": string }],
63
+ "fullText": string
64
+ }
65
+
66
+ Les identifiants de sc\xE8ne doivent \xEAtre\xA0: "intro", "problems", "solutions", "metrics", "cta".
67
+ N'incluez que les segments pertinents au brief.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`Vous \xEAtes un planificateur de sc\xE8nes vid\xE9o pour les vid\xE9os marketing/documentation de ContractSpec.
68
+ \xC0 partir d'un brief, d\xE9composez-le en sc\xE8nes vid\xE9o.
69
+
70
+ Chaque sc\xE8ne doit avoir\xA0:
71
+ - compositionId\xA0: un parmi "ApiOverview", "SocialClip", "TerminalDemo"
72
+ - props\xA0: les propri\xE9t\xE9s d'entr\xE9e de cette composition
73
+ - durationInFrames\xA0: dur\xE9e \xE0 {fps}\xA0fps
74
+ - narrationText\xA0: ce que le narrateur dit pendant cette sc\xE8ne
75
+
76
+ Retournez un objet JSON avec la forme\xA0:
77
+ {
78
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
79
+ "narrationScript": string
80
+ }
81
+
82
+ Gardez la dur\xE9e totale autour de {targetSeconds} secondes.
83
+ Privil\xE9giez la clart\xE9 et le rythme. Chaque sc\xE8ne doit communiquer une id\xE9e.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique pr\xE9cis. Soyez d\xE9taill\xE9 et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le d\xE9fi\xA0: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution\xA0: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les r\xE9sultats\xA0: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le probl\xE8me",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le probl\xE8me\xA0: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution\xA0: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"R\xE9sultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"G\xE9n\xE8re\xA0:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Mod\xE8le Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var r={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},x={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},L={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},I={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},E={...r,...x,...L,...I};import{DEFAULT_LOCALE as G,isSupportedLocale as S,resolveLocale as V,SUPPORTED_LOCALES as g}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as A}from"@contractspec/lib.contracts-spec/translations";var p=A({specKey:"video-gen.messages",catalogs:[e,m,o]}),C=p.create,D=p.getDefault,O=p.resetRegistry;export{V as resolveLocale,O as resetI18nRegistry,S as isSupportedLocale,D as getDefaultI18n,m as frMessages,o as esMessages,e as enMessages,C as createVideoGenI18n,g as SUPPORTED_LOCALES,x as SCRIPT_KEYS,L as SCENE_KEYS,r as PROMPT_KEYS,E as I18N_KEYS,G as DEFAULT_LOCALE,I as COMPOSITION_KEYS};
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Typed message keys for the video-gen i18n system.
3
+ *
4
+ * All translatable strings in the package are referenced by these keys.
5
+ * Organized by domain: prompt, script, scene, composition.
6
+ *
7
+ * @module i18n/keys
8
+ */
9
+ export declare const PROMPT_KEYS: {
10
+ /** Script generator system prompt */
11
+ readonly 'prompt.script.system': "prompt.script.system";
12
+ /** Scene planner system prompt */
13
+ readonly 'prompt.scenePlanner.system': "prompt.scenePlanner.system";
14
+ /** Style guide: professional */
15
+ readonly 'prompt.style.professional': "prompt.style.professional";
16
+ /** Style guide: casual */
17
+ readonly 'prompt.style.casual': "prompt.style.casual";
18
+ /** Style guide: technical */
19
+ readonly 'prompt.style.technical': "prompt.style.technical";
20
+ };
21
+ export declare const SCRIPT_KEYS: {
22
+ /** "The challenge: " prefix for problem narration */
23
+ readonly 'script.segment.challenge': "script.segment.challenge";
24
+ /** "The solution: " prefix for solution narration */
25
+ readonly 'script.segment.solution': "script.segment.solution";
26
+ /** "The results: " prefix for metrics narration */
27
+ readonly 'script.segment.results': "script.segment.results";
28
+ };
29
+ export declare const SCENE_KEYS: {
30
+ /** "Learn more" -- default CTA */
31
+ readonly 'scene.cta.default': "scene.cta.default";
32
+ /** "The Problem" -- scene hook label */
33
+ readonly 'scene.hook.problem': "scene.hook.problem";
34
+ /** "The problem: " -- scene narration prefix */
35
+ readonly 'scene.narration.problem': "scene.narration.problem";
36
+ /** "The Solution" -- scene hook label */
37
+ readonly 'scene.hook.solution': "scene.hook.solution";
38
+ /** "The solution: " -- scene narration prefix */
39
+ readonly 'scene.narration.solution': "scene.narration.solution";
40
+ /** "Results" -- scene hook label */
41
+ readonly 'scene.hook.results': "scene.hook.results";
42
+ };
43
+ export declare const COMPOSITION_KEYS: {
44
+ /** "Generates:" -- ApiOverview heading */
45
+ readonly 'composition.apiOverview.generates': "composition.apiOverview.generates";
46
+ /** "One spec. Every surface." -- ApiOverview tagline */
47
+ readonly 'composition.apiOverview.tagline': "composition.apiOverview.tagline";
48
+ /** "REST Endpoint" */
49
+ readonly 'composition.apiOverview.output.rest': "composition.apiOverview.output.rest";
50
+ /** "GraphQL Mutation" */
51
+ readonly 'composition.apiOverview.output.graphql': "composition.apiOverview.output.graphql";
52
+ /** "Prisma Model" */
53
+ readonly 'composition.apiOverview.output.prisma': "composition.apiOverview.output.prisma";
54
+ /** "TypeScript SDK" */
55
+ readonly 'composition.apiOverview.output.typescript': "composition.apiOverview.output.typescript";
56
+ /** "MCP Tool" */
57
+ readonly 'composition.apiOverview.output.mcp': "composition.apiOverview.output.mcp";
58
+ /** "OpenAPI Spec" */
59
+ readonly 'composition.apiOverview.output.openapi': "composition.apiOverview.output.openapi";
60
+ /** "Learn more" -- SocialClip default CTA */
61
+ readonly 'composition.socialClip.cta': "composition.socialClip.cta";
62
+ /** "Terminal" -- TerminalDemo default window title */
63
+ readonly 'composition.terminal.title': "composition.terminal.title";
64
+ };
65
+ export declare const I18N_KEYS: {
66
+ /** "Generates:" -- ApiOverview heading */
67
+ readonly 'composition.apiOverview.generates': "composition.apiOverview.generates";
68
+ /** "One spec. Every surface." -- ApiOverview tagline */
69
+ readonly 'composition.apiOverview.tagline': "composition.apiOverview.tagline";
70
+ /** "REST Endpoint" */
71
+ readonly 'composition.apiOverview.output.rest': "composition.apiOverview.output.rest";
72
+ /** "GraphQL Mutation" */
73
+ readonly 'composition.apiOverview.output.graphql': "composition.apiOverview.output.graphql";
74
+ /** "Prisma Model" */
75
+ readonly 'composition.apiOverview.output.prisma': "composition.apiOverview.output.prisma";
76
+ /** "TypeScript SDK" */
77
+ readonly 'composition.apiOverview.output.typescript': "composition.apiOverview.output.typescript";
78
+ /** "MCP Tool" */
79
+ readonly 'composition.apiOverview.output.mcp': "composition.apiOverview.output.mcp";
80
+ /** "OpenAPI Spec" */
81
+ readonly 'composition.apiOverview.output.openapi': "composition.apiOverview.output.openapi";
82
+ /** "Learn more" -- SocialClip default CTA */
83
+ readonly 'composition.socialClip.cta': "composition.socialClip.cta";
84
+ /** "Terminal" -- TerminalDemo default window title */
85
+ readonly 'composition.terminal.title': "composition.terminal.title";
86
+ /** "Learn more" -- default CTA */
87
+ readonly 'scene.cta.default': "scene.cta.default";
88
+ /** "The Problem" -- scene hook label */
89
+ readonly 'scene.hook.problem': "scene.hook.problem";
90
+ /** "The problem: " -- scene narration prefix */
91
+ readonly 'scene.narration.problem': "scene.narration.problem";
92
+ /** "The Solution" -- scene hook label */
93
+ readonly 'scene.hook.solution': "scene.hook.solution";
94
+ /** "The solution: " -- scene narration prefix */
95
+ readonly 'scene.narration.solution': "scene.narration.solution";
96
+ /** "Results" -- scene hook label */
97
+ readonly 'scene.hook.results': "scene.hook.results";
98
+ /** "The challenge: " prefix for problem narration */
99
+ readonly 'script.segment.challenge': "script.segment.challenge";
100
+ /** "The solution: " prefix for solution narration */
101
+ readonly 'script.segment.solution': "script.segment.solution";
102
+ /** "The results: " prefix for metrics narration */
103
+ readonly 'script.segment.results': "script.segment.results";
104
+ /** Script generator system prompt */
105
+ readonly 'prompt.script.system': "prompt.script.system";
106
+ /** Scene planner system prompt */
107
+ readonly 'prompt.scenePlanner.system': "prompt.scenePlanner.system";
108
+ /** Style guide: professional */
109
+ readonly 'prompt.style.professional': "prompt.style.professional";
110
+ /** Style guide: casual */
111
+ readonly 'prompt.style.casual': "prompt.style.casual";
112
+ /** Style guide: technical */
113
+ readonly 'prompt.style.technical': "prompt.style.technical";
114
+ };
115
+ /** Union type of all valid video-gen i18n keys */
116
+ export type VideoGenMessageKey = keyof typeof I18N_KEYS;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var m=import.meta.require;var b={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},c={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},h={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},j={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},r={...b,...c,...h,...j};export{c as SCRIPT_KEYS,h as SCENE_KEYS,b as PROMPT_KEYS,r as I18N_KEYS,j as COMPOSITION_KEYS};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Locale utilities for the video-gen package.
3
+ *
4
+ * Re-exported from the shared i18n factory in contracts-spec.
5
+ *
6
+ * @module i18n/locale
7
+ */
8
+ export { DEFAULT_LOCALE, isSupportedLocale, resolveLocale, SUPPORTED_LOCALES, type SupportedLocale, } from '@contractspec/lib.contracts-spec/translations';
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ var d=import.meta.require;import{DEFAULT_LOCALE as j,isSupportedLocale as k,resolveLocale as m,SUPPORTED_LOCALES as q}from"@contractspec/lib.contracts-spec/translations";export{m as resolveLocale,k as isSupportedLocale,q as SUPPORTED_LOCALES,j as DEFAULT_LOCALE};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Translation helper for the video-gen package.
3
+ * @module i18n/messages
4
+ */
5
+ import { type I18nInstance } from '@contractspec/lib.contracts-spec/translations';
6
+ import type { VideoGenMessageKey } from './keys';
7
+ /** I18n instance type for the video-gen package. */
8
+ export type VideoGenI18n = I18nInstance<VideoGenMessageKey>;
9
+ /** Create an i18n instance for a given locale. */
10
+ export declare const createVideoGenI18n: (optionsLocale?: string, runtimeLocale?: string) => I18nInstance<"prompt.script.system" | "prompt.scenePlanner.system" | "prompt.style.professional" | "prompt.style.casual" | "prompt.style.technical" | "script.segment.challenge" | "script.segment.solution" | "script.segment.results" | "scene.cta.default" | "scene.hook.problem" | "scene.narration.problem" | "scene.hook.solution" | "scene.narration.solution" | "scene.hook.results" | "composition.apiOverview.generates" | "composition.apiOverview.tagline" | "composition.apiOverview.output.rest" | "composition.apiOverview.output.graphql" | "composition.apiOverview.output.prisma" | "composition.apiOverview.output.typescript" | "composition.apiOverview.output.mcp" | "composition.apiOverview.output.openapi" | "composition.socialClip.cta" | "composition.terminal.title">;
11
+ /** Create a default (English) i18n instance. */
12
+ export declare const getDefaultI18n: () => I18nInstance<"prompt.script.system" | "prompt.scenePlanner.system" | "prompt.style.professional" | "prompt.style.casual" | "prompt.style.technical" | "script.segment.challenge" | "script.segment.solution" | "script.segment.results" | "scene.cta.default" | "scene.hook.problem" | "scene.narration.problem" | "scene.hook.solution" | "scene.narration.solution" | "scene.hook.results" | "composition.apiOverview.generates" | "composition.apiOverview.tagline" | "composition.apiOverview.output.rest" | "composition.apiOverview.output.graphql" | "composition.apiOverview.output.prisma" | "composition.apiOverview.output.typescript" | "composition.apiOverview.output.mcp" | "composition.apiOverview.output.openapi" | "composition.socialClip.cta" | "composition.terminal.title">;
13
+ /** Reset the shared registry (useful for testing). @internal */
14
+ export declare const resetI18nRegistry: () => void;
@@ -0,0 +1,83 @@
1
+ // @bun
2
+ var x=import.meta.require;import{defineTranslation as q}from"@contractspec/lib.contracts-spec/translations";var j=q({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
3
+ Write a narration script for a short video (30-60 seconds).
4
+ {styleGuide}
5
+
6
+ Return JSON with shape:
7
+ {
8
+ "segments": [{ "sceneId": string, "text": string }],
9
+ "fullText": string
10
+ }
11
+
12
+ Scene IDs should be: "intro", "problems", "solutions", "metrics", "cta".
13
+ Only include segments that are relevant to the brief content.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`You are a video scene planner for ContractSpec marketing/documentation videos.
14
+ Given a content brief, break it into video scenes.
15
+
16
+ Each scene must have:
17
+ - compositionId: one of "ApiOverview", "SocialClip", "TerminalDemo"
18
+ - props: the input props for that composition (see type definitions)
19
+ - durationInFrames: duration at {fps}fps
20
+ - narrationText: what the narrator says during this scene
21
+
22
+ Return a JSON object with shape:
23
+ {
24
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
25
+ "narrationScript": string
26
+ }
27
+
28
+ Keep the total duration around {targetSeconds} seconds.
29
+ Prioritize clarity and pacing. Each scene should communicate one idea.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Use a clear, authoritative, professional tone. Be concise and direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Use a friendly, conversational tone. Be approachable and relatable.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Use precise technical language. Be detailed and accurate.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"The challenge: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"The solution: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"The results: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"Learn more",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"The Problem",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"The problem: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"The Solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"The solution: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Results",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Generates:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"One spec. Every surface.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"REST Endpoint",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"GraphQL Mutation",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Prisma Model",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"TypeScript SDK",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"MCP Tool",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"OpenAPI Spec",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"Learn more",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{defineTranslation as u}from"@contractspec/lib.contracts-spec/translations";var k=u({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"Spanish translations for the video-gen package",owners:["platform"],stability:"experimental"},locale:"es",fallback:"en",messages:{"prompt.script.system":{value:`Eres un redactor de guiones de narraci\xF3n para v\xEDdeo.
30
+ Escribe un gui\xF3n de narraci\xF3n para un v\xEDdeo corto (30-60 segundos).
31
+ {styleGuide}
32
+
33
+ Devuelve JSON con la forma:
34
+ {
35
+ "segments": [{ "sceneId": string, "text": string }],
36
+ "fullText": string
37
+ }
38
+
39
+ Los identificadores de escena deben ser: "intro", "problems", "solutions", "metrics", "cta".
40
+ Incluye solo los segmentos relevantes para el brief.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`Eres un planificador de escenas de v\xEDdeo para v\xEDdeos de marketing/documentaci\xF3n de ContractSpec.
41
+ Dado un brief de contenido, div\xEDdelo en escenas de v\xEDdeo.
42
+
43
+ Cada escena debe tener:
44
+ - compositionId: uno de "ApiOverview", "SocialClip", "TerminalDemo"
45
+ - props: las propiedades de entrada de esa composici\xF3n
46
+ - durationInFrames: duraci\xF3n a {fps} fps
47
+ - narrationText: lo que dice el narrador durante esta escena
48
+
49
+ Devuelve un objeto JSON con la forma:
50
+ {
51
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
52
+ "narrationScript": string
53
+ }
54
+
55
+ Mant\xE9n la duraci\xF3n total alrededor de {targetSeconds} segundos.
56
+ Prioriza la claridad y el ritmo. Cada escena debe comunicar una idea.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Usa un tono claro, autoritario y profesional. S\xE9 conciso y directo.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Usa un tono amigable y conversacional. S\xE9 accesible y cercano.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Usa un lenguaje t\xE9cnico preciso. S\xE9 detallado y exacto.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"El desaf\xEDo: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La soluci\xF3n: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Los resultados: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"M\xE1s informaci\xF3n",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"El problema",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"El problema: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La soluci\xF3n",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La soluci\xF3n: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Resultados",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Genera:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Una spec. Todas las superficies.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutaci\xF3n GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modelo Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Herramienta MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"M\xE1s informaci\xF3n",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{defineTranslation as v}from"@contractspec/lib.contracts-spec/translations";var m=v({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"French translations for the video-gen package",owners:["platform"],stability:"experimental"},locale:"fr",fallback:"en",messages:{"prompt.script.system":{value:`Vous \xEAtes un r\xE9dacteur de scripts de narration vid\xE9o.
57
+ \xC9crivez un script de narration pour une courte vid\xE9o (30-60 secondes).
58
+ {styleGuide}
59
+
60
+ Retournez du JSON avec la forme\xA0:
61
+ {
62
+ "segments": [{ "sceneId": string, "text": string }],
63
+ "fullText": string
64
+ }
65
+
66
+ Les identifiants de sc\xE8ne doivent \xEAtre\xA0: "intro", "problems", "solutions", "metrics", "cta".
67
+ N'incluez que les segments pertinents au brief.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`Vous \xEAtes un planificateur de sc\xE8nes vid\xE9o pour les vid\xE9os marketing/documentation de ContractSpec.
68
+ \xC0 partir d'un brief, d\xE9composez-le en sc\xE8nes vid\xE9o.
69
+
70
+ Chaque sc\xE8ne doit avoir\xA0:
71
+ - compositionId\xA0: un parmi "ApiOverview", "SocialClip", "TerminalDemo"
72
+ - props\xA0: les propri\xE9t\xE9s d'entr\xE9e de cette composition
73
+ - durationInFrames\xA0: dur\xE9e \xE0 {fps}\xA0fps
74
+ - narrationText\xA0: ce que le narrateur dit pendant cette sc\xE8ne
75
+
76
+ Retournez un objet JSON avec la forme\xA0:
77
+ {
78
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
79
+ "narrationScript": string
80
+ }
81
+
82
+ Gardez la dur\xE9e totale autour de {targetSeconds} secondes.
83
+ Privil\xE9giez la clart\xE9 et le rythme. Chaque sc\xE8ne doit communiquer une id\xE9e.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique pr\xE9cis. Soyez d\xE9taill\xE9 et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le d\xE9fi\xA0: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution\xA0: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les r\xE9sultats\xA0: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le probl\xE8me",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le probl\xE8me\xA0: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution\xA0: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"R\xE9sultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"G\xE9n\xE8re\xA0:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Mod\xE8le Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{createI18nFactory as w}from"@contractspec/lib.contracts-spec/translations";var h=w({specKey:"video-gen.messages",catalogs:[j,m,k]}),N=h.create,O=h.getDefault,P=h.resetRegistry;export{P as resetI18nRegistry,O as getDefaultI18n,N as createVideoGenI18n};
@@ -0,0 +1,7 @@
1
+ export * from './compositions';
2
+ export * from './design';
3
+ export * from './generators';
4
+ export type { QualityPreset } from './renderers/config';
5
+ export { codecFormatMap, defaultRenderConfig, qualityPresets, resolveRenderConfig, } from './renderers/config';
6
+ export * from './types';
7
+ export * from './video-gen.feature';
package/dist/index.js ADDED
@@ -0,0 +1,83 @@
1
+ // @bun
2
+ var B1=import.meta.require;import{Easing as w}from"remotion";var R={entrance:w.out(w.exp),exit:w.in(w.exp),emphasis:w.out(w.back(1.4)),linear:w.linear,gentle:w.bezier(0.25,0.1,0.25,1),spring:w.out(w.back(1.7))},V={sceneTransition:20,textEntrance:15,textExit:12,codeTypingPerChar:2,sectionPause:30,emphasisPause:15,brandReveal:25,minScene:60,shortScene:60,mediumScene:120,longScene:240},q1={fade:{type:"fade",durationInFrames:20},slideLeft:{type:"slide-left",durationInFrames:20},slideRight:{type:"slide-right",durationInFrames:20},wipe:{type:"wipe",durationInFrames:15},none:{type:"none",durationInFrames:0}};import{defaultTokens as b}from"@contractspec/lib.design-system";var y={canvasBackground:b.colors.background,codeBackground:"#1e1e2e",terminalBackground:"#0d1117",terminalForeground:"#c9d1d9",highlight:b.colors.accent,gradientStart:b.colors.primary,gradientEnd:b.colors.accent},P={...b,video:y};var C={title:{fontSize:72,lineHeight:1.1,fontWeight:700,letterSpacing:-1},heading:{fontSize:56,lineHeight:1.2,fontWeight:600,letterSpacing:-0.5},subheading:{fontSize:40,lineHeight:1.25,fontWeight:500},body:{fontSize:32,lineHeight:1.5,fontWeight:400},code:{fontSize:28,lineHeight:1.6,fontWeight:400},caption:{fontSize:24,lineHeight:1.4,fontWeight:400},label:{fontSize:20,lineHeight:1.3,fontWeight:600,letterSpacing:1}};function v(G,K){let L=K/1920;return{...G,fontSize:Math.round(G.fontSize*L),letterSpacing:G.letterSpacing?Math.round(G.letterSpacing*L*10)/10:void 0}}import{interpolate as A,useCurrentFrame as P8,useVideoConfig as O8}from"remotion";import{jsx as k8}from"react/jsx-runtime";var I=({text:G,variant:K="body",style:L,enterAt:z=0,exitAt:H,color:Q="#ffffff",align:$="left"})=>{let W=P8(),{width:U}=O8(),M=C[K],X={...v(M,U),...L},N=A(W,[z,z+V.textEntrance],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),B=A(N,[0,1],[0,1],{easing:R.entrance}),Y=A(N,[0,1],[30,0],{easing:R.entrance}),Z=1,k=0;if(H!==void 0){let o=A(W,[H,H+V.textExit],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});Z=A(o,[0,1],[1,0],{easing:R.exit}),k=A(o,[0,1],[0,-20],{easing:R.exit})}let E=B*Z,c=Y+k;return k8("div",{style:{fontSize:X.fontSize,lineHeight:X.lineHeight,fontWeight:X.fontWeight,letterSpacing:X.letterSpacing,color:Q,textAlign:$,opacity:E,transform:`translateY(${c}px)`,willChange:"opacity, transform"},children:G})};import{VIDEO_FORMATS as r}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var j=30,f={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function J8(G){let K=G.width/1920,L=G.height/1080;return{horizontal:Math.round(f.horizontal*K),vertical:Math.round(f.vertical*L),contentWidth:Math.round(f.contentWidth*K),contentHeight:Math.round(f.contentHeight*L)}}var C1={center:{x:960,y:540},topLeft:{x:120,y:80},topRight:{x:1800,y:80},bottomLeft:{x:120,y:1000},bottomRight:{x:1800,y:1000},bottomCenter:{x:960,y:960}};function v1(){return[r.landscape,r.square,r.portrait]}import{interpolate as Q8,useCurrentFrame as E8,useVideoConfig as S8}from"remotion";import{jsx as a,jsxs as T8}from"react/jsx-runtime";var S=({styleOverrides:G,showBranding:K=!0,animateEntrance:L=!0,variant:z="gradient",children:H})=>{let Q=E8(),{width:$,height:W}=S8(),U=P,M=J8({type:"custom",width:$,height:W}),J=G?.primaryColor??U.colors.primary,X=G?.accentColor??U.colors.accent,N=G?.darkMode??!0,B;switch(z){case"solid":B=N?"#0a0a0a":U.colors.background;break;case"gradient":B=N?"linear-gradient(135deg, #0a0a14 0%, #0f172a 50%, #0a0a14 100%)":`linear-gradient(135deg, ${U.colors.background} 0%, ${U.colors.muted} 100%)`;break;case"dark":B="#000000";break}let Y=L?Q8(Q,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}):1,Z=K?Q8(Q,[V.brandReveal,V.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return T8("div",{style:{width:$,height:W,background:B,position:"relative",overflow:"hidden",opacity:Y},children:[z==="gradient"&&a("div",{style:{position:"absolute",top:"-20%",right:"-10%",width:"50%",height:"50%",background:`radial-gradient(circle, ${J}15 0%, transparent 70%)`,borderRadius:"50%",pointerEvents:"none"}}),a("div",{style:{position:"absolute",left:M.horizontal,top:M.vertical,width:M.contentWidth,height:M.contentHeight,display:"flex",flexDirection:"column"},children:H}),K&&a("div",{style:{position:"absolute",bottom:M.vertical/2,right:M.horizontal,opacity:Z,color:N?"#ffffff":"#000000",fontSize:Math.round(16*($/1920)),fontWeight:500,letterSpacing:1},children:"ContractSpec"})]})};import{interpolate as $8,useCurrentFrame as C8,useVideoConfig as v8}from"remotion";import{jsx as F,jsxs as p}from"react/jsx-runtime";var n=({code:G,language:K="typescript",startAt:L=0,typeAnimation:z=!0,backgroundColor:H=y.codeBackground,textColor:Q="#abb2bf",filename:$})=>{let W=C8(),{width:U}=v8(),M=v(C.code,U),J=G.length,X=J*V.codeTypingPerChar,N=z?Math.floor($8(W,[L,L+X],[0,J],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):J,B=G.slice(0,N),Y=$8(W,[L,L+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),Z=z&&N<J&&W%16<10;return p("div",{style:{backgroundColor:H,borderRadius:16,padding:0,opacity:Y,overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[p("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(0,0,0,0.2)",gap:8},children:[p("div",{style:{display:"flex",gap:8},children:[F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),F("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),F("div",{style:{flex:1,textAlign:"center",color:"#666",fontSize:M.fontSize*0.7,fontFamily:"monospace"},children:$??K})]}),F("div",{style:{padding:"24px 32px"},children:p("pre",{style:{margin:0,fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:M.fontSize,lineHeight:M.lineHeight,color:Q,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[B,Z&&F("span",{style:{backgroundColor:Q,width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]})})]})};import{useCurrentFrame as A8,useVideoConfig as F8}from"remotion";import{jsx as W8}from"react/jsx-runtime";var T=({height:G=4,color:K=P.colors.primary,backgroundColor:L="rgba(255,255,255,0.1)",position:z="bottom"})=>{let H=A8(),{durationInFrames:Q,width:$}=F8(),W=H/Q;return W8("div",{style:{position:"absolute",[z]:0,left:0,width:$,height:G,backgroundColor:L,zIndex:100},children:W8("div",{style:{width:`${W*100}%`,height:"100%",backgroundColor:K,transition:"none"}})})};import{AbsoluteFill as b8,interpolate as x,Sequence as i,useCurrentFrame as X8,useVideoConfig as y8}from"remotion";import{jsx as _,jsxs as h}from"react/jsx-runtime";var h8=({specName:G,method:K="POST",endpoint:L="/api/users",specCode:z,generatedOutputs:H=["REST Endpoint","GraphQL Mutation","Prisma Model","TypeScript SDK","MCP Tool","OpenAPI Spec"],tagline:Q="One spec. Every surface."})=>{let{durationInFrames:$}=y8(),W=P,U=60,M=45,J=210,X=180,N=$-90;return h(b8,{children:[h(S,{variant:"gradient",showBranding:!0,children:[_(i,{from:0,durationInFrames:210,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:16},children:[h("div",{style:{display:"flex",alignItems:"center",gap:16},children:[_(x8,{method:K,enterAt:10}),_(I,{text:L,variant:"subheading",enterAt:15,color:W.colors.mutedForeground})]}),_(I,{text:G,variant:"title",enterAt:5,color:"#ffffff"}),_("div",{style:{flex:1,marginTop:24},children:_(n,{code:z,language:"typescript",filename:`${G.toLowerCase()}.contract.ts`,startAt:45,typeAnimation:!0})})]})}),_(i,{from:180,durationInFrames:$-180,children:h("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:24},children:[_(I,{text:"Generates:",variant:"heading",enterAt:0,color:"#ffffff",align:"center"}),_("div",{style:{display:"flex",flexWrap:"wrap",gap:16,justifyContent:"center",maxWidth:"80%",marginTop:32},children:H.map((B,Y)=>_(f8,{label:B,index:Y,startFrame:20+Y*8},B))}),_(i,{from:N-180,children:_("div",{style:{marginTop:48},children:_(I,{text:Q,variant:"heading",enterAt:0,color:W.colors.accent,align:"center"})})})]})})]}),_(T,{})]})},x8=({method:G,enterAt:K})=>{let L=X8(),z=x(L,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance}),H=x(L,[K,K+12],[0.8,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q={GET:"#61afef",POST:"#98c379",PUT:"#e5c07b",PATCH:"#d19a66",DELETE:"#e06c75"};return _("div",{style:{opacity:z,transform:`scale(${H})`,backgroundColor:Q[G]??"#61afef",color:"#000",padding:"8px 20px",borderRadius:8,fontSize:24,fontWeight:700,fontFamily:"monospace",letterSpacing:1},children:G})},f8=({label:G,startFrame:K})=>{let L=X8(),z=x(L,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),H=x(L,[K,K+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis}),Q=x(L,[K,K+15],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return _("div",{style:{opacity:z,transform:`translateY(${H}px) scale(${Q})`,backgroundColor:"rgba(255,255,255,0.08)",border:"1px solid rgba(255,255,255,0.15)",color:"#ffffff",padding:"16px 32px",borderRadius:12,fontSize:28,fontWeight:500},children:G})};import{interpolate as s,useCurrentFrame as j8,useVideoConfig as p8}from"remotion";import{jsx as O,jsxs as g}from"react/jsx-runtime";var U8={command:"#c9d1d9",output:"#8b949e",error:"#f85149",success:"#3fb950",comment:"#6e7681"},t=({lines:G,startAt:K=0,prompt:L="$ ",title:z="Terminal",backgroundColor:H=y.terminalBackground,typingSpeed:Q=V.codeTypingPerChar})=>{let $=j8(),{width:W}=p8(),U=v(C.code,W),M=[],J=K;for(let N of G){let B=N.delay??10,Y=J+B;if(N.type==="command"){let Z=N.text.length*Q;M.push({startFrame:Y,endFrame:Y+Z}),J=Y+Z}else M.push({startFrame:Y,endFrame:Y+5}),J=Y+5}let X=s($,[K,K+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return g("div",{style:{backgroundColor:H,borderRadius:16,overflow:"hidden",opacity:X,boxShadow:"0 8px 32px rgba(0,0,0,0.3)"},children:[g("div",{style:{display:"flex",alignItems:"center",padding:"12px 20px",backgroundColor:"rgba(255,255,255,0.05)",gap:8},children:[g("div",{style:{display:"flex",gap:8},children:[O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),O("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),O("div",{style:{flex:1,textAlign:"center",color:"#484f58",fontSize:U.fontSize*0.7,fontFamily:"monospace"},children:z})]}),O("div",{style:{padding:"24px 32px",minHeight:200},children:G.map((N,B)=>{let Y=M[B];if(!Y||$<Y.startFrame)return null;let Z=N.type==="command",k=U8[N.type],E=N.text;if(Z){let V8=s($,[Y.startFrame,Y.endFrame],[0,N.text.length],{extrapolateLeft:"clamp",extrapolateRight:"clamp"});E=N.text.slice(0,Math.floor(V8))}let c=Z?1:s($,[Y.startFrame,Y.startFrame+5],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),w8=Z&&$>=Y.startFrame&&$<=Y.endFrame&&$%16<10;return g("div",{style:{fontFamily:"'SF Mono', 'Fira Code', 'JetBrains Mono', monospace",fontSize:U.fontSize,lineHeight:1.8,color:k,opacity:c,whiteSpace:"pre-wrap"},children:[Z&&O("span",{style:{color:"#3fb950"},children:L}),N.type==="comment"&&O("span",{style:{color:U8.comment},children:"# "}),E,w8&&O("span",{style:{backgroundColor:"#c9d1d9",width:"2px",display:"inline-block",height:"1.2em",verticalAlign:"text-bottom"},children:"\xA0"})]},`${B}-${N.text.slice(0,20)}`)})})]})};import{interpolate as g8,useCurrentFrame as u8}from"remotion";import{jsx as N8,Fragment as l8}from"react/jsx-runtime";var m8=({type:G,durationInFrames:K,direction:L,startAt:z=0,children:H})=>{let Q=u8();if(G==="none"||K===0)return N8(l8,{children:H});let $=g8(Q,[z,z+K],L==="in"?[0,1]:[1,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),W=d8(G,$);return N8("div",{style:W,children:H})};function d8(G,K){let L=R.entrance(K);switch(G){case"fade":return{opacity:L,width:"100%",height:"100%"};case"slide-left":return{opacity:L,transform:`translateX(${(1-L)*100}%)`,width:"100%",height:"100%"};case"slide-right":return{opacity:L,transform:`translateX(${(1-L)*-100}%)`,width:"100%",height:"100%"};case"wipe":return{clipPath:`inset(0 ${(1-L)*100}% 0 0)`,width:"100%",height:"100%"};default:return{width:"100%",height:"100%"}}}import{AbsoluteFill as c8,interpolate as m,Sequence as u,useCurrentFrame as M8,useVideoConfig as o8}from"remotion";import{jsx as q,jsxs as d}from"react/jsx-runtime";var r8=({hook:G,message:K,points:L=[],cta:z="Learn more",ctaUrl:H="contractspec.dev",accentColor:Q})=>{let{durationInFrames:$,width:W,height:U}=o8(),J=Q??P.colors.accent,X=U>W,N=75,B=60,Y=120,Z=$-90;return d(c8,{children:[q(S,{variant:"gradient",showBranding:!0,children:d("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:X?48:32,textAlign:"center",padding:X?"0 20px":0},children:[q(u,{from:0,durationInFrames:105,children:q("div",{style:{width:"100%"},children:q(I,{text:G,variant:"title",enterAt:5,exitAt:75,color:"#ffffff",align:"center"})})}),q(u,{from:60,children:q("div",{style:{width:"100%"},children:q(I,{text:K,variant:X?"subheading":"heading",enterAt:0,color:"#ffffff",align:"center"})})}),L.length>0&&q(u,{from:120,children:q("div",{style:{display:"flex",flexDirection:"column",gap:16,alignItems:X?"flex-start":"center",width:"100%",maxWidth:X?"100%":"80%",marginTop:16},children:L.map((k,E)=>q(a8,{text:k,index:E,startFrame:E*15,accent:J},k))})}),q(u,{from:Z,children:q(n8,{cta:z,url:H,accent:J})})]})}),q(T,{color:J})]})},a8=({text:G,startFrame:K,accent:L})=>{let z=M8(),H=m(z,[K,K+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[K,K+15],[-30,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.entrance});return d("div",{style:{opacity:H,transform:`translateX(${Q}px)`,display:"flex",alignItems:"center",gap:16,fontSize:28,color:"#ffffff"},children:[q("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:L,flexShrink:0}}),G]})},n8=({cta:G,url:K,accent:L})=>{let z=M8(),H=m(z,[0,15],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),Q=m(z,[0,18],[0.9,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:R.emphasis});return d("div",{style:{opacity:H,transform:`scale(${Q})`,display:"flex",flexDirection:"column",alignItems:"center",gap:12,marginTop:24},children:[q("div",{style:{backgroundColor:L,color:"#ffffff",padding:"16px 48px",borderRadius:12,fontSize:28,fontWeight:600},children:G}),q("div",{style:{color:"rgba(255,255,255,0.5)",fontSize:20},children:K})]})};import{AbsoluteFill as i8,Sequence as Y8,useVideoConfig as s8}from"remotion";import{jsx as D,jsxs as e}from"react/jsx-runtime";var t8=({title:G,subtitle:K,lines:L,terminalTitle:z="Terminal",prompt:H="$ ",summary:Q})=>{let{durationInFrames:$}=s8(),W=P,U=40,M=$-90;return e(i8,{children:[D(S,{variant:"dark",showBranding:!0,children:e("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24},children:[e("div",{children:[D(I,{text:G,variant:"heading",enterAt:5,color:"#ffffff"}),K&&D("div",{style:{marginTop:8},children:D(I,{text:K,variant:"body",enterAt:15,color:W.colors.mutedForeground})})]}),D(Y8,{from:40,children:D("div",{style:{flex:1},children:D(t,{lines:L,startAt:0,prompt:H,title:z})})}),Q&&D(Y8,{from:M,children:D("div",{style:{marginTop:"auto",paddingTop:24},children:D(I,{text:Q,variant:"subheading",enterAt:0,color:W.colors.accent,align:"center"})})})]})}),D(T,{})]})};import{defineTranslation as e8}from"@contractspec/lib.contracts-spec/translations";var G8=e8({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"All user-facing, LLM-facing, and developer-facing strings for the video-gen package",owners:["platform"],stability:"experimental"},locale:"en",fallback:"en",messages:{"prompt.script.system":{value:`You are a video narration script writer.
3
+ Write a narration script for a short video (30-60 seconds).
4
+ {styleGuide}
5
+
6
+ Return JSON with shape:
7
+ {
8
+ "segments": [{ "sceneId": string, "text": string }],
9
+ "fullText": string
10
+ }
11
+
12
+ Scene IDs should be: "intro", "problems", "solutions", "metrics", "cta".
13
+ Only include segments that are relevant to the brief content.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`You are a video scene planner for ContractSpec marketing/documentation videos.
14
+ Given a content brief, break it into video scenes.
15
+
16
+ Each scene must have:
17
+ - compositionId: one of "ApiOverview", "SocialClip", "TerminalDemo"
18
+ - props: the input props for that composition (see type definitions)
19
+ - durationInFrames: duration at {fps}fps
20
+ - narrationText: what the narrator says during this scene
21
+
22
+ Return a JSON object with shape:
23
+ {
24
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
25
+ "narrationScript": string
26
+ }
27
+
28
+ Keep the total duration around {targetSeconds} seconds.
29
+ Prioritize clarity and pacing. Each scene should communicate one idea.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Use a clear, authoritative, professional tone. Be concise and direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Use a friendly, conversational tone. Be approachable and relatable.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Use precise technical language. Be detailed and accurate.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"The challenge: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"The solution: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"The results: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"Learn more",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"The Problem",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"The problem: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"The Solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"The solution: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Results",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Generates:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"One spec. Every surface.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"REST Endpoint",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"GraphQL Mutation",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Prisma Model",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"TypeScript SDK",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"MCP Tool",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"OpenAPI Spec",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"Learn more",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{defineTranslation as G1}from"@contractspec/lib.contracts-spec/translations";var K8=G1({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"Spanish translations for the video-gen package",owners:["platform"],stability:"experimental"},locale:"es",fallback:"en",messages:{"prompt.script.system":{value:`Eres un redactor de guiones de narraci\xF3n para v\xEDdeo.
30
+ Escribe un gui\xF3n de narraci\xF3n para un v\xEDdeo corto (30-60 segundos).
31
+ {styleGuide}
32
+
33
+ Devuelve JSON con la forma:
34
+ {
35
+ "segments": [{ "sceneId": string, "text": string }],
36
+ "fullText": string
37
+ }
38
+
39
+ Los identificadores de escena deben ser: "intro", "problems", "solutions", "metrics", "cta".
40
+ Incluye solo los segmentos relevantes para el brief.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`Eres un planificador de escenas de v\xEDdeo para v\xEDdeos de marketing/documentaci\xF3n de ContractSpec.
41
+ Dado un brief de contenido, div\xEDdelo en escenas de v\xEDdeo.
42
+
43
+ Cada escena debe tener:
44
+ - compositionId: uno de "ApiOverview", "SocialClip", "TerminalDemo"
45
+ - props: las propiedades de entrada de esa composici\xF3n
46
+ - durationInFrames: duraci\xF3n a {fps} fps
47
+ - narrationText: lo que dice el narrador durante esta escena
48
+
49
+ Devuelve un objeto JSON con la forma:
50
+ {
51
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
52
+ "narrationScript": string
53
+ }
54
+
55
+ Mant\xE9n la duraci\xF3n total alrededor de {targetSeconds} segundos.
56
+ Prioriza la claridad y el ritmo. Cada escena debe comunicar una idea.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Usa un tono claro, autoritario y profesional. S\xE9 conciso y directo.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Usa un tono amigable y conversacional. S\xE9 accesible y cercano.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Usa un lenguaje t\xE9cnico preciso. S\xE9 detallado y exacto.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"El desaf\xEDo: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La soluci\xF3n: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Los resultados: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"M\xE1s informaci\xF3n",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"El problema",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"El problema: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La soluci\xF3n",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La soluci\xF3n: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"Resultados",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"Genera:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Una spec. Todas las superficies.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutaci\xF3n GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Modelo Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Herramienta MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"M\xE1s informaci\xF3n",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});import{defineTranslation as K1}from"@contractspec/lib.contracts-spec/translations";var L8=K1({meta:{key:"video-gen.messages",version:"1.0.0",domain:"video-gen",description:"French translations for the video-gen package",owners:["platform"],stability:"experimental"},locale:"fr",fallback:"en",messages:{"prompt.script.system":{value:`Vous \xEAtes un r\xE9dacteur de scripts de narration vid\xE9o.
57
+ \xC9crivez un script de narration pour une courte vid\xE9o (30-60 secondes).
58
+ {styleGuide}
59
+
60
+ Retournez du JSON avec la forme\xA0:
61
+ {
62
+ "segments": [{ "sceneId": string, "text": string }],
63
+ "fullText": string
64
+ }
65
+
66
+ Les identifiants de sc\xE8ne doivent \xEAtre\xA0: "intro", "problems", "solutions", "metrics", "cta".
67
+ N'incluez que les segments pertinents au brief.`,description:"Script generator LLM system prompt",placeholders:[{name:"styleGuide",type:"string"}]},"prompt.scenePlanner.system":{value:`Vous \xEAtes un planificateur de sc\xE8nes vid\xE9o pour les vid\xE9os marketing/documentation de ContractSpec.
68
+ \xC0 partir d'un brief, d\xE9composez-le en sc\xE8nes vid\xE9o.
69
+
70
+ Chaque sc\xE8ne doit avoir\xA0:
71
+ - compositionId\xA0: un parmi "ApiOverview", "SocialClip", "TerminalDemo"
72
+ - props\xA0: les propri\xE9t\xE9s d'entr\xE9e de cette composition
73
+ - durationInFrames\xA0: dur\xE9e \xE0 {fps}\xA0fps
74
+ - narrationText\xA0: ce que le narrateur dit pendant cette sc\xE8ne
75
+
76
+ Retournez un objet JSON avec la forme\xA0:
77
+ {
78
+ "scenes": [{ "compositionId": string, "props": object, "durationInFrames": number, "narrationText": string }],
79
+ "narrationScript": string
80
+ }
81
+
82
+ Gardez la dur\xE9e totale autour de {targetSeconds} secondes.
83
+ Privil\xE9giez la clart\xE9 et le rythme. Chaque sc\xE8ne doit communiquer une id\xE9e.`,description:"Scene planner LLM system prompt",placeholders:[{name:"fps",type:"number"},{name:"targetSeconds",type:"number"}]},"prompt.style.professional":{value:"Utilisez un ton clair, autoritaire et professionnel. Soyez concis et direct.",description:"Style guide for professional narration"},"prompt.style.casual":{value:"Utilisez un ton amical et conversationnel. Soyez accessible et proche.",description:"Style guide for casual narration"},"prompt.style.technical":{value:"Utilisez un langage technique pr\xE9cis. Soyez d\xE9taill\xE9 et exact.",description:"Style guide for technical narration"},"script.segment.challenge":{value:"Le d\xE9fi\xA0: {content}",description:"Narration segment prefix for problems",placeholders:[{name:"content",type:"string"}]},"script.segment.solution":{value:"La solution\xA0: {content}",description:"Narration segment prefix for solutions",placeholders:[{name:"content",type:"string"}]},"script.segment.results":{value:"Les r\xE9sultats\xA0: {content}",description:"Narration segment prefix for metrics",placeholders:[{name:"content",type:"string"}]},"scene.cta.default":{value:"En savoir plus",description:"Default call-to-action text for scenes"},"scene.hook.problem":{value:"Le probl\xE8me",description:"Scene hook label for problem statement"},"scene.narration.problem":{value:"Le probl\xE8me\xA0: {content}",description:"Scene narration for problem statement",placeholders:[{name:"content",type:"string"}]},"scene.hook.solution":{value:"La solution",description:"Scene hook label for solution"},"scene.narration.solution":{value:"La solution\xA0: {content}",description:"Scene narration for solution",placeholders:[{name:"content",type:"string"}]},"scene.hook.results":{value:"R\xE9sultats",description:"Scene hook label for results/metrics"},"composition.apiOverview.generates":{value:"G\xE9n\xE8re\xA0:",description:"ApiOverview heading for generated outputs"},"composition.apiOverview.tagline":{value:"Un spec. Toutes les surfaces.",description:"ApiOverview default tagline"},"composition.apiOverview.output.rest":{value:"Endpoint REST",description:"Generated output label: REST"},"composition.apiOverview.output.graphql":{value:"Mutation GraphQL",description:"Generated output label: GraphQL"},"composition.apiOverview.output.prisma":{value:"Mod\xE8le Prisma",description:"Generated output label: Prisma"},"composition.apiOverview.output.typescript":{value:"SDK TypeScript",description:"Generated output label: TypeScript SDK"},"composition.apiOverview.output.mcp":{value:"Outil MCP",description:"Generated output label: MCP Tool"},"composition.apiOverview.output.openapi":{value:"Spec OpenAPI",description:"Generated output label: OpenAPI"},"composition.socialClip.cta":{value:"En savoir plus",description:"SocialClip default CTA"},"composition.terminal.title":{value:"Terminal",description:"TerminalDemo default window title"}}});var R8={"prompt.script.system":"prompt.script.system","prompt.scenePlanner.system":"prompt.scenePlanner.system","prompt.style.professional":"prompt.style.professional","prompt.style.casual":"prompt.style.casual","prompt.style.technical":"prompt.style.technical"},B8={"script.segment.challenge":"script.segment.challenge","script.segment.solution":"script.segment.solution","script.segment.results":"script.segment.results"},Z8={"scene.cta.default":"scene.cta.default","scene.hook.problem":"scene.hook.problem","scene.narration.problem":"scene.narration.problem","scene.hook.solution":"scene.hook.solution","scene.narration.solution":"scene.narration.solution","scene.hook.results":"scene.hook.results"},_8={"composition.apiOverview.generates":"composition.apiOverview.generates","composition.apiOverview.tagline":"composition.apiOverview.tagline","composition.apiOverview.output.rest":"composition.apiOverview.output.rest","composition.apiOverview.output.graphql":"composition.apiOverview.output.graphql","composition.apiOverview.output.prisma":"composition.apiOverview.output.prisma","composition.apiOverview.output.typescript":"composition.apiOverview.output.typescript","composition.apiOverview.output.mcp":"composition.apiOverview.output.mcp","composition.apiOverview.output.openapi":"composition.apiOverview.output.openapi","composition.socialClip.cta":"composition.socialClip.cta","composition.terminal.title":"composition.terminal.title"},L1={...R8,...B8,...Z8,..._8};import{DEFAULT_LOCALE as z1,isSupportedLocale as H1,resolveLocale as J1,SUPPORTED_LOCALES as Q1}from"@contractspec/lib.contracts-spec/translations";import{createI18nFactory as $1}from"@contractspec/lib.contracts-spec/translations";var z8=$1({specKey:"video-gen.messages",catalogs:[G8,L8,K8]}),H8=z8.create,W1=z8.getDefault,X1=z8.resetRegistry;class l{llm;model;temperature;fps;i18n;modelSelector;selectionContext;constructor(G){this.llm=G?.llm,this.model=G?.model,this.temperature=G?.temperature??0.3,this.fps=G?.fps??j,this.i18n=H8(G?.locale),this.modelSelector=G?.modelSelector,this.selectionContext=G?.selectionContext}async plan(G){if(this.llm)return this.planWithLlm(G);return this.planDeterministic(G)}planDeterministic(G){let{content:K}=G,{t:L}=this.i18n,z=[],H=this.fps;if(z.push({compositionId:"SocialClip",props:{hook:K.title,message:K.summary,points:K.solutions.slice(0,3),cta:K.callToAction??L("scene.cta.default")},durationInFrames:3*H,narrationText:`${K.title}. ${K.summary}`}),K.problems.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.problem"),message:K.problems[0]??"",points:K.problems.slice(1,4)},durationInFrames:4*H,narrationText:L("scene.narration.problem",{content:K.problems.join(". ")})});if(K.solutions.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.solution"),message:K.solutions[0]??"",points:K.solutions.slice(1,4)},durationInFrames:5*H,narrationText:L("scene.narration.solution",{content:K.solutions.join(". ")})});if(K.metrics&&K.metrics.length>0)z.push({compositionId:"SocialClip",props:{hook:L("scene.hook.results"),message:K.metrics[0]??"",points:K.metrics.slice(1,3)},durationInFrames:3*H,narrationText:K.metrics.join(". ")});if(K.callToAction)z.push({compositionId:"SocialClip",props:{hook:K.callToAction,message:"",cta:K.callToAction},durationInFrames:2*H,narrationText:K.callToAction});if(G.targetDurationSeconds){let W=G.targetDurationSeconds*H,U=z.reduce((J,X)=>J+X.durationInFrames,0),M=W/U;for(let J of z)J.durationInFrames=Math.round(J.durationInFrames*M)}let Q=z.reduce((W,U)=>W+U.durationInFrames,0),$=z.filter((W)=>W.narrationText).map((W)=>W.narrationText).join(" ");return{scenes:z,estimatedDurationSeconds:Q/H,narrationScript:$}}async resolveModel(){if(this.model)return this.model;if(this.modelSelector){let G=this.selectionContext??{taskDimension:"reasoning"};return(await this.modelSelector.select(G)).modelId}return}async planWithLlm(G){let{t:K}=this.i18n,L=[{role:"system",content:[{type:"text",text:K("prompt.scenePlanner.system",{fps:this.fps,targetSeconds:G.targetDurationSeconds??30})}]},{role:"user",content:[{type:"text",text:JSON.stringify(G.content)}]}];if(!this.llm)return this.planDeterministic(G);try{let z=await this.resolveModel(),Q=(await this.llm.chat(L,{model:z,temperature:this.temperature,responseFormat:"json"})).message.content.find((U)=>U.type==="text");if(!Q||Q.type!=="text")return this.planDeterministic(G);let $=JSON.parse(Q.text),W=$.scenes.reduce((U,M)=>U+M.durationInFrames,0);return{scenes:$.scenes,estimatedDurationSeconds:W/this.fps,narrationScript:$.narrationScript}}catch{return this.planDeterministic(G)}}}import{VIDEO_FORMATS as U1}from"@contractspec/lib.contracts-integrations/integrations/providers/video";class q8{scenePlanner;voice;transcriber;image;fps;constructor(G){this.fps=G?.fps??j,this.voice=G?.voice,this.transcriber=G?.transcriber,this.image=G?.image,this.scenePlanner=new l({llm:G?.llm,model:G?.model,temperature:G?.temperature,fps:this.fps,locale:G?.locale,modelSelector:G?.modelSelector,selectionContext:G?.selectionContext})}async generate(G){let K=await this.scenePlanner.plan(G),L=K.scenes.map((J,X)=>({id:`scene-${X}`,compositionId:J.compositionId,props:J.props,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),z,H;if(G.narration?.enabled&&this.voice)try{if(z=await this.voice.synthesizeForVideo({content:G.content,scenePlan:{scenes:L.map((J)=>({id:J.id,compositionId:J.compositionId,durationInFrames:J.durationInFrames,narrationText:J.narrationText})),estimatedDurationSeconds:K.estimatedDurationSeconds},voice:{voiceId:G.narration.voiceId??""},pacing:{strategy:"scene-matched"},fps:this.fps}),z.timingMap)for(let J of z.timingMap.segments){let X=L.find((N)=>N.id===J.sceneId);if(X)X.durationInFrames=J.recommendedSceneDurationInFrames}if(z.assembledAudio)H={data:z.assembledAudio.data,format:z.assembledAudio.format==="wav"?"wav":"mp3",durationSeconds:(z.assembledAudio.durationMs??0)/1000,volume:1}}catch{}let Q;if(this.transcriber&&z?.assembledAudio)try{Q=(await this.transcriber.transcribe({audio:z.assembledAudio,subtitleFormat:"vtt"})).subtitles}catch{}let $;if(this.image)try{let J=await this.image.generate({content:G.content,purpose:"video-thumbnail",format:"png",style:"photorealistic"}),X=J.results?.images[0]?.url;$={prompt:J.prompt.text,...X?{imageUrl:X}:{}}}catch{}let W=G.format??U1.landscape,U=L.reduce((J,X)=>J+X.durationInFrames,0);return{id:N1(),scenes:L,totalDurationInFrames:U,fps:this.fps,format:W,audio:H?{narration:H}:void 0,subtitles:Q,voiceTimingMap:z?.timingMap,thumbnail:$}}}function N1(){let G=Date.now().toString(36),K=Math.random().toString(36).slice(2,8);return`vp_${G}_${K}`}var I8={codec:"h264",outputFormat:"mp4",crf:18,pixelFormat:"yuv420p"},M1={h264:"mp4",h265:"mp4",vp8:"webm",vp9:"webm"},D8={draft:{crf:28,concurrency:1},standard:{crf:18,concurrency:void 0},high:{crf:12,concurrency:void 0}};function Y1(G,K){let L=K?D8[K]:{};return{...I8,...L,...G}}import{VIDEO_FORMATS as EK}from"@contractspec/lib.contracts-integrations/integrations/providers/video";import{defineFeature as R1}from"@contractspec/lib.contracts-spec/features";var TK=R1({meta:{key:"libs.video-gen",version:"1.0.0",title:"Video Gen",description:"ContractSpec package declaration for @contractspec/lib.video-gen.",domain:"video-gen",owners:["@contractspec-core"],tags:["package","libs","video-gen"],stability:"experimental"},operations:[{key:"createUser",version:"1.0.0"}]});export{C as videoTypography,q1 as videoTransitions,f as videoSafeZone,C1 as videoPositions,R as videoEasing,V as videoDurations,v as scaleTypography,J8 as scaleSafeZone,Y1 as resolveRenderConfig,D8 as qualityPresets,v1 as getAllFormatVariants,P as defaultVideoTheme,y as defaultVideoColors,b as defaultTokens,I8 as defaultRenderConfig,M1 as codecFormatMap,q8 as VideoGenerator,TK as VideoGenFeature,t8 as TerminalDemo,t as Terminal,r8 as SocialClip,m8 as SceneTransitionWrapper,l as ScenePlanner,T as ProgressBar,j as DEFAULT_FPS,n as CodeBlock,S as BrandFrame,h8 as ApiOverview,I as AnimatedText};
@@ -0,0 +1 @@
1
+ import{createRequire as o}from"node:module";var WH=o(import.meta.url);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},MH={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(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 D,useCurrentFrame as s,useVideoConfig as i}from"remotion";import{jsx as r}from"react/jsx-runtime";var S=({text:J,variant:H="body",style:K,enterAt:Q=0,exitAt:$,color:z="#ffffff",align:X="left"})=>{let G=s(),{width:N}=i(),W=k[H],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 r("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:J})};import{VIDEO_FORMATS as A}from"@contractspec/lib.contracts-integrations/integrations/providers/video";var VH=30,E={horizontal:120,vertical:80,contentWidth:1680,contentHeight:920};function h(J){let H=J.width/1920,K=J.height/1080;return{horizontal:Math.round(E.horizontal*H),vertical:Math.round(E.vertical*K),contentWidth:Math.round(E.contentWidth*H),contentHeight:Math.round(E.contentHeight*K)}}var SH={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 OH(){return[A.landscape,A.square,A.portrait]}import{interpolate as x,useCurrentFrame as a,useVideoConfig as t}from"remotion";import{jsx as j,jsxs as e}from"react/jsx-runtime";var p=({styleOverrides:J,showBranding:H=!0,animateEntrance:K=!0,variant:Q="gradient",children:$})=>{let z=a(),{width:X,height:G}=t(),N=B,W=h({type:"custom",width:X,height:G}),_=J?.primaryColor??N.colors.primary,P=J?.accentColor??N.colors.accent,q=J?.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=H?x(z,[I.brandReveal,I.brandReveal+15],[0,0.3],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}):0;return e("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:$}),H&&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 HH,useVideoConfig as JH}from"remotion";import{jsx as w,jsxs as T}from"react/jsx-runtime";var g=({code:J,language:H="typescript",startAt:K=0,typeAnimation:Q=!0,backgroundColor:$=C.codeBackground,textColor:z="#abb2bf",filename:X})=>{let G=HH(),{width:N}=JH(),W=F(k.code,N),_=J.length,P=_*I.codeTypingPerChar,q=Q?Math.floor(u(G,[K,K+P],[0,_],{extrapolateLeft:"clamp",extrapolateRight:"clamp"})):_,M=J.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??H})]}),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 KH,useVideoConfig as QH}from"remotion";import{jsx as c}from"react/jsx-runtime";var m=({height:J=4,color:H=B.colors.primary,backgroundColor:K="rgba(255,255,255,0.1)",position:Q="bottom"})=>{let $=KH(),{durationInFrames:z,width:X}=QH(),G=$/z;return c("div",{style:{position:"absolute",[Q]:0,left:0,width:X,height:J,backgroundColor:K,zIndex:100},children:c("div",{style:{width:`${G*100}%`,height:"100%",backgroundColor:H,transition:"none"}})})};import{AbsoluteFill as UH,interpolate as b,Sequence as v,useCurrentFrame as l,useVideoConfig as $H}from"remotion";import{jsx as U,jsxs as O}from"react/jsx-runtime";var rH=({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:X}=$H(),G=B,N=60,W=45,_=210,P=180,q=X-90;return O(UH,{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(zH,{method:H,enterAt:10}),U(S,{text:K,variant:"subheading",enterAt:15,color:G.colors.mutedForeground})]}),U(S,{text:J,variant:"title",enterAt:5,color:"#ffffff"}),U("div",{style:{flex:1,marginTop:24},children:U(g,{code:Q,language:"typescript",filename:`${J.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(GH,{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,{})]})},zH=({method:J,enterAt:H})=>{let K=l(),Q=b(K,[H,H+10],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.entrance}),$=b(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 U("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})},GH=({label:J,startFrame:H})=>{let K=l(),Q=b(K,[H,H+12],[0,1],{extrapolateLeft:"clamp",extrapolateRight:"clamp"}),$=b(K,[H,H+15],[20,0],{extrapolateLeft:"clamp",extrapolateRight:"clamp",easing:L.emphasis}),z=b(K,[H,H+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:J})};export{rH as ApiOverview};