allyhub 0.5.0 → 0.7.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 (632) hide show
  1. package/dist/audio-text.js +1 -1
  2. package/dist/commands/add.js +2 -2
  3. package/dist/commands/cloud-tools.js +5 -5
  4. package/dist/commands/dev.js +1 -1
  5. package/dist/commands/frames/piece.js +1 -1
  6. package/dist/commands/frames/sheet.js +1 -1
  7. package/dist/commands/frames.js +8 -8
  8. package/dist/commands/index.js +1 -1
  9. package/dist/commands/inspect/common.js +1 -1
  10. package/dist/commands/inspect/layout.js +1 -1
  11. package/dist/commands/render.js +1 -1
  12. package/dist/commands/sheet.js +7 -7
  13. package/dist/commands/site.js +3 -2
  14. package/dist/commands/skills.js +3 -3
  15. package/dist/commands/slides.js +2 -2
  16. package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
  17. package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
  18. package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
  19. package/dist/node_modules/@allyhub-next/browser/dist/html.js +1 -1
  20. package/dist/node_modules/@allyhub-next/browser/package.json +1 -1
  21. package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +4 -0
  22. package/dist/node_modules/@allyhub-next/build/dist/content.js +1 -1
  23. package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +2 -2
  24. package/dist/node_modules/@allyhub-next/build/dist/index.js +1 -1
  25. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +2 -2
  26. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +3 -3
  27. package/dist/node_modules/@allyhub-next/build/dist/move-refs.d.ts +1 -1
  28. package/dist/node_modules/@allyhub-next/build/dist/move-refs.js +1 -1
  29. package/dist/node_modules/@allyhub-next/build/dist/plugin.d.ts +12 -3
  30. package/dist/node_modules/@allyhub-next/build/dist/plugin.js +7 -6
  31. package/dist/node_modules/@allyhub-next/build/dist/prepare.d.ts +9 -5
  32. package/dist/node_modules/@allyhub-next/build/dist/prepare.js +2 -2
  33. package/dist/node_modules/@allyhub-next/build/dist/vite.d.ts +10 -0
  34. package/dist/node_modules/@allyhub-next/build/dist/vite.js +2 -2
  35. package/dist/node_modules/@allyhub-next/build/package.json +1 -1
  36. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
  37. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
  38. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
  39. package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
  40. package/dist/node_modules/@allyhub-next/check/dist/check.js +3 -3
  41. package/dist/node_modules/@allyhub-next/check/package.json +1 -1
  42. package/dist/node_modules/@allyhub-next/cloud/dist/blobs.js +2 -0
  43. package/dist/node_modules/@allyhub-next/cloud/dist/call.js +4 -2
  44. package/dist/node_modules/@allyhub-next/cloud/dist/client.js +1 -1
  45. package/dist/node_modules/@allyhub-next/cloud/dist/errors.js +1 -1
  46. package/dist/node_modules/@allyhub-next/cloud/dist/hashes.js +2 -0
  47. package/dist/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
  48. package/dist/node_modules/@allyhub-next/cloud/dist/sites.js +2 -0
  49. package/dist/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
  50. package/dist/node_modules/@allyhub-next/cloud/package.json +1 -1
  51. package/dist/node_modules/@allyhub-next/components/package.json +1 -1
  52. package/dist/node_modules/@allyhub-next/components/r/caption-subtitle.json +1 -1
  53. package/dist/node_modules/@allyhub-next/components/src/caption-subtitle.ts +54 -16
  54. package/dist/node_modules/@allyhub-next/dev-server/dist/background.js +1 -1
  55. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.js +1 -1
  56. package/dist/node_modules/@allyhub-next/dev-server/dist/fonts.js +2 -0
  57. package/dist/node_modules/@allyhub-next/dev-server/dist/index.js +1 -1
  58. package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
  59. package/dist/node_modules/@allyhub-next/dev-server/dist/project.js +1 -1
  60. package/dist/node_modules/@allyhub-next/dev-server/dist/reach.js +2 -0
  61. package/dist/node_modules/@allyhub-next/dev-server/dist/record.js +2 -0
  62. package/dist/node_modules/@allyhub-next/dev-server/dist/server.js +2 -2
  63. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
  64. package/dist/node_modules/@allyhub-next/dev-server/dist/tree.js +2 -0
  65. package/dist/node_modules/@allyhub-next/dev-server/package.json +1 -1
  66. package/dist/node_modules/@allyhub-next/doc/package.json +1 -1
  67. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.js +1 -1
  68. package/dist/node_modules/@allyhub-next/export/dist/export.js +5 -5
  69. package/dist/node_modules/@allyhub-next/export/dist/index.js +1 -1
  70. package/dist/node_modules/@allyhub-next/export/package.json +1 -1
  71. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
  72. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
  73. package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
  74. package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
  75. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +248 -18
  76. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
  77. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1114 -91
  78. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
  79. package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
  80. package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
  81. package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +4 -0
  82. package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
  83. package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
  84. package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  85. package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
  86. package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
  87. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +625 -30
  88. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
  89. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
  90. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
  91. package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
  92. package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
  93. package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
  94. package/dist/node_modules/@allyhub-next/measure/package.json +1 -1
  95. package/dist/node_modules/@allyhub-next/media/dist/index.d.ts +1 -1
  96. package/dist/node_modules/@allyhub-next/media/dist/index.js +1 -1
  97. package/dist/node_modules/@allyhub-next/media/dist/sheet.d.ts +2 -0
  98. package/dist/node_modules/@allyhub-next/media/dist/sheet.js +7 -7
  99. package/dist/node_modules/@allyhub-next/media/package.json +1 -1
  100. package/dist/node_modules/@allyhub-next/model/package.json +1 -1
  101. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
  102. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
  103. package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
  104. package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
  105. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
  106. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
  107. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
  108. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
  109. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
  110. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
  111. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
  112. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
  113. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
  114. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
  115. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
  116. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
  117. package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
  118. package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
  119. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
  120. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
  121. package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
  122. package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
  123. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
  124. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
  125. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
  126. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
  127. package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
  128. package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
  129. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
  130. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
  131. package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
  132. package/dist/node_modules/@allyhub-next/project/dist/deck-keys.js +2 -0
  133. package/dist/node_modules/@allyhub-next/project/dist/deck-measure.js +2 -0
  134. package/dist/node_modules/@allyhub-next/project/dist/deck-pool.js +2 -0
  135. package/dist/node_modules/@allyhub-next/project/dist/index.js +1 -1
  136. package/dist/node_modules/@allyhub-next/project/dist/session.js +1 -1
  137. package/dist/node_modules/@allyhub-next/project/dist/stills.js +2 -0
  138. package/dist/node_modules/@allyhub-next/project/package.json +1 -1
  139. package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
  140. package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
  141. package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
  142. package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  143. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
  144. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
  145. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
  146. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
  147. package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +89 -5
  148. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
  149. package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
  150. package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
  151. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  152. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +23 -0
  153. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
  154. package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
  155. package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
  156. package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
  157. package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
  158. package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
  159. package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
  160. package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
  161. package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
  162. package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
  163. package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
  164. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +377 -0
  165. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
  166. package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
  167. package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
  168. package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
  169. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
  170. package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
  171. package/dist/node_modules/@allyhub-next/registry/package.json +1 -1
  172. package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.js +3 -2
  173. package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +1 -1
  174. package/dist/node_modules/@allyhub-next/render/dist/doc/pdf.js +34 -0
  175. package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +4 -4
  176. package/dist/node_modules/@allyhub-next/render/dist/exports.js +2 -2
  177. package/dist/node_modules/@allyhub-next/render/dist/pdf.js +2 -0
  178. package/dist/node_modules/@allyhub-next/render/package.json +1 -1
  179. package/dist/node_modules/@allyhub-next/runtime/dist/fonts.js +1 -1
  180. package/dist/node_modules/@allyhub-next/runtime/dist/music.js +1 -1
  181. package/dist/node_modules/@allyhub-next/runtime/package.json +1 -1
  182. package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
  183. package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
  184. package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +4 -4
  185. package/dist/node_modules/@allyhub-next/scaffold/package.json +1 -1
  186. package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
  187. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +10 -0
  188. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
  189. package/dist/node_modules/@allyhub-next/scenery-host/package.json +1 -1
  190. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +1 -1
  191. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +1 -0
  192. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +1 -1
  193. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
  194. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
  195. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +40 -1
  196. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +1 -1
  197. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
  198. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
  199. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
  200. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
  201. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
  202. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
  203. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
  204. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
  205. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
  206. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
  207. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
  208. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
  209. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
  210. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
  211. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
  212. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
  213. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
  214. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
  215. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
  216. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
  217. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
  218. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
  219. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
  220. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
  221. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
  222. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
  223. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
  224. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
  225. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
  226. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
  227. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
  228. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
  229. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
  230. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
  231. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
  232. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
  233. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
  234. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
  235. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
  236. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
  237. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
  238. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
  239. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
  240. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
  241. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
  242. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
  243. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
  244. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
  245. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
  246. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
  247. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
  248. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
  249. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
  250. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
  251. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
  252. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
  253. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
  254. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
  255. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
  256. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
  257. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
  258. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
  259. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
  260. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +12 -1
  261. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
  262. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
  263. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
  264. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
  265. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
  266. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +6 -1
  267. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
  268. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +44 -2
  269. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
  270. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
  271. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
  272. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
  273. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
  274. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
  275. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
  276. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
  277. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
  278. package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
  279. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
  280. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +121 -44
  281. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
  282. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
  283. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +50 -13
  284. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
  285. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +1 -1
  286. package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
  287. package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
  288. package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
  289. package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
  290. package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
  291. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +188 -5
  292. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
  293. package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
  294. package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
  295. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
  296. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
  297. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -0
  298. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
  299. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
  300. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
  301. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
  302. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
  303. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
  304. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +38 -4
  305. package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +27 -1
  306. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
  307. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +26 -5
  308. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
  309. package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
  310. package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
  311. package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
  312. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
  313. package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
  314. package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
  315. package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
  316. package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
  317. package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
  318. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.js +1 -1
  319. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/code.js +4 -0
  320. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/index.js +3 -0
  321. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/names.js +2 -0
  322. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/script.js +2 -0
  323. package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.js +1 -1
  324. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/chart.js +2 -0
  325. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/common.js +2 -0
  326. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/index.js +4 -0
  327. package/dist/{site.js → node_modules/@allyhub-next/slides-pptx/dist/read/model.js} +1 -1
  328. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/shapes.js +2 -0
  329. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/table.js +2 -0
  330. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/text.js +2 -0
  331. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/timing.js +2 -0
  332. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +1 -1
  333. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +1 -1
  334. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.js +1 -1
  335. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.js +1 -1
  336. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +2 -2
  337. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +2 -2
  338. package/dist/node_modules/@allyhub-next/slides-pptx/package.json +1 -1
  339. package/dist/node_modules/@allyhub-next/slides-runtime/dist/component.js +2 -0
  340. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +2 -2
  341. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.js +1 -1
  342. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.js +5 -5
  343. package/dist/node_modules/@allyhub-next/slides-runtime/package.json +5 -1
  344. package/dist/node_modules/@allyhub-next/stage/dist/graphics.js +1 -1
  345. package/dist/node_modules/@allyhub-next/stage/dist/index.js +1 -1
  346. package/dist/node_modules/@allyhub-next/stage/dist/page.js +22 -12
  347. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.js +5 -5
  348. package/dist/node_modules/@allyhub-next/stage/dist/server.js +1 -1
  349. package/dist/node_modules/@allyhub-next/stage/package.json +1 -1
  350. package/dist/node_modules/@allyhub-next/stage-page/dist/host.js +1 -20
  351. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/probe.html +8 -0
  352. package/dist/{astro.js → node_modules/@allyhub-next/stage-page/dist/runtime/probe.js} +1 -1
  353. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/runtime.js +79 -0
  354. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.html +21 -0
  355. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.js +3 -0
  356. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.html +9 -0
  357. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.js +3 -0
  358. package/dist/node_modules/@allyhub-next/stage-page/package.json +2 -3
  359. package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
  360. package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
  361. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
  362. package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
  363. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
  364. package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
  365. package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
  366. package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
  367. package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
  368. package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
  369. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  370. package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
  371. package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
  372. package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
  373. package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
  374. package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
  375. package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
  376. package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
  377. package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
  378. package/dist/node_modules/@allyhub-next/website/LICENSE +241 -0
  379. package/dist/node_modules/@allyhub-next/website/dist/index.js +2 -0
  380. package/dist/node_modules/@allyhub-next/website/dist/publish.js +3 -0
  381. package/dist/node_modules/@allyhub-next/website/dist/rules.js +2 -0
  382. package/dist/node_modules/@allyhub-next/website/dist/website.js +4 -0
  383. package/dist/node_modules/@allyhub-next/website/package.json +13 -0
  384. package/dist/text/facts-text.js +4 -4
  385. package/dist/works.js +1 -1
  386. package/editor-web/assets/calc-worker-Bz9r26p1.js +158 -0
  387. package/editor-web/assets/dist-0emakyZE.js +36 -0
  388. package/editor-web/assets/dist-B3UoDUa5.js +37 -0
  389. package/editor-web/assets/dist-B6KzR3pN.js +10 -0
  390. package/editor-web/assets/dist-Bc5iA5k1.js +1 -0
  391. package/editor-web/assets/dist-CTQIm8Im.js +10 -0
  392. package/editor-web/assets/dist-CiHNHwyq.js +2 -0
  393. package/editor-web/assets/dist-DNZ8PQ-E.js +224 -0
  394. package/editor-web/assets/index-CFt3ovRY.js +69 -0
  395. package/editor-web/assets/index-ujKjdu_s.css +2 -0
  396. package/editor-web/assets/minus-BhoPZC5P.js +1 -0
  397. package/editor-web/assets/react-C_-rEEBU.js +101 -0
  398. package/editor-web/assets/tabs-Den4gHrU.js +105 -0
  399. package/editor-web/assets/text-align-start-CsW4nqqL.js +1 -0
  400. package/editor-web/index.html +5 -5
  401. package/package.json +8 -14
  402. package/dist/astro.d.ts +0 -2
  403. package/dist/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +0 -52
  404. package/dist/node_modules/@allyhub-next/audio/dist/decode.d.ts +0 -33
  405. package/dist/node_modules/@allyhub-next/audio/dist/envelope.d.ts +0 -37
  406. package/dist/node_modules/@allyhub-next/audio/dist/index.d.ts +0 -17
  407. package/dist/node_modules/@allyhub-next/audio/dist/levels.d.ts +0 -97
  408. package/dist/node_modules/@allyhub-next/audio/dist/master.d.ts +0 -29
  409. package/dist/node_modules/@allyhub-next/audio/dist/music.d.ts +0 -11
  410. package/dist/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +0 -39
  411. package/dist/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -25
  412. package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -31
  413. package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +0 -8
  414. package/dist/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +0 -18
  415. package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +0 -42
  416. package/dist/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +0 -60
  417. package/dist/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +0 -31
  418. package/dist/node_modules/@allyhub-next/audio/dist/plan.d.ts +0 -143
  419. package/dist/node_modules/@allyhub-next/audio/dist/recorded.d.ts +0 -26
  420. package/dist/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -47
  421. package/dist/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +0 -89
  422. package/dist/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -64
  423. package/dist/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +0 -26
  424. package/dist/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +0 -42
  425. package/dist/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +0 -56
  426. package/dist/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +0 -10
  427. package/dist/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -12
  428. package/dist/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +0 -67
  429. package/dist/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +0 -32
  430. package/dist/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +0 -27
  431. package/dist/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +0 -64
  432. package/dist/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +0 -78
  433. package/dist/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +0 -111
  434. package/dist/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +0 -3
  435. package/dist/node_modules/@allyhub-next/audio/dist/render.d.ts +0 -26
  436. package/dist/node_modules/@allyhub-next/audio/dist/sfx.d.ts +0 -10
  437. package/dist/node_modules/@allyhub-next/audio/dist/shape.d.ts +0 -118
  438. package/dist/node_modules/@allyhub-next/audio/dist/voice.d.ts +0 -45
  439. package/dist/node_modules/@allyhub-next/browser/dist/browser.d.ts +0 -24
  440. package/dist/node_modules/@allyhub-next/browser/dist/capture.d.ts +0 -61
  441. package/dist/node_modules/@allyhub-next/browser/dist/cdp.d.ts +0 -51
  442. package/dist/node_modules/@allyhub-next/browser/dist/flags.d.ts +0 -13
  443. package/dist/node_modules/@allyhub-next/browser/dist/frames.d.ts +0 -35
  444. package/dist/node_modules/@allyhub-next/browser/dist/html.d.ts +0 -19
  445. package/dist/node_modules/@allyhub-next/browser/dist/index.d.ts +0 -10
  446. package/dist/node_modules/@allyhub-next/browser/dist/launch.d.ts +0 -35
  447. package/dist/node_modules/@allyhub-next/browser/dist/page.d.ts +0 -67
  448. package/dist/node_modules/@allyhub-next/browser/dist/server.d.ts +0 -26
  449. package/dist/node_modules/@allyhub-next/check/dist/cache.d.ts +0 -46
  450. package/dist/node_modules/@allyhub-next/check/dist/check.d.ts +0 -142
  451. package/dist/node_modules/@allyhub-next/check/dist/generated.d.ts +0 -22
  452. package/dist/node_modules/@allyhub-next/check/dist/index.d.ts +0 -7
  453. package/dist/node_modules/@allyhub-next/check/dist/plans.d.ts +0 -111
  454. package/dist/node_modules/@allyhub-next/check/dist/result.d.ts +0 -12
  455. package/dist/node_modules/@allyhub-next/check/dist/scenery.d.ts +0 -23
  456. package/dist/node_modules/@allyhub-next/dev-server/dist/background.d.ts +0 -50
  457. package/dist/node_modules/@allyhub-next/dev-server/dist/card.d.ts +0 -17
  458. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.d.ts +0 -18
  459. package/dist/node_modules/@allyhub-next/dev-server/dist/index.d.ts +0 -11
  460. package/dist/node_modules/@allyhub-next/dev-server/dist/live.d.ts +0 -77
  461. package/dist/node_modules/@allyhub-next/dev-server/dist/mime.d.ts +0 -2
  462. package/dist/node_modules/@allyhub-next/dev-server/dist/mime.js +0 -2
  463. package/dist/node_modules/@allyhub-next/dev-server/dist/paths.d.ts +0 -27
  464. package/dist/node_modules/@allyhub-next/dev-server/dist/project.d.ts +0 -153
  465. package/dist/node_modules/@allyhub-next/dev-server/dist/reveal.d.ts +0 -6
  466. package/dist/node_modules/@allyhub-next/dev-server/dist/server.d.ts +0 -47
  467. package/dist/node_modules/@allyhub-next/dev-server/dist/sound.d.ts +0 -21
  468. package/dist/node_modules/@allyhub-next/dev-server/dist/stage.d.ts +0 -82
  469. package/dist/node_modules/@allyhub-next/dev-server/dist/stage.js +0 -121
  470. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.d.ts +0 -24
  471. package/dist/node_modules/@allyhub-next/dev-server/dist/validate.d.ts +0 -6
  472. package/dist/node_modules/@allyhub-next/dev-server/dist/watcher.d.ts +0 -47
  473. package/dist/node_modules/@allyhub-next/dev-server/dist/writer.d.ts +0 -51
  474. package/dist/node_modules/@allyhub-next/export/dist/batch.d.ts +0 -70
  475. package/dist/node_modules/@allyhub-next/export/dist/deck-fonts.d.ts +0 -24
  476. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.d.ts +0 -12
  477. package/dist/node_modules/@allyhub-next/export/dist/export.d.ts +0 -123
  478. package/dist/node_modules/@allyhub-next/export/dist/index.d.ts +0 -5
  479. package/dist/node_modules/@allyhub-next/export/dist/names.d.ts +0 -36
  480. package/dist/node_modules/@allyhub-next/measure/dist/compare.d.ts +0 -195
  481. package/dist/node_modules/@allyhub-next/measure/dist/contrast.d.ts +0 -14
  482. package/dist/node_modules/@allyhub-next/measure/dist/cut-sheet.d.ts +0 -90
  483. package/dist/node_modules/@allyhub-next/measure/dist/cuts.d.ts +0 -108
  484. package/dist/node_modules/@allyhub-next/measure/dist/facts.d.ts +0 -60
  485. package/dist/node_modules/@allyhub-next/measure/dist/fidelity.d.ts +0 -40
  486. package/dist/node_modules/@allyhub-next/measure/dist/flat.d.ts +0 -42
  487. package/dist/node_modules/@allyhub-next/measure/dist/index.d.ts +0 -24
  488. package/dist/node_modules/@allyhub-next/measure/dist/loop.d.ts +0 -22
  489. package/dist/node_modules/@allyhub-next/measure/dist/overlay.d.ts +0 -57
  490. package/dist/node_modules/@allyhub-next/measure/dist/recording-report.d.ts +0 -66
  491. package/dist/node_modules/@allyhub-next/measure/dist/reference/compare.d.ts +0 -118
  492. package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +0 -75
  493. package/dist/node_modules/@allyhub-next/measure/dist/reference/interpret.d.ts +0 -39
  494. package/dist/node_modules/@allyhub-next/measure/dist/reference/piece.d.ts +0 -53
  495. package/dist/node_modules/@allyhub-next/measure/dist/reference/sections.d.ts +0 -53
  496. package/dist/node_modules/@allyhub-next/measure/dist/reference/sets.d.ts +0 -84
  497. package/dist/node_modules/@allyhub-next/measure/dist/reference/text.d.ts +0 -27
  498. package/dist/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +0 -55
  499. package/dist/node_modules/@allyhub-next/measure/dist/seams.d.ts +0 -46
  500. package/dist/node_modules/@allyhub-next/measure/dist/sound-measures.d.ts +0 -74
  501. package/dist/node_modules/@allyhub-next/measure/dist/sound-report.d.ts +0 -156
  502. package/dist/node_modules/@allyhub-next/measure/dist/still.d.ts +0 -58
  503. package/dist/node_modules/@allyhub-next/measure/dist/version-voice.d.ts +0 -12
  504. package/dist/node_modules/@allyhub-next/project/dist/console.d.ts +0 -34
  505. package/dist/node_modules/@allyhub-next/project/dist/digest.d.ts +0 -9
  506. package/dist/node_modules/@allyhub-next/project/dist/index.d.ts +0 -11
  507. package/dist/node_modules/@allyhub-next/project/dist/ledger.d.ts +0 -17
  508. package/dist/node_modules/@allyhub-next/project/dist/media-index.d.ts +0 -27
  509. package/dist/node_modules/@allyhub-next/project/dist/page.d.ts +0 -119
  510. package/dist/node_modules/@allyhub-next/project/dist/says.d.ts +0 -15
  511. package/dist/node_modules/@allyhub-next/project/dist/scenery.d.ts +0 -35
  512. package/dist/node_modules/@allyhub-next/project/dist/session.d.ts +0 -37
  513. package/dist/node_modules/@allyhub-next/project/dist/stretch.d.ts +0 -38
  514. package/dist/node_modules/@allyhub-next/project/dist/version.d.ts +0 -114
  515. package/dist/node_modules/@allyhub-next/render/dist/cap.d.ts +0 -41
  516. package/dist/node_modules/@allyhub-next/render/dist/capture.d.ts +0 -78
  517. package/dist/node_modules/@allyhub-next/render/dist/clip.d.ts +0 -27
  518. package/dist/node_modules/@allyhub-next/render/dist/composite.d.ts +0 -106
  519. package/dist/node_modules/@allyhub-next/render/dist/delivery.d.ts +0 -18
  520. package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.d.ts +0 -3
  521. package/dist/node_modules/@allyhub-next/render/dist/doc/index.d.ts +0 -3
  522. package/dist/node_modules/@allyhub-next/render/dist/doc/print.d.ts +0 -51
  523. package/dist/node_modules/@allyhub-next/render/dist/encode.d.ts +0 -111
  524. package/dist/node_modules/@allyhub-next/render/dist/errors.d.ts +0 -15
  525. package/dist/node_modules/@allyhub-next/render/dist/exports.d.ts +0 -76
  526. package/dist/node_modules/@allyhub-next/render/dist/ffmpeg.d.ts +0 -75
  527. package/dist/node_modules/@allyhub-next/render/dist/footage.d.ts +0 -169
  528. package/dist/node_modules/@allyhub-next/render/dist/image.d.ts +0 -16
  529. package/dist/node_modules/@allyhub-next/render/dist/index.d.ts +0 -26
  530. package/dist/node_modules/@allyhub-next/render/dist/junction.d.ts +0 -70
  531. package/dist/node_modules/@allyhub-next/render/dist/look.d.ts +0 -21
  532. package/dist/node_modules/@allyhub-next/render/dist/page.d.ts +0 -186
  533. package/dist/node_modules/@allyhub-next/render/dist/parts.d.ts +0 -140
  534. package/dist/node_modules/@allyhub-next/render/dist/png.d.ts +0 -37
  535. package/dist/node_modules/@allyhub-next/render/dist/pool.d.ts +0 -54
  536. package/dist/node_modules/@allyhub-next/render/dist/post-probe.d.ts +0 -27
  537. package/dist/node_modules/@allyhub-next/render/dist/post.d.ts +0 -27
  538. package/dist/node_modules/@allyhub-next/render/dist/render.d.ts +0 -151
  539. package/dist/node_modules/@allyhub-next/render/dist/segments.d.ts +0 -40
  540. package/dist/node_modules/@allyhub-next/render/dist/sound.d.ts +0 -24
  541. package/dist/node_modules/@allyhub-next/render/dist/stills.d.ts +0 -41
  542. package/dist/node_modules/@allyhub-next/render/dist/tools.d.ts +0 -25
  543. package/dist/node_modules/@allyhub-next/render/dist/webp.d.ts +0 -17
  544. package/dist/node_modules/@allyhub-next/runtime/dist/bridge.d.ts +0 -211
  545. package/dist/node_modules/@allyhub-next/runtime/dist/captions.d.ts +0 -24
  546. package/dist/node_modules/@allyhub-next/runtime/dist/clock.d.ts +0 -32
  547. package/dist/node_modules/@allyhub-next/runtime/dist/compose.d.ts +0 -149
  548. package/dist/node_modules/@allyhub-next/runtime/dist/console.d.ts +0 -21
  549. package/dist/node_modules/@allyhub-next/runtime/dist/contrast.d.ts +0 -13
  550. package/dist/node_modules/@allyhub-next/runtime/dist/embed.d.ts +0 -50
  551. package/dist/node_modules/@allyhub-next/runtime/dist/env.d.ts +0 -101
  552. package/dist/node_modules/@allyhub-next/runtime/dist/errors.d.ts +0 -21
  553. package/dist/node_modules/@allyhub-next/runtime/dist/facade.d.ts +0 -42
  554. package/dist/node_modules/@allyhub-next/runtime/dist/fonts.d.ts +0 -110
  555. package/dist/node_modules/@allyhub-next/runtime/dist/footage.d.ts +0 -52
  556. package/dist/node_modules/@allyhub-next/runtime/dist/frame.d.ts +0 -61
  557. package/dist/node_modules/@allyhub-next/runtime/dist/guards.d.ts +0 -32
  558. package/dist/node_modules/@allyhub-next/runtime/dist/index.d.ts +0 -14
  559. package/dist/node_modules/@allyhub-next/runtime/dist/inspect.d.ts +0 -112
  560. package/dist/node_modules/@allyhub-next/runtime/dist/locate.d.ts +0 -11
  561. package/dist/node_modules/@allyhub-next/runtime/dist/measure.d.ts +0 -41
  562. package/dist/node_modules/@allyhub-next/runtime/dist/mix-plan.d.ts +0 -42
  563. package/dist/node_modules/@allyhub-next/runtime/dist/music.d.ts +0 -29
  564. package/dist/node_modules/@allyhub-next/runtime/dist/output.d.ts +0 -5
  565. package/dist/node_modules/@allyhub-next/runtime/dist/pictures.d.ts +0 -39
  566. package/dist/node_modules/@allyhub-next/runtime/dist/piece.d.ts +0 -34
  567. package/dist/node_modules/@allyhub-next/runtime/dist/player/clips.d.ts +0 -41
  568. package/dist/node_modules/@allyhub-next/runtime/dist/player/cutout.d.ts +0 -57
  569. package/dist/node_modules/@allyhub-next/runtime/dist/player/player.d.ts +0 -78
  570. package/dist/node_modules/@allyhub-next/runtime/dist/reads.d.ts +0 -132
  571. package/dist/node_modules/@allyhub-next/runtime/dist/sound.d.ts +0 -22
  572. package/dist/node_modules/@allyhub-next/runtime/dist/speech.d.ts +0 -107
  573. package/dist/node_modules/@allyhub-next/runtime/dist/stage-kit.d.ts +0 -12
  574. package/dist/node_modules/@allyhub-next/runtime/dist/stage.d.ts +0 -34
  575. package/dist/node_modules/@allyhub-next/runtime/dist/styles.d.ts +0 -35
  576. package/dist/node_modules/@allyhub-next/runtime/dist/takes.d.ts +0 -72
  577. package/dist/node_modules/@allyhub-next/runtime/dist/titles.d.ts +0 -10
  578. package/dist/node_modules/@allyhub-next/runtime/dist/transitions.d.ts +0 -26
  579. package/dist/node_modules/@allyhub-next/site/dist/assets.d.ts +0 -59
  580. package/dist/node_modules/@allyhub-next/site/dist/assets.js +0 -2
  581. package/dist/node_modules/@allyhub-next/site/dist/astro.d.ts +0 -22
  582. package/dist/node_modules/@allyhub-next/site/dist/astro.js +0 -3
  583. package/dist/node_modules/@allyhub-next/site/dist/lockfile.d.ts +0 -40
  584. package/dist/node_modules/@allyhub-next/site/dist/lockfile.js +0 -3
  585. package/dist/node_modules/@allyhub-next/site/dist/media.d.ts +0 -24
  586. package/dist/node_modules/@allyhub-next/site/dist/media.js +0 -4
  587. package/dist/node_modules/@allyhub-next/site/package.json +0 -25
  588. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.d.ts +0 -6
  589. package/dist/node_modules/@allyhub-next/slides-pptx/dist/fonts.d.ts +0 -45
  590. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.d.ts +0 -18
  591. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.js +0 -3
  592. package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.d.ts +0 -5
  593. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +0 -55
  594. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.js +0 -4
  595. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +0 -67
  596. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +0 -21
  597. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.d.ts +0 -4
  598. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.d.ts +0 -32
  599. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.d.ts +0 -32
  600. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +0 -26
  601. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +0 -40
  602. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.d.ts +0 -4
  603. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.js +0 -2
  604. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.d.ts +0 -4
  605. package/dist/node_modules/@allyhub-next/slides-runtime/dist/ink.d.ts +0 -10
  606. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.d.ts +0 -6
  607. package/dist/node_modules/@allyhub-next/stage/dist/bakes.d.ts +0 -42
  608. package/dist/node_modules/@allyhub-next/stage/dist/graphics.d.ts +0 -7
  609. package/dist/node_modules/@allyhub-next/stage/dist/identity.d.ts +0 -2
  610. package/dist/node_modules/@allyhub-next/stage/dist/index.d.ts +0 -9
  611. package/dist/node_modules/@allyhub-next/stage/dist/page.d.ts +0 -87
  612. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.d.ts +0 -69
  613. package/dist/node_modules/@allyhub-next/stage/dist/scenery-solve.d.ts +0 -49
  614. package/dist/node_modules/@allyhub-next/stage/dist/scenery.d.ts +0 -8
  615. package/dist/node_modules/@allyhub-next/stage/dist/server.d.ts +0 -21
  616. package/dist/node_modules/@allyhub-next/stage-page/dist/host.d.ts +0 -22
  617. package/dist/node_modules/@allyhub-next/stage-page/dist/page.js +0 -79
  618. package/dist/site.d.ts +0 -2
  619. package/editor-web/assets/dist-Cg2PdedY.js +0 -6
  620. package/editor-web/assets/dist-CuW84oPe.js +0 -233
  621. package/editor-web/assets/dist-CxAS_vp7.js +0 -2
  622. package/editor-web/assets/dist-DCVaj9i1.js +0 -4
  623. package/editor-web/assets/dist-DGVUuVPB.js +0 -33
  624. package/editor-web/assets/dist-Yi3sy7Ea.js +0 -1
  625. package/editor-web/assets/index-B7S9RZhL.css +0 -2
  626. package/editor-web/assets/index-pwRfZ2Jv.js +0 -69
  627. package/editor-web/assets/minus-BizJdinJ.js +0 -1
  628. package/editor-web/assets/react-D54s6gwK.js +0 -101
  629. package/editor-web/assets/textarea-CvxipnGW.js +0 -105
  630. package/editor-web/assets/trash-2-Bq1Dt8XG.js +0 -1
  631. package/editor-web/assets/undo-2-Djhvu4xt.js +0 -1
  632. /package/dist/node_modules/@allyhub-next/{site → ooxml}/LICENSE +0 -0
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as e}from"zod";import{BlobSchema as f,Sha256Schema as l,TreeFileSchema as h,TreePathSchema as p}from"./blobs.js";import{placeParams as x}from"./editor.js";import{openEnum as S,readable as b}from"./open.js";export const SNAPSHOT_FORMAT=1,ConversationEntrySchema=e.object({sessionId:e.string().min(1),agent:e.string().min(1),title:e.string().optional(),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),transcript:l}),TranscriptSchema=e.object({sessionId:e.string().min(1),messages:e.array(e.object({method:e.string().min(1),params:e.unknown()}))}),SNAPSHOT_KINDS=["project","home"];const $=e.string().refine(t=>t.endsWith("/")&&p.safeParse(t.slice(0,-1)).success,"a folder of the tree, ending in /");export const ItemReachSchema=e.object({tree:e.array(p),files:e.array(p),own:e.record(p,h)}),SnapshotReachSchema=e.object({shared:e.array($),items:e.record(e.string(),ItemReachSchema)}),SnapshotManifestSchema=e.object({format:e.literal(SNAPSHOT_FORMAT),kind:e.enum(SNAPSHOT_KINDS),project:e.object({name:e.string().min(1).max(255)}),host:e.object({version:e.string().min(1)}),madeAt:e.iso.datetime(),files:e.record(p,f),tree:e.record(p,h),conversations:e.array(ConversationEntrySchema),reach:SnapshotReachSchema.optional()});export function scopedManifest(t,s){const o=t.reach,c=o!==void 0&&Object.hasOwn(o.items,s)?o.items[s]:void 0;if(o===void 0||c===void 0)return;const r={};for(const[n,i]of Object.entries(t.tree))o.shared.some(m=>n.startsWith(m))&&(r[n]=i);for(const n of c.tree){const i=Object.hasOwn(t.tree,n)?t.tree[n]:void 0;i!==void 0&&(r[n]=i)}Object.assign(r,c.own);const a={};for(const n of c.files){const i=Object.hasOwn(t.files,n)?t.files[n]:void 0;i!==void 0&&(a[n]=i)}return{format:t.format,kind:t.kind,project:t.project,host:t.host,madeAt:t.madeAt,files:a,tree:r,conversations:[]}}export const SNAPSHOT_SKIPPED=["node_modules",".allyhub/cache",".allyhub/out"],SNAPSHOT_TREE={editor:"editor/",runtime:"runtime/",build:"build/",media:"media/",matte:"matte/",scenery:"scenery/",bakes:"bakes/",stills:"stills/",answers:"answers/",previews:"previews/"};function d(t){return Array.isArray(t)?t.map(d):t!==null&&typeof t=="object"?Object.fromEntries(Object.keys(t).sort().map(s=>[s,d(t[s])])):t}export const snapshotAnswerPath=(t,s)=>`${SNAPSHOT_TREE.answers}${t}/${encodeURIComponent(JSON.stringify(d(s??{})))}.json`,stillPath=t=>`${SNAPSHOT_TREE.stills}${t}.webp`,stillsIndexPath=(t,s)=>`${SNAPSHOT_TREE.stills}index/${encodeURIComponent(t)}/${encodeURIComponent(s)}.json`,StillsIndexSchema=e.object({stills:e.record(e.string(),e.string().regex(/^[0-9a-f]{64}$/u))}),stillsIndexKey=t=>JSON.stringify(d(t)),snapshotPreviewPath=t=>`${SNAPSHOT_TREE.previews}${encodeURIComponent(t===""?".":t)}.json`,TREE_PAGES={stage:`${SNAPSHOT_TREE.runtime}stage.html`,viewer:`${SNAPSHOT_TREE.runtime}viewer.html`,probe:`${SNAPSHOT_TREE.runtime}probe.html`},pieceSourcePath=t=>`${SNAPSHOT_TREE.build}sources/${encodeURIComponent(t)}.json`,scenerySourcePath=t=>`${SNAPSHOT_TREE.scenery}sources/${encodeURIComponent(t)}.json`,treeHref=t=>t.split("/").map(encodeURIComponent).join("/"),SOUND_FOLDER="sound/";export function stageCsp(t,s){const o=u=>`${t}${u}`,c=o(SNAPSHOT_TREE.runtime),r=o(SNAPSHOT_TREE.build),a=o(SNAPSHOT_TREE.scenery),n=o(SNAPSHOT_TREE.media),i=o(SNAPSHOT_TREE.matte),m=o(SOUND_FOLDER);return["default-src 'none'",`script-src 'unsafe-eval' 'wasm-unsafe-eval' ${c} ${r} ${a}`,"worker-src blob:",`style-src 'unsafe-inline' ${c} ${r} ${a}`,`font-src ${c} ${r} ${n} data:`,`img-src ${n} ${r} ${a} data: blob:`,`media-src ${n} ${i} ${m} blob:`,`connect-src ${n} ${i} ${m} ${r} ${a} ${o(SNAPSHOT_TREE.bakes)} ${c} blob: data:`,`frame-ancestors ${s.length>0?s.join(" "):"'none'"}`].join("; ")}export function snapshotEditorUrl(t,s,o={}){const c=Object.entries({item:s,embed:"studio",snapshot:"1",...o.viewer===!0?{viewer:"1"}:{},...o.theme===void 0?{}:{theme:o.theme},...x(o.place)}).map(([r,a])=>`${r}=${encodeURIComponent(a)}`);return`${t.replace(/\/$/u,"")}/${SNAPSHOT_TREE.editor}?${c.join("&")}`}export const EXECUTOR_KINDS=["cloud","computer"],COMPUTER_HEADER="x-allyhub-computer",ComputerIdSchema=e.string().regex(/^[A-Za-z0-9_-]{16,64}$/u),WORKED_ELSEWHERE="worked_elsewhere",ExecutorSchema=e.object({kind:S(EXECUTOR_KINDS),here:e.boolean()}),SNAPSHOT_BLOBS_PATH="/api/snapshots/blobs",SNAPSHOTS_PATH="/api/snapshots",SnapshotCreateSchema=e.strictObject({project:e.strictObject({id:e.string().min(1).optional(),kind:e.enum(SNAPSHOT_KINDS),name:e.string().min(1).max(255)}),manifest:l}),SnapshotCreatedSchema=e.object({id:e.string().min(1),projectId:e.string().min(1)}),SnapshotMissingSchema=e.object({missing:e.array(l)}),PROJECTS_PATH="/api/projects",SnapshotInfoSchema=e.object({id:e.string().min(1),madeAt:e.iso.datetime(),hostVersion:e.string()}),ProjectInfoSchema=e.object({id:e.string().min(1),kind:e.enum(SNAPSHOT_KINDS),name:e.string(),latest:SnapshotInfoSchema.nullable(),executor:ExecutorSchema}),ProjectsResponseSchema=e.object({projects:b(ProjectInfoSchema)}),projectPath=t=>`${PROJECTS_PATH}/${encodeURIComponent(t)}`,projectExecutorPath=t=>`${projectPath(t)}/executor`,ExecutorMoveSchema=e.strictObject({kind:e.enum(EXECUTOR_KINDS)}),snapshotViewPath=t=>`${SNAPSHOTS_PATH}/${encodeURIComponent(t)}/view`,SnapshotViewSchema=e.object({origin:e.url(),expiresAt:e.iso.datetime()}),SNAPSHOT_VIEW={manifest:"manifest.json",files:"files/",conversations:"conversations/"},NEEDS_MACHINE=-32010;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- /** `GET`: the organizations the person is in, the one a request acts in unless it names another first. */
2
+ /** `GET`: the organizations the person is in, the one a request acts in unless it names another first; `POST { name }`: a new team. */
3
3
  export declare const ORGANIZATIONS_PATH = "/api/organizations";
