allyhub 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (632) hide show
  1. package/dist/audio-text.js +1 -1
  2. package/dist/commands/add.js +2 -2
  3. package/dist/commands/cloud-tools.js +5 -5
  4. package/dist/commands/dev.js +1 -1
  5. package/dist/commands/frames/piece.js +1 -1
  6. package/dist/commands/frames/sheet.js +1 -1
  7. package/dist/commands/frames.js +8 -8
  8. package/dist/commands/index.js +1 -1
  9. package/dist/commands/inspect/common.js +1 -1
  10. package/dist/commands/inspect/layout.js +1 -1
  11. package/dist/commands/render.js +1 -1
  12. package/dist/commands/sheet.js +5 -5
  13. package/dist/commands/site.js +3 -2
  14. package/dist/commands/skills.js +3 -3
  15. package/dist/commands/slides.js +2 -2
  16. package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
  17. package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
  18. package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
  19. package/dist/node_modules/@allyhub-next/browser/dist/html.js +1 -1
  20. package/dist/node_modules/@allyhub-next/browser/package.json +1 -1
  21. package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +4 -0
  22. package/dist/node_modules/@allyhub-next/build/dist/content.js +1 -1
  23. package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +2 -2
  24. package/dist/node_modules/@allyhub-next/build/dist/index.js +1 -1
  25. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +2 -2
  26. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +3 -3
  27. package/dist/node_modules/@allyhub-next/build/dist/move-refs.d.ts +1 -1
  28. package/dist/node_modules/@allyhub-next/build/dist/move-refs.js +1 -1
  29. package/dist/node_modules/@allyhub-next/build/dist/plugin.d.ts +12 -3
  30. package/dist/node_modules/@allyhub-next/build/dist/plugin.js +7 -6
  31. package/dist/node_modules/@allyhub-next/build/dist/prepare.d.ts +9 -5
  32. package/dist/node_modules/@allyhub-next/build/dist/prepare.js +2 -2
  33. package/dist/node_modules/@allyhub-next/build/dist/vite.d.ts +10 -0
  34. package/dist/node_modules/@allyhub-next/build/dist/vite.js +2 -2
  35. package/dist/node_modules/@allyhub-next/build/package.json +1 -1
  36. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
  37. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
  38. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
  39. package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
  40. package/dist/node_modules/@allyhub-next/check/dist/check.js +3 -3
  41. package/dist/node_modules/@allyhub-next/check/package.json +1 -1
  42. package/dist/node_modules/@allyhub-next/cloud/dist/blobs.js +2 -0
  43. package/dist/node_modules/@allyhub-next/cloud/dist/call.js +4 -2
  44. package/dist/node_modules/@allyhub-next/cloud/dist/client.js +1 -1
  45. package/dist/node_modules/@allyhub-next/cloud/dist/errors.js +1 -1
  46. package/dist/node_modules/@allyhub-next/cloud/dist/hashes.js +2 -0
  47. package/dist/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
  48. package/dist/node_modules/@allyhub-next/cloud/dist/sites.js +2 -0
  49. package/dist/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
  50. package/dist/node_modules/@allyhub-next/cloud/package.json +1 -1
  51. package/dist/node_modules/@allyhub-next/components/package.json +1 -1
  52. package/dist/node_modules/@allyhub-next/components/r/caption-subtitle.json +1 -1
  53. package/dist/node_modules/@allyhub-next/components/src/caption-subtitle.ts +54 -16
  54. package/dist/node_modules/@allyhub-next/dev-server/dist/background.js +1 -1
  55. package/dist/node_modules/@allyhub-next/dev-server/dist/fonts.js +2 -0
  56. package/dist/node_modules/@allyhub-next/dev-server/dist/index.js +1 -1
  57. package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
  58. package/dist/node_modules/@allyhub-next/dev-server/dist/project.js +1 -1
  59. package/dist/node_modules/@allyhub-next/dev-server/dist/reach.js +2 -0
  60. package/dist/node_modules/@allyhub-next/dev-server/dist/record.js +2 -0
  61. package/dist/node_modules/@allyhub-next/dev-server/dist/server.js +2 -2
  62. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
  63. package/dist/node_modules/@allyhub-next/dev-server/dist/tree.js +2 -0
  64. package/dist/node_modules/@allyhub-next/dev-server/dist/writer.js +2 -2
  65. package/dist/node_modules/@allyhub-next/dev-server/package.json +1 -1
  66. package/dist/node_modules/@allyhub-next/doc/package.json +1 -1
  67. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.js +1 -1
  68. package/dist/node_modules/@allyhub-next/export/dist/export.js +5 -5
  69. package/dist/node_modules/@allyhub-next/export/dist/index.js +1 -1
  70. package/dist/node_modules/@allyhub-next/export/package.json +1 -1
  71. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
  72. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
  73. package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
  74. package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
  75. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +69 -18
  76. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
  77. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +847 -116
  78. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
  79. package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
  80. package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
  81. package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +3 -0
  82. package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
  83. package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
  84. package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  85. package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
  86. package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
  87. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +501 -38
  88. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
  89. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
  90. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
  91. package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
  92. package/dist/node_modules/@allyhub-next/measure/package.json +1 -1
  93. package/dist/node_modules/@allyhub-next/media/dist/index.d.ts +1 -1
  94. package/dist/node_modules/@allyhub-next/media/dist/index.js +1 -1
  95. package/dist/node_modules/@allyhub-next/media/dist/sheet.d.ts +2 -0
  96. package/dist/node_modules/@allyhub-next/media/dist/sheet.js +7 -7
  97. package/dist/node_modules/@allyhub-next/media/package.json +1 -1
  98. package/dist/node_modules/@allyhub-next/model/package.json +1 -1
  99. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
  100. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
  101. package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
  102. package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
  103. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
  104. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
  105. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
  106. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
  107. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
  108. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
  109. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
  110. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
  111. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
  112. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
  113. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
  114. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
  115. package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
  116. package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
  117. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
  118. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
  119. package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
  120. package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
  121. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
  122. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
  123. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
  124. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
  125. package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
  126. package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
  127. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
  128. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
  129. package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
  130. package/dist/node_modules/@allyhub-next/project/dist/deck-keys.js +2 -0
  131. package/dist/node_modules/@allyhub-next/project/dist/deck-measure.js +2 -0
  132. package/dist/node_modules/@allyhub-next/project/dist/deck-pool.js +2 -0
  133. package/dist/node_modules/@allyhub-next/project/dist/index.js +1 -1
  134. package/dist/node_modules/@allyhub-next/project/dist/session.js +1 -1
  135. package/dist/node_modules/@allyhub-next/project/dist/stills.js +2 -0
  136. package/dist/node_modules/@allyhub-next/project/package.json +1 -1
  137. package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
  138. package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
  139. package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
  140. package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  141. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
  142. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
  143. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
  144. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
  145. package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +79 -5
  146. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
  147. package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
  148. package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
  149. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  150. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +21 -0
  151. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
  152. package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
  153. package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
  154. package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
  155. package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
  156. package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
  157. package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
  158. package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
  159. package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
  160. package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
  161. package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
  162. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +396 -0
  163. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
  164. package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
  165. package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
  166. package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
  167. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
  168. package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
  169. package/dist/node_modules/@allyhub-next/registry/package.json +1 -1
  170. package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.js +3 -2
  171. package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +1 -1
  172. package/dist/node_modules/@allyhub-next/render/dist/doc/pdf.js +34 -0
  173. package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +4 -4
  174. package/dist/node_modules/@allyhub-next/render/dist/exports.js +2 -2
  175. package/dist/node_modules/@allyhub-next/render/dist/pdf.js +2 -0
  176. package/dist/node_modules/@allyhub-next/render/package.json +1 -1
  177. package/dist/node_modules/@allyhub-next/runtime/dist/fonts.js +1 -1
  178. package/dist/node_modules/@allyhub-next/runtime/dist/music.js +1 -1
  179. package/dist/node_modules/@allyhub-next/runtime/package.json +1 -1
  180. package/dist/node_modules/@allyhub-next/runtimes/dist/download.d.ts +19 -1
  181. package/dist/node_modules/@allyhub-next/runtimes/dist/download.js +1 -1
  182. package/dist/node_modules/@allyhub-next/runtimes/dist/index.d.ts +2 -2
  183. package/dist/node_modules/@allyhub-next/runtimes/dist/index.js +1 -1
  184. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
  185. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +1 -1
  186. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +19 -2
  187. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.js +3 -3
  188. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +3 -0
  189. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -3
  190. package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
  191. package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
  192. package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +4 -4
  193. package/dist/node_modules/@allyhub-next/scaffold/package.json +1 -1
  194. package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
  195. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +10 -0
  196. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
  197. package/dist/node_modules/@allyhub-next/scenery-host/package.json +1 -1
  198. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
  199. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
  200. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
  201. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
  202. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
  203. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
  204. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
  205. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
  206. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
  207. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
  208. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
  209. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
  210. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
  211. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
  212. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
  213. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
  214. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
  215. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
  216. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
  217. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
  218. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
  219. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
  220. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
  221. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
  222. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
  223. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
  224. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
  225. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
  226. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
  227. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
  228. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
  229. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
  230. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
  231. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
  232. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
  233. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
  234. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
  235. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
  236. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
  237. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
  238. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
  239. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
  240. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
  241. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
  242. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
  243. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
  244. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
  245. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
  246. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
  247. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
  248. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
  249. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
  250. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
  251. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
  252. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
  253. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
  254. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
  255. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
  256. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
  257. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
  258. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
  259. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
  260. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
  261. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +10 -1
  262. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
  263. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
  264. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
  265. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
  266. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
  267. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +3 -1
  268. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
  269. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +42 -1
  270. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
  271. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
  272. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
  273. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
  274. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
  275. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
  276. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
  277. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
  278. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
  279. package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
  280. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
  281. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +59 -39
  282. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
  283. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
  284. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +27 -13
  285. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
  286. package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
  287. package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
  288. package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
  289. package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
  290. package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
  291. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +179 -16
  292. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
  293. package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
  294. package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
  295. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
  296. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
  297. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -1
  298. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
  299. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
  300. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
  301. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
  302. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
  303. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
  304. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +2 -4
  305. package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +17 -1
  306. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
  307. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +21 -5
  308. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
  309. package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
  310. package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
  311. package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
  312. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
  313. package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
  314. package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
  315. package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
  316. package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
  317. package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
  318. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/code.js +4 -0
  319. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/index.js +3 -0
  320. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/names.js +2 -0
  321. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/script.js +2 -0
  322. package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.js +1 -1
  323. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/chart.js +2 -0
  324. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/common.js +2 -0
  325. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/index.js +4 -0
  326. package/dist/{site.js → node_modules/@allyhub-next/slides-pptx/dist/read/model.js} +1 -1
  327. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/shapes.js +2 -0
  328. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/table.js +2 -0
  329. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/text.js +2 -0
  330. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/timing.js +2 -0
  331. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +1 -1
  332. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +1 -1
  333. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.js +1 -1
  334. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.js +1 -1
  335. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +2 -2
  336. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +2 -2
  337. package/dist/node_modules/@allyhub-next/slides-pptx/package.json +1 -1
  338. package/dist/node_modules/@allyhub-next/slides-runtime/dist/component.js +2 -0
  339. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +2 -2
  340. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.js +1 -1
  341. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.js +5 -5
  342. package/dist/node_modules/@allyhub-next/slides-runtime/package.json +5 -1
  343. package/dist/node_modules/@allyhub-next/stage/dist/index.js +1 -1
  344. package/dist/node_modules/@allyhub-next/stage/dist/page.js +22 -12
  345. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.js +5 -5
  346. package/dist/node_modules/@allyhub-next/stage/dist/server.js +1 -1
  347. package/dist/node_modules/@allyhub-next/stage/package.json +1 -1
  348. package/dist/node_modules/@allyhub-next/stage-page/dist/host.js +1 -20
  349. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/probe.html +8 -0
  350. package/dist/{astro.js → node_modules/@allyhub-next/stage-page/dist/runtime/probe.js} +1 -1
  351. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/runtime.js +79 -0
  352. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.html +21 -0
  353. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.js +3 -0
  354. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.html +9 -0
  355. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.js +3 -0
  356. package/dist/node_modules/@allyhub-next/stage-page/package.json +2 -3
  357. package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
  358. package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
  359. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
  360. package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
  361. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
  362. package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
  363. package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
  364. package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
  365. package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
  366. package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
  367. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  368. package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
  369. package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
  370. package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
  371. package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
  372. package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
  373. package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
  374. package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
  375. package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
  376. package/dist/node_modules/@allyhub-next/website/LICENSE +241 -0
  377. package/dist/node_modules/@allyhub-next/website/dist/index.js +2 -0
  378. package/dist/node_modules/@allyhub-next/website/dist/publish.js +3 -0
  379. package/dist/node_modules/@allyhub-next/website/dist/rules.js +2 -0
  380. package/dist/node_modules/@allyhub-next/website/dist/website.js +4 -0
  381. package/dist/node_modules/@allyhub-next/website/package.json +13 -0
  382. package/dist/text/facts-text.js +4 -4
  383. package/dist/works.js +1 -1
  384. package/editor-web/assets/calc-worker-Bz9r26p1.js +158 -0
  385. package/editor-web/assets/dist-B-BI8jma.js +37 -0
  386. package/editor-web/assets/dist-CS-Z5JSF.js +224 -0
  387. package/editor-web/assets/dist-ClE1xUdI.js +10 -0
  388. package/editor-web/assets/dist-Cqu9f1N5.js +1 -0
  389. package/editor-web/assets/dist-CsDICOqP.js +36 -0
  390. package/editor-web/assets/dist-DegNYCaB.js +10 -0
  391. package/editor-web/assets/dist-EotuIcA_.js +2 -0
  392. package/editor-web/assets/index-CwDs3z43.js +69 -0
  393. package/editor-web/assets/index-ujKjdu_s.css +2 -0
  394. package/editor-web/assets/minus-DLhpe7h_.js +1 -0
  395. package/editor-web/assets/react-CT8OUeCe.js +101 -0
  396. package/editor-web/assets/tabs-BEPTOFm5.js +105 -0
  397. package/editor-web/assets/text-align-start-CfqIQSWH.js +1 -0
  398. package/editor-web/index.html +5 -5
  399. package/package.json +8 -14
  400. package/dist/astro.d.ts +0 -2
  401. package/dist/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +0 -52
  402. package/dist/node_modules/@allyhub-next/audio/dist/decode.d.ts +0 -33
  403. package/dist/node_modules/@allyhub-next/audio/dist/envelope.d.ts +0 -37
  404. package/dist/node_modules/@allyhub-next/audio/dist/index.d.ts +0 -17
  405. package/dist/node_modules/@allyhub-next/audio/dist/levels.d.ts +0 -97
  406. package/dist/node_modules/@allyhub-next/audio/dist/master.d.ts +0 -29
  407. package/dist/node_modules/@allyhub-next/audio/dist/music.d.ts +0 -11
  408. package/dist/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +0 -39
  409. package/dist/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -25
  410. package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -31
  411. package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +0 -8
  412. package/dist/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +0 -18
  413. package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +0 -42
  414. package/dist/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +0 -60
  415. package/dist/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +0 -31
  416. package/dist/node_modules/@allyhub-next/audio/dist/plan.d.ts +0 -143
  417. package/dist/node_modules/@allyhub-next/audio/dist/recorded.d.ts +0 -26
  418. package/dist/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -47
  419. package/dist/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +0 -89
  420. package/dist/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -64
  421. package/dist/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +0 -26
  422. package/dist/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +0 -42
  423. package/dist/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +0 -56
  424. package/dist/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +0 -10
  425. package/dist/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -12
  426. package/dist/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +0 -67
  427. package/dist/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +0 -32
  428. package/dist/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +0 -27
  429. package/dist/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +0 -64
  430. package/dist/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +0 -78
  431. package/dist/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +0 -111
  432. package/dist/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +0 -3
  433. package/dist/node_modules/@allyhub-next/audio/dist/render.d.ts +0 -26
  434. package/dist/node_modules/@allyhub-next/audio/dist/sfx.d.ts +0 -10
  435. package/dist/node_modules/@allyhub-next/audio/dist/shape.d.ts +0 -118
  436. package/dist/node_modules/@allyhub-next/audio/dist/voice.d.ts +0 -45
  437. package/dist/node_modules/@allyhub-next/browser/dist/browser.d.ts +0 -24
  438. package/dist/node_modules/@allyhub-next/browser/dist/capture.d.ts +0 -61
  439. package/dist/node_modules/@allyhub-next/browser/dist/cdp.d.ts +0 -51
  440. package/dist/node_modules/@allyhub-next/browser/dist/flags.d.ts +0 -13
  441. package/dist/node_modules/@allyhub-next/browser/dist/frames.d.ts +0 -35
  442. package/dist/node_modules/@allyhub-next/browser/dist/html.d.ts +0 -19
  443. package/dist/node_modules/@allyhub-next/browser/dist/index.d.ts +0 -10
  444. package/dist/node_modules/@allyhub-next/browser/dist/launch.d.ts +0 -35
  445. package/dist/node_modules/@allyhub-next/browser/dist/page.d.ts +0 -67
  446. package/dist/node_modules/@allyhub-next/browser/dist/server.d.ts +0 -26
  447. package/dist/node_modules/@allyhub-next/check/dist/cache.d.ts +0 -46
  448. package/dist/node_modules/@allyhub-next/check/dist/check.d.ts +0 -142
  449. package/dist/node_modules/@allyhub-next/check/dist/generated.d.ts +0 -22
  450. package/dist/node_modules/@allyhub-next/check/dist/index.d.ts +0 -7
  451. package/dist/node_modules/@allyhub-next/check/dist/plans.d.ts +0 -111
  452. package/dist/node_modules/@allyhub-next/check/dist/result.d.ts +0 -12
  453. package/dist/node_modules/@allyhub-next/check/dist/scenery.d.ts +0 -23
  454. package/dist/node_modules/@allyhub-next/dev-server/dist/background.d.ts +0 -50
  455. package/dist/node_modules/@allyhub-next/dev-server/dist/card.d.ts +0 -17
  456. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.d.ts +0 -18
  457. package/dist/node_modules/@allyhub-next/dev-server/dist/index.d.ts +0 -11
  458. package/dist/node_modules/@allyhub-next/dev-server/dist/live.d.ts +0 -77
  459. package/dist/node_modules/@allyhub-next/dev-server/dist/mime.d.ts +0 -2
  460. package/dist/node_modules/@allyhub-next/dev-server/dist/mime.js +0 -2
  461. package/dist/node_modules/@allyhub-next/dev-server/dist/paths.d.ts +0 -27
  462. package/dist/node_modules/@allyhub-next/dev-server/dist/project.d.ts +0 -153
  463. package/dist/node_modules/@allyhub-next/dev-server/dist/reveal.d.ts +0 -6
  464. package/dist/node_modules/@allyhub-next/dev-server/dist/server.d.ts +0 -47
  465. package/dist/node_modules/@allyhub-next/dev-server/dist/sound.d.ts +0 -21
  466. package/dist/node_modules/@allyhub-next/dev-server/dist/stage.d.ts +0 -82
  467. package/dist/node_modules/@allyhub-next/dev-server/dist/stage.js +0 -121
  468. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.d.ts +0 -24
  469. package/dist/node_modules/@allyhub-next/dev-server/dist/validate.d.ts +0 -6
  470. package/dist/node_modules/@allyhub-next/dev-server/dist/watcher.d.ts +0 -47
  471. package/dist/node_modules/@allyhub-next/dev-server/dist/writer.d.ts +0 -51
  472. package/dist/node_modules/@allyhub-next/export/dist/batch.d.ts +0 -70
  473. package/dist/node_modules/@allyhub-next/export/dist/deck-fonts.d.ts +0 -24
  474. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.d.ts +0 -12
  475. package/dist/node_modules/@allyhub-next/export/dist/export.d.ts +0 -123
  476. package/dist/node_modules/@allyhub-next/export/dist/index.d.ts +0 -5
  477. package/dist/node_modules/@allyhub-next/export/dist/names.d.ts +0 -36
  478. package/dist/node_modules/@allyhub-next/measure/dist/compare.d.ts +0 -195
  479. package/dist/node_modules/@allyhub-next/measure/dist/contrast.d.ts +0 -14
  480. package/dist/node_modules/@allyhub-next/measure/dist/cut-sheet.d.ts +0 -90
  481. package/dist/node_modules/@allyhub-next/measure/dist/cuts.d.ts +0 -108
  482. package/dist/node_modules/@allyhub-next/measure/dist/facts.d.ts +0 -60
  483. package/dist/node_modules/@allyhub-next/measure/dist/fidelity.d.ts +0 -40
  484. package/dist/node_modules/@allyhub-next/measure/dist/flat.d.ts +0 -42
  485. package/dist/node_modules/@allyhub-next/measure/dist/index.d.ts +0 -24
  486. package/dist/node_modules/@allyhub-next/measure/dist/loop.d.ts +0 -22
  487. package/dist/node_modules/@allyhub-next/measure/dist/overlay.d.ts +0 -57
  488. package/dist/node_modules/@allyhub-next/measure/dist/recording-report.d.ts +0 -66
  489. package/dist/node_modules/@allyhub-next/measure/dist/reference/compare.d.ts +0 -118
  490. package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +0 -75
  491. package/dist/node_modules/@allyhub-next/measure/dist/reference/interpret.d.ts +0 -39
  492. package/dist/node_modules/@allyhub-next/measure/dist/reference/piece.d.ts +0 -53
  493. package/dist/node_modules/@allyhub-next/measure/dist/reference/sections.d.ts +0 -53
  494. package/dist/node_modules/@allyhub-next/measure/dist/reference/sets.d.ts +0 -84
  495. package/dist/node_modules/@allyhub-next/measure/dist/reference/text.d.ts +0 -27
  496. package/dist/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +0 -55
  497. package/dist/node_modules/@allyhub-next/measure/dist/seams.d.ts +0 -46
  498. package/dist/node_modules/@allyhub-next/measure/dist/sound-measures.d.ts +0 -74
  499. package/dist/node_modules/@allyhub-next/measure/dist/sound-report.d.ts +0 -156
  500. package/dist/node_modules/@allyhub-next/measure/dist/still.d.ts +0 -58
  501. package/dist/node_modules/@allyhub-next/measure/dist/version-voice.d.ts +0 -12
  502. package/dist/node_modules/@allyhub-next/project/dist/console.d.ts +0 -34
  503. package/dist/node_modules/@allyhub-next/project/dist/digest.d.ts +0 -9
  504. package/dist/node_modules/@allyhub-next/project/dist/index.d.ts +0 -11
  505. package/dist/node_modules/@allyhub-next/project/dist/ledger.d.ts +0 -17
  506. package/dist/node_modules/@allyhub-next/project/dist/media-index.d.ts +0 -27
  507. package/dist/node_modules/@allyhub-next/project/dist/page.d.ts +0 -119
  508. package/dist/node_modules/@allyhub-next/project/dist/says.d.ts +0 -15
  509. package/dist/node_modules/@allyhub-next/project/dist/scenery.d.ts +0 -35
  510. package/dist/node_modules/@allyhub-next/project/dist/session.d.ts +0 -37
  511. package/dist/node_modules/@allyhub-next/project/dist/stretch.d.ts +0 -38
  512. package/dist/node_modules/@allyhub-next/project/dist/version.d.ts +0 -114
  513. package/dist/node_modules/@allyhub-next/render/dist/cap.d.ts +0 -41
  514. package/dist/node_modules/@allyhub-next/render/dist/capture.d.ts +0 -78
  515. package/dist/node_modules/@allyhub-next/render/dist/clip.d.ts +0 -27
  516. package/dist/node_modules/@allyhub-next/render/dist/composite.d.ts +0 -106
  517. package/dist/node_modules/@allyhub-next/render/dist/delivery.d.ts +0 -18
  518. package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.d.ts +0 -3
  519. package/dist/node_modules/@allyhub-next/render/dist/doc/index.d.ts +0 -3
  520. package/dist/node_modules/@allyhub-next/render/dist/doc/print.d.ts +0 -51
  521. package/dist/node_modules/@allyhub-next/render/dist/encode.d.ts +0 -111
  522. package/dist/node_modules/@allyhub-next/render/dist/errors.d.ts +0 -15
  523. package/dist/node_modules/@allyhub-next/render/dist/exports.d.ts +0 -67
  524. package/dist/node_modules/@allyhub-next/render/dist/ffmpeg.d.ts +0 -75
  525. package/dist/node_modules/@allyhub-next/render/dist/footage.d.ts +0 -169
  526. package/dist/node_modules/@allyhub-next/render/dist/image.d.ts +0 -16
  527. package/dist/node_modules/@allyhub-next/render/dist/index.d.ts +0 -26
  528. package/dist/node_modules/@allyhub-next/render/dist/junction.d.ts +0 -70
  529. package/dist/node_modules/@allyhub-next/render/dist/look.d.ts +0 -21
  530. package/dist/node_modules/@allyhub-next/render/dist/page.d.ts +0 -178
  531. package/dist/node_modules/@allyhub-next/render/dist/parts.d.ts +0 -140
  532. package/dist/node_modules/@allyhub-next/render/dist/png.d.ts +0 -37
  533. package/dist/node_modules/@allyhub-next/render/dist/pool.d.ts +0 -54
  534. package/dist/node_modules/@allyhub-next/render/dist/post-probe.d.ts +0 -27
  535. package/dist/node_modules/@allyhub-next/render/dist/post.d.ts +0 -27
  536. package/dist/node_modules/@allyhub-next/render/dist/render.d.ts +0 -151
  537. package/dist/node_modules/@allyhub-next/render/dist/segments.d.ts +0 -40
  538. package/dist/node_modules/@allyhub-next/render/dist/sound.d.ts +0 -24
  539. package/dist/node_modules/@allyhub-next/render/dist/stills.d.ts +0 -41
  540. package/dist/node_modules/@allyhub-next/render/dist/tools.d.ts +0 -25
  541. package/dist/node_modules/@allyhub-next/render/dist/webp.d.ts +0 -17
  542. package/dist/node_modules/@allyhub-next/runtime/dist/bridge.d.ts +0 -211
  543. package/dist/node_modules/@allyhub-next/runtime/dist/captions.d.ts +0 -24
  544. package/dist/node_modules/@allyhub-next/runtime/dist/clock.d.ts +0 -32
  545. package/dist/node_modules/@allyhub-next/runtime/dist/compose.d.ts +0 -149
  546. package/dist/node_modules/@allyhub-next/runtime/dist/console.d.ts +0 -21
  547. package/dist/node_modules/@allyhub-next/runtime/dist/contrast.d.ts +0 -13
  548. package/dist/node_modules/@allyhub-next/runtime/dist/embed.d.ts +0 -50
  549. package/dist/node_modules/@allyhub-next/runtime/dist/env.d.ts +0 -101
  550. package/dist/node_modules/@allyhub-next/runtime/dist/errors.d.ts +0 -21
  551. package/dist/node_modules/@allyhub-next/runtime/dist/facade.d.ts +0 -42
  552. package/dist/node_modules/@allyhub-next/runtime/dist/fonts.d.ts +0 -110
  553. package/dist/node_modules/@allyhub-next/runtime/dist/footage.d.ts +0 -52
  554. package/dist/node_modules/@allyhub-next/runtime/dist/frame.d.ts +0 -61
  555. package/dist/node_modules/@allyhub-next/runtime/dist/guards.d.ts +0 -32
  556. package/dist/node_modules/@allyhub-next/runtime/dist/index.d.ts +0 -14
  557. package/dist/node_modules/@allyhub-next/runtime/dist/inspect.d.ts +0 -112
  558. package/dist/node_modules/@allyhub-next/runtime/dist/locate.d.ts +0 -11
  559. package/dist/node_modules/@allyhub-next/runtime/dist/measure.d.ts +0 -41
  560. package/dist/node_modules/@allyhub-next/runtime/dist/mix-plan.d.ts +0 -42
  561. package/dist/node_modules/@allyhub-next/runtime/dist/music.d.ts +0 -29
  562. package/dist/node_modules/@allyhub-next/runtime/dist/output.d.ts +0 -5
  563. package/dist/node_modules/@allyhub-next/runtime/dist/pictures.d.ts +0 -39
  564. package/dist/node_modules/@allyhub-next/runtime/dist/piece.d.ts +0 -34
  565. package/dist/node_modules/@allyhub-next/runtime/dist/player/clips.d.ts +0 -41
  566. package/dist/node_modules/@allyhub-next/runtime/dist/player/cutout.d.ts +0 -57
  567. package/dist/node_modules/@allyhub-next/runtime/dist/player/player.d.ts +0 -78
  568. package/dist/node_modules/@allyhub-next/runtime/dist/reads.d.ts +0 -132
  569. package/dist/node_modules/@allyhub-next/runtime/dist/sound.d.ts +0 -22
  570. package/dist/node_modules/@allyhub-next/runtime/dist/speech.d.ts +0 -107
  571. package/dist/node_modules/@allyhub-next/runtime/dist/stage-kit.d.ts +0 -12
  572. package/dist/node_modules/@allyhub-next/runtime/dist/stage.d.ts +0 -34
  573. package/dist/node_modules/@allyhub-next/runtime/dist/styles.d.ts +0 -35
  574. package/dist/node_modules/@allyhub-next/runtime/dist/takes.d.ts +0 -72
  575. package/dist/node_modules/@allyhub-next/runtime/dist/titles.d.ts +0 -10
  576. package/dist/node_modules/@allyhub-next/runtime/dist/transitions.d.ts +0 -26
  577. package/dist/node_modules/@allyhub-next/site/dist/assets.d.ts +0 -59
  578. package/dist/node_modules/@allyhub-next/site/dist/assets.js +0 -2
  579. package/dist/node_modules/@allyhub-next/site/dist/astro.d.ts +0 -22
  580. package/dist/node_modules/@allyhub-next/site/dist/astro.js +0 -3
  581. package/dist/node_modules/@allyhub-next/site/dist/lockfile.d.ts +0 -40
  582. package/dist/node_modules/@allyhub-next/site/dist/lockfile.js +0 -3
  583. package/dist/node_modules/@allyhub-next/site/dist/media.d.ts +0 -24
  584. package/dist/node_modules/@allyhub-next/site/dist/media.js +0 -4
  585. package/dist/node_modules/@allyhub-next/site/package.json +0 -25
  586. package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +0 -5
  587. package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +0 -2
  588. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.d.ts +0 -6
  589. package/dist/node_modules/@allyhub-next/slides-pptx/dist/fonts.d.ts +0 -45
  590. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.d.ts +0 -18
  591. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.js +0 -3
  592. package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.d.ts +0 -5
  593. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +0 -56
  594. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.js +0 -4
  595. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +0 -72
  596. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +0 -32
  597. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.d.ts +0 -4
  598. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.d.ts +0 -32
  599. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.d.ts +0 -32
  600. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +0 -32
  601. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +0 -43
  602. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.d.ts +0 -4
  603. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.js +0 -2
  604. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.d.ts +0 -4
  605. package/dist/node_modules/@allyhub-next/slides-runtime/dist/ink.d.ts +0 -10
  606. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.d.ts +0 -6
  607. package/dist/node_modules/@allyhub-next/stage/dist/bakes.d.ts +0 -42
  608. package/dist/node_modules/@allyhub-next/stage/dist/graphics.d.ts +0 -7
  609. package/dist/node_modules/@allyhub-next/stage/dist/identity.d.ts +0 -2
  610. package/dist/node_modules/@allyhub-next/stage/dist/index.d.ts +0 -9
  611. package/dist/node_modules/@allyhub-next/stage/dist/page.d.ts +0 -87
  612. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.d.ts +0 -69
  613. package/dist/node_modules/@allyhub-next/stage/dist/scenery-solve.d.ts +0 -49
  614. package/dist/node_modules/@allyhub-next/stage/dist/scenery.d.ts +0 -8
  615. package/dist/node_modules/@allyhub-next/stage/dist/server.d.ts +0 -21
  616. package/dist/node_modules/@allyhub-next/stage-page/dist/host.d.ts +0 -22
  617. package/dist/node_modules/@allyhub-next/stage-page/dist/page.js +0 -79
  618. package/dist/site.d.ts +0 -2
  619. package/editor-web/assets/dist-BW2s9FMO.js +0 -4
  620. package/editor-web/assets/dist-C-6JmebI.js +0 -233
  621. package/editor-web/assets/dist-CCYMLMKN.js +0 -6
  622. package/editor-web/assets/dist-CHzurjMx.js +0 -33
  623. package/editor-web/assets/dist-DF7H1dxw.js +0 -1
  624. package/editor-web/assets/dist-Da5AUSKX.js +0 -2
  625. package/editor-web/assets/index-B7S9RZhL.css +0 -2
  626. package/editor-web/assets/index-CovQYWvD.js +0 -69
  627. package/editor-web/assets/minus-BrvjaJyO.js +0 -1
  628. package/editor-web/assets/react-DV5fPdiH.js +0 -101
  629. package/editor-web/assets/textarea-B0vCGdZI.js +0 -105
  630. package/editor-web/assets/trash-2-B0dvc1cZ.js +0 -1
  631. package/editor-web/assets/undo-2-A1EPubPO.js +0 -1
  632. /package/dist/node_modules/@allyhub-next/{site → ooxml}/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as r}from"zod";import{EXIT as m}from"@allyhub-next/protocol";import{RegistryError as y}from"@allyhub-next/registry";import{workSkills as b}from"@allyhub-next/scaffold";import{CommandError as d,defineCommand as f}from"../command.js";import{resourcesIndex as k}from"../resources.js";const p="Check the connection and run the same command again.";function w(i){if(i.index===void 0)throw new d("no-registry",`AllyHub's skills could not be read from ${i.source.name}.`,{exit:m.platform,hint:p})}export const skills=f({name:"skills",summary:"Lists AllyHub's work skills, each how to make one kind of work, with what it is for: allyhub skills show <name> prints one, allyhub add skill/<name> puts it in the project",input:r.strictObject({}),output:r.looseObject({}),examples:["allyhub skills","allyhub skills show product-demos"]},async(i,c)=>{const s=await k(c);w(s);const a=b(s.index.items).map(t=>{const o=s.index.items.find(h=>h.name===t.name)?.version;return{...t,...o===void 0?{}:{version:o}}}),e=s.from==="stale",l=Math.max(0,...a.map(t=>t.name.length));return{value:{skills:a,stale:e},text:[`AllyHub's work skills (allyhub skills show <name> prints one; allyhub add skill/<name> puts it in the project, in .agents/skills)${e?", as last read (the registry cannot be read now)":""}:`,...a.length===0?[" none"]:a.map(t=>` ${t.name.padEnd(l)} ${t.description}`)].join(`
3
- `)}}),skillsShow=f({name:"skills show",summary:"Prints one of AllyHub's skills in full, its SKILL.md and the names of its other files, without adding it to the project",input:r.strictObject({name:r.string().min(1).describe("The skill, as allyhub skills lists it (product-demos)")}),positional:["name"],output:r.looseObject({}),examples:["allyhub skills show product-demos"]},async(i,c)=>{const s=await k(c);if(w(s),s.index.items.find(e=>e.name===i.name)?.type!=="allyhub:skill")throw new d("no-item",`AllyHub has no skill ${i.name}.`,{exit:m.notFound,hint:"allyhub skills lists them."});try{const e=await s.source.item(i.name);if(!e)throw new d("no-item",`AllyHub has no skill ${i.name}.`,{exit:m.notFound,hint:"allyhub skills lists them."});const l=`.agents/skills/${e.name}/`,t=n=>n.startsWith(l)?n.slice(l.length):n,o=e.files.find(n=>t(n.target)==="SKILL.md");if(!o)throw new d("bad-registry",`The registry's ${e.name} has no SKILL.md.`);const h=o.content??new TextDecoder().decode(await s.source.file(o.path)),u=e.files.map(n=>t(n.target)).filter(n=>n!=="SKILL.md");return{value:{name:e.name,...e.version===void 0?{}:{version:e.version},skill:h,files:u},text:[h.trimEnd(),"",u.length===0?`It has no other files. allyhub add skill/${e.name} puts it in ${l}.`:`Its other files, which allyhub add skill/${e.name} puts beside it in ${l}: ${u.join(", ")}.`].join(`
4
- `)}}catch(e){throw e instanceof y?new d(e.code,e.message,{exit:e.code==="no-registry"?m.platform:m.failed,hint:e.hint??p}):e}});
2
+ import{z as r}from"zod";import{EXIT as m}from"@allyhub-next/protocol";import{RegistryError as b}from"@allyhub-next/registry";import{workSkills as y}from"@allyhub-next/scaffold";import{CommandError as d,defineCommand as f}from"../command.js";import{resourcesIndex as w}from"../resources.js";const k="Check the connection and run the same command again.";function p(i){if(i.index===void 0)throw new d("no-registry",`AllyHub's skills could not be read from ${i.source.name}.`,{exit:m.platform,hint:k})}export const skills=f({name:"skills",summary:"Lists AllyHub's work skills, each how to make one kind of work, with what it is for: allyhub skills show <name> prints one, allyhub add skill/<name> puts it in the project",input:r.strictObject({}),output:r.looseObject({}),examples:["allyhub skills","allyhub skills show web-product-demos"]},async(i,c)=>{const s=await w(c);p(s);const a=y(s.index.items).map(t=>{const o=s.index.items.find(h=>h.name===t.name)?.version;return{...t,...o===void 0?{}:{version:o}}}),e=s.from==="stale",l=Math.max(0,...a.map(t=>t.name.length));return{value:{skills:a,stale:e},text:[`AllyHub's work skills (allyhub skills show <name> prints one; allyhub add skill/<name> puts it in the project, in .agents/skills)${e?", as last read (the registry cannot be read now)":""}:`,...a.length===0?[" none"]:a.map(t=>` ${t.name.padEnd(l)} ${t.description}`)].join(`
3
+ `)}}),skillsShow=f({name:"skills show",summary:"Prints one of AllyHub's skills in full, its SKILL.md and the names of its other files, without adding it to the project",input:r.strictObject({name:r.string().min(1).describe("The skill, as allyhub skills lists it (web-product-demos)")}),positional:["name"],output:r.looseObject({}),examples:["allyhub skills show web-product-demos"]},async(i,c)=>{const s=await w(c);if(p(s),s.index.items.find(e=>e.name===i.name)?.type!=="allyhub:skill")throw new d("no-item",`AllyHub has no skill ${i.name}.`,{exit:m.notFound,hint:"allyhub skills lists them."});try{const e=await s.source.item(i.name);if(!e)throw new d("no-item",`AllyHub has no skill ${i.name}.`,{exit:m.notFound,hint:"allyhub skills lists them."});const l=`.agents/skills/${e.name}/`,t=n=>n.startsWith(l)?n.slice(l.length):n,o=e.files.find(n=>t(n.target)==="SKILL.md");if(!o)throw new d("bad-registry",`The registry's ${e.name} has no SKILL.md.`);const h=o.content??new TextDecoder().decode(await s.source.file(o.path)),u=e.files.map(n=>t(n.target)).filter(n=>n!=="SKILL.md");return{value:{name:e.name,...e.version===void 0?{}:{version:e.version},skill:h,files:u},text:[h.trimEnd(),"",u.length===0?`It has no other files. allyhub add skill/${e.name} puts it in ${l}.`:`Its other files, which allyhub add skill/${e.name} puts beside it in ${l}: ${u.join(", ")}.`].join(`
4
+ `)}}catch(e){throw e instanceof b?new d(e.code,e.message,{exit:e.code==="no-registry"?m.platform:m.failed,hint:e.hint??k}):e}});
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{mkdir as y,readFile as g,stat as x,writeFile as k}from"node:fs/promises";import{basename as p,dirname as $,join as f,resolve as v}from"node:path";import{z as t}from"zod";import{ZIP_LIMITS as j}from"@allyhub-next/formats";import{EXIT as l}from"@allyhub-next/protocol";import{CAPABILITIES as h}from"@allyhub-next/slides-core";import{importDeck as I,nameOf as P,readPptx as z}from"@allyhub-next/slides-pptx";import{CommandError as n,defineCommand as u}from"../command.js";import{dir as O}from"../fields.js";import{projectRoot as T}from"../project.js";export const slidesCapabilities=u({name:"slides capabilities",summary:"What a deck's API holds of python-pptx's (its classes and enums), how it differs and what it adds, as JSON",input:t.strictObject({}),output:t.looseObject({}),examples:["allyhub slides capabilities"]},()=>Promise.resolve({value:{...h},text:JSON.stringify(h,null,2)}));const S=t.string().transform(e=>e.replace(/^\/+|\/+$/gu,"")).refine(e=>e!==""&&!e.split("/").some(a=>a===""||a==="."||a===".."),{message:"a folder from the project's root, such as launch/deck"});export const slidesImport=u({name:"slides import",summary:"Makes a deck of a PowerPoint file: its masters and layouts as slides.ts, its slides as slides.yaml, its words and notes as the script, its pictures and videos in media/; says what it could not hold; never over a place that is taken",input:t.strictObject({file:t.string().describe("The .pptx to make a deck of"),to:S.optional().describe("The deck's folder, from the project's root (default the file's name)"),maxUnzipped:t.number().positive().default(j.bytes/1024/1024).describe("MB the file may unzip to, a file past it refused"),lang:t.string().regex(/^[a-z]{2,3}(-[a-z0-9]+)*$/u).default("en").describe("The language of its words: the script is script.<lang>.yaml"),dir:O}),positional:["file"],output:t.looseObject({}),examples:["allyhub slides import ~/Downloads/q3-review.pptx --to reviews/q3","allyhub slides import 培训.pptx --to training --lang zh-cn"]},async(e,a)=>{const c=await T(a.cwd,e.dir),r=v(a.cwd,e.file),w=await g(r).catch(()=>{throw new n("not-found",`There is no file ${r}.`,{exit:l.notFound})}),s=e.to??P(p(r).replace(/\.pptx$/iu,""),new Set,"deck");if(await x(f(c,s)).catch(()=>{}))throw new n("place-taken",`${s} is already there.`,{exit:l.conflict,hint:"Name another place with --to."});let o;try{o=I(z(new Uint8Array(w),{bytes:e.maxUnzipped*1024*1024}),{lang:e.lang,source:p(r)})}catch(i){throw new n("bad-file",`${r} is not a PowerPoint file this can read: ${i.message}`,{exit:l.usage})}for(const[i,b]of o.files){const m=f(c,s,i);await y($(m),{recursive:!0}),await k(m,b,{flag:"wx"})}const d=[...o.files.keys()];return{value:{place:s,files:d.map(i=>`${s}/${i}`),lost:o.lost},text:[`Made ${s}/: ${d.join(", ")}`,...o.lost.length>0?["Not carried over:",...o.lost.map(i=>` ${i}`)]:[],`allyhub check, then allyhub frames ${s}, to see it.`].join(`
3
- `)}});
2
+ import{mkdir as y,readFile as $,stat as x,writeFile as k}from"node:fs/promises";import{basename as f,dirname as j,join as h,resolve as v}from"node:path";import{z as o}from"zod";import{ZIP_LIMITS as I}from"@allyhub-next/formats";import{EXIT as n}from"@allyhub-next/protocol";import{CAPABILITIES as u}from"@allyhub-next/slides-core";import{groupReport as O}from"@allyhub-next/ooxml";import{importDeck as P,nameOf as S,readPptx as z}from"@allyhub-next/slides-pptx";import{CommandError as l,defineCommand as w}from"../command.js";import{dir as T}from"../fields.js";import{projectRoot as N}from"../project.js";export const slidesCapabilities=w({name:"slides capabilities",summary:"What a deck's API holds of python-pptx's (its classes and enums), how it differs and what it adds, as JSON",input:o.strictObject({}),output:o.looseObject({}),examples:["allyhub slides capabilities"]},()=>Promise.resolve({value:{...u},text:JSON.stringify(u,null,2)}));const A=o.string().transform(e=>e.replace(/^\/+|\/+$/gu,"")).refine(e=>e!==""&&!e.split("/").some(t=>t===""||t==="."||t===".."),{message:"a folder from the project's root, such as launch/deck"});export const slidesImport=w({name:"slides import",summary:"Makes a deck of a PowerPoint file: its masters and layouts as slides.ts, its slides as slides.yaml, its words and notes as the script, its pictures and videos in media/; says what it could not hold; never over a place that is taken",input:o.strictObject({file:o.string().describe("The .pptx to make a deck of"),to:A.optional().describe("The deck's folder, from the project's root (default the file's name)"),maxUnzipped:o.number().positive().default(I.bytes/1024/1024).describe("MB the file may unzip to, a file past it refused"),lang:o.string().regex(/^[a-z]{2,3}(-[a-z0-9]+)*$/u).default("en").describe("The language of its words: the script is script.<lang>.yaml"),dir:T}),positional:["file"],output:o.looseObject({}),examples:["allyhub slides import ~/Downloads/q3-review.pptx --to reviews/q3","allyhub slides import 培训.pptx --to training --lang zh-cn"]},async(e,t)=>{const d=await N(t.cwd,e.dir),r=v(t.cwd,e.file),b=await $(r).catch(()=>{throw new l("not-found",`There is no file ${r}.`,{exit:n.notFound})}),i=e.to??S(f(r).replace(/\.pptx$/iu,""),new Set,"deck");if(await x(h(d,i)).catch(()=>{}))throw new l("place-taken",`${i} is already there.`,{exit:n.conflict,hint:"Name another place with --to."});let a;try{a=P(z(new Uint8Array(b),{bytes:e.maxUnzipped*1024*1024}),{lang:e.lang,source:f(r)})}catch(s){throw new l("bad-file",`${r} is not a PowerPoint file this can read: ${s.message}`,{exit:n.usage})}for(const[s,g]of a.files){const m=h(d,i,s);await y(j(m),{recursive:!0}),await k(m,g,{flag:"wx"})}const p=[...a.files.keys()],c=O(a.report);return{value:{place:i,files:p.map(s=>`${i}/${s}`),report:a.report,skipped:Object.fromEntries(a.reasons)},text:[`Made ${i}/: ${p.join(", ")}`,...c.length>0?[`Not carried over as it is (${String(a.report.length)}, grouped; all with --json):`,...c.map(D)]:[],`allyhub check, then allyhub frames ${i}, to see it.`].join(`
3
+ `)}});const C={unread:"not read",extension:"an extension not read",part:"a part not read","cannot-hold":"cannot hold",approximated:"approximated",missing:"missing"};function D(e){const t=e.where.length>3?`${e.where.slice(0,3).join("; ")} and ${String(e.where.length-3)} more`:e.where.join("; ");return` ${C[e.kind]}: ${e.what}${e.detail===void 0?"":` (${e.detail})`}${e.count>1?` ×${String(e.count)}`:""} at ${t}`}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export{AudioError,FFMPEG_LOG,ffmpegOf,runFfmpeg}from"./ffmpeg.js";export{decodeMono,decodePlan,decodeStereo,denoiseFilter,speechFile,speechFilters}from"./decode.js";export{mixToSamples,voiceTracks}from"./mix.js";export{master}from"./master.js";export{fileLoudness}from"./loudness.js";export{ebur128Summary,parseEbur128}from"./ebur128.js";export{ANALYZE_DEFAULTS,analyzeSound,parseAstats,parseSilences,spanLoudness}from"./measure.js";
2
+ export{AudioError,FFMPEG_LOG,ffmpegOf,runFfmpeg}from"./ffmpeg.js";export{decodeMono,decodePlan,decodeStereo,denoiseFilter,speechFile,speechFilters}from"./decode.js";export{mixToSamples,voiceTracks}from"./mix.js";export{loudestAt,master}from"./master.js";export{fileLoudness}from"./loudness.js";export{ebur128Summary,parseEbur128}from"./ebur128.js";export{ANALYZE_DEFAULTS,analyzeSound,parseAstats,parseSilences,spanLoudness}from"./measure.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{rm as M,writeFile as P}from"node:fs/promises";import{MASTER_DEFAULTS as x,MASTER_MECHANICS as T}from"../levels.js";import{SAMPLE_RATE as v}from"../plan.js";import{ebur128Summary as _}from"./ebur128.js";import{ffmpegOf as R,runFfmpeg as g}from"./ffmpeg.js";const l=v;async function D(e,s,a){const{err:t}=await g(e,["-hide_banner","-nostats",...s,"-af",`${a}${a?",":""}ebur128=peak=true:framelog=quiet`,"-f","null","-"]);return _(t)}const h=e=>({integrated:e.integrated,...e.range===void 0?{}:{range:e.range},...e.truePeak===void 0?{}:{truePeak:e.truePeak}});export async function master(e,s,a,t={...x},k={}){const u=await R(k),d=`${a}.f32`;await P(d,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{const c=["-f","f32le","-ar",String(l),"-ac","2","-i",d],p=`aresample=${String(l)}:in_chlayout=stereo:out_chlayout=stereo`,b=`apad=whole_dur=${s.toFixed(6)},atrim=0:${s.toFixed(6)}`,r=await D(u,c,p);if(r.integrated===void 0)return await g(u,["-v","error","-y",...c,"-af",b,"-c:a","pcm_s16le",a]),{target:t};const w=t.truePeak,A=10**(w/20),o=T,E=`aresample=${String(l*o.oversample)},aformat=sample_fmts=dbl:channel_layouts=stereo,alimiter=limit=${A.toFixed(4)}:level=false:attack=${String(o.attack*1e3)}:release=${String(o.release*1e3)},aresample=${String(l)},${b}`,$=async i=>{const{err:F}=await g(u,["-hide_banner","-nostats","-y",...c,"-af",`${p},volume=${i.toFixed(4)}dB:precision=double,${E},ebur128=peak=true:framelog=quiet`,"-c:a","pcm_s16le",a]);return _(F)};let f=t.lufs===!1?0:t.lufs-r.integrated,n=await $(f),m=1;if(t.lufs!==!1)for(;m<o.rounds&&n.integrated!==void 0;){const i=t.lufs-n.integrated;if(Math.abs(i)<=o.tolerance)break;f+=i,n=await $(f),m++}const y=r.truePeak===void 0?void 0:Math.max(0,r.truePeak+f-w),S=i=>Math.round(i*100)/100;return{...n.integrated===void 0?{}:{loudness:h({...n,integrated:n.integrated})},before:h({...r,integrated:r.integrated}),gainDb:S(f),...y===void 0?{}:{limited:S(y)},target:t,rounds:m}}finally{await M(d,{force:!0})}}
2
+ import{rm as F,writeFile as P}from"node:fs/promises";import{MASTER_DEFAULTS as v,MASTER_MECHANICS as T}from"../levels.js";import{SAMPLE_RATE as x}from"../plan.js";import{ebur128Summary as _}from"./ebur128.js";import{ffmpegOf as R,runFfmpeg as w}from"./ffmpeg.js";const s=x;export function loudestAt(e){let a=0,r=0;for(let t=0;t<e.length;t++){const u=Math.abs(e[t]??0);u>r&&(r=u,a=t)}return Math.floor(a/2)/s}async function D(e,a,r){const{err:t}=await w(e,["-hide_banner","-nostats",...a,"-af",`${r}${r?",":""}ebur128=peak=true:framelog=quiet`,"-f","null","-"]);return _(t)}const k=e=>({integrated:e.integrated,...e.range===void 0?{}:{range:e.range},...e.truePeak===void 0?{}:{truePeak:e.truePeak}});export async function master(e,a,r,t={...v},u={}){const c=await R(u),m=`${r}.f32`;await P(m,new Uint8Array(e.buffer,e.byteOffset,e.byteLength));try{const g=["-f","f32le","-ar",String(s),"-ac","2","-i",m],$=`aresample=${String(s)}:in_chlayout=stereo:out_chlayout=stereo`,h=`apad=whole_dur=${a.toFixed(6)},atrim=0:${a.toFixed(6)}`,n=await D(c,g,$);if(n.integrated===void 0)return await w(c,["-v","error","-y",...g,"-af",h,"-c:a","pcm_s16le",r]),{target:t};const y=t.truePeak,A=10**(y/20),f=T,M=`aresample=${String(s*f.oversample)},aformat=sample_fmts=dbl:channel_layouts=stereo,alimiter=limit=${A.toFixed(4)}:level=false:attack=${String(f.attack*1e3)}:release=${String(f.release*1e3)},aresample=${String(s)},${h}`,S=async o=>{const{err:E}=await w(c,["-hide_banner","-nostats","-y",...g,"-af",`${$},volume=${o.toFixed(4)}dB:precision=double,${M},ebur128=peak=true:framelog=quiet`,"-c:a","pcm_s16le",r]);return _(E)};let l=t.lufs===!1?0:t.lufs-n.integrated,i=await S(l),p=1;if(t.lufs!==!1)for(;p<f.rounds&&i.integrated!==void 0;){const o=t.lufs-i.integrated;if(Math.abs(o)<=f.tolerance)break;l+=o,i=await S(l),p++}const d=n.truePeak===void 0?void 0:Math.max(0,n.truePeak+l-y),b=o=>Math.round(o*100)/100;return{...i.integrated===void 0?{}:{loudness:k({...i,integrated:i.integrated})},before:k({...n,integrated:n.integrated}),gainDb:b(l),...d===void 0?{}:{limited:b(d)},...d===void 0||d<=0?{}:{limitedAt:b(loudestAt(e))},target:t,rounds:p}}finally{await F(m,{force:!0})}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/audio",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{openPage as l}from"./page.js";import{startServer as r}from"./server.js";const d=16384;export async function drawHtml(n,t){const a=await r([...t.mounts??[],{at:"/index.html",body:t.html,type:"text/html; charset=utf-8"}]),e=await l(n,{width:t.width,height:t.height??100,allow:a.allow});try{await e.goto(`${a.origin}/index.html`),await e.evaluate("(async () => { await document.fonts.ready; await Promise.all(Array.from(document.images).map((i) => i.decode().catch(() => undefined))); })()");let i=t.height??100;return t.height===void 0&&(i=Math.min(d,Math.max(1,Math.ceil(await e.evaluate("document.documentElement.scrollHeight")))),await e.session.send("Emulation.setDeviceMetricsOverride",{width:t.width,height:i,deviceScaleFactor:1,mobile:!1})),await e.capture({format:t.format??"png",...t.quality===void 0?{}:{quality:t.quality},clip:{x:0,y:0,width:t.width,height:i}})}finally{await e.close(),await a.close()}}
2
+ import{openPage as n}from"./page.js";import{startServer as r}from"./server.js";const d=16384;export async function drawHtml(l,t){const e=await r([...t.mounts??[],{at:"/index.html",body:t.html,type:"text/html; charset=utf-8"}]),a=await n(l,{width:t.width,height:t.height??100,allow:e.allow});try{await a.goto(`${e.origin}/index.html`),await a.evaluate("(async () => { await document.fonts.ready; await Promise.all(Array.from(document.images).map((i) => i.decode().catch(() => undefined))); await window.allyhubReady; })()");let i=t.height??100;return t.height===void 0&&(i=Math.min(d,Math.max(1,Math.ceil(await a.evaluate("document.documentElement.scrollHeight")))),await a.session.send("Emulation.setDeviceMetricsOverride",{width:t.width,height:i,deviceScaleFactor:1,mobile:!1})),await a.capture({format:t.format??"png",...t.quality===void 0?{}:{quality:t.quality},clip:{x:0,y:0,width:t.width,height:i}})}finally{await a.close(),await e.close()}}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/browser",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -12,6 +12,8 @@ export interface DocInfo {
12
12
  title?: string;
13
13
  /** The first paragraph under it, as plain text, for a glimpse in a list. */
14
14
  glimpse?: string;
15
+ /** The project's files it shows (its pictures), there or not. */
16
+ shows: string[];
15
17
  }
