@allyhub/sdk 0.1.0-alpha.8 → 0.2.0-next.1

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 (365) hide show
  1. package/LICENSE.md +241 -0
  2. package/NOTICE +85 -0
  3. package/client.d.ts +45 -1
  4. package/dist/anim.js +2 -75
  5. package/dist/define.d.ts +10 -4
  6. package/dist/define.js +2 -95
  7. package/dist/dom.d.ts +1 -1
  8. package/dist/dom.js +2 -457
  9. package/dist/fit.js +2 -60
  10. package/dist/free.d.ts +18 -0
  11. package/dist/free.js +2 -0
  12. package/dist/index.d.ts +28 -13
  13. package/dist/index.js +2 -11
  14. package/dist/input.d.ts +306 -0
  15. package/dist/input.js +2 -0
  16. package/dist/media.d.ts +3 -6
  17. package/dist/media.js +2 -27
  18. package/dist/messages.d.ts +3 -2
  19. package/dist/messages.js +2 -2
  20. package/dist/module.d.ts +24 -0
  21. package/dist/module.js +2 -0
  22. package/dist/noise.js +2 -233
  23. package/dist/parts.d.ts +98 -22
  24. package/dist/parts.js +2 -414
  25. package/dist/paths.d.ts +1 -1
  26. package/dist/paths.js +2 -720
  27. package/dist/phone.d.ts +26 -0
  28. package/dist/phone.js +2 -0
  29. package/dist/piece.d.ts +106 -35
  30. package/dist/piece.js +2 -38
  31. package/dist/props.d.ts +1 -1
  32. package/dist/props.js +2 -35
  33. package/dist/scenery.d.ts +2 -0
  34. package/dist/scenery.js +2 -0
  35. package/dist/text.js +2 -38
  36. package/dist/written.d.ts +12 -0
  37. package/dist/written.js +2 -0
  38. package/docs/README.md +18 -0
  39. package/docs/batches.md +148 -0
  40. package/docs/contract.md +51 -0
  41. package/docs/defaults.md +703 -0
  42. package/docs/docs.md +148 -0
  43. package/docs/footage.md +249 -0
  44. package/docs/layers.md +317 -0
  45. package/docs/modeling.md +143 -0
  46. package/docs/project.md +265 -0
  47. package/docs/scenery.md +308 -0
  48. package/docs/sheets.md +119 -0
  49. package/docs/slides.md +111 -0
  50. package/docs/sound.md +170 -0
  51. package/docs/speech.md +289 -0
  52. package/docs/video.md +265 -0
  53. package/node_modules/@allyhub-next/audio/LICENSE +241 -0
  54. package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
  55. package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
  56. package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
  57. package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
  58. package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
  59. package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
  60. package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
  61. package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
  62. package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
  63. package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
  64. package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
  65. package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
  66. package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
  67. package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
  68. package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
  69. package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
  70. package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
  71. package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
  72. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
  73. package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
  74. package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
  75. package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
  76. package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
  77. package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
  78. package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
  79. package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
  80. package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
  81. package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
  82. package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
  83. package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
  84. package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
  85. package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
  86. package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
  87. package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
  88. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
  89. package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
  90. package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
  91. package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
  92. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
  93. package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
  94. package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
  95. package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
  96. package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
  97. package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
  98. package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
  99. package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
  100. package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
  101. package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
  102. package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
  103. package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
  104. package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
  105. package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
  106. package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
  107. package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
  108. package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
  109. package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
  110. package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
  111. package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
  112. package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
  113. package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
  114. package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
  115. package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
  116. package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
  117. package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
  118. package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
  119. package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
  120. package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
  121. package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
  122. package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
  123. package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
  124. package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
  125. package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
  126. package/node_modules/@allyhub-next/audio/package.json +17 -0
  127. package/node_modules/@allyhub-next/formats/LICENSE +241 -0
  128. package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
  129. package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
  130. package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
  131. package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
  132. package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
  133. package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
  134. package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
  135. package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
  136. package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
  137. package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
  138. package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
  139. package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
  140. package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
  141. package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
  142. package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
  143. package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
  144. package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
  145. package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  146. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
  147. package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  148. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
  149. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  150. package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
  151. package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
  152. package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
  153. package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  154. package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
  155. package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  156. package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
  157. package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
  158. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
  159. package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  160. package/node_modules/@allyhub-next/formats/package.json +14 -0
  161. package/node_modules/@allyhub-next/protocol/LICENSE +241 -0
  162. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
  163. package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  164. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
  165. package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
  166. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
  167. package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
  168. package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +274 -0
  169. package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
  170. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
  171. package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  172. package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
  173. package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
  174. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
  175. package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  176. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
  177. package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
  178. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
  179. package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
  180. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
  181. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  182. package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
  183. package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
  184. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
  185. package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  186. package/node_modules/@allyhub-next/protocol/package.json +13 -0
  187. package/node_modules/@allyhub-next/runtimes/LICENSE +241 -0
  188. package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
  189. package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
  190. package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
  191. package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
  192. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
  193. package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
  194. package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
  195. package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
  196. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  198. package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
  203. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  205. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  206. package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
  207. package/node_modules/@allyhub-next/runtimes/package.json +14 -0
  208. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
  209. package/node_modules/@allyhub-next/scenery/LICENSE +241 -0
  210. package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
  211. package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
  212. package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
  213. package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
  214. package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
  215. package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
  216. package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
  217. package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
  218. package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
  219. package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
  220. package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
  221. package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
  222. package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
  223. package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
  224. package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
  225. package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
  226. package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
  227. package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
  228. package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
  229. package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
  230. package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
  231. package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
  232. package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
  233. package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
  234. package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
  235. package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
  236. package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
  237. package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
  238. package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
  239. package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
  240. package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
  241. package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
  242. package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  243. package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
  244. package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
  245. package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
  246. package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
  247. package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
  248. package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
  249. package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
  250. package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
  251. package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
  252. package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
  253. package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
  254. package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
  255. package/node_modules/@allyhub-next/scenery/package.json +13 -0
  256. package/node_modules/@allyhub-next/video-core/LICENSE +241 -0
  257. package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
  258. package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
  259. package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
  260. package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
  261. package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
  262. package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
  263. package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
  264. package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
  265. package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
  266. package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
  267. package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
  268. package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
  269. package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
  270. package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
  271. package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
  272. package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
  273. package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
  274. package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
  275. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
  276. package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
  277. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
  278. package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  279. package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
  280. package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
  281. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
  282. package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  283. package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
  284. package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
  285. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
  286. package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  287. package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
  288. package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
  289. package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
  290. package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
  291. package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
  292. package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
  293. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
  294. package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  295. package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
  296. package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
  297. package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
  298. package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
  299. package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
  300. package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
  301. package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
  302. package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
  303. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
  304. package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  305. package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
  306. package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
  307. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
  308. package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  309. package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
  310. package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  311. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
  312. package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
  313. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
  314. package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
  315. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
  316. package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  317. package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
  318. package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
  319. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
  320. package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
  321. package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
  322. package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
  323. package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
  324. package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
  325. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
  326. package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
  327. package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
  328. package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
  329. package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
  330. package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
  331. package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
  332. package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
  333. package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
  334. package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
  335. package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
  336. package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
  337. package/node_modules/@allyhub-next/video-core/package.json +14 -0
  338. package/package.json +52 -41
  339. package/README.md +0 -17
  340. package/dist/anim.d.ts.map +0 -1
  341. package/dist/anim.js.map +0 -1
  342. package/dist/define.d.ts.map +0 -1
  343. package/dist/define.js.map +0 -1
  344. package/dist/dom.d.ts.map +0 -1
  345. package/dist/dom.js.map +0 -1
  346. package/dist/fit.d.ts.map +0 -1
  347. package/dist/fit.js.map +0 -1
  348. package/dist/index.d.ts.map +0 -1
  349. package/dist/index.js.map +0 -1
  350. package/dist/media.d.ts.map +0 -1
  351. package/dist/media.js.map +0 -1
  352. package/dist/messages.d.ts.map +0 -1
  353. package/dist/messages.js.map +0 -1
  354. package/dist/noise.d.ts.map +0 -1
  355. package/dist/noise.js.map +0 -1
  356. package/dist/parts.d.ts.map +0 -1
  357. package/dist/parts.js.map +0 -1
  358. package/dist/paths.d.ts.map +0 -1
  359. package/dist/paths.js.map +0 -1
  360. package/dist/piece.d.ts.map +0 -1
  361. package/dist/piece.js.map +0 -1
  362. package/dist/props.d.ts.map +0 -1
  363. package/dist/props.js.map +0 -1
  364. package/dist/text.d.ts.map +0 -1
  365. package/dist/text.js.map +0 -1
