@clipwright/core 0.59.0 → 0.61.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 (586) hide show
  1. package/dist/account-actors.d.ts +0 -43
  2. package/dist/account-actors.js +0 -55
  3. package/dist/account.d.ts +0 -6
  4. package/dist/account.js +0 -18
  5. package/dist/actor-bounds.d.ts +0 -5
  6. package/dist/actor-bounds.js +0 -6
  7. package/dist/actor-qualities.d.ts +0 -3
  8. package/dist/actor-qualities.js +0 -4
  9. package/dist/actors.d.ts +0 -16
  10. package/dist/actors.js +0 -21
  11. package/dist/ad-guide.js +0 -2
  12. package/dist/ad-pause-trim.d.ts +0 -5
  13. package/dist/ad-pause-trim.js +0 -8
  14. package/dist/api-failure.d.ts +0 -44
  15. package/dist/api-failure.js +0 -62
  16. package/dist/aspect.d.ts +0 -29
  17. package/dist/aspect.js +1 -34
  18. package/dist/asset-identity.d.ts +0 -2
  19. package/dist/asset-identity.js +0 -3
  20. package/dist/assets.d.ts +0 -34
  21. package/dist/assets.js +0 -42
  22. package/dist/billing-terms.d.ts +6 -3
  23. package/dist/billing-terms.js +0 -4
  24. package/dist/brand-styles.d.ts +0 -6
  25. package/dist/brand-styles.js +0 -13
  26. package/dist/broll-policy.js +0 -1
  27. package/dist/canvas-fit.d.ts +0 -2
  28. package/dist/canvas-fit.js +0 -4
  29. package/dist/caption-funnel.d.ts +0 -2
  30. package/dist/caption-funnel.js +0 -15
  31. package/dist/caption-geometry.d.ts +0 -6
  32. package/dist/caption-geometry.js +0 -10
  33. package/dist/caption-language.d.ts +0 -3
  34. package/dist/caption-language.js +0 -6
  35. package/dist/contract-dispositions.d.ts +0 -61
  36. package/dist/contract-dispositions.js +3 -96
  37. package/dist/contracts/v1/workflow-brief.d.ts +61 -3
  38. package/dist/contracts/v1/workflow-brief.js +0 -13
  39. package/dist/contracts/v1/workflow-catalog.d.ts +118 -0
  40. package/dist/contracts/v1/workflow-catalog.js +0 -3
  41. package/dist/contracts/v1/workflow-client.d.ts +116 -0
  42. package/dist/contracts/v1/workflow-client.js +0 -1
  43. package/dist/contracts/v1/workflow-dto.js +0 -1
  44. package/dist/contracts/v1/workflow-evidence.js +0 -1
  45. package/dist/contracts/v1/workflow-execution.d.ts +47 -1
  46. package/dist/contracts/v1/workflow-execution.js +0 -4
  47. package/dist/contracts/v1/workflow-next.d.ts +13 -2
  48. package/dist/contracts/v1/workflow-next.js +0 -3
  49. package/dist/contracts/v1/workflow-plan.d.ts +177 -0
  50. package/dist/contracts/v1/workflow-plan.js +0 -1
  51. package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
  52. package/dist/contracts/v1/workflow-primitives.js +0 -2
  53. package/dist/contracts/v1/workflow-run-read.d.ts +15 -1
  54. package/dist/contracts/v1/workflow-run-read.js +0 -3
  55. package/dist/creator-profile.d.ts +0 -30
  56. package/dist/creator-profile.js +0 -45
  57. package/dist/default-actor.js +0 -2
  58. package/dist/design.d.ts +0 -17
  59. package/dist/design.js +0 -18
  60. package/dist/edit-billing.d.ts +0 -6
  61. package/dist/edit-billing.js +0 -10
  62. package/dist/edit-candidate.d.ts +0 -6
  63. package/dist/edit-candidate.js +0 -9
  64. package/dist/edit-document.d.ts +0 -12
  65. package/dist/edit-document.js +0 -15
  66. package/dist/edit-faceless.d.ts +0 -3
  67. package/dist/edit-faceless.js +0 -4
  68. package/dist/edit-long-form.d.ts +0 -13
  69. package/dist/edit-long-form.js +0 -17
  70. package/dist/edit-operations.d.ts +0 -1
  71. package/dist/edit-operations.js +0 -2
  72. package/dist/edit-primitives.d.ts +0 -3
  73. package/dist/edit-primitives.js +0 -5
  74. package/dist/edit-revision.d.ts +0 -4
  75. package/dist/edit-revision.js +0 -6
  76. package/dist/edit-rules.d.ts +0 -3
  77. package/dist/edit-rules.js +0 -9
  78. package/dist/edit-shots.d.ts +45 -5
  79. package/dist/edit-shots.js +7 -11
  80. package/dist/edit-validate.d.ts +0 -10
  81. package/dist/edit-validate.js +0 -14
  82. package/dist/edit.js +0 -3
  83. package/dist/endpoint-notes.d.ts +0 -2
  84. package/dist/endpoint-notes.js +0 -3
  85. package/dist/endpoints.d.ts +0 -11
  86. package/dist/endpoints.js +7 -21
  87. package/dist/errors.d.ts +0 -42
  88. package/dist/errors.js +0 -54
  89. package/dist/explainer-fit.d.ts +0 -7
  90. package/dist/explainer-fit.js +0 -10
  91. package/dist/face-billing.d.ts +29 -11
  92. package/dist/face-billing.js +6 -25
  93. package/dist/face-delivery.d.ts +0 -1
  94. package/dist/face-delivery.js +0 -2
  95. package/dist/faceless-action-shots.d.ts +0 -8
  96. package/dist/faceless-action-shots.js +0 -8
  97. package/dist/faceless-customer-anchors.d.ts +0 -1
  98. package/dist/faceless-customer-anchors.js +0 -2
  99. package/dist/faceless-cut-style.js +0 -1
  100. package/dist/faceless-direction-summary.d.ts +27 -0
  101. package/dist/faceless-direction-summary.js +8 -0
  102. package/dist/faceless-image-placement.d.ts +0 -2
  103. package/dist/faceless-image-placement.js +0 -3
  104. package/dist/faceless-image-qualification.js +0 -2
  105. package/dist/faceless-media-record.d.ts +0 -6
  106. package/dist/faceless-media-record.js +0 -11
  107. package/dist/faceless-price.d.ts +40 -35
  108. package/dist/faceless-price.js +35 -49
  109. package/dist/faceless-public-plan.d.ts +0 -13
  110. package/dist/faceless-public-plan.js +0 -11
  111. package/dist/faceless-public.d.ts +63 -22
  112. package/dist/faceless-public.js +23 -58
  113. package/dist/faceless-short-61.js +0 -1
  114. package/dist/faceless-storyboard-timing.js +0 -1
  115. package/dist/faceless-storyboard-v2-plan.js +0 -1
  116. package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
  117. package/dist/faceless-storyboard-v2-timing.js +0 -3
  118. package/dist/faceless-storyboard-v2.js +0 -1
  119. package/dist/faceless-storyboard.js +0 -1
  120. package/dist/faceless-voices.d.ts +0 -16
  121. package/dist/faceless-voices.js +0 -18
  122. package/dist/feedback.d.ts +0 -4
  123. package/dist/feedback.js +0 -5
  124. package/dist/film-directions.d.ts +0 -2
  125. package/dist/film-directions.js +0 -7
  126. package/dist/film-drafts.d.ts +0 -8
  127. package/dist/film-drafts.js +0 -19
  128. package/dist/film-guide.d.ts +0 -3
  129. package/dist/film-guide.js +0 -6
  130. package/dist/film-styles.d.ts +0 -5
  131. package/dist/film-styles.js +0 -8
  132. package/dist/generation-shot.d.ts +0 -5
  133. package/dist/generation-shot.js +0 -8
  134. package/dist/generations-output.d.ts +0 -2
  135. package/dist/generations-output.js +0 -5
  136. package/dist/generations.d.ts +0 -22
  137. package/dist/generations.js +21 -44
  138. package/dist/idempotency.d.ts +1 -21
  139. package/dist/idempotency.js +8 -29
  140. package/dist/index.d.ts +3 -0
  141. package/dist/index.js +3 -28
  142. package/dist/live-shot-kinds.d.ts +16 -25
  143. package/dist/live-shot-kinds.js +12 -28
  144. package/dist/long-form-pricing.d.ts +0 -5
  145. package/dist/long-form-pricing.js +0 -6
  146. package/dist/long-form-profile.d.ts +0 -3
  147. package/dist/long-form-profile.js +0 -4
  148. package/dist/long-form-revision.d.ts +0 -9
  149. package/dist/long-form-revision.js +0 -11
  150. package/dist/markdown-quote.d.ts +0 -2
  151. package/dist/markdown-quote.js +0 -3
  152. package/dist/mascots.d.ts +0 -5
  153. package/dist/mascots.js +0 -10
  154. package/dist/max-credits.d.ts +0 -1
  155. package/dist/max-credits.js +0 -2
  156. package/dist/mcp-ugc-descriptions.d.ts +0 -2
  157. package/dist/mcp-ugc-descriptions.js +1 -6
  158. package/dist/media-timebase.d.ts +0 -2
  159. package/dist/media-timebase.js +0 -6
  160. package/dist/motion-styles.d.ts +0 -8
  161. package/dist/motion-styles.js +0 -11
  162. package/dist/moves.d.ts +0 -7
  163. package/dist/moves.js +0 -9
  164. package/dist/music.d.ts +0 -5
  165. package/dist/music.js +2 -9
  166. package/dist/naming.d.ts +0 -3
  167. package/dist/naming.js +0 -19
  168. package/dist/openapi.d.ts +0 -13
  169. package/dist/openapi.js +6 -11
  170. package/dist/output-provenance.d.ts +0 -4
  171. package/dist/output-provenance.js +0 -5
  172. package/dist/own-agent-price.d.ts +19 -22
  173. package/dist/own-agent-price.js +30 -25
  174. package/dist/own-agent-runs.d.ts +111 -11
  175. package/dist/own-agent-runs.js +89 -24
  176. package/dist/pacing.d.ts +3 -15
  177. package/dist/pacing.js +18 -18
  178. package/dist/parts-pricing.d.ts +8 -24
  179. package/dist/parts-pricing.js +19 -30
  180. package/dist/post-text.d.ts +0 -2
  181. package/dist/post-text.js +0 -4
  182. package/dist/presenter-beats.d.ts +0 -10
  183. package/dist/presenter-beats.js +0 -14
  184. package/dist/presenter-matte.d.ts +0 -7
  185. package/dist/presenter-matte.js +0 -9
  186. package/dist/presenter-takes.d.ts +0 -3
  187. package/dist/presenter-takes.js +0 -8
  188. package/dist/prices.d.ts +2 -8
  189. package/dist/prices.js +13 -23
  190. package/dist/public-endpoints.d.ts +0 -11
  191. package/dist/public-endpoints.js +0 -14
  192. package/dist/public-responses.d.ts +0 -2
  193. package/dist/public-responses.js +0 -3
  194. package/dist/rate-limit.d.ts +0 -24
  195. package/dist/rate-limit.js +0 -29
  196. package/dist/reference-analysis.d.ts +57 -34
  197. package/dist/reference-analysis.js +0 -69
  198. package/dist/reference-bring.d.ts +33 -0
  199. package/dist/reference-bring.js +28 -0
  200. package/dist/reference-display.d.ts +0 -3
  201. package/dist/reference-display.js +37 -4
  202. package/dist/reference-kinds.d.ts +0 -4
  203. package/dist/reference-kinds.js +0 -6
  204. package/dist/reference-lyrics.d.ts +0 -6
  205. package/dist/reference-lyrics.js +0 -6
  206. package/dist/reference-profile.d.ts +270 -39
  207. package/dist/reference-profile.js +64 -50
  208. package/dist/reference-staging.d.ts +0 -10
  209. package/dist/reference-staging.js +0 -14
  210. package/dist/reference-text-spans.d.ts +0 -4
  211. package/dist/reference-text-spans.js +0 -7
  212. package/dist/reference-voice-over.d.ts +0 -6
  213. package/dist/reference-voice-over.js +0 -7
  214. package/dist/reference-voice.d.ts +0 -7
  215. package/dist/reference-voice.js +0 -12
  216. package/dist/render-backend.d.ts +0 -30
  217. package/dist/render-backend.js +0 -5
  218. package/dist/resolved-timeline.d.ts +4 -5
  219. package/dist/resolved-timeline.js +1 -31
  220. package/dist/run-media.d.ts +0 -1
  221. package/dist/run-media.js +0 -2
  222. package/dist/run-preflight.d.ts +0 -4
  223. package/dist/run-preflight.js +0 -11
  224. package/dist/run-static-warnings.d.ts +0 -8
  225. package/dist/run-static-warnings.js +0 -38
  226. package/dist/runs.d.ts +16 -32
  227. package/dist/runs.js +0 -50
  228. package/dist/scene-bible.d.ts +15 -7
  229. package/dist/scene-bible.js +15 -10
  230. package/dist/scene-graph.d.ts +0 -12
  231. package/dist/scene-graph.js +0 -24
  232. package/dist/scene-place.d.ts +0 -25
  233. package/dist/scene-place.js +0 -24
  234. package/dist/scene-proposal.d.ts +0 -3
  235. package/dist/scene-proposal.js +0 -9
  236. package/dist/script-integrity.d.ts +0 -6
  237. package/dist/script-integrity.js +0 -8
  238. package/dist/script-voice.d.ts +0 -7
  239. package/dist/script-voice.js +0 -16
  240. package/dist/semantic-inserts.d.ts +0 -7
  241. package/dist/semantic-inserts.js +0 -10
  242. package/dist/skill-theme-explainer.js +0 -5
  243. package/dist/skill-theme.d.ts +0 -13
  244. package/dist/skill-theme.js +0 -25
  245. package/dist/skills.d.ts +22 -86
  246. package/dist/skills.js +21 -167
  247. package/dist/speech-rhythm-contract.js +0 -1
  248. package/dist/speech-rhythm.d.ts +0 -4
  249. package/dist/speech-rhythm.js +0 -2
  250. package/dist/templates/backdrop.d.ts +0 -3
  251. package/dist/templates/backdrop.js +0 -5
  252. package/dist/templates/callout.d.ts +0 -4
  253. package/dist/templates/callout.js +0 -6
  254. package/dist/templates/chart.d.ts +0 -4
  255. package/dist/templates/chart.js +0 -6
  256. package/dist/templates/chat-window.d.ts +0 -8
  257. package/dist/templates/chat-window.js +0 -10
  258. package/dist/templates/checklist.d.ts +0 -3
  259. package/dist/templates/checklist.js +0 -6
  260. package/dist/templates/comment-cta.d.ts +0 -14
  261. package/dist/templates/comment-cta.js +0 -19
  262. package/dist/templates/compare.d.ts +0 -6
  263. package/dist/templates/compare.js +0 -7
  264. package/dist/templates/cover-story.d.ts +0 -1
  265. package/dist/templates/cover-story.js +0 -3
  266. package/dist/templates/end-card.d.ts +0 -2
  267. package/dist/templates/end-card.js +0 -3
  268. package/dist/templates/hand-title.d.ts +0 -5
  269. package/dist/templates/hand-title.js +0 -9
  270. package/dist/templates/index.d.ts +0 -57
  271. package/dist/templates/index.js +0 -60
  272. package/dist/templates/lower-third.d.ts +0 -4
  273. package/dist/templates/lower-third.js +0 -5
  274. package/dist/templates/notification.d.ts +0 -6
  275. package/dist/templates/notification.js +0 -7
  276. package/dist/templates/phone-call.d.ts +0 -2
  277. package/dist/templates/phone-call.js +0 -6
  278. package/dist/templates/phone-screen.d.ts +0 -5
  279. package/dist/templates/phone-screen.js +0 -7
  280. package/dist/templates/pointer-chips.d.ts +0 -4
  281. package/dist/templates/pointer-chips.js +0 -6
  282. package/dist/templates/progress.d.ts +0 -3
  283. package/dist/templates/progress.js +0 -5
  284. package/dist/templates/quote.d.ts +0 -3
  285. package/dist/templates/quote.js +0 -4
  286. package/dist/templates/race.d.ts +0 -5
  287. package/dist/templates/race.js +0 -7
  288. package/dist/templates/rating.d.ts +0 -3
  289. package/dist/templates/rating.js +0 -5
  290. package/dist/templates/series-frame.d.ts +0 -16
  291. package/dist/templates/series-frame.js +0 -19
  292. package/dist/templates/size.d.ts +0 -7
  293. package/dist/templates/size.js +0 -8
  294. package/dist/templates/slot.d.ts +0 -2
  295. package/dist/templates/slot.js +0 -2
  296. package/dist/templates/sounds.d.ts +0 -12
  297. package/dist/templates/sounds.js +0 -16
  298. package/dist/templates/stat.d.ts +0 -3
  299. package/dist/templates/stat.js +0 -5
  300. package/dist/templates/tag.d.ts +0 -3
  301. package/dist/templates/tag.js +0 -5
  302. package/dist/templates/terminal.d.ts +0 -6
  303. package/dist/templates/terminal.js +0 -8
  304. package/dist/templates/theme.d.ts +0 -7
  305. package/dist/templates/theme.js +0 -9
  306. package/dist/templates/title-card.d.ts +0 -3
  307. package/dist/templates/title-card.js +0 -5
  308. package/dist/templates/video-grid.d.ts +0 -5
  309. package/dist/templates/video-grid.js +0 -8
  310. package/dist/templates/word-fill.d.ts +0 -3
  311. package/dist/templates/word-fill.js +0 -4
  312. package/dist/templates/word-title.d.ts +0 -2
  313. package/dist/templates/word-title.js +0 -4
  314. package/dist/trend-niches.d.ts +0 -11
  315. package/dist/trend-niches.js +0 -16
  316. package/dist/trend-search.d.ts +0 -66
  317. package/dist/trend-search.js +0 -70
  318. package/dist/tts-backend.d.ts +0 -19
  319. package/dist/tts-backend.js +0 -7
  320. package/dist/ugc-call.d.ts +0 -16
  321. package/dist/ugc-call.js +0 -21
  322. package/dist/ugc-delivery.d.ts +0 -2
  323. package/dist/ugc-delivery.js +0 -4
  324. package/dist/ugc-framing.d.ts +0 -4
  325. package/dist/ugc-framing.js +0 -6
  326. package/dist/ugc-interview.d.ts +0 -18
  327. package/dist/ugc-interview.js +0 -24
  328. package/dist/ugc-layers.d.ts +0 -39
  329. package/dist/ugc-layers.js +0 -39
  330. package/dist/ugc-scenes.d.ts +0 -2
  331. package/dist/ugc-scenes.js +0 -5
  332. package/dist/ugc-video-media.d.ts +0 -5
  333. package/dist/ugc-video-media.js +0 -7
  334. package/dist/uploads.d.ts +1 -15
  335. package/dist/uploads.js +3 -20
  336. package/dist/vendor-response.d.ts +0 -19
  337. package/dist/vendor-response.js +0 -22
  338. package/dist/video-size.d.ts +0 -4
  339. package/dist/video-size.js +0 -7
  340. package/dist/voice-admission.d.ts +2 -11
  341. package/dist/voice-admission.js +0 -13
  342. package/dist/voice-catalog-data.d.ts +0 -2
  343. package/dist/voice-catalog-data.js +0 -3
  344. package/dist/voice-catalog.d.ts +0 -6
  345. package/dist/voice-catalog.js +0 -8
  346. package/dist/voice-listing.d.ts +0 -6
  347. package/dist/voice-listing.js +0 -14
  348. package/dist/voice-pace.d.ts +0 -4
  349. package/dist/voice-pace.js +0 -7
  350. package/dist/voice-preview-approval.js +0 -1
  351. package/dist/voices.d.ts +4 -69
  352. package/dist/voices.js +3 -88
  353. package/dist/workflows/catalog.d.ts +0 -2
  354. package/dist/workflows/catalog.js +0 -4
  355. package/dist/workflows/film-directions.d.ts +0 -3
  356. package/dist/workflows/film-directions.js +0 -4
  357. package/dist/workflows/index.js +0 -1
  358. package/dist/workflows/methods/faceless-explainer.d.ts +33 -0
  359. package/dist/workflows/methods/faceless-explainer.js +0 -1
  360. package/dist/workflows/methods/kinetic-launch.d.ts +66 -1
  361. package/dist/workflows/methods/kinetic-launch.js +0 -2
  362. package/dist/workflows/methods/product-image-story.d.ts +33 -0
  363. package/dist/workflows/methods/product-image-story.js +0 -1
  364. package/dist/workflows/methods/reference-remake.d.ts +33 -0
  365. package/dist/workflows/methods/reference-remake.js +0 -1
  366. package/dist/workflows/methods/shared.d.ts +33 -1
  367. package/dist/workflows/methods/shared.js +0 -3
  368. package/dist/workflows/methods/ugc-faq-answer.d.ts +33 -0
  369. package/dist/workflows/methods/ugc-faq-answer.js +0 -1
  370. package/dist/workflows/methods/ugc-product-intro.d.ts +33 -0
  371. package/dist/workflows/methods/ugc-product-intro.js +0 -1
  372. package/dist/workflows/methods/website-proof-demo.d.ts +66 -1
  373. package/dist/workflows/methods/website-proof-demo.js +0 -2
  374. package/dist/workflows/motion-director.d.ts +0 -11
  375. package/dist/workflows/motion-director.js +0 -11
  376. package/dist/workflows/product-references.js +0 -1
  377. package/dist/workflows/reference-remake.d.ts +114 -17
  378. package/dist/workflows/reference-remake.js +0 -167
  379. package/dist/workflows/remake-chooser.d.ts +0 -6
  380. package/dist/workflows/remake-chooser.js +0 -4
  381. package/dist/workflows/remake-motion.d.ts +0 -16
  382. package/dist/workflows/remake-motion.js +0 -19
  383. package/dist/workflows/validate.d.ts +0 -1
  384. package/dist/workflows/validate.js +0 -5
  385. package/dist/workflows.js +0 -1
  386. package/package.json +1 -1
  387. package/dist/account-actors.js.map +0 -1
  388. package/dist/account.js.map +0 -1
  389. package/dist/actor-bounds.js.map +0 -1
  390. package/dist/actor-qualities.js.map +0 -1
  391. package/dist/actors.js.map +0 -1
  392. package/dist/ad-guide.js.map +0 -1
  393. package/dist/ad-pause-trim.js.map +0 -1
  394. package/dist/api-failure.js.map +0 -1
  395. package/dist/aspect.js.map +0 -1
  396. package/dist/asset-identity.js.map +0 -1
  397. package/dist/assets.js.map +0 -1
  398. package/dist/billing-terms.js.map +0 -1
  399. package/dist/brand-styles.js.map +0 -1
  400. package/dist/broll-policy.js.map +0 -1
  401. package/dist/canvas-fit.js.map +0 -1
  402. package/dist/caption-funnel.js.map +0 -1
  403. package/dist/caption-geometry.js.map +0 -1
  404. package/dist/caption-language.js.map +0 -1
  405. package/dist/contract-dispositions.js.map +0 -1
  406. package/dist/contracts/v1/workflow-brief.js.map +0 -1
  407. package/dist/contracts/v1/workflow-catalog.js.map +0 -1
  408. package/dist/contracts/v1/workflow-client.js.map +0 -1
  409. package/dist/contracts/v1/workflow-dto.js.map +0 -1
  410. package/dist/contracts/v1/workflow-evidence.js.map +0 -1
  411. package/dist/contracts/v1/workflow-execution.js.map +0 -1
  412. package/dist/contracts/v1/workflow-next.js.map +0 -1
  413. package/dist/contracts/v1/workflow-plan.js.map +0 -1
  414. package/dist/contracts/v1/workflow-primitives.js.map +0 -1
  415. package/dist/contracts/v1/workflow-run-read.js.map +0 -1
  416. package/dist/creator-profile.js.map +0 -1
  417. package/dist/default-actor.js.map +0 -1
  418. package/dist/design.js.map +0 -1
  419. package/dist/edit-billing.js.map +0 -1
  420. package/dist/edit-candidate.js.map +0 -1
  421. package/dist/edit-document.js.map +0 -1
  422. package/dist/edit-faceless.js.map +0 -1
  423. package/dist/edit-long-form.js.map +0 -1
  424. package/dist/edit-operations.js.map +0 -1
  425. package/dist/edit-primitives.js.map +0 -1
  426. package/dist/edit-revision.js.map +0 -1
  427. package/dist/edit-rules.js.map +0 -1
  428. package/dist/edit-shots.js.map +0 -1
  429. package/dist/edit-validate.js.map +0 -1
  430. package/dist/edit.js.map +0 -1
  431. package/dist/endpoint-notes.js.map +0 -1
  432. package/dist/endpoints.js.map +0 -1
  433. package/dist/errors.js.map +0 -1
  434. package/dist/explainer-fit.js.map +0 -1
  435. package/dist/face-billing.js.map +0 -1
  436. package/dist/face-delivery.js.map +0 -1
  437. package/dist/faceless-action-shots.js.map +0 -1
  438. package/dist/faceless-customer-anchors.js.map +0 -1
  439. package/dist/faceless-cut-style.js.map +0 -1
  440. package/dist/faceless-image-placement.js.map +0 -1
  441. package/dist/faceless-image-qualification.js.map +0 -1
  442. package/dist/faceless-media-record.js.map +0 -1
  443. package/dist/faceless-price.js.map +0 -1
  444. package/dist/faceless-public-plan.js.map +0 -1
  445. package/dist/faceless-public.js.map +0 -1
  446. package/dist/faceless-short-61.js.map +0 -1
  447. package/dist/faceless-storyboard-timing.js.map +0 -1
  448. package/dist/faceless-storyboard-v2-plan.js.map +0 -1
  449. package/dist/faceless-storyboard-v2-timing.js.map +0 -1
  450. package/dist/faceless-storyboard-v2.js.map +0 -1
  451. package/dist/faceless-storyboard.js.map +0 -1
  452. package/dist/faceless-voices.js.map +0 -1
  453. package/dist/feedback.js.map +0 -1
  454. package/dist/film-directions.js.map +0 -1
  455. package/dist/film-drafts.js.map +0 -1
  456. package/dist/film-guide.js.map +0 -1
  457. package/dist/film-styles.js.map +0 -1
  458. package/dist/generation-shot.js.map +0 -1
  459. package/dist/generations-output.js.map +0 -1
  460. package/dist/generations.js.map +0 -1
  461. package/dist/idempotency.js.map +0 -1
  462. package/dist/index.js.map +0 -1
  463. package/dist/live-shot-kinds.js.map +0 -1
  464. package/dist/long-form-pricing.js.map +0 -1
  465. package/dist/long-form-profile.js.map +0 -1
  466. package/dist/long-form-revision.js.map +0 -1
  467. package/dist/markdown-quote.js.map +0 -1
  468. package/dist/mascots.js.map +0 -1
  469. package/dist/max-credits.js.map +0 -1
  470. package/dist/mcp-ugc-descriptions.js.map +0 -1
  471. package/dist/media-timebase.js.map +0 -1
  472. package/dist/motion-styles.js.map +0 -1
  473. package/dist/moves.js.map +0 -1
  474. package/dist/music.js.map +0 -1
  475. package/dist/naming.js.map +0 -1
  476. package/dist/openapi.js.map +0 -1
  477. package/dist/output-provenance.js.map +0 -1
  478. package/dist/own-agent-price.js.map +0 -1
  479. package/dist/own-agent-runs.js.map +0 -1
  480. package/dist/pacing.js.map +0 -1
  481. package/dist/parts-pricing.js.map +0 -1
  482. package/dist/post-text.js.map +0 -1
  483. package/dist/presenter-beats.js.map +0 -1
  484. package/dist/presenter-matte.js.map +0 -1
  485. package/dist/presenter-takes.js.map +0 -1
  486. package/dist/prices.js.map +0 -1
  487. package/dist/public-endpoints.js.map +0 -1
  488. package/dist/public-responses.js.map +0 -1
  489. package/dist/rate-limit.js.map +0 -1
  490. package/dist/reference-analysis.js.map +0 -1
  491. package/dist/reference-display.js.map +0 -1
  492. package/dist/reference-kinds.js.map +0 -1
  493. package/dist/reference-lyrics.js.map +0 -1
  494. package/dist/reference-profile.js.map +0 -1
  495. package/dist/reference-staging.js.map +0 -1
  496. package/dist/reference-text-spans.js.map +0 -1
  497. package/dist/reference-voice-over.js.map +0 -1
  498. package/dist/reference-voice.js.map +0 -1
  499. package/dist/render-backend.js.map +0 -1
  500. package/dist/resolved-timeline.js.map +0 -1
  501. package/dist/run-media.js.map +0 -1
  502. package/dist/run-preflight.js.map +0 -1
  503. package/dist/run-static-warnings.js.map +0 -1
  504. package/dist/runs.js.map +0 -1
  505. package/dist/scene-bible.js.map +0 -1
  506. package/dist/scene-graph.js.map +0 -1
  507. package/dist/scene-place.js.map +0 -1
  508. package/dist/scene-proposal.js.map +0 -1
  509. package/dist/script-integrity.js.map +0 -1
  510. package/dist/script-voice.js.map +0 -1
  511. package/dist/semantic-inserts.js.map +0 -1
  512. package/dist/skill-theme-explainer.js.map +0 -1
  513. package/dist/skill-theme.js.map +0 -1
  514. package/dist/skills.js.map +0 -1
  515. package/dist/speech-rhythm-contract.js.map +0 -1
  516. package/dist/speech-rhythm.js.map +0 -1
  517. package/dist/templates/backdrop.js.map +0 -1
  518. package/dist/templates/callout.js.map +0 -1
  519. package/dist/templates/chart.js.map +0 -1
  520. package/dist/templates/chat-window.js.map +0 -1
  521. package/dist/templates/checklist.js.map +0 -1
  522. package/dist/templates/comment-cta.js.map +0 -1
  523. package/dist/templates/compare.js.map +0 -1
  524. package/dist/templates/cover-story.js.map +0 -1
  525. package/dist/templates/end-card.js.map +0 -1
  526. package/dist/templates/hand-title.js.map +0 -1
  527. package/dist/templates/index.js.map +0 -1
  528. package/dist/templates/lower-third.js.map +0 -1
  529. package/dist/templates/notification.js.map +0 -1
  530. package/dist/templates/phone-call.js.map +0 -1
  531. package/dist/templates/phone-screen.js.map +0 -1
  532. package/dist/templates/pointer-chips.js.map +0 -1
  533. package/dist/templates/progress.js.map +0 -1
  534. package/dist/templates/quote.js.map +0 -1
  535. package/dist/templates/race.js.map +0 -1
  536. package/dist/templates/rating.js.map +0 -1
  537. package/dist/templates/series-frame.js.map +0 -1
  538. package/dist/templates/size.js.map +0 -1
  539. package/dist/templates/slot.js.map +0 -1
  540. package/dist/templates/sounds.js.map +0 -1
  541. package/dist/templates/stat.js.map +0 -1
  542. package/dist/templates/tag.js.map +0 -1
  543. package/dist/templates/terminal.js.map +0 -1
  544. package/dist/templates/theme.js.map +0 -1
  545. package/dist/templates/title-card.js.map +0 -1
  546. package/dist/templates/video-grid.js.map +0 -1
  547. package/dist/templates/word-fill.js.map +0 -1
  548. package/dist/templates/word-title.js.map +0 -1
  549. package/dist/trend-niches.js.map +0 -1
  550. package/dist/trend-search.js.map +0 -1
  551. package/dist/tts-backend.js.map +0 -1
  552. package/dist/ugc-call.js.map +0 -1
  553. package/dist/ugc-delivery.js.map +0 -1
  554. package/dist/ugc-framing.js.map +0 -1
  555. package/dist/ugc-interview.js.map +0 -1
  556. package/dist/ugc-layers.js.map +0 -1
  557. package/dist/ugc-scenes.js.map +0 -1
  558. package/dist/ugc-video-media.js.map +0 -1
  559. package/dist/uploads.js.map +0 -1
  560. package/dist/vendor-response.js.map +0 -1
  561. package/dist/video-size.js.map +0 -1
  562. package/dist/voice-admission.js.map +0 -1
  563. package/dist/voice-catalog-data.js.map +0 -1
  564. package/dist/voice-catalog.js.map +0 -1
  565. package/dist/voice-listing.js.map +0 -1
  566. package/dist/voice-pace.js.map +0 -1
  567. package/dist/voice-preview-approval.js.map +0 -1
  568. package/dist/voices.js.map +0 -1
  569. package/dist/workflows/catalog.js.map +0 -1
  570. package/dist/workflows/film-directions.js.map +0 -1
  571. package/dist/workflows/index.js.map +0 -1
  572. package/dist/workflows/methods/faceless-explainer.js.map +0 -1
  573. package/dist/workflows/methods/kinetic-launch.js.map +0 -1
  574. package/dist/workflows/methods/product-image-story.js.map +0 -1
  575. package/dist/workflows/methods/reference-remake.js.map +0 -1
  576. package/dist/workflows/methods/shared.js.map +0 -1
  577. package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
  578. package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
  579. package/dist/workflows/methods/website-proof-demo.js.map +0 -1
  580. package/dist/workflows/motion-director.js.map +0 -1
  581. package/dist/workflows/product-references.js.map +0 -1
  582. package/dist/workflows/reference-remake.js.map +0 -1
  583. package/dist/workflows/remake-chooser.js.map +0 -1
  584. package/dist/workflows/remake-motion.js.map +0 -1
  585. package/dist/workflows/validate.js.map +0 -1
  586. package/dist/workflows.js.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { REFERENCE_BRING_KINDS, referenceBringItem } from "./reference-bring.js";
