@nodetool-ai/timeline 0.8.1

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 (505) hide show
  1. package/README.md +55 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/animation/bakedAnimation.d.ts +84 -0
  4. package/dist/animation/bakedAnimation.d.ts.map +1 -0
  5. package/dist/animation/bakedAnimation.js +95 -0
  6. package/dist/animation/bakedAnimation.js.map +1 -0
  7. package/dist/animation/beat.d.ts +7 -0
  8. package/dist/animation/beat.d.ts.map +1 -0
  9. package/dist/animation/beat.js +36 -0
  10. package/dist/animation/beat.js.map +1 -0
  11. package/dist/animation/compile.d.ts +184 -0
  12. package/dist/animation/compile.d.ts.map +1 -0
  13. package/dist/animation/compile.js +312 -0
  14. package/dist/animation/compile.js.map +1 -0
  15. package/dist/animation/custom.d.ts +183 -0
  16. package/dist/animation/custom.d.ts.map +1 -0
  17. package/dist/animation/custom.js +583 -0
  18. package/dist/animation/custom.js.map +1 -0
  19. package/dist/animation/easing.d.ts +34 -0
  20. package/dist/animation/easing.d.ts.map +1 -0
  21. package/dist/animation/easing.js +332 -0
  22. package/dist/animation/easing.js.map +1 -0
  23. package/dist/animation/index.d.ts +20 -0
  24. package/dist/animation/index.d.ts.map +1 -0
  25. package/dist/animation/index.js +20 -0
  26. package/dist/animation/index.js.map +1 -0
  27. package/dist/animation/links.d.ts +33 -0
  28. package/dist/animation/links.d.ts.map +1 -0
  29. package/dist/animation/links.js +126 -0
  30. package/dist/animation/links.js.map +1 -0
  31. package/dist/animation/presets.d.ts +86 -0
  32. package/dist/animation/presets.d.ts.map +1 -0
  33. package/dist/animation/presets.js +642 -0
  34. package/dist/animation/presets.js.map +1 -0
  35. package/dist/animation/sample.d.ts +145 -0
  36. package/dist/animation/sample.d.ts.map +1 -0
  37. package/dist/animation/sample.js +390 -0
  38. package/dist/animation/sample.js.map +1 -0
  39. package/dist/animation/simplify.d.ts +70 -0
  40. package/dist/animation/simplify.d.ts.map +1 -0
  41. package/dist/animation/simplify.js +278 -0
  42. package/dist/animation/simplify.js.map +1 -0
  43. package/dist/animation/sourceCurves.d.ts +45 -0
  44. package/dist/animation/sourceCurves.d.ts.map +1 -0
  45. package/dist/animation/sourceCurves.js +168 -0
  46. package/dist/animation/sourceCurves.js.map +1 -0
  47. package/dist/animation/styleTracks.d.ts +23 -0
  48. package/dist/animation/styleTracks.d.ts.map +1 -0
  49. package/dist/animation/styleTracks.js +341 -0
  50. package/dist/animation/styleTracks.js.map +1 -0
  51. package/dist/animation/types.d.ts +269 -0
  52. package/dist/animation/types.d.ts.map +1 -0
  53. package/dist/animation/types.js +173 -0
  54. package/dist/animation/types.js.map +1 -0
  55. package/dist/animation/typewriter.d.ts +8 -0
  56. package/dist/animation/typewriter.d.ts.map +1 -0
  57. package/dist/animation/typewriter.js +32 -0
  58. package/dist/animation/typewriter.js.map +1 -0
  59. package/dist/audioFade.d.ts +73 -0
  60. package/dist/audioFade.d.ts.map +1 -0
  61. package/dist/audioFade.js +134 -0
  62. package/dist/audioFade.js.map +1 -0
  63. package/dist/authoredStyles.d.ts +61 -0
  64. package/dist/authoredStyles.d.ts.map +1 -0
  65. package/dist/authoredStyles.js +90 -0
  66. package/dist/authoredStyles.js.map +1 -0
  67. package/dist/authoring.d.ts +50 -0
  68. package/dist/authoring.d.ts.map +1 -0
  69. package/dist/authoring.js +207 -0
  70. package/dist/authoring.js.map +1 -0
  71. package/dist/beats.d.ts +103 -0
  72. package/dist/beats.d.ts.map +1 -0
  73. package/dist/beats.js +228 -0
  74. package/dist/beats.js.map +1 -0
  75. package/dist/clone.d.ts +32 -0
  76. package/dist/clone.d.ts.map +1 -0
  77. package/dist/clone.js +53 -0
  78. package/dist/clone.js.map +1 -0
  79. package/dist/composition.d.ts +87 -0
  80. package/dist/composition.d.ts.map +1 -0
  81. package/dist/composition.js +253 -0
  82. package/dist/composition.js.map +1 -0
  83. package/dist/crop.d.ts +48 -0
  84. package/dist/crop.d.ts.map +1 -0
  85. package/dist/crop.js +75 -0
  86. package/dist/crop.js.map +1 -0
  87. package/dist/defaults.d.ts +142 -0
  88. package/dist/defaults.d.ts.map +1 -0
  89. package/dist/defaults.js +335 -0
  90. package/dist/defaults.js.map +1 -0
  91. package/dist/dependencyHash.d.ts +14 -0
  92. package/dist/dependencyHash.d.ts.map +1 -0
  93. package/dist/dependencyHash.js +19 -0
  94. package/dist/dependencyHash.js.map +1 -0
  95. package/dist/dropResolve.d.ts +40 -0
  96. package/dist/dropResolve.d.ts.map +1 -0
  97. package/dist/dropResolve.js +137 -0
  98. package/dist/dropResolve.js.map +1 -0
  99. package/dist/examples/node.d.ts +11 -0
  100. package/dist/examples/node.d.ts.map +1 -0
  101. package/dist/examples/node.js +87 -0
  102. package/dist/examples/node.js.map +1 -0
  103. package/dist/extension.d.ts +52 -0
  104. package/dist/extension.d.ts.map +1 -0
  105. package/dist/extension.js +269 -0
  106. package/dist/extension.js.map +1 -0
  107. package/dist/extensionRequest.d.ts +40 -0
  108. package/dist/extensionRequest.d.ts.map +1 -0
  109. package/dist/extensionRequest.js +135 -0
  110. package/dist/extensionRequest.js.map +1 -0
  111. package/dist/fill-text.d.ts +30 -0
  112. package/dist/fill-text.d.ts.map +1 -0
  113. package/dist/fill-text.js +73 -0
  114. package/dist/fill-text.js.map +1 -0
  115. package/dist/fonts/catalog.d.ts +97 -0
  116. package/dist/fonts/catalog.d.ts.map +1 -0
  117. package/dist/fonts/catalog.js +276 -0
  118. package/dist/fonts/catalog.js.map +1 -0
  119. package/dist/fonts/css.d.ts +24 -0
  120. package/dist/fonts/css.d.ts.map +1 -0
  121. package/dist/fonts/css.js +50 -0
  122. package/dist/fonts/css.js.map +1 -0
  123. package/dist/fonts/index.d.ts +10 -0
  124. package/dist/fonts/index.d.ts.map +1 -0
  125. package/dist/fonts/index.js +10 -0
  126. package/dist/fonts/index.js.map +1 -0
  127. package/dist/fonts/register-node.d.ts +45 -0
  128. package/dist/fonts/register-node.d.ts.map +1 -0
  129. package/dist/fonts/register-node.js +71 -0
  130. package/dist/fonts/register-node.js.map +1 -0
  131. package/dist/generatedMatte.d.ts +86 -0
  132. package/dist/generatedMatte.d.ts.map +1 -0
  133. package/dist/generatedMatte.js +152 -0
  134. package/dist/generatedMatte.js.map +1 -0
  135. package/dist/generative.d.ts +145 -0
  136. package/dist/generative.d.ts.map +1 -0
  137. package/dist/generative.js +396 -0
  138. package/dist/generative.js.map +1 -0
  139. package/dist/group.d.ts +47 -0
  140. package/dist/group.d.ts.map +1 -0
  141. package/dist/group.js +131 -0
  142. package/dist/group.js.map +1 -0
  143. package/dist/index.d.ts +55 -0
  144. package/dist/index.d.ts.map +1 -0
  145. package/dist/index.js +58 -0
  146. package/dist/index.js.map +1 -0
  147. package/dist/interchange.d.ts +47 -0
  148. package/dist/interchange.d.ts.map +1 -0
  149. package/dist/interchange.js +158 -0
  150. package/dist/interchange.js.map +1 -0
  151. package/dist/keyframes.d.ts +44 -0
  152. package/dist/keyframes.d.ts.map +1 -0
  153. package/dist/keyframes.js +148 -0
  154. package/dist/keyframes.js.map +1 -0
  155. package/dist/lineDelivery.d.ts +108 -0
  156. package/dist/lineDelivery.d.ts.map +1 -0
  157. package/dist/lineDelivery.js +154 -0
  158. package/dist/lineDelivery.js.map +1 -0
  159. package/dist/linked.d.ts +41 -0
  160. package/dist/linked.d.ts.map +1 -0
  161. package/dist/linked.js +166 -0
  162. package/dist/linked.js.map +1 -0
  163. package/dist/lipSyncRequest.d.ts +65 -0
  164. package/dist/lipSyncRequest.d.ts.map +1 -0
  165. package/dist/lipSyncRequest.js +73 -0
  166. package/dist/lipSyncRequest.js.map +1 -0
  167. package/dist/measureClipDurations.d.ts +7 -0
  168. package/dist/measureClipDurations.d.ts.map +1 -0
  169. package/dist/measureClipDurations.js +17 -0
  170. package/dist/measureClipDurations.js.map +1 -0
  171. package/dist/mediaTrack.d.ts +120 -0
  172. package/dist/mediaTrack.d.ts.map +1 -0
  173. package/dist/mediaTrack.js +269 -0
  174. package/dist/mediaTrack.js.map +1 -0
  175. package/dist/midi/cacheKey.d.ts +25 -0
  176. package/dist/midi/cacheKey.d.ts.map +1 -0
  177. package/dist/midi/cacheKey.js +54 -0
  178. package/dist/midi/cacheKey.js.map +1 -0
  179. package/dist/midi/edit.d.ts +48 -0
  180. package/dist/midi/edit.d.ts.map +1 -0
  181. package/dist/midi/edit.js +93 -0
  182. package/dist/midi/edit.js.map +1 -0
  183. package/dist/midi/engines/bl1.d.ts +29 -0
  184. package/dist/midi/engines/bl1.d.ts.map +1 -0
  185. package/dist/midi/engines/bl1.js +128 -0
  186. package/dist/midi/engines/bl1.js.map +1 -0
  187. package/dist/midi/engines/dr1.d.ts +28 -0
  188. package/dist/midi/engines/dr1.d.ts.map +1 -0
  189. package/dist/midi/engines/dr1.js +101 -0
  190. package/dist/midi/engines/dr1.js.map +1 -0
  191. package/dist/midi/engines/dsp.d.ts +126 -0
  192. package/dist/midi/engines/dsp.d.ts.map +1 -0
  193. package/dist/midi/engines/dsp.js +371 -0
  194. package/dist/midi/engines/dsp.js.map +1 -0
  195. package/dist/midi/engines/index.d.ts +13 -0
  196. package/dist/midi/engines/index.d.ts.map +1 -0
  197. package/dist/midi/engines/index.js +13 -0
  198. package/dist/midi/engines/index.js.map +1 -0
  199. package/dist/midi/engines/kits.d.ts +12 -0
  200. package/dist/midi/engines/kits.d.ts.map +1 -0
  201. package/dist/midi/engines/kits.js +121 -0
  202. package/dist/midi/engines/kits.js.map +1 -0
  203. package/dist/midi/engines/wavetables.d.ts +45 -0
  204. package/dist/midi/engines/wavetables.d.ts.map +1 -0
  205. package/dist/midi/engines/wavetables.js +334 -0
  206. package/dist/midi/engines/wavetables.js.map +1 -0
  207. package/dist/midi/engines/wt1.d.ts +30 -0
  208. package/dist/midi/engines/wt1.d.ts.map +1 -0
  209. package/dist/midi/engines/wt1.js +91 -0
  210. package/dist/midi/engines/wt1.js.map +1 -0
  211. package/dist/midi/grid.d.ts +51 -0
  212. package/dist/midi/grid.d.ts.map +1 -0
  213. package/dist/midi/grid.js +104 -0
  214. package/dist/midi/grid.js.map +1 -0
  215. package/dist/midi/index.d.ts +20 -0
  216. package/dist/midi/index.d.ts.map +1 -0
  217. package/dist/midi/index.js +20 -0
  218. package/dist/midi/index.js.map +1 -0
  219. package/dist/midi/instrument.d.ts +32 -0
  220. package/dist/midi/instrument.d.ts.map +1 -0
  221. package/dist/midi/instrument.js +73 -0
  222. package/dist/midi/instrument.js.map +1 -0
  223. package/dist/midi/notes.d.ts +46 -0
  224. package/dist/midi/notes.d.ts.map +1 -0
  225. package/dist/midi/notes.js +121 -0
  226. package/dist/midi/notes.js.map +1 -0
  227. package/dist/midi/notesEdit.d.ts +94 -0
  228. package/dist/midi/notesEdit.d.ts.map +1 -0
  229. package/dist/midi/notesEdit.js +159 -0
  230. package/dist/midi/notesEdit.js.map +1 -0
  231. package/dist/midi/presets.d.ts +29 -0
  232. package/dist/midi/presets.d.ts.map +1 -0
  233. package/dist/midi/presets.js +281 -0
  234. package/dist/midi/presets.js.map +1 -0
  235. package/dist/midi/tempo.d.ts +27 -0
  236. package/dist/midi/tempo.d.ts.map +1 -0
  237. package/dist/midi/tempo.js +57 -0
  238. package/dist/midi/tempo.js.map +1 -0
  239. package/dist/midi/ticks.d.ts +25 -0
  240. package/dist/midi/ticks.d.ts.map +1 -0
  241. package/dist/midi/ticks.js +35 -0
  242. package/dist/midi/ticks.js.map +1 -0
  243. package/dist/midi/voice.d.ts +148 -0
  244. package/dist/midi/voice.d.ts.map +1 -0
  245. package/dist/midi/voice.js +348 -0
  246. package/dist/midi/voice.js.map +1 -0
  247. package/dist/midi/wav.d.ts +14 -0
  248. package/dist/midi/wav.d.ts.map +1 -0
  249. package/dist/midi/wav.js +51 -0
  250. package/dist/midi/wav.js.map +1 -0
  251. package/dist/model3d.d.ts +41 -0
  252. package/dist/model3d.d.ts.map +1 -0
  253. package/dist/model3d.js +39 -0
  254. package/dist/model3d.js.map +1 -0
  255. package/dist/model3dBake.d.ts +80 -0
  256. package/dist/model3dBake.d.ts.map +1 -0
  257. package/dist/model3dBake.js +127 -0
  258. package/dist/model3dBake.js.map +1 -0
  259. package/dist/ops/apply.d.ts +32 -0
  260. package/dist/ops/apply.d.ts.map +1 -0
  261. package/dist/ops/apply.js +1595 -0
  262. package/dist/ops/apply.js.map +1 -0
  263. package/dist/ops/index.d.ts +13 -0
  264. package/dist/ops/index.d.ts.map +1 -0
  265. package/dist/ops/index.js +13 -0
  266. package/dist/ops/index.js.map +1 -0
  267. package/dist/ops/op.d.ts +407 -0
  268. package/dist/ops/op.d.ts.map +1 -0
  269. package/dist/ops/op.js +61 -0
  270. package/dist/ops/op.js.map +1 -0
  271. package/dist/ops/serialize.d.ts +77 -0
  272. package/dist/ops/serialize.d.ts.map +1 -0
  273. package/dist/ops/serialize.js +81 -0
  274. package/dist/ops/serialize.js.map +1 -0
  275. package/dist/ops/types.d.ts +150 -0
  276. package/dist/ops/types.d.ts.map +1 -0
  277. package/dist/ops/types.js +12 -0
  278. package/dist/ops/types.js.map +1 -0
  279. package/dist/pathSampling.d.ts +51 -0
  280. package/dist/pathSampling.d.ts.map +1 -0
  281. package/dist/pathSampling.js +111 -0
  282. package/dist/pathSampling.js.map +1 -0
  283. package/dist/placement/index.d.ts +2 -0
  284. package/dist/placement/index.d.ts.map +1 -0
  285. package/dist/placement/index.js +2 -0
  286. package/dist/placement/index.js.map +1 -0
  287. package/dist/placement/resolveTrackPlacement.d.ts +40 -0
  288. package/dist/placement/resolveTrackPlacement.d.ts.map +1 -0
  289. package/dist/placement/resolveTrackPlacement.js +71 -0
  290. package/dist/placement/resolveTrackPlacement.js.map +1 -0
  291. package/dist/production.d.ts +99 -0
  292. package/dist/production.d.ts.map +1 -0
  293. package/dist/production.js +328 -0
  294. package/dist/production.js.map +1 -0
  295. package/dist/reassemble.d.ts +68 -0
  296. package/dist/reassemble.d.ts.map +1 -0
  297. package/dist/reassemble.js +187 -0
  298. package/dist/reassemble.js.map +1 -0
  299. package/dist/recipe.d.ts +24 -0
  300. package/dist/recipe.d.ts.map +1 -0
  301. package/dist/recipe.js +89 -0
  302. package/dist/recipe.js.map +1 -0
  303. package/dist/recordedVoiceReplacement.d.ts +70 -0
  304. package/dist/recordedVoiceReplacement.d.ts.map +1 -0
  305. package/dist/recordedVoiceReplacement.js +82 -0
  306. package/dist/recordedVoiceReplacement.js.map +1 -0
  307. package/dist/reframe.d.ts +31 -0
  308. package/dist/reframe.d.ts.map +1 -0
  309. package/dist/reframe.js +227 -0
  310. package/dist/reframe.js.map +1 -0
  311. package/dist/render/canvas2d.d.ts +419 -0
  312. package/dist/render/canvas2d.d.ts.map +1 -0
  313. package/dist/render/canvas2d.js +1392 -0
  314. package/dist/render/canvas2d.js.map +1 -0
  315. package/dist/render/color.d.ts +26 -0
  316. package/dist/render/color.d.ts.map +1 -0
  317. package/dist/render/color.js +305 -0
  318. package/dist/render/color.js.map +1 -0
  319. package/dist/render/cpuLegacyEffects.d.ts +17 -0
  320. package/dist/render/cpuLegacyEffects.d.ts.map +1 -0
  321. package/dist/render/cpuLegacyEffects.js +347 -0
  322. package/dist/render/cpuLegacyEffects.js.map +1 -0
  323. package/dist/render/cpuVisualEffects.d.ts +13 -0
  324. package/dist/render/cpuVisualEffects.d.ts.map +1 -0
  325. package/dist/render/cpuVisualEffects.js +388 -0
  326. package/dist/render/cpuVisualEffects.js.map +1 -0
  327. package/dist/render/cubeLut.d.ts +12 -0
  328. package/dist/render/cubeLut.d.ts.map +1 -0
  329. package/dist/render/cubeLut.js +81 -0
  330. package/dist/render/cubeLut.js.map +1 -0
  331. package/dist/render/curveFitting.d.ts +28 -0
  332. package/dist/render/curveFitting.d.ts.map +1 -0
  333. package/dist/render/curveFitting.js +94 -0
  334. package/dist/render/curveFitting.js.map +1 -0
  335. package/dist/render/draw.d.ts +265 -0
  336. package/dist/render/draw.d.ts.map +1 -0
  337. package/dist/render/draw.js +929 -0
  338. package/dist/render/draw.js.map +1 -0
  339. package/dist/render/effects.d.ts +120 -0
  340. package/dist/render/effects.d.ts.map +1 -0
  341. package/dist/render/effects.js +804 -0
  342. package/dist/render/effects.js.map +1 -0
  343. package/dist/render/frameCompositor.d.ts +502 -0
  344. package/dist/render/frameCompositor.d.ts.map +1 -0
  345. package/dist/render/frameCompositor.js +1331 -0
  346. package/dist/render/frameCompositor.js.map +1 -0
  347. package/dist/render/index.d.ts +27 -0
  348. package/dist/render/index.d.ts.map +1 -0
  349. package/dist/render/index.js +27 -0
  350. package/dist/render/index.js.map +1 -0
  351. package/dist/render/layout.d.ts +17 -0
  352. package/dist/render/layout.d.ts.map +1 -0
  353. package/dist/render/layout.js +197 -0
  354. package/dist/render/layout.js.map +1 -0
  355. package/dist/render/model3dBakeSamples.d.ts +45 -0
  356. package/dist/render/model3dBakeSamples.d.ts.map +1 -0
  357. package/dist/render/model3dBakeSamples.js +68 -0
  358. package/dist/render/model3dBakeSamples.js.map +1 -0
  359. package/dist/render/motionBlur.d.ts +170 -0
  360. package/dist/render/motionBlur.d.ts.map +1 -0
  361. package/dist/render/motionBlur.js +193 -0
  362. package/dist/render/motionBlur.js.map +1 -0
  363. package/dist/render/sceneModel.d.ts +577 -0
  364. package/dist/render/sceneModel.d.ts.map +1 -0
  365. package/dist/render/sceneModel.js +1460 -0
  366. package/dist/render/sceneModel.js.map +1 -0
  367. package/dist/render/shapeGeometry.d.ts +81 -0
  368. package/dist/render/shapeGeometry.d.ts.map +1 -0
  369. package/dist/render/shapeGeometry.js +460 -0
  370. package/dist/render/shapeGeometry.js.map +1 -0
  371. package/dist/render/spatial.d.ts +9 -0
  372. package/dist/render/spatial.d.ts.map +1 -0
  373. package/dist/render/spatial.js +58 -0
  374. package/dist/render/spatial.js.map +1 -0
  375. package/dist/render/svgPath.d.ts +80 -0
  376. package/dist/render/svgPath.d.ts.map +1 -0
  377. package/dist/render/svgPath.js +199 -0
  378. package/dist/render/svgPath.js.map +1 -0
  379. package/dist/render/temporal.d.ts +6 -0
  380. package/dist/render/temporal.d.ts.map +1 -0
  381. package/dist/render/temporal.js +74 -0
  382. package/dist/render/temporal.js.map +1 -0
  383. package/dist/render/textLayout.d.ts +159 -0
  384. package/dist/render/textLayout.d.ts.map +1 -0
  385. package/dist/render/textLayout.js +301 -0
  386. package/dist/render/textLayout.js.map +1 -0
  387. package/dist/render/trackEffects.d.ts +23 -0
  388. package/dist/render/trackEffects.d.ts.map +1 -0
  389. package/dist/render/trackEffects.js +93 -0
  390. package/dist/render/trackEffects.js.map +1 -0
  391. package/dist/render/transform.d.ts +54 -0
  392. package/dist/render/transform.d.ts.map +1 -0
  393. package/dist/render/transform.js +222 -0
  394. package/dist/render/transform.js.map +1 -0
  395. package/dist/render/transition.d.ts +109 -0
  396. package/dist/render/transition.d.ts.map +1 -0
  397. package/dist/render/transition.js +351 -0
  398. package/dist/render/transition.js.map +1 -0
  399. package/dist/retarget.d.ts +73 -0
  400. package/dist/retarget.d.ts.map +1 -0
  401. package/dist/retarget.js +305 -0
  402. package/dist/retarget.js.map +1 -0
  403. package/dist/rippleEdit.d.ts +83 -0
  404. package/dist/rippleEdit.d.ts.map +1 -0
  405. package/dist/rippleEdit.js +184 -0
  406. package/dist/rippleEdit.js.map +1 -0
  407. package/dist/scene.d.ts +28 -0
  408. package/dist/scene.d.ts.map +1 -0
  409. package/dist/scene.js +28 -0
  410. package/dist/scene.js.map +1 -0
  411. package/dist/script-link.d.ts +52 -0
  412. package/dist/script-link.d.ts.map +1 -0
  413. package/dist/script-link.js +78 -0
  414. package/dist/script-link.js.map +1 -0
  415. package/dist/script.d.ts +52 -0
  416. package/dist/script.d.ts.map +1 -0
  417. package/dist/script.js +93 -0
  418. package/dist/script.js.map +1 -0
  419. package/dist/snap.d.ts +2 -0
  420. package/dist/snap.d.ts.map +1 -0
  421. package/dist/snap.js +21 -0
  422. package/dist/snap.js.map +1 -0
  423. package/dist/snapping/buildSnapPoints.d.ts +16 -0
  424. package/dist/snapping/buildSnapPoints.d.ts.map +1 -0
  425. package/dist/snapping/buildSnapPoints.js +39 -0
  426. package/dist/snapping/buildSnapPoints.js.map +1 -0
  427. package/dist/snapping/index.d.ts +3 -0
  428. package/dist/snapping/index.d.ts.map +1 -0
  429. package/dist/snapping/index.js +3 -0
  430. package/dist/snapping/index.js.map +1 -0
  431. package/dist/snapping/resolveSnap.d.ts +19 -0
  432. package/dist/snapping/resolveSnap.d.ts.map +1 -0
  433. package/dist/snapping/resolveSnap.js +39 -0
  434. package/dist/snapping/resolveSnap.js.map +1 -0
  435. package/dist/sourceRate.d.ts +12 -0
  436. package/dist/sourceRate.d.ts.map +1 -0
  437. package/dist/sourceRate.js +13 -0
  438. package/dist/sourceRate.js.map +1 -0
  439. package/dist/spatialVideoRequest.d.ts +91 -0
  440. package/dist/spatialVideoRequest.d.ts.map +1 -0
  441. package/dist/spatialVideoRequest.js +175 -0
  442. package/dist/spatialVideoRequest.js.map +1 -0
  443. package/dist/splitClip.d.ts +3 -0
  444. package/dist/splitClip.d.ts.map +1 -0
  445. package/dist/splitClip.js +190 -0
  446. package/dist/splitClip.js.map +1 -0
  447. package/dist/stableSerialize.d.ts +11 -0
  448. package/dist/stableSerialize.d.ts.map +1 -0
  449. package/dist/stableSerialize.js +31 -0
  450. package/dist/stableSerialize.js.map +1 -0
  451. package/dist/staleSet.d.ts +41 -0
  452. package/dist/staleSet.d.ts.map +1 -0
  453. package/dist/staleSet.js +106 -0
  454. package/dist/staleSet.js.map +1 -0
  455. package/dist/storyboard.d.ts +221 -0
  456. package/dist/storyboard.d.ts.map +1 -0
  457. package/dist/storyboard.js +417 -0
  458. package/dist/storyboard.js.map +1 -0
  459. package/dist/subtitles.d.ts +61 -0
  460. package/dist/subtitles.d.ts.map +1 -0
  461. package/dist/subtitles.js +92 -0
  462. package/dist/subtitles.js.map +1 -0
  463. package/dist/takes.d.ts +76 -0
  464. package/dist/takes.d.ts.map +1 -0
  465. package/dist/takes.js +238 -0
  466. package/dist/takes.js.map +1 -0
  467. package/dist/timeRemap.d.ts +101 -0
  468. package/dist/timeRemap.d.ts.map +1 -0
  469. package/dist/timeRemap.js +183 -0
  470. package/dist/timeRemap.js.map +1 -0
  471. package/dist/trackOrder.d.ts +38 -0
  472. package/dist/trackOrder.d.ts.map +1 -0
  473. package/dist/trackOrder.js +54 -0
  474. package/dist/trackOrder.js.map +1 -0
  475. package/dist/transitionAtCut.d.ts +89 -0
  476. package/dist/transitionAtCut.d.ts.map +1 -0
  477. package/dist/transitionAtCut.js +217 -0
  478. package/dist/transitionAtCut.js.map +1 -0
  479. package/dist/trimClip.d.ts +13 -0
  480. package/dist/trimClip.d.ts.map +1 -0
  481. package/dist/trimClip.js +60 -0
  482. package/dist/trimClip.js.map +1 -0
  483. package/dist/types.d.ts +1772 -0
  484. package/dist/types.d.ts.map +1 -0
  485. package/dist/types.js +84 -0
  486. package/dist/types.js.map +1 -0
  487. package/fonts/BebasNeue-Regular.ttf +0 -0
  488. package/fonts/Inter-ExtraBold.ttf +0 -0
  489. package/fonts/Inter-Italic-Variable.ttf +0 -0
  490. package/fonts/Inter-SemiBold.ttf +0 -0
  491. package/fonts/Inter-Variable.ttf +0 -0
  492. package/fonts/JetBrainsMono-Italic-Variable.ttf +0 -0
  493. package/fonts/JetBrainsMono-Variable.ttf +0 -0
  494. package/fonts/Lora-Italic-Variable.ttf +0 -0
  495. package/fonts/Lora-Variable.ttf +0 -0
  496. package/fonts/OFL-BebasNeue.txt +93 -0
  497. package/fonts/OFL-Inter.txt +93 -0
  498. package/fonts/OFL-JetBrainsMono.txt +93 -0
  499. package/fonts/OFL-Lora.txt +93 -0
  500. package/fonts/OFL-PlayfairDisplay.txt +93 -0
  501. package/fonts/OFL-SpaceGrotesk.txt +93 -0
  502. package/fonts/PlayfairDisplay-Italic-Variable.ttf +0 -0
  503. package/fonts/PlayfairDisplay-Variable.ttf +0 -0
  504. package/fonts/SpaceGrotesk-Variable.ttf +0 -0
  505. package/package.json +108 -0
