@clipwright/core 0.60.0 → 0.62.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 (596) 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.d.ts +27 -0
  12. package/dist/ad-guide.js +7 -2
  13. package/dist/ad-ids.d.ts +3 -0
  14. package/dist/ad-ids.js +4 -0
  15. package/dist/ad-pause-trim.d.ts +0 -5
  16. package/dist/ad-pause-trim.js +0 -8
  17. package/dist/ads.d.ts +145 -0
  18. package/dist/ads.js +56 -0
  19. package/dist/api-failure.d.ts +6 -44
  20. package/dist/api-failure.js +16 -67
  21. package/dist/aspect.d.ts +0 -29
  22. package/dist/aspect.js +1 -34
  23. package/dist/asset-identity.d.ts +0 -2
  24. package/dist/asset-identity.js +0 -3
  25. package/dist/assets.d.ts +0 -34
  26. package/dist/assets.js +0 -42
  27. package/dist/billing-terms.d.ts +0 -3
  28. package/dist/billing-terms.js +0 -4
  29. package/dist/brand-styles.d.ts +0 -6
  30. package/dist/brand-styles.js +0 -13
  31. package/dist/broll-policy.js +0 -1
  32. package/dist/canvas-fit.d.ts +0 -2
  33. package/dist/canvas-fit.js +0 -4
  34. package/dist/caption-funnel.d.ts +0 -2
  35. package/dist/caption-funnel.js +0 -15
  36. package/dist/caption-geometry.d.ts +0 -6
  37. package/dist/caption-geometry.js +0 -10
  38. package/dist/caption-language.d.ts +0 -3
  39. package/dist/caption-language.js +0 -6
  40. package/dist/contract-dispositions.d.ts +0 -61
  41. package/dist/contract-dispositions.js +3 -96
  42. package/dist/contracts/v1/workflow-brief.d.ts +57 -3
  43. package/dist/contracts/v1/workflow-brief.js +0 -13
  44. package/dist/contracts/v1/workflow-catalog.d.ts +114 -0
  45. package/dist/contracts/v1/workflow-catalog.js +0 -3
  46. package/dist/contracts/v1/workflow-client.d.ts +114 -0
  47. package/dist/contracts/v1/workflow-client.js +0 -1
  48. package/dist/contracts/v1/workflow-dto.js +0 -1
  49. package/dist/contracts/v1/workflow-evidence.js +0 -1
  50. package/dist/contracts/v1/workflow-execution.d.ts +0 -1
  51. package/dist/contracts/v1/workflow-execution.js +0 -4
  52. package/dist/contracts/v1/workflow-next.d.ts +0 -2
  53. package/dist/contracts/v1/workflow-next.js +0 -3
  54. package/dist/contracts/v1/workflow-plan.d.ts +171 -0
  55. package/dist/contracts/v1/workflow-plan.js +0 -1
  56. package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
  57. package/dist/contracts/v1/workflow-primitives.js +0 -2
  58. package/dist/contracts/v1/workflow-run-read.d.ts +0 -1
  59. package/dist/contracts/v1/workflow-run-read.js +0 -3
  60. package/dist/creator-profile.d.ts +0 -30
  61. package/dist/creator-profile.js +0 -45
  62. package/dist/default-actor.js +0 -2
  63. package/dist/design.d.ts +0 -17
  64. package/dist/design.js +0 -18
  65. package/dist/diy-next.d.ts +18 -0
  66. package/dist/diy-next.js +13 -0
  67. package/dist/edit-billing.d.ts +0 -6
  68. package/dist/edit-billing.js +0 -10
  69. package/dist/edit-candidate.d.ts +0 -6
  70. package/dist/edit-candidate.js +0 -9
  71. package/dist/edit-document.d.ts +0 -12
  72. package/dist/edit-document.js +0 -15
  73. package/dist/edit-faceless.d.ts +0 -3
  74. package/dist/edit-faceless.js +0 -4
  75. package/dist/edit-long-form.d.ts +0 -13
  76. package/dist/edit-long-form.js +0 -17
  77. package/dist/edit-music.d.ts +397 -0
  78. package/dist/edit-music.js +77 -0
  79. package/dist/edit-operations.d.ts +0 -1
  80. package/dist/edit-operations.js +0 -2
  81. package/dist/edit-primitives.d.ts +0 -3
  82. package/dist/edit-primitives.js +0 -5
  83. package/dist/edit-revision.d.ts +0 -4
  84. package/dist/edit-revision.js +0 -6
  85. package/dist/edit-rules.d.ts +0 -3
  86. package/dist/edit-rules.js +0 -9
  87. package/dist/edit-shots.d.ts +45 -5
  88. package/dist/edit-shots.js +7 -11
  89. package/dist/edit-validate.d.ts +0 -10
  90. package/dist/edit-validate.js +0 -14
  91. package/dist/edit.js +0 -3
  92. package/dist/endpoint-notes.d.ts +0 -2
  93. package/dist/endpoint-notes.js +0 -3
  94. package/dist/endpoints.d.ts +0 -11
  95. package/dist/endpoints.js +11 -21
  96. package/dist/errors.d.ts +29 -43
  97. package/dist/errors.js +18 -54
  98. package/dist/explainer-fit.d.ts +0 -7
  99. package/dist/explainer-fit.js +0 -10
  100. package/dist/face-billing.d.ts +0 -9
  101. package/dist/face-billing.js +0 -23
  102. package/dist/face-delivery.d.ts +0 -1
  103. package/dist/face-delivery.js +0 -2
  104. package/dist/faceless-action-shots.d.ts +0 -8
  105. package/dist/faceless-action-shots.js +0 -8
  106. package/dist/faceless-customer-anchors.d.ts +0 -1
  107. package/dist/faceless-customer-anchors.js +0 -2
  108. package/dist/faceless-cut-style.js +0 -1
  109. package/dist/faceless-direction-summary.d.ts +0 -2
  110. package/dist/faceless-direction-summary.js +0 -3
  111. package/dist/faceless-image-placement.d.ts +0 -2
  112. package/dist/faceless-image-placement.js +0 -3
  113. package/dist/faceless-image-qualification.js +0 -2
  114. package/dist/faceless-media-record.d.ts +0 -6
  115. package/dist/faceless-media-record.js +0 -11
  116. package/dist/faceless-price.d.ts +0 -45
  117. package/dist/faceless-price.js +0 -64
  118. package/dist/faceless-public-plan.d.ts +0 -13
  119. package/dist/faceless-public-plan.js +0 -11
  120. package/dist/faceless-public.d.ts +0 -26
  121. package/dist/faceless-public.js +0 -59
  122. package/dist/faceless-short-61.js +0 -1
  123. package/dist/faceless-storyboard-timing.js +0 -1
  124. package/dist/faceless-storyboard-v2-plan.js +0 -1
  125. package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
  126. package/dist/faceless-storyboard-v2-timing.js +0 -3
  127. package/dist/faceless-storyboard-v2.js +0 -1
  128. package/dist/faceless-storyboard.js +0 -1
  129. package/dist/faceless-voices.d.ts +0 -16
  130. package/dist/faceless-voices.js +0 -18
  131. package/dist/feedback.d.ts +0 -4
  132. package/dist/feedback.js +0 -5
  133. package/dist/film-directions.d.ts +0 -2
  134. package/dist/film-directions.js +0 -7
  135. package/dist/film-drafts.d.ts +0 -8
  136. package/dist/film-drafts.js +0 -19
  137. package/dist/film-guide.d.ts +0 -3
  138. package/dist/film-guide.js +0 -6
  139. package/dist/film-styles.d.ts +0 -5
  140. package/dist/film-styles.js +0 -8
  141. package/dist/generation-shot.d.ts +0 -5
  142. package/dist/generation-shot.js +0 -8
  143. package/dist/generations-output.d.ts +0 -2
  144. package/dist/generations-output.js +0 -5
  145. package/dist/generations.d.ts +0 -22
  146. package/dist/generations.js +21 -44
  147. package/dist/idempotency.d.ts +1 -21
  148. package/dist/idempotency.js +8 -29
  149. package/dist/index.d.ts +4 -0
  150. package/dist/index.js +4 -28
  151. package/dist/live-shot-kinds.d.ts +16 -25
  152. package/dist/live-shot-kinds.js +12 -28
  153. package/dist/long-form-pricing.d.ts +0 -5
  154. package/dist/long-form-pricing.js +0 -6
  155. package/dist/long-form-profile.d.ts +0 -3
  156. package/dist/long-form-profile.js +0 -4
  157. package/dist/long-form-revision.d.ts +0 -9
  158. package/dist/long-form-revision.js +0 -11
  159. package/dist/markdown-quote.d.ts +0 -2
  160. package/dist/markdown-quote.js +0 -3
  161. package/dist/mascots.d.ts +0 -5
  162. package/dist/mascots.js +0 -10
  163. package/dist/max-credits.d.ts +0 -1
  164. package/dist/max-credits.js +0 -2
  165. package/dist/mcp-ugc-descriptions.d.ts +0 -2
  166. package/dist/mcp-ugc-descriptions.js +1 -6
  167. package/dist/media-timebase.d.ts +0 -2
  168. package/dist/media-timebase.js +0 -6
  169. package/dist/motion-styles.d.ts +0 -8
  170. package/dist/motion-styles.js +0 -11
  171. package/dist/moves.d.ts +0 -7
  172. package/dist/moves.js +0 -9
  173. package/dist/music.d.ts +0 -5
  174. package/dist/music.js +0 -8
  175. package/dist/naming.d.ts +0 -3
  176. package/dist/naming.js +0 -19
  177. package/dist/openapi.d.ts +0 -13
  178. package/dist/openapi.js +9 -11
  179. package/dist/output-provenance.d.ts +0 -4
  180. package/dist/output-provenance.js +0 -5
  181. package/dist/own-agent-price.d.ts +21 -22
  182. package/dist/own-agent-price.js +34 -25
  183. package/dist/own-agent-runs.d.ts +351 -11
  184. package/dist/own-agent-runs.js +144 -24
  185. package/dist/pacing.d.ts +3 -15
  186. package/dist/pacing.js +18 -18
  187. package/dist/parts-pricing.d.ts +0 -28
  188. package/dist/parts-pricing.js +0 -32
  189. package/dist/post-text.d.ts +0 -2
  190. package/dist/post-text.js +0 -4
  191. package/dist/presenter-beats.d.ts +0 -10
  192. package/dist/presenter-beats.js +0 -14
  193. package/dist/presenter-matte.d.ts +0 -7
  194. package/dist/presenter-matte.js +0 -9
  195. package/dist/presenter-takes.d.ts +0 -3
  196. package/dist/presenter-takes.js +0 -8
  197. package/dist/prices.d.ts +2 -8
  198. package/dist/prices.js +13 -23
  199. package/dist/public-endpoints.d.ts +0 -11
  200. package/dist/public-endpoints.js +0 -14
  201. package/dist/public-responses.d.ts +0 -2
  202. package/dist/public-responses.js +0 -3
  203. package/dist/rate-limit.d.ts +0 -24
  204. package/dist/rate-limit.js +0 -29
  205. package/dist/reference-analysis.d.ts +57 -34
  206. package/dist/reference-analysis.js +0 -69
  207. package/dist/reference-bring.d.ts +33 -0
  208. package/dist/reference-bring.js +28 -0
  209. package/dist/reference-display.d.ts +0 -3
  210. package/dist/reference-display.js +37 -4
  211. package/dist/reference-kinds.d.ts +0 -4
  212. package/dist/reference-kinds.js +0 -6
  213. package/dist/reference-lyrics.d.ts +0 -6
  214. package/dist/reference-lyrics.js +0 -6
  215. package/dist/reference-profile.d.ts +270 -39
  216. package/dist/reference-profile.js +64 -50
  217. package/dist/reference-staging.d.ts +0 -10
  218. package/dist/reference-staging.js +0 -14
  219. package/dist/reference-text-spans.d.ts +0 -4
  220. package/dist/reference-text-spans.js +0 -7
  221. package/dist/reference-voice-over.d.ts +0 -6
  222. package/dist/reference-voice-over.js +0 -7
  223. package/dist/reference-voice.d.ts +0 -7
  224. package/dist/reference-voice.js +0 -12
  225. package/dist/render-backend.d.ts +0 -30
  226. package/dist/render-backend.js +0 -5
  227. package/dist/resolved-timeline.d.ts +0 -4
  228. package/dist/resolved-timeline.js +1 -31
  229. package/dist/run-media.d.ts +0 -1
  230. package/dist/run-media.js +0 -2
  231. package/dist/run-preflight.d.ts +0 -4
  232. package/dist/run-preflight.js +0 -11
  233. package/dist/run-static-warnings.d.ts +0 -8
  234. package/dist/run-static-warnings.js +0 -38
  235. package/dist/runs.d.ts +0 -32
  236. package/dist/runs.js +0 -50
  237. package/dist/scene-bible.d.ts +15 -7
  238. package/dist/scene-bible.js +15 -10
  239. package/dist/scene-graph.d.ts +0 -12
  240. package/dist/scene-graph.js +0 -24
  241. package/dist/scene-place.d.ts +0 -25
  242. package/dist/scene-place.js +0 -24
  243. package/dist/scene-proposal.d.ts +0 -3
  244. package/dist/scene-proposal.js +0 -9
  245. package/dist/script-integrity.d.ts +0 -6
  246. package/dist/script-integrity.js +0 -8
  247. package/dist/script-voice.d.ts +0 -7
  248. package/dist/script-voice.js +0 -16
  249. package/dist/semantic-inserts.d.ts +0 -7
  250. package/dist/semantic-inserts.js +0 -10
  251. package/dist/skill-theme-explainer.js +0 -5
  252. package/dist/skill-theme.d.ts +0 -13
  253. package/dist/skill-theme.js +0 -25
  254. package/dist/skills.d.ts +22 -86
  255. package/dist/skills.js +21 -167
  256. package/dist/speech-rhythm-contract.js +0 -1
  257. package/dist/speech-rhythm.d.ts +0 -4
  258. package/dist/speech-rhythm.js +0 -2
  259. package/dist/templates/backdrop.d.ts +0 -3
  260. package/dist/templates/backdrop.js +0 -5
  261. package/dist/templates/callout.d.ts +0 -4
  262. package/dist/templates/callout.js +0 -6
  263. package/dist/templates/chart.d.ts +0 -4
  264. package/dist/templates/chart.js +0 -6
  265. package/dist/templates/chat-window.d.ts +0 -8
  266. package/dist/templates/chat-window.js +0 -10
  267. package/dist/templates/checklist.d.ts +0 -3
  268. package/dist/templates/checklist.js +0 -6
  269. package/dist/templates/comment-cta.d.ts +0 -14
  270. package/dist/templates/comment-cta.js +0 -19
  271. package/dist/templates/compare.d.ts +0 -6
  272. package/dist/templates/compare.js +0 -7
  273. package/dist/templates/cover-story.d.ts +0 -1
  274. package/dist/templates/cover-story.js +0 -3
  275. package/dist/templates/end-card.d.ts +0 -2
  276. package/dist/templates/end-card.js +0 -3
  277. package/dist/templates/hand-title.d.ts +0 -5
  278. package/dist/templates/hand-title.js +0 -9
  279. package/dist/templates/index.d.ts +0 -57
  280. package/dist/templates/index.js +0 -60
  281. package/dist/templates/lower-third.d.ts +0 -4
  282. package/dist/templates/lower-third.js +0 -5
  283. package/dist/templates/notification.d.ts +0 -6
  284. package/dist/templates/notification.js +0 -7
  285. package/dist/templates/phone-call.d.ts +0 -2
  286. package/dist/templates/phone-call.js +0 -6
  287. package/dist/templates/phone-screen.d.ts +0 -5
  288. package/dist/templates/phone-screen.js +0 -7
  289. package/dist/templates/pointer-chips.d.ts +0 -4
  290. package/dist/templates/pointer-chips.js +0 -6
  291. package/dist/templates/progress.d.ts +0 -3
  292. package/dist/templates/progress.js +0 -5
  293. package/dist/templates/quote.d.ts +0 -3
  294. package/dist/templates/quote.js +0 -4
  295. package/dist/templates/race.d.ts +0 -5
  296. package/dist/templates/race.js +0 -7
  297. package/dist/templates/rating.d.ts +0 -3
  298. package/dist/templates/rating.js +0 -5
  299. package/dist/templates/series-frame.d.ts +0 -16
  300. package/dist/templates/series-frame.js +0 -19
  301. package/dist/templates/size.d.ts +0 -7
  302. package/dist/templates/size.js +0 -8
  303. package/dist/templates/slot.d.ts +0 -2
  304. package/dist/templates/slot.js +0 -2
  305. package/dist/templates/sounds.d.ts +24 -12
  306. package/dist/templates/sounds.js +2 -16
  307. package/dist/templates/stat.d.ts +0 -3
  308. package/dist/templates/stat.js +0 -5
  309. package/dist/templates/tag.d.ts +0 -3
  310. package/dist/templates/tag.js +0 -5
  311. package/dist/templates/terminal.d.ts +0 -6
  312. package/dist/templates/terminal.js +0 -8
  313. package/dist/templates/theme.d.ts +0 -7
  314. package/dist/templates/theme.js +0 -9
  315. package/dist/templates/title-card.d.ts +0 -3
  316. package/dist/templates/title-card.js +0 -5
  317. package/dist/templates/video-grid.d.ts +0 -5
  318. package/dist/templates/video-grid.js +0 -8
  319. package/dist/templates/word-fill.d.ts +0 -3
  320. package/dist/templates/word-fill.js +0 -4
  321. package/dist/templates/word-title.d.ts +0 -2
  322. package/dist/templates/word-title.js +0 -4
  323. package/dist/trend-niches.d.ts +0 -11
  324. package/dist/trend-niches.js +0 -16
  325. package/dist/trend-search.d.ts +0 -66
  326. package/dist/trend-search.js +0 -70
  327. package/dist/tts-backend.d.ts +0 -19
  328. package/dist/tts-backend.js +0 -7
  329. package/dist/ugc-call.d.ts +0 -16
  330. package/dist/ugc-call.js +0 -21
  331. package/dist/ugc-delivery.d.ts +0 -2
  332. package/dist/ugc-delivery.js +0 -4
  333. package/dist/ugc-framing.d.ts +0 -4
  334. package/dist/ugc-framing.js +0 -6
  335. package/dist/ugc-interview.d.ts +0 -18
  336. package/dist/ugc-interview.js +0 -24
  337. package/dist/ugc-layers.d.ts +0 -39
  338. package/dist/ugc-layers.js +0 -39
  339. package/dist/ugc-scenes.d.ts +0 -2
  340. package/dist/ugc-scenes.js +0 -5
  341. package/dist/ugc-video-media.d.ts +0 -5
  342. package/dist/ugc-video-media.js +0 -7
  343. package/dist/uploads.d.ts +0 -14
  344. package/dist/uploads.js +0 -17
  345. package/dist/vendor-response.d.ts +0 -19
  346. package/dist/vendor-response.js +0 -22
  347. package/dist/video-size.d.ts +0 -4
  348. package/dist/video-size.js +0 -7
  349. package/dist/voice-admission.d.ts +0 -11
  350. package/dist/voice-admission.js +0 -13
  351. package/dist/voice-catalog-data.d.ts +0 -2
  352. package/dist/voice-catalog-data.js +0 -3
  353. package/dist/voice-catalog.d.ts +0 -6
  354. package/dist/voice-catalog.js +0 -8
  355. package/dist/voice-listing.d.ts +0 -6
  356. package/dist/voice-listing.js +0 -14
  357. package/dist/voice-pace.d.ts +0 -4
  358. package/dist/voice-pace.js +0 -7
  359. package/dist/voice-preview-approval.js +0 -1
  360. package/dist/voices.d.ts +4 -69
  361. package/dist/voices.js +3 -88
  362. package/dist/workflows/catalog.d.ts +0 -2
  363. package/dist/workflows/catalog.js +0 -4
  364. package/dist/workflows/film-directions.d.ts +0 -3
  365. package/dist/workflows/film-directions.js +0 -4
  366. package/dist/workflows/index.js +0 -1
  367. package/dist/workflows/methods/faceless-explainer.d.ts +31 -0
  368. package/dist/workflows/methods/faceless-explainer.js +0 -1
  369. package/dist/workflows/methods/kinetic-launch.d.ts +62 -1
  370. package/dist/workflows/methods/kinetic-launch.js +0 -2
  371. package/dist/workflows/methods/product-image-story.d.ts +31 -0
  372. package/dist/workflows/methods/product-image-story.js +0 -1
  373. package/dist/workflows/methods/reference-remake.d.ts +31 -0
  374. package/dist/workflows/methods/reference-remake.js +0 -1
  375. package/dist/workflows/methods/shared.d.ts +31 -1
  376. package/dist/workflows/methods/shared.js +0 -3
  377. package/dist/workflows/methods/ugc-faq-answer.d.ts +31 -0
  378. package/dist/workflows/methods/ugc-faq-answer.js +0 -1
  379. package/dist/workflows/methods/ugc-product-intro.d.ts +31 -0
  380. package/dist/workflows/methods/ugc-product-intro.js +0 -1
  381. package/dist/workflows/methods/website-proof-demo.d.ts +62 -1
  382. package/dist/workflows/methods/website-proof-demo.js +0 -2
  383. package/dist/workflows/motion-director.d.ts +0 -11
  384. package/dist/workflows/motion-director.js +0 -11
  385. package/dist/workflows/product-references.js +0 -1
  386. package/dist/workflows/reference-remake.d.ts +114 -17
  387. package/dist/workflows/reference-remake.js +0 -167
  388. package/dist/workflows/remake-chooser.d.ts +0 -6
  389. package/dist/workflows/remake-chooser.js +0 -4
  390. package/dist/workflows/remake-motion.d.ts +0 -16
  391. package/dist/workflows/remake-motion.js +0 -19
  392. package/dist/workflows/validate.d.ts +0 -1
  393. package/dist/workflows/validate.js +0 -5
  394. package/dist/workflows.js +0 -1
  395. package/package.json +1 -1
  396. package/dist/account-actors.js.map +0 -1
  397. package/dist/account.js.map +0 -1
  398. package/dist/actor-bounds.js.map +0 -1
  399. package/dist/actor-qualities.js.map +0 -1
  400. package/dist/actors.js.map +0 -1
  401. package/dist/ad-guide.js.map +0 -1
  402. package/dist/ad-pause-trim.js.map +0 -1
  403. package/dist/api-failure.js.map +0 -1
  404. package/dist/aspect.js.map +0 -1
  405. package/dist/asset-identity.js.map +0 -1
  406. package/dist/assets.js.map +0 -1
  407. package/dist/billing-terms.js.map +0 -1
  408. package/dist/brand-styles.js.map +0 -1
  409. package/dist/broll-policy.js.map +0 -1
  410. package/dist/canvas-fit.js.map +0 -1
  411. package/dist/caption-funnel.js.map +0 -1
  412. package/dist/caption-geometry.js.map +0 -1
  413. package/dist/caption-language.js.map +0 -1
  414. package/dist/contract-dispositions.js.map +0 -1
  415. package/dist/contracts/v1/workflow-brief.js.map +0 -1
  416. package/dist/contracts/v1/workflow-catalog.js.map +0 -1
  417. package/dist/contracts/v1/workflow-client.js.map +0 -1
  418. package/dist/contracts/v1/workflow-dto.js.map +0 -1
  419. package/dist/contracts/v1/workflow-evidence.js.map +0 -1
  420. package/dist/contracts/v1/workflow-execution.js.map +0 -1
  421. package/dist/contracts/v1/workflow-next.js.map +0 -1
  422. package/dist/contracts/v1/workflow-plan.js.map +0 -1
  423. package/dist/contracts/v1/workflow-primitives.js.map +0 -1
  424. package/dist/contracts/v1/workflow-run-read.js.map +0 -1
  425. package/dist/creator-profile.js.map +0 -1
  426. package/dist/default-actor.js.map +0 -1
  427. package/dist/design.js.map +0 -1
  428. package/dist/edit-billing.js.map +0 -1
  429. package/dist/edit-candidate.js.map +0 -1
  430. package/dist/edit-document.js.map +0 -1
  431. package/dist/edit-faceless.js.map +0 -1
  432. package/dist/edit-long-form.js.map +0 -1
  433. package/dist/edit-operations.js.map +0 -1
  434. package/dist/edit-primitives.js.map +0 -1
  435. package/dist/edit-revision.js.map +0 -1
  436. package/dist/edit-rules.js.map +0 -1
  437. package/dist/edit-shots.js.map +0 -1
  438. package/dist/edit-validate.js.map +0 -1
  439. package/dist/edit.js.map +0 -1
  440. package/dist/endpoint-notes.js.map +0 -1
  441. package/dist/endpoints.js.map +0 -1
  442. package/dist/errors.js.map +0 -1
  443. package/dist/explainer-fit.js.map +0 -1
  444. package/dist/face-billing.js.map +0 -1
  445. package/dist/face-delivery.js.map +0 -1
  446. package/dist/faceless-action-shots.js.map +0 -1
  447. package/dist/faceless-customer-anchors.js.map +0 -1
  448. package/dist/faceless-cut-style.js.map +0 -1
  449. package/dist/faceless-direction-summary.js.map +0 -1
  450. package/dist/faceless-image-placement.js.map +0 -1
  451. package/dist/faceless-image-qualification.js.map +0 -1
  452. package/dist/faceless-media-record.js.map +0 -1
  453. package/dist/faceless-price.js.map +0 -1
  454. package/dist/faceless-public-plan.js.map +0 -1
  455. package/dist/faceless-public.js.map +0 -1
  456. package/dist/faceless-short-61.js.map +0 -1
  457. package/dist/faceless-storyboard-timing.js.map +0 -1
  458. package/dist/faceless-storyboard-v2-plan.js.map +0 -1
  459. package/dist/faceless-storyboard-v2-timing.js.map +0 -1
  460. package/dist/faceless-storyboard-v2.js.map +0 -1
  461. package/dist/faceless-storyboard.js.map +0 -1
  462. package/dist/faceless-voices.js.map +0 -1
  463. package/dist/feedback.js.map +0 -1
  464. package/dist/film-directions.js.map +0 -1
  465. package/dist/film-drafts.js.map +0 -1
  466. package/dist/film-guide.js.map +0 -1
  467. package/dist/film-styles.js.map +0 -1
  468. package/dist/generation-shot.js.map +0 -1
  469. package/dist/generations-output.js.map +0 -1
  470. package/dist/generations.js.map +0 -1
  471. package/dist/idempotency.js.map +0 -1
  472. package/dist/index.js.map +0 -1
  473. package/dist/live-shot-kinds.js.map +0 -1
  474. package/dist/long-form-pricing.js.map +0 -1
  475. package/dist/long-form-profile.js.map +0 -1
  476. package/dist/long-form-revision.js.map +0 -1
  477. package/dist/markdown-quote.js.map +0 -1
  478. package/dist/mascots.js.map +0 -1
  479. package/dist/max-credits.js.map +0 -1
  480. package/dist/mcp-ugc-descriptions.js.map +0 -1
  481. package/dist/media-timebase.js.map +0 -1
  482. package/dist/motion-styles.js.map +0 -1
  483. package/dist/moves.js.map +0 -1
  484. package/dist/music.js.map +0 -1
  485. package/dist/naming.js.map +0 -1
  486. package/dist/openapi.js.map +0 -1
  487. package/dist/output-provenance.js.map +0 -1
  488. package/dist/own-agent-price.js.map +0 -1
  489. package/dist/own-agent-runs.js.map +0 -1
  490. package/dist/pacing.js.map +0 -1
  491. package/dist/parts-pricing.js.map +0 -1
  492. package/dist/post-text.js.map +0 -1
  493. package/dist/presenter-beats.js.map +0 -1
  494. package/dist/presenter-matte.js.map +0 -1
  495. package/dist/presenter-takes.js.map +0 -1
  496. package/dist/prices.js.map +0 -1
  497. package/dist/public-endpoints.js.map +0 -1
  498. package/dist/public-responses.js.map +0 -1
  499. package/dist/rate-limit.js.map +0 -1
  500. package/dist/reference-analysis.js.map +0 -1
  501. package/dist/reference-display.js.map +0 -1
  502. package/dist/reference-kinds.js.map +0 -1
  503. package/dist/reference-lyrics.js.map +0 -1
  504. package/dist/reference-profile.js.map +0 -1
  505. package/dist/reference-staging.js.map +0 -1
  506. package/dist/reference-text-spans.js.map +0 -1
  507. package/dist/reference-voice-over.js.map +0 -1
  508. package/dist/reference-voice.js.map +0 -1
  509. package/dist/render-backend.js.map +0 -1
  510. package/dist/resolved-timeline.js.map +0 -1
  511. package/dist/run-media.js.map +0 -1
  512. package/dist/run-preflight.js.map +0 -1
  513. package/dist/run-static-warnings.js.map +0 -1
  514. package/dist/runs.js.map +0 -1
  515. package/dist/scene-bible.js.map +0 -1
  516. package/dist/scene-graph.js.map +0 -1
  517. package/dist/scene-place.js.map +0 -1
  518. package/dist/scene-proposal.js.map +0 -1
  519. package/dist/script-integrity.js.map +0 -1
  520. package/dist/script-voice.js.map +0 -1
  521. package/dist/semantic-inserts.js.map +0 -1
  522. package/dist/skill-theme-explainer.js.map +0 -1
  523. package/dist/skill-theme.js.map +0 -1
  524. package/dist/skills.js.map +0 -1
  525. package/dist/speech-rhythm-contract.js.map +0 -1
  526. package/dist/speech-rhythm.js.map +0 -1
  527. package/dist/templates/backdrop.js.map +0 -1
  528. package/dist/templates/callout.js.map +0 -1
  529. package/dist/templates/chart.js.map +0 -1
  530. package/dist/templates/chat-window.js.map +0 -1
  531. package/dist/templates/checklist.js.map +0 -1
  532. package/dist/templates/comment-cta.js.map +0 -1
  533. package/dist/templates/compare.js.map +0 -1
  534. package/dist/templates/cover-story.js.map +0 -1
  535. package/dist/templates/end-card.js.map +0 -1
  536. package/dist/templates/hand-title.js.map +0 -1
  537. package/dist/templates/index.js.map +0 -1
  538. package/dist/templates/lower-third.js.map +0 -1
  539. package/dist/templates/notification.js.map +0 -1
  540. package/dist/templates/phone-call.js.map +0 -1
  541. package/dist/templates/phone-screen.js.map +0 -1
  542. package/dist/templates/pointer-chips.js.map +0 -1
  543. package/dist/templates/progress.js.map +0 -1
  544. package/dist/templates/quote.js.map +0 -1
  545. package/dist/templates/race.js.map +0 -1
  546. package/dist/templates/rating.js.map +0 -1
  547. package/dist/templates/series-frame.js.map +0 -1
  548. package/dist/templates/size.js.map +0 -1
  549. package/dist/templates/slot.js.map +0 -1
  550. package/dist/templates/sounds.js.map +0 -1
  551. package/dist/templates/stat.js.map +0 -1
  552. package/dist/templates/tag.js.map +0 -1
  553. package/dist/templates/terminal.js.map +0 -1
  554. package/dist/templates/theme.js.map +0 -1
  555. package/dist/templates/title-card.js.map +0 -1
  556. package/dist/templates/video-grid.js.map +0 -1
  557. package/dist/templates/word-fill.js.map +0 -1
  558. package/dist/templates/word-title.js.map +0 -1
  559. package/dist/trend-niches.js.map +0 -1
  560. package/dist/trend-search.js.map +0 -1
  561. package/dist/tts-backend.js.map +0 -1
  562. package/dist/ugc-call.js.map +0 -1
  563. package/dist/ugc-delivery.js.map +0 -1
  564. package/dist/ugc-framing.js.map +0 -1
  565. package/dist/ugc-interview.js.map +0 -1
  566. package/dist/ugc-layers.js.map +0 -1
  567. package/dist/ugc-scenes.js.map +0 -1
  568. package/dist/ugc-video-media.js.map +0 -1
  569. package/dist/uploads.js.map +0 -1
  570. package/dist/vendor-response.js.map +0 -1
  571. package/dist/video-size.js.map +0 -1
  572. package/dist/voice-admission.js.map +0 -1
  573. package/dist/voice-catalog-data.js.map +0 -1
  574. package/dist/voice-catalog.js.map +0 -1
  575. package/dist/voice-listing.js.map +0 -1
  576. package/dist/voice-pace.js.map +0 -1
  577. package/dist/voice-preview-approval.js.map +0 -1
  578. package/dist/voices.js.map +0 -1
  579. package/dist/workflows/catalog.js.map +0 -1
  580. package/dist/workflows/film-directions.js.map +0 -1
  581. package/dist/workflows/index.js.map +0 -1
  582. package/dist/workflows/methods/faceless-explainer.js.map +0 -1
  583. package/dist/workflows/methods/kinetic-launch.js.map +0 -1
  584. package/dist/workflows/methods/product-image-story.js.map +0 -1
  585. package/dist/workflows/methods/reference-remake.js.map +0 -1
  586. package/dist/workflows/methods/shared.js.map +0 -1
  587. package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
  588. package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
  589. package/dist/workflows/methods/website-proof-demo.js.map +0 -1
  590. package/dist/workflows/motion-director.js.map +0 -1
  591. package/dist/workflows/product-references.js.map +0 -1
  592. package/dist/workflows/reference-remake.js.map +0 -1
  593. package/dist/workflows/remake-chooser.js.map +0 -1
  594. package/dist/workflows/remake-motion.js.map +0 -1
  595. package/dist/workflows/validate.js.map +0 -1
  596. package/dist/workflows.js.map +0 -1
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
- // Template sounds: one list of names per beat, with the default first in each.
2
+ import { editMusicBed } from "../edit-music.js";
3
3
  export const TEMPLATE_SOUND_BEATS = ["click", "toggle", "ring", "answer", "notify", "step", "whoosh", "flash", "pop", "hangup", "money", "edit"];
