@allyhub/sdk 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (438) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/NOTICE +46 -49
  3. package/dist/dom.d.ts +1 -209
  4. package/dist/dom.js +1 -1
  5. package/dist/image.d.ts +2 -0
  6. package/dist/image.js +2 -0
  7. package/dist/index.d.ts +1 -21
  8. package/dist/index.js +1 -1
  9. package/dist/media.d.ts +1 -5
  10. package/dist/media.js +1 -1
  11. package/dist/node_modules/@allyhub/audio/dist/levels.d.ts +4 -5
  12. package/dist/node_modules/@allyhub/audio/dist/levels.js +1 -1
  13. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.d.ts +1 -6
  14. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +1 -1
  15. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  16. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
  17. package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +1 -1
  18. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  19. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  20. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  21. package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
  22. package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
  23. package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
  24. package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
  25. package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
  26. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
  27. package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
  28. package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
  29. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
  30. package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
  31. package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
  32. package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
  33. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  34. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
  35. package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
  36. package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
  37. package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
  38. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +20 -82
  39. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  40. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +96 -8
  41. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  42. package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
  43. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  44. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  45. package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
  46. package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
  47. package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
  48. package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
  49. package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
  50. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
  51. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  52. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
  53. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  54. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
  55. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  56. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +46 -42
  57. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  58. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  59. package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
  60. package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
  61. package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
  62. package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
  63. package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
  64. package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
  65. package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
  66. package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
  67. package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
  68. package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
  69. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
  70. package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
  71. package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
  72. package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
  73. package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
  74. package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
  75. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
  76. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
  77. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
  78. package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
  79. package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
  80. package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
  81. package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
  82. package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
  83. package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
  84. package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
  85. package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
  86. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
  87. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
  88. package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
  89. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
  90. package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
  91. package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
  92. package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
  93. package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
  94. package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
  95. package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
  96. package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
  97. package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
  98. package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
  99. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
  100. package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
  101. package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
  102. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
  103. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
  104. package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
  105. package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
  106. package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
  107. package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
  108. package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
  109. package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
  110. package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
  111. package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
  112. package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
  113. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
  114. package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
  115. package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
  116. package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
  117. package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
  118. package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
  119. package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
  120. package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
  121. package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
  122. package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
  123. package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
  124. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
  125. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
  126. package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
  127. package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
  128. package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
  129. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
  130. package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
  131. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
  132. package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
  133. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
  134. package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
  135. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
  136. package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
  137. package/dist/node_modules/@allyhub/measure/package.json +13 -0
  138. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
  139. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
  140. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
  141. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  142. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  143. package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
  144. package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
  145. package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
  146. package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
  147. package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
  148. package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
  149. package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
  150. package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
  151. package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
  152. package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
  153. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
  154. package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
  155. package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
  156. package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
  157. package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
  158. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
  159. package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
  160. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +421 -0
  161. package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
  162. package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
  163. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
  164. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
  165. package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
  166. package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
  167. package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
  168. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
  169. package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
  170. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
  171. package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
  172. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
  173. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
  174. package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
  175. package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
  176. package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
  177. package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
  178. package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
  179. package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
  180. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
  181. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +285 -0
  182. package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
  183. package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
  184. package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
  185. package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
  186. package/dist/node_modules/@allyhub/piece/package.json +18 -0
  187. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +139 -0
  188. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  189. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
  190. package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
  191. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
  192. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  193. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +2 -0
  194. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  195. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +232 -132
  196. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  197. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
  198. package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
  199. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +22 -9
  200. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  201. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
  202. package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
  203. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +5 -0
  204. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  205. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  206. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
  207. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
  208. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +273 -0
  209. package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
  210. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +26 -0
  211. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  212. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
  213. package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
  214. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
  215. package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
  216. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
  217. package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
  218. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
  219. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  220. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
  221. package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
  222. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
  223. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  224. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
  225. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  226. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
  227. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  228. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  229. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  230. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
  231. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
  232. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
  233. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
  234. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
  235. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  236. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
  237. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
  238. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
  239. package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
  240. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  241. package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
  242. package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
  243. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  244. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  245. package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
  246. package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
  247. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
  248. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
  250. package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
  252. package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
  253. package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
  254. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  255. package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
  257. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +3 -4
  258. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  259. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +76 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
  261. package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
  262. package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
  263. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
  264. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +6 -6
  265. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  266. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -0
  267. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  268. package/dist/node_modules/@allyhub/sheet/package.json +5 -1
  269. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
  270. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  271. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +44 -4
  272. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  273. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  274. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
  275. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  276. package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
  277. package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
  278. package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
  279. package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +208 -0
  280. package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
  281. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
  282. package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
  283. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
  284. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  285. package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
  286. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  287. package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
  288. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  289. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +19 -2
  290. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
  291. package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
  292. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +17 -10
  293. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  294. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
  295. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
  296. package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
  297. package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
  298. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  299. package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
  300. package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
  301. package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
  302. package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
  303. package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
  304. package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
  305. package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
  306. package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
  307. package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
  308. package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
  309. package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
  310. package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
  311. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
  312. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  313. package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
  314. package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
  315. package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
  316. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
  317. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
  318. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
  319. package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
  320. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +22 -430
  321. package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
  322. package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
  323. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +6 -12
  324. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  325. package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
  326. package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
  327. package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
  328. package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
  329. package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
  330. package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
  331. package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
  332. package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
  333. package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
  334. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
  335. package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
  336. package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
  337. package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
  338. package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
  339. package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
  340. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  341. package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
  342. package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
  343. package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
  344. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
  345. package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
  346. package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
  347. package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
  348. package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
  349. package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
  350. package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
  351. package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
  352. package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
  353. package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
  354. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
  355. package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
  356. package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
  357. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
  358. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
  359. package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
  360. package/dist/scenery.d.ts +1 -1
  361. package/dist/scenery.js +1 -1
  362. package/dist/sheets.d.ts +1 -1
  363. package/dist/sheets.js +1 -1
  364. package/dist/slides.d.ts +1 -9
  365. package/dist/slides.js +1 -1
  366. package/docs/README.md +8 -6
  367. package/docs/batches.md +5 -5
  368. package/docs/contract.md +2 -2
  369. package/docs/defaults.md +278 -20
  370. package/docs/docs.md +77 -63
  371. package/docs/footage.md +7 -7
  372. package/docs/image.md +165 -0
  373. package/docs/layers.md +22 -13
  374. package/docs/modeling.md +4 -4
  375. package/docs/pictures.md +65 -0
  376. package/docs/project.md +51 -31
  377. package/docs/scenery.md +11 -11
  378. package/docs/sheets.md +26 -25
  379. package/docs/slides.md +73 -65
  380. package/docs/sound.md +3 -3
  381. package/docs/speech.md +8 -8
  382. package/docs/video.md +16 -13
  383. package/docs/websites.md +4 -4
  384. package/package.json +7 -2
  385. package/dist/define.js +0 -2
  386. package/dist/free.js +0 -2
  387. package/dist/input.js +0 -2
  388. package/dist/module.js +0 -2
  389. package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
  390. package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
  391. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
  392. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
  393. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
  394. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
  395. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
  396. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
  397. package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
  398. package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
  399. package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
  400. package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
  401. package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
  402. package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
  403. package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
  404. package/dist/parts.js +0 -2
  405. package/dist/piece.js +0 -2
  406. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
  407. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
  408. /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
  409. /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
  410. /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
  411. /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
  412. /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
  413. /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
  414. /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
  415. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
  416. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
  417. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
  418. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
  419. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
  420. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
  421. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
  422. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
  423. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
  424. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
  425. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
  426. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
  427. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
  428. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
  429. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
  430. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
  431. /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
  432. /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
  433. /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
  434. /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
  435. /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
  436. /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
  437. /package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +0 -0
  438. /package/dist/{phone.js → node_modules/@allyhub/video-sdk/dist/phone.js} +0 -0
