@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,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{READ_DEFAULTS as d,boxRows as f,contentBox as l,freeBands as c,unionSpans as u,wordsAtOnce as m}from"./measure.js";export const FACT_KINDS={"text-speaker":"Text over the speaker's face box or person matte","text-off-frame":"Text the frame's edges cut: its glyphs outside the frame, in pixels and as a share","text-contrast":"Text against the pixels behind its glyphs: WCAG contrast ratios, the lowest, a low percentile and the median","text-covered":"Text in the area a platform's interface covers","text-overlap":"Text over text of another layer","text-overlap-own":"Text over text of the same layer","text-outside":"Text reaching outside a box it is drawn inside (a background, border or shadow)","text-time":"How long each text shows whole, against its words, and how large it is on a phone, with its lowercase letters' height","words-on-screen":"Words whole on screen at once in each part: the most, and every change","speech-on-screen":"Words a part says that show as text in it, and those that do not","footage-scale":"Footage enlargement: output pixels per source pixel, largest and smallest","free-bands":"Bands of the frame inside the covered edges that the speaker's face box or person matte leaves free","graphics-under-footage":"Graphic layers drawn under footage (listed before it), and how much of the frame the footage covers","flat-frames":"Runs of nearly flat frames unlike the picture around them","still-picture":"Stretches where the picture holds: how long, and how much changed in them","cut-seam":"How things move either side of each join: direction, speed and the change across; things named alike on both sides",flash:"Frames unlike both the frame before and the frame after: a flash, a blank frame, a layer for one frame","music-length":"Music length against video length","join-loudness":"Speech loudness either side of a join, or why it was not measured","matrix-coverage":"Matrix: combos asked for, possible and chosen, per candidate","generated-media":"Generated media (files with a .gen.json record) shown or played, and when","gen-mismatch":"A .gen.json record whose sha256 is not its file's, or that cannot be read",fallback:"Drawn or timed a fallback way: a face track, matte, take or music tempo missing","scenery-contact":"3D scenery: named objects that touch or cross, with the shared area, the crossing's length, how deep at least, the lift that clears them and the shared volume","scenery-support":"3D scenery: what each named object rests on, the gap below or how far it is sunk, its footprint in contact and its centre of mass against the contact","scenery-bake":"3D scenery: whether a scenery layer's scenery was drawn with its bake laid; when not, the scene's digest looked for, whether it was baked before (out of date) or never, and the command that makes it","mesh-health":"3D scenery: named objects whose surface is open, non-manifold, degenerate or crosses itself","camera-clearance":"3D scenery: a scenery layer's camera near a surface, inside an object, or cutting geometry with its near plane","camera-motion":"3D scenery: a scenery layer's camera motion in its own frame: peaks of truck, pedestal, dolly, pan, tilt, roll, zoom, speed, acceleration and jerk, smoothness, the largest step","scenery-screen":"3D scenery: a screen in a scenery layer: when it is on the frame, its share, how much its content is enlarged or shrunk, its angle to the view, how much is hidden in front of it, how blurred with an aperture, where it is drawn and at what scale, its smallest text on the frame as drawn and the speed of each stretch between cues","scenery-screen-fidelity":"3D scenery: a screen drawn in the scenery against its own element drawn flat: the colour difference, the share of pixels that differ, the regions where they differ and the elements in them the scenery's picture is known to draw otherwise","text-overflow":"A deck: a shape's text past its box, by its lines' glyphs: how far, and the lines past it","text-off-slide":"A deck: a shape's text the slide's edge cuts: how far its glyphs reach past it, and the share outside","shape-off-slide":"A deck: a shape partly or wholly past the slide's edge, and the share of it outside","shape-overlap":"A deck: two shapes of a slide over each other (not a master's or a layout's own under another), and by how much","near-alignment":"A deck: edges and centres of two shapes, or of a shape and the slide, nearly in line and not: each line, and the x or y that aligns them","placement-drift":"A deck: a shape of one name at different places on slides of one layout","type-in-use":"A deck: the text sizes and weights it uses, on how many slides each, and the smallest","read-size":"A deck: each text's size on the slide, on a phone, and with --room on a room's screen and at its farthest seat","words-on-slide":"A deck: words, lines and texts on each slide","sheet-error":"A sheet: cells whose value is an error, and whether the error starts there or is read from another","sheet-number":"A sheet: numbers written into a formula, each with what takes it, and how many cells hold the formula","sheet-unlike":"A sheet: a cell between neighbours that read alike, unlike them, and how long a run they make","sheet-exception":"A sheet: cells of a calculated column set apart from its formula","sheet-unused":"A sheet: defined names and typed numbers nothing reads (no formula, chart, rule, check or name)","sheet-invalid":"A sheet: cells that break their data validation","sheet-typed":"A sheet: numbers sheet.ts typed that neither its data nor its code holds, what it computed where a formula should","sheet-ordinary":"A sheet: a sheet sheet.ts makes and sheet.yaml holds too, sheet.yaml's standing","picture-resolution":"A deck: a picture drawn larger than its pixels, its pixels per inch, and how much it is stretched","shape-hidden":"A deck: a shape another covers whole at every build, or an animation that never shows its shape","chart-data":"A chart's numbers: how many, how far they run, and the file they came from","table-grown":"A deck: a table's rows its words made taller than they are set","deck-fonts":"A deck: the fonts its PowerPoint file names, and whether each is one every PowerPoint, Keynote and Google Slides has","cut-in-word":"A part playing a stretch of a video item cut inside one of its words"};export function isFactKind(e){return Object.hasOwn(FACT_KINDS,e)}export function fact(e,a,o){return{kind:e,...a,data:o}}export function factsOf(e,a){return e.filter(o=>o.kind===a)}export function countFacts(e){const a={};for(const o of e)a[o.kind]=(a[o.kind]??0)+1;return a}export function filterFacts(e,a){return e.filter(o=>!(a.kinds?.length&&!a.kinds.includes(o.kind)||a.part!==void 0&&o.part!==a.part||(a.from!==void 0||a.to!==void 0)&&(o.t===void 0||a.from!==void 0&&o.t<a.from-1e-6||a.to!==void 0&&o.t>a.to+1e-6)))}export function freeBandsData(e){const a=l(e.width,e.height,e.safe),o=(r,s)=>{const n=u(s.flat());return{files:r,seen:s.filter(h=>h.length>0).length,rows:n,bands:c(a,n)}},i="missing"in e.face?e.face:{...o(e.face.files,e.face.boxes.map(r=>{const s=r?f(r,a.x):void 0;return s?[s]:[]})),...e.face.speaker===void 0?{}:{speaker:e.face.speaker}},t="missing"in e.person?e.person:o(e.person.files,e.person.rows);return{frame:[e.width,e.height],covered:e.safe,content:a,...e.profile?{profile:e.profile}:{},moments:e.moments,face:i,person:t,bands:c(a,[..."rows"in i?i.rows:[],..."rows"in t?t.rows:[]])}}export function layoutFacts(e,a,o){const i=[];for(const t of e.moments){const r={...a,part:t.part,t:t.t};for(const s of t.overlaps){const n=t.texts[s.a],h=t.texts[s.b];!n||!h||i.push(fact("text-overlap",r,{a:n,b:h,area:s.area,share:s.share}))}for(const s of t.ownOverlaps){const n=t.texts[s.a],h=t.texts[s.b];!n||!h||i.push(fact("text-overlap-own",r,{a:n,b:h,area:s.area,share:s.share}))}for(const s of t.outside){const n=t.texts[s.text];n&&i.push(fact("text-outside",r,{text:n,container:s.container,edges:s.edges}))}for(const s of t.faceOverlaps){const n=t.texts[s.text];!n||!t.face||i.push(fact("text-speaker",r,{text:n,face:{box:t.face,area:s.area,ofText:s.ofText,ofFace:s.ofFace}}))}for(const s of t.offFrame){const n=t.texts[s.text];n&&i.push(fact("text-off-frame",r,{text:n,frame:[e.width,e.height],edges:s.edges,outside:s.outside,share:s.share,glyphs:s.glyphs}))}for(const s of t.safeOverlaps){const n=t.texts[s.text];n&&i.push(fact("text-covered",r,{text:n,frame:[e.width,e.height],covered:e.safe,...o?{profile:o}:{},edges:s.edges}))}}for(const t of e.reading?.texts??[])i.push(fact("text-time",{...a,part:t.part,t:t.first},{text:t.text,words:t.words,chars:t.chars,seconds:t.seconds,spans:t.spans,onScreen:t.onScreen,...t.size?{size:t.size}:{},options:e.reading?.options??d}));for(const t of m(e.reading?.texts??[])){const{part:r,...s}=t;i.push(fact("words-on-screen",{...a,part:r,t:t.from},{...s,options:e.reading?.options??d}))}for(const t of e.footage){const{part:r,...s}=t;i.push(fact("footage-scale",{...a,part:r,t:t.max.t},s))}return i}
2
+ import{factOf as d}from"@allyhub/diagnostics";import{frameFacts as u}from"@allyhub/image-measure/layout";import{READ_DEFAULTS as c}from"@allyhub/piece";import{boxRows as x,contentBox as h,freeBands as i,unionSpans as m,wordsAtOnce as g}from"./measure.js";export const fact=(e,n,a)=>d(e,n,a);export function freeBandsData(e){const n=h(e.width,e.height,e.safe),a=(t,o)=>{const f=m(o.flat());return{files:t,seen:o.filter(p=>p.length>0).length,rows:f,bands:i(n,f)}},s="missing"in e.face?e.face:{...a(e.face.files,e.face.boxes.map(t=>{const o=t?x(t,n.x):void 0;return o?[o]:[]})),...e.face.speaker===void 0?{}:{speaker:e.face.speaker}},r="missing"in e.person?e.person:a(e.person.files,e.person.rows);return{frame:[e.width,e.height],covered:e.safe,content:n,moments:e.moments,face:s,person:r,bands:i(n,[..."rows"in s?s.rows:[],..."rows"in r?r.rows:[]])}}export function layoutFacts(e,n){const a=[];a.push(...u(e,n,(s,r)=>{const t=[];for(const o of s.faceOverlaps){const f=s.texts[o.text];!f||!s.face||t.push(fact("text-speaker",r,{text:f,face:{box:s.face,area:o.area,ofText:o.ofText,ofFace:o.ofFace}}))}return t}));for(const s of e.reading?.texts??[])a.push(fact("text-time",{...n,part:s.part,t:s.first},{text:s.text,words:s.words,chars:s.chars,seconds:s.seconds,spans:s.spans,onScreen:s.onScreen,...s.size?{size:s.size}:{},options:e.reading?.options??c}));for(const s of g(e.reading?.texts??[])){const{part:r,...t}=s;a.push(fact("words-on-screen",{...n,part:r,t:s.from},{...t,options:e.reading?.options??c}))}for(const s of e.footage){const{part:r,...t}=s;a.push(fact("footage-scale",{...n,part:r,t:s.max.t},t))}for(const s of e.pictures??[]){const{part:r,t,...o}=s;a.push(fact("graphic-picture-scale",{...n,part:r,t},o))}return a}
@@ -1,7 +1,8 @@
1
- import { type FaceTrack } from "./media.js";
1
+ import { type FaceTrack } from "@allyhub/piece";
2
2
  import { type Ease, type ScalarKey } from "./motion.js";
