allyhub 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/commands/dev.js +2 -2
  3. package/dist/commands/frames/report.js +2 -0
  4. package/dist/commands/frames.js +11 -9
  5. package/dist/commands/render.js +2 -2
  6. package/dist/node_modules/@allyhub/3d-extension/dist/stage-routes.js +1 -1
  7. package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
  8. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  9. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +29 -0
  10. package/dist/node_modules/@allyhub/browser/dist/emoji.js +57 -0
  11. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +18 -0
  12. package/dist/node_modules/@allyhub/browser/dist/picture.js +2 -0
  13. package/dist/node_modules/@allyhub/browser/package.json +9 -1
  14. package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -0
  15. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  16. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +7 -0
  17. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +9 -0
  18. package/dist/node_modules/@allyhub/build/dist/made-notes.js +2 -0
  19. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +17 -0
  20. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +7 -0
  21. package/dist/node_modules/@allyhub/build/package.json +1 -1
  22. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  23. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  24. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  25. package/dist/node_modules/@allyhub/check/package.json +1 -1
  26. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  27. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  28. package/dist/node_modules/@allyhub/components/package.json +1 -1
  29. package/dist/node_modules/@allyhub/dev-server/dist/exports.js +1 -1
  30. package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
  31. package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +2 -0
  32. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  33. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +2 -0
  34. package/dist/node_modules/@allyhub/dev-server/dist/ports.js +2 -0
  35. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  36. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  37. package/dist/node_modules/@allyhub/dev-server/dist/respond.js +2 -0
  38. package/dist/node_modules/@allyhub/dev-server/dist/reveal.js +1 -1
  39. package/dist/node_modules/@allyhub/dev-server/dist/routes.js +1 -1
  40. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  41. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  42. package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +1 -1
  43. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  44. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
  45. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  46. package/dist/node_modules/@allyhub/doc/dist/html.js +15 -59
  47. package/dist/node_modules/@allyhub/doc/dist/page.js +1 -1
  48. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  49. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  50. package/dist/node_modules/@allyhub/doc-extension/package.json +12 -14
  51. package/dist/node_modules/@allyhub/doc-print/dist/pages.js +5 -5
  52. package/dist/node_modules/@allyhub/doc-print/dist/print.js +10 -10
  53. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  54. package/dist/node_modules/@allyhub/export/package.json +1 -1
  55. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  56. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  57. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
  58. package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
  59. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  60. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  61. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  62. package/dist/node_modules/@allyhub/image-extension/dist/export.js +4 -1
  63. package/dist/node_modules/@allyhub/image-extension/package.json +1 -6
  64. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  65. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  66. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  67. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  68. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  69. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  70. package/dist/node_modules/@allyhub/linkedin-extension/LICENSE +241 -0
  71. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-build.js +2 -0
  72. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-kind.js +2 -0
  73. package/dist/node_modules/@allyhub/linkedin-extension/dist/build-plugins.js +2 -0
  74. package/dist/node_modules/@allyhub/linkedin-extension/dist/build.js +5 -0
  75. package/dist/node_modules/@allyhub/linkedin-extension/dist/media.js +2 -0
  76. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage-module.js +82 -0
  77. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage.js +2 -0
  78. package/dist/node_modules/@allyhub/linkedin-extension/dist/workspace.js +2 -0
  79. package/dist/node_modules/@allyhub/linkedin-extension/package.json +287 -0
  80. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +12 -0
  81. package/dist/node_modules/@allyhub/linkedin-model/LICENSE +241 -0
  82. package/dist/node_modules/@allyhub/linkedin-model/dist/article-check.js +5 -0
  83. package/dist/node_modules/@allyhub/linkedin-model/dist/article.js +3 -0
  84. package/dist/node_modules/@allyhub/linkedin-model/dist/check.js +2 -0
  85. package/dist/node_modules/@allyhub/linkedin-model/dist/count.js +3 -0
  86. package/dist/node_modules/@allyhub/linkedin-model/dist/edit.js +3 -0
  87. package/dist/node_modules/@allyhub/linkedin-model/dist/html.js +19 -0
  88. package/dist/node_modules/@allyhub/linkedin-model/dist/index.js +2 -0
  89. package/dist/node_modules/@allyhub/linkedin-model/dist/limits.js +2 -0
  90. package/dist/node_modules/@allyhub/linkedin-model/dist/little.js +2 -0
  91. package/dist/node_modules/@allyhub/linkedin-model/dist/post.js +2 -0
  92. package/dist/node_modules/@allyhub/linkedin-model/dist/requests.js +2 -0
  93. package/dist/node_modules/@allyhub/linkedin-model/package.json +14 -0
  94. package/dist/node_modules/@allyhub/linkedin-view/LICENSE +241 -0
  95. package/dist/node_modules/@allyhub/linkedin-view/dist/article.js +2 -0
  96. package/dist/node_modules/@allyhub/linkedin-view/dist/fold.js +3 -0
  97. package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -0
  98. package/dist/node_modules/@allyhub/linkedin-view/dist/post.js +2 -0
  99. package/dist/node_modules/@allyhub/linkedin-view/dist/stage.js +2 -0
  100. package/dist/node_modules/@allyhub/linkedin-view/dist/text.js +2 -0
  101. package/dist/node_modules/@allyhub/linkedin-view/package.json +21 -0
  102. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +600 -0
  103. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  104. package/dist/node_modules/@allyhub/media/package.json +1 -1
  105. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  106. package/dist/node_modules/@allyhub/model/package.json +1 -1
  107. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  108. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
  109. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
  110. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  111. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
  112. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
  113. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +12 -0
  114. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  115. package/dist/node_modules/@allyhub/project/package.json +1 -1
  116. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +8 -0
  117. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +4 -0
  118. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  119. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +6 -0
  120. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  121. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +61 -1
  122. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  123. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +0 -1
  124. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  125. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +41 -3
  126. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  127. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
  128. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  129. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
  130. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  131. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +12 -0
  132. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  133. package/dist/node_modules/@allyhub/protocol/package.json +1 -5
  134. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  135. package/dist/node_modules/@allyhub/render/dist/encode.js +1 -1
  136. package/dist/node_modules/@allyhub/render/dist/index.js +1 -1
  137. package/dist/node_modules/@allyhub/render/dist/render.js +2 -2
  138. package/dist/node_modules/@allyhub/render/package.json +1 -1
  139. package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
  140. package/dist/node_modules/@allyhub/report-extension/dist/build.js +2 -0
  141. package/dist/node_modules/@allyhub/report-extension/dist/check.js +3 -0
  142. package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +2 -0
  143. package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +5 -0
  144. package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +2 -0
  145. package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
  146. package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
  147. package/dist/node_modules/@allyhub/report-extension/dist/page.js +21 -0
  148. package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +21 -0
  149. package/dist/node_modules/@allyhub/report-extension/dist/styles.js +5 -0
  150. package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
  151. package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
  152. package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
  153. package/dist/node_modules/@allyhub/report-extension/package.json +182 -0
  154. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +132 -0
  155. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +105 -0
  156. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +17 -0
  157. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +38 -0
  158. package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
  159. package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
  160. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  161. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  162. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  163. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  164. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +1 -1
  165. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +6 -0
  166. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +1 -1
  167. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  168. package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
  169. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  170. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  171. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -6
  172. package/dist/node_modules/@allyhub/sheet-extension/package.json +3 -7
  173. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  174. package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
  175. package/dist/node_modules/@allyhub/slides-extension/package.json +3 -16
  176. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  177. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +1 -1
  178. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  179. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  180. package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
  181. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +1 -1
  182. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  183. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +14 -14
  184. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  185. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  186. package/dist/node_modules/@allyhub/video-extension/dist/export.js +1 -1
  187. package/dist/node_modules/@allyhub/video-extension/package.json +2 -4
  188. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  189. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  190. package/dist/node_modules/@allyhub/website/package.json +1 -1
  191. package/dist/node_modules/@allyhub/website-extension/dist/preview.js +5 -5
  192. package/dist/node_modules/@allyhub/website-extension/dist/project-tools.js +2 -2
  193. package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
  194. package/dist/node_modules/@allyhub/x-extension/dist/build.js +4 -3
  195. package/dist/node_modules/@allyhub/x-extension/package.json +10 -12
  196. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  197. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  198. package/dist/package.json +12 -10
  199. package/dist/works.js +1 -1
  200. package/editor-web/assets/{abnfDiagram-WEYOIA3C-CjAmWsNR.js → abnfDiagram-WEYOIA3C-BKmMA6gn.js} +1 -1
  201. package/editor-web/assets/{architecture-WOLXFQ4H-DeeKhyhZ.js → architecture-WOLXFQ4H-BEFBgb4k.js} +1 -1
  202. package/editor-web/assets/{architectureDiagram-ZHVYKT53-b32qTaJg.js → architectureDiagram-ZHVYKT53-_u5YfCjY.js} +1 -1
  203. package/editor-web/assets/{arrow-up-L4YV_65f.js → arrow-up-B5rJbBv0.js} +1 -1
  204. package/editor-web/assets/article-BUmD3xtR.js +8 -0
  205. package/editor-web/assets/article-DNioBb3p.js +7 -0
  206. package/editor-web/assets/{audio-lines-BFcM7G2L.js → audio-lines-CzuzsGjI.js} +1 -1
  207. package/editor-web/assets/{blockDiagram-RJAE7QA3-BNbnMNmw.js → blockDiagram-RJAE7QA3-DybfaO3Z.js} +1 -1
  208. package/editor-web/assets/bookmark-Dsd3kHJJ.js +1 -0
  209. package/editor-web/assets/button-eGxLxbv9.js +41 -0
  210. package/editor-web/assets/{c4Diagram-XDPPPE54-BEuemvMw.js → c4Diagram-XDPPPE54-BfqLHB5i.js} +1 -1
  211. package/editor-web/assets/channel-TNPgFDrw.js +1 -0
  212. package/editor-web/assets/chart-C37xvZT2.js +1 -0
  213. package/editor-web/assets/chart-no-axes-column-BVkeF_Mr.js +1 -0
  214. package/editor-web/assets/{chunk-2E7WHVMD-Zb5nPx_e.js → chunk-2E7WHVMD-BVp1I_d0.js} +1 -1
  215. package/editor-web/assets/{chunk-4EMNKR2T-DSEM2reX.js → chunk-4EMNKR2T-CTdgWEMr.js} +1 -1
  216. package/editor-web/assets/{chunk-55XCU76K-BOZa_65H.js → chunk-55XCU76K-7pnsxeaP.js} +1 -1
  217. package/editor-web/assets/{chunk-7S6XSTFO-DeiGeVpB.js → chunk-7S6XSTFO-Dc0Dvkq7.js} +1 -1
  218. package/editor-web/assets/{chunk-AQDTSKZB-fPuQFBJc.js → chunk-AQDTSKZB-VAILIsfx.js} +1 -1
  219. package/editor-web/assets/{chunk-DSNLSHJZ-5vdnoak2.js → chunk-DSNLSHJZ-CUDx1Rv5.js} +1 -1
  220. package/editor-web/assets/{chunk-HAGFOTED-DFF2mZJ1.js → chunk-HAGFOTED-DAoEe-dJ.js} +1 -1
  221. package/editor-web/assets/{chunk-HNE4Q36P-g6-ZLbTg.js → chunk-HNE4Q36P-g0akya12.js} +1 -1
  222. package/editor-web/assets/{chunk-NQOKRVIF-o3hNcHMJ.js → chunk-NQOKRVIF-hTGjzXdJ.js} +1 -1
  223. package/editor-web/assets/{chunk-UHW7PFBP-BQiDI9dK.js → chunk-UHW7PFBP-BgLV8BIJ.js} +1 -1
  224. package/editor-web/assets/{chunk-VQ5W62QI-CJlMXWWz.js → chunk-VQ5W62QI-Bw19OOSD.js} +1 -1
  225. package/editor-web/assets/{chunk-WQQL4CDK-pNBU8dXv.js → chunk-WQQL4CDK-CMST9dyE.js} +1 -1
  226. package/editor-web/assets/{chunk-YZO67HFG-2x-BiWd-.js → chunk-YZO67HFG-Bbpu36XF.js} +1 -1
  227. package/editor-web/assets/{chunk-ZAUX2LTX-etFStEM8.js → chunk-ZAUX2LTX-C48Ri0Gs.js} +1 -1
  228. package/editor-web/assets/{chunk-ZCHMQSOR-B3AYRhIY.js → chunk-ZCHMQSOR-DN1g01Oe.js} +1 -1
  229. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-6y2yX0oq.js → classDiagram-v2-4MYWR3UA-U6jbPr2d.js} +1 -1
  230. package/editor-web/assets/{collaborator-LRd0hELn.js → collaborator-B1u2td9m.js} +1 -1
  231. package/editor-web/assets/{createLucideIcon-CPS-TrJJ.js → createLucideIcon-GFZ_fxLc.js} +1 -1
  232. package/editor-web/assets/{cynefin-EF2NZ3EQ-CX4BTQQe.js → cynefin-EF2NZ3EQ-gzkai_7-.js} +1 -1
  233. package/editor-web/assets/{cynefinDiagram-WF24UDRP-LbDkOTy3.js → cynefinDiagram-WF24UDRP-DtSekSr6.js} +1 -1
  234. package/editor-web/assets/{dagre-NK4GIZVX-wCKQk7hi.js → dagre-NK4GIZVX-CiUwYVT6.js} +1 -1
  235. package/editor-web/assets/{diagram-CBK3MWTC-a9fofQwk.js → diagram-CBK3MWTC-r9XHCV-k.js} +1 -1
  236. package/editor-web/assets/{diagram-I5XIIV2D-UCLZWch5.js → diagram-I5XIIV2D-DxVsDZ34.js} +1 -1
  237. package/editor-web/assets/{diagram-ODIL2UCW-CAEe88Lp.js → diagram-ODIL2UCW-B0eNQoHV.js} +1 -1
  238. package/editor-web/assets/{diagram-PFBEJUXE-Cp1o45bs.js → diagram-PFBEJUXE-C7f2MfJT.js} +1 -1
  239. package/editor-web/assets/{diagram-RJA3I4VV-c6OVxDyq.js → diagram-RJA3I4VV-CSXcnvct.js} +1 -1
  240. package/editor-web/assets/{diagram-TYUNFSNR-BVRWslDM.js → diagram-TYUNFSNR-DXzOD_ii.js} +1 -1
  241. package/editor-web/assets/dist-BGRwhCQO.js +1 -0
  242. package/editor-web/assets/{dist-DwGhfliS.js → dist-BW4X7BrF.js} +1 -1
  243. package/editor-web/assets/dist-BgDRE85b.js +2 -0
  244. package/editor-web/assets/dist-Blq5nJnU.js +24 -0
  245. package/editor-web/assets/dist-BuWaZ3Y4.js +274 -0
  246. package/editor-web/assets/dist-C1emZ9wX.js +37 -0
  247. package/editor-web/assets/dist-CC7OeU1e.js +6 -0
  248. package/editor-web/assets/{dist-j6ZLVcgf.js → dist-CX-fiPSn.js} +16 -16
  249. package/editor-web/assets/dist-C_VvG-_9.js +5 -0
  250. package/editor-web/assets/dist-Ce7HrBxv.js +3 -0
  251. package/editor-web/assets/dist-D2k6w-_a.js +1 -0
  252. package/editor-web/assets/dist-DDv_SbKw.js +84 -0
  253. package/editor-web/assets/dist-DEoEO4zs.js +1 -0
  254. package/editor-web/assets/dist-DlDxxPIP.js +16 -0
  255. package/editor-web/assets/dist-Gz6NDS0J.js +4 -0
  256. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-KdOTJgFu.js → ebnfDiagram-V4P3TTPT-Cs4YRvDD.js} +1 -1
  257. package/editor-web/assets/{elk-QONTBCTQ-Cmlrp7qB.js → elk-QONTBCTQ-Bh3LZ9WI.js} +1 -1
  258. package/editor-web/assets/{erDiagram-KYQIGQAA-CBM7-aQm.js → erDiagram-KYQIGQAA-C4vYTYXp.js} +1 -1
  259. package/editor-web/assets/{eventmodeling-K75KTNOO-CEoJkbuW.js → eventmodeling-K75KTNOO-BN1kkHWS.js} +1 -1
  260. package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +1 -0
  261. package/editor-web/assets/{ganttDiagram-R7GPNTJY-D4S6ZSYD.js → ganttDiagram-R7GPNTJY-CA1LkkC5.js} +1 -1
  262. package/editor-web/assets/{gitGraph-VSP46ZUC-BvkL6RSh.js → gitGraph-VSP46ZUC-Dy5tA7dG.js} +1 -1
  263. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-lTGguloH.js → gitGraphDiagram-PDYL7XHY-hJIB8EkH.js} +1 -1
  264. package/editor-web/assets/{hint-BimUgJms.js → hint-B8JpEypy.js} +1 -1
  265. package/editor-web/assets/index-CgB5osVc.js +28 -0
  266. package/editor-web/assets/index-Daytem9N.css +2 -0
  267. package/editor-web/assets/{info-OHQRW6UA-DvKzqNvp.js → info-OHQRW6UA-DvzSf7rQ.js} +1 -1
  268. package/editor-web/assets/{infoDiagram-MVDRKAX5-D7hCpehs.js → infoDiagram-MVDRKAX5-BjIMm4Af.js} +1 -1
  269. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-Bg93sZQe.js → ishikawaDiagram-HPEHV2GE-Bpz71S40.js} +1 -1
  270. package/editor-web/assets/{italic-BQBwRTe8.js → italic-D10w8n6C.js} +1 -1
  271. package/editor-web/assets/{journeyDiagram-BOSHW7O7-CKm_KONJ.js → journeyDiagram-BOSHW7O7-DAB-pZjD.js} +1 -1
  272. package/editor-web/assets/{kanban-definition-FNSA4HC5-BKknnpTR.js → kanban-definition-FNSA4HC5-cYeyh3P6.js} +1 -1
  273. package/editor-web/assets/katex-5Z2zF-9g.js +257 -0
  274. package/editor-web/assets/link-BC5xK1-1.js +1 -0
  275. package/editor-web/assets/{mermaid-parser.core-BzqkDnqL.js → mermaid-parser.core-req5LE0X.js} +3 -3
  276. package/editor-web/assets/{mermaid.core-CEpvTOAe.js → mermaid.core-zFwZug4C.js} +4 -4
  277. package/editor-web/assets/{mindmap-definition-6OY57UG3-BJ0qG8Wi.js → mindmap-definition-6OY57UG3-TStWb7DG.js} +1 -1
  278. package/editor-web/assets/minus-DaWs5i8B.js +1 -0
  279. package/editor-web/assets/{packet-JDAUHWVQ-ew3kvyFm.js → packet-JDAUHWVQ-smFhVKcB.js} +1 -1
  280. package/editor-web/assets/palette-BIOudGkm.js +1 -0
  281. package/editor-web/assets/{pegDiagram-ECIUJNBX-DqUS2xit.js → pegDiagram-ECIUJNBX-DvSNRv0-.js} +1 -1
  282. package/editor-web/assets/{pie-XZMESJXO-DTIAMPGm.js → pie-XZMESJXO-qjaGsBZG.js} +1 -1
  283. package/editor-web/assets/{pieDiagram-GNMPY74T-DoKOE02-.js → pieDiagram-GNMPY74T-Dd9P-Pdc.js} +1 -1
  284. package/editor-web/assets/play-CrMmPghG.js +1 -0
  285. package/editor-web/assets/{progress-CPEbDOoN.js → progress-DE4C5_3x.js} +1 -1
  286. package/editor-web/assets/props-form-CsmDBqzy.js +1 -0
  287. package/editor-web/assets/{quadrantDiagram-D57K4MC3-DauOpYun.js → quadrantDiagram-D57K4MC3-h2IIKUUA.js} +1 -1
  288. package/editor-web/assets/{radar-ABXABTNO-BvMJXUU-.js → radar-ABXABTNO-DlVrSA1d.js} +1 -1
  289. package/editor-web/assets/{railroad-I3PHUGI6-D3jdJmhM.js → railroad-I3PHUGI6-nFbuLAtc.js} +1 -1
  290. package/editor-web/assets/{railroad-abnf-LNEFI6M7-Dm8ZpmPj.js → railroad-abnf-LNEFI6M7-Daj8h2iV.js} +1 -1
  291. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-oc0Du7Ag.js → railroad-ebnf-DWYD2UWJ-eYJyl5PH.js} +1 -1
  292. package/editor-web/assets/{railroad-peg-JR7BVNR7-CMrQL_7U.js → railroad-peg-JR7BVNR7-BTRhKZQq.js} +1 -1
  293. package/editor-web/assets/{railroadDiagram-Y72NRBL7-y99z0C7i.js → railroadDiagram-Y72NRBL7-CeLGUjdp.js} +1 -1
  294. package/editor-web/assets/{react-DztDSW4P.js → react-WA6wlt8S.js} +1 -1
  295. package/editor-web/assets/{repeat-2-DJi4LW5C.js → repeat-2-VQP1EVOZ.js} +1 -1
  296. package/editor-web/assets/{requirementDiagram-EQYSW5RA-jMr_uoF6.js → requirementDiagram-EQYSW5RA-Dmk9XRM5.js} +1 -1
  297. package/editor-web/assets/{row-ClBisiBs.js → row-BRlEWRrK.js} +1 -1
  298. package/editor-web/assets/{sankeyDiagram-SY24JHO5-DcUyx03Q.js → sankeyDiagram-SY24JHO5-Yn4zlrAM.js} +1 -1
  299. package/editor-web/assets/{schemas-68mjUjP5.js → schemas-VikZYZIK.js} +1 -1
  300. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-R4X8wRCd.js → sequenceDiagram-BLEHNHQU-BTRnp_PW.js} +1 -1
  301. package/editor-web/assets/{session-2u9U7koW.js → session-Do9AqS38.js} +1 -1
  302. package/editor-web/assets/{slides-BByblSSR.js → slides-diTEQ3C5.js} +1 -1
  303. package/editor-web/assets/{snapshots-C9KV-Y2_.js → snapshots-BUGlKQIB.js} +1 -1
  304. package/editor-web/assets/{sound-DExlNJbb.js → sound-Bj3o9_Fa.js} +1 -1
  305. package/editor-web/assets/split-CNU1RHcX.js +3 -0
  306. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-BqvXKbCA.js → stateDiagram-v2-A6IESKWZ-kstrRKv2.js} +1 -1
  307. package/editor-web/assets/{strikethrough-CyUBnGTl.js → strikethrough-CfXx6IYH.js} +1 -1
  308. package/editor-web/assets/{svg-lBRT-uhy.js → svg-Cx50MpxK.js} +1 -1
  309. package/editor-web/assets/{swatch-1c1uVn1z.js → swatch-WeJD41aW.js} +1 -1
  310. package/editor-web/assets/{swimlanes-B3ENRKFQ-hjTXIc6M.js → swimlanes-B3ENRKFQ-DaZsZkeP.js} +1 -1
  311. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +8 -0
  312. package/editor-web/assets/{switch-D0K-K8-C.js → switch-N0G_sbqt.js} +1 -1
  313. package/editor-web/assets/syntax-BVsgRJ4I.js +66 -0
  314. package/editor-web/assets/syntax-oWsKBWFw.js +1 -0
  315. package/editor-web/assets/table-B6hVZAMi.js +1 -0
  316. package/editor-web/assets/{tabs-CxxOnGLR.js → tabs-DIFDqj-l.js} +1 -1
  317. package/editor-web/assets/{textarea-Fu93tFO3.js → textarea-tEWvBY9p.js} +1 -1
  318. package/editor-web/assets/{timeline-definition-JXYKGLGB-BcSoN4Dq.js → timeline-definition-JXYKGLGB-CLCvY-Yf.js} +1 -1
  319. package/editor-web/assets/{trash-2-BAKAeziW.js → trash-2-BP6nqpg2.js} +1 -1
  320. package/editor-web/assets/{treeView-D4JQ5SDB-CsFN2jrc.js → treeView-D4JQ5SDB-BmN0gwdC.js} +1 -1
  321. package/editor-web/assets/{treemap-SAJKECNS-DP1eqXJ2.js → treemap-SAJKECNS-DN29G_E_.js} +1 -1
  322. package/editor-web/assets/{undo-2-DQ5CBmki.js → undo-2-CHR0nvWL.js} +1 -1
  323. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-BGxa0osF.js → usecaseDiagram-WPOLBNNX-DTRS54cB.js} +1 -1
  324. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-D2XhTF49.js → vennDiagram-Q3Y3IDCW-DAAc11Hx.js} +1 -1
  325. package/editor-web/assets/{video-CDbPX4Cr.js → video-BlvmR8BK.js} +1 -1
  326. package/editor-web/assets/{wardley-7MLQ67FV-DM3jMAbZ.js → wardley-7MLQ67FV-B-UYkmdB.js} +1 -1
  327. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-Bf-DaZEg.js → wardleyDiagram-IVAIDKWA-BmbwCaky.js} +1 -1
  328. package/editor-web/assets/words-D_4T9Adq.js +3 -0
  329. package/editor-web/assets/words-WgdEQdYP.js +2 -0
  330. package/editor-web/assets/{xychartDiagram-4URNHDU4-dp-mdcWd.js → xychartDiagram-4URNHDU4-ChAfAq1U.js} +1 -1
  331. package/editor-web/index.html +6 -6
  332. package/package.json +8 -2
  333. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.d.ts +0 -337
  334. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.js +0 -2
  335. package/editor-web/assets/alt-DnBZJzEh.js +0 -4
  336. package/editor-web/assets/article-DLMjAdbP.js +0 -73
  337. package/editor-web/assets/button-Chk675Xu.js +0 -41
  338. package/editor-web/assets/channel-EzYq4r0d.js +0 -1
  339. package/editor-web/assets/chart-Be9Hj5GL.js +0 -1
  340. package/editor-web/assets/choice-BgmBh4yu.js +0 -1
  341. package/editor-web/assets/dist--KKyT5zP.js +0 -340
  342. package/editor-web/assets/dist-1k0MHB3i.js +0 -1
  343. package/editor-web/assets/dist-B9KHJqL5.js +0 -4
  344. package/editor-web/assets/dist-BbJyrhIY.js +0 -1
  345. package/editor-web/assets/dist-CJXCQxQM.js +0 -37
  346. package/editor-web/assets/dist-D9xQGwe9.js +0 -5
  347. package/editor-web/assets/dist-DFiLzbx8.js +0 -219
  348. package/editor-web/assets/dist-DIPV6xfF.js +0 -2
  349. package/editor-web/assets/dist-Dp-fQMtx.js +0 -6
  350. package/editor-web/assets/dist-Duw28VxJ.js +0 -16
  351. package/editor-web/assets/dist-OBE2IIYP.js +0 -24
  352. package/editor-web/assets/flowDiagram-IUGLLWBU-Xm2E2ib_.js +0 -1
  353. package/editor-web/assets/index-C-i_iuxN.js +0 -28
  354. package/editor-web/assets/index-Cxh_Shkm.css +0 -2
  355. package/editor-web/assets/minus-oPj1GxwA.js +0 -1
  356. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-BLfytmPY.js +0 -8
  357. package/editor-web/assets/syntax-Bih_jv7W.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  Feature highlights from each AllyHub release.