@@ -0,0 +1,26 @@
1
+ import { type Deeper, type PhoneCamera as SceneryPhone } from "@allyhub-next/scenery";
2
+ import type { CaptureOptions, MotionBlur } from "@allyhub-next/video-core";
3
+ export type { Deeper } from "@allyhub-next/scenery";
4
+ /** What a phone's camera is, as the options of each mechanism. */
5
+ export interface PhoneCamera extends SceneryPhone {
6
+ /** video({ capture }): the marks on the picture it records. */
7
+ capture: CaptureOptions;
8
+ /** video({ motionBlur }): the shutter's blur of what moves (a scenery's camera too). */
9
+ motionBlur: MotionBlur;
10
+ }
11
+ /**
12
+ * A phone's main camera filming a screen or a room indoors, held in a
13
+ * hand: a 26 mm lens on its 4:3 frame at f/8 equivalent (f/1.8 on its
14
+ * small sensor), a 12 MP sensor, a hand whose tremor its stabiliser mostly
15
+ * takes out, focus that hunts after a cut, a reframe or a jolt, exposure
16
+ * that follows a new framing late; grain stronger in the shadows and a
17
+ * little coloured, a soft lens and the phone's sharpening; a half-frame
18
+ * shutter.
19
+ */
20
+ export declare const PHONE_CAMERA: PhoneCamera;
21
+ /**
22
+ * PHONE_CAMERA with any of its values changed (`{ hand: { tremor: { angle:
23
+ * 0.2 } } }` changes that one and keeps the rest).
24
+ */
25
+ export declare function phoneCamera(over?: Deeper<PhoneCamera>): PhoneCamera;
26
+ //# sourceMappingURL=phone.d.ts.map
package/dist/phone.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{PHONE_CAMERA as u}from"@allyhub-next/scenery";export const PHONE_CAMERA={...u,capture:{soften:.8,grain:{amount:.02,size:1.5,shadows:2,highlights:.6,chroma:.4,chromaSize:3},sharpen:.25,vignette:.15,bloom:{threshold:.8,radius:14,strength:.25}},motionBlur:{samples:8,shutter:.5}};const i=t=>typeof t=="object"&&t!==null&&!Array.isArray(t);function s(t,r){if(!i(t)||!i(r))return r===void 0?t:r;const o={...t};for(const[n,e]of Object.entries(r))o[n]=e===void 0?t[n]:s(t[n],e);return o}export function phoneCamera(t={}){return s(PHONE_CAMERA,t)}
package/dist/piece.d.ts CHANGED
@@ -1,64 +1,135 @@
1
- import { type OutputDefinition, type PagedOptions, type PagedOutput, type PartSpec, type PieceDefinition, type ProjectConfig, type PieceContext as StagePieceContext, type VideoOptions as StageVideoOptions, type VideoOutput } from "@allyhub/engine/stage";
2
- import type { FormatEntry, Matrix } from "@allyhub/engine/stage";
1
+ import { PIECE_BRAND, type PieceDefinition, type PagedOptions, type PartSpec, type PieceContext as StagePieceContext, type PieceWritten, type VideoOptions as StageVideoOptions } from "@allyhub-next/video-core";
2
+ import type { FormatEntry, Matrix } from "@allyhub-next/video-core";
3
+ import type { ConfigSchema } from "@allyhub-next/formats";
4
+ import type { VideoConfigSchema } from "@allyhub-next/video-core";
5
+ import type { z } from "zod";
3
6
  import type { MessageReader } from "./messages.js";
