@allyhub/sdk 0.1.0-alpha.7 → 0.2.0-next.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 (370) hide show
  1. package/NOTICE +85 -0
  2. package/client.d.ts +45 -1
  3. package/dist/anim.js +2 -75
  4. package/dist/define.d.ts +10 -4
  5. package/dist/define.js +2 -95
  6. package/dist/dom.d.ts +1 -1
  7. package/dist/dom.js +2 -457
  8. package/dist/fit.js +2 -60
  9. package/dist/free.d.ts +18 -0
  10. package/dist/free.js +2 -0
  11. package/dist/index.d.ts +28 -13
  12. package/dist/index.js +2 -11
  13. package/dist/input.d.ts +306 -0
  14. package/dist/input.js +2 -0
  15. package/dist/media.d.ts +3 -6
  16. package/dist/media.js +2 -27
  17. package/dist/messages.d.ts +3 -2
  18. package/dist/messages.js +2 -2
  19. package/dist/module.d.ts +24 -0
  20. package/dist/module.js +2 -0
  21. package/dist/noise.js +2 -233
  22. package/dist/parts.d.ts +97 -21
  23. package/dist/parts.js +2 -414
  24. package/dist/paths.d.ts +1 -1
  25. package/dist/paths.js +2 -720
  26. package/dist/phone.d.ts +26 -0
  27. package/dist/phone.js +2 -0
  28. package/dist/piece.d.ts +106 -35
  29. package/dist/piece.js +2 -38
  30. package/dist/props.d.ts +1 -1
  31. package/dist/props.js +2 -35
  32. package/dist/scenery.d.ts +2 -0
  33. package/dist/scenery.js +2 -0
  34. package/dist/text.js +2 -38
  35. package/dist/written.d.ts +12 -0
  36. package/dist/written.js +2 -0
  37. package/docs/README.md +18 -0
  38. package/docs/batches.md +148 -0
  39. package/docs/contract.md +51 -0
  40. package/docs/defaults.md +703 -0
  41. package/docs/docs.md +148 -0
  42. package/docs/footage.md +249 -0
  43. package/docs/layers.md +317 -0
  44. package/docs/modeling.md +143 -0
  45. package/docs/project.md +265 -0
  46. package/docs/scenery.md +308 -0
  47. package/docs/sheets.md +119 -0
  48. package/docs/slides.md +111 -0
  49. package/docs/sound.md +170 -0
  50. package/docs/speech.md +289 -0
  51. package/docs/video.md +265 -0
  52. package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
  53. package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
  54. package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
  55. package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
  56. package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
  57. package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
  58. package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
  59. package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
  60. package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
  61. package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
  62. package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
  63. package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
  64. package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
  65. package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
  66. package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
  67. package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
  68. package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
  69. package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
  70. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
  71. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
  72. package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
  73. package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
  74. package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
  75. package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
  76. package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
  77. package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
  78. package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
  79. package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
  80. package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
  81. package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
  82. package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
  83. package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
  84. package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
  85. package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
  86. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
  87. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
  88. package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
  89. package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
  90. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
  91. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
  92. package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
  93. package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
  94. package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
  95. package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
  96. package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
  97. package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
  98. package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
  99. package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
  100. package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
  101. package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
  102. package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
  103. package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
  104. package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
  105. package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
  106. package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
  107. package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
  108. package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
  109. package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
  110. package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
  111. package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
  112. package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
  113. package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
  114. package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
  115. package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
  116. package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
  117. package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
  118. package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
  119. package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
  120. package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
  121. package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
  122. package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
  123. package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
  124. package/node_modules/@allyhub-next/audio/package.json +17 -0
  125. package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
  126. package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
  127. package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
  128. package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
  129. package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
  130. package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
  131. package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
  132. package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
  133. package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
  134. package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
  135. package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
  136. package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
  137. package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
  138. package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
  139. package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
  140. package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
  141. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
  142. package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  143. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
  144. package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  145. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
  146. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  147. package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
  148. package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
  149. package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
  150. package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  151. package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
  152. package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  153. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
  154. package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
  155. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
  156. package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  157. package/node_modules/@allyhub-next/formats/package.json +14 -0
  158. package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
  159. package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
  160. package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
  161. package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
  162. package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
  163. package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
  164. package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
  165. package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
  166. package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
  167. package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
  168. package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
  169. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
  170. package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  171. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
  172. package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
  173. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
  174. package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
  175. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
  176. package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
  177. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
  178. package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  179. package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
  180. package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
  181. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
  182. package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  183. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
  184. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
  185. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
  186. package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
  187. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
  188. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  189. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
  190. package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
  191. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
  192. package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  193. package/node_modules/@allyhub-next/protocol/package.json +13 -0
  194. package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
  195. package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
  196. package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
  198. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
  203. package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  205. package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  206. package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
  207. package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
  208. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
  209. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
  210. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  211. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  212. package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
  213. package/node_modules/@allyhub-next/runtimes/package.json +14 -0
  214. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
  215. package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
  216. package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
  217. package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
  218. package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
  219. package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
  220. package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
  221. package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
  222. package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
  223. package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
  224. package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
  225. package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
  226. package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
  227. package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
  228. package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
  229. package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
  230. package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
  231. package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
  232. package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
  233. package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
  234. package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
  235. package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
  236. package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
  237. package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
  238. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
  239. package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
  240. package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
  241. package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
  242. package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
  243. package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
  244. package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
  245. package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
  246. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
  247. package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  248. package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
  249. package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
  250. package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
  251. package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
  252. package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
  253. package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
  254. package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
  255. package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
  256. package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
  257. package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
  258. package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
  259. package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
  260. package/node_modules/@allyhub-next/scenery/package.json +13 -0
  261. package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
  262. package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
  263. package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
  264. package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
  265. package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
  266. package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
  267. package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
  268. package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
  269. package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
  270. package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
  271. package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
  272. package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
  273. package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
  274. package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
  275. package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
  276. package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
  277. package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
  278. package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
  279. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
  280. package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
  281. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
  282. package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  283. package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
  284. package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
  285. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
  286. package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  287. package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
  288. package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
  289. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
  290. package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  291. package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
  292. package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
  293. package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
  294. package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
  295. package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
  296. package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
  297. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
  298. package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  299. package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
  300. package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
  301. package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
  302. package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
  303. package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
  304. package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
  305. package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
  306. package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
  307. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
  308. package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  309. package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
  310. package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
  311. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
  312. package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  313. package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
  314. package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  315. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
  316. package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
  317. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
  318. package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
  319. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
  320. package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  321. package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
  322. package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
  323. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
  324. package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
  325. package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
  326. package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
  327. package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
  328. package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
  329. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
  330. package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
  331. package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
  332. package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
  333. package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
  334. package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
  335. package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
  336. package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
  337. package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
  338. package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
  339. package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
  340. package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
  341. package/node_modules/@allyhub-next/video-core/package.json +14 -0
  342. package/package.json +52 -41
  343. package/README.md +0 -17
  344. package/dist/anim.d.ts.map +0 -1
  345. package/dist/anim.js.map +0 -1
  346. package/dist/define.d.ts.map +0 -1
  347. package/dist/define.js.map +0 -1
  348. package/dist/dom.d.ts.map +0 -1
  349. package/dist/dom.js.map +0 -1
  350. package/dist/fit.d.ts.map +0 -1
  351. package/dist/fit.js.map +0 -1
  352. package/dist/index.d.ts.map +0 -1
  353. package/dist/index.js.map +0 -1
  354. package/dist/media.d.ts.map +0 -1
  355. package/dist/media.js.map +0 -1
  356. package/dist/messages.d.ts.map +0 -1
  357. package/dist/messages.js.map +0 -1
  358. package/dist/noise.d.ts.map +0 -1
  359. package/dist/noise.js.map +0 -1
  360. package/dist/parts.d.ts.map +0 -1
  361. package/dist/parts.js.map +0 -1
  362. package/dist/paths.d.ts.map +0 -1
  363. package/dist/paths.js.map +0 -1
  364. package/dist/piece.d.ts.map +0 -1
  365. package/dist/piece.js.map +0 -1
  366. package/dist/props.d.ts.map +0 -1
  367. package/dist/props.js.map +0 -1
  368. package/dist/text.d.ts.map +0 -1
  369. package/dist/text.js.map +0 -1
  370. /package/{LICENSE → LICENSE.md} +0 -0
