@allyhub/sdk 0.1.0-alpha.8 → 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,465 @@
1
+ import type { SafeZone } from "./formats.js";
2
+ import type { Box } from "./problem.js";
3
+ import type { PixelRect, TimelineFootage } from "./timeline.js";
4
+ /** A block of text on screen at a moment: one layer's line or paragraph. */
5
+ export interface MeasuredText {
6
+ /** The layer's component name ("custom" for custom()). */
7
+ layer: string;
8
+ /** The plane it is drawn in. */
9
+ z: "front" | "behind-person" | "overlay";
10
+ text: string;
11
+ /** Its box in the frame's pixels, rounded. */
12
+ box: Box;
13
+ /** Inside a page viewport (a site demo): the page's own text. */
14
+ viewport?: true;
15
+ /**
16
+ * How opaque it is drawn, the lowest of its text nodes' (each the product
17
+ * of its element's and its ancestors'), when under 1.
18
+ */
19
+ opacity?: number;
20
+ /**
21
+ * The box of what shows of its glyphs, when not `box`: the rows they
22
+ * cover (a line's box is the font's whole ascent and descent, taller
23
+ * than what is drawn), cut where an ancestor clips its content. Blocks of
24
+ * one layer, and a block and the boxes it is drawn inside, are compared
25
+ * by it.
26
+ */
27
+ ink?: Box;
28
+ /**
29
+ * The font families its characters are drawn in, in the order they first
30
+ * draw one: by the faces the page declares and their ranges, as the
31
+ * browser picks them (the runtime's drawnFamilies).
32
+ */
33
+ fonts?: string[];
34
+ }
35
+ /** What makes an element a box one can see: a background, a border, a shadow. */
36
+ export type BoxPaint = "background" | "border" | "shadow";
37
+ /**
38
+ * A box a text block is drawn inside: an element between the block and its
39
+ * layer with a background, a border or a shadow (the block's own element
40
+ * too), nearest first.
41
+ */
42
+ export interface TextContainer {
43
+ /** In the frame's pixels, rounded. */
44
+ box: Box;
45
+ paint: BoxPaint[];
46
+ }
47
+ /** A text block reaching outside a box it is drawn inside. */
48
+ export interface TextOutside {
49
+ text: number;
50
+ /** The nearest box it reaches out of. */
51
+ container: TextContainer;
52
+ /** Per edge of that box it crosses: pixels past the edge. */
53
+ edges: {
54
+ side: "top" | "bottom" | "left" | "right";
55
+ px: number;
56
+ }[];
57
+ }
58
+ /** Two text blocks drawn over each other. */
59
+ export interface TextOverlap {
60
+ /** Indices into the moment's texts. */
61
+ a: number;
62
+ b: number;
63
+ /** Pixels both cover. */
64
+ area: number;
65
+ /** That area as a share of the smaller block's box (0–1). */
66
+ share: number;
67
+ }
68
+ /** A text block over the speaker's face. */
69
+ export interface FaceOverlap {
70
+ text: number;
71
+ area: number;
72
+ /** Share of the text block's box. */
73
+ ofText: number;
74
+ /** Share of the face's box. */
75
+ ofFace: number;
76
+ }
77
+ /** A text block reaching into the area a platform's interface covers (not a page viewport's own text). */
78
+ export interface SafeOverlap {
79
+ text: number;
80
+ /** Per covered edge it reaches into: pixels in from that edge's line. */
81
+ edges: {
82
+ side: "top" | "bottom" | "left" | "right";
83
+ px: number;
84
+ }[];
85
+ }
86
+ /**
87
+ * A text block the frame's edges cut: what shows of its glyphs (the rows
88
+ * each line's glyphs cover, the columns of its letters, after the boxes it
89
+ * is drawn inside clip it) that lies outside the frame.
90
+ */
91
+ export interface TextOffFrame {
92
+ text: number;
93
+ /** Pixels of its glyphs outside the frame. */
94
+ outside: number;
95
+ /** That as a share of its glyphs' pixels (0–1; 1: none of them inside). */
96
+ share: number;
97
+ /** Per edge of the frame it crosses: pixels past the edge. */
98
+ edges: {
99
+ side: "top" | "bottom" | "left" | "right";
100
+ px: number;
101
+ }[];
102
+ /** The box round its glyphs, whole pixels, the frame not cutting it. */
103
+ glyphs: Box;
104
+ }
105
+ export interface LayoutMoment {
106
+ /** Film seconds, on the frame grid. */
107
+ t: number;
108
+ part: string;
109
+ texts: MeasuredText[];
110
+ /** The speaker's face, when the footage showing has a face track. */
111
+ face?: Box;
112
+ /** Blocks of different layers over each other. */
113
+ overlaps: TextOverlap[];
114
+ /** Blocks of the same layer over each other. */
115
+ ownOverlaps: TextOverlap[];
116
+ /** Blocks reaching outside a box they are drawn inside. */
117
+ outside: TextOutside[];
118
+ faceOverlaps: FaceOverlap[];
119
+ safeOverlaps: SafeOverlap[];
120
+ /** Blocks the frame's edges cut. */
121
+ offFrame: TextOffFrame[];
122
+ }
123
+ /** A footage layer's enlargement at one moment. */
124
+ export interface ScaleAt {
125
+ /** Output pixels per source pixel (1: its own pixels; 2: each source pixel drawn 2 × 2). */
126
+ scale: number;
127
+ /** Film seconds. */
128
+ t: number;
129
+ /** What makes up the scale then: the fit, and a zoom (punch-in or pullback) or box key. */
130
+ from: string[];
131
+ }
132
+ /**
133
+ * How much a footage layer is enlarged over its window: drawn pixels per
134
+ * source pixel at its largest and at its smallest.
135
+ */
136
+ export interface FootageScale {
137
+ part: string;
138
+ file: string;
139
+ /** The source's pixels, as displayed. */
140
+ source: [width: number, height: number];
141
+ /** The part of the source drawn (crop, reframe window), in its pixels. */
142
+ shown: [width: number, height: number];
143
+ /** The largest enlargement, at its first moment. */
144
+ max: ScaleAt;
145
+ /** The smallest enlargement, at its first moment. */
146
+ min: ScaleAt;
147
+ }
148
+ /** How the time a text can be read is measured (the text-time fact). */
149
+ export interface ReadOptions {
150
+ /** Seconds between the moments each part is looked at. */
151
+ every: number;
152
+ /** A block is whole while every text node of it is drawn at this opacity or more… */
153
+ opacity: number;
154
+ /** …and at least this share of each node's glyphs' box shows (an ancestor's overflow clips the rest). */
155
+ shown: number;
156
+ /**
157
+ * The phone a text's size is given on: its screen in points, held
158
+ * upright, the frame fitted inside it whole (a 16:9 frame across its
159
+ * width, a 9:16 one up its height).
160
+ */
161
+ phone: [width: number, height: number];
162
+ }
163
+ export declare const READ_DEFAULTS: ReadOptions;
164
+ /** How many of the phone's points a pixel of a frame is (`ReadOptions.phone`). */
165
+ export declare function phoneScale(frame: readonly [width: number, height: number], phone: readonly [width: number, height: number]): number;
166
+ /** A text block at one of the moments a part is looked at. */
167
+ export interface TextSample {
168
+ /** Film seconds. */
169
+ t: number;
170
+ text: string;
171
+ box: Box;
172
+ /** The lowest opacity of its text nodes. */
173
+ opacity: number;
174
+ /** The share of its glyphs' box that shows, the lowest of its text nodes' (an ancestor's overflow clips the rest). */
175
+ shown: number;
176
+ /** Its font size as drawn, in the frame's pixels (a transform's scale counted), the smallest of its text nodes'. */
177
+ size?: number;
178
+ /** Its font's lowercase x as drawn, in the frame's pixels, the smallest of its text nodes' with lowercase Latin letters. */
179
+ xHeight?: number;
180
+ }
181
+ /** How long one text block can be read. */
182
+ export interface TextTime {
183
+ part: string;
184
+ /** The text the block shows longest, where it is first whole (else first on screen). */
185
+ text: MeasuredText;
186
+ words: number;
187
+ chars: number;
188
+ /** Seconds that text shows whole. */
189
+ seconds: number;
190
+ /** When, in film seconds: [from, until]. */
191
+ spans: [from: number, until: number][];
192
+ /** Seconds that text is on screen at all. */
193
+ onScreen: number;
194
+ /** Film seconds it is first whole, else first on screen. */
195
+ first: number;
196
+ /**
197
+ * Its font size: the smallest it is drawn at while whole (else while on
198
+ * screen), in the frame's pixels and in points on the phone of
199
+ * `ReadOptions.phone`. Missing when it was not measured. `lowercase` is
200
+ * the height of its font's lowercase x the same way, for text with
201
+ * lowercase Latin letters: two faces at one size can draw their letters
202
+ * at very different heights (a handwriting face's are much smaller).
203
+ */
204
+ size?: TextSize;
205
+ }
206
+ /** A text's size in the frame's pixels and in points on a phone, with its lowercase letters' height. */
207
+ export interface TextSize {
208
+ px: number;
209
+ phone: number;
210
+ lowercase?: {
211
+ px: number;
212
+ phone: number;
213
+ };
214
+ }
215
+ export interface LayoutReport {
216
+ width: number;
217
+ height: number;
218
+ /** The format's covered edges, in pixels. */
219
+ safe: SafeZone;
220
+ moments: LayoutMoment[];
221
+ footage: FootageScale[];
222
+ /** How long each text block can be read (a video measured at its default moments). */
223
+ reading?: {
224
+ options: ReadOptions;
225
+ texts: TextTime[];
226
+ };
227
+ }
228
+ /** The words and characters of a text: word-like segments as the language breaks them, and characters that are not spaces. */
229
+ export declare function countWords(text: string): {
230
+ words: number;
231
+ chars: number;
232
+ };
233
+ /**
234
+ * How long one text block can be read, from what it showed at each moment
235
+ * its part was looked at (in order, `every` seconds apart; a moment it was
236
+ * not on screen has no sample). Its text is the one it shows longest (a
237
+ * line that comes in word by word, a number that counts up: what they
238
+ * settle on), the latest of equals. It is whole while it shows that text
239
+ * with every node at `opacity` or more and `shown` or more of its glyphs
240
+ * showing; each run of
241
+ * such moments counts from its first to `every` after its last, no later
242
+ * than `end`. Its size is the smallest its text is drawn at while whole
243
+ (else while on screen), and on a phone the frame (`o.frame`) fitted in
244
+ `options.phone`.
245
+ */
246
+ export declare function textTime(samples: readonly TextSample[], o: {
247
+ part: string;
248
+ layer: string;
249
+ z: MeasuredText["z"];
250
+ end: number;
251
+ frame: [width: number, height: number];
252
+ }, options?: ReadOptions): TextTime | undefined;
253
+ /** The words whole on screen at once in a part (the words-on-screen fact). */
254
+ export interface WordsAtOnce {
255
+ part: string;
256
+ /** The most words whole at once, with the characters and text blocks they are. */
257
+ words: number;
258
+ chars: number;
259
+ texts: number;
260
+ /** The first stretch with that many, in film seconds. */
261
+ from: number;
262
+ until: number;
263
+ /** Every change of the count over the part: from `t` on, `words` whole in `texts` blocks. */
264
+ steps: {
265
+ t: number;
266
+ words: number;
267
+ texts: number;
268
+ }[];
269
+ }
270
+ /**
271
+ * How many words are whole on screen at once, per part: the text blocks'
272
+ * whole spans (textTime) laid over each other. A block counts its words
273
+ * from the start of a span up to its end. A part none of whose texts is
274
+ * ever whole has none.
275
+ */
276
+ export declare function wordsAtOnce(texts: readonly TextTime[]): WordsAtOnce[];
277
+ /** The pixels two boxes both cover. */
278
+ export declare function overlapArea(a: Box | PixelRect, b: Box | PixelRect): number;
279
+ /** How two boxes overlap: the area, and its share of the smaller box. */
280
+ export declare function boxOverlap(a: Box | PixelRect, b: Box | PixelRect): {
281
+ area: number;
282
+ share: number;
283
+ } | undefined;
284
+ /**
285
+ * How far a box reaches into the covered edges of a frame W × H: pixels
286
+ * in from each covered edge's line, for the edges it crosses.
287
+ */
288
+ export declare function safeEdges(b: Box | PixelRect, safe: SafeZone, W: number, H: number): SafeOverlap["edges"];
289
+ /**
290
+ * How far a box reaches past the edges of another: pixels out per edge it
291
+ * crosses, whole pixels (under one is none).
292
+ */
293
+ export declare function outsideEdges(b: Box | PixelRect, inside: Box | PixelRect): TextOutside["edges"];
294
+ /**
295
+ * How much of a text's glyphs lies outside a frame W × H: `glyphs` are the
296
+ * boxes of what shows of them (a box per line), in the frame's pixels. The
297
+ * pixels outside, their share of all the glyphs' pixels, and per edge of
298
+ * the frame they cross, how far past it they reach (whole pixels: under
299
+ * one is none). Undefined when they cross no edge, or have no pixels.
300
+ */
301
+ export declare function offFrame(glyphs: readonly (Box | PixelRect)[], W: number, H: number): Omit<TextOffFrame, "text"> | undefined;
302
+ /** A text block the frame's edges cut at every measured moment of its part that shows it. */
303
+ export interface CutThroughout {
304
+ part: string;
305
+ /** The block at the moment the frame cuts most of it. */
306
+ text: MeasuredText;
307
+ /** The measured moments that show it, film seconds: the frame cuts it at each. */
308
+ moments: number[];
309
+ /** The moment the frame cuts most of it. */
310
+ t: number;
311
+ /** At that moment: its glyphs outside the frame, as `TextOffFrame`. */
312
+ worst: Omit<TextOffFrame, "text">;
313
+ }
314
+ /**
315
+ * The text blocks a report's measured moments never show whole inside the
316
+ * frame: in a part, a block (a layer's text, the same at each moment) that
317
+ * the frame's edges cut at every moment it is on screen. A block that
318
+ * slides in from past an edge and comes to rest inside is whole at some
319
+ * moment, and is not one; each moment of it stays a text-off-frame fact.
320
+ * A block wholly past the edges at a moment is not on screen then, so not
321
+ * cut. A page viewport's text is not measured against the frame.
322
+ */
323
+ export declare function cutThroughout(report: LayoutReport): CutThroughout[];
324
+ /**
325
+ * The facts of one moment: overlaps between text blocks (of different
326
+ * layers, and of the same layer), blocks reaching outside a box they are
327
+ * drawn inside, text over the face and in the covered edges.
328
+ */
329
+ export declare function measureMoment(o: {
330
+ t: number;
331
+ part: string;
332
+ texts: MeasuredText[];
333
+ face?: Box;
334
+ safe: SafeZone;
335
+ width: number;
336
+ height: number;
337
+ /** Which layer each text belongs to (an index): blocks of one layer and of two are told apart. */
338
+ owner: number[];
339
+ /**
340
+ * Per text, the boxes it is drawn inside, nearest first (absent: none
341
+ * measured). A block is compared with each in turn, and the nearest it
342
+ * reaches out of is reported.
343
+ */
344
+ containers?: (readonly TextContainer[] | undefined)[];
345
+ /**
346
+ * Per text, the box of what shows of its glyphs (MeasuredText.ink; absent:
347
+ * its box). Blocks of one layer are compared by it, and so is a block
348
+ * with the boxes it is drawn inside.
349
+ */
350
+ seen?: (Box | undefined)[];
351
+ /**
352
+ * Per text, the boxes of what shows of its glyphs, one per line, the
353
+ * frame's own edges not clipping them (absent: its `seen` box, else its
354
+ * box). The frame's edges are measured against them.
355
+ */
356
+ glyphs?: (readonly Box[] | undefined)[];
357
+ }): LayoutMoment;
358
+ /**
359
+ * How much a footage layer is enlarged over its window, at its largest and
360
+ * at its smallest: drawn pixels per source pixel, from the part of the
361
+ * source it shows (its crop, or the reframe window) and the picture it is
362
+ * drawn as, times its zoom (punch-ins, a pullback) and its box keys (a
363
+ * key's box against the first box, which places the picture). Measured at
364
+ * the window's first and last frames and at every key between them: eases
365
+ * move monotonically from key to key, so the extremes are at those
366
+ * moments. `outScale` is output pixels per drawn pixel (a small custom
367
+ * format is drawn larger and scaled down); `fps` puts the last moment on
368
+ * the window's last frame. Undefined when the source's size is not known.
369
+ */
370
+ export declare function footageScale(f: Pick<TimelineFootage, "part" | "file" | "start" | "end" | "crop" | "picture" | "zoom" | "boxes" | "fit"> & {
371
+ source?: {
372
+ width: number;
373
+ height: number;
374
+ };
375
+ }, outScale?: number, fps?: number): FootageScale | undefined;
376
+ /** Rows of the frame, [y0, y1]: from the top edge y0 to the bottom edge y1, in pixels. */
377
+ export type RowSpan = [y0: number, y1: number];
378
+ /** A band across the content box that nothing measured covers. */
379
+ export interface FreeBand {
380
+ /** Its rows, [top, bottom] edges in pixels. */
381
+ y: RowSpan;
382
+ /** Its columns: the content box's, [left, right] edges in pixels. */
383
+ x: [x0: number, x1: number];
384
+ /** y1 − y0. */
385
+ height: number;
386
+ }
387
+ /** The content box of a frame W × H: inside its covered edges, as columns and rows. */
388
+ export declare function contentBox(W: number, H: number, safe: SafeZone): {
389
+ x: [number, number];
390
+ y: [number, number];
391
+ };
392
+ /** Spans joined where they overlap or touch, top to bottom; empty spans dropped. */
393
+ export declare function unionSpans(spans: readonly RowSpan[]): RowSpan[];
394
+ /**
395
+ * The bands of a content box that none of the spans covers, top to
396
+ * bottom, each the content box's width. No threshold: a band one pixel
397
+ * high is a band.
398
+ */
399
+ export declare function freeBands(content: {
400
+ x: [number, number];
401
+ y: [number, number];
402
+ }, covered: readonly RowSpan[]): FreeBand[];
403
+ /**
404
+ * The rows a box covers where it reaches into the columns [x0, x1], rounded
405
+ * outwards to whole pixels; undefined when it does not reach them.
406
+ */
407
+ export declare function boxRows(b: Box | PixelRect, x: readonly [number, number]): RowSpan | undefined;
408
+ /** One thing on screen at one frame: a text block, a painted box, a picture. */
409
+ export interface TrackSample {
410
+ /** Film seconds. */
411
+ t: number;
412
+ /** Its box in the frame's pixels; absent while it does not show. */
413
+ box?: Box;
414
+ /** 0 while it does not show. */
415
+ opacity: number;
416
+ }
417
+ /** A thing followed frame by frame through a part. */
418
+ export interface Track {
419
+ part: string;
420
+ layer: string;
421
+ /** What it is: `text "…"`, `box`, or its tag for a picture (`img`, `svg`, `canvas`, `video`). */
422
+ what: string;
423
+ /** Where it is in the layer, as a selector. */
424
+ selector: string;
425
+ /** Its own `data-ak` name, when it has one (`named(el, name)`). */
426
+ name?: string;
427
+ /** One per frame looked at, in order. */
428
+ samples: TrackSample[];
429
+ }
430
+ /** A thing's largest change between two frames in a row, against the changes beside it. */
431
+ export interface Step {
432
+ part: string;
433
+ layer: string;
434
+ what: string;
435
+ selector: string;
436
+ /** `move`: its box's centre and size; `fade`: its opacity. */
437
+ kind: "move" | "fade";
438
+ /** Film seconds of the later frame. */
439
+ t: number;
440
+ /** Its box before and after (a fade from or to nothing has only one). */
441
+ from?: Box;
442
+ to?: Box;
443
+ /** Pixels its centre moved, and the most a side grew or shrank. */
444
+ px: number;
445
+ grew: number;
446
+ /** Its opacity before and after. */
447
+ opacity: [before: number, after: number];
448
+ /**
449
+ * The same change over the frame before and the frame after, the larger
450
+ * of the two: a thing gliding has about as much, a thing jumping far
451
+ * less.
452
+ */
453
+ around: number;
454
+ /** The change less `around`: pixels for a move, opacity for a fade. */
455
+ over: number;
456
+ }
457
+ /**
458
+ * Each track's largest step of each kind: where its box moved or changed
459
+ * size the most over the change beside it, and where its opacity did. A
460
+ * measurement, not a verdict: a cut inside a layer and a glitch both show
461
+ * as a large step with little around it. Sorted by `over`, moves and fades
462
+ * apart (pixels and opacity are not one scale), moves first.
463
+ */
464
+ export declare function largestSteps(tracks: readonly Track[]): Step[];
465
+ //# sourceMappingURL=measure.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{boxFit as F,zoomChannel as I}from"./footage-motion.js";import{keyAt as O,rectAt as $}from"./motion.js";export const READ_DEFAULTS={every:.2,opacity:.9,shown:.9,phone:[390,844]};export function phoneScale(t,o){return Math.min(o[0]/t[0],o[1]/t[1])}export function countWords(t){let o=0;for(const e of new Intl.Segmenter(void 0,{granularity:"word"}).segment(t))e.isWordLike&&o++;let a=0;for(const e of new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t))e.segment.trim()!==""&&a++;return{words:o,chars:a}}export function textTime(t,o,a=READ_DEFAULTS){const e=new Map;for(const x of t)e.set(x.text,(e.get(x.text)??0)+1);let c,f=0;for(const x of t){const w=e.get(x.text)??0;w>=f&&(f=w,c=x.text)}if(c===void 0)return;const u=t.filter(x=>x.text===c),h=x=>x.opacity>=a.opacity-1e-9&&x.shown>=a.shown-1e-9,i=a.every,n=x=>g(Math.min(x+i,o.end)),r=[];for(const x of u){if(!h(x))continue;const w=r.at(-1);w&&x.t-w[1]<i*.5?w[1]=n(x.t):r.push([g(x.t),n(x.t)])}const p=u.find(h)??u[0];if(!p)return;const l=(u.some(h)?u.filter(h):u).flatMap(x=>x.size===void 0?[]:[x.size]),m=l.length>0?Math.min(...l):void 0,s=(u.some(h)?u.filter(h):u).flatMap(x=>x.xHeight===void 0?[]:[x.xHeight]),d=s.length>0?Math.min(...s):void 0,M=phoneScale(o.frame,a.phone),v=x=>g(x.reduce((w,[k,A])=>w+Math.max(0,A-k),0)),y=[];for(const x of u){const w=y.at(-1);w&&x.t-w[1]<i*.5?w[1]=n(x.t):y.push([g(x.t),n(x.t)])}return{part:o.part,text:{layer:o.layer,z:o.z,text:c,box:p.box},...countWords(c),seconds:v(r),spans:r,onScreen:v(y),first:g(p.t),...m===void 0?{}:{size:{px:z(m),phone:z(m*M),...d===void 0?{}:{lowercase:{px:z(d),phone:z(d*M)}}}}}}export function wordsAtOnce(t){const o=new Map;for(const e of t){if(e.spans.length===0)continue;const c=o.get(e.part)??[];c.push(e),o.set(e.part,c)}const a=[];for(const[e,c]of o){const f=[...new Set(c.flatMap(i=>i.spans.flat()))].sort((i,n)=>i-n),u=[];let h;for(const[i,n]of f.entries()){const r=c.filter(m=>m.spans.some(([s,d])=>n>=s&&n<d)),p=r.reduce((m,s)=>m+s.words,0),l=u.at(-1);(l?.words!==p||l.texts!==r.length)&&u.push({t:n,words:p,texts:r.length}),r.length>0&&(!h||p>h.words)?h={words:p,chars:r.reduce((m,s)=>m+s.chars,0),texts:r.length,from:n,until:f[i+1]??n}:h?.until===n&&p===h.words&&(h.until=f[i+1]??n)}h&&a.push({part:e,...h,steps:u})}return a}const b=t=>Math.max(0,t[2])*Math.max(0,t[3]);export function overlapArea(t,o){const a=Math.min(t[0]+t[2],o[0]+o[2])-Math.max(t[0],o[0]),e=Math.min(t[1]+t[3],o[1]+o[3])-Math.max(t[1],o[1]);return a>0&&e>0?a*e:0}const g=t=>Math.round(t*1e3)/1e3,z=t=>Math.round(t*10)/10;export function boxOverlap(t,o){const a=overlapArea(t,o);if(a<=0)return;const e=Math.min(b(t),b(o));return{area:Math.round(a),share:e>0?g(a/e):0}}export function safeEdges(t,o,a,e){const[c,f,u,h]=t;return[["top",o.top>0?o.top-f:0],["bottom",o.bottom>0?f+h-(e-o.bottom):0],["left",o.left>0?o.left-c:0],["right",o.right>0?c+u-(a-o.right):0]].filter(([,n])=>n>=1).map(([n,r])=>({side:n,px:Math.round(r)}))}export function outsideEdges(t,o){return[["top",o[1]-t[1]],["bottom",t[1]+t[3]-(o[1]+o[3])],["left",o[0]-t[0]],["right",t[0]+t[2]-(o[0]+o[2])]].filter(([,e])=>e>=1).map(([e,c])=>({side:e,px:Math.round(c)}))}export function offFrame(t,o,a){let e=0,c=0;const f={top:0,bottom:0,left:0,right:0};let[u,h,i,n]=[1/0,1/0,-1/0,-1/0];for(const s of t)s[2]<=0||s[3]<=0||(u=Math.min(u,s[0]),h=Math.min(h,s[1]),i=Math.max(i,s[0]+s[2]),n=Math.max(n,s[1]+s[3]),e+=b(s),c+=overlapArea(s,[0,0,o,a]),f.top=Math.max(f.top,-s[1]),f.bottom=Math.max(f.bottom,s[1]+s[3]-a),f.left=Math.max(f.left,-s[0]),f.right=Math.max(f.right,s[0]+s[2]-o));if(e<=0)return;const r=["top","bottom","left","right"].filter(s=>f[s]>=1).map(s=>({side:s,px:Math.round(f[s])}));if(r.length===0)return;const p=Math.max(0,e-c),l=Math.round(u),m=Math.round(h);return{outside:Math.round(p),share:g(p/e),edges:r,glyphs:[l,m,Math.round(i)-l,Math.round(n)-m]}}export function cutThroughout(t){const o=new Map;for(const e of t.moments){const c=new Map(e.offFrame.map(u=>[u.text,u])),f=new Set;e.texts.forEach((u,h)=>{if(u.viewport)return;const i=c.get(h);if(i&&i.share>=1)return;const n=`${e.part}
3
+ ${u.layer}
4
+ ${u.z}
5
+ ${u.text}`;if(f.has(n))return;f.add(n);let r=o.get(n);if(r||(r={part:e.part,shown:0,cut:void 0},o.set(n,r)),r.shown++,!i)return;const p={outside:i.outside,share:i.share,edges:i.edges,glyphs:i.glyphs};if(!r.cut){r.cut={part:e.part,text:u,moments:[e.t],t:e.t,worst:p};return}r.cut.moments.push(e.t),i.share>r.cut.worst.share&&(r.cut.text=u,r.cut.t=e.t,r.cut.worst=p)})}const a=[];for(const e of o.values())e.cut?.moments.length===e.shown&&a.push(e.cut);return a}export function measureMoment(t){const o=[],a=[],e=n=>t.seen?.[n]??t.texts[n]?.box;for(let n=0;n<t.texts.length;n++)for(let r=n+1;r<t.texts.length;r++){const p=t.texts[n],l=t.texts[r];if(!p||!l)continue;if(t.owner[n]===t.owner[r]){const s=e(n),d=e(r),M=s&&d?boxOverlap(s,d):void 0;M&&a.push({a:n,b:r,...M});continue}const m=boxOverlap(p.box,l.box);m&&o.push({a:n,b:r,...m})}const c=[];t.texts.forEach((n,r)=>{const p=e(r);if(!(!p||n.viewport))for(const l of t.containers?.[r]??[]){const m=outsideEdges(p,l.box);if(m.length!==0){c.push({text:r,container:l,edges:m});break}}});const f=[],u=t.face;u&&t.texts.forEach((n,r)=>{const p=overlapArea(n.box,u);p<=0||f.push({text:r,area:Math.round(p),ofText:g(p/Math.max(1,b(n.box))),ofFace:g(p/Math.max(1,b(u)))})});const h=[];t.texts.forEach((n,r)=>{if(n.viewport)return;const p=safeEdges(n.box,t.safe,t.width,t.height);p.length>0&&h.push({text:r,edges:p})});const i=[];return t.texts.forEach((n,r)=>{if(n.viewport)return;const p=e(r),l=offFrame(t.glyphs?.[r]??(p?[p]:[]),t.width,t.height);l&&i.push({text:r,...l})}),{t:t.t,part:t.part,texts:t.texts,...u?{face:u}:{},overlaps:o,ownOverlaps:a,outside:c,faceOverlaps:f,safeOverlaps:h,offFrame:i}}export function footageScale(t,o=1,a){const e=t.crop;if(!e||!t.source||e[2]<=0||e[3]<=0)return;const c=t.picture,f=t.zoom&&t.zoom.length>0?I(t.zoom,"z"):[],u=t.boxes&&t.boxes.length>1?t.boxes:void 0,h=u?.[0]?.box,i=u?.map(s=>({t:s.t,rect:s.box,...s.ease?{ease:s.ease}:{}})),n=Math.max(t.start,a?t.end-1/a:t.end),r=[t.start,...f.map(s=>s.t),...(u??[]).map(s=>s.t),n].map(s=>Math.min(Math.max(s,t.start),n)).sort((s,d)=>s-d),p=s=>{const d=f.length>0?O(f,s):1,M=i&&h?F(t,h,$(i,s)):1,v=Math.max(c[2]*M/e[2],c[3]*M/e[3])*d*o,y=[t.fit];return Math.abs(d-1)>1e-6&&y.push(`zoom ${String(g(d))}×`),i&&Math.abs(M-1)>1e-6&&y.push(`box key ${String(g(M))}×`),{scale:g(v),t:g(s),from:y}};let l=p(t.start),m=l;for(const s of r){const d=p(s);d.scale>l.scale&&(l=d),d.scale<m.scale&&(m=d)}return{part:t.part,file:t.file,source:[t.source.width,t.source.height],shown:[Math.round(e[2]),Math.round(e[3])],max:l,min:m}}export function contentBox(t,o,a){return{x:[a.left,Math.max(a.left,t-a.right)],y:[a.top,Math.max(a.top,o-a.bottom)]}}export function unionSpans(t){const o=t.filter(([e,c])=>c>e).map(([e,c])=>[e,c]).sort((e,c)=>e[0]-c[0]),a=[];for(const e of o){const c=a.at(-1);c&&e[0]<=c[1]?c[1]=Math.max(c[1],e[1]):a.push(e)}return a}export function freeBands(t,o){const[a,e]=t.y,c=[];let f=a;const u=(h,i)=>{i>h&&c.push({y:[h,i],x:[t.x[0],t.x[1]],height:i-h})};for(const[h,i]of unionSpans(o))if(!(i<=f)){if(h>=e)break;u(f,Math.min(h,e)),f=Math.max(f,i)}return u(f,e),c}export function boxRows(t,o){if(!(t[2]<=0||t[3]<=0)&&!(t[0]>=o[1]||t[0]+t[2]<=o[0]))return[Math.floor(t[1]),Math.ceil(t[1]+t[3])]}const S=t=>[t[0]+t[2]/2,t[1]+t[3]/2];function E(t,o){if(!t.box||!o.box)return{px:0,grew:0};const[a,e]=S(t.box),[c,f]=S(o.box);return{px:Math.hypot(c-a,f-e),grew:Math.max(Math.abs(o.box[2]-t.box[2]),Math.abs(o.box[3]-t.box[3]))}}export function largestSteps(t){const o=[];for(const e of t){const c=e.samples.length,f=[],u=[];for(let h=1;h<c;h++){const i=e.samples[h-1],n=e.samples[h];if(!i||!n)continue;const r=E(i,n);f[h]=Math.max(r.px,r.grew),u[h]=Math.abs(n.opacity-i.opacity)}for(const[h,i]of[["move",f],["fade",u]]){let n=-1,r=0;for(let s=1;s<c;s++){const M=(i[s]??0)-Math.max(i[s-1]??0,i[s+1]??0);M>r+1e-9&&(n=s,r=M)}const p=e.samples[n-1],l=e.samples[n];if(n<1||!p||!l)continue;const m=E(p,l);o.push({part:e.part,layer:e.layer,what:e.what,selector:e.selector,kind:h,t:g(l.t),...p.box?{from:p.box}:{},...l.box?{to:l.box}:{},px:g(m.px),grew:g(m.grew),opacity:[g(p.opacity),g(l.opacity)],around:g(Math.max(i[n-1]??0,i[n+1]??0)),over:g(r)})}}const a=e=>e.kind==="move"?0:1;return o.sort((e,c)=>a(e)-a(c)||c.over-e.over)}