@nodaro/shared 3.61.0 → 3.63.0

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 (313) hide show
  1. package/dist/{chunk-4KYLNTR7.cjs → chunk-2PU3AGGS.cjs} +27 -4
  2. package/dist/chunk-2PU3AGGS.cjs.map +1 -0
  3. package/dist/{chunk-43TGSZRJ.js → chunk-2QKF7M2Z.js} +3 -3
  4. package/dist/{chunk-43TGSZRJ.js.map → chunk-2QKF7M2Z.js.map} +1 -1
  5. package/dist/{chunk-B6BG3LV2.js → chunk-34QLPTSA.js} +3 -3
  6. package/dist/{chunk-B6BG3LV2.js.map → chunk-34QLPTSA.js.map} +1 -1
  7. package/dist/chunk-3K24DWOH.js +453 -0
  8. package/dist/chunk-3K24DWOH.js.map +1 -0
  9. package/dist/{chunk-IRQ3SPX7.js → chunk-4DVWXEB6.js} +23 -4
  10. package/dist/chunk-4DVWXEB6.js.map +1 -0
  11. package/dist/{chunk-ZES6EZC4.js → chunk-4MMZD63H.js} +3 -3
  12. package/dist/{chunk-ZES6EZC4.js.map → chunk-4MMZD63H.js.map} +1 -1
  13. package/dist/{chunk-MQZRQ5LM.cjs → chunk-63H4C56Q.cjs} +8 -8
  14. package/dist/{chunk-MQZRQ5LM.cjs.map → chunk-63H4C56Q.cjs.map} +1 -1
  15. package/dist/{chunk-IVXSNW2B.cjs → chunk-6BZC2ZHC.cjs} +18 -332
  16. package/dist/chunk-6BZC2ZHC.cjs.map +1 -0
  17. package/dist/{chunk-M3SXUUWC.cjs → chunk-6FQBKI2A.cjs} +4 -11
  18. package/dist/chunk-6FQBKI2A.cjs.map +1 -0
  19. package/dist/{chunk-673E4KYC.js → chunk-6M563QE6.js} +134 -8
  20. package/dist/chunk-6M563QE6.js.map +1 -0
  21. package/dist/chunk-6TGB7ECA.cjs +48 -0
  22. package/dist/chunk-6TGB7ECA.cjs.map +1 -0
  23. package/dist/{chunk-XUJC6GHE.cjs → chunk-6XUG4L7X.cjs} +6 -6
  24. package/dist/{chunk-XUJC6GHE.cjs.map → chunk-6XUG4L7X.cjs.map} +1 -1
  25. package/dist/{chunk-XZKFZMRT.cjs → chunk-77WU3V3J.cjs} +6 -6
  26. package/dist/{chunk-XZKFZMRT.cjs.map → chunk-77WU3V3J.cjs.map} +1 -1
  27. package/dist/{chunk-ZFJN23V4.cjs → chunk-A2PX5IRC.cjs} +4 -4
  28. package/dist/{chunk-ZFJN23V4.cjs.map → chunk-A2PX5IRC.cjs.map} +1 -1
  29. package/dist/{chunk-ZDBPQBAA.js → chunk-AE3AAJ4O.js} +3 -3
  30. package/dist/{chunk-ZDBPQBAA.js.map → chunk-AE3AAJ4O.js.map} +1 -1
  31. package/dist/chunk-ALRXY4QH.cjs +13 -0
  32. package/dist/chunk-ALRXY4QH.cjs.map +1 -0
  33. package/dist/{chunk-UARGJ5IZ.js → chunk-BMJVKYVB.js} +56 -12
  34. package/dist/chunk-BMJVKYVB.js.map +1 -0
  35. package/dist/{chunk-6XVHYD5R.js → chunk-CLAKSLXF.js} +4 -9
  36. package/dist/chunk-CLAKSLXF.js.map +1 -0
  37. package/dist/chunk-CTANEPMY.js +61 -0
  38. package/dist/chunk-CTANEPMY.js.map +1 -0
  39. package/dist/chunk-CZ5IQB3L.js +42 -0
  40. package/dist/chunk-CZ5IQB3L.js.map +1 -0
  41. package/dist/{chunk-WGKAOUEQ.cjs → chunk-D34K455O.cjs} +3 -2
  42. package/dist/chunk-D34K455O.cjs.map +1 -0
  43. package/dist/chunk-EPXGG27L.js +331 -0
  44. package/dist/chunk-EPXGG27L.js.map +1 -0
  45. package/dist/{chunk-3M4BNKFJ.cjs → chunk-F6WGGYQW.cjs} +167 -3
  46. package/dist/chunk-F6WGGYQW.cjs.map +1 -0
  47. package/dist/{chunk-7FCTCWHD.js → chunk-FXGNRYQQ.js} +3 -3
  48. package/dist/{chunk-7FCTCWHD.js.map → chunk-FXGNRYQQ.js.map} +1 -1
  49. package/dist/{chunk-ZNM2LW3D.cjs → chunk-GMBDLNLD.cjs} +105 -56
  50. package/dist/chunk-GMBDLNLD.cjs.map +1 -0
  51. package/dist/{chunk-NJVOJXBS.cjs → chunk-GSKLPI3J.cjs} +104 -49
  52. package/dist/chunk-GSKLPI3J.cjs.map +1 -0
  53. package/dist/{chunk-EWS2VFO4.js → chunk-HBXF6RUU.js} +4 -4
  54. package/dist/{chunk-EWS2VFO4.js.map → chunk-HBXF6RUU.js.map} +1 -1
  55. package/dist/{chunk-MOMFX32D.js → chunk-HWQ2SYNA.js} +194 -325
  56. package/dist/chunk-HWQ2SYNA.js.map +1 -0
  57. package/dist/{chunk-SCMTN57Y.js → chunk-IY3Y462W.js} +3 -3
  58. package/dist/{chunk-SCMTN57Y.js.map → chunk-IY3Y462W.js.map} +1 -1
  59. package/dist/{chunk-ZZGQRRN7.js → chunk-KCZHQH2O.js} +6 -306
  60. package/dist/chunk-KCZHQH2O.js.map +1 -0
  61. package/dist/{chunk-XROE3CAS.cjs → chunk-KHH54GRP.cjs} +120 -79
  62. package/dist/chunk-KHH54GRP.cjs.map +1 -0
  63. package/dist/{chunk-FVVD6XY2.js → chunk-KL6GAYTT.js} +13 -4
  64. package/dist/chunk-KL6GAYTT.js.map +1 -0
  65. package/dist/{chunk-FVII3KHN.js → chunk-KMGCHV6O.js} +163 -4
  66. package/dist/chunk-KMGCHV6O.js.map +1 -0
  67. package/dist/{chunk-FMXFHJWX.cjs → chunk-L2TVY6XN.cjs} +4 -4
  68. package/dist/{chunk-FMXFHJWX.cjs.map → chunk-L2TVY6XN.cjs.map} +1 -1
  69. package/dist/{chunk-FQXRYPCX.cjs → chunk-LH72PQO2.cjs} +505 -68
  70. package/dist/chunk-LH72PQO2.cjs.map +1 -0
  71. package/dist/chunk-LMAQUR55.cjs +506 -0
  72. package/dist/chunk-LMAQUR55.cjs.map +1 -0
  73. package/dist/{chunk-F5YEMSNK.cjs → chunk-M5OCFGHF.cjs} +571 -30
  74. package/dist/chunk-M5OCFGHF.cjs.map +1 -0
  75. package/dist/{chunk-VOWJCUMR.js → chunk-MD4XHED4.js} +3 -3
  76. package/dist/{chunk-VOWJCUMR.js.map → chunk-MD4XHED4.js.map} +1 -1
  77. package/dist/chunk-N5HH46JF.cjs +68 -0
  78. package/dist/chunk-N5HH46JF.cjs.map +1 -0
  79. package/dist/{chunk-G4XWVWRI.js → chunk-NIAFR5EE.js} +5 -4
  80. package/dist/chunk-NIAFR5EE.js.map +1 -0
  81. package/dist/{chunk-CF4S4N5X.js → chunk-O2QOBA6Q.js} +2 -2
  82. package/dist/{chunk-CF4S4N5X.js.map → chunk-O2QOBA6Q.js.map} +1 -1
  83. package/dist/{chunk-4GGLKRYI.cjs → chunk-O6TBB4IF.cjs} +2 -2
  84. package/dist/{chunk-4GGLKRYI.cjs.map → chunk-O6TBB4IF.cjs.map} +1 -1
  85. package/dist/{chunk-SWVGHAYO.js → chunk-O7RZRUMZ.js} +110 -74
  86. package/dist/chunk-O7RZRUMZ.js.map +1 -0
  87. package/dist/{chunk-LLOIAGFB.js → chunk-OV3JTKBY.js} +449 -51
  88. package/dist/chunk-OV3JTKBY.js.map +1 -0
  89. package/dist/{chunk-A3FHTSLB.js → chunk-PSKZKLDG.js} +550 -31
  90. package/dist/chunk-PSKZKLDG.js.map +1 -0
  91. package/dist/{chunk-VB2ARGQ6.js → chunk-RGNHHIMN.js} +3 -3
  92. package/dist/chunk-RGNHHIMN.js.map +1 -0
  93. package/dist/chunk-SMOO5FAH.js +10 -0
  94. package/dist/chunk-SMOO5FAH.js.map +1 -0
  95. package/dist/{chunk-5XRRENHD.cjs → chunk-TM5JYSJF.cjs} +170 -17
  96. package/dist/chunk-TM5JYSJF.cjs.map +1 -0
  97. package/dist/{chunk-PONP5J5E.cjs → chunk-V24EPI5N.cjs} +13 -3
  98. package/dist/chunk-V24EPI5N.cjs.map +1 -0
  99. package/dist/{chunk-RQ4F3AJH.cjs → chunk-V5EEQR2U.cjs} +21 -21
  100. package/dist/{chunk-RQ4F3AJH.cjs.map → chunk-V5EEQR2U.cjs.map} +1 -1
  101. package/dist/chunk-WZVIBAKN.cjs +351 -0
  102. package/dist/chunk-WZVIBAKN.cjs.map +1 -0
  103. package/dist/{chunk-5M43XMRB.cjs → chunk-X5BAFW3Q.cjs} +8 -8
  104. package/dist/{chunk-5M43XMRB.cjs.map → chunk-X5BAFW3Q.cjs.map} +1 -1
  105. package/dist/{chunk-RUHKBEFF.js → chunk-XBTYGQ6Z.js} +63 -10
  106. package/dist/chunk-XBTYGQ6Z.js.map +1 -0
  107. package/dist/{chunk-JHTT2V4A.cjs → chunk-XGGZWA4A.cjs} +118 -52
  108. package/dist/chunk-XGGZWA4A.cjs.map +1 -0
  109. package/dist/{chunk-5I4T4QR5.cjs → chunk-XGVJGNZW.cjs} +5 -5
  110. package/dist/{chunk-5I4T4QR5.cjs.map → chunk-XGVJGNZW.cjs.map} +1 -1
  111. package/dist/{chunk-7ARKVJTN.cjs → chunk-Y35JQPT6.cjs} +228 -383
  112. package/dist/chunk-Y35JQPT6.cjs.map +1 -0
  113. package/dist/{chunk-AFQFGZN7.cjs → chunk-Y4GCJJPF.cjs} +8 -6
  114. package/dist/chunk-Y4GCJJPF.cjs.map +1 -0
  115. package/dist/{chunk-C77F4ZTL.js → chunk-YUER7TJG.js} +3 -3
  116. package/dist/{chunk-C77F4ZTL.js.map → chunk-YUER7TJG.js.map} +1 -1
  117. package/dist/{chunk-HGI2VKIV.js → chunk-YX6TFX7H.js} +67 -14
  118. package/dist/chunk-YX6TFX7H.js.map +1 -0
  119. package/dist/{chunk-TWF2OSH4.cjs → chunk-ZPE2ZTJ4.cjs} +4 -4
  120. package/dist/{chunk-TWF2OSH4.cjs.map → chunk-ZPE2ZTJ4.cjs.map} +1 -1
  121. package/dist/entries/apps.cjs +44 -44
  122. package/dist/entries/apps.js +9 -9
  123. package/dist/entries/credits.cjs +286 -153
  124. package/dist/entries/credits.d.cts +254 -5
  125. package/dist/entries/credits.d.ts +254 -5
  126. package/dist/entries/credits.js +14 -9
  127. package/dist/entries/entities.cjs +188 -143
  128. package/dist/entries/entities.d.cts +122 -1
  129. package/dist/entries/entities.d.ts +122 -1
  130. package/dist/entries/entities.js +2 -1
  131. package/dist/entries/llm-models.cjs +77 -57
  132. package/dist/entries/llm-models.d.cts +85 -5
  133. package/dist/entries/llm-models.d.ts +85 -5
  134. package/dist/entries/llm-models.js +2 -2
  135. package/dist/entries/media.cjs +92 -87
  136. package/dist/entries/media.d.cts +19 -1
  137. package/dist/entries/media.d.ts +19 -1
  138. package/dist/entries/media.js +3 -2
  139. package/dist/entries/model-catalog.cjs +211 -103
  140. package/dist/entries/model-catalog.d.cts +135 -19
  141. package/dist/entries/model-catalog.d.ts +135 -19
  142. package/dist/entries/model-catalog.js +5 -5
  143. package/dist/entries/models.cjs +504 -295
  144. package/dist/entries/models.d.cts +71 -4
  145. package/dist/entries/models.d.ts +71 -4
  146. package/dist/entries/models.js +7 -6
  147. package/dist/entries/nodes.cjs +249 -233
  148. package/dist/entries/nodes.d.cts +35 -6
  149. package/dist/entries/nodes.d.ts +35 -6
  150. package/dist/entries/nodes.js +10 -10
  151. package/dist/entries/pipeline.cjs +152 -152
  152. package/dist/entries/pipeline.d.cts +3 -2
  153. package/dist/entries/pipeline.d.ts +3 -2
  154. package/dist/entries/pipeline.js +3 -3
  155. package/dist/entries/runtime-config.cjs +29 -29
  156. package/dist/entries/runtime-config.d.cts +10 -7
  157. package/dist/entries/runtime-config.d.ts +10 -7
  158. package/dist/entries/runtime-config.js +1 -1
  159. package/dist/entries/social.cjs +177 -177
  160. package/dist/entries/social.js +2 -2
  161. package/dist/entries/types.d.cts +8 -0
  162. package/dist/entries/types.d.ts +8 -0
  163. package/dist/entries/ugc.cjs +71 -71
  164. package/dist/entries/ugc.js +4 -4
  165. package/dist/entries/video.cjs +316 -208
  166. package/dist/entries/video.d.cts +490 -99
  167. package/dist/entries/video.d.ts +490 -99
  168. package/dist/entries/video.js +8 -4
  169. package/dist/entries/workflow.cjs +102 -102
  170. package/dist/entries/workflow.d.cts +5 -4
  171. package/dist/entries/workflow.d.ts +5 -4
  172. package/dist/entries/workflow.js +2 -2
  173. package/dist/{gpt-image-2-6-BeZdT-pW.d.cts → gpt-image-2-6-jIRQBRag.d.cts} +6 -0
  174. package/dist/{gpt-image-2-6-BeZdT-pW.d.ts → gpt-image-2-6-jIRQBRag.d.ts} +6 -0
  175. package/dist/index.cjs +2727 -2092
  176. package/dist/index.d.cts +11 -11
  177. package/dist/index.d.ts +11 -11
  178. package/dist/index.js +30 -27
  179. package/dist/{model-catalog-BgSvskgY.d.ts → model-catalog-C_Eo35tL.d.cts} +158 -14
  180. package/dist/{model-catalog-BgSvskgY.d.cts → model-catalog-C_Eo35tL.d.ts} +158 -14
  181. package/dist/{model-constants-DHd9jwQ7.d.cts → model-constants-Bg4ccSQb.d.ts} +427 -34
  182. package/dist/{model-constants-DHd9jwQ7.d.ts → model-constants-DWcxOmaY.d.cts} +427 -34
  183. package/package.json +1 -1
  184. package/src/__tests__/credit-identifiers.test.ts +29 -0
  185. package/src/__tests__/extend-providers.test.ts +194 -0
  186. package/src/__tests__/fixtures/mask-composite-quote-parity.json +118 -0
  187. package/src/__tests__/fixtures/root-exports.baseline.json +68 -0
  188. package/src/__tests__/gpt-image-2-6-formats.test.ts +4 -1
  189. package/src/__tests__/grok-video-15-catalog.test.ts +189 -0
  190. package/src/__tests__/gvp-supported-providers.test.ts +32 -4
  191. package/src/__tests__/lip-sync-audio-rate.test.ts +74 -0
  192. package/src/__tests__/lip-sync-levers.test.ts +31 -0
  193. package/src/__tests__/llm-models.test.ts +132 -3
  194. package/src/__tests__/llm-price-key.test.ts +152 -1
  195. package/src/__tests__/minimax-h3-image.test.ts +140 -0
  196. package/src/__tests__/model-makers.test.ts +49 -11
  197. package/src/__tests__/model-tree.test.ts +13 -0
  198. package/src/__tests__/nemotron-transcribe-pricing.test.ts +61 -0
  199. package/src/__tests__/normalize-node-params.test.ts +25 -0
  200. package/src/__tests__/pixverse-v6-max-catalog.test.ts +271 -0
  201. package/src/__tests__/prompt-length-limits.test.ts +4 -0
  202. package/src/__tests__/retired-video-provider.test.ts +15 -5
  203. package/src/__tests__/seedance-25-catalog-modes.test.ts +1 -1
  204. package/src/__tests__/seedance-task-type.test.ts +188 -0
  205. package/src/__tests__/seedream-5-5.test.ts +117 -0
  206. package/src/__tests__/transcribe-capabilities.test.ts +39 -2
  207. package/src/__tests__/transcribe-preflight.test.ts +50 -1
  208. package/src/__tests__/unit-contract-compose.test.ts +27 -1
  209. package/src/__tests__/unit-contracts.test.ts +20 -6
  210. package/src/__tests__/upscale-factors.test.ts +107 -0
  211. package/src/__tests__/video-audio-capability.test.ts +35 -6
  212. package/src/__tests__/video-character-refs.test.ts +20 -2
  213. package/src/__tests__/video-collapse-parity.test.ts +19 -0
  214. package/src/__tests__/video-overlay-geometry.test.ts +68 -0
  215. package/src/__tests__/video-overlay-layer-plan.test.ts +3 -4
  216. package/src/__tests__/video-overlay-layouts.test.ts +529 -0
  217. package/src/__tests__/video-overlay-pricing.test.ts +61 -0
  218. package/src/__tests__/video-overlay-validate.test.ts +128 -0
  219. package/src/__tests__/video-overlay-wired-kind.test.ts +207 -0
  220. package/src/__tests__/video-overlay.test.ts +280 -194
  221. package/src/__tests__/video-ref-limits.test.ts +2 -1
  222. package/src/__tests__/video-reference-only.test.ts +6 -2
  223. package/src/__tests__/video-resolution-billed-as-named.test.ts +30 -0
  224. package/src/__tests__/video-start-frame-only.test.ts +98 -0
  225. package/src/__tests__/video-upscale-params.test.ts +62 -0
  226. package/src/__tests__/wired-character-names.test.ts +220 -0
  227. package/src/catalog-projection.ts +8 -0
  228. package/src/credit-estimators/index.ts +18 -0
  229. package/src/credit-estimators/nemotron-transcribe.ts +87 -0
  230. package/src/credit-estimators/video-overlay.ts +70 -0
  231. package/src/credit-identifiers.ts +183 -16
  232. package/src/entity-image-url.ts +21 -0
  233. package/src/entries/credits.ts +26 -1
  234. package/src/entries/entities.ts +14 -0
  235. package/src/entries/llm-models.ts +6 -0
  236. package/src/entries/model-catalog.ts +44 -1
  237. package/src/entries/models.ts +69 -0
  238. package/src/entries/nodes.ts +4 -0
  239. package/src/entries/video.ts +7 -1
  240. package/src/freecut-protocol.ts +8 -0
  241. package/src/generated/unit-contracts.ts +8 -1
  242. package/src/gpt-image-2-6.ts +6 -0
  243. package/src/input-image-pricing.ts +76 -0
  244. package/src/lip-sync-levers.ts +56 -0
  245. package/src/lip-sync-pricing.ts +91 -1
  246. package/src/llm-models.ts +249 -4
  247. package/src/mask-composite.ts +11 -0
  248. package/src/minimax-h3-image.ts +61 -0
  249. package/src/model-catalog.ts +604 -40
  250. package/src/model-constants.ts +860 -55
  251. package/src/model-tree.ts +2 -1
  252. package/src/nodaro-video-upscale.ts +48 -0
  253. package/src/node-default-mappings.ts +15 -2
  254. package/src/node-execution-state.ts +4 -3
  255. package/src/normalize-node-params.ts +49 -1
  256. package/src/producer-types.ts +23 -1
  257. package/src/runtime-config/contract.ts +10 -7
  258. package/src/seedance-draft.ts +2 -1
  259. package/src/seedance-task-type.ts +37 -0
  260. package/src/seedream-5-5.ts +45 -0
  261. package/src/transcribe-preflight.ts +58 -7
  262. package/src/unit-contract-compose.ts +4 -1
  263. package/src/upscale-factors.ts +111 -0
  264. package/src/video-character-refs.ts +7 -4
  265. package/src/video-duration.ts +9 -0
  266. package/src/video-overlay-geometry.ts +99 -0
  267. package/src/video-overlay-input.ts +25 -0
  268. package/src/video-overlay-layout-ids.ts +48 -0
  269. package/src/video-overlay-layouts.ts +315 -0
  270. package/src/video-overlay-validate.ts +223 -0
  271. package/src/video-overlay-video-layers.ts +304 -0
  272. package/src/video-overlay.ts +165 -297
  273. package/src/video-ui-defaults.ts +11 -7
  274. package/src/video-upscale-params.ts +67 -0
  275. package/src/wired-character-names.ts +202 -0
  276. package/dist/chunk-3M4BNKFJ.cjs.map +0 -1
  277. package/dist/chunk-4KYLNTR7.cjs.map +0 -1
  278. package/dist/chunk-5XRRENHD.cjs.map +0 -1
  279. package/dist/chunk-673E4KYC.js.map +0 -1
  280. package/dist/chunk-6XVHYD5R.js.map +0 -1
  281. package/dist/chunk-7ARKVJTN.cjs.map +0 -1
  282. package/dist/chunk-7WGKP3EU.js +0 -23
  283. package/dist/chunk-7WGKP3EU.js.map +0 -1
  284. package/dist/chunk-A3FHTSLB.js.map +0 -1
  285. package/dist/chunk-AFQFGZN7.cjs.map +0 -1
  286. package/dist/chunk-F5YEMSNK.cjs.map +0 -1
  287. package/dist/chunk-FQXRYPCX.cjs.map +0 -1
  288. package/dist/chunk-FVII3KHN.js.map +0 -1
  289. package/dist/chunk-FVVD6XY2.js.map +0 -1
  290. package/dist/chunk-G4XWVWRI.js.map +0 -1
  291. package/dist/chunk-HGI2VKIV.js.map +0 -1
  292. package/dist/chunk-IRQ3SPX7.js.map +0 -1
  293. package/dist/chunk-IVXSNW2B.cjs.map +0 -1
  294. package/dist/chunk-JHTT2V4A.cjs.map +0 -1
  295. package/dist/chunk-KHZAQGRP.js +0 -17
  296. package/dist/chunk-KHZAQGRP.js.map +0 -1
  297. package/dist/chunk-LLOIAGFB.js.map +0 -1
  298. package/dist/chunk-M3SXUUWC.cjs.map +0 -1
  299. package/dist/chunk-MOMFX32D.js.map +0 -1
  300. package/dist/chunk-NCOGGRRP.cjs +0 -27
  301. package/dist/chunk-NCOGGRRP.cjs.map +0 -1
  302. package/dist/chunk-NJVOJXBS.cjs.map +0 -1
  303. package/dist/chunk-PONP5J5E.cjs.map +0 -1
  304. package/dist/chunk-RUHKBEFF.js.map +0 -1
  305. package/dist/chunk-SWVGHAYO.js.map +0 -1
  306. package/dist/chunk-UARGJ5IZ.js.map +0 -1
  307. package/dist/chunk-VB2ARGQ6.js.map +0 -1
  308. package/dist/chunk-WGKAOUEQ.cjs.map +0 -1
  309. package/dist/chunk-XROE3CAS.cjs.map +0 -1
  310. package/dist/chunk-ZLDFPVVI.cjs +0 -19
  311. package/dist/chunk-ZLDFPVVI.cjs.map +0 -1
  312. package/dist/chunk-ZNM2LW3D.cjs.map +0 -1
  313. package/dist/chunk-ZZGQRRN7.js.map +0 -1
