@allyhub/sdk 0.8.0 → 0.9.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 (438) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/NOTICE +46 -49
  3. package/dist/dom.d.ts +1 -209
  4. package/dist/dom.js +1 -1
  5. package/dist/image.d.ts +2 -0
  6. package/dist/image.js +2 -0
  7. package/dist/index.d.ts +1 -21
  8. package/dist/index.js +1 -1
  9. package/dist/media.d.ts +1 -5
  10. package/dist/media.js +1 -1
  11. package/dist/node_modules/@allyhub/audio/dist/levels.d.ts +4 -5
  12. package/dist/node_modules/@allyhub/audio/dist/levels.js +1 -1
  13. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.d.ts +1 -6
  14. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +1 -1
  15. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  16. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
  17. package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +1 -1
  18. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  19. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  20. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  21. package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
  22. package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
  23. package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
  24. package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
  25. package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
  26. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
  27. package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
  28. package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
  29. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
  30. package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
  31. package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
  32. package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
  33. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  34. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
  35. package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
  36. package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
  37. package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
  38. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +20 -82
  39. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  40. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +96 -8
  41. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  42. package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
  43. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  44. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  45. package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
  46. package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
  47. package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
  48. package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
  49. package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
  50. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
  51. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  52. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
  53. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  54. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
  55. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  56. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +46 -42
  57. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  58. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  59. package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
  60. package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
  61. package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
  62. package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
  63. package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
  64. package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
  65. package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
  66. package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
  67. package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
  68. package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
  69. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
  70. package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
  71. package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
  72. package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
  73. package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
  74. package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
  75. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
  76. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
  77. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
  78. package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
  79. package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
  80. package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
  81. package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
  82. package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
  83. package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
  84. package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
  85. package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
  86. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
  87. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
  88. package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
  89. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
  90. package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
  91. package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
  92. package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
  93. package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
  94. package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
  95. package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
  96. package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
  97. package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
  98. package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
  99. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
  100. package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
  101. package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
  102. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
  103. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
  104. package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
  105. package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
  106. package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
  107. package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
  108. package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
  109. package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
  110. package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
  111. package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
  112. package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
  113. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
  114. package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
  115. package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
  116. package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
  117. package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
  118. package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
  119. package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
  120. package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
  121. package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
  122. package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
  123. package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
  124. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
  125. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
  126. package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
  127. package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
  128. package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
  129. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
  130. package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
  131. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
  132. package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
  133. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
  134. package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
  135. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
  136. package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
  137. package/dist/node_modules/@allyhub/measure/package.json +13 -0
  138. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
  139. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
  140. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
  141. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  142. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  143. package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
  144. package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
  145. package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
  146. package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
  147. package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
  148. package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
  149. package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
  150. package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
  151. package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
  152. package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
  153. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
  154. package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
  155. package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
  156. package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
  157. package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
  158. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
  159. package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
  160. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +421 -0
  161. package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
  162. package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
  163. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
  164. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
  165. package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
  166. package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
  167. package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
  168. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
  169. package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
  170. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
  171. package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
  172. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
  173. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
  174. package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
  175. package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
  176. package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
  177. package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
  178. package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
  179. package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
  180. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
  181. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +285 -0
  182. package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
  183. package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
  184. package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
  185. package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
  186. package/dist/node_modules/@allyhub/piece/package.json +18 -0
  187. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +139 -0
  188. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  189. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
  190. package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
  191. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
  192. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  193. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +2 -0
  194. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  195. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +232 -132
  196. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  197. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
  198. package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
  199. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +22 -9
  200. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  201. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
  202. package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
  203. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +5 -0
  204. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  205. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  206. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
  207. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
  208. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +273 -0
  209. package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
  210. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +26 -0
  211. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  212. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
  213. package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
  214. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
  215. package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
  216. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
  217. package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
  218. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
  219. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  220. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
  221. package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
  222. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
  223. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  224. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
  225. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  226. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
  227. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  228. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  229. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  230. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
  231. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
  232. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
  233. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
  234. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
  235. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  236. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
  237. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
  238. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
  239. package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
  240. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  241. package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
  242. package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
  243. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  244. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  245. package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
  246. package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
  247. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
  248. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
  250. package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
  252. package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
  253. package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
  254. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  255. package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
  257. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +3 -4
  258. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  259. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +76 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
  261. package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
  262. package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
  263. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
  264. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +6 -6
  265. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  266. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -0
  267. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  268. package/dist/node_modules/@allyhub/sheet/package.json +5 -1
  269. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
  270. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  271. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +44 -4
  272. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  273. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  274. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
  275. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  276. package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
  277. package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
  278. package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
  279. package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +208 -0
  280. package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
  281. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
  282. package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
  283. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
  284. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  285. package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
  286. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  287. package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
  288. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  289. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +19 -2
  290. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
  291. package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
  292. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +17 -10
  293. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  294. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
  295. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
  296. package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
  297. package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
  298. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  299. package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
  300. package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
  301. package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
  302. package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
  303. package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
  304. package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
  305. package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
  306. package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
  307. package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
  308. package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
  309. package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
  310. package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
  311. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
  312. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  313. package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
  314. package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
  315. package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
  316. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
  317. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
  318. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
  319. package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
  320. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +22 -430
  321. package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
  322. package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
  323. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +6 -12
  324. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  325. package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
  326. package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
  327. package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
  328. package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
  329. package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
  330. package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
  331. package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
  332. package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
  333. package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
  334. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
  335. package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
  336. package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
  337. package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
  338. package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
  339. package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
  340. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  341. package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
  342. package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
  343. package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
  344. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
  345. package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
  346. package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
  347. package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
  348. package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
  349. package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
  350. package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
  351. package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
  352. package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
  353. package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
  354. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
  355. package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
  356. package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
  357. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
  358. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
  359. package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
  360. package/dist/scenery.d.ts +1 -1
  361. package/dist/scenery.js +1 -1
  362. package/dist/sheets.d.ts +1 -1
  363. package/dist/sheets.js +1 -1
  364. package/dist/slides.d.ts +1 -9
  365. package/dist/slides.js +1 -1
  366. package/docs/README.md +8 -6
  367. package/docs/batches.md +5 -5
  368. package/docs/contract.md +2 -2
  369. package/docs/defaults.md +278 -20
  370. package/docs/docs.md +77 -63
  371. package/docs/footage.md +7 -7
  372. package/docs/image.md +165 -0
  373. package/docs/layers.md +22 -13
  374. package/docs/modeling.md +4 -4
  375. package/docs/pictures.md +65 -0
  376. package/docs/project.md +51 -31
  377. package/docs/scenery.md +11 -11
  378. package/docs/sheets.md +26 -25
  379. package/docs/slides.md +73 -65
  380. package/docs/sound.md +3 -3
  381. package/docs/speech.md +8 -8
  382. package/docs/video.md +16 -13
  383. package/docs/websites.md +4 -4
  384. package/package.json +7 -2
  385. package/dist/define.js +0 -2
  386. package/dist/free.js +0 -2
  387. package/dist/input.js +0 -2
  388. package/dist/module.js +0 -2
  389. package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
  390. package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
  391. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
  392. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
  393. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
  394. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
  395. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
  396. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
  397. package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
  398. package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
  399. package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
  400. package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
  401. package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
  402. package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
  403. package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
  404. package/dist/parts.js +0 -2
  405. package/dist/piece.js +0 -2
  406. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
  407. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
  408. /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
  409. /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
  410. /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
  411. /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
  412. /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
  413. /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
  414. /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
  415. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
  416. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
  417. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
  418. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
  419. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
  420. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
  421. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
  422. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
  423. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
  424. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
  425. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
  426. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
  427. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
  428. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
  429. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
  430. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
  431. /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
  432. /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
  433. /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
  434. /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
  435. /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
  436. /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
  437. /package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +0 -0
  438. /package/dist/{phone.js → node_modules/@allyhub/video-sdk/dist/phone.js} +0 -0