4
- /** Each beat's names, its default and where it plays; the composition bundles `<beat>__<name>.mp3` for each, and a test keeps the two equal. */
5
4
  export const TEMPLATE_SOUNDS = {
6
5
  click: { default: "click_mouse", names: ["click_mouse", "click_soft", "click_crisp", "click_light", "tick_soft", "click_sharp", "key"],
7
6
  plays: "a checklist's cursor clicks a row, on each click" },
@@ -26,7 +25,6 @@ export const TEMPLATE_SOUNDS = {
26
25
  plays: "with edit_sounds, each cut: to or from an insert, a full-frame template's cut without its own whoosh or flash, a layout window's in and out; " +
27
26
  "on make_faceless, every scene change; its peak lands on the cut" },
28
27
  };
29
- /** The beats each kind plays over the presenter; a full-frame template adds its transition's beat (see `templateSoundBeats`). */
30
28
  export const TEMPLATE_KIND_SOUNDS = {
31
29
  checklist: ["click", "toggle"], phone_call: ["ring", "answer", "hangup"], notification: ["notify"], progress: ["step"], rating: ["step"], compare: ["whoosh"],
32
30
  tag: ["pop"], callout: ["pop"], stat: ["money"],
@@ -39,24 +37,19 @@ const overrides = z.strictObject({ click: name("click"), toggle: name("toggle"),
39
37
  step: name("step"), whoosh: name("whoosh"), flash: name("flash"), pop: name("pop"), hangup: name("hangup"), money: name("money"), edit: name("edit") }, {
40
38
  error: issue => (issue.code === "unrecognized_keys" ? `template_sounds has no beat ${issue.keys.join(", ")}: the beats are ${TEMPLATE_SOUND_BEATS.join(", ")}` : undefined),
41
39
  });
42
- /** Why a value cannot be the field, with the beat's path; a union names no branch on its own, so the message does. */
43
40
  function soundsRefusal(input, schema = overrides) {
44
41
  if (input === null || typeof input !== "object" || Array.isArray(input))
45
42
  return "template_sounds is false (no sounds) or { beat: name }";
46
43
  const issue = schema.safeParse(input).error?.issues[0];
47
- // zod 4.6 may surface the unknown-beat issue past the union, so that message carries its own path.
48
44
  if (issue?.code === "unrecognized_keys")
49
45
  return issue.message;
50
46
  return `${["template_sounds", ...(issue?.path ?? []).map(String)].join(".")} ${issue?.message ?? "is invalid"}`;
51
47
  }
52
48
  export const templateSounds = z.union([z.literal(false), overrides], { error: issue => soundsRefusal(issue.input) })
53
49
  .describe("Template sounds: false for none, or { beat: name } over the defaults; list_template_sounds names them.");
54
- /** The slim MCP field, which keeps tools/list small: any beat and name pass here, and the server checks them strictly (S3 D3). */
55
50
  export const mcpTemplateSounds = z.union([z.literal(false), z.record(z.string(), z.string())]).describe(templateSounds.description);
56
- /** Opt-in, so a run that never asked keeps its silent cuts (rule 3); no default in the schema. */
57
51
  export const editSounds = z.boolean().describe("A short sound on every cut (insert, full-frame template, layout window, framing), its peak on the cut. " +
58
52
  "Needs one of those (inserts, templates, layout_windows, framing); template_sounds.edit picks it (list_template_sounds). Price unchanged.");
59
- /** Refusals of `edit_sounds` and `template_sounds.edit` that would otherwise be ignored: nothing to cut, a name without the switch, both on and muted. */
60
53
  export function editSoundRefusals(input) {
61
54
  const sounds = input.template_sounds;
62
55
  if (input.edit_sounds !== true) {
@@ -67,9 +60,7 @@ export function editSoundRefusals(input) {
67
60
  message: "edit_sounds sounds the cuts of inserts, full-frame templates, layout windows and framing: add one of them, or drop it" }] : []),
68
61
  ...(sounds === false ? [{ path: ["edit_sounds"], message: "edit_sounds plays a sound on each cut and template_sounds: false mutes every sound: drop one" }] : [])];
