allyhub 0.3.0 → 0.4.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 (643) hide show
  1. package/dist/commands/add.js +2 -2
  2. package/dist/commands/auth.js +4 -4
  3. package/dist/commands/cloud-tools.js +9 -10
  4. package/dist/commands/dev.js +1 -1
  5. package/dist/commands/doctor.js +4 -4
  6. package/dist/commands/frames/piece.js +1 -1
  7. package/dist/commands/frames.js +6 -6
  8. package/dist/commands/index.js +1 -1
  9. package/dist/commands/inspect/contrast.js +1 -1
  10. package/dist/commands/inspect/layout.js +1 -1
  11. package/dist/commands/orgs.js +2 -2
  12. package/dist/commands/render.js +2 -2
  13. package/dist/commands/sheet.js +2 -2
  14. package/dist/commands/slides.js +3 -0
  15. package/dist/main.js +3 -3
  16. package/dist/text/facts-text.js +5 -5
  17. package/dist/text/format.js +2 -2
  18. package/dist/works.js +1 -1
  19. package/editor-web/assets/browser-B31cR_c2.js +105 -0
  20. package/editor-web/assets/dist-6TNEuNMX.js +4 -0
  21. package/editor-web/assets/dist-Cm2TIjW5.js +2 -0
  22. package/editor-web/assets/dist-Cpt0p8bX.js +6 -0
  23. package/editor-web/assets/dist-D2GccKEJ.js +1 -0
  24. package/editor-web/assets/dist-Z0zvYXmu.js +233 -0
  25. package/editor-web/assets/dist-fs4ONrUV.js +32 -0
  26. package/editor-web/assets/index-CAcsAZ9u.js +70 -0
  27. package/editor-web/assets/index-DlcJckhO.css +2 -0
  28. package/editor-web/assets/list-D2v7U8K8.js +1 -0
  29. package/editor-web/assets/react-D0RmGe2w.js +101 -0
  30. package/editor-web/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  31. package/editor-web/assets/text-align-start-B3k2cx5f.js +1 -0
  32. package/editor-web/assets/undo-2-Ecr7-Obc.js +1 -0
  33. package/editor-web/index.html +4 -4
  34. package/node_modules/@allyhub-next/audio/package.json +1 -1
  35. package/node_modules/@allyhub-next/browser/package.json +1 -1
  36. package/node_modules/@allyhub-next/build/dist/data.js +1 -1
  37. package/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +10 -0
  38. package/node_modules/@allyhub-next/build/dist/meta-worker.js +2 -2
  39. package/node_modules/@allyhub-next/build/dist/model-info.js +2 -1
  40. package/node_modules/@allyhub-next/build/dist/plugin.d.ts +2 -0
  41. package/node_modules/@allyhub-next/build/dist/plugin.js +9 -8
  42. package/node_modules/@allyhub-next/build/dist/prepare.d.ts +13 -1
  43. package/node_modules/@allyhub-next/build/dist/prepare.js +2 -2
  44. package/node_modules/@allyhub-next/build/dist/scan.d.ts +1 -1
  45. package/node_modules/@allyhub-next/build/dist/scan.js +1 -1
  46. package/node_modules/@allyhub-next/build/dist/types.js +3 -3
  47. package/node_modules/@allyhub-next/build/package.json +1 -1
  48. package/node_modules/@allyhub-next/check/dist/check.js +3 -3
  49. package/node_modules/@allyhub-next/check/dist/generated.d.ts +1 -1
  50. package/node_modules/@allyhub-next/check/package.json +1 -1
  51. package/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
  52. package/node_modules/@allyhub-next/cloud/dist/signin.js +2 -2
  53. package/node_modules/@allyhub-next/cloud/dist/token.js +1 -1
  54. package/node_modules/@allyhub-next/cloud/package.json +1 -1
  55. package/node_modules/@allyhub-next/components/package.json +1 -1
  56. package/node_modules/@allyhub-next/dev-server/dist/card.d.ts +2 -11
  57. package/node_modules/@allyhub-next/dev-server/dist/card.js +1 -1
  58. package/node_modules/@allyhub-next/dev-server/dist/exports.d.ts +2 -2
  59. package/node_modules/@allyhub-next/dev-server/dist/exports.js +1 -1
  60. package/node_modules/@allyhub-next/dev-server/dist/index.d.ts +1 -1
  61. package/node_modules/@allyhub-next/dev-server/dist/index.js +1 -1
  62. package/node_modules/@allyhub-next/dev-server/dist/live.d.ts +3 -0
  63. package/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
  64. package/node_modules/@allyhub-next/dev-server/dist/project.d.ts +3 -0
  65. package/node_modules/@allyhub-next/dev-server/dist/project.js +1 -1
  66. package/node_modules/@allyhub-next/dev-server/dist/reveal.d.ts +6 -0
  67. package/node_modules/@allyhub-next/dev-server/dist/reveal.js +2 -0
  68. package/node_modules/@allyhub-next/dev-server/dist/server.js +1 -1
  69. package/node_modules/@allyhub-next/dev-server/dist/stage.d.ts +2 -0
  70. package/node_modules/@allyhub-next/dev-server/dist/stage.js +22 -2
  71. package/node_modules/@allyhub-next/dev-server/dist/tools.d.ts +2 -0
  72. package/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
  73. package/node_modules/@allyhub-next/dev-server/package.json +1 -1
  74. package/node_modules/@allyhub-next/doc/dist/docx.d.ts +28 -0
  75. package/node_modules/@allyhub-next/doc/dist/docx.js +4 -0
  76. package/node_modules/@allyhub-next/doc/dist/html.d.ts +3 -0
  77. package/node_modules/@allyhub-next/doc/dist/html.js +1 -1
  78. package/node_modules/@allyhub-next/doc/package.json +5 -1
  79. package/node_modules/@allyhub-next/export/dist/deck-fonts.d.ts +24 -0
  80. package/node_modules/@allyhub-next/export/dist/deck-fonts.js +2 -0
  81. package/node_modules/@allyhub-next/export/dist/deck-pptx.d.ts +12 -0
  82. package/node_modules/@allyhub-next/export/dist/deck-pptx.js +2 -0
  83. package/node_modules/@allyhub-next/export/dist/export.d.ts +12 -3
  84. package/node_modules/@allyhub-next/export/dist/export.js +2 -2
  85. package/node_modules/@allyhub-next/export/dist/index.d.ts +1 -0
  86. package/node_modules/@allyhub-next/export/dist/index.js +1 -1
  87. package/node_modules/@allyhub-next/export/dist/names.d.ts +11 -6
  88. package/node_modules/@allyhub-next/export/dist/names.js +1 -1
  89. package/node_modules/@allyhub-next/export/package.json +1 -1
  90. package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +22 -0
  91. package/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
  92. package/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1494 -0
  93. package/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
  94. package/node_modules/@allyhub-next/formats/dist/index.d.ts +2 -0
  95. package/node_modules/@allyhub-next/formats/dist/index.js +1 -1
  96. package/node_modules/@allyhub-next/formats/dist/items.d.ts +21 -0
  97. package/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  98. package/node_modules/@allyhub-next/formats/dist/note-shape.d.ts +39 -0
  99. package/node_modules/@allyhub-next/formats/dist/note-shape.js +2 -0
  100. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +418 -0
  101. package/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
  102. package/node_modules/@allyhub-next/formats/package.json +1 -1
  103. package/node_modules/@allyhub-next/measure/dist/index.d.ts +1 -1
  104. package/node_modules/@allyhub-next/measure/dist/index.js +1 -1
  105. package/node_modules/@allyhub-next/measure/dist/overlay.d.ts +14 -1
  106. package/node_modules/@allyhub-next/measure/dist/overlay.js +1 -1
  107. package/node_modules/@allyhub-next/measure/package.json +1 -1
  108. package/node_modules/@allyhub-next/media/dist/asr/parakeet.d.ts +1 -4
  109. package/node_modules/@allyhub-next/media/dist/asr/parakeet.js +4 -4
  110. package/node_modules/@allyhub-next/media/dist/asr/transcribe.d.ts +1 -1
  111. package/node_modules/@allyhub-next/media/dist/asr/transcribe.js +1 -1
  112. package/node_modules/@allyhub-next/media/dist/grid.d.ts +3 -3
  113. package/node_modules/@allyhub-next/media/dist/grid.js +5 -5
  114. package/node_modules/@allyhub-next/media/dist/local.d.ts +3 -0
  115. package/node_modules/@allyhub-next/media/dist/local.js +1 -1
  116. package/node_modules/@allyhub-next/media/dist/ocr/tesseract.d.ts +8 -2
  117. package/node_modules/@allyhub-next/media/dist/ocr/tesseract.js +1 -1
  118. package/node_modules/@allyhub-next/media/dist/ocr/text.js +3 -3
  119. package/node_modules/@allyhub-next/media/dist/ocr/worker.js +1 -1
  120. package/node_modules/@allyhub-next/media/dist/sheet.js +3 -3
  121. package/node_modules/@allyhub-next/media/dist/tools.d.ts +11 -1
  122. package/node_modules/@allyhub-next/media/dist/tools.js +1 -1
  123. package/node_modules/@allyhub-next/media/dist/vision/faces.js +1 -1
  124. package/node_modules/@allyhub-next/media/dist/vision/matte.js +1 -1
  125. package/node_modules/@allyhub-next/media/dist/vision/runtime.d.ts +1 -1
  126. package/node_modules/@allyhub-next/media/dist/vision/runtime.js +2 -2
  127. package/node_modules/@allyhub-next/media/dist/worker-process.d.ts +1 -1
  128. package/node_modules/@allyhub-next/media/dist/worker-process.js +1 -1
  129. package/node_modules/@allyhub-next/media/package.json +1 -1
  130. package/node_modules/@allyhub-next/model/dist/build-job.d.ts +2 -0
  131. package/node_modules/@allyhub-next/model/dist/build-worker.js +1 -1
  132. package/node_modules/@allyhub-next/model/dist/build.d.ts +10 -0
  133. package/node_modules/@allyhub-next/model/dist/build.js +2 -1
  134. package/node_modules/@allyhub-next/model/package.json +1 -1
  135. package/node_modules/@allyhub-next/project/dist/digest.d.ts +1 -3
  136. package/node_modules/@allyhub-next/project/dist/digest.js +1 -1
  137. package/node_modules/@allyhub-next/project/dist/page.d.ts +0 -5
  138. package/node_modules/@allyhub-next/project/dist/page.js +2 -2
  139. package/node_modules/@allyhub-next/project/dist/session.js +1 -1
  140. package/node_modules/@allyhub-next/project/package.json +1 -1
  141. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +0 -64
  142. package/node_modules/@allyhub-next/protocol/dist/app.js +1 -1
  143. package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +0 -17
  144. package/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  145. package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +0 -4
  146. package/node_modules/@allyhub-next/protocol/dist/cli.js +1 -1
  147. package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +9 -26
  148. package/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
  149. package/node_modules/@allyhub-next/protocol/dist/index.d.ts +1 -0
  150. package/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  151. package/node_modules/@allyhub-next/protocol/dist/notes.d.ts +163 -0
  152. package/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
  153. package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +1 -1
  154. package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +3 -0
  155. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +1 -1
  156. package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +37 -0
  157. package/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
  158. package/node_modules/@allyhub-next/protocol/package.json +1 -1
  159. package/node_modules/@allyhub-next/registry/dist/registry.js +1 -1
  160. package/node_modules/@allyhub-next/registry/package.json +1 -1
  161. package/node_modules/@allyhub-next/render/dist/doc/index.d.ts +1 -1
  162. package/node_modules/@allyhub-next/render/dist/doc/index.js +1 -1
  163. package/node_modules/@allyhub-next/render/dist/doc/print.d.ts +11 -0
  164. package/node_modules/@allyhub-next/render/dist/doc/print.js +17 -1
  165. package/node_modules/@allyhub-next/render/dist/exports.d.ts +29 -4
  166. package/node_modules/@allyhub-next/render/dist/exports.js +2 -2
  167. package/node_modules/@allyhub-next/render/dist/page.d.ts +11 -1
  168. package/node_modules/@allyhub-next/render/dist/render.d.ts +2 -0
  169. package/node_modules/@allyhub-next/render/dist/render.js +2 -2
  170. package/node_modules/@allyhub-next/render/package.json +1 -1
  171. package/node_modules/@allyhub-next/runtime/LICENSE +241 -0
  172. package/node_modules/@allyhub-next/runtime/dist/bridge.d.ts +13 -3
  173. package/node_modules/@allyhub-next/runtime/dist/clock.js +1 -1
  174. package/node_modules/@allyhub-next/runtime/dist/env.js +1 -1
  175. package/node_modules/@allyhub-next/runtime/dist/facade.js +1 -1
  176. package/node_modules/@allyhub-next/runtime/dist/footage.js +1 -1
  177. package/node_modules/@allyhub-next/runtime/dist/frame.js +1 -1
  178. package/node_modules/@allyhub-next/runtime/dist/index.d.ts +2 -0
  179. package/node_modules/@allyhub-next/runtime/dist/index.js +1 -1
  180. package/node_modules/@allyhub-next/runtime/dist/locate.d.ts +11 -0
  181. package/node_modules/@allyhub-next/runtime/dist/locate.js +2 -0
  182. package/node_modules/@allyhub-next/runtime/dist/measure.d.ts +2 -1
  183. package/node_modules/@allyhub-next/runtime/dist/measure.js +1 -1
  184. package/node_modules/@allyhub-next/runtime/dist/music.js +1 -1
  185. package/node_modules/@allyhub-next/runtime/dist/output.js +1 -1
  186. package/node_modules/@allyhub-next/runtime/dist/piece.d.ts +5 -9
  187. package/node_modules/@allyhub-next/runtime/dist/piece.js +2 -2
  188. package/node_modules/@allyhub-next/runtime/dist/player/player.js +1 -1
  189. package/node_modules/@allyhub-next/runtime/dist/reads.d.ts +2 -0
  190. package/node_modules/@allyhub-next/runtime/dist/reads.js +1 -1
  191. package/node_modules/@allyhub-next/runtime/dist/sound.js +1 -1
  192. package/node_modules/@allyhub-next/runtime/dist/stage-kit.d.ts +12 -0
  193. package/node_modules/@allyhub-next/runtime/dist/stage-kit.js +2 -0
  194. package/node_modules/@allyhub-next/runtime/package.json +5 -6
  195. package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +5 -1
  196. package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +1 -0
  197. package/node_modules/@allyhub-next/runtimes/dist/index.js +1 -1
  198. package/node_modules/@allyhub-next/runtimes/dist/node-program.d.ts +3 -0
  199. package/node_modules/@allyhub-next/runtimes/dist/node-program.js +2 -0
  200. package/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +65 -0
  201. package/node_modules/@allyhub-next/runtimes/dist/packages.js +4 -0
  202. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +2 -2
  203. package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  204. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +1 -1
  205. package/node_modules/@allyhub-next/runtimes/package.json +5 -1
  206. package/node_modules/@allyhub-next/runtimes/pins/docx/package-lock.json +67 -0
  207. package/node_modules/@allyhub-next/runtimes/pins/docx/package.json +9 -0
  208. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package-lock.json +2533 -0
  209. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package.json +8 -0
  210. package/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +753 -0
  211. package/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package.json +14 -0
  212. package/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +950 -0
  213. package/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package.json +8 -0
  214. package/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +227 -0
  215. package/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +8 -0
  216. package/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +105 -0
  217. package/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +8 -0
  218. package/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +128 -0
  219. package/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package.json +9 -0
  220. package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +5 -24
  221. package/node_modules/@allyhub-next/scaffold/dist/index.js +3 -3
  222. package/node_modules/@allyhub-next/scaffold/package.json +1 -1
  223. package/node_modules/@allyhub-next/scenery/package.json +1 -1
  224. package/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +2 -2
  225. package/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
  226. package/node_modules/@allyhub-next/scenery-host/dist/viewer.d.ts +11 -0
  227. package/node_modules/@allyhub-next/scenery-host/dist/viewer.js +1 -1
  228. package/node_modules/@allyhub-next/scenery-host/package.json +1 -1
  229. package/node_modules/@allyhub-next/sheet/package.json +1 -1
  230. package/node_modules/@allyhub-next/site/dist/media.js +2 -2
  231. package/node_modules/@allyhub-next/site/package.json +1 -1
  232. package/node_modules/@allyhub-next/slides-core/LICENSE +241 -0
  233. package/node_modules/@allyhub-next/slides-core/dist/animation.d.ts +129 -0
  234. package/node_modules/@allyhub-next/slides-core/dist/animation.js +2 -0
  235. package/node_modules/@allyhub-next/slides-core/dist/api.d.ts +649 -0
  236. package/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
  237. package/node_modules/@allyhub-next/slides-core/dist/capabilities.d.ts +18 -0
  238. package/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
  239. package/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +165 -0
  240. package/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
  241. package/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +11 -0
  242. package/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
  243. package/node_modules/@allyhub-next/slides-core/dist/chart.d.ts +184 -0
  244. package/node_modules/@allyhub-next/slides-core/dist/chart.js +2 -0
  245. package/node_modules/@allyhub-next/slides-core/dist/check.d.ts +7 -0
  246. package/node_modules/@allyhub-next/slides-core/dist/check.js +2 -0
  247. package/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +146 -0
  248. package/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
  249. package/node_modules/@allyhub-next/slides-core/dist/file.d.ts +109 -0
  250. package/node_modules/@allyhub-next/slides-core/dist/file.js +4 -0
  251. package/node_modules/@allyhub-next/slides-core/dist/index.d.ts +21 -0
  252. package/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
  253. package/node_modules/@allyhub-next/slides-core/dist/measure.d.ts +34 -0
  254. package/node_modules/@allyhub-next/slides-core/dist/measure.js +2 -0
  255. package/node_modules/@allyhub-next/slides-core/dist/model.d.ts +278 -0
  256. package/node_modules/@allyhub-next/slides-core/dist/model.js +2 -0
  257. package/node_modules/@allyhub-next/slides-core/dist/office.d.ts +58 -0
  258. package/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
  259. package/node_modules/@allyhub-next/slides-core/dist/path.d.ts +6 -0
  260. package/node_modules/@allyhub-next/slides-core/dist/path.js +2 -0
  261. package/node_modules/@allyhub-next/slides-core/dist/placeholders.d.ts +7 -0
  262. package/node_modules/@allyhub-next/slides-core/dist/placeholders.js +2 -0
  263. package/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +181 -0
  264. package/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
  265. package/node_modules/@allyhub-next/slides-core/dist/script.d.ts +43 -0
  266. package/node_modules/@allyhub-next/slides-core/dist/script.js +3 -0
  267. package/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +63 -0
  268. package/node_modules/@allyhub-next/slides-core/dist/stage.js +2 -0
  269. package/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +23 -0
  270. package/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
  271. package/node_modules/@allyhub-next/slides-core/dist/theme.d.ts +72 -0
  272. package/node_modules/@allyhub-next/slides-core/dist/theme.js +2 -0
  273. package/node_modules/@allyhub-next/slides-core/dist/units.d.ts +35 -0
  274. package/node_modules/@allyhub-next/slides-core/dist/units.js +2 -0
  275. package/node_modules/@allyhub-next/slides-core/package.json +14 -0
  276. package/node_modules/@allyhub-next/slides-pptx/LICENSE +241 -0
  277. package/node_modules/@allyhub-next/slides-pptx/dist/charts.d.ts +6 -0
  278. package/node_modules/@allyhub-next/slides-pptx/dist/charts.js +2 -0
  279. package/node_modules/@allyhub-next/slides-pptx/dist/fonts.d.ts +45 -0
  280. package/node_modules/@allyhub-next/slides-pptx/dist/fonts.js +2 -0
  281. package/node_modules/@allyhub-next/slides-pptx/dist/import.d.ts +18 -0
  282. package/node_modules/@allyhub-next/slides-pptx/dist/import.js +3 -0
  283. package/node_modules/@allyhub-next/slides-pptx/dist/index.d.ts +5 -0
  284. package/node_modules/@allyhub-next/slides-pptx/dist/index.js +2 -0
  285. package/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +55 -0
  286. package/node_modules/@allyhub-next/slides-pptx/dist/read.js +4 -0
  287. package/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +67 -0
  288. package/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +2 -0
  289. package/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +21 -0
  290. package/node_modules/@allyhub-next/slides-pptx/dist/text.js +2 -0
  291. package/node_modules/@allyhub-next/slides-pptx/dist/theme.d.ts +4 -0
  292. package/node_modules/@allyhub-next/slides-pptx/dist/theme.js +2 -0
  293. package/node_modules/@allyhub-next/slides-pptx/dist/timing.d.ts +32 -0
  294. package/node_modules/@allyhub-next/slides-pptx/dist/timing.js +2 -0
  295. package/node_modules/@allyhub-next/slides-pptx/dist/write.d.ts +32 -0
  296. package/node_modules/@allyhub-next/slides-pptx/dist/write.js +3 -0
  297. package/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +26 -0
  298. package/node_modules/@allyhub-next/slides-pptx/dist/xml.js +3 -0
  299. package/node_modules/@allyhub-next/slides-pptx/package.json +14 -0
  300. package/node_modules/@allyhub-next/slides-runtime/LICENSE +241 -0
  301. package/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +40 -0
  302. package/node_modules/@allyhub-next/slides-runtime/dist/draw.js +3 -0
  303. package/node_modules/@allyhub-next/slides-runtime/dist/edit.d.ts +4 -0
  304. package/node_modules/@allyhub-next/slides-runtime/dist/edit.js +2 -0
  305. package/node_modules/@allyhub-next/slides-runtime/dist/index.d.ts +4 -0
  306. package/node_modules/@allyhub-next/slides-runtime/dist/index.js +2 -0
  307. package/node_modules/@allyhub-next/slides-runtime/dist/ink.d.ts +10 -0
  308. package/node_modules/@allyhub-next/slides-runtime/dist/ink.js +2 -0
  309. package/node_modules/@allyhub-next/slides-runtime/dist/load.d.ts +6 -0
  310. package/node_modules/@allyhub-next/slides-runtime/dist/load.js +6 -0
  311. package/node_modules/@allyhub-next/slides-runtime/package.json +14 -0
  312. package/node_modules/@allyhub-next/stage/dist/graphics.js +1 -1
  313. package/node_modules/@allyhub-next/stage/dist/identity.js +1 -1
  314. package/node_modules/@allyhub-next/stage/dist/page.d.ts +9 -0
  315. package/node_modules/@allyhub-next/stage/dist/page.js +12 -2
  316. package/node_modules/@allyhub-next/stage/dist/server.js +1 -1
  317. package/node_modules/@allyhub-next/stage/package.json +1 -1
  318. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/400-italic.css +79 -0
  319. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/400.css +79 -0
  320. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/700-italic.css +79 -0
  321. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/700.css +79 -0
  322. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/LICENSE +93 -0
  323. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/arial.css +316 -0
  324. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-400-italic.woff2 +0 -0
  325. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-400-normal.woff2 +0 -0
  326. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-700-italic.woff2 +0 -0
  327. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-700-normal.woff2 +0 -0
  328. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-400-italic.woff2 +0 -0
  329. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-400-normal.woff2 +0 -0
  330. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-700-italic.woff2 +0 -0
  331. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-cyrillic-ext-700-normal.woff2 +0 -0
  332. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-400-italic.woff2 +0 -0
  333. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-400-normal.woff2 +0 -0
  334. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-700-italic.woff2 +0 -0
  335. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-700-normal.woff2 +0 -0
  336. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-400-italic.woff2 +0 -0
  337. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-400-normal.woff2 +0 -0
  338. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-700-italic.woff2 +0 -0
  339. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-greek-ext-700-normal.woff2 +0 -0
  340. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-400-italic.woff2 +0 -0
  341. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-400-normal.woff2 +0 -0
  342. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-700-italic.woff2 +0 -0
  343. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-hebrew-700-normal.woff2 +0 -0
  344. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-400-italic.woff2 +0 -0
  345. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-400-normal.woff2 +0 -0
  346. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-700-italic.woff2 +0 -0
  347. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-700-normal.woff2 +0 -0
  348. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-400-italic.woff2 +0 -0
  349. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-400-normal.woff2 +0 -0
  350. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-700-italic.woff2 +0 -0
  351. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-latin-ext-700-normal.woff2 +0 -0
  352. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-400-italic.woff2 +0 -0
  353. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-400-normal.woff2 +0 -0
  354. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-700-italic.woff2 +0 -0
  355. package/node_modules/@allyhub-next/stage-page/dist/fonts/arimo/files/arimo-vietnamese-700-normal.woff2 +0 -0
  356. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/400-italic.css +69 -0
  357. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/400.css +69 -0
  358. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/700-italic.css +69 -0
  359. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/700.css +69 -0
  360. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/LICENSE +93 -0
  361. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/calibri.css +276 -0
  362. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-400-italic.woff2 +0 -0
  363. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-400-normal.woff2 +0 -0
  364. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-700-italic.woff2 +0 -0
  365. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-700-normal.woff2 +0 -0
  366. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-400-italic.woff2 +0 -0
  367. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-400-normal.woff2 +0 -0
  368. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-700-italic.woff2 +0 -0
  369. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-cyrillic-ext-700-normal.woff2 +0 -0
  370. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-400-italic.woff2 +0 -0
  371. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-400-normal.woff2 +0 -0
  372. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-700-italic.woff2 +0 -0
  373. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-700-normal.woff2 +0 -0
  374. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-400-italic.woff2 +0 -0
  375. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-400-normal.woff2 +0 -0
  376. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-700-italic.woff2 +0 -0
  377. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-greek-ext-700-normal.woff2 +0 -0
  378. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-400-italic.woff2 +0 -0
  379. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-400-normal.woff2 +0 -0
  380. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-700-italic.woff2 +0 -0
  381. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-700-normal.woff2 +0 -0
  382. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-400-italic.woff2 +0 -0
  383. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-400-normal.woff2 +0 -0
  384. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-700-italic.woff2 +0 -0
  385. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-latin-ext-700-normal.woff2 +0 -0
  386. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-400-italic.woff2 +0 -0
  387. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-400-normal.woff2 +0 -0
  388. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-700-italic.woff2 +0 -0
  389. package/node_modules/@allyhub-next/stage-page/dist/fonts/carlito/files/carlito-vietnamese-700-normal.woff2 +0 -0
  390. package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/400.css +1 -1
  391. package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/700.css +1 -1
  392. package/node_modules/@allyhub-next/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +2018 -0
  393. package/node_modules/@allyhub-next/stage-page/dist/host.js +21 -0
  394. package/node_modules/@allyhub-next/stage-page/dist/page.js +79 -0
  395. package/node_modules/@allyhub-next/stage-page/package.json +14 -0
  396. package/node_modules/@allyhub-next/video-core/dist/export.d.ts +6 -5
  397. package/node_modules/@allyhub-next/video-core/dist/export.js +1 -1
  398. package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +173 -4
  399. package/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
  400. package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +6 -13
  401. package/node_modules/@allyhub-next/video-core/dist/formats.js +1 -1
  402. package/node_modules/@allyhub-next/video-core/dist/index.d.ts +0 -1
  403. package/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
  404. package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +83 -0
  405. package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +8 -9
  406. package/node_modules/@allyhub-next/video-core/dist/piece.js +1 -1
  407. package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +5 -1
  408. package/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  409. package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +0 -2
  410. package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +4 -0
  411. package/node_modules/@allyhub-next/video-core/dist/script.d.ts +8 -0
  412. package/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
  413. package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +34 -1
  414. package/node_modules/@allyhub-next/video-core/package.json +1 -1
  415. package/package.json +48 -41
  416. package/dist/commands/mcp-app.js +0 -3
  417. package/dist/commands/mcp-docs.js +0 -2
  418. package/dist/commands/mcp.js +0 -2
  419. package/editor-app/view.html +0 -128
  420. package/editor-web/assets/chevron-left-W6sP7nB1.js +0 -1
  421. package/editor-web/assets/chevron-up-566GQpAm.js +0 -1
  422. package/editor-web/assets/dist-BKDr73BR.js +0 -136
  423. package/editor-web/assets/dist-CPCNTYVu.js +0 -8
  424. package/editor-web/assets/dist-C_NajYp0.js +0 -1
  425. package/editor-web/assets/dist-mA6NrAKh.js +0 -232
  426. package/editor-web/assets/floating-ui.react-dom-BUxFRF6t.js +0 -1
  427. package/editor-web/assets/index-CFZhjTQW.js +0 -56
  428. package/editor-web/assets/index-DgU-lyX6.css +0 -2
  429. package/editor-web/assets/react-Ff_buMj8.js +0 -61
  430. package/editor-web/assets/undo-2-BKFItM3X.js +0 -1
  431. package/node_modules/@allyhub-next/runtime/dist/host.js +0 -21
  432. package/node_modules/@allyhub-next/runtime/dist/page.js +0 -72
  433. package/node_modules/@allyhub-next/runtime/dist/paged.d.ts +0 -16
  434. package/node_modules/@allyhub-next/runtime/dist/paged.js +0 -2
  435. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +0 -37
  436. package/node_modules/@allyhub-next/video-core/dist/slides.js +0 -2
  437. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-color-emoji/LICENSE +0 -0
  438. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-color-emoji/emoji.css +0 -0
  439. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-color-emoji/files/noto-color-emoji-emoji-400-normal.woff2 +0 -0
  440. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/LICENSE +0 -0
  441. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-100-400-normal.woff2 +0 -0
  442. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-100-700-normal.woff2 +0 -0
  443. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-101-400-normal.woff2 +0 -0
  444. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-101-700-normal.woff2 +0 -0
  445. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-102-400-normal.woff2 +0 -0
  446. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-102-700-normal.woff2 +0 -0
  447. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-103-400-normal.woff2 +0 -0
  448. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-103-700-normal.woff2 +0 -0
  449. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-104-400-normal.woff2 +0 -0
  450. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-104-700-normal.woff2 +0 -0
  451. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-105-400-normal.woff2 +0 -0
  452. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-105-700-normal.woff2 +0 -0
  453. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-106-400-normal.woff2 +0 -0
  454. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-106-700-normal.woff2 +0 -0
  455. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-107-400-normal.woff2 +0 -0
  456. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-107-700-normal.woff2 +0 -0
  457. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-108-400-normal.woff2 +0 -0
  458. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-108-700-normal.woff2 +0 -0
  459. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-109-400-normal.woff2 +0 -0
  460. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-109-700-normal.woff2 +0 -0
  461. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-110-400-normal.woff2 +0 -0
  462. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-110-700-normal.woff2 +0 -0
  463. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-111-400-normal.woff2 +0 -0
  464. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-111-700-normal.woff2 +0 -0
  465. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-112-400-normal.woff2 +0 -0
  466. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-112-700-normal.woff2 +0 -0
  467. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-113-400-normal.woff2 +0 -0
  468. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-113-700-normal.woff2 +0 -0
  469. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-114-400-normal.woff2 +0 -0
  470. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-114-700-normal.woff2 +0 -0
  471. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-115-400-normal.woff2 +0 -0
  472. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-115-700-normal.woff2 +0 -0
  473. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-116-400-normal.woff2 +0 -0
  474. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-116-700-normal.woff2 +0 -0
  475. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-117-400-normal.woff2 +0 -0
  476. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-117-700-normal.woff2 +0 -0
  477. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-118-400-normal.woff2 +0 -0
  478. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-118-700-normal.woff2 +0 -0
  479. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-119-400-normal.woff2 +0 -0
  480. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-119-700-normal.woff2 +0 -0
  481. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-21-400-normal.woff2 +0 -0
  482. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-21-700-normal.woff2 +0 -0
  483. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-22-400-normal.woff2 +0 -0
  484. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-22-700-normal.woff2 +0 -0
  485. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-23-400-normal.woff2 +0 -0
  486. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-23-700-normal.woff2 +0 -0
  487. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-24-400-normal.woff2 +0 -0
  488. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-24-700-normal.woff2 +0 -0
  489. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-25-400-normal.woff2 +0 -0
  490. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-25-700-normal.woff2 +0 -0
  491. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-26-400-normal.woff2 +0 -0
  492. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-26-700-normal.woff2 +0 -0
  493. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-27-400-normal.woff2 +0 -0
  494. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-27-700-normal.woff2 +0 -0
  495. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-28-400-normal.woff2 +0 -0
  496. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-28-700-normal.woff2 +0 -0
  497. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-29-400-normal.woff2 +0 -0
  498. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-29-700-normal.woff2 +0 -0
  499. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-30-400-normal.woff2 +0 -0
  500. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-30-700-normal.woff2 +0 -0
  501. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-31-400-normal.woff2 +0 -0
  502. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-31-700-normal.woff2 +0 -0
  503. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-32-400-normal.woff2 +0 -0
  504. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-32-700-normal.woff2 +0 -0
  505. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-33-400-normal.woff2 +0 -0
  506. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-33-700-normal.woff2 +0 -0
  507. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-34-400-normal.woff2 +0 -0
  508. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-34-700-normal.woff2 +0 -0
  509. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-35-400-normal.woff2 +0 -0
  510. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-35-700-normal.woff2 +0 -0
  511. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-36-400-normal.woff2 +0 -0
  512. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-36-700-normal.woff2 +0 -0
  513. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-37-400-normal.woff2 +0 -0
  514. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-37-700-normal.woff2 +0 -0
  515. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-38-400-normal.woff2 +0 -0
  516. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-38-700-normal.woff2 +0 -0
  517. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-39-400-normal.woff2 +0 -0
  518. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-39-700-normal.woff2 +0 -0
  519. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-4-400-normal.woff2 +0 -0
  520. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-4-700-normal.woff2 +0 -0
  521. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-40-400-normal.woff2 +0 -0
  522. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-40-700-normal.woff2 +0 -0
  523. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-41-400-normal.woff2 +0 -0
  524. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-41-700-normal.woff2 +0 -0
  525. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-42-400-normal.woff2 +0 -0
  526. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-42-700-normal.woff2 +0 -0
  527. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-43-400-normal.woff2 +0 -0
  528. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-43-700-normal.woff2 +0 -0
  529. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-44-400-normal.woff2 +0 -0
  530. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-44-700-normal.woff2 +0 -0
  531. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-45-400-normal.woff2 +0 -0
  532. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-45-700-normal.woff2 +0 -0
  533. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-46-400-normal.woff2 +0 -0
  534. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-46-700-normal.woff2 +0 -0
  535. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-47-400-normal.woff2 +0 -0
  536. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-47-700-normal.woff2 +0 -0
  537. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-48-400-normal.woff2 +0 -0
  538. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-48-700-normal.woff2 +0 -0
  539. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-49-400-normal.woff2 +0 -0
  540. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-49-700-normal.woff2 +0 -0
  541. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-5-400-normal.woff2 +0 -0
  542. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-5-700-normal.woff2 +0 -0
  543. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-50-400-normal.woff2 +0 -0
  544. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-50-700-normal.woff2 +0 -0
  545. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-51-400-normal.woff2 +0 -0
  546. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-51-700-normal.woff2 +0 -0
  547. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-52-400-normal.woff2 +0 -0
  548. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-52-700-normal.woff2 +0 -0
  549. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-53-400-normal.woff2 +0 -0
  550. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-53-700-normal.woff2 +0 -0
  551. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-54-400-normal.woff2 +0 -0
  552. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-54-700-normal.woff2 +0 -0
  553. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-55-400-normal.woff2 +0 -0
  554. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-55-700-normal.woff2 +0 -0
  555. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-56-400-normal.woff2 +0 -0
  556. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-56-700-normal.woff2 +0 -0
  557. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-57-400-normal.woff2 +0 -0
  558. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-57-700-normal.woff2 +0 -0
  559. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-58-400-normal.woff2 +0 -0
  560. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-58-700-normal.woff2 +0 -0
  561. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-59-400-normal.woff2 +0 -0
  562. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-59-700-normal.woff2 +0 -0
  563. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-6-400-normal.woff2 +0 -0
  564. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-6-700-normal.woff2 +0 -0
  565. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-60-400-normal.woff2 +0 -0
  566. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-60-700-normal.woff2 +0 -0
  567. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-61-400-normal.woff2 +0 -0
  568. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-61-700-normal.woff2 +0 -0
  569. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-62-400-normal.woff2 +0 -0
  570. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-62-700-normal.woff2 +0 -0
  571. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-63-400-normal.woff2 +0 -0
  572. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-63-700-normal.woff2 +0 -0
  573. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-64-400-normal.woff2 +0 -0
  574. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-64-700-normal.woff2 +0 -0
  575. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-65-400-normal.woff2 +0 -0
  576. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-65-700-normal.woff2 +0 -0
  577. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-66-400-normal.woff2 +0 -0
  578. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-66-700-normal.woff2 +0 -0
  579. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-67-400-normal.woff2 +0 -0
  580. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-67-700-normal.woff2 +0 -0
  581. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-68-400-normal.woff2 +0 -0
  582. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-68-700-normal.woff2 +0 -0
  583. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-69-400-normal.woff2 +0 -0
  584. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-69-700-normal.woff2 +0 -0
  585. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-70-400-normal.woff2 +0 -0
  586. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-70-700-normal.woff2 +0 -0
  587. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-71-400-normal.woff2 +0 -0
  588. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-71-700-normal.woff2 +0 -0
  589. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-72-400-normal.woff2 +0 -0
  590. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-72-700-normal.woff2 +0 -0
  591. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-73-400-normal.woff2 +0 -0
  592. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-73-700-normal.woff2 +0 -0
  593. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-74-400-normal.woff2 +0 -0
  594. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-74-700-normal.woff2 +0 -0
  595. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-75-400-normal.woff2 +0 -0
  596. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-75-700-normal.woff2 +0 -0
  597. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-76-400-normal.woff2 +0 -0
  598. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-76-700-normal.woff2 +0 -0
  599. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-77-400-normal.woff2 +0 -0
  600. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-77-700-normal.woff2 +0 -0
  601. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-78-400-normal.woff2 +0 -0
  602. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-78-700-normal.woff2 +0 -0
  603. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-79-400-normal.woff2 +0 -0
  604. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-79-700-normal.woff2 +0 -0
  605. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-80-400-normal.woff2 +0 -0
  606. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-80-700-normal.woff2 +0 -0
  607. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-81-400-normal.woff2 +0 -0
  608. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-81-700-normal.woff2 +0 -0
  609. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-82-400-normal.woff2 +0 -0
  610. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-82-700-normal.woff2 +0 -0
  611. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-83-400-normal.woff2 +0 -0
  612. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-83-700-normal.woff2 +0 -0
  613. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-84-400-normal.woff2 +0 -0
  614. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-84-700-normal.woff2 +0 -0
  615. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-85-400-normal.woff2 +0 -0
  616. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-85-700-normal.woff2 +0 -0
  617. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-86-400-normal.woff2 +0 -0
  618. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-86-700-normal.woff2 +0 -0
  619. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-87-400-normal.woff2 +0 -0
  620. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-87-700-normal.woff2 +0 -0
  621. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-88-400-normal.woff2 +0 -0
  622. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-88-700-normal.woff2 +0 -0
  623. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-89-400-normal.woff2 +0 -0
  624. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-89-700-normal.woff2 +0 -0
  625. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-90-400-normal.woff2 +0 -0
  626. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-90-700-normal.woff2 +0 -0
  627. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-91-400-normal.woff2 +0 -0
  628. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-91-700-normal.woff2 +0 -0
  629. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-97-400-normal.woff2 +0 -0
  630. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-97-700-normal.woff2 +0 -0
  631. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-98-400-normal.woff2 +0 -0
  632. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-98-700-normal.woff2 +0 -0
  633. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-99-400-normal.woff2 +0 -0
  634. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-99-700-normal.woff2 +0 -0
  635. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-cyrillic-400-normal.woff2 +0 -0
  636. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-cyrillic-700-normal.woff2 +0 -0
  637. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-400-normal.woff2 +0 -0
  638. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-700-normal.woff2 +0 -0
  639. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-ext-400-normal.woff2 +0 -0
  640. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-latin-ext-700-normal.woff2 +0 -0
  641. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-vietnamese-400-normal.woff2 +0 -0
  642. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/fonts/noto-sans-sc/files/noto-sans-sc-vietnamese-700-normal.woff2 +0 -0
  643. /package/node_modules/@allyhub-next/{runtime → stage-page}/dist/host.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import type { Card, CardItem, Preview } from "@allyhub-next/protocol";