4
4
 
5
+ ## 0.11.0
6
+
7
+ - **Reports.** A page written freely in HTML, CSS and JavaScript, read on a screen and sent as a link; rendered as one self-contained HTML file, a PDF or one long PNG, with report styles to start from (`allyhub report style`).
8
+ - **LinkedIn posts, carousels and articles**, written beside LinkedIn's look and checked against its limits; a post shows where LinkedIn folds it at "… more", and an article copies as LinkedIn's editor takes it.
9
+ - **Exports go to your Downloads.** An export from an editor lands in one folder, Downloads unless you choose another (`allyhub dev --exports`), and never overwrites a file there.
10
+ - **Mark up a thing by picking it.** Select marks what is under the pointer, and Mark up from a selection starts with it marked, so the agent is told exactly what you mean.
11
+ - **Present a deck on two screens as in PowerPoint**, each full screen, with Swap and Duplicate Slide Show.
12
+
5
13
  ## 0.10.0
6
14
 
7
15
  - **Word, Excel and PowerPoint files that hold up in Office.** A deck's file holds what its preview shows; a workbook keeps iterative calculation, data tables and combination charts; a chart over dates shows dates.
@@ -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 f,rm as E,writeFile as S}from"node:fs/promises";import{dirname as c,join as p}from"node:path";import{fileURLToPath as R}from"node:url";import{z as a}from"zod";import{projectItems as T}from"@allyhub/build";import{openBrowser as h}from"@allyhub/cloud";import{startDevServer as l}from"@allyhub/dev-server";import{DEV_FILE as w}from"@allyhub/formats";import{EXIT as I}from"@allyhub/protocol";import{CommandError as g,defineCommand as j}from"../command.js";import{dir as O,indexing as $}from"../fields.js";import{itemNamed as k,projectRoot as D}from"../project.js";import{extensionsAt as P,fileEditorsAt as A,kindsAt as v}from"./extensions.js";export const PAGE=p(c(R(import.meta.url)),"../../editor-web");const u=4340,C=20;export async function start(t,e,r){const n={root:t,kinds:v(t),extensions:P(t),ui:PAGE,index:r};if(e!==void 0)return l({...n,port:e}).catch(i=>{throw i.code==="EADDRINUSE"?new g("port-in-use",`Port ${String(e)} is in use.`,{hint:"Choose another with --port, or leave it out."}):i});for(let i=u;i<u+C;i++)try{return await l({...n,port:i})}catch(o){if(o.code!=="EADDRINUSE")throw o}return l(n)}async function F(t){try{const e=JSON.parse(await f(p(t,w),"utf8"));return typeof e.url!="string"||typeof e.pid!="number"?void 0:(process.kill(e.pid,0),(await fetch(e.url,{signal:AbortSignal.timeout(2e3)})).ok?e.url:void 0)}catch{return}}async function b(t,e,r,n){if(n===void 0)return r;const{listed:i}=await T(t,v(t),void 0,A(t)),o=k(i,t,e,n);if(!o)throw new g("not-found",`There is no item ${n} in the project's list.`,{exit:I.notFound,hint:`Its items: ${i.map(s=>s.id).join(", ")||"none"} (allyhub.yaml lists them).`});return`${r}?${new URLSearchParams({item:o.id}).toString()}`}export const dev=j({name:"dev",summary:"The project's items in the browser, each in its editor (docs, sheets, videos, 3D sceneries; websites listed), as their files change; runs until stopped, and run again while it runs, opens its page and ends",input:a.strictObject({item:a.string().optional().describe("Open the page on this item: its id (its file without its extension) or its file; or on a file the list names with no kind, which an editor opens by its name (a canvas)"),dir:O,port:a.number().int().min(1).max(65535).optional().describe(`The port; default the first free one from ${String(u)}`),open:a.boolean().default(!0).describe("Open the page in the browser; --no-open only prints it")}),positional:["item"],output:a.strictObject({url:a.string()}),examples:["allyhub dev","allyhub dev launch/plan","allyhub dev --port 4400 --no-open"]},async(t,e)=>{const r=await D(e.cwd,t.dir),n=t.port===void 0?await F(r):void 0;if(n!==void 0){const s=await b(r,e.cwd,n,t.item);return e.progress(`allyhub dev is already running at ${s}`),t.open&&h(s,e.env),{value:{url:s},text:""}}const i=await start(r,t.port,$(e.env)),o=p(r,w);try{const s=await b(r,e.cwd,i.url,t.item);return await y(c(o),{recursive:!0}),await S(o,JSON.stringify({url:i.url,pid:process.pid,token:i.token})),e.progress(`allyhub dev is at ${s}
3
- Press Ctrl+C to stop.`),t.open&&h(s,e.env),await new Promise(m=>{const d=()=>{process.off("SIGTERM",d),e.signal.removeEventListener("abort",d),m()};e.signal.aborted&&m(),e.signal.addEventListener("abort",d),process.once("SIGTERM",d)}),{value:{url:s},text:""}}finally{(await f(o,"utf8").catch(()=>"")).includes(`"pid":${String(process.pid)}`)&&await E(o,{force:!0}),await i.close(),await i.project.extensions?.deactivate()}});
2
+ import{mkdir as y,readFile as m,rm as E,writeFile as S}from"node:fs/promises";import{dirname as c,join as l,resolve as T}from"node:path";import{fileURLToPath as R}from"node:url";import{z as a}from"zod";import{projectItems as I}from"@allyhub/build";import{openBrowser as h}from"@allyhub/cloud";import{startDevServer as p}from"@allyhub/dev-server";import{DEV_FILE as w}from"@allyhub/formats";import{EXIT as j}from"@allyhub/protocol";import{CommandError as g,defineCommand as D}from"../command.js";import{dir as O,indexing as $}from"../fields.js";import{itemNamed as k,projectRoot as P}from"../project.js";import{extensionsAt as A,fileEditorsAt as x,kindsAt as v}from"./extensions.js";export const PAGE=l(c(R(import.meta.url)),"../../editor-web");const u=4340,C=20;export async function start(t,e,o,s){const n={root:t,kinds:v(t),extensions:A(t),ui:PAGE,...s===void 0?{}:{exportsTo:()=>s},index:o};if(e!==void 0)return p({...n,port:e}).catch(i=>{throw i.code==="EADDRINUSE"?new g("port-in-use",`Port ${String(e)} is in use.`,{hint:"Choose another with --port, or leave it out."}):i});for(let i=u;i<u+C;i++)try{return await p({...n,port:i})}catch(r){if(r.code!=="EADDRINUSE")throw r}return p(n)}async function F(t){try{const e=JSON.parse(await m(l(t,w),"utf8"));return typeof e.url!="string"||typeof e.pid!="number"?void 0:(process.kill(e.pid,0),(await fetch(e.url,{signal:AbortSignal.timeout(2e3)})).ok?e.url:void 0)}catch{return}}async function b(t,e,o,s){if(s===void 0)return o;const{listed:n}=await I(t,v(t),void 0,x(t)),i=k(n,t,e,s);if(!i)throw new g("not-found",`There is no item ${s} in the project's list.`,{exit:j.notFound,hint:`Its items: ${n.map(r=>r.id).join(", ")||"none"} (allyhub.yaml lists them).`});return`${o}?${new URLSearchParams({item:i.id}).toString()}`}export const dev=D({name:"dev",summary:"The project's items in the browser, each in its editor (docs, sheets, videos, 3D sceneries; websites listed), as their files change; runs until stopped, and run again while it runs, opens its page and ends",input:a.strictObject({item:a.string().optional().describe("Open the page on this item: its id (its file without its extension) or its file; or on a file the list names with no kind, which an editor opens by its name (a canvas)"),dir:O,port:a.number().int().min(1).max(65535).optional().describe(`The port; default the first free one from ${String(u)}`),open:a.boolean().default(!0).describe("Open the page in the browser; --no-open only prints it"),exports:a.string().min(1).optional().describe("The folder an export from the page is saved in; default ~/Downloads (each file is made in .allyhub/out/ first)")}),positional:["item"],output:a.strictObject({url:a.string()}),examples:["allyhub dev","allyhub dev launch/plan","allyhub dev --port 4400 --no-open"]},async(t,e)=>{const o=await P(e.cwd,t.dir),s=t.port===void 0?await F(o):void 0;if(s!==void 0){const r=await b(o,e.cwd,s,t.item);return e.progress(`allyhub dev is already running at ${r}`),t.open&&h(r,e.env),{value:{url:r},text:""}}const n=await start(o,t.port,$(e.env),t.exports===void 0?void 0:T(e.cwd,t.exports)),i=l(o,w);try{const r=await b(o,e.cwd,n.url,t.item);return await y(c(i),{recursive:!0}),await S(i,JSON.stringify({url:n.url,pid:process.pid,token:n.token})),e.progress(`allyhub dev is at ${r}
3
+ Press Ctrl+C to stop.`),t.open&&h(r,e.env),await new Promise(f=>{const d=()=>{process.off("SIGTERM",d),e.signal.removeEventListener("abort",d),f()};e.signal.aborted&&f(),e.signal.addEventListener("abort",d),process.once("SIGTERM",d)}),{value:{url:r},text:""}}finally{(await m(i,"utf8").catch(()=>"")).includes(`"pid":${String(process.pid)}`)&&await E(i,{force:!0}),await n.close(),await n.project.extensions?.deactivate()}});
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{createHash as d}from"node:crypto";import{dirname as m,join as c,relative as a}from"node:path";import{REPORT_DEFAULTS as f,reportPicture as u}from"@allyhub/report-extension/cli";import{webp as h}from"@allyhub/image-render/webp";import{EXIT as l}from"@allyhub/protocol";import{CommandError as w}from"../../command.js";import{picturePath as g,save as E,workPath as $}from"./common.js";export function selectorName(t){const r=t.replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/gu,"").slice(0,40),e=d("sha256").update(t).digest("hex").slice(0,6);return r===""?e:`${r}-${e}`}export async function reportFrames(t){const r=a(t.root,m(t.file)),e=t.width??f.width;let i;try{i=await u({root:t.root,file:a(t.root,t.file).split("\\").join("/"),width:e,dark:t.dark,print:t.print,at:t.at})}catch(o){throw o instanceof Error&&o.name==="ReportPictureError"?new w("no-element",o.message,{exit:l.notFound,hint:"Write --at as a CSS selector of an element the page draws."}):o}const s=[`w${String(e)}`,...t.dark?["dark"]:[],...t.print?["print"]:[],...t.at===void 0?[]:[`at-${selectorName(t.at)}`]].join("-"),p=await E(g(t.cwd,t.out,c($(t.root,"frames",r),`${s}.png`)),await h(i.png,90)),n=i.findings;return{mode:"frame",source:"report",report:r,out:p,width:e,pageHeight:i.pageHeight,bands:i.bands,missing:n.missing,outside:n.outside,thrown:n.thrown,...n.unsettled===void 0?{}:{unsettled:n.unsettled}}}
@@ -1,10 +1,12 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{relative as _,sep as G}from"node:path";import{z as t}from"zod";import{formatConsole as N,formatProblem as R}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as H}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as U,cutLine as J,dbText as S,silenceText as V}from"@allyhub/video-measure";import{consoleJson as T}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as x}from"@allyhub/browser";import{itemIdOf as q}from"@allyhub/formats";import{EXIT as A}from"@allyhub/protocol";import{defineCommand as b}from"../command.js";import{dir as O}from"../fields.js";import{parameters as C}from"../parameters.js";import{tellPresence as D}from"../presence.js";import{projectRoot as w}from"../project.js";import{VERSION_FIELDS as j,commandError as E,withVersion as $}from"../version.js";import{compareText as P,comparePictures as W}from"./frames/compare.js";import{isPicture as k,isVideo as z,usage as f}from"./frames/common.js";import{cutSheets as X}from"./frames/cuts.js";import{fileFrames as K}from"./frames/file.js";import{pageShot as Q}from"./frames/page.js";import{pieceMoments as Y,stillsSheet as Z}from"./frames/piece.js";import{docPicture as ee}from"./frames/doc.js";import{findDoc as te}from"@allyhub/doc-extension/cli";import{sheetPicture as re}from"./frames/sheet.js";import{findSheet as M}from"@allyhub/sheet-extension/cli";function y(e){return[...e.problems.filter(a=>a.level==="error").map(R),...N(T(e.console))]}const v=e=>({problems:e.problems,...T(e.console)}),F=(e,s)=>w(e,s),oe=t.strictObject({...j,item:t.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:t.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default its sheets, from A1"),page:t.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:t.array(t.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled. Without it, --part's still, or every part's still on one sheet"),part:t.string().optional().describe("The part --at, --from and --to count from; alone, its still"),from:t.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:t.number().optional().describe("The stretch's last second"),clip:t.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:t.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:t.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:t.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:t.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function ae(e){const s=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(s.length>0)throw f("bad-option",`${s.join(" and ")} ${s.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function ne(e){const s=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(s.length>0)throw f("bad-option",`${s.join(" and ")} ${s.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}export const frames=b({name:"frames",summary:"Pictures of a piece over time, drawn as the render draws them: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; or any video file's frames",input:oe,positional:["item"],output:t.looseObject({mode:t.enum(["sheet","frame","grid","clip"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3"]},async(e,s)=>{const a=s.cwd;if(e.item!==void 0&&z(e.item)){ae(e);const r=await K({cwd:a,root:await F(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(g=>{throw E(g)}),n=r.video,p=`${r.file} · ${n.duration.toFixed(2)} s · ${String(n.width)}×${String(n.height)} · ${String(n.fps)} fps`,u="clip"in r&&r.clip?`${r.clip.out} (${r.clip.type}, ${String(r.clip.frames)} frames at ${String(r.clip.fps)} fps, no sound)`:void 0;return{value:r,text:[p,..."out"in r?[`${r.out}${"tiles"in r?` (${String(r.tiles.length)} moments in ${String(r.cols)} columns)`:""}`]:[],...u?[u]:[]].join(`
3
- `)}}if(e.grid!==void 0)throw f("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await w(a,e.dir);if(e.item!==void 0&&await M(d,a,e.item)!==void 0){const r=await re({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),n=await M(d,a,e.item);return n!==void 0&&Object.keys(r.at).length>0&&await D(d,{doing:"looking",item:q(_(d,n).split(G).join("/")),place:r.at}),{value:r,text:[r.out,...r.cut].join(`
4
- `)}}const c=e.item===void 0?void 0:await te(d,a,e.item);if(c!==void 0){ne(e);const r=await ee({cwd:a,root:d,file:c,page:e.page,out:e.out,progress:p=>{s.progress(p)}}),n=r.drawn.length===r.pages?"every page":`page${r.drawn.length===1?"":"s"} ${r.drawn.join(", ")}`;return{value:r,text:[r.out,`${r.doc}: ${String(r.pages)} page${r.pages===1?"":"s"} on ${String(r.paper.width)} × ${String(r.paper.height)} mm paper; ${n} drawn`].join(`
5
- `)}}if(e.page!==void 0)throw f("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw f("bad-option","--range is a sheet's: name the sheet.");const l=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!l&&(e.clip!==void 0||e.beside!==void 0))throw f("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");if(!l&&!e.overlay){const{result:r,...n}=await $(e,s,"render",g=>Z(g,{cwd:a,root:d,out:e.out})),{unit:p,...u}=r;return{value:{...u,...v(n)},text:[`${r.out} (${r.piece} · ${r.format} · ${String(r.parts.length)} ${r.parts.length===1?p.noun:p.plural})`,...y(n)].join(`
6
- `)}}const h=!l&&e.overlay,{result:o,...i}=await $(e,s,"render",async r=>{const n=await Y(r,{cwd:a,root:d,at:h?r.timeline.parts.map(L=>String(L.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside}),p="tiles"in n?n.tiles[0]:void 0,u=n.mode==="frame"?n.t:n.stretch?.from??p?.t,g=n.mode==="frame"?n.part:p?.part;return u!==void 0&&!h&&await D(d,{doing:"looking",item:r.piece.place,place:{t:u,...g===void 0?{}:{part:g}}}),n}),m=[];if(o.mode==="frame"&&m.push(`${o.out} (${o.piece} · ${o.format} · ${o.part} · ${o.t.toFixed(2)} s)`),o.mode==="grid"){m.push(`${o.out} (${o.piece} · ${String(o.tiles.length)} moments in ${String(o.cols)} columns)`,` ${o.tiles.map(n=>`${n.t.toFixed(o.stretch?3:2)} ${n.part}`).join(" · ")}`);const r=[...new Set(o.tiles.flatMap(n=>n.overlay?.missing??[]))];r.length>0&&m.push(` Not measured: ${r.join(", ")}.`)}return o.stretch&&m.push(` Stretch ${o.stretch.from.toFixed(3)}–${o.stretch.to.toFixed(3)} s, one frame in ${String(o.stretch.every)}: ${String(o.stretch.frames)} frames.`),"clip"in o&&o.clip&&m.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...v(i)},text:[...m,...y(i)].join(`
7
- `)}}),framesCuts=b({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:t.strictObject({...j,part:t.string().optional().describe("Only this part's cuts and its joins"),out:t.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:C({span:t.number().positive().max(10).default(U.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:t.looseObject({out:t.string(),cuts:t.array(t.looseObject({sheet:t.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,s)=>{const a=s.cwd,d=await w(a,e.dir),{result:c,...l}=await $(e,s,"render",i=>X(i,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),h=c.part===void 0?`${String(c.cuts.length)} cut${c.cuts.length===1?"":"s"}`:`${String(c.cuts.length)} of ${String(c.total)} cuts (part ${c.part} and its joins)`,o=[`${c.piece} · ${c.format} · ${h}; silence is sound under ${String(c.threshold)} dBFS`];for(const i of c.cuts){const m=i.sound?`level ${S(i.sound.levelDb)} / around ${S(i.sound.aroundDb)} dBFS, peak ${S(i.sound.peakDb)}, step ${i.sound.jumpDb<0?"−":"+"}${Math.abs(i.sound.jumpDb).toFixed(1)} dB`:"no sound";o.push(`${String(i.index).padStart(3)} ${i.t.toFixed(3).padStart(7)} s ${i.kind.padEnd(6)} ${J(i)}`,` silence at the cut: ${V(i.silence)} · ${m}`,` “${i.said.before}” | “${i.said.after}”${i.across?` · across the cut: “${i.across}”`:""}`,` ${i.sheet}`)}return{value:{...c,...v(l)},text:[...o,...y(l)].join(`
8
- `)}});const I=H;export const framesCompare=b({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:t.strictObject({reference:t.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:t.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:j.combo,dir:O,at:t.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:t.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:t.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:t.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:t.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:t.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:C({resize:t.enum(["stretch","width","none"]).default(I.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:t.number().int().min(0).max(32).default(I.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:t.looseObject({reference:t.string(),files:t.looseObject({side:t.string(),heatmap:t.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,s)=>{const a=s.cwd,d=e.params;if(!k(e.reference))throw f("bad-reference",`${e.reference} is not a picture: the reference comes first, a picture file (PNG, WebP, JPEG…), then the piece or file to compare with it.`,`For example: allyhub frames compare ${e.candidate!==void 0&&k(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const c=e.candidate!==void 0&&(k(e.candidate)||z(e.candidate))?e.candidate:void 0,l=m=>({cwd:a,root:m,reference:e.reference,file:c,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(c!==void 0){if(e.combo!==void 0||e.part!==void 0)throw f("bad-option","--combo and --part are a piece's: the candidate is a file.");const m=await W(l(await F(a,e.dir)),void 0).catch(r=>{throw E(r)});return{value:m,text:P(m)}}const h=await w(a,e.dir),{result:o,...i}=await $({...e,item:e.candidate},s,"render",m=>W(l(h),m));return{value:{...o,...v(i)},text:[P(o),...y(i)].join(`
9
- `)}}),framesWeb=b({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:t.strictObject({url:t.string().describe("The page: an address, or an HTML file on this computer"),el:t.array(t.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:t.array(t.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:t.boolean().default(!1).describe("The whole page, not one viewport"),out:t.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:O,size:t.string().default(`${String(x.width)}x${String(x.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:t.number().min(1).max(4).default(x.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:t.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:t.looseObject({out:t.string(),elementsFile:t.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,s)=>{const a=s.cwd,[d,c]=B(e.size),l=await Q({cwd:a,root:await F(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:c,scale:e.scale,full:e.full,wait:e.wait});return{value:l,text:[`${l.out}: ${String(l.width)}×${String(l.height)}${l.scale===1?"":` (${String(l.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(l.elements).length)} elements (${Object.keys(l.elements).join(", ")||"none"}) in ${l.elementsFile}`,...l.missing.length>0?[`Not found: ${l.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
10
- `),exit:l.missing.length>0?A.failed:A.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
2
+ import{relative as _,sep as G}from"node:path";import{z as r}from"zod";import{formatConsole as H,formatProblem as N}from"../text/index.js";import{sizeOf as B}from"@allyhub/build";import{COMPARE_DEFAULTS as U}from"@allyhub/measure";import{CUT_REVIEW_DEFAULTS as J,cutLine as V,dbText as x,silenceText as q}from"@allyhub/video-measure";import{consoleJson as T}from"@allyhub/project";import{PAGE_CAPTURE_DEFAULTS as j}from"@allyhub/browser";import{itemIdOf as X}from"@allyhub/formats";import{EXIT as O}from"@allyhub/protocol";import{defineCommand as w}from"../command.js";import{dir as C}from"../fields.js";import{parameters as D}from"../parameters.js";import{tellPresence as E}from"../presence.js";import{projectRoot as $}from"../project.js";import{VERSION_FIELDS as k,commandError as P,withVersion as y}from"../version.js";import{compareText as W,comparePictures as z}from"./frames/compare.js";import{isPicture as A,isVideo as M,usage as m}from"./frames/common.js";import{cutSheets as K}from"./frames/cuts.js";import{fileFrames as Q}from"./frames/file.js";import{pageShot as Y}from"./frames/page.js";import{pieceMoments as Z,stillsSheet as ee}from"./frames/piece.js";import{docPicture as te}from"./frames/doc.js";import{findDoc as re}from"@allyhub/doc-extension/cli";import{sheetPicture as oe}from"./frames/sheet.js";import{findSheet as I}from"@allyhub/sheet-extension/cli";import{reportFrames as ae}from"./frames/report.js";import{findReport as ne}from"@allyhub/report-extension/cli";function v(e){return[...e.problems.filter(a=>a.level==="error").map(N),...H(T(e.console))]}const S=e=>({problems:e.problems,...T(e.console)}),F=(e,i)=>$(e,i),ie=r.strictObject({...k,item:r.string().optional().describe("The piece (its id, its file without its extension, or its file; default the project's only one), a sheet, a doc, a report, or a video file: a path ending in .mp4, .mov, .webm, .m4v, .qt, .mkv or .avi is a file"),range:r.string().optional().describe("A sheet's: what to draw, a sheet (Summary), a range (Summary!B3:D9, or B3:D9 on the first sheet), columns (A:C) or rows (1:20); default its sheets, from A1"),page:r.string().optional().describe("A doc's: the pages to draw large, counted from 1 (2, 2-4, 1,5); default every page, small, tiled"),at:r.array(r.string()).optional().describe("Moments: seconds (from the start of --part when given) or anchors (@press, @/map a stretch's end, @press+0.2); a video file's are seconds. One is written as the frame itself, several are tiled. Without it, --part's still, or every part's still on one sheet. A report's: a CSS selector, that element alone"),width:r.number().int().min(200).max(3840).optional().describe("A report's: the page's width, CSS pixels (default 1440; 375 a phone's)"),dark:r.boolean().default(!1).describe("A report's: drawn as a reader who asks for dark sees it"),print:r.boolean().default(!1).describe("A report's: laid out for paper (@media print) at the width given, as one long picture"),part:r.string().optional().describe("The part --at, --from and --to count from; alone, its still"),from:r.number().optional().describe("A stretch of consecutive frames from this second (with --to), instead of --at"),to:r.number().optional().describe("The stretch's last second"),clip:r.string().optional().describe("Write the stretch as a small silent video, .gif, .mp4 or .webm by its extension; with --out, the grid too"),overlay:r.boolean().default(!1).describe("Draw over each tile the face boxes with ids, the person matte's outline, the covered areas and the text boxes (a deck's: each shape's box and name, and the lines nearly in line); places nothing. Alone, over every part's still"),beside:r.string().optional().describe("Another video file (a reference) whose frame at the same time goes on each tile's left"),grid:r.number().int().min(4).optional().describe("A video file at one --at: the frame at its own size with numbered lines every this many pixels"),out:r.string().optional().describe("Where the picture goes, always a WebP whatever the extension; default under .allyhub/work/frames/")});function se(e){const i=[["--combo",e.combo!==void 0],["--part",e.part!==void 0],["--beside",e.beside!==void 0],["--overlay",e.overlay]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw m("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} a piece's: a video file has no combos or parts.`)}function de(e){const i=[["--at",e.at!==void 0],["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--combo",e.combo!==void 0]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw m("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} not a doc's: a doc has pages (--page), not moments.`)}function le(e){const i=[["--part",e.part!==void 0],["--from",e.from!==void 0],["--to",e.to!==void 0],["--clip",e.clip!==void 0],["--overlay",e.overlay],["--beside",e.beside!==void 0],["--range",e.range!==void 0],["--page",e.page!==void 0],["--combo",e.combo!==void 0],["--at with more than one selector",(e.at?.length??0)>1]].filter(([,a])=>a).map(([a])=>a);if(i.length>0)throw m("bad-option",`${i.join(" and ")} ${i.length===1?"is":"are"} not a report's: a report is one page (--width, --dark, --print, --at <selector>).`)}export const frames=w({name:"frames",summary:"Pictures of a piece over time, drawn as the render draws them: every part's still on a sheet (default), a moment, a stretch tiled or as a clip, overlays; a sheet's cells, or a range of them; a doc's pages as they print, with how many; a report's page at a width, light or dark, or laid out for print; or any video file's frames",input:ie,positional:["item"],output:r.looseObject({mode:r.enum(["sheet","frame","grid","clip"])}),examples:["allyhub frames launch/film","allyhub frames launch/film --at 2.5","allyhub frames launch/film --part hook --from 0 --to 1 --clip hook.gif","allyhub frames launch/film --at 1,2,3 --overlay","allyhub frames reference.mp4 --at 0,1,2","allyhub frames reference.mp4 --at 3 --grid 50","allyhub frames finance/budget --range 'Summary!A1:F20'","allyhub frames launch/plan","allyhub frames launch/plan --page 2-3","allyhub frames research/channels/channels --width 375","allyhub frames research/channels/channels --at '#tiers'"]},async(e,i)=>{const a=i.cwd;if(e.item!==void 0&&M(e.item)){se(e);const t=await Q({cwd:a,root:await F(a,e.dir),file:e.item,at:e.at,from:e.from,to:e.to,clip:e.clip,out:e.out,grid:e.grid}).catch(b=>{throw P(b)}),n=t.video,c=`${t.file} · ${n.duration.toFixed(2)} s · ${String(n.width)}×${String(n.height)} · ${String(n.fps)} fps`,g="clip"in t&&t.clip?`${t.clip.out} (${t.clip.type}, ${String(t.clip.frames)} frames at ${String(t.clip.fps)} fps, no sound)`:void 0;return{value:t,text:[c,..."out"in t?[`${t.out}${"tiles"in t?` (${String(t.tiles.length)} moments in ${String(t.cols)} columns)`:""}`]:[],...g?[g]:[]].join(`
3
+ `)}}if(e.grid!==void 0)throw m("bad-option","--grid draws a video file's frame at its own size: give the file.");const d=await $(a,e.dir);if(e.item!==void 0&&await I(d,a,e.item)!==void 0){const t=await oe({cwd:a,root:d,item:e.item,range:e.range,out:e.out}),n=await I(d,a,e.item);return n!==void 0&&Object.keys(t.at).length>0&&await E(d,{doing:"looking",item:X(_(d,n).split(G).join("/")),place:t.at}),{value:t,text:[t.out,...t.cut].join(`
4
+ `)}}const l=e.item===void 0?void 0:await ne(d,a,e.item);if(l!==void 0){le(e);const t=await ae({cwd:a,root:d,file:l,width:e.width,dark:e.dark,print:e.print,at:e.at?.[0],out:e.out}),n=[...t.missing.map(c=>`asks for ${c.path}, not in the project`),...t.outside.map(c=>`asks for ${c}, outside the project: refused`),...t.thrown.map(c=>`threw ${c.text.split(`
5
+ `)[0]??""}`),...t.unsettled===void 0?[]:[t.unsettled]];return{value:t,text:[t.out,`${t.report}: ${String(t.width)} px wide, ${String(t.pageHeight)} px tall${t.bands>1?`, in ${String(t.bands)} bands side by side`:""}`,...n.map(c=>`${t.report}: ${c}`)].join(`
6
+ `)}}if(e.width!==void 0||e.dark||e.print)throw m("bad-option","--width, --dark and --print are a report's: name the report.");const s=e.item===void 0?void 0:await re(d,a,e.item);if(s!==void 0){de(e);const t=await te({cwd:a,root:d,file:s,page:e.page,out:e.out,progress:c=>{i.progress(c)}}),n=t.drawn.length===t.pages?"every page":`page${t.drawn.length===1?"":"s"} ${t.drawn.join(", ")}`;return{value:t,text:[t.out,`${t.doc}: ${String(t.pages)} page${t.pages===1?"":"s"} on ${String(t.paper.width)} × ${String(t.paper.height)} mm paper; ${n} drawn`].join(`
7
+ `)}}if(e.page!==void 0)throw m("bad-option","--page is a doc's: name the doc.");if(e.range!==void 0)throw m("bad-option","--range is a sheet's: name the sheet.");const h=e.at!==void 0||e.part!==void 0||e.from!==void 0||e.to!==void 0;if(!h&&(e.clip!==void 0||e.beside!==void 0))throw m("bad-option","--clip and --beside draw moments: give --at, --part, or --from and --to.");if(!h&&!e.overlay){const{result:t,...n}=await y(e,i,"render",b=>ee(b,{cwd:a,root:d,out:e.out})),{unit:c,...g}=t;return{value:{...g,...S(n)},text:[`${t.out} (${t.piece} · ${t.format} · ${String(t.parts.length)} ${t.parts.length===1?c.noun:c.plural})`,...v(n)].join(`
8
+ `)}}const f=!h&&e.overlay,{result:o,...p}=await y(e,i,"render",async t=>{const n=await Z(t,{cwd:a,root:d,at:f?t.timeline.parts.map(L=>String(L.still)):e.at,part:e.part,from:e.from,to:e.to,clip:e.clip,out:e.out,overlay:e.overlay,beside:e.beside}),c="tiles"in n?n.tiles[0]:void 0,g=n.mode==="frame"?n.t:n.stretch?.from??c?.t,b=n.mode==="frame"?n.part:c?.part;return g!==void 0&&!f&&await E(d,{doing:"looking",item:t.piece.place,place:{t:g,...b===void 0?{}:{part:b}}}),n}),u=[];if(o.mode==="frame"&&u.push(`${o.out} (${o.piece} · ${o.format} · ${o.part} · ${o.t.toFixed(2)} s)`),o.mode==="grid"){u.push(`${o.out} (${o.piece} · ${String(o.tiles.length)} moments in ${String(o.cols)} columns)`,` ${o.tiles.map(n=>`${n.t.toFixed(o.stretch?3:2)} ${n.part}`).join(" · ")}`);const t=[...new Set(o.tiles.flatMap(n=>n.overlay?.missing??[]))];t.length>0&&u.push(` Not measured: ${t.join(", ")}.`)}return o.stretch&&u.push(` Stretch ${o.stretch.from.toFixed(3)}–${o.stretch.to.toFixed(3)} s, one frame in ${String(o.stretch.every)}: ${String(o.stretch.frames)} frames.`),"clip"in o&&o.clip&&u.push(`${o.clip.out} (${o.clip.type}, ${String(o.clip.frames)} frames at ${String(o.clip.fps)} fps, no sound)`),{value:{...o,...S(p)},text:[...u,...v(p)].join(`
9
+ `)}}),framesCuts=w({name:"frames cuts",summary:"A review sheet per cut of a video (a cut take's jumps, part joins, a scenery camera's cuts): frames around it, waveform and level, the words each side, the sound at it",input:r.strictObject({...k,part:r.string().optional().describe("Only this part's cuts and its joins"),out:r.string().optional().describe("The folder the sheets go in; default .allyhub/work/cuts/"),params:D({span:r.number().positive().max(10).default(J.span).describe("Seconds shown on each side of a cut")})}),positional:["item"],output:r.looseObject({out:r.string(),cuts:r.array(r.looseObject({sheet:r.string()}))}),examples:["allyhub frames cuts launch/film","allyhub frames cuts launch/film --part hook"]},async(e,i)=>{const a=i.cwd,d=await $(a,e.dir),{result:l,...s}=await y(e,i,"render",o=>K(o,{cwd:a,root:d,part:e.part,out:e.out,review:{span:e.params.span}})),h=l.part===void 0?`${String(l.cuts.length)} cut${l.cuts.length===1?"":"s"}`:`${String(l.cuts.length)} of ${String(l.total)} cuts (part ${l.part} and its joins)`,f=[`${l.piece} · ${l.format} · ${h}; silence is sound under ${String(l.threshold)} dBFS`];for(const o of l.cuts){const p=o.sound?`level ${x(o.sound.levelDb)} / around ${x(o.sound.aroundDb)} dBFS, peak ${x(o.sound.peakDb)}, step ${o.sound.jumpDb<0?"−":"+"}${Math.abs(o.sound.jumpDb).toFixed(1)} dB`:"no sound";f.push(`${String(o.index).padStart(3)} ${o.t.toFixed(3).padStart(7)} s ${o.kind.padEnd(6)} ${V(o)}`,` silence at the cut: ${q(o.silence)} · ${p}`,` “${o.said.before}” | “${o.said.after}”${o.across?` · across the cut: “${o.across}”`:""}`,` ${o.sheet}`)}return{value:{...l,...S(s)},text:[...f,...v(s)].join(`
10
+ `)}});const R=U;export const framesCompare=w({name:"frames compare",summary:"How a candidate picture differs from a reference, as numbers (ΔE, channels, SSIM, levels, grain, edges, regions) with a heatmap and a side-by-side: a piece's moment, a picture file or a video file's frame",input:r.strictObject({reference:r.string().describe("The reference picture (PNG, WebP, JPEG…)"),candidate:r.string().optional().describe("A piece (its id, its file without its extension, or its file; default the project's only one) at --at or --part's still; or a file by its extension: a picture (.png, .jpg, .webp…), or a video file's frame at --at (.mp4, .mov, .webm…)"),combo:k.combo,dir:C,at:r.string().optional().describe("The moment: seconds (from the start of --part when given) or an anchor of the piece; a video file's are seconds (default 0)"),part:r.string().optional().describe("The piece's part --at counts from; alone, its still"),refCrop:r.string().optional().describe("Cut the reference to x,y,width,height, or to an element of the elements.json beside it (frames web writes one)"),crop:r.string().optional().describe("Cut the candidate to x,y,width,height before any resize"),encode:r.string().optional().describe("Draw the candidate through this encode first, as a platform serves it: codec:kbps, h264 or hevc (hevc:618)"),out:r.string().optional().describe("Where its files go, a path without extension; default under .allyhub/work/compare/"),params:D({resize:r.enum(["stretch","width","none"]).default(R.resize).describe("When sizes differ: stretch the candidate to the reference, scale it to its width, or compare the common area"),shift:r.number().int().min(0).max(32).default(R.shift).describe("Search the best offset within this many pixels each way")})}),positional:["reference","candidate"],output:r.looseObject({reference:r.string(),files:r.looseObject({side:r.string(),heatmap:r.string()})}),examples:["allyhub frames compare reference.png launch/film --at 2.5 --encode hevc:618","allyhub frames compare reference.png shot.webp --ref-crop cta","allyhub frames compare reference.png theirs.mp4 --at 3"]},async(e,i)=>{const a=i.cwd,d=e.params;if(!A(e.reference))throw m("bad-reference",`${e.reference} is not a picture: the reference comes first, a picture file (PNG, WebP, JPEG…), then the piece or file to compare with it.`,`For example: allyhub frames compare ${e.candidate!==void 0&&A(e.candidate)?e.candidate:"reference.png"} ${e.reference}`);const l=e.candidate!==void 0&&(A(e.candidate)||M(e.candidate))?e.candidate:void 0,s=p=>({cwd:a,root:p,reference:e.reference,file:l,at:e.at===void 0?void 0:[e.at],part:e.part,refCrop:e.refCrop,crop:e.crop,encode:e.encode,out:e.out,options:{shift:d.shift,resize:d.resize}});if(l!==void 0){if(e.combo!==void 0||e.part!==void 0)throw m("bad-option","--combo and --part are a piece's: the candidate is a file.");const p=await z(s(await F(a,e.dir)),void 0).catch(u=>{throw P(u)});return{value:p,text:W(p)}}const h=await $(a,e.dir),{result:f,...o}=await y({...e,item:e.candidate},i,"render",p=>z(s(h),p));return{value:{...f,...S(o)},text:[W(f),...v(o)].join(`
11
+ `)}}),framesWeb=w({name:"frames web",summary:"A web page's screenshot with its named elements' boxes in the image's pixels, for a screen demo",input:r.strictObject({url:r.string().describe("The page: an address, or an HTML file on this computer"),el:r.array(r.string()).optional().describe("An element to locate, name=selector (CSS, or text=<words>); [data-el] elements are found too"),click:r.array(r.string()).optional().describe("Selectors clicked in order before the shot (close a banner, open a dialog)"),full:r.boolean().default(!1).describe("The whole page, not one viewport"),out:r.string().optional().describe("Where the picture goes (a WebP), its boxes in <out>.elements.json beside it; default under .allyhub/work/pages/"),dir:C,size:r.string().default(`${String(j.width)}x${String(j.height)}`).describe("The viewport, WIDTHxHEIGHT in CSS pixels"),scale:r.number().min(1).max(4).default(j.scale).describe("Image pixels per CSS pixel; 2 draws a high-density screen, sharp when a camera goes in"),wait:r.number().int().min(0).optional().describe("Milliseconds to wait after loading and clicking")}),positional:["url"],output:r.looseObject({out:r.string(),elementsFile:r.string()}),examples:["allyhub frames web https://example.com --el cta=text=Sign\\ up --scale 2 --out assets/media/home","allyhub frames web page.html --click '#accept' --full"]},async(e,i)=>{const a=i.cwd,[d,l]=B(e.size),s=await Y({cwd:a,root:await F(a,e.dir),url:e.url,out:e.out,el:e.el,click:e.click,width:d,height:l,scale:e.scale,full:e.full,wait:e.wait});return{value:s,text:[`${s.out}: ${String(s.width)}×${String(s.height)}${s.scale===1?"":` (${String(s.scale)} image pixels per CSS pixel)`}, ${String(Object.keys(s.elements).length)} elements (${Object.keys(s.elements).join(", ")||"none"}) in ${s.elementsFile}`,...s.missing.length>0?[`Not found: ${s.missing.join(", ")} (the selector is wrong, or something must be opened with --click first).`]:[]].join(`
12
+ `),exit:s.missing.length>0?O.failed:O.ok}}),FRAMES_COMMANDS=[frames,framesCuts,framesCompare,framesWeb];
@@ -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 g,resolve as w}from"node:path";import{z as a}from"zod";import{formatConsole as x,formatProblem as v}from"../text/index.js";import{exportProject as $}from"@allyhub/export";import{SHARE_ENCODE as m}from"@allyhub/render";import{consoleJson as c}from"@allyhub/project";import{OUT_DIR as k}from"@allyhub/formats";import{EXIT as h}from"@allyhub/protocol";import{defineCommand as P}from"../command.js";import{parameters as j}from"../parameters.js";import{projectRoot as A}from"../project.js";import{combosOf as O,commandError as S}from"../version.js";import{dir as D,indexing as M}from"../fields.js";import{extensionsAt as f,kindsAt as N}from"./extensions.js";const F={codec:a.enum(["h264","h265"]).default("h264").describe("The mp4's video codec; h265 is smaller"),crf:a.number().int().min(0).max(63).optional().describe(`Quality, lower is better: default ${String(m.crf)} for an mp4, ready to share, 30 for a webm`),maxBitrate:a.number().int().min(0).max(5e5).optional().describe(`An mp4's most video bitrate, kbit/s, 0 for none: default ${String(m.maxKbps)} at 1080p ${String(m.fps)} fps, scaled by the frame's pixels and the frames a second (16000 at 1080p 60, 32000 at 4K 30), so the file is ready to share`),audioBitrate:a.number().int().min(32).max(512).optional().describe("The sound's bitrate, kbit/s: default 192 (AAC in an mp4), 160 (Opus in a webm); a mov keeps PCM"),steps:a.boolean().default(!1).describe("A deck's pdf, png and pptx: a page, a file or a slide per step of each page, not only its last"),values:a.enum(["data","shown"]).optional().describe("A sheet's csv, json and md: each value as data (a date 2026-01-15, a time 09:30, a duration 36:00, a number to 15 digits; csv's and json's default) or as its format shows it (15 Jan 2026, $1,200.00; md's default)"),bom:a.boolean().default(!0).describe("A sheet's csv starts with a UTF-8 byte-order mark, by which Excel reads its letters right (é, €, 中文); false for a tool that does not expect one"),quality:a.number().int().min(0).max(100).optional().describe("An image's jpeg, webp and avif, 0–100: default 90 for a jpeg, 60 for an avif, a webp lossless"),scale:a.number().min(.25).max(4).optional().describe("An image's png, jpeg, webp, avif and zip: each board's picture this many times its size, its layout kept (type and shapes drawn sharp, a picture as many pixels as its file has); default 1"),width:a.number().int().min(1).optional().describe("An image's pictures each this many pixels wide, the height in proportion: a scale for each board"),height:a.number().int().min(1).optional().describe("An image's pictures each this many pixels high, the width in proportion: a scale for each board"),maxKb:a.number().min(1).optional().describe("An image's jpeg, webp and avif: each board's file at most this many KB, at the best quality under it (said); a png over it is not made"),psd:a.enum(["psd","psb"]).default("psd").describe("An image's psd: psd, or psb (Photoshop's large document format); a board is at most 16384 pixels a side, which a psd holds"),pptx:a.enum(["native","picture"]).default("native").describe("A deck's pptx: native, PowerPoint's own model, editable there (the deck's masters, layouts, placeholders, shapes, text, pictures, videos and notes, a component as its picture); or picture, each slide a picture of the page")},T=(s,o)=>`${String(s)} ${o}${s===1?"":"s"}`,z={approximate:"Drawn its own way by the file's application",pixels:"As pixels in the file",omitted:"Not in the file"};function C(s){const o=new Map;for(const i of s)for(const n of i.fidelity??[]){const d=`${n.how}|${n.what}`,l=o.get(d)??{how:n.how,what:n.what,layers:[]};n.layer!==void 0&&!l.layers.includes(n.layer)&&l.layers.push(n.layer),o.set(d,l)}return[...o.values()].map(i=>{const n=i.layers.length===0?"":` (${i.layers.slice(0,4).join(", ")}${i.layers.length>4?` and ${String(i.layers.length-4)} more`:""})`;return`${z[i.how]}: ${i.what}${n}`})}export const render=P({name:"render",summary:"The files: a video, its frames, subtitles, cover and mastered mix; a batch's table of ads; a deck's PDF, PPTX and PNGs; a doc's PDF and Markdown; a sheet's Excel workbook with live formulas, PDF, PNG, CSV, Markdown and JSON; an image's pictures, PDF and layered PSDs; a 3D model's GLB",input:a.strictObject({items:a.array(a.string()).optional().describe("Only these items: each an id (its file without its extension) or its file, or a folder of items; default every one"),combo:a.array(a.string()).optional().describe("Only the combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),type:a.array(a.string()).optional().describe("File types: mp4, mov, webm, gif, png, srt, vtt (cues cut as the piece's captions layer cuts them, else by default), cover, wav (the mix, mastered as the render masters it: 48 kHz, 16 bits, the film's length), pdf, pptx; csv for a piece with slots, its table of ads (<piece>.ads.csv: a row per ad with its combo, picks, length, file, name and generated media); a doc's pdf, docx, png, md; a sheet's xlsx (every sheet, formulas live with their values cached), pdf, png, csv, md, json; an image's png, jpeg, webp, avif (a file a board), pdf, zip and psd (a layered Photoshop file a board: each layer of its kind, its pixels drawn by Chrome); a 3D model's glb. Default mp4 for a video, pdf for a deck and a doc, xlsx for a sheet, png for an image, glb for a model; a type an item does not have is skipped"),out:a.string().optional().describe("The folder the files go in; default .allyhub/out"),name:a.string().optional().describe("Name a video's or deck's files <name>.<ext> in its folder of the output, with what tells its versions apart before the extension when there are several (<name>.zh-cn.mp4, <name>.c03.mp4); default <output>.<combo>.<ext>"),params:j(F),dir:D}),positional:["items"],output:a.looseObject({out:a.string(),files:a.array(a.looseObject({name:a.string(),path:a.string(),type:a.string()})),failed:a.array(a.looseObject({name:a.string(),code:a.string()}))}),examples:["allyhub render","allyhub render launch/film --type mp4,srt","allyhub render launch/film --type wav","allyhub render ads/tidyform --type csv","allyhub render launch/plan --type pdf,md","allyhub render finance/budget --type xlsx,pdf","allyhub render finance/budget --type csv --param bom=false","allyhub render launch/deck --type pptx --param pptx=picture","allyhub render launch/poster --type psd","allyhub render launch/poster --type jpeg --param scale=2 --param max-kb=2000","allyhub render --combo lang=zh-cn --param crf=16","allyhub render launch/film --name launch-film --param max-bitrate=0"]},async(s,o)=>{const i=await A(o.cwd,s.dir),n=w(o.cwd,s.out??g(i,k)),d=Object.fromEntries(Object.entries(s.params).filter(([,e])=>e!==void 0));let l=0,t;try{t=await $({root:i,kinds:N(i),out:n,...s.items===void 0?{}:{items:s.items},combos:O(s),...s.type===void 0?{}:{types:s.type},...s.name===void 0?{}:{name:s.name},params:d,index:M(o.env),analyses:f(i).mediaAnalyses(),env:o.env,processors:f(i).exportProcessors(),log:e=>{o.progress(e)},onProgress:e=>{const r=Math.floor(e*10);r<=l||r>=10||(l=r,o.progress(`${String(r*10)}%`))},signal:o.signal})}catch(e){throw S(e)}const u=e=>e?` (${e.integrated.toFixed(1)} LUFS, true peak ${e.truePeak===void 0?"–":e.truePeak.toFixed(1)} dBTP)`:"",b=t.problems.filter(e=>e.level==="error"),p=t.files.flatMap(e=>e.files.length>1?e.files.map(r=>` ${r}`):[` ${e.path}${u(e.loudness)}`]),y=[`${T(p.length,"file")} in ${t.out}:`,...p,...t.failed.length>0?["Not made:",...t.failed.map(e=>` ${e.name}: ${e.message}${e.hint?` ${e.hint}`:""}`)]:[],...t.unindexed.map(e=>`Not indexed, drawn the fallback way: ${e.file} (${e.error})`),...t.files.flatMap(e=>(e.missing??[]).map(r=>`Not measured: ${r}`)),...t.files.flatMap(e=>(e.chosen??[]).map(r=>`Chosen: ${r}`)),...C(t.files),...new Set(t.files.flatMap(e=>(e.fontsLeft??[]).map(r=>`Not in the file: ${r.font} (${r.why}); PowerPoint shows another font where it is not installed.`))),...b.map(v),...x(c(t.console))];return{value:{out:t.out,files:t.files.map(e=>({...e})),failed:t.failed.map(e=>({...e})),problems:t.problems,...t.unindexed.length>0?{unindexed:t.unindexed}:{},...c(t.console)},text:y.join(`
3
- `),exit:t.failed.length>0?h.failed:h.ok}});
2
+ import{join as x,resolve as w}from"node:path";import{z as e}from"zod";import{formatConsole as v,formatProblem as k}from"../text/index.js";import{exportProject as P}from"@allyhub/export";import{GIF_ENCODE as m,SHARE_ENCODE as n}from"@allyhub/render";import{consoleJson as p}from"@allyhub/project";import{OUT_DIR as $}from"@allyhub/formats";import{EXIT as c}from"@allyhub/protocol";import{madeNotes as A}from"@allyhub/build";import{defineCommand as j}from"../command.js";import{parameters as O}from"../parameters.js";import{projectRoot as S}from"../project.js";import{combosOf as D,commandError as F}from"../version.js";import{dir as E,indexing as N}from"../fields.js";import{extensionsAt as h,kindsAt as T}from"./extensions.js";const z={codec:e.enum(["h264","h265"]).default("h264").describe("The mp4's video codec; h265 is smaller"),crf:e.number().int().min(0).max(63).optional().describe(`Quality, lower is better: default ${String(n.crf)} for an mp4, ready to share, 30 for a webm`),maxBitrate:e.number().int().min(0).max(5e5).optional().describe(`An mp4's most video bitrate, kbit/s, 0 for none: default ${String(n.maxKbps)} at 1080p ${String(n.fps)} fps, scaled by the frame's pixels and the frames a second (16000 at 1080p 60, 32000 at 4K 30), so the file is ready to share`),audioBitrate:e.number().int().min(32).max(512).optional().describe("The sound's bitrate, kbit/s: default 192 (AAC in an mp4), 160 (Opus in a webm); a mov keeps PCM"),gifWidth:e.number().int().min(0).max(16384).optional().describe(`A gif's width in pixels, its height in proportion, never more than the video's: default ${String(m.width)}; 0 for the video's own`),gifFps:e.number().min(0).max(120).optional().describe(`A gif's frames a second, never more than the video's: default ${String(m.fps)}; 0 for the video's own`),steps:e.boolean().default(!1).describe("A deck's pdf, png and pptx: a page, a file or a slide per step of each page, not only its last"),values:e.enum(["data","shown"]).optional().describe("A sheet's csv, json and md: each value as data (a date 2026-01-15, a time 09:30, a duration 36:00, a number to 15 digits; csv's and json's default) or as its format shows it (15 Jan 2026, $1,200.00; md's default)"),bom:e.boolean().default(!0).describe("A sheet's csv starts with a UTF-8 byte-order mark, by which Excel reads its letters right (é, €, 中文); false for a tool that does not expect one"),quality:e.number().int().min(0).max(100).optional().describe("An image's jpeg and webp, 0–100: default 90 for a jpeg, a webp lossless"),scale:e.number().min(.25).max(4).optional().describe("An image's png, jpeg, webp and zip: each board's picture this many times its size, its layout kept (type and shapes drawn sharp, a picture as many pixels as its file has); default 1"),width:e.number().int().min(1).optional().describe("An image's pictures each this many pixels wide, the height in proportion: a scale for each board"),height:e.number().int().min(1).optional().describe("An image's pictures each this many pixels high, the width in proportion: a scale for each board"),maxKb:e.number().min(1).optional().describe("An image's jpeg and webp: each board's file at most this many KB, at the best quality under it (said); a png over it is not made"),psd:e.enum(["psd","psb"]).default("psd").describe("An image's psd: psd, or psb (Photoshop's large document format); a board is at most 16384 pixels a side, which a psd holds"),pptx:e.enum(["native","picture"]).default("native").describe("A deck's pptx: native, PowerPoint's own model, editable there (the deck's masters, layouts, placeholders, shapes, text, pictures, videos and notes, a component as its picture); or picture, each slide a picture of the page")},C=(s,i)=>`${String(s)} ${i}${s===1?"":"s"}`;export const render=j({name:"render",summary:"The files: a video, its frames, subtitles, cover and mastered mix; a batch's table of ads; a deck's PDF, PPTX and PNGs; a doc's PDF and Markdown; a sheet's Excel workbook with live formulas, PDF, PNG, CSV, Markdown and JSON; an image's pictures, PDF and layered PSDs; a 3D model's GLB",input:e.strictObject({items:e.array(e.string()).optional().describe("Only these items: each an id (its file without its extension) or its file, or a folder of items; default every one"),combo:e.array(e.string()).optional().describe("Only the combos matching name=value pairs joined with commas (lang=zh-cn,hook=b), or a combo's id (c03)"),type:e.array(e.string()).optional().describe("File types: mp4, mov, webm, gif, png, srt, vtt (cues cut as the piece's captions layer cuts them, else by default), cover, wav (the mix, mastered as the render masters it: 48 kHz, 16 bits, the film's length); csv for a piece with slots, its table of ads (<piece>.ads.csv: a row per ad with its combo, picks, length, file, name and generated media); a doc's pdf, docx, png; a sheet's xlsx (every sheet, formulas live with their values cached), pdf, png, csv (a file a sheet); an image's png, jpeg, webp (a file a board), pdf, zip and psd (a layered Photoshop file a board: each layer of its kind, its pixels drawn by Chrome); a deck's pdf, png, pptx; a report's html (one file that runs offline), pdf, png; a LinkedIn or X post's linkedin-post or x-post (its API request, its media beside), txt (its text as written, its media and their alt text beside), png; an article's linkedin-article or x-article, png; a 3D model's glb. Default mp4 for a video, pdf for a deck and a doc, html for a report, xlsx for a sheet, png for an image, glb for a model; a type an item does not have is skipped"),out:e.string().optional().describe("The folder the files go in; default .allyhub/out"),name:e.string().optional().describe("Name a video's or deck's files <name>.<ext> in its folder of the output, with what tells its versions apart before the extension when there are several (<name>.zh-cn.mp4, <name>.c03.mp4); default <output>.<combo>.<ext>"),params:O(z),dir:E}),positional:["items"],output:e.looseObject({out:e.string(),files:e.array(e.looseObject({name:e.string(),path:e.string(),type:e.string()})),failed:e.array(e.looseObject({name:e.string(),code:e.string()}))}),examples:["allyhub render","allyhub render launch/film --type mp4,srt","allyhub render launch/film --type wav","allyhub render ads/tidyform --type csv","allyhub render launch/plan --type pdf,md","allyhub render finance/budget --type xlsx,pdf","allyhub render finance/budget --type csv --param bom=false","allyhub render launch/deck --type pptx --param pptx=picture","allyhub render launch/poster --type psd","allyhub render launch/poster --type jpeg --param scale=2 --param max-kb=2000","allyhub render --combo lang=zh-cn --param crf=16","allyhub render launch/film --name launch-film --param max-bitrate=0"]},async(s,i)=>{const o=await S(i.cwd,s.dir),f=w(i.cwd,s.out??x(o,$)),u=Object.fromEntries(Object.entries(s.params).filter(([,a])=>a!==void 0));let d=0,t;try{t=await P({root:o,kinds:T(o),out:f,...s.items===void 0?{}:{items:s.items},combos:D(s),...s.type===void 0?{}:{types:s.type},...s.name===void 0?{}:{name:s.name},params:u,index:N(i.env),analyses:h(o).mediaAnalyses(),env:i.env,processors:h(o).exportProcessors(),log:a=>{i.progress(a)},onProgress:a=>{const r=Math.floor(a*10);r<=d||r>=10||(d=r,i.progress(`${String(r*10)}%`))},signal:i.signal})}catch(a){throw F(a)}const b=a=>a?` (${a.integrated.toFixed(1)} LUFS, true peak ${a.truePeak===void 0?"–":a.truePeak.toFixed(1)} dBTP)`:"",g=t.problems.filter(a=>a.level==="error"),l=t.files.flatMap(a=>a.files.length>1?a.files.map(r=>` ${r}`):[` ${a.path}${b(a.loudness)}`]),y=[`${C(l.length,"file")} in ${t.out}:`,...l,...t.failed.length>0?["Not made:",...t.failed.map(a=>` ${a.name}: ${a.message}${a.hint?` ${a.hint}`:""}`)]:[],...t.unindexed.map(a=>`Not indexed, drawn the fallback way: ${a.file} (${a.error})`),...A(t.files),...g.map(k),...v(p(t.console))];return{value:{out:t.out,files:t.files.map(a=>({...a})),failed:t.failed.map(a=>({...a})),problems:t.problems,...t.unindexed.length>0?{unindexed:t.unindexed}:{},...p(t.console)},text:y.join(`
3
+ `),exit:t.failed.length>0?c.failed:c.ok}});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{join as i}from"node:path";import{BAKE_DIR as c}from"@allyhub/formats";import{SCENERY_STAGE as w,sceneryHref as a}from"@allyhub/scenery-host/bundle";import{bakesOnDisk as m}from"@allyhub/scenery-host/stage";import{BAKES_FOLDER as h,SCENERY_FOLDER as f,sourceName as E}from"./tree.js";const b=/^[0-9a-f]+\.[a-z0-9-]+\.bin$/u,u=e=>i(e.dir,w);function d(e,o){const n=e.kept("sceneries",()=>new Map),t=n.get(o);if(t?.revision===e.revision)return t.promise;const r=(async()=>{const{bundle:s,media:l}=await e.view(o,e.dir);return{module:a(s.module),decoders:a(s.decoders),manifoldWasm:a(s.manifoldWasm),output:s.output.map(a),media:l}})();return n.set(o,{revision:e.revision,promise:r}),r.catch(()=>{n.get(o)?.promise===r&&n.delete(o)}),r}async function p(e,o){const n=await d(e,o),t=r=>`${f}${r}`;return{module:t(n.module),decoders:t(n.decoders),manifoldWasm:t(n.manifoldWasm),bakes:[...await m(e.root)]}}const y=e=>new TextEncoder().encode(JSON.stringify(e)),v={[f]:{async serve(e,o){const n=E(e.path);if(n===void 0)return e.file(u(o),e.path);if(o.inProject(n)===void 0)return new Response("No such scenery.",{status:404,headers:{"content-type":"text/plain; charset=UTF-8"}});const t=await d(o,n);return o.allowMedia(t.media),Response.json(await p(o,n),{headers:{"cache-control":"no-store"}})},async recordItem(e,o,n){const t=await d(n,e).catch(()=>{});if(!t)return;const r=u(n);for(const s of t.output)o.file(s,i(r,s));await o.folder(t.decoders,i(r,t.decoders)),o.file(t.manifoldWasm,i(r,t.manifoldWasm)),o.bytes(`sources/${encodeURIComponent(e)}.json`,y(await p(n,e)));for(const s of t.media)o.media(s)}},[h]:{serve(e,o){return b.test(e.path)?e.file(i(o.root,c),e.path):Promise.resolve(void 0)},async record(e,o){for(const n of await m(o.root))e.file(`${n}.bin`,i(o.root,c,`${n}.bin`))}}};export default v;
2
+ import{join as i}from"node:path";import{BAKE_DIR as c}from"@allyhub/formats";import{SCENERY_STAGE as w,sceneryHref as a}from"@allyhub/scenery-host/bundle";import{bakesOnDisk as m}from"@allyhub/scenery-host/stage";import{BAKES_FOLDER as h,SCENERY_FOLDER as u,sourceName as E}from"./tree.js";const b=/^[0-9a-f]+\.[a-z0-9-]+\.bin$/u,f=e=>i(e.dir,w);function d(e,o){const n=e.kept("sceneries",()=>new Map),t=n.get(o);if(t?.revision===e.revision)return t.promise;const r=(async()=>{const{bundle:s,media:l}=await e.view(o,e.dir);return e.recordInputs(o,"viewer",[o,...s.files]),{module:a(s.module),decoders:a(s.decoders),manifoldWasm:a(s.manifoldWasm),output:s.output.map(a),media:l}})();return n.set(o,{revision:e.revision,promise:r}),r.catch(()=>{n.get(o)?.promise===r&&n.delete(o)}),r}async function p(e,o){const n=await d(e,o),t=r=>`${u}${r}`;return{module:t(n.module),decoders:t(n.decoders),manifoldWasm:t(n.manifoldWasm),bakes:[...await m(e.root)]}}const v=e=>new TextEncoder().encode(JSON.stringify(e)),y={[u]:{async serve(e,o){const n=E(e.path);if(n===void 0)return e.file(f(o),e.path);if(o.inProject(n)===void 0)return new Response("No such scenery.",{status:404,headers:{"content-type":"text/plain; charset=UTF-8"}});const t=await d(o,n);return o.allowMedia(t.media),Response.json(await p(o,n),{headers:{"cache-control":"no-store"}})},async recordItem(e,o,n){const t=await d(n,e).catch(()=>{});if(!t)return;const r=f(n);for(const s of t.output)o.file(s,i(r,s));await o.folder(t.decoders,i(r,t.decoders)),o.file(t.manifoldWasm,i(r,t.manifoldWasm)),o.bytes(`sources/${encodeURIComponent(e)}.json`,v(await p(n,e)));for(const s of t.media)o.media(s)}},[h]:{serve(e,o){return b.test(e.path)?e.file(i(o.root,c),e.path):Promise.resolve(void 0)},async record(e,o){for(const n of await m(o.root))e.file(`${n}.bin`,i(o.root,c,`${n}.bin`))}}};export default y;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/3d-extension",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./tools": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/audio",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -0,0 +1,29 @@
1
+ /**
2
+ * An emoji as Unicode writes one: a flag (two regional letters), a keycap,
3
+ * or a pictograph shown as an emoji (by default or with VS16), with a skin
4
+ * tone, joined to others by ZWJ. A pattern's source, for `u` and `g`.
5
+ */
6
+ export declare const EMOJI_PATTERN = "\\p{RI}\\p{RI}|[#*0-9]\\uFE0F?\\u20E3|(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F)\\p{EMod}?(?:\\u200D(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F?)\\p{EMod}?)*";
7
+ /** How an emoji picture sits on its line: an em square, as Twemoji sets one. */
8
+ export declare const EMOJI_PICTURE_STYLE = "display:inline;width:1em;height:1em;margin:0 0.05em;vertical-align:-0.12em";
9
+ export interface EmojiPicturesOptions {
10
+ /** A selector of the part of the page whose emoji are drawn; default the body. */
11
+ scope?: string;
12
+ /**
13
+ * The face to draw them in (`"Noto Color Emoji"`), loaded first: a page
14
+ * without it keeps its emoji as text. Default the face each emoji's own
15
+ * text is set in, as the page draws it.
16
+ */
17
+ face?: string;
18
+ /** The pictures' pixels a side. */
19
+ size?: number;
20
+ }
21
+ /** The pictures' pixels a side, by default: sharp at a large heading's size. */
22
+ export declare const EMOJI_PICTURE_SIZE = 128;
23
+ /**
24
+ * An expression that, evaluated in a page, draws its emoji as pictures and
25
+ * resolves when the pictures are decoded (`page.evaluate`, or a page's own
26
+ * `<script>`).
27
+ */
28
+ export declare function emojiPicturesScript(o?: EmojiPicturesOptions): string;
29
+ //# sourceMappingURL=emoji.d.ts.map
@@ -0,0 +1,57 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export const EMOJI_PATTERN="\\p{RI}\\p{RI}|[#*0-9]\\uFE0F?\\u20E3|(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F)\\p{EMod}?(?:\\u200D(?:\\p{Emoji_Presentation}|\\p{Extended_Pictographic}\\uFE0F?)\\p{EMod}?)*",EMOJI_PICTURE_STYLE="display:inline;width:1em;height:1em;margin:0 0.05em;vertical-align:-0.12em",EMOJI_PICTURE_SIZE=128;export function emojiPicturesScript(e={}){const t=JSON.stringify(e.scope??"body"),n=e.face===void 0?"undefined":JSON.stringify(e.face),a=String(e.size??128);return`(async () => {
3
+ const pattern = new RegExp(${JSON.stringify(EMOJI_PATTERN)}, "gu");
4
+ const root = document.querySelector(${t});
5
+ if (!root) return;
6
+ const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
7
+ const nodes = [];
8
+ for (let n = walker.nextNode(); n; n = walker.nextNode()) {
9
+ pattern.lastIndex = 0;
10
+ const p = n.parentElement;
11
+ if (p && !p.closest("script, style, textarea, title") && pattern.test(n.data)) nodes.push(n);
12
+ }
13
+ pattern.lastIndex = 0;
14
+ if (nodes.length === 0) return;
15
+ const face = ${n};
16
+ if (face !== undefined) {
17
+ const all = nodes.map((n) => n.data.match(pattern).join("")).join("");
18
+ const faces = await document.fonts.load("64px " + JSON.stringify(face), all).catch(() => []);
19
+ if (faces.length === 0) return;
20
+ }
21
+ await document.fonts.ready;
22
+ const size = ${a};
23
+ const canvas = document.createElement("canvas");
24
+ canvas.width = canvas.height = size;
25
+ const ctx = canvas.getContext("2d");
26
+ ctx.textAlign = "center";
27
+ ctx.textBaseline = "middle";
28
+ const drawn = new Map();
29
+ const picture = (e, family) => {
30
+ const key = family + "\\u0000" + e;
31
+ if (!drawn.has(key)) {
32
+ ctx.clearRect(0, 0, size, size);
33
+ ctx.font = (size * 0.86) + "px " + family;
34
+ ctx.fillText(e, size / 2, size / 2);
35
+ drawn.set(key, canvas.toDataURL("image/png"));
36
+ }
37
+ const img = document.createElement("img");
38
+ img.className = "emoji";
39
+ img.alt = e;
40
+ img.setAttribute("style", ${JSON.stringify(EMOJI_PICTURE_STYLE)});
41
+ img.src = drawn.get(key);
42
+ return img;
43
+ };
44
+ for (const n of nodes) {
45
+ const family = face !== undefined ? JSON.stringify(face) : getComputedStyle(n.parentElement).fontFamily;
46
+ const parts = [];
47
+ let at = 0;
48
+ for (const m of n.data.matchAll(pattern)) {
49
+ if (m.index > at) parts.push(document.createTextNode(n.data.slice(at, m.index)));
50
+ parts.push(picture(m[0], family));
51
+ at = m.index + m[0].length;
52
+ }
53
+ if (at < n.data.length) parts.push(document.createTextNode(n.data.slice(at)));
54
+ n.replaceWith(...parts);
55
+ }
56
+ await Promise.all([...root.querySelectorAll("img.emoji")].map((i) => i.decode().catch(() => undefined)));
57
+ })()`}
@@ -0,0 +1,18 @@
1
+ import type { Page } from "./page.js";
2
+ /** The page's whole height now, CSS pixels. */
3
+ export declare const pageHeight: (page: Page) => Promise<number>;
4
+ /**
5
+ * The whole page as one PNG, from its top, at the page's width and device
6
+ * scale; `clip` a part of it, CSS pixels. Its size in pixels beside it.
7
+ */
8
+ export declare function pagePicture(page: Page, clip?: {
9
+ x: number;
10
+ y: number;
11
+ width: number;
12
+ height: number;
13
+ }): Promise<{
14
+ png: Buffer;
15
+ width: number;
16
+ height: number;
17
+ }>;
18
+ //# sourceMappingURL=picture.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{blankImage as m,pasteImage as u,readPng as g,writePng as f}from"@allyhub/measure";const w=16e3;export const pageHeight=t=>t.evaluate("Math.max(document.documentElement.scrollHeight, document.body ? document.body.scrollHeight : 0)").then(a=>Math.max(1,Math.ceil(a)));export async function pagePicture(t,a){const e=a??{x:0,y:0,width:t.width,height:await pageHeight(t)},r=Math.max(1,Math.floor(w/Math.max(1,t.scale))),n=[];for(let o=0;o<e.height;o+=r){const h=await t.session.send("Page.captureScreenshot",{format:"png",clip:{x:e.x,y:e.y+o,width:e.width,height:Math.min(r,e.height-o),scale:1},captureBeyondViewport:!0,fromSurface:!0});n.push(Buffer.from(h.data,"base64"))}const c=Math.round(e.width*t.scale),i=Math.round(e.height*t.scale),s=n[0];if(n.length===1&&s)return{png:s,width:c,height:i};const d=m(c,i,[255,255,255,255]);let l=0;for(const o of n){const h=g(o);u(d,h,0,l),l+=h.height}return{png:f(d),width:c,height:i}}
@@ -1,11 +1,19 @@
1
1
  {
2
2
  "name": "@allyhub/browser",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
8
8
  "default": "./dist/index.js"
9
+ },
10
+ "./emoji": {
11
+ "types": "./dist/emoji.d.ts",
12
+ "default": "./dist/emoji.js"
13
+ },
14
+ "./picture": {
15
+ "types": "./dist/picture.d.ts",
16
+ "default": "./dist/picture.js"
9
17
  }
10
18
  },
11
19
  "private": true,
@@ -7,6 +7,7 @@ export { mergeScript, pieceLocales, readScripts, readMessages, type ProjectMessa
7
7
  export { MAX_DATA_BYTES, isDataFile, parseCsv, parseData, readData, } from "./data.js";
8
8
  export type { DocComponent, DocInfo, SheetInfo } from "./content.js";
9
9
  export { itemKindBuild, kindBuildOf, type ComponentAsk, type ComponentMeasures, type ComponentDraw, type ExportParams, type Found, type LayerMeasures, type PieceCheck, type PieceChecked, type VersionAt, type VersionPasses, type VersionsChecked, type ExportSession, type ItemExport, type ItemFailure, type ItemMade, type ItemNotMade, type ItemRead, type ItemWork, type KindBuild, type KindBuildContext, type MadeFacts, type StageEntry, type StageVersion, type UseAsk, type ComboWhole, type ConfigPart, type ConfigRead, type PartDraws, type PartStillAsk, type VersionResult, } from "./kind-build.js";
10
+ export { madeNotes } from "./made-notes.js";
10
11
  export { FACTS_HEAD, MOMENTS, PROJECT_DIR, STRETCH, VERSION_FIELDS, allFindings, defineView, type InspectView, type InspectViews, type PageReport, type VersionInput, type ViewContext, type ViewResult, } from "./inspect-view.js";
11
12
  export { fileCheckOf, fileProblems, listedFileProblems, type FileCheck, type FileCheckContext, } from "./file-check.js";
12
13
  export { FRESH, defineCliCommand, existingFile, fromMedia, media, parameters, progressLines, sizeOf, type CliCommand, type CliCommands, type CommandContext, type CommandResult, type ProjectSession, } from "./cli-command.js";
@@ -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{listWork,projectItems,readWork,unlistedWork}from"./work.js";export{moveEdits,movedPath,referencesOf,referringFiles}from"./move-refs.js";export{bundleForStage,compileErrorOf,createModuleLoader,createStageDevServer,loadUserVite}from"./vite.js";export{nodeStackPlace,placeFinder}from"./places.js";export{mergeScript,pieceLocales,readScripts,readMessages}from"./messages.js";export{MAX_DATA_BYTES,isDataFile,parseCsv,parseData,readData}from"./data.js";export{itemKindBuild,kindBuildOf}from"./kind-build.js";export{FACTS_HEAD,MOMENTS,PROJECT_DIR,STRETCH,VERSION_FIELDS,allFindings,defineView}from"./inspect-view.js";export{fileCheckOf,fileProblems,listedFileProblems}from"./file-check.js";export{FRESH,defineCliCommand,existingFile,fromMedia,media,parameters,progressLines,sizeOf}from"./cli-command.js";export{defineProjectTool}from"./project-tool.js";export{projectAt,projectOfFile,projectRoot}from"./project-root.js";export{buildPluginModules,nodeLending,sdkBindingsOf,sdkEntriesOf,stageAdditions}from"./build-plugins.js";export{deckReferences,referenceModule}from"./references.js";export{messagePrefix,parseComponentRef,readPropsText,resolveDims}from"@allyhub/piece";export{readMedia}from"./media.js";export{modelInfo}from"./model-info.js";export{takeVoice}from"./takes.js";export{resolveMatrix}from"./matrix.js";export{FONTS_MODULE,fontStyles,fontsDigest,fontsModule}from"./fonts.js";export{SDK,checkImports,discover,lineAt,packageName,parse,walk}from"./scan.js";export{allyhubPlugin,boundEntry,mediaHref}from"./plugin.js";export{MetaLoader}from"./meta.js";export{besideModule,fromFolder,plain}from"./evaluate.js";export{MESSAGE_TYPES,messageTypes,writeMessageTypes}from"./types.js";export{BUILD_FOLDER,inTime,issuesText,itemProblem,loadFailure,prepare,sourceOf,stageId,stageItem,stageName}from"./prepare.js";export{codeOf}from"./code.js";export{ProjectError,StuckError}from"./version.js";export{generatedFile,generatedPagedFact,mismatchFacts,secondsOf}from"./generated.js";export{resolveUses,splitReference,usesInOrder}from"./uses.js";
2
+ export{dependenciesOf,listFiles}from"./files.js";export{listWork,projectItems,readWork,unlistedWork}from"./work.js";export{moveEdits,movedPath,referencesOf,referringFiles}from"./move-refs.js";export{bundleForStage,compileErrorOf,createModuleLoader,createStageDevServer,loadUserVite}from"./vite.js";export{nodeStackPlace,placeFinder}from"./places.js";export{mergeScript,pieceLocales,readScripts,readMessages}from"./messages.js";export{MAX_DATA_BYTES,isDataFile,parseCsv,parseData,readData}from"./data.js";export{itemKindBuild,kindBuildOf}from"./kind-build.js";export{madeNotes}from"./made-notes.js";export{FACTS_HEAD,MOMENTS,PROJECT_DIR,STRETCH,VERSION_FIELDS,allFindings,defineView}from"./inspect-view.js";export{fileCheckOf,fileProblems,listedFileProblems}from"./file-check.js";export{FRESH,defineCliCommand,existingFile,fromMedia,media,parameters,progressLines,sizeOf}from"./cli-command.js";export{defineProjectTool}from"./project-tool.js";export{projectAt,projectOfFile,projectRoot}from"./project-root.js";export{buildPluginModules,nodeLending,sdkBindingsOf,sdkEntriesOf,stageAdditions}from"./build-plugins.js";export{deckReferences,referenceModule}from"./references.js";export{messagePrefix,parseComponentRef,readPropsText,resolveDims}from"@allyhub/piece";export{readMedia}from"./media.js";export{modelInfo}from"./model-info.js";export{takeVoice}from"./takes.js";export{resolveMatrix}from"./matrix.js";export{FONTS_MODULE,fontStyles,fontsDigest,fontsModule}from"./fonts.js";export{SDK,checkImports,discover,lineAt,packageName,parse,walk}from"./scan.js";export{allyhubPlugin,boundEntry,mediaHref}from"./plugin.js";export{MetaLoader}from"./meta.js";export{besideModule,fromFolder,plain}from"./evaluate.js";export{MESSAGE_TYPES,messageTypes,writeMessageTypes}from"./types.js";export{BUILD_FOLDER,inTime,issuesText,itemProblem,loadFailure,prepare,sourceOf,stageId,stageItem,stageName}from"./prepare.js";export{codeOf}from"./code.js";export{ProjectError,StuckError}from"./version.js";export{generatedFile,generatedPagedFact,mismatchFacts,secondsOf}from"./generated.js";export{resolveUses,splitReference,usesInOrder}from"./uses.js";
@@ -252,6 +252,13 @@ export interface MadeFacts {
252
252
  readonly what: string;
253
253
  readonly layer?: string;
254
254
  }[];
255
+ /**
256
+ * What else the file holds otherwise than as the item is drawn, a line
257
+ * each, where `fidelity`'s layers do not say it: what the format cannot
258
+ * hold (Excel's), what was cut (a picture's rows past its most), what
259
+ * runs past the paper.
260
+ */
261
+ readonly notes?: readonly string[];
255
262
  }
256
263
  /** A file of a type a kind's module made: every file written (one, or a PNG a page), its own first. */
257
264
  export interface ItemMade extends MadeFacts {
@@ -0,0 +1,9 @@
1
+ import type { MadeFacts } from "./kind-build.js";
2
+ /**
3
+ * The lines of what the files hold otherwise than as drawn, each said
4
+ * once: what could not be measured, what was chosen to make a file as
5
+ * asked, each kind of difference with the layers it is of, a font left
6
+ * out, and a kind's own notes.
7
+ */
8
+ export declare function madeNotes(files: readonly MadeFacts[]): string[];
9
+ //# sourceMappingURL=made-notes.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ const s={approximate:"Drawn its own way by the file's application",pixels:"As pixels in the file",omitted:"Not in the file"};function h(n){if(n.length===0)return"";const o=n.length>4?` and ${String(n.length-4)} more`:"";return` (${n.slice(0,4).join(", ")}${o})`}export function madeNotes(n){const o=new Map;for(const e of n)for(const t of e.fidelity??[]){const i=`${t.how}|${t.what}`,a=o.get(i)??{how:t.how,what:t.what,layers:[]};t.layer!==void 0&&!a.layers.includes(t.layer)&&a.layers.push(t.layer),o.set(i,a)}return[...new Set([...n.flatMap(e=>(e.missing??[]).map(t=>`Not measured: ${t}`)),...n.flatMap(e=>(e.chosen??[]).map(t=>`Chosen: ${t}`)),...[...o.values()].map(e=>`${s[e.how]}: ${e.what}${h(e.layers)}`),...n.flatMap(e=>(e.fontsLeft??[]).map(t=>`Not in the file: ${t.font} (${t.why}); PowerPoint shows another font where it is not installed.`)),...n.flatMap(e=>e.notes??[])])]}
@@ -104,6 +104,23 @@ export interface ProjectToolContext {
104
104
  readonly env: NodeJS.ProcessEnv;
105
105
  /** A port on the loopback a tool's process listens on, made reachable from the person's page until disposed. */
106
106
  forward(port: number): ForwardedPort;
107
+ /**
108
+ * The address of an item's page (`items/page`): `folder` (a project
109
+ * path, default the project's) served as the root of an origin of its
110
+ * own, the project's files alone; `file` (default the item's entry) the
111
+ * page. What it loads is recorded as the item's inputs.
112
+ */
113
+ pageOf(item: string, o?: {
114
+ folder?: string;
115
+ file?: string;
116
+ }): Promise<string>;
117
+ /**
118
+ * The project files an item (its id) is made from, as `source` (a name
119
+ * of the tool's own) finds them now, in place of what it found before
120
+ * (docs/design/item-files.md, "An item's inputs"); a path ending in "/"
121
+ * is a folder. A change to one tells the item's editors.
122
+ */
123
+ recordInputs(item: string, source: string, paths: Iterable<string>): void;
107
124
  }
108
125
  /** One contributed tool: its params and result, and its run. */
109
126
  export interface ProjectTool<P extends z.ZodType = z.ZodType, R extends z.ZodType = z.ZodType> extends MethodSpec<P, R> {
@@ -33,6 +33,13 @@ export interface StageRouteContext {
33
33
  kept<T>(key: string, make: () => T): T;
34
34
  /** Project files a page the route serves loads besides the media the build found: the tree's `media/` serves them from now on. */
35
35
  allowMedia(paths: Iterable<string>): void;
36
+ /**
37
+ * The project files the item of an entry file is made from, as `source`
38
+ * (a name of the route's own) finds them now, in place of what it found
39
+ * before (docs/design/item-files.md, "An item's inputs"): the modules its
40
+ * viewer bundled. A change to one tells the item's editors.
41
+ */
42
+ recordInputs(entry: string, source: string, paths: Iterable<string>): void;
36
43
  /** The file of a project path a page may reach (inside the project, in no folder the server never opens), or undefined. */
37
44
  inProject(path: string): string | undefined;
38
45
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/build",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/canvas-extension",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/canvas-model",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/chart",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/check",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{createHash as g}from"node:crypto";import{BILLING_PAGE_PATH as h,DEVICE_HEADER as w,EXIT as o,ORGANIZATION_HEADER as f}from"@allyhub/protocol";import{accessOf as p,SignedOut as m}from"./credentials.js";import{CloudError as d,notSignedIn as l,unreachable as y}from"./errors.js";export function scrub(u,n){let t=u.replace(/(authorization)\s*[:=]\s*[^\r\n]+/giu,"$1: <redacted>");return t=t.replace(/\bahk_[A-Za-z0-9_-]+/gu,"<api-key>"),t=t.replace(/\beyJ[\w-]+\.[\w-]+\.[\w-]+/gu,"<token>"),n&&(t=t.split(n).join("<key>")),t}export class Cloud{config;constructor(n){this.config=n}async tellStudio(){const n=this.config.studioHost;n!==void 0&&await fetch(`${n}/out-of-credits`,{method:"POST",signal:AbortSignal.timeout(1e3)}).then(t=>t.body?.cancel(),()=>{})}get url(){return this.config.url}async key(n={}){const t=this.config.apiKey;if(t)return{key:t,source:"env",account:g("sha256").update(t).digest("hex")};try{const i=await p(this.config,n);if(!i)return;const a=i.credentials.account.organization?.id,e=i.credentials.device;return{key:i.token,source:"oauth",account:i.credentials.account.id,expiresAt:i.expiresAt,...a===void 0?{}:{organization:a},...e===void 0?{}:{device:e}}}catch(i){if(i instanceof m)return;throw y(this.url,i)}}async requireKey(){const n=await this.key();if(!n)throw l();return n}keyedFetch=async(n,t)=>{const i=s=>{const c=new Headers(t?.headers);return c.set("authorization",`Bearer ${s.key}`),s.organization!==void 0&&!c.has(f)&&c.set(f,s.organization),s.device!==void 0&&c.set(w,s.device),this.config.fetch(n,{...t,headers:c})},a=await this.requireKey(),e=await i(a);if(e.status!==401||a.source!=="oauth"||t?.body instanceof ReadableStream||n instanceof Request)return e;const r=await this.key({refused:a.key});return r===void 0?e:(await e.body?.cancel(),i(r))};async json(n,t={}){const i=t.auth!==!1,a=i?(await this.requireKey()).key:void 0;let e;try{e=await(i?this.keyedFetch:this.config.fetch)(`${this.url}${n}`,{redirect:"error",signal:t.signal??AbortSignal.timeout(3e4),method:t.method??"GET",headers:{accept:"application/json",...t.body===void 0?{}:{"content-type":"application/json"},...t.organization===void 0?{}:{[f]:t.organization}},...t.body===void 0?{}:{body:JSON.stringify(t.body)}})}catch(c){throw c instanceof d?c:y(this.url,c)}const r=await e.text(),s=e.ok?void 0:_(r,e.status,a,this.url);if(s?.code==="insufficient-credits"&&await this.tellStudio(),s&&e.status!==401)throw s;if(e.status===403)throw new d("forbidden","This AllyHub account does not have access to this operation.",{exit:o.auth,status:403});if(e.status===401)throw l(i?"This computer's AllyHub sign-in is not valid any more.":void 0);if(!e.ok)throw new d("api-error",`${this.url}${n} answered ${String(e.status)}: ${scrub(r.slice(0,300),a)}`,{exit:e.status>=500?o.platform:o.usage,status:e.status});try{return JSON.parse(r)}catch{throw new d("api-error",`${this.url}${n} did not answer JSON.`,{exit:o.platform,status:e.status})}}}const b={bad_input:o.usage,insufficient_credits:o.auth,plan_required:o.auth,tool_off:o.auth,limit_reached:o.auth,forbidden:o.auth,not_found:o.notFound,conflict:o.conflict,worked_elsewhere:o.conflict};function _(u,n,t,i){let a;try{a=JSON.parse(u)}catch{return}const e=a?.error;if(typeof e?.code!="string"||typeof e.message!="string")return;const r=e.code==="insufficient_credits"?`Buy credits at ${i}${h}, or ask an owner or admin of the team to.`:e.code==="plan_required"?`Subscribe at ${i}${h}, or ask an owner or admin of the team to.`:e.code==="tool_off"?`Turn it on in Capabilities at ${i}/, or ask an owner or admin of the team to.`:typeof e.hint=="string"?e.hint:void 0;return new d(e.code.replaceAll("_","-"),scrub(e.message,t),{exit:b[e.code]??o.platform,status:n,...r===void 0?{}:{hint:r},...typeof e.data=="object"&&e.data!==null?{data:e.data}:{}})}
2
+ import{createHash as g}from"node:crypto";import{BILLING_PAGE_PATH as h,DEVICE_HEADER as w,EXIT as a,ORGANIZATION_HEADER as f}from"@allyhub/protocol";import{accessOf as p,SignedOut as m}from"./credentials.js";import{CloudError as d,notSignedIn as l,unreachable as y}from"./errors.js";export function scrub(u,n){let t=u.replace(/(authorization)\s*[:=]\s*[^\r\n]+/giu,"$1: <redacted>");return t=t.replace(/\bahk_[A-Za-z0-9_-]+/gu,"<api-key>"),t=t.replace(/\beyJ[\w-]+\.[\w-]+\.[\w-]+/gu,"<token>"),n&&(t=t.split(n).join("<key>")),t}export class Cloud{config;constructor(n){this.config=n}async tellStudio(){const n=this.config.studioHost;n!==void 0&&await fetch(`${n}/out-of-credits`,{method:"POST",signal:AbortSignal.timeout(1e3)}).then(t=>t.body?.cancel(),()=>{})}get url(){return this.config.url}async key(n={}){const t=this.config.apiKey;if(t)return{key:t,source:"env",account:g("sha256").update(t).digest("hex")};try{const i=await p(this.config,n);if(!i)return;const o=i.credentials.account.organization?.id,e=i.credentials.device;return{key:i.token,source:"oauth",account:i.credentials.account.id,expiresAt:i.expiresAt,...o===void 0?{}:{organization:o},...e===void 0?{}:{device:e}}}catch(i){if(i instanceof m)return;throw y(this.url,i)}}async requireKey(){const n=await this.key();if(!n)throw l();return n}keyedFetch=async(n,t)=>{const i=s=>{const c=new Headers(t?.headers);return c.set("authorization",`Bearer ${s.key}`),s.organization!==void 0&&!c.has(f)&&c.set(f,s.organization),s.device!==void 0&&c.set(w,s.device),this.config.fetch(n,{...t,headers:c})},o=await this.requireKey(),e=await i(o);if(e.status!==401||o.source!=="oauth"||t?.body instanceof ReadableStream||n instanceof Request)return e;const r=await this.key({refused:o.key});return r===void 0?e:(await e.body?.cancel(),i(r))};async json(n,t={}){const i=t.auth!==!1,o=i?(await this.requireKey()).key:void 0;let e;try{e=await(i?this.keyedFetch:this.config.fetch)(`${this.url}${n}`,{redirect:"error",signal:t.signal??AbortSignal.timeout(3e4),method:t.method??"GET",headers:{accept:"application/json",...t.body===void 0?{}:{"content-type":"application/json"},...t.organization===void 0?{}:{[f]:t.organization}},...t.body===void 0?{}:{body:JSON.stringify(t.body)}})}catch(c){throw c instanceof d?c:y(this.url,c)}const r=await e.text(),s=e.ok?void 0:_(r,e.status,o,this.url);if(s?.code==="insufficient-credits"&&await this.tellStudio(),s&&e.status!==401)throw s;if(e.status===403)throw new d("forbidden","This AllyHub account does not have access to this operation.",{exit:a.auth,status:403});if(e.status===401)throw l(i?"This computer's AllyHub sign-in is not valid any more.":void 0);if(!e.ok)throw new d("api-error",`${this.url}${n} answered ${String(e.status)}: ${scrub(r.slice(0,300),o)}`,{exit:e.status>=500?a.platform:a.usage,status:e.status});try{return JSON.parse(r)}catch{throw new d("api-error",`${this.url}${n} did not answer JSON.`,{exit:a.platform,status:e.status})}}}const b={bad_input:a.usage,insufficient_credits:a.auth,plan_required:a.auth,tool_off:a.auth,limit_reached:a.auth,forbidden:a.auth,not_found:a.notFound,conflict:a.conflict,worked_elsewhere:a.conflict};function _(u,n,t,i){let o;try{o=JSON.parse(u)}catch{return}const e=o?.error;if(typeof e?.code!="string"||typeof e.message!="string")return;const r=e.code==="insufficient_credits"?`Buy credits at ${i}${h}?view=credits, or ask an owner or admin of the team to.`:e.code==="plan_required"?`Subscribe at ${i}${h}?view=plans, or ask an owner or admin of the team to.`:e.code==="tool_off"?`Turn it on in Capabilities at ${i}/, or ask an owner or admin of the team to.`:typeof e.hint=="string"?e.hint:void 0;return new d(e.code.replaceAll("_","-"),scrub(e.message,t),{exit:b[e.code]??a.platform,status:n,...r===void 0?{}:{hint:r},...typeof e.data=="object"&&e.data!==null?{data:e.data}:{}})}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/cloud",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/components",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",