@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,13 +1,10 @@
1
1
  import { z } from "zod";
2
2
  import { CAPTION_EDGES, captionEdgeAt } from "./caption-geometry.js";
3
3
  import { faceZone, overlayRect } from "./ugc-layers.js";
4
- // Free placement of a layer (#973 S1): a box on the frame, on the presenter's face, or next to the face or another layer. A placed layer is pinned.
5
4
  export const PLACE_FITS = ["contain", "cover"];
6
5
  export const PLACE_SIDES = ["below", "above", "left", "right", "over"];
7
6
  export const PLACE_ALIGNS = ["start", "center", "end"];
8
- /** The gap next to an anchor when none is given, as a share of the frame height. */
9
7
  export const PLACE_DEFAULT_GAP = 0.01;
10
- /** A rect in face units: origin the face centre, unit the face height in pixels, so x and y share one scale. */
11
8
  const faceUnits = z.number().min(-20).max(20);
12
9
  export const faceUnitsRect = z.strictObject({ left: faceUnits, top: faceUnits, width: z.number().positive().max(20), height: z.number().positive().max(20) });
13
10
  const share = z.number().min(-0.5).max(1.5);
@@ -17,12 +14,10 @@ const options = {
17
14
  fit: z.enum(PLACE_FITS).optional().describe("contain (default): the whole picture inside the box, centred; cover: it fills the box, cut to fit."),
18
15
  allow_face: z.literal(true).optional().describe("Cover the presenter's face on purpose; without it a box on the face is refused."),
19
16
  };
20
- /** The place's forms, one text for every layer that takes a place (#1327): the MCP descriptions and the refusal of a wrong shape say it. */
21
17
  export const PLACE_FORMS = "{relative_to:\"frame\",rect:{left,top,width,height}} in frame shares (relative_to may be omitted); " +
22
18
  "{relative_to:\"face\",rect} with origin the face centre and unit the face height; or {relative_to:\"face\"|\"captions\"|{layer:id}," +
23
19
  "side:below|above|left|right|over,width|height,size_unit?:frame|face,gap?,align?}; fit?:contain|cover; allow_face?:true. " +
24
20
  "Example: {\"rect\":{\"left\":0.1,\"top\":0.62,\"width\":0.8,\"height\":0.1}}.";
25
- /** A rect with no `relative_to` is on the frame: nothing else could mean it (#1327). */
26
21
  export const placeFrame = z.strictObject({ relative_to: z.literal("frame").default("frame"),
27
22
  rect: z.strictObject({ left: share, top: share, width: span, height: span }).describe("In shares of the frame's width and height."), ...options });