@@ -0,0 +1,1772 @@
1
+ /**
2
+ * Core timeline types: sequences, tracks, clips, markers, versions, status.
3
+ *
4
+ * `paramOverrides` values are typed as `unknown` because they come from
5
+ * heterogeneous Input* nodes and cannot be narrowed further at this layer.
6
+ */
7
+ export type ClipStatus = "draft" | "queued" | "generating" | "generated" | "stale" | "failed" | "locked" | "missing";
8
+ import type { BlendMode } from "@nodetool-ai/gpu";
9
+ import type { ClipFadeShape } from "./audioFade.js";
10
+ export type { BlendMode };
11
+ import type { ClipAnimation } from "./animation/types.js";
12
+ import type { TimelineBeat, TimelineSetup, TimelineSetupStage } from "@nodetool-ai/protocol/api-schemas/timeline.js";
13
+ import type { ProductionGenerationSnapshot } from "@nodetool-ai/protocol";
14
+ import type { LineDeliveryRequest } from "./lineDelivery.js";
15
+ export type { TimelineBeat, TimelineSetup, TimelineSetupStage };
16
+ export type { ProductionGenerationSnapshot } from "@nodetool-ai/protocol";
17
+ export interface TimelineSequence {
18
+ id: string;
19
+ projectId: string;
20
+ /** Reserved for Slice 3 sequence-as-workflow. */
21
+ workflowId?: string;
22
+ name: string;
23
+ fps: number;
24
+ width: number;
25
+ height: number;
26
+ durationMs: number;
27
+ tracks: TimelineTrack[];
28
+ /** Flat groups used only to organize the editor's track list. */
29
+ trackFolders?: TimelineTrackFolder[];
30
+ clips: TimelineClip[];
31
+ markers: TimelineMarker[];
32
+ /**
33
+ * Studio transcript lines. Optional so sequences written before Studio
34
+ * existed load with no transcript. Persisted inside the document blob so
35
+ * autosave and export inherit it for free.
36
+ */
37
+ transcript?: TranscriptLine[];
38
+ /**
39
+ * When set, controls whether the script lane + transcript panel are shown.
40
+ * Unset on legacy sequences (treated as enabled if transcript clips exist).
41
+ */
42
+ scriptEnabled?: boolean;
43
+ /**
44
+ * Constant tempo the midi clips are read against. Absent means
45
+ * `DEFAULT_TEMPO` (120 BPM, 4/4, no offset) — see `midi/tempo.ts`.
46
+ */
47
+ tempo?: TimelineTempo;
48
+ /**
49
+ * Guided video-flow state (PRD § 8.5). Absent on every sequence not built
50
+ * through the flow, which is what makes those open straight in the editor.
51
+ */
52
+ setup?: TimelineSetup;
53
+ /**
54
+ * Sequence this one was retargeted from. Absent on a sequence built
55
+ * directly.
56
+ */
57
+ templateId?: string | null;
58
+ /**
59
+ * Subject/object tracks (P0 AI Video, Phase 2). Document-level rather than
60
+ * per-clip because a track is the reusable primitive `TrackBinding`
61
+ * attaches to; each track still owns exactly one `clipId`.
62
+ */
63
+ mediaTracks?: MediaTrack[];
64
+ /** Camera for flat layers placed at different depths. */
65
+ camera2d?: TimelineCamera2D | null;
66
+ createdAt: string;
67
+ updatedAt: string;
68
+ }
69
+ /** Immutable inputs needed to replay one direct text-to-video generation. */
70
+ export interface VideoGenerationRecipe {
71
+ readonly schemaVersion: 1;
72
+ readonly task: "text_to_video";
73
+ readonly prompt: string;
74
+ readonly provider: string;
75
+ readonly model: string;
76
+ readonly durationMs: number;
77
+ readonly negativePrompt?: string;
78
+ readonly aspectRatio?: string;
79
+ readonly resolution?: string;
80
+ readonly width?: number;
81
+ readonly height?: number;
82
+ readonly strength?: number;
83
+ readonly numInferenceSteps?: number;
84
+ readonly seed?: number;
85
+ /** Captured asset ids are serialized through the protocol schema. */
86
+ readonly referenceAssetIds?: string[];
87
+ }
88
+ /**
89
+ * Classification of a caption token. Normal spoken words are `"word"` (the
90
+ * default when absent); `"filler"` marks disfluencies ("um", "uh", "like", …)
91
+ * that filler-word removal can ripple-cut in bulk; `"pause"` marks a silence
92
+ * gap surfaced as an editable token.
93
+ */
94
+ export type CaptionWordKind = "word" | "filler" | "pause";
95
+ /**
96
+ * One word of a caption, timed relative to the *clip start* (clip-local) so
97
+ * splitting or moving a clip never requires rewriting word timings — the
98
+ * timings travel with the clip and stay valid against its new `startMs`.
99
+ */
100
+ export interface CaptionWord {
101
+ word: string;
102
+ startMs: number;
103
+ endMs: number;
104
+ /** Token classification. Absent means a normal spoken word. */
105
+ kind?: CaptionWordKind;
106
+ /** ASR confidence in [0, 1] when the provider reports one. */
107
+ confidence?: number;
108
+ }
109
+ /**
110
+ * Word-level caption data carried directly by the media clip it transcribes
111
+ * (the voiceover audio clip, or an imported audio/video clip). The transcript
112
+ * document is projected from these words, and every text edit maps back to the
113
+ * clip span the words index. A single fixed render style is used for the MVP,
114
+ * so no style fields are persisted yet.
115
+ */
116
+ export interface ClipCaption {
117
+ words: CaptionWord[];
118
+ /** Look of the caption layer. Absent means the built-in default style. */
119
+ style?: CaptionStyle;
120
+ }
121
+ /**
122
+ * Authored look of a caption layer. Every field is optional: an absent one
123
+ * keeps the drawing default, so a caption written before styling existed
124
+ * renders exactly as it did.
125
+ */
126
+ export interface CaptionStyle {
127
+ fontFamily?: string;
128
+ /** Font size as a fraction of frame height. */
129
+ fontSizeFrac?: number;
130
+ /** Colour of inactive words. */
131
+ color?: string;
132
+ /** Colour of the word being spoken. */
133
+ activeColor?: string;
134
+ outline?: {
135
+ color: string;
136
+ widthPx: number;
137
+ };
138
+ /** Distance from the frame bottom as a fraction of frame height. */
139
+ bottomMarginFrac?: number;
140
+ background?: {
141
+ color: string;
142
+ paddingPx: number;
143
+ radiusPx?: number;
144
+ };
145
+ }
146
+ /**
147
+ * Authored text drawn by a timeline text clip. Font size is in sequence
148
+ * pixels, keeping preview and export independent of the editor's CSS scale.
149
+ */
150
+ export interface ClipTextStyle {
151
+ text: string;
152
+ /** SVG path in normalized canvas coordinates for baseline text placement. */
153
+ path?: string;
154
+ fontFamily?: string;
155
+ fontSizePx: number;
156
+ fontWeight?: number;
157
+ color: string;
158
+ align?: "left" | "center" | "right";
159
+ maxWidthFrac?: number;
160
+ /** `"normal"` (default) or `"italic"`. A plain string for forward compat. */
161
+ fontStyle?: string;
162
+ /** Extra advance between glyphs, in sequence px. Default 0. */
163
+ letterSpacingPx?: number;
164
+ /** Line advance as a multiple of the font size. Default 1.2. */
165
+ lineHeight?: number;
166
+ /** `"top" | "middle" | "bottom"`. Default `"middle"`. */
167
+ verticalAlign?: string;
168
+ /** Outline drawn under the fill. */
169
+ stroke?: {
170
+ color: string;
171
+ widthPx: number;
172
+ };
173
+ shadow?: {
174
+ color: string;
175
+ blurPx: number;
176
+ offsetX: number;
177
+ offsetY: number;
178
+ };
179
+ /** Scrim drawn behind the wrapped block. */
180
+ background?: {
181
+ color: string;
182
+ paddingPx: number;
183
+ radiusPx?: number;
184
+ };
185
+ /** Gradient fill. Wins over `color` when set. */
186
+ fill?: ShapeFill;
187
+ }
188
+ /**
189
+ * How a shape or a text run is filled. `solid` is the same thing a plain
190
+ * colour string says; the gradients carry their stops in normalized 0..1
191
+ * offsets so a fill is independent of the shape's size.
192
+ */
193
+ export type ShapeFill = {
194
+ type: "solid";
195
+ color: string;
196
+ } | {
197
+ type: "linear";
198
+ /** Gradient axis in degrees, 0 = left→right. */
199
+ angle: number;
200
+ stops: {
201
+ offset: number;
202
+ color: string;
203
+ }[];
204
+ } | {
205
+ type: "radial";
206
+ stops: {
207
+ offset: number;
208
+ color: string;
209
+ }[];
210
+ };
211
+ /**
212
+ * Every geometry this build draws. `rect`, `ellipse` and `line` are rasterized
213
+ * directly; the rest are drawn by the path renderer. Anything else parses and
214
+ * rides through as an unknown kind (I2); the geometry builder returns no
215
+ * outline for it, so the clip draws nothing, and the validator reports it as
216
+ * `unknown_shape_kind`.
217
+ */
218
+ export declare const CLIP_SHAPE_KINDS: readonly ["rect", "ellipse", "line", "path", "polygon", "star"];
219
+ export type ClipShapeKind = (typeof CLIP_SHAPE_KINDS)[number];
220
+ /** Whether a document's shape `kind` names a geometry this build draws. */
221
+ export declare function isKnownShapeKind(kind: string): kind is ClipShapeKind;
222
+ /** Authored vector-like geometry drawn by a rasterized shape clip. */
223
+ export interface ClipShapeStyle {
224
+ /** Plain string for forward compat (I2) — see {@link CLIP_SHAPE_KINDS}. */
225
+ kind: string;
226
+ fill?: string | ShapeFill;
227
+ stroke?: string;
228
+ strokeWidthPx?: number;
229
+ /** Normalized canvas coordinates for the shape's bounds or line endpoints. */
230
+ x?: number;
231
+ y?: number;
232
+ width?: number;
233
+ height?: number;
234
+ x2?: number;
235
+ y2?: number;
236
+ /** SVG path data in normalized 0..1 space. `kind: "path"` only. */
237
+ d?: string;
238
+ /** Point count for `polygon` and `star`. */
239
+ sides?: number;
240
+ /** Inner radius as a fraction of the outer radius. `star` only. */
241
+ innerRadius?: number;
242
+ /** Corner rounding in normalized units. */
243
+ cornerRadius?: number;
244
+ /** Gradient or solid fill. Wins over `fill` when set. */
245
+ fillStyle?: ShapeFill;
246
+ /** Dash pattern in normalized units, as `ctx.setLineDash` takes it. */
247
+ dash?: number[];
248
+ /** `"butt" | "round" | "square"`. */
249
+ lineCap?: string;
250
+ /** `"miter" | "round" | "bevel"`. */
251
+ lineJoin?: string;
252
+ /** Stroke the sub-range `[trimStart, trimEnd]` of the path, 0..1. Animatable. */
253
+ trimStart?: number;
254
+ trimEnd?: number;
255
+ }
256
+ /**
257
+ * How a `model3d` clip's camera is placed. `orbit` frames the model's bounding
258
+ * sphere; `scene` uses a camera the glTF itself declares.
259
+ */
260
+ export type Model3DCameraMode = "orbit" | "scene";
261
+ /**
262
+ * A `model3d` clip's camera. The orbit terms are the vocabulary
263
+ * `nodetool.model3d.RenderToImage`, the Blender bake job and the model
264
+ * editor's pose already share, so one pose reads the same in all of them.
265
+ */
266
+ export interface ClipModel3DCamera {
267
+ mode: Model3DCameraMode;
268
+ azimuthDeg: number;
269
+ elevationDeg: number;
270
+ fovDeg: number;
271
+ /** Distance multiplier on the auto-framed fit: above 1 moves closer. */
272
+ zoom: number;
273
+ /** Look-at offset from the bounding-sphere center, in world units. */
274
+ targetOffset?: [number, number, number];
275
+ /** `scene` mode: the glTF camera's name; the first camera when absent. */
276
+ sceneCameraName?: string;
277
+ }
278
+ /** Which glTF animation a `model3d` clip plays, and how. */
279
+ export interface ClipModel3DAnimation {
280
+ /** glTF animation name; every animation plays when absent. */
281
+ clipName?: string;
282
+ loop: boolean;
283
+ /** Playback multiplier on top of the clip's own speed and time remap. */
284
+ speed: number;
285
+ }
286
+ /**
287
+ * Everything a `model3d` clip adds on top of its glTF, which is the clip's
288
+ * asset the way an image is an image clip's. Must also exist on the protocol
289
+ * zod schema or PATCH would strip it.
290
+ */
291
+ export interface ClipModel3DStyle {
292
+ camera: ClipModel3DCamera;
293
+ animation: ClipModel3DAnimation;
294
+ lighting: "studio" | "soft" | "flat";
295
+ lightIntensity: number;
296
+ background: {
297
+ transparent: true;
298
+ } | {
299
+ transparent: false;
300
+ color: string;
301
+ };
302
+ /**
303
+ * A Blender render of this clip at a given style. The scene model plays it
304
+ * as video while `dependencyHash` matches the live style; a style edit makes
305
+ * it stale and the live 3D layer draws again.
306
+ */
307
+ bake?: {
308
+ assetId: string;
309
+ dependencyHash: string;
310
+ };
311
+ }
312
+ /**
313
+ * One line of the Studio transcript. Each line owns the clips generated from
314
+ * it (`clipIds` — typically a voiceover audio clip and a caption clip).
315
+ * `beatStartMs` is the line's position on the timeline, recomputed whenever
316
+ * beats are added, removed, reordered, or re-flowed.
317
+ */
318
+ export interface TranscriptLine {
319
+ id: string;
320
+ text: string;
321
+ beatStartMs: number;
322
+ clipIds: string[];
323
+ }
324
+ export interface TimelineTrack {
325
+ id: string;
326
+ name: string;
327
+ type: "video" | "audio" | "overlay" | "subtitle" | "midi";
328
+ index: number;
329
+ /** Optional editor folder. It does not affect rendering or track order. */
330
+ folderId?: string;
331
+ visible: boolean;
332
+ locked: boolean;
333
+ muted?: boolean;
334
+ solo?: boolean;
335
+ /** Pixel height of the track row in the timeline UI. */
336
+ heightPx?: number;
337
+ /**
338
+ * Effect chain applied after the track's primary stage. On `audio` tracks
339
+ * these are DSP effects (gain, EQ, filter, compressor). On `video` tracks
340
+ * these are GPU video effects (color correction, blur, sharpen, vignette,
341
+ * chroma key). Effects are applied in order. The runtime ignores effects
342
+ * whose type doesn't match the track type.
343
+ */
344
+ effects?: TrackEffect[];
345
+ /**
346
+ * The voice every midi clip on this track plays. The track owns the
347
+ * instrument, not the clip, so moving a clip to another midi track changes
348
+ * its sound. Must also exist on the protocol zod schema or PATCH strips it.
349
+ */
350
+ instrument?: MidiInstrument;
351
+ }
352
+ export interface TimelineTrackFolder {
353
+ id: string;
354
+ name: string;
355
+ }
356
+ export type TrackEffect = TrackGainEffect | TrackEq3Effect | TrackFilterEffect | TrackCompressorEffect | TrackColorCorrectionEffect | TrackVideoBlurEffect | TrackSharpenEffect | TrackVignetteEffect | TrackChromaKeyEffect;
357
+ /** Audio-side effect types. */
358
+ export type AudioTrackEffectType = "gain" | "eq3" | "filter" | "compressor";
359
+ /** Video-side effect types. */
360
+ export type VideoTrackEffectType = "colorCorrection" | "videoBlur" | "sharpen" | "vignette" | "chromaKey";
361
+ export interface TrackGainEffect {
362
+ id: string;
363
+ type: "gain";
364
+ enabled: boolean;
365
+ /** Gain in decibels. Default 0. */
366
+ gainDb: number;
367
+ }
368
+ export interface TrackEq3Effect {
369
+ id: string;
370
+ type: "eq3";
371
+ enabled: boolean;
372
+ /** Low-shelf corner frequency in Hz. Default 200. */
373
+ lowFreq: number;
374
+ /** Low-shelf gain in dB. Default 0. */
375
+ lowGainDb: number;
376
+ /** Mid peaking centre frequency in Hz. Default 1000. */
377
+ midFreq: number;
378
+ /** Mid peaking Q. Default 1. */
379
+ midQ: number;
380
+ /** Mid peaking gain in dB. Default 0. */
381
+ midGainDb: number;
382
+ /** High-shelf corner frequency in Hz. Default 5000. */
383
+ highFreq: number;
384
+ /** High-shelf gain in dB. Default 0. */
385
+ highGainDb: number;
386
+ }
387
+ export type TrackFilterMode = "lowpass" | "highpass" | "bandpass";
388
+ export interface TrackFilterEffect {
389
+ id: string;
390
+ type: "filter";
391
+ enabled: boolean;
392
+ mode: TrackFilterMode;
393
+ /** Cutoff or centre frequency in Hz. Default 1000. */
394
+ frequency: number;
395
+ /** Filter Q. Default 1. */
396
+ q: number;
397
+ }
398
+ export interface TrackCompressorEffect {
399
+ id: string;
400
+ type: "compressor";
401
+ enabled: boolean;
402
+ /** Threshold in dB. Default -24. */
403
+ thresholdDb: number;
404
+ /** Compression ratio. Default 4. */
405
+ ratio: number;
406
+ /** Attack time in milliseconds. Default 3. */
407
+ attackMs: number;
408
+ /** Release time in milliseconds. Default 250. */
409
+ releaseMs: number;
410
+ /** Knee in dB. Default 30. */
411
+ kneeDb: number;
412
+ }
413
+ export interface TrackColorCorrectionEffect {
414
+ id: string;
415
+ type: "colorCorrection";
416
+ enabled: boolean;
417
+ /** -1..1, default 0 */
418
+ brightness: number;
419
+ /** 0..4, default 1 */
420
+ contrast: number;
421
+ /** 0..4, default 1 */
422
+ saturation: number;
423
+ /** degrees -180..180, default 0 */
424
+ hue: number;
425
+ /** -1..1 (cool→warm), default 0 */
426
+ temperature: number;
427
+ /** -1..1 (green→magenta), default 0 */
428
+ tint: number;
429
+ /** -1..1, default 0 */
430
+ shadows: number;
431
+ /** -1..1, default 0 */
432
+ highlights: number;
433
+ }
434
+ export interface TrackVideoBlurEffect {
435
+ id: string;
436
+ type: "videoBlur";
437
+ enabled: boolean;
438
+ /** Blur radius in source pixels (0..40 typical). Default 4. */
439
+ radius: number;
440
+ }
441
+ export interface TrackSharpenEffect {
442
+ id: string;
443
+ type: "sharpen";
444
+ enabled: boolean;
445
+ /** Amount of sharpening 0..2. Default 0.5. */
446
+ amount: number;
447
+ /** Edge threshold 0..1. Default 0. */
448
+ threshold: number;
449
+ }
450
+ export interface TrackVignetteEffect {
451
+ id: string;
452
+ type: "vignette";
453
+ enabled: boolean;
454
+ /** Vignette intensity 0..1. Default 0.4. */
455
+ intensity: number;
456
+ /** Outer radius (relative to frame half-diagonal) 0.1..1.5. Default 0.9. */
457
+ radius: number;
458
+ /** Softness of the falloff 0..1. Default 0.5. */
459
+ softness: number;
460
+ }
461
+ export interface TrackChromaKeyEffect {
462
+ id: string;
463
+ type: "chromaKey";
464
+ enabled: boolean;
465
+ /** Key colour as `#rrggbb`. Default `#00ff00`. */
466
+ keyColor: string;
467
+ /** Match tolerance 0..1. Default 0.2. */
468
+ tolerance: number;
469
+ /** Edge softness 0..1. Default 0.1. */
470
+ softness: number;
471
+ /** Spill suppression 0..1. Default 0.5. */
472
+ spill: number;
473
+ }
474
+ /**
475
+ * Discriminator for how a generated clip's media is produced.
476
+ *
477
+ * - `"workflow"` (default when absent): runs a NodeTool workflow via
478
+ * `WorkflowRunner`. The clip carries `workflowId`, `selectedOutputNodeId`,
479
+ * and `paramOverrides`; dependency-hash bookkeeping detects staleness.
480
+ * - `"text-to-image"` / `"image-to-image"`: calls the runner's
481
+ * `generate_media` RPC directly with a model + prompt. No workflow, no
482
+ * param overrides. `sourceClipId` is the input clip for i2i.
483
+ * - `"text-to-video"`: calls the runner's `generate_media` RPC with a video
484
+ * model + prompt. Returns a single `video/mp4` asset.
485
+ * - `"text-to-music"`: generates music as an audio asset.
486
+ * - `"text-to-audio"`: calls the runner's `generate_media` RPC with a TTS
487
+ * model + voice + prompt text. Returns a single audio asset (wav/mp3/...).
488
+ *
489
+ * Optional in the persisted shape so clips written before this field existed
490
+ * default to `"workflow"` on load.
491
+ */
492
+ export type ClipBindingKind = "workflow" | "text-to-image" | "image-to-image" | "text-to-video" | "text-to-audio" | "text-to-music";
493
+ /**
494
+ * What a clip draws. Two members carry no media of their own:
495
+ *
496
+ * - `"group"` is a transform parent its children name with `parentId` (see
497
+ * {@link TimelineClip.parentId}).
498
+ * - `"adjustment"` treats the picture beneath it instead of adding one. Its
499
+ * `effects` run on the composite of every layer drawn below it inside its
500
+ * window, and the treated result blends back over the untreated one with
501
+ * its resolved `opacity`; `mask` limits where that lands, `animations`
502
+ * drive both. It never draws itself and is never a matte source, so
503
+ * `transform` (and with it `borderRadius`, `blendMode`, `matte`) means
504
+ * nothing on one — the surface it treats is already placed.
505
+ */
506
+ export type ClipMediaType = "image" | "video" | "audio" | "overlay" | "text" | "shape" | "model3d" | "group" | "adjustment" | "midi";
507
+ /**
508
+ * One note inside a midi clip. Ticks are counted from the clip's *content*
509
+ * start (MIDI_PPQ = 960 per quarter note), not from its window — the same
510
+ * relationship an audio clip's samples have to its source — so trimming the
511
+ * window hides notes rather than deleting them.
512
+ *
513
+ * Structurally identical to `MidiNote` in `@nodetool-ai/protocol`; pinned by
514
+ * `tests/midi.protocolCompat.test.ts`.
515
+ */
516
+ export interface MidiNote {
517
+ id: string;
518
+ /** MIDI note number, 0..127 (integer). */
519
+ pitch: number;
520
+ /** How hard the note is struck, 1..127 (integer). */
521
+ velocity: number;
522
+ /** Onset in ticks from the clip's content start (integer >= 0). */
523
+ startTick: number;
524
+ /** Held length in ticks (integer > 0). */
525
+ durationTick: number;
526
+ }
527
+ /** The synth a midi track plays. One member today; a union so adding a second
528
+ * synth does not reshape what is already stored. */
529
+ /**
530
+ * The voice a midi track plays.
531
+ *
532
+ * `subtractive` is the built-in synth. The other three are ports of the
533
+ * FableSynth instruments (github.com/georgi/fablesynth): WT-1 the wavetable
534
+ * synth, BL-1 the acid bassline, DR-1 the drum machine.
535
+ */
536
+ export type MidiInstrument = SubtractiveMidiInstrument | WavetableMidiInstrument | BassMidiInstrument | DrumMidiInstrument;
537
+ /** One oscillator through a lowpass filter and an ADSR envelope. */
538
+ export interface SubtractiveMidiInstrument {
539
+ type: "subtractive";
540
+ waveform: "saw" | "square" | "triangle" | "sine";
541
+ attackMs: number;
542
+ decayMs: number;
543
+ /** Sustain level, 0..1 of the peak. */
544
+ sustain: number;
545
+ releaseMs: number;
546
+ cutoffHz: number;
547
+ /** Lowpass Q. */
548
+ resonance: number;
549
+ gainDb: number;
550
+ }
551
+ /** An ADSR envelope, in milliseconds with a 0..1 sustain level. */
552
+ export interface MidiEnvelope {
553
+ attackMs: number;
554
+ decayMs: number;
555
+ /** Sustain level, 0..1 of the peak. */
556
+ sustain: number;
557
+ releaseMs: number;
558
+ }
559
+ /** The filter shapes the FableSynth-derived voices offer. */
560
+ export type MidiFilterType = "lp12" | "lp24" | "bp12" | "hp12" | "notch";
561
+ /** The tonal wavetables WT-1 and BL-1 play. */
562
+ export type MidiWavetableName = "prime" | "bloom" | "pulse" | "vox" | "chime" | "glitch";
563
+ /** DR-1's percussive tables. A pad can also play any tonal table. */
564
+ export type MidiDrumTableName = "thud" | "crack" | "tine" | "grit";
565
+ /** One of WT-1's two wavetable oscillators. */
566
+ export interface WavetableOscillator {
567
+ table: MidiWavetableName;
568
+ /** Morph position across the table's frames, 0..1. */
569
+ position: number;
570
+ /** Offset from the played note, in semitones. */
571
+ semitones: number;
572
+ /** Further offset in cents. */
573
+ fine: number;
574
+ /** Output level, 0..1. */
575
+ level: number;
576
+ /** Detuned copies of the oscillator, 1..7. */
577
+ unison: number;
578
+ /** How far the copies spread, 0..1 (1 = ±50 cents). */
579
+ detune: number;
580
+ }
581
+ /**
582
+ * FableSynth WT-1 — two morphing wavetable oscillators, a sub and noise, into
583
+ * one zero-delay filter swept by a second envelope.
584
+ */
585
+ export interface WavetableMidiInstrument {
586
+ type: "wavetable";
587
+ /** UI parameters from the WT-1 rack that are not part of the render core. */
588
+ fableParams?: Record<string, number>;
589
+ oscA: WavetableOscillator;
590
+ oscB: WavetableOscillator;
591
+ /** Sine sub-oscillator level, 0..1. */
592
+ subLevel: number;
593
+ /** Sub octave below the note: -1 or -2. */
594
+ subOctave: number;
595
+ /** White noise level, 0..1. */
596
+ noiseLevel: number;
597
+ filterType: MidiFilterType;
598
+ cutoffHz: number;
599
+ /** Filter resonance, 0..1. */
600
+ resonance: number;
601
+ /** Anti-aliased tanh drive into the filter, 0..1. */
602
+ drive: number;
603
+ /** How far the mod envelope sweeps the cutoff, in octaves (may be negative). */
604
+ filterEnvAmount: number;
605
+ /** How far the played note tracks the cutoff, 0..1 (1 = one octave/octave). */
606
+ keyTrack: number;
607
+ ampEnv: MidiEnvelope;
608
+ modEnv: MidiEnvelope;
609
+ gainDb: number;
610
+ }
611
+ /**
612
+ * FableSynth BL-1 — a monophonic acid bassline: one wavetable oscillator and a
613
+ * square sub through a resonant filter with its own decay envelope, plus the
614
+ * accent and slide a 303 line is written with.
615
+ */
616
+ export interface BassMidiInstrument {
617
+ type: "bass";
618
+ /** UI parameters from the BL-1 rack that are not part of the render core. */
619
+ fableParams?: Record<string, number>;
620
+ table: MidiWavetableName;
621
+ /** Morph position across the table's frames, 0..1. */
622
+ position: number;
623
+ /** Offset from the played note, in semitones. */
624
+ semitones: number;
625
+ /** Sub-oscillator shape. */
626
+ subShape: "sine" | "square";
627
+ /** Sub octave below the note: -1 or -2. */
628
+ subOctave: number;
629
+ /** Sub level, 0..1. */
630
+ subLevel: number;
631
+ filterType: MidiFilterType;
632
+ cutoffHz: number;
633
+ /** Filter resonance, 0..1. */
634
+ resonance: number;
635
+ /** Anti-aliased tanh drive into the filter, 0..1. */
636
+ drive: number;
637
+ /** How far the filter envelope sweeps the cutoff, in octaves. */
638
+ filterEnvAmount: number;
639
+ /** How far the played note tracks the cutoff, 0..1. */
640
+ keyTrack: number;
641
+ /** Filter envelope attack in ms. */
642
+ filterAttackMs: number;
643
+ /** Filter envelope decay in ms. */
644
+ filterDecayMs: number;
645
+ ampEnv: MidiEnvelope;
646
+ /**
647
+ * How much an accented note (velocity at or above `accentVelocity`) adds:
648
+ * 0..1 scales both its level and its filter sweep.
649
+ */
650
+ accentAmount: number;
651
+ /** The velocity at which a note counts as accented. */
652
+ accentVelocity: number;
653
+ /** How long a note overlapping the one before it glides, in ms. */
654
+ slideMs: number;
655
+ gainDb: number;
656
+ }
657
+ /** One DR-1 pad: a tuned one-shot with its own envelope and filter. */
658
+ export interface DrumPad {
659
+ /** What the pad plays, shown in the editor. */
660
+ name: string;
661
+ table: MidiWavetableName | MidiDrumTableName;
662
+ /** Morph position across the table's frames, 0..1. */
663
+ position: number;
664
+ /** Pitch offset from the pad's base note, in semitones. */
665
+ semitones: number;
666
+ /** How far the pitch envelope starts above the pad's pitch, in semitones. */
667
+ pitchEnvAmount: number;
668
+ /** Pitch envelope decay in ms. */
669
+ pitchEnvDecayMs: number;
670
+ /** Noise level, 0..1. */
671
+ noiseLevel: number;
672
+ /** Noise colour, -1 (dark) to 1 (bright). */
673
+ noiseColor: number;
674
+ /** Ring-modulator carrier in Hz. */
675
+ ringHz: number;
676
+ /** How much of the ring modulator is heard, 0..1. */
677
+ ringMix: number;
678
+ /** Amp envelope attack in ms. */
679
+ attackMs: number;
680
+ /** How long the envelope holds at full before decaying, in ms. */
681
+ holdMs: number;
682
+ /** Amp envelope decay in ms. */
683
+ decayMs: number;
684
+ /** Decay shape, 0 (a straight line) to 1 (exponential). */
685
+ curve: number;
686
+ /** The pad's filter, or null for no filter. */
687
+ filter: {
688
+ type: MidiFilterType;
689
+ cutoffHz: number;
690
+ /** Filter resonance, 0..1. */
691
+ resonance: number;
692
+ } | null;
693
+ /** Pad level, 0..1. */
694
+ level: number;
695
+ /** How much velocity scales the level, 0..1. */
696
+ velocityToLevel: number;
697
+ }
698
+ /**
699
+ * FableSynth DR-1 — sixteen pads, played from `baseNote` upward, one per MIDI
700
+ * note. A note outside that range is silent rather than transposed: a pad is a
701
+ * drum sound, not a pitch.
702
+ */
703
+ export interface DrumMidiInstrument {
704
+ type: "drum";
705
+ /** UI parameters from the DR-1 rack that are not part of the render core. */
706
+ fableParams?: Record<string, number>;
707
+ /** The MIDI note pad 0 answers to. Pads run `baseNote`..`baseNote + 15`. */
708
+ baseNote: number;
709
+ pads: DrumPad[];
710
+ gainDb: number;
711
+ }
712
+ /**
713
+ * Document-level constant tempo. Milliseconds stay the stored master clock, so
714
+ * changing `bpm` rescales every midi clip around `offsetMs` (see
715
+ * `midi/tempo.ts`) and leaves every other clip where it is.
716
+ */
717
+ export interface TimelineTempo {
718
+ bpm: number;
719
+ /** Where beat one sits on the timeline, in ms. */
720
+ offsetMs: number;
721
+ timeSignature: {
722
+ beatsPerBar: number;
723
+ beatUnit: number;
724
+ };
725
+ }
726
+ export interface TimelineClip {
727
+ id: string;
728
+ trackId: string;
729
+ name: string;
730
+ startMs: number;
731
+ durationMs: number;
732
+ inPointMs?: number;
733
+ outPointMs?: number;
734
+ mediaType: ClipMediaType;
735
+ sourceType: "imported" | "generated";
736
+ /** Defaults to "workflow" when absent on legacy persisted data. */
737
+ bindingKind?: ClipBindingKind;
738
+ workflowId?: string;
739
+ selectedOutputNodeId?: string;
740
+ /** Heterogeneous per-clip parameter overrides for the associated workflow. */
741
+ paramOverrides?: Record<string, unknown>;
742
+ prompt?: string;
743
+ negativePrompt?: string;
744
+ provider?: string;
745
+ model?: string;
746
+ /** TTS voice id for `text-to-audio` direct-gen clips. */
747
+ voice?: string;
748
+ /**
749
+ * Speaker label for transcript-bearing clips, from ASR diarization or set
750
+ * manually. Drives per-paragraph speaker headers in the transcript editor.
751
+ */
752
+ speaker?: string;
753
+ /**
754
+ * Groups transcript clips that should read as a single paragraph. Set to the
755
+ * clip's own id when a beat or import is created; `splitClip` copies it, so
756
+ * the two halves of an interior word-deletion (or filler removal) keep
757
+ * reading as one paragraph while distinct authored beats stay separate.
758
+ */
759
+ paragraphId?: string;
760
+ /** Source clip for image-to-image. Reads the source clip's currentAssetId at submit time. */
761
+ sourceClipId?: string | null;
762
+ /**
763
+ * Links this clip to one or more sibling clips. Clips sharing a `linkId`
764
+ * move and trim together (e.g. a video clip and the audio extracted from it).
765
+ * Cleared by "Unlink", or automatically when a link group drops below two
766
+ * members. Independent from `sourceClipId` (image-to-image).
767
+ */
768
+ linkId?: string;
769
+ width?: number;
770
+ height?: number;
771
+ /** Direct-gen video: target aspect ratio, e.g. "16:9". */
772
+ aspectRatio?: string;
773
+ /** Direct-gen video: target resolution tier, e.g. "720p". */
774
+ resolution?: string;
775
+ strength?: number;
776
+ numInferenceSteps?: number;
777
+ seed?: number;
778
+ dependencyHash?: string;
779
+ lastGeneratedHash?: string;
780
+ currentAssetId?: string;
781
+ /**
782
+ * Read-only convenience alias: when set, equals the `id` of the entry in
783
+ * `versions` whose `assetId === currentAssetId` (P0 AI Video, PRD § 8.10).
784
+ * `currentAssetId` stays the source of truth everywhere else; this field is
785
+ * kept in sync by `select_take`/`selectTake` and by generation completion.
786
+ */
787
+ activeTakeId?: string;
788
+ thumbnailAssetId?: string;
789
+ waveformAssetId?: string;
790
+ /**
791
+ * Storyboard provenance: the board/shot this clip was assembled from.
792
+ * Lets a shot revision on the storyboard round-trip into the cut (the
793
+ * revised clip asset replaces this clip's currentAssetId). Both fields must
794
+ * also exist on the protocol zod schema or PATCH would strip them.
795
+ */
796
+ storyboardBoardId?: string;
797
+ storyboardShotId?: string;
798
+ /**
799
+ * Script provenance: the script/line this voiceover clip was assembled from.
800
+ * Lets a re-voiced line round-trip its new take into the assembled sequence
801
+ * (the take asset replaces this clip's currentAssetId, duration, caption).
802
+ * Both fields must also exist on the protocol zod schema or PATCH strips them.
803
+ */
804
+ scriptId?: string;
805
+ scriptLineId?: string;
806
+ /**
807
+ * The guided-setup beat this clip was generated from (PRD § 8.5). Reading it
808
+ * back is what lets a finished timeline show the plan that produced it. Also
809
+ * on the protocol zod schema, or PATCH strips it.
810
+ */
811
+ beatId?: string;
812
+ status: ClipStatus;
813
+ locked: boolean;
814
+ muted?: boolean;
815
+ hidden?: boolean;
816
+ versions: ClipVersion[];
817
+ /**
818
+ * Opacity in the range [0, 1]. Default: 1. On an `adjustment` clip it is how
819
+ * much of the treated composite is kept: 1 is fully treated, 0 a no-op.
820
+ */
821
+ opacity?: number;
822
+ blendMode?: BlendMode;
823
+ /** Playback speed multiplier. Default: 1. */
824
+ speedMultiplier?: number;
825
+ /** Whether the speed change has been baked into the asset. */
826
+ speedBaked?: boolean;
827
+ /** Audio volume in dB. Default: 0. */
828
+ volumeDb?: number;
829
+ /** Duration of the fade-in effect in milliseconds. */
830
+ fadeInMs?: number;
831
+ /** Duration of the fade-out effect in milliseconds. */
832
+ fadeOutMs?: number;
833
+ /** Curve the fade-in ramps along. Absent is `linear`. */
834
+ fadeInShape?: ClipFadeShape;
835
+ /** Curve the fade-out ramps along. Absent is `linear`. */
836
+ fadeOutShape?: ClipFadeShape;
837
+ /**
838
+ * Word-level caption data carried by the media clip it transcribes — the
839
+ * voiceover audio clip, or an imported audio/video clip. When set, the clip
840
+ * contributes a caption layer (drawn on top) in both the live preview and
841
+ * the export, in addition to any visual media it draws. The transcript
842
+ * editor projects its document from these words.
843
+ */
844
+ caption?: ClipCaption;
845
+ /** Authored content for a rasterized text clip. */
846
+ textStyle?: ClipTextStyle;
847
+ /** Authored geometry for a rasterized shape clip. */
848
+ shapeStyle?: ClipShapeStyle;
849
+ /** Camera, animation and look for a `model3d` clip. */
850
+ model3dStyle?: ClipModel3DStyle;
851
+ /**
852
+ * 2D placement on the preview canvas. Default: identity (centered,
853
+ * contain-fit). Ignored on an `adjustment` clip, which draws no picture of
854
+ * its own: it treats the composite beneath it, already placed.
855
+ */
856
+ transform?: ClipTransform;
857
+ /** Position derived from other clips' measured boxes at render time. */
858
+ layout?: ClipLayout;
859
+ /** Repeated copies of this visual clip, each offset in space, time, and tint. */
860
+ repeater?: ClipRepeater;
861
+ /** Clip-specific shutter, independent of the render-wide setting. */
862
+ motionBlur?: {
863
+ samplesPerFrame: number;
864
+ shutterAngle: number;
865
+ };
866
+ /** Quantize this clip's animation and source clock to a chosen frame rate. */
867
+ steppedTime?: {
868
+ fps: number;
869
+ };
870
+ /** Earlier instances drawn under the current clip. */
871
+ temporalEcho?: {
872
+ copies: number;
873
+ intervalMs: number;
874
+ opacityDecay: number;
875
+ };
876
+ /** Rounded-corner radius in source pixels. 0 = sharp corners. */
877
+ borderRadius?: number;
878
+ /**
879
+ * Crop the source before anything else reads it. The kept rectangle becomes
880
+ * the clip's picture, so the contain fit, the transform, the border radius,
881
+ * the masks and the effects all apply to the cropped frame.
882
+ */
883
+ crop?: ClipCrop;
884
+ /**
885
+ * GPU effects applied to this clip in order. On an `adjustment` clip they
886
+ * run on the composite of the layers beneath it instead of on its own
887
+ * pixels.
888
+ */
889
+ effects?: ClipEffect[];
890
+ /**
891
+ * Transition into this clip from the previously-overlapping clip on the
892
+ * same track. The two clips must overlap in time by at least
893
+ * `durationMs` for the transition to be visible.
894
+ */
895
+ transitionIn?: ClipTransition;
896
+ /**
897
+ * Motion-design animations evaluated at render time (see
898
+ * `animation/`). Evaluation is order-independent (the fold is commutative —
899
+ * see `animation/sample.ts`); array order is presentation order in the UI
900
+ * only. Must also exist on the protocol zod schema or PATCH would strip it.
901
+ */
902
+ animations?: ClipAnimation[];
903
+ /** Declarative links and deterministic wiggle evaluated while rendering. */
904
+ animationLinks?: import("./animation/links.js").AnimationLink[];
905
+ /**
906
+ * Group this clip belongs to. The parent's transform composes with this
907
+ * clip's, its opacity multiplies, and its window clips this one. Must name a
908
+ * clip with `mediaType: "group"`; a missing or cyclic parent is a validator
909
+ * error and renders unparented.
910
+ */
911
+ parentId?: string;
912
+ /**
913
+ * Shape mask applied to this layer before it is blended. On an `adjustment`
914
+ * clip it is in frame space (the surface being treated) rather than the
915
+ * layer's own, and limits where the treatment lands.
916
+ */
917
+ mask?: ClipMask;
918
+ /** Track matte: another clip's alpha or luma drives this layer's alpha. */
919
+ matte?: ClipMatte;
920
+ /**
921
+ * A matte generated from this clip's own source — subject cutout, sky
922
+ * replacement — as an attribute of the clip rather than a second clip (D2).
923
+ * It therefore shares the in-point, speed, window and time remap by
924
+ * construction, so every trim, split and move keeps it aligned.
925
+ */
926
+ generatedMatte?: ClipGeneratedMatte;
927
+ /**
928
+ * Follows a `MediaTrack` on the document (P0 AI Video, Phase 2). A clip
929
+ * follows at most one track in this pass — a text clip whose position
930
+ * follows one track while its mask follows another is out of scope.
931
+ */
932
+ trackBinding?: TrackBinding;
933
+ /**
934
+ * Source-time framing instructions for format adaptations. The resolved crop
935
+ * is derived during scene construction, so preview and export consume the
936
+ * same ordinary {@link ClipCrop} at each frame.
937
+ */
938
+ reframe?: ClipReframe;
939
+ /** Retime the clip's source. Replaces `speedMultiplier` when set. */
940
+ timeRemap?: ClipTimeRemap;
941
+ /** Composition provenance, stamped by `insert_composition`. */
942
+ compositionId?: string;
943
+ /** Parameter values the composition was instantiated with. */
944
+ compositionParams?: Record<string, number | string | boolean>;
945
+ /**
946
+ * Notes carried inline by a `midi` clip, in content ticks. `inPointMs` /
947
+ * `durationMs` are the window over them, exactly as they are the window over
948
+ * an audio clip's source: a trim hides notes, it does not delete them. Must
949
+ * also exist on the protocol zod schema or PATCH strips it.
950
+ */
951
+ notes?: MidiNote[];
952
+ }
953
+ /**
954
+ * A shape mask on one clip, in the layer's own normalized 0..1 space so it
955
+ * rotates and scales with the layer. `kind` is a plain string for the same
956
+ * forward compat `preset` has: an unknown kind parses and is skipped.
957
+ */
958
+ /**
959
+ * The part of the source a clip keeps, as the fraction of each edge thrown
960
+ * away. `{ left: 0.25, right: 0.25, top: 0, bottom: 0 }` keeps the middle half
961
+ * of the picture.
962
+ *
963
+ * **A crop reframes, it does not knock out.** The kept rectangle *becomes* the
964
+ * clip's picture: it is re-fit to the canvas, so cropping a 16:9 shot to 1:1
965
+ * and leaving the transform alone gives a square that fills the frame the way
966
+ * a 1:1 source would. Hiding part of a layer while it stays where it was is
967
+ * {@link ClipMask} with `kind: "rect"`, which is a different edit and stays
968
+ * the way to ask for it.
969
+ *
970
+ * The insets are fractions rather than source pixels so a crop survives the
971
+ * asset under it changing resolution — an upscale, or `restoreVersion` swapping
972
+ * in a generation rendered at another size. Both compositors read them through
973
+ * `cropRectPx`, which is where the clamping lives; an inset pair that leaves no
974
+ * picture (`left + right >= 1`) is reported by the validator as
975
+ * `crop_degenerate` and renders uncropped rather than blanking the shot.
976
+ */
977
+ export interface ClipCrop {
978
+ /** Fraction of the source width dropped from the left edge, 0..1. */
979
+ left: number;
980
+ /** Fraction of the source width dropped from the right edge, 0..1. */
981
+ right: number;
982
+ /** Fraction of the source height dropped from the top edge, 0..1. */
983
+ top: number;
984
+ /** Fraction of the source height dropped from the bottom edge, 0..1. */
985
+ bottom: number;
986
+ }
987
+ export interface ClipMask {
988
+ /** `"rect" | "ellipse" | "path"`. */
989
+ kind: string;
990
+ x?: number;
991
+ y?: number;
992
+ width?: number;
993
+ height?: number;
994
+ /** Corner radius in source pixels for a rectangular mask. */
995
+ radiusPx?: number;
996
+ /** SVG path data in normalized 0..1 space. `kind: "path"` only. */
997
+ d?: string;
998
+ /** Feathered edge width in source px. 0 = hard edge. */
999
+ featherPx?: number;
1000
+ /** Keep what the mask excludes instead of what it covers. */
1001
+ invert?: boolean;
1002
+ }
1003
+ /**
1004
+ * Track matte: `sourceClipId` names the clip whose pixels drive this layer's
1005
+ * alpha. A matte source never draws itself.
1006
+ */
1007
+ export interface ClipMatte {
1008
+ sourceClipId: string;
1009
+ /** `"alpha" | "luma"`. */
1010
+ mode: string;
1011
+ invert?: boolean;
1012
+ }
1013
+ /**
1014
+ * A matte generated from a clip's own source, carried on that clip (D2).
1015
+ *
1016
+ * The asset is a luma mask video cut from `sourceAssetId` frame for frame, so
1017
+ * it is read at the clip's own source time — the in-point, the speed and a time
1018
+ * remap all apply to it exactly as they apply to the picture. That is what
1019
+ * makes it survive a trim or a split with no re-generation and no second clip
1020
+ * to keep in sync.
1021
+ */
1022
+ export interface ClipGeneratedMatte {
1023
+ /** The mask video asset in use (luma, same frame rate and duration as the source asset it was cut from). */
1024
+ assetId: string;
1025
+ /** The source clip asset the matte was generated from; a mismatch with `currentAssetId` means stale. */
1026
+ sourceAssetId: string;
1027
+ /** Source interval the generation covered, in source ms. */
1028
+ sourceRange: {
1029
+ fromMs: number;
1030
+ toMs: number;
1031
+ };
1032
+ /** Provider/model/resolution knobs the generation ran with. Provenance only. */
1033
+ settings: Record<string, number | string | boolean>;
1034
+ invert?: boolean;
1035
+ /** 0..1 multiplier on the matte's alpha; default 1. */
1036
+ strength?: number;
1037
+ featherPx?: number;
1038
+ /** Earlier results, newest first, so a regenerate can be undone. */
1039
+ versions?: {
1040
+ assetId: string;
1041
+ sourceAssetId: string;
1042
+ createdAt: string;
1043
+ jobId?: string;
1044
+ settings: Record<string, number | string | boolean>;
1045
+ }[];
1046
+ status?: "ready" | "generating" | "failed";
1047
+ }
1048
+ /**
1049
+ * One sample of a subject/object track (P0 AI Video, Phase 2), anchored to
1050
+ * the tracked clip's source clock — the same clock `ClipGeneratedMatte` and a
1051
+ * source-anchored custom animation curve use, and read back at
1052
+ * `clipSourceMsAt` for the same reason: so speed changes and a time remap
1053
+ * move the tracked point the way they move the footage.
1054
+ *
1055
+ * `kind: "box"` tracks read `x`/`y`/`width`/`height`; `"point"` reads `x`/`y`
1056
+ * only; `"quad"` reads the four corners; `"mask"` reads `maskAssetId`, a
1057
+ * per-sample matte rather than a per-track one. A sample carries only the
1058
+ * fields its track's `kind` uses — the validator's job, not this shape's.
1059
+ */
1060
+ export interface MediaTrackSample {
1061
+ sourceMs: number;
1062
+ /** Normalized 0..1, box/point tracks. */
1063
+ x?: number;
1064
+ /** Normalized 0..1, box/point tracks. */
1065
+ y?: number;
1066
+ /** Normalized 0..1, box tracks. */
1067
+ width?: number;
1068
+ /** Normalized 0..1, box tracks. */
1069
+ height?: number;
1070
+ /** Radians. */
1071
+ rotation?: number;
1072
+ /** Four corners, normalized 0..1, `[x0,y0,x1,y1,x2,y2,x3,y3]`. `"quad"` tracks. */
1073
+ quad?: [number, number, number, number, number, number, number, number];
1074
+ /** A per-sample matte asset. `"mask"` tracks. */
1075
+ maskAssetId?: string;
1076
+ /** 0..1, this sample's own confidence, when the provider stated one. */
1077
+ confidence?: number;
1078
+ }
1079
+ /**
1080
+ * A subject/object track: source-time-anchored samples of one subject moving
1081
+ * through one clip's source (P0 AI Video, Phase 2). Document-level (`clipId`
1082
+ * names the clip it was cut from) rather than a clip attribute, because it is
1083
+ * the reusable primitive `TrackBinding` names — unlike `ClipGeneratedMatte`,
1084
+ * which stays a clip attribute because nothing else ever points at it.
1085
+ *
1086
+ * `sourceAssetId` is for staleness detection the same way `ClipGeneratedMatte`
1087
+ * uses it: a mismatch with the clip's current asset means the track describes
1088
+ * a picture the clip no longer shows.
1089
+ */
1090
+ export interface MediaTrack {
1091
+ id: string;
1092
+ /** The clip this track was cut from. Exactly one track per `clipId` slot —
1093
+ * a clip split in two gets one resliced track per half, not a shared one. */
1094
+ clipId: string;
1095
+ sourceAssetId: string;
1096
+ name: string;
1097
+ kind: "point" | "box" | "quad" | "mask";
1098
+ sourceStartMs: number;
1099
+ sourceEndMs: number;
1100
+ /** Sorted ascending by `sourceMs`. */
1101
+ samples: MediaTrackSample[];
1102
+ /** Overall track confidence, when the provider stated one. */
1103
+ confidence?: number;
1104
+ status: "ready" | "generating" | "stale" | "failed";
1105
+ provenance?: {
1106
+ provider?: string;
1107
+ model?: string;
1108
+ settings?: Record<string, unknown>;
1109
+ };
1110
+ }
1111
+ /**
1112
+ * A clip following a `MediaTrack` (P0 AI Video, Phase 2). Only
1113
+ * `"position"`/`"position_scale"` are folded into the scene model in this
1114
+ * pass (`render/sceneModel.ts`'s `resolveAnimatedLayerProps`); `"transform"`,
1115
+ * `"mask"` and `"effect_region"` remain reserved. Smart Reframe uses the
1116
+ * first-class `clip.reframe` model instead of this binding so it can combine a
1117
+ * track, an automatic path and manual source-time corrections.
1118
+ */
1119
+ export interface TrackBinding {
1120
+ trackId: string;
1121
+ mode: "position" | "position_scale" | "transform" | "mask" | "effect_region" | "reframe";
1122
+ offset?: {
1123
+ x: number;
1124
+ y: number;
1125
+ };
1126
+ scale?: number;
1127
+ rotationOffset?: number;
1128
+ /**
1129
+ * 0..1. Applied as an exponential moving average over the track's own
1130
+ * recorded samples, then interpolated at the sampled source time
1131
+ * (`applySmoothingToSample`), not as a frame-to-frame filter —
1132
+ * `resolveAnimatedLayerProps` is a pure,
1133
+ * stateless function of `(clip, timeMs)` with no memory of the previous
1134
+ * frame, so smoothing is a property of the curve read at a point rather
1135
+ * than of playback. 0 or absent samples the track exactly.
1136
+ */
1137
+ smoothing?: number;
1138
+ }
1139
+ /** One point in an automatically solved framing path, in source time. */
1140
+ export interface ReframeSample {
1141
+ sourceMs: number;
1142
+ /** Desired crop centre, normalized to the source frame. */
1143
+ x: number;
1144
+ /** Desired crop centre, normalized to the source frame. */
1145
+ y: number;
1146
+ /** Optional normalized subject bounds used by inspection and future solvers. */
1147
+ width?: number;
1148
+ height?: number;
1149
+ confidence?: number;
1150
+ }
1151
+ /** A user-authored correction to the automatic framing path. */
1152
+ export interface ReframeKeyframe {
1153
+ sourceMs: number;
1154
+ /** Desired crop centre, normalized to the source frame. */
1155
+ x: number;
1156
+ /** Desired crop centre, normalized to the source frame. */
1157
+ y: number;
1158
+ /** Crop zoom, where 1 keeps the largest target-aspect crop. */
1159
+ zoom?: number;
1160
+ }
1161
+ export type ReframeMode = "center" | "auto" | "track";
1162
+ /**
1163
+ * Nondestructive smart-framing state. Automatic samples and manual keyframes
1164
+ * are anchored to source time, so trims, speed changes and time remaps all
1165
+ * resolve through the same source clock as video seeking.
1166
+ */
1167
+ export interface ClipReframe {
1168
+ mode: ReframeMode;
1169
+ /** Required by `track`; absent on centre and provider-solved auto paths. */
1170
+ trackId?: string;
1171
+ /** Fraction of the target crop reserved around the followed subject. */
1172
+ safeMargin?: number;
1173
+ /** Exponential moving-average factor applied to a source MediaTrack. */
1174
+ smoothing?: number;
1175
+ /** Provider- or heuristic-produced importance path, in source time. */
1176
+ samples?: ReframeSample[];
1177
+ /** User corrections. They offset, rather than replace, the automatic path. */
1178
+ keyframes?: ReframeKeyframe[];
1179
+ /** Asset whose analysis produced `samples`; used only for staleness. */
1180
+ sourceAssetId?: string;
1181
+ /** Source dimensions captured when an adaptation is derived. */
1182
+ sourceWidth?: number;
1183
+ sourceHeight?: number;
1184
+ }
1185
+ /**
1186
+ * Retimes a clip's source. `t` is normalized 0..1 over the clip's own window
1187
+ * and must ascend; `sourceMs` may descend, which is reverse playback. A clip
1188
+ * carrying a remap cannot be split or trimmed until it is baked.
1189
+ */
1190
+ export interface ClipTimeRemap {
1191
+ keyframes: {
1192
+ t: number;
1193
+ sourceMs: number;
1194
+ easing?: string;
1195
+ }[];
1196
+ }
1197
+ /**
1198
+ * Per-clip incoming transition, resolved for both the incoming clip and the
1199
+ * outgoing clip it overlaps on the same track. `easing` takes the same string
1200
+ * grammar animations take; an unparseable one falls back to linear.
1201
+ */
1202
+ export type ClipTransition = KnownClipTransition | UnknownClipTransition;
1203
+ /** The cuts this build draws, each spelled out field by field. */
1204
+ export type KnownClipTransition = ClipCrossfadeTransition | ClipDipToColorTransition | ClipWipeTransition | ClipPushTransition | ClipSlideTransition | ClipZoomTransition | ClipWhipTransition | ClipZoomBlurTransition | ClipGlitchTransition | ClipGradientWipeTransition | ClipIrisTransition | ClipLightLeakTransition;
1205
+ /**
1206
+ * A cut whose `type` this build does not draw, carried rather than refused
1207
+ * (I2). `resolveTransition` cross-fades it and the validator reports
1208
+ * `unknown_transition`; the fields the authoring build wrote survive the round
1209
+ * trip under the index signature, so saving the document does not strip them.
1210
+ *
1211
+ * Its `type` is a plain `string`, so a `type === "wipe"` test narrows this
1212
+ * member in too. Readers that want a field only some types carry check the
1213
+ * value with `typeof` rather than trusting the narrowing.
1214
+ */
1215
+ export interface UnknownClipTransition {
1216
+ type: string;
1217
+ durationMs: number;
1218
+ easing?: string;
1219
+ [key: string]: unknown;
1220
+ }
1221
+ export interface ClipCrossfadeTransition {
1222
+ type: "crossfade";
1223
+ /** Length of the cross-fade in milliseconds. */
1224
+ durationMs: number;
1225
+ easing?: string;
1226
+ }
1227
+ /** Both clips fade through a solid colour that peaks at the midpoint. */
1228
+ export interface ClipDipToColorTransition {
1229
+ type: "dipToColor";
1230
+ durationMs: number;
1231
+ color: string;
1232
+ easing?: string;
1233
+ }
1234
+ /** The incoming clip is revealed behind a feathered edge. */
1235
+ export interface ClipWipeTransition {
1236
+ type: "wipe";
1237
+ durationMs: number;
1238
+ /** Edge the reveal starts from: `"left" | "right" | "up" | "down"`. */
1239
+ direction: string;
1240
+ /** Feathered edge width as a fraction of the wipe axis. 0 = hard edge. */
1241
+ softness?: number;
1242
+ easing?: string;
1243
+ }
1244
+ /** The incoming clip pushes the outgoing one off the frame. */
1245
+ export interface ClipPushTransition {
1246
+ type: "push";
1247
+ durationMs: number;
1248
+ direction: string;
1249
+ easing?: string;
1250
+ }
1251
+ /** The incoming clip slides in over a stationary outgoing one. */
1252
+ export interface ClipSlideTransition {
1253
+ type: "slide";
1254
+ durationMs: number;
1255
+ direction: string;
1256
+ easing?: string;
1257
+ }
1258
+ /** The outgoing clip scales up while the incoming one scales in. */
1259
+ export interface ClipZoomTransition {
1260
+ type: "zoom";
1261
+ durationMs: number;
1262
+ easing?: string;
1263
+ }
1264
+ export interface ClipWhipTransition {
1265
+ type: "whip";
1266
+ durationMs: number;
1267
+ direction: string;
1268
+ blur?: number;
1269
+ easing?: string;
1270
+ }
1271
+ export interface ClipZoomBlurTransition {
1272
+ type: "zoomBlur";
1273
+ durationMs: number;
1274
+ blur?: number;
1275
+ easing?: string;
1276
+ }
1277
+ export interface ClipGlitchTransition {
1278
+ type: "glitch";
1279
+ durationMs: number;
1280
+ amount?: number;
1281
+ easing?: string;
1282
+ }
1283
+ export interface ClipGradientWipeTransition {
1284
+ type: "gradientWipe";
1285
+ durationMs: number;
1286
+ direction: string;
1287
+ softness?: number;
1288
+ map?: "linear" | "radial" | "noise";
1289
+ scale?: number;
1290
+ seed?: number;
1291
+ easing?: string;
1292
+ }
1293
+ export interface ClipIrisTransition {
1294
+ type: "iris";
1295
+ durationMs: number;
1296
+ softness?: number;
1297
+ easing?: string;
1298
+ }
1299
+ export interface ClipLightLeakTransition {
1300
+ type: "lightLeak";
1301
+ durationMs: number;
1302
+ color?: string;
1303
+ scale?: number;
1304
+ seed?: number;
1305
+ easing?: string;
1306
+ }
1307
+ /**
1308
+ * 2D transform applied per clip in the GPU compositor.
1309
+ * - `position` is in canvas pixels relative to the canvas center.
1310
+ * - `scale` multiplies the contain-fit base scale (1 = fit, 2 = 2x).
1311
+ * - `rotation` is in radians.
1312
+ * - `anchor` is the rotation/scale pivot in normalized [0,1] coords (0.5 = center).
1313
+ */
1314
+ export interface ClipTransform {
1315
+ position: {
1316
+ x: number;
1317
+ y: number;
1318
+ };
1319
+ scale: {
1320
+ x: number;
1321
+ y: number;
1322
+ };
1323
+ rotation: number;
1324
+ /** CSS-style X/Y rotations in degrees. */
1325
+ rotationX?: number;
1326
+ rotationY?: number;
1327
+ /** Distance from the picture plane in pixels. */
1328
+ perspective?: number;
1329
+ /** Distance toward the camera in sequence pixels. Positive is closer. */
1330
+ depthPx?: number;
1331
+ anchor: {
1332
+ x: number;
1333
+ y: number;
1334
+ };
1335
+ }
1336
+ export interface TimelineCamera2D {
1337
+ position: {
1338
+ x: number;
1339
+ y: number;
1340
+ };
1341
+ depthPx: number;
1342
+ /** Perspective distance from camera to the image plane, in pixels. */
1343
+ focalLengthPx: number;
1344
+ /** Depth plane in focus, in the same coordinates as ClipTransform.depthPx. */
1345
+ focusDepthPx?: number;
1346
+ /** Maximum circle of confusion at one focal length from focus, in pixels. */
1347
+ aperturePx?: number;
1348
+ /** Absolute timeline time, with linear interpolation between poses. */
1349
+ keyframes?: {
1350
+ timeMs: number;
1351
+ position: {
1352
+ x: number;
1353
+ y: number;
1354
+ };
1355
+ depthPx: number;
1356
+ focusDepthPx?: number;
1357
+ aperturePx?: number;
1358
+ }[];
1359
+ }
1360
+ export interface ClipLayout {
1361
+ /** A row or vertical stack containing the named clips in this order. */
1362
+ kind: "row" | "stack" | "relative";
1363
+ children?: string[];
1364
+ gapPx?: number;
1365
+ /** Relative mode places this clip against another clip's resolved box. */
1366
+ targetClipId?: string;
1367
+ side?: "left" | "right" | "above" | "below" | "center";
1368
+ /** Fit this clip's visual box to its text plus padding. */
1369
+ fitText?: {
1370
+ paddingXPx: number;
1371
+ paddingYPx: number;
1372
+ };
1373
+ }
1374
+ export interface ClipRepeater {
1375
+ count: number;
1376
+ positionStep: {
1377
+ x: number;
1378
+ y: number;
1379
+ };
1380
+ /** Number of columns before copies wrap to the next row. */
1381
+ columns?: number;
1382
+ /** Offset applied for each new row when `columns` is set. */
1383
+ rowStep?: {
1384
+ x: number;
1385
+ y: number;
1386
+ };
1387
+ timeStepMs: number;
1388
+ /** Per-copy hue rotation and brightness change, applied to any media. */
1389
+ colorStep?: {
1390
+ hueDegrees: number;
1391
+ brightness?: number;
1392
+ };
1393
+ }
1394
+ /**
1395
+ * Effects a clip applies in order. Every member carries `id` and `enabled`:
1396
+ * the compositor filters the chain on `enabled` and pools intermediates per
1397
+ * effect, so both are part of the union's shared shape.
1398
+ */
1399
+ export type ClipEffect = KnownClipEffect | UnknownClipEffect;
1400
+ /** The effects this build applies, each spelled out field by field. */
1401
+ export type KnownClipEffect = ClipColorEffect | ClipBlurEffect | ClipGlowEffect | ClipDropShadowEffect | ClipVignetteEffect | ClipSharpenEffect | ClipChromaKeyEffect | ClipCurvesEffect | ClipLevelsEffect | ClipLiftGammaGainEffect | ClipGrainEffect | ClipPixelateEffect | ClipPosterizeEffect | ClipDirectionalBlurEffect | ClipLensDistortionEffect | ClipStylizeEffect | ClipGeneratorEffect | ClipLutEffect;
1402
+ /**
1403
+ * An effect whose `type` this build does not apply, carried rather than
1404
+ * refused (I2). `id` and `enabled` are the shared shape every compositor
1405
+ * addresses the chain by; the parameters the authoring build wrote survive the
1406
+ * round trip under the index signature. Canvas 2D already names an
1407
+ * unapplied type in `unsupportedEffectTypes`, so it is reported, not dropped.
1408
+ *
1409
+ * As with {@link UnknownClipTransition}, its `type` is a plain `string`: a
1410
+ * `type === "blur"` test does not exclude this member, so the narrowing
1411
+ * predicates below are what readers use to reach a known effect's fields.
1412
+ */
1413
+ export interface UnknownClipEffect {
1414
+ id: string;
1415
+ type: string;
1416
+ enabled: boolean;
1417
+ [key: string]: unknown;
1418
+ }
1419
+ /**
1420
+ * Narrow the chain to one known effect type. A plain `e.type === "color"` no
1421
+ * longer does it: {@link UnknownClipEffect} carries a `string` type, so it
1422
+ * survives that test and its index signature turns every field read into
1423
+ * `unknown`. These predicates keep the reads typed.
1424
+ */
1425
+ export declare const isClipColorEffect: (e: ClipEffect) => e is ClipColorEffect;
1426
+ export declare const isClipBlurEffect: (e: ClipEffect) => e is ClipBlurEffect;
1427
+ export declare const isClipGlowEffect: (e: ClipEffect) => e is ClipGlowEffect;
1428
+ export declare const isClipDropShadowEffect: (e: ClipEffect) => e is ClipDropShadowEffect;
1429
+ export declare const isClipVignetteEffect: (e: ClipEffect) => e is ClipVignetteEffect;
1430
+ export declare const isClipSharpenEffect: (e: ClipEffect) => e is ClipSharpenEffect;
1431
+ export declare const isClipChromaKeyEffect: (e: ClipEffect) => e is ClipChromaKeyEffect;
1432
+ export declare const isClipCurvesEffect: (e: ClipEffect) => e is ClipCurvesEffect;
1433
+ export declare const isClipLevelsEffect: (e: ClipEffect) => e is ClipLevelsEffect;
1434
+ export declare const isClipLiftGammaGainEffect: (e: ClipEffect) => e is ClipLiftGammaGainEffect;
1435
+ export declare const isClipGrainEffect: (e: ClipEffect) => e is ClipGrainEffect;
1436
+ /**
1437
+ * Effect types this build applies. Anything else parses and rides through as an
1438
+ * {@link UnknownClipEffect} (I2); the validator reports it as `unknown_effect`
1439
+ * and Canvas 2D names it in `unsupportedEffectTypes`.
1440
+ */
1441
+ export declare const CLIP_EFFECT_TYPES: readonly ["color", "blur", "glow", "dropShadow", "vignette", "sharpen", "chromaKey", "curves", "levels", "liftGammaGain", "grain", "pixelate", "posterize", "directionalBlur", "lensDistortion", "stylize", "generator", "lut"];
1442
+ export type ClipEffectType = (typeof CLIP_EFFECT_TYPES)[number];
1443
+ /** Narrow a document's effect `type` to one this build applies, or `null`. */
1444
+ export declare function parseClipEffectType(type: string): ClipEffectType | null;
1445
+ /** One control point of a tone curve. Both axes are normalized 0..1. */
1446
+ export interface CurvePoint {
1447
+ x: number;
1448
+ y: number;
1449
+ }
1450
+ export interface ClipColorEffect {
1451
+ id: string;
1452
+ type: "color";
1453
+ enabled: boolean;
1454
+ /** -1..1, default 0 */
1455
+ brightness?: number;
1456
+ /** 0..4, default 1 */
1457
+ contrast?: number;
1458
+ /** 0..4, default 1 */
1459
+ saturation?: number;
1460
+ /** degrees -180..180, default 0 */
1461
+ hue?: number;
1462
+ /** -1..1 (cool→warm), default 0 */
1463
+ temperature?: number;
1464
+ /** -1..1 (green→magenta), default 0 */
1465
+ tint?: number;
1466
+ /** -1..1, default 0 */
1467
+ shadows?: number;
1468
+ /** -1..1, default 0 */
1469
+ highlights?: number;
1470
+ }
1471
+ export interface ClipBlurEffect {
1472
+ id: string;
1473
+ type: "blur";
1474
+ enabled: boolean;
1475
+ /** Blur radius in source pixels (up to 256 in the GPU exporter). */
1476
+ radius: number;
1477
+ /** Optional Gaussian sigma. Defaults to radius / 3. */
1478
+ sigma?: number;
1479
+ }
1480
+ export interface ClipPixelateEffect {
1481
+ id: string;
1482
+ type: "pixelate";
1483
+ enabled: boolean;
1484
+ /** Square cell width in source pixels. */
1485
+ cellSize: number;
1486
+ }
1487
+ export interface ClipPosterizeEffect {
1488
+ id: string;
1489
+ type: "posterize";
1490
+ enabled: boolean;
1491
+ /** Number of channel levels, from 2 to 256. */
1492
+ levels: number;
1493
+ }
1494
+ export interface ClipDirectionalBlurEffect {
1495
+ id: string;
1496
+ type: "directionalBlur";
1497
+ enabled: boolean;
1498
+ /** Blur radius in source pixels. */
1499
+ radius: number;
1500
+ /** Direction of travel in degrees clockwise from the horizontal axis. */
1501
+ angle: number;
1502
+ }
1503
+ export interface ClipLensDistortionEffect {
1504
+ id: string;
1505
+ type: "lensDistortion";
1506
+ enabled: boolean;
1507
+ /** Positive values bulge the centre; negative values pinch it. */
1508
+ amount: number;
1509
+ }
1510
+ export declare const STYLIZE_MODES: readonly ["rgbSplit", "radialBlur", "zoomBlur", "turbulence", "glitch", "halftone", "dither", "lightRays", "lensFlare", "innerShadow", "innerGlow", "edgeHighlight", "displacement", "gradientWipe", "lightLeakOverlay"];
1511
+ export declare const GENERATOR_MODES: readonly ["noise", "fractal", "conicGradient", "meshGradient", "gradientField", "particles", "lightLeak", "gridPattern"];
1512
+ export interface ClipStylizeEffect {
1513
+ id: string;
1514
+ type: "stylize";
1515
+ enabled: boolean;
1516
+ mode: (typeof STYLIZE_MODES)[number];
1517
+ amount: number;
1518
+ scale?: number;
1519
+ angle?: number;
1520
+ time?: number;
1521
+ animate?: boolean;
1522
+ seed?: number;
1523
+ color?: string;
1524
+ softness?: number;
1525
+ }
1526
+ export interface ClipGeneratorEffect {
1527
+ id: string;
1528
+ type: "generator";
1529
+ enabled: boolean;
1530
+ mode: (typeof GENERATOR_MODES)[number];
1531
+ amount?: number;
1532
+ scale?: number;
1533
+ angle?: number;
1534
+ time?: number;
1535
+ animate?: boolean;
1536
+ seed?: number;
1537
+ colorA?: string;
1538
+ colorB?: string;
1539
+ }
1540
+ export interface ClipLutEffect {
1541
+ id: string;
1542
+ type: "lut";
1543
+ enabled: boolean;
1544
+ /** Contents of a 3D .cube file. */
1545
+ cube: string;
1546
+ /** Grade mix, 0..1. */
1547
+ intensity?: number;
1548
+ }
1549
+ export interface ClipGlowEffect {
1550
+ id: string;
1551
+ type: "glow";
1552
+ enabled: boolean;
1553
+ /** Bloom radius in source pixels. */
1554
+ radius: number;
1555
+ /** Bloom strength, 0..2 typical. */
1556
+ intensity: number;
1557
+ /** Tint of the bloom. Defaults to the source colour. */
1558
+ color?: string;
1559
+ }
1560
+ export interface ClipDropShadowEffect {
1561
+ id: string;
1562
+ type: "dropShadow";
1563
+ enabled: boolean;
1564
+ /** Offset in source pixels. */
1565
+ offsetX: number;
1566
+ offsetY: number;
1567
+ /** Shadow blur radius in source pixels. */
1568
+ blur: number;
1569
+ color: string;
1570
+ /** 0..1, default 1. */
1571
+ opacity?: number;
1572
+ }
1573
+ export interface ClipVignetteEffect {
1574
+ id: string;
1575
+ type: "vignette";
1576
+ enabled: boolean;
1577
+ /** 0..1. */
1578
+ amount: number;
1579
+ /** Falloff width, 0..1. */
1580
+ softness: number;
1581
+ /**
1582
+ * Outer radius relative to the frame half-diagonal, 0.1..1.5. Absent means
1583
+ * `vignette@1`'s own default, which is where a clip vignette has always
1584
+ * started. Written by the track conversion, which carries a midpoint the
1585
+ * legacy spelling made mandatory.
1586
+ */
1587
+ radius?: number;
1588
+ }
1589
+ /**
1590
+ * Film grain: a per-pixel gain wobble, multiplied into the picture rather than
1591
+ * added to it. Multiplying is what keeps a premultiplied layer legal — adding
1592
+ * noise can push a channel past its own alpha, which reads as a bright fringe
1593
+ * wherever the layer is translucent — and it is also how real grain behaves,
1594
+ * biting hardest in the midtones and leaving black black.
1595
+ *
1596
+ * Canvas 2D has no way to draw it (`ctx.filter` carries no noise), so that path
1597
+ * reports `grain` through `unsupportedEffectTypes` instead of approximating it.
1598
+ */
1599
+ export interface ClipGrainEffect {
1600
+ id: string;
1601
+ type: "grain";
1602
+ enabled: boolean;
1603
+ /** Grain strength, 0..1. 0 is a no-op. */
1604
+ amount: number;
1605
+ /**
1606
+ * Grain cell size in source pixels — 1 is per-pixel, larger is coarser stock.
1607
+ * Absent means `grain@1`'s own default.
1608
+ */
1609
+ size?: number;
1610
+ /**
1611
+ * How much the three channels wobble independently: 0 is monochrome grain
1612
+ * (one gain for the pixel), 1 is full colour noise. Absent means the module
1613
+ * default.
1614
+ */
1615
+ colorAmount?: number;
1616
+ /**
1617
+ * Roll the pattern with the frame clock, the way exposed stock does. Absent
1618
+ * or false holds one pattern for every frame, which is what a still wants.
1619
+ *
1620
+ * The roll is not a clock and not `Math.random`: `resolveAnimatedLayerProps`
1621
+ * stamps {@link seed} from the frame's own time, so two renders of the same
1622
+ * frame are byte-identical and a cached render can be handed back.
1623
+ */
1624
+ animate?: boolean;
1625
+ /**
1626
+ * Which pattern to draw. Any two effects sharing a seed grain identically,
1627
+ * which is what lets two clips of the same stock match.
1628
+ *
1629
+ * On an `animate` grain the scene model overwrites this per frame, so the
1630
+ * stored value is only the pattern a still — or a host that never resolves
1631
+ * animated props — draws.
1632
+ */
1633
+ seed?: number;
1634
+ }
1635
+ export interface ClipSharpenEffect {
1636
+ id: string;
1637
+ type: "sharpen";
1638
+ enabled: boolean;
1639
+ /** 0..2 typical. */
1640
+ amount: number;
1641
+ /** Unsharp-mask radius in source pixels. */
1642
+ radius?: number;
1643
+ /**
1644
+ * Edge threshold 0..1. Absent means `filters.sharpen.unsharpMask@1`'s own
1645
+ * default. Same provenance as {@link ClipVignetteEffect.radius}.
1646
+ */
1647
+ threshold?: number;
1648
+ }
1649
+ export interface ClipChromaKeyEffect {
1650
+ id: string;
1651
+ type: "chromaKey";
1652
+ enabled: boolean;
1653
+ /** Key colour as `#rrggbb`. */
1654
+ color: string;
1655
+ /** Match tolerance 0..1. */
1656
+ tolerance: number;
1657
+ /** Edge softness 0..1. */
1658
+ softness: number;
1659
+ /** Spill suppression 0..1. */
1660
+ spill?: number;
1661
+ }
1662
+ export interface ClipCurvesEffect {
1663
+ id: string;
1664
+ type: "curves";
1665
+ enabled: boolean;
1666
+ /** Luminance curve applied to every channel. */
1667
+ master: CurvePoint[];
1668
+ r?: CurvePoint[];
1669
+ g?: CurvePoint[];
1670
+ b?: CurvePoint[];
1671
+ }
1672
+ export interface ClipLevelsEffect {
1673
+ id: string;
1674
+ type: "levels";
1675
+ enabled: boolean;
1676
+ /** Input black/white points, 0..1. */
1677
+ inBlack: number;
1678
+ inWhite: number;
1679
+ /** Midtone gamma. 1 = unchanged. */
1680
+ gamma: number;
1681
+ /** Output black/white points, 0..1. */
1682
+ outBlack: number;
1683
+ outWhite: number;
1684
+ }
1685
+ export interface ClipLiftGammaGainEffect {
1686
+ id: string;
1687
+ type: "liftGammaGain";
1688
+ enabled: boolean;
1689
+ /** Per-channel RGB triples. */
1690
+ lift: [number, number, number];
1691
+ gamma: [number, number, number];
1692
+ gain: [number, number, number];
1693
+ }
1694
+ export interface ClipVersion {
1695
+ id: string;
1696
+ createdAt: string;
1697
+ jobId: string;
1698
+ assetId: string;
1699
+ workflowUpdatedAt: string;
1700
+ dependencyHash: string;
1701
+ /** Snapshot of paramOverrides at the time this version was generated. */
1702
+ paramOverridesSnapshot: Record<string, unknown>;
1703
+ costCredits?: number;
1704
+ durationMs?: number;
1705
+ status: "success" | "failed" | "cancelled";
1706
+ favorite?: boolean;
1707
+ /** Caller-set display name for this take (P0 AI Video, PRD § 8.10). */
1708
+ label?: string;
1709
+ /**
1710
+ * How this take was produced. Absent means "generated" for a version with a
1711
+ * `jobId`, "imported" otherwise — existing data is not backfilled.
1712
+ */
1713
+ source?: "imported" | "generated" | "extended" | "inpainted" | "object_replace" | "video_to_video";
1714
+ provider?: string;
1715
+ model?: string;
1716
+ prompt?: string;
1717
+ negativePrompt?: string;
1718
+ /** The take this one was derived from, e.g. an extend or inpaint pass. */
1719
+ parentTakeId?: string;
1720
+ /** Stable identity for a production candidate created before dispatch. */
1721
+ candidateId?: string;
1722
+ batchId?: string;
1723
+ requestId?: string;
1724
+ variationId?: string;
1725
+ variationIndex?: number;
1726
+ /** Immutable resolved production inputs captured before provider dispatch. */
1727
+ productionSnapshot?: ProductionGenerationSnapshot;
1728
+ /** Immutable direct-generation inputs for recipe-based New take replay. */
1729
+ generationRecipe?: VideoGenerationRecipe;
1730
+ /** Immutable Script context for a Change line delivery candidate. */
1731
+ lineDelivery?: LineDeliveryRequest & {
1732
+ readonly requestId: string;
1733
+ };
1734
+ /** Source mapping captured for takes that need to restore an Original cut. */
1735
+ sourceMapping?: {
1736
+ inPointMs?: number;
1737
+ outPointMs?: number;
1738
+ speedMultiplier?: number;
1739
+ speedBaked?: boolean;
1740
+ };
1741
+ mediaEdit?: {
1742
+ action: "video_edit";
1743
+ modelTask: "video_to_video";
1744
+ referenceAssetIds?: string[];
1745
+ entityIds?: string[];
1746
+ requestId: string;
1747
+ instruction: string;
1748
+ provider: string;
1749
+ model: string;
1750
+ sourceContext: {
1751
+ sequenceId: string;
1752
+ clipId: string;
1753
+ sourceAssetId: string;
1754
+ sourceTakeId?: string;
1755
+ sourceStartMs: number;
1756
+ sourceEndMs: number;
1757
+ timelineStartMs: number;
1758
+ timelineDurationMs: number;
1759
+ speedMultiplier: number;
1760
+ };
1761
+ strength?: number;
1762
+ resolution?: string;
1763
+ };
1764
+ }
1765
+ export interface TimelineMarker {
1766
+ id: string;
1767
+ timeMs: number;
1768
+ label: string;
1769
+ color?: string;
1770
+ note?: string;
1771
+ }
1772
+ //# sourceMappingURL=types.d.ts.map