69
62
  }
70
- /** The beats a faceless video plays (#1067): a flash cut's, a light leak cut's and, with edit_sounds, the scene changes'. */
71
63
  export const FACELESS_SOUND_BEATS = ["flash", "whoosh", "edit"];
72
- /** The beat each faceless cut look sounds. */
73
64
  export const FACELESS_LOOK_SOUND = { flash: "flash", light_leak: "whoosh" };
74
65
  const facelessOverrides = z.strictObject({ flash: name("flash"), whoosh: name("whoosh"), edit: name("edit") }, {
75
66
  error: issue => (issue.code === "unrecognized_keys"
@@ -77,7 +68,6 @@ const facelessOverrides = z.strictObject({ flash: name("flash"), whoosh: name("w
77
68
  });
78
69
  export const facelessTemplateSounds = z.union([z.literal(false), facelessOverrides], { error: issue => soundsRefusal(issue.input, facelessOverrides) })
79
70
  .describe("Sounds: false for none, or { flash, whoosh, edit: name } over the defaults; list_template_sounds names them.");
80
- /** Refusals of faceless sound fields that would otherwise be ignored: a beat whose look or switch the run lacks, both on and muted. */
81
71
  export function facelessSoundRefusals(input) {
82
72
  const sounds = input.template_sounds, named = sounds !== null && typeof sounds === "object" ? sounds : {};
83
73
  const looks = Object.entries(FACELESS_LOOK_SOUND).filter(([look, beat]) => beat in named && look !== input.look);
@@ -88,18 +78,15 @@ export function facelessSoundRefusals(input) {
88
78
  ...(input.edit_sounds === true && sounds === false
89
79
  ? [{ path: ["edit_sounds"], message: "edit_sounds plays a sound on each cut and template_sounds: false mutes every sound: drop one" }] : [])];
90
80
  }
91
- /** A faceless run's sounds by name: both looks' beats, so a revision's new look sounds too, and edit with edit_sounds; none for `false`. */
92
81
  export function facelessSoundMap(input) {
93
82
  if (input.template_sounds === false)
94
83
  return {};
95
84
  const { flash, whoosh, edit } = { ...DEFAULT_TEMPLATE_SOUNDS, ...input.template_sounds };
96
85
  return { flash, whoosh, ...(input.edit_sounds ? { edit } : {}) };
97
86
  }
98
- /** A run's sounds: the defaults with its overrides, or none for `false` (S3c C2, C4). */
99
87
  export function templateSoundMap(sounds) {
100
88
  return sounds === false ? undefined : { ...DEFAULT_TEMPLATE_SOUNDS, ...sounds };
101
89
  }
102
- /** The beats one template plays: its kind's, and on a full frame its wipe or zoom (whoosh) or flash; money only with a currency sign around a stat. */
103
90
  export function templateSoundBeats(item) {
104
91
  const transition = item.placement !== "full" ? [] : item.transition === "wipe" || item.transition === "zoom" ? ["whoosh"]
105
92
  : item.transition === "flash" ? ["flash"] : [];
@@ -107,14 +94,13 @@ export function templateSoundBeats(item) {
107
94
  return [...new Set([...(TEMPLATE_KIND_SOUNDS[item.kind] ?? []).filter(beat => beat !== "money" || currency), ...transition])];
108
95
  }
109
96
  export const TEMPLATE_SOUNDS_PATH = "/v1/template-sounds";
110
- /** The catalog `GET /v1/template-sounds` and `list_template_sounds` return. */
111
97
  export const templateSoundsList = z.strictObject({
112
98
  beats: z.array(z.strictObject({ beat: z.enum(TEMPLATE_SOUND_BEATS), default: z.string().min(1), names: z.array(z.string().min(1)).min(1),
113
99
  plays: z.string().min(1) })),
100
+ music_beds: z.array(editMusicBed).default([]),
114
101
  contract_version: z.string().min(1),
115
102
  });
116
103
  export function listTemplateSounds() {
117
104
  return TEMPLATE_SOUND_BEATS.map(beat => ({ beat, default: TEMPLATE_SOUNDS[beat].default, names: [...TEMPLATE_SOUNDS[beat].names],
118
105
  plays: TEMPLATE_SOUNDS[beat].plays }));
119
106
  }
120
- //# sourceMappingURL=sounds.js.map
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
- /** The number at medium on a 1080 short side over the presenter; on a full frame it draws 1.6 times larger. */
4
3
  export declare const STAT_FONT_PX = 120;
5
- /** The drawn area is this many number sizes high: the number and its label; the composition reads the size back. */
6
4
  export declare const STAT_RECT_EMS = 1.9;
7
5
  declare const data: z.ZodObject<{
8
6
  value: z.ZodNumber;
@@ -15,6 +13,5 @@ declare const data: z.ZodObject<{
15
13
  small: "small";
16
14
  }>>;
17
15
  }, z.core.$strict>;
18
- /** A number that counts up from zero to `value`, with an optional prefix, suffix and label under it. */
19
16
  export declare const stat: TemplateKind<typeof data>;
20
17
  export {};
@@ -1,14 +1,11 @@
1
1
  import { z } from "zod";
2
2
  import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { sizedScale, templateSize } from "./size.js";
4
- /** The number at medium on a 1080 short side over the presenter; on a full frame it draws 1.6 times larger. */
5
4
  export const STAT_FONT_PX = 120;
6
5
  const FULL_SCALE = 1.6;
7
- /** The drawn area is this many number sizes high: the number and its label; the composition reads the size back. */
8
6
  export const STAT_RECT_EMS = 1.9;
9
7
  const data = z.object({ value: z.number().min(0).max(999_999_999).multipleOf(0.01), prefix: z.string().min(1).max(6).optional(),
10
8
  suffix: z.string().min(1).max(6).optional(), label: z.string().min(1).max(32).optional(), size: templateSize }).strict();
11
- /** A number that counts up from zero to `value`, with an optional prefix, suffix and label under it. */
12
9
  export const stat = {
13
10
  kind: "stat",
14
11
  kindVersion: 1,
@@ -24,10 +21,8 @@ export const stat = {
24
21
  const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, short = Math.min(w, h);
25
22
  const scale = sizedScale(value.size, canvas) * (placement === "full" ? FULL_SCALE : 1);
26
23
  const width = Math.round(Math.min(0.9 * w, 1.1 * short * Math.min(scale, 1))), height = Math.round(STAT_RECT_EMS * STAT_FONT_PX * scale);
27
- // Over the presenter it sits at chest level, as the reference's toggle card (62–80% of the height), off the face.
28
24
  const centre = placement === "full" ? 0.5 : 0.71;
29
25
  return { left: Math.round((w - width) / 2) / w, top: Math.round(centre * h - height / 2) / h, width: width / w, height: height / h };
30
26
  },
31
27
  sample: { value: 17, prefix: "$", suffix: "M", label: "raised this year" },
32
28
  };
33
- //# sourceMappingURL=stat.js.map
@@ -1,9 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
3
  export declare const TAG_POSITIONS: readonly ["top", "center", "bottom"];
4
- /** The pill's text at medium on a 1080 short side: the reference pill's cap height, about 3.5% of a 9:16 frame. */
5
4
  export declare const TAG_FONT_PX = 92;
6
- /** The footprint is this many font sizes high: the pill and its glow; the composition reads the font back from it. */
7
5
  export declare const TAG_RECT_EMS = 1.6;
8
6
  declare const data: z.ZodObject<{
9
7
  text: z.ZodString;
@@ -18,6 +16,5 @@ declare const data: z.ZodObject<{
18
16
  small: "small";
19
17
  }>>;
20
18
  }, z.core.$strict>;
21
- /** A short gradient pill over the presenter, centred on a caption line or in the caption spot; it may sit on insert frames. */
22
19
  export declare const tag: TemplateKind<typeof data>;
23
20
  export {};
@@ -2,14 +2,10 @@ import { z } from "zod";
2
2
  import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { sizedScale, templateSize } from "./size.js";
4
4
  export const TAG_POSITIONS = ["top", "center", "bottom"];
5
- /** Absent position is the reference's: two thirds down, at chest level, in the caption spot. */
6
5
  const CENTRES = { top: 0.22, center: 0.5, bottom: 0.78, caption: 0.66 };
7
- /** The pill's text at medium on a 1080 short side: the reference pill's cap height, about 3.5% of a 9:16 frame. */
8
6
  export const TAG_FONT_PX = 92;
9
- /** The footprint is this many font sizes high: the pill and its glow; the composition reads the font back from it. */
10
7
  export const TAG_RECT_EMS = 1.6;
11
8
  const data = z.object({ text: z.string().min(1).max(32), position: z.enum(TAG_POSITIONS).optional(), size: templateSize }).strict();
12
- /** A short gradient pill over the presenter, centred on a caption line or in the caption spot; it may sit on insert frames. */
13
9
  export const tag = {
14
10
  kind: "tag",
15
11
  kindVersion: 1,
@@ -28,4 +24,3 @@ export const tag = {
28
24
  },
29
25
  sample: { text: "sounds natural", position: "center" },
30
26
  };
31
- //# sourceMappingURL=tag.js.map
@@ -1,9 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
- /** The command's text at medium on a 1080 short side: its lowercase letters at least 36 px tall, as captions keep (#1128). */
4
3
  export declare const TERMINAL_FONT_PX = 74;
5
- /** Text sizes: the title bar, the command (up to three lines), the status line and the padding; a diff's line (#1119); the card's width is the
6
- * full frame's. */
7
4
  export declare const TERMINAL_EMS: {
8
5
  readonly bar: 1.6;
9
6
  readonly command: 3.9;
@@ -33,14 +30,11 @@ declare const data: z.ZodObject<{
33
30
  small: "small";
34
31
  }>>;
35
32
  }, z.core.$strict>;
36
- /** The card's height in text sizes: the command's three lines, the diff's lines under it, the status. */
37
33
  export declare const terminalEms: (value: {
38
34
  diff?: {
39
35
  lines: readonly unknown[];
40
36
  } | undefined;
41
37
  }) => number;
42
- /** A dark terminal card on a full frame: the command types in, a diff's lines change, then a checked status line shows, each on its beat. */
43
38
  export declare const terminal: TemplateKind<typeof data>;
44
- /** Version 1: a command only; its footprint is version 2's for the same data. */
45
39
  export declare const terminalV1: TemplateKind<typeof data>;
46
40
  export {};
@@ -1,10 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { centredArea, fullWidth, sizedScale, templateSize } from "./size.js";
4
- /** The command's text at medium on a 1080 short side: its lowercase letters at least 36 px tall, as captions keep (#1128). */
5
4
  export const TERMINAL_FONT_PX = 74;
6
- /** Text sizes: the title bar, the command (up to three lines), the status line and the padding; a diff's line (#1119); the card's width is the
7
- * full frame's. */
8
5
  export const TERMINAL_EMS = { bar: 1.6, command: 3.9, status: 1.7, pad: 0.6, line: 1.15 };
9
6
  export const TERMINAL_CHANGES = ["add", "del"];
10
7
  const line = z.object({ text: z.string().min(1).max(36), change: z.enum(TERMINAL_CHANGES).optional() }).strict();
@@ -15,10 +12,8 @@ const data = z.object({ title: z.string().min(1).max(24).optional(), command: z.
15
12
  context.addIssue({ code: z.ZodIssueCode.custom, path: ["diff", "lines"], message: "a diff marks at least one line add or del" });
16
13
  }
17
14
  });
18
- /** The card's height in text sizes: the command's three lines, the diff's lines under it, the status. */
19
15
  export const terminalEms = (value) => TERMINAL_EMS.bar + TERMINAL_EMS.command + TERMINAL_EMS.status +
20
16
  2 * TERMINAL_EMS.pad + (value.diff?.lines.length ?? 0) * TERMINAL_EMS.line;
21
- /** A dark terminal card on a full frame: the command types in, a diff's lines change, then a checked status line shows, each on its beat. */
22
17
  export const terminal = {
23
18
  kind: "terminal",
24
19
  kindVersion: 2,
@@ -28,7 +23,6 @@ export const terminal = {
28
23
  data,
29
24
  text: { title: 24, command: 100, "diff.lines.text": 36, status: 40 },
30
25
  quotes: ["diff.at", "at"],
31
- // The card is in by frame 6 and the command types for at least 4 frames before the status.
32
26
  beatsFrom: 10,
33
27
  slots: {},
34
28
  hidesCaptions: () => true,
@@ -41,6 +35,4 @@ export const terminal = {
41
35
  sample: { title: "Terminal", command: "git apply fix.patch", diff: { lines: [{ text: "const fps = 25" }, { text: "render(clip)", change: "del" },
42
36
  { text: "render(clip, { fps })", change: "add" }], at: "applies" }, status: "patch applied", at: "applied" },
43
37
  };
44
- /** Version 1: a command only; its footprint is version 2's for the same data. */
45
38
  export const terminalV1 = { ...terminal, kindVersion: 1 };
46
- //# sourceMappingURL=terminal.js.map
@@ -1,16 +1,11 @@
1
1
  import { z } from "zod";
2
- /** Looks the composition draws templates in (#778 S3, D8); presets are judged by eye on sheets, only a customer's colour is checked. */
3
2
  export declare const TEMPLATE_PRESETS: readonly ["clean_light", "bold_dark", "neon", "paper", "mono"];
4
3
  export type TemplatePreset = (typeof TEMPLATE_PRESETS)[number];
5
- /** The look of a run whose `template_theme` names none; the schema has no default (A8). */
6
4
  export declare const DEFAULT_TEMPLATE_PRESET: TemplatePreset;
7
- /** The colours an accent meets in each look: the text drawn on it, and the grounds it is drawn on as ink. The composition's themes
8
- * hold the same values; a test keeps them equal. */
9
5
  export declare const TEMPLATE_PRESET_SURFACES: Readonly<Record<TemplatePreset, {
10
6
  onAccent: string;
11
7
  grounds: readonly string[];
12
8
  }>>;
13
- /** Large text needs 3:1 (WCAG 1.4.3); every template text is large. */
14
9
  export declare const TEMPLATE_MIN_CONTRAST = 3;
15
10
  export declare const templateTheme: z.ZodObject<{
16
11
  preset: z.ZodOptional<z.ZodEnum<{
@@ -23,7 +18,5 @@ export declare const templateTheme: z.ZodObject<{
23
18
  accent: z.ZodOptional<z.ZodString>;
24
19
  }, z.core.$strict>;
25
20
  export type TemplateTheme = z.infer<typeof templateTheme>;
26
- /** The WCAG contrast ratio of two `#RRGGBB` colours. */
27
21
  export declare function contrastRatio(a: string, b: string): number;
28
- /** Why a customer accent cannot be drawn in a look, or nothing: it is refused, never shifted (D8). */
29
22
  export declare function templateAccentRefusal(preset: TemplatePreset, accent: string): string | undefined;
@@ -1,10 +1,6 @@
1
1
  import { z } from "zod";
2
- /** Looks the composition draws templates in (#778 S3, D8); presets are judged by eye on sheets, only a customer's colour is checked. */
3
2
  export const TEMPLATE_PRESETS = ["clean_light", "bold_dark", "neon", "paper", "mono"];
4
- /** The look of a run whose `template_theme` names none; the schema has no default (A8). */
5
3
  export const DEFAULT_TEMPLATE_PRESET = "clean_light";
6
- /** The colours an accent meets in each look: the text drawn on it, and the grounds it is drawn on as ink. The composition's themes
7
- * hold the same values; a test keeps them equal. */
8
4
  export const TEMPLATE_PRESET_SURFACES = {
9
5
  clean_light: { onAccent: "#FFFFFF", grounds: ["#FFFFFF", "#EAF1FC", "#D9E7FB"] },
10
6
  bold_dark: { onAccent: "#0B0F19", grounds: ["#1F2937", "#0B0F17", "#1C222C"] },
@@ -12,7 +8,6 @@ export const TEMPLATE_PRESET_SURFACES = {
12
8
  paper: { onAccent: "#FFFFFF", grounds: ["#FDF8EF", "#F6EFE3", "#EADCC8"] },
13
9
  mono: { onAccent: "#FFFFFF", grounds: ["#FFFFFF", "#F4F4F4", "#E2E2E2"] },
14
10
  };
15
- /** Large text needs 3:1 (WCAG 1.4.3); every template text is large. */
16
11
  export const TEMPLATE_MIN_CONTRAST = 3;
17
12
  export const templateTheme = z.object({
18
13
  preset: z.enum(TEMPLATE_PRESETS).optional().describe("clean_light (light cards on our blue gradient), bold_dark (dark cards, a yellow accent), neon (black, " +
@@ -25,12 +20,10 @@ const luminance = (hex) => {
25
20
  .map(channel => (channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4));
26
21
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
27
22
  };
28
- /** The WCAG contrast ratio of two `#RRGGBB` colours. */
29
23
  export function contrastRatio(a, b) {
30
24
  const [light, dark] = [luminance(a), luminance(b)].sort((x, y) => y - x);
31
25
  return (light + 0.05) / (dark + 0.05);
32
26
  }
33
- /** Why a customer accent cannot be drawn in a look, or nothing: it is refused, never shifted (D8). */
34
27
  export function templateAccentRefusal(preset, accent) {
35
28
  const { onAccent, grounds } = TEMPLATE_PRESET_SURFACES[preset];
36
29
  const worst = [{ against: onAccent, role: `the ${onAccent} text drawn on it` },
@@ -38,10 +31,8 @@ export function templateAccentRefusal(preset, accent) {
38
31
  .map(entry => ({ ...entry, ratio: contrastRatio(accent, entry.against) })).sort((a, b) => a.ratio - b.ratio)[0];
39
32
  if (worst.ratio >= TEMPLATE_MIN_CONTRAST)
40
33
  return undefined;
41
- // Towards the nearest luminance that clears them all: in neon the white text and the dark grounds sit on opposite sides of it.
42
34
  const own = luminance(accent), levels = [onAccent, ...grounds].map(luminance);
43
35
  const nearest = Array.from({ length: 1001 }, (_, step) => step / 1000).filter(level => levels.every(other => (Math.max(level, other) + 0.05) / (Math.min(level, other) + 0.05) >= TEMPLATE_MIN_CONTRAST)).sort((a, b) => Math.abs(a - own) - Math.abs(b - own))[0];
44
36
  return `${accent} reaches ${worst.ratio.toFixed(2)}:1 against ${worst.role} in ${preset}, under the ${TEMPLATE_MIN_CONTRAST}:1 large text needs: ` +
45
37
  (nearest === undefined ? "pick another preset" : `pick a ${nearest < own ? "darker" : "lighter"} accent or another preset`);
46
38
  }
47
- //# sourceMappingURL=theme.js.map
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
- /** The title at medium on a 1080 short side, as reference frames 1–2 draw the brand on the card. */
4
3
  export declare const TITLE_CARD_FONT_PX = 96;
5
- /** The drawn area is this many title sizes high: the card with two title lines, the gap and the chip; the composition reads the size back. */
6
4
  export declare const TITLE_CARD_RECT_EMS = 5;
7
5
  declare const data: z.ZodObject<{
8
6
  title: z.ZodString;
@@ -16,6 +14,5 @@ declare const data: z.ZodObject<{
16
14
  small: "small";
17
15
  }>>;
18
16
  }, z.core.$strict>;
19
- /** The hook card of reference frames 1–2: the title on a white card beside an optional logo, a gradient chip under it, on a full frame. */
20
17
  export declare const titleCard: TemplateKind<typeof data>;
21
18
  export {};
@@ -2,13 +2,10 @@ import { z } from "zod";
2
2
  import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { sizedScale, templateSize } from "./size.js";
4
4
  import { templateMedia } from "./slot.js";
5
- /** The title at medium on a 1080 short side, as reference frames 1–2 draw the brand on the card. */
6
5
  export const TITLE_CARD_FONT_PX = 96;
7
- /** The drawn area is this many title sizes high: the card with two title lines, the gap and the chip; the composition reads the size back. */
8
6
  export const TITLE_CARD_RECT_EMS = 5;
9
7
  const data = z.object({ title: z.string().min(1).max(48), chip: z.string().min(1).max(32).optional(), logo: templateMedia.optional(),
10
8
  size: templateSize }).strict();
11
- /** The hook card of reference frames 1–2: the title on a white card beside an optional logo, a gradient chip under it, on a full frame. */
12
9
  export const titleCard = {
13
10
  kind: "title_card",
14
11
  kindVersion: 1,
@@ -21,10 +18,8 @@ export const titleCard = {
21
18
  onInserts: false,
22
19
  rect: (value, aspectRatio) => {
23
20
  const canvas = frameCanvasOf(aspectRatio), { width: w, height: h } = canvas, scale = sizedScale(value.size, canvas);
24
- // The reference card is 89% of a 1080 width; the drawn area adds a 3% margin on each side.
25
21
  const width = Math.round(Math.min(0.95 * w, 1022 * scale)), height = Math.round(TITLE_CARD_RECT_EMS * TITLE_CARD_FONT_PX * scale);
26
22
  return { left: Math.round((w - width) / 2) / w, top: Math.round((h > w ? 0.38 : 0.5) * h - height / 2) / h, width: width / w, height: height / h };
27
23
  },
28
24
  sample: { title: "fonio.ai", chip: "raised $17 million" },
29
25
  };
30
- //# sourceMappingURL=title-card.js.map
@@ -1,10 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
3
  export declare const VIDEO_GRID_LAYOUTS: readonly ["2x2", "3x1"];
4
- /** A cell is a 9:16 tile; the title above the grid at medium on a 1080 short side. */
5
4
  export declare const VIDEO_GRID_CELL_SHAPE: number;
6
5
  export declare const VIDEO_GRID_FONT_PX = 84;
7
- /** The title's band in title sizes; the gap and the raised left column's offset in tile widths, as the reference's 2×2 collage. */
8
6
  export declare const VIDEO_GRID_EMS: {
9
7
  readonly title: 1.5;
10
8
  readonly gap: 0.03;
@@ -35,18 +33,15 @@ declare const data: z.ZodObject<{
35
33
  }>>;
36
34
  }, z.core.$strict>;
37
35
  type Data = z.infer<typeof data>;
38
- /** The layout drawn: the one named, else 2x2 for four cells and 3x1 for three. */
39
36
  export declare const videoGridLayout: (value: {
40
37
  layout?: Data["layout"];
41
38
  cell_4?: unknown;
42
39
  } & Record<string, unknown>) => NonNullable<Data["layout"]>;
43
- /** The grid's shape in tile widths: its width and its height, the stagger of the raised column included. */
44
40
  export declare function videoGridShape(layout: Data["layout"]): {
45
41
  columns: number;
46
42
  rows: number;
47
43
  width: number;
48
44
  height: number;
49
45
  };
50
- /** 2×2 or 3×1 tiles of the account's clips on a full frame, each popping in after the one before, with an optional title above. */
51
46
  export declare const videoGrid: TemplateKind<typeof data>;
52
47
  export {};
@@ -3,10 +3,8 @@ import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { centredArea, fillingStep, fullWidth, sizedScale, templateSize } from "./size.js";
4
4
  import { templateMedia } from "./slot.js";
5
5
  export const VIDEO_GRID_LAYOUTS = ["2x2", "3x1"];
6
- /** A cell is a 9:16 tile; the title above the grid at medium on a 1080 short side. */
7
6
  export const VIDEO_GRID_CELL_SHAPE = 9 / 16;
8
7
  export const VIDEO_GRID_FONT_PX = 84;
9
- /** The title's band in title sizes; the gap and the raised left column's offset in tile widths, as the reference's 2×2 collage. */
10
8
  export const VIDEO_GRID_EMS = { title: 1.5, gap: 0.03, offset: 0.08 };
11
9
  const data = z.object({ layout: z.enum(VIDEO_GRID_LAYOUTS).optional(), cell_1: templateMedia, cell_2: templateMedia, cell_3: templateMedia,
12
10
  cell_4: templateMedia.optional(), title: z.string().min(1).max(40).optional(), size: templateSize }).strict().superRefine((value, context) => {
@@ -15,14 +13,11 @@ const data = z.object({ layout: z.enum(VIDEO_GRID_LAYOUTS).optional(), cell_1: t
15
13
  context.addIssue({ code: z.ZodIssueCode.custom, path: ["cell_4"], message: four ? "a 2x2 grid takes four cells: give cell_4" : "a 3x1 grid takes three cells: leave out cell_4" });
16
14
  }
17
15
  });
18
- /** The layout drawn: the one named, else 2x2 for four cells and 3x1 for three. */
19
16
  export const videoGridLayout = (value) => value.layout ?? (value.cell_4 === undefined ? "3x1" : "2x2");
20
- /** The grid's shape in tile widths: its width and its height, the stagger of the raised column included. */
21
17
  export function videoGridShape(layout) {
22
18
  const columns = layout === "3x1" ? 3 : 2, rows = layout === "3x1" ? 1 : 2, gap = VIDEO_GRID_EMS.gap;
23
19
  return { columns, rows, width: columns + (columns - 1) * gap, height: rows / VIDEO_GRID_CELL_SHAPE + (rows - 1) * gap + (rows > 1 ? VIDEO_GRID_EMS.offset : 0) };
24
20
  }
25
- /** 2×2 or 3×1 tiles of the account's clips on a full frame, each popping in after the one before, with an optional title above. */
26
21
  export const videoGrid = {
27
22
  kind: "video_grid",
28
23
  kindVersion: 1,
@@ -39,12 +34,9 @@ export const videoGrid = {
39
34
  rect: (value, aspectRatio) => {
40
35
  const layout = videoGridLayout(value), canvas = frameCanvasOf(aspectRatio), shape = videoGridShape(layout), step = fillingStep(value.size);
41
36
  const title = VIDEO_GRID_EMS.title * VIDEO_GRID_FONT_PX * sizedScale("medium", canvas);
42
- // A tile's width at medium: the full frame's width over the grid's, or whatever keeps the grid and its title inside 95% of the frame's
43
- // height (#1128); the size then scales the grid and its title together.
44
37
  const tile = Math.min(fullWidth("medium", canvas) / shape.width, (0.95 * canvas.height - title) / shape.height);
45
38
  return centredArea(canvas, step * shape.width * tile, step * (shape.height * tile + title));
46
39
  },
47
40
  sample: { cell_1: { asset_id: `ast_${"1".repeat(32)}` }, cell_2: { asset_id: `ast_${"2".repeat(32)}` }, cell_3: { asset_id: `ast_${"3".repeat(32)}` },
48
41
  cell_4: { asset_id: `ast_${"4".repeat(32)}` }, title: "ten ads, three languages" },
49
42
  };
50
- //# sourceMappingURL=video-grid.js.map
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
- /** The word's size at medium on a 1080 short side; a long word shrinks to the area's width. */
4
3
  export declare const WORD_FILL_FONT_PX = 300;
5
- /** The area's height in word sizes: one line of letters stretched up, with room for their rim. */
6
4
  export declare const WORD_FILL_EMS: {
7
5
  readonly height: 1.8;
8
6
  };
@@ -17,6 +15,5 @@ declare const data: z.ZodObject<{
17
15
  small: "small";
18
16
  }>>;
19
17
  }, z.core.$strict>;
20
- /** One huge word on a full frame whose letters are windows onto the account's clip (#1175 S5 C2). */
21
18
  export declare const wordFill: TemplateKind<typeof data>;
22
19
  export {};
@@ -2,13 +2,10 @@ import { z } from "zod";
2
2
  import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { centredArea, fullWidth, sizedScale, templateSize } from "./size.js";
4
4
  import { templateMedia } from "./slot.js";
5
- /** The word's size at medium on a 1080 short side; a long word shrinks to the area's width. */
6
5
  export const WORD_FILL_FONT_PX = 300;
7
- /** The area's height in word sizes: one line of letters stretched up, with room for their rim. */
8
6
  export const WORD_FILL_EMS = { height: 1.8 };
9
7
  const data = z.object({ word: z.string().min(1).max(10).regex(/^\S+$/u, "word is one word, without spaces"), clip: templateMedia, size: templateSize })
10
8
  .strict();
11
- /** One huge word on a full frame whose letters are windows onto the account's clip (#1175 S5 C2). */
12
9
  export const wordFill = {
13
10
  kind: "word_fill",
14
11
  kindVersion: 1,
@@ -26,4 +23,3 @@ export const wordFill = {
26
23
  },
27
24
  sample: { word: "FOCUS", clip: { asset_id: `ast_${"5".repeat(32)}` } },
28
25
  };
29
- //# sourceMappingURL=word-fill.js.map
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import type { TemplateKind } from "./index.js";
3
3
  export declare const WORD_TITLE_REVEALS: readonly ["replace", "build"];
4
- /** A word at medium on a 1080 short side; the area is this many sizes high: three lines of a built title. */
5
4
  export declare const WORD_TITLE_FONT_PX = 150;
6
5
  export declare const WORD_TITLE_RECT_EMS = 3.8;
7
6
  declare const data: z.ZodObject<{
@@ -19,6 +18,5 @@ declare const data: z.ZodObject<{
19
18
  small: "small";
20
19
  }>>;
21
20
  }, z.core.$strict>;
22
- /** A kinetic title on a full frame: each entry shows on its beat, replacing the one before or building the line. */
23
21
  export declare const wordTitle: TemplateKind<typeof data>;
24
22
  export {};
@@ -2,12 +2,10 @@ import { z } from "zod";
2
2
  import { frameCanvasOf } from "../ugc-layers.js";
3
3
  import { centredArea, sizedScale, templateSize } from "./size.js";
4
4
  export const WORD_TITLE_REVEALS = ["replace", "build"];
5
- /** A word at medium on a 1080 short side; the area is this many sizes high: three lines of a built title. */
6
5
  export const WORD_TITLE_FONT_PX = 150;
7
6
  export const WORD_TITLE_RECT_EMS = 3.8;
8
7
  const word = z.object({ text: z.string().min(1).max(16), at: z.string().min(1).max(200).optional() }).strict();
9
8
  const data = z.object({ words: z.array(word).min(1).max(8), reveal: z.enum(WORD_TITLE_REVEALS).optional(), size: templateSize }).strict();
10
- /** A kinetic title on a full frame: each entry shows on its beat, replacing the one before or building the line. */
11
9
  export const wordTitle = {
12
10
  kind: "word_title",
13
11
  kindVersion: 1,
@@ -18,7 +16,6 @@ export const wordTitle = {
18
16
  text: { "words.text": 16 },
19
17
  quotes: ["words.at"],
20
18
  spreads: "words",
21
- // The title has no enter of its own: its first entry shows from the first frame, so the frame is never bare (#1129).
22
19
  beatsFrom: 0,
23
20
  firstBeatAtStart: true,
24
21
  slots: {},
@@ -30,4 +27,3 @@ export const wordTitle = {
30
27
  },
31
28
  sample: { words: [{ text: "in", at: "in" }, { text: "under", at: "under" }, { text: "a", at: "a" }, { text: "minute", at: "minute" }] },
32
29
  };
33
- //# sourceMappingURL=word-title.js.map
@@ -1,7 +1,5 @@
1
1
  import { z } from "zod";
2
2
  import { type FindTrendsRequest, type TrendReel } from "./trend-search.js";
3
- /** Saved niches (#1201): up to three topics an account keeps, the first its primary. A trend search that names no keywords searches */
4
- /** the primary one. Saving and reading them is free. */
5
3
  export declare const TREND_NICHES_PATH = "/v1/trend-niches";
6
4
  export declare const TREND_NICHES_MAX = 3;
7
5
  export declare const trendNicheInput: z.ZodObject<{
@@ -14,7 +12,6 @@ export declare const trendNicheInput: z.ZodObject<{
14
12
  language: z.ZodOptional<z.ZodString>;
15
13
  }, z.core.$strict>;
16
14
  export type TrendNicheInput = z.input<typeof trendNicheInput>;
17
- /** Two niches are the same when a search of either would be the same query, the window aside. */
18
15
  export declare const trendNicheKey: (niche: {
19
16
  keywords: string;
20
17
  platform: string;
@@ -59,7 +56,6 @@ export declare const trendNiches: z.ZodObject<{
59
56
  updated_at: z.ZodNullable<z.ZodString>;
60
57
  }, z.core.$strict>;
61
58
  export type TrendNiches = z.infer<typeof trendNiches>;
62
- /** What a client reads: a platform or field a newer server adds must not break an installed client. */
63
59
  export declare const trendNichesRead: z.ZodObject<{
64
60
  niches: z.ZodArray<z.ZodObject<{
65
61
  keywords: z.ZodString;
@@ -71,8 +67,6 @@ export declare const trendNichesRead: z.ZodObject<{
71
67
  updated_at: z.ZodNullable<z.ZodString>;
72
68
  }, z.core.$strip>;
73
69
  export type TrendNichesRead = z.infer<typeof trendNichesRead>;
74
- /** What a trend search or its quote takes from a client: no defaults here, so the server tells an unnamed field from a named one */
75
- /** and fills it from the primary niche when keywords are absent. */
76
70
  export declare const findTrendsInput: z.ZodObject<{
77
71
  keywords: z.ZodOptional<z.ZodString>;
78
72
  platform: z.ZodOptional<z.ZodEnum<{
@@ -88,7 +82,6 @@ export declare const findTrendsInput: z.ZodObject<{
88
82
  }, z.core.$strict>;
89
83
  export type FindTrendsInput = z.input<typeof findTrendsInput>;
90
84
  export declare const TREND_PAGE_FIELDS_MESSAGE = "search_id and page go together, and with them nothing else: the page keeps its search's words, platform, language and window";
91
- /** A next page's target (#1393) when the input names one: both its fields and none of a search's; `null` when it names neither. */
92
85
  export declare function trendPageTarget(input: z.infer<typeof findTrendsInput>): {
93
86
  ok: true;
94
87
  target: {
@@ -100,8 +93,6 @@ export declare function trendPageTarget(input: z.infer<typeof findTrendsInput>):
100
93
  message: string;
101
94
  };
102
95
  export declare const TREND_NICHE_REQUIRED_MESSAGE = "keywords is required: pass the topic, or save a niche with trend_niches first";
103
- /** The request a search runs: as asked when it names keywords; else the primary niche's words, and its platform and language where the */
104
- /** request names none. `null` niche and no keywords: refused before anything is held. */
105
96
  export declare function resolveFindTrends(input: z.infer<typeof findTrendsInput>, primary: Pick<TrendNiche, "keywords" | "platform" | "language"> | null): {
106
97
  ok: true;
107
98
  request: FindTrendsRequest;
@@ -110,9 +101,7 @@ export declare function resolveFindTrends(input: z.infer<typeof findTrendsInput>
110
101
  ok: false;
111
102
  message: string;
112
103
  };
113
- /** The weekly digest (#1201): each saved niche is checked once a week for reels of the last week; the digest shows what took off, free. */
114
104
  export declare const TREND_NICHE_REFRESH_DAYS = 7;
115
105
  export declare const TREND_DIGEST_REELS = 5;
116
- /** The digest's reels: those of a refresh that took off, by the creator's median or a take-off now, in the search's own order. */
117
106
  export declare const digestReels: <R extends Pick<TrendReel, "top" | "takeoff">>(reels: readonly R[]) => R[];
118
107
  export declare const TREND_NICHES_DESCRIPTION: string;
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { findTrendsRequest, TREND_FREE_PAGES_PER_DAY, TREND_PAGE_PAID_CREDITS, TREND_PAGE_WINDOW_SECONDS, TREND_PLATFORMS, TREND_SEARCH_DEFAULT_DAYS, TREND_SEARCH_MAX_DAYS, TREND_SEARCH_MAX_PAGES, TREND_SEARCH_MIN_DAYS, trendPage, trendSearchId, } from "./trend-search.js";
3
3
  import { maxCreditsField } from "./max-credits.js";
4
- /** Saved niches (#1201): up to three topics an account keeps, the first its primary. A trend search that names no keywords searches */
5
- /** the primary one. Saving and reading them is free. */
6
4
  export const TREND_NICHES_PATH = "/v1/trend-niches";
7
5
  export const TREND_NICHES_MAX = 3;
8
6
  const keywords = findTrendsRequest.shape.keywords;
@@ -12,9 +10,7 @@ export const trendNicheInput = z.strictObject({
12
10
  platform: z.enum(TREND_PLATFORMS).default("mix").describe("mix (default): TikTok and Instagram together; or one of them."),
13
11
  language: language.optional().describe("ISO 639-1; filters TikTok only."),
14
12
  });
15
- /** The words as a search compares them: lower case, single spaces. */
16
13
  const wordsOf = (value) => value.trim().toLowerCase().replace(/\s+/g, " ");
17
- /** Two niches are the same when a search of either would be the same query, the window aside. */
18
14
  export const trendNicheKey = (niche) => `${niche.platform}:${niche.language ?? "*"}:${wordsOf(niche.keywords)}`;
19
15
  export const TREND_NICHE_REPEATED_MESSAGE = "the same niche is in the list twice: the words, platform and language of each must differ";
20
16
  export const trendNichesInput = z.strictObject({
@@ -32,14 +28,11 @@ export const trendNiches = z.strictObject({
32
28
  max_niches: z.number().int().positive(),
33
29
  updated_at: z.string().datetime().nullable().describe("When the list was last saved; null when it never was."),
34
30
  });
35
- /** What a client reads: a platform or field a newer server adds must not break an installed client. */
36
31
  export const trendNichesRead = z.object({
37
32
  niches: z.array(z.object({ keywords: z.string(), platform: z.string(), language: z.string().nullable(), primary: z.boolean() })),
38
33
  max_niches: z.number().int(),
39
34
  updated_at: z.string().nullable(),
40
35
  });
41
- /** What a trend search or its quote takes from a client: no defaults here, so the server tells an unnamed field from a named one */
42
- /** and fills it from the primary niche when keywords are absent. */
43
36
  export const findTrendsInput = z.strictObject({
44
37
  keywords: keywords.optional().describe("The topic in a few words; absent: the primary saved niche (trend_niches) with its platform and language."),
45
38
  platform: z.enum(TREND_PLATFORMS).optional().describe("mix (default): TikTok and Instagram ranked together; or one of them."),
@@ -54,22 +47,17 @@ export const findTrendsInput = z.strictObject({
54
47
  max_credits: maxCreditsField,
55
48
  });
56
49
  export const TREND_PAGE_FIELDS_MESSAGE = "search_id and page go together, and with them nothing else: the page keeps its search's words, platform, language and window";
57
- /** A next page's target (#1393) when the input names one: both its fields and none of a search's; `null` when it names neither. */
58
50
  export function trendPageTarget(input) {
59
51
  const { search_id: searchId, page, ...search } = input;
60
52
  if (searchId === undefined && page === undefined)
61
53
  return { ok: true, target: null };
62
- // The ceiling is the call's own term, not a search field: a page takes it too.
63
54
  if (searchId === undefined || page === undefined || Object.entries(search).some(([key, value]) => key !== "max_credits" && value !== undefined)) {
64
55
  return { ok: false, message: TREND_PAGE_FIELDS_MESSAGE };
65
56
  }
66
57
  return { ok: true, target: { searchId, page } };
67
58
  }
68
59
  export const TREND_NICHE_REQUIRED_MESSAGE = "keywords is required: pass the topic, or save a niche with trend_niches first";
69
- /** The request a search runs: as asked when it names keywords; else the primary niche's words, and its platform and language where the */
70
- /** request names none. `null` niche and no keywords: refused before anything is held. */
71
60
  export function resolveFindTrends(input, primary) {
72
- // A page's fields never start a search: `trendPageTarget` reads them first.
73
61
  if (input.search_id !== undefined || input.page !== undefined)
74
62
  return { ok: false, message: TREND_PAGE_FIELDS_MESSAGE };
75
63
  const named = Object.fromEntries(Object.entries(input).filter(([key, value]) => key !== "max_credits" && value !== undefined));
@@ -79,16 +67,12 @@ export function resolveFindTrends(input, primary) {
79
67
  const language = fromNiche ? input.language ?? primary.language ?? undefined : input.language;
80
68
  const parsed = findTrendsRequest.safeParse(fromNiche ? { ...named, keywords: primary.keywords, platform: input.platform ?? primary.platform,
81
69
  ...(language === undefined ? {} : { language }) } : named);
82
- // A niche saved under an older rule that no longer parses asks for keywords, as no niche does.
83
70
  if (!parsed.success)
84
71
  return { ok: false, message: fromNiche ? TREND_NICHE_REQUIRED_MESSAGE : parsed.error.issues[0]?.message ?? "invalid request" };
85
72
  return { ok: true, request: parsed.data, fromNiche };
86
73
  }
87
- /** The weekly digest (#1201): each saved niche is checked once a week for reels of the last week; the digest shows what took off, free. */
88
74
  export const TREND_NICHE_REFRESH_DAYS = 7;
89
75
  export const TREND_DIGEST_REELS = 5;
90
- /** The digest's reels: those of a refresh that took off, by the creator's median or a take-off now, in the search's own order. */
91
76
  export const digestReels = (reels) => reels.filter((reel) => reel.top || reel.takeoff !== null).slice(0, TREND_DIGEST_REELS);
92
77
  export const TREND_NICHES_DESCRIPTION = "Free. With no niches: the account's saved niches, the first the primary. niches: save the user's confirmed list " +
93
78
  `(at most ${TREND_NICHES_MAX}, it replaces the saved one; [] clears it). find_trends and quote_trends with no keywords search the primary niche.`;
94
- //# sourceMappingURL=trend-niches.js.map