@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
package/dist/runs.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- /** Shared run stages; each skill uses the stages it needs. */
3
2
  export declare const RUN_STATES: readonly ["queued", "generating", "scripting", "tts", "avatar", "compositing", "uploading", "succeeded", "failed"];
4
3
  export declare const runState: z.ZodEnum<{
5
4
  avatar: "avatar";
@@ -13,8 +12,6 @@ export declare const runState: z.ZodEnum<{
13
12
  uploading: "uploading";
14
13
  }>;
15
14
  export type RunState = z.infer<typeof runState>;
16
- /** The signature covers GET only, so `curl -I` gets 403 and reads as "the link is dead". */
17
- /** Said where the link is handed out. */
18
15
  export declare const VIDEO_URL_CHECK: string;
19
16
  export declare const runStep: z.ZodObject<{
20
17
  step: z.ZodString;
@@ -32,33 +29,16 @@ export declare const runStep: z.ZodObject<{
32
29
  bytes: z.ZodNumber;
33
30
  }, z.core.$strip>>>;
34
31
  }, z.core.$strip>;
35
- /** AI output disclosure of a video with a presenter, the same on every surface: a fully */
36
- /** synthetic clip says so itself. Not a claim of legal compliance. */
37
32
  export declare const AI_DISCLOSURE_TEXT = "This video was generated with AI: the actor, the voice and the lip sync are synthetic.";
38
- /** A faceless video has no actor and no lip sync, so it names what it does hold (clipwright#488). */
39
33
  export declare const FACELESS_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the opening clip and the images are synthetic.";
40
- /** An explainer has no opening clip: it is drawn, and its pictures are generated (#1277). */
41
34
  export declare const FACELESS_EXPLAINER_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the animation and the images in it are synthetic.";
42
- /** A run with `scene_images` cannot call every image synthetic. One at the opening is animated */
43
- /** into the clip, and every shot may be the author's, so the sentence counts neither. */
44
35
  export declare const FACELESS_OWN_IMAGES_AI_DISCLOSURE_TEXT: string;
45
- /** The disclosure of one run, from its skill and stored input: every writer and the API */
46
- /** response call this, so the sentence names what that video holds. */
47
36
  export declare function aiDisclosureText(skill: string, input: unknown): string;
48
- /** Whether a faceless run's stored input holds images of its author: a revision reads what its admission froze down the chain. */
49
37
  export declare function facelessOwnImages(input: unknown): boolean;
50
- /** Object metadata key that says whether the tag is in the file: a reader learns it without the bytes. */
51
38
  export declare const AI_DISCLOSURE_EMBEDDED_METADATA_KEY = "ai-disclosure-embedded";
52
- /** Storage object metadata of a delivery, one builder so every writer shares the keys. Weaker */
53
- /** than an embedded tag (lost on re-save), but always set, without parsing MP4 boxes. */
54
39
  export declare function aiDisclosureObjectMetadata(text: string, embedded?: boolean): Readonly<Record<string, string>>;
55
- /** The metadata of a video with a presenter. */
56
40
  export declare const AI_DISCLOSURE_OBJECT_METADATA: Readonly<Record<string, string>>;
57
- /** Run id shape, a separate schema because INPUT asks for it too: the MCP `get_run` tool, */
58
- /** where a bare `z.string()` let garbage reach the network. */
59
41
  export declare const runId: z.ZodString;
60
- /** A shot candidate's family and unit. The mode and take come from the stored input and are `null` once it is redacted; */
61
- /** the preview and `usable_until` are `null` until its unit is published, and the preview again once its media are gone. */
62
42
  export declare const runCandidate: z.ZodObject<{
63
43
  source_run_id: z.ZodString;
64
44
  root_run_id: z.ZodString;
@@ -78,7 +58,6 @@ export declare const runCandidate: z.ZodObject<{
78
58
  usable_until: z.ZodNullable<z.ZodString>;
79
59
  }, z.core.$strip>;
80
60
  export type RunCandidate = z.infer<typeof runCandidate>;
81
- /** Where a drawn element of a delivered run came from: a library kind, or a graphic made for this run (#1107). */
82
61
  export declare const RUN_ELEMENT_ORIGINS: readonly ["library", "generated"];
83
62
  export declare const runElement: z.ZodObject<{
84
63
  id: z.ZodString;
@@ -141,6 +120,9 @@ export declare const run: z.ZodObject<{
141
120
  shot_talking_action: z.ZodNumber;
142
121
  shot_action: z.ZodNumber;
143
122
  shot_omni: z.ZodOptional<z.ZodNumber>;
123
+ shot_seedance: z.ZodOptional<z.ZodNumber>;
124
+ shot_omni_no_text: z.ZodOptional<z.ZodNumber>;
125
+ shot_seedance_no_text: z.ZodOptional<z.ZodNumber>;
144
126
  }, z.core.$strict>>>;
145
127
  productionCreditsPerSecond: z.ZodNumber;
146
128
  liveAvatarStillCredits: z.ZodNumber;
@@ -156,6 +138,7 @@ export declare const run: z.ZodObject<{
156
138
  tariffId: z.ZodEnum<{
157
139
  "faceless-image-i2v-v1": "faceless-image-i2v-v1";
158
140
  "faceless-parts-v1": "faceless-parts-v1";
141
+ "faceless-parts-v2": "faceless-parts-v2";
159
142
  }>;
160
143
  captions: z.ZodBoolean;
161
144
  images: z.ZodOptional<z.ZodNumber>;
@@ -163,6 +146,9 @@ export declare const run: z.ZodObject<{
163
146
  musicCredits: z.ZodOptional<z.ZodNumber>;
164
147
  shotSeconds: z.ZodOptional<z.ZodNumber>;
165
148
  shotCredits: z.ZodOptional<z.ZodNumber>;
149
+ textShotSeconds: z.ZodOptional<z.ZodNumber>;
150
+ textShotCredits: z.ZodOptional<z.ZodNumber>;
151
+ totalCreditsWithoutText: z.ZodOptional<z.ZodNumber>;
166
152
  scenes: z.ZodOptional<z.ZodNumber>;
167
153
  sceneCredits: z.ZodOptional<z.ZodNumber>;
168
154
  posePictures: z.ZodOptional<z.ZodNumber>;
@@ -171,6 +157,7 @@ export declare const run: z.ZodObject<{
171
157
  objectPictures: z.ZodOptional<z.ZodNumber>;
172
158
  objectPictureCredits: z.ZodOptional<z.ZodNumber>;
173
159
  filmCredits: z.ZodOptional<z.ZodNumber>;
160
+ directionCredits: z.ZodOptional<z.ZodNumber>;
174
161
  outputFrames: z.ZodNumber;
175
162
  }, z.core.$strict>>;
176
163
  revision: z.ZodOptional<z.ZodObject<{
@@ -356,13 +343,9 @@ export declare const run: z.ZodObject<{
356
343
  finished_at: z.ZodNullable<z.ZodString>;
357
344
  }, z.core.$strip>;
358
345
  export type Run = z.infer<typeof run>;
359
- /** Terminal run states as shared constants, the single source of truth about completion, */
360
- /** instead of string literals repeated across consumers. */
361
346
  export declare const SUCCEEDED_STATE: "succeeded";
362
347
  export declare const FAILED_STATE: "failed";
363
348
  export declare const TERMINAL_STATES: readonly ["succeeded", "failed"];
364
- /** Tolerant READ projection: only `state` is loosened to `z.string()`, everything else is */
365
- /** inherited via `run.extend`, so a new server stage does not break installed clients. */
366
349
  export declare const runRead: z.ZodObject<{
367
350
  run_id: z.ZodString;
368
351
  actor: z.ZodOptional<z.ZodObject<{
@@ -404,6 +387,9 @@ export declare const runRead: z.ZodObject<{
404
387
  shot_talking_action: z.ZodNumber;
405
388
  shot_action: z.ZodNumber;
406
389
  shot_omni: z.ZodOptional<z.ZodNumber>;
390
+ shot_seedance: z.ZodOptional<z.ZodNumber>;
391
+ shot_omni_no_text: z.ZodOptional<z.ZodNumber>;
392
+ shot_seedance_no_text: z.ZodOptional<z.ZodNumber>;
407
393
  }, z.core.$strict>>>;
408
394
  productionCreditsPerSecond: z.ZodNumber;
409
395
  liveAvatarStillCredits: z.ZodNumber;
@@ -419,6 +405,7 @@ export declare const runRead: z.ZodObject<{
419
405
  tariffId: z.ZodEnum<{
420
406
  "faceless-image-i2v-v1": "faceless-image-i2v-v1";
421
407
  "faceless-parts-v1": "faceless-parts-v1";
408
+ "faceless-parts-v2": "faceless-parts-v2";
422
409
  }>;
423
410
  captions: z.ZodBoolean;
424
411
  images: z.ZodOptional<z.ZodNumber>;
@@ -426,6 +413,9 @@ export declare const runRead: z.ZodObject<{
426
413
  musicCredits: z.ZodOptional<z.ZodNumber>;
427
414
  shotSeconds: z.ZodOptional<z.ZodNumber>;
428
415
  shotCredits: z.ZodOptional<z.ZodNumber>;
416
+ textShotSeconds: z.ZodOptional<z.ZodNumber>;
417
+ textShotCredits: z.ZodOptional<z.ZodNumber>;
418
+ totalCreditsWithoutText: z.ZodOptional<z.ZodNumber>;
429
419
  scenes: z.ZodOptional<z.ZodNumber>;
430
420
  sceneCredits: z.ZodOptional<z.ZodNumber>;
431
421
  posePictures: z.ZodOptional<z.ZodNumber>;
@@ -434,6 +424,7 @@ export declare const runRead: z.ZodObject<{
434
424
  objectPictures: z.ZodOptional<z.ZodNumber>;
435
425
  objectPictureCredits: z.ZodOptional<z.ZodNumber>;
436
426
  filmCredits: z.ZodOptional<z.ZodNumber>;
427
+ directionCredits: z.ZodOptional<z.ZodNumber>;
437
428
  outputFrames: z.ZodNumber;
438
429
  }, z.core.$strict>>;
439
430
  revision: z.ZodOptional<z.ZodObject<{
@@ -620,18 +611,11 @@ export declare const runRead: z.ZodObject<{
620
611
  state: z.ZodString;
621
612
  }, z.core.$strip>;
622
613
  export type RunRead = z.infer<typeof runRead>;
623
- /** A money field of a run. Names are derived FROM THE SCHEMA: a hand list next to the MCP */
624
- /** formatter kept losing them. */
625
614
  export type RunMoneyField = Extract<keyof RunRead, `credits_${string}` | "balance_after_credits">;
626
615
  export declare const RUN_MONEY_FIELDS: readonly RunMoneyField[];
627
- /** A run's money fields as one object, for surfaces that build their own response. */
628
616
  export declare function runMoney(read: Pick<RunRead, RunMoneyField>): Pick<RunRead, RunMoneyField>;
629
- /** Whether a run is terminal. Takes a `string` (the read projection), so an unknown */
630
- /** status from an extended enum correctly gives `false`. */
631
617
  export declare function isTerminal(state: string): boolean;
632
- /** The longest `GET /v1/runs/{id}` holds its answer (#1036), inside an agent's usual 60 s tool timeout. */
633
618
  export declare const RUN_WAIT_MAX_SECONDS = 50;
634
- /** The query of `GET /v1/runs/{id}`; other query fields stay ignored, as they were before it had one. */
635
619
  export declare const runQuery: z.ZodObject<{
636
620
  wait_seconds: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
637
621
  }, z.core.$strip>;
package/dist/runs.js CHANGED
@@ -12,7 +12,6 @@ import { SHOT_OPERATION_MODES, shotId } from "./edit-operations.js";
12
12
  import { runGeneration } from "./generations-output.js";
13
13
  import { postText } from "./post-text.js";
14
14
  import { runVideo } from "./video-size.js";
15
- /** Shared run stages; each skill uses the stages it needs. */
16
15
  export const RUN_STATES = [
17
16
  "queued",
18
17
  "generating",
@@ -25,8 +24,6 @@ export const RUN_STATES = [
25
24
  "failed",
26
25
  ];
27
26
  export const runState = z.enum(RUN_STATES);
28
- /** The signature covers GET only, so `curl -I` gets 403 and reads as "the link is dead". */
29
- /** Said where the link is handed out. */
30
27
  export const VIDEO_URL_CHECK = "signed for GET only: HEAD returns 403. To check it without downloading, " +
31
28
  'use a ranged GET (curl -r 0-0), not curl -I.';
32
29
  export const runStep = z.object({
@@ -38,21 +35,12 @@ export const runStep = z.object({
38
35
  .array(z.object({ kind: z.string(), url: z.string().url(), bytes: z.number().int() }))
39
36
  .default([]),
40
37
  });
41
- /** AI output disclosure of a video with a presenter, the same on every surface: a fully */
42
- /** synthetic clip says so itself. Not a claim of legal compliance. */
43
38
  export const AI_DISCLOSURE_TEXT = "This video was generated with AI: the actor, the voice and the lip sync are synthetic.";
44
- /** A faceless video has no actor and no lip sync, so it names what it does hold (clipwright#488). */
45
39
  export const FACELESS_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the opening clip and the images are synthetic.";
46
- /** An explainer has no opening clip: it is drawn, and its pictures are generated (#1277). */
47
40
  export const FACELESS_EXPLAINER_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice, the animation and the images in it are synthetic.";
48
- /** A run with `scene_images` cannot call every image synthetic. One at the opening is animated */
49
- /** into the clip, and every shot may be the author's, so the sentence counts neither. */
50
41
  export const FACELESS_OWN_IMAGES_AI_DISCLOSURE_TEXT = "This video was generated with AI: the voice and the opening clip are synthetic, " +
51
42
  "and so is every image its author did not supply.";
52
- /** The disclosure of one run, from its skill and stored input: every writer and the API */
53
- /** response call this, so the sentence names what that video holds. */
54
43
  export function aiDisclosureText(skill, input) {
55
- // A long-form revision shows its root's synthetic presenter, so it says what the root says.
56
44
  if (skill === "revise_long_form")
57
45
  return AI_DISCLOSURE_TEXT;
58
46
  if (skill !== "make_faceless")
@@ -61,28 +49,19 @@ export function aiDisclosureText(skill, input) {
61
49
  return FACELESS_EXPLAINER_AI_DISCLOSURE_TEXT;
62
50
  return facelessOwnImages(input) ? FACELESS_OWN_IMAGES_AI_DISCLOSURE_TEXT : FACELESS_AI_DISCLOSURE_TEXT;
63
51
  }
64
- /** Whether a faceless run's stored input holds images of its author: a revision reads what its admission froze down the chain. */
65
52
  export function facelessOwnImages(input) {
66
53
  const stored = typeof input === "object" && input !== null
67
54
  ? input : {};
68
55
  return stored.resolved_revision !== undefined ? stored.resolved_revision?.own_images === true
69
56
  : Array.isArray(stored.scene_images) && stored.scene_images.length > 0;
70
57
  }
71
- /** Object metadata key that says whether the tag is in the file: a reader learns it without the bytes. */
72
58
  export const AI_DISCLOSURE_EMBEDDED_METADATA_KEY = "ai-disclosure-embedded";
73
- /** Storage object metadata of a delivery, one builder so every writer shares the keys. Weaker */
74
- /** than an embedded tag (lost on re-save), but always set, without parsing MP4 boxes. */
75
59
  export function aiDisclosureObjectMetadata(text, embedded) {
76
60
  return { "ai-generated": "true", generator: "clipwright", "ai-disclosure": text,
77
61
  ...(embedded === undefined ? {} : { [AI_DISCLOSURE_EMBEDDED_METADATA_KEY]: String(embedded) }) };
78
62
  }
79
- /** The metadata of a video with a presenter. */
80
63
  export const AI_DISCLOSURE_OBJECT_METADATA = aiDisclosureObjectMetadata(AI_DISCLOSURE_TEXT);
81
- /** Run id shape, a separate schema because INPUT asks for it too: the MCP `get_run` tool, */
82
- /** where a bare `z.string()` let garbage reach the network. */
83
64
  export const runId = z.string().regex(/^run_[a-zA-Z0-9]+$/);
84
- /** A shot candidate's family and unit. The mode and take come from the stored input and are `null` once it is redacted; */
85
- /** the preview and `usable_until` are `null` until its unit is published, and the preview again once its media are gone. */
86
65
  export const runCandidate = z.object({
87
66
  source_run_id: runId, root_run_id: runId, shot_id: shotId,
88
67
  kind: z.enum(["picture", "clip"]),
@@ -91,7 +70,6 @@ export const runCandidate = z.object({
91
70
  preview_url: z.string().url().nullable(),
92
71
  usable_until: z.string().datetime().nullable(),
93
72
  });
94
- /** Where a drawn element of a delivered run came from: a library kind, or a graphic made for this run (#1107). */
95
73
  export const RUN_ELEMENT_ORIGINS = ["library", "generated"];
96
74
  export const runElement = z.object({ id: z.string().min(1).max(64), kind: z.string().min(1).max(64), origin: z.enum(RUN_ELEMENT_ORIGINS) }).strict();
97
75
  export const run = z.object({
@@ -101,26 +79,19 @@ export const run = z.object({
101
79
  state: runState,
102
80
  credits_reserved: z.number().int().nonnegative(),
103
81
  credits_charged: z.number().int().nonnegative().nullable(),
104
- /** The account's balance right after this run's charge was settled, read in the settling transaction; `null` until then. */
105
82
  balance_after_credits: z.number().int().nullable().optional(),
106
83
  billing_terms: faceBillingAdmissionTermsSchema.optional(),
107
84
  faceless_billing: facelessRunBilling.optional(),
108
- /** A revision of another run: its family, the credits held at admission, and its frozen price (`null` once redacted). */
109
85
  revision: z.object({
110
86
  source_run_id: runId, root_run_id: runId,
111
87
  quoted_credits: z.number().int().nonnegative(),
112
88
  billing: revisionBilling.nullable(),
113
89
  }).optional(),
114
- /** A shot candidate (`edit_shot`): told by its lineage row; its `final_output` is always `null`. */
115
90
  candidate: runCandidate.optional(),
116
- /** A single generation (`generate_image`, `generate_video`): its delivered file; its `final_output` is always `null`. */
117
91
  generation: runGeneration.optional(),
118
92
  resolved_broll_policy: brollPolicy.optional(),
119
93
  warnings: z.array(z.string()).default([]),
120
- /** The reason. A non-empty `error` does NOT imply `state: "failed"`: on a non-terminal */
121
- /** run it explains a delay awaiting human review, and such a run will not finish by itself. */
122
94
  error: z.string().nullable(),
123
- /** The result of a `create_actor` run; absent on `make_ugc`, whose result is `final_output`. */
124
95
  created_actor: createdActor.optional(),
125
96
  final_output: z
126
97
  .object({
@@ -131,61 +102,40 @@ export const run = z.object({
131
102
  character_id: z.string().optional(),
132
103
  duration_seconds: z.number().positive(),
133
104
  long_form_billing: longFormBillingSummarySchema.optional(),
134
- /** A long-form video on a parts tariff (#800): its charge by part. */
135
105
  parts_billing: partsBillingSummarySchema.optional(),
136
106
  face_duration_seconds: z.number().nonnegative().optional(),
137
107
  full_speech_duration_seconds: z.number().positive().optional(),
138
108
  face_credits_per_second: z.number().int().positive().optional(),
139
109
  face_tariff_id: z.string().min(1).optional(),
140
110
  speech_timing_gaps: speechRhythmResult.optional(),
141
- /** REQUIRED disclosure fields: an optional one could be forgotten and the clip ship */
142
- /** unmarked, while `z.literal(true)` makes `run.parse` fail on our side first. */
143
111
  ai_generated: z.literal(true),
144
112
  ai_disclosure: z.string().min(1),
145
- /** Three formats, not one: requested, sent to the vendor and final. Set only on the */
146
- /** composition path; without it the vendor file is returned as is. */
147
113
  requested_aspect_ratio: z.string().optional(),
148
114
  vendor_aspect_ratio: z.string().optional(),
149
115
  final_aspect_ratio: z.string().optional(),
150
- /** How the clip was fitted into the frame: `exact` or a background mode. */
151
116
  composition_policy: z.string().optional(),
152
- /** Each drawn template and scene with its origin; one left out is in `warnings[]`, not here. */
153
117
  elements: z.array(runElement).max(64).optional(),
154
- /** A done-for-you explainer's lines to publish with it; the video is delivered and charged the same without them. */
155
118
  post_text: postText.optional(),
156
119
  })
157
120
  .nullable(),
158
- /** A succeeded video's measured frame in pixels; absent when its file was not measured, never taken from the request. */
159
121
  video: runVideo.optional(),
160
122
  steps: z.array(runStep).default([]),
161
123
  created_at: z.string().datetime(),
162
124
  finished_at: z.string().datetime().nullable(),
163
125
  });
164
- /** Terminal run states as shared constants, the single source of truth about completion, */
165
- /** instead of string literals repeated across consumers. */
166
126
  export const SUCCEEDED_STATE = "succeeded";
167
127
  export const FAILED_STATE = "failed";
168
- // Consumers tell outcomes apart ONLY through the named constants above: a positional
169
- // `TERMINAL_STATES[1]` would silently invert success and failure on reorder.
170
128
  export const TERMINAL_STATES = [SUCCEEDED_STATE, FAILED_STATE];
171
- /** Tolerant READ projection: only `state` is loosened to `z.string()`, everything else is */
172
- /** inherited via `run.extend`, so a new server stage does not break installed clients. */
173
129
  export const runRead = run.extend({ state: z.string() });
174
130
  export const RUN_MONEY_FIELDS = Object.keys(run.shape).filter((field) => field.startsWith("credits_") || field === "balance_after_credits");
175
- /** A run's money fields as one object, for surfaces that build their own response. */
176
131
  export function runMoney(read) {
177
132
  return Object.fromEntries(RUN_MONEY_FIELDS.map((field) => [field, read[field]]));
178
133
  }
179
- /** Whether a run is terminal. Takes a `string` (the read projection), so an unknown */
180
- /** status from an extended enum correctly gives `false`. */
181
134
  export function isTerminal(state) {
182
135
  return TERMINAL_STATES.includes(state);
183
136
  }
184
- /** The longest `GET /v1/runs/{id}` holds its answer (#1036), inside an agent's usual 60 s tool timeout. */
185
137
  export const RUN_WAIT_MAX_SECONDS = 50;
186
- /** The query of `GET /v1/runs/{id}`; other query fields stay ignored, as they were before it had one. */
187
138
  export const runQuery = z.object({
188
139
  wait_seconds: z.coerce.number().int().min(0).max(RUN_WAIT_MAX_SECONDS).optional()
189
140
  .describe(`Wait up to this many seconds (at most ${RUN_WAIT_MAX_SECONDS}) for the run to succeed or fail before answering.`),
190
141
  });
191
- //# sourceMappingURL=runs.js.map
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- /** One scene for a whole video (#1491): written once, every live shot is drawn in it. */
3
2
  export declare const MAX_SCENE_TEXT = 400;
4
3
  export declare const MAX_SCENE_PROPS = 6;
5
4
  export declare const MAX_SHOT_START = 400;
@@ -18,14 +17,11 @@ export declare const sceneBible: z.ZodObject<{
18
17
  }, z.core.$strict>;
19
18
  export type SceneBible = z.infer<typeof sceneBible>;
20
19
  export declare const SCENE_DESCRIPTION: string;
21
- /** A live shot's first frame (#1491), described as what is visible, like the scene. */
22
20
  export declare const shotStart: z.ZodString;
23
- /** make_faceless reads the same scene (#1491 S7); its posture is the main character's, and a video with no one in it leaves it out. */
24
21
  export declare const FACELESS_SCENE_DESCRIPTION: string;
25
22
  export declare const SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available right now; omit scene and each shot's start";
26
23
  export declare const FACELESS_SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available on make_faceless right now; omit scene";
27
24
  export declare const SCENE_UNUSED_WARNING = "scene has no effect on this video: it has no live shots";
28
- /** Server-only: admission freezes the run's direction here, and a public body naming it is refused as an unknown field. */
29
25
  export declare const sceneDirectionMark: z.ZodObject<{
30
26
  mode: z.ZodLiteral<"complete">;
31
27
  proposal: z.ZodOptional<z.ZodObject<{
@@ -36,11 +32,23 @@ export declare const sceneDirectionMark: z.ZodObject<{
36
32
  knowledge: z.ZodOptional<z.ZodLiteral<"ugc_ad">>;
37
33
  }, z.core.$strict>;
38
34
  export type SceneDirectionMark = z.infer<typeof sceneDirectionMark>;
39
- /** Who the scene director serves: `1` every account, a comma list of account ids only those, anything else nobody. */
35
+ export declare const runSpeech: z.ZodObject<{
36
+ mode: z.ZodEnum<{
37
+ on_camera: "on_camera";
38
+ voice_over: "voice_over";
39
+ }>;
40
+ hook: z.ZodEnum<{
41
+ silent: "silent";
42
+ spoken: "spoken";
43
+ }>;
44
+ why: z.ZodString;
45
+ }, z.core.$strict>;
46
+ export type RunSpeech = z.infer<typeof runSpeech>;
47
+ export declare const speechActions: z.ZodArray<z.ZodString>;
48
+ export declare function speechActionsOf(storedInput: unknown): ReadonlySet<string>;
49
+ export declare function runSpeechOf(storedInput: unknown): RunSpeech | undefined;
40
50
  export declare function sceneDirectorAccounts(env: Record<string, string | undefined>): "all" | ReadonlySet<string> | null;
41
- /** An account switch's value read one way: `1` every account, a comma list of account ids only those, anything else nobody. */
42
51
  export declare function listedAccounts(raw: string | undefined): "all" | ReadonlySet<string> | null;
43
- /** Whether the run asks for direction by a field of its own: the scene or any shot's start. */
44
52
  export declare function asksSceneDirection(input: {
45
53
  scene?: unknown;
46
54
  shots?: readonly {
@@ -1,6 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { negationIn } from "./generation-shot.js";
3
- /** One scene for a whole video (#1491): written once, every live shot is drawn in it. */
4
3
  export const MAX_SCENE_TEXT = 400;
5
4
  export const MAX_SCENE_PROPS = 6;
6
5
  export const MAX_SHOT_START = 400;
@@ -31,32 +30,40 @@ export const sceneBible = z.strictObject({
31
30
  export const SCENE_DESCRIPTION = "One scene for the whole video, written once: where it happens, how the presenter stands or sits, what " +
32
31
  "they wear, how the product looks, the props and the light. The presenter and every live shot of the video are drawn in it; a presenter " +
33
32
  "photo of your own (image) is kept as it is. Omitted, one is written from the script and the presenter's picture; free.";
34
- /** A live shot's first frame (#1491), described as what is visible, like the scene. */
35
33
  export const shotStart = sceneText(MAX_SHOT_START).superRefine((text, context) => {
36
34
  const word = negationIn(text);
37
35
  if (word)
38
36
  context.addIssue({ code: z.ZodIssueCode.custom, message: absentMessage(word) });
39
37
  }).describe("talking_action and action: the first frame, where the actor is and what they hold as the shot begins; omitted, written from " +
40
38
  "the scene and the action.");
41
- /** make_faceless reads the same scene (#1491 S7); its posture is the main character's, and a video with no one in it leaves it out. */
42
39
  export const FACELESS_SCENE_DESCRIPTION = "One scene for the whole video, written once: where it happens, how the main character stands or " +
43
40
  "sits, what they wear, how the product looks, the props and the light. Every picture and moving clip of the video is drawn in it; with " +
44
41
  "format explainer, the film's scenes are set in it. Omitted, a picture video gets one written with its story; free.";
45
42
  export const SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available right now; omit scene and each shot's start";
46
43
  export const FACELESS_SCENE_DIRECTOR_DISABLED_MESSAGE = "scene is not available on make_faceless right now; omit scene";
47
44
  export const SCENE_UNUSED_WARNING = "scene has no effect on this video: it has no live shots";
48
- /** Server-only: admission freezes the run's direction here, and a public body naming it is refused as an unknown field. */
49
45
  export const sceneDirectionMark = z.strictObject({ mode: z.literal("complete"),
50
- /** A run made from an accepted quote proposal (#1491 S6): what was proposed, by digest, and what was picked. */
51
46
  proposal: z.strictObject({ id: z.string().regex(/^sp_[a-z0-9]{20}$/), content_digest: z.string().regex(/^[a-f0-9]{64}$/),
52
47
  accepted: z.array(z.string().regex(/^o[1-9][0-9]?$/)).max(12) }).optional(),
53
- /** Set by admission when the run is directed as an ad (#1539); absent, it is directed as before. */
54
48
  knowledge: z.literal("ugc_ad").optional() });
55
- /** Who the scene director serves: `1` every account, a comma list of account ids only those, anything else nobody. */
49
+ export const runSpeech = z.strictObject({ mode: z.enum(["on_camera", "voice_over"]), hook: z.enum(["spoken", "silent"]),
50
+ why: z.string().min(1).max(300) });
51
+ export const speechActions = z.array(z.string().min(1).max(64)).max(60);
52
+ export function speechActionsOf(storedInput) {
53
+ if (storedInput === null || typeof storedInput !== "object")
54
+ return new Set();
55
+ const parsed = speechActions.safeParse(storedInput.speech_actions);
56
+ return new Set(parsed.success ? parsed.data : []);
57
+ }
58
+ export function runSpeechOf(storedInput) {
59
+ if (storedInput === null || typeof storedInput !== "object")
60
+ return undefined;
61
+ const parsed = runSpeech.safeParse(storedInput.speech);
62
+ return parsed.success ? parsed.data : undefined;
63
+ }
56
64
  export function sceneDirectorAccounts(env) {
57
65
  return listedAccounts(env.CLIPWRIGHT_SCENE_DIRECTOR);
58
66
  }
59
- /** An account switch's value read one way: `1` every account, a comma list of account ids only those, anything else nobody. */
60
67
  export function listedAccounts(raw) {
61
68
  const value = raw?.trim();
62
69
  if (value === "1")
@@ -64,8 +71,6 @@ export function listedAccounts(raw) {
64
71
  const ids = (value ?? "").split(",").map(id => id.trim()).filter(id => /^acc_[A-Za-z0-9_-]+$/.test(id));
65
72
  return ids.length ? new Set(ids) : null;
66
73
  }
67
- /** Whether the run asks for direction by a field of its own: the scene or any shot's start. */
68
74
  export function asksSceneDirection(input) {
69
75
  return input.scene !== undefined || (input.shots ?? []).some(shot => shot.start !== undefined);
70
76
  }
71
- //# sourceMappingURL=scene-bible.js.map
@@ -4,7 +4,6 @@ export declare const MAX_SCENE_SECONDS = 30;
4
4
  export declare const MAX_SCENE_NODES = 200;
5
5
  export declare const MAX_SCENE_DEPTH = 4;
6
6
  export declare const SCENE_FPS: readonly [24, 25, 30];
7
- /** Families a scene may name, with the faces each one has; anything else is refused before render. */
8
7
  export declare const SCENE_FONTS: Readonly<Record<string, {
9
8
  weights: readonly number[];
10
9
  italic: boolean;
@@ -13,7 +12,6 @@ export declare const SCENE_EASINGS: readonly ["linear", "in", "out", "inOut", "b
13
12
  export declare const SCENE_NUMBER_PROPS: readonly ["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "draw", "blur", "radius", "rotateX", "rotateY"];
14
13
  export declare const SCENE_COLOR_PROPS: readonly ["fill", "stroke", "color"];
15
14
  export declare const SCENE_NODE_TYPES: readonly ["rect", "ellipse", "path", "text", "image", "group"];
16
- /** How a text shows over its window: characters typed, words one by one, `from` erased then the text typed, or glyphs settling into the text. */
17
15
  export declare const SCENE_REVEALS: readonly ["type", "words", "swap", "scramble"];
18
16
  declare const keyframeSchema: z.ZodObject<{
19
17
  t: z.ZodNumber;
@@ -497,7 +495,6 @@ export interface SceneGroup {
497
495
  rotateY?: number | undefined;
498
496
  children: SceneNode[];
499
497
  }
500
- /** The viewing distance a tilted group is seen from, in canvas pixels (#1175 S5 C5). */
501
498
  export declare const SCENE_PERSPECTIVE_PX = 1600;
502
499
  export type SceneNode = SceneRect | SceneEllipse | ScenePath | SceneText | SceneImage | SceneGroup;
503
500
  export declare const sceneGraphSchema: z.ZodObject<{
@@ -516,12 +513,9 @@ export declare const sceneGraphSchema: z.ZodObject<{
516
513
  nodes: z.ZodArray<z.ZodType<SceneNode, unknown, z.core.$ZodTypeInternals<SceneNode, unknown>>>;
517
514
  }, z.core.$strict>;
518
515
  export type SceneGraph = z.infer<typeof sceneGraphSchema>;
519
- /** Smallest legible text on a canvas, in canvas pixels: 20 px on a 1920-tall frame. */
520
516
  export declare const minSceneTextPx: (canvas: {
521
517
  height: number;
522
518
  }) => number;
523
- /** Where a scene draws, in shares of its canvas: every shape it ever shows, at its first and its resting pose, cut to the canvas; null when it shows */
524
- /** nothing. Captions meet a scene drawn over the presenter by this box. */
525
519
  export declare function sceneGraphFootprint(scene: SceneGraph): {
526
520
  left: number;
527
521
  top: number;
@@ -536,19 +530,13 @@ export type SceneGraphValidation = {
536
530
  ok: false;
537
531
  errors: string[];
538
532
  };
539
- /** The brand teal; a purple a scene may not keep turns to its hue. */
540
533
  export declare const SCENE_BRAND_TEAL = "#1385A3";
541
- /** Blue-violet to magenta: refused unless the customer's own colours hold one. */
542
534
  export declare const SCENE_PURPLE_HUES: readonly [230, 335];
543
- /** Whether a #RRGGBB(AA) colour is a chromatic purple by hue; greys of any tint are not. */
544
535
  export declare function isScenePurple(colour: string): boolean;
545
- /** Turns every purple colour of a scene, parsed or not, to the brand teal's hue; returns the colours it changed. */
546
536
  export declare function repairScenePurple<T>(input: T): {
547
537
  scene: T;
548
538
  repaired: string[];
549
539
  };
550
- /** Parse, then check what the schema cannot: unique ids, timing inside the scene, fonts, text size, canvas bounds and purple.
551
- * Errors are written to be fed back to the author; `allowPurple` only when the customer's own colours hold a purple. */
552
540
  export declare function validateSceneGraph(input: unknown, options?: {
553
541
  allowPurple?: boolean;
554
542
  }): SceneGraphValidation;
@@ -1,11 +1,9 @@
1
1
  import { z } from "zod";
2
- // A declarative motion-graphics scene: one fixed renderer draws it, so a scene is data and never code.
3
2
  export const SCENE_GRAPH_VERSION = "scene-graph-v1";
4
3
  export const MAX_SCENE_SECONDS = 30;
5
4
  export const MAX_SCENE_NODES = 200;
6
5
  export const MAX_SCENE_DEPTH = 4;
7
6
  export const SCENE_FPS = [24, 25, 30];
8
- /** Families a scene may name, with the faces each one has; anything else is refused before render. */
9
7
  export const SCENE_FONTS = {
10
8
  Inter: { weights: [100, 200, 300, 400, 500, 600, 700, 800, 900], italic: true },
11
9
  Poppins: { weights: [100, 200, 300, 400, 500, 600, 700, 800, 900], italic: true },
@@ -23,7 +21,6 @@ export const SCENE_NUMBER_PROPS = ["x", "y", "opacity", "scale", "scaleX", "scal
23
21
  "rotateX", "rotateY"];
24
22
  export const SCENE_COLOR_PROPS = ["fill", "stroke", "color"];
25
23
  export const SCENE_NODE_TYPES = ["rect", "ellipse", "path", "text", "image", "group"];
26
- /** How a text shows over its window: characters typed, words one by one, `from` erased then the text typed, or glyphs settling into the text. */
27
24
  export const SCENE_REVEALS = ["type", "words", "swap", "scramble"];
28
25
  const hex = z.string().regex(/^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/, "a colour is #RRGGBB or #RRGGBBAA");
29
26
  const seconds = z.number().min(0).max(MAX_SCENE_SECONDS);
@@ -52,7 +49,6 @@ const base = {
52
49
  to_s: seconds.optional(),
53
50
  anim: z.array(trackSchema).max(16).optional(),
54
51
  shadow: shadowSchema.optional(),
55
- /** Motion blur along the node's own x and y movement (#1175 S5 C7): this share of the pixels it moves in a frame, 1 a frame's travel. */
56
52
  smear: z.number().min(0).max(2).optional(),
57
53
  };
58
54
  const stroke = { stroke: hex.optional(), strokeWidth: z.number().min(0).max(200).optional() };
@@ -62,7 +58,6 @@ const ellipseSchema = z.object({ ...base, type: z.literal("ellipse"), width: siz
62
58
  const pathSchema = z.object({
63
59
  ...base, type: z.literal("path"), width: size, height: size, d: pathData, fill: hex.optional(), ...stroke,
64
60
  lineCap: z.enum(["butt", "round", "square"]).optional(), lineJoin: z.enum(["miter", "round", "bevel"]).optional(), draw: unit.optional(),
65
- // The shape bends into `d` over the window (#1175 S5 C4), in the node's own coordinates as its first `d`.
66
61
  morph: z.object({ d: pathData, from_s: seconds, to_s: seconds, ease: z.enum(SCENE_EASINGS).optional() }).strict().optional(),
67
62
  }).strict();
68
63
  const fontSchema = z.object({ family: z.string().min(1).max(60), weight: z.number().int().min(100).max(1000), italic: z.boolean().optional() }).strict();
@@ -79,7 +74,6 @@ const textSchema = z.object({
79
74
  const imageSchema = z.object({
80
75
  ...base, type: z.literal("image"), width: size, height: size, src: id, fit: z.enum(["cover", "contain"]).optional(), radius: size.optional(),
81
76
  }).strict();
82
- /** The viewing distance a tilted group is seen from, in canvas pixels (#1175 S5 C5). */
83
77
  export const SCENE_PERSPECTIVE_PX = 1600;
84
78
  const tilt = z.number().min(-80).max(80);
85
79
  const groupSchema = z.lazy(() => z.object({
@@ -98,9 +92,7 @@ export const sceneGraphSchema = z.object({
98
92
  assets: z.array(z.object({ id, note: z.string().max(200).optional() }).strict()).max(20).optional(),
99
93
  nodes: z.array(nodeSchema).min(1).max(MAX_SCENE_NODES),
100
94
  }).strict();
101
- /** Smallest legible text on a canvas, in canvas pixels: 20 px on a 1920-tall frame. */
102
95
  export const minSceneTextPx = (canvas) => Math.ceil(canvas.height / 96);
103
- /** Props each node type may animate; a colour prop takes #RRGGBB values, every other a number. */
104
96
  const ANIMATABLE = {
105
97
  rect: new Set(["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "blur", "radius", "fill", "stroke"]),
106
98
  ellipse: new Set(["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "blur", "fill", "stroke"]),
@@ -110,16 +102,13 @@ const ANIMATABLE = {
110
102
  group: new Set(["x", "y", "opacity", "scale", "scaleX", "scaleY", "rotation", "width", "height", "blur", "radius", "rotateX", "rotateY"]),
111
103
  };
112
104
  const COLOR_PROPS = new Set(SCENE_COLOR_PROPS);
113
- /** Average advance of a glyph as a share of the font size; the renderer measures, this only bounds the check. */
114
105
  const glyphShare = (family) => (family === "JetBrains Mono" ? 0.6 : family === "Caveat" ? 0.42 : 0.55);
115
- /** A node's resting value of a prop: its last keyframe, or the static value. */
116
106
  function rest(node, prop, fallback) {
117
107
  const keys = node.anim?.find(track => track.prop === prop)?.keys;
118
108
  const last = keys?.[keys.length - 1]?.v;
119
109
  return typeof last === "number" ? last : fallback;
120
110
  }
121
111
  function ownSize(node) {
122
- // A swap shows its erased words first, so the longer of the two is measured.
123
112
  if (node.type === "text" && node.reveal?.from !== undefined && node.reveal.from.length > node.text.length)
124
113
  return ownSize({ ...node, text: node.reveal.from, reveal: undefined });
125
114
  if (node.type === "text") {
@@ -134,8 +123,6 @@ function ownSize(node) {
134
123
  return node.width !== undefined && node.height !== undefined ? { width: rest(node, "width", node.width), height: rest(node, "height", node.height) } : null;
135
124
  return { width: rest(node, "width", node.width), height: rest(node, "height", node.height) };
136
125
  }
137
- /** Where a scene draws, in shares of its canvas: every shape it ever shows, at its first and its resting pose, cut to the canvas; null when it shows */
138
- /** nothing. Captions meet a scene drawn over the presenter by this box. */
139
126
  export function sceneGraphFootprint(scene) {
140
127
  const { width: W, height: H } = scene.canvas;
141
128
  let left = W, top = H, right = 0, bottom = 0;
@@ -151,7 +138,6 @@ export function sceneGraphFootprint(scene) {
151
138
  const scale = origin.scale * at(node, "scale", node.scale ?? 1, last), own = ownSize(node), [ax, ay] = node.anchor ?? [0, 0];
152
139
  const x = origin.x + origin.scale * at(node, "x", node.x, last) - ax * (own?.width ?? 0) * scale;
153
140
  const y = origin.y + origin.scale * at(node, "y", node.y, last) - ay * (own?.height ?? 0) * scale;
154
- // A group draws nothing of its own: only its children mark the frame.
155
141
  if (node.type === "group") {
156
142
  for (const child of node.children)
157
143
  visit(child, { x, y, scale }, last);
@@ -169,9 +155,7 @@ export function sceneGraphFootprint(scene) {
169
155
  visit(node, { x: 0, y: 0, scale: 1 }, last);
170
156
  return right > left && bottom > top ? { left: left / W, top: top / H, width: (right - left) / W, height: (bottom - top) / H } : null;
171
157
  }
172
- /** The brand teal; a purple a scene may not keep turns to its hue. */
173
158
  export const SCENE_BRAND_TEAL = "#1385A3";
174
- /** Blue-violet to magenta: refused unless the customer's own colours hold one. */
175
159
  export const SCENE_PURPLE_HUES = [230, 335];
176
160
  const channels = (colour) => [1, 3, 5].map(at => Number.parseInt(colour.slice(at, at + 2), 16) / 255);
177
161
  function hsl(colour) {
@@ -179,7 +163,6 @@ function hsl(colour) {
179
163
  const h = d === 0 ? 0 : 60 * (max === r ? ((g - b) / d + 6) % 6 : max === g ? (b - r) / d + 2 : (r - g) / d + 4);
180
164
  return { h, s: d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1)), l };
181
165
  }
182
- /** Whether a #RRGGBB(AA) colour is a chromatic purple by hue; greys of any tint are not. */
183
166
  export function isScenePurple(colour) {
184
167
  const [r, g, b] = channels(colour);
185
168
  if (Math.max(r, g, b) - Math.min(r, g, b) < 0.15)
@@ -187,15 +170,12 @@ export function isScenePurple(colour) {
187
170
  const { h } = hsl(colour);
188
171
  return h >= SCENE_PURPLE_HUES[0] && h <= SCENE_PURPLE_HUES[1];
189
172
  }
190
- /** The colour on the brand teal's hue at its own saturation and lightness, alpha kept. */
191
173
  function toTeal(colour) {
192
174
  const { s, l } = hsl(colour), h = hsl(SCENE_BRAND_TEAL).h / 60, c = (1 - Math.abs(2 * l - 1)) * s, x = c * (1 - Math.abs((h % 2) - 1)), m = l - c / 2;
193
175
  const [r, g, b] = h < 1 ? [c, x, 0] : h < 2 ? [x, c, 0] : h < 3 ? [0, c, x] : h < 4 ? [0, x, c] : h < 5 ? [x, 0, c] : [c, 0, x];
194
176
  return `#${[r, g, b].map(v => Math.round((v + m) * 255).toString(16).padStart(2, "0")).join("").toUpperCase()}${colour.slice(7)}`;
195
177
  }
196
- /** Every key a scene draws a colour under, anywhere: fills, strokes, text, box and shadow colours, the ground, colour keyframes. */
197
178
  const COLOUR_KEYS = new Set(["fill", "stroke", "color", "background", "v"]);
198
- /** Maps each drawn colour of a scene, parsed or not; the purple check and the repair both walk it, so they cannot disagree. */
199
179
  function mapColours(value, turn, key) {
200
180
  if (Array.isArray(value))
201
181
  return value.map(item => mapColours(item, turn));
@@ -203,15 +183,12 @@ function mapColours(value, turn, key) {
203
183
  return Object.fromEntries(Object.entries(value).map(([name, item]) => [name, mapColours(item, turn, name)]));
204
184
  return typeof value === "string" && key && COLOUR_KEYS.has(key) && /^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(value) ? turn(value) : value;
205
185
  }
206
- /** Turns every purple colour of a scene, parsed or not, to the brand teal's hue; returns the colours it changed. */
207
186
  export function repairScenePurple(input) {
208
187
  const repaired = new Set();
209
188
  const scene = mapColours(input, colour => { if (!isScenePurple(colour))
210
189
  return colour; repaired.add(colour); return toTeal(colour); });
211
190
  return { scene, repaired: [...repaired] };
212
191
  }
213
- /** Parse, then check what the schema cannot: unique ids, timing inside the scene, fonts, text size, canvas bounds and purple.
214
- * Errors are written to be fed back to the author; `allowPurple` only when the customer's own colours hold a purple. */
215
192
  export function validateSceneGraph(input, options = {}) {
216
193
  const parsed = sceneGraphSchema.safeParse(input);
217
194
  if (!parsed.success) {
@@ -328,4 +305,3 @@ export function validateSceneGraph(input, options = {}) {
328
305
  }
329
306
  return errors.length ? { ok: false, errors } : { ok: true, scene, warnings };
330
307
  }
331
- //# sourceMappingURL=scene-graph.js.map