@@ -0,0 +1,214 @@
1
+ import type { Pixels } from "./contrast.js";
2
+ import type { Track } from "./measure.js";
3
+ import type { Box } from "./problem.js";
4
+ /** How cut-seam measures. */
5
+ export interface SeamOptions {
6
+ /** Frames looked at on each side of a join (2 or more): velocities are over them. */
7
+ frames: number;
8
+ /** A thing whose centre moves slower than this many pixels a second, and whose size changes slower, is at rest: it has no direction. */
9
+ rest: number;
10
+ /** Things listed on each side, moving ones first, largest first (0: every thing, at rest too). */
11
+ top: number;
12
+ }
13
+ /** Three frames each side; at rest under 15 px a second; three things a side. */
14
+ export declare const SEAM_DEFAULTS: Readonly<SeamOptions>;
15
+ export declare function seamOptions(o?: Partial<SeamOptions>): SeamOptions;
16
+ /** One thing's motion on one side of a join. */
17
+ export interface SeamMotion {
18
+ layer: string;
19
+ /** `text "…"`, `box`, or a picture's tag. */
20
+ what: string;
21
+ selector: string;
22
+ /** Its `data-ak` name, when it has one. */
23
+ name?: string;
24
+ /** Its box at the side's frame nearest the join that shows it. */
25
+ box: Box;
26
+ /** Its box's share of the frame (0–1). */
27
+ area: number;
28
+ /** Pixels a second its centre moves: rightward, downward, and in all. */
29
+ vx: number;
30
+ vy: number;
31
+ speed: number;
32
+ /** Degrees: 0 rightward, 90 downward, ±180 leftward, −90 upward; absent at rest. */
33
+ angle?: number;
34
+ /** Its size (√(w × h)) changes by this share of itself a second (0.5: half again a second; negative: shrinking). */
35
+ scale: number;
36
+ /** Its opacity changes by this much a second. */
37
+ fade: number;
38
+ /** It moves (or grows) at `rest` pixels a second or faster. */
39
+ moving: boolean;
40
+ }
41
+ /** A velocity, with its direction when it is not at rest. */
42
+ export interface Velocity {
43
+ vx: number;
44
+ vy: number;
45
+ speed: number;
46
+ angle?: number;
47
+ }
48
+ /** The picture's own shift from frame to frame on one side (block matching on a small copy). */
49
+ export interface PictureMotion extends Velocity {
50
+ /** The mean difference left after the shift, and with none, levels of 255: a shift that explains the change leaves far less. */
51
+ match: number;
52
+ still: number;
53
+ }
54
+ /** What moves on one side of a join. */
55
+ export interface SeamSide {
56
+ part: string;
57
+ /** Film seconds of the first and last frames looked at. */
58
+ from: number;
59
+ to: number;
60
+ /** Things that show at any of its frames, and how many of them move. */
61
+ things: number;
62
+ moving: number;
63
+ /** The things listed (`options.top`), moving ones first, largest first. */
64
+ list: SeamMotion[];
65
+ /** The moving things' velocity, weighted by their area. */
66
+ overall?: Velocity & {
67
+ scale: number;
68
+ };
69
+ /** The picture's shift, when measured. */
70
+ picture?: PictureMotion;
71
+ }
72
+ /** A thing named alike on both sides of a join. */
73
+ export interface SeamCarrier {
74
+ /** Its `data-ak` name, or its text (`text "…"`). */
75
+ name: string;
76
+ /** Its box at the last frame before and the first after. */
77
+ before: Box;
78
+ after: Box;
79
+ /** Pixels between the two boxes' centres. */
80
+ distance: number;
81
+ /** The size after over the size before (√ area). */
82
+ size: number;
83
+ /** Its speed on each side, pixels a second. */
84
+ speed: [before: number, after: number];
85
+ }
86
+ /** How the motion changes across a join. */
87
+ export interface SeamChange {
88
+ /** Degrees from the direction before to the direction after (−180 to 180); absent when a side is at rest. */
89
+ turn?: number;
90
+ /** Speeds, pixels a second, before and after. */
91
+ speed: [before: number, after: number];
92
+ }
93
+ /** Degrees of a velocity: 0 rightward, 90 downward. */
94
+ export declare function angleOf(vx: number, vy: number): number;
95
+ /** The turn from one direction to another, −180 to 180 degrees. */
96
+ export declare function turnOf(from: number, to: number): number;
97
+ /**
98
+ * One side's motion from the tracks of its part over its frames (film
99
+ * seconds, in order): each thing that shows at any of them, its velocity
100
+ * from its first to its last frame that shows it (none from one frame),
101
+ * and its box at the frame that shows it nearest the join (`near`: the
102
+ * last frames before, the first after). `frame` is the format's pixels.
103
+ */
104
+ export declare function seamSide(tracks: readonly Track[], part: string, times: readonly number[], near: "first" | "last", frame: [width: number, height: number], options: SeamOptions): SeamSide;
105
+ /** The change from one velocity to another. */
106
+ export declare function changeOf(before: Velocity | undefined, after: Velocity | undefined): SeamChange;
107
+ /**
108
+ * Things on both sides named alike: by their `data-ak` name, else a text
109
+ * by what it says, each name only when it is one thing on each side, and
110
+ * on the frame (`[width, height]`, when given) on both: what the frame
111
+ * does not show carries nothing across the cut.
112
+ */
113
+ export declare function seamCarriers(before: readonly SeamMotion[], after: readonly SeamMotion[], frame?: readonly [number, number]): SeamCarrier[];
114
+ /**
115
+ * The shift that best lays picture `a` over picture `b` (both one size):
116
+ * every whole shift up to `max` pixels each way, the mean luminance
117
+ * difference over where they overlap (at least half of each), refined to
118
+ * a fraction of a pixel by a parabola through the best and its neighbours.
119
+ * In `a`'s pixels: b looks like a moved by (dx, dy). `error` is the mean
120
+ * difference at the best shift, `still` with none (levels of 255).
121
+ */
122
+ export declare function pictureShift(a: Pixels, b: Pixels, max: number): {
123
+ dx: number;
124
+ dy: number;
125
+ error: number;
126
+ still: number;
127
+ };
128
+ /**
129
+ * The picture's motion over a side's frames (small copies in order, `fps`
130
+ * apart, `k` frame pixels to one of theirs): the mean of the shifts between
131
+ * frames in a row, as pixels a second of the frame.
132
+ */
133
+ export declare function pictureMotion(frames: readonly Pixels[], fps: number, k: number, max: number, rest: number): PictureMotion | undefined;
134
+ /** How the flash fact looks for frames unlike both neighbours. */
135
+ export interface FlashOptions {
136
+ /** Frames looked at either side of a join (and of a transition's window's edges). */
137
+ reach: number;
138
+ /** The width of the small copy of each frame compared, in pixels. */
139
+ width: number;
140
+ /** A pixel is foreign when a channel lies more than this many levels (of 255) outside what its neighbours span. */
141
+ noise: number;
142
+ /** A frame (or a run of frames) is reported when at least this share of its pixels (0–1) is foreign. */
143
+ change: number;
144
+ /** Runs of up to this many frames are looked for (1: single frames). */
145
+ frames: number;
146
+ /**
147
+ * A run beside a cut is reported only when it steps from its own shot by
148
+ * more than this many times the shot's usual change from frame to frame
149
+ * (`own`): a frame in a moving shot, its grain and its hand's sway, steps
150
+ * about as much as its neighbours do, and the cut beside it is no flash.
151
+ */
152
+ usual: number;
153
+ }
154
+ /**
155
+ * The frame on each side of every join; a copy 160 px wide; foreign past
156
+ * 24 levels; reported from 0.5 % of the pixels; single frames; beside a
157
+ * cut, from twice its shot's usual change.
158
+ */
159
+ export declare const FLASH_DEFAULTS: Readonly<FlashOptions>;
160
+ export declare function flashOptions(o?: Partial<FlashOptions>): FlashOptions;
161
+ /** How a frame differs from another: the share of pixels past a noise, and the mean of a pixel's largest channel difference. */
162
+ export interface FrameChange {
163
+ /** Share of pixels (0–1). */
164
+ share: number;
165
+ /** Levels of 255. */
166
+ mean: number;
167
+ }
168
+ /** How b differs from a; two pictures of different sizes differ everywhere. */
169
+ export declare function frameChange(a: Pixels, b: Pixels, noise: number): FrameChange;
170
+ /**
171
+ * How far a frame lies outside what the frames either side of it span:
172
+ * per pixel, the most a channel is below both neighbours' or above both;
173
+ * the share of pixels where that is more than `noise`, and its mean.
174
+ */
175
+ export declare function foreignPixels(prev: Pixels, cur: Pixels, next: Pixels, noise: number): FrameChange;
176
+ /** A run of frames unlike the frames either side of it. */
177
+ export interface FlashRun {
178
+ /** Its first and last frame. */
179
+ from: number;
180
+ to: number;
181
+ /** The least foreign of its frames: share and mean. */
182
+ foreign: FrameChange;
183
+ /** Its first frame against the frame before, its last against the frame after, and those two against each other. */
184
+ before: FrameChange;
185
+ after: FrameChange;
186
+ across: FrameChange;
187
+ /**
188
+ * When the run touches a cut (one of its neighbours is the other shot),
189
+ * the run against its own shot alone: `step`, its frame nearest its own
190
+ * side against the next frame of its own shot; `usual`, that frame
191
+ * against the one beyond it, the shot's own change from frame to frame.
192
+ * A blank or stray frame steps far past its shot's usual change; a frame
193
+ * in a fast move steps about as much as its neighbours do.
194
+ */
195
+ own?: {
196
+ side: "before" | "after";
197
+ step: FrameChange;
198
+ usual: FrameChange;
199
+ };
200
+ }
201
+ /**
202
+ * Runs of 1 to `options.frames` frames starting at each of `starts`, each
203
+ * against the frame before it and the frame after it: `picture(f)` is
204
+ * frame f's small copy, `same(a, b)` says two frames draw the same (their
205
+ * stage signatures match), which makes a run's frame no flash without a
206
+ * capture. A run is kept when every frame of it has `change` or more of
207
+ * its pixels foreign, beside a cut steps from its own shot by more than
208
+ * `usual` times the shot's usual change, and no shorter run from its first
209
+ * frame was (with `all`, every run looked at). `last` is the last frame there is. `cuts`
210
+ * are the first frames of the shots that start at a cut: a run beside one
211
+ * is also measured against its own shot (`own`).
212
+ */
213
+ export declare function flashRuns(starts: readonly number[], last: number, picture: (f: number) => Promise<Pixels>, same: (a: number, b: number) => Promise<boolean>, options: FlashOptions, all?: boolean, cuts?: readonly number[]): Promise<FlashRun[]>;
214
+ //# sourceMappingURL=seams.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export const SEAM_DEFAULTS={frames:3,rest:15,top:3};export function seamOptions(t={}){const n=(a,d,r)=>a!==void 0&&Number.isFinite(a)&&a>=d?Math.round(a):r;return{frames:n(t.frames,2,SEAM_DEFAULTS.frames),rest:t.rest!==void 0&&Number.isFinite(t.rest)&&t.rest>=0?t.rest:SEAM_DEFAULTS.rest,top:n(t.top,0,SEAM_DEFAULTS.top)}}const A=t=>Math.round(t*10)/10,y=t=>Math.round(t*1e3)/1e3,$=t=>[t[0]+t[2]/2,t[1]+t[3]/2],I=t=>Math.sqrt(Math.max(0,t[2])*Math.max(0,t[3]));export function angleOf(t,n){return A(Math.atan2(n,t)*180/Math.PI)}export function turnOf(t,n){let a=(n-t)%360;return a>180&&(a-=360),a<=-180&&(a+=360),A(a)}const L=(t,n,a)=>{const d=Math.hypot(t,n);return{vx:A(t),vy:A(n),speed:A(d),...d>=a&&d>0?{angle:angleOf(t,n)}:{}}};export function seamSide(t,n,a,d,r,i){const w=new Map(a.map(s=>[y(s),s])),x=[];for(const s of t){if(s.part!==n)continue;const h=s.samples.filter(O=>w.has(y(O.t))&&O.box!==void 0&&O.opacity>.05),F=d==="last"?h.at(-1):h[0];if(!F?.box)continue;const f=h[0],g=h.at(-1);let m=0,M=0,p=0,v=0,b=0;const S=f?w.get(y(f.t))??f.t:0,N=g?w.get(y(g.t))??g.t:0;if(f?.box&&g?.box&&N>S){const O=N-S,[C,D]=$(f.box),[P,T]=$(g.box);m=(P-C)/O,M=(T-D)/O;const E=I(f.box);b=(I(g.box)-E)/O,p=E>0?b/E:0,v=(g.opacity-f.opacity)/O}const z=L(m,M,i.rest),k=F.box;x.push({layer:s.layer,what:s.what,selector:s.selector,...s.name===void 0?{}:{name:s.name},box:k,area:y(k[2]*k[3]/Math.max(1,r[0]*r[1])),...z,scale:y(p),fade:y(v),moving:Math.hypot(m,M)>=i.rest||Math.abs(b)>=i.rest})}const c=s=>Math.max(0,s.box[2]*s.box[3]),e=x.filter(s=>s.moving),l=[...e.sort((s,h)=>c(h)-c(s)),...x.filter(s=>!s.moving).sort((s,h)=>c(h)-c(s))],o=e.reduce((s,h)=>s+c(h),0),u=o>0?{...L(e.reduce((s,h)=>s+h.vx*c(h),0)/o,e.reduce((s,h)=>s+h.vy*c(h),0)/o,i.rest),scale:y(e.reduce((s,h)=>s+h.scale*c(h),0)/o)}:void 0;return{part:n,from:y(a[0]??0),to:y(a.at(-1)??0),things:x.length,moving:e.length,list:i.top===0?l:l.filter(s=>s.moving).slice(0,i.top),...u?{overall:u}:{}}}export function changeOf(t,n){return{...t?.angle!==void 0&&n?.angle!==void 0?{turn:turnOf(t.angle,n.angle)}:{},speed:[t?.speed??0,n?.speed??0]}}export function seamCarriers(t,n,a){const d=e=>!a||(e[0]??0)<a[0]&&(e[0]??0)+(e[2]??0)>0&&(e[1]??0)<a[1]&&(e[1]??0)+(e[3]??0)>0,r=e=>e.name??(e.what.startsWith("text ")?e.what:void 0),i=e=>{const l=new Map;for(const o of e){const u=r(o);u!==void 0&&l.set(u,l.has(u)?null:o)}return l},w=i(t),x=i(n),c=[];for(const[e,l]of w){const o=x.get(e);if(!l||!o||!d(l.box)||!d(o.box))continue;const[u,s]=$(l.box),[h,F]=$(o.box),f=I(l.box);c.push({name:e,before:l.box,after:o.box,distance:A(Math.hypot(h-u,F-s)),size:y(f>0?I(o.box)/f:0),speed:[l.speed,o.speed]})}return c}const q=t=>{const n=new Float32Array(t.width*t.height);for(let a=0;a<n.length;a++)n[a]=.2126*(t.data[a*4]??0)+.7152*(t.data[a*4+1]??0)+.0722*(t.data[a*4+2]??0);return n};export function pictureShift(t,n,a){const d=Math.min(t.width,n.width),r=Math.min(t.height,n.height),i=q(t),w=q(n),x=(f,g)=>{let m=0,M=0;for(let p=Math.max(0,g);p<Math.min(r,r+g);p++){const v=p-g;for(let b=Math.max(0,f);b<Math.min(d,d+f);b++)m+=Math.abs((w[p*n.width+b]??0)-(i[v*t.width+(b-f)]??0)),M++}return M>=d*r/2?m/M:1/0},c=x(0,0);let e={dx:0,dy:0,c};const l=new Map,o=Math.max(0,Math.round(a));for(let f=-o;f<=o;f++)for(let g=-o;g<=o;g++){const m=x(g,f);l.set(`${String(g)},${String(f)}`,m),(m<e.c-1e-9||Math.abs(m-e.c)<=1e-9&&Math.hypot(g,f)<Math.hypot(e.dx,e.dy))&&(e={dx:g,dy:f,c:m})}const u=(f,g)=>l.get(`${String(f)},${String(g)}`)??1/0,s=(f,g,m)=>{if(!Number.isFinite(f)||!Number.isFinite(m))return 0;const M=f-2*g+m;return M>1e-9?Math.max(-.5,Math.min(.5,(f-m)/(2*M))):0},h=s(u(e.dx-1,e.dy),e.c,u(e.dx+1,e.dy)),F=s(u(e.dx,e.dy-1),e.c,u(e.dx,e.dy+1));return{dx:e.c<c-1e-9?e.dx+h:0,dy:e.c<c-1e-9?e.dy+F:0,error:y(e.c),still:y(c)}}export function pictureMotion(t,n,a,d,r){if(t.length<2)return;let i=0,w=0,x=0,c=0,e=0;for(let l=1;l<t.length;l++){const o=t[l-1],u=t[l];if(!o||!u)continue;const s=pictureShift(o,u,d);i+=s.dx,w+=s.dy,x+=s.error,c+=s.still,e++}if(e!==0)return{...L(i/e*a*n,w/e*a*n,r),match:y(x/e),still:y(c/e)}}export const FLASH_DEFAULTS={reach:1,width:160,noise:24,change:.005,frames:1,usual:2};export function flashOptions(t={}){const n=(a,d,r)=>{const i=t[a];return i===void 0||!Number.isFinite(i)||i<d?FLASH_DEFAULTS[a]:r?Math.round(i):i};return{reach:n("reach",1,!0),width:n("width",8,!0),noise:n("noise",0,!1),change:n("change",0,!1),frames:n("frames",1,!0),usual:n("usual",0,!1)}}export function frameChange(t,n,a){if(t.width!==n.width||t.height!==n.height)return{share:1,mean:255};const d=t.width*t.height;if(d===0)return{share:0,mean:0};let r=0,i=0;for(let w=0;w<d*4;w+=4){let x=0;for(let c=0;c<3;c++)x=Math.max(x,Math.abs((t.data[w+c]??0)-(n.data[w+c]??0)));i+=x,x>a&&r++}return{share:r/d,mean:i/d}}export function foreignPixels(t,n,a,d){if(t.width!==n.width||a.width!==n.width||t.height!==n.height||a.height!==n.height)return{share:1,mean:255};const r=n.width*n.height;if(r===0)return{share:0,mean:0};let i=0,w=0;for(let x=0;x<r*4;x+=4){let c=0;for(let e=0;e<3;e++){const l=t.data[x+e]??0,o=a.data[x+e]??0,u=n.data[x+e]??0;c=Math.max(c,Math.min(l,o)-u,u-Math.max(l,o))}w+=c,c>d&&i++}return{share:i/r,mean:w/r}}export async function flashRuns(t,n,a,d,r,i=!1,w=[]){const x=new Set(w),c=async(o,u)=>{if(x.has(u+1)&&o-2>=0){const s=await a(o-1);return{side:"before",step:frameChange(s,await a(o),r.noise),usual:frameChange(await a(o-2),s,r.noise)}}if(x.has(o)&&u+2<=n){const s=await a(u+1);return{side:"after",step:frameChange(await a(u),s,r.noise),usual:frameChange(s,await a(u+2),r.noise)}}},e=[],l=new Set;for(const o of t){let u=!1;for(let s=1;s<=r.frames&&!(u&&!i);s++){const h=o+s-1,F=o-1,f=h+1;if(F<0||f>n)continue;const g=`${String(o)}-${String(h)}`;if(l.has(g))continue;l.add(g);let m=!1;for(let S=o;S<=h&&!m;S++)m=await d(S,F)||await d(S,f);if(m&&!i)continue;const M=await a(F),p=await a(f);let v={share:1/0,mean:1/0};for(let S=o;S<=h;S++){const N=m?{share:0,mean:0}:foreignPixels(M,await a(S),p,r.noise);N.share<v.share&&(v=N)}if(!i&&v.share<r.change-1e-12)continue;const b=await c(o,h);!i&&b&&b.step.share<=r.usual*b.usual.share+1e-12||(u=!0,e.push({from:o,to:h,foreign:v,before:frameChange(M,await a(o),r.noise),after:frameChange(await a(h),p,r.noise),across:frameChange(M,p,r.noise),...b?{own:b}:{}}))}}return e}
@@ -0,0 +1,37 @@
1
+ import { z } from "zod";
2
+ import { PIECE_BRAND, type OutputDefinition, type PartSpec, type PieceCommon, type PieceContext } from "./piece.js";
3
+ /** A deck's (paged piece's) options. */
4
+ export interface PagedOptions {
5
+ /** Speaker notes: each page's `<prefix>.<page>.notes` (slides). */
6
+ notes?: boolean;
7
+ /** The look's name; default "clean". */
8
+ look?: string;
9
+ /** Prefix of the speaker notes' keys; default: the piece's id with `/` as `.`. */
10
+ prefix?: string;
11
+ /** How long loading it may take, seconds; default LOAD_LIMIT, 10 (AK-P002). */
12
+ loadLimit?: number;
13
+ /** How long one page may take to draw, seconds; default SEEK_LIMIT, 30 (AK-P003). */
14
+ seekLimit?: number;
15
+ }
16
+ export type PagedBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
17
+ /** Slides (any pages): the default export of an item's slides.ts, made by slides(). */
18
+ export interface PagedPiece extends PieceCommon, PagedOptions {
19
+ [PIECE_BRAND]: true;
20
+ kind: "paged";
21
+ /** Its pages, in order. A method, as VideoPiece's parts is. */
22
+ pages(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
23
+ }
24
+ export interface PagedOutput extends OutputDefinition<"paged"> {
25
+ build: PagedBuild;
26
+ options: PagedOptions;
27
+ }
28
+ /** A deck's options as metadata (its format is the piece's). */
29
+ export declare const PagedOptionsMeta: z.ZodObject<{
30
+ notes: z.ZodOptional<z.ZodBoolean>;
31
+ look: z.ZodOptional<z.ZodString>;
32
+ prefix: z.ZodOptional<z.ZodString>;
33
+ loadLimit: z.ZodOptional<z.ZodNumber>;
34
+ seekLimit: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strict>;
36
+ export type PagedOptionsMeta = z.infer<typeof PagedOptionsMeta>;
37
+ //# sourceMappingURL=slides.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as o}from"zod";import{MESSAGE_KEY as i}from"./messages.js";import"./piece.js";export const PagedOptionsMeta=o.strictObject({notes:o.boolean().optional(),look:o.string().min(1).optional(),prefix:o.string().regex(i).optional(),loadLimit:o.number().positive().optional(),seekLimit:o.number().positive().optional()});
@@ -0,0 +1,72 @@
1
+ import type { Word } from "./media.js";
2
+ import { type VoiceFrames } from "./voice.js";
3
+ /** What the sound summary counts by. */
4
+ export interface SoundParams {
5
+ /** A stretch with no word counts from this long, seconds. */
6
+ gap: number;
7
+ /** Seconds kept clear either side of a word: its breath and its tail are not the stretch's. */
8
+ edge: number;
9
+ /** A frame is voiced from this periodicity, 0–100. */
10
+ voiced: number;
11
+ }
12
+ export declare const SOUND_DEFAULTS: Readonly<SoundParams>;
13
+ /** The 10th, 50th and 90th percentile of levels (dBFS), and how long they last. */
14
+ export interface LevelStats {
15
+ seconds: number;
16
+ p10: number;
17
+ median: number;
18
+ p90: number;
19
+ }
20
+ /** A sound under and between its words. */
21
+ export interface SoundSummary extends SoundParams {
22
+ /** Every frame. */
23
+ whole: LevelStats;
24
+ /** The mean of the quietest tenth of the frames, dBFS. */
25
+ floor: number;
26
+ /** The frames during a word; absent without words. */
27
+ words?: LevelStats;
28
+ /** The frames clear of every word, in stretches of at least `gap`; absent where there are none. */
29
+ between?: LevelStats & {
30
+ /** The share of those frames that are voiced. */
31
+ voicedShare: number;
32
+ /** Onsets a minute there. */
33
+ onsetsPerMinute: number;
34
+ };
35
+ }
36
+ /**
37
+ * The sound under and between the words: frames during a word, frames in
38
+ * a stretch of at least `gap` seconds with no word within `edge` of it,
39
+ * and the whole; `onsets` are the onsets' times, counted between the
40
+ * words. Without words (`words` undefined: not heard) only the whole and
41
+ * the floor.
42
+ */
43
+ export declare function soundUnder(frames: VoiceFrames, words: readonly Word[] | undefined, onsets: readonly number[], params?: Partial<SoundParams>): SoundSummary;
44
+ /** A sound's pace: tempo, onsets and words a minute. */
45
+ export interface SoundPace {
46
+ /** The onsets' tempo, beats per minute, with how steady its beat is (0–1); null where none was found. */
47
+ tempo: {
48
+ bpm: number;
49
+ confidence: number;
50
+ } | null;
51
+ onsetsPerMinute: number;
52
+ /** Words a minute over the whole sound. */
53
+ wordsPerMinute: number;
54
+ /** Words a minute from the first word to the last. */
55
+ speakingRate: number;
56
+ /** The share of the sound words are said in. */
57
+ speechShare: number;
58
+ /** Seconds to the first word; null without words. */
59
+ timeToFirstWord: number | null;
60
+ }
61
+ /** The pace of a sound `duration` seconds long with this many onsets, this tempo and these words. */
62
+ export declare function paceOf(duration: number, onsets: number, tempo: {
63
+ bpm: number;
64
+ confidence: number;
65
+ } | undefined, words: readonly Word[]): SoundPace;
66
+ /**
67
+ * Words in time order, a word said again within `gap` seconds of itself
68
+ * joined into one: where two parts both carry the same word (a J or L
69
+ * cut's overlap), it is one word heard.
70
+ */
71
+ export declare function joinedWords(words: readonly Word[], gap: number): Word[];
72
+ //# sourceMappingURL=sound-under.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{frameDb as k}from"./voice.js";export const SOUND_DEFAULTS={gap:.2,edge:.05,voiced:50};const d=n=>Math.round(n*10)/10,b=n=>Math.round(n*1e3)/1e3;function m(n,h){const s=[...n].sort((e,i)=>e-i),o=e=>s[Math.min(s.length-1,Math.floor(e*s.length))]??-120;return{seconds:b(s.length*h),p10:d(o(.1)),median:d(o(.5)),p90:d(o(.9))}}export function soundUnder(n,h,s,o={}){const e={...SOUND_DEFAULTS,...o},i=n.db.length,p=[];for(let t=0;t<i;t++)p.push(k(n,t));const f=[...p].sort((t,c)=>t-c),u=f.slice(0,Math.max(1,Math.floor(f.length/10))),M=u.length?d(u.reduce((t,c)=>t+c,0)/u.length):-120,U={gap:e.gap,edge:e.edge,voiced:e.voiced,whole:m(p,n.hop),floor:M};if(!h)return U;const w=t=>t*n.hop,a=new Uint8Array(i),x=t=>Math.ceil(t/n.hop-1e-6);for(const t of h){const c=Math.max(0,x(t.start-e.edge)),r=Math.min(i-1,x(t.end+e.edge)-1);for(let l=c;l<=r;l++)l>=x(t.start)&&l<x(t.end)?a[l]=1:a[l]===0&&(a[l]=2)}const v=[],g=[];let D=0;const P=[];for(let t=0;t<i;){if(a[t]===1&&v.push(k(n,t)),a[t]!==0){t++;continue}let c=t;for(;c<i&&a[c]===0;)c++;if((c-t)*n.hop>=e.gap){P.push([w(t),w(c)]);for(let r=t;r<c;r++)g.push(k(n,r)),(n.voicing[r]??0)>=e.voiced&&D++}t=c}const F=s.filter(t=>P.some(([c,r])=>t>=c&&t<r)).length,A=g.length*n.hop/60;return{...U,...v.length>0?{words:m(v,n.hop)}:{},...g.length>0?{between:{...m(g,n.hop),voicedShare:b(D/g.length),onsetsPerMinute:A>0?d(F/A):0}}:{}}}const S=(n,h)=>h>0?d(n*60/h):0;export function paceOf(n,h,s,o){const e=o[0],i=o.at(-1),p=e&&i?i.end-e.start:0,f=o.reduce((u,M)=>u+Math.max(0,M.end-M.start),0);return{tempo:s?{bpm:s.bpm,confidence:s.confidence}:null,onsetsPerMinute:S(h,n),wordsPerMinute:S(o.length,n),speakingRate:S(o.length,p),speechShare:n>0?Math.min(1,b(f/n)):0,timeToFirstWord:e?b(e.start):null}}export function joinedWords(n,h){const s=[];for(const o of[...n].sort((e,i)=>e.start-i.start)){const e=s.at(-1);if(e?.text===o.text&&o.start-e.end<=h&&o.start>=e.start){s[s.length-1]={...e,end:Math.max(e.end,o.end)};continue}s.push({...o})}return s}
@@ -0,0 +1,83 @@
1
+ import type { MediaInfo, Word } from "./media.js";
2
+ /** Where `allyhub voice` puts the files of `say`, from the project root. */
3
+ export declare const SAY_DIR = "assets/media/gen/say";
4
+ /** The voice tool `say` uses when it names none. */
5
+ export declare const DEFAULT_VOICE_TOOL = "tts-elevenlabs-multilingual-v2";
6
+ /**
7
+ * FNV-1a, 64 bits, over the UTF-8 bytes: the same 16 hex digits in Node and
8
+ * the browser, synchronously.
9
+ */
10
+ export declare function hash64(text: string): string;
11
+ /**
12
+ * Where a value stops being plain JSON data (null, booleans, finite
13
+ * numbers, strings, and arrays and plain objects of them): its path, such
14
+ * as `params.style[2]`; undefined when it is plain JSON throughout.
15
+ */
16
+ export declare function notJson(v: unknown, path?: string): string | undefined;
17
+ /** Plain JSON data as text with every object's keys sorted: equal data, equal text. */
18
+ export declare function canonicalJson(v: unknown): string;
19
+ /**
20
+ * A `say`'s file without its extension: `assets/media/gen/say/<hash>`, the hash
21
+ * over the text as read aloud, the voice, the tool and the tool's extra
22
+ * parameters (when there are any). Changing any of them names another
23
+ * file, so an old one is never read for new text.
24
+ */
25
+ export declare function sayStem(say: {
26
+ text: string;
27
+ voice?: string | undefined;
28
+ tool?: string | undefined;
29
+ params?: Readonly<Record<string, unknown>> | undefined;
30
+ }): string;
31
+ /** The audio file of a stem among the project's media (any audio extension). */
32
+ export declare function mediaByStem(media: Readonly<Record<string, MediaInfo>>, stem: string): MediaInfo | undefined;
33
+ /**
34
+ * The words a part's speech plays, on the film's clock: the stretch of
35
+ * its take from `from`, or, for a cut take, the words inside each kept
36
+ * stretch at its place; at its speed (seconds of the file per second of
37
+ * film).
38
+ */
39
+ export declare function speechWords(words: readonly Word[], sp: {
40
+ start: number;
41
+ end: number;
42
+ from: number;
43
+ speed?: number | undefined;
44
+ cuts?: readonly {
45
+ at: number;
46
+ from: number;
47
+ }[] | undefined;
48
+ }): Word[];
49
+ /**
50
+ * The words said in a stretch of a take, moved onto another clock: the
51
+ * words that start in the `dur` seconds of that clock from the file's
52
+ * `from`, played `rate` seconds of the file per second (default 1), each
53
+ * at `at` plus its distance from `from` over the rate.
54
+ */
55
+ export declare function wordsIn(words: readonly Word[], from: number, dur: number, at: number, rate?: number): Word[];
56
+ /** Seconds a word takes to say, and a Chinese, Japanese or Korean character. */
57
+ export interface SpeechRate {
58
+ word?: number;
59
+ cjk?: number;
60
+ }
61
+ /** The rates a line's length is estimated at when nothing was measured. */
62
+ export declare const SPEECH_RATE_DEFAULTS: Required<SpeechRate>;
63
+ /** What a line's length is counted by: its words, and its CJK characters one by one. */
64
+ export declare function speechUnits(text: string): {
65
+ words: number;
66
+ cjk: number;
67
+ };
68
+ /**
69
+ * About how long a line takes to say, for a part whose speech is missing:
70
+ * an estimate from its words at `rate`, never under a second.
71
+ */
72
+ export declare function estimateSpeech(text: string, rate?: SpeechRate): number;
73
+ /**
74
+ * About how long a line would take to say, before there is sound for it.
75
+ * With `paced`, a line already spoken and the seconds its words took, it is
76
+ * that voice's own pace applied to the new words; else the rates above. An
77
+ * estimate either way: the sound, once made, is what counts.
78
+ */
79
+ export declare function speechLength(text: string, paced?: {
80
+ text: string;
81
+ seconds: number;
82
+ }, rate?: SpeechRate): number;
83
+ //# sourceMappingURL=speech.d.ts.map
@@ -0,0 +1,5 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{MEDIA_DIR as p}from"@allyhub-next/formats";export const SAY_DIR=`${p}/gen/say`,DEFAULT_VOICE_TOOL="tts-elevenlabs-multilingual-v2";export function hash64(n){let t=0xcbf29ce484222325n;const e=0x100000001b3n;for(const r of new TextEncoder().encode(n))t^=BigInt(r),t=t*e&0xffffffffffffffffn;return t.toString(16).padStart(16,"0")}export function notJson(n,t="value"){if(n===null||typeof n=="string"||typeof n=="boolean")return;if(typeof n=="number")return Number.isFinite(n)?void 0:t;if(typeof n!="object")return t;if(Array.isArray(n)){for(const[r,o]of n.entries()){const i=notJson(o,`${t}[${String(r)}]`);if(i!==void 0)return i}return}const e=Object.getPrototypeOf(n);if(e!==Object.prototype&&e!==null)return t;for(const[r,o]of Object.entries(n)){const i=notJson(o,`${t}.${r}`);if(i!==void 0)return i}}export function canonicalJson(n){if(Array.isArray(n))return`[${n.map(canonicalJson).join(",")}]`;if(typeof n=="object"&&n!==null){const t=n;return`{${Object.keys(t).sort().map(e=>`${JSON.stringify(e)}:${canonicalJson(t[e])}`).join(",")}}`}return JSON.stringify(n)}export function sayStem(n){const t=n.tool??DEFAULT_VOICE_TOOL,e=n.params&&Object.keys(n.params).length>0?`
3
+ ${canonicalJson(n.params)}`:"";return`${SAY_DIR}/${hash64(`${t}
4
+ ${n.voice??""}
5
+ ${n.text}${e}`)}`}export function mediaByStem(n,t){for(const[e,r]of Object.entries(n))if(r.kind==="audio"&&e.startsWith(`${t}.`)){const o=e.slice(t.length+1);if(!o.includes("/")&&!o.includes("."))return r}}export function speechWords(n,t){const e=t.speed??1,r=t.cuts;return!r||r.length===0?wordsIn(n,t.from,t.end-t.start,t.start,e):r.flatMap((o,i)=>{const c=r[i+1]?.at??t.end;return wordsIn(n,o.from,c-o.at,o.at,e)})}export function wordsIn(n,t,e,r,o=1){const i=s=>Math.round(s*1e3)/1e3,c=t+e*o,d=r-t,u=s=>i(o===1?s+d:r+(s-t)/o);return n.filter(s=>s.start>=t-1e-6&&s.start<c-1e-6).map(s=>({text:s.text,start:u(s.start),end:u(Math.min(s.end,c))}))}const a=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/gu;export const SPEECH_RATE_DEFAULTS={word:.38,cjk:.22};export function speechUnits(n){const t=n.match(a)?.length??0;return{words:n.replace(a," ").split(/\s+/u).filter(r=>/[\p{L}\p{N}]/u.test(r)).length,cjk:t}}const f=(n,t)=>{const{words:e,cjk:r}=speechUnits(n);return e*(t.word??SPEECH_RATE_DEFAULTS.word)+r*(t.cjk??SPEECH_RATE_DEFAULTS.cjk)};export function estimateSpeech(n,t={}){return Math.max(1,Math.round(f(n,t)*10)/10)}export function speechLength(n,t,e={}){const r=f(n,e),o=t===void 0?0:f(t.text,e),i=t!==void 0&&o>0&&t.seconds>0?t.seconds*r/o:r;return Math.round(i*10)/10}