3
3
  import type { Placement } from "./placement.js";
4
- import type { PixelRect, TimelineFootage } from "./timeline.js";
4
+ import type { PixelRect } from "@allyhub/piece";
5
+ import type { TimelineFootage } from "./timeline.js";
5
6
  /**
6
7
  * The source second a footage layer shows at film time t: from `from`
7
8
  * at its speed, or, for a cut take, inside the cut showing then.
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{faceAt as A,facesAt as C}from"./media.js";import{keyAt as l,rectAt as z,simplifyKeys as E}from"./motion.js";export function sourceAt(t,e){const n=t.cuts;if(n&&n.length>0){let c=n[0]??{at:t.start,from:t.from};for(const r of n)r.at<=e+1e-9&&(c=r);return c.from+(e-c.at)}return t.from+(e-t.start)*t.speed}export function zoomRect(t,e,n,c){if(e===1)return t;const r=1-1/e;return[t[0]+n*t[2]*r,t[1]+c*t[3]*r,t[2]/e,t[3]/e]}export function zoomChannel(t,e){return t.map(n=>({t:n.t,v:n[e],...n.ease?{ease:n.ease}:{}}))}export function placementAt(t,e){let n=t.box,c=t.picture;if(t.boxes&&t.boxes.length>0){const o=t.boxes[0]?.box??t.box,i=z(t.boxes.map(h=>({t:h.t,rect:h.box,...h.ease?{ease:h.ease}:{}})),e),a=boxFit(t,o,i),[f,m,u,x]=t.picture,s=i[0]+i[2]/2+(f+u/2-(o[0]+o[2]/2))*a,p=i[1]+i[3]/2+(m+x/2-(o[1]+o[3]/2))*a;c=[s-u*a/2,p-x*a/2,u*a,x*a],n=i}let r=t.crop;if(r&&t.pan&&t.pan.length>0){const o=l(t.pan.map(a=>({t:a.t,v:a.x})),e),i=l(t.pan.map(a=>({t:a.t,v:a.y})),e);r=[o,i,r[2],r[3]]}return r&&t.zoom&&t.zoom.length>0&&(r=zoomRect(r,l(zoomChannel(t.zoom,"z"),e),l(zoomChannel(t.zoom,"cx"),e),l(zoomChannel(t.zoom,"cy"),e))),{box:n,picture:c,...r?{crop:r}:{}}}export function boxFit(t,e,n){const[,,c,r]=t.picture;if(c<=0||r<=0||e[2]<=0||e[3]<=0)return 1;const o=t.fit==="cover"?Math.max:Math.min,i=o(e[2]/c,e[3]/r);return o(n[2]/c,n[3]/r)/i}export function sourceToFrame(t,e){const n=t.crop;if(!n)return e;const c=t.picture[2]/n[2],r=t.picture[3]/n[3];return[t.picture[0]+(e[0]-n[0])*c,t.picture[1]+(e[1]-n[1])*r,e[2]*c,e[3]*r]}function w(t,e){const n=Math.max(t[0],e[0]),c=Math.max(t[1],e[1]),r=Math.min(t[0]+t[2],e[0]+e[2]),o=Math.min(t[1]+t[3],e[1]+e[3]);return r>n&&o>c?[n,c,r-n,o-c]:void 0}export function faceOnFrame(t,e,n,c=t.speaker??e.speaker){if(n<t.start||n>=t.end)return;const r=A(e,sourceAt(t,n),c);if(!r)return;const o=placementAt(t,n);return w(sourceToFrame(o,r),o.box)}export function facesOnFrame(t,e,n){if(n<t.start||n>=t.end)return[];const c=placementAt(t,n);return C(e,sourceAt(t,n)).flatMap(r=>{const o=w(sourceToFrame(c,r.box),c.box);return o?[{id:r.id,box:o}]:[]})}export function reframeWindow(t,e){const n=e.w/e.h,c=Math.min(t.width,t.height*n);return{w:Math.min(t.width,Math.round(c)),h:Math.min(t.height,Math.round(c/n))}}export const REFRAME_FACE_Y=.4,REFRAME_FALLBACK={x:.5,y:.4};export function reframePath(t){const{window:e,source:n,layer:c}=t,r=s=>Math.min(Math.max(s,0),n.width-e.w),o=s=>Math.min(Math.max(s,0),n.height-e.h),i=t.faceY??REFRAME_FACE_Y,a=s=>{const p=t.track?A(t.track,sourceAt(c,s),t.speaker??t.track.speaker):void 0,h=p?p[0]+p[2]/2:(t.focus?.x??.5)*n.width,y=p?p[1]+p[3]/2:(t.focus?.y??.4)*n.height;return[r(h-e.w/2),o(y-e.h*i)]},f=(c.cuts??[]).map(s=>s.at).filter(s=>s>c.start&&s<c.end),m=[c.start,...f,c.end],u=[];for(let s=0;s<m.length-1;s++){const p=m[s]??0,h=m[s+1]??p,y=[];for(let d=p;d<h-1e-6;d+=.1)y.push({t:d,v:a(d)});const M=Math.max(p,h-.001);y.push({t:M,v:a(M)});for(const d of E(y,1.5))u.push({t:Math.round(d.t*1e6)/1e6,x:Math.round((d.v[0]??0)*100)/100,y:Math.round((d.v[1]??0)*100)/100})}const x=u[0];return x&&u.every(s=>s.x===x.x&&s.y===x.y)?[x]:u}export const PUNCH_IN=.2,PUNCH_OUT=.25,PUNCH_SCALE=1.12,PUNCH_EASE="in-out",PUNCH_CENTER={x:.5,y:.42};export function punchKeys(t){const e=[...t].sort((o,i)=>o.start-i.start),n=[],c=o=>Math.round(o*1e6)/1e6;let r=PUNCH_OUT;for(const o of e){const i=o.in??PUNCH_IN,a=o.out??PUNCH_OUT,f=o.ease??PUNCH_EASE,m=o.start-i/2,u=o.start+i/2,x=n.at(-1);x&&x.t>m?(n.pop(),n.push({t:c(Math.max(x.t-r,u)),z:o.scale,cx:o.cx,cy:o.cy,ease:f})):(n.push({t:c(Math.max(0,m)),z:1,cx:o.cx,cy:o.cy}),n.push({t:c(u),z:o.scale,cx:o.cx,cy:o.cy,ease:f}));const s=Math.max(o.end,u);n.push({t:c(s),z:o.scale,cx:o.cx,cy:o.cy}),n.push({t:c(s+a),z:1,cx:o.cx,cy:o.cy,ease:f}),r=a}return n}export const PULLBACK_SCALE=1.12,PULLBACK_DUR=.6,PULLBACK_EASE="out";export function pullbackKeys(t,e,n=[]){const c=a=>Math.round(a*1e6)/1e6,r=n[0],o=Math.min(t+e.dur,r?.t??1/0);if(o<=t+1e-6)return[...n];const i=r&&r.t<=o+1e-9&&r.z===1?n.slice(1):n;return[{t:c(t),z:e.scale,cx:e.cx,cy:e.cy},{t:c(o),z:1,cx:e.cx,cy:e.cy,ease:e.ease??PULLBACK_EASE},...i]}export function parsePunch(t){const e=/^(.*\S)@(\d*\.\d+)$/u.exec(t.trim());return!e?.[1]||e[2]===void 0?{ref:t}:{ref:e[1],scale:Number(e[2])}}
2
+ import{faceAt as A,facesAt as C}from"@allyhub/piece";import{keyAt as l,rectAt as z,simplifyKeys as E}from"./motion.js";export function sourceAt(t,e){const n=t.cuts;if(n&&n.length>0){let c=n[0]??{at:t.start,from:t.from};for(const r of n)r.at<=e+1e-9&&(c=r);return c.from+(e-c.at)}return t.from+(e-t.start)*t.speed}export function zoomRect(t,e,n,c){if(e===1)return t;const r=1-1/e;return[t[0]+n*t[2]*r,t[1]+c*t[3]*r,t[2]/e,t[3]/e]}export function zoomChannel(t,e){return t.map(n=>({t:n.t,v:n[e],...n.ease?{ease:n.ease}:{}}))}export function placementAt(t,e){let n=t.box,c=t.picture;if(t.boxes&&t.boxes.length>0){const o=t.boxes[0]?.box??t.box,i=z(t.boxes.map(h=>({t:h.t,rect:h.box,...h.ease?{ease:h.ease}:{}})),e),a=boxFit(t,o,i),[f,m,u,x]=t.picture,s=i[0]+i[2]/2+(f+u/2-(o[0]+o[2]/2))*a,p=i[1]+i[3]/2+(m+x/2-(o[1]+o[3]/2))*a;c=[s-u*a/2,p-x*a/2,u*a,x*a],n=i}let r=t.crop;if(r&&t.pan&&t.pan.length>0){const o=l(t.pan.map(a=>({t:a.t,v:a.x})),e),i=l(t.pan.map(a=>({t:a.t,v:a.y})),e);r=[o,i,r[2],r[3]]}return r&&t.zoom&&t.zoom.length>0&&(r=zoomRect(r,l(zoomChannel(t.zoom,"z"),e),l(zoomChannel(t.zoom,"cx"),e),l(zoomChannel(t.zoom,"cy"),e))),{box:n,picture:c,...r?{crop:r}:{}}}export function boxFit(t,e,n){const[,,c,r]=t.picture;if(c<=0||r<=0||e[2]<=0||e[3]<=0)return 1;const o=t.fit==="cover"?Math.max:Math.min,i=o(e[2]/c,e[3]/r);return o(n[2]/c,n[3]/r)/i}export function sourceToFrame(t,e){const n=t.crop;if(!n)return e;const c=t.picture[2]/n[2],r=t.picture[3]/n[3];return[t.picture[0]+(e[0]-n[0])*c,t.picture[1]+(e[1]-n[1])*r,e[2]*c,e[3]*r]}function w(t,e){const n=Math.max(t[0],e[0]),c=Math.max(t[1],e[1]),r=Math.min(t[0]+t[2],e[0]+e[2]),o=Math.min(t[1]+t[3],e[1]+e[3]);return r>n&&o>c?[n,c,r-n,o-c]:void 0}export function faceOnFrame(t,e,n,c=t.speaker??e.speaker){if(n<t.start||n>=t.end)return;const r=A(e,sourceAt(t,n),c);if(!r)return;const o=placementAt(t,n);return w(sourceToFrame(o,r),o.box)}export function facesOnFrame(t,e,n){if(n<t.start||n>=t.end)return[];const c=placementAt(t,n);return C(e,sourceAt(t,n)).flatMap(r=>{const o=w(sourceToFrame(c,r.box),c.box);return o?[{id:r.id,box:o}]:[]})}export function reframeWindow(t,e){const n=e.w/e.h,c=Math.min(t.width,t.height*n);return{w:Math.min(t.width,Math.round(c)),h:Math.min(t.height,Math.round(c/n))}}export const REFRAME_FACE_Y=.4,REFRAME_FALLBACK={x:.5,y:.4};export function reframePath(t){const{window:e,source:n,layer:c}=t,r=s=>Math.min(Math.max(s,0),n.width-e.w),o=s=>Math.min(Math.max(s,0),n.height-e.h),i=t.faceY??REFRAME_FACE_Y,a=s=>{const p=t.track?A(t.track,sourceAt(c,s),t.speaker??t.track.speaker):void 0,h=p?p[0]+p[2]/2:(t.focus?.x??.5)*n.width,y=p?p[1]+p[3]/2:(t.focus?.y??.4)*n.height;return[r(h-e.w/2),o(y-e.h*i)]},f=(c.cuts??[]).map(s=>s.at).filter(s=>s>c.start&&s<c.end),m=[c.start,...f,c.end],u=[];for(let s=0;s<m.length-1;s++){const p=m[s]??0,h=m[s+1]??p,y=[];for(let d=p;d<h-1e-6;d+=.1)y.push({t:d,v:a(d)});const M=Math.max(p,h-.001);y.push({t:M,v:a(M)});for(const d of E(y,1.5))u.push({t:Math.round(d.t*1e6)/1e6,x:Math.round((d.v[0]??0)*100)/100,y:Math.round((d.v[1]??0)*100)/100})}const x=u[0];return x&&u.every(s=>s.x===x.x&&s.y===x.y)?[x]:u}export const PUNCH_IN=.2,PUNCH_OUT=.25,PUNCH_SCALE=1.12,PUNCH_EASE="in-out",PUNCH_CENTER={x:.5,y:.42};export function punchKeys(t){const e=[...t].sort((o,i)=>o.start-i.start),n=[],c=o=>Math.round(o*1e6)/1e6;let r=PUNCH_OUT;for(const o of e){const i=o.in??PUNCH_IN,a=o.out??PUNCH_OUT,f=o.ease??PUNCH_EASE,m=o.start-i/2,u=o.start+i/2,x=n.at(-1);x&&x.t>m?(n.pop(),n.push({t:c(Math.max(x.t-r,u)),z:o.scale,cx:o.cx,cy:o.cy,ease:f})):(n.push({t:c(Math.max(0,m)),z:1,cx:o.cx,cy:o.cy}),n.push({t:c(u),z:o.scale,cx:o.cx,cy:o.cy,ease:f}));const s=Math.max(o.end,u);n.push({t:c(s),z:o.scale,cx:o.cx,cy:o.cy}),n.push({t:c(s+a),z:1,cx:o.cx,cy:o.cy,ease:f}),r=a}return n}export const PULLBACK_SCALE=1.12,PULLBACK_DUR=.6,PULLBACK_EASE="out";export function pullbackKeys(t,e,n=[]){const c=a=>Math.round(a*1e6)/1e6,r=n[0],o=Math.min(t+e.dur,r?.t??1/0);if(o<=t+1e-6)return[...n];const i=r&&r.t<=o+1e-9&&r.z===1?n.slice(1):n;return[{t:c(t),z:e.scale,cx:e.cx,cy:e.cy},{t:c(o),z:1,cx:e.cx,cy:e.cy,ease:e.ease??PULLBACK_EASE},...i]}export function parsePunch(t){const e=/^(.*\S)@(\d*\.\d+)$/u.exec(t.trim());return!e?.[1]||e[2]===void 0?{ref:t}:{ref:e[1],scale:Number(e[2])}}
@@ -1,24 +1,12 @@
1
1
  export * from "./piece.js";
2
- export * from "./component.js";
3
2
  export * from "./timeline.js";
4
- export * from "./source.js";
5
- export * from "./look.js";
6
- export * from "./formats.js";
7
3
  export * from "./placement.js";
8
- export * from "./media.js";
9
- export * from "./gen.js";
10
- export * from "./messages.js";
11
- export * from "./script.js";
12
- export * from "./anchors.js";
13
- export * from "./marks.js";
14
4
  export * from "./script-edit.js";
15
5
  export * from "./edit.js";
16
6
  export * from "./timing.js";
17
7
  export * from "./music.js";
18
- export * from "./words.js";
19
8
  export * from "./speech.js";
20
9
  export * from "./edits.js";
21
- export * from "./voice.js";
22
10
  export * from "./transcript.js";
23
11
  export * from "./cut-report.js";
24
12
  export * from "./captions.js";
@@ -28,14 +16,12 @@ export * from "./footage-motion.js";
28
16
  export * from "./backdrop.js";
29
17
  export * from "./measure.js";
30
18
  export * from "./seams.js";
31
- export * from "./contrast.js";
32
- export * from "./matrix.js";
33
- export * from "./problem.js";
34
19
  export * from "./fact.js";
35
- export * from "./console.js";
36
- export * from "./export.js";
37
20
  export * from "./schema.js";
38
21
  export * from "./audio-types.js";
39
22
  export * from "./render-types.js";
40
23
  export * from "./sound-under.js";
24
+ export * from "./mix-plan.js";
25
+ export * from "./stage.js";
26
+ export * from "./check.js";
41
27
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export*from"./piece.js";export*from"./component.js";export*from"./timeline.js";export*from"./source.js";export*from"./look.js";export*from"./formats.js";export*from"./placement.js";export*from"./media.js";export*from"./gen.js";export*from"./messages.js";export*from"./script.js";export*from"./anchors.js";export*from"./marks.js";export*from"./script-edit.js";export*from"./edit.js";export*from"./timing.js";export*from"./music.js";export*from"./words.js";export*from"./speech.js";export*from"./edits.js";export*from"./voice.js";export*from"./transcript.js";export*from"./cut-report.js";export*from"./captions.js";export*from"./transition.js";export*from"./motion.js";export*from"./footage-motion.js";export*from"./backdrop.js";export*from"./measure.js";export*from"./seams.js";export*from"./contrast.js";export*from"./matrix.js";export*from"./problem.js";export*from"./fact.js";export*from"./console.js";export*from"./export.js";export*from"./schema.js";export*from"./audio-types.js";export*from"./render-types.js";export*from"./sound-under.js";
2
+ export*from"./piece.js";export*from"./timeline.js";export*from"./placement.js";export*from"./script-edit.js";export*from"./edit.js";export*from"./timing.js";export*from"./music.js";export*from"./speech.js";export*from"./edits.js";export*from"./transcript.js";export*from"./cut-report.js";export*from"./captions.js";export*from"./transition.js";export*from"./motion.js";export*from"./footage-motion.js";export*from"./backdrop.js";export*from"./measure.js";export*from"./seams.js";export*from"./fact.js";export*from"./schema.js";export*from"./audio-types.js";export*from"./render-types.js";export*from"./sound-under.js";export*from"./mix-plan.js";export*from"./stage.js";export*from"./check.js";
@@ -1,323 +1,6 @@
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
- /** A text of a deck's shape as drawn. */
216
- export interface DeckTextLayout {
217
- text: string;
218
- words: number;
219
- /** Its lines as drawn, a box of each one's glyphs, in the slide's pixels. */
220
- lines: Box[];
221
- /** All of its glyphs; null when none shows. */
222
- glyphs: Box | null;
223
- /** The sizes and weights it is drawn at, each once: size and lowercase x's height in points. */
224
- type: {
225
- size: number;
226
- weight: number;
227
- xHeight?: number;
228
- }[];
229
- /** The share autofit shrank it to, when it did. */
230
- scale?: number;
231
- /** Its first paragraph's alignment: the line it is aligned by. */
232
- align?: "l" | "ctr" | "r" | "just";
233
- }
234
- /** A deck's shape as drawn on its slide. */
235
- export interface DeckShapeLayout {
236
- name: string;
237
- /** placeholder, textbox, picture, movie, autoshape, line, component. */
238
- kind: string;
239
- /** Where it comes from: its master's or layout's own, or the slide's (placeholders are the slide's). */
240
- level: "master" | "layout" | "slide";
241
- placeholder?: string;
242
- /** Its frame as set, in the slide's pixels. */
243
- frame: Box;
244
- /** Its box as drawn (a shape that fits its text has grown to it). */
245
- box: Box;
246
- /** It hides what is under it: filled, a picture, a movie. */
247
- opaque: boolean;
248
- /** Not drawn at this moment: its entrance is to come, or its exit has been. */
249
- hidden?: boolean;
250
- text?: DeckTextLayout;
251
- /** A table's rows, each as tall as it is set and as it is drawn, in the slide's pixels. */
252
- rows?: {
253
- set: number;
254
- drawn: number;
255
- }[];
256
- /** A chart's numbers: how many, how far they run, and the project file they came from. */
257
- chart?: {
258
- type: string;
259
- categories: number;
260
- series: number;
261
- low?: number;
262
- high?: number;
263
- source?: string;
264
- };
265
- picture?: {
266
- /** The file's own pixels. */
267
- source: [width: number, height: number];
268
- /** The part of them shown (its crop). */
269
- shown: [width: number, height: number];
270
- };
271
- }
272
- /** A deck's slide as drawn at a still: one of its steps'. */
273
- export interface DeckSlideLayout {
274
- slide: string;
275
- /** How many steps the slide has, so that all of them measured can be told. */
276
- steps?: number;
277
- /** Its still, in the deck's seconds. */
278
- t: number;
279
- layout: string;
280
- hidden: boolean;
281
- notes?: string;
282
- /** Back to front, as drawn; an empty placeholder is not drawn. */
283
- shapes: DeckShapeLayout[];
284
- }
285
- /** A deck as drawn, measured for its facts. */
286
- export interface DeckLayout {
287
- /** The slide's pixels per point. */
288
- pxPerPt: number;
289
- /**
290
- * The fonts its PowerPoint file names: its theme's, and those its text
291
- * names itself; `drawn`, whether the stage has the font (a face the page
292
- * declares, or one on this computer) or draws its text in another.
293
- */
294
- fonts?: {
295
- name: string;
296
- where: "theme" | "text";
297
- drawn?: boolean;
298
- }[];
299
- slides: DeckSlideLayout[];
300
- }
301
- export interface LayoutReport {
302
- width: number;
303
- height: number;
304
- /** A deck's slides as drawn (a deck's measure() only). */
305
- deck?: DeckLayout;
306
- /** The format's covered edges, in pixels. */
307
- safe: SafeZone;
308
- moments: LayoutMoment[];
309
- footage: FootageScale[];
310
- /** How long each text block can be read (a video measured at its default moments). */
311
- reading?: {
312
- options: ReadOptions;
313
- texts: TextTime[];
314
- };
315
- }
316
- /** The words and characters of a text: word-like segments as the language breaks them, and characters that are not spaces. */
317
- export declare function countWords(text: string): {
318
- words: number;
319
- chars: number;
320
- };
1
+ import type { FootageScale, MeasuredText, ReadOptions, TextSample, TextTime, Track, SafeZone, PixelRect } from "@allyhub/piece";
2
+ import type { Box } from "@allyhub/diagnostics";
3
+ import type { TimelineFootage } from "./timeline.js";
321
4
  /**
322
5
  * How long one text block can be read, from what it showed at each moment
323
6
  * its part was looked at (in order, `every` seconds apart; a moment it was
@@ -372,87 +55,7 @@ export interface WordsAtOnce {
372
55
  * ever whole has none.
373
56
  */