@@ -135,6 +135,14 @@ declare function videoCharacterRefProblem(args: {
135
135
  */
136
136
  declare function characterReferencesFromWired(refs: readonly ConnectedReference[]): VideoCharacterReference[];
137
137
 
138
+ /**
139
+ * How far past a whole second a delivered clip's container may read without
140
+ * counting as longer: a quarter second (8.04 s for an 8 s clip). Read by the
141
+ * rules that turn a delivered clip's measured length into the length it is
142
+ * charged as, or compare one with a length held for it. (Clip-priced steps
143
+ * that measure their own input use a smaller grace of their own.)
144
+ */
145
+ declare const CONTAINER_OVERHANG_SEC = 0.25;
138
146
  /** Read a video node's duration (in seconds) from its data shape.
139
147
  * Tries `generatedResults[activeResultIndex].duration` (post-execution
140
148
  * metadata) first, then `data.duration` (configured at design time on
@@ -377,7 +385,36 @@ declare const VIDEO_LINK_DERIVED_FIELDS: readonly ["videoId", "title", "thumbnai
377
385
  declare function dropStaleVideoLinkFields(data: Record<string, unknown>, incoming: Record<string, unknown>): Record<string, unknown>;
378
386
 
379
387
  /**
380
- * Video Overlay — timed image layers over a video. The wire contract of the
388
+ * Video Overlay layouts — the ids, and what each one needs. A layout is a
389
+ * named shortcut that writes the boxes (`expandVideoOverlayLayout` in
390
+ * `video-overlay-layouts.ts`); like a placement preset, it is a TAG and the
391
+ * boxes are the truth, except for the two stacks, whose boxes depend on the
392
+ * sources' shapes and are resolved where those are known.
393
+ *
394
+ * Dependency-free on purpose: the validator in `video-overlay-validate.ts`
395
+ * reads these, and `video-overlay-layouts.ts` imports the contract in
396
+ * `video-overlay.ts`, so they cannot live in either without a cycle. Wire contract only — no I/O.
397
+ */
398
+ /**
399
+ * - `video-bottom` / `video-top`: the base whole, full width, against that edge.
400
+ * - `stack-whole`: the base directly above the first video layer, both whole,
401
+ * the same width, the pair centred.
402
+ * - `stack-filled`: the base fills the top half, the first video layer the
403
+ * bottom half, both cropped (`cover`).
404
+ * - `pip`: the base fills the frame, the first video layer sits in a corner.
405
+ */
406
+ declare const VIDEO_OVERLAY_LAYOUT_IDS: readonly ["video-bottom", "video-top", "stack-whole", "stack-filled", "pip"];
407
+ type VideoOverlayLayoutId = (typeof VIDEO_OVERLAY_LAYOUT_IDS)[number];
408
+ declare function isVideoOverlayLayoutId(v: unknown): v is VideoOverlayLayoutId;
409
+ /** True when the layout is refused without an `outputAspect` (`layout_needs_aspect`). */
410
+ declare function videoOverlayLayoutNeedsAspect(id: VideoOverlayLayoutId): boolean;
411
+ /** True when the layout is refused without a video layer (`layout_needs_video_layer`). */
412
+ declare function videoOverlayLayoutNeedsVideoLayer(id: VideoOverlayLayoutId): boolean;
413
+ /** True when the layout places the base itself and is refused with a `baseBox` (`layout_conflicts_base_box`): the two stacks. */
414
+ declare function videoOverlayLayoutPlacesBase(id: VideoOverlayLayoutId): boolean;
415
+
416
+ /**
417
+ * Video Overlay — timed image and video layers over a video. The wire contract of the
381
418
  * `video-overlay` node, `POST /v1/video-overlay`, the `overlay_images` MCP
382
419
  * verb, `client.media.videoOverlay` and `nodaro media video-overlay`, defined
383
420
  * ONCE:
@@ -390,8 +427,8 @@ declare function dropStaleVideoLinkFields(data: Record<string, unknown>, incomin
390
427
  * never switch on the tag;
391
428
  * - `expandVideoOverlayLayer` / `expandVideoOverlayPresets`: the one
392
429
  * normaliser every write boundary calls;
393
- * - `resolveVideoOverlayGeometry`: the one placement function the canvas
394
- * preview and the ffmpeg worker both call;
430
+ * - `resolveVideoOverlayGeometry` (in `video-overlay-geometry.ts`): the one
431
+ * placement function the canvas preview and the ffmpeg worker both call;
395
432
  * - `assembleVideoOverlayRequest`: the one node-data → request assembly both
396
433
  * workflow engines call;
397
434
  * - `videoOverlayCompositionKey` (+ `videoOverlaySlotSources`): the freshness
@@ -400,10 +437,12 @@ declare function dropStaleVideoLinkFields(data: Record<string, unknown>, incomin
400
437
  * `VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH`) and the DAG payload compute
401
438
  * it with this one function, and the node compares it against the key of
402
439
  * its current settings;
403
- * - `validateVideoOverlayRequest`: what a schema cannot express, at every
404
- * engine entry. It returns a CODE, never English: `formatVideoOverlayError`
405
- * renders the route / worker text, the canvas renders the code through its
406
- * dictionaries.
440
+ * - `validateVideoOverlayRequest` (in `video-overlay-validate.ts`): what a
441
+ * schema cannot express, at every engine entry. It returns a CODE, never
442
+ * English: `formatVideoOverlayError` renders the route / worker text, the
443
+ * canvas renders the code through its dictionaries.
444
+ * The geometry and validator siblings import from this file; it imports
445
+ * nothing from them.
407
446
  * Wire contract only — no prompt content, no I/O.
408
447
  */
409
448
 
@@ -445,6 +484,22 @@ declare const VIDEO_OVERLAY_BOUNDS: {
445
484
  };
446
485
  /** Σ downloaded layer bytes per job. */
447
486
  declare const VIDEO_OVERLAY_MAX_TOTAL_LAYER_BYTES: number;
487
+ /** A video layer's `sound.volume` (1 = as recorded). */
488
+ declare const VIDEO_OVERLAY_VOLUME_BOUNDS: readonly [0, 1];
489
+ /**
490
+ * Video layers per request. Measured on the pinned ffmpeg: a 60 s base with
491
+ * two video layers renders well inside the 10-minute limit (three times its
492
+ * slowest render), and three video layers do not at 60 s.
493
+ */
494
+ declare const VIDEO_OVERLAY_MAX_VIDEO_LAYERS = 2;
495
+ /**
496
+ * The longest base video, seconds, for a run with a video layer — the
497
+ * longest base for which one and two video layers both render within the
498
+ * 10-minute limit with room for three times the slowest measured render.
499
+ */
500
+ declare const VIDEO_OVERLAY_VIDEO_MAX_BASE_SEC = 60;
501
+ /** One video layer's file, bytes. */
502
+ declare const VIDEO_OVERLAY_MAX_LAYER_VIDEO_BYTES: number;
448
503
  /** Fade + scale ramp, seconds each way (clamped to half of a short layer). */
449
504
  declare const VIDEO_OVERLAY_ANIMATION_SEC = 0.15;
450
505
  /** The scale a layer grows from and shrinks back to during the ramp. */
@@ -456,9 +511,9 @@ declare const VIDEO_OVERLAY_BADGE_INSET = 4;
456
511
  declare const VIDEO_OVERLAY_DEFAULT_BACKGROUND = "#000000";
457
512
  /** The six box fields — exactly what a preset writes. */
458
513
  declare const VIDEO_OVERLAY_BOX_FIELDS: readonly ["anchor", "x", "y", "width", "height", "fit"];
459
- declare const VIDEO_OVERLAY_WARNING_CODES: readonly ["clipped", "skipped", "animated_first_frame", "audio_reencoded"];
514
+ declare const VIDEO_OVERLAY_WARNING_CODES: readonly ["clipped", "skipped", "animated_first_frame", "audio_reencoded", "layer_no_audio"];
460
515
  type VideoOverlayWarningCode = (typeof VIDEO_OVERLAY_WARNING_CODES)[number];
461
- declare const VIDEO_OVERLAY_ERROR_CODES: readonly ["no_layers", "too_many_layers", "incomplete_box", "layer_without_image", "time_out_of_range", "end_before_start", "fit_without_aspect", "field_out_of_bounds", "invalid_layer_plan"];
516
+ declare const VIDEO_OVERLAY_ERROR_CODES: readonly ["no_layers", "too_many_layers", "incomplete_box", "layer_without_image", "time_out_of_range", "end_before_start", "fit_without_aspect", "field_out_of_bounds", "invalid_layer_plan", "layer_two_sources", "too_many_video_layers", "sound_without_video", "base_box_needs_aspect", "layout_needs_aspect", "layout_needs_video_layer", "layout_conflicts_base_box"];
462
517
  type VideoOverlayErrorCode = (typeof VIDEO_OVERLAY_ERROR_CODES)[number];
463
518
  interface VideoOverlayBox {
464
519
  readonly anchor: OverlayAnchor;
@@ -468,6 +523,15 @@ interface VideoOverlayBox {
468
523
  readonly height?: number;
469
524
  readonly fit: VideoOverlayFit;
470
525
  }
526
+ /** A box as a writer may send it (the base box from workflow JSON): every field optional; `null` means absent. */
527
+ type VideoOverlayBoxInput = {
528
+ readonly [K in keyof VideoOverlayBox]?: VideoOverlayBox[K] | null;
529
+ };
530
+ /** A video layer's sound, mixed with the base's during the layer's window. Absent = the layer is silent. */
531
+ interface VideoOverlaySound {
532
+ /** 0..1 (`VIDEO_OVERLAY_VOLUME_BOUNDS`). */
533
+ readonly volume: number;
534
+ }
471
535
  /** A layer as stored and enqueued — complete: every box and look field present. */
472
536
  interface VideoOverlayLayer {
473
537
  /**
@@ -477,6 +541,14 @@ interface VideoOverlayLayer {
477
541
  * and the run-time merge is still `wired ?? imageUrl` everywhere.
478
542
  */
479
543
  imageUrl?: string;
544
+ /**
545
+ * The layer's video, instead of `imageUrl` — never both. Cleared by wiring
546
+ * exactly as `imageUrl` is; a wired handle's source is a video when the
547
+ * assembly is told so (`wiredVideoSlots`).
548
+ */
549
+ videoUrl?: string;
550
+ /** A video layer only. */
551
+ sound?: VideoOverlaySound;
480
552
  /** 1-based canvas slot (overlay = 1 … overlay12 = 12; 13 and up handle-less), stamped by both engine assemblies. Messages prefer it. */
481
553
  slot?: number;
482
554
  /** 1-based entry of a wired layer plan, stamped by the assembly. Messages prefer it. */
@@ -496,12 +568,12 @@ interface VideoOverlayLayer {
496
568
  y: number;
497
569
  /** % of the output canvas width (1..100). */
498
570
  width: number;
499
- /** % of the output canvas height (1..100); absent = follows the image's aspect. */
571
+ /** % of the output canvas height (1..100); absent = follows the image's (or video's) aspect. */
500
572
  height?: number;
501
573
  fit: VideoOverlayFit;
502
574
  /** 0..1 */
503
575
  opacity: number;
504
- /** Fade + slight scale in and out, 0.15 s each way. */
576
+ /** Fade + slight scale in and out, 0.15 s each way. Default on for an image, off for a video. */
505
577
  animate: boolean;
506
578
  /** Integer 0..100; absent = its position (slot − 1: layer 1 lowest). */
507
579
  zIndex?: number;
@@ -510,25 +582,54 @@ interface VideoOverlayLayer {
510
582
  type VideoOverlayLayerInput = {
511
583
  [K in keyof VideoOverlayLayer]?: VideoOverlayLayer[K] | null;
512
584
  };
513
- /** A layer on the REST / SDK wire: image and start required; the box may be a preset, explicit fields, or nothing (→ the corner-badge default). */
585
+ /**
586
+ * A layer on the REST / SDK wire: exactly one of `imageUrl` / `videoUrl`, and
587
+ * `start`, required; the box may be a preset, explicit fields, or nothing
588
+ * (→ the corner-badge default).
589
+ */
514
590
  type VideoOverlayLayerSpec = {
515
- imageUrl: string;
516
591
  start: number;
517
- } & Partial<Omit<VideoOverlayLayer, "imageUrl" | "start">>;
592
+ } & Partial<Omit<VideoOverlayLayer, "imageUrl" | "videoUrl" | "start">> & ({
593
+ imageUrl: string;
594
+ videoUrl?: never;
595
+ } | {
596
+ videoUrl: string;
597
+ imageUrl?: never;
598
+ });
599
+ /**
600
+ * A base box on the REST / SDK wire: `anchor` and `width` required; `x` and
601
+ * `y` default to 0 and `fit` to contain (`expandVideoOverlayLayout`), and no
602
+ * `height` follows the base's own aspect.
603
+ */
604
+ type VideoOverlayBaseBoxSpec = Pick<VideoOverlayBox, "anchor" | "width"> & Partial<Omit<VideoOverlayBox, "anchor" | "width">>;
518
605
  /** The `POST /v1/video-overlay` body. */
519
606
  interface VideoOverlayRequest {
520
607
  videoUrl: string;
521
- /** 1..20 */
608
+ /** 1..20, at most `VIDEO_OVERLAY_MAX_VIDEO_LAYERS` (2) of them videos. */
522
609
  layers: VideoOverlayLayerSpec[];
523
610
  outputAspect?: VideoOverlayOutputAspect;
524
611
  /** Only with `outputAspect`; default cover. */
525
612
  baseFit?: VideoOverlayFit;
526
613
  /** `#rrggbb`, only with `outputAspect` (drawn under `contain`); default `#000000`. */
527
614
  backgroundColor?: string;
615
+ /** Where the base sits, in a layer's box vocabulary; only with `outputAspect`. Overrides `baseFit`; uncovered canvas shows `backgroundColor`. Refused with a stack layout. */
616
+ baseBox?: VideoOverlayBaseBoxSpec;
617
+ /**
618
+ * A named layout that writes the boxes (`expandVideoOverlayLayout`): an
619
+ * explicit `baseBox` wins over `video-bottom` / `video-top`; a stack places
620
+ * the base itself and takes none; `pip` replaces the first video layer's box.
621
+ */
622
+ layout?: VideoOverlayLayoutId;
528
623
  }
529
624
  /** A request whose layers went through `expandVideoOverlayPresets`. */
530
- interface ExpandedVideoOverlayRequest extends Omit<VideoOverlayRequest, "layers"> {
625
+ interface ExpandedVideoOverlayRequest extends Omit<VideoOverlayRequest, "layers" | "baseBox"> {
531
626
  layers: VideoOverlayLayer[];
627
+ /**
628
+ * The base box as stored or sent, its `null` fields dropped — any field may
629
+ * be absent. The validator refuses one without an anchor and a width; the
630
+ * worker fills the rest (`expandVideoOverlayLayout`) after it.
631
+ */
632
+ baseBox?: Partial<VideoOverlayBox>;
532
633
  /** Set by the assembly when a wired layer plan could not be read; `validateVideoOverlayRequest` reports it first. */
533
634
  planError?: "invalid_layer_plan";
534
635
  }
@@ -571,9 +672,12 @@ declare function videoOverlayPresetBox(preset: VideoOverlayPresetId, corner?: Vi
571
672
  * fields, the layer's own fields winning (D8): `{}` → the full default.
572
673
  * - no `preset` + a PARTIAL box (not anchor AND width) → returned untouched;
573
674
  * the validator answers `incomplete_box`.
574
- * Trailing defaults x 0, y 0, fit contain, opacity 1, animate true are filled
575
- * here and nowhere else. `null` reads as absent. Returned BY REFERENCE when
576
- * nothing changes; idempotent, tag included.
675
+ * Trailing defaults x 0, y 0, fit contain, opacity 1, and animate (true for an
676
+ * image, false for a video layer — in every branch, the default layer's included)
677
+ * are filled here and nowhere else. A VIDEO layer with a preset and no `start`
678
+ * starts at 0, like the default layer; an image one is left to the validator
679
+ * (`time_out_of_range`), as it always was. `null` reads as absent. Returned BY
680
+ * REFERENCE when nothing changes; idempotent, tag included.
577
681
  */
578
682
  declare function expandVideoOverlayLayer(raw: VideoOverlayLayerInput | null | undefined): VideoOverlayLayer;
579
683
  /** `expandVideoOverlayLayer` over an array; the SAME array when no layer changed. */
@@ -583,10 +687,11 @@ declare function applyVideoOverlayPreset(layer: VideoOverlayLayerInput | null |
583
687
  /** The panel's "Custom": the tag is cleared, the box kept. */
584
688
  declare function toCustomVideoOverlayLayer(layer: VideoOverlayLayerInput | null | undefined): VideoOverlayLayer;
585
689
  /**
586
- * D10 — delete `imageUrl` from every layer whose canvas handle is wired
587
- * (`wiredSlots`: 1-based). Pure over `layers` (the route has no edges, so this
588
- * is a sibling of the expansion, not part of it). Slots 13 and up have no handle
589
- * and are never touched. The input array by reference when nothing changes.
690
+ * D10 — delete `imageUrl` AND `videoUrl` from every layer whose canvas handle
691
+ * is wired (`wiredSlots`: 1-based): the wire is the layer's source, whichever
692
+ * kind it is. Pure over `layers` (the route has no edges, so this is a sibling
693
+ * of the expansion, not part of it). Slots 13 and up have no handle and are
694
+ * never touched. The input array by reference when nothing changes.
590
695
  */
591
696
  declare function clearWiredVideoOverlayImageUrls<T extends VideoOverlayLayerInput | null | undefined>(layers: readonly T[], wiredSlots: ReadonlySet<number>): readonly T[];
592
697
  interface NodeLike {
@@ -633,6 +738,107 @@ interface VideoOverlayOrderable {
633
738
  * (layer 1 lowest).
634
739
  */
635
740
  declare function videoOverlayRenderOrder(layers: ReadonlyArray<VideoOverlayOrderable | null | undefined>): number[];
741
+ /** The wired `layerPlan` value (a JSON string or an array) → its layers, or `invalid_layer_plan`. */
742
+ declare function parseVideoOverlayLayerPlan(raw: unknown): {
743
+ layers: VideoOverlayLayerInput[];
744
+ } | {
745
+ error: "invalid_layer_plan";
746
+ };
747
+ /** The node-data fields the assembly reads. */
748
+ interface VideoOverlayNodeFields {
749
+ readonly layers?: ReadonlyArray<VideoOverlayLayerInput | null | undefined> | null;
750
+ readonly outputAspect?: string | null;
751
+ readonly baseFit?: string | null;
752
+ readonly backgroundColor?: string | null;
753
+ /** As written, like the fields above: the validator, not the type, refuses a malformed box or an unknown layout. */
754
+ readonly baseBox?: VideoOverlayBoxInput | null;
755
+ readonly layout?: string | null;
756
+ }
757
+ /**
758
+ * The ONE node → request assembly, called by the canvas single-node run AND
759
+ * payload-builder (so both engines refuse identically). Per slot i over
760
+ * max(wired handles (≤ 12), stored layers) — every stored slot, so more than
761
+ * 20 layers that render reach the validator's `too_many_layers` instead of
762
+ * being dropped: the source is the wired handle's — a `videoUrl` when its slot
763
+ * is in `wiredVideoSlots`, else an `imageUrl` (a stored `sound` skipped, so a
764
+ * wire read as an image at the run never refuses it), replacing both stored
765
+ * sources — else the layer's own `imageUrl` / `videoUrl` as stored (both stored reach
766
+ * the validator's `layer_two_sources`; an empty-string one is dropped —
767
+ * `withoutEmptyVideoOverlaySources`, plan layers too); a slot with neither is dropped; a slot with
768
+ * no settings is the default layer (D2 — a `null` / missing / `{}` entry);
769
+ * `slot = i + 1` is stamped; the layer is expanded. `baseFit` /
770
+ * `backgroundColor` ride as stored, WITH or WITHOUT an `outputAspect`: the
771
+ * validator — not this assembly — refuses them without one
772
+ * (`fit_without_aspect`, spec §3.5), so a JSON-written node carrying a fit
773
+ * and no aspect is refused on both engines instead of silently rendering.
774
+ * (The canvas never builds that request: its two aspect writers clear both
775
+ * fields with the aspect.) A value the route's schema would reject — an
776
+ * unknown aspect or fit, a colour that is not `#rrggbb` — is dropped here.
777
+ * `baseBox` and `layout` ride AS STORED (a `""` layout reads as absent, like
778
+ * `null`; a box's `null` fields are dropped, as a layer's are by its
779
+ * expansion — every reader treats them as absent, and the REST route's schema
780
+ * takes no `null`, so the canvas run's request stays one the route accepts): a
781
+ * malformed box or an unknown layout reaches the validator, which refuses it
782
+ * on both engines.
783
+ *
784
+ * A wired layer plan (`planLayers`, a JSON string or an array) contributes its
785
+ * layers FIRST, then the slot layers: plan layers carry `planLayer` (1-based)
786
+ * and never a `slot`, and a plan layer's image is only its own `imageUrl` —
787
+ * never the index-aligned handle's (R18). An unreadable plan sets `planError`,
788
+ * which the validator reports before anything else.
789
+ */
790
+ declare function assembleVideoOverlayRequest(input: {
791
+ readonly videoUrl: string;
792
+ readonly data: VideoOverlayNodeFields;
793
+ /** Each wired handle's source, by slot (images and videos alike). */
794
+ readonly wiredImageUrls: ReadonlyArray<string | null | undefined>;
795
+ /** 1-based slots whose wired source is a video (`videoOverlayWiredLayerKind`); absent = every wire is an image. */
796
+ readonly wiredVideoSlots?: ReadonlySet<number>;
797
+ /** The wired `layerPlan` value (string or array); absent when nothing is wired. */
798
+ readonly planLayers?: unknown;
799
+ }): ExpandedVideoOverlayRequest;
800
+ /**
801
+ * Slot i's source: the wired handle's, else the layer's own `imageUrl`, else
802
+ * its own `videoUrl` — the one source rule the stage, the panel, the canvas
803
+ * executor and the DAG payload share (the render's merge is the same
804
+ * `wired ?? imageUrl ?? videoUrl`, spec §3.5). Every stored slot, past 20 too:
805
+ * the limit is the layer COUNT, not the slot (layers 1–4 removed from a
806
+ * 24-layer node leave 20 at slots 5–24). Only the wired list is capped, at the
807
+ * 12 handles.
808
+ */
809
+ declare function videoOverlaySlotSources(layers: ReadonlyArray<VideoOverlayLayerInput | null | undefined> | null | undefined, wiredImageUrls: ReadonlyArray<string | null | undefined>): Array<string | undefined>;
810
+ /** Everything that decides what a Video Overlay run paints. */
811
+ interface VideoOverlayComposition {
812
+ /** The resolved base video URL. */
813
+ readonly baseUrl?: string | null;
814
+ /** The image or video each slot draws, by slot index (`videoOverlaySlotSources`). */
815
+ readonly sources: ReadonlyArray<string | null | undefined>;
816
+ /** The node's stored settings — never the expanded request. */
817
+ readonly data: VideoOverlayNodeFields;
818
+ /** The wired `layerPlan` value (string or array); absent when nothing is wired. */
819
+ readonly planLayers?: unknown;
820
+ /** The 1-based slots whose wired source is a video (the assembly's `wiredVideoSlots`); absent or empty = every wire is an image. */
821
+ readonly videoSlots?: Iterable<number> | null;
822
+ }
823
+ /**
824
+ * The longest `resultCompositionKey` the REST route accepts. The canvas sends
825
+ * its key with a single-node Run so the job's output_data carries it (a result
826
+ * that lands after a page reload reads fresh); the route stores it opaquely and
827
+ * reads it for nothing else. A full 20-layer composition with long signed URLs
828
+ * fits well inside; a canvas key past it is not sent.
829
+ */
830
+ declare const VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH = 65536;
831
+ /**
832
+ * The composition key a run stamps on its result (`resultCompositionKey`): the
833
+ * base, every slot's image, the layers, the output aspect, the fit, the pad
834
+ * colour, the base box, the layout and which wired slots are videos. A later
835
+ * change to any of them marks the result "Result (old)".
836
+ * Canonical — independent of object key order, of absent vs undefined vs null
837
+ * fields, and of trailing empty slots — so the canvas (the node and its
838
+ * single-node Run) and the DAG payload give one key for one composition.
839
+ */
840
+ declare function videoOverlayCompositionKey(c: VideoOverlayComposition): string;
841
+
636
842
  interface VideoOverlayRect {
637
843
  readonly left: number;
638
844
  readonly top: number;
@@ -671,6 +877,7 @@ declare function videoOverlayCanvas(display: {
671
877
  * the canvas clamp, the even rounding.
672
878
  */
673
879
  declare function resolveVideoOverlayGeometry(canvas: VideoOverlayCanvas, layer: Pick<VideoOverlayLayer, "anchor" | "x" | "y" | "width" | "height" | "fit">, imageAspect: number): VideoOverlayGeometry;
880
+
674
881
  interface VideoOverlayIssue {
675
882
  readonly ok: false;
676
883
  readonly code: VideoOverlayErrorCode;
@@ -688,6 +895,8 @@ interface VideoOverlayValidationInput {
688
895
  readonly outputAspect?: string | null;
689
896
  readonly baseFit?: string | null;
690
897
  readonly backgroundColor?: string | null;
898
+ readonly baseBox?: VideoOverlayBoxInput | null;
899
+ readonly layout?: string | null;
691
900
  /** From `assembleVideoOverlayRequest`: the wired layer plan was unreadable. */
692
901
  readonly planError?: "invalid_layer_plan";
693
902
  }
@@ -710,8 +919,16 @@ declare function hasDrawableVideoOverlayBox(layer: unknown): boolean;
710
919
  * expanded field). Also refuses a PRESENT box / look field outside
711
920
  * `VIDEO_OVERLAY_BOUNDS` or its enum / type (`field_out_of_bounds`, spec §4.4's
712
921
  * "out-of-bounds box/opacity/zIndex" row — on the DAG path this validator is
713
- * the only check). A non-object `layers[]` entry reads as an empty layer. The
714
- * FIRST failure, as a code.
922
+ * the only check). A layer carries an image or a video, never both
923
+ * (`layer_two_sources`), at most `VIDEO_OVERLAY_MAX_VIDEO_LAYERS` are videos,
924
+ * and only a video layer has `sound`. A non-object `layers[]` entry reads as
925
+ * an empty layer. A `layout` (`""` reads as absent) must be known, a stack
926
+ * takes no `baseBox` (`layout_conflicts_base_box`: it places the base
927
+ * itself); a `baseBox` follows the layer rule (`incomplete_box`,
928
+ * `field_out_of_bounds` as `baseBox.<field>`) and needs an `outputAspect`; a
929
+ * layout gets what it needs (an aspect, a video layer) — checked before
930
+ * `base_box_needs_aspect`, so writing a layout's base box does not change the
931
+ * verdict. The FIRST failure, as a code.
715
932
  */
716
933
  declare function validateVideoOverlayRequest(body: VideoOverlayValidationInput): VideoOverlayValidation;
717
934
  /** `Plan layer <n>` for a layer-plan entry, `Layer <slot>` when the layer came from the canvas, else `layers[<index>]`; "" for a request-wide failure. */
@@ -722,86 +939,259 @@ declare function videoOverlayLayerLabel(ref: {
722
939
  }): string;
723
940
  /** The ONE English rendering of a verdict — the route's 400 text and the worker's error message. */
724
941
  declare function formatVideoOverlayError(issue: VideoOverlayIssue): string;
725
- /** The wired `layerPlan` value (a JSON string or an array) → its layers, or `invalid_layer_plan`. */
726
- declare function parseVideoOverlayLayerPlan(raw: unknown): {
727
- layers: VideoOverlayLayerInput[];
728
- } | {
729
- error: "invalid_layer_plan";
730
- };
731
- /** The node-data fields the assembly reads. */
732
- interface VideoOverlayNodeFields {
733
- readonly layers?: ReadonlyArray<VideoOverlayLayerInput | null | undefined> | null;
734
- readonly outputAspect?: string | null;
735
- readonly baseFit?: string | null;
736
- readonly backgroundColor?: string | null;
737
- }
942
+
738
943
  /**
739
- * The ONE node → request assembly, called by the canvas single-node run AND
740
- * payload-builder (so both engines refuse identically). Per slot i over
741
- * max(wired handles (≤ 12), stored layers) — every stored slot, so more than
742
- * 20 layers that render reach the validator's `too_many_layers` instead of
743
- * being dropped: the image is the wired handle's,
744
- * else the layer's own `imageUrl`; a slot with neither is dropped; a slot with
745
- * no settings is the default layer (D2 — a `null` / missing / `{}` entry);
746
- * `slot = i + 1` is stamped; the layer is expanded. `baseFit` /
747
- * `backgroundColor` ride as stored, WITH or WITHOUT an `outputAspect`: the
748
- * validator — not this assembly — refuses them without one
749
- * (`fit_without_aspect`, spec §3.5), so a JSON-written node carrying a fit
750
- * and no aspect is refused on both engines instead of silently rendering.
751
- * (The canvas never builds that request: its two aspect writers clear both
752
- * fields with the aspect.) A value the route's schema would reject — an
753
- * unknown aspect or fit, a colour that is not `#rrggbb` — is dropped here.
944
+ * Video Overlay video layers — what makes a layer a video, and what kind of
945
+ * layer a wired source becomes. A sibling of `video-overlay.ts`, which imports
946
+ * from here at run time; this file imports from it for TYPES only, so the
947
+ * dependency stays one-way.
754
948
  *
755
- * A wired layer plan (`planLayers`, a JSON string or an array) contributes its
756
- * layers FIRST, then the slot layers: plan layers carry `planLayer` (1-based)
757
- * and never a `slot`, and a plan layer's image is only its own `imageUrl` —
758
- * never the index-aligned handle's (R18). An unreadable plan sets `planError`,
759
- * which the validator reports before anything else.
949
+ * A layer is a video layer when it carries a non-empty `videoUrl`: the
950
+ * validator's count, the `animate` default and `videoOverlayHasVideoLayer`
951
+ * all read it through `isVideoOverlayVideoLayer`, so they cannot disagree.
952
+ * Wire contract only — no I/O.
760
953
  */
761
- declare function assembleVideoOverlayRequest(input: {
762
- readonly videoUrl: string;
763
- readonly data: VideoOverlayNodeFields;
764
- readonly wiredImageUrls: ReadonlyArray<string | null | undefined>;
765
- /** The wired `layerPlan` value (string or array); absent when nothing is wired. */
766
- readonly planLayers?: unknown;
767
- }): ExpandedVideoOverlayRequest;
954
+
955
+ /** True when any layer is a video layer. Non-array input and non-object entries read as none. */
956
+ declare function videoOverlayHasVideoLayer(layers: ReadonlyArray<VideoOverlayLayerInput | null | undefined> | null | undefined): boolean;
957
+ type VideoOverlayWiredLayerKind = "image" | "video";
958
+ /** The wire a layer handle receives, as both engines' resolvers know it. */
959
+ interface VideoOverlayWiredSource {
960
+ /** The source node's type. */
961
+ readonly type?: string | null;
962
+ /** The source handle the wire leaves (through any teleport). */
963
+ readonly handle?: string | null;
964
+ /** The medium the source declares for that handle — a component's or sub-workflow's port (`declaredOutputMediaType`). */
965
+ readonly declaredMediaType?: string | null;
966
+ /**
967
+ * The medium a List column's type declares for that handle
968
+ * (`listColumnMediaType`). It ranks BELOW the URL's extension: it only fills
969
+ * the gap for a link with no recognisable one.
970
+ */
971
+ readonly columnMediaType?: string | null;
972
+ }
768
973
  /**
769
- * Slot i's image: the wired handle's, else the layer's own `imageUrl` — the
770
- * one source rule the stage, the panel, the canvas executor and the DAG
771
- * payload share (the render's merge is the same `wired ?? imageUrl`, spec
772
- * §3.5). Every stored slot, past 20 too: the limit is the layer COUNT, not
773
- * the slot (layers 1–4 removed from a 24-layer node leave 20 at slots 5–24).
774
- * Only the wired list is capped, at the 12 handles.
775
- */
776
- declare function videoOverlaySlotSources(layers: ReadonlyArray<VideoOverlayLayerInput | null | undefined> | null | undefined, wiredImageUrls: ReadonlyArray<string | null | undefined>): Array<string | undefined>;
777
- /** Everything that decides what a Video Overlay run paints. */
778
- interface VideoOverlayComposition {
779
- /** The resolved base video URL. */
780
- readonly baseUrl?: string | null;
781
- /** The image each slot draws, by slot index (`videoOverlaySlotSources`). */
782
- readonly sources: ReadonlyArray<string | null | undefined>;
783
- /** The node's stored settings — never the expanded request. */
784
- readonly data: VideoOverlayNodeFields;
785
- /** The wired `layerPlan` value (string or array); absent when nothing is wired. */
786
- readonly planLayers?: unknown;
974
+ * What a source wired to a layer handle draws as — the ONE rule both engines
975
+ * call, in this order:
976
+ * 1. the medium the wire is known to carry: a pip row of its own
977
+ * (`LAYER_PIP_KINDS`), the medium a port declares (`declaredMediaType`:
978
+ * `image` or `video`), or the source's effective type for that handle
979
+ * (an aggregate lane, a scraper's typed pip, an entity's or an output's
980
+ * image pip — `resolveEffectiveSourceType`) when that is a single-medium producer;
981
+ * 2. the producer sets, for a single-medium producer only;
982
+ * 3. the URL path's extension, when it is a recognisable video or image one
983
+ * (a list, a sub-workflow, a producer in both sets);
984
+ * 4. a List column's declared type (`columnMediaType`: `image` or `video`),
985
+ * for a link with no recognisable extension — so a `.png` in a
986
+ * `video-url` column stays an image, as it was before video layers;
987
+ * 5. an image, as every layer was before video layers existed.
988
+ */
989
+ declare function videoOverlayWiredLayerKind(source: VideoOverlayWiredSource, url: string): VideoOverlayWiredLayerKind;
990
+ /** What a wire hands a Video Overlay before the run: an image, a video, or not known yet. */
991
+ type VideoOverlayWireMedium = VideoOverlayWiredLayerKind | "unknown";
992
+ /** Where a wire lands on a Video Overlay: a layer handle, or the `layerPlan` handle. */
993
+ interface VideoOverlayWireBeforeRun {
994
+ /** Default `layer`. */
995
+ readonly target?: "layer" | "plan";
996
+ /** A layer wire's files already known before the run (a List's own cells); none = not known. */
997
+ readonly knownUrls?: readonly string[];
787
998
  }
788
999
  /**
789
- * The longest `resultCompositionKey` the REST route accepts. The canvas sends
790
- * its key with a single-node Run so the job's output_data carries it (a result
791
- * that lands after a page reload reads fresh); the route stores it opaquely and
792
- * reads it for nothing else. A full 20-layer composition with long signed URLs
793
- * fits well inside; a canvas key past it is not sent.
794
- */
795
- declare const VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH = 65536;
1000
+ * What a source wired to a Video Overlay hands it, as far as it is known
1001
+ * BEFORE the run: the ONE place a run estimate asks.
1002
+ *
1003
+ * On a layer handle, by the run's own rule ({@link videoOverlayWiredLayerKind}):
1004
+ * a source that decides by itself (a pip row, a declared port, a single-medium
1005
+ * producer) answers its kind; one whose kind follows its file answers by the
1006
+ * files already known (`knownUrls`, read in the run's order: the extension,
1007
+ * then a List column's type), and is `unknown` when none is.
1008
+ *
1009
+ * On the `layerPlan` handle, only a plan pip row answers `image`
1010
+ * (`LAYER_PLAN_PIP_KINDS`: UGC Cards' plan is its card images): a declared
1011
+ * port, a producer set or a List column says what a FILE is, not what a
1012
+ * plan's layers are, so any other plan is `video` when its source is a video
1013
+ * and `unknown` otherwise.
1014
+ *
1015
+ * A run estimate prices `unknown` as a video run, so a quote is never below
1016
+ * what the run is charged; once a file is known, the answer is the run's.
1017
+ */
1018
+ declare function videoOverlayWireMediumBeforeRun(source: VideoOverlayWiredSource, wire?: VideoOverlayWireBeforeRun): VideoOverlayWireMedium;
1019
+ /**
1020
+ * The medium a component or sub-workflow declares for the handle a wire
1021
+ * leaves (`image`, `video`, `audio`, `text`, `any`), or undefined. A
1022
+ * sub-workflow (and a component) names its output ports in
1023
+ * `routeSnapshot.outputPorts`, its handles `out_<port>`; a component falls back
1024
+ * to `componentMetadata.outputs[].type`; a sub-workflow input node names its
1025
+ * ports in `ports`, by their own ids. The same fields both engines' input
1026
+ * resolvers route these wires by. (A List's column type is not a port
1027
+ * declaration: `listColumnMediaType` reads it, and it ranks below the URL's
1028
+ * extension.) Untrusted node data: anything malformed declares nothing.
1029
+ */
1030
+ declare function declaredOutputMediaType(type: string | null | undefined, data: unknown, handle: string | null | undefined): string | undefined;
1031
+ /**
1032
+ * The medium a List's column type declares for the pip a wire leaves
1033
+ * (`image-url` → image, `video-url` → video, `audio-url` → audio): the column
1034
+ * whose `handleId` the pip names, else its first column — the column a List's
1035
+ * own `list` pip carries, as both engines' input resolvers route it. Undefined
1036
+ * for any other source, a text or JSON column, or malformed data. Handed to the
1037
+ * wired-kind rule as `columnMediaType`, where it ranks below the URL's extension.
1038
+ */
1039
+ declare function listColumnMediaType(type: string | null | undefined, data: unknown, handle: string | null | undefined): string | undefined;
1040
+ /**
1041
+ * A WIRED slot's layer as it is stored: the expanded layer `expanded`, minus an
1042
+ * `animate` its writer did not set (`written`: the stored layer and the edit
1043
+ * applied to it). A wired slot's kind is its wire's, known only where the wire
1044
+ * is read — the run's assembly and the canvas stage — and the expansion there
1045
+ * fills the fade default by that kind (on for an image, off for a video); a
1046
+ * default stored here would fix one kind's default on the other, so a video
1047
+ * wired in later would fade. `written` itself when the result has the same
1048
+ * fields (an idempotent write); `expanded` by reference when nothing is removed.
1049
+ */
1050
+ declare function withoutImpliedVideoOverlayAnimate(expanded: VideoOverlayLayerInput, written: VideoOverlayLayerInput | null | undefined): VideoOverlayLayerInput;
1051
+
796
1052
  /**
797
- * The composition key a run stamps on its result (`resultCompositionKey`): the
798
- * base, every slot's image, the layers, the output aspect, the fit and the pad
799
- * colour. A later change to any of them marks the result "Result (old)".
800
- * Canonical — independent of object key order, of absent vs undefined vs null
801
- * fields, and of trailing empty slots — so the canvas (the node and its
802
- * single-node Run) and the DAG payload give one key for one composition.
1053
+ * Video Overlay layouts and the placed base — the request-level normaliser
1054
+ * (`expandVideoOverlayLayout`) and the geometry the canvas preview and the
1055
+ * ffmpeg worker both call, so the preview and the render cannot disagree.
1056
+ * A sibling of `video-overlay.ts`: it imports from there, nothing there imports
1057
+ * from here, and the layout ids live in the dependency-free
1058
+ * `video-overlay-layout-ids.ts`.
1059
+ *
1060
+ * - `video-bottom` / `video-top` write a base box; an explicit one wins.
1061
+ * - `pip` writes the first video layer's box in its corner.
1062
+ * - The two stacks write no box: their rects depend on the sources' shapes,
1063
+ * known only after probing, so the worker and the preview call
1064
+ * `resolveVideoOverlayStackRects` with them. A stack places the base
1065
+ * itself, so the validator refuses one with a `baseBox` (`layout_conflicts_base_box`).
1066
+ * `pip` and the two stacks turn the first video layer's fade off;
1067
+ * `video-bottom` / `video-top` touch no layer. "First video layer" is the
1068
+ * lowest one (`firstVideoLayerIndex`); image layers are left where they are.
1069
+ * A probed video's aspect goes through `clampVideoOverlayAspect` before any of
1070
+ * this geometry, and a video's rect through `evenVideoOverlayRect` after it —
1071
+ * in the worker and the preview alike.
1072
+ * Wire contract only — no I/O.
803
1073
  */
804
- declare function videoOverlayCompositionKey(c: VideoOverlayComposition): string;
1074
+
1075
+ /** Picture in picture: the inset's width and its margin from the corner, % of the output canvas (Speaker View's inset). */
1076
+ declare const VIDEO_OVERLAY_PIP_WIDTH = 30;
1077
+ declare const VIDEO_OVERLAY_PIP_INSET = 4;
1078
+ /** What a layout reads and writes — a request, an assembled request, or node data. */
1079
+ interface VideoOverlayLayoutFields {
1080
+ readonly layout?: string | null;
1081
+ readonly baseBox?: VideoOverlayBoxInput | null;
1082
+ readonly layers?: ReadonlyArray<VideoOverlayLayerInput | null | undefined> | null;
1083
+ }
1084
+ /**
1085
+ * The narrowest and widest aspect a probed video is placed at. A video's
1086
+ * shape is only known from its probe, and nothing bounds a probe, so a stack
1087
+ * of a 1:1000 sliver could otherwise place a rect off the canvas. Inside these
1088
+ * bounds every stack, base and layer rect stays on it.
1089
+ */
1090
+ declare const VIDEO_OVERLAY_ASPECT_BOUNDS: readonly [number, 8];
1091
+ /**
1092
+ * A probed video's display aspect (width ÷ height), held inside
1093
+ * `VIDEO_OVERLAY_ASPECT_BOUNDS`; one that is not a positive finite number
1094
+ * reads as square, as in the layer geometry. The worker and the preview pass
1095
+ * every video's aspect (the base's and each video layer's) through this before
1096
+ * any placement, so they place the same rects.
1097
+ */
1098
+ declare function clampVideoOverlayAspect(aspect: number): number;
1099
+ /**
1100
+ * A video's rect as the render draws it: left and top rounded DOWN to even,
1101
+ * and the size down to even. ffmpeg's overlay on yuv420 clears the low bit of
1102
+ * an odd x or y (a base placed at top 371 is drawn at 370), so this is where
1103
+ * the picture lands anyway; the worker hands the graph these numbers and the
1104
+ * preview draws them, so the two agree to the pixel. A stack's two rects move
1105
+ * by the same pixel (its heights are even), so its join stays exact. Applied
1106
+ * to the base's rect and to video layers only — an image layer's geometry is
1107
+ * unchanged. By reference when the rect is already even.
1108
+ */
1109
+ declare function evenVideoOverlayRect(rect: VideoOverlayRect): VideoOverlayRect;
1110
+ /** The lowest video layer by `videoOverlayRenderOrder`, as its index in `layers`; -1 when there is none. */
1111
+ declare function firstVideoLayerIndex(layers: ReadonlyArray<(VideoOverlayOrderable & {
1112
+ readonly videoUrl?: string | null;
1113
+ }) | null | undefined> | null | undefined): number;
1114
+ /**
1115
+ * The request-level normaliser: what a `layout` writes, and an explicit base
1116
+ * box's defaults. Called at the write boundaries and by the worker after the
1117
+ * validator. An explicit `baseBox` wins over `video-bottom` / `video-top`;
1118
+ * `pip` places the first video layer; the stacks write no box. An unknown
1119
+ * layout writes nothing (the validator refuses it), and neither does any
1120
+ * layout to a first video layer the validator refuses, so the verdict is the
1121
+ * same before and after. Never mutates; the request BY REFERENCE when nothing
1122
+ * changes; idempotent.
1123
+ */
1124
+ declare function expandVideoOverlayLayout<T extends VideoOverlayLayoutFields>(req: T): T & {
1125
+ readonly baseBox?: VideoOverlayBox;
1126
+ };
1127
+ /**
1128
+ * The two stacked rects, `top` for the base and `bottom` for the first video
1129
+ * layer, in output pixels.
1130
+ * - `stack-whole`: both whole, the same even width, touching, the pair centred
1131
+ * with equal spare room above and below (±1 px). They shrink together only
1132
+ * when both together are taller than the canvas. The join is pixel-exact.
1133
+ * - `stack-filled`: the top half (rounded down to even) and the rest, full
1134
+ * width; the aspects are not read — both are cropped (`cover`).
1135
+ * An aspect that is not a positive finite number reads as square.
1136
+ */
1137
+ declare function resolveVideoOverlayStackRects(layout: "stack-whole" | "stack-filled", canvas: VideoOverlayCanvas, topAspect: number, bottomAspect: number): {
1138
+ top: VideoOverlayRect;
1139
+ bottom: VideoOverlayRect;
1140
+ };
1141
+ /** A picture placed on the output canvas: its even rect and how it fills it (contain = scaled to the rect, cover = cropped to it). */
1142
+ interface VideoOverlayPlacedRect {
1143
+ readonly drawn: VideoOverlayRect;
1144
+ readonly fit: VideoOverlayFit;
1145
+ }
1146
+ /** A video layer to place. */
1147
+ interface PlacedVideoOverlayVideoInput {
1148
+ /** 0-based index in the request's layers[] (what `firstVideo` names). */
1149
+ readonly index: number;
1150
+ readonly layer: Pick<VideoOverlayLayer, "anchor" | "x" | "y" | "width" | "height" | "fit">;
1151
+ /** Its display aspect (width ÷ height, rotation and sample aspect resolved); held inside the bounds here. */
1152
+ readonly aspect: number;
1153
+ }
1154
+ interface VideoOverlayVideoPlacement {
1155
+ /** Present when the base is placed (a stack or a base box); absent = the base as before (its own size, or `outputAspect` with `baseFit`). */
1156
+ readonly basePlacement?: VideoOverlayPlacedRect;
1157
+ /** Each video layer's even drawn rect and fit, by request index. */
1158
+ readonly layers: ReadonlyMap<number, VideoOverlayPlacedRect>;
1159
+ }
1160
+ /**
1161
+ * Where the base and every video layer draw, on the output canvas — the ONE
1162
+ * placement the worker renders with and the canvas preview draws with. Every
1163
+ * aspect goes through `clampVideoOverlayAspect` and every rect through
1164
+ * `evenVideoOverlayRect` here, so neither caller can skip them.
1165
+ * - A stack (`stack-whole` / `stack-filled`): both rects from
1166
+ * `resolveVideoOverlayStackRects` with the base's and the first video
1167
+ * layer's aspects; that layer's stored box is not read. `stack-filled` draws
1168
+ * both `cover`, `stack-whole` both `contain`, whatever fit is stored.
1169
+ * - Otherwise a base box (written by `video-bottom` / `video-top`, or explicit)
1170
+ * places the base with `resolveVideoOverlayBaseRect` at its own fit.
1171
+ * - Every other video layer: its box, `resolveVideoOverlayGeometry`, at its
1172
+ * aspect (`pip` has already written its box).
1173
+ * An image layer is not placed here: its geometry is unchanged. The caller
1174
+ * passes a stack's first video layer among `videos` (the worker refuses a
1175
+ * stack whose first video layer it does not keep). Pure.
1176
+ */
1177
+ declare function placeVideoOverlayVideos(input: {
1178
+ readonly canvas: VideoOverlayCanvas;
1179
+ readonly layout?: string | null;
1180
+ readonly baseBox?: VideoOverlayBox;
1181
+ readonly baseAspect: number;
1182
+ /** `firstVideoLayerIndex` of the request's layers: what a stack places under the base. */
1183
+ readonly firstVideo: number;
1184
+ readonly videos: ReadonlyArray<PlacedVideoOverlayVideoInput>;
1185
+ }): VideoOverlayVideoPlacement;
1186
+ /**
1187
+ * Where a placed base draws, in output pixels. Its SIZE is the layer
1188
+ * geometry's drawn size (`resolveVideoOverlayGeometry`: the same clamp and even
1189
+ * rounding as an image layer); it is then placed by that drawn size against the
1190
+ * anchor, plus the x / y offsets — so a contained base sits flush on its
1191
+ * anchored edge rather than centred in a box rounded to other numbers (a 16:9
1192
+ * base at the bottom of 1080x1920 draws at y 1314–1920, with no strip under it).
1193
+ */
1194
+ declare function resolveVideoOverlayBaseRect(canvas: VideoOverlayCanvas, box: VideoOverlayBox, baseAspect: number): VideoOverlayRect;
805
1195
 
806
1196
  /**
807
1197
  * Video-analysis node — shared data contract.
@@ -1650,7 +2040,8 @@ declare function uiResolutionFill(provider: string): string | undefined;
1650
2040
  * Duration the node RENDERS and BILLS when `data.duration` is unset, for the
1651
2041
  * families whose credit identifier declares a duration fallback that is NOT
1652
2042
  * `durations[0]`. Wan 3.0's bare identifier is the 5s tier while its ladder
1653
- * starts at 2s; Vidu Q4's is the 5s tier while its ladder starts at 3s; the
2043
+ * starts at 2s; Vidu Q4's is the 5s tier while its ladder starts at 3s;
2044
+ * PixVerse V6 Max's is the 5s tier while its ladder starts at 1s; the
1654
2045
  * Gemini Omni family's is the 8s tier while its ladder starts at 4s. Everyone else falls back to the first listed duration, so this returns
1655
2046
  * undefined and the caller keeps `durations[0]`.
1656
2047
  */
@@ -1815,4 +2206,4 @@ declare function resolveFrameDelivery(args: {
1815
2206
  supportsReferenceImages: boolean;
1816
2207
  }): Exclude<FrameDelivery, "auto">;
1817
2208
 
1818
- export { AUTO_DOWNLOAD_MAX_SEC, type AnalyzedScene, type AudioLayer, type ClipLook, DEFAULT_FRAME_DELIVERY, DEFAULT_FRAME_FIT, DEFAULT_VIDEO_OVERLAY_LAYER, DIRECT_VIDEO_EXTENSIONS, type EntitySlot, type EntitySlotOwner, type ExpandedVideoOverlayRequest, FRAME_DELIVERIES, FRAME_DELIVERY_BY_PROVIDER, FRAME_FITS, FRAME_FIT_STRETCH_TOLERANCE, type FrameDelivery, type FrameFit, type FrameFitPlan, INSTAGRAM_HOSTS, MAX_VIDEO_LINK_INPUT_CHARS, SLOT_TOKEN_RE, SOCIAL_VIDEO_HOSTS, type SlotVariation, VIDEO_ANALYSIS_AUDIO_MODES, VIDEO_ANALYSIS_CLIP_TRANSITIONS_IN, VIDEO_ANALYSIS_DEFAULT_VARIATION, VIDEO_ANALYSIS_ENTITY_SOURCES, VIDEO_ANALYSIS_FACELESS_ANGLES, VIDEO_ANALYSIS_MAX_SCENE_SEC, VIDEO_ANALYSIS_MAX_VARIATIONS, VIDEO_ANALYSIS_SHOT_ANGLES, VIDEO_ANALYSIS_SPEED_EFFECTS, VIDEO_ANALYSIS_STORY_JUMPS, VIDEO_ANALYSIS_TEXT_KINDS, VIDEO_ANALYSIS_TIMES_OF_DAY, VIDEO_ANALYSIS_TRANSITIONS, VIDEO_ANALYSIS_VARIATION_SLUGS, VIDEO_ANALYSIS_VISUAL_EFFECTS, VIDEO_CHARACTER_DESCRIPTION_MAX, VIDEO_CHARACTER_EXTRA_IMAGES_MAX, VIDEO_CHARACTER_NAME_MAX, VIDEO_CHARACTER_REFS_WIRE_MAX, VIDEO_CHARACTER_VOICE_DESCRIPTION_MAX, VIDEO_CHARACTER_VOICE_EXAMPLE_MAX, VIDEO_LINK_AUDIO_CONSUMER_TYPES, VIDEO_LINK_DERIVED_FIELDS, VIDEO_LINK_TOLERANT_CONSUMER_TYPES, VIDEO_OUTPUT_CANVAS, VIDEO_OVERLAY_ANIMATION_MIN_SCALE, VIDEO_OVERLAY_ANIMATION_SEC, VIDEO_OVERLAY_BADGE_INSET, VIDEO_OVERLAY_BADGE_WIDTH, VIDEO_OVERLAY_BOUNDS, VIDEO_OVERLAY_BOX_FIELDS, VIDEO_OVERLAY_CORNERS, VIDEO_OVERLAY_DEFAULT_BACKGROUND, VIDEO_OVERLAY_ERROR_CODES, VIDEO_OVERLAY_FITS, VIDEO_OVERLAY_HANDLE_IDS, VIDEO_OVERLAY_LAYER_PLAN_HANDLE, VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH, VIDEO_OVERLAY_MAX_LAYERS, VIDEO_OVERLAY_MAX_TIME_SEC, VIDEO_OVERLAY_MAX_TOTAL_LAYER_BYTES, VIDEO_OVERLAY_OUTPUT_ASPECTS, VIDEO_OVERLAY_PRESETS, VIDEO_OVERLAY_PRESET_IDS, VIDEO_OVERLAY_WARNING_CODES, type VideoAnalysisAudioMode, type VideoAnalysisClipTransitionIn, type VideoAnalysisEntitySource, type VideoAnalysisResult, type VideoAnalysisShotAngle, type VideoAnalysisSpeedEffect, type VideoAnalysisTextKind, type VideoAnalysisTransition, type VideoAnalysisVisualEffect, type VideoCharacterRefProblem, type VideoCharacterReference, type VideoCharacterVoice, type VideoLinkGraphEdge, type VideoLinkGraphNode, type VideoLinkInputProblem, type VideoLinkNeed, type VideoLinkNodeFields, type VideoLinkPlatform, type VideoOutputCanvas, type VideoOverlayBox, type VideoOverlayCanvas, type VideoOverlayComposition, type VideoOverlayCorner, type VideoOverlayErrorCode, type VideoOverlayFit, type VideoOverlayGeometry, type VideoOverlayIssue, type VideoOverlayLayer, type VideoOverlayLayerInput, type VideoOverlayLayerSpec, type VideoOverlayNodeFields, type VideoOverlayOrderable, type VideoOverlayOutputAspect, type VideoOverlayPresetId, type VideoOverlayRect, type VideoOverlayRequest, type VideoOverlayValidation, type VideoOverlayValidationInput, type VideoOverlayWarning, type VideoOverlayWarningCode, type WindowAnalysis, type WindowScene, YOUTUBE_HOSTS, YOUTUBE_MAX_HEIGHT, analyzedSceneSchema, applyVideoOverlayPreset, aspectRatioFromDims, assembleVideoOverlayRequest, centreCropToAspect, characterReferencesFromWired, clearWiredVideoOverlayImageUrls, clipLookSchema, computeFrameFitPlan, deriveSlotRefs, detectVideoLinkPlatform, dropStaleVideoLinkFields, dropUnknownBindings, dropUnknownSpeakers, editPlanSourceDurationSec, entitySlotSchema, expandVideoOverlayLayer, expandVideoOverlayPresets, extractVideoDurationFromNode, formatVideoOverlayError, hasDrawableVideoOverlayBox, hasUrlParserHazard, hostnameMatchesAllowlist, inferMusicVideo, isDirectVideoFileUrl, isOversizedScene, isSocialVideoUrl, isVideoOverlayCorner, isVideoOverlayOutputAspect, isVideoOverlayPresetId, measuredCanvasCombinations, mergeClipLook, minimalRatioDimensions, normalizeVideoOverlayNodes, parseAspectToken, parseVideoOverlayLayerPlan, renderAnalyzedScene, resolveFrameDelivery, resolveFrameFitAspect, resolveOutputCanvas, resolveVideoLinkOutput, resolveVideoOverlayGeometry, rewriteSceneBindings, rewriteSlotTokens, rewriteSpeakerSlots, slotVariationSchema, stripDerivedAnalysisFields, toCustomVideoOverlayLayer, uiAspectRatioFill, uiDurationFill, uiResolutionFill, unwrapUnresolvedTokens, validateVideoOverlayRequest, videoAnalysisResultSchema, videoCharacterDistinctVoices, videoCharacterRefCap, videoCharacterRefProblem, videoCharacterRefProviders, videoCharacterRefUnits, videoCharacterVoiceCap, videoCharacterVoiceKey, videoCharacterVoiceProblem, videoLinkDownloadedFile, videoLinkInputProblem, videoLinkNeedOf, videoLinkNeedsDownload, videoLinkPageUrl, videoLinkRunNeeds, videoOverlayCanvas, videoOverlayCompositionKey, videoOverlayLayerLabel, videoOverlayPresetBox, videoOverlayRenderOrder, videoOverlaySlotOfHandle, videoOverlaySlotSources, windowAnalysisSchema };
2209
+ export { AUTO_DOWNLOAD_MAX_SEC, type AnalyzedScene, type AudioLayer, CONTAINER_OVERHANG_SEC, type ClipLook, DEFAULT_FRAME_DELIVERY, DEFAULT_FRAME_FIT, DEFAULT_VIDEO_OVERLAY_LAYER, DIRECT_VIDEO_EXTENSIONS, type EntitySlot, type EntitySlotOwner, type ExpandedVideoOverlayRequest, FRAME_DELIVERIES, FRAME_DELIVERY_BY_PROVIDER, FRAME_FITS, FRAME_FIT_STRETCH_TOLERANCE, type FrameDelivery, type FrameFit, type FrameFitPlan, INSTAGRAM_HOSTS, MAX_VIDEO_LINK_INPUT_CHARS, type PlacedVideoOverlayVideoInput, SLOT_TOKEN_RE, SOCIAL_VIDEO_HOSTS, type SlotVariation, VIDEO_ANALYSIS_AUDIO_MODES, VIDEO_ANALYSIS_CLIP_TRANSITIONS_IN, VIDEO_ANALYSIS_DEFAULT_VARIATION, VIDEO_ANALYSIS_ENTITY_SOURCES, VIDEO_ANALYSIS_FACELESS_ANGLES, VIDEO_ANALYSIS_MAX_SCENE_SEC, VIDEO_ANALYSIS_MAX_VARIATIONS, VIDEO_ANALYSIS_SHOT_ANGLES, VIDEO_ANALYSIS_SPEED_EFFECTS, VIDEO_ANALYSIS_STORY_JUMPS, VIDEO_ANALYSIS_TEXT_KINDS, VIDEO_ANALYSIS_TIMES_OF_DAY, VIDEO_ANALYSIS_TRANSITIONS, VIDEO_ANALYSIS_VARIATION_SLUGS, VIDEO_ANALYSIS_VISUAL_EFFECTS, VIDEO_CHARACTER_DESCRIPTION_MAX, VIDEO_CHARACTER_EXTRA_IMAGES_MAX, VIDEO_CHARACTER_NAME_MAX, VIDEO_CHARACTER_REFS_WIRE_MAX, VIDEO_CHARACTER_VOICE_DESCRIPTION_MAX, VIDEO_CHARACTER_VOICE_EXAMPLE_MAX, VIDEO_LINK_AUDIO_CONSUMER_TYPES, VIDEO_LINK_DERIVED_FIELDS, VIDEO_LINK_TOLERANT_CONSUMER_TYPES, VIDEO_OUTPUT_CANVAS, VIDEO_OVERLAY_ANIMATION_MIN_SCALE, VIDEO_OVERLAY_ANIMATION_SEC, VIDEO_OVERLAY_ASPECT_BOUNDS, VIDEO_OVERLAY_BADGE_INSET, VIDEO_OVERLAY_BADGE_WIDTH, VIDEO_OVERLAY_BOUNDS, VIDEO_OVERLAY_BOX_FIELDS, VIDEO_OVERLAY_CORNERS, VIDEO_OVERLAY_DEFAULT_BACKGROUND, VIDEO_OVERLAY_ERROR_CODES, VIDEO_OVERLAY_FITS, VIDEO_OVERLAY_HANDLE_IDS, VIDEO_OVERLAY_LAYER_PLAN_HANDLE, VIDEO_OVERLAY_LAYOUT_IDS, VIDEO_OVERLAY_MAX_COMPOSITION_KEY_LENGTH, VIDEO_OVERLAY_MAX_LAYERS, VIDEO_OVERLAY_MAX_LAYER_VIDEO_BYTES, VIDEO_OVERLAY_MAX_TIME_SEC, VIDEO_OVERLAY_MAX_TOTAL_LAYER_BYTES, VIDEO_OVERLAY_MAX_VIDEO_LAYERS, VIDEO_OVERLAY_OUTPUT_ASPECTS, VIDEO_OVERLAY_PIP_INSET, VIDEO_OVERLAY_PIP_WIDTH, VIDEO_OVERLAY_PRESETS, VIDEO_OVERLAY_PRESET_IDS, VIDEO_OVERLAY_VIDEO_MAX_BASE_SEC, VIDEO_OVERLAY_VOLUME_BOUNDS, VIDEO_OVERLAY_WARNING_CODES, type VideoAnalysisAudioMode, type VideoAnalysisClipTransitionIn, type VideoAnalysisEntitySource, type VideoAnalysisResult, type VideoAnalysisShotAngle, type VideoAnalysisSpeedEffect, type VideoAnalysisTextKind, type VideoAnalysisTransition, type VideoAnalysisVisualEffect, type VideoCharacterRefProblem, type VideoCharacterReference, type VideoCharacterVoice, type VideoLinkGraphEdge, type VideoLinkGraphNode, type VideoLinkInputProblem, type VideoLinkNeed, type VideoLinkNodeFields, type VideoLinkPlatform, type VideoOutputCanvas, type VideoOverlayBaseBoxSpec, type VideoOverlayBox, type VideoOverlayBoxInput, type VideoOverlayCanvas, type VideoOverlayComposition, type VideoOverlayCorner, type VideoOverlayErrorCode, type VideoOverlayFit, type VideoOverlayGeometry, type VideoOverlayIssue, type VideoOverlayLayer, type VideoOverlayLayerInput, type VideoOverlayLayerSpec, type VideoOverlayLayoutFields, type VideoOverlayLayoutId, type VideoOverlayNodeFields, type VideoOverlayOrderable, type VideoOverlayOutputAspect, type VideoOverlayPlacedRect, type VideoOverlayPresetId, type VideoOverlayRect, type VideoOverlayRequest, type VideoOverlaySound, type VideoOverlayValidation, type VideoOverlayValidationInput, type VideoOverlayVideoPlacement, type VideoOverlayWarning, type VideoOverlayWarningCode, type VideoOverlayWireBeforeRun, type VideoOverlayWireMedium, type VideoOverlayWiredLayerKind, type VideoOverlayWiredSource, type WindowAnalysis, type WindowScene, YOUTUBE_HOSTS, YOUTUBE_MAX_HEIGHT, analyzedSceneSchema, applyVideoOverlayPreset, aspectRatioFromDims, assembleVideoOverlayRequest, centreCropToAspect, characterReferencesFromWired, clampVideoOverlayAspect, clearWiredVideoOverlayImageUrls, clipLookSchema, computeFrameFitPlan, declaredOutputMediaType, deriveSlotRefs, detectVideoLinkPlatform, dropStaleVideoLinkFields, dropUnknownBindings, dropUnknownSpeakers, editPlanSourceDurationSec, entitySlotSchema, evenVideoOverlayRect, expandVideoOverlayLayer, expandVideoOverlayLayout, expandVideoOverlayPresets, extractVideoDurationFromNode, firstVideoLayerIndex, formatVideoOverlayError, hasDrawableVideoOverlayBox, hasUrlParserHazard, hostnameMatchesAllowlist, inferMusicVideo, isDirectVideoFileUrl, isOversizedScene, isSocialVideoUrl, isVideoOverlayCorner, isVideoOverlayLayoutId, isVideoOverlayOutputAspect, isVideoOverlayPresetId, listColumnMediaType, measuredCanvasCombinations, mergeClipLook, minimalRatioDimensions, normalizeVideoOverlayNodes, parseAspectToken, parseVideoOverlayLayerPlan, placeVideoOverlayVideos, renderAnalyzedScene, resolveFrameDelivery, resolveFrameFitAspect, resolveOutputCanvas, resolveVideoLinkOutput, resolveVideoOverlayBaseRect, resolveVideoOverlayGeometry, resolveVideoOverlayStackRects, rewriteSceneBindings, rewriteSlotTokens, rewriteSpeakerSlots, slotVariationSchema, stripDerivedAnalysisFields, toCustomVideoOverlayLayer, uiAspectRatioFill, uiDurationFill, uiResolutionFill, unwrapUnresolvedTokens, validateVideoOverlayRequest, videoAnalysisResultSchema, videoCharacterDistinctVoices, videoCharacterRefCap, videoCharacterRefProblem, videoCharacterRefProviders, videoCharacterRefUnits, videoCharacterVoiceCap, videoCharacterVoiceKey, videoCharacterVoiceProblem, videoLinkDownloadedFile, videoLinkInputProblem, videoLinkNeedOf, videoLinkNeedsDownload, videoLinkPageUrl, videoLinkRunNeeds, videoOverlayCanvas, videoOverlayCompositionKey, videoOverlayHasVideoLayer, videoOverlayLayerLabel, videoOverlayLayoutNeedsAspect, videoOverlayLayoutNeedsVideoLayer, videoOverlayLayoutPlacesBase, videoOverlayPresetBox, videoOverlayRenderOrder, videoOverlaySlotOfHandle, videoOverlaySlotSources, videoOverlayWireMediumBeforeRun, videoOverlayWiredLayerKind, windowAnalysisSchema, withoutImpliedVideoOverlayAnimate };