@@ -0,0 +1,241 @@
1
+ AllyHub Software License
2
+
3
+ Copyright (c) 2026 AllyHub, Inc. ("AllyHub"). All rights reserved.
4
+
5
+ This software (the AllyHub command-line tool, its SDK, runtime and the
6
+ packages they depend on) is proprietary. It is not open source.
7
+
8
+ 1. Permitted use. You may install and run the software, unmodified, to make,
9
+ check, preview and render videos and decks, including for commercial
10
+ purposes. What you make with it is yours.
11
+
12
+ 2. Restrictions. Except as this license permits or applicable law requires,
13
+ you may not copy, modify, adapt, translate, sublicense, sell, rent, lease,
14
+ publish or otherwise distribute the software, create derivative works of
15
+ it, or reverse engineer, decompile or disassemble it.
16
+
17
+ 3. Cloud services. AllyHub's cloud tools (sign-in, research, images, voice,
18
+ video) are separate services governed by AllyHub's terms of service.
19
+
20
+ 4. Trademarks. This license grants no right to use the name "AllyHub" or its
21
+ logos.
22
+
23
+ 5. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
24
+ KIND, EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY,
25
+ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
26
+ ALLYHUB BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
28
+
29
+ 6. Third-party code. Parts of the software are adapted from HyperFrames,
30
+ licensed under the Apache License, Version 2.0 (see NOTICE). Those parts
31
+ remain under that license, reproduced below, and nothing in this license
32
+ limits your rights under it.
33
+
34
+ 7. Starter components. The starter components in the "components" folder,
35
+ which "allyhub add" copies into your workspace, are licensed under the MIT
36
+ License (see components/LICENSE): once copied, you may change, use and
37
+ share them freely.
38
+
39
+ --------------------------------------------------------------------------------
40
+
41
+ Apache License
42
+ Version 2.0, January 2004
43
+ http://www.apache.org/licenses/
44
+
45
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
46
+
47
+ 1. Definitions.
48
+
49
+ "License" shall mean the terms and conditions for use, reproduction,
50
+ and distribution as defined by Sections 1 through 9 of this document.
51
+
52
+ "Licensor" shall mean the copyright owner or entity authorized by
53
+ the copyright owner that is granting the License.
54
+
55
+ "Legal Entity" shall mean the union of the acting entity and all
56
+ other entities that control, are controlled by, or are under common
57
+ control with that entity. For the purposes of this definition,
58
+ "control" means (i) the power, direct or indirect, to cause the
59
+ direction or management of such entity, whether by contract or
60
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
61
+ outstanding shares, or (iii) beneficial ownership of such entity.
62
+
63
+ "You" (or "Your") shall mean an individual or Legal Entity
64
+ exercising permissions granted by this License.
65
+
66
+ "Source" form shall mean the preferred form for making modifications,
67
+ including but not limited to software source code, documentation
68
+ source, and configuration files.
69
+
70
+ "Object" form shall mean any form resulting from mechanical
71
+ transformation or translation of a Source form, including but
72
+ not limited to compiled object code, generated documentation,
73
+ and conversions to other media types.
74
+
75
+ "Work" shall mean the work of authorship, whether in Source or
76
+ Object form, made available under the License, as indicated by a
77
+ copyright notice that is included in or attached to the work
78
+ (an example is provided in the Appendix below).
79
+
80
+ "Derivative Works" shall mean any work, whether in Source or Object
81
+ form, that is based on (or derived from) the Work and for which the
82
+ editorial revisions, annotations, elaborations, or other modifications
83
+ represent, as a whole, an original work of authorship. For the purposes
84
+ of this License, Derivative Works shall not include works that remain
85
+ separable from, or merely link (or bind by name) to the interfaces of,
86
+ the Work and Derivative Works thereof.
87
+
88
+ "Contribution" shall mean any work of authorship, including
89
+ the original version of the Work and any modifications or additions
90
+ to that Work or Derivative Works thereof, that is intentionally
91
+ submitted to Licensor for inclusion in the Work by the copyright owner
92
+ or by an individual or Legal Entity authorized to submit on behalf of
93
+ the copyright owner. For the purposes of this definition, "submitted"
94
+ means any form of electronic, verbal, or written communication sent
95
+ to the Licensor or its representatives, including but not limited to
96
+ communication on electronic mailing lists, source code control systems,
97
+ and issue tracking systems that are managed by, or on behalf of, the
98
+ Licensor for the purpose of discussing and improving the Work, but
99
+ excluding communication that is conspicuously marked or otherwise
100
+ designated in writing by the copyright owner as "Not a Contribution."
101
+
102
+ "Contributor" shall mean Licensor and any individual or Legal Entity
103
+ on behalf of whom a Contribution has been received by Licensor and
104
+ subsequently incorporated within the Work.
105
+
106
+ 2. Grant of Copyright License. Subject to the terms and conditions of
107
+ this License, each Contributor hereby grants to You a perpetual,
108
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
109
+ copyright license to reproduce, prepare Derivative Works of,
110
+ publicly display, publicly perform, sublicense, and distribute the
111
+ Work and such Derivative Works in Source or Object form.
112
+
113
+ 3. Grant of Patent License. Subject to the terms and conditions of
114
+ this License, each Contributor hereby grants to You a perpetual,
115
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
116
+ (except as stated in this section) patent license to make, have made,
117
+ use, offer to sell, sell, import, and otherwise transfer the Work,
118
+ where such license applies only to those patent claims licensable
119
+ by such Contributor that are necessarily infringed by their
120
+ Contribution(s) alone or by combination of their Contribution(s)
121
+ with the Work to which such Contribution(s) was submitted. If You
122
+ institute patent litigation against any entity (including a
123
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
124
+ or a Contribution incorporated within the Work constitutes direct
125
+ or contributory patent infringement, then any patent licenses
126
+ granted to You under this License for that Work shall terminate
127
+ as of the date such litigation is filed.
128
+
129
+ 4. Redistribution. You may reproduce and distribute copies of the
130
+ Work or Derivative Works thereof in any medium, with or without
131
+ modifications, and in Source or Object form, provided that You
132
+ meet the following conditions:
133
+
134
+ (a) You must give any other recipients of the Work or
135
+ Derivative Works a copy of this License; and
136
+
137
+ (b) You must cause any modified files to carry prominent notices
138
+ stating that You changed the files; and
139
+
140
+ (c) You must retain, in the Source form of any Derivative Works
141
+ that You distribute, all copyright, patent, trademark, and
142
+ attribution notices from the Source form of the Work,
143
+ excluding those notices that do not pertain to any part of
144
+ the Derivative Works; and
145
+
146
+ (d) If the Work includes a "NOTICE" text file as part of its
147
+ distribution, then any Derivative Works that You distribute must
148
+ include a readable copy of the attribution notices contained
149
+ within such NOTICE file, excluding those notices that do not
150
+ pertain to any part of the Derivative Works, in at least one
151
+ of the following places: within a NOTICE text file distributed
152
+ as part of the Derivative Works; within the Source form or
153
+ documentation, if provided along with the Derivative Works; or,
154
+ within a display generated by the Derivative Works, if and
155
+ wherever such third-party notices normally appear. The contents
156
+ of the NOTICE file are for informational purposes only and
157
+ do not modify the License. You may add Your own attribution
158
+ notices within Derivative Works that You distribute, alongside
159
+ or as an addendum to the NOTICE text from the Work, provided
160
+ that such additional attribution notices cannot be construed
161
+ as modifying the License.
162
+
163
+ You may add Your own copyright statement to Your modifications and
164
+ may provide additional or different license terms and conditions
165
+ for use, reproduction, or distribution of Your modifications, or
166
+ for any such Derivative Works as a whole, provided Your use,
167
+ reproduction, and distribution of the Work otherwise complies with
168
+ the conditions stated in this License.
169
+
170
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
171
+ any Contribution intentionally submitted for inclusion in the Work
172
+ by You to the Licensor shall be under the terms and conditions of
173
+ this License, without any additional terms or conditions.
174
+ Notwithstanding the above, nothing herein shall supersede or modify
175
+ the terms of any separate license agreement you may have executed
176
+ with Licensor regarding such Contributions.
177
+
178
+ 6. Trademarks. This License does not grant permission to use the trade
179
+ names, trademarks, service marks, or product names of the Licensor,
180
+ except as required for reasonable and customary use in describing the
181
+ origin of the Work and reproducing the content of the NOTICE file.
182
+
183
+ 7. Disclaimer of Warranty. Unless required by applicable law or
184
+ agreed to in writing, Licensor provides the Work (and each
185
+ Contributor provides its Contributions) on an "AS IS" BASIS,
186
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
187
+ implied, including, without limitation, any warranties or conditions
188
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
189
+ PARTICULAR PURPOSE. You are solely responsible for determining the
190
+ appropriateness of using or redistributing the Work and assume any
191
+ risks associated with Your exercise of permissions under this License.
192
+
193
+ 8. Limitation of Liability. In no event and under no legal theory,
194
+ whether in tort (including negligence), contract, or otherwise,
195
+ unless required by applicable law (such as deliberate and grossly
196
+ negligent acts) or agreed to in writing, shall any Contributor be
197
+ liable to You for damages, including any direct, indirect, special,
198
+ incidental, or consequential damages of any character arising as a
199
+ result of this License or out of the use or inability to use the
200
+ Work (including but not limited to damages for loss of goodwill,
201
+ work stoppage, computer failure or malfunction, or any and all
202
+ other commercial damages or losses), even if such Contributor
203
+ has been advised of the possibility of such damages.
204
+
205
+ 9. Accepting Warranty or Additional Liability. While redistributing
206
+ the Work or Derivative Works thereof, You may choose to offer,
207
+ and charge a fee for, acceptance of support, warranty, indemnity,
208
+ or other liability obligations and/or rights consistent with this
209
+ License. However, in accepting such obligations, You may act only
210
+ on Your own behalf and on Your sole responsibility, not on behalf
211
+ of any other Contributor, and only if You agree to indemnify,
212
+ defend, and hold each Contributor harmless for any liability
213
+ incurred by, or claims asserted against, such Contributor by reason
214
+ of your accepting any such warranty or additional liability.
215
+
216
+ END OF TERMS AND CONDITIONS
217
+
218
+ APPENDIX: How to apply the Apache License to your work.
219
+
220
+ To apply the Apache License to your work, attach the following
221
+ boilerplate notice, with the fields enclosed by brackets "[]"
222
+ replaced with your own identifying information. (Don't include
223
+ the brackets!) The text should be enclosed in the appropriate
224
+ comment syntax for the file format. We also recommend that a
225
+ file or class name and description of purpose be included on the
226
+ same "printed page" as the copyright notice for easier
227
+ identification within third-party archives.
228
+
229
+ Copyright [yyyy] [name of copyright owner]
230
+
231
+ Licensed under the Apache License, Version 2.0 (the "License");
232
+ you may not use this file except in compliance with the License.
233
+ You may obtain a copy of the License at
234
+
235
+ http://www.apache.org/licenses/LICENSE-2.0
236
+
237
+ Unless required by applicable law or agreed to in writing, software
238
+ distributed under the License is distributed on an "AS IS" BASIS,
239
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
240
+ See the License for the specific language governing permissions and
241
+ limitations under the License.
@@ -0,0 +1,13 @@
1
+ import { type Adjustment, type GraphicLayer } from "@allyhub/piece";
2
+ import { type LayerOptions } from "./define.js";
3
+ /** An adjustment's options: its kind and its numbers, and the layer's. */
4
+ export type AdjustmentOptions = LayerOptions & Adjustment;
5
+ /** An adjustment layer's props: its kind and numbers. */
6
+ export interface AdjustmentProps {
7
+ readonly adjustment: Adjustment;
8
+ }
9
+ /** The component name of an adjustment layer. */
10
+ export declare const ADJUSTMENT = "adjustment";
11
+ /** An adjustment layer: adjustment({ key, kind: "curves", rgb: [[0, 0], [64, 52], [255, 255]] }). */
12
+ export declare function adjustment(opts: AdjustmentOptions): GraphicLayer<AdjustmentProps>;
13
+ //# sourceMappingURL=adjustment.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{AdjustmentSchema as m,LAYER_BRAND as u,adjustmentRefusal as f,issueOf as c}from"@allyhub/piece";import{adjustmentFilter as j,defsOf as l}from"@allyhub/image-draw/layer-style";import{LayerError as s,splitLayer as y,styleOf as p}from"./define.js";export const ADJUSTMENT="adjustment";const w=new Set(["key","at","until","dur","z","blendMode","opacity","fillOpacity","clipping","mask","effects","transform","visible"]);export function adjustment(t){const r=`adjustment()${t.key===void 0?"":` ${t.key}`}`,o=Object.fromEntries(Object.entries(t).filter(([e])=>!w.has(e))),n=m.safeParse(o);if(!n.success)throw new s("AK-I003",`${r}: ${c(n.error)}.`);const a=f(n.data);if(a)throw new s("AK-I007",`${r}: ${a}.`);if(t.transform!==void 0)throw new s("AK-I003",`${r}: an adjustment covers its frame, so it has no transform.`);p(t,"adjustment","adjustment()");const[i]=y(t);return{[u]:"graphic",...i,kind:"adjustment",component:ADJUSTMENT,props:{adjustment:n.data},mount:(e,d)=>{e.dataset.akAdjustment=d.adjustment.kind,e.style.backdropFilter=`url(#${j(d.adjustment,l(e))})`},render:()=>{}}}
@@ -1,8 +1,14 @@
1
- import { type ComponentFrame, type GraphicLayer, type LayerTiming, type StageContext, type TimeShape } from "@allyhub/video-core";
1
+ import { type ComponentFrame, type GraphicLayer, type LayerKind, type LayerStyle, type LayerTiming, type StageContext, type TimeShape } from "@allyhub/piece";
2
2
  import type { PropSchema, Timed } from "./props.js";
3
- export type { ComponentFrame, StageContext } from "@allyhub/video-core";
4
- /** What every graphic layer takes besides a component's own props. */
5
- export interface LayerOptions extends LayerTiming {
3
+ export type { ComponentFrame, StageContext } from "@allyhub/piece";
4
+ /** What every graphic layer takes besides a component's own props: its name, its timing, and Photoshop's layer (its blend, opacity, mask, effects…). */
5
+ export interface LayerOptions extends LayerTiming, LayerStyle {
6
+ /**
7
+ * The layer's name in its part: the stage marks its element with it
8
+ * (`data-ak-layer`), and what is measured of it is reported by it. An
9
+ * image's every layer has one.
10
+ */
11
+ key?: string;
6
12
  /**
7
13
  * "front" (default): at its place in the part's layers, over those
8
14
  * listed before it. "behind-person": right over the part's own footage
@@ -83,6 +89,17 @@ export type Component<P extends object> = ((...opts: Partial<Timed<P>> extends T
83
89
  * are reserved: a component cannot have props called this.
84
90
  */
85
91
  export declare const LAYER_OPTIONS: readonly string[];
92
+ /**
93
+ * A layer's option refused: its rule (AK-I003, a value it does not take;
94
+ * AK-I007, what Chrome cannot draw exactly) and why. The stage reports it
95
+ * under that rule, at the line that made it.
96
+ */
97
+ export declare class LayerError extends Error {
98
+ readonly code: string;
99
+ constructor(code: string, message: string);
100
+ }
101
+ /** A layer's style read from its options, of a layer of `kind`; throws a LayerError naming `what` where it is refused. */
102
+ export declare function styleOf(opts: Readonly<Record<string, unknown>>, kind: LayerKind, what: string): LayerStyle;
86
103
  /** Where props hold times, from their schema; undefined when none do. */
87
104
  export declare function timeShape(props: Readonly<Record<string, PropSchema | undefined>>): TimeShape | undefined;
88
105
  /** The layer options of an options object, and the rest. */
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{LAYER_BRAND as h,LAYER_STYLE_FIELDS as g,isGraphicLayer as O,readLayerStyle as j}from"@allyhub/piece";import{mountLayer as k}from"./stack.js";export const LAYER_OPTIONS=["key","at","until","dur","z",...g];export class LayerError extends Error{code;constructor(o,n){super(n),this.name="LayerError",this.code=o}}export function styleOf(e,o,n){const t=j(e,o);if("problem"in t)throw new LayerError(t.why==="invalid"?"AK-I003":"AK-I007",`${n}${typeof e.key=="string"?` ${e.key}`:""}: ${t.problem}.`);return t.style}export function timeShape(e){const o=t=>{if(t.type==="time")return!0;if(t.type==="list")return o(t.of);if(t.type==="object")return timeShape(t.fields)},n={};for(const[t,r]of Object.entries(e)){const s=r?o(r):void 0;s!==void 0&&(n[t]=s)}return Object.keys(n).length>0?n:void 0}export function splitLayer(e){const{key:o,at:n,until:t,dur:r,z:s,blendMode:a,opacity:i,fillOpacity:c,clipping:u,mask:p,effects:d,transform:l,visible:m,...y}=e;return[{...o===void 0?{}:{key:o},...n===void 0?{}:{at:n},...t===void 0?{}:{until:t},...r===void 0?{}:{dur:r},...s===void 0?{}:{z:s},...Object.fromEntries(Object.entries({blendMode:a,opacity:i,fillOpacity:c,clipping:u,mask:p,effects:d,transform:l,visible:m}).filter(([,b])=>b!==void 0))},y]}export function defineComponent(e){const o=[...Object.keys(e.props??{}),...Object.keys(e.defaults??{}),...Object.values(e.examples??{}).flatMap(i=>Object.keys(i))],n=[...new Set(o.filter(i=>LAYER_OPTIONS.includes(i)))];if(n.length>0)throw new Error(`${e.name}: ${n.join(", ")} is a layer option, not a prop name`);const t=timeShape(e.props??{}),r="layers"in e?w(e):e,s=i=>{const c=i??{};styleOf(c,"smartObject",e.name);const[u,p]=splitLayer(c),d={...e.defaults,...p};return{[h]:"graphic",...u,component:e.name,props:d,...e.props&&Object.keys(e.props).length>0?{schema:e.props}:{},...t?{times:t}:{},mount:(l,m,y)=>{r.mount(l,m,y)},render:(l,m,y,f)=>{r.render(l,m,y,f)},unmount:(l,m,y)=>{r.unmount?.(l,m,y)}}},a={name:e.name,label:e.label??e.name,...e.summary===void 0?{}:{summary:e.summary},props:Object.fromEntries(Object.entries(e.props??{}).filter(i=>i[1]!==void 0)),examples:e.examples??{},hidden:e.hidden??!1};return Object.assign(s,{componentName:e.name,info:a,..."layers"in e?{layersIn:(i,c)=>e.layers({...e.defaults,...i},c)}:{}})}function w(e){const o=new WeakMap;return{mount(n,t,r){const s=e.layers(t,{width:r.dims.width,height:r.dims.height}),a=[];for(const[i,c]of s.entries()){if(!O(c))throw new Error(`${e.name}'s layers: item ${String(i+1)} is not a graphic layer (custom() or a component).`);const u=c;if(u.visible===!1)continue;const p=document.createElement("div");p.style.position="absolute",p.style.inset="0px",n.append(p),a.push({layer:u,el:k(p,u,r)})}o.set(n,a)},render(n,t,r,s){for(const a of o.get(n)??[])a.layer.render(a.el,t,a.layer.props,s)},unmount(n,t,r){for(const s of o.get(n)??[])s.layer.unmount?.(s.el,s.layer.props,r);o.delete(n)}}}export function custom(e){styleOf(e,"smartObject","custom()");const[o]=splitLayer(e);return{[h]:"graphic",...o,component:"custom",props:{},mount:(n,t,r)=>{e.mount?.(n,r)},render:(n,t,r,s)=>{e.render(n,t,s)},unmount:(n,t,r)=>{e.unmount?.(n,r)}}}
@@ -0,0 +1,210 @@
1
+ import { type CaptionTrackCue, type ContentOptions, type InlineMark, type StageContext } from "@allyhub/piece";
2
+ /** Inline styles: camelCase or `--custom` properties; numbers are pixels. */
3
+ export type Style = Partial<Record<string, string | number>>;
4
+ export declare function h(tag: string, style?: Style, children?: (Node | string)[], cls?: string): HTMLElement;
5
+ export declare function css(el: HTMLElement | SVGElement, style: Style): void;
6
+ /**
7
+ * Chinese has no spaces, so a line can break inside a word. Mark word
8
+ * boundaries (Intl.Segmenter, the browser's own dictionary) with zero-width
9
+ * spaces; with `word-break: keep-all` lines then break only between words.
10
+ */
11
+ export declare function wordBreaks(value: string): string;
12
+ export declare const text: (v: unknown) => string;
13
+ export declare const list: (v: unknown) => string[];
14
+ export interface Layout {
15
+ W: number;
16
+ H: number;
17
+ /** Type scale: the frame's short side / 1080 (1 in every preset). */
18
+ k: number;
19
+ orient: "landscape" | "portrait" | "square";
20
+ /** The side margin: max(margin, the covered left and right edges). */
21
+ pad: number;
22
+ /** The content box's edges, in the frame's pixels: clear of the covered areas, with a gap. */
23
+ top: number;
24
+ bottom: number;
25
+ left: number;
26
+ right: number;
27
+ }
28
+ /** What layout() may change: the margin and the gaps by the covered edges (see contentEdges). */
29
+ export type LayoutOptions = ContentOptions;
30
+ /**
31
+ * Layout of the stage for the current format: the type scale and the
32
+ * content box (the same box as ctx.content). With the defaults, in
33
+ * pixels: pad = max(margin, safe.left, safe.right), with margin 120 × k
34
+ * in a landscape frame and 84 × k otherwise; top = max(pad, safe.top +
35
+ * 30 × k); bottom = H − max(pad, safe.bottom + 20 × k); left = pad;
36
+ * right = W − pad. `opts` changes the margin and the gaps.
37
+ */
38
+ export declare function layout(ctx: StageContext, opts?: LayoutOptions): Layout;
39
+ /** A full-stage absolutely positioned box over the content area. */
40
+ export declare function contentBox(L: Layout, style?: Style): HTMLElement;
41
+ /** Text block that keeps its words together and wraps by width. */
42
+ export declare function textBlock(value: string, { size, weight, color, font, lineHeight, align, }: {
43
+ size: number;
44
+ weight?: number;
45
+ color?: string;
46
+ font?: string;
47
+ lineHeight?: number;
48
+ align?: "left" | "center" | "right";
49
+ }): HTMLElement;
50
+ /** How marked() draws each kind of mark, unless it is given another style. */
51
+ export declare const MARK_STYLES: Readonly<Record<InlineMark["kind"], Style>>;
52
+ /**
53
+ * A line with its marks drawn: a span holding the line's runs in order,
54
+ * a plain run as text and a marked one as a span with `data-mark` (its
55
+ * kinds, "strong", "strong em"…) and the style of each kind, `styles`
56
+ * over MARK_STYLES. A string is read with readMarks() (`**strong**`,
57
+ * `*em*`, `~~struck~~`, `` `code` ``); a text already read is taken with
58
+ * the marks it has. Put it in any block: textBlock("", { size }).append(…),
59
+ * h("div", style, [marked(line)]).
60
+ */
61
+ export declare function marked(value: string | {
62
+ text: string;
63
+ marks?: readonly InlineMark[];
64
+ }, styles?: Partial<Record<InlineMark["kind"], Style>>): HTMLElement;
65
+ /** Children of el by data-ak attribute, in document order. */
66
+ export declare function all(el: HTMLElement, name: string): HTMLElement[];
67
+ export declare function one(el: HTMLElement, name: string): HTMLElement | null;
68
+ export declare function tag(el: HTMLElement, name: string): HTMLElement;
69
+ /**
70
+ * The largest font size in [min, max] at which el fits its width and is at
71
+ * most maxHeight tall. Layout depends only on the format and the text, so
72
+ * mount calls this once.
73
+ */
74
+ export declare function fitTo(el: HTMLElement, { min, max, maxHeight }: {
75
+ min: number;
76
+ max: number;
77
+ maxHeight: number;
78
+ }): number;
79
+ /** What fitLines searches within, and the box the text must fit. */
80
+ export interface FitLinesOptions {
81
+ /** The most lines the text may take. */
82
+ lines: number;
83
+ /** Smallest font size in px. */
84
+ min: number;
85
+ /** Largest font size in px. */
86
+ max: number;
87
+ /** The box's width in px, set as the element's width. Default: the element's own width (required for a text). */
88
+ width?: number;
89
+ /** The box's height in px: the text is at most this tall too. Default: no limit. */
90
+ height?: number;
91
+ /** How close to the largest size the search gets, in px (default `FIT_LINES_PRECISION`, 0.5). */
92
+ precision?: number;
93
+ }
94
+ /** What fitLines found. */
95
+ export interface FitLines {
96
+ /** The font size, set on the element: the largest that fits, else `min`. */
97
+ size: number;
98
+ /** False when even `min` takes more lines, or is wider or taller than the box. */
99
+ fits: boolean;
100
+ /** The text of each line at that size, as the browser broke it (`textLines`). */
101
+ lines: string[];
102
+ }
103
+ export declare const FIT_LINES_PRECISION = 0.5;
104
+ /**
105
+ * The text of each line of el as the browser broke it, top to bottom:
106
+ * spaces collapsed, zero-width spaces (`wordBreaks`) left out. el must be
107
+ * in the page.
108
+ */
109
+ export declare function textLines(el: HTMLElement): string[];
110
+ /**
111
+ * The largest font size in [min, max] at which the text takes at most
112
+ * `lines` lines and fits the box's width (no word sticks out) and, given
113
+ * `height`, its height, measured in the page. Pass an element in the page
114
+ * (its font size is set, and its width when `width` is given), or a text and
115
+ * the style it will be drawn with (measured in a hidden element, removed
116
+ * after; `width` is required): set the same style and the size found.
117
+ * Layout depends only on the format and the text, so call it in mount.
118
+ */
119
+ export declare function fitLines(el: HTMLElement, opts: FitLinesOptions): FitLines;
120
+ export declare function fitLines(text: string, opts: FitLinesOptions & {
121
+ style?: Style;
122
+ }): FitLines;
123
+ type Box = readonly [x: number, y: number, w: number, h: number];
124
+ /** What freeAreas keeps clear of, and where it looks. */
125
+ export interface FreeAreaOptions {
126
+ /**
127
+ * The rectangle to look in, in the frame's pixels; default the content
128
+ * box of layout(ctx) (clear of the covered areas, with its margins).
129
+ */
130
+ within?: Box;
131
+ /** Keep clear of every face at t (ctx.faces); default true. */
132
+ faces?: boolean;
133
+ /** Keep clear of the text of the layers listed before (ctx.texts); default true. */
134
+ texts?: boolean;
135
+ /** Keep clear of the covered areas (ctx.covered); default true. */
136
+ covered?: boolean;
137
+ /** Pixels kept around each thing avoided; default 24 × the type scale. */
138
+ margin?: number;
139
+ /** Leave out areas lower than this, pixels; default 0. */
140
+ minHeight?: number;
141
+ }
142
+ /**
143
+ * The empty areas of the frame at part time t: bands across `within`
144
+ * (the content box by default) where no face, other layer's text or
145
+ * covered area is, each `[x, y, w, h]` in the frame's pixels, tallest
146
+ * first. A measurement: use it, or not, as you place things. Draws the
147
+ * layers listed before this one, so call it in mount.
148
+ */
149
+ export declare function freeAreas(ctx: StageContext, t: number, opts?: FreeAreaOptions): [number, number, number, number][];
150
+ /** A spot for a caption block's top: a place in the content box, or a y in pixels. */
151
+ export type CaptionSpot = "bottom" | "middle" | "top" | number;
152
+ /** What captionTop tries and keeps clear of. */
153
+ export interface CaptionTopOptions {
154
+ /** The spots to try, in order; default ["bottom", "top", "middle"]. */
155
+ prefer?: readonly CaptionSpot[];
156
+ /** Keep clear of faces (ctx.faces); default true. */
157
+ faces?: boolean;
158
+ /** Keep clear of the text of the layers listed before (ctx.texts); default true. */
159
+ texts?: boolean;
160
+ /** Pixels kept from a face; default 24 × the type scale. */
161
+ faceGap?: number;
162
+ /** Pixels kept from other text (often on a panel); default 48 × the type scale. */
163
+ textGap?: number;
164
+ /** Seconds between the moments of the cue it looks at; default 0.1. */
165
+ step?: number;
166
+ }
167
+ /**
168
+ * Where a caption block w × h pixels (centred across the frame) can go
169
+ * for one cue: the first spot in `prefer`, else just above or below
170
+ * another layer's text, clear of that text and of the faces over the
171
+ * whole cue; when none is clear of both, the least text covered, then
172
+ * the least face. Returns the block's top in pixels, inside the content
173
+ * box. A tool: call it in mount, once per cue, if you want a measured
174
+ * place; nothing places captions on its own.
175
+ */
176
+ export declare function captionTop(ctx: StageContext, L: Layout, cue: Pick<CaptionTrackCue, "start" | "end">, w: number, h: number, opts?: CaptionTopOptions): number;
177
+ /**
178
+ * The look's background and text colours sorted into the lighter and the
179
+ * darker, as variables: text over footage can be light on a dark outline
180
+ * in any look. Measures the look, so call it in mount.
181
+ */
182
+ export declare function lightDark(el: HTMLElement): {
183
+ light: string;
184
+ dark: string;
185
+ };
186
+ /**
187
+ * Words to stress, as you choose them: matched as said, case, accents
188
+ * and punctuation ignored, whole words; a phrase ("free trial") marks
189
+ * each of its words, and Chinese or Japanese may match inside a word.
190
+ */
191
+ export type Emphasis = readonly string[];
192
+ /** The emoji a word brings, keyed like Emphasis. */
193
+ export type WordEmoji = Readonly<Record<string, string>>;
194
+ type CueWords = readonly CaptionTrackCue["words"][number][];
195
+ /** For each of a cue's words, whether `emphasis` names it. */
196
+ export declare function emphasized(words: CueWords, emphasis: Emphasis | undefined): boolean[];
197
+ /**
198
+ * For each of a cue's words, the emoji it brings ("" for none): a phrase's
199
+ * goes to its last word, and the first key that names a word wins.
200
+ */
201
+ export declare function wordEmoji(words: CueWords, emoji: WordEmoji | undefined): string[];
202
+ /**
203
+ * An emoji to draw beside or above a word: in the look's emoji font
204
+ * (`var(--ak-font-emoji)`, colour emoji the stage has, the same on every
205
+ * computer), upright at regular weight, without the capitals or the
206
+ * outline of the line it sits in.
207
+ */
208
+ export declare function emojiEl(value: string, style?: Style): HTMLElement;
209
+ export {};
210
+ //# sourceMappingURL=dom.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{contentEdges as N,markRuns as I,readMarks as $}from"@allyhub/piece";import{normText as C,WordStream as M}from"@allyhub/piece";import{largestFit as O,lineOf as R,lineSpans as j}from"./fit.js";export function h(t,n={},e=[],o){const r=document.createElement(t);o&&(r.className=o),css(r,n);for(const i of e)r.append(typeof i=="string"?document.createTextNode(i):i);return r}export function css(t,n){for(const[e,o]of Object.entries(n)){if(o===void 0)continue;const r=typeof o=="number"&&!B.has(e)?`${String(o)}px`:String(o);e.startsWith("--")?t.style.setProperty(e,r):t.style.setProperty(e.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`),r)}}const B=new Set(["opacity","zIndex","fontWeight","lineHeight","flex","flexGrow","flexShrink"]),F=/[\u3400-\u9fff\uf900-\ufaff]/;export function wordBreaks(t){if(!F.test(t)||typeof Intl.Segmenter!="function")return t;const n=new Intl.Segmenter("zh",{granularity:"word"});let e="";for(const o of n.segment(t))e&&o.isWordLike&&(e+="​"),e+=o.segment;return e}export const text=t=>typeof t=="string"||typeof t=="number"||typeof t=="boolean"?String(t):"",list=t=>Array.isArray(t)?t.map(text):t===void 0?[]:[text(t)];export function layout(t,n={}){const{width:e,height:o,orient:r}=t.dims;return{W:e,H:o,orient:r,...N(t.dims,n)}}export function contentBox(t,n={}){return h("div",{position:"absolute",left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top,display:"flex",flexDirection:"column",justifyContent:"center",...n})}export function textBlock(t,{size:n,weight:e=700,color:o="var(--ak-color-fg)",font:r="var(--ak-font-display)",lineHeight:i=1.15,align:s="left"}){return h("div",{fontFamily:r,fontSize:n,fontWeight:e,color:o,lineHeight:i,textAlign:s,overflowWrap:"break-word",textWrap:"balance",lineBreak:"strict",wordBreak:"keep-all",letterSpacing:e>=700?"-0.01em":"0"},[wordBreaks(t)])}export const MARK_STYLES={strong:{fontWeight:700},em:{color:"var(--ak-color-accent)"},strike:{textDecoration:"line-through"},code:{fontFamily:"var(--ak-font-mono)",fontSize:"0.9em"}};export function marked(t,n={}){const e=typeof t=="string"?$(t):t,o=h("span");for(const r of I(e.text,e.marks)){const i=wordBreaks(r.text);if(r.kinds.length===0){o.append(i);continue}const s={};for(const l of r.kinds)Object.assign(s,n[l]??MARK_STYLES[l]);const f=h("span",s,[i]);f.dataset.mark=r.kinds.join(" "),o.append(f)}return o}export function all(t,n){return Array.from(t.querySelectorAll(`[data-ak="${n}"]`))}export function one(t,n){return t.querySelector(`[data-ak="${n}"]`)}export function tag(t,n){return t.dataset.ak=n,t}export function fitTo(t,{min:n,max:e,maxHeight:o}){const r=()=>t.scrollWidth<=t.clientWidth+1&&t.offsetHeight<=o+1;if(t.style.fontSize=`${String(e)}px`,r())return e;let i=n,s=e;for(;s-i>.5;){const f=(i+s)/2;t.style.fontSize=`${String(f)}px`,r()?i=f:s=f}return t.style.fontSize=`${String(i)}px`,i}export const FIT_LINES_PRECISION=.5;function W(t){const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),e=[];for(let o=n.nextNode();o;o=n.nextNode())o instanceof Text&&e.push(o);return e}function v(t){const n=document.createRange(),e=[];for(const o of W(t)){n.selectNodeContents(o);for(const r of n.getClientRects())e.push(r)}return j(e)}export function textLines(t){const n=v(t);if(n.length===0)return[];const e=n.map(()=>""),o=document.createRange();let r=0;for(const i of W(t)){const s=i.data;for(let f=0;f<s.length;){const l=(s.codePointAt(f)??0)>65535?2:1;o.setStart(i,f),o.setEnd(i,f+l);const m=o.getBoundingClientRect();if(m.height>0){const d=R(m,n);d>=0&&(r=d)}e[r]=(e[r]??"")+s.slice(f,f+l),f+=l}}return e.map(i=>i.replace(/\u200b/g,"").replace(/\s+/g," ").trim())}export function fitLines(t,n){if(typeof t=="string"){if(n.width===void 0)throw new Error("fitLines: a text needs a width");const d=h("div",n.style??{},[t]),x=h("div",{position:"absolute",left:0,top:0,visibility:"hidden",pointerEvents:"none"},[d]);document.body.append(x);try{return fitLines(d,n)}finally{x.remove()}}const e=t,{lines:o,min:r,max:i,width:s,height:f}=n;s!==void 0&&(e.style.width=`${String(s)}px`);const l=d=>(e.style.fontSize=`${String(d)}px`,e.scrollWidth>e.clientWidth+1||f!==void 0&&(e.offsetHeight>f+1||e.scrollHeight>e.clientHeight+1)?!1:v(e).length<=o),m=O(r,i,n.precision??FIT_LINES_PRECISION,l);return e.style.fontSize=`${String(m.size)}px`,{...m,lines:textLines(e)}}const _=(t,n)=>Math.max(0,Math.min(t[0]+t[2],n[0]+n[2])-Math.max(t[0],n[0]))*Math.max(0,Math.min(t[1]+t[3],n[1]+n[3])-Math.max(t[1],n[1]));export function freeAreas(t,n,e={}){const o=layout(t),[r,i,s,f]=e.within??[o.left,o.top,o.right-o.left,o.bottom-o.top],l=i+f,m=e.margin??24*o.k,x=[...e.faces===!1?[]:t.faces(n).map(a=>a.box),...e.texts===!1?[]:t.texts(n).map(a=>a.box),...e.covered===!1?[]:t.covered].filter(a=>a[0]<r+s&&a[0]+a[2]>r).map(a=>[a[1]-m,a[1]+a[3]+m]).sort((a,y)=>a[0]-y[0]),g=[];let p=i;for(const[a,y]of x)if(a>p&&g.push([r,p,s,Math.min(a,l)-p]),p=Math.max(p,y),p>=l)break;return p<l&&g.push([r,p,s,l-p]),g.filter(a=>a[3]>0&&a[3]>=(e.minHeight??0)).sort((a,y)=>y[3]-a[3])}export function captionTop(t,n,e,o,r,i={}){const s=c=>Math.min(Math.max(c,n.top),Math.max(n.top,n.bottom-r)),f=c=>s(c==="top"?n.top:c==="middle"?(n.top+n.bottom-r)/2:c==="bottom"?n.bottom-r:c),l=(i.prefer??["bottom","top","middle"]).map(f),m=Math.max(.02,i.step??.1),d=Math.max(0,e.end-e.start),x=Math.min(200,Math.max(1,Math.ceil(d/m))),g=[],p=[];for(let c=0;c<x;c++){const u=e.start+d*c/x;i.texts!==!1&&g.push(...t.texts(u).map(k=>k.box)),i.faces!==!1&&p.push(...t.faces(u).map(k=>k.box))}const a=(n.W-o)/2,y=i.textGap??48*n.k,T=i.faceGap??24*n.k,b=(c,u,k)=>u.reduce((H,A)=>H+_([a,c-k,o,r+2*k],A),0),z=g.flatMap(([,c,,u])=>[s(c-y-r),s(c+u+y)]).sort((c,u)=>Math.abs(c-(l[0]??0))-Math.abs(u-(l[0]??0)));let w=l[0]??s(n.bottom-r),S=[1/0,1/0];for(const c of[...l,...z]){const u=[b(c,g,y),b(c,p,T)];if(u[0]===0&&u[1]===0)return c;(u[0]<S[0]||u[0]===S[0]&&u[1]<S[1])&&(S=u,w=c)}return w}export function lightDark(t){const n="var(--ak-color-bg)",e="var(--ak-color-fg)",o=s=>{const f=h("span",{color:s,display:"none"});t.append(f);const l=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/.exec(getComputedStyle(f).color);if(f.remove(),!l)return;const[m=0,d=0,x=0]=l.slice(1,4).map(g=>{const p=Number(g)/255;return p<=.04045?p/12.92:((p+.055)/1.055)**2.4});return .2126*m+.7152*d+.0722*x},r=o(n),i=o(e);return r!==void 0&&i!==void 0&&i>r?{light:e,dark:n}:{light:n,dark:e}}const G=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;function E(t,n){const e=C(n),o=[],r=t.words.length-1;for(let i=1;;i++){const s=t.span(e,0,r,i);if(!s)return o;(G.test(e)||t.charOf(s.first)+e.length===t.charOf(s.last+1))&&o.push([s.first,s.last])}}export function emphasized(t,n){const e=t.map(()=>!1);if(!n?.length)return e;const o=new M(t);for(const r of n)for(const[i,s]of E(o,r))e.fill(!0,i,s+1);return e}export function wordEmoji(t,n){const e=t.map(()=>"");if(!n)return e;const o=new M(t);for(const[r,i]of Object.entries(n))for(const[,s]of E(o,r))(e[s]??"")===""&&(e[s]=i);return e}export function emojiEl(t,n={}){const e=h("span",{display:"inline-block",fontFamily:"var(--ak-font-emoji)",fontWeight:400,fontStyle:"normal",fontSynthesis:"none",textTransform:"none",letterSpacing:"0",lineHeight:1,WebkitTextStroke:"0",textShadow:"none",...n},[t]);return e.setAttribute("aria-hidden","true"),e}
@@ -0,0 +1,21 @@
1
+ import { type Fill, type GraphicLayer } from "@allyhub/piece";
2
+ import { type LayerOptions } from "./define.js";
3
+ import type { Written } from "./written.js";
4
+ export interface FillOptions extends LayerOptions {
5
+ /** A colour ({ color }), a gradient ({ gradient }) or a picture tiled ({ pattern, scale }). */
6
+ fill: Fill;
7
+ }
8
+ /** A fill layer's props. */
9
+ export interface FillProps {
10
+ readonly fill: Fill;
11
+ readonly base: string;
12
+ }
13
+ /** The component name of a fill layer. */
14
+ export declare const FILL = "fill";
15
+ /** Why a fill cannot be painted, or undefined. */
16
+ export declare function paintRefusal(fill: Fill | null | undefined): string | undefined;
17
+ /** A fill layer: fill({ key, fill: { gradient: { stops, angle } }, mask }). */
18
+ export type FillFn = (opts: FillOptions) => GraphicLayer<FillProps>;
19
+ /** fill() for the module `at` names: a pattern's path is from its folder. */
20
+ export declare const fillFor: (at: Written) => FillFn;
21
+ //# sourceMappingURL=fill.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{FillSchema as u,LAYER_BRAND as m,issueOf as p}from"@allyhub/piece";import{gradientRefusal as y,paintCss as g}from"@allyhub/image-draw/paint";import{LayerError as f,splitLayer as w,styleOf as $}from"./define.js";export const FILL="fill";export function paintRefusal(n){if(n&&"gradient"in n)return y(n.gradient,!1)}export const fillFor=n=>e=>{const i=`fill()${e.key===void 0?"":` ${e.key}`}`,t=u.safeParse(e.fill);if(!t.success)throw new f("AK-I003",`${i}: ${p(t.error,"fill")}.`);const l=paintRefusal(e.fill);if(l)throw new f("AK-I007",`${i}: ${l}.`);$(e,"fill","fill()");const[o,c]=w(e);return{[m]:"graphic",...o,kind:"fill",component:FILL,props:{fill:c.fill,base:n.base},mount:(s,a,d)=>{const r=s.ownerDocument.createElement("div");r.dataset.akFill="",Object.assign(r.style,{position:"absolute",inset:"0"}),g(r,a.fill,d,a.base),s.append(r)},render:()=>{}}};
@@ -0,0 +1,17 @@
1
+ import { type GraphicLayer } from "@allyhub/piece";
2
+ import { type LayerOptions } from "./define.js";
3
+ export interface GroupOptions extends LayerOptions {
4
+ /** Its layers, back to front, each with its key. */
5
+ layers: GraphicLayer[];
6
+ }
7
+ /** A group's props: its layers. */
8
+ export interface GroupProps {
9
+ readonly layers: readonly GraphicLayer[];
10
+ }
11
+ /** The component name of a group. */
12
+ export declare const GROUP = "group";
13
+ /** A group of layers, nested as written: group({ key, layers: [...], blendMode, opacity, mask, effects }). */
14
+ export declare function group(opts: GroupOptions): GraphicLayer<GroupProps>;
15
+ /** A layer's layers when it is a group, else none. */
16
+ export declare function groupLayers(l: GraphicLayer): readonly GraphicLayer[];
17
+ //# sourceMappingURL=group.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{LAYER_BRAND as f,isGraphicLayer as c}from"@allyhub/piece";import{LayerError as i,splitLayer as l,styleOf as m}from"./define.js";import{mountStack as g}from"./stack.js";export const GROUP="group";export function group(e){m(e,"group","group()");const[a,u]=l(e),p=u.layers;if(!Array.isArray(p))throw new i("AK-I003",`group()${e.key===void 0?"":` ${e.key}`}: layers is a list of layers, back to front.`);p.forEach((r,n)=>{if(!c(r))throw new i("AK-I003",`group() ${e.key??""}: layer ${String(n+1)} is not a layer made by a component, picture(), textLayer(), shape(), fill(), adjustment(), group() or custom().`);const o=r.z;if(o!==void 0&&o!=="front")throw new i("AK-I003",`group() ${e.key??""}: layer ${String(n+1)} has z "${o}": a group's layers are drawn in its order, so z is a layer's of a part alone.`)});const s=new WeakMap;return{[f]:"graphic",...a,kind:"group",component:GROUP,props:{layers:p},mount:(r,n,o)=>{s.set(r,g(r,n.layers,o))},render:(r,n,o,t)=>{for(const y of s.get(r)??[])y.layer.render(y.content,n,y.layer.props,t)},unmount:(r,n,o)=>{for(const t of s.get(r)??[])t.layer.unmount?.(t.content,t.layer.props,o);s.delete(r)}}}export function groupLayers(e){if(e.kind!=="group")return[];const a=e.props.layers;return Array.isArray(a)?a:[]}