4
- export type { Combo, Dims, Format, FormatEntry, FormatSpec, Matrix, MediaRef, MessageHint, MotionBlur, MusicOptions, PagedOptions, PostProcess, PieceDefinition, ProjectConfig, } from "@allyhub/engine/stage";
7
+ import type { Written } from "./written.js";
8
+ export type { Combo, Dims, Format, FormatEntry, FormatSpec, Matrix, MediaRef, MessageHint, MotionBlur, MusicOptions, PagedOptions, PagedPiece, PostProcess, CaptureOptions, PieceDefinition, PieceWritten, VideoPiece, } from "@allyhub-next/video-core";
5
9
  /**
6
- * What every output's build function receives, with message keys typed by the generated .local/cache/types.
10
+ * allyhub.config.ts as a project writes it: the project's settings
11
+ * (@allyhub-next/formats) with the look and the defaults every video
12
+ * starts from (@allyhub-next/video-core).
13
+ */
14
+ export type ProjectConfig = Omit<z.input<typeof ConfigSchema>, "look" | "defaults"> & z.input<typeof VideoConfigSchema>;
15
+ /**
16
+ * What a piece's parts (or pages) function receives, with message keys
17
+ * typed by the generated .allyhub/cache/types.
7
18
  */
8
19
  export interface PieceContext extends Omit<StagePieceContext, "s"> {
9
20
  s: MessageReader;
10
21
  }
11
- /** A video output's build function: the parts, in order. */
22
+ /** A video's parts function: the parts, in order. */
12
23
  export type VideoBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