16
18
  export interface SheetInfo {
17
19
  dir: string;
@@ -37,6 +39,8 @@ export declare function readDocs(root: string, items: readonly Item[], files: re
37
39
  docs: DocInfo[];
38
40
  problems: Problem[];
39
41
  }>;
42
+ /** Each website's entry file checked against its format (AK-M013): what Studio runs to preview it. */
43
+ export declare function readWebsites(root: string, items: readonly Item[]): Promise<Problem[]>;
40
44
  export declare function readSheets(root: string, items: readonly Item[], meta?: MetaLoader): Promise<{
41
45
  sheets: SheetInfo[];
42
46
  problems: Problem[];
@@ -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 O}from"node:fs/promises";import{join as T,posix as b}from"node:path";import{hasText as D,parseDoc as M,shownBlocks as R,splitTitle as v,titleText as A}from"@allyhub-next/doc";import{createHash as y}from"node:crypto";import{SHEET_CODE as x}from"@allyhub-next/formats";import{GENERATED as z,checkWorkbook as F,seededRandom as K,tableRows as N}from"@allyhub-next/sheet";import{problem as k}from"@allyhub-next/video-core";import{readSheetSource as B,workbookFiles as C}from"./sheet-code.js";const E=180,G=/^([a-z][a-z0-9+.-]*:|\/\/)/iu,S=s=>s;function H(s){for(const i of s){if(i.type!=="paragraph")continue;const r=i.content.map(a=>a.text).join("").replace(/\s+/gu," ").trim();if(r!=="")return r.length>E?`${r.slice(0,E-1)}…`:r}}function*j(s){for(const i of s)yield i,D(i)&&i.children&&(yield*j(i.children))}export async function readDocs(s,i,r){const a=[],l=[],f=new Set(r);for(const e of i){if(e.kind!=="doc")continue;const o=e.entry,n=M(await O(T(s,o),"utf8"));for(const c of n.problems)l.push(k("AK-M008",`${o}: ${c.message}.`,{where:{file:o,...c.line===void 0?{}:{line:c.line}}}));const m=v(R(n.blocks)),d=A(m.title).trim()||void 0,p=H(m.body);for(const c of j(n.blocks)){if(c.type!=="image"||G.test(c.src))continue;const u=b.normalize(b.join(e.dir,decodeURIComponent(c.src)));f.has(u)||l.push(k("AK-M008",`${o} shows the picture ${c.src}, which is not in the project (${u}).`,{where:{file:o}}))}a.push({dir:e.dir,place:S(e.dir),file:o,...d?{title:d}:{},...p?{glimpse:p}:{}})}return{docs:a,problems:l}}function I(s,i,r,a,l){const f={};for(const e of r.tables){const o=N(a,e),n=y("sha256").update(l).update(JSON.stringify(o)).digest("hex");f[`${s}#${e.name}`]={sha256:n,value:o},f[`${i}#${e.name}`]={sha256:n,value:o}}return f}export async function readSheets(s,i,r){const a=[],l=[];let f={};for(const e of i){if(e.kind!=="sheet")continue;const o=e.entry,n=await B(s,e.dir,r?{meta:r}:{}).catch(()=>{});if(!n)continue;l.push(...n.problems);const{csv:m,generated:d}=n,p=y("sha256").update(n.text);for(const t of m.values())p.update(t);d&&p.update(JSON.stringify(d));const c=p.digest("hex"),u=F(C(s,n),{random:K(c)});for(const t of u.problems){const $=b.join(e.dir,t.file.startsWith(z)?x:t.file);l.push(k("AK-M009",`${$}${t.line===void 0?"":`:${String(t.line)}`}: ${t.message}.`,{where:{file:$,...t.line===void 0?{}:{line:t.line}}}))}const{workbook:h,calc:w}=u,g=h?.title?.trim();a.push({dir:e.dir,place:S(e.dir),file:o,...g?{title:g}:{},sheets:h?.sheets.map(t=>t.name)??[],tables:h?.tables.map(t=>({name:t.name,rows:t.rows}))??[],files:[o,...[...m.keys()].map(t=>b.join(e.dir,t)),...d||n.failed?[b.join(e.dir,x)]:[]],...d?{generated:d}:{},...n.failed?{codeFailed:!0}:{}}),h&&w&&(f={...f,...I(e.dir,o,h,w,c)})}return{sheets:a,problems:l,data:f}}
2
+ import{readFile as g}from"node:fs/promises";import{join as x,posix as b}from"node:path";import{hasText as T,parseDoc as A,shownBlocks as D,splitTitle as R,titleText as v}from"@allyhub-next/doc";import{createHash as S}from"node:crypto";import{SHEET_CODE as E,parseWebsite as K}from"@allyhub-next/formats";import{GENERATED as W,checkWorkbook as z,seededRandom as F,tableRows as N}from"@allyhub-next/sheet";import{problem as k}from"@allyhub-next/video-core";import{readSheetSource as B,workbookFiles as C}from"./sheet-code.js";const j=180,G=/^([a-z][a-z0-9+.-]*:|\/\/)/iu,M=n=>n;function H(n){for(const o of n){if(o.type!=="paragraph")continue;const s=o.content.map(a=>a.text).join("").replace(/\s+/gu," ").trim();if(s!=="")return s.length>j?`${s.slice(0,j-1)}…`:s}}function*O(n){for(const o of n)yield o,T(o)&&o.children&&(yield*O(o.children))}export async function readDocs(n,o,s){const a=[],c=[],f=new Set(s);for(const e of o){if(e.kind!=="doc")continue;const i=e.entry,r=A(await g(x(n,i),"utf8"));for(const l of r.problems)c.push(k("AK-M008",`${i}: ${l.message}.`,{where:{file:i,...l.line===void 0?{}:{line:l.line}}}));const u=R(D(r.blocks)),p=v(u.title).trim()||void 0,m=H(u.body),h=new Set;for(const l of O(r.blocks)){if(l.type!=="image"||G.test(l.src))continue;const d=b.normalize(b.join(e.dir,decodeURIComponent(l.src)));h.add(d),f.has(d)||c.push(k("AK-M008",`${i} shows the picture ${l.src}, which is not in the project (${d}).`,{where:{file:i}}))}a.push({dir:e.dir,place:M(e.dir),file:i,...p?{title:p}:{},...m?{glimpse:m}:{},shows:[...h]})}return{docs:a,problems:c}}function I(n,o,s,a,c){const f={};for(const e of s.tables){const i=N(a,e),r=S("sha256").update(c).update(JSON.stringify(i)).digest("hex");f[`${n}#${e.name}`]={sha256:r,value:i},f[`${o}#${e.name}`]={sha256:r,value:i}}return f}export async function readWebsites(n,o){const s=[];for(const a of o){if(a.kind!=="website")continue;const c=a.entry,f=K(await g(x(n,c),"utf8"));if(!f.ok)for(const e of f.problems)s.push(k("AK-M013",`${c}: ${e}.`,{where:{file:c}}))}return s}export async function readSheets(n,o,s){const a=[],c=[];let f={};for(const e of o){if(e.kind!=="sheet")continue;const i=e.entry,r=await B(n,e.dir,s?{meta:s}:{}).catch(()=>{});if(!r)continue;c.push(...r.problems);const{csv:u,generated:p}=r,m=S("sha256").update(r.text);for(const t of u.values())m.update(t);p&&m.update(JSON.stringify(p));const h=m.digest("hex"),l=z(C(n,r),{random:F(h)});for(const t of l.problems){const y=b.join(e.dir,t.file.startsWith(W)?E:t.file);c.push(k("AK-M009",`${y}${t.line===void 0?"":`:${String(t.line)}`}: ${t.message}.`,{where:{file:y,...t.line===void 0?{}:{line:t.line}}}))}const{workbook:d,calc:w}=l,$=d?.title?.trim();a.push({dir:e.dir,place:M(e.dir),file:i,...$?{title:$}:{},sheets:d?.sheets.map(t=>t.name)??[],tables:d?.tables.map(t=>({name:t.name,rows:t.rows}))??[],files:[i,...[...u.keys()].map(t=>b.join(e.dir,t)),...p||r.failed?[b.join(e.dir,E)]:[]],...p?{generated:p}:{},...r.failed?{codeFailed:!0}:{}}),d&&w&&(f={...f,...I(e.dir,i,d,w,h)})}return{sheets:a,problems:c,data:f}}
@@ -12,10 +12,10 @@ export { makeWords, takeVoice, type MadeWords, type MakeWordsOptions, type TakeV
12
12
  export { resolveMatrix, type ResolvedMatrix } from "./matrix.js";
13
13
  export { FONTS_MODULE, fontStyles, fontsDigest, fontsModule } from "./fonts.js";
14
14
  export { LENT, SDK, SDK_ENTRIES, checkImports, discover, lineAt, packageName, parse, walk, type Discovered, type Node, type Parsed, } from "./scan.js";
15
- export { allyhubPlugin, boundSdk, lentSdk, type PluginOptions, } from "./plugin.js";
15
+ export { allyhubPlugin, boundSdk, lentSdk, mediaHref, type PluginOptions, } from "./plugin.js";
16
16
  export { MetaLoader, type MetaResult } from "./meta.js";
17
17
  export type { WorkerInit as MetaInit } from "./meta-worker.js";
18
18
  export { MESSAGE_TYPES, messageTypes, writeMessageTypes } from "./types.js";
19
- export { prepare, sourceOf, type PieceInfo, type Prepared, type PrepareOptions, } from "./prepare.js";
19
+ export { BUILD_FOLDER, prepare, sourceOf, type PieceInfo, type Prepared, type PrepareOptions, } from "./prepare.js";
20
20
  export { codeOf, type PieceCode } from "./code.js";
21
21
  //# 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{dependenciesOf,listFiles}from"./files.js";export{hasSheetCode,readSheetSource,runSheetCode,sheetRoot,workbookFiles}from"./sheet-code.js";export{moveEdits,movedPath,referencesOf,referringFiles}from"./move-refs.js";export{bundleForStage,compileErrorOf,createModuleLoader,createStageDevServer,loadUserVite}from"./vite.js";export{placeFinder}from"./places.js";export{mergeScripts,readMessages}from"./messages.js";export{MAX_DATA_BYTES,isDataFile,parseCsv,parseData,readData,readTable}from"./data.js";export{readDocs,readSheets}from"./content.js";export{readMedia}from"./media.js";export{modelInfo}from"./model-info.js";export{makeWords,takeVoice}from"./takes.js";export{resolveMatrix}from"./matrix.js";export{FONTS_MODULE,fontStyles,fontsDigest,fontsModule}from"./fonts.js";export{LENT,SDK,SDK_ENTRIES,checkImports,discover,lineAt,packageName,parse,walk}from"./scan.js";export{allyhubPlugin,boundSdk,lentSdk}from"./plugin.js";export{MetaLoader}from"./meta.js";export{MESSAGE_TYPES,messageTypes,writeMessageTypes}from"./types.js";export{prepare,sourceOf}from"./prepare.js";export{codeOf}from"./code.js";
2
+ export{dependenciesOf,listFiles}from"./files.js";export{hasSheetCode,readSheetSource,runSheetCode,sheetRoot,workbookFiles}from"./sheet-code.js";export{moveEdits,movedPath,referencesOf,referringFiles}from"./move-refs.js";export{bundleForStage,compileErrorOf,createModuleLoader,createStageDevServer,loadUserVite}from"./vite.js";export{placeFinder}from"./places.js";export{mergeScripts,readMessages}from"./messages.js";export{MAX_DATA_BYTES,isDataFile,parseCsv,parseData,readData,readTable}from"./data.js";export{readDocs,readSheets}from"./content.js";export{readMedia}from"./media.js";export{modelInfo}from"./model-info.js";export{makeWords,takeVoice}from"./takes.js";export{resolveMatrix}from"./matrix.js";export{FONTS_MODULE,fontStyles,fontsDigest,fontsModule}from"./fonts.js";export{LENT,SDK,SDK_ENTRIES,checkImports,discover,lineAt,packageName,parse,walk}from"./scan.js";export{allyhubPlugin,boundSdk,lentSdk,mediaHref}from"./plugin.js";export{MetaLoader}from"./meta.js";export{MESSAGE_TYPES,messageTypes,writeMessageTypes}from"./types.js";export{BUILD_FOLDER,prepare,sourceOf}from"./prepare.js";export{codeOf}from"./code.js";
@@ -19,8 +19,8 @@ export type WorkerRequest = {
19
19
  file: string;
20
20
  /** Its slides.yaml as read; none when it has none or it is not the format. */
21
21
  slides: SlidesFile | undefined;
22
- /** The default language's messages, by key: the script's words. */
23
- words: Record<string, unknown>;
22
+ /** Each language's messages, by key (the script's words), the default first. */
23
+ words: Record<string, Record<string, unknown>>;
24
24
  prefix: string;
25
25
  /** The project's sheets' tables as they compute, by <sheet>#<table>. */
26
26
  tables: Record<string, unknown>;
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFileSync as S}from"node:fs";import A from"node:net";import{join as w}from"node:path";import{format as F}from"node:util";import{parentPort as v,workerData as J}from"node:worker_threads";import{posix as b}from"node:path";import{projectPath as V}from"@allyhub-next/formats";import{isSheetCode as H}from"@allyhub-next/sheet/api";import{evaluateDeck as W,isDeck as z,joinPath as L,resolveDeck as Y}from"@allyhub-next/slides-core";import{MEDIA_BRAND as O,isPieceDefinition as G,outputName as Q,outputOf as X,problem as $}from"@allyhub-next/video-core";import{typedNumbers as Z}from"@allyhub-next/sheet";import{parseCsv as q,parseData as R,readTable as tt}from"./data.js";import{nodeStackPlace as et}from"./places.js";import{allyhubPlugin as ot}from"./plugin.js";import{SDK as nt}from"./scan.js";import{createModuleLoader as rt,loadUserVite as st}from"./vite.js";const l=J,y=[];let E=!1;for(const t of["log","info","warn","error","debug"])console[t]=(...e)=>{E||process.stderr.write(`${F(...e)}
3
- `)};const K=Date.UTC(2026,0,1),_=Date,it=Math.random,at=globalThis.fetch,ct=Reflect.get(A.Socket.prototype,"connect");function ut(t){let e=t>>>0;return()=>{e=e+1831565813|0;let o=Math.imul(e^e>>>15,1|e);return o=o+Math.imul(o^o>>>7,61|o)^o,((o^o>>>14)>>>0)/4294967296}}function dt(t){let e=2166136261;for(let o=0;o<t.length;o++)e^=t.charCodeAt(o),e=Math.imul(e,16777619);return e>>>0}function ft(){const{stack:t}=new Error,e=t?.split(`
4
- `)[4];return et(e,l.root)}function lt(){return t=>{const e=ft();e&&y.push($("AK-M012",`${e.file}:${String(e.line)} uses ${t}. sheet.ts makes the same workbook from the same files: a date or a random number is the data's, or a formula's (TODAY, RAND).`,{where:{file:e.file,line:e.line}}))}}async function k(t,e,o,n=`reading the metadata of ${e}`,r=!0,i){const c=globalThis;class s extends _{constructor(...m){m.length===0?(super(K),i?.("the clock (new Date())")):super(...m)}static now(){return i?.("the clock (Date.now)"),K}}const h=a=>{y.push($("AK-B003",`A network request was made while ${n}: ${a}. The build has no network: put the data in the project and import it.`,{where:{file:e}}))};c.Date=s;const f=ut(dt(t));Math.random=i?()=>(i("a random number (Math.random)"),f()):f;const u=[];if(i){const a=(g,j,I,P)=>{const D=g[j];typeof D=="function"&&(g[j]=function(...B){return i(I),P===void 0?D.apply(this,B):P},u.push(()=>{g[j]=D}))};a(performance,"now","the clock (performance.now)",0);const{crypto:m}=globalThis,d=m;a(d,"randomUUID","a random number (crypto.randomUUID)",void 0),a(d,"getRandomValues","a random number (crypto.getRandomValues)",void 0),a(process,"getBuiltinModule","Node's own modules, which reach outside the project",void 0)}c.fetch=a=>(h(typeof a=="string"?a:a.url??"a request"),Promise.reject(new TypeError("network blocked by AllyHub"))),Reflect.set(A.Socket.prototype,"connect",function(...a){const[m]=a;return h(typeof m=="object"&&m!==null?`${m.host??""}:${String(m.port??"")}`:String(m)),this.destroy(new Error("network blocked by AllyHub")),this}),E=r;try{return await o()}finally{E=!1;for(const a of u)a();c.Date=_,Math.random=it,c.fetch=at,Reflect.set(A.Socket.prototype,"connect",ct)}}function p(t,e,o){if(typeof t=="function"){o.push(e);return}if(t===null||typeof t!="object")return typeof t=="bigint"||typeof t=="symbol"?String(t):t;if(O in t)return t.path;if(Array.isArray(t))return t.map((r,i)=>p(r,`${e}[${String(i)}]`,o));const n={};for(const[r,i]of Object.entries(t)){const c=p(i,e?`${e}.${r}`:r,o);c!==void 0&&(n[r]=c)}return n}function N(t,e){const o=b.normalize(e.startsWith("/")?e.slice(1):b.join(t,e));return o.startsWith("..")?void 0:V(o)}function C(t,e){return typeof t=="string"?N(e,t)??t:typeof t=="object"&&t!==null&&O in t?t.path:t}const x=(t,e)=>t===""?e:`${t}.${e}`;function mt(t,e,o,n,r={}){const i={};for(const[c,s]of Object.entries(t)){if(c==="covers"){typeof s=="function"?i.covers=!0:s!==void 0&&(i.covers=p(s,x(n,"covers"),o));continue}if(c==="post"&&typeof s=="object"&&s!==null){const f=p(s,x(n,"post"),o),u=s.lut;i.post={...f,...typeof u=="string"?{lut:N(r.post??b.dirname(e),u)??u}:{}};continue}if(c==="music"&&s!==void 0){const f=typeof s=="string"||typeof s=="object"&&s!==null&&O in s?{file:s}:s,u=p({...f,file:void 0},x(n,"music"),o),a=f.file;i.music={...u,...a===void 0?{}:typeof a=="object"&&a!==null&&!(O in a)?{file:Object.fromEntries(Object.entries(a).map(([m,d])=>[m,C(d,r.music??b.dirname(e))]))}:{file:C(a,r.music??b.dirname(e))}};continue}const h=p(s,x(n,c),o);h!==void 0&&(i[c]=h)}return i}process.env.NODE_ENV="production";const M=(async()=>{const t=l.user?await st(l.root):void 0;return rt(l.root,[ot({root:l.root,media:l.media,dependencies:new Set(l.dependencies),...l.lent?{lent:l.lent}:{}})],{mode:"production",inline:[nt,...Object.keys(l.lent??{})],...t?{user:t}:{}})})();function U(t,e,o){const n=t.written?.file;return t.written?.paths?.[e]?.[1]??b.dirname(n!==void 0&&n!==""?n:o)}async function pt(t){const o=(await k(t,t,async()=>(await M).import(w(l.root,t)))).default;if(!G(o))throw new Error("The default export is not a video: an item's video.ts exports video({ … })");const n=[],r=X(o),i={[Q(r.kind)]:{kind:r.kind,options:mt(r.options,t,n,"",{music:U(o,"music",t),post:U(o,"post",t)})}},c={written:o.written?.file??t,...o.id===void 0?{}:{id:p(o.id,"id",n)},...o.title===void 0?{}:{title:p(o.title,"title",n)},...o.format===void 0?{}:{format:p(o.format,"format",n)},...o.matrix===void 0?{}:{matrix:p(o.matrix,"matrix",n)},...o.meta===void 0?{}:{meta:p(o.meta,"meta",n)},outputs:i};return n.length>0&&y.push($("AK-M001",`These places of the piece in ${t} are functions and cannot be read as metadata: ${n.join(", ")}. Make them plain data (text, numbers, lists, objects).`,{where:{file:t}})),c}async function ht(t){const e=await k(t,t,async()=>(await M).import(w(l.root,t))),o=[];for(const n of Object.values(e)){if(typeof n!="function")continue;const r=n.info;if(r===void 0||typeof n.componentName!="string")continue;const i=[],c=p(r,"",i);i.length>0&&y.push($("AK-M001",`These places in the component declaration in ${t} are functions and cannot be read as metadata: ${i.join(", ")}. The types and examples of props must be plain data.`,{where:{file:t}})),o.push({...c,file:t})}return o}async function yt(t){const e=await k(t,t,async()=>(await M).import(w(l.root,t)),void 0,!1);return p(e.default,"",[])}function wt(t){const e=Object.keys(t),o=n=>{const r=t[n];if(typeof r=="string")return r;if(typeof r=="object"&&r!==null&&"display"in r)return String(r.display);const i=`${n}.`,c=[...new Set(e.filter(s=>s.startsWith(i)).map(s=>s.slice(i.length).split(".")[0]).filter(s=>s!==void 0&&/^\d+$/u.test(s)))].sort((s,h)=>Number(s)-Number(h));if(c.length!==0)return c.map(s=>o(`${n}.${s}`)).filter(s=>s!==void 0)};return o}async function bt(t){const{file:e}=t,n=(await k(e,e,async()=>(await M).import(w(l.root,e)))).default;if(!z(n))throw new Error("The default export is not a deck: an item's slides.ts exports presentation((prs) => { … }) from @allyhub/sdk/slides");const r=await k(e,e,()=>Promise.resolve(W(n))),i=b.dirname(e),c=f=>{const u=L(i,f);if(u.includes("#"))return Object.hasOwn(t.tables,u)?t.tables[u]:tt(l.root,u);const a=S(w(l.root,u),"utf8");return/\.csv$/iu.test(u)?q(a):R(u,a)},{deck:s,problems:h}=Y({def:r,file:t.slides??{slides:[]},words:wt(t.words),prefix:t.prefix,base:i,data:c});return{...n.options.title===void 0?{}:{title:n.options.title},size:[r.slide_width,r.slide_height],layouts:r.masters.flatMap(f=>f.layouts.map(u=>u.name)),components:Object.fromEntries(Object.entries(r.components).map(([f,u])=>[f,p(u.props,f,[])])),generators:Object.keys(r.generators),resolved:JSON.parse(JSON.stringify(s)),problems:h}}function T(t,e){if(typeof t=="number")e.add(t);else if(Array.isArray(t))for(const o of t)T(o,e);else if(typeof t=="object"&&t!==null)for(const o of Object.values(t))T(o,e)}async function gt(t){const e=lt(),o=`running ${t}`,r=(await k(t,t,async()=>(await M).import(w(l.root,t)),o,!0,e)).default;if(!H(r))throw new Error("The default export is not a workbook: an item's sheet.ts exports workbook((wb, { data }) => { … }) from @allyhub/sdk/sheets");const i=b.dirname(t),c=new Set,s=d=>{const g=N(i,d);if(g===void 0||d.includes("#"))throw y.push($("AK-M012",`${t} reads ${d}: data() reads a file of the project, from the sheet's folder.`,{where:{file:t}})),new Error(`${d} is not a file of the project.`);const j=R(g,S(w(l.root,g),"utf8"));return T(j,c),j},h=()=>k(t,t,()=>Promise.resolve(r.generate({data:s})),o,!0,e),f=await h(),u=await h();JSON.stringify(f)!==JSON.stringify(u)&&y.push($("AK-M012",`${t} made other sheets the second time it ran: what it keeps between runs is not the project's files.`,{where:{file:t}}));const a=S(w(l.root,t),"utf8");for(const d of a.matchAll(/(?<![\w.])-?\d[\d_]*(?:\.\d+)?(?:e[+-]?\d+)?/giu))c.add(Number(d[0].replaceAll("_","")));const m=Z(f.sheets,f.csv).filter(d=>!c.has(d.value)).flatMap(d=>d.cell===void 0?[{sheet:d.sheet,cell:d.file??"",value:d.value}]:[{sheet:d.sheet,cell:d.cell,value:d.value}]);return{...f,...m.length>0?{typed:m}:{}}}v?.on("message",t=>{(async()=>{y.length=0;try{await M;const e=t.type==="piece"?await pt(t.file):t.type==="deck"?await bt(t):t.type==="sheet"?await gt(t.file):t.type==="components"?await ht(t.file):await yt(t.file),o={id:t.id,ok:!0,value:e,problems:[...y]};v?.postMessage(o)}catch(e){const o={id:t.id,ok:!1,error:e instanceof Error?e.message:String(e),...e instanceof Error&&e.stack?{stack:e.stack}:{},problems:[...y]};v?.postMessage(o)}})()});
2
+ import{readFileSync as A}from"node:fs";import v from"node:net";import{join as g}from"node:path";import{format as B}from"node:util";import{parentPort as N,workerData as F}from"node:worker_threads";import{posix as k}from"node:path";import{projectPath as V}from"@allyhub-next/formats";import{isSheetCode as H}from"@allyhub-next/sheet/api";import{deckCode as W,evaluateDeck as z,isDeck as L,joinPath as Y,resolveDeck as G}from"@allyhub-next/slides-core";import{MEDIA_BRAND as S,isPieceDefinition as Q,outputName as X,outputOf as Z,problem as $}from"@allyhub-next/video-core";import{typedNumbers as q}from"@allyhub-next/sheet";import{parseCsv as tt,parseData as C,readTable as et}from"./data.js";import{nodeStackPlace as ot}from"./places.js";import{allyhubPlugin as nt}from"./plugin.js";import{SDK as rt}from"./scan.js";import{createModuleLoader as st,loadUserVite as it}from"./vite.js";const l=F,b=[];let E=!1;for(const t of["log","info","warn","error","debug"])console[t]=(...e)=>{E||process.stderr.write(`${B(...e)}
3
+ `)};const K=Date.UTC(2026,0,1),_=Date,at=Math.random,ct=globalThis.fetch,dt=Reflect.get(v.Socket.prototype,"connect");function ut(t){let e=t>>>0;return()=>{e=e+1831565813|0;let o=Math.imul(e^e>>>15,1|e);return o=o+Math.imul(o^o>>>7,61|o)^o,((o^o>>>14)>>>0)/4294967296}}function lt(t){let e=2166136261;for(let o=0;o<t.length;o++)e^=t.charCodeAt(o),e=Math.imul(e,16777619);return e>>>0}function ft(){const{stack:t}=new Error,e=t?.split(`
4
+ `)[4];return ot(e,l.root)}function mt(){return t=>{const e=ft();e&&b.push($("AK-M012",`${e.file}:${String(e.line)} uses ${t}. sheet.ts makes the same workbook from the same files: a date or a random number is the data's, or a formula's (TODAY, RAND).`,{where:{file:e.file,line:e.line}}))}}async function j(t,e,o,r=`reading the metadata of ${e}`,s=!0,a){const d=globalThis;class i extends _{constructor(...c){c.length===0?(super(K),a?.("the clock (new Date())")):super(...c)}static now(){return a?.("the clock (Date.now)"),K}}const m=u=>{b.push($("AK-B003",`A network request was made while ${r}: ${u}. The build has no network: put the data in the project and import it.`,{where:{file:e}}))};d.Date=i;const p=ut(lt(t));Math.random=a?()=>(a("a random number (Math.random)"),p()):p;const h=[];if(a){const u=(f,w,M,R)=>{const D=f[w];typeof D=="function"&&(f[w]=function(...J){return a(M),R===void 0?D.apply(this,J):R},h.push(()=>{f[w]=D}))};u(performance,"now","the clock (performance.now)",0);const{crypto:c}=globalThis,n=c;u(n,"randomUUID","a random number (crypto.randomUUID)",void 0),u(n,"getRandomValues","a random number (crypto.getRandomValues)",void 0),u(process,"getBuiltinModule","Node's own modules, which reach outside the project",void 0)}d.fetch=u=>(m(typeof u=="string"?u:u.url??"a request"),Promise.reject(new TypeError("network blocked by AllyHub"))),Reflect.set(v.Socket.prototype,"connect",function(...u){const[c]=u;return m(typeof c=="object"&&c!==null?`${c.host??""}:${String(c.port??"")}`:String(c)),this.destroy(new Error("network blocked by AllyHub")),this}),E=s;try{return await o()}finally{E=!1;for(const u of h)u();d.Date=_,Math.random=at,d.fetch=ct,Reflect.set(v.Socket.prototype,"connect",dt)}}function y(t,e,o){if(typeof t=="function"){o.push(e);return}if(t===null||typeof t!="object")return typeof t=="bigint"||typeof t=="symbol"?String(t):t;if(S in t)return t.path;if(Array.isArray(t))return t.map((s,a)=>y(s,`${e}[${String(a)}]`,o));const r={};for(const[s,a]of Object.entries(t)){const d=y(a,e?`${e}.${s}`:s,o);d!==void 0&&(r[s]=d)}return r}function T(t,e){const o=k.normalize(e.startsWith("/")?e.slice(1):k.join(t,e));return o.startsWith("..")?void 0:V(o)}function U(t,e){return typeof t=="string"?T(e,t)??t:typeof t=="object"&&t!==null&&S in t?t.path:t}const x=(t,e)=>t===""?e:`${t}.${e}`;function pt(t,e,o,r,s={}){const a={};for(const[d,i]of Object.entries(t)){if(d==="covers"){typeof i=="function"?a.covers=!0:i!==void 0&&(a.covers=y(i,x(r,"covers"),o));continue}if(d==="post"&&typeof i=="object"&&i!==null){const p=y(i,x(r,"post"),o),h=i.lut;a.post={...p,...typeof h=="string"?{lut:T(s.post??k.dirname(e),h)??h}:{}};continue}if(d==="music"&&i!==void 0){const p=typeof i=="string"||typeof i=="object"&&i!==null&&S in i?{file:i}:i,h=y({...p,file:void 0},x(r,"music"),o),u=p.file;a.music={...h,...u===void 0?{}:typeof u=="object"&&u!==null&&!(S in u)?{file:Object.fromEntries(Object.entries(u).map(([c,n])=>[c,U(n,s.music??k.dirname(e))]))}:{file:U(u,s.music??k.dirname(e))}};continue}const m=y(i,x(r,d),o);m!==void 0&&(a[d]=m)}return a}process.env.NODE_ENV="production";const O=(async()=>{const t=l.user?await it(l.root):void 0;return st(l.root,[nt({root:l.root,media:l.media,dependencies:new Set(l.dependencies),inNode:!0,...l.lent?{lent:l.lent}:{}})],{mode:"production",inline:[rt,...Object.keys(l.lent??{})],...t?{user:t}:{}})})();function I(t,e,o){const r=t.written?.file;return t.written?.paths?.[e]?.[1]??k.dirname(r!==void 0&&r!==""?r:o)}async function ht(t){const o=(await j(t,t,async()=>(await O).import(g(l.root,t)))).default;if(!Q(o))throw new Error("The default export is not a video: an item's video.ts exports video({ … })");const r=[],s=Z(o),a={[X(s.kind)]:{kind:s.kind,options:pt(s.options,t,r,"",{music:I(o,"music",t),post:I(o,"post",t)})}},d={written:o.written?.file??t,...o.id===void 0?{}:{id:y(o.id,"id",r)},...o.title===void 0?{}:{title:y(o.title,"title",r)},...o.format===void 0?{}:{format:y(o.format,"format",r)},...o.matrix===void 0?{}:{matrix:y(o.matrix,"matrix",r)},...o.meta===void 0?{}:{meta:y(o.meta,"meta",r)},outputs:a};return r.length>0&&b.push($("AK-M001",`These places of the piece in ${t} are functions and cannot be read as metadata: ${r.join(", ")}. Make them plain data (text, numbers, lists, objects).`,{where:{file:t}})),d}async function yt(t){const e=await j(t,t,async()=>(await O).import(g(l.root,t))),o=[];for(const r of Object.values(e)){if(typeof r!="function")continue;const s=r.info;if(s===void 0||typeof r.componentName!="string")continue;const a=[],d=y(s,"",a);a.length>0&&b.push($("AK-M001",`These places in the component declaration in ${t} are functions and cannot be read as metadata: ${a.join(", ")}. The types and examples of props must be plain data.`,{where:{file:t}})),o.push({...d,file:t})}return o}async function wt(t){const e=await j(t,t,async()=>(await O).import(g(l.root,t)),void 0,!1);return y(e.default,"",[])}function bt(t){const e=Object.keys(t),o=r=>{const s=t[r];if(typeof s=="string")return s;if(typeof s=="object"&&s!==null&&"display"in s)return String(s.display);const a=`${r}.`,d=[...new Set(e.filter(i=>i.startsWith(a)).map(i=>i.slice(a.length).split(".")[0]).filter(i=>i!==void 0&&/^\d+$/u.test(i)))].sort((i,m)=>Number(i)-Number(m));if(d.length!==0)return d.map(i=>o(`${r}.${i}`)).filter(i=>i!==void 0)};return o}async function gt(t){const{file:e}=t,r=(await j(e,e,async()=>(await O).import(g(l.root,e)))).default;if(!L(r))throw new Error("The default export is not a deck: an item's slides.ts exports presentation((prs) => { … }) from @allyhub/sdk/slides");const s=await j(e,e,()=>Promise.resolve(z(r))),a=k.dirname(e),d=c=>{const n=Y(a,c);if(n.includes("#"))return Object.hasOwn(t.tables,n)?t.tables[n]:et(l.root,n);const f=A(g(l.root,n),"utf8");return/\.csv$/iu.test(n)?tt(f):C(n,f)},i=await j(e,e,()=>Promise.resolve(W(s,d))),m=Object.keys(t.words);let p;const h=new Map;for(const c of m.length>0?m:[""]){const n=G({code:i,file:t.slides??{slides:[]},words:bt(t.words[c]??{}),prefix:t.prefix,base:a,data:d});p??=n.deck;for(const f of n.problems){const w=JSON.stringify([f.path,f.slide,f.shape,f.message]),M=h.get(w);M?M.langs.push(c):h.set(w,{...f,langs:[c]})}}const u=[...h.values()].map(({langs:c,...n})=>c.length===m.length||m.length<=1?n:{...n,message:`${n.message} (in ${c.join(", ")})`});return{...r.options.title===void 0?{}:{title:r.options.title},size:[s.slide_width,s.slide_height],layouts:s.masters.flatMap(c=>c.layouts.map(n=>n.name)),components:Object.fromEntries(Object.entries(s.components).map(([c,n])=>[c,y(n.props,c,[])])),generators:Object.keys(s.generators),code:i,resolved:JSON.parse(JSON.stringify(p)),problems:u}}function P(t,e){if(typeof t=="number")e.add(t);else if(Array.isArray(t))for(const o of t)P(o,e);else if(typeof t=="object"&&t!==null)for(const o of Object.values(t))P(o,e)}async function kt(t){const e=mt(),o=`running ${t}`,s=(await j(t,t,async()=>(await O).import(g(l.root,t)),o,!0,e)).default;if(!H(s))throw new Error("The default export is not a workbook: an item's sheet.ts exports workbook((wb, { data }) => { … }) from @allyhub/sdk/sheets");const a=k.dirname(t),d=new Set,i=n=>{const f=T(a,n);if(f===void 0||n.includes("#"))throw b.push($("AK-M012",`${t} reads ${n}: data() reads a file of the project, from the sheet's folder.`,{where:{file:t}})),new Error(`${n} is not a file of the project.`);const w=C(f,A(g(l.root,f),"utf8"));return P(w,d),w},m=()=>j(t,t,()=>Promise.resolve(s.generate({data:i})),o,!0,e),p=await m(),h=await m();JSON.stringify(p)!==JSON.stringify(h)&&b.push($("AK-M012",`${t} made other sheets the second time it ran: what it keeps between runs is not the project's files.`,{where:{file:t}}));const u=A(g(l.root,t),"utf8");for(const n of u.matchAll(/(?<![\w.])-?\d[\d_]*(?:\.\d+)?(?:e[+-]?\d+)?/giu))d.add(Number(n[0].replaceAll("_","")));const c=q(p.sheets,p.csv).filter(n=>!d.has(n.value)).flatMap(n=>n.cell===void 0?[{sheet:n.sheet,cell:n.file??"",value:n.value}]:[{sheet:n.sheet,cell:n.cell,value:n.value}]);return{...p,...c.length>0?{typed:c}:{}}}N?.on("message",t=>{(async()=>{b.length=0;try{await O;const e=t.type==="piece"?await ht(t.file):t.type==="deck"?await gt(t):t.type==="sheet"?await kt(t.file):t.type==="components"?await yt(t.file):await wt(t.file),o={id:t.id,ok:!0,value:e,problems:[...b]};N?.postMessage(o)}catch(e){const o={id:t.id,ok:!1,error:e instanceof Error?e.message:String(e),...e instanceof Error&&e.stack?{stack:e.stack}:{},problems:[...b]};N?.postMessage(o)}})()});
@@ -2,7 +2,7 @@
2
2
  export declare function movedPath(path: string, from: string, to: string): string;
3
3
  /** The project paths a file's relative references reach (imports, a doc's links). */
4
4
  export declare function referencesOf(file: string, source: string): string[];
5
- /** The project's files a move may touch: the build's, and every website's own pages. */
5
+ /** The project's files a move may touch: the build's (a website's folder is its own project, apart). */
6
6
  export declare function referringFiles(root: string): Promise<string[]>;
7
7
  /**
8
8
  * The files to write before `from` (a folder or a file of the project)
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readdir as g,readFile as w}from"node:fs/promises";import{join as h,posix as f}from"node:path";import{listFiles as O}from"./files.js";import{parse as j}from"./scan.js";import{scanItems as W}from"@allyhub-next/formats";export function movedPath(s,o,r){return s===o?r:s.startsWith(`${o}/`)?`${r}${s.slice(o.length)}`:s}const x=/\.(ts|tsx|js|jsx|mts|mjs|cts|cjs)$/u,y=/\.(astro|mdx)$/u,v=/\.mdx?$/u,b=new Set(["node_modules",".astro","dist"]);function k(s,o){const r=[],e=j(s,o),t=i=>{if(Array.isArray(i)){for(const c of i)t(c);return}if(i===null||typeof i!="object")return;const n=i;if((n.type==="ImportDeclaration"||n.type==="ExportNamedDeclaration"||n.type==="ExportAllDeclaration"||n.type==="ImportExpression")&&n.source!==null&&typeof n.source=="object"){const c=n.source;typeof c.value=="string"&&r.push({start:c.start+1,end:c.end-1,value:c.value,link:!1})}for(const[c,u]of Object.entries(n))(c!=="source"||n.type==="ImportExpression")&&t(u)};return t(e.program),r}const E=/\bfrom\s*(["'])([^"'\n]+)\1|\bimport\s*\(\s*(["'])([^"'\n]+)\3\s*\)|\bimport\s+(["'])([^"'\n]+)\5/gu,D=/\]\(\s*<?([^)\s>]+)>?(?:\s+"[^"]*")?\s*\)|\b(?:src|href)="([^"]+)"/gu;function I(s,o){const r=[];for(const e of s.matchAll(E)){const t=e[2]??e[4]??e[6];if(t===void 0)continue;const i=e.index+e[0].lastIndexOf(t);r.push({start:i,end:i+t.length,value:t,link:!1})}if(o)for(const e of s.matchAll(D)){const t=e[1]??e[2];if(t===void 0)continue;const i=e.index+e[0].indexOf(t);r.push({start:i,end:i+t.length,value:t,link:!0})}return r}function z(s,o,r,e){const{value:t}=s,i=t.startsWith("./")||t.startsWith("../");if(!i&&(!s.link||/^[a-z][a-z0-9+.-]*:|^[#/]/iu.test(t)))return;const n=t.search(/[?#]/u),c=n<0?t:t.slice(0,n),u=n<0?"":t.slice(n);if(c==="")return;const l=f.normalize(f.join(f.dirname(o),c));if(l.startsWith(".."))return;const a=movedPath(l,r,e),p=f.dirname(movedPath(o,r,e));if(a===l&&p===f.dirname(o))return;let d=f.relative(p,a)||".";i&&!d.startsWith(".")&&(d=`./${d}`);const m=`${d}${u}`;return m===t?void 0:m}function $(s,o){const r=x.test(s),e=y.test(s),t=v.test(s);if(!r&&!e&&!t)return[];try{return r?k(s,o):I(o,t)}catch{return[]}}export function referencesOf(s,o){const r=[];for(const e of $(s,o)){const{value:t}=e;if(!(t.startsWith("./")||t.startsWith("../"))&&(!e.link||/^[a-z][a-z0-9+.-]*:|^[#/]/iu.test(t)))continue;const n=t.search(/[?#]/u),c=n<0?t:t.slice(0,n);if(c==="")continue;const u=f.normalize(f.join(f.dirname(s),c));u.startsWith("..")||r.push(u)}return r}export async function referringFiles(s){const o=await O(s),r=[...o],e=async t=>{const i=await g(h(s,t),{withFileTypes:!0}).catch(()=>[]);for(const n of i){if(b.has(n.name)||n.name.startsWith("."))continue;const c=`${t}/${n.name}`;n.isDirectory()?await e(c):n.isFile()&&!r.includes(c)&&r.push(c)}};for(const t of W(o).items)t.kind==="website"&&await e(t.dir);return r}export async function moveEdits(s,o,r,e){const t=[];for(const i of e??await referringFiles(s)){if(!x.test(i)&&!y.test(i)&&!v.test(i))continue;const n=await w(h(s,i),"utf8").catch(()=>{});if(n===void 0)continue;const u=$(i,n).map(a=>({span:a,next:z(a,i,o,r)})).filter(a=>a.next!==void 0).sort((a,p)=>p.span.start-a.span.start);if(u.length===0)continue;let l=n;for(const{span:a,next:p}of u)l=`${l.slice(0,a.start)}${p}${l.slice(a.end)}`;t.push({path:i,text:l})}return t}
2
+ import{readFile as y}from"node:fs/promises";import{join as g,posix as f}from"node:path";import{listFiles as $}from"./files.js";import{parse as j}from"./scan.js";export function movedPath(n,i,o){return n===i?o:n.startsWith(`${i}/`)?`${o}${n.slice(i.length)}`:n}const h=/\.(ts|tsx|js|jsx|mts|mjs|cts|cjs)$/u,x=/\.mdx?$/u;function O(n,i){const o=[],e=j(n,i),t=s=>{if(Array.isArray(s)){for(const c of s)t(c);return}if(s===null||typeof s!="object")return;const r=s;if((r.type==="ImportDeclaration"||r.type==="ExportNamedDeclaration"||r.type==="ExportAllDeclaration"||r.type==="ImportExpression")&&r.source!==null&&typeof r.source=="object"){const c=r.source;typeof c.value=="string"&&o.push({start:c.start+1,end:c.end-1,value:c.value,link:!1})}for(const[c,u]of Object.entries(r))(c!=="source"||r.type==="ImportExpression")&&t(u)};return t(e.program),o}const W=/\bfrom\s*(["'])([^"'\n]+)\1|\bimport\s*\(\s*(["'])([^"'\n]+)\3\s*\)|\bimport\s+(["'])([^"'\n]+)\5/gu,b=/\]\(\s*<?([^)\s>]+)>?(?:\s+"[^"]*")?\s*\)|\b(?:src|href)="([^"]+)"/gu;function E(n,i){const o=[];for(const e of n.matchAll(W)){const t=e[2]??e[4]??e[6];if(t===void 0)continue;const s=e.index+e[0].lastIndexOf(t);o.push({start:s,end:s+t.length,value:t,link:!1})}if(i)for(const e of n.matchAll(b)){const t=e[1]??e[2];if(t===void 0)continue;const s=e.index+e[0].indexOf(t);o.push({start:s,end:s+t.length,value:t,link:!0})}return o}function k(n,i,o,e){const{value:t}=n,s=t.startsWith("./")||t.startsWith("../");if(!s&&(!n.link||/^[a-z][a-z0-9+.-]*:|^[#/]/iu.test(t)))return;const r=t.search(/[?#]/u),c=r<0?t:t.slice(0,r),u=r<0?"":t.slice(r);if(c==="")return;const l=f.normalize(f.join(f.dirname(i),c));if(l.startsWith(".."))return;const a=movedPath(l,o,e),p=f.dirname(movedPath(i,o,e));if(a===l&&p===f.dirname(i))return;let d=f.relative(p,a)||".";s&&!d.startsWith(".")&&(d=`./${d}`);const m=`${d}${u}`;return m===t?void 0:m}function v(n,i){const o=h.test(n),e=x.test(n);if(!o&&!e)return[];try{return o?O(n,i):E(i,e)}catch{return[]}}export function referencesOf(n,i){const o=[];for(const e of v(n,i)){const{value:t}=e;if(!(t.startsWith("./")||t.startsWith("../"))&&(!e.link||/^[a-z][a-z0-9+.-]*:|^[#/]/iu.test(t)))continue;const r=t.search(/[?#]/u),c=r<0?t:t.slice(0,r);if(c==="")continue;const u=f.normalize(f.join(f.dirname(n),c));u.startsWith("..")||o.push(u)}return o}export async function referringFiles(n){return $(n)}export async function moveEdits(n,i,o,e){const t=[];for(const s of e??await referringFiles(n)){if(!h.test(s)&&!x.test(s))continue;const r=await y(g(n,s),"utf8").catch(()=>{});if(r===void 0)continue;const u=v(s,r).map(a=>({span:a,next:k(a,s,i,o)})).filter(a=>a.next!==void 0).sort((a,p)=>p.span.start-a.span.start);if(u.length===0)continue;let l=r;for(const{span:a,next:p}of u)l=`${l.slice(0,a.start)}${p}${l.slice(a.end)}`;t.push({path:s,text:l})}return t}
@@ -2,10 +2,14 @@ import { type MediaInfo } from "@allyhub-next/video-core";
2
2
  import type { Plugin } from "./vite.js";
3
3
  export interface PluginOptions {
4
4
  root: string;
5
- /** Project path → media (its url is made by `mediaUrl`). */
5
+ /** Project path → media. */
6
6
  media: Readonly<Record<string, MediaInfo>>;
7
- /** Where the stage loads a project file from: default `/media/<path>`. */
8
- mediaUrl?: (path: string) => string;
7
+ /**
8
+ * The modules run in Node (the metadata worker), not bundled for the
9
+ * stage: a media value's url is its tree path (`media/<path>`), which
10
+ * nothing in Node loads.
11
+ */
12
+ inNode?: boolean;
9
13
  /** Package names package.json declares. */
10
14
  dependencies: ReadonlySet<string>;
11
15
  /** The project's font stylesheets (fontStyles), read each time `allyhub:fonts` is made. */
@@ -20,6 +24,11 @@ export interface PluginOptions {
20
24
  */
21
25
  lent?: Readonly<Record<string, string>>;
22
26
  }
27
+ /**
28
+ * A project file's address in the tree a build is served in (`media/`
29
+ * and its path), relative to the tree's root: what a source names.
30
+ */
31
+ export declare const mediaHref: (path: string) => string;
23
32
  /**
24
33
  * The folder of the SDK the build lends a project that declares none: the
25
34
  * one this toolchain carries, with its docs/ beside its code.
@@ -1,12 +1,13 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{realpathSync as U}from"node:fs";import{readFile as x}from"node:fs/promises";import{builtinModules as w}from"node:module";import{dirname as j,isAbsolute as u,relative as J,sep as v}from"node:path";import{fileURLToPath as W}from"node:url";import{manifoldFiles as L}from"@allyhub-next/model/build";import{mediaKindOf as E}from"@allyhub-next/video-core";import{parseCsv as I,parseData as T}from"./data.js";import{FONTS_MODULE as S,fontsModule as B}from"./fonts.js";import{LENT as M,SDK as i,packageName as P}from"./scan.js";const s="\0allyhub-blocked:",A="manifold-3d/manifold",m="\0allyhub-sdk:",p="\0allyhub-sdk-slides:",D=`\0${S}`,C=new Set([...w,...w.map(n=>`node:${n}`)]),g=n=>n.replace(/[?#].*$/u,""),K=n=>`/media/${n.split("/").map(encodeURIComponent).join("/")}`;export function lentSdk(){try{return j(W(import.meta.resolve(`${i}/package.json`)))}catch{return}}export function boundSdk(n){return[`export * from ${JSON.stringify(i)};`,`import { sdkFor } from ${JSON.stringify(i)};`,`export const { video, part, take, footage } = sdkFor({ file: ${JSON.stringify(n)} });`,""].join(`
2
+ import{realpathSync as F}from"node:fs";import{readFile as x}from"node:fs/promises";import{builtinModules as J}from"node:module";import{dirname as j,isAbsolute as u,relative as w,sep as v}from"node:path";import{fileURLToPath as W}from"node:url";import{manifoldFiles as L}from"@allyhub-next/model/build";import{mediaKindOf as U}from"@allyhub-next/video-core";import{parseCsv as _,parseData as E}from"./data.js";import{FONTS_MODULE as S,fontsModule as I}from"./fonts.js";import{LENT as B,SDK as i,packageName as T}from"./scan.js";const f="\0allyhub-blocked:",H="manifold-3d/manifold",m="\0allyhub-sdk:",p="\0allyhub-sdk-slides:",D=`\0${S}`,M=new Set([...J,...J.map(n=>`node:${n}`)]),g=n=>n.replace(/[?#].*$/u,"");export const mediaHref=n=>`media/${n.split("/").map(encodeURIComponent).join("/")}`;const P=n=>`new URL(${JSON.stringify(`../../${mediaHref(n)}`)}, __allyhubHere).href`;export function lentSdk(){try{return j(W(import.meta.resolve(`${i}/package.json`)))}catch{return}}export function boundSdk(n){return[`export * from ${JSON.stringify(i)};`,`import { sdkFor } from ${JSON.stringify(i)};`,`export const { video, part, take, footage } = sdkFor({ file: ${JSON.stringify(n)} });`,""].join(`
3
3
  `)}export function boundSlides(n){return[`export * from ${JSON.stringify(`${i}/slides`)};`,`import { presentationFor } from ${JSON.stringify(`${i}/slides`)};`,`export const presentation = presentationFor(${JSON.stringify(n)});`,""].join(`
4
- `)}export function allyhubPlugin(n){const{root:o}=n,F=n.mediaUrl??K,N=[o];try{const t=U.native(o);t!==o&&N.push(t)}catch{}const O=t=>{for(const e of N){const r=J(e,t);if(!r.startsWith("..")&&!u(r))return r}},c=t=>(O(t)??J(o,t)).split(v).join("/"),h=t=>O(t)!==void 0,$=t=>t.split(v).includes("node_modules"),k=t=>{try{return W(import.meta.resolve(t))}catch{return`${s}${t}`}};return{name:"allyhub",enforce:"pre",async resolveId(t,e,r){if(t===S)return D;if(t===A&&!n.dependencies.has("manifold-3d"))return(await L()).js;if(t.startsWith(m)||t.startsWith(p))return t;if(t.startsWith("\0"))return null;const f=e?g(e):void 0,y=f!==void 0&&u(f)&&h(f)&&!$(f);if(/^(https?:)?\/\//iu.test(t))return`${s}${t}`;const l=P(t);if(l===i){if(t===i&&y)return`${m}${c(f)}`;if(t===`${i}/slides`&&y)return`${p}${c(f)}`;const a=await this.resolve(t,e,{...r,skipSelf:!0});return a||(n.dependencies.has(i)?`${s}${t}`:k(t))}const b=n.lent?.[l];if(b!==void 0&&!n.dependencies.has(l))return await this.resolve(t,b,{...r,skipSelf:!0})??`${s}${t}`;if(M.has(l))return n.dependencies.has(l)?null:k(t);if(!y)return null;if(!t.startsWith(".")&&!t.startsWith("/")&&!u(t)&&!C.has(t))return n.dependencies.has(l)?null:`${s}${t}`;const d=await this.resolve(t,e,{...r,skipSelf:!0});if(d&&!d.external){const a=g(d.id);if(u(a)&&!h(a)&&!$(a))return`${s}${t}`}return d},async load(t){if(t===D)return B(o,n.fonts?.()??[]);if(t.startsWith(p))return boundSlides(t.slice(p.length));if(t.startsWith(m))return boundSdk(t.slice(m.length));if(t.startsWith(s)){const r=`AllyHub blocked the import of ${t.slice(s.length)}`;return`throw new Error(${JSON.stringify(r)});
4
+ `)}export function allyhubPlugin(n){const{root:o}=n,N=[o];try{const t=F.native(o);t!==o&&N.push(t)}catch{}const O=t=>{for(const e of N){const r=w(e,t);if(!r.startsWith("..")&&!u(r))return r}},c=t=>(O(t)??w(o,t)).split(v).join("/"),h=t=>O(t)!==void 0,$=t=>t.split(v).includes("node_modules"),b=t=>{try{return W(import.meta.resolve(t))}catch{return`${f}${t}`}};return{name:"allyhub",enforce:"pre",async resolveId(t,e,r){if(t===S)return D;if(t===H&&!n.dependencies.has("manifold-3d"))return(await L()).js;if(t.startsWith(m)||t.startsWith(p))return t;if(t.startsWith("\0"))return null;const s=e?g(e):void 0,y=s!==void 0&&u(s)&&h(s)&&!$(s);if(/^(https?:)?\/\//iu.test(t))return`${f}${t}`;const a=T(t);if(a===i){if(t===i&&y)return`${m}${c(s)}`;if(t===`${i}/slides`&&y)return`${p}${c(s)}`;const l=await this.resolve(t,e,{...r,skipSelf:!0});return l||(n.dependencies.has(i)?`${f}${t}`:b(t))}const k=n.lent?.[a];if(k!==void 0&&!n.dependencies.has(a))return await this.resolve(t,k,{...r,skipSelf:!0})??`${f}${t}`;if(B.has(a))return n.dependencies.has(a)?null:b(t);if(!y)return null;if(!t.startsWith(".")&&!t.startsWith("/")&&!u(t)&&!M.has(t))return n.dependencies.has(a)?null:`${f}${t}`;const d=await this.resolve(t,e,{...r,skipSelf:!0});if(d&&!d.external){const l=g(d.id);if(u(l)&&!h(l)&&!$(l))return`${f}${t}`}return d},async load(t){if(t===D)return I(o,n.fonts?.()??[]);if(t.startsWith(p))return boundSlides(t.slice(p.length));if(t.startsWith(m))return boundSdk(t.slice(m.length));if(t.startsWith(f)){const r=`AllyHub blocked the import of ${t.slice(f.length)}`;return`throw new Error(${JSON.stringify(r)});
5
5
  export default undefined;
6
- `}if(t.startsWith("\0")||/[?#]/u.test(t)||!u(t)||!h(t)||$(t))return null;const e=c(t);if(E(e)){const r=n.media[e];return r?`import { media } from ${JSON.stringify(`${i}/media`)};
7
- export default media(${JSON.stringify({...r,url:F(e)})});
8
- `:null}return/\.csv$/iu.test(e)?`export default ${JSON.stringify(I(await x(t,"utf8")))};
9
- `:/\.ya?ml$/iu.test(e)?`export default ${JSON.stringify(T(e,await x(t,"utf8")))};
6
+ `}if(t.startsWith("\0")||/[?#]/u.test(t)||!u(t)||!h(t)||$(t))return null;const e=c(t);if(U(e)){const r=n.media[e];if(!r)return null;const s=n.inNode?JSON.stringify(mediaHref(e)):P(e);return`import { media } from ${JSON.stringify(`${i}/media`)};
7
+ const __allyhubHere = import.meta.url;
8
+ export default media({ ...${JSON.stringify(r)}, url: ${s} });
9
+ `}return/\.csv$/iu.test(e)?`export default ${JSON.stringify(_(await x(t,"utf8")))};
10
+ `:/\.ya?ml$/iu.test(e)?`export default ${JSON.stringify(E(e,await x(t,"utf8")))};
10
11
  `:null},transform(t,e){const r=g(e);return n.stageEntries?.has(r)?{code:`${t}
11
12
  import ${JSON.stringify(S)};
12
13
  `,map:null}:null}}}
@@ -1,5 +1,6 @@
1
1
  import { type SlidesFile, type Config, type Item } from "@allyhub-next/formats";
2
2
  import { type BuildSource, type Combo, type Dims, type FormatEntry, type MatrixPlan, type Problem, type VideoConfig } from "@allyhub-next/video-core";
3
+ import { type DeckCode } from "@allyhub-next/slides-core";
3
4
  import { type DocInfo, type SheetInfo } from "./content.js";
4
5
  import { readData } from "./data.js";
5
6
  import { type MediaTable } from "./media.js";
@@ -35,6 +36,8 @@ export interface PieceInfo {
35
36
  layouts: string[];
36
37
  components: Record<string, unknown>;
37
38
  generators: string[];
39
+ /** What its code made, as data (slides-core's DeckCode), run here in Node: what its stage and its editor resolve its slides from. */
40
+ code: DeckCode;
38
41
  };
39
42
  }