2
3
  import { REFERENCE_GRAPHIC_KINDS, REFERENCE_SOURCE_KINDS } from "./reference-kinds.js";
3
4
  import { referenceStaging, stagingIssues, stagingRect } from "./reference-staging.js";
4
5
  import { referenceVoice } from "./reference-voice.js";
@@ -6,7 +7,6 @@ import { CAPTION_EMPHASIS_LOOKS } from "./skills.js";
6
7
  import { TEMPLATE_KIND_IDS, TEMPLATE_SOUND_BEATS } from "./templates/index.js";
7
8
  import { PRESENTER_FRAMINGS } from "./ugc-layers.js";
8
9
  export { REFERENCE_DESCRIBED_KINDS, REFERENCE_GRAPHIC_KINDS, REFERENCE_SOURCE_KINDS } from "./reference-kinds.js";
9
- // Reference profile (reference-to-video S1): a reference ad's style in our vocabulary, beats in shares of its length, never its media.
10
10
  export const REFERENCE_PROFILE_VERSION = "reference-profile-v1";
11
11
  export const REFERENCE_FORMATS = ["talking_head_graphics", "faceless", "broll", "other"];
12
12
  export const REFERENCE_BEAT_ROLES = ["hook", "problem", "agitation", "solution", "demo", "proof", "before_after", "social_proof", "offer", "cta",
@@ -17,21 +17,15 @@ export const REFERENCE_CAMERAS = ["static", "punch_in", "zoom_out", "shake", "ot
17
17
  export const REFERENCE_TRANSITIONS = ["none", "cut", "wipe", "flash", "zoom", "other"];
18
18
  export const REFERENCE_SOUND_KINDS = [...TEMPLATE_SOUND_BEATS, "music", "recorded_audio", "other"];
19
19
  export const REFERENCE_PRESENTER_BEHAVIOURS = ["speaking", "listening", "reacting", "absent"];
20
- /** The presenter's shot size on a beat (#1175 S7): close (head and shoulders), medium (waist-up), wide (knees up or the room), full (head to feet). */
21
20
  export const REFERENCE_SHOT_SIZES = ["close", "medium", "wide", "full"];
22
21
  export const REFERENCE_CAPTION_POSITIONS = ["top", "middle", "lower", "bottom"];
23
22
  export const MAX_REFERENCE_SUMMARY_CHARS = 200;
24
- /** What a profile may hold in those fields: an analysis writes at most the cut above, a profile written to this schema up to this. */
25
23
  export const REFERENCE_PROFILE_SUMMARY_MAX_CHARS = 1000;
26
24
  export const MAX_REFERENCE_LABEL_CHARS = 120;
27
- /** The transcribed words of a 120 s reference stay well under this (Ana, 69 s: 147 words). */
28
25
  export const MAX_REFERENCE_TRANSCRIPT_WORDS = 1000;
29
- /** The hook is the reference's first 3 s, carried to the end of its sentence but never past 6 s. */
30
26
  export const REFERENCE_HOOK_SECONDS = 3;
31
27
  export const REFERENCE_HOOK_MAX_SECONDS = 6;
32
- /** What a graphic does at a state change, in a closed set. The reference's words live in transcript, hook, spoken_summary and label_hint. */
33
28
  export const REFERENCE_STATE_CHANGES = ["appears", "disappears", "toggles_on", "toggles_off", "checked", "value_changes", "highlighted", "other"];
34
- /** What a graphic we cannot draw shows, a camera move outside REFERENCE_CAMERAS and a transition outside REFERENCE_TRANSITIONS, by name (#1064). */
35
29
  export const REFERENCE_GRAPHIC_DEVICES = ["footage", "photo", "collage", "3d_object", "map", "chart", "icon", "emoji", "sticker", "arrow", "meme", "highlight",
36
30
  "text_effect", "particles", "confetti", "sparkles", "light_leak", "glitch", "flash", "other"];
37
31
  export const REFERENCE_CAMERA_DEVICES = ["shake", "whip_pan", "pan", "tilt", "zoom_in", "zoom_out", "rotate", "handheld", "dolly", "speed_ramp", "other"];
@@ -49,10 +43,8 @@ const referenceGraphic = z.strictObject({
49
43
  position: z.enum(REFERENCE_POSITIONS),
50
44
  state_changes: z.array(z.strictObject({ at_frac: frac.describe("Share of the beat."), change: z.enum(REFERENCE_STATE_CHANGES) })).max(12),
51
45
  label_hint: text(MAX_REFERENCE_LABEL_CHARS).describe("What it shows, read off the screen, such as \"Blue banner 'DEVELOP THE STORY'\"; empty when it gave none."),
52
- /** Optional since #1064. */
53
46
  device: z.enum(REFERENCE_GRAPHIC_DEVICES).optional().describe("What a particles or unmapped graphic shows, such as a 3D object, a sticker or sparkles."),
54
47
  });
55
- /** Who speaks, where they look and what their hands do (#978): closed lists, each claim with the seconds of the frames that show it. */
56
48
  export const REFERENCE_SPEAKER_ROLES = ["presenter", "interviewer", "guest", "narrator", "other"];
57
49
  export const REFERENCE_MOUTHS = ["moving", "closed", "not_visible"];
58
50
  export const REFERENCE_MOUTH_MEASURES = ["moving", "still", "not_measured"];
@@ -64,7 +56,6 @@ export const MAX_REFERENCE_SEGMENTS = 200;
64
56
  export const MAX_CLAIM_FRAMES = 6;
65
57
  export const MAX_REFERENCE_SPELLINGS = 40;
66
58
  export const speakerId = z.string().regex(/^[a-z0-9_]{1,24}$/);
67
- /** A frame's time: a whole second, or the end frame's (#989), which lies between the last second and the reel's end. */
68
59
  const claimSecond = z.number().min(0);
69
60
  const claimFrames = z.array(claimSecond).max(MAX_CLAIM_FRAMES);
70
61
  const unitRect = z.strictObject({ left: frac, top: frac, width: frac, height: frac });
@@ -97,22 +88,17 @@ const referenceBeat = z.strictObject({
97
88
  graphics: z.array(referenceGraphic).max(8),
98
89
  camera: z.enum(REFERENCE_CAMERAS),
99
90
  transition_in: z.enum(REFERENCE_TRANSITIONS),
100
- /** Optional since #1064, as is transition_device. */
101
91
  camera_device: z.enum(REFERENCE_CAMERA_DEVICES).optional().describe("The camera move by name when camera is other, such as a whip pan or a slow zoom in."),
102
92
  transition_device: z.enum(REFERENCE_TRANSITION_DEVICES).optional()
103
93
  .describe("The transition by name when transition_in is other, such as a whip, a glitch or a light leak."),
104
94
  sounds: z.array(z.strictObject({ at_frac: frac, kind: z.enum(REFERENCE_SOUND_KINDS) })).max(12),
105
95
  presenter_behaviour: z.enum(REFERENCE_PRESENTER_BEHAVIOURS),
106
- /** Optional since #1175 S7: a beat read before it, or one the model gave no size from the list, has none, and the remake keeps the profile's framing. */
107
96
  shot_size: z.enum(REFERENCE_SHOT_SIZES).optional()
108
97
  .describe("The presenter's shot size for most of the beat: close (head and shoulders), medium (waist-up), wide (knees up), full (head to feet)."),
109
- /** Optional since #979: the frames that show the beat, as seconds of the analysis's one-a-second frames. */
110
98
  key_frame_s: frameSecond.optional().describe("The second whose frame shows the beat, nearest its middle."),
111
99
  frames_s: z.array(claimSecond).max(MAX_BEAT_FRAMES).optional().describe("The seconds of the frames inside the beat, at most 12, evenly spread."),
112
- /** Optional since #978; since #989 the beat's last words, not its longest speaker. */
113
100
  speaker: speakerId.nullable().optional()
114
101
  .describe("The speakers[].id of the beat's last words: the answer in a question-and-answer beat; null when nobody speaks."),
115
- /** Optional since #989. */
116
102
  speakers: z.array(z.strictObject({ id: speakerId, seconds })).max(MAX_REFERENCE_SPEAKERS).optional()
117
103
  .describe("Everyone heard in the beat, in the order they first speak, with their seconds of speech."),
118
104
  gaze: z.strictObject({ direction: z.enum(REFERENCE_GAZES), frames_s: claimFrames }).optional()
@@ -120,6 +106,31 @@ const referenceBeat = z.strictObject({
120
106
  gestures: z.array(z.strictObject({ kind: z.enum(REFERENCE_GESTURES), at_s: seconds, label: text(80), frames_s: claimFrames })).max(4).optional()
121
107
  .describe("Notable gestures in the beat, such as both hands toward the viewer at the call to action."),
122
108
  });
109
+ export const REFERENCE_CUT_KINDS = ["start", "jump_cut", "size_change", "to_insert", "from_insert", "other"];
110
+ export const MAX_REFERENCE_SHOTS = 120;
111
+ export const REFERENCE_SHOT_SOURCES = ["live", "real_footage", "ai_video", "code_render", "screen_capture"];
112
+ export const referenceShot = z.strictObject({
113
+ start_s: seconds, end_s: seconds,
114
+ beat_index: z.number().int().min(0).describe("The beat this shot overlaps most."),
115
+ words: z.number().int().min(0).describe("Spoken words that start inside the shot."),
116
+ silent: z.boolean().describe("true when no word is spoken in the shot: a visual beat with no words."),
117
+ cut_in: z.enum(REFERENCE_CUT_KINDS),
118
+ source: z.strictObject({
119
+ kind: z.enum(REFERENCE_SHOT_SOURCES),
120
+ confidence: frac.describe("How sure the reading is, from 0 to 1."),
121
+ measured: z.boolean().describe("true when the picture's measured motion set the kind against what the picture looked like."),
122
+ }).optional().describe("How the shot's picture was made: live, real_footage, ai_video, code_render or screen_capture."),
123
+ same_clip_as: z.number().int().min(0).nullable().optional().describe("The index of an earlier shot that shows the same clip, such as a cold open repeated at the end."),
124
+ });
125
+ export const referenceTempo = z.strictObject({
126
+ music_bed: z.boolean().describe("true when music plays under most of the reel."),
127
+ bpm: z.number().positive().nullable().describe("The beat's tempo; null when there is no music bed or no clear beat, as under a drone or soft pads."),
128
+ cuts_on_beat: frac.nullable().describe("The share of cuts that land on a beat; null without a beat or a measured cut."),
129
+ cuts_on_beat_by_chance: frac.nullable().describe("The share of cuts a random edit would land on a beat at this tempo."),
130
+ edit_on_beat: z.boolean().describe("true when the edit follows the beat: at least 4 cuts, well above chance."),
131
+ });
132
+ export const REFERENCE_SOUND_EVENT_KINDS = ["whoosh", "ding", "impact", "click", "pop", "hit", "typing"];
133
+ export const MAX_REFERENCE_SOUND_EVENTS = 120;
123
134
  export const referenceWord = z.strictObject({ text: z.string().min(1).max(64), start_s: seconds, end_s: seconds,
124
135
  speaker: z.string().min(1).max(40).optional().describe("The transcription's speaker label, such as speaker_0; absent when it gave none.") });
125
136
  export const referenceLanguage = z.string().regex(/^[a-z]{2,3}$/).nullable()
@@ -138,39 +149,40 @@ const profileHead = {
138
149
  beats: z.array(referenceBeat).min(1).max(120),
139
150
  captions: z.strictObject({ present: z.boolean(), words_per_caption_max: z.number().int().min(1).max(12), position: z.enum(REFERENCE_CAPTION_POSITIONS),
140
151
  emphasis_style: z.enum([...CAPTION_EMPHASIS_LOOKS, "none"]), hidden_under_graphics: z.boolean(),
141
- /** Optional since #973 S5: a profile without it parses, and the remake infers a layer under the captions from position. */
142
152
  box: stagingRect.optional().describe("The caption block's box, in shares of the frame.") }),
143
- pacing: z.strictObject({ layer_change_every_s: z.number().positive(), face_share: frac }),
153
+ pacing: z.strictObject({ layer_change_every_s: z.number().positive(), face_share: frac,
154
+ effective_words_per_s: z.number().min(0).optional()
155
+ .describe("Spoken words over the whole reel's length, pauses and silent shots included: the pace a word budget for this length needs.") }),
144
156
  palette: z.array(z.string().regex(/^#[0-9A-F]{6}$/)).max(8),
145
157
  music: text(200),
146
158
  unmapped: z.array(z.strictObject({ what: text(200), beat_index: z.number().int().min(0), suggested_substitute: text(200) })).max(40),
147
159
  };
148
160
  const analysisWarnings = { warnings: z.array(text(200)).max(8).optional().describe("What the analysis could not measure, such as the voice; also in warnings[].") };
149
161
  const profileTail = {
150
- /** Optional since S7: a profile written before it has none and still parses. */
151
162
  voice: referenceVoice.optional(),
152
- /** Optional since #884 S5d; absent reads as close. */
153
163
  presenter_framing: z.enum(PRESENTER_FRAMINGS).optional()
154
164
  .describe("full: the presenter from head to feet; wide: the top of the presenter's head is below ~35% of the frame height, with visible " +
155
165
  "room above; close otherwise."),
156
- /** Optional since #884 S5d; absent reads as false. */
157
166
  presenter_mic: z.boolean().optional()
158
167
  .describe("true when the presenter holds a small handheld or clip-on microphone in their hand while speaking (not clipped to clothing)."),
159
- /** Optional since #914 D1: a profile without it parses, and every field inside it is absent when not measured. */
160
168
  staging: referenceStaging.optional(),
161
- /** Optional since #930 S1, as is hook: a profile written before them parses. */
162
169
  transcript: z.array(referenceWord).max(MAX_REFERENCE_TRANSCRIPT_WORDS).optional().describe("The reference's speech as timed words, in order."),
163
- /** Optional since #990. */
164
170
  transcript_language: referenceLanguage.optional(),
165
171
  hook: referenceHook.optional(),
166
- /** Optional since #978: who speaks, on or off screen, with each one's caption look; segments are the transcript as turns. */
167
172
  speakers: z.array(referenceSpeaker).max(MAX_REFERENCE_SPEAKERS).optional(),
168
173
  segments: z.array(referenceSegment).max(MAX_REFERENCE_SEGMENTS).optional().describe("The transcript as timed segments, each with its speaker."),
169
- /** Optional since #989. */
170
174
  spellings: z.array(z.strictObject({ heard: text(MAX_REFERENCE_LABEL_CHARS), shown: text(MAX_REFERENCE_LABEL_CHARS), start_s: seconds, end_s: seconds }))
171
175
  .max(MAX_REFERENCE_SPELLINGS).optional()
172
176
  .describe("Names heard one way while the screen spells them another at the same time, such as heard Piggs Field, shown Higgsfield; " +
173
177
  "transcript and segments keep the heard words."),
178
+ shots: z.array(referenceShot).max(MAX_REFERENCE_SHOTS).optional()
179
+ .describe("The reel cut by cut, measured on its frames: each shot's times, its words, whether it is silent and how it is cut into."),
180
+ tempo: referenceTempo.optional(),
181
+ bring: z.array(referenceBringItem).max(REFERENCE_BRING_KINDS.length).optional()
182
+ .describe("What a remake needs the user to bring, because the reel shows it and it is not generated: screen recordings, screenshots, product " +
183
+ "photos and live clips, each with its seconds and where it starts."),
184
+ sound_events: z.array(z.strictObject({ t_s: seconds, kind: z.enum(REFERENCE_SOUND_EVENT_KINDS) })).max(MAX_REFERENCE_SOUND_EVENTS).optional()
185
+ .describe("Sharp sounds measured on the mix while nobody speaks, such as a whoosh on a cut, in time order; sounds under speech are not listed."),
174
186
  };
175
187
  function checkProfile(profile, ctx) {
176
188
  const issue = (path, message) => ctx.addIssue({ code: customIssue, path, message });
@@ -233,38 +245,56 @@ function checkProfile(profile, ctx) {
233
245
  if (entry.beat_index >= profile.beats.length)
234
246
  issue(["unmapped", index, "beat_index"], `there are ${profile.beats.length} beats`);
235
247
  });
248
+ profile.shots?.forEach((shot, index) => {
249
+ const before = profile.shots[index - 1];
250
+ if (shot.end_s <= shot.start_s)
251
+ issue(["shots", index, "end_s"], "ends where or before the shot starts");
252
+ if (shot.end_s > duration)
253
+ issue(["shots", index, "end_s"], `lies past the source's ${duration} s`);
254
+ else if (index === profile.shots.length - 1 && shot.end_s < duration - 1e-6)
255
+ issue(["shots", index, "end_s"], "the last shot ends with the reel");
256
+ if (before ? Math.abs(shot.start_s - before.end_s) > 1e-6 : shot.start_s !== 0)
257
+ issue(["shots", index, "start_s"], before ? "does not start where the shot before ends" : "the first shot starts at 0");
258
+ if ((shot.cut_in === "start") !== (index === 0))
259
+ issue(["shots", index, "cut_in"], index ? "only the first shot is the start" : "the first shot is the start");
260
+ if (shot.beat_index >= profile.beats.length)
261
+ issue(["shots", index, "beat_index"], `there are ${profile.beats.length} beats`);
262
+ if (shot.silent !== (shot.words === 0))
263
+ issue(["shots", index, "silent"], "a shot is silent exactly when it has no words");
264
+ if (shot.same_clip_as != null && shot.same_clip_as >= index)
265
+ issue(["shots", index, "same_clip_as"], "names a shot that does not come before it");
266
+ });
267
+ profile.sound_events?.forEach((event, index) => {
268
+ if (event.t_s > duration)
269
+ issue(["sound_events", index, "t_s"], `lies past the source's ${duration} s`);
270
+ if (index && event.t_s < profile.sound_events[index - 1].t_s)
271
+ issue(["sound_events", index, "t_s"], "comes before the event before it: events are in order");
272
+ });
273
+ if (profile.tempo && profile.tempo.bpm !== null && !profile.tempo.music_bed)
274
+ issue(["tempo", "bpm"], "a tempo is measured only over a music bed");
236
275
  }
237
- /** The profile's fields but `analysis`, and its checks: the profile as kept with an analysis is built from them where it is written. */
238
276
  export const referenceProfileShape = { ...profileHead, ...profileTail };
239
277
  export const checkReferenceProfile = checkProfile;
240
278
  export const referenceAnalysisWarningsField = analysisWarnings;
241
- /** The profile an answer carries: `analysis` holds only its warnings. */
242
279
  export const referenceProfileAnswer = z.strictObject({ ...profileHead, analysis: z.strictObject(analysisWarnings), ...profileTail }).superRefine(checkProfile);
243
- /** The profile a client passes back: any other `analysis` field is dropped, so one read before the answer shed them still compiles. */
244
280
  export const referenceProfileInput = z.strictObject({ ...profileHead, analysis: z.object(analysisWarnings), ...profileTail }).superRefine(checkProfile);
245
- /** Readers keep a newer profile whole and need only the gaps it names. */
246
281
  export const referenceProfileRead = z.looseObject({ version: z.string(), beats: z.array(z.looseObject({ role: z.string() })).default([]),
247
282
  unmapped: z.array(z.looseObject({ what: z.string(), beat_index: z.number(), suggested_substitute: z.string() })).default([]) });
248
- /** The second of the one-a-second frames that shows a span: the one nearest its middle inside it, else the nearest, within the reel. */
249
283
  export function keyFrameSecond(start, end, duration) {
250
284
  const lo = Math.ceil(start), hi = Math.floor(end - 1e-6), middle = Math.round((start + end) / 2);
251
285
  const t = lo <= hi ? Math.min(hi, Math.max(lo, middle)) : middle;
252
286
  return Math.max(0, Math.min(Math.ceil(duration - 1e-6) - 1, t));
253
287
  }
254
- /** The end frame (#989): one frame just before the reel's end, when the last second's frame leaves at least this long unseen after it. */
255
288
  export const END_FRAME_GAP_S = 0.3;
256
289
  const END_FRAME_BEFORE_S = 0.1;
257
- /** The end frame's time, a tenth of a second, or null when the last second's frame is close enough to the end. */
258
290
  export function endFrameSecond(duration) {
259
291
  const last = Math.max(0, Math.ceil(duration - 1e-6) - 1), end = Math.floor((duration - END_FRAME_BEFORE_S) * 10 + 1e-6) / 10;
260
292
  return end - last >= END_FRAME_GAP_S - 1e-6 ? end : null;
261
293
  }
262
- /** The first frame at or after `t`: a moment's proof shows it happening, not the second before it; past the last frame, the last. */
263
294
  export function frameAtOrAfter(t, duration) {
264
295
  const last = Math.max(0, Math.ceil(duration - 1e-6) - 1), next = Math.max(0, Math.ceil(t - 1e-6));
265
296
  return next <= last ? next : endFrameSecond(duration) ?? last;
266
297
  }
267
- /** The seconds whose frames lie inside a span, the end frame among them, at most `max`, evenly spread with both ends kept. */
268
298
  export function spanFrameSeconds(start, end, duration, max = MAX_BEAT_FRAMES) {
269
299
  const lo = Math.max(0, Math.ceil(start)), hi = Math.min(Math.floor(end - 1e-6), Math.ceil(duration - 1e-6) - 1), last = endFrameSecond(duration);
270
300
  const all = [...Array.from({ length: Math.max(0, hi - lo + 1) }, (_, i) => lo + i), ...last !== null && last >= start && last < end ? [last] : []];
@@ -275,8 +305,6 @@ export function spanFrameSeconds(start, end, duration, max = MAX_BEAT_FRAMES) {
275
305
  return [...new Set(Array.from({ length: max }, (_, i) => all[Math.round((i * (all.length - 1)) / (max - 1))]))];
276
306
  }
277
307
  const LINE_EDIT_SUBSTITUTE = "your line edit on ";
278
- /** What the plan does not reproduce from its reference, one warning per unmapped entry, each said once (rule 3, C5). What the user's own */
279
- /** line edits replace is one line for all of them (#1198): the user asked for it, so a line per graphic only repeats the request. */
280
308
  export function referenceProfileWarnings(profile) {
281
309
  if (!profile)
282
310
  return [];
@@ -294,7 +322,6 @@ export function referenceProfileWarnings(profile) {
294
322
  lines.push(LINE_EDIT_SUBSTITUTE);
295
323
  continue;
296
324
  }
297
- // The analysis's own advice on a graphic a line edit replaced no longer applies.
298
325
  if (edited.get(entry.beat_index)?.includes(entry.what))
299
326
  continue;
300
327
  const line = `Reference beat ${beatOf(entry.beat_index)}: ${entry.what} is not reproduced; instead: ${entry.suggested_substitute}.`;
@@ -308,15 +335,11 @@ export function referenceProfileWarnings(profile) {
308
335
  const DIRECT = {
309
336
  ...Object.fromEntries(TEMPLATE_KIND_IDS.map(kind => [kind, kind])),
310
337
  toggle_checklist: "checklist", before_after_split: "compare", split_screen: "layout_split", particles: "particles",
311
- // A banner or a comment box (its word to comment) is a short line on a strip, as our tag; a logo card is a brand on a card, as
312
- // title_card; a price card is a number, as stat. A concept card is a picture with a label, so it maps as product_ui does.
313
338
  banner: "tag", comment_box: "tag", logo_card: "title_card", price_card: "stat",
314
339
  };
315
340
  const SUBSTITUTES = {
316
341
  particles: "a stat or title_card on the same words; particles are not drawn",
317
342
  };
318
- /** The analyser's description of an element it called other, read for a kind; quoted on-screen text is left out, so a banner reading
319
- * 'NEW LOGO' stays a banner. */
320
343
  const DESCRIBED = [
321
344
  ["comment_box", /\bcomments?\b|\b(input|reply|text|message) (box|field|bar)\b/],
322
345
  ["logo_card", /\blogo\b/],
@@ -324,9 +347,7 @@ const DESCRIBED = [
324
347
  ["concept_card", /\bconcept\b|\bidea card\b|\bmood ?board\b/],
325
348
  ["banner", /\bbanner\b|\bplate\b|\bribbon\b|\bstrip\b/],
326
349
  ];
327
- // A single quote closes only before a non-letter, so an apostrophe inside the quote ('DON'T COMMENT') does not end it.
328
350
  const QUOTED = /"[^"]*"|“[^”]*”|(?<![\p{L}\p{N}])['‘].*?['’](?![\p{L}\p{N}])/gu;
329
- /** An analyser's free-text state change as one of our categories; an unrecognised one is other, never kept as text. */
330
351
  export function mapAnalyserStateChange(text) {
331
352
  const s = text.trim().toLowerCase();
332
353
  if (REFERENCE_STATE_CHANGES.includes(s))
@@ -347,7 +368,6 @@ export function mapAnalyserStateChange(text) {
347
368
  return "value_changes";
348
369
  return "other";
349
370
  }
350
- /** The analyser's name for a graphic when it is one we know, else the kind its description names, else other. */
351
371
  export function mapAnalyserSourceKind(text, description = "") {
352
372
  const s = text.trim();
353
373
  if (s !== "other" && REFERENCE_SOURCE_KINDS.includes(s))
@@ -355,8 +375,6 @@ export function mapAnalyserSourceKind(text, description = "") {
355
375
  const plain = description.replace(QUOTED, " ").toLowerCase();
356
376
  return DESCRIBED.find(([, pattern]) => pattern.test(plain))?.[0] ?? "other";
357
377
  }
358
- /** A graphic device read from the analyser's description when it gave no name: the first pattern that fits, the specific before the general
359
- * (DfFtkhuiPAd: 'Three stacked horizontal clips' is a collage, '3D rotating Earth globe' a 3D object). */
360
378
  const DEVICE_DESCRIBED = [
361
379
  ["glitch", /\bglitch/], ["light_leak", /\blight leaks?\b|\blens flares?\b/], ["confetti", /\bconfetti\b/], ["sparkles", /\bsparkl|\bglitter|\bstars?\b/],
362
380
  ["particles", /\bparticles?\b|\bdust\b|\bbokeh\b|\bsnow\b/], ["emoji", /\bemojis?\b/], ["sticker", /\bstickers?\b/], ["arrow", /\barrows?\b/],
@@ -366,7 +384,6 @@ const DEVICE_DESCRIBED = [
366
384
  ["text_effect", /\b(animated|kinetic) (text|title|words)\b|\btext effect/], ["flash", /\bflash/],
367
385
  ];
368
386
  const DEVICE_LISTS = { graphic: REFERENCE_GRAPHIC_DEVICES, camera: REFERENCE_CAMERA_DEVICES, transition: REFERENCE_TRANSITION_DEVICES };
369
- /** The analyser's name for a device on its own closed list; for a graphic, else the device its description names, else other (#1064). */
370
387
  export function mapAnalyserDevice(list, name, description = "") {
371
388
  const said = name.trim().toLowerCase().replace(/[\s-]+/g, "_");
372
389
  if (said !== "other" && DEVICE_LISTS[list].includes(said))
@@ -376,8 +393,6 @@ export function mapAnalyserDevice(list, name, description = "") {
376
393
  const plain = description.replace(QUOTED, " ").toLowerCase();
377
394
  return (DEVICE_DESCRIBED.find(([, pattern]) => pattern.test(plain))?.[0] ?? "other");
378
395
  }
379
- /** Our kind for an analyser's graphic: product UI and screenshots fill the frame as an insert, or sit over the presenter; what we cannot draw
380
- * carries its substitute. */
381
396
  export function mapAnalyserGraphic(kind, position) {
382
397
  if (kind === "product_ui" || kind === "screenshot" || kind === "concept_card")
383
398
  return { kind: position === "full_screen" ? "insert_media" : "overlay_media" };
@@ -386,4 +401,3 @@ export function mapAnalyserGraphic(kind, position) {
386
401
  ? { kind: ours, unmapped: [ours, kind].filter(key => Object.hasOwn(SUBSTITUTES, key)).map(key => SUBSTITUTES[key])[0] ?? "a title_card with its label, or leave it out" }
387
402
  : { kind: ours };
388
403
  }
389
- //# sourceMappingURL=reference-profile.js.map
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  export declare const REFERENCE_STAGING_VERSION = "reference-staging-v1";
3
- /** frames-*: measured on the reel's frames; estimated-*: read off the picture, from the video or from one still. */
4
3
  export declare const STAGING_METHODS: readonly ["frames-motion/v1", "frames-box/v1", "frames-layer/v1", "frames-split/v1", "frames-face/v1", "estimated-video", "estimated-still"];
5
4
  export declare const STAGING_ANCHOR_KINDS: readonly ["cut", "flash", "freeze_start", "freeze_end", "beat"];
6
5
  export declare const STAGING_ENTRY_STYLES: readonly ["pop", "fade", "blur_in", "slide", "scale_up", "tilt_in", "typewriter", "wipe", "unknown"];
@@ -11,12 +10,10 @@ export declare const STAGING_COVERS: readonly ["hair", "face", "shoulder", "hand
11
10
  export type StagingCover = (typeof STAGING_COVERS)[number];
12
11
  export declare const STAGING_MOTIONS: readonly ["static", "float", "drift", "scale", "moves_with_frame", "pushed"];
13
12
  export declare const STAGING_GAZES: readonly ["camera", "up_left", "up_right", "left", "right", "down", "element", "closed"];
14
- /** The image side the top of the head leans to; a roll within ±5° is upright. */
15
13
  export declare const STAGING_HEAD_ROLLS: readonly ["left", "right", "upright"];
16
14
  export declare const STAGING_EXPRESSIONS: readonly ["neutral", "smile", "surprised", "thinking", "other"];
17
15
  export declare const STAGING_HANDS: readonly ["at_chest", "gesturing", "out_of_frame", "other"];
18
16
  export declare const STAGING_FREEZE_ENDS: readonly ["cut", "flash", "unfreeze", "end"];
19
- /** none: the step lands on a brighter shot with no light laid over it. */
20
17
  export declare const STAGING_FLASH_TINTS: readonly ["white", "warm", "cool", "none"];
21
18
  export declare const stagingRect: z.ZodObject<{
22
19
  left: z.ZodNumber;
@@ -25,14 +22,12 @@ export declare const stagingRect: z.ZodObject<{
25
22
  height: z.ZodNumber;
26
23
  }, z.core.$strict>;
27
24
  export type StagingRect = z.infer<typeof stagingRect>;
28
- /** A rect in face units, as a layer's place takes it (#973 S1). */
29
25
  export declare const stagingFaceRect: z.ZodObject<{
30
26
  left: z.ZodNumber;
31
27
  top: z.ZodNumber;
32
28
  width: z.ZodNumber;
33
29
  height: z.ZodNumber;
34
30
  }, z.core.$strict>;
35
- /** A moment named by its anchor: the nearest anchor on a side is never used, because it moves when the edit does. */
36
31
  export declare const stagingAnchorRef: z.ZodObject<{
37
32
  id: z.ZodString;
38
33
  offset_s: z.ZodNumber;
@@ -329,7 +324,6 @@ export declare const stagingFlash: z.ZodObject<{
329
324
  color: z.ZodOptional<z.ZodString>;
330
325
  }, z.core.$strict>;
331
326
  export type StagingFlash = z.infer<typeof stagingFlash>;
332
- /** Elements one staging holds, measured or kept with only the vision pass's box and times (#930 S2). */
333
327
  export declare const MAX_STAGING_ELEMENTS = 40;
334
328
  export declare const referenceStaging: z.ZodObject<{
335
329
  version: z.ZodLiteral<"reference-staging-v1">;
@@ -629,17 +623,13 @@ export declare const referenceStaging: z.ZodObject<{
629
623
  }, z.core.$strict>>>;
630
624
  }, z.core.$strict>;
631
625
  export type ReferenceStaging = z.infer<typeof referenceStaging>;
632
- /** Cross-field checks a profile runs on its staging: the beats and graphics it names exist, its anchors exist, and its times are ordered. */
633
626
  export declare function stagingIssues(staging: ReferenceStaging, beats: readonly {
634
627
  graphics: readonly unknown[];
635
628
  }[], duration: number): {
636
629
  path: (string | number)[];
637
630
  message: string;
638
631
  }[];
639
- /** A frame rect in face units: origin the face box's centre, unit its height in pixels (Q2: our actor does not sit where theirs does). */
640
632
  export declare function faceRelativeRect(rect: StagingRect, face: StagingRect, width: number, height: number): z.infer<typeof stagingFaceRect>;
641
- /** Samples thinned to change points: one is kept when an edge moved more than `tolerance` since the last kept, and the last always stays. A
642
- * `pinned` sample (an entry or exit, at its even rate) always stays; past `max`, only the others are spread down (#1051 S4). */
643
633
  export declare function thinStagingRects<T extends {
644
634
  rect: StagingRect;
645
635
  }>(samples: readonly T[], tolerance?: number, max?: number, pinned?: (sample: T) => boolean): T[];
@@ -1,10 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { REFERENCE_SOURCE_KINDS } from "./reference-kinds.js";
3
3
  import { faceUnitsRect } from "./scene-place.js";
4
- // Staging measured from a reference (#914 D1): each element's place, entry, exit, layer and motion, and each freeze's pose. Every number names the
5
- // method that produced it; an absent field was not measured and `analysis.warnings` says why. Words come from closed lists, never the reference.
6
4
  export const REFERENCE_STAGING_VERSION = "reference-staging-v1";
7
- /** frames-*: measured on the reel's frames; estimated-*: read off the picture, from the video or from one still. */
8
5
  export const STAGING_METHODS = ["frames-motion/v1", "frames-box/v1", "frames-layer/v1", "frames-split/v1", "frames-face/v1", "estimated-video",
9
6
  "estimated-still"];
10
7
  export const STAGING_ANCHOR_KINDS = ["cut", "flash", "freeze_start", "freeze_end", "beat"];
@@ -15,21 +12,17 @@ export const STAGING_LAYERS = ["in_front_of_presenter", "behind_presenter", "no_
15
12
  export const STAGING_COVERS = ["hair", "face", "shoulder", "hand", "body", "chair", "microphone", "desk", "other"];
16
13
  export const STAGING_MOTIONS = ["static", "float", "drift", "scale", "moves_with_frame", "pushed"];
17
14
  export const STAGING_GAZES = ["camera", "up_left", "up_right", "left", "right", "down", "element", "closed"];
18
- /** The image side the top of the head leans to; a roll within ±5° is upright. */
19
15
  export const STAGING_HEAD_ROLLS = ["left", "right", "upright"];
20
16
  export const STAGING_EXPRESSIONS = ["neutral", "smile", "surprised", "thinking", "other"];
21
17
  export const STAGING_HANDS = ["at_chest", "gesturing", "out_of_frame", "other"];
22
18
  export const STAGING_FREEZE_ENDS = ["cut", "flash", "unfreeze", "end"];
23
- /** none: the step lands on a brighter shot with no light laid over it. */
24
19
  export const STAGING_FLASH_TINTS = ["white", "warm", "cool", "none"];
25
20
  const frac = z.number().min(0).max(1);
26
21
  const seconds = z.number().min(0);
27
22
  const anchorId = z.string().regex(new RegExp(`^(${STAGING_ANCHOR_KINDS.join("|")})#\\d+$`));
28
23
  const method = z.enum(STAGING_METHODS);
29
24
  export const stagingRect = z.strictObject({ left: frac, top: frac, width: frac, height: frac });
30
- /** A rect in face units, as a layer's place takes it (#973 S1). */
31
25
  export const stagingFaceRect = faceUnitsRect;
32
- /** A moment named by its anchor: the nearest anchor on a side is never used, because it moves when the edit does. */
33
26
  export const stagingAnchorRef = z.strictObject({ id: anchorId, offset_s: z.number() });
34
27
  const entry = z.strictObject({
35
28
  first_visible_s: seconds, settled_s: seconds, anchors: z.array(stagingAnchorRef).max(3),
@@ -82,7 +75,6 @@ export const stagingFlash = z.strictObject({
82
75
  tint: z.enum(STAGING_FLASH_TINTS).describe("The light's colour family; none when the step only lands on a brighter shot."),
83
76
  color: z.string().regex(/^#[0-9A-F]{6}$/).optional().describe("The light's colour."),
84
77
  });
85
- /** Elements one staging holds, measured or kept with only the vision pass's box and times (#930 S2). */
86
78
  export const MAX_STAGING_ELEMENTS = 40;
87
79
  export const referenceStaging = z.strictObject({
88
80
  version: z.literal(REFERENCE_STAGING_VERSION),
@@ -90,10 +82,8 @@ export const referenceStaging = z.strictObject({
90
82
  anchors: z.array(z.strictObject({ id: anchorId, t_s: seconds })).max(80),
91
83
  elements: z.array(stagingElement).max(MAX_STAGING_ELEMENTS),
92
84
  freezes: z.array(stagingFreeze).max(8),
93
- /** Optional since #1051 S4: a staging without it parses, and its flash anchors then carry only their times. */
94
85
  flashes: z.array(stagingFlash).max(80).optional().describe("Each flash anchor's light: when it starts, how long and how bright it is, and its colour."),
95
86
  });
96
- /** Cross-field checks a profile runs on its staging: the beats and graphics it names exist, its anchors exist, and its times are ordered. */
97
87
  export function stagingIssues(staging, beats, duration) {
98
88
  const out = [];
99
89
  const ids = new Set();
@@ -150,15 +140,12 @@ export function stagingIssues(staging, beats, duration) {
150
140
  });
151
141
  return out;
152
142
  }
153
- /** A frame rect in face units: origin the face box's centre, unit its height in pixels (Q2: our actor does not sit where theirs does). */
154
143
  export function faceRelativeRect(rect, face, width, height) {
155
144
  const unit = face.height * height, cx = (face.left + face.width / 2) * width, cy = (face.top + face.height / 2) * height;
156
145
  const round = (value) => Math.round(value * 1e4) / 1e4;
157
146
  return { left: round((rect.left * width - cx) / unit), top: round((rect.top * height - cy) / unit), width: round((rect.width * width) / unit),
158
147
  height: round((rect.height * height) / unit) };
159
148
  }
160
- /** Samples thinned to change points: one is kept when an edge moved more than `tolerance` since the last kept, and the last always stays. A
161
- * `pinned` sample (an entry or exit, at its even rate) always stays; past `max`, only the others are spread down (#1051 S4). */
162
149
  export function thinStagingRects(samples, tolerance = 0.003, max = 60, pinned = () => false) {
163
150
  const kept = [];
164
151
  samples.forEach((sample, index) => {
@@ -174,4 +161,3 @@ export function thinStagingRects(samples, tolerance = 0.003, max = 60, pinned =
174
161
  const spread = new Set(room <= 0 ? [] : Array.from({ length: Math.min(room, rest.length) }, (_, index) => rest[Math.round(index * step)]));
175
162
  return kept.filter(sample => fixed.includes(sample) || spread.has(sample));
176
163
  }
177
- //# sourceMappingURL=reference-staging.js.map
@@ -1,6 +1,5 @@
1
1
  import type { ReferenceProfileInput } from "./reference-profile.js";
2
2
  import type { StagingRect } from "./reference-staging.js";
3
- /** What the reference's text says about a span: free of text, free once the boxes are masked, or unusable. */
4
3
  export type ReferenceSpanVerdict = {
5
4
  kind: "clean";
6
5
  start_s: number;
@@ -15,11 +14,8 @@ export type ReferenceSpanVerdict = {
15
14
  reason: string;
16
15
  };
17
16
  export type ReferenceTextProfile = Pick<ReferenceProfileInput, "source" | "beats" | "captions" | "transcript" | "segments" | "speakers" | "staging">;
18
- /** A caption stays up a little after its last word is spoken. */
19
17
  export declare const CAPTION_HOLD_S = 0.4;
20
18
  export declare const MASK_PADDING = 0.02;
21
- /** The part of `want` a reference clip may use: the span itself when no text shows, else the longest text-free stretch of at least
22
- * `minSeconds`, else the span with every text box masked, else a refusal naming the text that has no box. */
23
19
  export declare function cleanReferenceSpan(profile: ReferenceTextProfile, want: {
24
20
  start_s: number;
25
21
  end_s: number;
@@ -1,7 +1,5 @@
1
- /** A caption stays up a little after its last word is spoken. */
2
1
  export const CAPTION_HOLD_S = 0.4;
3
2
  export const MASK_PADDING = 0.02;
4
- /** Where a caption block of each position sits when no box was measured: a full-width band. */
5
3
  const CAPTION_BANDS = {
6
4
  top: [0.05, 0.3], middle: [0.35, 0.65], lower: [0.55, 0.85], bottom: [0.7, 0.95],
7
5
  };
@@ -13,14 +11,12 @@ function union(boxes) {
13
11
  const left = Math.min(...boxes.map(box => box.left)), top = Math.min(...boxes.map(box => box.top));
14
12
  return { left, top, width: Math.max(...boxes.map(box => box.left + box.width)) - left, height: Math.max(...boxes.map(box => box.top + box.height)) - top };
15
13
  }
16
- /** Every stretch of the reference that shows text or a graphic, with its box when one was measured. */
17
14
  function referenceTexts(profile) {
18
15
  const duration = profile.source.duration_s, texts = [];
19
16
  if (profile.captions.present) {
20
17
  const [top, bottom] = CAPTION_BANDS[profile.captions.position];
21
18
  const box = profile.captions.box ?? union(profile.speakers?.flatMap(speaker => speaker.caption?.box ?? []) ?? [])
22
19
  ?? { left: 0, top, width: 1, height: bottom - top };
23
- // Without word times the captions may be anywhere in the reel.
24
20
  const said = profile.transcript?.length ? profile.transcript : profile.segments?.length ? profile.segments : [{ start_s: 0, end_s: duration }];
25
21
  for (const word of said)
26
22
  texts.push({ start: word.start_s, end: word.end_s + CAPTION_HOLD_S, box, what: "a caption" });
@@ -40,8 +36,6 @@ function referenceTexts(profile) {
40
36
  });
41
37
  return texts;
42
38
  }
43
- /** The part of `want` a reference clip may use: the span itself when no text shows, else the longest text-free stretch of at least
44
- * `minSeconds`, else the span with every text box masked, else a refusal naming the text that has no box. */
45
39
  export function cleanReferenceSpan(profile, want, minSeconds) {
46
40
  const start = Math.max(0, want.start_s), end = Math.min(profile.source.duration_s, want.end_s);
47
41
  if (!Number.isFinite(start) || !Number.isFinite(end) || !(minSeconds > 0) || end - start < minSeconds) {
@@ -73,4 +67,3 @@ export function cleanReferenceSpan(profile, want, minSeconds) {
73
67
  }
74
68
  return { kind: "masked", start_s: ms(start), end_s: ms(end), boxes: [...boxes.values()] };
75
69
  }
76
- //# sourceMappingURL=reference-text-spans.js.map
@@ -1,12 +1,9 @@
1
1
  import type { ReferenceSpeaker } from "./reference-profile.js";
2
- /** The note a listening beat carries: the presenter hears a recording, which a remake plays as a call. */
3
2
  export declare const REFERENCE_LISTENING_NOTE: {
4
3
  readonly what: "the presenter listens silently while another voice plays (recorded audio)";
5
4
  readonly suggested_substitute: "a phone_call template over the presenter, who speaks the line: we do not play recorded audio";
6
5
  };
7
6
  type Speaker = Pick<ReferenceSpeaker, "id" | "on_screen" | "role" | "word_count">;
8
- /** The off-screen voices a reel lays over its presenter (#1422): a narrator's, or any but an interviewer's while the presenter on screen says no */
9
- /** word and no call rings or plays. Such a voice is a voice-over the presenter acts under, not a recording the presenter listens to. */
10
7
  export declare function voiceOverSpeakers(speakers: readonly Speaker[], presenter: string | null | undefined, callHeard: boolean): Set<string>;
11
8
  type VoiceOverBeat = {
12
9
  presenter_behaviour: string;
@@ -27,9 +24,6 @@ type VoiceOverProfile = {
27
24
  suggested_substitute: string;
28
25
  }[];
29
26
  };
30
- /** A sound of a call: a ring, or a recording played in the reel. */
31
27
  export declare const callSound: (kind: string) => boolean;
32
- /** The profile with a beat a voice-over plays in read as the presenter reacting, and its call note gone; a profile stored before #1422 read */
33
- /** a narrator over a muted presenter as a call on every beat. A profile with no such beat comes back unchanged. */
34
28
  export declare function withVoiceOver<P extends VoiceOverProfile>(profile: P): P;
35
29
  export {};
@@ -1,17 +1,11 @@
1
- /** The note a listening beat carries: the presenter hears a recording, which a remake plays as a call. */
2
1
  export const REFERENCE_LISTENING_NOTE = { what: "the presenter listens silently while another voice plays (recorded audio)",
3
2
  suggested_substitute: "a phone_call template over the presenter, who speaks the line: we do not play recorded audio" };
4
- /** The off-screen voices a reel lays over its presenter (#1422): a narrator's, or any but an interviewer's while the presenter on screen says no */
5
- /** word and no call rings or plays. Such a voice is a voice-over the presenter acts under, not a recording the presenter listens to. */
6
3
  export function voiceOverSpeakers(speakers, presenter, callHeard) {
7
4
  const silent = !callHeard && speakers.some(speaker => speaker.id === presenter && speaker.on_screen && speaker.word_count === 0);
8
5
  return new Set(speakers.filter(speaker => !speaker.on_screen && speaker.id !== presenter
9
6
  && (speaker.role === "narrator" || (silent && speaker.role !== "interviewer"))).map(speaker => speaker.id));
10
7
  }
11
- /** A sound of a call: a ring, or a recording played in the reel. */
12
8
  export const callSound = (kind) => kind === "ring" || kind === "recorded_audio";
13
- /** The profile with a beat a voice-over plays in read as the presenter reacting, and its call note gone; a profile stored before #1422 read */
14
- /** a narrator over a muted presenter as a call on every beat. A profile with no such beat comes back unchanged. */
15
9
  export function withVoiceOver(profile) {
16
10
  const presenter = profile.speakers?.find(speaker => speaker.id === "presenter")?.id
17
11
  ?? profile.speakers?.find(speaker => speaker.on_screen && speaker.role === "presenter")?.id;
@@ -24,4 +18,3 @@ export function withVoiceOver(profile) {
24
18
  return { ...profile, beats: profile.beats.map((beat, index) => (turned.has(index) ? { ...beat, presenter_behaviour: "reacting" } : beat)),
25
19
  unmapped: profile.unmapped.filter(entry => !(turned.has(entry.beat_index) && entry.what === REFERENCE_LISTENING_NOTE.what)) };
26
20
  }
27
- //# sourceMappingURL=reference-voice-over.js.map
@@ -2,16 +2,11 @@ import { z } from "zod";
2
2
  export declare const REFERENCE_VOICE_VERSION = "voice-profile-v1";
3
3
  export declare const REFERENCE_VOICE_WARNINGS: readonly ["no_sentence_terminal_punctuation_pace_uses_turn_spans", "background_music_present_f0_and_intensity_may_be_contaminated"];
4
4
  export declare const MAX_REFERENCE_VOICE_SPEAKERS = 6;
5
- /** Words per second of our English default (eleven_v4) at speed 1 on the reference reel's text, as measured. */
6
5
  export declare const NARRATION_BASELINE_WPS = 2.54;
7
- /** ElevenLabs' speed range; make_ugc's voice_pace accepts the same. */
8
6
  export declare const VOICE_PACE_MIN = 0.7;
9
7
  export declare const VOICE_PACE_MAX = 1.2;
10
- /** No trimmed pause gets shorter than this, whatever the reference measured. */
11
8
  export declare const PAUSE_TRIM_FLOOR_S = 0.05;
12
- /** The longest target make_ugc takes; a reference pause above it is compiled to it, with a plan note. */
13
9
  export declare const PAUSE_TRIM_CEILING_S = 2;
14
- /** make_ugc's opt-in: per gap class, the length a longer pause is cut down to; quiet audio only, a joint that would click is kept. */
15
10
  export declare const pauseTrim: z.ZodObject<{
16
11
  sentence_end_s: z.ZodOptional<z.ZodNumber>;
17
12
  comma_s: z.ZodOptional<z.ZodNumber>;
@@ -291,7 +286,6 @@ export type NarrationPace = {
291
286
  kind: "unmeasured";
292
287
  reason: string;
293
288
  };
294
- /** The presenter's pace as make_ugc's voice_pace against our baseline voice, clamped to the vendor's range. */
295
289
  export declare function narrationPaceFromVoice(voice: ReferenceVoice | undefined): NarrationPace;
296
290
  export type PauseTrimFromVoice = {
297
291
  targets: PauseTrimTargets;
@@ -300,6 +294,5 @@ export type PauseTrimFromVoice = {
300
294
  median_s: number;
301
295
  }[];
302
296
  };
303
- /** The presenter's word-gap medians as trim targets within [floor, ceiling], naming each capped one; undefined when nothing was measured. */
304
297
  export declare function pauseTrimFromVoice(voice: ReferenceVoice | undefined): PauseTrimFromVoice | undefined;
305
298
  export {};