1
+ import type { CardItem, Preview } from "@allyhub-next/protocol";
2
2
  import type { DevServer } from "./server.js";
3
3
  /** How much of a doc or a sheet a card shows. */
4
4
  export declare const CARD_DEFAULTS: {
@@ -12,15 +12,6 @@ export declare const CARD_DEFAULTS: {
12
12
  };
13
13
  /** The project's name for people: its folder's. */
14
14
  export declare const projectName: (root: string) => string;
15
- /** What a card, or a gallery's tile, shows of an item: a video's still, a doc's first paragraphs, a sheet's first rows. */
15
+ /** What a card, or a gallery's tile, shows of an item: a video's still, a deck's first page, a doc's first paragraphs, a sheet's first rows. */
16
16
  export declare function itemPreview(dev: DevServer, item: CardItem): Promise<Preview | undefined>;
17
- /**
18
- * The card for a project path (an item's folder or entry file), or the project's items with none; `missing` when the
19
- * path is in no item, `failed` when a preview could not be made.
20
- */
21
- export declare function cardOf(dev: DevServer, path: string | undefined): Promise<{
22
- card: Card;
23
- missing?: string;
24
- failed?: string;
25
- }>;
26
17
  //# sourceMappingURL=card.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as l}from"node:fs/promises";import{basename as d,join as m}from"node:path";import{listFiles as f}from"@allyhub-next/build";import{parseDoc as p,splitTitle as w}from"@allyhub-next/doc";import{itemFor as h,scanItems as y}from"@allyhub-next/formats";import{readSheet as g}from"@allyhub-next/sheet";export const CARD_DEFAULTS={lines:4,chars:240,rows:5,columns:6},projectName=t=>d(t);function j(t){if(!("content"in t)||!Array.isArray(t.content))return;const r=t.content.map(e=>e.text).join("").trim();return r===""?void 0:r}const x=(t,r)=>t.length<=r?t:`${t.slice(0,r-1).trimEnd()}…`;function S(t){const{body:r}=w(p(t).blocks),e=[];for(const n of r){const c=j(n);if(c!==void 0&&e.push(x(c,CARD_DEFAULTS.chars)),e.length===CARD_DEFAULTS.lines)break}return{type:"text",lines:e}}function b(t){const{data:r}=g(t);return{type:"table",columns:r.columns.slice(0,CARD_DEFAULTS.columns),rows:r.rows.slice(0,CARD_DEFAULTS.rows).map(e=>e.slice(0,CARD_DEFAULTS.columns)),count:r.rows.length}}export async function itemPreview(t,r){const e=t.project.root;switch(r.kind){case"doc":return S(await l(m(e,r.entry),"utf8"));case"sheet":return b(await l(m(e,r.entry),"utf8"));case"video":{const n=await t.project.tool("video/still",{item:r.dir});return{type:"picture",image:n.image,width:n.width,height:n.height,duration:n.duration}}default:return}}export async function cardOf(t,r){const e={name:projectName(t.project.root)},{items:n}=await t.project.tool("project/items",{});if(r===void 0)return{card:{project:e,url:t.url,items:n}};const{items:c}=y(await f(t.project.root)),a=r.replace(/^\.\//u,"").replace(/\/+$/u,""),i=h(a,c);if(!i)return{card:{project:e,url:t.url,items:n},missing:a};const s=n.find(o=>o.dir===i.dir)??{kind:i.kind,dir:i.dir,entry:i.entry},u=`${t.url}?${new URLSearchParams({item:s.dir}).toString()}`;try{const o=await itemPreview(t,s);return{card:{project:e,url:u,item:s,...o?{preview:o}:{}}}}catch(o){return{card:{project:e,url:u,item:s},failed:o instanceof Error?o.message:String(o)}}}
2
+ import{readFile as n}from"node:fs/promises";import{basename as c,join as s}from"node:path";import{parseDoc as a,splitTitle as u}from"@allyhub-next/doc";import{readSheet as l}from"@allyhub-next/sheet";export const CARD_DEFAULTS={lines:4,chars:240,rows:5,columns:6},projectName=t=>c(t);function d(t){if(!("content"in t)||!Array.isArray(t.content))return;const e=t.content.map(o=>o.text).join("").trim();return e===""?void 0:e}const h=(t,e)=>t.length<=e?t:`${t.slice(0,e-1).trimEnd()}…`;function m(t){const{body:e}=u(a(t).blocks),o=[];for(const r of e){const i=d(r);if(i!==void 0&&o.push(h(i,CARD_DEFAULTS.chars)),o.length===CARD_DEFAULTS.lines)break}return{type:"text",lines:o}}function p(t){const{data:e}=l(t);return{type:"table",columns:e.columns.slice(0,CARD_DEFAULTS.columns),rows:e.rows.slice(0,CARD_DEFAULTS.rows).map(o=>o.slice(0,CARD_DEFAULTS.columns)),count:e.rows.length}}export async function itemPreview(t,e){const o=t.project.root;switch(e.kind){case"doc":return m(await n(s(o,e.entry),"utf8"));case"sheet":return p(await n(s(o,e.entry),"utf8"));case"video":{const r=await t.project.tool("video/still",{item:e.dir});return{type:"picture",image:r.image,width:r.width,height:r.height,duration:r.duration}}case"slides":{const r=await t.project.tool("video/still",{item:e.dir});return{type:"picture",image:r.image,width:r.width,height:r.height}}default:return}}
@@ -1,4 +1,4 @@
1
- import type { ExportJob } from "@allyhub-next/protocol";
1
+ import type { ExportJob, ExportOptions } from "@allyhub-next/protocol";
2
2
  export declare class Exports {
3
3
  private readonly root;
4
4
  private readonly changed;
@@ -7,7 +7,7 @@ export declare class Exports {
7
7
  private queue;
8
8
  constructor(root: string, changed: (job: ExportJob) => void);
9
9
  list(): ExportJob[];
10
- start(item: string, versions: string[], types: string[]): ExportJob;
10
+ start(item: string, versions: string[], types: string[], options?: ExportOptions): ExportJob;
11
11
  cancel(id: string): boolean;
12
12
  /** Waits for every export asked so far. */
13
13
  idle(): Promise<void>;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{randomBytes as i}from"node:crypto";import{join as a}from"node:path";import{exportProject as n}from"@allyhub-next/export";import{OUT_DIR as h}from"@allyhub-next/formats";import{parseCombo as l}from"@allyhub-next/project";import{projectPathOf as c}from"./paths.js";export class Exports{root;changed;jobs=[];aborts=new Map;queue=Promise.resolve();constructor(t,e){this.root=t,this.changed=e}list(){return this.jobs.map(t=>({...t}))}start(t,e,r){const o={id:`x${i(4).toString("hex")}`,item:t,versions:e,types:r,state:"queued",progress:0,files:[]};this.jobs.push(o);const s=new AbortController;return this.aborts.set(o.id,s),this.changed({...o}),this.queue=this.queue.then(()=>this.run(o,s.signal)),{...o}}cancel(t){const e=this.jobs.find(r=>r.id===t);return!e||e.state==="done"||e.state==="failed"?!1:(this.aborts.get(t)?.abort(),e.state==="queued"&&this.set(e,{state:"cancelled"}),!0)}idle(){return this.queue}async close(){for(const t of this.aborts.values())t.abort();await this.queue}set(t,e){Object.assign(t,e),this.changed({...t})}async run(t,e){if(t.state!=="cancelled"){this.set(t,{state:"running"});try{const r=await n({root:this.root,items:[t.item],...t.versions.length?{combos:t.versions.map(s=>l(s))}:{},...t.types.length?{types:t.types}:{},out:a(this.root,h),signal:e,onProgress:s=>{e.aborted||this.set(t,{progress:Math.max(t.progress,Math.min(1,s))})}}),o=r.files.flatMap(s=>s.files).map(s=>c(this.root,s)).filter(s=>s!==void 0);e.aborted?this.set(t,{state:"cancelled",files:o}):r.failed.length>0&&o.length===0?this.set(t,{state:"failed",error:r.failed.map(s=>s.message).join(" ")}):this.set(t,{state:"done",progress:1,files:o})}catch(r){this.set(t,{state:e.aborted?"cancelled":"failed",...e.aborted?{}:{error:r instanceof Error?r.message:String(r)}})}finally{this.aborts.delete(t.id)}}}}
2
+ import{randomBytes as n}from"node:crypto";import{join as h}from"node:path";import{exportProject as l}from"@allyhub-next/export";import{OUT_DIR as c}from"@allyhub-next/formats";import{parseCombo as d}from"@allyhub-next/project";import{projectPathOf as p}from"./paths.js";function u(i){const t=i?.pptx;return{...i?.steps===!0?{steps:!0}:{},...t==="editable"||t==="picture"?{pptx:t}:{}}}export class Exports{root;changed;jobs=[];aborts=new Map;queue=Promise.resolve();constructor(t,s){this.root=t,this.changed=s}list(){return this.jobs.map(t=>({...t}))}start(t,s,r,o){const e={id:`x${n(4).toString("hex")}`,item:t,versions:s,types:r,...o?{options:o}:{},state:"queued",progress:0,files:[]};this.jobs.push(e);const a=new AbortController;return this.aborts.set(e.id,a),this.changed({...e}),this.queue=this.queue.then(()=>this.run(e,a.signal)),{...e}}cancel(t){const s=this.jobs.find(r=>r.id===t);return!s||s.state==="done"||s.state==="failed"?!1:(this.aborts.get(t)?.abort(),this.set(s,{state:"cancelled"}),!0)}idle(){return this.queue}async close(){for(const t of this.aborts.values())t.abort();await this.queue}set(t,s){Object.assign(t,s),this.changed({...t})}async run(t,s){if(t.state!=="cancelled"){this.set(t,{state:"running"});try{const r=await l({root:this.root,items:[t.item],...t.versions.length?{combos:t.versions.map(e=>d(e))}:{},...t.types.length?{types:t.types}:{},...u(t.options),out:h(this.root,c),signal:s,onProgress:e=>{s.aborted||this.set(t,{progress:Math.max(t.progress,Math.min(1,e))})}}),o=r.files.flatMap(e=>e.files).map(e=>p(this.root,e)).filter(e=>e!==void 0);s.aborted?this.set(t,{state:"cancelled",files:o}):r.failed.length>0&&o.length===0?this.set(t,{state:"failed",error:r.failed.map(e=>e.message).join(" ")}):this.set(t,{state:"done",progress:1,files:o,...r.failed.length>0?{error:[...new Map(r.failed.map(e=>[e.code,e.message])).values()].join(" ")}:{}})}catch(r){this.set(t,{state:s.aborted?"cancelled":"failed",...s.aborted?{}:{error:r instanceof Error?r.message:String(r)}})}finally{this.aborts.delete(t.id)}}}}
@@ -6,6 +6,6 @@ export { writeProblems, dataFileOf } from "./validate.js";
6
6
  export { pathProblem, versionOf } from "./paths.js";
7
7
  export { SETTLE_MS } from "./background.js";
8
8
  export { stageCsp } from "./stage.js";
9
- export { CARD_DEFAULTS, cardOf, itemPreview, projectName } from "./card.js";
9
+ export { CARD_DEFAULTS, itemPreview, projectName } from "./card.js";
10
10
  export { typeOf } from "./mime.js";
11
11
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{RAW_PATH,RPC_PATH,forwardedHost,startDevServer}from"./server.js";export{ProjectServer,SERVER_METHODS}from"./project.js";export{Writer,LIST_LIMIT,UPLOAD_MAX_BYTES}from"./writer.js";export{Watcher}from"./watcher.js";export{writeProblems,dataFileOf}from"./validate.js";export{pathProblem,versionOf}from"./paths.js";export{SETTLE_MS}from"./background.js";export{stageCsp}from"./stage.js";export{CARD_DEFAULTS,cardOf,itemPreview,projectName}from"./card.js";export{typeOf}from"./mime.js";
2
+ export{RAW_PATH,RPC_PATH,forwardedHost,startDevServer}from"./server.js";export{ProjectServer,SERVER_METHODS}from"./project.js";export{Writer,LIST_LIMIT,UPLOAD_MAX_BYTES}from"./writer.js";export{Watcher}from"./watcher.js";export{writeProblems,dataFileOf}from"./validate.js";export{pathProblem,versionOf}from"./paths.js";export{SETTLE_MS}from"./background.js";export{stageCsp}from"./stage.js";export{CARD_DEFAULTS,itemPreview,projectName}from"./card.js";export{typeOf}from"./mime.js";
@@ -20,6 +20,7 @@ export declare class Live {
20
20
  private browserStarted;
21
21
  private readonly gpu;
22
22
  private sceneries;
23
+ private building;
23
24
  private closed;
24
25
  constructor(root: string, stageBase: string, o?: {
25
26
  gpu?: boolean;
@@ -28,6 +29,7 @@ export declare class Live {
28
29
  moved(revision: number): void;
29
30
  /** The project prepared and bundled for the stage, as it is now. */
30
31
  prepared(): Promise<Prepared>;
32
+ private build;
31
33
  /** The last build that finished, if any (without waiting for one). */
32
34
  latest(): Prepared | undefined;
33
35
  /** A piece and its version, by the item's folder and a combo's key or id. */
@@ -50,6 +52,7 @@ export declare class Live {
50
52
  * revision and closed when the project moved on and nothing uses it.
51
53
  */
52
54
  withSession<T>(work: (s: CheckSession) => Promise<T>): Promise<T>;
55
+ private refuseStopped;
53
56
  private retire;
54
57
  private end;
55
58
  /** A scenery module bundled for its viewer, once per revision. */
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as b,rm as m}from"node:fs/promises";import{join as h}from"node:path";import{fileLoudness as v}from"@allyhub-next/audio/node";import{startBrowser as g}from"@allyhub-next/browser";import{allyhubPlugin as y,listFiles as S,loadUserVite as $,prepare as D,readMedia as k,sourceOf as j}from"@allyhub-next/build";import{CACHE_DIR as B,entryKind as O}from"@allyhub-next/formats";import{CheckSession as R,ProjectError as C,pickTarget as U,parseCombo as E}from"@allyhub-next/project";import{RPC_ERROR as p,RpcError as f}from"@allyhub-next/protocol";import{bundleScenery as P,writeModelStage as F}from"@allyhub-next/scenery-host/bundle";import{sceneryHost as w,serveDecoders as M}from"@allyhub-next/stage";export const stageMedia=(r,e)=>`${r}media/${e.split("/").map(encodeURIComponent).join("/")}`;export function rpcErrorOf(r){return r instanceof C?new f(r.kind==="not-found"?p.notFound:p.invalid,r.hint?`${r.message} ${r.hint}`:r.message):r}export class Live{root;stageBase;buildDir;revision=0;prep;last;lease;old=new Set;browserStarted;gpu;sceneries=new Map;closed=!1;constructor(e,t,s={}){this.root=e,this.stageBase=t,this.buildDir=h(e,B,"build",`dev-${String(process.pid)}`),this.gpu=s.gpu}moved(e){this.revision=e,this.lease&&this.lease.revision!==e&&this.retire(this.lease)}prepared(){const e=this.revision;if(this.prep?.revision===e)return this.prep.promise;const t=(async()=>{const s=await D(this.root,{buildDir:h(this.buildDir,"stage"),mediaUrl:i=>stageMedia(this.stageBase,i),host:w(this.root)});return s.bundle&&await M(s.bundle.dir),this.last=s,s})();return this.prep={revision:e,promise:t},t.catch(()=>{this.prep?.promise===t&&(this.prep=void 0)}),t}latest(){return this.last}async target(e,t){const s=await this.prepared();try{const{piece:i,target:d}=U(s,e,t===void 0?void 0:[E(t)]);return{prepared:s,piece:i,combo:d.combo}}catch(i){throw rpcErrorOf(i)}}async source(e,t){const s=await this.prepared(),i=s.pieces.find(o=>o.id===e);if(!i)throw new f(p.notFound,`No piece ${e}.`);const d=j(s,i,`${t}${this.stageBase}build/`,o=>`${t}${stageMedia(this.stageBase,o)}`),c={...d.media},u=(o,n)=>`${t}${this.stageBase}${o}/${n.split("/").map(encodeURIComponent).join("/")}`;return await Promise.all(Object.entries(c).map(async([o,n])=>{let a=n;if(n.kind==="video"&&n.matte===!0&&(a={...a,matteUrl:u("matte",o)}),n.kind==="audio"||n.kind==="video"&&n.audio===!0){a={...a,denoisedUrl:u("sound",o)};const l=await v(h(this.root,o)).catch(()=>{});l!==void 0&&(a={...a,loudness:l.lufs,...l.by==="level"?{loudnessBy:"level"}:{}})}c[o]=a})),{...d,media:c}}browser(){return this.browserStarted??=g(this.gpu===void 0?{}:{gpu:this.gpu}),this.browserStarted}async withSession(e){if(this.closed)throw new f(p.unavailable,"allyhub dev is stopping.");let t=this.lease;if(t?.revision!==this.revision){t&&this.retire(t);const s=h(this.buildDir,`session-${String(this.revision)}`),i=await this.browser();t={revision:this.revision,session:R.open({root:this.root,browser:i,buildDir:s}),users:0,retired:!1,dir:s},this.lease=t,t.session.catch(()=>{this.lease===t&&(this.lease=void 0)})}t.users++;try{return await e(await t.session)}finally{t.users--,t.retired&&t.users===0&&this.end(t)}}retire(e){e.retired=!0,this.lease===e&&(this.lease=void 0),this.old.add(e),e.users===0&&this.end(e)}async end(e){this.old.delete(e),await e.session.then(t=>t.close()).catch(()=>{}),await m(e.dir,{recursive:!0,force:!0})}scenery(e){const t=this.sceneries.get(e);if(t?.revision===this.revision)return t.promise;const s=this.bundleScenery(e);return this.sceneries.set(e,{revision:this.revision,promise:s}),s.catch(()=>{this.sceneries.get(e)?.promise===s&&this.sceneries.delete(e)}),s}async bundleScenery(e){const t=await S(this.root),s=await k(this.root,t),i=await x(this.root),d=w(this.root),c=await $(this.root),u=h(this.buildDir,"scenery"),o=O(e)==="model"?await F({root:this.root,model:e,outDir:u}):e;return{...await P({root:this.root,file:o,outDir:u,dependencies:i,plugins:[y({root:this.root,media:s,dependencies:i,lent:d.lent,mediaUrl:a=>stageMedia(this.stageBase,a)})],...c?{user:c}:{}}),media:Object.keys(s)}}async close(){this.closed=!0,this.lease&&this.retire(this.lease),await Promise.all([...this.old].map(e=>this.end(e))),await this.browserStarted?.then(e=>e.close()).catch(()=>{}),await m(this.buildDir,{recursive:!0,force:!0})}}async function x(r){try{const e=JSON.parse(await b(h(r,"package.json"),"utf8")),t=new Set;for(const s of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){const i=e[s];if(i&&typeof i=="object")for(const d of Object.keys(i))t.add(d)}return t}catch{return new Set}}
2
+ import{readFile as b,rm as m}from"node:fs/promises";import{join as h}from"node:path";import{fileLoudness as v}from"@allyhub-next/audio/node";import{startBrowser as g}from"@allyhub-next/browser";import{allyhubPlugin as y,listFiles as S,loadUserVite as $,prepare as D,readMedia as k,sourceOf as j}from"@allyhub-next/build";import{CACHE_DIR as B,entryKind as O}from"@allyhub-next/formats";import{CheckSession as R,ProjectError as C,pickTarget as U,parseCombo as P}from"@allyhub-next/project";import{RPC_ERROR as p,RpcError as f}from"@allyhub-next/protocol";import{bundleScenery as E,writeModelStage as F}from"@allyhub-next/scenery-host/bundle";import{sceneryHost as w,serveDecoders as M}from"@allyhub-next/stage";export const stageMedia=(o,e)=>`${o}media/${e.split("/").map(encodeURIComponent).join("/")}`;export function rpcErrorOf(o){return o instanceof C?new f(o.kind==="not-found"?p.notFound:p.invalid,o.hint?`${o.message} ${o.hint}`:o.message):o}export class Live{root;stageBase;buildDir;revision=0;prep;last;lease;old=new Set;browserStarted;gpu;sceneries=new Map;building=Promise.resolve();closed=!1;constructor(e,t,i={}){this.root=e,this.stageBase=t,this.buildDir=h(e,B,"build",`dev-${String(process.pid)}`),this.gpu=i.gpu}moved(e){this.revision=e,this.lease&&this.lease.revision!==e&&this.retire(this.lease)}prepared(){const e=this.revision;if(this.prep?.revision===e)return this.prep.promise;const t=this.building.then(()=>e===this.revision?this.build():void 0);this.building=t.catch(()=>{});const i=t.then(s=>s??this.prepared());return this.prep={revision:e,promise:i},i.catch(()=>{this.prep?.promise===i&&(this.prep=void 0)}),i}async build(){const e=await D(this.root,{buildDir:h(this.buildDir,"stage"),mediaUrl:t=>stageMedia(this.stageBase,t),host:w(this.root)});return e.bundle&&await M(e.bundle.dir),this.last=e,e}latest(){return this.last}async target(e,t){const i=await this.prepared();try{const{piece:s,target:r}=U(i,e,t===void 0?void 0:[P(t)]);return{prepared:i,piece:s,combo:r.combo}}catch(s){throw rpcErrorOf(s)}}async source(e,t){const i=await this.prepared(),s=i.pieces.find(n=>n.id===e);if(!s)throw new f(p.notFound,`No piece ${e}.`);const r=j(i,s,`${t}${this.stageBase}build/`,n=>`${t}${stageMedia(this.stageBase,n)}`),c={...r.media},u=(n,a)=>`${t}${this.stageBase}${n}/${a.split("/").map(encodeURIComponent).join("/")}`;return await Promise.all(Object.entries(c).map(async([n,a])=>{let d=a;if(a.kind==="video"&&a.matte===!0&&(d={...d,matteUrl:u("matte",n)}),a.kind==="audio"||a.kind==="video"&&a.audio===!0){d={...d,denoisedUrl:u("sound",n)};const l=await v(h(this.root,n)).catch(()=>{});l!==void 0&&(d={...d,loudness:l.lufs,...l.by==="level"?{loudnessBy:"level"}:{}})}c[n]=d})),{...r,media:c}}browser(){return this.browserStarted??=g(this.gpu===void 0?{}:{gpu:this.gpu}),this.browserStarted}async withSession(e){this.refuseStopped();let t=this.lease;if(t?.revision!==this.revision){t&&this.retire(t);const i=await this.browser();if(this.refuseStopped(),t=this.lease,t?.revision!==this.revision){t&&this.retire(t);const s=h(this.buildDir,`session-${String(this.revision)}`),r={revision:this.revision,session:R.open({root:this.root,browser:i,buildDir:s}),users:0,retired:!1,dir:s};t=r,this.lease=r,r.session.catch(()=>{this.lease===r&&(this.lease=void 0)})}}t.users++;try{return await e(await t.session)}finally{t.users--,t.retired&&t.users===0&&this.end(t)}}refuseStopped(){if(this.closed)throw new f(p.unavailable,"allyhub dev is stopping.")}retire(e){e.retired=!0,this.lease===e&&(this.lease=void 0),this.old.add(e),e.users===0&&this.end(e)}end(e){return e.ended??=(async()=>{this.old.delete(e),await e.session.then(t=>t.close()).catch(()=>{}),await m(e.dir,{recursive:!0,force:!0})})(),e.ended}scenery(e){const t=this.sceneries.get(e);if(t?.revision===this.revision)return t.promise;const i=this.bundleScenery(e);return this.sceneries.set(e,{revision:this.revision,promise:i}),i.catch(()=>{this.sceneries.get(e)?.promise===i&&this.sceneries.delete(e)}),i}async bundleScenery(e){const t=await S(this.root),i=await k(this.root,t),s=await x(this.root),r=w(this.root),c=await $(this.root),u=h(this.buildDir,"scenery"),n=O(e)==="model"?await F({root:this.root,model:e,outDir:u}):e;return{...await E({root:this.root,file:n,outDir:u,dependencies:s,plugins:[y({root:this.root,media:i,dependencies:s,lent:r.lent,mediaUrl:d=>stageMedia(this.stageBase,d)})],...c?{user:c}:{}}),media:Object.keys(i)}}async close(){this.closed=!0;const e=[...this.old,...this.lease?[this.lease]:[]];this.lease&&this.retire(this.lease),await Promise.all(e.map(t=>this.end(t))),await this.browserStarted?.then(t=>t.close()).catch(()=>{}),await m(this.buildDir,{recursive:!0,force:!0})}}async function x(o){try{const e=JSON.parse(await b(h(o,"package.json"),"utf8")),t=new Set;for(const i of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){const s=e[i];if(s&&typeof s=="object")for(const r of Object.keys(s))t.add(r)}return t}catch{return new Set}}
@@ -86,6 +86,8 @@ export interface ProjectServerOptions {
86
86
  root: string;
87
87
  /** Run the check after edits (default true). */
88
88
  check?: boolean;
89
+ /** How a file is shown in the person's file manager; default this computer's, where a person sits at it; false: never (behind a gateway). */
90
+ reveal?: ((file: string) => Promise<void>) | false;
89
91
  /** Quiet time before the check, ms. */
90
92
  settle?: number;
91
93
  /** Make what the media index lacks after a check (default: unless ALLYHUB_NO_INDEX=1). */
@@ -114,6 +116,7 @@ export declare class ProjectServer {
114
116
  readonly watcher: Watcher;
115
117
  readonly live: Live;
116
118
  readonly exports: Exports;
119
+ private readonly reveal;
117
120
  readonly checker: Checker | undefined;
118
121
  /**
119
122
  * Where a client at `origin` (the one its page is at, when it came over
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{randomBytes as f}from"node:crypto";import{resolve as v}from"node:path";import{FILE_METHODS as g,HOST_METHODS as u,JSONRPC as c,PROJECT_TOOLS as h,RPC_ERROR as l,RequestSchema as y,RpcError as d,answer as w}from"@allyhub-next/protocol";import{Checker as O,Indexer as x}from"./background.js";import{Exports as S}from"./exports.js";import{Live as k}from"./live.js";import{fileIn as p}from"./paths.js";import{toolHandlers as m}from"./tools.js";import{Watcher as R}from"./watcher.js";import{Writer as E}from"./writer.js";export const SERVER_METHODS={...g,"tools/call":u["tools/call"]};export class ProjectServer{root;writer;watcher;live;exports;checker;serving;indexer;clients=new Map;constructor(t){this.root=v(t.root),this.live=new k(this.root,t.stageBase??`/s/${f(18).toString("base64url")}/`,t.gpu===void 0?{}:{gpu:t.gpu}),this.watcher=new R(this.root,(e,o)=>{this.sendTo(this.watchOwner(e),"files/changed",{watch:e,changes:o})},e=>{this.live.moved(e),this.notify("project/changed",{revision:e}),this.checker?.schedule()}),this.writer=new E(this.root,(e,o)=>{this.watcher.wrote(e,o)}),this.exports=new S(this.root,e=>{this.notify("export/changed",{job:e})});const r=t.index??process.env.ALLYHUB_NO_INDEX!=="1";if(t.check!==!1){const e=r?new x({root:this.root,emit:o=>{this.notify("index/changed",{jobs:o})},made:()=>{this.checker?.schedule(!0)}}):void 0;this.indexer=e,this.checker=new O({live:this.live,emit:o=>{this.notify("check/changed",o)},...e?{needs:o=>{e.want(o)}}:{},...t.settle===void 0?{}:{settle:t.settle}})}}static open(t){const r=new ProjectServer(t);return r.watcher.start(),r.checker?.schedule(),Promise.resolve(r)}owners=new Map;watchOwner(t){return this.owners.get(t)}connect(t,r={}){const e=`c${f(6).toString("hex")}`;this.clients.set(e,t);const o=this.handlersFor(e,r.origin);return{id:e,receive:async i=>{const s=await this.answerOne(o,i);s&&t(s)},close:()=>{this.clients.delete(e),this.watcher.forget(e);for(const[i,s]of this.owners)s===e&&this.owners.delete(i)}}}channel(){const t=new Set,r=this.connect(e=>{const o=JSON.parse(JSON.stringify(e));queueMicrotask(()=>{for(const i of t)i(o)})});return{send:e=>{r.receive(JSON.parse(JSON.stringify(e)))},listen:e=>(t.add(e),()=>t.delete(e)),close:()=>{r.close()}}}notify(t,r){for(const e of this.clients.values())e({jsonrpc:c,method:t,params:r})}sendTo(t,r,e){t!==void 0&&this.clients.get(t)?.({jsonrpc:c,method:r,params:e})}async answerOne(t,r){const e=y.safeParse(r);if(!e.success){const i=r?.id;return typeof i!="string"&&typeof i!="number"?void 0:{jsonrpc:c,id:i,error:{code:l.invalidRequest,message:"Not a JSON-RPC request."}}}const o=e.data;return Object.hasOwn(u,o.method)&&o.method!=="tools/call"?{jsonrpc:c,id:o.id,error:{code:l.methodNotFound,message:`${o.method} is answered by the page that hosts the editor, not by allyhub dev's server.`}}:w(SERVER_METHODS,t,o)}handlersFor(t,r){const{writer:e,watcher:o}=this,i=m({live:this.live,checker:this.checker,exports:this.exports,addresses:()=>this.serving?.pages(r)});return{"files/read":({path:s})=>e.read(s),"files/write":async({path:s,text:a,over:n})=>({version:await e.write(s,a,n,t)}),"files/upload":async({dir:s,name:a,data:n})=>({path:await e.upload(s,a,Buffer.from(n,"base64"),t)}),"files/url":async({path:s})=>{if(await p(this.root,s),!this.serving)throw new d(l.unavailable,"This server serves no files over HTTP: only allyhub dev's does.");return{url:this.serving.file(r,s)}},"files/list":({dir:s})=>e.list(s),"files/move":async({from:s,to:a})=>({rewritten:await e.move(s,a,t)}),"files/remove":async({path:s})=>({trash:await e.remove(s,t)}),"files/trash":async()=>({entries:await e.trash()}),"files/restore":async({id:s})=>({path:await e.restore(s,t)}),"files/watch":async({paths:s})=>{for(const n of s)await p(this.root,n);const a=await o.watch(t,s);return this.owners.set(a,t),{watch:a}},"files/unwatch":({watch:s})=>(this.owners.get(s)===t&&(o.unwatch(s),this.owners.delete(s)),Promise.resolve({})),"tools/call":async({name:s,arguments:a})=>{const n=await w(h,i,{jsonrpc:c,id:0,method:s,params:a});if("error"in n)throw new d(n.error.code,n.error.message,n.error.data);return{result:n.result}}}}async tool(t,r){const e=await w(h,m({live:this.live,checker:this.checker,exports:this.exports,addresses:()=>this.serving?.pages(void 0)}),{jsonrpc:c,id:0,method:t,params:r});if("error"in e)throw new d(e.error.code,e.error.message,e.error.data);return h[t].result.parse(e.result)}async close(){this.watcher.close(),this.clients.clear(),await this.checker?.close(),await this.indexer?.close(),await this.exports.close(),await this.live.close()}}
2
+ import{randomBytes as w}from"node:crypto";import{resolve as v}from"node:path";import{FILE_METHODS as g,HOST_METHODS as u,JSONRPC as c,PROJECT_TOOLS as h,RPC_ERROR as l,RequestSchema as y,RpcError as d,answer as f}from"@allyhub-next/protocol";import{Checker as O,Indexer as x}from"./background.js";import{Exports as S}from"./exports.js";import{hasFileManager as k,revealFile as R}from"./reveal.js";import{Live as E}from"./live.js";import{fileIn as p}from"./paths.js";import{toolHandlers as m}from"./tools.js";import{Watcher as T}from"./watcher.js";import{Writer as N}from"./writer.js";export const SERVER_METHODS={...g,"tools/call":u["tools/call"]};export class ProjectServer{root;writer;watcher;live;exports;reveal;checker;serving;indexer;clients=new Map;constructor(r){this.root=v(r.root),this.live=new E(this.root,r.stageBase??`/s/${w(18).toString("base64url")}/`,r.gpu===void 0?{}:{gpu:r.gpu}),this.watcher=new T(this.root,(e,i)=>{this.sendTo(this.watchOwner(e),"files/changed",{watch:e,changes:i})},e=>{this.live.moved(e),this.notify("project/changed",{revision:e}),this.checker?.schedule()}),this.writer=new N(this.root,(e,i)=>{this.watcher.wrote(e,i)}),this.reveal=r.reveal===!1?void 0:r.reveal??(k()?R:void 0),this.exports=new S(this.root,e=>{this.notify("export/changed",{job:e})});const s=r.index??process.env.ALLYHUB_NO_INDEX!=="1";if(r.check!==!1){const e=s?new x({root:this.root,emit:i=>{this.notify("index/changed",{jobs:i})},made:()=>{this.checker?.schedule(!0)}}):void 0;this.indexer=e,this.checker=new O({live:this.live,emit:i=>{this.notify("check/changed",i)},...e?{needs:i=>{e.want(i)}}:{},...r.settle===void 0?{}:{settle:r.settle}})}}static open(r){const s=new ProjectServer(r);return s.watcher.start(),s.checker?.schedule(),Promise.resolve(s)}owners=new Map;watchOwner(r){return this.owners.get(r)}connect(r,s={}){const e=`c${w(6).toString("hex")}`;this.clients.set(e,r);const i=this.handlersFor(e,s.origin);return{id:e,receive:async o=>{const t=await this.answerOne(i,o);t&&r(t)},close:()=>{this.clients.delete(e),this.watcher.forget(e);for(const[o,t]of this.owners)t===e&&this.owners.delete(o)}}}channel(){const r=new Set,s=this.connect(e=>{const i=JSON.parse(JSON.stringify(e));queueMicrotask(()=>{for(const o of r)o(i)})});return{send:e=>{s.receive(JSON.parse(JSON.stringify(e)))},listen:e=>(r.add(e),()=>r.delete(e)),close:()=>{s.close()}}}notify(r,s){for(const e of this.clients.values())e({jsonrpc:c,method:r,params:s})}sendTo(r,s,e){r!==void 0&&this.clients.get(r)?.({jsonrpc:c,method:s,params:e})}async answerOne(r,s){const e=y.safeParse(s);if(!e.success){const o=s?.id;return typeof o!="string"&&typeof o!="number"?void 0:{jsonrpc:c,id:o,error:{code:l.invalidRequest,message:"Not a JSON-RPC request."}}}const i=e.data;return Object.hasOwn(u,i.method)&&i.method!=="tools/call"?{jsonrpc:c,id:i.id,error:{code:l.methodNotFound,message:`${i.method} is answered by the page that hosts the editor, not by allyhub dev's server.`}}:f(SERVER_METHODS,r,i)}handlersFor(r,s){const{writer:e,watcher:i}=this,o=m({live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,addresses:()=>this.serving?.pages(s)});return{"files/read":({path:t})=>e.read(t),"files/write":async({path:t,text:a,over:n})=>({version:await e.write(t,a,n,r)}),"files/upload":async({dir:t,name:a,data:n})=>({path:await e.upload(t,a,Buffer.from(n,"base64"),r)}),"files/url":async({path:t})=>{if(await p(this.root,t),!this.serving)throw new d(l.unavailable,"This server serves no files over HTTP: only allyhub dev's does.");return{url:this.serving.file(s,t)}},"files/list":({dir:t})=>e.list(t),"files/move":async({from:t,to:a})=>({rewritten:await e.move(t,a,r)}),"files/remove":async({path:t})=>({trash:await e.remove(t,r)}),"files/trash":async()=>({entries:await e.trash()}),"files/restore":async({id:t})=>({path:await e.restore(t,r)}),"files/watch":async({paths:t})=>{for(const n of t)await p(this.root,n);const a=await i.watch(r,t);return this.owners.set(a,r),{watch:a}},"files/unwatch":({watch:t})=>(this.owners.get(t)===r&&(i.unwatch(t),this.owners.delete(t)),Promise.resolve({})),"tools/call":async({name:t,arguments:a})=>{const n=await f(h,o,{jsonrpc:c,id:0,method:t,params:a});if("error"in n)throw new d(n.error.code,n.error.message,n.error.data);return{result:n.result}}}}async tool(r,s){const e=await f(h,m({live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,addresses:()=>this.serving?.pages(void 0)}),{jsonrpc:c,id:0,method:r,params:s});if("error"in e)throw new d(e.error.code,e.error.message,e.error.data);return h[r].result.parse(e.result)}async close(){this.watcher.close(),this.clients.clear(),await this.checker?.close(),await this.indexer?.close(),await this.exports.close(),await this.live.close()}}
@@ -0,0 +1,6 @@
1
+ /** Whether a person sits at this computer: any doubt is no. */
2
+ export declare function hasFileManager(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): boolean;
3
+ /** The command that shows a file, on a platform. */
4
+ export declare function revealCommand(file: string, platform?: NodeJS.Platform): [command: string, args: string[]];
5
+ export declare function revealFile(file: string): Promise<void>;
6
+ //# sourceMappingURL=reveal.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{execFile as s}from"node:child_process";import{dirname as a}from"node:path";export function hasFileManager(r=process.env,e=process.platform){return r.SSH_CONNECTION||r.SSH_TTY||r.CI?!1:e==="darwin"||e==="win32"?!0:[r.DISPLAY,r.WAYLAND_DISPLAY].some(Boolean)}export function revealCommand(r,e=process.platform){return e==="darwin"?["open",["-R",r]]:e==="win32"?["explorer",[`/select,${r}`]]:["xdg-open",[a(r)]]}export function revealFile(r){const[e,n]=revealCommand(r);return new Promise((t,i)=>{s(e,n,o=>{o&&!(process.platform==="win32"&&o.code===1)?i(new Error(o.message)):t()})})}
@@ -1,5 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{randomBytes as R}from"node:crypto";import{indexPath as T}from"@allyhub-next/video-core";import{MadeSounds as M,decodeAsOf as J}from"./sound.js";import{createReadStream as G}from"node:fs";import{readFile as K,stat as Y}from"node:fs/promises";import{createServer as Q}from"node:http";import{Readable as V}from"node:stream";import{join as F,normalize as X,resolve as A,sep as I}from"node:path";import{getRequestListener as Z}from"@hono/node-server";import{Hono as ee}from"hono";import{WebSocketServer as te}from"ws";import{stageFiles as ne}from"@allyhub-next/runtime/host";import{BAKE_DIR as re}from"@allyhub-next/scenery-host";import{bakesOnDisk as oe}from"@allyhub-next/stage";import{stageMedia as se}from"./live.js";import{typeOf as ie}from"./mime.js";import{pathProblem as W}from"./paths.js";import{ProjectServer as ae}from"./project.js";import{stageCsp as _,stagePage as ce,viewerPage as de}from"./stage.js";export const RPC_PATH="/rpc",RAW_PATH="/files/raw/";const m={"access-control-allow-origin":"*"};function w(r,a){const u=X(F(r,a));return u.startsWith(r.endsWith(I)?r:`${r}${I}`)?u:void 0}async function S(r,a,u){const v=await Y(r).catch(()=>{});if(!v?.isFile())return new Response("not found",{status:404,headers:u});const o={"content-type":ie(r),"cache-control":"no-cache","accept-ranges":"bytes",...u},i=v.size,p=a?/^bytes=(\d*)-(\d*)$/u.exec(a.trim()):null,h=(k,N)=>V.toWeb(G(r,{start:k,end:N}));if(!p||p[1]===""&&p[2]===""||i===0)return new Response(i===0?null:h(0,i-1),{status:200,headers:{...o,"content-length":String(i)}});let g,b;return p[1]===""?(g=Math.max(0,i-Number(p[2])),b=i-1):(g=Number(p[1]),b=p[2]===""?i-1:Math.min(Number(p[2]),i-1)),g>=i||g>b?new Response(null,{status:416,headers:{...o,"content-range":`bytes */${String(i)}`}}):new Response(h(g,b),{status:206,headers:{...o,"content-length":String(b-g+1),"content-range":`bytes ${String(g)}-${String(b)}/${String(i)}`}})}const E=/^[a-z][a-z0-9+.-]*:\/\/[a-z0-9.-]+(:\d{1,5})?$/u;export const ALLYHUB_FORWARDED="allyhub-forwarded";export function forwardedHost(r){const a=r[ALLYHUB_FORWARDED],v=(r.forwarded??(Array.isArray(a)?a[0]:a))?.split(",")[0]?.split(";").map(i=>i.trim().split("=")).find(([i])=>i?.toLowerCase()==="host")?.[1];if(v!==void 0)return v.replace(/^"(.*)"$/u,"$1");const o=r["x-forwarded-host"];return(Array.isArray(o)?o[0]:o)?.split(",")[0]?.trim()}export async function startDevServer(r){const a=A(r.root);if(r.embedder!==void 0&&!E.test(r.embedder))throw new Error(`Not an origin: ${r.embedder}`);if(r.publicOrigin!==void 0&&!E.test(r.publicOrigin.replace("{port}","1")))throw new Error(`Not an origin: ${r.publicOrigin}`);const u=r.token??R(18).toString("base64url"),o=`/s/${R(18).toString("base64url")}/`,i=await ae.open({...r,root:a,stageBase:o}),p=ne();let h=0;const g=()=>h===0?void 0:r.publicOrigin?.replace("{port}",String(h)),b=()=>{const e=g();return e===void 0?void 0:new URL(e).host},k=()=>{const e=b();return new Set([`127.0.0.1:${String(h)}`,`localhost:${String(h)}`,...e===void 0?[]:[e]])},N=e=>e===b()?g()??"":`http://${e}`,C=e=>N(e.req.header("host")??""),U=e=>{const t=b();t!==void 0&&forwardedHost(e.headers)===t&&(e.headers.host=t)},P=e=>e??`http://127.0.0.1:${String(h)}`;i.serving={file:(e,t)=>`${P(e)}${RAW_PATH}${t.split("/").map(encodeURIComponent).join("/")}?token=${encodeURIComponent(u)}`,pages:e=>({stage:t=>`${P(e)}${o}stage?${t.toString()}`,viewer:t=>`${P(e)}${o}viewer?${t.toString()}`,probe:`${P(e)}${o}probe`})};const l=new ee,B=async e=>{if(!r.ui)return e.text("allyhub dev serves its editors here.",200);const t=await K(F(r.ui,"index.html"),"utf8").catch(()=>{});if(t===void 0)return e.text("The page's files are missing: build them first (pnpm --filter @allyhub-next/editor-web build).",500);const n=R(16).toString("base64");return e.html(t.replace(/<script/gu,`<script nonce="${n}"`).replace("</head>",`<meta name="allyhub-token" content="${u}"></head>`),200,{"content-security-policy":["default-src 'self'",`script-src 'self' 'nonce-${n}'`,"style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","media-src 'self' blob:","font-src 'self' data:",`connect-src 'self' ws://${e.req.header("host")??""}`,"frame-src 'self'",`frame-ancestors ${r.embedder??"'none'"}`].join("; "),"cache-control":"no-store"})};l.get("/",B),l.get(`${RAW_PATH}*`,async e=>{if(e.req.query("token")!==u)return e.text("forbidden",403);const t=decodeURIComponent(e.req.path.slice(RAW_PATH.length));if(W(t)!==void 0)return e.text("forbidden",403);const n=w(a,t);return n?S(n,e.req.header("range"),{"x-content-type-options":"nosniff","content-security-policy":"sandbox; default-src 'none'; img-src 'self'; media-src 'self'; style-src 'unsafe-inline'"}):e.text("forbidden",403)}),l.get("/__allyhub/*",async e=>{const t=e.req.path.slice(11);let n;if(t==="runtime.js")n=p.runtime;else for(const[s,c]of Object.entries(p.fonts))t.startsWith(`${s}/`)&&(n=w(c,t.slice(s.length+1)));return n?S(n,void 0,{...m,"cache-control":t==="runtime.js"?"no-cache":"public, max-age=86400"}):e.notFound()}),l.use("/s/*",async(e,t)=>{if(!e.req.path.startsWith(o))return e.notFound();await t()});const y=(e,t)=>{const n=e.req.query(t);return n===void 0||n===""?void 0:n},H=(e,t)=>{const n=y(e,t),s=n===void 0?void 0:Number(n);return s!==void 0&&Number.isFinite(s)?s:void 0};l.get(`${o}stage`,e=>{const t=y(e,"piece")??"",n=Object.fromEntries((y(e,"combo")??"default")==="default"?[]:(y(e,"combo")??"").split(",").map(f=>{const q=f.indexOf("=");return[f.slice(0,q),f.slice(q+1)]})),s={};for(const f of["t","offset","dur"]){const q=H(e,f);q!==void 0&&(s[f]=q)}const c=y(e,"part");c!==void 0&&(s.part=c);const d=C(e),$=R(16).toString("base64");return e.html(ce({runtime:`${d}/__allyhub/`,nonce:$,config:{source:`${d}${o}source?${new URLSearchParams({piece:t}).toString()}`,combo:n,start:s,...y(e,"play")==="1"?{play:!0}:{},...y(e,"chrome")==="0"?{chrome:!1}:{}}}),200,{"content-security-policy":_(d,o,$,r.embedder),"cache-control":"no-store"})}),l.get(`${o}probe`,e=>{const t=R(16).toString("base64");return e.html(`<!doctype html><script nonce="${t}">parent.postMessage({ allyhub: true, type: "probe" }, "*");<\/script>`,200,{"content-security-policy":`default-src 'none'; script-src 'nonce-${t}'; frame-ancestors ${C(e)}${r.embedder?` ${r.embedder}`:""}`,"cache-control":"no-store"})}),l.get(`${o}source`,async e=>{try{const t=await i.live.source(y(e,"piece")??"",C(e));return e.json(t,200,{...m,"cache-control":"no-store"})}catch(t){return e.json({error:{message:t instanceof Error?t.message:String(t)}},404,m)}}),l.get(`${o}build/*`,e=>{const t=w(F(i.live.buildDir,"stage"),decodeURIComponent(e.req.path.slice(`${o}build/`.length)));return t?S(t,void 0,m):e.notFound()}),l.get(`${o}scenery/*`,e=>{const t=w(F(i.live.buildDir,"scenery"),decodeURIComponent(e.req.path.slice(`${o}scenery/`.length)));return t?S(t,void 0,m):e.notFound()});const j=new Set;l.get(`${o}media/*`,e=>{const t=decodeURIComponent(e.req.path.slice(`${o}media/`.length)),s=Object.hasOwn(i.live.latest()?.media??{},t)||j.has(t)?w(a,t):void 0;return s?S(s,e.req.header("range"),m):e.notFound()});const z=new M(a);l.get(`${o}sound/*`,async e=>{const t=decodeURIComponent(e.req.path.slice(`${o}sound/`.length)),n=i.live.latest()?.media[t],s=n?w(a,t):void 0;if(!n||!s)return e.notFound();const c=J({db:e.req.query("db"),speed:e.req.query("speed"),filter:e.req.query("filter")});if(typeof c=="string")return e.text(c,400,m);try{const d=await z.made(s,n.sha256,c,e.req.query("wait")!=="0");return d===void 0?e.body(null,202,m):await S(d,e.req.header("range"),{...m,"content-type":"audio/flac"})}catch(d){return e.text(d instanceof Error?d.message:String(d),500,m)}}),l.get(`${o}matte/*`,e=>{const t=decodeURIComponent(e.req.path.slice(`${o}matte/`.length)),n=i.live.latest()?.media[t];if(!n?.matte)return e.notFound();const s=w(a,T(n.sha256,"matte.mp4"));return s?S(s,e.req.header("range"),{...m,"content-type":"video/mp4"}):e.notFound()}),l.get(`${o}bakes/*`,e=>{const t=decodeURIComponent(e.req.path.slice(`${o}bakes/`.length));if(!/^[0-9a-f]+\.[a-z0-9-]+\.bin$/u.test(t))return e.notFound();const n=w(F(a,re),t);return n?S(n,void 0,m):e.notFound()}),l.get(`${o}viewer`,async e=>{const t=y(e,"file")??"";let n;try{n=JSON.parse(y(e,"camera")??"null")}catch{n=null}if(W(t)!==void 0||!w(a,t))return e.text("No such scenery.",404);const s=C(e);let c;try{c=await i.live.scenery(t)}catch(f){return e.text(f instanceof Error?f.message:String(f),500)}for(const f of c.media)j.add(f);const d=R(16).toString("base64"),$=`${s}${o}scenery/`;return e.html(de({nonce:d,config:{module:`${$}${c.module}`,file:t,media:`${s}${se(o,"")}`,decoders:`${$}${c.decoders}`,manifoldWasm:`${$}${c.manifoldWasm}`,bakes:[...await oe(a)],bakeBase:`${s}${o}bakes/`,...ue(n)?{camera:n}:{}}}),200,{"content-security-policy":_(s,o,d,r.embedder),"cache-control":"no-store"})}),l.get("/*",async e=>{if(!r.ui)return e.notFound();const t=w(A(r.ui),decodeURIComponent(e.req.path.slice(1)));return t?S(t,void 0,{"cache-control":"public, max-age=3600"}):e.notFound()});const O=new te({noServer:!0,maxPayload:512*1024*1024});O.on("connection",(e,t)=>{const n=i.connect(s=>{e.readyState===e.OPEN&&e.send(JSON.stringify(s))},{origin:`http://${t.headers.host??""}`});e.on("message",(s,c)=>{if(c||!Buffer.isBuffer(s))return;let d;try{d=JSON.parse(s.toString("utf8"))}catch{e.send(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Not JSON."}}));return}n.receive(d)}),e.on("close",()=>{n.close()})});const D=Z(l.fetch),L=(e,t)=>{e.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),e.end(t)},x=Q((e,t)=>{if(U(e),!k().has(e.headers.host??"")){L(t,"forbidden host");return}D(e,t)});x.on("upgrade",(e,t,n)=>{const s=new URL(e.url??"/","http://x"),c=($,f)=>{t.end(`HTTP/1.1 ${String($)} ${f}\r
2
+ import{randomBytes as R}from"node:crypto";import{indexPath as T}from"@allyhub-next/video-core";import{MadeSounds as M,decodeAsOf as J}from"./sound.js";import{createReadStream as G}from"node:fs";import{readFile as K,stat as Y}from"node:fs/promises";import{createServer as Q}from"node:http";import{Readable as V}from"node:stream";import{join as F,normalize as X,resolve as A,sep as I}from"node:path";import{getRequestListener as Z}from"@hono/node-server";import{Hono as ee}from"hono";import{WebSocketServer as te}from"ws";import{stageFiles as ne}from"@allyhub-next/stage-page";import{BAKE_DIR as re}from"@allyhub-next/scenery-host";import{bakesOnDisk as oe}from"@allyhub-next/stage";import{stageMedia as se}from"./live.js";import{typeOf as ie}from"./mime.js";import{pathProblem as W}from"./paths.js";import{ProjectServer as ae}from"./project.js";import{stageCsp as _,stagePage as ce,viewerPage as de}from"./stage.js";export const RPC_PATH="/rpc",RAW_PATH="/files/raw/";const m={"access-control-allow-origin":"*"};function w(r,a){const u=X(F(r,a));return u.startsWith(r.endsWith(I)?r:`${r}${I}`)?u:void 0}async function S(r,a,u){const v=await Y(r).catch(()=>{});if(!v?.isFile())return new Response("not found",{status:404,headers:u});const o={"content-type":ie(r),"cache-control":"no-cache","accept-ranges":"bytes",...u},i=v.size,p=a?/^bytes=(\d*)-(\d*)$/u.exec(a.trim()):null,h=(k,N)=>V.toWeb(G(r,{start:k,end:N}));if(!p||p[1]===""&&p[2]===""||i===0)return new Response(i===0?null:h(0,i-1),{status:200,headers:{...o,"content-length":String(i)}});let b,y;return p[1]===""?(b=Math.max(0,i-Number(p[2])),y=i-1):(b=Number(p[1]),y=p[2]===""?i-1:Math.min(Number(p[2]),i-1)),b>=i||b>y?new Response(null,{status:416,headers:{...o,"content-range":`bytes */${String(i)}`}}):new Response(h(b,y),{status:206,headers:{...o,"content-length":String(y-b+1),"content-range":`bytes ${String(b)}-${String(y)}/${String(i)}`}})}const E=/^[a-z][a-z0-9+.-]*:\/\/[a-z0-9.-]+(:\d{1,5})?$/u;export const ALLYHUB_FORWARDED="allyhub-forwarded";export function forwardedHost(r){const a=r[ALLYHUB_FORWARDED],v=(r.forwarded??(Array.isArray(a)?a[0]:a))?.split(",")[0]?.split(";").map(i=>i.trim().split("=")).find(([i])=>i?.toLowerCase()==="host")?.[1];if(v!==void 0)return v.replace(/^"(.*)"$/u,"$1");const o=r["x-forwarded-host"];return(Array.isArray(o)?o[0]:o)?.split(",")[0]?.trim()}export async function startDevServer(r){const a=A(r.root);if(r.embedder!==void 0&&!E.test(r.embedder))throw new Error(`Not an origin: ${r.embedder}`);if(r.publicOrigin!==void 0&&!E.test(r.publicOrigin.replace("{port}","1")))throw new Error(`Not an origin: ${r.publicOrigin}`);const u=r.token??R(18).toString("base64url"),o=`/s/${R(18).toString("base64url")}/`,i=await ae.open({...r,root:a,stageBase:o,...r.publicOrigin===void 0?{}:{reveal:!1}}),p=ne();let h=0;const b=()=>h===0?void 0:r.publicOrigin?.replace("{port}",String(h)),y=()=>{const e=b();return e===void 0?void 0:new URL(e).host},k=()=>{const e=y();return new Set([`127.0.0.1:${String(h)}`,`localhost:${String(h)}`,...e===void 0?[]:[e]])},N=e=>e===y()?b()??"":`http://${e}`,C=e=>N(e.req.header("host")??""),U=e=>{const t=y();t!==void 0&&forwardedHost(e.headers)===t&&(e.headers.host=t)},P=e=>e??`http://127.0.0.1:${String(h)}`;i.serving={file:(e,t)=>`${P(e)}${RAW_PATH}${t.split("/").map(encodeURIComponent).join("/")}?token=${encodeURIComponent(u)}`,pages:e=>({stage:t=>`${P(e)}${o}stage?${t.toString()}`,viewer:t=>`${P(e)}${o}viewer?${t.toString()}`,probe:`${P(e)}${o}probe`})};const l=new ee,B=async e=>{if(!r.ui)return e.text("allyhub dev serves its editors here.",200);const t=await K(F(r.ui,"index.html"),"utf8").catch(()=>{});if(t===void 0)return e.text("The page's files are missing: build them first (pnpm --filter @allyhub-next/editor-web build).",500);const n=R(16).toString("base64");return e.html(t.replace(/<script/gu,`<script nonce="${n}"`).replace("</head>",`<meta name="allyhub-token" content="${u}"></head>`),200,{"content-security-policy":["default-src 'self'",`script-src 'self' 'nonce-${n}'`,"style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","media-src 'self' blob:","font-src 'self' data:",`connect-src 'self' ws://${e.req.header("host")??""}`,"frame-src 'self'",`frame-ancestors ${r.embedder??"'none'"}`].join("; "),"cache-control":"no-store"})};l.get("/",B),l.get(`${RAW_PATH}*`,async e=>{if(e.req.query("token")!==u)return e.text("forbidden",403);const t=decodeURIComponent(e.req.path.slice(RAW_PATH.length));if(W(t)!==void 0)return e.text("forbidden",403);const n=w(a,t);return n?S(n,e.req.header("range"),{"x-content-type-options":"nosniff","content-security-policy":"sandbox; default-src 'none'; img-src 'self'; media-src 'self'; style-src 'unsafe-inline'"}):e.text("forbidden",403)}),l.get("/__allyhub/*",async e=>{const t=e.req.path.slice(11);let n;if(t==="runtime.js")n=p.runtime;else for(const[s,c]of Object.entries(p.fonts))t.startsWith(`${s}/`)&&(n=w(c,t.slice(s.length+1)));return n?S(n,void 0,{...m,"cache-control":t==="runtime.js"?"no-cache":"public, max-age=86400"}):e.notFound()}),l.use("/s/*",async(e,t)=>{if(!e.req.path.startsWith(o))return e.notFound();await t()});const g=(e,t)=>{const n=e.req.query(t);return n===void 0||n===""?void 0:n},H=(e,t)=>{const n=g(e,t),s=n===void 0?void 0:Number(n);return s!==void 0&&Number.isFinite(s)?s:void 0};l.get(`${o}stage`,e=>{const t=g(e,"piece")??"",n=Object.fromEntries((g(e,"combo")??"default")==="default"?[]:(g(e,"combo")??"").split(",").map(f=>{const q=f.indexOf("=");return[f.slice(0,q),f.slice(q+1)]})),s={};for(const f of["t","offset","dur"]){const q=H(e,f);q!==void 0&&(s[f]=q)}const c=g(e,"part");c!==void 0&&(s.part=c);const d=C(e),$=R(16).toString("base64");return e.html(ce({runtime:`${d}/__allyhub/`,nonce:$,config:{source:`${d}${o}source?${new URLSearchParams({piece:t}).toString()}`,combo:n,start:s,...g(e,"play")==="1"?{play:!0}:{},...g(e,"chrome")==="0"?{chrome:!1}:{},...g(e,"edit")==="1"?{edit:!0}:{}}}),200,{"content-security-policy":_(d,o,$,r.embedder),"cache-control":"no-store"})}),l.get(`${o}probe`,e=>{const t=R(16).toString("base64");return e.html(`<!doctype html><script nonce="${t}">parent.postMessage({ allyhub: true, type: "probe" }, "*");<\/script>`,200,{"content-security-policy":`default-src 'none'; script-src 'nonce-${t}'; frame-ancestors ${C(e)}${r.embedder?` ${r.embedder}`:""}`,"cache-control":"no-store"})}),l.get(`${o}source`,async e=>{try{const t=await i.live.source(g(e,"piece")??"",C(e));return e.json(t,200,{...m,"cache-control":"no-store"})}catch(t){return e.json({error:{message:t instanceof Error?t.message:String(t)}},404,m)}}),l.get(`${o}build/*`,e=>{const t=w(F(i.live.buildDir,"stage"),decodeURIComponent(e.req.path.slice(`${o}build/`.length)));return t?S(t,void 0,m):e.notFound()}),l.get(`${o}scenery/*`,e=>{const t=w(F(i.live.buildDir,"scenery"),decodeURIComponent(e.req.path.slice(`${o}scenery/`.length)));return t?S(t,void 0,m):e.notFound()});const j=new Set;l.get(`${o}media/*`,e=>{const t=decodeURIComponent(e.req.path.slice(`${o}media/`.length)),s=Object.hasOwn(i.live.latest()?.media??{},t)||j.has(t)?w(a,t):void 0;return s?S(s,e.req.header("range"),m):e.notFound()});const z=new M(a);l.get(`${o}sound/*`,async e=>{const t=decodeURIComponent(e.req.path.slice(`${o}sound/`.length)),n=i.live.latest()?.media[t],s=n?w(a,t):void 0;if(!n||!s)return e.notFound();const c=J({db:e.req.query("db"),speed:e.req.query("speed"),filter:e.req.query("filter")});if(typeof c=="string")return e.text(c,400,m);try{const d=await z.made(s,n.sha256,c,e.req.query("wait")!=="0");return d===void 0?e.body(null,202,m):await S(d,e.req.header("range"),{...m,"content-type":"audio/flac"})}catch(d){return e.text(d instanceof Error?d.message:String(d),500,m)}}),l.get(`${o}matte/*`,e=>{const t=decodeURIComponent(e.req.path.slice(`${o}matte/`.length)),n=i.live.latest()?.media[t];if(!n?.matte)return e.notFound();const s=w(a,T(n.sha256,"matte.mp4"));return s?S(s,e.req.header("range"),{...m,"content-type":"video/mp4"}):e.notFound()}),l.get(`${o}bakes/*`,e=>{const t=decodeURIComponent(e.req.path.slice(`${o}bakes/`.length));if(!/^[0-9a-f]+\.[a-z0-9-]+\.bin$/u.test(t))return e.notFound();const n=w(F(a,re),t);return n?S(n,void 0,m):e.notFound()}),l.get(`${o}viewer`,async e=>{const t=g(e,"file")??"";let n;try{n=JSON.parse(g(e,"camera")??"null")}catch{n=null}if(W(t)!==void 0||!w(a,t))return e.text("No such scenery.",404);const s=C(e);let c;try{c=await i.live.scenery(t)}catch(f){return e.text(f instanceof Error?f.message:String(f),500)}for(const f of c.media)j.add(f);const d=R(16).toString("base64"),$=`${s}${o}scenery/`;return e.html(de({nonce:d,config:{module:`${$}${c.module}`,file:t,media:`${s}${se(o,"")}`,decoders:`${$}${c.decoders}`,manifoldWasm:`${$}${c.manifoldWasm}`,bakes:[...await oe(a)],bakeBase:`${s}${o}bakes/`,...ue(n)?{camera:n}:{}}}),200,{"content-security-policy":_(s,o,d,r.embedder),"cache-control":"no-store"})}),l.get("/*",async e=>{if(!r.ui)return e.notFound();const t=w(A(r.ui),decodeURIComponent(e.req.path.slice(1)));return t?S(t,void 0,{"cache-control":"public, max-age=3600"}):e.notFound()});const O=new te({noServer:!0,maxPayload:512*1024*1024});O.on("connection",(e,t)=>{const n=i.connect(s=>{e.readyState===e.OPEN&&e.send(JSON.stringify(s))},{origin:`http://${t.headers.host??""}`});e.on("message",(s,c)=>{if(c||!Buffer.isBuffer(s))return;let d;try{d=JSON.parse(s.toString("utf8"))}catch{e.send(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Not JSON."}}));return}n.receive(d)}),e.on("close",()=>{n.close()})});const D=Z(l.fetch),L=(e,t)=>{e.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),e.end(t)},x=Q((e,t)=>{if(U(e),!k().has(e.headers.host??"")){L(t,"forbidden host");return}D(e,t)});x.on("upgrade",(e,t,n)=>{const s=new URL(e.url??"/","http://x"),c=($,f)=>{t.end(`HTTP/1.1 ${String($)} ${f}\r
3
3
  connection: close\r
4
4
  content-length: 0\r
5
5
  \r
@@ -16,6 +16,8 @@ export interface StageConfig {
16
16
  play?: boolean;
17
17
  /** false: the player without its control bar (the editor draws its own). */
18
18
  chrome?: boolean;
19
+ /** A deck drawn for its editor (LoadOptions' editing), taking its commands. */
20
+ edit?: boolean;
19
21
  }
20
22
  /** JSON that is safe inside a <script>. */
21
23
  export declare const scriptJson: (v: unknown) => string;
@@ -1,5 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{stageHtml as r}from"@allyhub-next/runtime/host";export const scriptJson=t=>JSON.stringify(t).replace(/</gu,"\\u003c").replace(/\u2028|\u2029/gu," ");export function stagePage(t){const{config:a,nonce:s}=t,o=`
2
+ import{stageHtml as r}from"@allyhub-next/stage-page";export const scriptJson=t=>JSON.stringify(t).replace(/</gu,"\\u003c").replace(/\u2028|\u2029/gu," ");export function stagePage(t){const{config:a,nonce:s}=t,o=`
3
3
  <script type="module" nonce="${s}">
4
4
  const post = (msg) => parent.postMessage({ allyhub: true, ...msg }, "*");
5
5
  const config = ${scriptJson(a)};
@@ -7,7 +7,7 @@ try {
7
7
  const res = await fetch(config.source);
8
8
  const source = await res.json();
9
9
  if (!res.ok) throw new Error(source.error ? source.error.message : res.statusText);
10
- const summary = await window.allyhub.load(source, { combo: config.combo, purpose: "play" });
10
+ const summary = await window.allyhub.load(source, { combo: config.combo, purpose: "play", ...(config.edit ? { editing: true } : {}) });
11
11
  const out = window.allyhub.output;
12
12
  const tl = summary.timeline;
13
13
  const s = config.start;
@@ -31,12 +31,32 @@ try {
31
31
  reads: summary.reads,
32
32
  problems: summary.problems,
33
33
  mix: out.mixPlan(),
34
+ // A deck as drawn: its slides' shapes, where they are and where their values came from.
35
+ ...(out.deck ? { deck: JSON.parse(JSON.stringify(out.deck())) } : {}),
34
36
  });
35
37
  // Commands that come while the player starts wait for it, in order.
36
38
  let player;
37
39
  const waiting = [];
38
40
  addEventListener("message", (e) => {
39
41
  if (e.source !== parent || !e.data || e.data.allyhub !== true) return;
42
+ // An editor asks what a moment shows that a person can point at.
43
+ if (e.data.type === "objects") {
44
+ out.objects(e.data.t).then(
45
+ (o) => post({ type: "objects", ...o }),
46
+ (err) => post({ type: "error", message: String(err && err.message ? err.message : err) }),
47
+ );
48
+ return;
49
+ }
50
+ // A deck's editor moves a shape or types into one.
51
+ if (typeof e.data.type === "string" && e.data.type.startsWith("deck-")) {
52
+ if (out.edit) out.edit(e.data, post);
53
+ return;
54
+ }
55
+ if (e.data.type === "locate") {
56
+ const { id, mark } = e.data;
57
+ post({ type: "located", id, layers: window.allyhub.locate(mark) });
58
+ return;
59
+ }
40
60
  if (player) player.command(e.data);
41
61
  else waiting.push(e.data);
42
62
  });
@@ -7,6 +7,8 @@ export interface ToolContext {
7
7
  live: Live;
8
8
  checker: Checker | undefined;
9
9
  exports: Exports;
10
+ /** Shows a file in the person's file manager; undefined where the server has no way to. */
11
+ reveal: ((file: string) => Promise<void>) | undefined;
10
12
  /** The stage's and the viewer's addresses, when an HTTP server serves them. */
11
13
  addresses: (() => Addresses | undefined) | undefined;
12
14
  }
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as y}from"node:fs/promises";import{basename as S,join as b}from"node:path";import{listFiles as f}from"@allyhub-next/build";import{splitTitle as R,parseDoc as T,titleText as E}from"@allyhub-next/doc";import{ITEM_KINDS as v,scanItems as u}from"@allyhub-next/formats";import{OpenedVersion as O,parseCombo as F}from"@allyhub-next/project";import{RPC_ERROR as l,RpcError as d}from"@allyhub-next/protocol";import{readSpec as $}from"@allyhub-next/sheet";import{comboKey as w,formatInfo as g}from"@allyhub-next/video-core";import{rpcErrorOf as j}from"./live.js";import{loose as I}from"./paths.js";const k=s=>{const r=s.addresses?.();if(!r)throw new d(l.unavailable,"This server serves no pages: only allyhub dev's does.");return r},D=s=>({mime:"image/webp",data:s.toString("base64")});async function N(s,r,m){try{if(r.kind==="doc"){const e=await y(b(s,r.entry),"utf8");return E(R(T(e).blocks).title)||void 0}if(r.kind==="sheet"){const e=await y(b(s,r.dir,"sheet.yaml"),"utf8");return $(e).spec.title}}catch{return}return m.get(r.dir)}export function toolHandlers(s){const{live:r}=s,m=async(e,t,a,o)=>{try{return await r.withSession(async n=>{const i=await O.open({root:r.root,item:e,...t===void 0?{}:{combos:[F(t)]},purpose:a,session:n});try{return await o(i)}finally{await i.close()}})}catch(n){throw j(n)}};return{"project/items":async()=>{const e=await f(r.root),t=u(e),o=t.items.some(i=>i.kind==="video"||i.kind==="slides")?await r.prepared().catch(()=>r.latest()):void 0,n=new Map;for(const i of o?.pieces??[]){const c=typeof i.title=="string"?i.title:void 0;c&&n.set(i.dir,c)}return{items:await Promise.all(t.items.map(async i=>{const c=await N(r.root,i,n);return{...i,...c?{title:c}:{}}})),folder:r.root,name:S(r.root),revision:r.revision}},"video/versions":async({item:e})=>{const{piece:t}=await r.target(e),a=[...new Set(t.combos.map(o=>o.lang))];return{piece:t.id,kind:t.kind,...typeof t.title=="string"?{title:t.title}:{},width:g(t.formatEntry)?.width??0,height:g(t.formatEntry)?.height??0,versions:a.map(o=>o===void 0?{key:w({})}:{key:w({lang:o}),lang:o})}},"video/stage":async({item:e,version:t,start:a,play:o,chrome:n})=>{const{piece:i,combo:c}=await r.target(e,t),p=new URLSearchParams({piece:i.id,combo:w(c)});for(const[x,P]of Object.entries(a??{}))p.set(x,String(P));o&&p.set("play","1"),n===!1&&p.set("chrome","0");const h=k(s);return{url:h.stage(p),probe:h.probe}},"video/timeline":async({item:e,version:t})=>m(e,t,"play",a=>Promise.resolve({timeline:I(a.timeline),text:a.version.summary?.text??[]})),"video/still":async({item:e,version:t,t:a})=>m(e,t,"render",async o=>{const n=a??o.timeline.parts[0]?.still??0;return{t:n,image:D(await o.still(n,{format:"webp"})),width:o.timeline.width,height:o.timeline.height,duration:o.timeline.duration}}),"check/results":()=>Promise.resolve(s.checker?.state??{status:"off",revision:r.revision,problems:[],facts:[]}),"check/run":()=>{if(!s.checker)throw new d(l.unavailable,"This server runs no check.");return s.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:e,versions:t,types:a})=>{const o=await f(r.root);if(!u(o).items.some(n=>n.dir===e))throw new d(l.notFound,`There is no item ${e}.`);return{job:s.exports.start(e,t??[],a??[])}},"export/cancel":({job:e})=>{if(!s.exports.cancel(e))throw new d(l.notFound,`No export ${e} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:s.exports.list()}),"scenery/viewer":async({item:e,camera:t})=>{const a=await f(r.root),o=u(a).items.find(c=>c.dir===e&&(c.kind==="scenery"||c.kind==="model"));if(!o)throw new d(l.notFound,`There is no scenery or 3D model ${e}: a scenery is a folder with a ${v.scenery.entries[0]??"scenery.ts"}, a model one with a ${v.model.entries[0]??"model.ts"}.`);const n=new URLSearchParams({file:o.entry});t&&n.set("camera",JSON.stringify(t));const i=k(s);return{url:i.viewer(n),probe:i.probe}}}}
2
+ import{access as E,readFile as b}from"node:fs/promises";import{basename as R,join as h}from"node:path";import{listFiles as y}from"@allyhub-next/build";import{splitTitle as S,parseDoc as O,titleText as j}from"@allyhub-next/doc";import{ITEM_KINDS as k,OUT_DIR as D,scanItems as v,scriptFileFor as I,slidesFileFor as N}from"@allyhub-next/formats";import{OpenedVersion as _,parseCombo as K}from"@allyhub-next/project";import{RPC_ERROR as d,RpcError as f}from"@allyhub-next/protocol";import{readSpec as M}from"@allyhub-next/sheet";import{comboKey as g,formatInfo as x,messagePrefix as U}from"@allyhub-next/video-core";import{rpcErrorOf as q}from"./live.js";import{loose as C}from"./paths.js";const $=n=>{const s=n.addresses?.();if(!s)throw new f(d.unavailable,"This server serves no pages: only allyhub dev's does.");return s},F=n=>({mime:"image/webp",data:n.toString("base64")});async function L(n,s,m){try{if(s.kind==="doc"){const p=await b(h(n,s.entry),"utf8");return j(S(O(p).blocks).title)||void 0}if(s.kind==="sheet"){const p=await b(h(n,s.dir,"sheet.yaml"),"utf8");return M(p).spec.title}}catch{return}return m.get(s.dir)}const W=512;export function toolHandlers(n){const{live:s}=n,m=new Map,p=async(e,t,o,r)=>{try{return await s.withSession(async a=>{const i=await _.open({root:s.root,item:e,...t===void 0?{}:{combos:[K(t)]},purpose:o,session:a});try{return await r(i)}finally{await i.close()}})}catch(a){throw q(a)}};return{"project/items":async()=>{const e=await y(s.root),t=v(e),r=t.items.some(i=>i.kind==="video"||i.kind==="slides")?await s.prepared().catch(()=>s.latest()):void 0,a=new Map;for(const i of r?.pieces??[]){const c=typeof i.title=="string"?i.title:void 0;c&&a.set(i.dir,c)}return{items:await Promise.all(t.items.map(async i=>{const c=await L(s.root,i,a);return{...i,...c?{title:c}:{}}})),folder:s.root,name:R(s.root),revision:s.revision}},"video/versions":async({item:e})=>{const{piece:t}=await s.target(e),o=[...new Set(t.combos.map(r=>r.lang))];return{piece:t.id,kind:t.kind,...typeof t.title=="string"?{title:t.title}:{},width:x(t.formatEntry)?.width??0,height:x(t.formatEntry)?.height??0,versions:o.map(r=>r===void 0?{key:g({})}:{key:g({lang:r}),lang:r})}},"slides/deck":async({item:e})=>{const{prepared:t,piece:o}=await s.target(e);if(o.kind!=="slides")throw new Error(`${e} is a video, not a deck.`);return{piece:o.id,file:N(o.dir),prefix:U(o.id),layouts:o.deck?.layouts??[],components:o.deck?.components??{},generators:o.deck?.generators??[],scripts:Object.fromEntries(t.messages.locales.map(r=>[r,I(o.dir,r)]))}},"video/stage":async({item:e,version:t,start:o,play:r,chrome:a,edit:i})=>{const{piece:c,combo:w}=await s.target(e,t),l=new URLSearchParams({piece:c.id,combo:g(w)});for(const[P,T]of Object.entries(o??{}))l.set(P,String(T));r&&l.set("play","1"),a===!1&&l.set("chrome","0"),i===!0&&l.set("edit","1");const u=$(n);return{url:u.stage(l),probe:u.probe}},"video/timeline":async({item:e,version:t})=>p(e,t,"play",o=>Promise.resolve({timeline:C(o.timeline),text:o.version.summary?.text??[]})),"video/still":async({item:e,version:t,t:o})=>p(e,t,"render",async r=>{const a=o??r.timeline.parts[0]?.still??0;return{t:a,image:F(await r.still(a,{format:"webp"})),width:r.timeline.width,height:r.timeline.height,duration:r.timeline.duration}}),"video/stills":async({item:e,version:t,moments:o})=>p(e,t,"render",async r=>{const a=[];for(const i of o){const c=await r.version.sign(i),w=`${e}\0${t??""}\0${c??""}`,l=c===void 0?void 0:m.get(w),u=l??F(await r.still(i,{format:"webp"}));c!==void 0&&!l&&(m.size>=W&&m.clear(),m.set(w,u)),a.push({t:i,image:u})}return{stills:a}}),"check/results":()=>Promise.resolve(n.checker?.state??{status:"off",revision:s.revision,problems:[],facts:[]}),"check/run":()=>{if(!n.checker)throw new f(d.unavailable,"This server runs no check.");return n.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:e,versions:t,types:o,options:r})=>{const a=await y(s.root);if(!v(a).items.some(i=>i.dir===e))throw new f(d.notFound,`There is no item ${e}.`);return{job:n.exports.start(e,t??[],o??[],r)}},"export/cancel":({job:e})=>{if(!n.exports.cancel(e))throw new f(d.notFound,`No export ${e} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:n.exports.list(),reveal:n.reveal!==void 0}),"export/reveal":async({path:e})=>{if(!n.reveal)throw new f(d.unavailable,"This server is not on the person's computer: download the file.");if(!e.startsWith(`${D}/`))throw new f(d.notFound,`${e} is no exported file.`);const t=h(s.root,e);return await E(t).catch(()=>{throw new f(d.notFound,`There is no file ${e}.`)}),await n.reveal(t),{}},"scenery/viewer":async({item:e,camera:t})=>{const o=await y(s.root),r=v(o).items.find(c=>c.dir===e&&(c.kind==="scenery"||c.kind==="model"));if(!r)throw new f(d.notFound,`There is no scenery or 3D model ${e}: a scenery is a folder with a ${k.scenery.entries[0]??"scenery.ts"}, a model one with a ${k.model.entries[0]??"model.ts"}.`);const a=new URLSearchParams({file:r.entry});t&&a.set("camera",JSON.stringify(t));const i=$(n);return{url:i.viewer(a),probe:i.probe}}}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/dev-server",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -0,0 +1,28 @@
1
+ import type * as Docx from "docx";
2
+ import type { Block } from "./model.js";
3
+ /** The docx module, as `import("docx")` gives it. */
4
+ export type DocxModule = typeof Docx;
5
+ /** What the file passes through: fflate's. */
6
+ export interface DocxZip {
7
+ unzipSync(data: Uint8Array): Record<string, Uint8Array>;
8
+ zipSync(files: Record<string, Uint8Array>, options: {
9
+ mtime: Date;
10
+ }): Uint8Array;
11
+ }
12
+ /** A picture ready for Word, in a type Word shows. */
13
+ export interface DocxPicture {
14
+ data: Uint8Array;
15
+ type: "png" | "jpg" | "gif";
16
+ /** Its size in px. */
17
+ width: number;
18
+ height: number;
19
+ }
20
+ export interface DocxOptions {
21
+ /** The document's title. */
22
+ title?: string;
23
+ /** A picture by how the doc names it; without one its words stand in. */
24
+ picture?: (src: string) => DocxPicture | undefined;
25
+ }
26
+ /** A doc's blocks as a Word document's bytes. */
27
+ export declare function docxOf(docx: DocxModule, zip: DocxZip, blocks: readonly Block[], options?: DocxOptions): Promise<Uint8Array>;
28
+ //# sourceMappingURL=docx.d.ts.map
@@ -0,0 +1,4 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{BACKGROUNDS as U,TEXT_COLORS as b}from"./html.js";import{markdownOf as le}from"./markdown.js";const k=15,S={width:11906,height:16838,top:1020,side:1134},j=S.width-2*S.side,O=360,B="Calibri",P="Courier New",W="DFDFDC",H="EFEFED",v="7F7E79",he=[48,36,28,24,24,24];function pe(r,g,a){const c=g*Math.min(a,1-a),u=m=>{const p=(m+r/30)%12;return 255*(a-c*Math.max(-1,Math.min(p-3,9-p,1)))};return[u(0),u(8),u(4)]}function M(r,g){if(r===void 0)return;const a=(g[r]??r).trim().toLowerCase(),c=/^#([0-9a-f])([0-9a-f])([0-9a-f])f?$/.exec(a);if(c)return c.slice(1).map(y=>y+y).join("").toUpperCase();const u=/^#([0-9a-f]{6})([0-9a-f]{2})?$/.exec(a);if(u?.[1]!==void 0)return u[1].toUpperCase();const m=/^(rgb|hsl)a?\(([^)]*)\)$/.exec(a),[p=NaN,o=NaN,w=NaN]=(m?.[2]??"").split(/[\s,/]+/).filter(Boolean).map(Number.parseFloat);return!m||[p,o,w].some(Number.isNaN)?void 0:(m[1]==="rgb"?[p,o,w]:pe(p,o/100,w/100)).map(y=>Math.round(Math.min(255,Math.max(0,y))).toString(16).padStart(2,"0")).join("").toUpperCase()}function fe(r){return/[\u3040-\u30ff]/u.test(r)?"Yu Gothic":/[\uac00-\ud7af]/u.test(r)?"Malgun Gothic":"Microsoft YaHei"}const me=/^(https?:|mailto:)/i,ee={indent:0,level:0},ne=r=>({indent:r.indent+O,level:Math.min(r.level+1,8)}),ge=r=>r.type==="bullet"||r.type==="numbered"||r.type==="check";function we(r,g){const a=j/k,c=Math.floor(Math.min(g??r.width,a));return{width:c,height:Math.round(c*r.height/r.width)}}function ye(r,g,a){const{AlignmentType:c,BorderStyle:u,ExternalHyperlink:m,ImageRun:p,Paragraph:o,ShadingType:w,Table:F,TableCell:y,TableLayoutType:z,TableRow:L,TextRun:D,WidthType:l}=r,E={ascii:P,hAnsi:P,cs:P,eastAsia:a},I=new Set([1]);let te=0;const C=e=>({type:w.CLEAR,color:"auto",fill:e}),G=(e,n,t=4)=>({style:e,color:n,size:t,space:4}),Y=()=>new o({spacing:{after:0,line:160},run:{size:8}}),K=e=>e==="center"?c.CENTER:e==="right"?c.RIGHT:e==="justify"?c.JUSTIFIED:void 0,Z=(e,n,t,d={})=>{const i=M(n.color,b)??t.color,s=M(n.background,U),f={...d,...n.bold||t.bold?{bold:!0}:{},...n.italic?{italics:!0}:{},...n.underline?{underline:{}}:{},...n.strike?{strike:!0}:{},...i===void 0?{}:{color:i},...t.size===void 0?{}:{size:t.size},...n.code?{font:E,shading:C(s??H)}:s===void 0?{}:{shading:C(s)}};return e.split(`
3
+ `).map((T,$)=>new D({...f,text:T,...$>0?{break:1}:{}}))},x=(e,n={})=>e.flatMap(t=>t.href!==void 0&&me.test(t.href)?[new m({link:t.href,children:Z(t.text,t.styles,n,{style:"Hyperlink"})})]:Z(t.text,t.styles,n)),q=e=>{const n=K(e?.align),t=M(e?.background,U);return{...n===void 0?{}:{alignment:n},...t===void 0?{}:{shading:C(t)}}},N=e=>e.indent===0?{}:{indent:{left:e.indent}},J=e=>{const n={style:u.SINGLE,color:e,size:4};return{top:n,bottom:n,left:n,right:n}},re=(e,n)=>{const t=M(e.look?.background,U)??H,d=M(e.look?.color,b),i=j-n.indent;return new F({width:{size:i,type:l.DXA},columnWidths:[i],...n.indent===0?{}:{indent:{size:n.indent,type:l.DXA}},rows:[new L({children:[new y({shading:C(t),borders:J(t),margins:{top:100,bottom:100,left:140,right:140,marginUnitType:l.DXA},children:[new o({children:[new D({text:`${e.icon??"💡"} `}),...x(e.content,{color:d})]}),...R(e.children??[],ee)]})]})]})},ie=(e,n)=>{const t=j-n.indent,d=Math.max(1,...e.rows.map(h=>h.length)),i=Array.from({length:d},(h,A)=>e.widths?.[A]?(e.widths[A]??0)*k:void 0),s=i.reduce((h,A)=>h+(A??0),0),f=i.filter(h=>h===void 0).length,T=f===0?0:Math.max(t-s,0)/f,$=i.map(h=>h??T),de=$.reduce((h,A)=>h+A,0)||1,ae=Math.min(1,t/de),X=$.map(h=>Math.round(h*ae)),Q=e.head===void 0||e.head==="both",ue=e.head==="column"||e.head==="both";return new F({layout:z.FIXED,width:{size:X.reduce((h,A)=>h+A,0),type:l.DXA},columnWidths:X,...n.indent===0?{}:{indent:{size:n.indent,type:l.DXA}},rows:e.rows.map((h,A)=>new L({tableHeader:Q&&A===0,children:Array.from({length:d},(Te,_)=>{const V=Q&&A===0||ue&&_===0;return new y({width:{size:X[_]??0,type:l.DXA},borders:J(W),margins:{top:60,bottom:60,left:100,right:100,marginUnitType:l.DXA},...V?{shading:C(H)}:{},children:[new o({spacing:{after:0},children:x(h[_]??[],{bold:V})})]})})}))})},oe=(e,n)=>{const t=K(e.align),d={...N(n),...t===void 0?{}:{alignment:t}},i=g.picture?.(e.src),s=e.alt??e.caption??e.src,f=[new o({...d,keepNext:e.caption!==void 0,children:i?[new p({type:i.type,data:i.data,transformation:we(i,e.width),altText:{name:e.alt??"",title:e.caption??e.alt??"",description:e.alt??""}})]:[new D({text:s,color:v})]})];return e.caption!==void 0&&i&&f.push(new o({...d,children:[new D({text:e.caption,color:v,size:20})]})),f},se=(e,n,t)=>{const d=M(e.look?.color,b),i=R(e.children??[],ne(n)),s=q(e.look);return e.type==="check"?[new o({...s,...N(n),children:[new D({text:e.checked?"☑ ":"☐ "}),...x(e.content,{color:d})]}),...i]:[new o({...s,...e.type==="bullet"?{bullet:{level:n.level}}:{numbering:{reference:`start-${String(t.start)}`,level:n.level,instance:t.id}},children:x(e.content,{color:d})}),...i]},ce=(e,n)=>{const t="look"in e?e.look:void 0,d=M(t?.color,b),i=q(t),s=()=>"children"in e?R(e.children??[],ne(n)):[];switch(e.type){case"paragraph":case"toggle":return[new o({...i,...N(n),children:x(e.content,{color:d})}),...s()];case"heading":return[new o({...i,...N(n),heading:r.HeadingLevel[`HEADING_${String(e.level)}`],children:x(e.content,{color:d})}),...s()];case"quote":return[new o({...i,indent:{left:n.indent+O},border:{left:G(u.SINGLE,W,18)},children:x(e.content,{color:d??"605F5A"})}),...s()];case"callout":return[re(e,n),Y()];case"code":return[new o({...N(n),shading:C(H),keepLines:!0,children:e.code.split(`
4
+ `).map((f,T)=>new D({text:f,font:E,size:19,...T>0?{break:1}:{}}))})];case"image":return oe(e,n);case"table":return[ie(e,n),Y()];case"divider":return[new o({...N(n),border:{bottom:G(u.SINGLE,W)}})];case"embed":{const f=/^<\s*([A-Za-z][\w.]*)/.exec(e.source.trim())?.[1],T=G(u.DASHED,"A8A29E");return[new o({...N(n),alignment:c.CENTER,border:{top:T,bottom:T,left:T,right:T},children:[new D({text:f??"",color:v})]})]}case"source":return[];case"bullet":case"numbered":case"check":return[]}};function R(e,n){const t=[];let d,i;for(const s of e){if(!ge(s)){d=void 0,i=void 0,t.push(...ce(s,n));continue}if(d===void 0||i===void 0||i.type==="numbered"!=(s.type==="numbered")){const f=s.type==="numbered"?s.start??1:1;I.add(f),d={id:++te,start:f}}i=s,t.push(...se(s,n,d))}return t}return{body:e=>R(e,ee),numbering:()=>[...I].sort((e,n)=>e-n).map(e=>({reference:`start-${String(e)}`,levels:Array.from({length:9},(n,t)=>({level:t,format:[r.LevelFormat.DECIMAL,r.LevelFormat.LOWER_LETTER,r.LevelFormat.LOWER_ROMAN][t%3]??r.LevelFormat.DECIMAL,text:`%${String(t+1)}.`,alignment:c.LEFT,...t===0?{start:e}:{},style:{paragraph:{indent:{left:(t+1)*O,hanging:O}}}}))}))}}const Ee="1980-01-01T00:00:00Z";function Ae(r,g){const a=g.unzipSync(r),c=l=>{const E=a[l];return E&&new TextDecoder().decode(E)},u=(l,E)=>{a[l]=new TextEncoder().encode(E)},m="word/document.xml",p="word/_rels/document.xml.rels";let o=c(m)??"",w=c(p)??"";[...new Set([...o.matchAll(/w:hyperlink [^>]*r:id="([^"]+)"/g)].map(l=>l[1]??""))].forEach((l,E)=>{const I=`rIdLink${String(E+1)}`;o=o.split(`"${l}"`).join(`"${I}"`),w=w.split(`"${l}"`).join(`"${I}"`)});let y=0;o=o.replace(/<wp:docPr id="\d+"/g,()=>`<wp:docPr id="${String(++y)}"`),u(m,o),u(p,w);const z="docProps/core.xml",L=c(z);L!==void 0&&u(z,L.replace(/(<dcterms:(?:created|modified)[^>]*>)[^<]*/g,`$1${Ee}`));const D=Object.fromEntries(Object.entries(a).sort(([l],[E])=>l<E?-1:1));return g.zipSync(D,{mtime:new Date(1980,0,1)})}export async function docxOf(r,g,a,c={}){const u=fe(le(a)),m={ascii:B,hAnsi:B,cs:B,eastAsia:u},p=ye(r,c,u),o=p.body(a),w={spacing:{after:160,line:276}},F=new r.Document({creator:"AllyHub",lastModifiedBy:"AllyHub",...c.title===void 0?{}:{title:c.title},numbering:{config:p.numbering()},styles:{default:{document:{run:{font:m,size:22},paragraph:w},hyperlink:{run:{color:"015FCE",underline:{}}},...Object.fromEntries(he.map((z,L)=>[`heading${String(L+1)}`,{run:{size:z,bold:!0,font:m,color:"000000"},paragraph:{spacing:{before:280,after:120}}}]))}},sections:[{properties:{page:{size:{width:S.width,height:S.height},margin:{top:S.top,bottom:S.top,left:S.side,right:S.side}}},children:o}]}),y=await r.Packer.toBuffer(F);return Ae(new Uint8Array(y),g)}
@@ -13,6 +13,9 @@ export interface DocHtmlOptions {
13
13
  */
14
14
  fonts?: string;
15
15
  }
16
+ /** The colours a doc names, as the editor shows them. */
17
+ export declare const TEXT_COLORS: Record<string, string>;
18
+ export declare const BACKGROUNDS: Record<string, string>;
16
19
  /** The page's own styles: type that reads on paper, and where a page may break. */
17
20
  export declare const DOC_CSS = "\n@page { size: A4; margin: 18mm 20mm; }\n* { box-sizing: border-box; }\nhtml { font-size: 11pt; }\nbody { margin: 0; color: #1b1b19; font-family: \"Commissioner Variable\", Commissioner, \"Noto Sans SC\", \"PingFang SC\", \"Microsoft YaHei\", system-ui, sans-serif; line-height: 1.6; font-variation-settings: \"FLAR\" 40; -webkit-print-color-adjust: exact; print-color-adjust: exact; }\nmain { max-width: 170mm; margin: 0 auto; }\nh1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 1.4em 0 0.4em; break-after: avoid; }\n/* As the editor sets them: first-level headings, the title among them, in the serif. */\nh1 { font-family: \"Piazzolla Variable\", Piazzolla, \"Noto Serif SC\", \"Songti SC\", Georgia, serif; font-size: 1.75em; font-weight: 600; letter-spacing: -0.01em; }\n/* The heading a doc opens with is its title. */\nbody > h1:first-child, main > h1:first-child, article > h1:first-child { font-size: 2.3em; margin-top: 0; }\nh2 { font-size: 1.45em; }\nh3 { font-size: 1.15em; }\nh4, h5, h6 { font-size: 1em; }\np { margin: 0.5em 0; }\nul, ol { margin: 0.5em 0; padding-left: 1.5em; }\nli { margin: 0.2em 0; }\nli.task { list-style: none; margin-left: -1.5em; }\nli.task .box { display: inline-block; width: 1.5em; }\n.under { margin-left: 1.5em; }\nblockquote { margin: 0.8em 0; padding-left: 1em; border-left: 3px solid #dfdfdc; color: #605f5a; }\ncode { font-family: \"JetBrains Mono Variable\", \"JetBrains Mono\", \"SF Mono\", Menlo, Consolas, monospace; font-size: 0.9em; background: #efefed; border-radius: 3px; padding: 0.1em 0.3em; }\npre { background: #efefed; border-radius: 6px; padding: 0.8em 1em; overflow: hidden; white-space: pre-wrap; break-inside: avoid; }\npre code { background: none; padding: 0; }\ntable { border-collapse: collapse; width: 100%; margin: 0.8em 0; break-inside: avoid; }\nth, td { border: 1px solid #dfdfdc; padding: 0.35em 0.6em; text-align: left; vertical-align: top; }\nth { background: #efefed; font-weight: 600; }\nfigure { margin: 1em 0; break-inside: avoid; }\nimg { max-width: 100%; }\nfigcaption { color: #7f7e79; font-size: 0.9em; margin-top: 0.3em; }\nhr { border: 0; border-top: 1px solid #dfdfdc; margin: 1.5em 0; }\na { color: #015fce; }\n.callout { display: flex; gap: 0.6em; margin: 0.8em 0; border-radius: 6px; background: #efefed; padding: 0.7em 0.9em; break-inside: avoid; }\n.callout-icon { flex: none; }\n.callout p { margin: 0; }\n.embed { border: 1px dashed #a8a29e; border-radius: 6px; padding: 1.5em; text-align: center; color: #7f7e79; break-inside: avoid; }\ntr, li, p { break-inside: avoid; }\n";
18
21
  /** A doc's blocks as one HTML page. */
@@ -1,5 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- const k={gray:"#9b9a97",brown:"#64473a",red:"#e03e3e",orange:"#d9730d",yellow:"#dfab01",green:"#4d6461",blue:"#0b6e99",purple:"#6940a5",pink:"#ad1a72"},y={gray:"#ebeced",brown:"#e9e5e3",red:"#fbe4e4",orange:"#f6e9d9",yellow:"#fbf3db",green:"#ddedea",blue:"#ddebf1",purple:"#eae4f2",pink:"#f4dfeb"},s=i=>i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),h=(i,o)=>o[i]??(/^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl)a?\([\d\s.,%/]+\))$/i.test(i)?i:void 0);function c(i){return i.map(o=>{let n=s(o.text).replace(/\n/g,"<br>");const t=o.styles;t.code&&(n=`<code>${n}</code>`),t.strike&&(n=`<s>${n}</s>`),t.italic&&(n=`<em>${n}</em>`),t.bold&&(n=`<strong>${n}</strong>`),t.underline&&(n=`<u>${n}</u>`);const r=t.color===void 0?void 0:h(t.color,k),e=t.background===void 0?void 0:h(t.background,y);return(r!==void 0||e!==void 0)&&(n=`<span style="${r===void 0?"":`color:${r};`}${e===void 0?"":`background:${e};`}">${n}</span>`),o.href!==void 0&&/^(https?:|mailto:|#|\/|\.)/i.test(o.href)&&(n=`<a href="${s(o.href)}">${n}</a>`),n}).join("")}function f(i){if(!i)return"";const o=i.color===void 0?void 0:h(i.color,k),n=i.background===void 0?void 0:h(i.background,y),t=[i.align===void 0?"":`text-align:${i.align};`,o===void 0?"":`color:${o};`,n===void 0?"":`background:${n};padding:0.15em 0.4em;border-radius:3px;`].join("");return t===""?"":` style="${t}"`}const x=i=>i.type==="bullet"||i.type==="numbered"||i.type==="check";function b(i,o,n){const t=[];let r=0;for(;r<i.length;){const e=i[r];if(e===void 0)break;if(x(e)){const a=e.type==="numbered";let l=r;const m=[];for(;l<i.length;){const d=i[l];if(!d||!x(d)||d.type==="numbered"!==a)break;const g=d.type==="check"?`<span class="box">${d.checked?"☑":"☐"}</span>`:"";m.push(`<li${d.type==="check"?' class="task"':""}${f(d.look)}>${g}${c(d.content)}${b(d.children??[],o,n)}</li>`),l++}const p=e.type==="numbered"&&e.start!==void 0?` start="${String(e.start)}"`:"";t.push(a?`<ol${p}>${m.join("")}</ol>`:`<ul>${m.join("")}</ul>`),r=l;continue}switch(r++,e.type){case"paragraph":t.push(`<p${f(e.look)}>${c(e.content)||"&nbsp;"}</p>${u(e.children,o,n)}`);break;case"heading":{const a=`h${String(e.level)}`;t.push(`<${a}${f(e.look)}>${c(e.content)}</${a}>${u(e.children,o,n)}`);break}case"toggle":t.push(`<p${f(e.look)}>${c(e.content)}</p>${u(e.children,o,n)}`);break;case"quote":t.push(`<blockquote${f(e.look)}><p>${c(e.content)}</p>${b(e.children??[],o,n)}</blockquote>`);break;case"callout":t.push(`<div class="callout"${f(e.look)}><span class="callout-icon">${s(e.icon??"💡")}</span><div><p>${c(e.content)}</p>${b(e.children??[],o,n)}</div></div>`);break;case"code":t.push(`<pre><code>${s(e.code)}</code></pre>`);break;case"image":{const a=o.image?.(e.src)??e.src;t.push(`<figure${e.align===void 0?"":` style="text-align:${e.align}"`}><img src="${s(a)}" alt="${s(e.alt??"")}"${e.width===void 0?"":` width="${String(e.width)}"`}>${e.caption===void 0?"":`<figcaption>${s(e.caption)}</figcaption>`}</figure>`);break}case"table":{const a=e.head===void 0||e.head==="both",l=e.head==="column"||e.head==="both",m=(d,g)=>`<tr>${d.map((w,z)=>{const $=g||l&&z===0?"th":"td";return`<${$}>${c(w)}</${$}>`}).join("")}</tr>`,p=e.widths?.some(d=>d!==null)?`<colgroup>${e.widths.map(d=>d===null?"<col>":`<col style="width:${String(d)}px">`).join("")}</colgroup>`:"";t.push(`<table>${p}<tbody>${e.rows.map((d,g)=>m(d,a&&g===0)).join("")}</tbody></table>`);break}case"divider":t.push("<hr>");break;case"embed":{const a=o.embed?.(e.source,n.embeds);n.embeds++;const l=/^<\s*([A-Za-z][\w.]*)/.exec(e.source.trim())?.[1];t.push(a??`<div class="embed" data-embed>${s(l??"")}</div>`);break}case"source":break}}return t.join(`
2
+ export const TEXT_COLORS={gray:"#9b9a97",brown:"#64473a",red:"#e03e3e",orange:"#d9730d",yellow:"#dfab01",green:"#4d6461",blue:"#0b6e99",purple:"#6940a5",pink:"#ad1a72"},BACKGROUNDS={gray:"#ebeced",brown:"#e9e5e3",red:"#fbe4e4",orange:"#f6e9d9",yellow:"#fbf3db",green:"#ddedea",blue:"#ddebf1",purple:"#eae4f2",pink:"#f4dfeb"};const s=i=>i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),h=(i,o)=>o[i]??(/^(#[0-9a-f]{3,8}|[a-z]+|(rgb|hsl)a?\([\d\s.,%/]+\))$/i.test(i)?i:void 0);function c(i){return i.map(o=>{let n=s(o.text).replace(/\n/g,"<br>");const t=o.styles;t.code&&(n=`<code>${n}</code>`),t.strike&&(n=`<s>${n}</s>`),t.italic&&(n=`<em>${n}</em>`),t.bold&&(n=`<strong>${n}</strong>`),t.underline&&(n=`<u>${n}</u>`);const r=t.color===void 0?void 0:h(t.color,TEXT_COLORS),e=t.background===void 0?void 0:h(t.background,BACKGROUNDS);return(r!==void 0||e!==void 0)&&(n=`<span style="${r===void 0?"":`color:${r};`}${e===void 0?"":`background:${e};`}">${n}</span>`),o.href!==void 0&&/^(https?:|mailto:|#|\/|\.)/i.test(o.href)&&(n=`<a href="${s(o.href)}">${n}</a>`),n}).join("")}function f(i){if(!i)return"";const o=i.color===void 0?void 0:h(i.color,TEXT_COLORS),n=i.background===void 0?void 0:h(i.background,BACKGROUNDS),t=[i.align===void 0?"":`text-align:${i.align};`,o===void 0?"":`color:${o};`,n===void 0?"":`background:${n};padding:0.15em 0.4em;border-radius:3px;`].join("");return t===""?"":` style="${t}"`}const k=i=>i.type==="bullet"||i.type==="numbered"||i.type==="check";function b(i,o,n){const t=[];let r=0;for(;r<i.length;){const e=i[r];if(e===void 0)break;if(k(e)){const a=e.type==="numbered";let l=r;const m=[];for(;l<i.length;){const d=i[l];if(!d||!k(d)||d.type==="numbered"!==a)break;const g=d.type==="check"?`<span class="box">${d.checked?"☑":"☐"}</span>`:"";m.push(`<li${d.type==="check"?' class="task"':""}${f(d.look)}>${g}${c(d.content)}${b(d.children??[],o,n)}</li>`),l++}const p=e.type==="numbered"&&e.start!==void 0?` start="${String(e.start)}"`:"";t.push(a?`<ol${p}>${m.join("")}</ol>`:`<ul>${m.join("")}</ul>`),r=l;continue}switch(r++,e.type){case"paragraph":t.push(`<p${f(e.look)}>${c(e.content)||"&nbsp;"}</p>${u(e.children,o,n)}`);break;case"heading":{const a=`h${String(e.level)}`;t.push(`<${a}${f(e.look)}>${c(e.content)}</${a}>${u(e.children,o,n)}`);break}case"toggle":t.push(`<p${f(e.look)}>${c(e.content)}</p>${u(e.children,o,n)}`);break;case"quote":t.push(`<blockquote${f(e.look)}><p>${c(e.content)}</p>${b(e.children??[],o,n)}</blockquote>`);break;case"callout":t.push(`<div class="callout"${f(e.look)}><span class="callout-icon">${s(e.icon??"💡")}</span><div><p>${c(e.content)}</p>${b(e.children??[],o,n)}</div></div>`);break;case"code":t.push(`<pre><code>${s(e.code)}</code></pre>`);break;case"image":{const a=o.image?.(e.src)??e.src;t.push(`<figure${e.align===void 0?"":` style="text-align:${e.align}"`}><img src="${s(a)}" alt="${s(e.alt??"")}"${e.width===void 0?"":` width="${String(e.width)}"`}>${e.caption===void 0?"":`<figcaption>${s(e.caption)}</figcaption>`}</figure>`);break}case"table":{const a=e.head===void 0||e.head==="both",l=e.head==="column"||e.head==="both",m=(d,g)=>`<tr>${d.map((y,x)=>{const $=g||l&&x===0?"th":"td";return`<${$}>${c(y)}</${$}>`}).join("")}</tr>`,p=e.widths?.some(d=>d!==null)?`<colgroup>${e.widths.map(d=>d===null?"<col>":`<col style="width:${String(d)}px">`).join("")}</colgroup>`:"";t.push(`<table>${p}<tbody>${e.rows.map((d,g)=>m(d,a&&g===0)).join("")}</tbody></table>`);break}case"divider":t.push("<hr>");break;case"embed":{const a=o.embed?.(e.source,n.embeds);n.embeds++;const l=/^<\s*([A-Za-z][\w.]*)/.exec(e.source.trim())?.[1];t.push(a??`<div class="embed" data-embed>${s(l??"")}</div>`);break}case"source":break}}return t.join(`
3
3
  `)}const u=(i,o,n)=>i?.length?`<div class="under">${b(i,o,n)}</div>`:"";export const DOC_CSS=`
4
4
  @page { size: A4; margin: 18mm 20mm; }
5
5
  * { box-sizing: border-box; }
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@allyhub-next/doc",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
8
  "default": "./dist/index.js"
9
+ },
10
+ "./docx": {
11
+ "types": "./dist/docx.d.ts",
12
+ "default": "./dist/docx.js"
9
13
  }
10
14
  },
11
15
  "private": true,
@@ -0,0 +1,24 @@
1
+ import { fontStyles } from "@allyhub-next/build";
2
+ import { type DrawnDeck, type ResolvedSlide, type Theme } from "@allyhub-next/slides-core";
3
+ import { type EmbeddedFont } from "@allyhub-next/slides-pptx";
4
+ interface Face {
5
+ family: string;
6
+ italic: boolean;
7
+ weight: number;
8
+ file: string;
9
+ /** Its unicode-range, as code point pairs; empty for all of them. */
10
+ range: [number, number][];
11
+ }
12
+ /** A stylesheet's @font-face rules. */
13
+ export declare function facesOf(css: string, dir: string): Face[];
14
+ export interface DeckFonts {
15
+ fonts: EmbeddedFont[];
16
+ /** Those the file does not carry, and why. */
17
+ left: {
18
+ font: string;
19
+ why: string;
20
+ }[];
21
+ }
22
+ export declare function deckFonts(deck: DrawnDeck<ResolvedSlide, Theme>, root: string, config: Parameters<typeof fontStyles>[1]): Promise<DeckFonts>;
23
+ export {};
24
+ //# sourceMappingURL=deck-fonts.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{readFile as x}from"node:fs/promises";import{dirname as M,isAbsolute as A,join as O,resolve as N}from"node:path";import{fontStyles as j}from"@allyhub-next/build";import{STANDARD_FONTS as _,fontFace as F}from"@allyhub-next/slides-core";import{fontInfo as $,refusedEmbedding as k}from"@allyhub-next/slides-pptx";import{decompress as v}from"wawoff2";const h=(n,e)=>new RegExp(`${e}\\s*:\\s*([^;]+)`,"iu").exec(n)?.[1]?.trim();export function facesOf(n,e){return[...n.matchAll(/@font-face\s*\{([^}]*)\}/giu)].flatMap(s=>{const o=s[1]??"",f=h(o,"font-family")?.replace(/^["']|["']$/gu,""),a=/url\(\s*["']?([^"')]+)["']?\s*\)/iu.exec(o)?.[1];if(f===void 0||a===void 0)return[];const r=h(o,"font-weight")??"400";return[{family:f,italic:/italic|oblique/iu.test(h(o,"font-style")??""),weight:r==="bold"?700:Number.parseInt(r,10)||400,file:A(a)?a:N(e,a.split(/[?#]/u)[0]??a),range:(h(o,"unicode-range")??"").split(",").flatMap(t=>{const i=/U\+([0-9A-F?]+)(?:-([0-9A-F]+))?/iu.exec(t.trim());if(!i?.[1])return[];const c=Number.parseInt(i[1].replaceAll("?","0"),16),p=i[2]?Number.parseInt(i[2],16):Number.parseInt(i[1].replaceAll("?","F"),16);return[[c,p]]})}]})}const g=(n,e)=>n.range.some(([s,o])=>s<=e&&e<=o);function m(n,e,s,o){const f=n.filter(t=>t.italic===e&&t.weight>=o),a=Math.min(...f.map(t=>Math.abs(t.weight-s))),r=f.filter(t=>Math.abs(t.weight-s)===a);return r.find(t=>t.range.length===0||g(t,65))??r[0]}async function C(n){const e=new Uint8Array(await x(n)),s=String.fromCharCode(...e.subarray(0,4));if(s==="wOF2")return(await v(e)).slice();if(s!=="wOFF")return e}const S=n=>[...n.text?[n.text]:[],...n.table?.rows.flatMap(e=>e.cells.map(s=>s.text))??[]];function D(n){const e=new Set;for(const s of n.slides)for(const o of s.shapes)for(const f of S(o))for(const a of f.paragraphs)for(const r of a.runs)for(const t of r.text)e.add(t.codePointAt(0)??0);for(const s of n.slides)for(const{chart:o}of s.shapes)if(o)for(const f of[o.title??"",...o.categories,...o.series.map(a=>a.name),"0123456789.,-%"].join(""))e.add(f.codePointAt(0)??0);return e}function E(n){const e=n.theme.fonts,s=new Set([e.major,e.minor,e.major_east_asian,e.minor_east_asian].map(F)),o=f=>{f!==void 0&&!f.startsWith("+")&&s.add(F(f))};for(const f of n.slides)for(const a of f.shapes)for(const r of S(a)){for(const t of r.style.levels)o(t.font.name);for(const t of r.paragraphs){o(t.font?.name);for(const i of t.runs)o(i.font?.name)}}return s}export async function deckFonts(n,e,s){const o=[];for(const t of j(e,s).styles){const i=A(t)?t:O(e,t),c=await x(i,"utf8").catch(()=>"");o.push(...facesOf(c,M(i)))}const f=new Set(_),a=D(n),r={fonts:[],left:[]};for(const t of E(n)){if(f.has(t))continue;const i=o.filter(l=>l.family===t);if(i.length===0){r.left.push({font:t,why:"the project has no file of it"});continue}const c={typeface:t},p=[["regular",m(i,!1,400,0)],["bold",m(i,!1,700,600)],["italic",m(i,!0,400,0)],["boldItalic",m(i,!0,700,600)]];for(const[l,u]of p){if(!u)continue;const d=await C(u.file).catch(()=>{}),y=d&&$(d);if(!d||!y){r.left.push({font:t,why:`${u.file} is not a font this reads`});continue}const b=k(y);b!==void 0?r.left.push({font:t,why:b}):c[l]=d}(c.regular??c.bold??c.italic??c.boldItalic)&&r.fonts.push(c);const I=p.flatMap(([,l])=>l??[]),w=[...a].filter(l=>i.some(u=>g(u,l))&&!I.some(u=>u.range.length===0||g(u,l)));w.length>0&&r.left.push({font:t,why:`${String(w.length)} of the deck's characters are in slices of its files that do not go in`})}return r}
@@ -0,0 +1,12 @@
1
+ import type { OpenedVersion } from "@allyhub-next/project";
2
+ export declare function renderDeckPptx(v: OpenedVersion, out: string, o?: {
3
+ /** Only this slide (by its place, from 0), shown even if it is hidden: a file of one slide, for another app to draw. */
4
+ only?: number;
5
+ }): Promise<{
6
+ files: string[];
7
+ fontsLeft: {
8
+ font: string;
9
+ why: string;
10
+ }[];
11
+ } | undefined>;
12
+ //# sourceMappingURL=deck-pptx.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{execFile as B}from"node:child_process";import{mkdir as K,mkdtemp as T,readFile as _,rm as U,writeFile as b}from"node:fs/promises";import{tmpdir as V}from"node:os";import{dirname as $,join as p}from"node:path";import{promisify as q}from"node:util";import{cropImage as C,ffmpegOf as G,finalStill as N,readPng as I,writePng as L}from"@allyhub-next/render";import{clockOf as H,DECK_FPS as J,SLIDE_SECONDS as Q}from"@allyhub-next/slides-core";import{filesOf as R,picturedShapes as W,writePptx as X}from"@allyhub-next/slides-pptx";import{deckFonts as Y}from"./deck-fonts.js";const Z=q(B),ee=Q,y=J/2;async function te(t){const o=await T(p(V(),"allyhub-deck-movie-"));try{await Promise.all(t.map((s,m)=>b(p(o,`${String(m).padStart(5,"0")}.png`),s)));const c=p(o,"movie.mp4");return await Z(await G(),["-y","-loglevel","error","-framerate",String(y),"-i",p(o,"%05d.png"),"-vf","pad=ceil(iw/2)*2:ceil(ih/2)*2","-c:v","libx264","-crf","18","-pix_fmt","yuv420p","-movflags","+faststart",c]),new Uint8Array(await _(c))}finally{await U(o,{recursive:!0,force:!0})}}async function ie(t){return await t.graphics().deck?.()}export async function renderDeckPptx(t,o,c={}){const s=await ie(t);if(!s)return;const m=c.only===void 0?void 0:s.slides[c.only];if(c.only!==void 0&&!m)return;const f=m?{...s,slides:[{...m,hidden:!1}]}:s,d=t.graphics(),a=d.timeline.width/f.width,w=new Map,k=W(f);for(const e of new Set(k.map(r=>r.slide))){const r=d.timeline.parts.find(n=>n.key===e);if(!r)continue;const u=I(await N(d,r.still,{target:t.target,look:t.look,media:t.media}));for(const n of k.filter(l=>l.slide===e)){const l=C(u,[n.frame.left*a,n.frame.top*a,n.frame.width*a,n.frame.height*a]);l&&w.set(n.key,L(l))}}const S=new Map;for(const e of k){const r=f.slides.find(i=>i.id===e.slide),u=r?.shapes.find(i=>i.name===e.shape),n=d.timeline.parts.find(i=>i.key===e.slide);if(!r||!n||!u?.component)continue;const l=[e.frame.left*a,e.frame.top*a,e.frame.width*a,e.frame.height*a],z=H(r,s.slides[0]?.id===r.id),M=n.start+z.comesOn(u.name),E=async i=>{const h=I(await N(d,i,{target:t.target,look:t.look,media:t.media})),D=C(h,l);return D?L(D):void 0},g=await E(M),F=w.get(e.key);if(!g||!F||Buffer.compare(g,F)===0)continue;const O=[g],A=Math.ceil(ee*y);for(let i=1;i<A;i++){const h=await E(M+i/y);h&&O.push(h)}S.set(e.key,{bytes:await te(O),seconds:O.length/y}),w.set(e.key,g)}const P=new Map;for(const e of R(f))try{P.set(e,await _(p(t.prepared.root,e)))}catch{}const x=d.timeline.parts[0]?.title,{fonts:j,left:v}=await Y(f,t.prepared.root,t.prepared.config);return await K($(o),{recursive:!0}),await b(o,X({deck:f,file:e=>P.get(e),pictures:w,...S.size>0?{movies:S}:{},fonts:j,...x===void 0?{}:{title:x}})),{files:[o],fontsLeft:v}}