24
+ /** A deck's pages function: the pages, in order. */
25
+ export type PagedBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
13
26
  export interface VideoOptions extends Omit<StageVideoOptions, "covers"> {
14
27
  /** Cover parts (optional): drawn for the cover image. */
15
28
  covers?(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
16
29
  }
17
- export interface PieceOptions<O extends Record<string, OutputDefinition>> {
18
- /** A stable identity. Default: the file's path in the project (without the extension). */
30
+ /** What every piece has, whatever it makes. */
31
+ export interface PieceOptions {
32
+ /** A stable identity. Default: the item's folder, from the project's root. */
19
33
  id?: string;
20
34
  /** A name for people. Default: messages `<id>.title`, else the file name. */
21
35
  title?: string | Record<string, string>;
22
36
  /**
23
- * What every output is rendered as, each combo in each format: presets
24
- * (16x9, 9x16, 1x1, 4x5), platform profiles (tiktok, reels…) or
25
- * WIDTHxHEIGHT pixels; a4 and letter for paged outputs only. An entry
26
- * may be { format, safe, maxDuration, loudness }: that format with its
27
- * covered edges (any format), longest length and loudness (a platform
28
- * profile) changed; its name is still the format's. Default:
29
- * allyhub.config.ts `defaults.formats`, else ["16x9"].
37
+ * What it is rendered as, one format: a preset (16x9, 9x16, 1x1, 4x5),
38
+ * a platform profile (tiktok, reels…) or WIDTHxHEIGHT pixels; a4 and
39
+ * letter for slides only. It may be { format, safe, maxDuration,
40
+ * loudness }: that format with its covered edges (any format), longest
41
+ * length and loudness (a platform profile) changed; its name is still
42
+ * the format's. Another format is a piece of its own, which imports what
43
+ * it shares (`video({ ...film, id, format })` reuses another piece's
44
+ * parts, their paths still relative to where they were written).
45
+ * Default: allyhub.config.ts `defaults.format`, else "16x9".
30
46
  */
31
- formats?: FormatEntry[];
47
+ format?: FormatEntry;
32
48
  /**
33
49
  * The matrix: `dims` are dimensions and their values, crossed in full;
34
- * each combo is one value per dimension (`ctx.combo`). `lang` picks
35
- * assets/text/<lang>.json (the first is the default); without it, the
36
- * languages are the messages files. `size` and `format` are not
37
- * dimensions: the frame is `formats`.
50
+ * each combo is one value per dimension (`ctx.combo`). `lang` picks the
51
+ * language of the item's scripts and assets/text/<lang>.json (the first
52
+ * is the default); without it, the languages are the project's. `size`
53
+ * and `format` are not dimensions: the frame is `format`.
38
54
  */
39
55
  matrix?: Matrix;
40
56
  /** Any key-values: the platform filters and groups by them. */
41
57
  meta?: Record<string, unknown>;
42
- outputs: O;
43
58
  }
44
- /** One piece of content: the default export of its module. */
45
- export declare function definePiece<O extends Record<string, OutputDefinition>>(opts: PieceOptions<O>): PieceDefinition & {
46
- outputs: O;
59
+ export interface VideoPieceOptions extends PieceOptions, VideoOptions {
60
+ /**
61
+ * The parts, in order. A method, as `covers` is, so a video is the
62
+ * engine's VideoPiece though its context's messages are typed narrower.
63
+ */
64
+ parts(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
65
+ }
66
+ export interface SlidesOptions extends PieceOptions, PagedOptions {
67
+ /**
68
+ * The pages, in order. Pages are made like a video's parts (part() with
69
+ * layers), each with a key unique in the deck; a page is drawn at its
70
+ * still moment. A method, as a video's parts is.
71
+ */
72
+ pages(ctx: PieceContext): PartSpec[] | Promise<PartSpec[]>;
73
+ }
74
+ /**
75
+ * A video as video() makes it: its fields as written, so another piece can
76
+ * spread it into its own (`video({ ...film, format: "9x16" })`), and where
77
+ * it was written.
78
+ */
79
+ export type Video = VideoPieceOptions & {
80
+ readonly [PIECE_BRAND]: true;
81
+ readonly kind: "video";
82
+ readonly written: PieceWritten;
47
83
  };
48
- /** A video output: the function returns the parts, in order. */
49
- export declare function video(build: VideoBuild, options?: VideoOptions): VideoOutput;
50
- /** A paged output's build function: the pages, in order. */
51
- export type PagedBuild = (ctx: PieceContext) => PartSpec[] | Promise<PartSpec[]>;
84
+ /** A deck as slides() makes it. */
85
+ export type Slides = SlidesOptions & {
86
+ readonly [PIECE_BRAND]: true;
87
+ readonly kind: "paged";
88
+ readonly written: PieceWritten;
89
+ };
90
+ /**
91
+ * Another item's piece, as what shows or plays it takes it: the SDK's own
92
+ * video() or slides(), whose ctx reads the project's typed messages, or the
93
+ * engine's piece. The engine's ctx is wider than the typed one, so a piece
94
+ * video() made is not the engine's type, though it is the same object.
95
+ */
96
+ export type ItemPiece = PieceDefinition | Video | Slides;
97
+ /** A video item's piece: the SDK's video(), or the engine's piece. */
98
+ export type VideoItem = PieceDefinition | Video;
99
+ /** Whether a value is a piece video() or slides() made. */
100
+ export declare function isItemPiece(v: unknown): v is ItemPiece;
101
+ /**
102
+ * The same piece as the engine reads it: the ctx its parts get is the
103
+ * engine's, which the SDK's typed messages only narrow.
104
+ */
105
+ export declare function enginePiece(p: ItemPiece): PieceDefinition;
106
+ /** A video: the default export of an item's video.ts. Its function returns its parts, in order. */
107
+ export type VideoFn = (opts: VideoPieceOptions) => Video;
108
+ /** A deck: the default export of an item's slides.ts. */
109
+ export type SlidesFn = (opts: SlidesOptions) => Slides;
110
+ /**
111
+ * video() for the module `at` names. Its music's and its LUT's paths are
112
+ * from that module's folder, also once spread into another piece: a field
113
+ * keeps the folder it was written in while its value is the same.
114
+ */
115
+ export declare const videoFor: (at: Written) => VideoFn;
116
+ /**
117
+ * slides() for the module `at` names: pages of one format, each one still
118
+ * frame: a single image, a carousel, slides, a PDF document; the default
119
+ * export of an item's slides.ts. `notes: true` reads each page's speaker
120
+ * notes from `<prefix>.<page>.notes`.
121
+ */
122
+ export declare const slidesFor: (at: Written) => SlidesFn;
123
+ /**
124
+ * Gone: an item's entry file exports one video (`video({ … })`) or one
125
+ * deck (`slides({ … })`). Calling it says so.
126
+ */
127
+ export declare const definePiece: (opts: unknown) => never;
52
128
  /**
53
- * Pages of one format, each one still frame: a single
54
- * image, a carousel, slides, a PDF document. Pages are made like a video's
55
- * parts (part() with layers), each with a key unique in the output;
56
- * a page is drawn at its still moment. `format` fixes the frame ("a4",
57
- * "letter", "1200x630", "16x9"…); without it the output renders in each
58
- * of the piece's formats. `notes: true` reads each page's speaker notes from
59
- * `<prefix>.<page>.notes`.
129
+ * Gone: a deck is `slides({ format, pages })`, an item's slides.ts.
130
+ * Calling it says so.
60
131
  */
61
- export declare function paged(build: PagedBuild, options?: PagedOptions): PagedOutput;
132
+ export declare const paged: (build: unknown, opts?: unknown) => never;
62
133
  /** allyhub.config.ts: project defaults and the look (optional). */
63
134
  export declare function defineConfig(config: ProjectConfig): ProjectConfig;
64
135
  //# sourceMappingURL=piece.d.ts.map
package/dist/piece.js CHANGED
@@ -1,38 +1,2 @@
1
- import { OUTPUT_BRAND, PIECE_BRAND, } from "@allyhub/engine/stage";
2
- /** One piece of content: the default export of its module. */
3
- export function definePiece(opts) {
4
- return { [PIECE_BRAND]: true, ...opts };
5
- }
6
- /** A video output: the function returns the parts, in order. */
7
- export function video(build, options = {}) {
8
- // The runtime's reader takes any string; the typed one only narrows keys.
9
- return {
10
- [OUTPUT_BRAND]: true,
11
- kind: "video",
12
- build: build,
13
- options: options,
14
- };
15
- }
16
- /**
17
- * Pages of one format, each one still frame: a single
18
- * image, a carousel, slides, a PDF document. Pages are made like a video's
19
- * parts (part() with layers), each with a key unique in the output;
20
- * a page is drawn at its still moment. `format` fixes the frame ("a4",
21
- * "letter", "1200x630", "16x9"…); without it the output renders in each
22
- * of the piece's formats. `notes: true` reads each page's speaker notes from
23
- * `<prefix>.<page>.notes`.
24
- */
25
- export function paged(build, options = {}) {
26
- // The runtime's reader takes any string; the typed one only narrows keys.
27
- return {
28
- [OUTPUT_BRAND]: true,
29
- kind: "paged",
30
- build: build,
31
- options,
32
- };
33
- }
34
- /** allyhub.config.ts: project defaults and the look (optional). */
35
- export function defineConfig(config) {
36
- return config;
37
- }
38
- //# sourceMappingURL=piece.js.map
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{PIECE_BRAND as c,isPieceDefinition as a}from"@allyhub-next/video-core";import{shapeProblem as p,voiceProblem as u}from"@allyhub-next/audio";const s=e=>{throw new Error(e)},m="An item's video.ts exports one video: export default video({ format, parts: (ctx) => [ part(…), … ] }). A second video (a cut-down, another format) is an item of its own, which imports what it shares.";export function isItemPiece(e){return a(e)}export function enginePiece(e){return e}const h=["music","post"];export const videoFor=e=>t=>{if((typeof t=="function"||typeof t.parts!="function")&&s(m),t.mic!==void 0){const i=u(t.mic);if(i!==void 0)throw new Error(`video: ${i}`)}const r=t.music;if(r!==void 0&&typeof r!="string"&&!("path"in r)){const i=Object.fromEntries(["filter","eq","compress"].filter(o=>r[o]!==void 0).map(o=>[o,r[o]])),n=p(i,!0);if(n!==void 0)throw new Error(`video: music: ${n}`)}const d=t.written?.paths,f={};for(const i of h){const n=t[i];if(n===void 0)continue;const o=d?.[i];f[i]=[n,o?.[0]===n?o[1]:e.base]}return{...t,[c]:!0,kind:"video",written:{file:e.file,...Object.keys(f).length>0?{paths:f}:{}}}},slidesFor=e=>t=>((typeof t=="function"||typeof t.pages!="function")&&s("An item's slides.ts exports one deck: export default slides({ format, pages: (ctx) => [ part(…), … ] }). Another deck (a handout in a4) is an item of its own, which imports what it shares."),{...t,[c]:!0,kind:"paged",written:{file:e.file}}),definePiece=()=>s("definePiece is gone: an item's entry file exports one piece, export default video({ format, parts: (ctx) => [ … ] }) in video.ts or slides({ format, pages: (ctx) => [ … ] }) in slides.ts, with what definePiece and its output had (id, format, matrix, music, mix…). Each of its other outputs is an item of its own, which imports what it shares."),paged=()=>s("paged() is gone: an item's slides.ts exports one deck, export default slides({ format, notes, pages: (ctx) => [ … ] }).");export function defineConfig(e){return e}
package/dist/props.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MediaKind, Preset, WordRef } from "@allyhub/engine/stage";
1
+ import type { MediaKind, Preset, WordRef } from "@allyhub-next/video-core";
2
2
  declare const TIME: unique symbol;
3
3
  /**
4
4
  * A prop that is a moment (declared time()): seconds from the part's start
package/dist/props.js CHANGED
@@ -1,35 +1,2 @@
1
- /** Text shown on screen: edited sentence by sentence, checked against its budget. */
2
- export const text = (o = {}) => ({
3
- type: "text",
4
- ...o,
5
- });
6
- /**
7
- * A moment: given as a word reference ("inbox", "inbox@2", "inbox+0.2") or
8
- * seconds from the part's start; the component receives seconds. Type the
9
- * prop as `Time`.
10
- */
11
- export const time = (o = {}) => ({
12
- type: "time",
13
- ...o,
14
- });
15
- /** Media: an import or ctx.asset(path). */
16
- export const asset = (o = {}) => ({
17
- type: "asset",
18
- ...o,
19
- });
20
- /** A look variable such as var(--ak-color-accent); never a literal color. */
21
- export const color = (o = {}) => ({
22
- type: "color",
23
- ...o,
24
- });
25
- export const number = (o = {}) => ({
26
- type: "number",
27
- ...o,
28
- });
29
- export const boolean = (o = {}) => ({
30
- type: "boolean",
31
- ...o,
32
- });
33
- export const list = (of, o = {}) => ({ type: "list", of, ...o });
34
- export const object = (fields, o = {}) => ({ type: "object", fields, ...o });
35
- //# sourceMappingURL=props.js.map
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export const text=(t={})=>({type:"text",...t}),time=(t={})=>({type:"time",...t}),asset=(t={})=>({type:"asset",...t}),color=(t={})=>({type:"color",...t}),number=(t={})=>({type:"number",...t}),boolean=(t={})=>({type:"boolean",...t}),list=(t,e={})=>({type:"list",of:t,...e}),object=(t,e={})=>({type:"object",fields:t,...e});
@@ -0,0 +1,2 @@
1
+ export { PHONE_CAMERA, phoneCamera, type Deeper, type PhoneCamera, } from "./phone.js";
2
+ //# sourceMappingURL=scenery.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export{PHONE_CAMERA,phoneCamera}from"./phone.js";
package/dist/text.js CHANGED
@@ -1,38 +1,2 @@
1
- // Text for animation: a line a word or a character at a time, a number on
2
- // its way to its value.
3
- /** Splits text into words (whitespace dropped), characters, or by a separator. */
4
- export function splitText(text, by = "words") {
5
- return by === "chars"
6
- ? Array.from(text)
7
- : by === "words"
8
- ? text.split(/\s+/).filter(Boolean)
9
- : text.split(by);
10
- }
11
- /**
12
- * A number counting to `value`, as text: `value` as it is written ("38%",
13
- * "$1,200.5M", "12,400") with its number `x` of the way from `from`, x
14
- * from 0 to 1. What is around the number stays, and so do its decimal
15
- * places and its thousands separators, so the text keeps its shape as it
16
- * counts. At x of 1 or more, and when `value` has no number, it is
17
- * `value` itself. `x` is yours to ease: countText("38%",
18
- * ease.outExpo(progress(t, 0.2, 1.4))).
19
- */
20
- export function countText(value, x, from = 0) {
21
- const m = /^(\D*?)(-?[\d,]*\.?\d+)(.*)$/s.exec(value);
22
- if (!m || x >= 1)
23
- return value;
24
- const digits = m[2] ?? "";
25
- const decimals = digits.includes(".")
26
- ? (digits.split(".")[1]?.length ?? 0)
27
- : 0;
28
- const to = Number(digits.replace(/,/g, ""));
29
- const n = from + (to - from) * Math.max(0, x);
30
- const shown = digits.includes(",")
31
- ? n.toLocaleString("en-US", {
32
- minimumFractionDigits: decimals,
33
- maximumFractionDigits: decimals,
34
- })
35
- : n.toFixed(decimals);
36
- return `${m[1] ?? ""}${shown}${m[3] ?? ""}`;
37
- }
38
- //# sourceMappingURL=text.js.map
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export function splitText(t,n="words"){return n==="chars"?Array.from(t):n==="words"?t.split(/\s+/).filter(Boolean):t.split(n)}export function countText(t,n,r=0){const i=/^(\D*?)(-?[\d,]*\.?\d+)(.*)$/s.exec(t);if(!i||n>=1)return t;const o=i[2]??"",s=o.includes(".")?o.split(".")[1]?.length??0:0,e=Number(o.replace(/,/g,"")),c=r+(e-r)*Math.max(0,n),l=o.includes(",")?c.toLocaleString("en-US",{minimumFractionDigits:s,maximumFractionDigits:s}):c.toFixed(s);return`${i[1]??""}${l}${i[3]??""}`}
@@ -0,0 +1,12 @@
1
+ /** The module the SDK is bound to: its file, a project path ("" the project's root). */
2
+ export interface SdkModule {
3
+ file: string;
4
+ }
5
+ /** A module's file and the folder its relative paths are from, both project paths. */
6
+ export interface Written {
7
+ file: string;
8
+ base: string;
9
+ }
10
+ /** Where a module was written: its file in its one spelling, and its folder. */
11
+ export declare function writtenIn(module: SdkModule): Written;
12
+ //# sourceMappingURL=written.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{dirOf as i,projectPath as e}from"@allyhub-next/formats";export function writtenIn(r){const t=e(r.file);if(t.startsWith("/")||/^[A-Za-z]:/u.test(t)||t.split("/").includes(".."))throw new Error(`sdkFor: ${JSON.stringify(r.file)} is not a project path: a file's path from the project's root, such as "launch/film/video.ts".`);return{file:t,base:i(t)}}
package/docs/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # @allyhub/sdk docs
2
+
3
+ What a piece is written with, for the version of the SDK installed beside them. Read the file a piece needs before writing it. Commands are not here: `allyhub help` lists them, `allyhub help <command>` says what one does and its options' defaults. Every export also has its documentation in JSDoc.
4
+
5
+ - [project.md](project.md): a project's folders, items and their entry files, the SDK bound to the file that imports it, imports of media, data and other items, scripts and shared text, `allyhub.config.ts`, fonts.
6
+ - [contract.md](contract.md): what the build, the check and the render rely on: a piece drawn from time alone, what piece code may not do, the rules a problem is reported under.
7
+ - [video.md](video.md): `video()`, formats, `part()`, a part's length, layers and their stacking, transitions, the look, covers, the camera filming the picture, post.
8
+ - [layers.md](layers.md): `defineComponent()` and its prop types, `custom()`, the layer's `ctx`, the DOM and layout helpers, animation, text, path, noise and input helpers, starter components.
9
+ - [speech.md](speech.md): `take()`, `say()`, word references, anchors, shown and said text, captions, edits files.
10
+ - [sound.md](sound.md): music, sound effects, the mix, the master, how the voice was recorded.
11
+ - [footage.md](footage.md): `footage()` layers: placing, cropping, reframing, punch-ins, faces and mattes, the background behind the person, a video item inside another.
12
+ - [slides.md](slides.md): `slides()`, pages, speaker notes, what a deck renders to.
13
+ - [batches.md](batches.md): the matrix: dimensions, slots, pools, structures, rules, combos.
14
+ - [scenery.md](scenery.md): 3D sceneries: `defineScenery()`, cameras and their moves, the hand that holds one, the `scenery()` layer and its screens.
15
+ - [modeling.md](modeling.md): a prop modelled in code with `@allyhub-next/model` and put in a scenery.
16
+ - [docs.md](docs.md): a doc, `doc.mdx`: its title, the Markdown and tags it reads, pictures and links, `comments.json`, check and render.
17
+ - [sheets.md](sheets.md): a sheet, `sheet.csv` and `sheet.yaml`: column types and formats, `comments.json`, check, measure, import and render.
18
+ - [defaults.md](defaults.md): every default of the piece API, generated from the code's constants, with the option that changes it.
@@ -0,0 +1,148 @@
1
+ # Batches: the matrix
2
+
3
+ A piece's `matrix` says which versions of it are made. Each version is a **combo**: one value per dimension and, when the piece has slots, a structure and one candidate per slot of it. Every combo renders in the piece's one format.
4
+
5
+ ## Dimensions
6
+
7
+ `matrix.dims` are dimensions and their values, crossed in full: `{ lang: ["en", "zh-cn"], audience: ["dev", "ops"] }` makes four combos.
8
+
9
+ - `lang` is the one dimension AllyHub reads: it picks each item's `script.<lang>.yaml` and `assets/text/<lang>.json`, the first value being the default language. Its values are lowercase language tags (`en`, `zh-cn`). Without `lang`, a piece's languages are the project's: the languages its scripts and shared text have, `allyhub.config.ts`'s `locales` first.
10
+ - Other dimensions are the piece's: its parts function reads them from `ctx.combo`.
11
+ - A name starts with a lowercase letter (then letters, digits, `_`, `-`); a value is letters, digits, `.`, `_`, `-`, each listed once. `size`, `format`, `piece`, `output`, `token`, `structure` and `id` name no dimension or slot. A wrong name or value is AK-M001.
12
+ - A combo's **key** is its names sorted, each `name=value`, joined with commas: `audience=dev,lang=en` (`default` when there are none). It names the rendered files (`.allyhub/out/<piece>/video.<key>.mp4`) and filters commands' `--combo` (`--combo lang=zh-cn`).
13
+
14
+ ## Slots
15
+
16
+ An ad is a structure of **slots** (a hook, a demo, a call to action), each with **candidates**. The matrix chooses which slot combinations to make; each chosen one is crossed with every combo of the dimensions.
17
+
18
+ ```ts file=ads/tidyform/video.ts
19
+ import { footage, part, say, video } from "@allyhub/sdk";
20
+
21
+ export default video({
22
+ format: "9x16",
23
+ maxDuration: 30,
24
+ matrix: {
25
+ dims: { lang: ["en"] },
26
+ slots: {
27
+ hook: [{ name: "price", tags: ["price"] }, "reaction", "question"],
28
+ demo: { pool: "./pool/demos" },
29
+ cta: ["trial", { name: "sale", tags: ["discount"] }],
30
+ },
31
+ structures: { classic: ["hook", "demo", "cta"], short: ["hook", "cta"] },
32
+ pick: 6,
33
+ seed: 1,
34
+ differ: { slots: 2, first: ["hook"] },
35
+ rules: [{ if: { hook: "#price" }, require: { cta: "#discount" } }],
36
+ },
37
+ parts: ({ s, combo, pool }) => {
38
+ const hook = part({
39
+ key: "hook",
40
+ speech: say(s(`ads.tidyform.hook.${combo["hook"] ?? ""}`)),
41
+ });
42
+ const cta = part({
43
+ key: "cta",
44
+ speech: say(s(`ads.tidyform.cta.${combo["cta"] ?? ""}`)),
45
+ });
46
+ if (combo["structure"] === "short") return [hook, cta];
47
+ return [
48
+ hook,
49
+ part({ key: "demo", dur: 4, layers: [footage(pool("demo"))] }),
50
+ cta,
51
+ ];
52
+ },
53
+ });
54
+ ```
55
+
56
+ | Field | Type | Default | What it is |
57
+ | --- | --- | --- | --- |
58
+ | `slots` | `{ slot: candidates }` | none | Names, `{ name, tags }`, or a pool `{ pool, tags? }` ([below](#pools)) |
59
+ | `structures` | `{ name: slots[] }` | one structure of every slot, in order | Orders of slots. With it, `combo.structure` names a combo's structure. Every slot is in some structure |
60
+ | `pick` | 1 to 10000 | every combination the rules allow | How many slot combinations sampling chooses |
61
+ | `seed` | number or string | 1 | Decides between equally good choices |
62
+ | `differ` | `{ slots?, first? }` | none | Any two chosen combos differ in at least `slots` slots (another structure counts as one); `first`: their openings differ, the first n slots of each structure, or these slots |
63
+ | `rules` | `[{ if?, require?, exclude? }]` | none | Over slots, dimensions and `structure`; a value is a name, `#tag` or a list of either. When every `if` holds, every `require` must hold and no `exclude` may. Each has a `require` or an `exclude` |
64
+ | `combos` | `Combo[]` | none: sampled | The slot combinations to make, chosen by the agent ([below](#the-agents-own-combos)). Not with `pick` or `seed` |
65
+
66
+ - A rule's condition on a slot a combo's structure lacks never holds. A condition on a dimension is kept when the slot combinations are crossed with the dimensions: a crossing it rules out is not made.
67
+ - A candidate's tags are what `#tag` matches. A part's own `tags` are labels for people and tools; rules do not read them.
68
+
69
+ ### Pools
70
+
71
+ `{ pool: "./pool/demos", tags? }` makes one candidate per media file (video, audio or picture) directly in the folder, named by the file's stem. The folder is relative to the item's entry file (`/` first: from the project's root). `tags` go to every file; a file's `<stem>.meta.json` adds its own:
72
+
73
+ ```json
74
+ { "tags": ["inbox", "short"] }
75
+ ```
76
+
77
+ `ctx.pool(slot)` is the file the slot picked in this combo, as a path from the project's root that `footage()` and `ctx.asset()` take. A pool outside the project, an empty pool, two files with one stem, or a stem that cannot be a name is AK-X001.
78
+
79
+ ## Sampling
80
+
81
+ Without `combos`, sampling chooses `pick` slot combinations, the same for the same definition. Greedy, best first, it prefers combinations that:
82
+
83
+ 1. keep `differ` against every earlier pick;
84
+ 2. use the most candidates (and structures) no pick uses yet, so every candidate appears once when it can;
85
+ 3. use the candidates used least so far;
86
+ 4. make the most pairs of candidates not yet seen together;
87
+ 5. differ most from the nearest earlier pick;
88
+ 6. then the seed decides.
89
+
90
+ Each pick keeps a reason in a few words. Sampling looks at no more than 100,000 slot combinations before the rules; more is AK-X002.
91
+
92
+ ## The agent's own combos
93
+
94
+ `combos` names the slot combinations to make, in order: each names `structure` when the piece declares structures, and one candidate per slot of it, never a dimension. Nothing is sampled.
95
+
96
+ ```ts file=ads/chosen/video.ts
97
+ import { part, video } from "@allyhub/sdk";
98
+
99
+ export default video({
100
+ format: "1x1",
101
+ matrix: {
102
+ dims: { lang: ["en", "zh-cn"] },
103
+ slots: { hook: ["a", "b"], cta: ["trial", "sale"] },
104
+ combos: [
105
+ { hook: "a", cta: "trial" },
106
+ { hook: "b", cta: "sale" },
107
+ ],
108
+ },
109
+ parts: ({ combo }) => [
110
+ part({ key: "hook", dur: 2, title: `Hook ${combo["hook"] ?? ""}` }),
111
+ part({ key: "cta", dur: 2 }),
112
+ ],
113
+ });
114
+ ```
115
+
116
+ This makes `c01-en`, `c01-zh-cn`, `c02-en` and `c02-zh-cn`. Each combo is checked against the slots (AK-X001), the rules (AK-X002) and `differ` (AK-X004; the same combo twice too).
117
+
118
+ ## Combo ids
119
+
120
+ - The chosen slot combinations are `c01`, `c02`, … in order (with as many digits as the count needs: `c001` when there are 100 or more). With more than one combo of the dimensions, an id adds their values: `c01-en`, `c01-zh-cn`.
121
+ - A piece with slots names its files by id (`.allyhub/out/<piece>/video.c01-en.mp4`), and `--combo c03` names one.
122
+ - A piece with dimensions only has no ids: its combos are named by their keys.
123
+
124
+ ## In the parts function
125
+
126
+ - `ctx.combo.<slot>` is the candidate's name, `ctx.combo.structure` the structure, `ctx.combo.<dimension>` the dimension's value.
127
+ - `ctx.pool(slot)` is a pool slot's file; a slot that is not a pool throws.
128
+ - A part whose `key` is a slot's name fills that slot; `part({ slot })` names the slot a part with another key fills.
129
+
130
+ **Each part renders once.** A rendered part is kept and reused in every combo that has the same part; the sound is mixed for each whole combo. So a part's layers read from their `ctx.combo` only the dimensions and their own part's slot: reading another slot's pick, or the structure, is AK-X005. Choose in the parts function and pass the result to the layer. A transition on a slot's part is rendered once per pair of parts it joins.
131
+
132
+ The check loads only a few combos that between them hold every candidate, and puts the others together from their parts: each combo's length against `maxDuration` (AK-X006), and as facts the speech's loudness at each join (`join-loudness`), the music's length (`music-length`) and the generated media each combo uses. `matrix-coverage` lists each candidate with the combos that use it.
133
+
134
+ ## Rules
135
+
136
+ | Rule | What is wrong |
137
+ | --- | --- |
138
+ | AK-X001 | A slot, structure, rule, pool or combo names something that does not exist, or a combo lacks a slot of its structure |
139
+ | AK-X002 | The rules leave no combination to make (or the slots make more than sampling looks at), or rule out a combo `combos` names |
140
+ | AK-X004 | Two chosen combos are the same, or more alike than `differ` allows |
141
+ | AK-X005 | A part reads another slot's pick, so one render of it cannot serve every combo |
142
+ | AK-X006 | A combo is longer than its video's `maxDuration` |
143
+
144
+ ## Commands
145
+
146
+ - `allyhub inspect combos` prints each piece's slots, rules, the chosen combos with why, and what rendering them costs in part renders, without a browser.
147
+ - `allyhub render <piece> --type csv` writes the batch's table of ads, `<piece>/ads.csv`: a row per ad with its combo, picks, length, file, name and the generated media it uses.
148
+ - `allyhub render` renders every combo; `--combo` narrows it.
@@ -0,0 +1,51 @@
1
+ # The contract
2
+
3
+ What the build, the check and the render rely on. Everything else is the piece's own choice.
4
+
5
+ ## A frame depends only on its time
6
+
7
+ - A piece is drawn in a page, a moment at a time, in any order: the check draws moments out of order and compares them with the same moments drawn in order (AK-D002), and the render draws parts on several pages at once and keeps what it drew in the part cache.
8
+ - A layer's `mount` lays it out once; its `render(el, t, …)` sets every property that moves from `t` alone ([layers.md](layers.md)). Nothing may carry state from one `render` call to the next.
9
+ - Piece code sees the moment's clock, not the wall's: `Date`, `Date.now()` and `performance.now()` read the moment being drawn (time 0 is 2026-01-01T00:00:00Z); `Math.random()` and `crypto.getRandomValues()` are seeded by the piece's id, the combo, the part and the frame; `requestAnimationFrame` callbacks run at the moment; `setTimeout` and `setInterval` never fire. Use `rand(seed)` and the noise functions for randomness of your own.
10
+ - CSS animations and transitions run on the browser's clock: never let them drive the picture.
11
+ - Work a layer must finish before anything is drawn (a 3D scenery's build, a picture decoding) goes through `ctx.wait(promise)`. Loading may take `loadLimit` seconds (AK-P002), one moment `seekLimit` seconds (AK-P003) ([defaults.md](defaults.md)).
12
+ - A part is rendered once and reused in every combo that has it: a layer reads the combo's dimensions and its own part's slot, never another slot's pick (AK-X005, [batches.md](batches.md)).
13
+
14
+ ## It is drawn offline
15
+
16
+ - Fonts, pictures, footage, music and data are files in the project, imported or named by paths relative to the module that names them ([project.md](project.md)). A request the stage does not serve is AK-N003; a network request while building is AK-B003.
17
+ - An import of a URL, of a file outside the project or of a package `package.json` does not declare is AK-B005.
18
+ - The module's top level runs in Node when the build reads a piece: only `parts`, `pages`, `covers` and a layer's `mount` and `render` touch `window` and `document`.
19
+ - A layer changes only its own element: a change to the page outside the stage is AK-R003, and a style value the browser does not accept is AK-R004.
20
+
21
+ ## What goes wrong is a problem, not a wrong picture
22
+
23
+ - Every command reads the problems of each page it drew with and prints them, each under its rule: a layer that throws at 0.8 s (AK-R001), work it waits for that fails or does not settle, a picture that does not load (AK-A005), a 3D scenery that does not build (AK-W001). `ctx.report({ code, message })` reports one of a layer's own.
24
+ - A render does not make a file whose drawing raised a problem; it lists it as not made, with why, and keeps nothing of it in the part cache.
25
+ - What piece code prints with `console.log`, `info`, `warn`, `error` and `debug` is collected with where it ran (the module, a part, a layer, its moment) and printed by the commands after their own output. It changes no frame.
26
+
27
+ ## Checks are for objective errors
28
+
29
+ `allyhub check` reports problems: what is wrong whatever the taste. Each has a rule, its code's letter its area:
30
+
31
+ | Codes | Area |
32
+ | --- | --- |
33
+ | `AK-M…` | An item, a file's format: a piece's fields, entry files, scripts, messages, docs, sheets |
34
+ | `AK-B…` | The build: ids, network, time, imports, the installed SDK |
35
+ | `AK-K…` | Parts: keys, a piece without parts |
36
+ | `AK-D…` | Determinism |
37
+ | `AK-T…` | Speech: word times, generated voices, ranges, word references, anchors, edits files |
38
+ | `AK-S…` | Text: a missing key (S001), a missing translation (S002, a warning) |
39
+ | `AK-A…` | Media and data files |
40
+ | `AK-F…`, `AK-G…` | A platform profile's limits; an unknown format |
41
+ | `AK-P…` | Loading and drawing time |
42
+ | `AK-R…`, `AK-N…` | Run time: an exception, the page changed, a style refused; a request blocked |
43
+ | `AK-L…` | Layout and fonts: text cut at the frame's edge, missing glyphs, fallback fonts (warnings) |
44
+ | `AK-X…` | The matrix and its combos |
45
+ | `AK-W…` | 3D sceneries |
46
+
47
+ An error must be fixed: a render will not make a file with one. A warning is reported and the render goes on. What is a matter of judgment (text near a face, a loudness step between parts, a still stretch, a cut seam) is never a problem: it is a fact, with its numbers, which `allyhub inspect` prints for the agent to weigh.
48
+
49
+ ## Defaults can be changed
50
+
51
+ Every default of the piece API has an option that changes it: [defaults.md](defaults.md) lists them with the option. A command's defaults are in `allyhub help <command>`.