4
4
  export declare const OrganizationsSchema: z.ZodObject<{
5
5
  organizations: z.ZodArray<z.ZodObject<{
@@ -24,30 +24,48 @@ export declare const MembersSchema: z.ZodObject<{
24
24
  }, z.core.$strip>>;
25
25
  }, z.core.$strip>;
26
26
  export type Members = z.infer<typeof MembersSchema>;
27
- /** `PUT { monthly }`, an owner's or an admin's: a member's limit in credits a month, null for none. */
28
- export declare const memberLimitPath: (userId: string) => string;
27
+ /** A member's limit in credits a month, null for none (`members/limit`, account.ts). */
29
28
  export declare const MemberLimitSchema: z.ZodObject<{
30
29
  monthly: z.ZodNullable<z.ZodNumber>;
31
30
  }, z.core.$strict>;
32
- /** `DELETE`, its owner's: the team the request acts in dissolved. */
31
+ /** `DELETE`, its owner's: the team the request acts in dissolved; `PUT { name }`, an owner's or an admin's: renamed. */
33
32
  export declare const ORGANIZATION_PATH = "/api/organization";
34
- /** `POST`, its owner's: a dissolved team restored, within 30 days. */
35
- export declare const restorePath: (id: string) => string;
36
33
  /** `GET`: the person's cloud Studio, if any, and what an hour of it costs; `DELETE`: it gone. */
37
34
  export declare const STUDIO_PATH = "/api/studio";
35
+ /** Whether a cloud Studio is running or asleep. */
36
+ export declare const STUDIO_STATES: readonly ["running", "paused"];
38
37
  export declare const StudioSchema: z.ZodObject<{
39
38
  studio: z.ZodNullable<z.ZodObject<{
40
- state: z.ZodEnum<{
39
+ state: z.ZodUnion<readonly [z.ZodEnum<{
41
40
  running: "running";
42
41
  paused: "paused";
43
- }>;
42
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
44
43
  organizationId: z.ZodString;
45
44
  }, z.core.$strip>>;
46
45
  creditsPerHour: z.ZodNumber;
47
46
  }, z.core.$strip>;
48
47
  export type StudioInfo = z.infer<typeof StudioSchema>;
49
- /** `POST`, a browser's: the Studio made or woken, answered `{ url }`, its page with a ticket. */
48
+ /**
49
+ * `POST`, a browser's: the Studio made or woken, answered with its Host's
50
+ * origin on the gateway and a ticket. The window connects to
51
+ * `<origin as ws(s)>/studio?ticket=<ticket>`; the gateway takes a ticket
52
+ * once.
53
+ */
50
54
  export declare const STUDIO_OPEN_PATH = "/api/studio/open";
55
+ export declare const StudioOpenedSchema: z.ZodObject<{
56
+ origin: z.ZodURL;
57
+ ticket: z.ZodString;
58
+ }, z.core.$strip>;
59
+ export type StudioOpened = z.infer<typeof StudioOpenedSchema>;
60
+ /**
61
+ * `POST`, a browser's: a ticket for the person's running Studio (to
62
+ * connect again, or for one upload: `POST <origin>/upload?…&ticket=`);
63
+ * 409 when it is not running.
64
+ */
65
+ export declare const STUDIO_TICKET_PATH = "/api/studio/ticket";
66
+ export declare const StudioTicketSchema: z.ZodObject<{
67
+ ticket: z.ZodString;
68
+ }, z.core.$strip>;
51
69
  /**
52
70
  * `PUT { at }`, a cloud Studio's own Host's (its API key): when its next
53
71
  * scheduled task is due, null for none. A paused Studio is woken then, its
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as t}from"zod";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),memberLimitPath=e=>`${MEMBERS_PATH}/${encodeURIComponent(e)}/limit`,MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",restorePath=e=>`${ORGANIZATIONS_PATH}/${encodeURIComponent(e)}/restore`,STUDIO_PATH="/api/studio",StudioSchema=t.object({studio:t.object({state:t.enum(["running","paused"]),organizationId:t.string()}).nullable(),creditsPerHour:t.number()}),STUDIO_OPEN_PATH="/api/studio/open",STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
2
+ import{z as t}from"zod";import{openEnum as e}from"./open.js";export const ORGANIZATIONS_PATH="/api/organizations",OrganizationsSchema=t.object({organizations:t.array(t.object({id:t.string(),name:t.string(),slug:t.string(),role:t.string(),dissolvedAt:t.iso.datetime().nullable()}))}),MEMBERS_PATH="/api/organization/members",MembersSchema=t.object({members:t.array(t.object({userId:t.string(),email:t.string(),name:t.string(),role:t.string(),limit:t.number().nullable(),used:t.number()}))}),MemberLimitSchema=t.strictObject({monthly:t.number().nonnegative().nullable()}),ORGANIZATION_PATH="/api/organization",STUDIO_PATH="/api/studio",STUDIO_STATES=["running","paused"],StudioSchema=t.object({studio:t.object({state:e(STUDIO_STATES),organizationId:t.string()}).nullable(),creditsPerHour:t.number()}),STUDIO_OPEN_PATH="/api/studio/open",StudioOpenedSchema=t.object({origin:t.url(),ticket:t.string().min(1)}),STUDIO_TICKET_PATH="/api/studio/ticket",StudioTicketSchema=t.object({ticket:t.string().min(1)}),STUDIO_WAKE_PATH="/api/studio/wake",StudioWakeSchema=t.strictObject({at:t.iso.datetime().nullable()});
@@ -35,11 +35,11 @@ export declare const CHECK_STATES: readonly ["off", "waiting", "running", "done"
35
35
  /** The check the server runs after edits, as it stands. */
36
36
  export declare const CheckStateSchema: z.ZodObject<{
37
37
  status: z.ZodEnum<{
38
+ failed: "failed";
39
+ running: "running";
38
40
  off: "off";
39
41
  waiting: "waiting";
40
- running: "running";
41
42
  done: "done";
42
- failed: "failed";
43
43
  }>;
44
44
  revision: z.ZodInt;
45
45
  problems: z.ZodArray<z.ZodObject<{
@@ -77,9 +77,9 @@ export declare const ExportJobSchema: z.ZodObject<{
77
77
  types: z.ZodArray<z.ZodString>;
78
78
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
79
79
  state: z.ZodEnum<{
80
+ failed: "failed";
80
81
  running: "running";
81
82
  done: "done";
82
- failed: "failed";
83
83
  queued: "queued";
84
84
  cancelled: "cancelled";
85
85
  }>;
@@ -92,14 +92,16 @@ export type ExportJob = z.infer<typeof ExportJobSchema>;
92
92
  export declare const IndexJobSchema: z.ZodObject<{
93
93
  file: z.ZodString;
94
94
  status: z.ZodEnum<{
95
+ failed: "failed";
95
96
  running: "running";
96
97
  done: "done";
97
- failed: "failed";
98
98
  }>;
99
99
  message: z.ZodString;
100
100
  share: z.ZodOptional<z.ZodNumber>;
101
101
  }, z.core.$strict>;
102
102
  export type IndexJob = z.infer<typeof IndexJobSchema>;
103
+ /** Most components `slides/component-stills` draws in one call. */
104
+ export declare const COMPONENT_STILLS_MAX = 64;
103
105
  export declare const PROJECT_TOOLS: {
104
106
  readonly "project/items": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
105
107
  items: z.ZodArray<z.ZodObject<{
@@ -116,8 +118,8 @@ export declare const PROJECT_TOOLS: {
116
118
  entry: z.ZodString;
117
119
  title: z.ZodOptional<z.ZodString>;
118
120
  }, z.core.$strict>>;
119
- folder: z.ZodString;
120
121
  name: z.ZodString;
122
+ scope: z.ZodString;
121
123
  revision: z.ZodInt;
122
124
  }, z.core.$strict>>;
123
125
  readonly "sheet/generated": MethodSpec<z.ZodObject<{
@@ -152,6 +154,12 @@ export declare const PROJECT_TOOLS: {
152
154
  components: z.ZodRecord<z.ZodString, z.ZodUnknown>;
153
155
  generators: z.ZodArray<z.ZodString>;
154
156
  scripts: z.ZodRecord<z.ZodString, z.ZodString>;
157
+ code: z.ZodUnknown;
158
+ theme: z.ZodObject<{
159
+ name: z.ZodString;
160
+ colors: z.ZodRecord<z.ZodString, z.ZodString>;
161
+ fonts: z.ZodRecord<z.ZodString, z.ZodString>;
162
+ }, z.core.$strict>;
155
163
  }, z.core.$strict>>;
156
164
  readonly "video/stage": MethodSpec<z.ZodObject<{
157
165
  start: z.ZodOptional<z.ZodObject<{
@@ -162,7 +170,10 @@ export declare const PROJECT_TOOLS: {
162
170
  }, z.core.$strict>>;
163
171
  play: z.ZodOptional<z.ZodBoolean>;
164
172
  chrome: z.ZodOptional<z.ZodBoolean>;
165
- edit: z.ZodOptional<z.ZodBoolean>;
173
+ mode: z.ZodOptional<z.ZodEnum<{
174
+ code: "code";
175
+ component: "component";
176
+ }>>;
166
177
  item: z.ZodString;
167
178
  version: z.ZodOptional<z.ZodString>;
168
179
  }, z.core.$strict>, z.ZodObject<{
@@ -209,13 +220,41 @@ export declare const PROJECT_TOOLS: {
209
220
  }, z.core.$strict>;
210
221
  }, z.core.$strict>>;
211
222
  }, z.core.$strict>>;
223
+ readonly "slides/fonts": MethodSpec<z.ZodObject<{
224
+ item: z.ZodString;
225
+ }, z.core.$strict>, z.ZodObject<{
226
+ faces: z.ZodArray<z.ZodObject<{
227
+ family: z.ZodString;
228
+ url: z.ZodURL;
229
+ weight: z.ZodOptional<z.ZodString>;
230
+ style: z.ZodOptional<z.ZodString>;
231
+ stretch: z.ZodOptional<z.ZodString>;
232
+ unicodeRange: z.ZodOptional<z.ZodString>;
233
+ }, z.core.$strict>>;
234
+ }, z.core.$strict>>;
235
+ readonly "slides/component-stills": MethodSpec<z.ZodObject<{
236
+ components: z.ZodArray<z.ZodObject<{
237
+ name: z.ZodString;
238
+ props: z.ZodRecord<z.ZodString, z.ZodUnknown>;
239
+ width: z.ZodNumber;
240
+ height: z.ZodNumber;
241
+ t: z.ZodNumber;
242
+ }, z.core.$strict>>;
243
+ item: z.ZodString;
244
+ version: z.ZodOptional<z.ZodString>;
245
+ }, z.core.$strict>, z.ZodObject<{
246
+ stills: z.ZodArray<z.ZodNullable<z.ZodObject<{
247
+ key: z.ZodString;
248
+ url: z.ZodURL;
249
+ }, z.core.$strict>>>;
250
+ }, z.core.$strict>>;
212
251
  readonly "check/results": MethodSpec<z.ZodObject<{}, z.core.$strict>, z.ZodObject<{
213
252
  status: z.ZodEnum<{
253
+ failed: "failed";
254
+ running: "running";
214
255
  off: "off";
215
256
  waiting: "waiting";
216
- running: "running";
217
257
  done: "done";
218
- failed: "failed";
219
258
  }>;
220
259
  revision: z.ZodInt;
221
260
  problems: z.ZodArray<z.ZodObject<{
@@ -254,9 +293,9 @@ export declare const PROJECT_TOOLS: {
254
293
  types: z.ZodArray<z.ZodString>;
255
294
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
256
295
  state: z.ZodEnum<{
296
+ failed: "failed";
257
297
  running: "running";
258
298
  done: "done";
259
- failed: "failed";
260
299
  queued: "queued";
261
300
  cancelled: "cancelled";
262
301
  }>;
@@ -276,9 +315,9 @@ export declare const PROJECT_TOOLS: {
276
315
  types: z.ZodArray<z.ZodString>;
277
316
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
278
317
  state: z.ZodEnum<{
318
+ failed: "failed";
279
319
  running: "running";
280
320
  done: "done";
281
- failed: "failed";
282
321
  queued: "queued";
283
322
  cancelled: "cancelled";
284
323
  }>;
@@ -325,11 +364,11 @@ export declare const TOOL_NOTIFICATIONS: {
325
364
  }, z.core.$strict>>;
326
365
  readonly "check/changed": import("./jsonrpc.js").NotificationSpec<z.ZodObject<{
327
366
  status: z.ZodEnum<{
367
+ failed: "failed";
368
+ running: "running";
328
369
  off: "off";
329
370
  waiting: "waiting";
330
- running: "running";
331
371
  done: "done";
332
- failed: "failed";
333
372
  }>;
334
373
  revision: z.ZodInt;
335
374
  problems: z.ZodArray<z.ZodObject<{
@@ -362,9 +401,9 @@ export declare const TOOL_NOTIFICATIONS: {
362
401
  types: z.ZodArray<z.ZodString>;
363
402
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>>;
364
403
  state: z.ZodEnum<{
404
+ failed: "failed";
365
405
  running: "running";
366
406
  done: "done";
367
- failed: "failed";
368
407
  queued: "queued";
369
408
  cancelled: "cancelled";
370
409
  }>;
@@ -377,9 +416,9 @@ export declare const TOOL_NOTIFICATIONS: {
377
416
  jobs: z.ZodArray<z.ZodObject<{
378
417
  file: z.ZodString;
379
418
  status: z.ZodEnum<{
419
+ failed: "failed";
380
420
  running: "running";
381
421
  done: "done";
382
- failed: "failed";
383
422
  }>;
384
423
  message: z.ZodString;
385
424
  share: z.ZodOptional<z.ZodNumber>;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as e}from"zod";import{KINDS as c}from"@allyhub-next/formats";import{PathSchema as r}from"./files.js";import{method as t,notification as s}from"./jsonrpc.js";const i={item:r,version:e.string().optional()};export const ImageSchema=e.strictObject({mime:e.string().regex(/^image\//u),data:e.base64()}),ProblemSchema=e.looseObject({code:e.string(),level:e.enum(["error","warn"]),message:e.string(),piece:e.string().optional(),part:e.string().optional(),t:e.number().optional()}),FactSchema=e.looseObject({kind:e.string(),data:e.unknown()}),TimelineSchema=e.looseObject({fps:e.number(),width:e.number(),height:e.number(),duration:e.number(),parts:e.array(e.unknown())}),CHECK_STATES=["off","waiting","running","done","failed"],CheckStateSchema=e.strictObject({status:e.enum(CHECK_STATES),revision:e.int().nonnegative(),problems:e.array(ProblemSchema),facts:e.array(FactSchema),versions:e.strictObject({total:e.int(),loaded:e.int(),reused:e.int()}).optional(),error:e.string().optional()}),EXPORT_STATES=["queued","running","done","failed","cancelled"],ExportOptionsSchema=e.record(e.string(),e.union([e.string(),e.boolean()])),ExportJobSchema=e.strictObject({id:e.string(),item:r,versions:e.array(e.string()),types:e.array(e.string()),options:ExportOptionsSchema.optional(),state:e.enum(EXPORT_STATES),progress:e.number().min(0).max(1),files:e.array(r),error:e.string().optional()}),IndexJobSchema=e.strictObject({file:r,status:e.enum(["running","done","failed"]),message:e.string(),share:e.number().min(0).max(1).optional()});const o=e.tuple([e.number(),e.number(),e.number()]),a=e.strictObject({url:e.string(),probe:e.string()});export const PROJECT_TOOLS={"project/items":t(e.strictObject({}),e.strictObject({items:e.array(e.strictObject({kind:e.enum(c),dir:r,entry:r,title:e.string().optional()})),folder:e.string(),name:e.string(),revision:e.int().nonnegative()}),"The project's items, as the build finds them."),"sheet/generated":t(e.strictObject({item:r}),e.strictObject({generated:e.unknown().optional(),failed:e.boolean()}),"What a sheet's sheet.ts makes now: sheets as sheet.yaml would hold them. Never written to a file."),"video/versions":t(e.strictObject({item:r}),e.strictObject({piece:e.string(),kind:e.enum(["video","slides"]),title:e.string().optional(),width:e.number(),height:e.number(),versions:e.array(e.strictObject({key:e.string(),lang:e.string().optional()}))}),"A video's or a deck's versions, one per language: what its stage, its timeline and its exports are asked for."),"slides/deck":t(e.strictObject({item:r}),e.strictObject({piece:e.string(),file:r,prefix:e.string(),layouts:e.array(e.string()),components:e.record(e.string(),e.unknown()),generators:e.array(e.string()),scripts:e.record(e.string(),r)}),"A deck's layouts, components and generators, and its files: slides.yaml (its slides) and its script in each language (their words and notes), which the deck's editor edits."),"video/stage":t(e.strictObject({...i,start:e.strictObject({t:e.number().nonnegative().optional(),part:e.string().optional(),offset:e.number().nonnegative().optional(),dur:e.number().positive().optional()}).optional(),play:e.boolean().optional(),chrome:e.boolean().optional(),edit:e.boolean().optional()}),a,"The address of a version's stage page, for a sandboxed frame: it plays the piece and talks to its parent by postMessage."),"video/timeline":t(e.strictObject(i),e.strictObject({timeline:TimelineSchema,text:e.array(e.unknown())}),"A version's timeline, drawn nowhere."),"video/still":t(e.strictObject({...i,t:e.number().nonnegative().optional()}),e.strictObject({t:e.number(),image:ImageSchema,width:e.int().positive(),height:e.int().positive(),duration:e.number().nonnegative()}),"A moment of a version as the render draws it, as a picture."),"video/stills":t(e.strictObject({...i,moments:e.array(e.number().nonnegative()).min(1).max(32)}),e.strictObject({stills:e.array(e.strictObject({t:e.number(),image:ImageSchema}))}),"Several moments of a version as the render draws them: what `video/still` gives, on one page."),"check/results":t(e.strictObject({}),CheckStateSchema,"The check run after edits, as it stands."),"check/run":t(e.strictObject({}),e.strictObject({}),"Runs the check again now."),"export/start":t(e.strictObject({item:r,versions:e.array(e.string()).optional(),types:e.array(e.string().min(1)).max(10).optional(),options:ExportOptionsSchema.optional()}),e.strictObject({job:ExportJobSchema}),"Exports an item (its versions, as file types) into .allyhub/out/; `export/changed` says how it goes."),"export/cancel":t(e.strictObject({job:e.string()}),e.strictObject({}),"Stops an export."),"export/list":t(e.strictObject({}),e.strictObject({jobs:e.array(ExportJobSchema),reveal:e.boolean()}),"The exports asked for since the server started."),"export/reveal":t(e.strictObject({path:r}),e.strictObject({}),"Shows an exported file in the person's file manager, where the server runs on their computer (`export/list`'s `reveal`)."),"scenery/viewer":t(e.strictObject({item:r,camera:e.strictObject({position:o,target:o}).optional()}),a,"The address of a scenery's viewer page, for a sandboxed frame: it tells what the person does by postMessage.")},AGENT_DOES={"project/items":{files:"the project's folder"},"sheet/generated":{files:"the item's sheet.ts and sheet.yaml"},"video/versions":{command:"inspect combos"},"slides/deck":{files:"slides.ts, slides.yaml and the item's script.<locale>.yaml"},"video/stage":{command:"frames"},"video/timeline":{command:"inspect timeline"},"video/still":{command:"frames"},"video/stills":{command:"frames"},"check/results":{command:"inspect"},"check/run":{command:"check"},"export/start":{command:"render"},"export/cancel":{command:"render"},"export/list":{files:".allyhub/out/"},"export/reveal":{files:".allyhub/out/"},"scenery/viewer":{command:"scenery view"}};export function toolSpec(n){return Object.hasOwn(PROJECT_TOOLS,n)?PROJECT_TOOLS[n]:void 0}export const TOOL_NOTIFICATIONS={"project/changed":s(e.strictObject({revision:e.int().nonnegative()}),"The build saw a change: a stage or a timeline asked for now is the new one's."),"check/changed":s(CheckStateSchema,"The check started, ended or failed."),"export/changed":s(e.strictObject({job:ExportJobSchema}),"An export moved on."),"index/changed":s(e.strictObject({jobs:e.array(IndexJobSchema)}),"Making what the media index lacks moved on.")};
2
+ import{z as e}from"zod";import{KINDS as c}from"@allyhub-next/formats";import{PathSchema as s}from"./files.js";import{method as t,notification as r}from"./jsonrpc.js";const n={item:s,version:e.string().optional()};export const ImageSchema=e.strictObject({mime:e.string().regex(/^image\//u),data:e.base64()}),ProblemSchema=e.looseObject({code:e.string(),level:e.enum(["error","warn"]),message:e.string(),piece:e.string().optional(),part:e.string().optional(),t:e.number().optional()}),FactSchema=e.looseObject({kind:e.string(),data:e.unknown()}),TimelineSchema=e.looseObject({fps:e.number(),width:e.number(),height:e.number(),duration:e.number(),parts:e.array(e.unknown())}),CHECK_STATES=["off","waiting","running","done","failed"],CheckStateSchema=e.strictObject({status:e.enum(CHECK_STATES),revision:e.int().nonnegative(),problems:e.array(ProblemSchema),facts:e.array(FactSchema),versions:e.strictObject({total:e.int(),loaded:e.int(),reused:e.int()}).optional(),error:e.string().optional()}),EXPORT_STATES=["queued","running","done","failed","cancelled"],ExportOptionsSchema=e.record(e.string(),e.union([e.string(),e.boolean()])),ExportJobSchema=e.strictObject({id:e.string(),item:s,versions:e.array(e.string()),types:e.array(e.string()),options:ExportOptionsSchema.optional(),state:e.enum(EXPORT_STATES),progress:e.number().min(0).max(1),files:e.array(s),error:e.string().optional()}),IndexJobSchema=e.strictObject({file:s,status:e.enum(["running","done","failed"]),message:e.string(),share:e.number().min(0).max(1).optional()});const o=e.tuple([e.number(),e.number(),e.number()]),a=e.strictObject({url:e.string(),probe:e.string()});export const COMPONENT_STILLS_MAX=64,PROJECT_TOOLS={"project/items":t(e.strictObject({}),e.strictObject({items:e.array(e.strictObject({kind:e.enum(c),dir:s,entry:s,title:e.string().optional()})),name:e.string(),scope:e.string(),revision:e.int().nonnegative()}),"The project's items, as the build finds them."),"sheet/generated":t(e.strictObject({item:s}),e.strictObject({generated:e.unknown().optional(),failed:e.boolean()}),"What a sheet's sheet.ts makes now: sheets as sheet.yaml would hold them. Never written to a file."),"video/versions":t(e.strictObject({item:s}),e.strictObject({piece:e.string(),kind:e.enum(["video","slides"]),title:e.string().optional(),width:e.number(),height:e.number(),versions:e.array(e.strictObject({key:e.string(),lang:e.string().optional()}))}),"A video's or a deck's versions, one per language: what its stage, its timeline and its exports are asked for."),"slides/deck":t(e.strictObject({item:s}),e.strictObject({piece:e.string(),file:s,prefix:e.string(),layouts:e.array(e.string()),components:e.record(e.string(),e.unknown()),generators:e.array(e.string()),scripts:e.record(e.string(),s),code:e.unknown(),theme:e.strictObject({name:e.string(),colors:e.record(e.string(),e.string()),fonts:e.record(e.string(),e.string())})}),"A deck's layouts, components and generators, and its files: slides.yaml (its slides) and its script in each language (their words and notes), which the deck's editor edits."),"video/stage":t(e.strictObject({...n,start:e.strictObject({t:e.number().nonnegative().optional(),part:e.string().optional(),offset:e.number().nonnegative().optional(),dur:e.number().positive().optional()}).optional(),play:e.boolean().optional(),chrome:e.boolean().optional(),mode:e.enum(["code","component"]).optional()}),a,"The address of a version's stage page, for a sandboxed frame: it plays the piece and talks to its parent by postMessage."),"video/timeline":t(e.strictObject(n),e.strictObject({timeline:TimelineSchema,text:e.array(e.unknown())}),"A version's timeline, drawn nowhere."),"video/still":t(e.strictObject({...n,t:e.number().nonnegative().optional()}),e.strictObject({t:e.number(),image:ImageSchema,width:e.int().positive(),height:e.int().positive(),duration:e.number().nonnegative()}),"A moment of a version as the render draws it, as a picture."),"video/stills":t(e.strictObject({...n,moments:e.array(e.number().nonnegative()).min(1).max(32)}),e.strictObject({stills:e.array(e.strictObject({t:e.number(),image:ImageSchema}))}),"Several moments of a version as the render draws them: what `video/still` gives, on one page."),"slides/fonts":t(e.strictObject({item:s}),e.strictObject({faces:e.array(e.strictObject({family:e.string(),url:e.url(),weight:e.string().optional(),style:e.string().optional(),stretch:e.string().optional(),unicodeRange:e.string().optional()}))}),"The font faces a deck's slides draw with: the stage's own (the theme's standard fonts), allyhub.config.ts's fonts and what the deck's code imports, for a document that draws its slides without the project's stylesheets."),"slides/component-stills":t(e.strictObject({...n,components:e.array(e.strictObject({name:e.string(),props:e.record(e.string(),e.unknown()),width:e.number().positive(),height:e.number().positive(),t:e.number().nonnegative()})).min(1).max(COMPONENT_STILLS_MAX)}),e.strictObject({stills:e.array(e.strictObject({key:e.string(),url:e.url()}).nullable())}),"Components of a deck drawn alone, transparent, as the render draws them: pictures kept by what they show, given as addresses."),"check/results":t(e.strictObject({}),CheckStateSchema,"The check run after edits, as it stands."),"check/run":t(e.strictObject({}),e.strictObject({}),"Runs the check again now."),"export/start":t(e.strictObject({item:s,versions:e.array(e.string()).optional(),types:e.array(e.string().min(1)).max(10).optional(),options:ExportOptionsSchema.optional()}),e.strictObject({job:ExportJobSchema}),"Exports an item (its versions, as file types) into .allyhub/out/; `export/changed` says how it goes."),"export/cancel":t(e.strictObject({job:e.string()}),e.strictObject({}),"Stops an export."),"export/list":t(e.strictObject({}),e.strictObject({jobs:e.array(ExportJobSchema),reveal:e.boolean()}),"The exports asked for since the server started."),"export/reveal":t(e.strictObject({path:s}),e.strictObject({}),"Shows an exported file in the person's file manager, where the server runs on their computer (`export/list`'s `reveal`)."),"scenery/viewer":t(e.strictObject({item:s,camera:e.strictObject({position:o,target:o}).optional()}),a,"The address of a scenery's viewer page, for a sandboxed frame: it tells what the person does by postMessage.")},AGENT_DOES={"project/items":{files:"the project's folder"},"sheet/generated":{files:"the item's sheet.ts and sheet.yaml"},"video/versions":{command:"inspect combos"},"slides/deck":{files:"slides.ts, slides.yaml and the item's script.<locale>.yaml"},"video/stage":{command:"frames"},"video/timeline":{command:"inspect timeline"},"video/still":{command:"frames"},"video/stills":{command:"frames"},"slides/fonts":{files:"allyhub.config.ts's fonts and the stylesheets slides.ts imports"},"slides/component-stills":{command:"frames"},"check/results":{command:"inspect"},"check/run":{command:"check"},"export/start":{command:"render"},"export/cancel":{command:"render"},"export/list":{files:".allyhub/out/"},"export/reveal":{files:".allyhub/out/"},"scenery/viewer":{command:"scenery view"}};export function toolSpec(i){return Object.hasOwn(PROJECT_TOOLS,i)?PROJECT_TOOLS[i]:void 0}export const TOOL_NOTIFICATIONS={"project/changed":r(e.strictObject({revision:e.int().nonnegative()}),"The build saw a change: a stage or a timeline asked for now is the new one's."),"check/changed":r(CheckStateSchema,"The check started, ended or failed."),"export/changed":r(e.strictObject({job:ExportJobSchema}),"An export moved on."),"index/changed":r(e.strictObject({jobs:e.array(IndexJobSchema)}),"Making what the media index lacks moved on.")};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/protocol",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -8,6 +8,7 @@
8
8
  "default": "./dist/index.js"
9
9
  }
10
10
  },
11
+ "sideEffects": false,
11
12
  "private": true,
12
13
  "license": "SEE LICENSE IN LICENSE.md"
13
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/registry",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,3 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as n}from"node:fs/promises";import{createRequire as f}from"node:module";import{dirname as u,join as m}from"node:path";const p=f(import.meta.url),b=["@fontsource-variable/commissioner/full.css","@fontsource-variable/jetbrains-mono/wght.css","@fontsource-variable/piazzolla/opsz.css","@fontsource-variable/piazzolla/opsz-italic.css"];let i;export function docFontsCss(){return i??=Promise.all(b.map(d)).then(o=>o.join(`
3
- `)),i}async function d(o){const e=p.resolve(o),s=await n(e,"utf8"),a=[...s.matchAll(/url\(\.\/(files\/[^)]+\.woff2)\)/gu)];let t=s;for(const[l,r]of a){if(r===void 0)continue;const c=await n(m(u(e),r));t=t.replace(l,`url(data:font/woff2;base64,${c.toString("base64")})`)}return t}
2
+ import{readFile as i}from"node:fs/promises";import{createRequire as S}from"node:module";import{dirname as f,join as u}from"node:path";const m=S(import.meta.url),E=["@fontsource-variable/commissioner/full.css","@fontsource-variable/jetbrains-mono/wght.css","@fontsource-variable/piazzolla/opsz.css","@fontsource-variable/piazzolla/opsz-italic.css"];let d;export function docFontsCss(){return d??=Promise.all(E.map(v)).then(t=>t.join(`
3
+ `)),d}async function v(t){const c=m.resolve(t),e=await i(c,"utf8"),o=[...e.matchAll(/url\(\.\/(files\/[^)]+\.woff2)\)/gu)];let n=e;for(const[s,r]of o){if(r===void 0)continue;const a=await i(u(f(c),r));n=n.replace(s,`url(data:font/woff2;base64,${a.toString("base64")})`)}return n}const z=["@fontsource/carlito/400.css","@fontsource/carlito/400-italic.css","@fontsource/carlito/700.css","@fontsource/carlito/700-italic.css","@fontsource/noto-sans-sc/400.css","@fontsource/noto-sans-sc/700.css"];export const SHEET_FONT="Carlito";let w;async function x(){const t=[];for(const c of z){const e=m.resolve(c),o=await i(e,"utf8");for(const[n]of o.matchAll(/@font-face\s*\{[^}]*\}/gu)){const s=/url\(\.\/(files\/[^)]+\.woff2)\)/u.exec(n)?.[1];if(s===void 0)continue;const a=(/unicode-range:\s*([^;}]+)/u.exec(n)?.[1]??"U+0-10FFFF").split(",").map(l=>{const[p="0",g]=l.trim().replace(/^U\+/iu,"").split("-"),h=Number.parseInt(p.replaceAll("?","0"),16),F=Number.parseInt((g??p).replaceAll("?","F"),16);return[h,F]});t.push({css:n.replace(/src:[^;]+;/u,`src: url(${u(f(e),s)}) format('woff2');`),file:u(f(e),s),ranges:a})}}return t}export async function sheetFontsCss(t){w??=x();const c=new Set;for(const o of t)c.add(o.codePointAt(0)??0);const e=[];for(const o of await w){if(![...c].some(r=>o.ranges.some(([a,l])=>r>=a&&r<=l)))continue;let s=b.get(o.file);s===void 0&&(s=`url(data:font/woff2;base64,${(await i(o.file)).toString("base64")})`,b.set(o.file,s)),e.push(o.css.replace(`url(${o.file})`,s))}return e.join(`
4
+ `)}const b=new Map;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{docPage,printPage,renderDoc,renderWord}from"./print.js";export{docFontsCss}from"./fonts.js";
2
+ export{docPage,printPage,printPdf,renderDoc,renderWord}from"./print.js";export{docFontsCss,SHEET_FONT,sheetFontsCss}from"./fonts.js";export{PdfJoiner}from"./pdf.js";
@@ -0,0 +1,34 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{open as D}from"node:fs/promises";const v=new Set([0,9,10,12,13,32]),F=new Set(Buffer.from("()<>[]{}/%","latin1"));class B{bytes;text;at=0;offsets=new Map;trailer;constructor(t){this.bytes=t,this.text=t.toString("latin1");const e=/startxref\s+(\d+)\s+%%EOF\s*$/u.exec(this.text);if(!e)throw new Error("Not a PDF: no startxref.");if(this.at=Number(e[1]),!this.text.startsWith("xref",this.at))throw new Error("This PDF keeps its cross-references in a stream, which this reader does not read.");for(this.at+=4;this.skip(),!this.text.startsWith("trailer",this.at);){const s=this.number(),i=this.number();this.skip();for(let d=0;d<i;d++){const g=this.text.slice(this.at,this.at+20);g[17]==="n"&&this.offsets.set(s+d,Number(g.slice(0,10))),this.at+=20}}this.at+=7;const r=this.value();if(r.t!=="dict")throw new Error("Not a PDF: its trailer is no dictionary.");this.trailer=r.v}numbers(){return[...this.offsets.keys()].sort((t,e)=>t-e)}skip(){const{bytes:t}=this;for(;;){const e=t[this.at];if(e===void 0)return;if(v.has(e))this.at++;else if(e===37)for(;this.at<t.length&&t[this.at]!==10&&t[this.at]!==13;)this.at++;else return}}regular(){const t=this.at;for(;this.at<this.bytes.length;){const e=this.bytes[this.at]??0;if(v.has(e)||F.has(e))break;this.at++}return this.text.slice(t,this.at)}number(){this.skip();const t=this.regular(),e=Number(t);if(t===""||Number.isNaN(e))throw new Error(`Not a number at ${String(this.at)}: ${t}`);return e}value(){this.skip();const{text:t}=this,e=t[this.at];if(t.startsWith("<<",this.at)){this.at+=2;const s=new Map;for(;;){if(this.skip(),t.startsWith(">>",this.at))return this.at+=2,{t:"dict",v:s};const i=this.value();if(i.t!=="raw"||!i.s.startsWith("/"))throw new Error(`A dictionary's key is no name at ${String(this.at)}.`);s.set(i.s,this.value())}}if(e==="["){this.at++;const s=[];for(;;){if(this.skip(),t[this.at]==="]")return this.at++,{t:"arr",v:s};s.push(this.value())}}if(e==="("){const s=this.at;let i=0;for(;this.at<t.length;this.at++){const d=t[this.at];if(d==="\\")this.at++;else if(d==="(")i++;else if(d===")"&&--i===0)break}return this.at++,{t:"raw",s:t.slice(s,this.at)}}if(e==="<"){const s=t.indexOf(">",this.at),i=t.slice(this.at,s+1);return this.at=s+1,{t:"raw",s:i}}if(e==="/")return this.at++,{t:"raw",s:`/${this.regular()}`};const r=this.regular();if(r==="")throw new Error(`Unexpected ${String(e)} at ${String(this.at)}.`);if(/^\d+$/u.test(r)){const s=this.at;this.skip();const i=this.regular();if(/^\d+$/u.test(i)&&(this.skip(),t[this.at]==="R"&&(v.has(this.bytes[this.at+1]??32)||F.has(this.bytes[this.at+1]??32))))return this.at++,{t:"ref",n:Number(r)};this.at=s}return{t:"raw",s:r}}object(t){const e=this.offsets.get(t);if(e===void 0)throw new Error(`No object ${String(t)}.`);if(this.at=e,this.number(),this.number(),this.skip(),!this.text.startsWith("obj",this.at))throw new Error(`Object ${String(t)} is not where its entry says.`);this.at+=3;const r=this.value();if(this.skip(),!this.text.startsWith("stream",this.at))return{value:r};this.at+=6,this.text[this.at]==="\r"&&this.at++,this.text[this.at]===`
3
+ `&&this.at++;const s=r.t==="dict"?r.v.get("/Length"):void 0,i=s?.t==="raw"?Number(s.s):s?.t==="ref"?Number(this.object(s.n).value.s):Number.NaN;if(!Number.isFinite(i))throw new Error(`Object ${String(t)}'s stream has no length.`);return{value:r,stream:this.bytes.subarray(this.at,this.at+i)}}}const $=a=>a?.t==="dict"?a.v:void 0,y=a=>a?.t==="raw"?a.s:void 0,p=a=>a?.t==="ref"?a.n:void 0;function m(a,t){switch(a.t){case"raw":return a.s;case"ref":return`${String(t(a.n))} 0 R`;case"arr":return`[${a.v.map(e=>m(e,t)).join(" ")}]`;case"dict":return`<<${[...a.v].map(([e,r])=>`${e} ${m(r,t)}`).join(`
4
+ `)}>>`}}function I(a){if(/^[\x20-\x7e]*$/u.test(a))return`(${a.replace(/[\\()]/gu,"\\$&")})`;let t="FEFF";for(let e=0;e<a.length;e++)t+=a.charCodeAt(e).toString(16).padStart(4,"0").toUpperCase();return`<${t}>`}const K=["/Resources","/MediaBox","/CropBox","/Rotate"];export class PdfJoiner{file;offset=0;next=1;offsets=[];pages=[];structure=[];parents=[];keys=0;lang;root;tree;constructor(t){this.file=t,this.tree=this.next++,this.root=this.next++}static async create(t){const e=new PdfJoiner(await D(t,"w"));return await e.put(Buffer.from(`%PDF-1.4
5
+ %âãÏÓ
6
+ `,"latin1")),e}async put(t){await this.file.write(t,0,t.length,this.offset),this.offset+=t.length}async object(t,e,r){if(this.offsets[t]=this.offset,r===void 0){await this.put(Buffer.from(`${String(t)} 0 obj
7
+ ${e}
8
+ endobj
9
+ `,"latin1"));return}await this.put(Buffer.from(`${String(t)} 0 obj
10
+ ${e}
11
+ stream
12
+ `,"latin1")),await this.put(r),await this.put(Buffer.from(`
13
+ endstream
14
+ endobj
15
+ `,"latin1"))}async add(t){const e=new B(t),r=p(e.trailer.get("/Root"));if(r===void 0)throw new Error("A PDF without a catalog.");const s=$(e.object(r).value)??new Map;this.lang??=s.get("/Lang");const i=new Set([r]),d=p(e.trailer.get("/Info"));d!==void 0&&i.add(d);const g=[],f=(n,u)=>{const c=$(e.object(n).value);if(c)if(y(c.get("/Type"))==="/Pages"){i.add(n);const l=new Map(u);for(const h of K){const o=c.get(h);o!==void 0&&l.set(h,o)}for(const h of c.get("/Kids")?.t==="arr"?c.get("/Kids").v:[]){const o=p(h);o!==void 0&&f(o,l)}}else g.push({n,inherits:u})},w=p(s.get("/Pages"));w!==void 0&&f(w,new Map);const b=p(s.get("/StructTreeRoot")),S=b===void 0?void 0:$(e.object(b).value),k=this.keys,E=[],R=[];if(b!==void 0&&S){i.add(b);const n=S.get("/K");for(const h of n?.t==="arr"?n.v:n?[n]:[]){const o=p(h);o!==void 0&&E.push(o)}const u=p(S.get("/ParentTree")),c=[],l=h=>{i.add(h);const o=$(e.object(h).value),x=o?.get("/Nums");x?.t==="arr"&&c.push(...x.v);const T=o?.get("/Kids");for(const A of T?.t==="arr"?T.v:[]){const P=p(A);P!==void 0&&l(P)}};u!==void 0&&l(u);for(let h=0;h+1<c.length;h+=2){const o=c[h+1];o&&R.push([k+Number(y(c[h])),o])}this.keys=k+Number(y(S.get("/ParentTreeNextKey"))??"0")}const j=new Map;for(const n of e.numbers())i.has(n)||j.set(n,this.next++);const N=n=>{if(n===b)return this.root;if(i.has(n))return this.tree;const u=j.get(n);if(u===void 0)throw new Error(`A reference to object ${String(n)}, which is not there.`);return u};this.structure.push(...E.map(N));for(const[n,u]of R)this.parents.push([n,{t:"raw",s:m(u,N)}]);const M=new Map(g.map(n=>[n.n,n.inherits]));for(const[n,u]of j){const c=e.object(n),l=$(c.value);if(l){const h=M.get(n);if(h){this.pages.push(u);for(const[o,x]of h)l.has(o)||l.set(o,x)}for(const o of["/StructParents","/StructParent"]){const x=y(l.get(o));x!==void 0&&l.set(o,{t:"raw",s:String(k+Number(x))})}}await this.object(u,m(c.value,N),c.stream)}}async close(t={}){try{await this.object(this.tree,`<</Type /Pages
16
+ /Count ${String(this.pages.length)}
17
+ /Kids [${this.pages.map(f=>`${String(f)} 0 R`).join(" ")}]>>`);const e=this.structure.length>0,r=this.next++;e&&(await this.object(this.root,`<</Type /StructTreeRoot
18
+ /K [${this.structure.map(f=>`${String(f)} 0 R`).join(" ")}]
19
+ /ParentTree ${String(r)} 0 R
20
+ /ParentTreeNextKey ${String(this.keys)}>>`),await this.object(r,`<</Nums [${this.parents.map(([f,w])=>`${String(f)} ${m(w,b=>b)}`).join(" ")}]>>`));const s=this.next++;await this.object(s,["<</Type /Catalog",`/Pages ${String(this.tree)} 0 R`,...e?["/MarkInfo <</Marked true>>",`/StructTreeRoot ${String(this.root)} 0 R`]:[],...this.lang?[`/Lang ${m(this.lang,f=>f)}`]:[],...t.title===void 0?[]:["/ViewerPreferences <</DisplayDocTitle true>>"],">>"].join(`
21
+ `));const i=this.next++;await this.object(i,`<<${t.title===void 0?"":`/Title ${I(t.title)}
22
+ `}/Producer (AllyHub)>>`);const d=this.offset,g=[`xref
23
+ 0 ${String(this.next)}
24
+ `,`0000000000 65535 f
25
+ `];for(let f=1;f<this.next;f++){const w=this.offsets[f];g.push(w===void 0?`0000000000 65535 f
26
+ `:`${String(w).padStart(10,"0")} 00000 n
27
+ `)}g.push(`trailer
28
+ <</Size ${String(this.next)}
29
+ /Root ${String(s)} 0 R
30
+ /Info ${String(i)} 0 R>>
31
+ startxref
32
+ ${String(d)}
33
+ %%EOF
34
+ `),await this.put(Buffer.from(g.join(""),"latin1"))}finally{await this.file.close()}}get pageCount(){return this.pages.length}}
@@ -1,12 +1,12 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{mkdir as m,readFile as g,writeFile as u}from"node:fs/promises";import{dirname as w,extname as P,join as d,posix as h}from"node:path";import{openPage as p,startBrowser as y}from"@allyhub-next/browser";import{docHtml as S,parseDoc as v}from"@allyhub-next/doc";import{docxOf as j}from"@allyhub-next/doc/docx";import{docFontsCss as $}from"./fonts.js";const E={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml"},I=/^([a-z][a-z0-9+.-]*:|\/\/)/i;async function x(e,t,a){const n=new Map,i=async s=>{for(const r of s){if("children"in r&&await i(r.children??[]),r.type!=="image"||I.test(r.src))continue;const c=h.normalize(h.join(t.dir,decodeURIComponent(r.src))),o=E[P(c).toLowerCase()];if(o===void 0||c.startsWith(".."))continue;const f=await g(d(e,c)).catch(()=>{});f&&n.set(r.src,{type:o,bytes:f})}};return await i(a),n}const b=({type:e,bytes:t})=>`data:${e};base64,${t.toString("base64")}`;export async function docPage(e,t){const a=v(await g(d(e,t.file),"utf8")),n=await x(e,t,a.blocks);return S(a.blocks,{title:t.title??t.path,image:i=>{const s=n.get(i);return s&&b(s)},fonts:await $()})}const O={"image/png":"png","image/jpeg":"jpg","image/gif":"gif"},k=2,z=.92;async function M(e,t){const a=O[t.type],n=await e.evaluate(`(async () => {
2
+ import{mkdir as u,readFile as g,writeFile as y}from"node:fs/promises";import{cpus as S}from"node:os";import{dirname as w,extname as I,join as d,posix as v}from"node:path";import{openPage as m,startBrowser as h}from"@allyhub-next/browser";import{docHtml as O,parseDoc as b}from"@allyhub-next/doc";import{docxOf as j}from"@allyhub-next/doc/docx";import{docFontsCss as E}from"./fonts.js";import{PdfJoiner as M}from"./pdf.js";const $={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml"},k=/^([a-z][a-z0-9+.-]*:|\/\/)/i;async function P(t,e,a){const n=new Map,r=async s=>{for(const i of s){if("children"in i&&await r(i.children??[]),i.type!=="image"||k.test(i.src))continue;const o=v.normalize(v.join(e.dir,decodeURIComponent(i.src))),c=$[I(o).toLowerCase()];if(c===void 0||o.startsWith(".."))continue;const f=await g(d(t,o)).catch(()=>{});f&&n.set(i.src,{type:c,bytes:f})}};return await r(a),n}const x=({type:t,bytes:e})=>`data:${t};base64,${e.toString("base64")}`;export async function docPage(t,e){const a=b(await g(d(t,e.file),"utf8")),n=await P(t,e,a.blocks);return O(a.blocks,{title:e.title??e.path,image:r=>{const s=n.get(r);return s&&x(s)},fonts:await E()})}const R={"image/png":"png","image/jpeg":"jpg","image/gif":"gif"},T=2,z=.92;async function D(t,e){const a=R[e.type],n=await t.evaluate(`(async () => {
3
3
  const image = new Image();
4
- image.src = ${JSON.stringify(b(t))};
4
+ image.src = ${JSON.stringify(x(e))};
5
5
  try { await image.decode(); } catch { return null; }
6
6
  const width = image.naturalWidth || 1024;
7
7
  const height = image.naturalHeight || 768;
8
8
  if (${JSON.stringify(a!==void 0)}) return { width, height };
9
- const scale = ${JSON.stringify(t.type==="image/svg+xml"?k:1)};
9
+ const scale = ${JSON.stringify(e.type==="image/svg+xml"?T:1)};
10
10
  const canvas = document.createElement("canvas");
11
11
  canvas.width = width * scale;
12
12
  canvas.height = height * scale;
@@ -15,4 +15,4 @@ import{mkdir as m,readFile as g,writeFile as u}from"node:fs/promises";import{dir
15
15
  context.fillRect(0, 0, canvas.width, canvas.height);
16
16
  context.drawImage(image, 0, 0, canvas.width, canvas.height);
17
17
  return { width, height, jpeg: canvas.toDataURL("image/jpeg", ${String(z)}) };
18
- })()`);if(!n)return;const{width:i,height:s,jpeg:r}=n;if(a!==void 0)return{data:t.bytes,type:a,width:i,height:s};if(r!==void 0)return{data:Buffer.from(r.slice(r.indexOf(",")+1),"base64"),type:"jpg",width:i,height:s}}export async function renderWord(e){const{root:t,doc:a}=e,{blocks:n}=v(await g(d(t,a.file),"utf8")),i=await x(t,a,n),s=new Map;if(i.size>0){const c=await y({gpu:!1,htmlInCanvas:!1});try{const o=await p(c,{width:900,height:1200,allow:()=>!1});for(const[f,C]of i){const l=await M(o,C);l&&s.set(f,l)}}finally{await c.close()}}const r=await j(e.docx,e.zip,n,{title:a.title??a.path,picture:c=>s.get(c)});await m(w(e.out),{recursive:!0}),await u(e.out,r)}async function R(e,t){const{frameTree:a}=await e.session.send("Page.getFrameTree");await e.session.send("Page.setDocumentContent",{frameId:a.frame.id,html:t}),await e.evaluate("new Promise((r) => (document.readyState === 'complete' ? r() : addEventListener('load', () => r(), { once: true }))).then(() => document.fonts.ready).then(() => true)")}async function T(e){const{cssContentSize:t}=await e.session.send("Page.getLayoutMetrics"),a=await e.session.send("Page.captureScreenshot",{format:"png",clip:{x:0,y:0,width:Math.ceil(t.width),height:Math.ceil(t.height),scale:1},captureBeyondViewport:!0});return Buffer.from(a.data,"base64")}export async function printPage(e){const t=[],a=await y({gpu:!1,htmlInCanvas:!1});try{const n=await p(a,{width:e.width??900,height:1200,scale:2,allow:()=>!1});await R(n,e.html);for(const i of e.types){const s=d(e.out,`${e.name}.${i}`);if(await m(w(s),{recursive:!0}),i==="pdf"){const{data:r}=await n.session.send("Page.printToPDF",{preferCSSPageSize:!0,printBackground:!0});await u(s,Buffer.from(r,"base64"))}else e.pictureCss!==void 0&&await n.evaluate(`(() => { const s = document.createElement('style'); s.textContent = ${JSON.stringify(e.pictureCss)}; document.head.append(s); return true; })()`),await u(s,await T(n));t.push(`${e.name}.${i}`)}}finally{await a.close()}return t}export async function renderDoc(e){return printPage({html:await docPage(e.root,e.doc),out:e.out,name:e.name??"doc",types:e.types?.length?e.types:["pdf"],pictureCss:"body{padding:48px 0;background:#fff}"})}
18
+ })()`);if(!n)return;const{width:r,height:s,jpeg:i}=n;if(a!==void 0)return{data:e.bytes,type:a,width:r,height:s};if(i!==void 0)return{data:Buffer.from(i.slice(i.indexOf(",")+1),"base64"),type:"jpg",width:r,height:s}}export async function renderWord(t){const{root:e,doc:a}=t,{blocks:n}=b(await g(d(e,a.file),"utf8")),r=await P(e,a,n),s=new Map;if(r.size>0){const o=await h({gpu:!1,htmlInCanvas:!1});try{const c=await m(o,{width:900,height:1200,allow:()=>!1});for(const[f,l]of r){const p=await D(c,l);p&&s.set(f,p)}}finally{await o.close()}}const i=await j(t.docx,t.zip,n,{title:a.title??a.path,picture:o=>s.get(o)});await u(w(t.out),{recursive:!0}),await y(t.out,i)}async function C(t,e){const{frameTree:a}=await t.session.send("Page.getFrameTree");await t.session.send("Page.setDocumentContent",{frameId:a.frame.id,html:e}),await t.evaluate("new Promise((r) => (document.readyState === 'complete' ? r() : addEventListener('load', () => r(), { once: true }))).then(() => document.fonts.ready).then(() => window.allyhubReady).then(() => true)")}async function B(t){const{cssContentSize:e}=await t.session.send("Page.getLayoutMetrics"),a=await t.session.send("Page.captureScreenshot",{format:"png",clip:{x:0,y:0,width:Math.ceil(e.width),height:Math.ceil(e.height),scale:1},captureBeyondViewport:!0});return Buffer.from(a.data,"base64")}const F=Math.max(1,Math.min(4,Math.floor(S().length/2)));async function J(t,e){const{stream:a}=await t.session.send("Page.printToPDF",{preferCSSPageSize:!0,printBackground:!0,generateTaggedPDF:e,generateDocumentOutline:!1,transferMode:"ReturnAsStream"});if(a===void 0)throw new Error("Chrome gave no PDF.");const n=[];for(;;){const r=await t.session.send("IO.read",{handle:a,size:1048576});if(n.push(Buffer.from(r.data,r.base64Encoded?"base64":"latin1")),r.eof)break}return await t.session.send("IO.close",{handle:a}),Buffer.concat(n)}export async function printPdf(t){await u(w(t.file),{recursive:!0});const e=await h({gpu:!1,htmlInCanvas:!1}),a=await M.create(t.file),n=t.tagged??!0,r=async s=>{t.signal?.throwIfAborted();const i=await m(e,{width:900,height:1200,allow:()=>!1});try{return await C(i,await t.parts.html(s)),await J(i,n)}finally{await i.close()}};try{const s=[];let i=0;const o=()=>{i<t.parts.count&&s.push(r(i++))};for(let c=0;c<F;c++)o();for(let c=0;c<t.parts.count;c++){const f=s.shift();if(!f)break;const l=await f;o(),await a.add(l)}await Promise.allSettled(s)}finally{await a.close(t.title===void 0?{}:{title:t.title}),await e.close()}}export async function printPage(t){const e=[];for(const a of t.types){const n=d(t.out,`${t.name}.${a}`);await u(w(n),{recursive:!0}),a==="pdf"?await printPdf({parts:{count:1,html:()=>t.html},file:n,...t.title===void 0?{}:{title:t.title}}):await y(n,await L(t)),e.push(`${t.name}.${a}`)}return e}async function L(t){const e=await h({gpu:!1,htmlInCanvas:!1});try{const a=await m(e,{width:t.width??900,height:1200,scale:2,allow:()=>!1});return await C(a,t.html),t.pictureCss!==void 0&&await a.evaluate(`(() => { const s = document.createElement('style'); s.textContent = ${JSON.stringify(t.pictureCss)}; document.head.append(s); return true; })()`),await B(a)}finally{await e.close()}}export async function renderDoc(t){return printPage({html:await docPage(t.root,t.doc),out:t.out,name:t.name??"doc",types:t.types?.length?t.types:["pdf"],pictureCss:"body{padding:48px 0;background:#fff}",title:t.doc.title??t.doc.path})}
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{writeFile as S}from"node:fs/promises";import{createRequire as $}from"node:module";import{captionCues as M,paperOf as j,subtitleCues as v,toSrt as L,toVtt as T}from"@allyhub-next/video-core";import{RenderError as O}from"./errors.js";import{backgroundStill as z,finalStill as w,footageStill as C}from"./stills.js";export function stillsOf(t,e=!1){const a=[];for(const[o,i]of t.parts.entries()){if(i.hidden===!0)continue;const n=i.title??String(o+1),r=e&&i.steps!==void 0?i.steps:[i.still];r.forEach((c,s)=>{a.push({part:i,at:c,title:r.length>1?`${n} (${String(s+1)})`:n})})}return a}async function h(t,e,a){return await S(t,e),{out:t,units:a,bytes:e.byteLength}}const b=t=>({target:t.target,look:t.look,media:t.media,...t.ffmpeg===void 0?{}:{ffmpeg:t.ffmpeg},...t.ffprobe===void 0?{}:{ffprobe:t.ffprobe}});export async function renderCaptions(t){const{timeline:e}=t.page,a=await t.page.lines();if(a.length===0)throw new O("no-speech",`${t.target.output} of ${t.target.piece} (${t.target.combo.lang??"this combo"}) says nothing with word times, so there are no subtitles to export.`,{hint:'Give parts speech: speech: take("./take.mp4") with its .words.json beside it, or say(s("…")) and allyhub voice.'});const o={lines:a,fps:e.fps},i=t.captions?M(o,t.captions):v(o,await t.page.captionOptions()),n=t.type==="srt"?L(i):T(i);return h(t.out,new TextEncoder().encode(n),i.length)}export async function renderCover(t){const{page:e}=t,a=await e.covers()>0?await z(e.timeline,await e.cover(0),"jpeg",t):await w(e,e.timeline.parts[0]?.still??0,{...b(t),format:"jpeg"});return h(t.out,a,1)}export async function renderPdf(t){const{timeline:e}=t.page,a=e.background,o=[];for(const n of stillsOf(e,t.steps)){const r=await C(t.media,e,n.at,"jpeg",t);o.push({still:n.at,title:n.title,background:r?`url(data:image/jpeg;base64,${r.toString("base64")}) 0 0 / 100% 100% no-repeat`:a})}const i=await t.page.print(o,e.paper??j(t.target.format));return h(t.out,i,o.length)}export async function renderPng(t){const e=stillsOf(t.page.timeline,t.steps),a=Math.max(2,String(e.length).length),o=t.out.replace(/\.png$/i,""),i=[];let n=0;for(const[r,c]of e.entries()){const s=e.length===1?t.out:`${o}.${String(r+1).padStart(a,"0")}.png`,l=await w(t.page,c.at,b(t));await S(s,l),i.push(s),n+=l.byteLength}return{out:i[0]??t.out,units:i.length,bytes:n,files:i}}const P=$(import.meta.url)("pptxgenjs"),E=t=>({color:t.slice(0,3).map(e=>Math.round(e).toString(16).padStart(2,"0")).join(""),transparency:Math.round((1-t[3])*100)}),N=t=>t?.[0]?.replace(/^["']|["']$/gu,"").replace(/ Variable$/u,"");async function A(t,e,a,o){const i=await t.inks?.(a)??[];for(const n of i){if(n.text.text.trim()==="")continue;const[r,c,s,l]=n.text.box,g=n.lines.find(p=>p.fill!==void 0)?.fill,f=g?E(g):void 0,u=Math.max(1,n.lines.length),d=N(n.text.fonts);e.addText(n.text.text,{x:r*o,y:c*o,w:Math.max(s,1)*o,h:Math.max(l,1)*o,fontSize:Math.max(1,Math.round(n.size*o*72*10)/10),...d===void 0?{}:{fontFace:d},...f===void 0?{}:{color:f.color,...f.transparency>0?{transparency:f.transparency}:{}},bold:n.weight>=600,margin:0,valign:"top",fit:"none",...u===1?{wrap:!1}:{},...u>1&&n.size>0?{lineSpacingMultiple:l/u/n.size/1.2}:{}})}}export async function renderPptx(t){const{timeline:e}=t.page,{width:a,height:o}=e,i=/^([\d.]+)in ([\d.]+)in$/u.exec(e.paper??""),n=13.333/Math.max(a,o),r=i?Number(i[1]):a*n,c=i?Number(i[2]):o*n,s=new P;s.defineLayout({name:"ALLYHUB",width:r,height:c}),s.layout="ALLYHUB";const l=await t.page.text(),g=t.pptx==="editable"&&t.page.inks!==void 0&&t.page.hideText!==void 0,f=stillsOf(e,t.steps);for(const d of f){g&&await t.page.hideText?.(!0);let p;try{p=await w(t.page,d.at,b(t))}finally{g&&await t.page.hideText?.(!1)}const m=s.addSlide();m.addImage({data:`image/png;base64,${p.toString("base64")}`,x:0,y:0,w:r,h:c}),g&&await A(t.page,m,d.at,r/a);const x=l.find(k=>k.key===d.part.key),y=x?.notes??x?.spoken??x?.onScreen.join(`
3
- `)??"";y&&m.addNotes(y)}const u=await s.write({outputType:"nodebuffer"});return h(t.out,u,f.length)}
2
+ import{writeFile as b}from"node:fs/promises";import{createRequire as j}from"node:module";import{captionCues as L,paperOf as v,subtitleCues as P,toSrt as C,toVtt as O}from"@allyhub-next/video-core";import{RenderError as E}from"./errors.js";import{finishPdf as N}from"./pdf.js";import{backgroundStill as A,finalStill as u,footageStill as B}from"./stills.js";export function stillsOf(t,e=!1){const i=[];for(const[a,n]of t.parts.entries()){if(n.hidden===!0)continue;const r=n.title??String(a+1),o=e&&n.steps!==void 0?n.steps:[n.still],s=o.length===1?(n.steps?.length??1)-1:0;o.forEach((c,l)=>{i.push({part:n,step:s+l,at:c,title:o.length>1?`${r} (${String(l+1)})`:r})})}return i}async function f(t,e,i){return await b(t,e),{out:t,units:i,bytes:e.byteLength}}const d=t=>({target:t.target,look:t.look,media:t.media,...t.ffmpeg===void 0?{}:{ffmpeg:t.ffmpeg},...t.ffprobe===void 0?{}:{ffprobe:t.ffprobe}});export async function renderCaptions(t){const{timeline:e}=t.page,i=await t.page.lines();if(i.length===0)throw new E("no-speech",`${t.target.output} of ${t.target.piece} (${t.target.combo.lang??"this combo"}) says nothing with word times, so there are no subtitles to export.`,{hint:'Give parts speech: speech: take("./take.mp4") with its .words.json beside it, or say(s("…")) and allyhub voice.'});const a={lines:i,fps:e.fps},n=t.captions?L(a,t.captions):P(a,await t.page.captionOptions()),r=t.type==="srt"?C(n):O(n);return f(t.out,new TextEncoder().encode(r),n.length)}export async function renderCover(t){const{page:e}=t,i=await e.covers()>0?await A(e.timeline,await e.cover(0),"jpeg",t):await u(e,e.timeline.parts[0]?.still??0,{...d(t),format:"jpeg"});return f(t.out,i,1)}export async function renderPdf(t){const{timeline:e}=t.page,i=e.background,a=[];for(const o of stillsOf(e,t.steps)){const s=await B(t.media,e,o.at,"jpeg",t);a.push({still:o.at,title:o.title,background:s?`url(data:image/jpeg;base64,${s.toString("base64")}) 0 0 / 100% 100% no-repeat`:i})}const n=await t.page.print(a,e.paper??v(t.target.format)),r=await N(n,{...t.title===void 0?{}:{title:t.title},outline:a.map(o=>o.title)});return f(t.out,r,a.length)}export async function renderPng(t){const e=stillsOf(t.page.timeline,t.steps),i=Math.max(2,String(e.length).length),a=t.out.replace(/\.png$/i,""),n=[];let r=0;const o=await t.stills?.(e);for(const[s,c]of e.entries()){const l=e.length===1?t.out:`${a}.${String(s+1).padStart(i,"0")}.png`,g=o?.[s]??await u(t.page,c.at,d(t));await b(l,g),n.push(l),r+=g.byteLength}return{out:n[0]??t.out,units:n.length,bytes:r,files:n}}const G=j(import.meta.url)("pptxgenjs");export async function renderPptx(t){const{timeline:e}=t.page,{width:i,height:a}=e,n=/^([\d.]+)in ([\d.]+)in$/u.exec(e.paper??""),r=13.333/Math.max(i,a),o=n?Number(n[1]):i*r,s=n?Number(n[2]):a*r,c=new G;c.defineLayout({name:"ALLYHUB",width:o,height:s}),c.layout="ALLYHUB";const l=await t.page.text(),g=stillsOf(e,t.steps),y=await t.stills?.(g);for(const[S,m]of g.entries()){const k=y?.[S]??await u(t.page,m.at,d(t)),h=c.addSlide();h.addImage({data:`image/png;base64,${k.toString("base64")}`,x:0,y:0,w:o,h:s});const p=l.find($=>$.key===m.part.key),w=p?.notes??p?.spoken??p?.onScreen.join(`
3
+ `)??"";w&&h.addNotes(w)}const x=await c.write({outputType:"nodebuffer"});return f(t.out,x,g.length)}
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{PDFDict as b,PDFDocument as w,PDFHexString as h,PDFName as e,PDFNull as P,PDFNumber as C,PDFString as N}from"pdf-lib";const O=o=>/^[\x20-\x7e]*$/u.test(o)&&!/[()\\]/u.test(o)?N.of(o):h.fromText(o);function j(){const o=process.env.SOURCE_DATE_EPOCH;if(!(o===void 0||!/^\d+$/u.test(o)))return new Date(Number(o)*1e3)}export async function finishPdf(o,c){const t=await w.load(o,{updateMetadata:!1}),i=t.context.lookup(t.context.trailerInfo.Info),r=j();r?(t.setCreationDate(r),t.setModificationDate(r)):i instanceof b&&(i.delete(e.of("CreationDate")),i.delete(e.of("ModDate"))),c.title!==void 0&&c.title!==""&&t.setTitle(c.title,{showInWindowTitleBar:!0});const d=t.getPages(),l=(c.outline??[]).slice(0,d.length);if(l.length>0){const u=t.context.nextRef(),n=l.map(()=>t.context.nextRef());l.forEach((T,a)=>{const D=d[a],x=n[a];if(!D||!x)return;const s=t.context.obj({});s.set(e.of("Title"),O(T)),s.set(e.of("Parent"),u),s.set(e.of("Dest"),t.context.obj([D.ref,e.of("Fit")]));const g=n[a-1],p=n[a+1];g&&s.set(e.of("Prev"),g),p&&s.set(e.of("Next"),p),t.context.assign(x,s)});const f=t.context.obj({});f.set(e.of("Type"),e.of("Outlines"));const m=n[0],F=n.at(-1);f.set(e.of("First"),m??P),f.set(e.of("Last"),F??P),f.set(e.of("Count"),C.of(n.length)),t.context.assign(u,f),t.catalog.set(e.of("Outlines"),u)}return Buffer.from(await t.save({useObjectStreams:!1}))}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/render",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- const y=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","math","emoji","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","-apple-system","blinkmacsystemfont","inherit","initial"]);export const isGeneric=t=>y.has(t.toLowerCase());export function families(t){const n=[];let i="",o="";for(const e of t)o?e===o?o="":i+=e:e==='"'||e==="'"?o=e:e===","?(n.push(i.trim()),i=""):i+=e;return n.push(i.trim()),n.filter(Boolean)}export function unicodeRanges(t){const n=[];for(const i of t.split(",")){const o=/^\s*u\+([0-9a-f?]+)(?:-([0-9a-f]+))?\s*$/i.exec(i),e=o?.[1];if(e)if(e.includes("?"))n.push([parseInt(e.replace(/\?/g,"0"),16),parseInt(e.replace(/\?/g,"f"),16)]);else{const r=parseInt(e,16);n.push([r,o[2]?parseInt(o[2],16):r])}}return n}export function weightRange(t){const n=s=>s==="bold"?700:s==="normal"?400:Number(s),[i="400",o]=t.trim().split(/\s+/),e=n(i),r=o===void 0?e:n(o);return Number.isFinite(e)&&Number.isFinite(r)?[e,r]:[400,400]}export function matchWeight(t,n){if(n.length===0)return;if(n.some(([s,a])=>t>=s&&t<=a))return t;const i=n.filter(([s])=>s>t).map(([s])=>s),o=n.filter(([,s])=>s<t).map(([,s])=>s),e=i.length?Math.min(...i):void 0,r=o.length?Math.max(...o):void 0;return t>500?e??r:t<400?r??e:e!==void 0&&e<=500?e:r??e}export const BOLD=600;const d=(t,n)=>t.ranges.length===0||n.some(i=>t.ranges.some(([o,e])=>i>=o&&i<=e));export function fontIssue(t,n,i,o){const e=t.families[0];if(e===void 0||isGeneric(e))return;let r;for(const s of t.families){if(isGeneric(s))return r&&{kind:"fallback",...r,usedFamily:s};const a=i.filter(l=>l.family.toLowerCase()===s.toLowerCase());if(a.length===0){if(o(s))return r&&{kind:"fallback",...r,usedFamily:s};r??={family:s,failed:!1};continue}const c=a.filter(l=>d(l,n));if(c.length===0)continue;const f=c.filter(l=>l.status==="loaded");if(f.length===0){if(c.every(l=>l.status==="error")){r??={family:s,failed:!0};continue}return}if(r)return{kind:"fallback",...r,usedFamily:s};const g=matchWeight(t.weight,f.map(l=>l.weight)),u=Math.max(...f.map(l=>l.weight[1]));return t.weight>=BOLD&&u<BOLD?{kind:"bold",family:s,weight:t.weight,drawn:g??u,faked:t.synthBold}:t.italic&&!f.some(l=>l.slanted)?{kind:"italic",family:s,faked:t.synthItalic}:void 0}return r&&{kind:"fallback",...r,usedFamily:"the browser's default font"}}export function drawnFamilies(t,n,i,o){const e=[];for(const r of new Set(n)){let s="the browser's default font";for(const a of t.families){if(isGeneric(a)){s=a;break}const c=i.filter(f=>f.family.toLowerCase()===a.toLowerCase());if(c.length===0?o(a):c.some(f=>f.status==="loaded"&&d(f,[r]))){s=a;break}}e.includes(s)||e.push(s)}return e}export function fontIssueText(t){switch(t.kind){case"fallback":return t.failed?`the font "${t.family}" failed to load, so it is drawn in ${m(t.usedFamily)}. Check the @font-face url and that the file is in the workspace.`:`the font "${t.family}" is not loaded, so it is drawn in ${m(t.usedFamily)}. Import its stylesheet in the piece (import "@fontsource/<id>/400.css" after npm install @fontsource/<id>, or a .css of @font-face rules), or list it in allyhub.config.ts's fonts for every stage, or use a font the look has (var(--ak-font-display), var(--ak-font-body)).`;case"bold":return t.faked?`"${t.family}" has no face for weight ${String(t.weight)} (the loaded faces stop below ${String(BOLD)}), so Chrome fakes the bold by thickening weight ${String(t.drawn)}. Load a bold face of the font, or use a weight it has.`:`"${t.family}" has no face for weight ${String(t.weight)}, so it is drawn at weight ${String(t.drawn)}. Load a bold face of the font, or use a weight it has.`;case"italic":return t.faked?`"${t.family}" has no italic face, so Chrome fakes the italic by slanting the upright letters. Load an italic face of the font, or drop font-style: italic.`:`"${t.family}" has no italic face, so it is drawn upright. Load an italic face of the font, or drop font-style: italic.`}}const m=t=>isGeneric(t)?`the browser's ${t} font`:t.startsWith("the ")?t:`"${t}"`;export function stringsOf(t,n=2e3){const i=[],o=new Set,e=r=>{if(!(i.length>=n)){if(typeof r=="string")i.push(r);else if(typeof r=="object"&&r!==null&&!o.has(r)){o.add(r);for(const s of Array.isArray(r)?r:Object.values(r))e(s)}}};return e(t),i}export function emojiOf(t){const n=/\p{Extended_Pictographic}|\p{Regional_Indicator}|[\u{1F3FB}-\u{1F3FF}\u{E0020}-\u{E007F}]|\u200d|\ufe0f|\u20e3/gu,i=new Set;for(const o of t)for(const e of o.matchAll(n))i.add(e[0]);return[...i].join("")}const h=new Map;let p;export function pageFaces(){const t=[];return document.fonts.forEach(n=>{t.push({family:families(n.family)[0]??n.family,weight:weightRange(n.weight),slanted:n.style!=="normal",status:n.status,ranges:unicodeRanges(n.unicodeRange)})}),t}export function localFamily(t){const n=h.get(t);if(n!==void 0)return n;p??=document.createElement("canvas").getContext("2d");const i=p;if(!i)return!0;const o="mmmmmmmmmmlli10WQ@#ƌ",e=a=>(i.font=a,i.measureText(o).width),r=JSON.stringify(t),s=["monospace","serif","sans-serif"].some(a=>e(`40px ${r}, ${a}`)!==e(`40px ${a}`));return h.set(t,s),s}export function fontWant(t){const n=Number(t.fontWeight);return{families:families(t.fontFamily),weight:Number.isFinite(n)?n:400,italic:t.fontStyle!=="normal",synthBold:t.getPropertyValue("font-synthesis-weight")!=="none",synthItalic:t.getPropertyValue("font-synthesis-style")!=="none"}}export function codePoints(t){const n=new Set;for(const i of t)for(const o of i)n.add(o.codePointAt(0)??0);return n}export function coversAny(t,n){if(t.length===0)return!0;for(const i of n)if(t.some(([o,e])=>i>=o&&i<=e))return!0;return!1}export function namedFamilies(t){return families(t).filter(n=>!isGeneric(n)&&!n.startsWith("var(")).map(n=>n.toLowerCase())}export function styleSheetFamilies(){const t=new Set,n=i=>{for(const o of Array.from(i))if(o instanceof CSSStyleRule){const e=o.style.getPropertyValue("font-family");if(e)for(const r of namedFamilies(e))t.add(r)}else o instanceof CSSGroupingRule&&n(o.cssRules)};for(const i of Array.from(document.styleSheets))try{n(i.cssRules)}catch{}return t}export function propFamilies(t){const n=new Set;document.fonts.forEach(e=>{n.add((families(e.family)[0]??e.family).toLowerCase())});const i=t.map(e=>e.toLowerCase()),o=new Set;for(const e of n)e&&i.some(r=>r.includes(e))&&o.add(e);return o}export async function loadFaces(t,n){const i=[];document.fonts.forEach(o=>{if(o.status!=="unloaded")return;const e=(families(o.family)[0]??o.family).toLowerCase();t.has(e)&&coversAny(unicodeRanges(o.unicodeRange),n)&&i.push(o.load().catch(()=>{}))}),await Promise.all(i)}export async function loadTextFonts(t){const n=new Map,i=new Map,o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let e=o.nextNode();e;e=o.nextNode()){const r=e.nodeValue??"",s=e.parentElement;if(!s||!r.trim())continue;let a=i.get(s);if(a===void 0){const f=getComputedStyle(s);a=`${f.fontStyle==="normal"?"":"italic "}${f.fontWeight} 40px ${f.fontFamily}`,i.set(s,a)}let c=n.get(a);c||(c=new Set,n.set(a,c));for(const f of r)f.trim()&&c.add(f)}await Promise.all([...n].map(([e,r])=>document.fonts.load(e,[...r].join("")).catch(()=>[])))}
2
+ const y=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","math","emoji","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","-apple-system","blinkmacsystemfont","inherit","initial"]);export const isGeneric=t=>y.has(t.toLowerCase());export function families(t){const e=[];let r="",i="";for(const n of t)i?n===i?i="":r+=n:n==='"'||n==="'"?i=n:n===","?(e.push(r.trim()),r=""):r+=n;return e.push(r.trim()),e.filter(Boolean)}export function unicodeRanges(t){const e=[];for(const r of t.split(",")){const i=/^\s*u\+([0-9a-f?]+)(?:-([0-9a-f]+))?\s*$/i.exec(r),n=i?.[1];if(n)if(n.includes("?"))e.push([parseInt(n.replace(/\?/g,"0"),16),parseInt(n.replace(/\?/g,"f"),16)]);else{const o=parseInt(n,16);e.push([o,i[2]?parseInt(i[2],16):o])}}return e}export function weightRange(t){const e=s=>s==="bold"?700:s==="normal"?400:Number(s),[r="400",i]=t.trim().split(/\s+/),n=e(r),o=i===void 0?n:e(i);return Number.isFinite(n)&&Number.isFinite(o)?[n,o]:[400,400]}export function matchWeight(t,e){if(e.length===0)return;if(e.some(([s,a])=>t>=s&&t<=a))return t;const r=e.filter(([s])=>s>t).map(([s])=>s),i=e.filter(([,s])=>s<t).map(([,s])=>s),n=r.length?Math.min(...r):void 0,o=i.length?Math.max(...i):void 0;return t>500?n??o:t<400?o??n:n!==void 0&&n<=500?n:o??n}export const BOLD=600;const m=(t,e)=>t.ranges.length===0||e.some(r=>t.ranges.some(([i,n])=>r>=i&&r<=n));export function fontIssue(t,e,r,i){const n=t.families[0];if(n===void 0||isGeneric(n))return;let o;for(const s of t.families){if(isGeneric(s))return o&&{kind:"fallback",...o,usedFamily:s};const a=r.filter(l=>l.family.toLowerCase()===s.toLowerCase());if(a.length===0){if(i(s))return o&&{kind:"fallback",...o,usedFamily:s};o??={family:s,failed:!1};continue}const c=a.filter(l=>m(l,e));if(c.length===0)continue;const f=c.filter(l=>l.status==="loaded");if(f.length===0){if(c.every(l=>l.status==="error")){o??={family:s,failed:!0};continue}return}if(o)return{kind:"fallback",...o,usedFamily:s};const u=matchWeight(t.weight,f.map(l=>l.weight)),d=Math.max(...f.map(l=>l.weight[1]));return t.weight>=BOLD&&d<BOLD?{kind:"bold",family:s,weight:t.weight,drawn:u??d,faked:t.synthBold}:t.italic&&!f.some(l=>l.slanted)?{kind:"italic",family:s,faked:t.synthItalic}:void 0}return o&&{kind:"fallback",...o,usedFamily:"the browser's default font"}}export function drawnFamilies(t,e,r,i){const n=[];for(const o of new Set(e)){let s="the browser's default font";for(const a of t.families){if(isGeneric(a)){s=a;break}const c=r.filter(f=>f.family.toLowerCase()===a.toLowerCase());if(c.length===0?i(a):c.some(f=>f.status==="loaded"&&m(f,[o]))){s=a;break}}n.includes(s)||n.push(s)}return n}export function fontIssueText(t){switch(t.kind){case"fallback":return t.failed?`the font "${t.family}" failed to load, so it is drawn in ${h(t.usedFamily)}. Check the @font-face url and that the file is in the workspace.`:`the font "${t.family}" is not loaded, so it is drawn in ${h(t.usedFamily)}. Import its stylesheet in the piece (import "@fontsource/<id>/400.css" after npm install @fontsource/<id>, or a .css of @font-face rules), or list it in allyhub.config.ts's fonts for every stage, or use a font the look has (var(--ak-font-display), var(--ak-font-body)).`;case"bold":return t.faked?`"${t.family}" has no face for weight ${String(t.weight)} (the loaded faces stop below ${String(BOLD)}), so Chrome fakes the bold by thickening weight ${String(t.drawn)}. Load a bold face of the font, or use a weight it has.`:`"${t.family}" has no face for weight ${String(t.weight)}, so it is drawn at weight ${String(t.drawn)}. Load a bold face of the font, or use a weight it has.`;case"italic":return t.faked?`"${t.family}" has no italic face, so Chrome fakes the italic by slanting the upright letters. Load an italic face of the font, or drop font-style: italic.`:`"${t.family}" has no italic face, so it is drawn upright. Load an italic face of the font, or drop font-style: italic.`}}const h=t=>isGeneric(t)?`the browser's ${t} font`:t.startsWith("the ")?t:`"${t}"`;export function stringsOf(t,e=2e3){const r=[],i=new Set,n=o=>{if(!(r.length>=e)){if(typeof o=="string")r.push(o);else if(typeof o=="object"&&o!==null&&!i.has(o)){i.add(o);for(const s of Array.isArray(o)?o:Object.values(o))n(s)}}};return n(t),r}export function emojiOf(t){const e=/\p{Extended_Pictographic}|\p{Regional_Indicator}|[\u{1F3FB}-\u{1F3FF}\u{E0020}-\u{E007F}]|\u200d|\ufe0f|\u20e3/gu,r=new Set;for(const i of t)for(const n of i.matchAll(e))r.add(n[0]);return[...r].join("")}const p=new Map;let g;export function pageFaces(){const t=[];return document.fonts.forEach(e=>{t.push({family:families(e.family)[0]??e.family,weight:weightRange(e.weight),slanted:e.style!=="normal",status:e.status,ranges:unicodeRanges(e.unicodeRange)})}),t}export function localFamily(t){const e=p.get(t);if(e!==void 0)return e;g??=document.createElement("canvas").getContext("2d");const r=g;if(!r)return!0;const i="mmmmmmmmmmlli10WQ@#ƌ",n=a=>(r.font=a,r.measureText(i).width),o=JSON.stringify(t),s=["monospace","serif","sans-serif"].some(a=>n(`40px ${o}, ${a}`)!==n(`40px ${a}`));return p.set(t,s),s}export function fontWant(t){const e=Number(t.fontWeight);return{families:families(t.fontFamily),weight:Number.isFinite(e)?e:400,italic:t.fontStyle!=="normal",synthBold:t.getPropertyValue("font-synthesis-weight")!=="none",synthItalic:t.getPropertyValue("font-synthesis-style")!=="none"}}export function codePoints(t){const e=new Set;for(const r of t)for(const i of r)e.add(i.codePointAt(0)??0);return e}export function coversAny(t,e){if(t.length===0)return!0;for(const r of e)if(t.some(([i,n])=>r>=i&&r<=n))return!0;return!1}export function namedFamilies(t){return families(t).filter(e=>!isGeneric(e)&&!e.startsWith("var(")).map(e=>e.toLowerCase())}export function styleSheetFamilies(){const t=new Set,e=r=>{for(const i of Array.from(r))if(i instanceof CSSStyleRule){const n=i.style.getPropertyValue("font-family");if(n)for(const o of namedFamilies(n))t.add(o)}else i instanceof CSSGroupingRule&&e(i.cssRules)};for(const r of Array.from(document.styleSheets))try{e(r.cssRules)}catch{}return t}export function propFamilies(t){const e=new Set;document.fonts.forEach(n=>{e.add((families(n.family)[0]??n.family).toLowerCase())});const r=t.map(n=>n.toLowerCase()),i=new Set;for(const n of e)n&&r.some(o=>o.includes(n))&&i.add(n);return i}export async function loadFaces(t,e){const r=[];document.fonts.forEach(i=>{if(i.status!=="unloaded")return;const n=(families(i.family)[0]??i.family).toLowerCase();t.has(n)&&coversAny(unicodeRanges(i.unicodeRange),e)&&r.push(i.load().catch(()=>{}))}),await Promise.all(r)}export async function loadTextFonts(t){const e=new Map,r=new Map,i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(let o=i.nextNode();o;o=i.nextNode()){const s=o.nodeValue??"",a=o.parentElement;if(!a||!s.trim())continue;let c=r.get(a);if(c===void 0){const u=getComputedStyle(a);c=`${u.fontStyle==="normal"?"":"italic "}${u.fontWeight} 40px ${u.fontFamily}`,r.set(a,c)}let f=e.get(c);f||(f=new Set,e.set(c,f));for(const u of s)u.trim()&&f.add(u)}const n=[...e].map(([o,s])=>[o,[...s].join("")]).filter(([o,s])=>!document.fonts.check(o,s));n.length!==0&&await Promise.all(n.map(([o,s])=>document.fonts.load(o,s).catch(()=>[])))}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{beatNear as X,fact as _,filmBeats as H,MUSIC_DEFAULTS as Y,musicGrid as Z,musicSeconds as J,onGrid as K,placeStretches as G,wholeLoop as x}from"@allyhub-next/video-core";const l=b=>Math.round(b*1e6)/1e6;export function musicClock(b,q){const{source:L,lang:O,ledger:P}=b,{options:k}=q,s=k.music===void 0?void 0:typeof k.music=="string"||"path"in k.music?{file:k.music}:k.music,T=s?.file===void 0?void 0:typeof s.file=="string"||"path"in s.file?s.file:O===void 0?void 0:s.file[O],c=T===void 0?void 0:b.mediaOf(T,q.musicBase),e=s??{},h=Math.max(0,e.from??0),w=c?.tempo,u=e.bpm!==void 0?{bpm:e.bpm,source:"given"}:w?{bpm:w.bpm,source:"measured",confidence:w.confidence,beat:w.beat}:void 0,U=()=>c&&c.sha256!==""?{file:c.path}:{},j=s!==void 0&&e.snap===!0&&!!u,$=j?60/u.bpm:0,Q=u?.beat??0,R=$>0?(Q-h)%$:0;s!==void 0&&e.snap===!0&&!u&&P.facts.push(_("fallback",{piece:L.piece},{...U(),missing:"tempo",for:"snap",fallback:"not-snapped"}));const t=Z(u,{meter:e.meter,downbeat:e.downbeat}),r=c?.duration,M=e.loop,V=[...e.play??[],...typeof M=="object"?[M]:[]],v=n=>{P.facts.push(_("fallback",{piece:L.piece},{...U(),missing:"tempo",for:n,fallback:n==="music-play"?"played-once":"film-end"}))};s!==void 0&&!t&&(V.some(n=>K(n.from)||K(n.to))&&v("music-play"),(e.end==="bar"||e.end==="beat")&&v("music-end"));const E=n=>{const a=J(n.from,t),d=J(n.to,t);return a===void 0||d===void 0?void 0:{from:a,to:d}},g=typeof M=="object"?E(M):void 0,z=e.play?.map(E),F=(z?.some(n=>n===void 0)??!1)||typeof M=="object"&&g===void 0,I=!F&&(z!==void 0||g!==void 0),C=n=>{if(!(r===void 0||r<=0)){if(F)return G([{from:h,to:r}],void 0,r,n);if(I){const a=z?.flatMap(d=>d?[d]:[])??(g?[{from:h,to:g.to}]:[]);return G(a,g,r,n)}return e.loop===!0?x(h,r,n,e.seam):G([{from:h,to:r}],void 0,r,n)}},W=n=>{if(s===void 0)return;const a=n.duration,d=(e.gain??[]).flatMap((o,y)=>{const f=n.momentAt(o.at,`music.gain[${String(y)}].at`);return f===void 0?[]:[{t:l(f),db:o.db}]}),A=e.filter!==void 0||e.eq!==void 0||e.compress!==void 0?{...e.filter===void 0?{}:{filter:e.filter},...e.eq===void 0?{}:{eq:e.eq.map((o,y)=>{const{keys:f,...S}=o,p=(f??[]).flatMap((B,D)=>{const N=n.momentAt(B.at,`music.eq[${String(y)}].keys[${String(D)}].at`);return N===void 0?[]:[{...B,at:l(N)}]});return p.length>0?{...S,keys:p}:S})},...e.compress===void 0?{}:{compress:e.compress}}:void 0,m=I?C(a):void 0;let i;if(t&&(e.end==="bar"||e.end==="beat")){const o=C(a),y=o?H(o,t,e.end):[],f=o?.at(-1);if(f&&!e.loop){const p=e.end==="bar"?t.beat*t.meter:t.beat,B=e.end==="bar"?t.downbeat:t.first,D=(f.to-B)/p;Math.abs(D-Math.round(D))<1e-6&&y.push(f.at+f.to-f.from)}const S=[...y].reverse().find(p=>p>1e-6&&p<=a+1e-6);S!==void 0&&(i=l(S))}return{...c&&c.sha256!==""?{file:c.path}:{},from:m?.[0]?.from??h,loop:e.loop===!0||g!==void 0,...u?{tempo:u}:{},snapped:j,...m?{play:m.map(o=>({at:l(o.at),from:l(o.from),to:l(o.to)})),seam:e.seam??Y.seam}:e.seam===void 0?{}:{seam:e.seam},...t?{meter:t.meter,downbeat:l(t.downbeat)}:{},...i===void 0?{}:{until:i},...d.length>0?{gain:d}:{},...A?{shape:A}:{}}};return{music:s,media:c,snapped:j,beat:$,beatPhase:R,grid:t,snapTo(n){if(!j||!t)return;const a=n.reduce((m,i)=>m+(i.speechDur!==void 0?i.lead+i.speechDur+i.tail:i.dur)+2*t.beat,0)+10,d=C(a);if(!d)return;const A=H(d,t);return(m,i)=>X(A,t.beat,m,i)},plan:n=>W(n)}}export const musicPlan=(b,q)=>b.plan(q);
2
+ import{beatNear as X,fact as _,filmBeats as H,MUSIC_DEFAULTS as Y,musicGrid as Z,musicSeconds as J,onGrid as K,placeStretches as G,wholeLoop as x}from"@allyhub-next/video-core";const l=b=>Math.round(b*1e6)/1e6;export function musicClock(b,q){const{source:L,lang:O,ledger:P}=b,{options:k}=q,s=k.music===void 0?void 0:typeof k.music=="string"||"path"in k.music?{file:k.music}:k.music,T=s?.file===void 0?void 0:typeof s.file=="string"||"path"in s.file?s.file:O===void 0?void 0:s.file[O],c=T===void 0?void 0:b.mediaOf(T,q.musicBase),e=s??{},h=Math.max(0,e.from??0),w=c?.tempo,u=e.bpm!==void 0?{bpm:e.bpm,source:"given"}:w?{bpm:w.bpm,source:"measured",confidence:w.confidence,beat:w.beat}:void 0,U=()=>c&&c.sha256!==""?{file:c.path}:{},j=s!==void 0&&e.snap===!0&&!!u,$=j?60/u.bpm:0,Q=u?.beat??0,R=$>0?(Q-h)%$:0;s!==void 0&&e.snap===!0&&!u&&P.facts.push(_("fallback",{piece:L.piece},{...U(),missing:"tempo",for:"snap",fallback:"not-snapped"}));const t=Z(u,{meter:e.meter,downbeat:e.downbeat}),r=c?.duration,M=e.loop,V=[...e.play??[],...typeof M=="object"?[M]:[]],v=n=>{P.facts.push(_("fallback",{piece:L.piece},{...U(),missing:"tempo",for:n,fallback:n==="music-play"?"played-once":"film-end"}))};s!==void 0&&!t&&(V.some(n=>K(n.from)||n.to!==void 0&&K(n.to))&&v("music-play"),(e.end==="bar"||e.end==="beat")&&v("music-end"));const E=n=>{const a=J(n.from,t),d=n.to===void 0?r:J(n.to,t);return a===void 0||d===void 0?void 0:{from:a,to:d}},g=typeof M=="object"?E(M):void 0,z=e.play?.map(E),F=(z?.some(n=>n===void 0)??!1)||typeof M=="object"&&g===void 0,I=!F&&(z!==void 0||g!==void 0),C=n=>{if(!(r===void 0||r<=0)){if(F)return G([{from:h,to:r}],void 0,r,n);if(I){const a=z?.flatMap(d=>d?[d]:[])??(g?[{from:h,to:g.to}]:[]);return G(a,g,r,n)}return e.loop===!0?x(h,r,n,e.seam):G([{from:h,to:r}],void 0,r,n)}},W=n=>{if(s===void 0)return;const a=n.duration,d=(e.gain??[]).flatMap((o,y)=>{const f=n.momentAt(o.at,`music.gain[${String(y)}].at`);return f===void 0?[]:[{t:l(f),db:o.db}]}),A=e.filter!==void 0||e.eq!==void 0||e.compress!==void 0?{...e.filter===void 0?{}:{filter:e.filter},...e.eq===void 0?{}:{eq:e.eq.map((o,y)=>{const{keys:f,...S}=o,p=(f??[]).flatMap((B,D)=>{const N=n.momentAt(B.at,`music.eq[${String(y)}].keys[${String(D)}].at`);return N===void 0?[]:[{...B,at:l(N)}]});return p.length>0?{...S,keys:p}:S})},...e.compress===void 0?{}:{compress:e.compress}}:void 0,m=I?C(a):void 0;let i;if(t&&(e.end==="bar"||e.end==="beat")){const o=C(a),y=o?H(o,t,e.end):[],f=o?.at(-1);if(f&&!e.loop){const p=e.end==="bar"?t.beat*t.meter:t.beat,B=e.end==="bar"?t.downbeat:t.first,D=(f.to-B)/p;Math.abs(D-Math.round(D))<1e-6&&y.push(f.at+f.to-f.from)}const S=[...y].reverse().find(p=>p>1e-6&&p<=a+1e-6);S!==void 0&&(i=l(S))}return{...c&&c.sha256!==""?{file:c.path}:{},from:m?.[0]?.from??h,loop:e.loop===!0||g!==void 0,...u?{tempo:u}:{},snapped:j,...m?{play:m.map(o=>({at:l(o.at),from:l(o.from),to:l(o.to)})),seam:e.seam??Y.seam}:e.seam===void 0?{}:{seam:e.seam},...t?{meter:t.meter,downbeat:l(t.downbeat)}:{},...i===void 0?{}:{until:i},...d.length>0?{gain:d}:{},...A?{shape:A}:{}}};return{music:s,media:c,snapped:j,beat:$,beatPhase:R,grid:t,snapTo(n){if(!j||!t)return;const a=n.reduce((m,i)=>m+(i.speechDur!==void 0?i.lead+i.speechDur+i.tail:i.dur)+2*t.beat,0)+10,d=C(a);if(!d)return;const A=H(d,t);return(m,i)=>X(A,t.beat,m,i)},plan:n=>W(n)}}export const musicPlan=(b,q)=>b.plan(q);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/runtime",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/runtimes",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {