@allyhub/sdk 0.8.0 → 0.10.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 (497) hide show
  1. package/CHANGELOG.md +19 -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 +4 -1
  18. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  19. package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +22 -0
  20. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  21. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  22. package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
  23. package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
  24. package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
  25. package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
  26. package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
  27. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
  28. package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
  29. package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
  30. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
  31. package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
  32. package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
  33. package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
  34. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  35. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
  36. package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
  37. package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
  38. package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
  39. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +107 -83
  40. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  41. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +185 -8
  42. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  43. package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
  44. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  45. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  46. package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
  47. package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
  48. package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
  49. package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
  50. package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
  51. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
  52. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  53. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
  54. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  55. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
  56. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  57. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +96 -42
  58. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  59. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  60. package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
  61. package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
  62. package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
  63. package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
  64. package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
  65. package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
  66. package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
  67. package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
  68. package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
  69. package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
  70. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
  71. package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
  72. package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
  73. package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
  74. package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
  75. package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
  76. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
  77. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
  78. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
  79. package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
  80. package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
  81. package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
  82. package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
  83. package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
  84. package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
  85. package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
  86. package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
  87. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
  88. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
  89. package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
  90. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
  91. package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
  92. package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
  93. package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
  94. package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
  95. package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
  96. package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
  97. package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
  98. package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
  99. package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
  100. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
  101. package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
  102. package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
  103. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
  104. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
  105. package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
  106. package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
  107. package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
  108. package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
  109. package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
  110. package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
  111. package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
  112. package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
  113. package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
  114. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
  115. package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
  116. package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
  117. package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
  118. package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
  119. package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
  120. package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
  121. package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
  122. package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
  123. package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
  124. package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
  125. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
  126. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
  127. package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
  128. package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
  129. package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
  130. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
  131. package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
  132. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
  133. package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
  134. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
  135. package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
  136. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
  137. package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
  138. package/dist/node_modules/@allyhub/measure/package.json +13 -0
  139. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
  140. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
  141. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
  142. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  143. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  144. package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
  145. package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
  146. package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
  147. package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
  148. package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
  149. package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
  150. package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
  151. package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
  152. package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
  153. package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
  154. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
  155. package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
  156. package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
  157. package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
  158. package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
  159. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
  160. package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
  161. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +437 -0
  162. package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
  163. package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
  164. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
  165. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
  166. package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
  167. package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
  168. package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
  169. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
  170. package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
  171. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
  172. package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
  173. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
  174. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
  175. package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
  176. package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
  177. package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
  178. package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
  179. package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
  180. package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
  181. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
  182. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +291 -0
  183. package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
  184. package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
  185. package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
  186. package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
  187. package/dist/node_modules/@allyhub/piece/package.json +18 -0
  188. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +271 -0
  189. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  190. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
  191. package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
  192. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
  193. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  194. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.d.ts +337 -0
  195. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.js +2 -0
  196. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
  197. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  198. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +155 -0
  199. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  200. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +235 -133
  201. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  202. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
  203. package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
  204. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +65 -197
  205. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  206. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
  207. package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
  208. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +6 -0
  209. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  210. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  211. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
  212. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
  213. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +274 -0
  214. package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
  215. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +77 -91
  216. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  217. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
  218. package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
  219. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
  220. package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
  221. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
  222. package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
  223. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
  224. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  225. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
  226. package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
  227. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
  228. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  229. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
  230. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  231. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
  232. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  233. package/dist/node_modules/@allyhub/protocol/package.json +5 -1
  234. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  235. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
  236. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
  237. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
  238. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
  239. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
  240. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  241. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
  242. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
  243. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
  244. package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
  245. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  246. package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
  247. package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
  248. package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
  249. package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
  250. package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
  251. package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
  252. package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
  253. package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
  254. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  255. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
  257. package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
  258. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
  259. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  261. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +70 -0
  262. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  263. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.d.ts +6 -0
  264. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  265. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  266. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.d.ts +3 -1
  267. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
  268. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  269. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
  270. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  271. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
  272. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  273. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.d.ts +9 -0
  274. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
  275. package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
  276. package/dist/node_modules/@allyhub/sheet/dist/calc/types.d.ts +6 -0
  277. package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
  278. package/dist/node_modules/@allyhub/sheet/dist/chart.d.ts +9 -0
  279. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  280. package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
  281. package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
  282. package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
  283. package/dist/node_modules/@allyhub/sheet/dist/formula/ast.d.ts +12 -1
  284. package/dist/node_modules/@allyhub/sheet/dist/formula/move.d.ts +5 -1
  285. package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
  286. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  287. package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
  288. package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
  289. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  290. package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
  291. package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
  292. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +5 -5
  293. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  294. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +88 -3
  295. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  296. package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
  297. package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
  298. package/dist/node_modules/@allyhub/sheet/dist/printed.d.ts +19 -0
  299. package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
  300. package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
  301. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
  302. package/dist/node_modules/@allyhub/sheet/dist/values.d.ts +2 -0
  303. package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
  304. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +8 -6
  305. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  306. package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
  307. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +6 -2
  308. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  309. package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
  310. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -1
  311. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  312. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +3 -1
  313. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  314. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.d.ts +7 -1
  315. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
  316. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
  317. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  318. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.d.ts +1 -1
  319. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  320. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.d.ts +12 -1
  321. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
  322. package/dist/node_modules/@allyhub/sheet/package.json +5 -1
  323. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
  324. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  325. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +101 -11
  326. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  327. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  328. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
  329. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  330. package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
  331. package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
  332. package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
  333. package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +24 -0
  334. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  335. package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +223 -0
  336. package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
  337. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
  338. package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
  339. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
  340. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  341. package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
  342. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  343. package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
  344. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  345. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +25 -4
  346. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
  347. package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
  348. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +20 -11
  349. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  350. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
  351. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
  352. package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
  353. package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
  354. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  355. package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
  356. package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
  357. package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
  358. package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
  359. package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
  360. package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
  361. package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
  362. package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
  363. package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
  364. package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
  365. package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
  366. package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
  367. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
  368. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  369. package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
  370. package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
  371. package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
  372. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
  373. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
  374. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
  375. package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
  376. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +24 -432
  377. package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
  378. package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
  379. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +8 -14
  380. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  381. package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
  382. package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
  383. package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
  384. package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
  385. package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
  386. package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
  387. package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
  388. package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
  389. package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
  390. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
  391. package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
  392. package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
  393. package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
  394. package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
  395. package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
  396. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  397. package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
  398. package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
  399. package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
  400. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
  401. package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
  402. package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
  403. package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
  404. package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
  405. package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
  406. package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
  407. package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
  408. package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
  409. package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +12 -5
  410. package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +2 -0
  411. package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
  412. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
  413. package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
  414. package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
  415. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
  416. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
  417. package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
  418. package/dist/scenery.d.ts +1 -1
  419. package/dist/scenery.js +1 -1
  420. package/dist/sheets.d.ts +1 -1
  421. package/dist/sheets.js +1 -1
  422. package/dist/slides.d.ts +1 -9
  423. package/dist/slides.js +1 -1
  424. package/docs/README.md +10 -6
  425. package/docs/batches.md +5 -5
  426. package/docs/canvas.md +28 -0
  427. package/docs/contract.md +2 -2
  428. package/docs/defaults.md +298 -22
  429. package/docs/docs.md +80 -66
  430. package/docs/footage.md +7 -7
  431. package/docs/image.md +165 -0
  432. package/docs/layers.md +22 -13
  433. package/docs/modeling.md +4 -4
  434. package/docs/pictures.md +65 -0
  435. package/docs/project.md +51 -31
  436. package/docs/scenery.md +14 -15
  437. package/docs/sheets.md +46 -28
  438. package/docs/slides.md +121 -67
  439. package/docs/sound.md +3 -3
  440. package/docs/speech.md +8 -8
  441. package/docs/video.md +16 -13
  442. package/docs/websites.md +4 -4
  443. package/docs/x.md +73 -0
  444. package/package.json +7 -2
  445. package/dist/define.js +0 -2
  446. package/dist/free.js +0 -2
  447. package/dist/input.js +0 -2
  448. package/dist/module.js +0 -2
  449. package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
  450. package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
  451. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
  452. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
  453. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
  454. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
  455. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
  456. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
  457. package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
  458. package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
  459. package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
  460. package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
  461. package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
  462. package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
  463. package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
  464. package/dist/parts.js +0 -2
  465. package/dist/phone.js +0 -2
  466. package/dist/piece.js +0 -2
  467. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
  468. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
  469. /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
  470. /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
  471. /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
  472. /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
  473. /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
  474. /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
  475. /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
  476. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
  477. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
  478. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
  479. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
  480. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
  481. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
  482. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
  483. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
  484. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
  485. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
  486. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
  487. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
  488. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
  489. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
  490. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
  491. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
  492. /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
  493. /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
  494. /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
  495. /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
  496. /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
  497. /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