374
57
  export declare function wordsAtOnce(texts: readonly TextTime[]): WordsAtOnce[];
375
- /** The pixels two boxes both cover. */
376
- export declare function overlapArea(a: Box | PixelRect, b: Box | PixelRect): number;
377
- /** How two boxes overlap: the area, and its share of the smaller box. */
378
- export declare function boxOverlap(a: Box | PixelRect, b: Box | PixelRect): {
379
- area: number;
380
- share: number;
381
- } | undefined;
382
- /**
383
- * How far a box reaches into the covered edges of a frame W × H: pixels
384
- * in from each covered edge's line, for the edges it crosses.
385
- */
386
- export declare function safeEdges(b: Box | PixelRect, safe: SafeZone, W: number, H: number): SafeOverlap["edges"];
387
- /**
388
- * How far a box reaches past the edges of another: pixels out per edge it
389
- * crosses, whole pixels (under one is none).
390
- */
391
- export declare function outsideEdges(b: Box | PixelRect, inside: Box | PixelRect): TextOutside["edges"];
392
- /**
393
- * How much of a text's glyphs lies outside a frame W × H: `glyphs` are the
394
- * boxes of what shows of them (a box per line), in the frame's pixels. The
395
- * pixels outside, their share of all the glyphs' pixels, and per edge of
396
- * the frame they cross, how far past it they reach (whole pixels: under
397
- * one is none). Undefined when they cross no edge, or have no pixels.
398
- */
399
- export declare function offFrame(glyphs: readonly (Box | PixelRect)[], W: number, H: number): Omit<TextOffFrame, "text"> | undefined;
400
- /** A text block the frame's edges cut at every measured moment of its part that shows it. */
401
- export interface CutThroughout {
402
- part: string;
403
- /** The block at the moment the frame cuts most of it. */
404
- text: MeasuredText;
405
- /** The measured moments that show it, film seconds: the frame cuts it at each. */
406
- moments: number[];
407
- /** The moment the frame cuts most of it. */
408
- t: number;
409
- /** At that moment: its glyphs outside the frame, as `TextOffFrame`. */
410
- worst: Omit<TextOffFrame, "text">;
411
- }
412
- /**
413
- * The text blocks a report's measured moments never show whole inside the
414
- * frame: in a part, a block (a layer's text, the same at each moment) that
415
- * the frame's edges cut at every moment it is on screen. A block that
416
- * slides in from past an edge and comes to rest inside is whole at some
417
- * moment, and is not one; each moment of it stays a text-off-frame fact.
418
- * A block wholly past the edges at a moment is not on screen then, so not
419
- * cut. A page viewport's text is not measured against the frame.
420
- */
421
- export declare function cutThroughout(report: LayoutReport): CutThroughout[];
422
- /**
423
- * The facts of one moment: overlaps between text blocks (of different
424
- * layers, and of the same layer), blocks reaching outside a box they are
425
- * drawn inside, text over the face and in the covered edges.
426
- */
427
- export declare function measureMoment(o: {
428
- t: number;
429
- part: string;
430
- texts: MeasuredText[];
431
- face?: Box;
432
- safe: SafeZone;
433
- width: number;
434
- height: number;
435
- /** Which layer each text belongs to (an index): blocks of one layer and of two are told apart. */
436
- owner: number[];
437
- /**
438
- * Per text, the boxes it is drawn inside, nearest first (absent: none
439
- * measured). A block is compared with each in turn, and the nearest it
440
- * reaches out of is reported.
441
- */
442
- containers?: (readonly TextContainer[] | undefined)[];
443
- /**
444
- * Per text, the box of what shows of its glyphs (MeasuredText.ink; absent:
445
- * its box). Blocks of one layer are compared by it, and so is a block
446
- * with the boxes it is drawn inside.
447
- */
448
- seen?: (Box | undefined)[];
449
- /**
450
- * Per text, the boxes of what shows of its glyphs, one per line, the
451
- * frame's own edges not clipping them (absent: its `seen` box, else its
452
- * box). The frame's edges are measured against them.
453
- */
454
- glyphs?: (readonly Box[] | undefined)[];
455
- }): LayoutMoment;
58
+ export { cutThroughout, type CutThroughout, } from "@allyhub/image-measure/layout";
456
59
  /**
457
60
  * How much a footage layer is enlarged over its window, at its largest and
458
61
  * at its smallest: drawn pixels per source pixel, from the part of the
@@ -503,28 +106,6 @@ export declare function freeBands(content: {
503
106
  * outwards to whole pixels; undefined when it does not reach them.
504
107
  */