28
23
  export const placeFace = z.strictObject({ relative_to: z.literal("face"),
@@ -38,15 +33,10 @@ export const placeNextTo = z.strictObject({
38
33
  size_unit: z.enum(["frame", "face"]).optional().describe("frame (default): shares of the frame's width and height; face: face heights."),
39
34
  ...options,
40
35
  }).refine(item => item.width !== undefined || item.height !== undefined, { message: "pass width, height or both", path: ["width"] });
41
- /** Where an overlay is drawn instead of a preset position; no rule moves it. */
42
36
  export const place = z.union([placeFrame, placeFace, placeNextTo], { error: `place takes ${PLACE_FORMS}` });
43
- /** The layer a place is next to, or undefined. */
44
37
  export const placeAnchorOf = (item) => "side" in item && typeof item.relative_to === "object" ? item.relative_to.layer : undefined;
45
- /** Whether a place reads the presenter's face. */
46
38
  export const placeReadsFace = (item) => item.relative_to === "face";
47
- /** Whether a place stands next to the captions, so it follows the page drawn and never moves them. */
48
39
  export const placeByCaptions = (item) => item !== undefined && "side" in item && item.relative_to === "captions";
49
- /** The box a place resolves to, in shares of the frame; it may reach past the frame, which the rails judge. */
50
40
  export function resolvePlace(item, ctx) {
51
41
  const { width: W, height: H } = ctx.canvas, face = ctx.face;
52
42
  const unitW = (face.height * H) / W;
@@ -75,13 +65,11 @@ export function resolvePlace(item, ctx) {
75
65
  case "over": return { left: anchor.left + (anchor.width - width) / 2, top: anchor.top + (anchor.height - height) / 2, width, height };
76
66
  }
77
67
  }
78
- /** The box kept whole inside the frame (#1161): shrunk about its centre to fit, keeping its shape, then moved in from any edge it crosses. */
79
68
  export function insideFrame(box) {
80
69
  const scale = Math.min(1, 1 / box.width, 1 / box.height), width = box.width * scale, height = box.height * scale;
81
70
  const left = Math.min(1 - width, Math.max(0, box.left + (box.width - width) / 2)), top = Math.min(1 - height, Math.max(0, box.top + (box.height - height) / 2));
82
71
  return { left, top, width, height };
83
72
  }
84
- /** The rect a picture takes in its box: the whole box for cover, else the picture's shape fitted and centred. */
85
73
  export function fitPlacedRect(box, media, canvas, fit = "contain") {
86
74
  if (fit === "cover")
87
75
  return box;
@@ -89,47 +77,35 @@ export function fitPlacedRect(box, media, canvas, fit = "contain") {
89
77
  const width = (media.width * scale) / canvas.width, height = (media.height * scale) / canvas.height;
90
78
  return { left: box.left + (box.width - width) / 2, top: box.top + (box.height - height) / 2, width, height };
91
79
  }
92
- /** A preset position as a place: it resolves to the footprint the preset reserves, `overlayRect`. */
93
80
  export function presetPlace(position, canvas) {
94
81
  return { relative_to: "frame", rect: overlayRect(position, canvas) };
95
82
  }
96
- /** The presenter's usual face box, before the take shows it: two thirds of the face zone's height, centred in it, 3:4 in pixels. */
97
83
  export function usualFace(aspectRatio, canvas, framing = "close") {
98
84
  const zone = faceZone(aspectRatio, framing), height = (zone.height * 2) / 3, width = (0.75 * height * canvas.height) / canvas.width;
99
85
  return { left: zone.left + (zone.width - width) / 2, top: zone.top + (zone.height - height) / 2, width, height };
100
86
  }
101
- /** Captions at a height of their own (#973 S2): pinned, so no overlay moves them. */
102
87
  export const captionPlace = z.strictObject({
103
88
  relative_to: z.enum(["frame", "face"]),
104
89
  y: z.number().min(-20).max(20).describe("frame: a share of the height from the top; face: face heights from the face centre, down positive."),
105
90
  edge: z.enum(CAPTION_EDGES).optional().describe("The edge of the caption block at y; default top at or above the middle, bottom below it."),
106
91
  max_width: z.number().min(0.3).max(0.95).optional().describe("The widest a caption line may run, as a share of the frame's width."),
107
92
  });
108
- /** The presenter's face size and place in the frame (#973 S2b). */
109
93
  export const presenterPlace = z.strictObject({
110
94
  face_height: z.number().min(0.08).max(0.6).describe("The face's height as a share of the frame's height."),
111
95
  face_centre: z.tuple([z.number().min(0).max(1), z.number().min(0).max(1)]).describe("The face centre [x, y] in shares of the frame."),
112
96
  });
113
- /** A close view's face height, measured on a delivered 9:16 close take (#973 S0, job-01 v1: 0.273–0.277); a smaller face starts from the wide view. */
114
97
  export const CLOSE_VIEW_FACE_HEIGHT = 0.275;
115
- /** Whether presenter_place starts from the actor's wide view: the crop only frames tighter, so a face smaller than the close view's needs it. */
116
98
  export const presenterPlaceWantsWide = (item) => item !== undefined && item.face_height < CLOSE_VIEW_FACE_HEIGHT;
117
- /** The tightest crop a portrait holds sharp: its pixels across fill at least this share of the frame's width (#1196). */
118
99
  export const SHARP_PORTRAIT_SHARE = 0.65;
119
100
  export const sharpCropOf = (portraitWidth, frameWidth) => portraitWidth / (SHARP_PORTRAIT_SHARE * frameWidth);
120
- /** The face a presenter_place asks for, 3:4 in pixels as the usual face. */
121
101
  export function presenterPlaceFace(item, canvas) {
122
102
  const height = item.face_height, width = (0.75 * height * canvas.height) / canvas.width;
123
103
  return { left: item.face_centre[0] - width / 2, top: item.face_centre[1] - height / 2, width, height };
124
104
  }
125
- /** The face admission plans by: the one presenter_place asks for, else the usual one of the framing. */
126
105
  export const plannedFace = (aspectRatio, canvas, framing, item) => item ? presenterPlaceFace(item, canvas) : usualFace(aspectRatio, canvas, framing);
127
- /** A caption place's height in percent of the frame and the edge it anchors by, on the face given. */
128
106
  export function captionPlaceAt(item, face) {
129
107
  const share = item.relative_to === "frame" ? item.y : face.top + face.height / 2 + item.y * face.height, vertical = Math.round(1e6 * share) / 1e4;
130
108
  return { vertical, edge: captionEdgeAt(vertical, item.edge) };
131
109
  }
132
- /** The area two rects share, in squared shares of the frame. */
133
110
  export const sharedArea = (a, b) => Math.max(0, Math.min(a.left + a.width, b.left + b.width) - Math.max(a.left, b.left)) *
134
111
  Math.max(0, Math.min(a.top + a.height, b.top + b.height) - Math.max(a.top, b.top));
135
- //# sourceMappingURL=scene-place.js.map
@@ -1,6 +1,4 @@
1
1
  import { z } from "zod";
2
- /** The quote's scene proposal (#1491 S6): one scene for the video, the free devices it adds, and paid options each with its price. */
3
- /** Shared by every quote that proposes: the person picks, and the paid call takes `proposal: { id, accept }`. */
4
2
  export declare const SCENE_PROPOSAL_ID: RegExp;
5
3
  export declare const MAX_PROPOSAL_OPTIONS = 12;
6
4
  export declare const SCENE_PROPOSAL_OPTION_FIELDS: readonly ["shots", "scenes", "music", "moves"];
@@ -66,7 +64,6 @@ export declare const sceneProposalAccept: z.ZodObject<{
66
64
  export type SceneProposalAccept = z.infer<typeof sceneProposalAccept>;
67
65
  export declare const PROPOSE_DESCRIPTION: string;
68
66
  export declare const proposeField: z.ZodOptional<z.ZodLiteral<false>>;
69
- /** make_faceless takes the same block from quote_faceless (#1491). */
70
67
  export declare const FACELESS_SCENE_PROPOSAL_DESCRIPTION: string;
71
68
  export declare const facelessSceneProposalAccept: z.ZodObject<{
72
69
  id: z.ZodString;
@@ -1,19 +1,14 @@
1
1
  import { z } from "zod";
2
2
  import { sceneBible } from "./scene-bible.js";
3
- /** The quote's scene proposal (#1491 S6): one scene for the video, the free devices it adds, and paid options each with its price. */
4
- /** Shared by every quote that proposes: the person picks, and the paid call takes `proposal: { id, accept }`. */
5
3
  export const SCENE_PROPOSAL_ID = /^sp_[a-z0-9]{20}$/;
6
4
  export const MAX_PROPOSAL_OPTIONS = 12;
7
5
  export const SCENE_PROPOSAL_OPTION_FIELDS = ["shots", "scenes", "music", "moves"];
8
6
  const optionId = z.string().regex(/^o[1-9][0-9]?$/);
9
7
  export const sceneProposalOption = z.strictObject({
10
8
  id: optionId,
11
- /** One line a person reads: what the option adds and where. */
12
9
  what: z.string().max(300),
13
10
  field: z.enum(SCENE_PROPOSAL_OPTION_FIELDS),
14
- /** What accepting it adds: the quote of the body with it, minus the quote of the body without it. */
15
11
  credits: z.number().int().nonnegative(),
16
- /** Exactly what goes into the body; read it, do not edit it. */
17
12
  item: z.unknown(),
18
13
  });
19
14
  export const sceneProposal = z.discriminatedUnion("state", [
@@ -23,10 +18,8 @@ export const sceneProposal = z.discriminatedUnion("state", [
23
18
  id: z.string().regex(SCENE_PROPOSAL_ID),
24
19
  expires_at: z.string(),
25
20
  scene: sceneBible.optional(),
26
- /** Free devices that come with the scene: number cards, the template look. */
27
21
  free: z.array(z.strictObject({ what: z.string().max(300) })).max(40),
28
22
  options: z.array(sceneProposalOption).max(MAX_PROPOSAL_OPTIONS),
29
- /** The body with the scene and the free devices, no options. */
30
23
  base_credits: z.number().int().nonnegative(),
31
24
  notes: z.array(z.string().max(300)).max(10),
32
25
  }),
@@ -43,7 +36,6 @@ export const sceneProposalAccept = z.strictObject({
43
36
  export const PROPOSE_DESCRIPTION = "false: quote_ugc proposes no scene, and make_ugc adds no free move of its own; the live shots still share " +
44
37
  "one scene. Omitted, a quote with no scene proposes one, free, and make_ugc may add free moves, each named in warnings.";
45
38
  export const proposeField = z.literal(false).optional().describe(PROPOSE_DESCRIPTION);
46
- /** make_faceless takes the same block from quote_faceless (#1491). */
47
39
  export const FACELESS_SCENE_PROPOSAL_DESCRIPTION = "An accepted scene proposal from quote_faceless: its id and the option ids the person " +
48
40
  "picked. The server adds the proposed scene, its free devices and the picked options to this body, and the quote with it is the " +
49
41
  "reserve. The rest of the body stays as quoted; a changed body is refused, so quote again.";
@@ -56,4 +48,3 @@ export const SCENE_PROPOSAL_EXPIRED_MESSAGE = "the scene proposal has expired; q
56
48
  export const SCENE_PROPOSAL_STALE_MESSAGE = "the body changed since the quote that made this proposal; quote again";
57
49
  export const SCENE_PROPOSAL_NOT_READY_MESSAGE = "the scene proposal is still being written; quote again";
58
50
  export const SCENE_PROPOSAL_WITH_SCENE_MESSAGE = "pass scene or proposal, not both: the proposal brings its own scene";
59
- //# sourceMappingURL=scene-proposal.js.map
@@ -1,9 +1,3 @@
1
- /** Integrity of submitted text: catches PROVEN byte loss, not a guess about it. */
2
- /** The Unicode replacement character. Its presence means bytes are already lost. */
3
1
  export declare const REPLACEMENT_CHAR = "\uFFFD";
4
- /** A walk, not a field list: every string leaf is visited, so a new text field is */
5
- /** checked automatically. */
6
2
  export declare function damagedTextPaths(input: unknown): string[];
7
- /** Replacement characters across all string leaves. The count goes into the message: one */
8
- /** and a hundred are different failures for whoever fixes it. */
9
3
  export declare function damagedCharCount(input: unknown): number;
@@ -1,7 +1,4 @@
1
- /** Integrity of submitted text: catches PROVEN byte loss, not a guess about it. */
2
- /** The Unicode replacement character. Its presence means bytes are already lost. */
3
1
  export const REPLACEMENT_CHAR = "�";
4
- /** Walk depth limit: the input is parsed by a zod schema, but its depth is unbounded. */
5
2
  const MAX_DEPTH = 16;
6
3
  function walk(value, path, depth, hits) {
7
4
  if (depth > MAX_DEPTH)
@@ -23,15 +20,11 @@ function walk(value, path, depth, hits) {
23
20
  }
24
21
  }
25
22
  }
26
- /** A walk, not a field list: every string leaf is visited, so a new text field is */
27
- /** checked automatically. */
28
23
  export function damagedTextPaths(input) {
29
24
  const hits = [];
30
25
  walk(input, "", 0, hits);
31
26
  return hits.sort();
32
27
  }
33
- /** Replacement characters across all string leaves. The count goes into the message: one */
34
- /** and a hundred are different failures for whoever fixes it. */
35
28
  export function damagedCharCount(input) {
36
29
  const paths = damagedTextPaths(input);
37
30
  if (paths.length === 0)
@@ -54,4 +47,3 @@ export function damagedCharCount(input) {
54
47
  count(input);
55
48
  return total;
56
49
  }
57
- //# sourceMappingURL=script-integrity.js.map
@@ -18,9 +18,7 @@ export declare const scriptVoice: z.ZodObject<{
18
18
  second_language: z.ZodOptional<z.ZodString>;
19
19
  }, z.core.$strict>;
20
20
  export type ScriptVoice = z.infer<typeof scriptVoice>;
21
- /** The same object for tools/list, where every byte counts: its field names alone; the API checks the full `scriptVoice`. */
22
21
  export declare const mcpScriptVoice: z.ZodRecord<z.ZodString, z.ZodUnknown>;
23
- /** True when the script already ends on the sign-off, whatever its case and punctuation. */
24
22
  export declare const endsOnSignOff: (script: string, signOff: string) => boolean;
25
23
  export interface VoicedScript {
26
24
  script: string;
@@ -28,14 +26,9 @@ export interface VoicedScript {
28
26
  changed: boolean;
29
27
  removedWords: boolean;
30
28
  }
31
- /** The script under the account's voice: each banned phrase taken out, then the sign-off added when the script lacks it. Pure, so the */
32
- /** quote and the run say the same words; a script left empty gets no sign-off, and its caller refuses it. */
33
29
  export declare function applyScriptVoice(script: string, voice: Pick<ScriptVoice, "banned_phrases" | "sign_off"> | null | undefined, options?: {
34
30
  signOff?: boolean;
35
31
  }): VoicedScript;
36
- /** The banned phrases a text says, each once, in the voice's order. */
37
32
  export declare const bannedPhrasesIn: (value: string, voice: Pick<ScriptVoice, "banned_phrases"> | null | undefined) => string[];
38
- /** The line a plan or run says about the second-language version: the client writes it, free; its video is quoted on its own. */
39
33
  export declare const secondLanguageLine: (language: string) => string;
40
- /** The voice as words for a writer that drafts the narration from a brief; undefined when the voice says nothing a writer uses. */
41
34
  export declare function voiceBriefNote(voice: ScriptVoice): string | undefined;
@@ -1,6 +1,4 @@
1
1
  import { z } from "zod";
2
- // The account's script voice (#1203): who speaks to whom, the tone, a closing line, banned phrases, a preferred format and a second
3
- // language. It sits in the brand kit beside the design; a call's own value wins, and every change it makes to a script is named.
4
2
  export const SCRIPT_TONES = ["friendly", "expert", "bold", "calm"];
5
3
  export const SCRIPT_FORMATS = ["presenter", "presenter_visuals", "faceless", "screencast"];
6
4
  export const MAX_BANNED_PHRASES = 50;
@@ -30,11 +28,9 @@ export const scriptVoice = z.strictObject(voiceShape).superRefine((voice, contex
30
28
  }
31
29
  }
32
30
  });
33
- /** The same object for tools/list, where every byte counts: its field names alone; the API checks the full `scriptVoice`. */
34
31
  export const mcpScriptVoice = z.record(z.string(), z.unknown())
35
32
  .describe(`The script voice to save: ${Object.keys(voiceShape).join(", ")}; {} clears it.`);
36
33
  const literal = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
37
- /** A phrase as whole words, any case, any run of spaces between its words. */
38
34
  function phrasePattern(phrase) {
39
35
  const words = phrase.trim().split(/\s+/u).map(literal).join("\\s+");
40
36
  const head = /^[\p{L}\p{N}]/u.test(phrase.trim()) ? "(?<![\\p{L}\\p{N}_])" : "";
@@ -42,8 +38,6 @@ function phrasePattern(phrase) {
42
38
  return new RegExp(`${head}${words}${tail}`, "iu");
43
39
  }
44
40
  const SENTENCE_START = /(?:^|[.!?…]["'”’)\]]*\s+|\n)\s*$/u;
45
- /** Takes every whole-word occurrence of the phrase out of the text and tidies the gap: a phrase that opened a sentence hands the */
46
- /** capital to the next word, one mid-sentence leaves a single space before the next word or mark. */
47
41
  function cut(source, phrase) {
48
42
  const pattern = phrasePattern(phrase);
49
43
  let text = source, from = 0, count = 0;
@@ -53,7 +47,6 @@ function cut(source, phrase) {
53
47
  break;
54
48
  const start = from + match.index, end = start + match[0].length;
55
49
  let head = text.slice(0, start), tail = text.slice(end);
56
- // A mark counts as the gap's punctuation only before a space or the end: "-20" and ".5" keep their sign and point.
57
50
  if (SENTENCE_START.test(head)) {
58
51
  tail = tail.replace(/^[^\S\n]*(?:[,;:–—-](?=\s|$))?[^\S\n]*/u, "");
59
52
  tail = tail.replace(/^[.!?…]+(?=\s|$)[^\S\n]*/u, "");
@@ -78,12 +71,10 @@ function cut(source, phrase) {
78
71
  return { text: text.trim(), count };
79
72
  }
80
73
  const normalized = (value) => value.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}]+/gu, " ").trim();
81
- /** True when the script already ends on the sign-off, whatever its case and punctuation. */
82
74
  export const endsOnSignOff = (script, signOff) => {
83
75
  const end = normalized(signOff);
84
76
  return end === "" || ` ${normalized(script)}`.endsWith(` ${end}`);
85
77
  };
86
- /** One line for every phrase taken out, held under 400 characters so a plan keeps it whole beside the sign-off line. */
87
78
  function bannedLine(removed) {
88
79
  const named = (entries) => entries.map(([phrase, count]) => `"${phrase}"${count > 1 ? ` ${count} times` : ""}`).join(", ");
89
80
  let shown = removed.length;
@@ -93,13 +84,10 @@ function bannedLine(removed) {
93
84
  shown -= 1;
94
85
  return line(shown);
95
86
  }
96
- /** The script under the account's voice: each banned phrase taken out, then the sign-off added when the script lacks it. Pure, so the */
97
- /** quote and the run say the same words; a script left empty gets no sign-off, and its caller refuses it. */
98
87
  export function applyScriptVoice(script, voice, options = {}) {
99
88
  const warnings = [];
100
89
  const counts = new Map();
101
90
  let text = script;
102
- // Again until none is left: taking one phrase out can join the words around it into another.
103
91
  for (let pass = 0; pass <= MAX_BANNED_PHRASES; pass += 1) {
104
92
  let changed = false;
105
93
  for (const phrase of voice?.banned_phrases ?? []) {
@@ -124,12 +112,9 @@ export function applyScriptVoice(script, voice, options = {}) {
124
112
  }
125
113
  return { script: text, warnings, changed: text !== script, removedWords };
126
114
  }
127
- /** The banned phrases a text says, each once, in the voice's order. */
128
115
  export const bannedPhrasesIn = (value, voice) => (voice?.banned_phrases ?? []).filter(phrase => phrasePattern(phrase).test(value));
129
- /** The line a plan or run says about the second-language version: the client writes it, free; its video is quoted on its own. */
130
116
  export const secondLanguageLine = (language) => `the saved script voice asks for a second language (${language}): write the ` +
131
117
  `${language} version of this script for the user beside it, free; a video of it is its own plan or run, quoted on its own`;
132
- /** The voice as words for a writer that drafts the narration from a brief; undefined when the voice says nothing a writer uses. */
133
118
  export function voiceBriefNote(voice) {
134
119
  const parts = [
135
120
  voice.about === undefined ? undefined : `Speaker and audience: ${voice.about}.`,
@@ -139,4 +124,3 @@ export function voiceBriefNote(voice) {
139
124
  ].filter((part) => part !== undefined);
140
125
  return parts.length ? `Script voice of this account: ${parts.join(" ")}` : undefined;
141
126
  }
142
- //# sourceMappingURL=script-voice.js.map
@@ -18,8 +18,6 @@ export interface SemanticInsertAnchor {
18
18
  endWord: number;
19
19
  coverWord?: number;
20
20
  }
21
- /** The first word NOT covered by the insert. The default is read here and only here, or */
22
- /** "coverage equals the anchor" would drift between readers. */
23
21
  export declare function coverWordOf(anchor: {
24
22
  endWord: number;
25
23
  coverWord?: number | undefined;
@@ -42,19 +40,14 @@ export type SemanticInsertShot = {
42
40
  export interface SemanticInsertResolution {
43
41
  totalFrames: number;
44
42
  shots: SemanticInsertShot[];
45
- /** Our own adjustments no viewer sees (half a frame at most): for the log, not warnings[] (#1047). */
46
43
  notes: string[];
47
44
  }
48
- /** The words of `text` as quotes and anchors count them. */
49
45
  export declare function lexicalTokens(text: string): string[];
50
- /** Every word range of `tokens` that `quote` matches, as an insert quote is matched. */
51
46
  export declare function quoteOccurrences(tokens: readonly string[], quote: string): Array<{
52
47
  startWord: number;
53
48
  endWord: number;
54
49
  }>;
55
50
  export declare function planSemanticInserts(script: string, instructions: readonly SemanticInsertInstruction[]): SemanticInsertPlan;
56
- /** The number of PAID actor shots, a pure function of word indexes, so input is refused */
57
- /** before speech synthesis rather than in the run after payment. */
58
51
  export declare function countActorShots(plan: SemanticInsertPlan): number;
59
52
  export declare function resolveSemanticInserts(input: {
60
53
  plan: SemanticInsertPlan;
@@ -1,5 +1,3 @@
1
- /** The first word NOT covered by the insert. The default is read here and only here, or */
2
- /** "coverage equals the anchor" would drift between readers. */
3
1
  export function coverWordOf(anchor) {
4
2
  return anchor.coverWord ?? anchor.endWord;
5
3
  }
@@ -7,14 +5,11 @@ function tokenize(text) {
7
5
  const normalized = text.normalize("NFD").toLowerCase()
8
6
  .replace(/([аеиоуыэюя]\u0308?)\u0301/gu, "$1").normalize("NFC")
9
7
  .replace(/[’ʼ]/gu, "'");
10
- // Joiners keep a site, handle, "24/7" or "9:30" one word, as the voice's timings are one per whitespace chunk (#1029).
11
8
  return normalized.match(/[\p{L}\p{N}][\p{L}\p{N}\p{M}]*(?:[-'./_@:&+]+[\p{L}\p{N}][\p{L}\p{N}\p{M}]*|,(?<=\p{N},)\p{N}+)*/gu) ?? [];
12
9
  }
13
- /** The words of `text` as quotes and anchors count them. */
14
10
  export function lexicalTokens(text) {
15
11
  return tokenize(text);
16
12
  }
17
- /** Every word range of `tokens` that `quote` matches, as an insert quote is matched. */
18
13
  export function quoteOccurrences(tokens, quote) {
19
14
  const quoteTokens = tokenize(quote);
20
15
  if (quoteTokens.length === 0)
@@ -89,8 +84,6 @@ export function planSemanticInserts(script, instructions) {
89
84
  const plan = { sourceTokens, inserts };
90
85
  return { sourceTokens, inserts: orderedAnchors(plan) };
91
86
  }
92
- /** The number of PAID actor shots, a pure function of word indexes, so input is refused */
93
- /** before speech synthesis rather than in the run after payment. */
94
87
  export function countActorShots(plan) {
95
88
  const anchors = orderedAnchors(plan);
96
89
  if (anchors.length === 0)
@@ -135,8 +128,6 @@ export function resolveSemanticInserts(input) {
135
128
  let cursor = 0;
136
129
  let rounded = Math.abs(totalFrames - durationSec * fps) > 1e-8;
137
130
  for (const anchor of anchors) {
138
- // A pause belongs to whoever covers the preceding word: the window ends at the START of
139
- // the first uncovered word, or the gap would become a paid sliver.
140
131
  const cover = coverWordOf(anchor);
141
132
  const head = anchor.startWord === 0;
142
133
  const tail = cover >= lexicalWords.length;
@@ -168,4 +159,3 @@ export function resolveSemanticInserts(input) {
168
159
  export function selectTimelineInput(segments, planner) {
169
160
  return segments !== undefined ? { kind: "explicit", segments } : { kind: "semantic", plan: planner() };
170
161
  }
171
- //# sourceMappingURL=semantic-inserts.js.map
@@ -1,8 +1,5 @@
1
- // The explainer kit's theme.json (#1291 F2): every colour of the kit's theme with the rule it takes a brand by, and its own
2
- // value as the default. The kit's bundle imports no core values, so a web test holds these defaults equal to scene-kit/src/theme.ts.
3
1
  export const EXPLAINER_THEME = {
4
2
  version: 1,
5
- // The kit's own brand: cream graph paper, near-black ink, cobalt. A brand equal to these draws the kit exactly as its author did.
6
3
  roles: { background: "#F4EFE4", surface: "#FFFDF8", ink: "#15171E", accent: "#2346FF", accent_ink: "#FFFFFF" },
7
4
  tokens: {
8
5
  paper: { rule: "role(background)", default: "#F4EFE4" },
@@ -30,7 +27,6 @@ export const EXPLAINER_THEME = {
30
27
  win3: { rule: "mix(ink, accent, 0.1)", default: "#353946" },
31
28
  winText: { rule: "role(background)", default: "#E9E7E2" },
32
29
  winMute: { rule: "mix(background, ink, 0.45)", default: "#8E8C95" },
33
- // Meaning colours and the hero's rig are the style's own: a brand changes neither.
34
30
  folder: { rule: "fixed()", default: "#F0C35A" },
35
31
  folderDark: { rule: "fixed()", default: "#C9962A" },
36
32
  tape: { rule: "fixed()", default: "rgba(243, 231, 184, .88)" },
@@ -61,4 +57,3 @@ export const EXPLAINER_THEME = {
61
57
  locks: ["the handwritten accent face", "the monospace face", "meaning colours: good, warm, pink, folder", "the hero's rig colours"],
62
58
  variation: { grid_step: [24, 20, 28, 32], hero_side: ["right", "left"] },
63
59
  };
64
- //# sourceMappingURL=skill-theme-explainer.js.map
@@ -1,9 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { type DesignFont, type DesignInput, type DesignPalette, type DesignPaletteRole } from "./design.js";
3
- /** The closed set of rules a token may be derived by; a rule is data, never code. */
4
3
  export declare const SKILL_THEME_FUNCTIONS: readonly ["role", "mix", "shade", "alpha", "readable", "fixed"];
5
4
  export type SkillThemeFunction = (typeof SKILL_THEME_FUNCTIONS)[number];
6
- /** One parsed rule. `a`/`b` name brand roles; `on` names another token; numbers are the rule's parameters. */
7
5
  export type SkillThemeRule = {
8
6
  fn: "role";
9
7
  a: DesignPaletteRole;
@@ -27,12 +25,10 @@ export type SkillThemeRule = {
27
25
  } | {
28
26
  fn: "fixed";
29
27
  };
30
- /** `mix(ink, background, 0.15)` → the rule, or a sentence saying why it is not one. */
31
28
  export declare function parseSkillThemeRule(text: string): SkillThemeRule | string;
32
29
  export declare const SKILL_THEME_FONT_BINDINGS: readonly ["brand.display", "brand.body", "fixed"];
33
30
  export declare const SKILL_THEME_LOGO_SLOTS: readonly ["end_card", "corner", "in_scene"];
34
31
  export declare const SKILL_THEME_HERO_RIGS: readonly ["atlas_9", "vector", "none"];
35
- /** A kit's theme.json. `roles` are the kit's own brand roles: a brand equal to them renders the kit exactly as its author drew it. */
36
32
  export declare const skillThemeManifest: z.ZodObject<{
37
33
  version: z.ZodLiteral<1>;
38
34
  roles: z.ZodObject<{
@@ -69,9 +65,7 @@ export declare const skillThemeManifest: z.ZodObject<{
69
65
  variation: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
70
66
  }, z.core.$strict>;
71
67
  export type SkillThemeManifest = z.infer<typeof skillThemeManifest>;
72
- /** Which of our brand faces carry Cyrillic letters (the `cyrillic` subset of Google Fonts; a web test pins this to the bundled fonts). */
73
68
  export declare const DESIGN_FONT_CYRILLIC: Readonly<Record<DesignFont, boolean>>;
74
- /** The brand a skill film takes: palette roles, and fonts only where the brand chose them (a look's or its own), never our defaults. */
75
69
  export interface SkillBrand {
76
70
  palette?: DesignPalette;
77
71
  fonts?: {
@@ -80,7 +74,6 @@ export interface SkillBrand {
80
74
  };
81
75
  }
82
76
  export declare function skillBrandOf(design: DesignInput | null | undefined): SkillBrand;
83
- /** What a draft's call may set over the brand: roles, fonts and variation values, each winning over the brand kit. */
84
77
  export declare const skillThemeOverrides: z.ZodObject<{
85
78
  palette: z.ZodOptional<z.ZodObject<{
86
79
  accent: z.ZodOptional<z.ZodString>;
@@ -122,7 +115,6 @@ export declare const skillThemeOverrides: z.ZodObject<{
122
115
  variation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
123
116
  }, z.core.$strict>;
124
117
  export type SkillThemeOverrides = z.infer<typeof skillThemeOverrides>;
125
- /** The theme a draft freezes and every still and render of it draws with. */
126
118
  export declare const resolvedSkillTheme: z.ZodObject<{
127
119
  version: z.ZodLiteral<1>;
128
120
  tokens: z.ZodRecord<z.ZodString, z.ZodString>;
@@ -146,16 +138,11 @@ export declare const resolvedSkillTheme: z.ZodObject<{
146
138
  warnings: z.ZodArray<z.ZodString>;
147
139
  }, z.core.$strict>;
148
140
  export type ResolvedSkillTheme = z.infer<typeof resolvedSkillTheme>;
149
- /** FNV-1a, 32 bits, with murmur3's finaliser so the low bits a small modulus reads are mixed: the same account picks the same variation on
150
- * every machine, and neighbouring ids pick unlike ones. */
151
141
  export declare function themeSeedHash(text: string): number;
152
142
  export interface ResolveSkillThemeInput {
153
143
  brand?: SkillBrand;
154
144
  overrides?: SkillThemeOverrides;
155
- /** The account's id: its variation seed. Absent, every axis keeps the kit's own value. */
156
145
  seed?: string;
157
- /** The script's language (ISO 639-1); a Cyrillic one keeps a brand face without Cyrillic off the kit. */
158
146
  language?: string;
159
147
  }
160
- /** The brand applied to a kit: precedence overrides → brand kit → the kit's own, then every declared text pair held to 4.5:1. */
161
148
  export declare function resolveSkillTheme(manifest: SkillThemeManifest, input?: ResolveSkillThemeInput): ResolvedSkillTheme;
@@ -1,9 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { DESIGN_FONT_FAMILIES, DESIGN_LOOKS, DESIGN_PALETTE_ROLES, designPalette, DESIGN_MIN_CONTRAST, hexToHsl, hslToHex, readableShade } from "./design.js";
3
3
  import { contrastRatio } from "./templates/theme.js";
4
- // A format skill's brand contract (#1291 F2): what a kit declares it takes from a brand, and the one resolver that turns the
5
- // account's brand into the kit's own tokens, fonts and per-account variation. A kit with no manifest renders in its own style.
6
- /** The closed set of rules a token may be derived by; a rule is data, never code. */
7
4
  export const SKILL_THEME_FUNCTIONS = ["role", "mix", "shade", "alpha", "readable", "fixed"];
8
5
  const HEX = /^#[0-9A-Fa-f]{6}$/;
9
6
  const RGBA = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0|1|0?\.\d+|1\.0+)\s*\)$/;
@@ -12,7 +9,6 @@ const AXIS_NAME = /^[a-z][a-z_]{0,30}$/;
12
9
  const colour = z.string().refine(value => HEX.test(value) || RGBA.test(value), "must be #RRGGBB or rgba(r, g, b, a)");
13
10
  const ROLE_SET = new Set(DESIGN_PALETTE_ROLES);
14
11
  const NUMBER = /^-?(?:\d+(?:\.\d+)?|\.\d+)$/;
15
- /** `mix(ink, background, 0.15)` → the rule, or a sentence saying why it is not one. */
16
12
  export function parseSkillThemeRule(text) {
17
13
  const m = /^\s*([a-z]+)\s*\(\s*([^()]*)\)\s*$/.exec(text);
18
14
  if (!m)
@@ -46,26 +42,21 @@ export function parseSkillThemeRule(text) {
46
42
  export const SKILL_THEME_FONT_BINDINGS = ["brand.display", "brand.body", "fixed"];
47
43
  export const SKILL_THEME_LOGO_SLOTS = ["end_card", "corner", "in_scene"];
48
44
  export const SKILL_THEME_HERO_RIGS = ["atlas_9", "vector", "none"];
49
- /** A kit's theme.json. `roles` are the kit's own brand roles: a brand equal to them renders the kit exactly as its author drew it. */
50
45
  export const skillThemeManifest = z.strictObject({
51
46
  version: z.literal(1),
52
47
  roles: designPalette,
53
48
  tokens: z.record(z.string().regex(TOKEN_NAME), z.strictObject({ rule: z.string().min(1).max(80), default: colour }))
54
49
  .refine(tokens => Object.keys(tokens).length >= 1 && Object.keys(tokens).length <= 80, "a kit names 1–80 tokens"),
55
- /** Text tokens over the fills they sit on, each held to 4.5:1 after the brand is applied. */
56
50
  pairs: z.array(z.tuple([z.string().regex(TOKEN_NAME), z.string().regex(TOKEN_NAME)])).max(40),
57
51
  fonts: z.record(z.string().regex(/^[a-z][a-z_]{0,20}$/), z.strictObject({ bind: z.enum(SKILL_THEME_FONT_BINDINGS), default: z.string().min(1).max(60) })),
58
52
  logo: z.union([z.literal("none"), z.array(z.enum(SKILL_THEME_LOGO_SLOTS)).min(1).max(3)]),
59
53
  hero: z.enum(SKILL_THEME_HERO_RIGS),
60
- /** What a brand never changes, so the style survives it; read by people and agents. */
61
54
  locks: z.array(z.string().min(1).max(60)).max(10),
62
- /** Axes the account's seed varies; each axis's first value is the kit's own. */
63
55
  variation: z.record(z.string().regex(AXIS_NAME), z.array(z.union([z.string().min(1).max(30), z.number()])).min(1).max(8)),
64
56
  }).superRefine((manifest, context) => {
65
57
  for (const problem of skillThemeManifestProblems(manifest))
66
58
  context.addIssue({ code: z.ZodIssueCode.custom, ...problem });
67
59
  });
68
- /** Every rule parsed, every `readable` pointing at an earlier opaque token, every pair naming opaque tokens. */
69
60
  function skillThemeManifestProblems(manifest) {
70
61
  const problems = [], seen = new Set();
71
62
  for (const [name, token] of Object.entries(manifest.tokens)) {
@@ -104,9 +95,7 @@ const formatColour = (c) => {
104
95
  return `rgba(${[c.r, c.g, c.b].map(v => Math.round(Math.min(255, Math.max(0, v)))).join(", ")}, ${a})`;
105
96
  };
106
97
  const clamp01 = (v) => Math.min(1, Math.max(0, v));
107
- /** Below this saturation a colour has no hue worth carrying over. */
108
98
  const GREY = 0.06;
109
- /** A rule's colour on one palette; `tokens` holds what `readable` reads. */
110
99
  function evaluate(rule, palette, tokens) {
111
100
  const role = (r) => parseColour(palette[r]);
112
101
  switch (rule.fn) {
@@ -123,8 +112,6 @@ function evaluate(rule, palette, tokens) {
123
112
  case "readable": return parseColour(readableShade(palette[rule.a], tokens[rule.on]));
124
113
  }
125
114
  }
126
- /** D1: the kit's value moved by what the rule moved between the kit's roles and the brand's, in HSL. A value equal to its rule on the kit's
127
- * roles is the rule's on the brand's; a rule that did not move leaves the kit's literal untouched. */
128
115
  function carry(fallback, onKit, onBrand) {
129
116
  const own = parseColour(fallback);
130
117
  if (same(onKit, onBrand))
@@ -136,9 +123,7 @@ function carry(fallback, onKit, onBrand) {
136
123
  const moved = parseColour(hslToHex({ h, s: clamp01(o.s + (b.s - k.s)), l: clamp01(o.l + (b.l - k.l)) }));
137
124
  return formatColour({ ...moved, a: own.a });
138
125
  }
139
- /** Scripts that need the Cyrillic subset of a face. */
140
126
  const CYRILLIC_LANGUAGES = new Set(["ru", "uk", "be", "bg", "sr", "mk", "kk", "ky", "tg", "mn"]);
141
- /** Which of our brand faces carry Cyrillic letters (the `cyrillic` subset of Google Fonts; a web test pins this to the bundled fonts). */
142
127
  export const DESIGN_FONT_CYRILLIC = {
143
128
  "Plus Jakarta Sans": false, Inter: true, Montserrat: true, Roboto: true, "PT Sans": true, Oswald: true, "Bebas Neue": false, "Titan One": false,
144
129
  Bungee: false, Bangers: false, Caveat: true, "Permanent Marker": false,
@@ -152,13 +137,11 @@ export function skillBrandOf(design) {
152
137
  return { ...(palette ? { palette: { ...palette } } : {}),
153
138
  ...(display || body ? { fonts: { ...(display ? { display } : {}), ...(body ? { body } : {}) } } : {}) };
154
139
  }
155
- /** What a draft's call may set over the brand: roles, fonts and variation values, each winning over the brand kit. */
156
140
  export const skillThemeOverrides = z.strictObject({
157
141
  palette: designPalette.partial().optional(),
158
142
  fonts: z.strictObject({ display: z.enum(DESIGN_FONT_FAMILIES).optional(), body: z.enum(DESIGN_FONT_FAMILIES).optional() }).optional(),
159
143
  variation: z.record(z.string().regex(AXIS_NAME), z.union([z.string().min(1).max(30), z.number()])).optional(),
160
144
  });
161
- /** The theme a draft freezes and every still and render of it draws with. */
162
145
  export const resolvedSkillTheme = z.strictObject({
163
146
  version: z.literal(1),
164
147
  tokens: z.record(z.string().regex(TOKEN_NAME), colour),
@@ -166,12 +149,9 @@ export const resolvedSkillTheme = z.strictObject({
166
149
  variation: z.record(z.string().regex(AXIS_NAME), z.union([z.string(), z.number()])),
167
150
  hero: z.enum(SKILL_THEME_HERO_RIGS),
168
151
  logo: z.union([z.literal("none"), z.array(z.enum(SKILL_THEME_LOGO_SLOTS))]),
169
- /** Where the theme came from: the call's overrides, the account's brand kit, or the kit alone. */
170
152
  source: z.enum(["overrides", "brand_kit", "kit"]),
171
153
  warnings: z.array(z.string()),
172
154
  });
173
- /** FNV-1a, 32 bits, with murmur3's finaliser so the low bits a small modulus reads are mixed: the same account picks the same variation on
174
- * every machine, and neighbouring ids pick unlike ones. */
175
155
  export function themeSeedHash(text) {
176
156
  let h = 0x811c9dc5;
177
157
  for (let i = 0; i < text.length; i++) {
@@ -185,7 +165,6 @@ export function themeSeedHash(text) {
185
165
  h ^= h >>> 16;
186
166
  return h >>> 0;
187
167
  }
188
- /** The brand applied to a kit: precedence overrides → brand kit → the kit's own, then every declared text pair held to 4.5:1. */
189
168
  export function resolveSkillTheme(manifest, input = {}) {
190
169
  const warnings = [];
191
170
  const palette = { ...manifest.roles, ...input.brand?.palette, ...stripUndefined(input.overrides?.palette) };
@@ -200,7 +179,6 @@ export function resolveSkillTheme(manifest, input = {}) {
200
179
  const fills = new Map();
201
180
  for (const [text, fill] of manifest.pairs)
202
181
  fills.set(text, [...fills.get(text) ?? [], fill]);
203
- // A moved text token may be another pair's fill, so the pass repeats until nothing moves; each token keeps its last word.
204
182
  const moved = new Map(), original = { ...tokens };
205
183
  for (let pass = 0; pass < 3; pass++) {
206
184
  let changed = false;
@@ -254,8 +232,6 @@ export function resolveSkillTheme(manifest, input = {}) {
254
232
  return { version: 1, tokens, fonts, variation, hero: manifest.hero, logo: manifest.logo, source, warnings };
255
233
  }
256
234
  const worstContrast = (colour, grounds) => Math.min(...grounds.map(g => contrastRatio(colour, g)));
257
- /** The nearest shade that reads on every ground; with grounds on both sides of it, the lightness of its hue (or grey) that reads best on the
258
- * worst of them, which the caller names when it is still under 4.5:1. */
259
235
  function readableAgainst(colour, grounds) {
260
236
  let best = readableShade(colour, grounds);
261
237
  if (worstContrast(best, grounds) >= DESIGN_MIN_CONTRAST)
@@ -271,4 +247,3 @@ function readableAgainst(colour, grounds) {
271
247
  return best;
272
248
  }
273
249
  const stripUndefined = (value) => Object.fromEntries(Object.entries(value ?? {}).filter(([, v]) => v !== undefined));
274
- //# sourceMappingURL=skill-theme.js.map