@@ -1,72 +1,20 @@
1
+ import type { GraphicLayer, LayerTiming, PartDefaults, WordRef, Look, MediaInfo, FormatEntry, Matrix } from "@allyhub/piece";
2
+ import { LAYER_BRAND, PIECE_BRAND, type BuildContext } from "@allyhub/piece";
1
3
  import type { CaptureOptions } from "./render-types.js";
2
- import type { Look } from "./look.js";
3
- import type { MediaInfo, Word } from "./media.js";
4
4
  import type { FixedShape, MasterOptions, MixOptions, SoundMoment, SoundShape, VoiceSetting } from "./audio-types.js";
5
- import type { Format, FormatEntry, SizeInfo } from "./formats.js";
6
- import type { Combo, Matrix } from "./matrix.js";
7
5
  import type { Ease } from "./motion.js";
8
6
  import type { MusicStretch, MusicTime } from "./music.js";
9
- import type { PixelRect } from "./timeline.js";
10
7
  import type { TransitionInput } from "./transition.js";
11
- /** Marks a piece made by video() or slides(). */
12
- export declare const PIECE_BRAND = "__allyhubPiece";
13
8
  /** Marks a part made by part(), so the runtime can tell parts from other values. */
14
9
  export declare const PART_BRAND = "__allyhubPart";
15
- /** Marks a layer made by footage(), a component or custom(). */
16
- export declare const LAYER_BRAND = "__allyhubLayer";
17
10
  /** Marks a speech source made by take() or say(). */
18
11
  export declare const SPEECH_BRAND = "__allyhubSpeech";
19
- /** Marks a media value (an import or ctx.asset), whose url the runtime resolves. */
20
- export declare const MEDIA_BRAND = "__allyhubMedia";
21
12
  /** The output kinds of a piece: a video (a deck is @allyhub/slides-core's). */
22
13
  export declare const OUTPUT_KINDS: readonly ["video"];
23
14
  export type OutputKind = (typeof OUTPUT_KINDS)[number];