505
108
  export declare function boxRows(b: Box | PixelRect, x: readonly [number, number]): RowSpan | undefined;
506
- /** One thing on screen at one frame: a text block, a painted box, a picture. */
507
- export interface TrackSample {
508
- /** Film seconds. */
509
- t: number;
510
- /** Its box in the frame's pixels; absent while it does not show. */
511
- box?: Box;
512
- /** 0 while it does not show. */
513
- opacity: number;
514
- }
515
- /** A thing followed frame by frame through a part. */
516
- export interface Track {
517
- part: string;
518
- layer: string;
519
- /** What it is: `text "…"`, `box`, or its tag for a picture (`img`, `svg`, `canvas`, `video`). */
520
- what: string;
521
- /** Where it is in the layer, as a selector. */
522
- selector: string;
523
- /** Its own `data-ak` name, when it has one (`named(el, name)`). */
524
- name?: string;
525
- /** One per frame looked at, in order. */
526
- samples: TrackSample[];
527
- }
528
109
  /** A thing's largest change between two frames in a row, against the changes beside it. */
529
110
  export interface Step {
530
111
  part: string;
@@ -560,4 +141,72 @@ export interface Step {
560
141
  * apart (pixels and opacity are not one scale), moves first.
561
142
  */
562
143
  export declare function largestSteps(tracks: readonly Track[]): Step[];
144
+ /** How a thing's moving stretches are found and measured (movingStretches). */
145
+ export declare const MOVING_DEFAULTS: {
146
+ /** Seconds a box holds unchanged that end a stretch: boxes are whole pixels, so a slow creep changes only every few frames. */
147
+ hold: number;
148
+ /** Px a second (at a 1080 frame) under which a stretch counts as slow, measured over `window` seconds. */
149
+ slow: number;
150
+ window: number;
151
+ };
152
+ /**
153
+ * Things that move together over one stretch: their box moved or changed
154
+ * size from its first frame to its last, with no hold of `hold` seconds in
155
+ * between. Things are one group when their stretches start and end on the
156
+ * same frames and they scale alike (moved alike, when none scales): a
157
+ * camera or a parent moving them all.
158
+ */
159
+ export interface MovingStretch {
160
+ part: string;
161
+ /** Film seconds: the frame before its first change, and its last change. */
162
+ start: number;
163
+ end: number;
164
+ /** How many things, and the first few. */
165
+ things: number;
166
+ names: {
167
+ layer: string;
168
+ what: string;
169
+ name?: string;
170
+ }[];
171
+ /** The first thing's centre moved this far, start to end (px), and its width and height over theirs at the start. */
172
+ px: number;
173
+ scale: [w: number, h: number];
174
+ /** Its mean speed, px a second, and the seconds of it under `slow` px a second (each `window` seconds measured apart). */
175
+ speed: number;
176
+ slow: number;
177
+ /** It moved within a transition's window (into its part, or out of it). */
178
+ transition?: {
179
+ type: string;
180
+ start: number;
181
+ end: number;
182
+ };
183
+ /** It was still moving when its part ended: no hold between its last change and the part's last frame. */
184
+ toEnd?: true;
185
+ }
186
+ export interface MovingOptions {
187
+ hold?: number;
188
+ slow?: number;
189
+ window?: number;
190
+ /** The frame's height, for `slow` at a 1080 frame; default 1080. */
191
+ height?: number;
192
+ fps: number;
193
+ /** Each part's end and the transitions, film seconds, to mark stretches by. */
194
+ parts?: readonly {
195
+ key: string;
196
+ end: number;
197
+ }[];
198
+ transitions?: readonly {
199
+ part: string;
200
+ from: string;
201
+ type: string;
202
+ start: number;
203
+ end: number;
204
+ }[];
205
+ }
206
+ /**
207
+ * Every stretch over which each thing's box moves or changes size, things
208
+ * moved together as one, in film order. A measurement: how far, how fast,
209
+ * how long slowly, whether in a transition or to its part's end.
210
+ */
211
+ export declare function movingStretches(tracks: readonly Track[], o: MovingOptions): MovingStretch[];
563
212
  //# sourceMappingURL=measure.d.ts.map