@@ -1,5 +1,2 @@
1
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 $,rectAt as L}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,u=0;for(const x of t){const w=e.get(x.text)??0;w>=u&&(u=w,c=x.text)}if(c===void 0)return;const h=t.filter(x=>x.text===c),f=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 h){if(!f(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=h.find(f)??h[0];if(!p)return;const l=(h.some(f)?h.filter(f):h).flatMap(x=>x.size===void 0?[]:[x.size]),m=l.length>0?Math.min(...l):void 0,s=(h.some(f)?h.filter(f):h).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,[O,A])=>w+Math.max(0,A-O),0)),y=[];for(const x of h){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)}}}}}}const S=t=>t.toLowerCase().replace(/[^\p{L}\p{N}]/gu,"");export function speechShown(t,o){const a=new Set(o.flatMap(u=>u.split(/\s+/u).map(S))),e=t.split(/\s+/u).filter(u=>S(u)!==""),c=e.filter(u=>!a.has(S(u)));return{words:e.length,shown:e.length-c.length,unshown:[...new Set(c.map(S))]}}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 u=[...new Set(c.flatMap(i=>i.spans.flat()))].sort((i,n)=>i-n),h=[];let f;for(const[i,n]of u.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=h.at(-1);(l?.words!==p||l.texts!==r.length)&&h.push({t:n,words:p,texts:r.length}),r.length>0&&(!f||p>f.words)?f={words:p,chars:r.reduce((m,s)=>m+s.chars,0),texts:r.length,from:n,until:u[i+1]??n}:f?.until===n&&p===f.words&&(f.until=u[i+1]??n)}f&&a.push({part:e,...f,steps:h})}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,u,h,f]=t;return[["top",o.top>0?o.top-u:0],["bottom",o.bottom>0?u+f-(e-o.bottom):0],["left",o.left>0?o.left-c:0],["right",o.right>0?c+h-(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 u={top:0,bottom:0,left:0,right:0};let[h,f,i,n]=[1/0,1/0,-1/0,-1/0];for(const s of t)s[2]<=0||s[3]<=0||(h=Math.min(h,s[0]),f=Math.min(f,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]),u.top=Math.max(u.top,-s[1]),u.bottom=Math.max(u.bottom,s[1]+s[3]-a),u.left=Math.max(u.left,-s[0]),u.right=Math.max(u.right,s[0]+s[2]-o));if(e<=0)return;const r=["top","bottom","left","right"].filter(s=>u[s]>=1).map(s=>({side:s,px:Math.round(u[s])}));if(r.length===0)return;const p=Math.max(0,e-c),l=Math.round(h),m=Math.round(f);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(h=>[h.text,h])),u=new Set;e.texts.forEach((h,f)=>{if(h.viewport)return;const i=c.get(f);if(i&&i.share>=1)return;const n=`${e.part}
3
- ${h.layer}
4
- ${h.z}
5
- ${h.text}`;if(u.has(n))return;u.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:h,moments:[e.t],t:e.t,worst:p};return}r.cut.moments.push(e.t),i.share>r.cut.worst.share&&(r.cut.text=h,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 u=[],h=t.face;h&&t.texts.forEach((n,r)=>{const p=overlapArea(n.box,h);p<=0||u.push({text:r,area:Math.round(p),ofText:g(p/Math.max(1,b(n.box))),ofFace:g(p/Math.max(1,b(h)))})});const f=[];t.texts.forEach((n,r)=>{if(n.viewport)return;const p=safeEdges(n.box,t.safe,t.width,t.height);p.length>0&&f.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,...h?{face:h}:{},overlaps:o,ownOverlaps:a,outside:c,faceOverlaps:u,safeOverlaps:f,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,u=t.zoom&&t.zoom.length>0?I(t.zoom,"z"):[],h=t.boxes&&t.boxes.length>1?t.boxes:void 0,f=h?.[0]?.box,i=h?.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,...u.map(s=>s.t),...(h??[]).map(s=>s.t),n].map(s=>Math.min(Math.max(s,t.start),n)).sort((s,d)=>s-d),p=s=>{const d=u.length>0?$(u,s):1,M=i&&f?F(t,f,L(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 u=a;const h=(f,i)=>{i>f&&c.push({y:[f,i],x:[t.x[0],t.x[1]],height:i-f})};for(const[f,i]of unionSpans(o))if(!(i<=u)){if(f>=e)break;h(u,Math.min(f,e)),u=Math.max(u,i)}return h(u,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 E=t=>[t[0]+t[2]/2,t[1]+t[3]/2];function k(t,o){if(!t.box||!o.box)return{px:0,grew:0};const[a,e]=E(t.box),[c,u]=E(o.box);return{px:Math.hypot(c-a,u-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,u=[],h=[];for(let f=1;f<c;f++){const i=e.samples[f-1],n=e.samples[f];if(!i||!n)continue;const r=k(i,n);u[f]=Math.max(r.px,r.grew),h[f]=Math.abs(n.opacity-i.opacity)}for(const[f,i]of[["move",u],["fade",h]]){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=k(p,l);o.push({part:e.part,layer:e.layer,what:e.what,selector:e.selector,kind:f,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)}
2
+ import{READ_DEFAULTS as G,countWords as I,phoneScale as K}from"@allyhub/piece";import{boxFit as V,zoomChannel as W}from"./footage-motion.js";import{keyAt as J,rectAt as Q}from"./motion.js";export function textTime(t,r,i=G){const o=new Map;for(const h of t)o.set(h.text,(o.get(h.text)??0)+1);let a,p=0;for(const h of t){const w=o.get(h.text)??0;w>=p&&(p=w,a=h.text)}if(a===void 0)return;const x=t.filter(h=>h.text===a),e=h=>h.opacity>=i.opacity-1e-9&&h.shown>=i.shown-1e-9,n=i.every,c=h=>d(Math.min(h+n,r.end)),m=[];for(const h of x){if(!e(h))continue;const w=m.at(-1);w&&h.t-w[1]<n*.5?w[1]=c(h.t):m.push([d(h.t),c(h.t)])}const u=x.find(e)??x[0];if(!u)return;const f=(x.some(e)?x.filter(e):x).flatMap(h=>h.size===void 0?[]:[h.size]),b=f.length>0?Math.min(...f):void 0,s=(x.some(e)?x.filter(e):x).flatMap(h=>h.xHeight===void 0?[]:[h.xHeight]),l=s.length>0?Math.min(...s):void 0,g=K(r.frame,i.phone),z=h=>d(h.reduce((w,[S,F])=>w+Math.max(0,F-S),0)),y=[];for(const h of x){const w=y.at(-1);w&&h.t-w[1]<n*.5?w[1]=c(h.t):y.push([d(h.t),c(h.t)])}return{part:r.part,text:{layer:r.layer,z:r.z,text:a,box:u.box},...I(a),seconds:z(m),spans:m,onScreen:z(y),first:d(u.t),...b===void 0?{}:{size:{px:T(b),phone:T(b*g),...l===void 0?{}:{lowercase:{px:T(l),phone:T(l*g)}}}}}}const L=t=>t.toLowerCase().replace(/[^\p{L}\p{N}]/gu,"");export function speechShown(t,r){const i=new Set(r.flatMap(p=>p.split(/\s+/u).map(L))),o=t.split(/\s+/u).filter(p=>L(p)!==""),a=o.filter(p=>!i.has(L(p)));return{words:o.length,shown:o.length-a.length,unshown:[...new Set(a.map(L))]}}export function wordsAtOnce(t){const r=new Map;for(const o of t){if(o.spans.length===0)continue;const a=r.get(o.part)??[];a.push(o),r.set(o.part,a)}const i=[];for(const[o,a]of r){const p=[...new Set(a.flatMap(n=>n.spans.flat()))].sort((n,c)=>n-c),x=[];let e;for(const[n,c]of p.entries()){const m=a.filter(b=>b.spans.some(([s,l])=>c>=s&&c<l)),u=m.reduce((b,s)=>b+s.words,0),f=x.at(-1);(f?.words!==u||f.texts!==m.length)&&x.push({t:c,words:u,texts:m.length}),m.length>0&&(!e||u>e.words)?e={words:u,chars:m.reduce((b,s)=>b+s.chars,0),texts:m.length,from:c,until:p[n+1]??c}:e?.until===c&&u===e.words&&(e.until=p[n+1]??c)}e&&i.push({part:o,...e,steps:x})}return i}const d=t=>Math.round(t*1e3)/1e3,T=t=>Math.round(t*10)/10;export{cutThroughout}from"@allyhub/image-measure/layout";export function footageScale(t,r=1,i){const o=t.crop;if(!o||!t.source||o[2]<=0||o[3]<=0)return;const a=t.picture,p=t.zoom&&t.zoom.length>0?W(t.zoom,"z"):[],x=t.boxes&&t.boxes.length>1?t.boxes:void 0,e=x?.[0]?.box,n=x?.map(s=>({t:s.t,rect:s.box,...s.ease?{ease:s.ease}:{}})),c=Math.max(t.start,i?t.end-1/i:t.end),m=[t.start,...p.map(s=>s.t),...(x??[]).map(s=>s.t),c].map(s=>Math.min(Math.max(s,t.start),c)).sort((s,l)=>s-l),u=s=>{const l=p.length>0?J(p,s):1,g=n&&e?V(t,e,Q(n,s)):1,z=Math.max(a[2]*g/o[2],a[3]*g/o[3])*l*r,y=[t.fit];return Math.abs(l-1)>1e-6&&y.push(`zoom ${String(d(l))}×`),n&&Math.abs(g-1)>1e-6&&y.push(`box key ${String(d(g))}×`),{scale:d(z),t:d(s),from:y}};let f=u(t.start),b=f;for(const s of m){const l=u(s);l.scale>f.scale&&(f=l),l.scale<b.scale&&(b=l)}return{part:t.part,file:t.file,source:[t.source.width,t.source.height],shown:[Math.round(o[2]),Math.round(o[3])],max:f,min:b}}export function contentBox(t,r,i){return{x:[i.left,Math.max(i.left,t-i.right)],y:[i.top,Math.max(i.top,r-i.bottom)]}}export function unionSpans(t){const r=t.filter(([o,a])=>a>o).map(([o,a])=>[o,a]).sort((o,a)=>o[0]-a[0]),i=[];for(const o of r){const a=i.at(-1);a&&o[0]<=a[1]?a[1]=Math.max(a[1],o[1]):i.push(o)}return i}export function freeBands(t,r){const[i,o]=t.y,a=[];let p=i;const x=(e,n)=>{n>e&&a.push({y:[e,n],x:[t.x[0],t.x[1]],height:n-e})};for(const[e,n]of unionSpans(r))if(!(n<=p)){if(e>=o)break;x(p,Math.min(e,o)),p=Math.max(p,n)}return x(p,o),a}export function boxRows(t,r){if(!(t[2]<=0||t[3]<=0)&&!(t[0]>=r[1]||t[0]+t[2]<=r[0]))return[Math.floor(t[1]),Math.ceil(t[1]+t[3])]}const A=t=>[t[0]+t[2]/2,t[1]+t[3]/2];function N(t,r){if(!t.box||!r.box)return{px:0,grew:0};const[i,o]=A(t.box),[a,p]=A(r.box);return{px:Math.hypot(a-i,p-o),grew:Math.max(Math.abs(r.box[2]-t.box[2]),Math.abs(r.box[3]-t.box[3]))}}export function largestSteps(t){const r=[];for(const o of t){const a=o.samples.length,p=[],x=[];for(let e=1;e<a;e++){const n=o.samples[e-1],c=o.samples[e];if(!n||!c)continue;const m=N(n,c);p[e]=Math.max(m.px,m.grew),x[e]=Math.abs(c.opacity-n.opacity)}for(const[e,n]of[["move",p],["fade",x]]){let c=-1,m=0;for(let s=1;s<a;s++){const g=(n[s]??0)-Math.max(n[s-1]??0,n[s+1]??0);g>m+1e-9&&(c=s,m=g)}const u=o.samples[c-1],f=o.samples[c];if(c<1||!u||!f)continue;const b=N(u,f);r.push({part:o.part,layer:o.layer,what:o.what,selector:o.selector,kind:e,t:d(f.t),...u.box?{from:u.box}:{},...f.box?{to:f.box}:{},px:d(b.px),grew:d(b.grew),opacity:[d(u.opacity),d(f.opacity)],around:d(Math.max(n[c-1]??0,n[c+1]??0)),over:d(m)})}}const i=o=>o.kind==="move"?0:1;return r.sort((o,a)=>i(o)-i(a)||a.over-o.over)}export const MOVING_DEFAULTS={hold:1,slow:8,window:.25};const P=(t,r)=>t===r||t!==void 0&&r!==void 0&&t.every((i,o)=>i===r[o]);export function movingStretches(t,r){const i=r.hold??MOVING_DEFAULTS.hold,o=(r.slow??MOVING_DEFAULTS.slow)*((r.height??1080)/1080),a=r.window??MOVING_DEFAULTS.window,p=Math.max(1,Math.round(i*r.fps)),x=new Map;for(const e of t){const n=e.samples;let c=1;for(;c<n.length;){if(P(n[c-1]?.box,n[c]?.box)||!n[c-1]?.box||!n[c]?.box){c++;continue}const m=c-1;let u=c,f=c+1;for(;f<n.length&&f-u<=p;){const M=n[f-1]?.box,v=n[f]?.box;if(!M||!v)break;P(M,v)||(u=f),f++}c=u+1;const b=f>=n.length,s=n[m],l=n[u];if(!s?.box||!l?.box)continue;const[g,z]=A(s.box),[y,h]=A(l.box),w=Math.hypot(y-g,h-z),S=[s.box[2]>0?l.box[2]/s.box[2]:1,s.box[3]>0?l.box[3]/s.box[3]:1],F=l.t-s.t,D=Math.max(1,Math.round(a*r.fps));let j=0;for(let M=m;M<u;M+=D){const v=n[M],k=n[Math.min(u,M+D)];if(!v?.box||!k?.box||k.t<=v.t)continue;const[U,_]=A(v.box),[$,q]=A(k.box);Math.max(Math.hypot($-U,q-_),Math.abs(k.box[2]-v.box[2])/2,Math.abs(k.box[3]-v.box[3])/2)/(k.t-v.t)<o&&(j+=k.t-v.t)}const R=Math.abs(S[0]-1)>.001||Math.abs(S[1]-1)>.001,B=[e.part,d(s.t),d(l.t),S[0].toFixed(2),S[1].toFixed(2),...R?[]:[Math.round(y-g),Math.round(h-z)]].join("|"),C={layer:e.layer,what:e.what,...e.name===void 0?{}:{name:e.name}},O=x.get(B);if(O){O.things++,O.names.length<3&&O.names.push(C);continue}const E=r.transitions?.find(M=>(M.part===e.part||M.from===e.part)&&s.t<M.end&&l.t>M.start),H=r.parts?.find(M=>M.key===e.part)?.end;x.set(B,{part:e.part,start:d(s.t),end:d(l.t),things:1,names:[C],px:d(w),scale:[d(S[0]),d(S[1])],speed:F>0?d(w/F):0,slow:d(j),...E?{transition:{type:E.type,start:E.start,end:E.end}}:{},...H!==void 0&&b&&(n.at(-1)?.t??0)>=H-1.5/r.fps?{toEnd:!0}:{}})}}return[...x.values()].sort((e,n)=>e.start-n.start||n.things-e.things)}
@@ -0,0 +1,44 @@
1
+ import { type GainPoint, type MixPlan, type MusicSegment, type Segment } from "@allyhub/audio";
2
+ import type { MediaInfo, Word } from "@allyhub/piece";
3
+ import type { VoiceSetting } from "./audio-types.js";
4
+ import type { AudioPlan, MusicPlan, Timeline } from "./timeline.js";
5
+ type Mic = NonNullable<AudioPlan["mic"]>;
6
+ /**
7
+ * How the speech was recorded, for the timeline: the video's setting (a
8
+ * studio's finishing where it gives none) and each part's own, resolved
9
+ * over their presets. The settings were checked when the piece was made
10
+ * (the SDK's and the build's voiceProblem).
11
+ */
12
+ export declare function voicePlan(video: VoiceSetting | undefined, specs: readonly {
13
+ key: string;
14
+ mic?: VoiceSetting | undefined;
15
+ }[]): {
16
+ mic: Mic;
17
+ };
18
+ /** Where each spoken word falls on the film's clock, over every segment. */
19
+ export declare function wordsOnFilm(segments: readonly (Segment & {
20
+ file: string;
21
+ })[], wordsOf: (file: string) => readonly Word[] | undefined): {
22
+ start: number;
23
+ end: number;
24
+ }[];
25
+ /**
26
+ * The film seconds and file seconds the music plays: its stretches with
27
+ * their seams' fades, from the file's length `len`.
28
+ */
29
+ export declare function musicPlayed(m: MusicPlan, len: number, duration: number): MusicSegment[];
30
+ export interface MixPlanOptions {
31
+ /** Seeds the synthesized sounds and the voice's rooms: piece id, output, combo key with the format. */
32
+ seed: string;
33
+ }
34
+ /** The plan for a timeline, given the project's media by path (with loudness). */
35
+ export declare function mixPlan(timeline: Timeline, media: Readonly<Record<string, MediaInfo>>, opts: MixPlanOptions): MixPlan;
36
+ /**
37
+ * Each part's speechGainDb on the film's clock, as a gain envelope: where
38
+ * its speech plays (its clips, room tone included) or else where its
39
+ * picture is, ramped over 10 ms at each change. Empty when no part sets
40
+ * one.
41
+ */
42
+ export declare function speechGains(timeline: Timeline): GainPoint[];
43
+ export {};
44
+ //# sourceMappingURL=mix-plan.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{addEnvelopes as v,duckEnvelope as I,hashSeed as w,MIX_DEFAULTS as D,resolveVoice as E,SFX_HIT as F,speechEnvelope as S,speechSpans as O}from"@allyhub/audio";import{MUSIC_DEFAULTS as M,musicSegments as k,placeStretches as A,wholeLoop as G}from"./music.js";import{wordsIn as U}from"./speech.js";export function voicePlan(t,s){const a=o=>E(o),c=s.filter(o=>o.mic!==void 0);return{mic:{video:a(t),...c.length>0?{parts:Object.fromEntries(c.map(o=>[o.key,a(o.mic)]))}:{}}}}export function wordsOnFilm(t,s){return t.flatMap(a=>U(s(a.file)??[],a.from,a.dur,a.at,a.speed??1)).map(a=>({start:a.start,end:a.end})).sort((a,c)=>a.start-c.start)}const g=(t,s)=>s===void 0||!Number.isFinite(s)?0:t-s,L=t=>[...t].sort((s,a)=>s.t-a.t);export function musicPlayed(t,s,a){return t.play?k(t.play,t.seam??M.seam,s,"before",!t.loop):t.loop?k(G(t.from,s,a,t.seam),s>1?t.seam??M.loopSeam:0,s,"after",!1):k(A([{from:t.from,to:s}],void 0,s,a),0,s)}export function mixPlan(t,s,a){const c=t.duration,o=t.audio.mix??D,i={duration:c,speech:[],footage:[],sfx:[]};for(const e of[...t.audio.speech??[],...t.audio.room??[]]){const f=s[e.file];!f||e.dur<=0||i.speech.push({file:e.file,...e.part===void 0?{}:{part:e.part},at:e.at,from:e.from,dur:e.dur,gainDb:g(o.speech,f.loudness)+(e.gainDb??0),...e.speed!==void 0&&e.speed!==1?{speed:e.speed}:{},...e.denoise?{denoise:e.denoise}:{},...e.fadeIn?{fadeIn:e.fadeIn}:{},...e.fadeOut?{fadeOut:e.fadeOut}:{}})}const m=O(i.speech,o.duck),h=S(m,o.footageUnderSpeech-o.footage,o.duck);for(const e of t.footage??[]){const f=s[e.file];if(!e.audio||e.take===!0||!f)continue;const d=e.speed>0?e.speed:1,u=Math.max(0,e.from),b=e.start+(u-e.from)/d,y=f.duration===void 0?1/0:f.duration-u,x=Math.min(e.end-b,y/d);x<=0||i.footage.push({file:e.file,at:b,from:u,dur:x,...d===1?{}:{speed:d},gainDb:g(o.footage,f.loudness)+e.gainDb,...h.length>0?{envelope:h}:{}})}const n=t.audio.music,r=n?.file===void 0?void 0:s[n.file];if(n?.file!==void 0&&r){const e=(n.gain??[]).map(u=>({t:u.t,db:u.db})),f=r.duration??n.from+c,d={file:n.file,segments:musicPlayed(n,f,c),gainDb:g(o.musicAlone,r.loudness),alone:o.musicAlone,fadeIn:o.musicFade.in,fadeOut:Math.min(o.musicFade.out,c/4),...n.until===void 0?{}:{until:n.until},duck:v(v(S(m,o.music-o.musicAlone,o.duck),I(wordsOnFilm(i.speech,u=>s[u]?.words),o.duck)),L(e)),...n.shape?{shape:n.shape}:{}};i.music=d}const l=speechGains(t);l.length>0&&(i.speechGain=l);const p=t.audio.mic;return p&&(i.voice={video:p.video,...p.parts?{parts:p.parts}:{},spans:t.parts.map(e=>({part:e.key,start:e.start,end:e.end})),seed:a.seed}),t.cues.forEach((e,f)=>{const d=e.gainDb??0;if(e.file!==void 0){const b=s[e.file];if(!b)return;i.sfx.push({sound:e.sound,file:e.file,at:e.t,gainDb:g(o.sfx,b.loudness)+d,seed:0,...e.shape?{shape:e.shape,level:{target:o.sfx,gainDb:d}}:{}});return}const u=F[e.sound];u!==void 0&&i.sfx.push({sound:e.sound,at:Math.max(0,e.t-u),gainDb:o.sfx-D.sfx+d,seed:w(`${a.seed}:${e.sound}:${String(f)}`),...e.shape?{shape:e.shape}:{}})}),i}export function speechGains(t){const s=new Map;for(const n of t.parts)n.speechGainDb!==void 0&&n.speechGainDb!==0&&s.set(n.key,n.speechGainDb);if(s.size===0)return[];const a=[];for(const n of t.parts)a.push({start:n.start,end:n.end,db:s.get(n.key)??0,rank:0});const c=[...(t.audio.speech??[]).map(n=>({c:n,rank:2})),...(t.audio.room??[]).map(n=>({c:n,rank:1}))];for(const{c:n,rank:r}of c)n.part===void 0||n.dur<=0||a.push({start:n.at,end:n.at+n.dur,db:s.get(n.part)??0,rank:r});const o=[...new Set(a.flatMap(n=>[n.start,n.end]))].sort((n,r)=>n-r),i=[];for(let n=0;n+1<o.length;n++){const r=o[n]??0,l=o[n+1]??r,p=(r+l)/2;let e;for(const d of a)p<d.start||p>=d.end||(!e||d.rank>e.rank||d.rank===e.rank&&d.start>=e.start)&&(e=d);const f=e?.db??0;i.at(-1)?.db!==f&&i.push({t:r,db:f})}if(i.every(n=>n.db===0))return[];const m=.005,h=[];for(const[n,r]of i.entries()){if(n===0){h.push({t:r.t,db:r.db});continue}const l=i[n-1]?.db??0;h.push({t:Math.max(0,r.t-m),db:l},{t:r.t+m,db:r.db})}return h}
@@ -1,4 +1,4 @@
1
- import type { PixelRect } from "./timeline.js";
1
+ import type { PixelRect } from "@allyhub/piece";
2
2
  /**
3
3
  * How a segment between two keyframes runs: linear, or cubic easing in,
4
4
  * out, or in and out. The ease of a keyframe applies to the segment that