24
- /**
25
- * A moment in a part: a word of its speech ("inbox"), the nth time it is
26
- * said ("inbox@2"), shifted by seconds ("inbox+0.2", "inbox@2-0.3"), or
27
- * seconds from the part's start (a number, or a string that is only one).
28
- */
29
- export type WordRef = string | number;
30
- export interface MessageHint {
31
- /** Length budget in characters; a hint for whoever writes the text. */
32
- max?: number;
33
- /** A note for whoever edits the text. */
34
- note?: string;
35
- }
36
- /** ctx.s: the current language's text. */
37
- export interface MessageReader {
38
- (key: string, hint?: MessageHint): string;
39
- /**
40
- * Numbered keys under a prefix, in order: `x.0`, `x.1`… Deeper keys make
41
- * objects (`x.0.name`) and nested lists. What each item is, the SDK's
42
- * reader types from the project's messages; here it is not known.
43
- */
44
- list(prefix: string, hint?: MessageHint): unknown[];
45
- /** The text with its {name} variables filled in. */
46
- with(key: string, inputs: Readonly<Record<string, string | number>>, hint?: MessageHint): string;
47
- }
48
- /** What every output's build function receives. */
49
- export interface PieceContext {
50
- /**
51
- * This combo: one value per dimension and, when the piece has slots, its
52
- * structure (when it declares structures) and one candidate per slot of
53
- * it, e.g. { lang: "en", hook: "price", demo: "inbox" }.
54
- */
55
- combo: Combo;
56
- /**
57
- * The file a pool slot picked in this combo (`slots: { demo: { pool:
58
- * "./pool/demos" } }`), as a path footage() and ctx.asset() take.
59
- */
60
- pool(slot: string): string;
61
- s: MessageReader;
62
- /** Media at a path relative to the piece's file (dynamic paths; fixed ones are imports). */
63
- asset(path: string): MediaInfo;
64
- /**
65
- * A data file (CSV rows, YAML, JSON) at a path relative to the piece's
66
- * file: for dynamic paths; fixed ones are imports. Recorded in reads().
67
- * Cast it to the shape you expect: `ctx.data(path) as Plan[]`.
68
- */
69
- data(path: string): unknown;
15
+ export type { MessageReader } from "@allyhub/piece";
16
+ /** What every output's build function receives: a build's context (@allyhub/piece's BuildContext) and the look. */
17
+ export interface PieceContext extends BuildContext {
70
18
  look: Look;
71
19
  }
72
20
  /**
@@ -109,266 +57,6 @@ export declare function partAnchorList(anchors: PartAnchors | undefined): {
109
57
  at: number;
110
58
  end?: number;
111
59
  }[];
112
- /**
113
- * Where an outer video shows a video item: its film seconds from `from`
114
- * to `to` play in the outer's part `part`, from the outer's film time
115
- * `start`, the part starting at `partStart`.
116
- */
117
- export interface ShownIn {
118
- from: number;
119
- to: number;
120
- part: string;
121
- start: number;
122
- partStart: number;
123
- /** Its seconds per outer second; default 1. */
124
- speed?: number;
125
- }
126
- /** What mount and render receive besides the element and props. */
127
- /** A video drawn inside a layer (StageContext.video). */
128
- export interface EmbeddedVideo {
129
- /** Its piece's id. */
130
- id: string;
131
- /** Seconds. */
132
- duration: number;
133
- /** The pixels it is drawn in. */
134
- width: number;
135
- height: number;
136
- /** Draws its moment t (seconds from its start), settled when it returns; `layout`: for its layout alone. */
137
- seek(t: number, layout?: boolean): Promise<void>;
138
- /** Its moment by a reference of its own (an anchor, "@click", or a part's key), in its seconds (momentOf). */
139
- at(ref: string): number;
140
- }
141
- export interface StageContext {
142
- look: Look;
143
- /** The format being drawn, e.g. "9x16". */
144
- format: Format;
145
- /** Its pixels, orientation and platform safe zone. */
146
- dims: SizeInfo;
147
- /**
148
- * The combo. A layer may read the dimensions and its own part's slot,
149
- * never another slot's pick (AK-X005): a part is rendered once and
150
- * reused in every combo that has it.
151
- */
152
- combo: Combo;
153
- /** The part's length in seconds. */
154
- dur: number;
155
- asset(path: string): MediaInfo;
156
- /**
157
- * A project file that may not be there (a scenery's bake): its media when
158
- * it is, undefined when not, with no problem either way. The read is
159
- * recorded, so the part is drawn again once the file is made.
160
- */
161
- optionalAsset?(path: string): MediaInfo | undefined;
162
- /**
163
- * The part's words on its own clock (seconds from the part's start), for
164
- * captions and karaoke-style layers; empty when the part has no speech.
165
- */
166
- words(): readonly Word[];
167
- /** Seconds from the part's start of a word reference. */
168
- at(ref: WordRef): number;
169
- /** This layer's own window, in seconds from the part's start. */
170
- layer: {
171
- start: number;
172
- end: number;
173
- };
174
- /**
175
- * Work this layer must finish before anything is drawn, such as a 3D
176
- * scenery building: the runtime awaits it before the output is ready and
177
- * before a frame is drawn, whatever the moment. A rejection is reported
178
- * with the layer, its part and the moment (an error carrying a rule
179
- * `code`, such as AK-W001, under that rule; else AK-R001); work that
180
- * does not settle within the piece's seekLimit is AK-P003.
181
- */
182
- wait(work: Promise<unknown>): void;
183
- /**
184
- * Reports what went wrong drawing this layer, at any moment (a 3D
185
- * scenery's shader that does not compile, a screen it cannot draw): the
186
- * output's problems carry it, with the layer's part, and every command
187
- * prints it. `code` is a rule's (AK-W006); a code that is not one is
188
- * AK-R001.
189
- */
190
- report?(p: {
191
- code: string;
192
- message: string;
193
- level?: "error" | "warn";
194
- }): void;
195
- /**
196
- * The caption cues shown in this part, on its own clock (seconds from
197
- * the part's start), each with its words: built from the speech heard
198
- * during the part's picture, spelled as the script when there is one.
199
- * `maxChars` (default 32, 16 for Chinese, Japanese and Korean) and
200
- * `maxWords` (default none) cap a cue; `keep` lists phrases a cue never
201
- * breaks inside; a cue never spans two parts.
202
- * Empty when nothing is said during the part.
203
- */
204
- captions(opts?: CaptionOptions): readonly CaptionTrackCue[];
205
- /**
206
- * Where a face is at part time t, in the frame's pixels: from the face
207
- * track of the topmost footage showing then that has one (check and
208
- * render make it). Face `id` of that track; by default that layer's speaker
209
- * (its `speaker` option, else the track's default speaker). Undefined
210
- * when no footage with a face track shows, or that face is not seen then.
211
- */
212
- face(t: number, id?: number): PixelRect | undefined;
213
- /**
214
- * Every face at part time t with its id and box, in the frame's pixels:
215
- * from the face track of the topmost footage showing then that has one.
216
- * Empty when there is none.
217
- */
218
- faces(t: number): readonly FaceOnFrame[];
219
- /**
220
- * The text of the part's layers listed before this one at part time t:
221
- * each block of text (a line, a paragraph) as that layer draws it then,
222
- * in the frame's pixels. Layers not showing at t give none. Measures by
223
- * drawing those layers at t, so call it in mount (list a layer after
224
- * the ones it should see).
225
- */
226
- texts(t: number): readonly TextBox[];
227
- /**
228
- * The areas the format's platform interface covers, in the frame's
229
- * pixels: a strip per covered edge (none for a custom format).
230
- */
231
- covered: readonly PixelRect[];
232
- /**
233
- * The content box, [x, y, w, h] in the frame's pixels: clear of the
234
- * covered areas with a gap, and at least a margin from every side. The
235
- * same box layout(ctx) gives as left, top, right and bottom with its
236
- * default options (see contentEdges for how it is computed).
237
- */
238
- content: PixelRect;
239
- /**
240
- * The output this layer is in, on its film clock: the part's start, and
241
- * the film seconds of a reference anywhere in the output (an anchor of
242
- * any part, "@turn", or a part's key). Reading it makes the part's
243
- * place in the film part of its identity.
244
- */
245
- readonly film?: {
246
- readonly start: number;
247
- /** The part's key. */
248
- readonly part: string;
249
- at(ref: string): number;
250
- /** Where an outer video shows this one (a part's video take, a footage of it); absent at the top. */
251
- readonly outer?: ShownIn;
252
- };
253
- /**
254
- * The camera an outer video asks a scenery layer of this name to be drawn
255
- * from (footage({ camera }) of a video item); undefined: its own.
256
- */
257
- cameraFor?(name: string): unknown;
258
- /** The drawing scale an outer video asks scenery layers for (footage({ quality })); undefined: their own. */
259
- readonly sceneryScale?: number;
260
- /** True in a video drawn inside another (a screen, a part's video take, a footage of a video item). */
261
- readonly embedded?: boolean;
262
- /**
263
- * True while the runtime draws a moment only to measure its layout (the
264
- * check's text and box measurements, ctx.texts): nothing reads this
265
- * frame's pixels. A layer that paints a canvas no layout depends on (a
266
- * 3D scenery) may skip painting then; whatever it places in the DOM it
267
- * still places. False for every frame that is shown or captured.
268
- */
269
- readonly layoutOnly?: boolean;
270
- /**
271
- * Another video of the project, drawn in an element of this layer's (a
272
- * scenery's screen): the piece this one imported (`import demo from
273
- * "../demo/video"`), in its own format, in this video's language where
274
- * it has it. Its parts, speech, anchors and components are its own; it
275
- * draws its graphic layers over its background (no footage yet), and
276
- * what it reads counts as this video's. Absent where the host cannot
277
- * embed.
278
- */
279
- video?(piece: unknown, el: HTMLElement): Promise<EmbeddedVideo>;
280
- /**
281
- * Answers a question the host asks every layer of the output by name
282
- * (`LoadedOutput.ask`): a scenery's cuts, the world times of references,
283
- * its facts. A layer answers only the questions it registers; the host
284
- * gets each answer with the layer and part it came from. Absent where
285
- * the host asks nothing.
286
- */
287
- answer?<K extends keyof LayerQueries>(name: K, handler: (args: LayerQueries[K]["args"]) => LayerQueries[K]["answer"] | Promise<LayerQueries[K]["answer"]>): void;
288
- /**
289
- * The page's real clock and timers, which the runtime replaces with the
290
- * moment's for piece code: for work that must wait on the wall clock (a
291
- * scenery's model loaders, a decoder's worker), never for what a frame
292
- * shows.
293
- */
294
- readonly realTimers?: RealTimers;
295
- }
296
- /** The page's own clock and timers (StageContext.realTimers). */
297
- export interface RealTimers {
298
- now(): number;
299
- setTimeout(callback: () => void, ms: number): unknown;
300
- clearTimeout(id: unknown): void;
301
- }
302
- /**
303
- * The questions a layer may answer (StageContext.answer), by name: each
304
- * its arguments and its answer. Empty here: a package that draws a kind of
305
- * layer adds its own by declaration merging, e.g.
306
- *
307
- * declare module "@allyhub/video-core" {
308
- * interface LayerQueries { "scenery.cuts": { args: undefined; answer: readonly number[] } }
309
- * }
310
- */
311
- export interface LayerQueries {
312
- }
313
- /** An answer to a question, with where it came from (LoadedOutput.ask). */
314
- export interface LayerAnswer<A> {
315
- part: string;
316
- /** The layer's component name, and its index in the part. */
317
- layer: string;
318
- index: number;
319
- answer: A;
320
- }
321
- /** A face on the frame (StageContext.faces): its id in the face track, and its box in the frame's pixels. */
322
- export interface FaceOnFrame {
323
- id: number;
324
- box: PixelRect;
325
- }
326
- /** A block of another layer's text at a moment (StageContext.texts). */
327
- export interface TextBox {
328
- /** The layer's component name. */
329
- layer: string;
330
- /** The text. */
331
- text: string;
332
- /** Where it is, in the frame's pixels. */
333
- box: PixelRect;
334
- }
335
- /** How a captions layer wants its cues cut (StageContext.captions). */
336
- export interface CaptionOptions {
337
- /** Most characters in a cue; default 32 (16 for Chinese, Japanese and Korean). */
338
- maxChars?: number;
339
- /** Most words in a cue; default no limit. */
340
- maxWords?: number;
341
- /**
342
- * Phrases a cue never breaks inside (["work harder"]), matched as said
343
- * (case, accents and punctuation ignored, whole words): the cue around
344
- * one may run over maxChars or maxWords.
345
- */
346
- keep?: readonly string[];
347
- /**
348
- * Seconds: a gap between two cues of a part shorter than this closes,
349
- * the first held until the next (no flicker); default 0.4.
350
- */
351
- close?: number;
352
- /**
353
- * The part's first cue from the part's start and its last to its end,
354
- * so a caption shows across the part's whole picture and a cut leaves
355
- * no frame without one; default false (from the first word to the last).
356
- */
357
- edges?: boolean;
358
- }
359
- /** A word of a caption cue, as the script spells it, on the part's clock. */
360
- export interface CaptionWord {
361
- text: string;
362
- start: number;
363
- end: number;
364
- }
365
- /** A caption cue on the part's clock, with its words. */
366
- export interface CaptionTrackCue {
367
- start: number;
368
- end: number;
369
- text: string;
370
- words: CaptionWord[];
371
- }
372
60
  /** Media named by a path relative to the piece's file, or an imported media value. */
373
61
  export type MediaRef = string | MediaInfo;
374
62
  /** A stretch of a recording (audio or video) and its words. */
@@ -435,7 +123,7 @@ export interface SaySpeech {
435
123
  text: string;
436
124
  /** The voice tool's voice id. */
437
125
  voice?: string;
438
- /** The voice tool; default speech-elevenlabs-multilingual-v2. */
126
+ /** The voice tool; default speak. */
439
127
  tool?: string;
440
128
  /**
441
129
  * More input for the voice tool (plain JSON), passed with the text and
@@ -474,15 +162,6 @@ export interface VideoSpeech {
474
162
  /** Where a part's speech comes from. */
475
163
  export type SpeechSpec = TakeSpeech | SaySpeech | VideoSpeech;
476
164
  export declare function isSpeechSpec(v: unknown): v is SpeechSpec;
477
- /** When a layer starts and stops in its part. Default: the whole part. */
478
- export interface LayerTiming {
479
- /** A word reference or seconds from the part's start; default 0. */
480
- at?: WordRef;
481
- /** A word reference or seconds from the part's start; default the part's end. */
482
- until?: WordRef;
483
- /** Seconds from `at`, when there is no `until`. */
484
- dur?: number;
485
- }
486
165
  /** A rectangle as fractions of the frame (or of a source picture): x, y, width, height, each 0 to 1. */
487
166
  export type Rect = [x: number, y: number, w: number, h: number];
488
167
  /** A keyframe of a footage layer's box: when (a word reference or seconds), where, and the easing of the move into it. */
@@ -702,43 +381,6 @@ export interface FootageLayer extends FootageOptions {
702
381
  /** A video item of the project, imported: drawn by the stage at its own time. */
703
382
  video?: PieceDefinition;
704
383
  }
705
- /**
706
- * Where a component's props hold times (its time() props): `true` for a
707
- * time or a list of times, an object for the fields of an object (or of
708
- * each item of a list of objects).
709
- */
710
- export interface TimeShape {
711
- [prop: string]: true | TimeShape;
712
- }
713
- export interface GraphicLayer<P extends object = object> extends LayerTiming {
714
- [LAYER_BRAND]: "graphic";
715
- /** Component name: 'titleCard', 'custom' or a project component's name. */
716
- component: string;
717
- props: P;
718
- /** The props that are times: their word references become seconds. */
719
- times?: TimeShape;
720
- /**
721
- * "front" (default): at its place in the part's layers, over those
722
- * listed before it. "behind-person": with the part's own footage (the
723
- * footage layer without a file) wherever it is listed, drawn right over
724
- * its picture and under its speaker, who is cut out with the person
725
- * matte of the part's take (which check and render make). "overlay": over
726
- * the finished picture, as an app lays its captions and stickers over a
727
- * video after it is filmed: over every other layer, and not marked by
728
- * the camera (`capture`), motion blur, `post` or the LUT.
729
- */
730
- z?: "front" | "behind-person" | "overlay";
731
- mount(el: HTMLElement, props: P, ctx: StageContext): void;
732
- render(el: HTMLElement, t: number, props: P, ctx: StageContext): void;
733
- /**
734
- * Lets go of what mount made that the page does not free with `el` (a
735
- * WebGL context, a worker, a timer): a deck mounts a slide's components
736
- * when it is shown and unmounts them when it is let go, and mounts them
737
- * again on a new element if it is shown again. State a layer carries from
738
- * slide to slide is props, never what it kept from a mount.
739
- */
740
- unmount?(el: HTMLElement, props: P, ctx: StageContext): void;
741
- }
742
384
  export type LayerSpec = FootageLayer | GraphicLayer;
743
385
  export declare function isLayerSpec(v: unknown): v is LayerSpec;
744
386
  export interface PartSpec {
@@ -823,18 +465,6 @@ export declare const PART_DEFAULTS: {
823
465
  readonly lead: 0.2;
824
466
  readonly tail: 0.3;
825
467
  };
826
- /**
827
- * Part defaults a project (`defineConfig({ defaults: { part } })`) or an
828
- * video (`video({ defaults: { part } })`) sets over PART_DEFAULTS.
829
- */
830
- export interface PartDefaults {
831
- /** Seconds of a part without speech. */
832
- dur?: number;
833
- /** Seconds before a part's first word. */
834
- lead?: number;
835
- /** Seconds after a part's last word. */
836
- tail?: number;
837
- }
838
468
  /** The part defaults in force: the output's over the project's over PART_DEFAULTS. */
839
469
  export declare function partDefaults(...layers: (PartDefaults | undefined)[]): Required<PartDefaults>;
840
470
  export interface MusicOptions {
@@ -958,8 +588,7 @@ export interface VideoOptions {
958
588
  mic?: VoiceSetting;
959
589
  /**
960
590
  * What the sound is mastered to: a loudness in LUFS (-70 to 0), or
961
- * `{ lufs, truePeak }`; default the platform profile's loudness, else
962
- * -14 LUFS, true peak -3 dBTP. The master is one measured gain, then a
591
+ * `{ lufs, truePeak }`; default -14 LUFS, true peak -3 dBTP. The master is one measured gain, then a
963
592
  * true-peak limiter: the mix keeps its own loudness range. false keeps
964
593
  * the mix's own level and only limits its peaks.
965
594
  */
@@ -971,7 +600,7 @@ export interface VideoOptions {
971
600
  * a scene a film plays stretches of), not a film of its own. `allyhub
972
601
  * render` renders it only when it is named, and the check leaves
973
602
  * out the facts about watching it as a film: how long its text shows and
974
- * how large on a phone, a platform's covered edges, flat and still
603
+ * how large on a phone, the format's covered edges, flat and still
975
604
  * stretches. Default true.
976
605
  */
977
606
  deliverable?: boolean;
@@ -989,8 +618,8 @@ export interface VideoOptions {
989
618
  * LOAD_WAITS (4) times as long.
990
619
  */
991
620
  seekLimit?: number;
992
- /** Motion blur: each frame blends moments across part of the frame's time. */
993
- motionBlur?: MotionBlur;
621
+ /** Motion blur: each frame blends moments across part of the frame's time; null (or absent) for none. */
622
+ motionBlur?: MotionBlur | null;
994
623
  /**
995
624
  * What a camera filming the picture does to it, before post: bloom,
996
625
  * chromatic aberration, vignetting, exposure breathing, grain and
@@ -1037,27 +666,33 @@ export interface PieceWritten {
1037
666
  /** The module that called video() or slides(), a project path ("" where it was not known). */
1038
667
  file: string;
1039
668
  /**
1040
- * The folder each of its fields that names a file (music, post's LUT) is
669
+ * The folder each of its fields that names a file (music, post's LUT, its script) is
1041
670
  * relative to: the value as written and the folder, a project path (""
1042
671
  * the project's root). A field spread from another piece
1043
672
  * (`video({ ...film, format })`) keeps the folder it was written in
1044
673
  * while its value is the same.
1045
674
  */
1046
- paths?: Readonly<Partial<Record<"music" | "post", readonly [value: unknown, base: string]>>>;
675
+ paths?: Readonly<Partial<Record<"music" | "post" | "script", readonly [value: unknown, base: string]>>>;
1047
676
  }
1048
677
  /** What every piece has, whatever it makes. */
1049
678
  export interface PieceCommon {
1050
679
  /** Where it was written: video() and slides() set it. */
1051
680
  written?: PieceWritten;
1052
- /** A stable identity; default: the item's folder, from the project's root. */
681
+ /** A stable identity; default: its item's id, its file without its extension. */
1053
682
  id?: string;
1054
683
  /** A name for people: one string, or by language. */
1055
684
  title?: string | Record<string, string>;
685
+ /**
686
+ * Its words, a file per language, from the module that wrote it:
687
+ * `{locale}` in its name stands for each (`./teaser.{locale}.yaml`).
688
+ * Without it, it has no words of its own.
689
+ */
690
+ script?: string;
1056
691
  /**
1057
692
  * What it is rendered as, one format: a preset ("16x9", "9x16", "1x1",
1058
- * "4x5"), a platform profile or WxH pixels ("a4" and "letter" for slides
1059
- * only), a name or a FormatSpec ({ format, safe, maxDuration, loudness }:
1060
- * the format with its numbers changed). Another format is a piece of
693
+ * "4x5") or WxH pixels ("a4" and "letter" for slides only), a name or
694
+ * a FormatSpec ({ format, safe }: the format with its covered edges
695
+ * changed). Another format is a piece of
1061
696
  * its own, which imports what it shares. Default: allyhub.config.ts
1062
697
  * `defaults.format`, else "16x9".
1063
698
  */
@@ -1071,7 +706,7 @@ export interface PieceCommon {
1071
706
  /** Any key-values; the platform filters and groups by them. */
1072
707
  meta?: Record<string, unknown>;
1073
708
  }
1074
- /** A video: the default export of an item's video.ts, made by video(). */
709
+ /** A video: the default export of a video's module, made by video(). */
1075
710
  export interface VideoPiece extends PieceCommon, VideoOptions {
1076
711
  [PIECE_BRAND]: true;
1077
712
  kind: "video";
@@ -1107,48 +742,5 @@ export declare const outputName: (kind: OutputKind) => string;
1107
742
  export declare function outputOf(def: PieceDefinition): VideoOutput;
1108
743
  /** The function that makes a video's parts. */
1109
744
  export declare const buildOf: (def: PieceDefinition) => unknown;
1110
- /**
1111
- * Whether a piece is the one a command names, or under it as a folder of
1112
- * items: `tr` takes `tr` and `tr/fade`, not `trailer`.
1113
- */
1114
- export declare const pieceIn: (id: string, name: string) => boolean;
1115
- /**
1116
- * What a command's item names, as a place: written as an id, or a path to an
1117
- * item's folder or entry file from the project (./launch/film,
1118
- * launch/film/video.ts), the entry file's name left out.
1119
- */
1120
- export declare function pieceName(name: string): string;
1121
- /**
1122
- * Whether a command's item names a piece, by its id or by its place (an id of its
1123
- * own does not hide its place), as a path to its folder or entry file, or
1124
- * as a folder of items above any of these.
1125
- */
1126
- export declare const pieceNamed: (p: {
1127
- id: string;
1128
- path?: string;
1129
- }, name: string) => boolean;
1130
- /** Whether a command's item names exactly this piece, by its id, its place or a path to it. */
1131
- export declare const pieceIs: (p: {
1132
- id: string;
1133
- path?: string;
1134
- }, name: string) => boolean;
1135
- /** The default message prefix of a piece id: `launch/film` → `launch.film`. */
1136
- export declare function messagePrefix(pieceId: string): string;
1137
- /**
1138
- * How the runtime shows and hides a layer's element, and a part's: an
1139
- * attribute a rule of the document's hides (`display: none !important`),
1140
- * never the element's own `display`, which is the layer's (a layer that
1141
- * centres its content with `display: grid` keeps it when shown).
1142
- */
1143
- export declare const LAYER_OFF = "data-ak-off";
1144
- /** Shows or hides a layer's (or a part's) element. */
1145
- export declare function showLayer(el: HTMLElement, on: boolean): void;
1146
- /** Whether a layer's (or a part's) element is shown. */
1147
- export declare function layerShown(el: HTMLElement): boolean;
1148
- /**
1149
- * Adds the rule that hides what is marked off, once per document, as an
1150
- * adopted style sheet: no element is added, so nothing watching the
1151
- * document's elements sees a change.
1152
- */
1153
- export declare function addLayerRule(doc: Document): void;
745
+ export { pieceIn, pieceIs, pieceName, pieceNamed } from "@allyhub/piece";
1154
746
  //# sourceMappingURL=piece.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
- import{ANCHOR_NAME as i}from"./anchors.js";export const PIECE_BRAND="__allyhubPiece",PART_BRAND="__allyhubPart",LAYER_BRAND="__allyhubLayer",SPEECH_BRAND="__allyhubSpeech",MEDIA_BRAND="__allyhubMedia",OUTPUT_KINDS=["video"];export function partAnchorsProblem(e){if(typeof e!="object"||e===null||Array.isArray(e))return"is { name: seconds } or { name: [from, to] }";const t=r=>typeof r=="number"&&Number.isFinite(r)&&r>=0;for(const[r,n]of Object.entries(e)){if(!i.test(r))return`"${r}" is not a name of letters, digits, _ and -`;if(!(Array.isArray(n)?n.length===2&&t(n[0])&&t(n[1])&&n[1]>=n[0]:t(n)))return`.${r} is seconds from the part's start, or [from, to] with to not before from (not ${JSON.stringify(n)})`}}export function partAnchorList(e){return Object.entries(e??{}).map(([t,r])=>typeof r=="number"?{name:t,at:r}:{name:t,at:r[0],end:r[1]})}export const SPEECH_SPEED={min:.5,max:2};export function speechSpeedProblem(e){return typeof e=="number"&&Number.isFinite(e)&&e>=SPEECH_SPEED.min&&e<=SPEECH_SPEED.max?void 0:`speed is how many times as fast it plays, from ${String(SPEECH_SPEED.min)} to ${String(SPEECH_SPEED.max)} (1 as recorded), not ${typeof e=="number"?String(e):JSON.stringify(e)}`}export function isSpeechSpec(e){return typeof e=="object"&&e!==null&&SPEECH_BRAND in e}export const ORIENT_KEYS=["landscape","portrait","square","default"];export function isPerOrient(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}export function forOrient(e,t){return isPerOrient(e)?e[t]??e.default:e}export function isLayerSpec(e){return typeof e=="object"&&e!==null&&LAYER_BRAND in e}export function isPartSpec(e){return typeof e=="object"&&e!==null&&PART_BRAND in e}export const PART_DEFAULTS={dur:4,lead:.2,tail:.3};export function partDefaults(...e){const t={...PART_DEFAULTS};for(const r of e)r?.dur!==void 0&&(t.dur=r.dur),r?.lead!==void 0&&(t.lead=r.lead),r?.tail!==void 0&&(t.tail=r.tail);return t}export function isPieceDefinition(e){return typeof e=="object"&&e!==null&&PIECE_BRAND in e}export const outputName=e=>e;export function outputOf(e){const t={};for(const[r,n]of Object.entries(e))s.has(r)||(t[r]=n);return{kind:"video",build:e.parts,options:t}}const s=new Set([PIECE_BRAND,"kind","parts","id","base","title","format","matrix","meta","written"]);export const buildOf=e=>e.parts,pieceIn=(e,t)=>e===t||e.startsWith(`${t}/`);export function pieceName(e){let t=e.replaceAll("\\","/").replace(/^\.\//u,"").replace(/\/+$/u,"");return t=t.replace(/\/(?:video|slides)\.(?:ts|tsx|js|jsx|mts|mjs)$/u,""),t}function o(e){const t=pieceName(e),r=t.replace(/^content\//u,"");return r===t?[t]:[t,r]}export const pieceNamed=(e,t)=>o(t).some(r=>pieceIn(e.id,r)||e.path!==void 0&&pieceIn(e.path,r)),pieceIs=(e,t)=>o(t).some(r=>e.id===r||e.path===r);export function messagePrefix(e){return e.replace(/\//g,".")}export const LAYER_OFF="data-ak-off";export function showLayer(e,t){e.toggleAttribute(LAYER_OFF,!t)}export function layerShown(e){return!e.hasAttribute(LAYER_OFF)}export function addLayerRule(e){if(e.adoptedStyleSheets.some(r=>r.allyhubLayers))return;const t=new CSSStyleSheet;t.replaceSync(`[${LAYER_OFF}] { display: none !important; }`),Object.assign(t,{allyhubLayers:!0}),e.adoptedStyleSheets=[...e.adoptedStyleSheets,t]}
2
+ import{LAYER_BRAND as i,PIECE_BRAND as o}from"@allyhub/piece";import{ANCHOR_NAME as s}from"@allyhub/piece";export const PART_BRAND="__allyhubPart",SPEECH_BRAND="__allyhubSpeech",OUTPUT_KINDS=["video"];export function partAnchorsProblem(t){if(typeof t!="object"||t===null||Array.isArray(t))return"is { name: seconds } or { name: [from, to] }";const r=e=>typeof e=="number"&&Number.isFinite(e)&&e>=0;for(const[e,n]of Object.entries(t)){if(!s.test(e))return`"${e}" is not a name of letters, digits, _ and -`;if(!(Array.isArray(n)?n.length===2&&r(n[0])&&r(n[1])&&n[1]>=n[0]:r(n)))return`.${e} is seconds from the part's start, or [from, to] with to not before from (not ${JSON.stringify(n)})`}}export function partAnchorList(t){return Object.entries(t??{}).map(([r,e])=>typeof e=="number"?{name:r,at:e}:{name:r,at:e[0],end:e[1]})}export const SPEECH_SPEED={min:.5,max:2};export function speechSpeedProblem(t){return typeof t=="number"&&Number.isFinite(t)&&t>=SPEECH_SPEED.min&&t<=SPEECH_SPEED.max?void 0:`speed is how many times as fast it plays, from ${String(SPEECH_SPEED.min)} to ${String(SPEECH_SPEED.max)} (1 as recorded), not ${typeof t=="number"?String(t):JSON.stringify(t)}`}export function isSpeechSpec(t){return typeof t=="object"&&t!==null&&SPEECH_BRAND in t}export const ORIENT_KEYS=["landscape","portrait","square","default"];export function isPerOrient(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}export function forOrient(t,r){return isPerOrient(t)?t[r]??t.default:t}export function isLayerSpec(t){return typeof t=="object"&&t!==null&&i in t}export function isPartSpec(t){return typeof t=="object"&&t!==null&&PART_BRAND in t}export const PART_DEFAULTS={dur:4,lead:.2,tail:.3};export function partDefaults(...t){const r={...PART_DEFAULTS};for(const e of t)e?.dur!==void 0&&(r.dur=e.dur),e?.lead!==void 0&&(r.lead=e.lead),e?.tail!==void 0&&(r.tail=e.tail);return r}export function isPieceDefinition(t){return typeof t=="object"&&t!==null&&o in t}export const outputName=t=>t;export function outputOf(t){const r={};for(const[e,n]of Object.entries(t))f.has(e)||(r[e]=n);return{kind:"video",build:t.parts,options:r}}const f=new Set([o,"kind","parts","id","base","title","script","format","matrix","meta","written"]);export const buildOf=t=>t.parts;export{pieceIn,pieceIs,pieceName,pieceNamed}from"@allyhub/piece";
@@ -1,5 +1,5 @@
1
1
  import type { Rect } from "./piece.js";
2
- import type { PixelRect } from "./timeline.js";
2
+ import type { PixelRect } from "@allyhub/piece";
3
3
  export interface Placement {
4
4
  /** Where it shows, in the frame's pixels: nothing outside it. */
5
5
  box: PixelRect;