40
43
  export interface Prepared {
@@ -67,8 +70,6 @@ export interface Prepared {
67
70
  export interface PrepareOptions {
68
71
  /** Bundle every piece for the stage into this folder; without it nothing is bundled. */
69
72
  buildDir?: string;
70
- /** Where the stage loads a project file from (the media values' URLs). */
71
- mediaUrl?: (path: string) => string;
72
73
  /** Deadline of one module's metadata, ms. */
73
74
  metaTimeout?: number;
74
75
  /**
@@ -81,11 +82,14 @@ export interface PrepareOptions {
81
82
  };
82
83
  }
83
84
  export declare function prepare(root: string, options?: PrepareOptions): Promise<Prepared>;
85
+ /** Where a build's bundles are in the tree the stage is served in. */
86
+ export declare const BUILD_FOLDER = "build/";
84
87
  /**
85
- * One piece as the runtime loads it. `served` names where the stage gets
86
- * the build's bundles (an URL ending in "/"), `mediaUrl` a project file.
88
+ * One piece as the runtime loads it, its addresses relative to the root
89
+ * of the tree the stage is served in: its bundles under `build/`, the
90
+ * project's files under `media/` (mediaHref). The stage resolves them.
87
91
  */
88
- export declare function sourceOf(prepared: Prepared, piece: PieceInfo, served: string, mediaUrl: (path: string) => string): BuildSource;
92
+ export declare function sourceOf(prepared: Prepared, piece: PieceInfo): BuildSource;
89
93
  /** A deck's pixels: its size at 144 dots an inch (a 16:9 deck is 1920 × 1080). */
90
94
  export declare const DECK_DPI = 144;
91
95
  /** The stage's size of a deck, as a WxH format. */
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as G,readdir as re}from"node:fs/promises";import{join as S}from"node:path";import{BAKE_DIR as H,CONFIG_FILES as ae,ConfigSchema as W,SLIDES_FILE as _,TEXT_DIR as P,scanItems as ce,slidesFileFor as de}from"@allyhub-next/formats";import{PieceMeta as le,VIDEO_FORMAT_HELP as fe,VideoConfigSchema as me,VideoOptionsMeta as ue,formatName as he,isVideoFormat as pe,looksOf as we,messagePrefix as be,problem as f,resolveDims as X}from"@allyhub-next/video-core";import{checkDeck as ye,readSlidesFile as ge}from"@allyhub-next/slides-core";import{readDocs as $e,readSheets as ke}from"./content.js";import{readData as ve}from"./data.js";import{dependenciesOf as J,listFiles as xe}from"./files.js";import{fontStyles as Me}from"./fonts.js";import{resolveMatrix as Q}from"./matrix.js";import{readMedia as Se}from"./media.js";import{mergeScripts as Y,readMessages as Ae}from"./messages.js";import{MetaLoader as je}from"./meta.js";import{allyhubPlugin as Ee}from"./plugin.js";import{checkImports as Fe,discover as Z,parse as Ke}from"./scan.js";import{writeMessageTypes as Oe}from"./types.js";import{bundleForStage as De,loadUserVite as _e}from"./vite.js";import{nodeStackPlace as T}from"./places.js";function Pe(e){switch(e.code){case"two-entries":return f("AK-M003",`${e.dir} has more than one entry file (${e.entries.join(", ")}): an item has one. Remove all but one.`,{where:{file:e.entries[0]??e.dir}});case"nested":return f("AK-M003",`${e.dir} is an item inside the item ${e.inside}: items do not nest. Move it out.`,{where:{file:e.dir}});case"at-root":return f("AK-M002",`${e.entry} is at the project's root: an item is a folder of its own. Move it into one.`,{where:{file:e.entry}})}}function I(e,s,i){const d=i?`${s} (at ${i.file}:${String(i.line)}:${String(i.column)})`:s,m=/\b(window|document|navigator|self|HTMLElement|customElements) is not defined/u.test(s);return f("AK-R001",m?`${e} uses something at its top level that only exists in the browser (${d}). The top level of a piece module must load in Node: move it into the output's function, or import it inside a component.`:`Failed to load ${e}: ${d}`,{where:i?{file:i.file,line:i.line}:{file:e}})}const R=e=>e.issues.map(s=>`${s.path.map(String).join(".")||"(root)"}: ${s.message}`).join("; ");async function Te(e){return(await re(S(e,H)).catch(()=>[])).filter(i=>/^[0-9a-f]+\.[\w-]+\.bin$/u.test(i)).map(i=>`${H}/${i}`)}export async function prepare(e,s={}){const i=[],d=await xe(e),m=ce(d);for(const n of m.problems)i.push(Pe(n));const u=await J(e),h=await Se(e,[...d,...await Te(e)]),p=new je({root:e,media:h,dependencies:[...u],user:!0,...s.host?{lent:{...s.host.lent}}:{}},s.metaTimeout);try{let n=W.parse({});const a=ae.find(t=>d.includes(t));if(a){const t=await p.request({type:"config",file:a});if(i.push(...t.problems),!t.ok)i.push(I(a,t.error??"",T(t.stack,e)));else{const c=W.safeParse(t.value??{}),r=me.safeParse(t.value??{});c.success&&r.success?n={...c.data,...r.data}:i.push(f("AK-M001",`${a} is not valid: ${[c.error,r.error].flatMap(g=>g?[R(g)]:[]).join("; ")}.`,{where:{file:a}}))}}const l=n.defaults?.format??"16x9",b=Me(e,n);for(const t of b.missing)i.push(f("AK-A001",`allyhub.config's fonts name ${t}, which is not in the project or its packages.`,{where:{file:a??"allyhub.config.ts"}}));const y=await Ae(e,d,{...n.locales?{locales:n.locales}:{},text:n.text??P});i.push(...y.problems);const x=await $e(e,m.items,d),o=await ke(e,m.items,p);i.push(...x.problems,...o.problems);const k={...await ve(e,d,n.text??P),...o.data},te=d.filter(t=>/\.(ts|tsx|js|jsx|mts|mjs)$/u.test(t)&&!t.endsWith(".d.ts")),L=new Map;for(const t of m.items)t.kind==="website"&&L.set(`${t.dir}/`,new Set([...u,...await J(S(e,t.dir))]));const se=t=>[...L].find(([c])=>t.startsWith(c))?.[1]??u,E=new Map;for(const t of te){const c=Ke(t,await G(S(e,t),"utf8"));E.set(t,c),i.push(...Fe(t,c,se(t),new Set(Object.keys(s.host?.lent??{}))))}const U=[];for(const[t,c]of E){if(!Z(t,c).components)continue;const r=await p.request({type:"components",file:t});if(i.push(...r.problems),!!r.ok)for(const g of r.value??[])typeof g.name=="string"&&U.push({name:g.name,file:t})}const M=[],F=new Map;for(const t of m.items){if(t.kind==="slides"){const v=await Ie(t,{root:e,meta:p,messages:y,media:h,ids:F,problems:i,tables:Object.fromEntries(Object.entries(o.data).map(([ne,oe])=>[ne,oe.value]))});v&&M.push(v);continue}if(t.kind!=="video")continue;const c=E.get(t.entry);if(c){const v=Z(t.entry,c);if(i.push(...v.problems),!v.piece&&v.problems.length>0)continue}const r=await p.request({type:"piece",file:t.entry});if(i.push(...r.problems),!r.ok){r.error!=="timeout"&&i.push(I(t.entry,r.error??"",T(r.stack,e)));continue}const g={...r.value};delete g.written;const w=le.safeParse(g);if(!w.success){i.push(f("AK-M001",`The piece in ${t.entry} is not valid: ${R(w.error)}.`,{where:{file:t.entry}}));continue}const V=t.dir.replace(/^content\//u,""),$=w.data.id??V,q=F.get($);if(q!==void 0){i.push(f("AK-B001",`${t.entry} and ${q} both have the piece id ${$}. Give one of them another (video({ id, … })).`,{where:{file:t.entry}}));continue}F.set($,t.entry),i.push(...Y(y,[{id:$,dir:t.dir}]));const[N]=Object.values(w.data.outputs);if(!N)continue;const ie=t.kind,z=w.data.format??l,O=he(z);if(!pe(O)){i.push(f("AK-G001",`${t.entry} cannot render in the format "${O}". Use ${fe}.`,{piece:$,where:{file:t.entry}}));continue}const D=ue.safeParse(N.options);if(!D.success){i.push(f("AK-M001",`The video of ${t.entry} is not valid: ${R(D.error)}.`,{piece:$,where:{file:t.entry}}));continue}const B=X(w.data.matrix?.dims,{locales:y.locales}),j=await Q({root:e,piece:$,file:t.entry,dims:B,matrix:w.data.matrix,files:d});i.push(...j.problems),M.push({id:$,idFrom:w.data.id===void 0?"path":"code",kind:ie,dir:t.dir,file:t.entry,place:V,...w.data.title===void 0?{}:{title:w.data.title},format:O,formatEntry:z,dims:B,combos:j.combos,...j.plan?{matrix:j.plan}:{},options:D.data,meta:w.data.meta??{}})}const A=y.locales[0];await Oe(e,A===void 0?{}:y.messages[A]??{},A===void 0?void 0:y.files[A]);let K;if(s.buildDir&&M.length>0){const t=Object.fromEntries(M.map(r=>[r.id.replaceAll("/","__"),S(e,r.file)])),c=await _e(e);try{const r=await De({root:e,entries:t,outDir:s.buildDir,plugins:[Ee({root:e,media:h,dependencies:u,fonts:()=>b.styles,stageEntries:new Set(Object.values(t)),...s.host?{lent:s.host.lent}:{},...s.mediaUrl?{mediaUrl:s.mediaUrl}:{}}),...s.host?.plugins??[]],...c?{user:c}:{}});K={dir:s.buildDir,chunks:r}}catch(r){i.push(f("AK-R001",`The pieces could not be bundled for the stage: ${r.message.split(`
3
- `).slice(0,3).join(" ")}`,{}))}}const C=new Set;return{root:e,files:d,items:m.items,config:n,defaultFormat:l,dependencies:[...u].sort(),messages:y,media:h,data:k,docs:x.docs,sheets:o.sheets,pieces:M,components:U,fonts:b.styles,...K?{bundle:K}:{},problems:i.filter(t=>{const c=`${t.code}|${t.message}|${t.where?.file??""}|${String(t.where?.line??"")}`;return C.has(c)?!1:(C.add(c),!0)})}}finally{await p.close()}}export function sourceOf(e,s,i,d){const m=s.id.replaceAll("/","__"),u=e.bundle?.chunks.entries[m];if(!u)throw new Error(`${s.id} was not bundled for the stage.`);const h=new Set,p=(n,a)=>{if(a.has(n))return;a.add(n);const l=e.bundle?.chunks.chunks[n];if(l){for(const b of l.css)h.add(`${i}${b}`);for(const b of l.imports)p(b,a)}};return p(u.file,new Set),{piece:s.id,file:s.file,module:`${i}${u.file}`,styles:[...h],dims:s.dims,...s.matrix?{matrix:{space:s.matrix.space,rules:s.matrix.rules}}:{},format:s.format,locales:e.messages.locales,messages:e.messages.messages,anchors:e.messages.anchors,text:e.config.text??P,media:Object.fromEntries(Object.entries(e.media).map(([n,a])=>[n,{...a,url:d(n)}])),data:e.data,...s.kind==="slides"?{kind:"slides",slides:s.deck?.file??{slides:[]}}:{},...we(e.config),pieces:Object.fromEntries(e.pieces.map(n=>[n.id,{file:n.file,dims:n.dims,format:n.format,...n.matrix?{matrix:{space:n.matrix.space,rules:n.matrix.rules}}:{}}]))}}export const DECK_DPI=144;const ee=914400;export const deckFormat=([e,s])=>`${String(Math.round(e/ee*DECK_DPI))}x${String(Math.round(s/ee*DECK_DPI))}`;async function Ie(e,s){const i=e.dir,d=s.ids.get(i);if(d!==void 0){s.problems.push(f("AK-B001",`${e.entry} and ${d} both have the piece id ${i}.`,{where:{file:e.entry}}));return}s.ids.set(i,e.entry),s.problems.push(...Y(s.messages,[{id:i,dir:e.dir}]));const m=de(e.dir),u=o=>({file:m,...o===void 0?{}:{line:o}});let h,p=()=>{};try{const o=ge(await G(S(s.root,m),"utf8"));p=o.lineOf;for(const k of o.problems)s.problems.push(f("AK-M011",`${_}: ${k.message}`,{piece:i,where:u(k.line)}));h=o.file}catch{s.problems.push(f("AK-M011",`The deck ${e.dir} has no ${_}: its slides are listed there, each on one of slides.ts's layouts (slides: [{ id: cover, layout: Title Slide }]).`,{piece:i,where:{file:m}}))}const n=s.messages.locales[0],a=await s.meta.request({type:"deck",file:e.entry,slides:h,words:n===void 0?{}:s.messages.messages[n]??{},prefix:be(i),tables:s.tables});if(s.problems.push(...a.problems),!a.ok){a.error!=="timeout"&&s.problems.push(I(e.entry,a.error??"",T(a.stack,s.root)));return}const l=a.value;for(const o of l.problems)s.problems.push(f("AK-M011",`${_}: ${o.message}`,{piece:i,...o.slide===void 0?{}:{part:o.slide},where:u(o.path===void 0?void 0:p(o.path))}));for(const o of ye(l.resolved,{mediaKind:k=>s.media[k]?.kind}))s.problems.push(f("AK-M011",o.message,{piece:i,...o.slide===void 0?{}:{part:o.slide},where:{file:m}}));const b=X(void 0,{locales:s.messages.locales}),y=await Q({root:s.root,piece:i,file:e.entry,dims:b,matrix:void 0,files:[]}),x=deckFormat(l.size);return{id:i,idFrom:"path",kind:"slides",dir:e.dir,file:e.entry,place:e.dir,...l.title===void 0?{}:{title:l.title},format:x,formatEntry:x,dims:b,combos:y.combos,options:{},meta:{},deck:{...h?{file:h}:{},size:l.size,layouts:l.layouts,components:l.components,generators:l.generators}}}
2
+ import{readFile as z,readdir as ie}from"node:fs/promises";import{join as F}from"node:path";import{BAKE_DIR as G,CONFIG_FILES as ne,ConfigSchema as W,SLIDES_FILE as S,TEXT_DIR as L,scanItems as oe,slidesFileFor as re}from"@allyhub-next/formats";import{PieceMeta as ae,VIDEO_FORMAT_HELP as le,VideoConfigSchema as de,VideoOptionsMeta as ce,formatName as fe,isVideoFormat as me,looksOf as ue,messagePrefix as he,problem as u,resolveDims as X}from"@allyhub-next/video-core";import{checkDeck as pe,readSlidesFile as be}from"@allyhub-next/slides-core";import{readDocs as we,readSheets as ge,readWebsites as ye}from"./content.js";import{readData as $e}from"./data.js";import{dependenciesOf as ke,listFiles as ve}from"./files.js";import{fontStyles as xe}from"./fonts.js";import{resolveMatrix as J}from"./matrix.js";import{readMedia as Me}from"./media.js";import{mergeScripts as Q,readMessages as Se}from"./messages.js";import{MetaLoader as Ee}from"./meta.js";import{allyhubPlugin as Oe,mediaHref as je}from"./plugin.js";import{checkImports as Ae,discover as Y,parse as Fe}from"./scan.js";import{writeMessageTypes as Ke}from"./types.js";import{bundleForStage as De,loadUserVite as Te}from"./vite.js";import{nodeStackPlace as K}from"./places.js";function _e(e){switch(e.code){case"two-entries":return u("AK-M003",`${e.dir} has more than one entry file (${e.entries.join(", ")}): an item has one. Remove all but one.`,{where:{file:e.entries[0]??e.dir}});case"nested":return u("AK-M003",`${e.dir} is an item inside the item ${e.inside}: items do not nest. Move it out.`,{where:{file:e.dir}});case"at-root":return u("AK-M002",`${e.entry} is at the project's root: an item is a folder of its own. Move it into one.`,{where:{file:e.entry}})}}function R(e,t,i){const c=i?`${t} (at ${i.file}:${String(i.line)}:${String(i.column)})`:t,m=/\b(window|document|navigator|self|HTMLElement|customElements) is not defined/u.test(t);return u("AK-R001",m?`${e} uses something at its top level that only exists in the browser (${c}). The top level of a piece module must load in Node: move it into the output's function, or import it inside a component.`:`Failed to load ${e}: ${c}`,{where:i?{file:i.file,line:i.line}:{file:e}})}const C=e=>e.issues.map(t=>`${t.path.map(String).join(".")||"(root)"}: ${t.message}`).join("; ");async function Ie(e){return(await ie(F(e,G)).catch(()=>[])).filter(i=>/^[0-9a-f]+\.[\w-]+\.bin$/u.test(i)).map(i=>`${G}/${i}`)}export async function prepare(e,t={}){const i=[],c=await ve(e),m=oe(c);for(const a of m.problems)i.push(_e(a));const p=await ke(e),h=await Me(e,[...c,...await Ie(e)]),n=new Ee({root:e,media:h,dependencies:[...p],user:!0,...t.host?{lent:{...t.host.lent}}:{}},t.metaTimeout);try{let a=W.parse({});const d=ne.find(s=>c.includes(s));if(d){const s=await n.request({type:"config",file:d});if(i.push(...s.problems),!s.ok)i.push(R(d,s.error??"",K(s.stack,e)));else{const f=W.safeParse(s.value??{}),r=de.safeParse(s.value??{});f.success&&r.success?a={...f.data,...r.data}:i.push(u("AK-M001",`${d} is not valid: ${[f.error,r.error].flatMap($=>$?[C($)]:[]).join("; ")}.`,{where:{file:d}}))}}const g=a.defaults?.format??"16x9",w=xe(e,a);for(const s of w.missing)i.push(u("AK-A001",`allyhub.config's fonts name ${s}, which is not in the project or its packages.`,{where:{file:d??"allyhub.config.ts"}}));const l=await Se(e,c,{...a.locales?{locales:a.locales}:{},text:a.text??L});i.push(...l.problems);const E=await we(e,m.items,c),v=await ge(e,m.items,n);i.push(...E.problems,...v.problems,...await ye(e,m.items));const D={...await $e(e,c,a.text??L),...v.data},O=c.filter(s=>/\.(ts|tsx|js|jsx|mts|mjs)$/u.test(s)&&!s.endsWith(".d.ts")),o=new Map;for(const s of O){const f=Fe(s,await z(F(e,s),"utf8"));o.set(s,f),i.push(...Ae(s,f,p,new Set(Object.keys(t.host?.lent??{}))))}const y=[];for(const[s,f]of o){if(!Y(s,f).components)continue;const r=await n.request({type:"components",file:s});if(i.push(...r.problems),!!r.ok)for(const $ of r.value??[])typeof $.name=="string"&&y.push({name:$.name,file:s})}const M=[],T=new Map;for(const s of m.items){if(s.kind==="slides"){const x=await Pe(s,{root:e,meta:n,messages:l,media:h,ids:T,problems:i,tables:Object.fromEntries(Object.entries(v.data).map(([te,se])=>[te,se.value]))});x&&M.push(x);continue}if(s.kind!=="video")continue;const f=o.get(s.entry);if(f){const x=Y(s.entry,f);if(i.push(...x.problems),!x.piece&&x.problems.length>0)continue}const r=await n.request({type:"piece",file:s.entry});if(i.push(...r.problems),!r.ok){r.error!=="timeout"&&i.push(R(s.entry,r.error??"",K(r.stack,e)));continue}const $={...r.value};delete $.written;const b=ae.safeParse($);if(!b.success){i.push(u("AK-M001",`The piece in ${s.entry} is not valid: ${C(b.error)}.`,{where:{file:s.entry}}));continue}const q=s.dir.replace(/^content\//u,""),k=b.data.id??q,B=T.get(k);if(B!==void 0){i.push(u("AK-B001",`${s.entry} and ${B} both have the piece id ${k}. Give one of them another (video({ id, … })).`,{where:{file:s.entry}}));continue}T.set(k,s.entry),i.push(...Q(l,[{id:k,dir:s.dir}]));const[H]=Object.values(b.data.outputs);if(!H)continue;const ee=s.kind,N=b.data.format??g,I=fe(N);if(!me(I)){i.push(u("AK-G001",`${s.entry} cannot render in the format "${I}". Use ${le}.`,{piece:k,where:{file:s.entry}}));continue}const P=ce.safeParse(H.options);if(!P.success){i.push(u("AK-M001",`The video of ${s.entry} is not valid: ${C(P.error)}.`,{piece:k,where:{file:s.entry}}));continue}const U=X(b.data.matrix?.dims,{locales:l.locales}),A=await J({root:e,piece:k,file:s.entry,dims:U,matrix:b.data.matrix,files:c});i.push(...A.problems),M.push({id:k,idFrom:b.data.id===void 0?"path":"code",kind:ee,dir:s.dir,file:s.entry,place:q,...b.data.title===void 0?{}:{title:b.data.title},format:I,formatEntry:N,dims:U,combos:A.combos,...A.plan?{matrix:A.plan}:{},options:P.data,meta:b.data.meta??{}})}const j=l.locales[0];await Ke(e,j===void 0?{}:l.messages[j]??{},j===void 0?void 0:l.files[j]);let _;if(t.buildDir&&M.length>0){const s=Object.fromEntries(M.map(r=>[r.id.replaceAll("/","__"),F(e,r.file)])),f=await Te(e);try{const r=await De({root:e,entries:s,outDir:t.buildDir,plugins:[Oe({root:e,media:h,dependencies:p,fonts:()=>w.styles,stageEntries:new Set(Object.values(s)),...t.host?{lent:t.host.lent}:{}}),...t.host?.plugins??[]],...f?{user:f}:{}});_={dir:t.buildDir,chunks:r}}catch(r){i.push(u("AK-R001",`The pieces could not be bundled for the stage: ${r.message.split(`
3
+ `).slice(0,3).join(" ")}`,{}))}}const V=new Set;return{root:e,files:c,items:m.items,config:a,defaultFormat:g,dependencies:[...p].sort(),messages:l,media:h,data:D,docs:E.docs,sheets:v.sheets,pieces:M,components:y,fonts:w.styles,..._?{bundle:_}:{},problems:i.filter(s=>{const f=`${s.code}|${s.message}|${s.where?.file??""}|${String(s.where?.line??"")}`;return V.has(f)?!1:(V.add(f),!0)})}}finally{await n.close()}}export const BUILD_FOLDER="build/";export function sourceOf(e,t){const i=BUILD_FOLDER,c=t.id.replaceAll("/","__"),m=e.bundle?.chunks.entries[c];if(!m)throw new Error(`${t.id} was not bundled for the stage.`);const p=new Set,h=(n,a)=>{if(a.has(n))return;a.add(n);const d=e.bundle?.chunks.chunks[n];if(d){for(const g of d.css)p.add(`${i}${g}`);for(const g of d.imports)h(g,a)}};return h(m.file,new Set),{piece:t.id,file:t.file,module:`${i}${m.file}`,styles:[...p],dims:t.dims,...t.matrix?{matrix:{space:t.matrix.space,rules:t.matrix.rules}}:{},format:t.format,locales:e.messages.locales,messages:e.messages.messages,anchors:e.messages.anchors,text:e.config.text??L,media:Object.fromEntries(Object.entries(e.media).map(([n,a])=>[n,{...a,url:je(n)}])),data:e.data,...t.kind==="slides"?{kind:"slides",slides:t.deck?.file??{slides:[]},...t.deck?{code:t.deck.code}:{}}:{},...ue(e.config),pieces:Object.fromEntries(e.pieces.map(n=>[n.id,{file:n.file,dims:n.dims,format:n.format,...n.matrix?{matrix:{space:n.matrix.space,rules:n.matrix.rules}}:{}}]))}}export const DECK_DPI=144;const Z=914400;export const deckFormat=([e,t])=>`${String(Math.round(e/Z*DECK_DPI))}x${String(Math.round(t/Z*DECK_DPI))}`;async function Pe(e,t){const i=e.dir.replace(/^content\//u,""),c=t.ids.get(i);if(c!==void 0){t.problems.push(u("AK-B001",`${e.entry} and ${c} both have the piece id ${i}.`,{where:{file:e.entry}}));return}t.ids.set(i,e.entry),t.problems.push(...Q(t.messages,[{id:i,dir:e.dir}]));const m=re(e.dir),p=o=>({file:m,...o===void 0?{}:{line:o}});let h,n=()=>{},a;try{a=await z(F(t.root,m),"utf8")}catch{t.problems.push(u("AK-M011",`The deck ${e.dir} has no ${S}: its slides are listed there, each on one of slides.ts's layouts (slides: [{ id: cover, layout: Title Slide }]).`,{piece:i,where:{file:m}}))}const d=a===void 0?void 0:be(a);if(d){n=d.readable?.lineOf??d.lineOf;for(const o of d.problems)t.problems.push(u("AK-M011",`${S}: ${o.message}`,{piece:i,where:p(o.line)}));h=d.readable?.file}const g=t.problems.length,w=await t.meta.request({type:"deck",file:e.entry,slides:h,words:Object.fromEntries(t.messages.locales.map(o=>[o,t.messages.messages[o]??{}])),prefix:he(i),tables:t.tables});if(t.problems.push(...w.problems),!w.ok){w.error!=="timeout"&&t.problems.push(R(e.entry,w.error??"",K(w.stack,t.root)));return}const l=w.value,E=o=>{const y=K(o.stack,t.root);return y?{file:y.file,line:y.line}:p(o.path===void 0?void 0:n(o.path))};for(const o of[...l.problems,...pe(l.resolved,{mediaKind:y=>t.media[y]?.kind})])t.problems.push(u("AK-M011",o.stack===void 0?`${S}: ${o.message}`:o.message,{piece:i,...o.slide===void 0?{}:{part:o.slide},where:E(o)}));if(l.resolved.slides.length===0){t.problems.length===g&&d?.file&&t.problems.push(u("AK-K003",d.file.slides.length===0?`The deck has no slides: its ${S} lists none (slides: [{ id: cover, layout: Title Slide }]).`:`The deck has no slides: its ${S} lists only generators, and they made none.`,{piece:i,where:p(n("slides"))}));return}const v=X(void 0,{locales:t.messages.locales}),D=await J({root:t.root,piece:i,file:e.entry,dims:v,matrix:void 0,files:[]}),O=deckFormat(l.size);return{id:i,idFrom:"path",kind:"slides",dir:e.dir,file:e.entry,place:i,...l.title===void 0?{}:{title:l.title},format:O,formatEntry:O,dims:v,combos:D.combos,options:{},meta:{},deck:{...h?{file:h}:{},size:l.size,layouts:l.layouts,components:l.components,generators:l.generators,code:l.code}}}
@@ -79,8 +79,12 @@ export interface StageChunk {
79
79
  file: string;
80
80
  /** Chunks it imports, statically. */
81
81
  imports: string[];
82
+ /** Chunks it imports when it runs (`import()`). */
83
+ dynamicImports: string[];
82
84
  /** Stylesheets it needs. */
83
85
  css: string[];
86
+ /** Other files it or its stylesheets load (fonts, pictures), by name in the output folder. */
87
+ assets: string[];
84
88
  /** Absolute paths of the modules bundled into it. */
85
89
  modules: string[];
86
90
  }
@@ -89,6 +93,12 @@ export interface StageBundle {
89
93
  entries: Record<string, StageChunk>;
90
94
  /** Every chunk by file name. */
91
95
  chunks: Record<string, StageChunk>;
96
+ /**
97
+ * Every file this build wrote that a page loads (its chunks, stylesheets
98
+ * and assets; not their source maps), by name in the output folder: a
99
+ * folder built into again holds older builds' files too.
100
+ */
101
+ files: string[];
92
102
  }
93
103
  /**
94
104
  * Bundles entries for the stage (the client environment): ES modules with
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{join as f}from"node:path";import{build as d,createServer as u,createServerModuleRunner as m,loadConfigFromFile as p,mergeConfig as g}from"vite";import{CACHE_DIR as h}from"@allyhub-next/formats";const y=["plugins","resolve","css","define","json","assetsInclude","oxc"];export async function loadUserVite(e,n="production"){const r=await p({command:n==="production"?"build":"serve",mode:n},void 0,e,"silent",void 0,"runner");if(!r)return;const t={};for(const s of y)r.config[s]!==void 0&&Object.assign(t,{[s]:r.config[s]});return{file:r.path.startsWith(e)?r.path.slice(e.length+1):r.path,config:t}}const l=(e,n,r,t=[])=>{const s={ssr:{noExternal:[...t]}},{plugins:o,...i}=r?.config??{},a=g(s,i),c=o?[o]:[];return{...a,root:e,configFile:!1,envDir:!1,publicDir:!1,logLevel:"silent",clearScreen:!1,plugins:[...n,...c]}};export async function createModuleLoader(e,n,r={}){const t=await u({...l(e,n,r.user,r.inline),mode:r.mode??"production",appType:"custom",server:{middlewareMode:!0,hmr:!1,ws:!1,watch:null},optimizeDeps:{noDiscovery:!0,include:[]}}),s=t.environments.ssr,o=m(s,{hmr:!1});return{async import(i){return o.import(i)},async close(){await o.close(),await t.close()}}}export function compileErrorOf(e){const n=e,r=n.loc?.file??n.id;return{message:(n.message??String(e)).split(`
3
- `)[0]??"",...r?{file:r.replace(/[?#].*$/,"")}:{},...n.loc?.line===void 0?{}:{line:n.loc.line},...n.loc?.column===void 0?{}:{column:n.loc.column},...n.frame?{frame:n.frame}:{}}}export async function createStageDevServer(e){const n=await u({...l(e.root,e.plugins,e.user),base:e.base,appType:"custom",mode:"development",cacheDir:f(e.root,h,"vite"),server:{middlewareMode:!0,hmr:!1,ws:!1,watch:null,fs:{strict:!0,allow:[e.root,...e.allow]}},optimizeDeps:{noDiscovery:!0,include:[]},build:{target:"es2022"}}),r=n.environments.client.moduleGraph;return{handle(t,s,o){n.middlewares(t,s,o)},changed(t){const s=new Set,o=i=>{const a=i.id??"";if(!s.has(a)){s.add(a);for(const c of i.importers)o(c)}};for(const i of t){for(const a of r.getModulesByFile(i)??[])o(a);r.onFileChange(i)}return s},invalidate(t){for(const s of t){const o=r.getModuleById(s);o&&r.invalidateModule(o)}},async close(){await n.close()}}}function v(e){const n=Array.isArray(e)?e:[e],r={entries:{},chunks:{}};for(const t of n)if("output"in t)for(const s of t.output){if(s.type!=="chunk")continue;const o=s.viteMetadata,i={file:s.fileName,imports:[...s.imports],css:[...o?.importedCss??[]],modules:[...s.moduleIds]};r.chunks[s.fileName]=i,s.isEntry&&(r.entries[s.name]=i)}return r}export async function bundleForStage(e){const n=await d({...l(e.root,e.plugins,e.user),base:"./",mode:"production",build:{outDir:e.outDir,emptyOutDir:!1,write:!0,copyPublicDir:!1,minify:!1,sourcemap:"hidden",target:"es2022",modulePreload:!1,reportCompressedSize:!1,cssCodeSplit:!0,assetsDir:"assets",rolldownOptions:{input:e.entries,preserveEntrySignatures:"exports-only",output:{format:"es",entryFileNames:"pieces/[name].[hash].js",chunkFileNames:"chunks/[name].[hash].js",assetFileNames:"assets/[name].[hash][extname]"}}}});return v(n)}
2
+ import{join as f}from"node:path";import{build as d,createServer as u,createServerModuleRunner as m,loadConfigFromFile as p,mergeConfig as h}from"vite";import{CACHE_DIR as g}from"@allyhub-next/formats";const y=["plugins","resolve","css","define","json","assetsInclude","oxc"];export async function loadUserVite(e,r="production"){const s=await p({command:r==="production"?"build":"serve",mode:r},void 0,e,"silent",void 0,"runner");if(!s)return;const t={};for(const n of y)s.config[n]!==void 0&&Object.assign(t,{[n]:s.config[n]});return{file:s.path.startsWith(e)?s.path.slice(e.length+1):s.path,config:t}}const l=(e,r,s,t=[])=>{const n={ssr:{noExternal:[...t]}},{plugins:o,...i}=s?.config??{},a=h(n,i),c=o?[o]:[];return{...a,root:e,configFile:!1,envDir:!1,publicDir:!1,logLevel:"silent",clearScreen:!1,plugins:[...r,...c]}};export async function createModuleLoader(e,r,s={}){const t=await u({...l(e,r,s.user,s.inline),mode:s.mode??"production",appType:"custom",server:{middlewareMode:!0,hmr:!1,ws:!1,watch:null},optimizeDeps:{noDiscovery:!0,include:[]}}),n=t.environments.ssr,o=m(n,{hmr:!1});return{async import(i){return o.import(i)},async close(){await o.close(),await t.close()}}}export function compileErrorOf(e){const r=e,s=r.loc?.file??r.id;return{message:(r.message??String(e)).split(`
3
+ `)[0]??"",...s?{file:s.replace(/[?#].*$/,"")}:{},...r.loc?.line===void 0?{}:{line:r.loc.line},...r.loc?.column===void 0?{}:{column:r.loc.column},...r.frame?{frame:r.frame}:{}}}export async function createStageDevServer(e){const r=await u({...l(e.root,e.plugins,e.user),base:e.base,appType:"custom",mode:"development",cacheDir:f(e.root,g,"vite"),server:{middlewareMode:!0,hmr:!1,ws:!1,watch:null,fs:{strict:!0,allow:[e.root,...e.allow]}},optimizeDeps:{noDiscovery:!0,include:[]},build:{target:"es2022"}}),s=r.environments.client.moduleGraph;return{handle(t,n,o){r.middlewares(t,n,o)},changed(t){const n=new Set,o=i=>{const a=i.id??"";if(!n.has(a)){n.add(a);for(const c of i.importers)o(c)}};for(const i of t){for(const a of s.getModulesByFile(i)??[])o(a);s.onFileChange(i)}return n},invalidate(t){for(const n of t){const o=s.getModuleById(n);o&&s.invalidateModule(o)}},async close(){await r.close()}}}function v(e){const r=Array.isArray(e)?e:[e],s={entries:{},chunks:{},files:[]};for(const t of r)if("output"in t)for(const n of t.output){if(n.fileName.endsWith(".map")||s.files.push(n.fileName),n.type!=="chunk")continue;const o=n.viteMetadata,i={file:n.fileName,imports:[...n.imports],dynamicImports:[...n.dynamicImports],css:[...o?.importedCss??[]],assets:[...o?.importedAssets??[]],modules:[...n.moduleIds]};s.chunks[n.fileName]=i,n.isEntry&&(s.entries[n.name]=i)}return s}export async function bundleForStage(e){const r=await d({...l(e.root,e.plugins,e.user),base:"./",mode:"production",build:{outDir:e.outDir,emptyOutDir:!1,write:!0,copyPublicDir:!1,minify:!1,sourcemap:"hidden",target:"es2022",modulePreload:!1,reportCompressedSize:!1,cssCodeSplit:!0,assetsDir:"assets",rolldownOptions:{input:e.entries,preserveEntrySignatures:"exports-only",output:{format:"es",entryFileNames:"pieces/[name].[hash].js",chunkFileNames:"chunks/[name].[hash].js",assetFileNames:"assets/[name].[hash][extname]"}}}});return v(r)}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub-next/build",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {