allyhub 0.18.0 → 0.20.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 (1050) hide show
  1. package/bin/allyhub.js +10 -0
  2. package/dist/args.js +1 -1
  3. package/dist/command.js +1 -1
  4. package/dist/commands/add.js +1 -1
  5. package/dist/commands/align.js +1 -1
  6. package/dist/commands/auth.js +1 -1
  7. package/dist/commands/check.js +1 -1
  8. package/dist/commands/cloud-tools.js +2 -2
  9. package/dist/commands/cloud.js +1 -1
  10. package/dist/commands/contributed.js +1 -1
  11. package/dist/commands/dev.js +5 -5
  12. package/dist/commands/export.js +3 -0
  13. package/dist/commands/found-extensions.js +2 -0
  14. package/dist/commands/frames/common.js +1 -1
  15. package/dist/commands/frames/doc.js +1 -1
  16. package/dist/commands/frames/piece.js +1 -1
  17. package/dist/commands/frames/sheet.js +1 -1
  18. package/dist/commands/frames.js +9 -9
  19. package/dist/commands/index.js +1 -1
  20. package/dist/commands/inspect/combos.js +1 -1
  21. package/dist/commands/inspect/common.js +3 -3
  22. package/dist/commands/inspect/facts.js +2 -2
  23. package/dist/commands/inspect/index.js +1 -1
  24. package/dist/commands/inspect/layout.js +1 -1
  25. package/dist/commands/inspect/views.js +1 -1
  26. package/dist/commands/list.js +2 -0
  27. package/dist/commands/mail.js +1 -1
  28. package/dist/commands/migrate.js +3 -0
  29. package/dist/commands/run-context.js +2 -0
  30. package/dist/commands/skills.js +3 -3
  31. package/dist/commands/upgrade.js +5 -0
  32. package/dist/commands.json +1 -0
  33. package/dist/fields.js +1 -1
  34. package/dist/help.js +3 -3
  35. package/dist/main.js +8 -7
  36. package/dist/node_modules/@allyhub/3d-extension/dist/build.js +1 -1
  37. package/dist/node_modules/@allyhub/3d-extension/dist/scenery-build.js +1 -1
  38. package/dist/node_modules/@allyhub/3d-extension/package.json +4 -3
  39. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  40. package/dist/node_modules/@allyhub/blocks/LICENSE +241 -0
  41. package/dist/node_modules/@allyhub/blocks/dist/alt.js +2 -0
  42. package/dist/node_modules/@allyhub/blocks/dist/elements.js +2 -0
  43. package/dist/node_modules/@allyhub/blocks/dist/flow-resolve.js +2 -0
  44. package/dist/node_modules/@allyhub/blocks/dist/flow-table.js +2 -0
  45. package/dist/node_modules/@allyhub/blocks/dist/format.js +2 -0
  46. package/dist/node_modules/@allyhub/blocks/dist/gantt.js +2 -0
  47. package/dist/node_modules/@allyhub/blocks/dist/grids.js +2 -0
  48. package/dist/node_modules/@allyhub/blocks/dist/html.js +75 -0
  49. package/dist/node_modules/@allyhub/blocks/dist/icons.generated.js +2 -0
  50. package/dist/node_modules/@allyhub/blocks/dist/icons.js +2 -0
  51. package/dist/node_modules/@allyhub/blocks/dist/index.js +2 -0
  52. package/dist/node_modules/@allyhub/blocks/dist/layout.js +2 -0
  53. package/dist/node_modules/@allyhub/blocks/dist/look.js +2 -0
  54. package/dist/node_modules/@allyhub/blocks/dist/measure.js +3 -0
  55. package/dist/node_modules/@allyhub/blocks/dist/model.js +2 -0
  56. package/dist/node_modules/@allyhub/blocks/dist/page.js +2 -0
  57. package/dist/node_modules/@allyhub/blocks/dist/palette.js +2 -0
  58. package/dist/node_modules/@allyhub/blocks/dist/path.js +2 -0
  59. package/dist/node_modules/@allyhub/blocks/dist/resolve.js +2 -0
  60. package/dist/node_modules/@allyhub/blocks/dist/samples.js +2 -0
  61. package/dist/node_modules/@allyhub/blocks/dist/sankey.js +2 -0
  62. package/dist/node_modules/@allyhub/blocks/dist/svg.js +2 -0
  63. package/dist/node_modules/@allyhub/blocks/dist/tidy.js +2 -0
  64. package/dist/node_modules/@allyhub/blocks/dist/trees.js +2 -0
  65. package/dist/node_modules/@allyhub/blocks/package.json +19 -0
  66. package/dist/node_modules/@allyhub/browser/dist/html.js +1 -1
  67. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  68. package/dist/node_modules/@allyhub/build/dist/build-plugins.js +1 -1
  69. package/dist/node_modules/@allyhub/build/dist/fonts.js +9 -3
  70. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  71. package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
  72. package/dist/node_modules/@allyhub/build/dist/meta-worker.js +1 -1
  73. package/dist/node_modules/@allyhub/build/dist/migrate.js +2 -0
  74. package/dist/node_modules/@allyhub/build/dist/plugin.js +9 -9
  75. package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
  76. package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
  77. package/dist/node_modules/@allyhub/build/dist/scan.js +1 -1
  78. package/dist/node_modules/@allyhub/build/dist/sdk-parts.js +2 -0
  79. package/dist/node_modules/@allyhub/build/dist/vite.js +2 -2
  80. package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
  81. package/dist/node_modules/@allyhub/build/package.json +13 -1
  82. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  83. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  84. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +2 -1
  85. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +4 -3
  86. package/dist/node_modules/@allyhub/chart/dist/chart.js +4 -2
  87. package/dist/node_modules/@allyhub/chart/dist/chartex-xml.js +4 -0
  88. package/dist/node_modules/@allyhub/chart/dist/classic.js +2 -0
  89. package/dist/node_modules/@allyhub/chart/dist/embedded.js +2 -2
  90. package/dist/node_modules/@allyhub/chart/dist/extended.js +2 -0
  91. package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
  92. package/dist/node_modules/@allyhub/chart/dist/svg.js +1 -1
  93. package/dist/node_modules/@allyhub/chart/dist/tree.js +2 -0
  94. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  95. package/dist/node_modules/@allyhub/check/dist/check.js +2 -2
  96. package/dist/node_modules/@allyhub/check/package.json +1 -1
  97. package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
  98. package/dist/node_modules/@allyhub/cloud/dist/call.js +4 -4
  99. package/dist/node_modules/@allyhub/cloud/dist/catalog.js +1 -1
  100. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  101. package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
  102. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +1 -1
  103. package/dist/node_modules/@allyhub/cloud/dist/device.js +1 -1
  104. package/dist/node_modules/@allyhub/cloud/dist/errors.js +1 -1
  105. package/dist/node_modules/@allyhub/cloud/dist/index.js +1 -1
  106. package/dist/node_modules/@allyhub/cloud/dist/loopback.js +2 -2
  107. package/dist/node_modules/@allyhub/cloud/dist/mail.js +1 -1
  108. package/dist/node_modules/@allyhub/cloud/dist/records.js +1 -1
  109. package/dist/node_modules/@allyhub/cloud/dist/signin.js +2 -2
  110. package/dist/node_modules/@allyhub/cloud/dist/sites.js +1 -1
  111. package/dist/node_modules/@allyhub/cloud/dist/storage.js +2 -0
  112. package/dist/node_modules/@allyhub/cloud/dist/token.js +1 -1
  113. package/dist/node_modules/@allyhub/cloud/dist/tools.js +2 -0
  114. package/dist/node_modules/@allyhub/cloud/dist/uploads.js +2 -2
  115. package/dist/node_modules/@allyhub/cloud/dist/voice.js +1 -1
  116. package/dist/node_modules/@allyhub/cloud/package.json +5 -1
  117. package/dist/node_modules/@allyhub/components/package.json +1 -1
  118. package/dist/node_modules/@allyhub/dev-server/dist/background.js +1 -1
  119. package/dist/node_modules/@allyhub/dev-server/dist/item-process.js +2 -0
  120. package/dist/node_modules/@allyhub/dev-server/dist/item-worker.js +2 -0
  121. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  122. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +20 -1
  123. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  124. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  125. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  126. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  127. package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
  128. package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -3
  129. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  130. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +1 -1
  131. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  132. package/dist/node_modules/@allyhub/doc/dist/blocks.js +2 -0
  133. package/dist/node_modules/@allyhub/doc/dist/chart.js +1 -1
  134. package/dist/node_modules/@allyhub/doc/dist/color.js +1 -1
  135. package/dist/node_modules/@allyhub/doc/dist/docx-read.js +12 -0
  136. package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -4
  137. package/dist/node_modules/@allyhub/doc/dist/html.js +83 -48
  138. package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
  139. package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
  140. package/dist/node_modules/@allyhub/doc/dist/merges.js +2 -0
  141. package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
  142. package/dist/node_modules/@allyhub/doc/dist/numbering.js +2 -0
  143. package/dist/node_modules/@allyhub/doc/dist/omml.js +3 -0
  144. package/dist/node_modules/@allyhub/doc/dist/page.js +2 -1
  145. package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
  146. package/dist/node_modules/@allyhub/doc/dist/parse.js +5 -4
  147. package/dist/node_modules/@allyhub/doc/dist/redline.js +2 -0
  148. package/dist/node_modules/@allyhub/doc/dist/revisions.js +2 -0
  149. package/dist/node_modules/@allyhub/doc/dist/shapes.js +4 -0
  150. package/dist/node_modules/@allyhub/doc/dist/styles.js +2 -0
  151. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  152. package/dist/node_modules/@allyhub/doc/dist/write.js +65 -39
  153. package/dist/node_modules/@allyhub/doc/package.json +5 -1
  154. package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
  155. package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
  156. package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +3 -0
  157. package/dist/node_modules/@allyhub/doc-extension/dist/cli/index.js +1 -1
  158. package/dist/node_modules/@allyhub/doc-extension/dist/cli/styles.js +4 -0
  159. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  160. package/dist/node_modules/@allyhub/doc-extension/dist/inspect.js +1 -1
  161. package/dist/node_modules/@allyhub/doc-extension/dist/project-tools.js +1 -1
  162. package/dist/node_modules/@allyhub/doc-extension/dist/tools.js +1 -1
  163. package/dist/node_modules/@allyhub/doc-extension/dist/workspace.js +1 -1
  164. package/dist/node_modules/@allyhub/doc-extension/package.json +22 -2
  165. package/dist/node_modules/@allyhub/doc-print/dist/drawn.js +4 -4
  166. package/dist/node_modules/@allyhub/doc-print/dist/index.js +1 -1
  167. package/dist/node_modules/@allyhub/doc-print/dist/layout.js +8 -7
  168. package/dist/node_modules/@allyhub/doc-print/dist/print.js +22 -16
  169. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  170. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  171. package/dist/node_modules/@allyhub/export/package.json +1 -1
  172. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  173. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  174. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  175. package/dist/node_modules/@allyhub/formats/dist/data/blocks-flow.js +2 -0
  176. package/dist/node_modules/@allyhub/formats/dist/data/blocks.d.ts +146 -0
  177. package/dist/node_modules/@allyhub/formats/dist/data/blocks.js +2 -0
  178. package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.d.ts +9 -0
  179. package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.js +2 -0
  180. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +47 -40
  181. package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
  182. package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.d.ts +6 -0
  183. package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.js +2 -0
  184. package/dist/node_modules/@allyhub/formats/dist/data/diagrams.d.ts +29 -0
  185. package/dist/node_modules/@allyhub/formats/dist/data/diagrams.js +2 -0
  186. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +18 -0
  187. package/dist/node_modules/@allyhub/formats/dist/data/faces.js +1 -1
  188. package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +59 -0
  189. package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +2 -0
  190. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +1 -1
  191. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +698 -258
  192. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  193. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +14104 -2167
  194. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  195. package/dist/node_modules/@allyhub/formats/dist/data/themes.d.ts +82 -0
  196. package/dist/node_modules/@allyhub/formats/dist/data/themes.js +2 -0
  197. package/dist/node_modules/@allyhub/formats/dist/data/tokens.d.ts +67 -0
  198. package/dist/node_modules/@allyhub/formats/dist/data/tokens.js +2 -0
  199. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  200. package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
  201. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +7 -0
  202. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  203. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +36 -10
  204. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  205. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +1 -1
  206. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +3260 -290
  207. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  208. package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +45 -0
  209. package/dist/node_modules/@allyhub/formats/dist/tolerant.js +2 -0
  210. package/dist/node_modules/@allyhub/formats/package.json +25 -1
  211. package/dist/node_modules/@allyhub/html-extension/dist/project-tools.js +21 -9
  212. package/dist/node_modules/@allyhub/html-extension/dist/tools.js +1 -1
  213. package/dist/node_modules/@allyhub/html-extension/markup/allyhub.yaml +2 -0
  214. package/dist/node_modules/@allyhub/html-extension/markup/markup.json +14 -4
  215. package/dist/node_modules/@allyhub/html-extension/markup/pages/budget.html +22 -1
  216. package/dist/node_modules/@allyhub/html-extension/package.json +9 -1
  217. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  218. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +1 -1
  219. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +2 -2
  220. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  221. package/dist/node_modules/@allyhub/image-extension/dist/build-plugins.js +1 -1
  222. package/dist/node_modules/@allyhub/image-extension/dist/cli.js +1 -1
  223. package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
  224. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
  225. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +2 -2
  226. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  227. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  228. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  229. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  230. package/dist/node_modules/@allyhub/image-sdk/dist/block.js +2 -0
  231. package/dist/node_modules/@allyhub/image-sdk/dist/blocks.js +2 -0
  232. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +1 -1
  233. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  234. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  235. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -3
  236. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +3 -3
  237. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  238. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  239. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -600
  240. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  241. package/dist/node_modules/@allyhub/media/package.json +5 -1
  242. package/dist/node_modules/@allyhub/media-extension/dist/analyses/faces.js +1 -1
  243. package/dist/node_modules/@allyhub/media-extension/dist/asr/hear.js +1 -1
  244. package/dist/node_modules/@allyhub/media-extension/dist/asr/transcribe.js +1 -1
  245. package/dist/node_modules/@allyhub/media-extension/dist/ocr/text.js +1 -1
  246. package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
  247. package/dist/node_modules/@allyhub/media-extension/dist/vision/index-media.js +3 -2
  248. package/dist/node_modules/@allyhub/media-extension/dist/vision/track.js +1 -1
  249. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  250. package/dist/node_modules/@allyhub/model/package.json +1 -1
  251. package/dist/node_modules/@allyhub/office-extension/markup/csv/allyhub.yaml +2 -0
  252. package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +1 -1
  253. package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
  254. package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
  255. package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
  256. package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +1 -1
  257. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  258. package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
  259. package/dist/node_modules/@allyhub/ooxml/dist/mce.js +1 -1
  260. package/dist/node_modules/@allyhub/ooxml/dist/node.js +1 -1
  261. package/dist/node_modules/@allyhub/ooxml/dist/ns.js +1 -1
  262. package/dist/node_modules/@allyhub/ooxml/dist/opc.js +1 -1
  263. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  264. package/dist/node_modules/@allyhub/piece/dist/export.d.ts +1 -1
  265. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +1 -2
  266. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +2 -0
  267. package/dist/node_modules/@allyhub/piece/dist/look.d.ts +10 -2
  268. package/dist/node_modules/@allyhub/piece/dist/look.js +1 -1
  269. package/dist/node_modules/@allyhub/piece/dist/media.d.ts +9 -3
  270. package/dist/node_modules/@allyhub/piece/dist/script.js +1 -1
  271. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +5 -2
  272. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +2 -2
  273. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  274. package/dist/node_modules/@allyhub/project/dist/media-index.js +1 -1
  275. package/dist/node_modules/@allyhub/project/package.json +1 -1
  276. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  277. package/dist/node_modules/@allyhub/protocol/dist/blobs.js +1 -1
  278. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  279. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  280. package/dist/node_modules/@allyhub/protocol/dist/errors.js +1 -1
  281. package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
  282. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  283. package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.js +1 -1
  284. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
  285. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  286. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  287. package/dist/node_modules/@allyhub/protocol/dist/page-frame.js +2 -0
  288. package/dist/node_modules/@allyhub/protocol/dist/paywall.js +1 -1
  289. package/dist/node_modules/@allyhub/protocol/dist/purposes.js +1 -1
  290. package/dist/node_modules/@allyhub/protocol/dist/registry.js +1 -1
  291. package/dist/node_modules/@allyhub/protocol/dist/sites.js +1 -1
  292. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  293. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  294. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  295. package/dist/node_modules/@allyhub/protocol/package.json +41 -1
  296. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  297. package/dist/node_modules/@allyhub/render/dist/errors.js +1 -1
  298. package/dist/node_modules/@allyhub/render/dist/post-probe.js +1 -1
  299. package/dist/node_modules/@allyhub/render/package.json +9 -1
  300. package/dist/node_modules/@allyhub/runtime/dist/footage.js +1 -1
  301. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  302. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  303. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +1 -1
  304. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  305. package/dist/node_modules/@allyhub/runtimes/dist/manifest.js +1 -1
  306. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +2 -2
  307. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +3 -3
  308. package/dist/node_modules/@allyhub/runtimes/package.json +9 -1
  309. package/dist/node_modules/@allyhub/scaffold/dist/index.js +12 -8
  310. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  311. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  312. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.js +3 -3
  313. package/dist/node_modules/@allyhub/scenery-host/dist/fact.d.ts +1 -1
  314. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.js +2 -2
  315. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  316. package/dist/node_modules/@allyhub/sheet/dist/annotations.js +1 -1
  317. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  318. package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +1 -1
  319. package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
  320. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
  321. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  322. package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
  323. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  324. package/dist/node_modules/@allyhub/sheet/dist/calc/server.js +1 -1
  325. package/dist/node_modules/@allyhub/sheet/dist/cell-styles.js +2 -0
  326. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  327. package/dist/node_modules/@allyhub/sheet/dist/check.js +1 -1
  328. package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
  329. package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
  330. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  331. package/dist/node_modules/@allyhub/sheet/dist/heatmap.js +2 -0
  332. package/dist/node_modules/@allyhub/sheet/dist/html.js +9 -9
  333. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  334. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  335. package/dist/node_modules/@allyhub/sheet/dist/paginate.js +1 -1
  336. package/dist/node_modules/@allyhub/sheet/dist/printed.js +1 -1
  337. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +1 -1
  338. package/dist/node_modules/@allyhub/sheet/dist/sparklines.js +2 -0
  339. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  340. package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
  341. package/dist/node_modules/@allyhub/sheet/dist/theme.js +2 -0
  342. package/dist/node_modules/@allyhub/sheet/dist/tiles.js +2 -0
  343. package/dist/node_modules/@allyhub/sheet/dist/units.js +2 -0
  344. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  345. package/dist/node_modules/@allyhub/sheet/dist/write.js +14 -14
  346. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  347. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  348. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  349. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  350. package/dist/node_modules/@allyhub/sheet/dist/xlsx/theme.js +1 -1
  351. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  352. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  353. package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
  354. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/open.js +1 -1
  355. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +7 -7
  356. package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
  357. package/dist/node_modules/@allyhub/sheet-extension/dist/evaluate.js +2 -2
  358. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
  359. package/dist/node_modules/@allyhub/sheet-extension/dist/inspect.js +2 -2
  360. package/dist/node_modules/@allyhub/sheet-extension/dist/migrations.js +4 -0
  361. package/dist/node_modules/@allyhub/sheet-extension/dist/project-tools.js +1 -1
  362. package/dist/node_modules/@allyhub/sheet-extension/dist/tools.js +1 -1
  363. package/dist/node_modules/@allyhub/sheet-extension/package.json +7 -3
  364. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  365. package/dist/node_modules/@allyhub/slides-core/dist/blocks.js +2 -0
  366. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  367. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  368. package/dist/node_modules/@allyhub/slides-core/dist/code.js +1 -1
  369. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  370. package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
  371. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  372. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  373. package/dist/node_modules/@allyhub/slides-core/dist/model.js +1 -1
  374. package/dist/node_modules/@allyhub/slides-core/dist/office-layouts.js +2 -0
  375. package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
  376. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  377. package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
  378. package/dist/node_modules/@allyhub/slides-core/dist/styles/brief.js +2 -0
  379. package/dist/node_modules/@allyhub/slides-core/dist/styles/editorial.js +2 -0
  380. package/dist/node_modules/@allyhub/slides-core/dist/styles/index.js +2 -0
  381. package/dist/node_modules/@allyhub/slides-core/dist/styles/kit.js +2 -0
  382. package/dist/node_modules/@allyhub/slides-core/dist/styles/layouts.js +2 -0
  383. package/dist/node_modules/@allyhub/slides-core/dist/styles/pitch.js +2 -0
  384. package/dist/node_modules/@allyhub/slides-core/dist/styles/stage.js +2 -0
  385. package/dist/node_modules/@allyhub/slides-core/dist/styles/tiles.js +2 -0
  386. package/dist/node_modules/@allyhub/slides-core/dist/theme.js +1 -1
  387. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  388. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  389. package/dist/node_modules/@allyhub/slides-extension/dist/check.js +1 -1
  390. package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
  391. package/dist/node_modules/@allyhub/slides-extension/dist/deck-fonts.js +1 -1
  392. package/dist/node_modules/@allyhub/slides-extension/dist/project-tools.js +1 -1
  393. package/dist/node_modules/@allyhub/slides-extension/package.json +24 -1
  394. package/dist/node_modules/@allyhub/slides-pptx/dist/charts.js +1 -1
  395. package/dist/node_modules/@allyhub/slides-pptx/dist/fonts.js +1 -1
  396. package/dist/node_modules/@allyhub/slides-pptx/dist/image-size.js +2 -0
  397. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +3 -3
  398. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +7 -2
  399. package/dist/node_modules/@allyhub/slides-pptx/dist/import/names.js +1 -1
  400. package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
  401. package/dist/node_modules/@allyhub/slides-pptx/dist/index.js +1 -1
  402. package/dist/node_modules/@allyhub/slides-pptx/dist/mtx.js +2 -0
  403. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +3 -2
  404. package/dist/node_modules/@allyhub/slides-pptx/dist/read/chartex.js +3 -0
  405. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
  406. package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +2 -2
  407. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
  408. package/dist/node_modules/@allyhub/slides-pptx/dist/read/table.js +1 -1
  409. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
  410. package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +1 -1
  411. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
  412. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
  413. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  414. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +3 -2
  415. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  416. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  417. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +1 -1
  418. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  419. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  420. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/LICENSE +93 -0
  421. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-italic.woff2 +0 -0
  422. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-normal.woff2 +0 -0
  423. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-italic.woff2 +0 -0
  424. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-normal.woff2 +0 -0
  425. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-italic.woff2 +0 -0
  426. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-normal.woff2 +0 -0
  427. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-italic.woff2 +0 -0
  428. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-normal.woff2 +0 -0
  429. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400-italic.css +1 -0
  430. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400.css +1 -0
  431. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700-italic.css +1 -0
  432. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700.css +1 -0
  433. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400-italic.css +1 -0
  434. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400.css +1 -0
  435. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700-italic.css +1 -0
  436. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700.css +1 -0
  437. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/LICENSE +93 -0
  438. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-400-normal.woff2 +0 -0
  439. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-ext-400-normal.woff2 +0 -0
  440. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-400.css +1 -0
  441. package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-ext-400.css +1 -0
  442. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400-italic.css +1 -79
  443. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/400.css +1 -79
  444. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700-italic.css +1 -79
  445. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/700.css +1 -79
  446. package/dist/node_modules/@allyhub/stage-page/dist/fonts/arimo/arial.css +1 -316
  447. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +1 -19
  448. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +1 -19
  449. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +1 -19
  450. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +1 -19
  451. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +1 -76
  452. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400-italic.css +1 -69
  453. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/400.css +1 -69
  454. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700-italic.css +1 -69
  455. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/700.css +1 -69
  456. package/dist/node_modules/@allyhub/stage-page/dist/fonts/carlito/calibri.css +1 -276
  457. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +1 -79
  458. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +1 -79
  459. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +1 -79
  460. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +1 -79
  461. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +1 -316
  462. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/LICENSE +93 -0
  463. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-italic.woff2 +0 -0
  464. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-normal.woff2 +0 -0
  465. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-italic.woff2 +0 -0
  466. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-normal.woff2 +0 -0
  467. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-italic.woff2 +0 -0
  468. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-normal.woff2 +0 -0
  469. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-italic.woff2 +0 -0
  470. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-normal.woff2 +0 -0
  471. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400-italic.css +1 -0
  472. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400.css +1 -0
  473. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700-italic.css +1 -0
  474. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700.css +1 -0
  475. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400-italic.css +1 -0
  476. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400.css +1 -0
  477. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700-italic.css +1 -0
  478. package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700.css +1 -0
  479. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/LICENSE +93 -0
  480. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-italic.woff2 +0 -0
  481. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-normal.woff2 +0 -0
  482. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-italic.woff2 +0 -0
  483. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-normal.woff2 +0 -0
  484. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-italic.woff2 +0 -0
  485. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-normal.woff2 +0 -0
  486. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-italic.woff2 +0 -0
  487. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-normal.woff2 +0 -0
  488. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400-italic.css +1 -0
  489. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400.css +1 -0
  490. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700-italic.css +1 -0
  491. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700.css +1 -0
  492. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400-italic.css +1 -0
  493. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400.css +1 -0
  494. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700-italic.css +1 -0
  495. package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700.css +1 -0
  496. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/LICENSE +93 -0
  497. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-italic.woff2 +0 -0
  498. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-normal.woff2 +0 -0
  499. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-italic.woff2 +0 -0
  500. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-normal.woff2 +0 -0
  501. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-italic.woff2 +0 -0
  502. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-normal.woff2 +0 -0
  503. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-italic.woff2 +0 -0
  504. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-normal.woff2 +0 -0
  505. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400-italic.css +1 -0
  506. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400.css +1 -0
  507. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700-italic.css +1 -0
  508. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700.css +1 -0
  509. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400-italic.css +1 -0
  510. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400.css +1 -0
  511. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700-italic.css +1 -0
  512. package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700.css +1 -0
  513. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-color-emoji/emoji.css +1 -8
  514. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/400.css +1 -1009
  515. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/700.css +1 -1009
  516. package/dist/node_modules/@allyhub/stage-page/dist/fonts/noto-sans-sc/microsoft-yahei.css +1 -2018
  517. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/LICENSE +93 -0
  518. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-italic.woff2 +0 -0
  519. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-normal.woff2 +0 -0
  520. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-italic.woff2 +0 -0
  521. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-normal.woff2 +0 -0
  522. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-italic.woff2 +0 -0
  523. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-normal.woff2 +0 -0
  524. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-italic.woff2 +0 -0
  525. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-normal.woff2 +0 -0
  526. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400-italic.css +1 -0
  527. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400.css +1 -0
  528. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700-italic.css +1 -0
  529. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700.css +1 -0
  530. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400-italic.css +1 -0
  531. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400.css +1 -0
  532. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700-italic.css +1 -0
  533. package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700.css +1 -0
  534. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +1 -79
  535. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +1 -79
  536. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +1 -79
  537. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +1 -79
  538. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +1 -316
  539. package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
  540. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +42 -0
  541. package/dist/node_modules/@allyhub/stage-page/dist/style-faces.js +2 -0
  542. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  543. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +96 -92
  544. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  545. package/dist/node_modules/@allyhub/telemetry/dist/doc.js +1 -1
  546. package/dist/node_modules/@allyhub/telemetry/dist/errors.js +1 -1
  547. package/dist/node_modules/@allyhub/telemetry/dist/limit.js +2 -0
  548. package/dist/node_modules/@allyhub/telemetry/dist/telemetry.js +2 -2
  549. package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
  550. package/dist/node_modules/@allyhub/text-extension/markup/allyhub.yaml +2 -0
  551. package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
  552. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  553. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  554. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -1
  555. package/dist/node_modules/@allyhub/video-core/dist/seams.js +1 -1
  556. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  557. package/dist/node_modules/@allyhub/video-extension/dist/build-plugins.js +1 -1
  558. package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +1 -1
  559. package/dist/node_modules/@allyhub/video-extension/dist/inspect/index.js +1 -1
  560. package/dist/node_modules/@allyhub/video-extension/dist/inspect/joins.js +1 -1
  561. package/dist/node_modules/@allyhub/video-extension/dist/inspect/loop.js +3 -0
  562. package/dist/node_modules/@allyhub/video-extension/package.json +7 -26
  563. package/dist/node_modules/@allyhub/video-measure/dist/check.js +2 -2
  564. package/dist/node_modules/@allyhub/video-measure/dist/index.js +1 -1
  565. package/dist/node_modules/@allyhub/video-measure/dist/plans.js +2 -2
  566. package/dist/node_modules/@allyhub/video-measure/dist/reference/video.js +1 -1
  567. package/dist/node_modules/@allyhub/video-measure/dist/seams.js +1 -1
  568. package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
  569. package/dist/node_modules/@allyhub/video-measure/package.json +5 -1
  570. package/dist/node_modules/@allyhub/video-sdk/dist/config.js +2 -0
  571. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +1 -1
  572. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +1 -1
  573. package/dist/node_modules/@allyhub/video-sdk/package.json +5 -1
  574. package/dist/node_modules/@allyhub/website/dist/index.js +1 -1
  575. package/dist/node_modules/@allyhub/website/dist/website.js +2 -2
  576. package/dist/node_modules/@allyhub/website/package.json +1 -1
  577. package/dist/node_modules/@allyhub/website-extension/dist/build.js +1 -1
  578. package/dist/node_modules/@allyhub/website-extension/package.json +6 -6
  579. package/dist/node_modules/@allyhub/x-extension/dist/build.js +1 -1
  580. package/dist/node_modules/@allyhub/x-extension/package.json +8 -4
  581. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +3 -3
  582. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  583. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  584. package/dist/node_modules/@allyhub/x-view/src/style.css +1 -709
  585. package/dist/package.json +14 -14
  586. package/dist/project.js +1 -1
  587. package/dist/resources.js +1 -1
  588. package/dist/sdk-docs.js +1 -1
  589. package/dist/self-upgrade.js +2 -0
  590. package/dist/slot.js +4 -0
  591. package/dist/telemetry.js +1 -1
  592. package/dist/text/batch-text.js +1 -1
  593. package/dist/text/facts-text.js +5 -5
  594. package/dist/text/format.js +2 -2
  595. package/dist/update-notice.js +3 -0
  596. package/dist/version.js +1 -1
  597. package/dist/works.js +1 -1
  598. package/editor-web/assets/{abnfDiagram-WEYOIA3C-Hy4-O0wN.js → abnfDiagram-WEYOIA3C-BkVJMd53.js} +1 -1
  599. package/editor-web/assets/{architecture-WOLXFQ4H-43JEVxqz.js → architecture-WOLXFQ4H-C6rnaynZ.js} +1 -1
  600. package/editor-web/assets/{architectureDiagram-ZHVYKT53-7bFTl41n.js → architectureDiagram-ZHVYKT53-D3vrh8LK.js} +1 -1
  601. package/editor-web/assets/arrow-down-D-QZrqcz.js +1 -0
  602. package/editor-web/assets/arrow-up-B1zjKUHX.js +1 -0
  603. package/editor-web/assets/article-DHf6mOY_.js +7 -0
  604. package/editor-web/assets/article-Dns1-Xh-.js +3 -0
  605. package/editor-web/assets/{audio-lines-PZj77e7t.js → audio-lines-BFoW_IeO.js} +1 -1
  606. package/editor-web/assets/bar-button-CKPfx2AB.js +1 -0
  607. package/editor-web/assets/{blockDiagram-RJAE7QA3-DcoNo1WH.js → blockDiagram-RJAE7QA3-BKngt8H7.js} +1 -1
  608. package/editor-web/assets/{browser-C9NP0ZYz.js → browser-DEGNhKTV.js} +1 -1
  609. package/editor-web/assets/{c4Diagram-XDPPPE54-CsMt61gx.js → c4Diagram-XDPPPE54-j7sUELqF.js} +1 -1
  610. package/editor-web/assets/calc-worker-Cr4a0xmt.js +168 -0
  611. package/editor-web/assets/channel-CVWSV3su.js +1 -0
  612. package/editor-web/assets/{chart-no-axes-column-Be0lFcGF.js → chart-no-axes-column-Dyy25XZ_.js} +1 -1
  613. package/editor-web/assets/chip-Bn_9JRRG.js +1 -0
  614. package/editor-web/assets/{chunk-2E7WHVMD-fj-TJIRG.js → chunk-2E7WHVMD-BXa-uRSi.js} +1 -1
  615. package/editor-web/assets/{chunk-4EMNKR2T-Du5cRy-Y.js → chunk-4EMNKR2T-B3ntcsZN.js} +1 -1
  616. package/editor-web/assets/{chunk-55XCU76K-BHXxBBtm.js → chunk-55XCU76K-AMvnFwUg.js} +1 -1
  617. package/editor-web/assets/{chunk-7S6XSTFO-R5HW6X5I.js → chunk-7S6XSTFO-BA6esfFu.js} +1 -1
  618. package/editor-web/assets/{chunk-AQDTSKZB-C98F2BUb.js → chunk-AQDTSKZB-BT_vANXs.js} +1 -1
  619. package/editor-web/assets/{chunk-DSNLSHJZ-NIGsJ2cK.js → chunk-DSNLSHJZ-DoUgmzGB.js} +1 -1
  620. package/editor-web/assets/{chunk-HAGFOTED-BtHxtfW5.js → chunk-HAGFOTED-DtnIrCZb.js} +1 -1
  621. package/editor-web/assets/{chunk-HNE4Q36P-BI8i7Vkk.js → chunk-HNE4Q36P-BlPwQx3_.js} +1 -1
  622. package/editor-web/assets/{chunk-NQOKRVIF-DP_Z_zEA.js → chunk-NQOKRVIF-D2r7jp2r.js} +1 -1
  623. package/editor-web/assets/{chunk-UHW7PFBP-C_8bui28.js → chunk-UHW7PFBP-Cmc0_F5o.js} +1 -1
  624. package/editor-web/assets/{chunk-VQ5W62QI-CKZgzWB2.js → chunk-VQ5W62QI-nJSMqAr0.js} +1 -1
  625. package/editor-web/assets/{chunk-WQQL4CDK-Ff4DgCht.js → chunk-WQQL4CDK-Btq2nbF6.js} +1 -1
  626. package/editor-web/assets/{chunk-YZO67HFG-Csbx1-pi.js → chunk-YZO67HFG-DTbcCoGt.js} +1 -1
  627. package/editor-web/assets/{chunk-ZAUX2LTX-BO1kcV3w.js → chunk-ZAUX2LTX-DVwkg-2N.js} +1 -1
  628. package/editor-web/assets/{chunk-ZCHMQSOR-CxeNZYZG.js → chunk-ZCHMQSOR-BV39jOOE.js} +1 -1
  629. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-D8eHQa5i.js → classDiagram-v2-4MYWR3UA-Cj74-fhM.js} +1 -1
  630. package/editor-web/assets/code-Ch6AB5bZ.js +1 -0
  631. package/editor-web/assets/collaborator-XiHOxwGM.js +1 -0
  632. package/editor-web/assets/{copy-CuJSs0nI.js → copy-SoaMYqsN.js} +1 -1
  633. package/editor-web/assets/{createLucideIcon-lm_6n8YT.js → createLucideIcon-euu7Wcd9.js} +1 -1
  634. package/editor-web/assets/{cynefin-EF2NZ3EQ-lIUY3WQQ.js → cynefin-EF2NZ3EQ-C0CkiipV.js} +1 -1
  635. package/editor-web/assets/{cynefinDiagram-WF24UDRP-CFOOhEEs.js → cynefinDiagram-WF24UDRP-hdsnJ4cI.js} +1 -1
  636. package/editor-web/assets/{dagre-NK4GIZVX-DdHVup2I.js → dagre-NK4GIZVX-CC7WSgaK.js} +1 -1
  637. package/editor-web/assets/deck-DQpNIS2p.js +1 -0
  638. package/editor-web/assets/{diagram-CBK3MWTC-CFAD9Y2B.js → diagram-CBK3MWTC-DmaVm13J.js} +1 -1
  639. package/editor-web/assets/{diagram-I5XIIV2D-DZJAn95A.js → diagram-I5XIIV2D-De8jqp7b.js} +1 -1
  640. package/editor-web/assets/{diagram-ODIL2UCW-BcIeYTaY.js → diagram-ODIL2UCW-B5pBTulX.js} +1 -1
  641. package/editor-web/assets/{diagram-PFBEJUXE-CnZmh_fl.js → diagram-PFBEJUXE-BYsXg5_w.js} +1 -1
  642. package/editor-web/assets/{diagram-RJA3I4VV-DpDd9rGx.js → diagram-RJA3I4VV-DZ8f6bYe.js} +1 -1
  643. package/editor-web/assets/{diagram-TYUNFSNR-ouGiUQcR.js → diagram-TYUNFSNR-qXHUsauD.js} +1 -1
  644. package/editor-web/assets/dist--z0ZHp4T.js +16 -0
  645. package/editor-web/assets/dist-9kuRjUTN.js +41 -0
  646. package/editor-web/assets/dist-B3rd02Cg.js +6 -0
  647. package/editor-web/assets/dist-B5GOGGEe.js +1 -0
  648. package/editor-web/assets/dist-Bx6q9kCu.js +1 -0
  649. package/editor-web/assets/dist-C4hHtrJr.js +1 -0
  650. package/editor-web/assets/dist-CCXJewsi.js +19 -0
  651. package/editor-web/assets/dist-CfK2BLl8.js +4 -0
  652. package/editor-web/assets/dist-Cmux3oJ_.js +1 -0
  653. package/editor-web/assets/dist-Cspf85KV.js +6 -0
  654. package/editor-web/assets/dist-DA72-4WB.js +82 -0
  655. package/editor-web/assets/{dist-DruvDNQe.js → dist-DAhe-kFC.js} +5 -5
  656. package/editor-web/assets/dist-DIJnhQFK.js +9 -0
  657. package/editor-web/assets/dist-DOrGo1GD.js +19 -0
  658. package/editor-web/assets/{dist-Bd8IxQPP.js → dist-DQ6RpEJD.js} +2 -2
  659. package/editor-web/assets/dist-DjiCHlSu.js +35 -0
  660. package/editor-web/assets/dist-Do4a40Wn.js +19 -0
  661. package/editor-web/assets/dist-FKEWS3Co.js +547 -0
  662. package/editor-web/assets/dist-QKd2i6kG.js +5 -0
  663. package/editor-web/assets/dist-SGnOfLhx.js +24 -0
  664. package/editor-web/assets/dist-VmVB7tl4.js +3 -0
  665. package/editor-web/assets/{docx-draw-C4aiB8HI.js → docx-draw-L54blreB.js} +1 -1
  666. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-HRjVlbUf.js → ebnfDiagram-V4P3TTPT-B7-IfVI-.js} +1 -1
  667. package/editor-web/assets/{elk-QONTBCTQ-BFmtKyOf.js → elk-QONTBCTQ-Gj_WaeBn.js} +1 -1
  668. package/editor-web/assets/{erDiagram-KYQIGQAA-C9gcGEgK.js → erDiagram-KYQIGQAA-BDF6Qoqx.js} +1 -1
  669. package/editor-web/assets/esm-PQD5Pn8a.js +21 -0
  670. package/editor-web/assets/{eventmodeling-K75KTNOO-Bpma5Bdb.js → eventmodeling-K75KTNOO-elxVXXEe.js} +1 -1
  671. package/editor-web/assets/{file-question-mark-DlIjUK37.js → file-question-mark-PeZgyqkK.js} +1 -1
  672. package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +1 -0
  673. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CE5ut4C3.js → ganttDiagram-R7GPNTJY-CEogW3jW.js} +1 -1
  674. package/editor-web/assets/{gitGraph-VSP46ZUC-Dva3iGx2.js → gitGraph-VSP46ZUC-Bh9cRWFa.js} +1 -1
  675. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-CJXFsAWp.js → gitGraphDiagram-PDYL7XHY-BQAvdM_V.js} +1 -1
  676. package/editor-web/assets/{group-BdrTp7gi.js → group-DwM2yqU8.js} +1 -1
  677. package/editor-web/assets/hint-CbwoSBMw.js +1 -0
  678. package/editor-web/assets/index-CXisi0Cj.css +2 -0
  679. package/editor-web/assets/index-wMlfx8aT.js +28 -0
  680. package/editor-web/assets/{info-OHQRW6UA-BY0AOfex.js → info-OHQRW6UA-CdPrqere.js} +1 -1
  681. package/editor-web/assets/{infoDiagram-MVDRKAX5-4Up1gMvC.js → infoDiagram-MVDRKAX5-uwIMeP44.js} +1 -1
  682. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-BkvB9Qbn.js → ishikawaDiagram-HPEHV2GE-rtfvqK7E.js} +1 -1
  683. package/editor-web/assets/iso-UwGLGD3F.js +1 -0
  684. package/editor-web/assets/{italic-zw4_eUNF.js → italic-BV7iHxoP.js} +1 -1
  685. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BxV09WdR.js → journeyDiagram-BOSHW7O7-mmhfIyVG.js} +1 -1
  686. package/editor-web/assets/{kanban-definition-FNSA4HC5-zTJtIDPG.js → kanban-definition-FNSA4HC5-Fe7jBsi-.js} +1 -1
  687. package/editor-web/assets/{link-DopSU3aa.js → link-CFOv3nz-.js} +1 -1
  688. package/editor-web/assets/{mermaid-parser.core-BWT9UQh_.js → mermaid-parser.core-BxOSjBH9.js} +3 -3
  689. package/editor-web/assets/{mermaid.core-DFf_Vg5X.js → mermaid.core-BOln9YdH.js} +4 -4
  690. package/editor-web/assets/{mindmap-definition-6OY57UG3-BYexiugS.js → mindmap-definition-6OY57UG3-M3Q1LOtO.js} +1 -1
  691. package/editor-web/assets/minus-ngE8owxs.js +1 -0
  692. package/editor-web/assets/{packet-JDAUHWVQ-DX_kSrI6.js → packet-JDAUHWVQ-Dbb0TUG6.js} +1 -1
  693. package/editor-web/assets/{pegDiagram-ECIUJNBX-I3SrcMLp.js → pegDiagram-ECIUJNBX-BZMRpSFC.js} +1 -1
  694. package/editor-web/assets/{pie-XZMESJXO-BmAFSw3E.js → pie-XZMESJXO-Ctm9XdKp.js} +1 -1
  695. package/editor-web/assets/{pieDiagram-GNMPY74T-DIZKcme5.js → pieDiagram-GNMPY74T-cGbs5ZTl.js} +1 -1
  696. package/editor-web/assets/progress-DZQTiRLv.js +6 -0
  697. package/editor-web/assets/{quadrantDiagram-D57K4MC3-CO3oSqpQ.js → quadrantDiagram-D57K4MC3-BUe_zsxT.js} +1 -1
  698. package/editor-web/assets/{radar-ABXABTNO-D5CkFrrb.js → radar-ABXABTNO-CCmKtqLs.js} +1 -1
  699. package/editor-web/assets/{railroad-I3PHUGI6-BeKY1p0K.js → railroad-I3PHUGI6-k-yhjhjA.js} +1 -1
  700. package/editor-web/assets/{railroad-abnf-LNEFI6M7-CIYV9_3-.js → railroad-abnf-LNEFI6M7-B-PvntB3.js} +1 -1
  701. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DN0zDl6d.js → railroad-ebnf-DWYD2UWJ-Ds2rua1h.js} +1 -1
  702. package/editor-web/assets/{railroad-peg-JR7BVNR7-Bd_GcO24.js → railroad-peg-JR7BVNR7-jNZ2wEp2.js} +1 -1
  703. package/editor-web/assets/{railroadDiagram-Y72NRBL7-DlFoiMhb.js → railroadDiagram-Y72NRBL7-CTqSQ15w.js} +1 -1
  704. package/editor-web/assets/react-Byupo4pA.js +1 -0
  705. package/editor-web/assets/replace-CLLMtF4e.js +1 -0
  706. package/editor-web/assets/{requirementDiagram-EQYSW5RA-LWAEz8Gy.js → requirementDiagram-EQYSW5RA-CUblhR5M.js} +1 -1
  707. package/editor-web/assets/ribbon-DajdQ_Ya.js +1 -0
  708. package/editor-web/assets/row-Bei9HNEe.js +1 -0
  709. package/editor-web/assets/{sankeyDiagram-SY24JHO5-B_pZGwUK.js → sankeyDiagram-SY24JHO5-nSz6zDX3.js} +1 -1
  710. package/editor-web/assets/schemas-C21MyseF.js +1 -0
  711. package/editor-web/assets/{iso-ahTwmFwH.js → schemas-DlRAoVtq.js} +1 -1
  712. package/editor-web/assets/{scissors-B_xOiUhd.js → scissors-m6QcoEf2.js} +1 -1
  713. package/editor-web/assets/search-D75Bi2GU.js +1 -0
  714. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-bNhyCq0C.js → sequenceDiagram-BLEHNHQU-DxTpOYuo.js} +1 -1
  715. package/editor-web/assets/{session-Beijw9EK.js → session-BhClkDyr.js} +1 -1
  716. package/editor-web/assets/{sigma-DSUsJhMn.js → sigma-B4AWtnVA.js} +1 -1
  717. package/editor-web/assets/snapshots-DwGHDN3t.js +1 -0
  718. package/editor-web/assets/sound-DkR3qxSt.js +1 -0
  719. package/editor-web/assets/split-DBAbwPZ5.js +3 -0
  720. package/editor-web/assets/{square-arrow-out-up-right-DF5dvsSp.js → square-arrow-out-up-right-1NqFsNDe.js} +1 -1
  721. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DI-oM3qz.js → stateDiagram-v2-A6IESKWZ-C3e14iHY.js} +1 -1
  722. package/editor-web/assets/{sticky-note-BdkIu5_D.js → sticky-note-s4QfzaBB.js} +1 -1
  723. package/editor-web/assets/surface-CIF0Ae0z.js +1 -0
  724. package/editor-web/assets/swatch-BUzr_XmH.js +1 -0
  725. package/editor-web/assets/{swimlanes-B3ENRKFQ-awDmoLdW.js → swimlanes-B3ENRKFQ-DPPdzNzu.js} +1 -1
  726. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +8 -0
  727. package/editor-web/assets/switch-DrZxoPQS.js +1 -0
  728. package/editor-web/assets/{syntax-CU_WPKxt.js → syntax-emXV4DnN.js} +1 -1
  729. package/editor-web/assets/table-BW43XXVd.js +1 -0
  730. package/editor-web/assets/tabs-BwU2E7bU.js +1 -0
  731. package/editor-web/assets/text-wrap-Baus6l-V.js +1 -0
  732. package/editor-web/assets/textarea-BX_ax3X8.js +1 -0
  733. package/editor-web/assets/{timeline-definition-JXYKGLGB-CayduPvL.js → timeline-definition-JXYKGLGB-DRTJ1_Er.js} +1 -1
  734. package/editor-web/assets/tolerant-DM9s0Mt1.js +1 -0
  735. package/editor-web/assets/{treeView-D4JQ5SDB-BVEuNzCO.js → treeView-D4JQ5SDB-BYJ_m-i5.js} +1 -1
  736. package/editor-web/assets/{treemap-SAJKECNS-BOB14HP3.js → treemap-SAJKECNS-BcU6I6Rg.js} +1 -1
  737. package/editor-web/assets/type-CvZ0HZsV.js +41 -0
  738. package/editor-web/assets/{undo-2-C47jrRp5.js → undo-2-DCbMWoug.js} +1 -1
  739. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DxT99uaq.js → usecaseDiagram-WPOLBNNX-YV92pS4o.js} +1 -1
  740. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CWUKom-r.js → vennDiagram-Q3Y3IDCW-oAvfHZtf.js} +1 -1
  741. package/editor-web/assets/video-SJvDRCJK.js +1 -0
  742. package/editor-web/assets/{wardley-7MLQ67FV-BAQyTneD.js → wardley-7MLQ67FV-BLNiqxtt.js} +1 -1
  743. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-CiIYz4lZ.js → wardleyDiagram-IVAIDKWA-SppgC6xW.js} +1 -1
  744. package/editor-web/assets/{whole-word-D3ZAtnkw.js → whole-word-C9TkGBCY.js} +1 -1
  745. package/editor-web/assets/{words-0Ww2RyT4.js → words-BUlNNuH2.js} +3 -3
  746. package/editor-web/assets/words-zMedmPWc.js +3 -0
  747. package/editor-web/assets/workbook-BZKYx4WB.js +41 -0
  748. package/editor-web/assets/{xychartDiagram-4URNHDU4-D_D5IGmd.js → xychartDiagram-4URNHDU4-BHMn_jwJ.js} +1 -1
  749. package/editor-web/assets/{zoom-in-PgsC94hP.js → zoom-in-yAGKspfC.js} +1 -1
  750. package/editor-web/index.html +9 -8
  751. package/package.json +3 -3
  752. package/CHANGELOG.md +0 -243
  753. package/dist/commands/render.js +0 -3
  754. package/dist/node_modules/@allyhub/browser/dist/browser.d.ts +0 -24
  755. package/dist/node_modules/@allyhub/browser/dist/capture.d.ts +0 -61
  756. package/dist/node_modules/@allyhub/browser/dist/cdp.d.ts +0 -51
  757. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +0 -29
  758. package/dist/node_modules/@allyhub/browser/dist/flags.d.ts +0 -13
  759. package/dist/node_modules/@allyhub/browser/dist/frames.d.ts +0 -35
  760. package/dist/node_modules/@allyhub/browser/dist/html.d.ts +0 -19
  761. package/dist/node_modules/@allyhub/browser/dist/index.d.ts +0 -10
  762. package/dist/node_modules/@allyhub/browser/dist/launch.d.ts +0 -35
  763. package/dist/node_modules/@allyhub/browser/dist/page.d.ts +0 -74
  764. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +0 -18
  765. package/dist/node_modules/@allyhub/browser/dist/server.d.ts +0 -26
  766. package/dist/node_modules/@allyhub/build/dist/build-plugins.d.ts +0 -91
  767. package/dist/node_modules/@allyhub/build/dist/cli-command.d.ts +0 -84
  768. package/dist/node_modules/@allyhub/build/dist/code.d.ts +0 -26
  769. package/dist/node_modules/@allyhub/build/dist/content.d.ts +0 -64
  770. package/dist/node_modules/@allyhub/build/dist/data.d.ts +0 -11
  771. package/dist/node_modules/@allyhub/build/dist/evaluate.d.ts +0 -44
  772. package/dist/node_modules/@allyhub/build/dist/file-check.d.ts +0 -35
  773. package/dist/node_modules/@allyhub/build/dist/files.d.ts +0 -4
  774. package/dist/node_modules/@allyhub/build/dist/fonts.d.ts +0 -26
  775. package/dist/node_modules/@allyhub/build/dist/generated.d.ts +0 -29
  776. package/dist/node_modules/@allyhub/build/dist/imports.d.ts +0 -17
  777. package/dist/node_modules/@allyhub/build/dist/index.d.ts +0 -37
  778. package/dist/node_modules/@allyhub/build/dist/inspect-view.d.ts +0 -119
  779. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +0 -530
  780. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +0 -9
  781. package/dist/node_modules/@allyhub/build/dist/matrix.d.ts +0 -19
  782. package/dist/node_modules/@allyhub/build/dist/media.d.ts +0 -10
  783. package/dist/node_modules/@allyhub/build/dist/messages.d.ts +0 -60
  784. package/dist/node_modules/@allyhub/build/dist/meta-worker.d.ts +0 -59
  785. package/dist/node_modules/@allyhub/build/dist/meta.d.ts +0 -24
  786. package/dist/node_modules/@allyhub/build/dist/model-info.d.ts +0 -6
  787. package/dist/node_modules/@allyhub/build/dist/move-refs.d.ts +0 -16
  788. package/dist/node_modules/@allyhub/build/dist/places.d.ts +0 -23
  789. package/dist/node_modules/@allyhub/build/dist/plugin.d.ts +0 -50
  790. package/dist/node_modules/@allyhub/build/dist/prepare.d.ts +0 -138
  791. package/dist/node_modules/@allyhub/build/dist/project-root.d.ts +0 -19
  792. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +0 -136
  793. package/dist/node_modules/@allyhub/build/dist/references.d.ts +0 -6
  794. package/dist/node_modules/@allyhub/build/dist/scan.d.ts +0 -45
  795. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +0 -80
  796. package/dist/node_modules/@allyhub/build/dist/takes.d.ts +0 -9
  797. package/dist/node_modules/@allyhub/build/dist/types.d.ts +0 -11
  798. package/dist/node_modules/@allyhub/build/dist/uses.d.ts +0 -44
  799. package/dist/node_modules/@allyhub/build/dist/version.d.ts +0 -56
  800. package/dist/node_modules/@allyhub/build/dist/vite.d.ts +0 -115
  801. package/dist/node_modules/@allyhub/build/dist/work.d.ts +0 -38
  802. package/dist/node_modules/@allyhub/cloud/dist/blobs.d.ts +0 -48
  803. package/dist/node_modules/@allyhub/cloud/dist/call.d.ts +0 -91
  804. package/dist/node_modules/@allyhub/cloud/dist/catalog.d.ts +0 -12
  805. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +0 -64
  806. package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +0 -40
  807. package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +0 -76
  808. package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +0 -14
  809. package/dist/node_modules/@allyhub/cloud/dist/errors.d.ts +0 -24
  810. package/dist/node_modules/@allyhub/cloud/dist/hashes.d.ts +0 -43
  811. package/dist/node_modules/@allyhub/cloud/dist/index.d.ts +0 -19
  812. package/dist/node_modules/@allyhub/cloud/dist/keychain.d.ts +0 -18
  813. package/dist/node_modules/@allyhub/cloud/dist/loopback.d.ts +0 -22
  814. package/dist/node_modules/@allyhub/cloud/dist/mail.d.ts +0 -16
  815. package/dist/node_modules/@allyhub/cloud/dist/pkce.d.ts +0 -11
  816. package/dist/node_modules/@allyhub/cloud/dist/records.d.ts +0 -42
  817. package/dist/node_modules/@allyhub/cloud/dist/signin-worker.d.ts +0 -2
  818. package/dist/node_modules/@allyhub/cloud/dist/signin.d.ts +0 -48
  819. package/dist/node_modules/@allyhub/cloud/dist/sites.d.ts +0 -20
  820. package/dist/node_modules/@allyhub/cloud/dist/token.d.ts +0 -20
  821. package/dist/node_modules/@allyhub/cloud/dist/uploads.d.ts +0 -58
  822. package/dist/node_modules/@allyhub/cloud/dist/voice.d.ts +0 -22
  823. package/dist/node_modules/@allyhub/jobs/dist/index.d.ts +0 -3
  824. package/dist/node_modules/@allyhub/jobs/dist/jobs.d.ts +0 -139
  825. package/dist/node_modules/@allyhub/jobs/dist/show.d.ts +0 -41
  826. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +0 -195
  827. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +0 -8
  828. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +0 -16
  829. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +0 -4
  830. package/dist/node_modules/@allyhub/media/dist/analysis.d.ts +0 -25
  831. package/dist/node_modules/@allyhub/media/dist/audio.d.ts +0 -16
  832. package/dist/node_modules/@allyhub/media/dist/beats.d.ts +0 -100
  833. package/dist/node_modules/@allyhub/media/dist/cache.d.ts +0 -26
  834. package/dist/node_modules/@allyhub/media/dist/errors.d.ts +0 -34
  835. package/dist/node_modules/@allyhub/media/dist/fetch.d.ts +0 -11
  836. package/dist/node_modules/@allyhub/media/dist/grid.d.ts +0 -101
  837. package/dist/node_modules/@allyhub/media/dist/index.d.ts +0 -21
  838. package/dist/node_modules/@allyhub/media/dist/picture.d.ts +0 -130
  839. package/dist/node_modules/@allyhub/media/dist/probe.d.ts +0 -52
  840. package/dist/node_modules/@allyhub/media/dist/progress.d.ts +0 -16
  841. package/dist/node_modules/@allyhub/media/dist/run.d.ts +0 -25
  842. package/dist/node_modules/@allyhub/media/dist/sheet.d.ts +0 -67
  843. package/dist/node_modules/@allyhub/media/dist/shots.d.ts +0 -110
  844. package/dist/node_modules/@allyhub/media/dist/sync.d.ts +0 -156
  845. package/dist/node_modules/@allyhub/media/dist/tools.d.ts +0 -25
  846. package/dist/node_modules/@allyhub/media/dist/video.d.ts +0 -35
  847. package/dist/node_modules/@allyhub/media/dist/vision/cache.d.ts +0 -42
  848. package/dist/node_modules/@allyhub/media/dist/vision/probe.d.ts +0 -39
  849. package/dist/node_modules/@allyhub/media/dist/vision/types.d.ts +0 -2
  850. package/dist/node_modules/@allyhub/media/dist/voice-shape.d.ts +0 -51
  851. package/dist/node_modules/@allyhub/model/dist/authoring.d.ts +0 -48
  852. package/dist/node_modules/@allyhub/model/dist/bevel-attributes.d.ts +0 -19
  853. package/dist/node_modules/@allyhub/model/dist/bevel-collapse.d.ts +0 -12
  854. package/dist/node_modules/@allyhub/model/dist/bevel-corner-plan.d.ts +0 -24
  855. package/dist/node_modules/@allyhub/model/dist/bevel-deform.d.ts +0 -5
  856. package/dist/node_modules/@allyhub/model/dist/bevel-fans.d.ts +0 -12
  857. package/dist/node_modules/@allyhub/model/dist/bevel-junction.d.ts +0 -16
  858. package/dist/node_modules/@allyhub/model/dist/bevel-marks.d.ts +0 -14
  859. package/dist/node_modules/@allyhub/model/dist/bevel-metric.d.ts +0 -4
  860. package/dist/node_modules/@allyhub/model/dist/bevel-mixed.d.ts +0 -12
  861. package/dist/node_modules/@allyhub/model/dist/bevel-offsets.d.ts +0 -22
  862. package/dist/node_modules/@allyhub/model/dist/bevel-patch.d.ts +0 -45
  863. package/dist/node_modules/@allyhub/model/dist/bevel-profile.d.ts +0 -13
  864. package/dist/node_modules/@allyhub/model/dist/bevel-projection.d.ts +0 -10
  865. package/dist/node_modules/@allyhub/model/dist/bevel-reflex.d.ts +0 -10
  866. package/dist/node_modules/@allyhub/model/dist/bevel-square-out.d.ts +0 -18
  867. package/dist/node_modules/@allyhub/model/dist/bevel-strips.d.ts +0 -8
  868. package/dist/node_modules/@allyhub/model/dist/bmesh-cycles.d.ts +0 -52
  869. package/dist/node_modules/@allyhub/model/dist/build-cache.d.ts +0 -42
  870. package/dist/node_modules/@allyhub/model/dist/build-job.d.ts +0 -34
  871. package/dist/node_modules/@allyhub/model/dist/build-worker.d.ts +0 -2
  872. package/dist/node_modules/@allyhub/model/dist/build.d.ts +0 -67
  873. package/dist/node_modules/@allyhub/model/dist/cancel.d.ts +0 -8
  874. package/dist/node_modules/@allyhub/model/dist/curve-math.d.ts +0 -21
  875. package/dist/node_modules/@allyhub/model/dist/curve-mesh.d.ts +0 -30
  876. package/dist/node_modules/@allyhub/model/dist/evaluation-guard.d.ts +0 -11
  877. package/dist/node_modules/@allyhub/model/dist/export.d.ts +0 -12
  878. package/dist/node_modules/@allyhub/model/dist/mesh-queries.d.ts +0 -34
  879. package/dist/node_modules/@allyhub/model/dist/names.d.ts +0 -9
  880. package/dist/node_modules/@allyhub/model/dist/png.d.ts +0 -12
  881. package/dist/node_modules/@allyhub/model/dist/polygon-triangulation.d.ts +0 -4
  882. package/dist/node_modules/@allyhub/model/dist/program-location.d.ts +0 -7
  883. package/dist/node_modules/@allyhub/model/dist/report.d.ts +0 -70
  884. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +0 -21
  885. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +0 -4
  886. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +0 -17
  887. package/dist/node_modules/@allyhub/piece/dist/page/runtimes.d.ts +0 -9
  888. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +0 -661
  889. package/dist/node_modules/@allyhub/protocol/dist/account.js +0 -2
  890. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +0 -30
  891. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +0 -200
  892. package/dist/node_modules/@allyhub/protocol/dist/blobs.d.ts +0 -44
  893. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +0 -68
  894. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.d.ts +0 -77
  895. package/dist/node_modules/@allyhub/protocol/dist/cloud-computer.js +0 -2
  896. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +0 -577
  897. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +0 -674
  898. package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +0 -7
  899. package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +0 -803
  900. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +0 -103
  901. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +0 -247
  902. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +0 -8
  903. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +0 -38
  904. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +0 -91
  905. package/dist/node_modules/@allyhub/protocol/dist/jsonrpc.d.ts +0 -83
  906. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +0 -144
  907. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +0 -274
  908. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +0 -211
  909. package/dist/node_modules/@allyhub/protocol/dist/open.d.ts +0 -13
  910. package/dist/node_modules/@allyhub/protocol/dist/paywall.d.ts +0 -134
  911. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +0 -59
  912. package/dist/node_modules/@allyhub/protocol/dist/peer.js +0 -2
  913. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +0 -21
  914. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +0 -125
  915. package/dist/node_modules/@allyhub/protocol/dist/purposes.d.ts +0 -47
  916. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +0 -191
  917. package/dist/node_modules/@allyhub/protocol/dist/routes.d.ts +0 -14
  918. package/dist/node_modules/@allyhub/protocol/dist/routes.js +0 -2
  919. package/dist/node_modules/@allyhub/protocol/dist/runtimes.d.ts +0 -96
  920. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +0 -35
  921. package/dist/node_modules/@allyhub/protocol/dist/shape.js +0 -2
  922. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +0 -156
  923. package/dist/node_modules/@allyhub/protocol/dist/shares.js +0 -2
  924. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.d.ts +0 -34
  925. package/dist/node_modules/@allyhub/protocol/dist/sidebar-deletion.js +0 -2
  926. package/dist/node_modules/@allyhub/protocol/dist/sites.d.ts +0 -298
  927. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +0 -503
  928. package/dist/node_modules/@allyhub/protocol/dist/sources.d.ts +0 -14
  929. package/dist/node_modules/@allyhub/protocol/dist/studio-server.d.ts +0 -264
  930. package/dist/node_modules/@allyhub/protocol/dist/studio-server.js +0 -2
  931. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.d.ts +0 -18
  932. package/dist/node_modules/@allyhub/protocol/dist/studio-tool-calls.js +0 -2
  933. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.d.ts +0 -97
  934. package/dist/node_modules/@allyhub/protocol/dist/studio-window-requests.js +0 -2
  935. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +0 -196
  936. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +0 -578
  937. package/dist/node_modules/@allyhub/protocol/dist/turns.d.ts +0 -71
  938. package/dist/node_modules/@allyhub/protocol/dist/turns.js +0 -2
  939. package/dist/node_modules/@allyhub/runtimes/dist/bundled.d.ts +0 -10
  940. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +0 -14
  941. package/dist/node_modules/@allyhub/runtimes/dist/download.d.ts +0 -38
  942. package/dist/node_modules/@allyhub/runtimes/dist/errors.d.ts +0 -20
  943. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +0 -15
  944. package/dist/node_modules/@allyhub/runtimes/dist/home.d.ts +0 -2
  945. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +0 -12
  946. package/dist/node_modules/@allyhub/runtimes/dist/lock.d.ts +0 -14
  947. package/dist/node_modules/@allyhub/runtimes/dist/manifest.d.ts +0 -3
  948. package/dist/node_modules/@allyhub/runtimes/dist/node-program.d.ts +0 -12
  949. package/dist/node_modules/@allyhub/runtimes/dist/packages.d.ts +0 -101
  950. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +0 -73
  951. package/dist/node_modules/@allyhub/runtimes/dist/unpack.d.ts +0 -14
  952. package/dist/node_modules/@allyhub/scenery-host/dist/allyhub.d.ts +0 -20
  953. package/dist/node_modules/@allyhub/scenery-host/dist/bake/digest.d.ts +0 -14
  954. package/dist/node_modules/@allyhub/scenery-host/dist/bake/envmap.d.ts +0 -21
  955. package/dist/node_modules/@allyhub/scenery-host/dist/bake/run.d.ts +0 -63
  956. package/dist/node_modules/@allyhub/scenery-host/dist/budget.d.ts +0 -40
  957. package/dist/node_modules/@allyhub/scenery-host/dist/bundle.d.ts +0 -92
  958. package/dist/node_modules/@allyhub/scenery-host/dist/commands.d.ts +0 -54
  959. package/dist/node_modules/@allyhub/scenery-host/dist/draw2d.d.ts +0 -47
  960. package/dist/node_modules/@allyhub/scenery-host/dist/glass.d.ts +0 -39
  961. package/dist/node_modules/@allyhub/scenery-host/dist/index.d.ts +0 -25
  962. package/dist/node_modules/@allyhub/scenery-host/dist/inventory.d.ts +0 -18
  963. package/dist/node_modules/@allyhub/scenery-host/dist/layer/fidelity.d.ts +0 -70
  964. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +0 -7
  965. package/dist/node_modules/@allyhub/scenery-host/dist/layer/moire.d.ts +0 -6
  966. package/dist/node_modules/@allyhub/scenery-host/dist/measure/contacts.d.ts +0 -45
  967. package/dist/node_modules/@allyhub/scenery-host/dist/measure/health.d.ts +0 -10
  968. package/dist/node_modules/@allyhub/scenery-host/dist/measure/index.d.ts +0 -110
  969. package/dist/node_modules/@allyhub/scenery-host/dist/measure/relations.d.ts +0 -17
  970. package/dist/node_modules/@allyhub/scenery-host/dist/measure/solid.d.ts +0 -32
  971. package/dist/node_modules/@allyhub/scenery-host/dist/measure/support.d.ts +0 -11
  972. package/dist/node_modules/@allyhub/scenery-host/dist/model-stage.d.ts +0 -32
  973. package/dist/node_modules/@allyhub/scenery-host/dist/queries/inventory.d.ts +0 -5
  974. package/dist/node_modules/@allyhub/scenery-host/dist/queries/map.d.ts +0 -5
  975. package/dist/node_modules/@allyhub/scenery-host/dist/queries/view.d.ts +0 -10
  976. package/dist/node_modules/@allyhub/scenery-host/dist/scene.d.ts +0 -35
  977. package/dist/node_modules/@allyhub/scenery-host/dist/screen-dom.d.ts +0 -24
  978. package/dist/node_modules/@allyhub/scenery-host/dist/stage/bakes.d.ts +0 -42
  979. package/dist/node_modules/@allyhub/scenery-host/dist/stage/index.d.ts +0 -6
  980. package/dist/node_modules/@allyhub/scenery-host/dist/stage/page.d.ts +0 -70
  981. package/dist/node_modules/@allyhub/scenery-host/dist/stage/solve.d.ts +0 -49
  982. package/dist/node_modules/@allyhub/scenery-host/dist/stage/version.d.ts +0 -73
  983. package/dist/node_modules/@allyhub/scenery-host/dist/stage/view.d.ts +0 -18
  984. package/dist/node_modules/@allyhub/scenery-host/dist/steady.d.ts +0 -4
  985. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +0 -134
  986. package/dist/node_modules/@allyhub/video-extension/dist/inspect/motion.js +0 -4
  987. package/dist/node_modules/@allyhub/video-measure/dist/still.js +0 -2
  988. package/editor-web/assets/arrow-down-B8VUPCGi.js +0 -1
  989. package/editor-web/assets/arrow-up-Ds4juY8X.js +0 -1
  990. package/editor-web/assets/article-CS48wwvk.js +0 -3
  991. package/editor-web/assets/article-Cyle57uq.js +0 -7
  992. package/editor-web/assets/bar-button-J9vbfzTx.js +0 -1
  993. package/editor-web/assets/calc-worker-BdHh5LXM.js +0 -45
  994. package/editor-web/assets/channel-HUlo15J7.js +0 -1
  995. package/editor-web/assets/chart-amT4lgX3.js +0 -2
  996. package/editor-web/assets/chart-file-CfbWK9l1.js +0 -1
  997. package/editor-web/assets/code-CD-CbJG9.js +0 -1
  998. package/editor-web/assets/collaborator-BU4qU7O3.js +0 -1
  999. package/editor-web/assets/deck-CtEtDHo2.js +0 -1
  1000. package/editor-web/assets/dist-BBshIz1Q.js +0 -5
  1001. package/editor-web/assets/dist-BI8QjOsV.js +0 -1
  1002. package/editor-web/assets/dist-BajH5QfK.js +0 -24
  1003. package/editor-web/assets/dist-Bl74xqMW.js +0 -19
  1004. package/editor-web/assets/dist-BrUtQth3.js +0 -18
  1005. package/editor-web/assets/dist-CN5A7Au2.js +0 -1
  1006. package/editor-web/assets/dist-CcL6r6l3.js +0 -1
  1007. package/editor-web/assets/dist-D2E3cgRP.js +0 -4
  1008. package/editor-web/assets/dist-D3C6FyrO.js +0 -82
  1009. package/editor-web/assets/dist-DGKjn59H.js +0 -16
  1010. package/editor-web/assets/dist-NQNQ5HqZ.js +0 -17
  1011. package/editor-web/assets/dist-SV0sOVIC.js +0 -43
  1012. package/editor-web/assets/dist-YW8hS4IM.js +0 -9
  1013. package/editor-web/assets/dist-Y_XZZa8q.js +0 -531
  1014. package/editor-web/assets/dist-ZrBAbqyJ.js +0 -3
  1015. package/editor-web/assets/dist-d4dayaWE.js +0 -17
  1016. package/editor-web/assets/dist-elglzHMT.js +0 -6
  1017. package/editor-web/assets/dist-hHcrvNn9.js +0 -1
  1018. package/editor-web/assets/esm-DzxAod8Q.js +0 -21
  1019. package/editor-web/assets/file-exclamation-point-_L3ElCJ5.js +0 -1
  1020. package/editor-web/assets/flowDiagram-IUGLLWBU-tz5ewhC5.js +0 -1
  1021. package/editor-web/assets/hint-rlht0uxG.js +0 -1
  1022. package/editor-web/assets/index-Dvh1t1om.css +0 -2
  1023. package/editor-web/assets/index-q7X6hdHp.js +0 -28
  1024. package/editor-web/assets/minus-CbPnUIOy.js +0 -1
  1025. package/editor-web/assets/progress-CwKcXARv.js +0 -6
  1026. package/editor-web/assets/props-form-DUFxM5eb.js +0 -1
  1027. package/editor-web/assets/react-Edyoga_4.js +0 -1
  1028. package/editor-web/assets/row-C_svyL8o.js +0 -1
  1029. package/editor-web/assets/schemas-moE_A7Nj.js +0 -1
  1030. package/editor-web/assets/search-Ba2BbT6T.js +0 -1
  1031. package/editor-web/assets/slides-oQ_C0SVJ.js +0 -1
  1032. package/editor-web/assets/snapshots-Dd0Wd_qM.js +0 -1
  1033. package/editor-web/assets/sound-bTlco_K3.js +0 -1
  1034. package/editor-web/assets/split-zARio3J8.js +0 -3
  1035. package/editor-web/assets/strikethrough-BwXWi4zg.js +0 -1
  1036. package/editor-web/assets/surface-DtCjIlrq.js +0 -1
  1037. package/editor-web/assets/svg-CWIBMIQ9.js +0 -1
  1038. package/editor-web/assets/swatch-DhztHwPU.js +0 -1
  1039. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-X35m3xN6.js +0 -8
  1040. package/editor-web/assets/switch-8MU4Nfxe.js +0 -1
  1041. package/editor-web/assets/table-DRbddzx0.js +0 -1
  1042. package/editor-web/assets/tabs-BHBvbekZ.js +0 -1
  1043. package/editor-web/assets/tag-CIfWT8B_.js +0 -1
  1044. package/editor-web/assets/text-align-start-Cic2-TLh.js +0 -1
  1045. package/editor-web/assets/textarea-D7TnPwv1.js +0 -1
  1046. package/editor-web/assets/video-oJ3qa1Qv.js +0 -1
  1047. package/editor-web/assets/words-XlXG79Ur.js +0 -3
  1048. package/editor-web/assets/workbook-DznVDqoE.js +0 -45
  1049. package/editor-web/assets/x-DlhyIKuu.js +0 -41
  1050. /package/dist/node_modules/@allyhub/{protocol/dist/runtimes.js → runtimes/dist/schema.js} +0 -0
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{createHash as b}from"node:crypto";import{chmod as U,mkdir as F,readFile as x,realpath as S,stat as P,writeFile as C}from"node:fs/promises";import{basename as D,dirname as N,extname as _,isAbsolute as L,join as R,relative as A,resolve as g}from"node:path";import{EXIT as $,FILES_PATH as M,FILE_MAX_BYTES as O,FileContentResponseSchema as z,FileCreatedSchema as v,UploadedFileSchema as X,fileContentPath as q,fileDonePath as H}from"@allyhub/protocol";import{CloudError as p}from"./errors.js";export const UPLOAD_TYPES={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm"},REUSE_LEFT_MS=3600*1e3;const K=720*60*60*1e3;export const UPLOAD_CONCURRENCY=4;const Y=Object.keys(UPLOAD_TYPES).map(e=>`.${e}`).join(", ");async function j(e){const t=(await e.key())?.account??"",i=b("sha256").update(`${e.url}
3
- ${t}`).digest("hex").slice(0,12);return R(e.config.cacheDir,`uploads-${i}.json`)}async function E(e){try{const t=JSON.parse(await x(e,"utf8"));return{files:t.files??{},urls:t.urls??{}}}catch{return{files:{},urls:{}}}}async function J(e,t){const i=Date.now();for(const[c,o]of Object.entries(t.urls))i-Date.parse(o.expiresAt??o.at)>K&&Reflect.deleteProperty(t.urls,c);await F(N(e),{recursive:!0}),await C(e,JSON.stringify(t),{mode:384}),await U(e,384)}export function urlExpiry(e){let t;try{t=new URL(e).searchParams}catch{return}const i=/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/u.exec(t.get("X-Amz-Date")??""),c=Number(t.get("X-Amz-Expires"));if(!i||!Number.isFinite(c)||c<=0)return;const[o,r,l,a,n,u]=i.slice(1).map(Number);return new Date(Date.UTC(o,r-1,l,a,n,u)+c*1e3).toISOString()}const T=async e=>await S(g(e)).catch(()=>g(e)),y=(e,t)=>{const i=A(e,t);return i.startsWith("..")||L(i)},w=(e,t)=>new p("bad-input",e,{exit:$.usage,...t===void 0?{}:{hint:t}});async function W(e,t){const i=g(t.base,e),c=()=>w(`${e} is not inside ${String(t.inside)}.`,"Upload a file of the project.");if(t.inside!==void 0&&y(g(t.inside),i))throw c();const o=await P(i).catch(()=>{});if(!o?.isFile())throw w(`There is no file ${i}.`,"A relative path is read from the folder it is run in.");const r=await S(i);if(t.inside!==void 0&&y(await T(t.inside),r))throw c();const l=_(r).slice(1).toLowerCase(),a=UPLOAD_TYPES[l];if(a===void 0)throw w(`${e} is a${l?` .${l}`:"n unnamed"} file; an upload is one of ${Y}.`,"Convert it first, for example with ffmpeg.");if(o.size>O)throw w(`${e} is ${String(o.size)} bytes; AllyHub keeps files of at most ${String(O)}.`,"Make it smaller first, for example with ffmpeg.");const n=await x(r);return{given:e,path:r,type:a,sha256:b("sha256").update(n).digest("hex"),bytes:n}}async function B(e,t,i){const c=new Array(e.length);let o=0;const r=async()=>{for(;o<e.length;){const l=o++;c[l]=await i(e[l])}};return await Promise.all(Array.from({length:Math.min(t,e.length)},r)),c}async function k(e,t,i,c){const o=i.files[t.sha256];if(o&&!c)return{fileId:o.fileId,known:!0};const r={name:D(t.path),size:t.bytes.length,sha256:t.sha256,contentType:t.type},l=v.parse(await e.json(M,{method:"POST",body:r}));if(l.upload!==null){const n=await e.config.fetch(l.upload.url,{method:"PUT",headers:l.upload.headers,body:new Uint8Array(t.bytes),signal:AbortSignal.timeout(3e5)});if(!n.ok)throw new p("upload-failed",`Storage refused ${t.given}: ${String(n.status)} ${(await n.text()).slice(0,200)}`,{exit:$.platform})}const a=X.parse(await e.json(H(l.id),{method:"POST"}));return i.files[t.sha256]={fileId:a.id,path:t.path,bytes:t.bytes.length},{fileId:a.id,known:!1}}const I=async(e,t)=>z.parse(await e.json(q(t,"inline"))).url;export async function uploadFiles(e,t,i){if(t.length===0)throw w("Name at least one file to upload.");const c=[];for(const a of t)c.push(await W(a,{base:i.base,...i.inside===void 0?{}:{inside:i.inside}}));await e.requireKey();const o=await j(e),r=await E(o),l=await B(c,i.concurrency??UPLOAD_CONCURRENCY,async a=>{const n=(s,d,f,m,h)=>({ok:!0,file:a.given,path:a.path,fileId:s,url:d,...f===void 0?{}:{expiresAt:f},sha256:a.sha256,bytes:a.bytes.length,contentType:a.type,known:m,reused:h}),u=r.files[a.sha256];if(u){const s=Date.now(),d=Object.entries(r.urls).find(([,f])=>f.sha256===a.sha256&&f.expiresAt!==void 0&&Date.parse(f.expiresAt)-s>=REUSE_LEFT_MS);if(d)return u.path=a.path,n(u.fileId,d[0],d[1].expiresAt,!0,!0)}try{let s=await k(e,a,r,!1),d;try{d=await I(e,s.fileId)}catch(h){if(!s.known||!(h instanceof p)||h.status!==404)throw h;s=await k(e,a,r,!0),d=await I(e,s.fileId)}const f=urlExpiry(d);r.urls[d]={sha256:a.sha256,...f===void 0?{}:{expiresAt:f},at:new Date().toISOString()};const m=r.files[a.sha256];return m&&(m.path=a.path),n(s.fileId,d,f,s.known,!1)}catch(s){if(!(s instanceof p)||s.code==="not-signed-in")throw s;return{ok:!1,file:a.given,error:new p(s.code==="api-error"?"upload-failed":s.code,`Uploading ${a.given} failed. ${s.message}`,{exit:s.exit,...s.hint?{hint:s.hint}:{}})}}});return await J(o,r),l}export async function withKnownUploads(e,t,i){const c=await E(await j(e)),o=await T(i),r=n=>y(o,n)?n:A(o,n),l=new Map;for(const[n,u]of Object.entries(c.urls)){const s=c.files[u.sha256];s&&l.set(n,{uploaded:r(s.path),sha256:u.sha256,bytes:s.bytes})}const a=n=>typeof n=="string"?l.get(n)??n:Array.isArray(n)?n.map(a):typeof n=="object"&&n!==null?Object.fromEntries(Object.entries(n).map(([u,s])=>[u,a(s)])):n;return a(t)}
2
+ import{createHash as b}from"node:crypto";import{chmod as F,mkdir as C,readFile as x,realpath as S,stat as P,writeFile as U}from"node:fs/promises";import{basename as _,dirname as D,extname as M,isAbsolute as L,join as N,relative as O,resolve as m}from"node:path";import{EXIT as j}from"@allyhub/protocol/cli";import{FILES_PATH as R,FILE_MAX_BYTES as A,FileContentResponseSchema as v,FileCreatedSchema as z,UploadedFileSchema as H,fileContentPath as K,fileDonePath as Y,signedUntil as q}from"@allyhub/protocol/cloud";import{CloudError as g}from"./errors.js";import{putToStorage as J}from"./storage.js";export const UPLOAD_TYPES={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",mp4:"video/mp4",mov:"video/quicktime",webm:"video/webm"},REUSE_LEFT_MS=720*60*1e3;const W=720*60*60*1e3;export const UPLOAD_CONCURRENCY=4;const X=Object.keys(UPLOAD_TYPES).map(e=>`.${e}`).join(", ");async function $(e){const t=(await e.key())?.account??"",n=b("sha256").update(`${e.url}
3
+ ${t}`).digest("hex").slice(0,12);return N(e.config.cacheDir,`uploads-${n}.json`)}async function E(e){try{const t=JSON.parse(await x(e,"utf8"));return{files:t.files??{},urls:t.urls??{}}}catch{return{files:{},urls:{}}}}async function B(e,t){const n=Date.now();for(const[l,s]of Object.entries(t.urls))n-Date.parse(s.expiresAt??s.at)>W&&Reflect.deleteProperty(t.urls,l);await C(D(e),{recursive:!0}),await U(e,JSON.stringify(t),{mode:384}),await F(e,384)}export const urlExpiry=e=>q(e)?.toISOString();const I=async e=>await S(m(e)).catch(()=>m(e)),y=(e,t)=>{const n=O(e,t);return n.startsWith("..")||L(n)},p=(e,t)=>new g("bad-input",e,{exit:j.usage,...t===void 0?{}:{hint:t}});async function G(e,t){const n=m(t.base,e),l=()=>p(`${e} is not inside ${String(t.inside)}.`,"Upload a file of the project.");if(t.inside!==void 0&&y(m(t.inside),n))throw l();const s=await P(n).catch(()=>{});if(!s?.isFile())throw p(`There is no file ${n}.`,"A relative path is read from the folder it is run in.");const r=await S(n);if(t.inside!==void 0&&y(await I(t.inside),r))throw l();const c=M(r).slice(1).toLowerCase(),a=UPLOAD_TYPES[c];if(a===void 0)throw p(`${e} is a${c?` .${c}`:"n unnamed"} file; an upload is one of ${X}.`,"Convert it first, for example with ffmpeg.");if(s.size>A)throw p(`${e} is ${String(s.size)} bytes; AllyHub keeps files of at most ${String(A)}.`,"Make it smaller first, for example with ffmpeg.");const o=await x(r);return{given:e,path:r,type:a,sha256:b("sha256").update(o).digest("hex"),bytes:o}}async function Q(e,t,n){const l=new Array(e.length);let s=0;const r=async()=>{for(;s<e.length;){const c=s++;l[c]=await n(e[c])}};return await Promise.all(Array.from({length:Math.min(t,e.length)},r)),l}async function k(e,t,n,l){const s=n.files[t.sha256];if(s&&!l)return{fileId:s.fileId,known:!0};const r={name:_(t.path),size:t.bytes.length,sha256:t.sha256,contentType:t.type},c=z.parse(await e.json(R,{method:"POST",body:r}));c.upload!==null&&await J(e.config.fetch,c.upload.url,{headers:c.upload.headers,body:t.bytes,timeoutMs:3e5,what:t.given,code:"upload-failed",exit:j.platform});const a=H.parse(await e.json(Y(c.id),{method:"POST"}));return n.files[t.sha256]={fileId:a.id,path:t.path,bytes:t.bytes.length},{fileId:a.id,known:!1}}const T=async(e,t)=>v.parse(await e.json(K(t,"inline"))).url;export async function uploadFiles(e,t,n){if(t.length===0)throw p("Name at least one file to upload.");const l=[];for(const a of t)l.push(await G(a,{base:n.base,...n.inside===void 0?{}:{inside:n.inside}}));await e.requireKey();const s=await $(e),r=await E(s),c=await Q(l,n.concurrency??UPLOAD_CONCURRENCY,async a=>{const o=(i,d,f,w,h)=>({ok:!0,file:a.given,path:a.path,fileId:i,url:d,...f===void 0?{}:{expiresAt:f},sha256:a.sha256,bytes:a.bytes.length,contentType:a.type,known:w,reused:h}),u=r.files[a.sha256];if(u){const i=Date.now(),d=Object.entries(r.urls).find(([,f])=>f.sha256===a.sha256&&f.expiresAt!==void 0&&Date.parse(f.expiresAt)-i>=REUSE_LEFT_MS);if(d)return u.path=a.path,o(u.fileId,d[0],d[1].expiresAt,!0,!0)}try{let i=await k(e,a,r,!1),d;try{d=await T(e,i.fileId)}catch(h){if(!i.known||!(h instanceof g)||h.status!==404)throw h;i=await k(e,a,r,!0),d=await T(e,i.fileId)}const f=urlExpiry(d);r.urls[d]={sha256:a.sha256,...f===void 0?{}:{expiresAt:f},at:new Date().toISOString()};const w=r.files[a.sha256];return w&&(w.path=a.path),o(i.fileId,d,f,i.known,!1)}catch(i){if(!(i instanceof g)||i.code==="not-signed-in")throw i;return{ok:!1,file:a.given,error:new g(i.code==="api-error"?"upload-failed":i.code,`Uploading ${a.given} failed. ${i.message}`,{exit:i.exit,...i.hint?{hint:i.hint}:{}})}}});return await B(s,r),c}export async function withKnownUploads(e,t,n){const l=await E(await $(e)),s=await I(n),r=o=>y(s,o)?o:O(s,o),c=new Map;for(const[o,u]of Object.entries(l.urls)){const i=l.files[u.sha256];i&&c.set(o,{uploaded:r(i.path),sha256:u.sha256,bytes:i.bytes})}const a=o=>typeof o=="string"?c.get(o)??o:Array.isArray(o)?o.map(a):typeof o=="object"&&o!==null?Object.fromEntries(Object.entries(o).map(([u,i])=>[u,a(i)])):o;return a(t)}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{copyFile as c,mkdir as p,mkdtemp as s,rm as w}from"node:fs/promises";import{tmpdir as v}from"node:os";import{dirname as x,extname as I,join as r}from"node:path";import{WORK_DIR as g,genFileFor as k}from"@allyhub/formats";import{EXIT as F}from"@allyhub/protocol";import{callTool as b}from"./call.js";import{CloudError as h}from"./errors.js";import{toolWords as D,writeWords as W}from"./records.js";export function sayInput(o){return{...o.params??{},text:o.text,...o.voice===void 0?{}:{voiceId:o.voice}}}export async function makeSay(o,e,n,f){const u=await s(r(v(),"allyhub-voice-"));try{const t=await b(o,n.tool,sayInput(n),{...f,outDir:u,outputDir:r(e,g,"voice"),wait:!0});if("jobId"in t||t.file===void 0)throw new h("no-audio",`${n.tool} returned no audio file.`,{exit:F.platform});const d=D(t.output)??[],a=t.output.durationSeconds,m=typeof a=="number"?a:d.at(-1)?.end??0,i=`${n.stem}${I(t.file).toLowerCase()||".mp3"}`;await p(x(r(e,i)),{recursive:!0}),await c(t.file,r(e,i)),t.gen&&await c(t.gen,r(e,k(i)));const l=await W(r(e,i),d,m>=0?m:void 0);return{file:i,words:l.slice(e.length+1),seconds:m,credits:t.credits??0}}finally{await w(u,{recursive:!0,force:!0})}}
2
+ import{copyFile as c,mkdir as p,mkdtemp as s,rm as w}from"node:fs/promises";import{tmpdir as v}from"node:os";import{dirname as x,extname as I,join as r}from"node:path";import{WORK_DIR as g}from"@allyhub/formats/layout";import{genFileFor as k}from"@allyhub/formats/data/gen";import{EXIT as F}from"@allyhub/protocol/cli";import{callTool as b}from"./call.js";import{CloudError as h}from"./errors.js";import{toolWords as D,writeWords as W}from"./records.js";export function sayInput(t){return{...t.params??{},text:t.text,...t.voice===void 0?{}:{voiceId:t.voice}}}export async function makeSay(t,e,n,f){const u=await s(r(v(),"allyhub-voice-"));try{const o=await b(t,n.tool,sayInput(n),{...f,outDir:u,outputDir:r(e,g,"voice"),wait:!0});if("jobId"in o||o.file===void 0)throw new h("no-audio",`${n.tool} returned no audio file.`,{exit:F.platform});const d=D(o.output)??[],a=o.output.durationSeconds,m=typeof a=="number"?a:d.at(-1)?.end??0,i=`${n.stem}${I(o.file).toLowerCase()||".mp3"}`;await p(x(r(e,i)),{recursive:!0}),await c(o.file,r(e,i)),o.gen&&await c(o.gen,r(e,k(i)));const l=await W(r(e,i),d,m>=0?m:void 0);return{file:i,words:l.slice(e.length+1),seconds:m,credits:o.credits??0}}finally{await w(u,{recursive:!0,force:!0})}}
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@allyhub/cloud",
3
- "version": "0.18.0",
3
+ "version": "0.20.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
+ "./tools": {
11
+ "types": "./dist/tools.d.ts",
12
+ "default": "./dist/tools.js"
9
13
  }
10
14
  },
11
15
  "private": true,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/components",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.ts",
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{runCheck as l}from"@allyhub/check";import{analysesAsked as d,indexNeeds as c,makeIndex as f}from"@allyhub/project";import{loose as h}from"./paths.js";export const SETTLE_MS=1500;export class Checker{state;reads=new Map;timer;active;again=!1;closed=!1;live;emit;needs;settle;files;constructor(t){this.live=t.live,this.emit=t.emit,this.needs=t.needs,this.settle=t.settle??SETTLE_MS,this.files=t.files,this.state={status:"waiting",revision:0,problems:[],facts:[]}}schedule(t=!1){this.closed||(clearTimeout(this.timer),this.state.status!=="running"&&this.publish({...this.state,status:"waiting"}),this.timer=setTimeout(()=>{if(!this.closed){if(this.active){this.again=!0;return}this.active=this.run().finally(()=>{this.active=void 0})}},t?0:this.settle))}async run(){const t=this.live.revision;this.publish({...this.state,status:"running",revision:t});let i;try{const s=await this.live.withSession(a=>l({dir:this.live.root,session:a,...this.files===void 0?{}:{files:this.files}}));i={status:"done",revision:t,problems:s.problems.map(h),facts:s.facts.map(h),versions:{total:s.targets.length,loaded:s.stats.loaded.length,reused:s.stats.reused}},this.needs?.(c(s.results));const e=new Map;for(const a of s.results){const n=e.get(a.piece)??{media:new Set,data:new Set};e.set(a.piece,n);for(const r of a.reads?.media??[])n.media.add(r.path);for(const r of a.reads?.data??[])n.data.add(r.path)}this.reads=new Map([...e].map(([a,{media:n,data:r}])=>[a,{media:[...n],data:[...r]}]))}catch(s){i={status:"failed",revision:t,problems:[],facts:[],error:s instanceof Error?s.message:String(s)}}this.closed||(t===this.live.revision&&!this.again?this.publish(i):(this.again=!1,this.schedule(!0)))}publish(t){this.state=t,this.emit(t)}async close(){this.closed=!0,clearTimeout(this.timer),await this.active}}export class Indexer{jobs=[];root;analyses;env;emit;made;wanted=[];tried=new Set;running;abort=new AbortController;constructor(t){this.root=t.root,this.analyses=t.analyses,this.env=t.env,this.emit=t.emit,this.made=t.made}want(t){const i=e=>`${e.file}:${d(e).join(",")}`,s=t.filter(e=>!this.tried.has(i(e)));if(s.length!==0){for(const e of s)this.tried.add(i(e));this.wanted.push(...s),this.running??=this.loop().finally(()=>{this.running=void 0})}}async loop(){for(;this.wanted.length>0&&!this.abort.signal.aborted;){const t=this.wanted.splice(0),{done:i}=await f(this.root,t,this.analyses,{env:this.env,onProgress:s=>{this.jobs=[...this.jobs.filter(e=>e.file!==s.file),{file:s.file,status:s.status,message:s.message,...s.share===void 0?{}:{share:s.share}}],this.emit(this.jobs)},signal:this.abort.signal});i.length>0&&this.made()}}async close(){this.abort.abort(),await this.running}}
2
+ import{stageFiles as e}from"@allyhub/stage-page";export const SETTLE_MS=1500;export class Checker{state;reads=new Map;timer;active;again=!1;closed=!1;live;emit;settle;files;constructor(t){this.live=t.live,this.emit=t.emit,this.settle=t.settle??SETTLE_MS,this.files=t.files,this.state={status:"waiting",revision:0,problems:[],facts:[]}}schedule(t=!1){this.closed||(clearTimeout(this.timer),this.state.status!=="running"&&this.publish({...this.state,status:"waiting"}),this.timer=setTimeout(()=>{if(!this.closed){if(this.active){this.again=!0;return}this.active=this.run().finally(()=>{this.active=void 0})}},t?0:this.settle))}async run(){const t=this.live.revision;this.publish({...this.state,status:"running",revision:t});let i;try{const s=await this.live.checks.run({type:"check",dir:this.live.root,revision:t,kinds:this.live.kinds,prepared:await this.live.prepared(),runtime:e().runtime,...this.files===void 0?{}:{files:this.files}});i={status:"done",revision:t,problems:s.problems,facts:s.facts,versions:s.versions},this.reads=new Map(s.reads)}catch(s){i={status:"failed",revision:t,problems:[],facts:[],error:s instanceof Error?s.message:String(s)}}this.closed||(t===this.live.revision&&!this.again?this.publish(i):(this.again=!1,this.schedule(!0)))}publish(t){this.state=t,this.emit(t)}async close(){this.closed=!0,clearTimeout(this.timer),await this.active}}
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{spawn as l}from"node:child_process";import{declaredRules as u}from"@allyhub/diagnostics";import{workerCommand as p}from"@allyhub/runtimes/node";const f=4e3,m=5*6e4;export class ItemProcess{heapMb;child;idle;next=0;output="";waiting=new Map;constructor(s={}){this.heapMb=s.heapMb}run(s){clearTimeout(this.idle);const d=this.child??this.start(),o=++this.next;return new Promise((e,n)=>{this.waiting.set(o,{resolve:t=>{e(t)},reject:n});const r={...s,id:o,rules:u()};d.send(r)})}close(){clearTimeout(this.idle);const s=this.child;this.child=void 0,s?.kill()}start(){const{command:s,args:d}=p(import.meta.url,"item-worker"),o=this.heapMb===void 0?[]:[`--max-old-space-size=${String(this.heapMb)}`],e=l(s,[...o,...d],{stdio:["ignore","pipe","pipe","ipc"],serialization:"json"});this.output="";let n=!1;const r=t=>{const i=t.toString("utf8");i.includes("heap out of memory")&&(n=!0),this.output=(this.output+i).slice(-f)};return e.stdout?.on("data",r),e.stderr?.on("data",r),e.on("message",t=>{const i=this.waiting.get(t.id);if(i)if(this.waiting.delete(t.id),this.waiting.size===0&&(clearTimeout(this.idle),this.idle=setTimeout(()=>{this.waiting.size===0&&this.close()},m),this.idle.unref()),t.ok)i.resolve(t.value);else{const c=new Error(t.error);t.stack&&(c.stack=t.stack),i.reject(c)}}),e.on("close",(t,i)=>{this.child===e&&(this.child=void 0);const c=n?"it ran out of memory":i!==null?`it ended (${i})`:`it ended (exit code ${String(t)})`;for(const[a,h]of this.waiting)this.waiting.delete(a),h.reject(new Error(`It stopped: ${c}.`))}),this.child=e,e}}
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{startBrowser as p}from"@allyhub/browser";import{kindBuildOf as c,nodeLending as h}from"@allyhub/build";import{runCheck as k}from"@allyhub/check";import{declareAll as w}from"@allyhub/diagnostics";import{CheckSession as m}from"@allyhub/project";import{useStageRuntime as b}from"@allyhub/stage-page";import{loose as f}from"./paths.js";let a,d,u=!1,l=Promise.resolve();async function g(e){if(d?.revision===e.revision)return d.session;const n=d;a??=await p(),b(e.runtime);const s=m.open({root:e.dir,kinds:e.kinds,browser:a,prepared:e.prepared});return d={revision:e.revision,session:s},n&&n.session.then(t=>t.close()).catch(()=>{}),s}async function v(e){const n=await g(e),s=await k({dir:e.dir,session:n,...e.files===void 0?{}:{files:e.files}}),t=new Map;for(const r of s.results){const o=t.get(r.piece)??{media:new Set,data:new Set};t.set(r.piece,o);for(const i of r.reads?.media??[])o.media.add(i.path);for(const i of r.reads?.data??[])o.data.add(i.path)}return{problems:s.problems.map(f),facts:s.facts.map(f),versions:{total:s.targets.length,loaded:s.stats.loaded.length,reused:s.stats.reused},reads:[...t].map(([r,{media:o,data:i}])=>[r,{media:[...o],data:[...i]}])}}async function y(e){const n=await c(e.kinds.find(s=>s.id===e.kind))?.catch(()=>{});return n?.unreadable?[...n.unreadable(e.text)]:void 0}async function S(e){const n=await c(e.kinds.find(r=>r.id===e.item.kind))?.catch(()=>{}),s=n?.code?.bind(n);if(!s)return;const t=await h(e.kinds,e.root);return s(e.item,{root:e.root,lend:t})}function x(e){switch(e.type){case"check":{const n=l.then(()=>v(e));return l=n.catch(()=>{}),n}case"unreadable":return y(e);case"code":return S(e)}}process.on("message",e=>{u||(w(e.rules),u=!0),x(e).then(n=>{const s={id:e.id,ok:!0,value:n};process.send?.(s)},n=>{const s=n instanceof Error?n:new Error(String(n)),t={id:e.id,ok:!1,error:s.message,...s.stack?{stack:s.stack}:{}};process.send?.(t)})}),process.on("disconnect",()=>{a?.close().finally(()=>process.exit(0)),setTimeout(()=>process.exit(0),2e3).unref()});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{rm as f}from"node:fs/promises";import{join as u}from"node:path";import{startBrowser as m}from"@allyhub/browser";import{kindBuildOf as w,mediaHref as b,nodeLending as v,projectItems as g,sourceOf as k,stageItem as S}from"@allyhub/build";import{CACHE_DIR as y}from"@allyhub/formats";import{CheckSession as D,ProjectError as R,pickTarget as E,parseCombo as O}from"@allyhub/project";import{RPC_ERROR as h,RpcError as c,SNAPSHOT_TREE as l}from"@allyhub/protocol";import{prepareStage as $,viewStage as C}from"@allyhub/stage";import{Routes as P}from"./routes.js";export function rpcErrorOf(o){return o instanceof R?new c(o.kind==="not-found"?h.notFound:h.invalid,o.hint?`${o.message} ${o.hint}`:o.message):o}export class Live{root;buildDir;revision=0;prep;last;lease;old=new Set;browserStarted;gpu;building=Promise.resolve();closed=!1;codes=new Map;kinds;routes;constructor(e,i){this.root=e,this.kinds=i.kinds,this.buildDir=u(e,y,"build",`dev-${String(process.pid)}`),this.gpu=i.gpu,this.routes=new P({root:e,kinds:i.kinds,buildDir:this.buildDir,revision:()=>this.revision,prepared:()=>this.prepared(),latest:()=>this.latest(),view:(t,s)=>C(e,t,s,i.kinds),recordInputs:(t,s,n)=>{i.recordInputs?.(t,s,n)}})}moved(e){this.revision=e,this.lease&&this.lease.revision!==e&&this.retire(this.lease)}prepared(){const e=this.revision;if(this.prep?.revision===e)return this.prep.promise;const i=this.building.then(()=>e===this.revision?this.build():void 0);this.building=i.catch(()=>{});const t=i.then(s=>s??this.prepared());return this.prep={revision:e,promise:t},t.catch(()=>{this.prep?.promise===t&&(this.prep=void 0)}),t}async build(){const e=await $(this.root,this.pieceDir,this.kinds);return this.last=e,e}async itemCode(e){const i=await this.item(e),t=i?await w(this.kinds.find(r=>r.id===i.kind))?.catch(()=>{}):void 0,s=t?.code?.bind(t);if(!i||!s)return{failed:!1};const n=this.codes.get(e),d=n?.revision===this.revision?n.promise:v(this.kinds,this.root).then(r=>s(i,{root:this.root,lend:r})).catch(()=>{});return this.codes.set(e,{revision:this.revision,promise:d}),await d??{failed:!0}}async item(e){const{items:i}=await g(this.root,this.kinds);return i.find(t=>t.id===e)}get pieceDir(){return u(this.buildDir,"stage")}latest(){return this.last}async target(e,i){const t=await this.prepared();try{const{piece:s,target:n}=E(t,e,i===void 0?void 0:[O(i)]);return{prepared:t,piece:s,combo:n.combo}}catch(s){throw rpcErrorOf(s)}}async componentHost(e,i){const t=await this.prepared(),s=t.docs.find(r=>r.place===e||r.file===e);if(s){if(s.components.length===0)throw new c(h.notFound,`${s.place} shows no component.`);const r=t.messages.locales[0];return{prepared:t,host:s,combo:r===void 0?{}:{lang:r}}}const{piece:n,combo:d}=await this.target(e,i);return{prepared:t,host:n,combo:d}}async source(e){const i=await this.prepared(),t=S(i,e);if(!t)throw new c(h.notFound,`No piece ${e}.`);const s=k(i,t),n={...s.media},d=(r,a)=>`${r}${b(a).slice(l.media.length)}`;return await Promise.all(Object.entries(n).map(async([r,a])=>{let p=a;a.kind==="video"&&a.matte===!0&&(p={...p,matteUrl:d(l.matte,r)}),n[r]=await this.routes.mediaOf(r,p)})),{...s,media:n}}browser(){return this.refuseStopped(),this.browserStarted??=m(this.gpu===void 0?{}:{gpu:this.gpu}),this.browserStarted}async withSession(e){this.refuseStopped();let i=this.lease;if(i?.revision!==this.revision){i&&this.retire(i);const t=await this.browser();if(this.refuseStopped(),i=this.lease,i?.revision!==this.revision){i&&this.retire(i);const s={revision:this.revision,session:this.prepared().then(n=>D.open({root:this.root,kinds:this.kinds,browser:t,prepared:n})),users:0,retired:!1};i=s,this.lease=s,s.session.catch(()=>{this.lease===s&&(this.lease=void 0)})}}i.users++;try{return await e(await i.session)}finally{i.users--,i.retired&&i.users===0&&this.end(i)}}refuseStopped(){if(this.closed)throw new c(h.unavailable,"allyhub dev is stopping.")}retire(e){e.retired=!0,this.lease===e&&(this.lease=void 0),this.old.add(e),e.users===0&&this.end(e)}end(e){return e.ended??=(async()=>{this.old.delete(e),await e.session.then(i=>i.close()).catch(()=>{})})(),e.ended}async close(){this.closed=!0;const e=[...this.old,...this.lease?[this.lease]:[]];this.lease&&this.retire(this.lease),await Promise.all(e.map(i=>this.end(i))),await this.browserStarted?.then(i=>i.close()).catch(()=>{}),await this.building,await f(this.buildDir,{recursive:!0,force:!0})}}
2
+ import{rm as m}from"node:fs/promises";import{join as u}from"node:path";import{startBrowser as w}from"@allyhub/browser";import{mediaHref as v,projectItems as b,sourceOf as g,stageItem as k}from"@allyhub/build";import{CACHE_DIR as S}from"@allyhub/formats";import{CheckSession as y,ProjectError as D,pickTarget as R,parseCombo as E}from"@allyhub/project";import{RPC_ERROR as d,RpcError as h,SNAPSHOT_TREE as l}from"@allyhub/protocol";import{prepareStage as P,viewStage as $}from"@allyhub/stage";import{ItemProcess as f}from"./item-process.js";import{Routes as C}from"./routes.js";export function rpcErrorOf(n){return n instanceof D?new h(n.kind==="not-found"?d.notFound:d.invalid,n.hint?`${n.message} ${n.hint}`:n.message):n}export class Live{root;buildDir;revision=0;prep;last;lease;old=new Set;browserStarted;gpu;building=Promise.resolve();closed=!1;codes=new Map;kinds;checks=new f;quick=new f;routes;constructor(e,i){this.root=e,this.kinds=i.kinds,this.buildDir=u(e,S,"build",`dev-${String(process.pid)}`),this.gpu=i.gpu,this.routes=new C({root:e,kinds:i.kinds,buildDir:this.buildDir,revision:()=>this.revision,prepared:()=>this.prepared(),latest:()=>this.latest(),view:(t,s)=>$(e,t,s,i.kinds),recordInputs:(t,s,r)=>{i.recordInputs?.(t,s,r)}})}moved(e){this.revision=e,this.lease&&this.lease.revision!==e&&this.retire(this.lease)}prepared(){const e=this.revision;if(this.prep?.revision===e)return this.prep.promise;const i=this.building.then(()=>e===this.revision?this.build():void 0);this.building=i.catch(()=>{});const t=i.then(s=>s??this.prepared());return this.prep={revision:e,promise:t},t.catch(()=>{this.prep?.promise===t&&(this.prep=void 0)}),t}async build(){const e=await P(this.root,this.pieceDir,this.kinds);return this.last=e,e}async itemCode(e){const i=await this.item(e);if(!i)return{failed:!1};const t=this.codes.get(e),s=t?.revision===this.revision?t.promise:this.quick.run({type:"code",root:this.root,kinds:this.kinds,item:i}).then(r=>r??{failed:!1}).catch(()=>{});return this.codes.set(e,{revision:this.revision,promise:s}),await s??{failed:!0}}async item(e){const{items:i}=await b(this.root,this.kinds);return i.find(t=>t.id===e)}get pieceDir(){return u(this.buildDir,"stage")}latest(){return this.last}async target(e,i){const t=await this.prepared();try{const{piece:s,target:r}=R(t,e,i===void 0?void 0:[E(i)]);return{prepared:t,piece:s,combo:r.combo}}catch(s){throw rpcErrorOf(s)}}async componentHost(e,i){const t=await this.prepared(),s=t.docs.find(o=>o.place===e||o.file===e);if(s){if(s.components.length===0)throw new h(d.notFound,`${s.place} shows no component.`);const o=t.messages.locales[0];return{prepared:t,host:s,combo:o===void 0?{}:{lang:o}}}const{piece:r,combo:c}=await this.target(e,i);return{prepared:t,host:r,combo:c}}async source(e){const i=await this.prepared(),t=k(i,e);if(!t)throw new h(d.notFound,`No piece ${e}.`);const s=g(i,t),r={...s.media},c=(o,a)=>`${o}${v(a).slice(l.media.length)}`;return await Promise.all(Object.entries(r).map(async([o,a])=>{let p=a;a.kind==="video"&&a.matte===!0&&(p={...p,matteUrl:c(l.matte,o)}),r[o]=await this.routes.mediaOf(o,p)})),{...s,media:r}}browser(){return this.refuseStopped(),this.browserStarted??=w(this.gpu===void 0?{}:{gpu:this.gpu}),this.browserStarted}async withSession(e){this.refuseStopped();let i=this.lease;if(i?.revision!==this.revision){i&&this.retire(i);const t=await this.browser();if(this.refuseStopped(),i=this.lease,i?.revision!==this.revision){i&&this.retire(i);const s={revision:this.revision,session:this.prepared().then(r=>y.open({root:this.root,kinds:this.kinds,browser:t,prepared:r})),users:0,retired:!1};i=s,this.lease=s,s.session.catch(()=>{this.lease===s&&(this.lease=void 0)})}}i.users++;try{return await e(await i.session)}finally{i.users--,i.retired&&i.users===0&&this.end(i)}}refuseStopped(){if(this.closed)throw new h(d.unavailable,"allyhub dev is stopping.")}retire(e){e.retired=!0,this.lease===e&&(this.lease=void 0),this.old.add(e),e.users===0&&this.end(e)}end(e){return e.ended??=(async()=>{this.old.delete(e),await e.session.then(i=>i.close()).catch(()=>{})})(),e.ended}async close(){this.closed=!0,this.checks.close(),this.quick.close();const e=[...this.old,...this.lease?[this.lease]:[]];this.lease&&this.retire(this.lease),await Promise.all(e.map(i=>this.end(i))),await this.browserStarted?.then(i=>i.close()).catch(()=>{}),await this.building,await m(this.buildDir,{recursive:!0,force:!0})}}
@@ -1,2 +1,21 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{once as S}from"node:events";import{createServer as v}from"node:http";import{posix as R}from"node:path";import{getRequestListener as P}from"@hono/node-server";import{pathProblem as x}from"./paths.js";import{forwarded as $}from"./ports.js";import{fileResponse as C}from"./respond.js";import{inside as L}from"./tree.js";export const PAGE_POLICY=["default-src 'self' data: blob:","script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:","style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","font-src 'self' data:","connect-src 'self' data: blob:","media-src 'self' data: blob:"].join("; "),NETWORK_PAGE_POLICY=["default-src 'self' data: blob: https:","script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https:","style-src 'self' 'unsafe-inline' https:","img-src 'self' data: blob: https:","font-src 'self' data: https:","connect-src 'self' data: blob:","media-src 'self' data: blob: https:"].join("; "),PAGE_SOURCE="page";export class Pages{o;origins=new Map;constructor(n){this.o=n}async url(n,s,o,l={}){const a=await this.origin(s);a.pages.set(o,n),l.network===!0?a.network.add(o):a.network.delete(o);const d=a.port.url.endsWith("/")?a.port.url:`${a.port.url}/`,f=s===""?o:o.slice(s.length+1);return`${d}${f.split("/").map(encodeURIComponent).join("/")}`}origin(n){let s=this.origins.get(n);return s||(s=this.start(n),this.origins.set(n,s),s.catch(()=>{this.origins.get(n)===s&&this.origins.delete(n)})),s}async start(n){const{root:s,inputs:o}=this.o,l=new Map,a=new Set,d=new Map;let f=new Set;const g=r=>{let t;try{t=decodeURIComponent(r).replace(/^\/+/u,"")}catch{return}(t===""||t.endsWith("/"))&&(t=`${t}index.html`);const e=n===""?t:`${n}/${t}`;if(x(e)===void 0&&!e.split("/").some(c=>c.startsWith(".")))return R.normalize(e)},b=(r,t)=>{const e=l.get(r);if(e!==void 0){o.set(e,PAGE_SOURCE,[r]);for(const i of d.values())i.delete(e);return new Set([e])}let c;try{const i=t===void 0?void 0:new URL(t);i&&f.has(i.host)&&(c=g(i.pathname))}catch{c=void 0}if(c!==void 0){const i=l.get(c);if(i!==void 0)return new Set([i]);const u=d.get(c);if(u)return new Set(u)}return new Set(l.values())},y=P(async r=>{const t=new URL(r.url),e=g(t.pathname);if(e===void 0)return new Response("not found",{status:404});const c=b(e,r.headers.get("referer")??void 0),i=d.get(e)??new Set;for(const w of c)i.add(w),o.add(w,PAGE_SOURCE,e);d.set(e,i);const u=L(s,e);return u?C(u,r.headers.get("range")??void 0,{"content-security-policy":a.has(e)?NETWORK_PAGE_POLICY:PAGE_POLICY,"cache-control":"no-store","x-content-type-options":"nosniff"}):new Response("not found",{status:404})}),p=v((r,t)=>{if(!f.has(r.headers.host??"")){t.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),t.end("forbidden host");return}y(r,t)});p.listen(0,"127.0.0.1"),await S(p,"listening");const h=p.address().port,m=$(this.o.ports,h);return f=new Set([`127.0.0.1:${String(h)}`,`localhost:${String(h)}`,...m.hosts,new URL(m.url).host]),{server:p,port:m,pages:l,network:a,loads:d}}async close(){const n=[...this.origins.values()];this.origins.clear();for(const s of n){const o=await s.catch(()=>{});o&&(o.port.dispose(),o.server.closeAllConnections(),await new Promise(l=>o.server.close(l)))}}}
2
+ import{once as x}from"node:events";import{createServer as P}from"node:http";import{readFile as v}from"node:fs/promises";import{posix as $}from"node:path";import{getRequestListener as L}from"@hono/node-server";import{ProjectError as O,projectTheme as C}from"@allyhub/build";import{pageWithTheme as k,projectThemeName as N,readPath as T,servedPage as j}from"@allyhub/formats";import{PAGE_SCROLLED as A,PAGE_SCROLL_TO as I}from"@allyhub/protocol";import{pathProblem as _}from"./paths.js";import{forwarded as U}from"./ports.js";import{fileResponse as D}from"./respond.js";import{hasErrorCode as G}from"./deletion.js";import{inside as M}from"./tree.js";export const PAGE_POLICY=["default-src 'self' data: blob:","script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:","style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","font-src 'self' data:","connect-src 'self' data: blob:","media-src 'self' data: blob:"].join("; "),NETWORK_PAGE_POLICY=["default-src 'self' data: blob: https:","script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https:","style-src 'self' 'unsafe-inline' https:","img-src 'self' data: blob: https:","font-src 'self' data: https:","connect-src 'self' data: blob:","media-src 'self' data: blob: https:"].join("; "),FRAME_SCRIPT=`<script data-allyhub-frame>(() => {
3
+ if (window.parent === window) return;
4
+ let asked = false;
5
+ const say = () => {
6
+ asked = false;
7
+ parent.postMessage({ type: ${JSON.stringify(A)}, x: scrollX, y: scrollY }, "*");
8
+ };
9
+ addEventListener("scroll", () => {
10
+ if (asked) return;
11
+ asked = true;
12
+ requestAnimationFrame(say);
13
+ }, { passive: true });
14
+ addEventListener("message", (e) => {
15
+ const d = e.data;
16
+ if (e.source !== parent || !d || d.type !== ${JSON.stringify(I)}) return;
17
+ const go = () => scrollTo(Number(d.x) || 0, Number(d.y) || 0);
18
+ go();
19
+ if (document.readyState !== "complete") addEventListener("load", go, { once: true });
20
+ });
21
+ })();<\/script>`;export function framedPage(p){const e=/<head\b[^>]*>/iu.exec(p)??/<html\b[^>]*>/iu.exec(p),t=e?e.index+e[0].length:0;return`${p.slice(0,t)}${FRAME_SCRIPT}${p.slice(t)}`}export const PAGE_SOURCE="page";export class Pages{o;origins=new Map;constructor(e){this.o=e}async url(e,t,n,i={}){const o=await this.origin(t);o.pages.set(n,e),i.network===!0?o.network.add(n):o.network.delete(n);const d=o.port.url.endsWith("/")?o.port.url:`${o.port.url}/`,u=t===""?n:n.slice(t.length+1);return`${d}${u.split("/").map(encodeURIComponent).join("/")}`}origin(e){let t=this.origins.get(e);return t||(t=this.start(e),this.origins.set(e,t),t.catch(()=>{this.origins.get(e)===t&&this.origins.delete(e)})),t}async start(e){const{root:t,inputs:n}=this.o,i=new Map,o=new Set,d=new Map;let u=new Set;const w=a=>{let r;try{r=decodeURIComponent(a).replace(/^\/+/u,"")}catch{return}(r===""||r.endsWith("/"))&&(r=`${r}index.html`);const s=e===""?r:`${e}/${r}`;if(_(s)===void 0&&!s.split("/").some(f=>f.startsWith(".")))return $.normalize(s)},l=(a,r)=>{const s=i.get(a);if(s!==void 0){n.set(s,PAGE_SOURCE,[a]);for(const c of d.values())c.delete(s);return new Set([s])}let f;try{const c=r===void 0?void 0:new URL(r);c&&u.has(c.host)&&(f=w(c.pathname))}catch{f=void 0}if(f!==void 0){const c=i.get(f);if(c!==void 0)return new Set([c]);const g=d.get(f);if(g)return new Set(g)}return new Set(i.values())},y=L(async a=>{const r=new URL(a.url),s=w(r.pathname);if(s===void 0)return new Response("not found",{status:404});const f=l(s,a.headers.get("referer")??void 0),c=d.get(s)??new Set;for(const R of f)c.add(R),n.add(R,PAGE_SOURCE,s);d.set(s,c);const g=M(t,s);if(!g)return new Response("not found",{status:404});const S={"content-security-policy":o.has(s)?NETWORK_PAGE_POLICY:PAGE_POLICY,"cache-control":"no-store","x-content-type-options":"nosniff"},E=i.has(s)?await this.withData(s,f,await W(g,N(C(t))),g):void 0;return E!==void 0?new Response(E,{headers:{...S,"content-type":"text/html; charset=utf-8"}}):D(g,a.headers.get("range")??void 0,S)}),b=P((a,r)=>{if(!u.has(a.headers.host??"")){r.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),r.end("forbidden host");return}y(a,r)});b.listen(0,"127.0.0.1"),await x(b,"listening");const h=b.address().port,m=U(this.o.ports,h);return u=new Set([`127.0.0.1:${String(h)}`,`localhost:${String(h)}`,...m.hosts,new URL(m.url).host]),{server:b,port:m,pages:i,network:o,loads:d}}async withData(e,t,n,i){const o=this.o.data;if(o===void 0||!/\.html?$/iu.test(e))return n;const d=n??await v(i,"utf8").catch(l=>{if(!G(l,"ENOENT","ENOTDIR","EISDIR"))throw l});if(!d?.includes("allyhub"))return n;let u;try{u=await o()}catch(l){if(l instanceof O)return n;throw l}const w=j(d,e,u.data);if(w.read.length===0)return n;for(const l of w.read){const y=T(e,l),b=u.items.find(h=>h.id===y||h.entry===y);for(const h of b?.files?.map(m=>m.path)??[y])for(const m of t)this.o.inputs.add(m,PAGE_SOURCE,h)}return w.html}async close(){const e=[...this.origins.values()];this.origins.clear();for(const t of e){const n=await t.catch(()=>{});n&&(n.port.dispose(),n.server.closeAllConnections(),await new Promise(i=>n.server.close(i)))}}}async function W(p,e){if(!/\.html?$/iu.test(p))return;const t=await v(p,"utf8").catch(()=>{});if(t===void 0)return;const n=e===void 0?void 0:k(t,e);return framedPage(n??t)}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{isListedFile as v,itemNameOf as g,listedWork as T,listsFile as k,projectPath as S}from"@allyhub/formats";import{randomBytes as E}from"node:crypto";import{isAbsolute as y,relative as j,resolve as I,sep as P}from"node:path";import{AGENT_NAME as N,FILE_METHODS as R,HOST_METHODS as x,JSONRPC as h,PRESENCE_METHODS as D,PROJECT_TOOLS as l,RPC_ERROR as d,RequestSchema as M,RpcError as f,answer as p}from"@allyhub/protocol";import{listFiles as _,projectItems as C,readWork as F}from"@allyhub/build";import{Checker as A,Indexer as J}from"./background.js";import{TRASH_KEPT_DAYS as H,movesOfDeletion as L}from"./deletion.js";import{Exports as q}from"./exports.js";import{downloadsFolder as W,hasFileManager as B,revealFile as $}from"./reveal.js";import{Live as K}from"./live.js";import{Inputs as U}from"./inputs.js";import{Pages as Y}from"./pages.js";import{fileIn as O}from"./paths.js";import{kindContext as G}from"./kinds.js";import{Presence as V}from"./presence.js";import{Texts as X}from"./texts.js";import{contributedTool as z,contributedTools as Q,projectToolContext as Z,toolHandlers as ee}from"./tools.js";import{Watcher as te}from"./watcher.js";import{Writer as se}from"./writer.js";export const SERVER_METHODS={...R,"tools/call":x["tools/call"],...D};const ie=5e3,ne="sidebar";export class ProjectServer{root;writer;watcher;live;exports;presence;inputs=new U;pages;texts;placing=Promise.resolve();telling=Promise.resolve();listed;extensions;reveal;checker;serving;indexer;clients=new Map;contributed;services;held=new Map;unhearJobs;constructor(e){this.root=I(e.root),this.services={...e.jobs===void 0?{}:{jobs:e.jobs},...e.cloud===void 0?{}:{cloud:e.cloud},...e.env===void 0?{}:{env:e.env},...e.ports===void 0?{}:{ports:e.ports}},this.unhearJobs=e.jobs?.on(t=>{if(!y(t.about.id))return;const s=j(this.root,t.about.id);s===""||s.startsWith("..")||y(s)||this.notify("jobs/changed",{job:t,item:s.split(P).join("/")})})??(()=>{}),this.contributed=Q(e.kinds,e.extensions?.projectTools()??[]),this.extensions=e.extensions,this.live=new K(this.root,{kinds:e.kinds,...e.gpu===void 0?{}:{gpu:e.gpu},recordInputs:(t,s,r)=>{const n=[...r];this.listedItems().then(a=>{const c=a.find(u=>u.entry===t);c&&this.inputs.set(c.id,s,n)})}}),this.pages=new Y({root:this.root,ports:e.ports,inputs:this.inputs}),this.presence=new V(t=>{this.notify("presence/changed",{collaborators:t})}),this.texts=new X(this.root),this.watcher=new te(this.root,(t,s)=>{this.sendTo(this.watchOwner(t),"files/changed",{watch:t,changes:s})},(t,s)=>{this.live.moved(t),this.notify("project/changed",{revision:t}),this.checker?.schedule(),this.telling=this.telling.then(()=>this.tellItems(s))},{by:{kind:"agent",name:N},moved:t=>{this.placing=this.placing.then(()=>this.wroteOutside(t))}}),this.writer=new se(this.root,e.kinds,(t,s)=>{for(const r of t)this.texts.set(r.path,r.text);this.watcher.wrote(t.map(({path:r,version:n})=>({path:r,version:n})),s)},e.writable),this.reveal=e.reveal===!1?void 0:e.reveal??(B()?$:void 0),this.exports=new q(this.root,e.kinds,t=>{this.notify("export/changed",{job:t})},e.jobs===void 0?void 0:{jobs:e.jobs,nameOf:async t=>{const{items:s}=await this.tool("project/items",{}),r=s.find(n=>n.id===t);return g(r??{id:t})}},{...e.extensions?{processors:e.extensions.exportProcessors(),analyses:e.extensions.mediaAnalyses()}:{},...this.reveal===void 0||e.exportsTo===!1?{}:{saveTo:e.exportsTo??W}});const i=e.index??process.env.ALLYHUB_NO_INDEX!=="1";if(e.check!==!1){const t=i?new J({root:this.root,analyses:e.extensions?.mediaAnalyses()??[],env:e.env??process.env,emit:r=>{this.notify("index/changed",{jobs:r})},made:()=>{this.checker?.schedule(!0)}}):void 0;this.indexer=t;const s=e.extensions?.fileEditors();this.checker=new A({live:this.live,...s===void 0?{}:{files:s},emit:r=>{this.notify("check/changed",r)},...t?{needs:r=>{t.want(r)}}:{},...e.settle===void 0?{}:{settle:e.settle}})}}static open(e){const i=new ProjectServer(e);return i.watcher.start(),i.checker?.schedule(),i.texts.warm(),Promise.resolve(i)}async settled(){await this.watcher.settled(),await this.placing,await this.telling}async tellItems(e){if(e.length===0)return;const i=await this.listedItems();for(const[t,s]of this.inputs.affected(i,e))this.notify("items/changed",{item:t,paths:s})}async wroteOutside(e){let i;for(const s of e){const{changed:r,lines:n}=await this.texts.changed(s).catch(()=>({changed:!1,lines:void 0}));r&&(i={path:s,...n})}if(i===void 0)return;const t=await this.itemOf(i.path);this.presence.agent({doing:"editing",...t===void 0?{}:{item:t},source:i})}async itemOf(e){const i=await this.listedItems(),t=i.filter(s=>s.dir!==""&&e.startsWith(`${s.dir}/`)).sort((s,r)=>r.dir.length-s.dir.length);return(i.find(s=>s.entry===e)??i.find(s=>s.files!==void 0&&k(s.files,e))??t[0])?.id}async listedItems(){const e=Date.now();return this.listed!==void 0&&e-this.listed.at<ie||(this.listed={at:e,items:this.tool("project/items",{}).then(t=>t.items,()=>[])}),await this.listed?.items??[]}owners=new Map;watchOwner(e){return this.owners.get(e)}connect(e,i={}){const t=`c${E(6).toString("hex")}`;this.clients.set(t,e);const s=this.handlersFor(t,i.origin);return{id:t,receive:async r=>{const n=await this.answerOne(s,r);n&&e(n)},close:()=>{this.clients.delete(t),this.watcher.forget(t);for(const[r,n]of this.owners)n===t&&this.owners.delete(r)}}}channel(){const e=new Set,i=this.connect(t=>{const s=JSON.parse(JSON.stringify(t));queueMicrotask(()=>{for(const r of e)r(s)})});return{send:t=>{i.receive(JSON.parse(JSON.stringify(t)))},listen:t=>(e.add(t),()=>e.delete(t)),close:()=>{i.close()}}}notify(e,i){for(const t of this.clients.values())t({jsonrpc:h,method:e,params:i})}sendTo(e,i,t){e!==void 0&&this.clients.get(e)?.({jsonrpc:h,method:i,params:t})}async answerOne(e,i){const t=M.safeParse(i);if(!t.success){const r=i?.id;return typeof r!="string"&&typeof r!="number"?void 0:{jsonrpc:h,id:r,error:{code:d.invalidRequest,message:"Not a JSON-RPC request."}}}const s=t.data;return Object.hasOwn(x,s.method)&&s.method!=="tools/call"?{jsonrpc:h,id:s.id,error:{code:d.methodNotFound,message:`${s.method} is answered by the page that hosts the editor, not by allyhub dev's server.`}}:p(SERVER_METHODS,e,s)}handlersFor(e,i){const{writer:t,watcher:s}=this,r=this.toolSet(()=>this.serving?.tree(i));return{"files/read":({path:n})=>t.read(n),"files/write":async({path:n,text:a,over:c})=>({version:await t.write(n,a,c,e)}),"files/upload":async({dir:n,name:a,data:c})=>({path:await t.upload(n,a,Buffer.from(c,"base64"),e)}),"files/url":async({path:n})=>{if(await O(this.root,n),!this.serving)throw new f(d.unavailable,"This server serves no files over HTTP: only allyhub dev's does.");return{url:this.serving.file(i,n)}},"files/list":({dir:n})=>t.list(n),"files/move":async({from:n,to:a})=>({rewritten:await t.move(n,a,e)}),"files/remove":async({path:n})=>({trash:await t.remove(n,e)}),"files/trash":async()=>({entries:await t.trash()}),"files/restore":async({id:n})=>({path:await t.restore(n,e)}),"files/watch":async({paths:n})=>{for(const c of n)await O(this.root,c);const a=await s.watch(e,n);return this.owners.set(a,e),{watch:a}},"files/unwatch":({watch:n})=>(this.owners.get(n)===e&&(s.unwatch(n),this.owners.delete(n)),Promise.resolve({})),"tools/call":async({name:n,arguments:a})=>({result:await this.runTool(r,n,a)}),"presence/get":()=>Promise.resolve({collaborators:this.presence.list()})}}toolSet(e){const i=this.toolContext(e);return{core:ee(i),context:Z(i)}}async runTool(e,i,t){const s={jsonrpc:h,id:0,method:i,params:t},r=Object.hasOwn(l,i)?void 0:this.contributed.get(i);let n;if(r===void 0)n=await p(l,e.core,s);else{const a=await z(r).catch(c=>{throw new f(d.internal,c instanceof Error?c.message:String(c))});n=await p({[i]:a},{[i]:c=>a.run(c,e.context)},s)}if("error"in n)throw new f(n.error.code,n.error.message,n.error.data);return n.result}hasTool(e){return Object.hasOwn(l,e)||this.contributed.has(e)}toolContext(e){return{live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,tree:e,extensions:this.extensions,services:this.services,held:this.held,kindContext:G(this.root,i=>this.hasTool(i),(i,t)=>this.tool(i,t)),inputs:this.inputs,pages:this.pages}}async tool(e,i,t={}){const s=await this.runTool(this.toolSet(()=>t.tree??this.serving?.tree(void 0)),e,i);return Object.hasOwn(l,e)?l[e].result.parse(s):s}async planDeletionOfItem(e){const i=await _(this.root),{listed:t}=await C(this.root,this.live.kinds,i,this.extensions?.fileEditors()??[]),s=t.find(o=>o.id===e);if(s===void 0)throw new f(d.notFound,`There is no item ${e}.`);const r=this.live.latest(),n=new Map((r?.items??[]).map(o=>[o.id,o.files])),a=o=>{const m=!v(o);return{id:o.id,entry:o.entry,ofKind:m,files:m?n.get(o.id):[{path:o.entry}],inputs:[...this.inputs.of(o.id)]}},{work:c}=await F(this.root),{moves:u,stays:b}=L({target:a(s),others:t.filter(o=>o.id!==e).map(a),listed:T(c).map(o=>S(o.file)).filter(o=>o!==s.entry),files:i}),w=r?.pieces.find(o=>o.place===e)?.title;return{item:e,name:g(s,typeof w=="string"?w:void 0),...v(s)?{}:{kind:s.kind},entry:s.entry,moves:u,stays:b}}deleteItemFromSidebar(e,i={}){return this.writer.moveToTrashAndUnlist({planNow:()=>this.planDeletionOfItem(e),keptDays:i.keptDays??H,...i.now===void 0?{}:{now:i.now}},ne)}async close(){this.unhearJobs(),this.presence.close(),this.watcher.close(),this.clients.clear();for(const e of[...this.held.values()].reverse())await Promise.resolve(e.dispose()).catch(()=>{});this.held.clear(),await this.pages.close(),await this.checker?.close(),await this.indexer?.close(),await this.exports.close(),await this.live.close()}}
2
+ import{isListedFile as m,itemNameOf as v,listedWork as T,listsFile as k,projectPath as S}from"@allyhub/formats";import{randomBytes as E}from"node:crypto";import{isAbsolute as g,relative as j,resolve as P,sep as I}from"node:path";import{AGENT_NAME as R,FILE_METHODS as N,HOST_METHODS as y,JSONRPC as c,PRESENCE_METHODS as M,PROJECT_TOOLS as h,RPC_ERROR as d,RequestSchema as C,RpcError as f,answer as u}from"@allyhub/protocol";import{listFiles as D,projectItems as F,readWork as _}from"@allyhub/build";import{Checker as J}from"./background.js";import{TRASH_KEPT_DAYS as A,movesOfDeletion as H}from"./deletion.js";import{Exports as q}from"./exports.js";import{downloadsFolder as W,hasFileManager as L,revealFile as $}from"./reveal.js";import{Live as B}from"./live.js";import{Inputs as K}from"./inputs.js";import{Pages as G}from"./pages.js";import{fileIn as x}from"./paths.js";import{kindContext as U}from"./kinds.js";import{Presence as V}from"./presence.js";import{Texts as Y}from"./texts.js";import{contributedTool as z,contributedTools as Q,projectToolContext as X,toolHandlers as Z}from"./tools.js";import{Watcher as ee}from"./watcher.js";import{Writer as te}from"./writer.js";export const SERVER_METHODS={...N,"tools/call":y["tools/call"],...M};const se=5e3,ie="sidebar";export class ProjectServer{root;writer;watcher;live;exports;presence;inputs=new K;pages;texts;placing=Promise.resolve();telling=Promise.resolve();listed;extensions;reveal;checker;serving;clients=new Map;contributed;services;held=new Map;unhearJobs;constructor(e){if(this.root=P(e.root),this.services={...e.jobs===void 0?{}:{jobs:e.jobs},...e.cloud===void 0?{}:{cloud:e.cloud},...e.env===void 0?{}:{env:e.env},...e.ports===void 0?{}:{ports:e.ports}},this.unhearJobs=e.jobs?.on(t=>{if(!g(t.about.id))return;const s=j(this.root,t.about.id);s===""||s.startsWith("..")||g(s)||this.notify("jobs/changed",{job:t,item:s.split(I).join("/")})})??(()=>{}),this.contributed=Q(e.kinds,e.extensions?.projectTools()??[]),this.extensions=e.extensions,this.live=new B(this.root,{kinds:e.kinds,...e.gpu===void 0?{}:{gpu:e.gpu},recordInputs:(t,s,i)=>{const n=[...i];this.listedItems().then(r=>{const o=r.find(l=>l.entry===t);o&&this.inputs.set(o.id,s,n)})}}),this.pages=new G({root:this.root,ports:e.ports,inputs:this.inputs,data:async()=>{const t=await this.live.prepared();return{data:t.data,items:t.items}}}),this.presence=new V(t=>{this.notify("presence/changed",{collaborators:t})}),this.texts=new Y(this.root),this.watcher=new ee(this.root,(t,s)=>{this.sendTo(this.watchOwner(t),"files/changed",{watch:t,changes:s})},(t,s)=>{this.live.moved(t),this.notify("project/changed",{revision:t}),this.checker?.schedule(),this.telling=this.telling.then(()=>this.tellItems(s))},{by:{kind:"agent",name:R},moved:t=>{this.placing=this.placing.then(()=>this.wroteOutside(t))}}),this.writer=new te(this.root,e.kinds,(t,s)=>{for(const i of t)this.texts.set(i.path,i.text);this.watcher.wrote(t.map(({path:i,version:n})=>({path:i,version:n})),s)},e.writable,(t,s)=>this.live.quick.run({type:"unreadable",kinds:e.kinds,kind:t,text:s})),this.reveal=e.reveal===!1?void 0:e.reveal??(L()?$:void 0),this.exports=new q(this.root,e.kinds,t=>{this.notify("export/changed",{job:t})},e.jobs===void 0?void 0:{jobs:e.jobs,nameOf:async t=>{const{items:s}=await this.tool("project/items",{}),i=s.find(n=>n.id===t);return v(i??{id:t})}},{...e.extensions?{processors:e.extensions.exportProcessors(),analyses:e.extensions.mediaAnalyses()}:{},...this.reveal===void 0||e.exportsTo===!1?{}:{saveTo:e.exportsTo??W}}),e.check!==!1){const t=e.extensions?.fileEditors();this.checker=new J({live:this.live,...t===void 0?{}:{files:t},emit:s=>{this.notify("check/changed",s)},...e.settle===void 0?{}:{settle:e.settle}})}}static open(e){const t=new ProjectServer(e);return t.watcher.start(),t.checker?.schedule(),t.texts.warm(),Promise.resolve(t)}async settled(){await this.watcher.settled(),await this.placing,await this.telling}async tellItems(e){if(e.length===0)return;const t=await this.listedItems();for(const[s,i]of this.inputs.affected(t,e))this.notify("items/changed",{item:s,paths:i})}async wroteOutside(e){let t;for(const i of e){const{changed:n,lines:r}=await this.texts.changed(i).catch(()=>({changed:!1,lines:void 0}));n&&(t={path:i,...r})}if(t===void 0)return;const s=await this.itemOf(t.path);this.presence.agent({doing:"editing",...s===void 0?{}:{item:s},source:t})}async itemOf(e){const t=await this.listedItems(),s=t.filter(i=>i.dir!==""&&e.startsWith(`${i.dir}/`)).sort((i,n)=>n.dir.length-i.dir.length);return(t.find(i=>i.entry===e)??t.find(i=>i.files!==void 0&&k(i.files,e))??s[0])?.id}async listedItems(){const e=Date.now();return this.listed!==void 0&&e-this.listed.at<se||(this.listed={at:e,items:this.tool("project/items",{}).then(s=>s.items,()=>[])}),await this.listed?.items??[]}owners=new Map;watchOwner(e){return this.owners.get(e)}connect(e,t={}){const s=`c${E(6).toString("hex")}`;this.clients.set(s,e);const i=this.handlersFor(s,t.origin);return{id:s,receive:async n=>{const r=await this.answerOne(i,n);r&&e(r)},close:()=>{this.clients.delete(s),this.watcher.forget(s);for(const[n,r]of this.owners)r===s&&this.owners.delete(n)}}}channel(){const e=new Set,t=this.connect(s=>{const i=JSON.parse(JSON.stringify(s));queueMicrotask(()=>{for(const n of e)n(i)})});return{send:s=>{t.receive(JSON.parse(JSON.stringify(s)))},listen:s=>(e.add(s),()=>e.delete(s)),close:()=>{t.close()}}}notify(e,t){for(const s of this.clients.values())s({jsonrpc:c,method:e,params:t})}sendTo(e,t,s){e!==void 0&&this.clients.get(e)?.({jsonrpc:c,method:t,params:s})}async answerOne(e,t){const s=C.safeParse(t);if(!s.success){const n=t?.id;return typeof n!="string"&&typeof n!="number"?void 0:{jsonrpc:c,id:n,error:{code:d.invalidRequest,message:"Not a JSON-RPC request."}}}const i=s.data;return Object.hasOwn(y,i.method)&&i.method!=="tools/call"?{jsonrpc:c,id:i.id,error:{code:d.methodNotFound,message:`${i.method} is answered by the page that hosts the editor, not by allyhub dev's server.`}}:u(SERVER_METHODS,e,i)}handlersFor(e,t){const{writer:s,watcher:i}=this,n=this.toolSet(()=>this.serving?.tree(t));return{"files/read":({path:r})=>s.read(r),"files/write":async({path:r,text:o,over:l})=>({version:await s.write(r,o,l,e)}),"files/upload":async({dir:r,name:o,data:l})=>({path:await s.upload(r,o,Buffer.from(l,"base64"),e)}),"files/url":async({path:r})=>{if(await x(this.root,r),!this.serving)throw new f(d.unavailable,"This server serves no files over HTTP: only allyhub dev's does.");return{url:this.serving.file(t,r)}},"files/list":({dir:r})=>s.list(r),"files/move":async({from:r,to:o})=>({rewritten:await s.move(r,o,e)}),"files/remove":async({path:r})=>({trash:await s.remove(r,e)}),"files/trash":async()=>({entries:await s.trash()}),"files/restore":async({id:r})=>({path:await s.restore(r,e)}),"files/watch":async({paths:r})=>{for(const l of r)await x(this.root,l);const o=await i.watch(e,r);return this.owners.set(o,e),{watch:o}},"files/unwatch":({watch:r})=>(this.owners.get(r)===e&&(i.unwatch(r),this.owners.delete(r)),Promise.resolve({})),"tools/call":async({name:r,arguments:o})=>({result:await this.runTool(n,r,o)}),"presence/get":()=>Promise.resolve({collaborators:this.presence.list()})}}toolSet(e){const t=this.toolContext(e);return{core:Z(t),context:X(t)}}async runTool(e,t,s){const i={jsonrpc:c,id:0,method:t,params:s},n=Object.hasOwn(h,t)?void 0:this.contributed.get(t);let r;if(n===void 0)r=await u(h,e.core,i);else{const o=await z(n).catch(l=>{throw new f(d.internal,l instanceof Error?l.message:String(l))});r=await u({[t]:o},{[t]:l=>o.run(l,e.context)},i)}if("error"in r)throw new f(r.error.code,r.error.message,r.error.data);return r.result}hasTool(e){return Object.hasOwn(h,e)||this.contributed.has(e)}toolContext(e){return{live:this.live,checker:this.checker,exports:this.exports,reveal:this.reveal,tree:e,extensions:this.extensions,services:this.services,held:this.held,kindContext:U(this.root,t=>this.hasTool(t),(t,s)=>this.tool(t,s)),inputs:this.inputs,pages:this.pages}}async tool(e,t,s={}){const i=await this.runTool(this.toolSet(()=>s.tree??this.serving?.tree(void 0)),e,t);return Object.hasOwn(h,e)?h[e].result.parse(i):i}async planDeletionOfItem(e){const t=await D(this.root),{listed:s}=await F(this.root,this.live.kinds,t,this.extensions?.fileEditors()??[]),i=s.find(a=>a.id===e);if(i===void 0)throw new f(d.notFound,`There is no item ${e}.`);const n=this.live.latest(),r=new Map((n?.items??[]).map(a=>[a.id,a.files])),o=a=>{const w=!m(a);return{id:a.id,entry:a.entry,ofKind:w,files:w?r.get(a.id):[{path:a.entry}],inputs:[...this.inputs.of(a.id)]}},{work:l}=await _(this.root),{moves:b,stays:O}=H({target:o(i),others:s.filter(a=>a.id!==e).map(o),listed:T(l).map(a=>S(a.file)).filter(a=>a!==i.entry),files:t}),p=n?.pieces.find(a=>a.place===e)?.title;return{item:e,name:v(i,typeof p=="string"?p:void 0),...m(i)?{}:{kind:i.kind},entry:i.entry,moves:b,stays:O}}deleteItemFromSidebar(e,t={}){return this.writer.moveToTrashAndUnlist({planNow:()=>this.planDeletionOfItem(e),keptDays:t.keptDays??A,...t.now===void 0?{}:{now:t.now}},ie)}async close(){this.unhearJobs(),this.presence.close(),this.watcher.close(),this.clients.clear();for(const e of[...this.held.values()].reverse())await Promise.resolve(e.dispose()).catch(()=>{});this.held.clear(),await this.pages.close(),await this.checker?.close(),await this.exports.close(),await this.live.close()}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readFile as ne,readdir as ie,realpath as re,stat as ae}from"node:fs/promises";import{setTimeout as ce}from"node:timers/promises";import{join as P,relative as de,sep as fe}from"node:path";import{openPage as le}from"@allyhub/browser";import{KeyedStore as ue}from"@allyhub/project";import{NEVER_CANCELLED as pe}from"@allyhub/extension-api";import{COMPONENT_STILLS_MAX as V,KindSnapshotSchema as me,RpcError as X,SNAPSHOT_TREE as b,pieceSourcePath as he,snapshotAnswerPath as T,snapshotPreviewPath as we,stillPath as Q,stillsIndexKey as ge,stillsIndexPath as ye}from"@allyhub/protocol";import{runtimeFiles as be}from"@allyhub/stage-page";import{itemPreview as ke}from"./card.js";import{offlinePage as $e}from"./offline-page.js";import{kindContext as Se,kindItem as Ee}from"./kinds.js";import{USE_FORMS as Pe,mediaTypeOf as F}from"@allyhub/formats";import{Reach as ve,pieceBundle as Me,pieceNames as je,reachedCheck as Ie,reachedSource as Oe}from"./reach.js";import{matteFile as Te}from"./tree.js";const Ne="assets/";export const PAGE_RECORDING={width:1440,height:900,timeout:3e4,settle:1500};const N="https://tree.invalid/";function _(i){return typeof i=="string"?i.startsWith(N)?i.slice(N.length):i:Array.isArray(i)?i.map(_):i!==null&&typeof i=="object"?Object.fromEntries(Object.entries(i).map(([S,a])=>[S,_(a)])):i}const j=i=>new TextEncoder().encode(JSON.stringify(i));async function Y(i){return(await ie(i,{recursive:!0,withFileTypes:!0}).catch(()=>[])).filter(a=>a.isFile()).map(a=>de(i,P(a.parentPath,a.name)).split(fe).join("/"))}const xe=i=>ae(i).then(S=>S.isFile(),()=>!1);export async function recordTree(i,S={}){const{project:a}=i,{live:u,root:y}=a;await a.watcher.settled();const k=new Map,g=(e,t,o=F(e))=>{k.set(e,{path:e,type:o,file:t})},L=(e,t)=>{k.set(e,{path:e,type:F(e),file:t,immutable:!0})},v=(e,t,o=F(e))=>{k.set(e,{path:e,type:o,bytes:t})},W=async(e,t)=>{for(const o of await Y(t))g(`${e}${o}`,P(t,o))},Z=u.revision,d=await u.prepared(),x=new Map;if(i.ui!==void 0)for(const e of await Y(i.ui))(e.startsWith(Ne)?L:g)(`${b.editor}${e}`,P(i.ui,e));for(const[e,t]of await be())g(`${b.runtime}${e}`,t);const I=async(e,t)=>{let o;try{o={result:_(await a.tool(e,t,{tree:N}))}}catch(n){o={error:n instanceof X?{code:n.code,message:n.message}:{code:-32603,message:n instanceof Error?n.message:""}}}const r=T(e,t);v(r,j(o));const f=t.item;return typeof f=="string"&&x.set(f,[...x.get(f)??[],r]),o},ee=Se(y,e=>a.hasTool(e),async(e,t)=>{const o=await I(e,t);if(o.error)throw new X(o.error.code,o.error.message);return o.result}),te=async(e,t,o)=>{const r=new Map;for(const s of o)r.set(ge(s),s);if(r.size===0)return;const f=ue.of(y,"stills"),n={stills:{}},$=p.of(e),m=[...r];for(let s=0;s<m.length;s+=V){const l=m.slice(s,s+V);(await a.tool("components/stills",{item:e,...t===""?{}:{version:t},components:l.map(([,w])=>w)},{tree:N}).catch(()=>{}))?.stills.forEach((w,E)=>{const H=l[E]?.[0];!w||H===void 0||(n.stills[H]=w.key,g(Q(w.key),f.path(`${w.key}.webp`),"image/webp"),$?.tree.add(Q(w.key)))})}const c=ye(e,t);v(c,j(n),"application/json"),$?.tree.add(c)},B=(await I("project/items",{})).result,O=B?.items??[],R=O.filter(e=>e.kind!==void 0),C=O.filter(e=>e.kind===void 0&&e.kindInfo?.share===!0),oe=new Map(d.items.map(e=>[e.id,e.files])),p=new ve([...R.map(e=>({...e,files:oe.get(e.id)??e.files})),...C],d.files,(d.bundle?.beside??[]).map(e=>`${b.build}${e}`)),M=a.checker?.state,D=M===void 0||M.status==="waiting"||M.status==="running"?{status:"off",revision:u.revision,problems:M?.problems??[],facts:M?.facts??[]}:M;v(T("check/results",{}),j({result:D}));for(const e of p.items){const t=p.of(e),o=new Set(d.pieces.filter(n=>n.place===e).map(n=>n.id)),r=O.find(n=>n.id===e)?.entry,f=n=>n===r||p.itemsOf(n).includes(e);t?.own.push({path:T("project/items",{}),type:"application/json",bytes:j({result:{...B,items:O.filter(n=>n.id===e)}})},{path:T("check/results",{}),type:"application/json",bytes:j({result:Ie(D,o,f)})})}for(const e of d.bundle?.chunks.files??[])L(`${b.build}${e}`,P(u.pieceDir,e));for(const e of d.bundle?.beside??[])await W(`${b.build}${e}`,P(u.pieceDir,e));const q=new Set(Object.keys(d.media));for(const e of Object.keys(d.media)){const t=Te(y,d.media[e]);t!==void 0&&await xe(t)&&g(`${b.matte}${e}`,t,"video/mp4")}const A=new Map,G=new Map,se=a.extensions?.fileEditors()??[];for(const e of C)se.some(t=>t.id===e.kindInfo?.editor&&t.page)&&(A.set(e.id,{}),G.set(e.id,e.entry));const J=new Map,K=e=>({file:(t,o,r)=>{g(`${e}${t}`,o,r)},folder:(t,o)=>W(`${e}${t}`,o),bytes:(t,o,r)=>{v(`${e}${t}`,o,r)},media:t=>{q.add(t)}});for(const e of R){const t=await a.extensions?.kindProvider(e.kind);if(!t?.snapshot)continue;const o=await Promise.resolve(t.snapshot(Ee(e),ee,pe)).catch(()=>{}),r=me.safeParse(o??{});if(!r.success)continue;const{stills:f,shows:n,routes:$,page:m}=r.data;m&&A.set(e.id,{...m.folder===void 0?{}:{folder:m.folder},...m.file===void 0?{}:{file:m.file}}),n&&J.set(e.id,{media:new Set(n.media),data:new Set(n.data)});for(const c of f??[])await I("components/stage",{item:e.id,version:c.version}),c.version===""&&await I("components/stage",{item:e.id}),await te(e.id,c.version,c.components);for(const[c,s]of Object.entries($??{})){const l=await u.routes.route(c).catch(()=>{});if(l?.route.recordItem)for(const h of s)await l.route.recordItem(h,K(c),l.context).catch(()=>{})}}for(const e of q)g(`${b.media}${e}`,P(y,e));for(const[e,t]of A){const o=await a.tool("items/page",{item:e,...t}).catch(()=>{});if(!o)continue;const r=new URL(o.url).origin,f=G.get(e),n=await le(await u.browser(),{width:PAGE_RECORDING.width,height:PAGE_RECORDING.height,allow:s=>s===r||s.startsWith(`${r}/`)||f!==void 0&&s.startsWith("https://")}).catch(()=>{});if(!n)continue;const $=[],m=[];try{if(f!==void 0){const s=n.session,l=new Map;s.on("Network.responseReceived",h=>{h.response.url.startsWith("https://")&&h.response.status===200&&l.set(h.requestId,{url:h.response.url,mime:h.response.mimeType})}),s.on("Network.loadingFinished",h=>{const w=l.get(h.requestId);w&&m.push(s.send("Network.getResponseBody",{requestId:h.requestId}).then(E=>{$.push({...w,body:E.base64Encoded?Buffer.from(E.body,"base64"):new TextEncoder().encode(E.body)})},E=>{if(!(E instanceof Error))throw E}))}),await s.send("Network.enable",{})}await n.goto(o.url,{timeoutMs:PAGE_RECORDING.timeout}),await n.evaluate("document.fonts.ready.then(() => true)",{timeoutMs:PAGE_RECORDING.timeout}),await ce(PAGE_RECORDING.settle)}catch{}finally{await Promise.allSettled(m),await n.close()}if(f===void 0||$.length===0)continue;const c=await ne(P(y,f),"utf8").catch(()=>{});if(c!==void 0)for(const s of $e(f,c,$)){const l=`${b.pages}${s.path}`;v(l,s.bytes,s.type),p.of(e)?.tree.add(l)}}for(const e of p.items){const t=p.of(e);if(t)for(const o of a.inputs.of(e))if(o===""||o.endsWith("/"))for(const r of d.files)r.startsWith(o)&&t.files.add(r);else d.files.includes(o)&&t.files.add(o)}for(const e of u.routes.specs.keys()){const t=await u.routes.route(e).catch(()=>{});t?.route.record&&await t.route.record(K(e),t.context).catch(()=>{})}const U=[y,await re(y).catch(()=>y)];for(const e of d.pieces){const t=await u.source(e.id).catch(()=>{});if(!t)continue;const o=[e,...d.pieces.filter(s=>Re(d.items,e.place).has(s.place))],r=o.map(s=>({p:s,bundle:Me(d.bundle?.chunks,s.id)})),f={files:new Set(r.flatMap(s=>[...s.bundle.files])),modules:new Set(r.flatMap(s=>[...s.bundle.modules]))},n={media:new Set,data:new Set};for(const{p:s,bundle:l}of r){const h=je({prepared:d,piece:s,reach:p,modules:l.modules,roots:U,reads:a.checker?.reads.get(s.id),shows:J.get(s.place)});for(const w of h.media)n.media.add(w);for(const w of h.data)n.data.add(w)}const $=d.pieces.filter(s=>!o.includes(s)&&!U.some(l=>f.modules.has(P(l,s.file)))).map(s=>s.id),m=he(e.id);v(m,j(Oe(t,n,$)));const c=p.of(e.place);if(c){c.tree.add(m);for(const s of f.files)c.tree.add(`${b.build}${s}`);for(const s of n.media)c.tree.add(`${b.media}${s}`),c.tree.add(`${b.matte}${s}`),c.files.add(s)}}for(const[e,t]of x)for(const o of t)p.of(e)?.tree.add(o);for(const e of d.docs)for(const t of e.shows)p.of(e.place)?.files.add(t);for(const e of d.sheets)for(const t of e.files)p.of(e.place)?.files.add(t);const z=S.preview===!1?void 0:S.preview??(e=>ke(i,e));if(z)for(const e of R){const t=await z(e).catch(()=>{});if(t===void 0)continue;const o=we(e.id);v(o,Buffer.from(JSON.stringify(t)),"application/json"),p.of(e.id)?.tree.add(o)}return{revision:Z,files:[...k.values()],reach:p.done(new Set(k.keys())),routes:u.routes.loads()}}function Re(i,S){const a=new Map(i.map(k=>[k.id,k])),u=new Set,y=k=>{for(const g of a.get(k)?.uses??[])g.type===Pe.live&&!u.has(g.item)&&(u.add(g.item),y(g.item))};return y(S),u}
2
+ import{readFile as ie,readdir as re,realpath as ae,stat as ce}from"node:fs/promises";import{setTimeout as de}from"node:timers/promises";import{join as P,relative as fe,sep as le}from"node:path";import{openPage as ue}from"@allyhub/browser";import{KeyedStore as pe}from"@allyhub/project";import{NEVER_CANCELLED as me}from"@allyhub/extension-api";import{COMPONENT_STILLS_MAX as X,KindSnapshotSchema as he,RpcError as Q,SNAPSHOT_TREE as b,pieceSourcePath as we,snapshotAnswerPath as N,snapshotPreviewPath as ge,stillPath as Y,stillsIndexKey as ye,stillsIndexPath as be}from"@allyhub/protocol";import{runtimeFiles as ke}from"@allyhub/stage-page";import{itemPreview as $e}from"./card.js";import{offlinePage as Se}from"./offline-page.js";import{kindContext as Ee,kindItem as Pe}from"./kinds.js";import{USE_FORMS as ve,mediaTypeOf as W,servedPage as Me}from"@allyhub/formats";import{Reach as je,pieceBundle as Te,pieceNames as xe,reachedCheck as Ie,reachedSource as Oe}from"./reach.js";import{matteFile as Ne}from"./tree.js";const Re="assets/";export const PAGE_RECORDING={width:1440,height:900,timeout:3e4,settle:1500};const R="https://tree.invalid/";function B(i){return typeof i=="string"?i.startsWith(R)?i.slice(R.length):i:Array.isArray(i)?i.map(B):i!==null&&typeof i=="object"?Object.fromEntries(Object.entries(i).map(([S,c])=>[S,B(c)])):i}const T=i=>new TextEncoder().encode(JSON.stringify(i));async function Z(i){return(await re(i,{recursive:!0,withFileTypes:!0}).catch(()=>[])).filter(c=>c.isFile()).map(c=>fe(i,P(c.parentPath,c.name)).split(le).join("/"))}const Ae=i=>ce(i).then(S=>S.isFile(),()=>!1);export async function recordTree(i,S={}){const{project:c}=i,{live:p,root:y}=c;await c.watcher.settled();const k=new Map,g=(e,t,o=W(e))=>{k.set(e,{path:e,type:o,file:t})},C=(e,t)=>{k.set(e,{path:e,type:W(e),file:t,immutable:!0})},v=(e,t,o=W(e))=>{k.set(e,{path:e,type:o,bytes:t})},D=async(e,t)=>{for(const o of await Z(t))g(`${e}${o}`,P(t,o))},ee=p.revision,d=await p.prepared(),A=new Map;if(i.ui!==void 0)for(const e of await Z(i.ui))(e.startsWith(Re)?C:g)(`${b.editor}${e}`,P(i.ui,e));for(const[e,t]of await ke())g(`${b.runtime}${e}`,t);const I=async(e,t)=>{let o;try{o={result:B(await c.tool(e,t,{tree:R}))}}catch(n){o={error:n instanceof Q?{code:n.code,message:n.message}:{code:-32603,message:n instanceof Error?n.message:""}}}const r=N(e,t);v(r,T(o));const f=t.item;return typeof f=="string"&&A.set(f,[...A.get(f)??[],r]),o},te=Ee(y,e=>c.hasTool(e),async(e,t)=>{const o=await I(e,t);if(o.error)throw new Q(o.error.code,o.error.message);return o.result}),oe=async(e,t,o)=>{const r=new Map;for(const s of o)r.set(ye(s),s);if(r.size===0)return;const f=pe.of(y,"stills"),n={stills:{}},E=h.of(e),m=[...r];for(let s=0;s<m.length;s+=X){const w=m.slice(s,s+X);(await c.tool("components/stills",{item:e,...t===""?{}:{version:t},components:w.map(([,u])=>u)},{tree:R}).catch(()=>{}))?.stills.forEach((u,$)=>{const x=w[$]?.[0];!u||x===void 0||(n.stills[x]=u.key,g(Y(u.key),f.path(`${u.key}.webp`),"image/webp"),E?.tree.add(Y(u.key)))})}const a=be(e,t);v(a,T(n),"application/json"),E?.tree.add(a)},q=(await I("project/items",{})).result,O=q?.items??[],F=O.filter(e=>e.kind!==void 0),G=O.filter(e=>e.kind===void 0&&e.kindInfo?.share===!0),se=new Map(d.items.map(e=>[e.id,e.files])),h=new je([...F.map(e=>({...e,files:se.get(e.id)??e.files})),...G],d.files,(d.bundle?.beside??[]).map(e=>`${b.build}${e}`)),M=c.checker?.state,J=M===void 0||M.status==="waiting"||M.status==="running"?{status:"off",revision:p.revision,problems:M?.problems??[],facts:M?.facts??[]}:M;v(N("check/results",{}),T({result:J}));for(const e of h.items){const t=h.of(e),o=new Set(d.pieces.filter(n=>n.place===e).map(n=>n.id)),r=O.find(n=>n.id===e)?.entry,f=n=>n===r||h.itemsOf(n).includes(e);t?.own.push({path:N("project/items",{}),type:"application/json",bytes:T({result:{...q,items:O.filter(n=>n.id===e)}})},{path:N("check/results",{}),type:"application/json",bytes:T({result:Ie(J,o,f)})})}for(const e of d.bundle?.chunks.files??[])C(`${b.build}${e}`,P(p.pieceDir,e));for(const e of d.bundle?.beside??[])await D(`${b.build}${e}`,P(p.pieceDir,e));const K=new Set(Object.keys(d.media));for(const e of Object.keys(d.media)){const t=Ne(y,d.media[e]);t!==void 0&&await Ae(t)&&g(`${b.matte}${e}`,t,"video/mp4")}const _=new Map,L=new Map,ne=c.extensions?.fileEditors()??[];for(const e of G)ne.some(t=>t.id===e.kindInfo?.editor&&t.page)&&(_.set(e.id,{}),L.set(e.id,e.entry));const U=new Map,z=e=>({file:(t,o,r)=>{g(`${e}${t}`,o,r)},folder:(t,o)=>D(`${e}${t}`,o),bytes:(t,o,r)=>{v(`${e}${t}`,o,r)},media:t=>{K.add(t)}});for(const e of F){const t=await c.extensions?.kindProvider(e.kind);if(!t?.snapshot)continue;const o=await Promise.resolve(t.snapshot(Pe(e),te,me)).catch(()=>{}),r=he.safeParse(o??{});if(!r.success)continue;const{stills:f,shows:n,routes:E,page:m}=r.data;m&&(_.set(e.id,{...m.folder===void 0?{}:{folder:m.folder},...m.file===void 0?{}:{file:m.file}}),p.kinds.some(a=>a.id===e.kind&&a.network===!0)&&L.set(e.id,m.file??e.entry)),n&&U.set(e.id,{media:new Set(n.media),data:new Set(n.data)});for(const a of f??[])await I("components/stage",{item:e.id,version:a.version}),a.version===""&&await I("components/stage",{item:e.id}),await oe(e.id,a.version,a.components);for(const[a,s]of Object.entries(E??{})){const w=await p.routes.route(a).catch(()=>{});if(w?.route.recordItem)for(const l of s)await w.route.recordItem(l,z(a),w.context).catch(()=>{})}}for(const e of K)g(`${b.media}${e}`,P(y,e));for(const[e,t]of _){const o=await c.tool("items/page",{item:e,...t}).catch(()=>{});if(!o)continue;const r=new URL(o.url).origin,f=L.get(e),n=await ue(await p.browser(),{width:PAGE_RECORDING.width,height:PAGE_RECORDING.height,allow:l=>l===r||l.startsWith(`${r}/`)||f!==void 0&&l.startsWith("https://")}).catch(()=>{});if(!n)continue;const E=[],m=[];try{if(f!==void 0){const l=n.session,u=new Map;l.on("Network.responseReceived",$=>{$.response.url.startsWith("https://")&&$.response.status===200&&u.set($.requestId,{url:$.response.url,mime:$.response.mimeType})}),l.on("Network.loadingFinished",$=>{const x=u.get($.requestId);x&&m.push(l.send("Network.getResponseBody",{requestId:$.requestId}).then(j=>{E.push({...x,body:j.base64Encoded?Buffer.from(j.body,"base64"):new TextEncoder().encode(j.body)})},j=>{if(!(j instanceof Error))throw j}))}),await l.send("Network.enable",{})}await n.goto(o.url,{timeoutMs:PAGE_RECORDING.timeout}),await n.evaluate("document.fonts.ready.then(() => true)",{timeoutMs:PAGE_RECORDING.timeout}),await de(PAGE_RECORDING.settle)}catch{}finally{await Promise.allSettled(m),await n.close()}if(f===void 0)continue;const a=await ie(P(y,f),"utf8").catch(()=>{});if(a===void 0)continue;const s=Me(a,f,d.data).html;let w=Se(f,s,E);w.length===0&&s!==a&&(w=[{path:f,type:"text/html; charset=utf-8",bytes:new TextEncoder().encode(s)}]);for(const l of w){const u=`${b.pages}${l.path}`;v(u,l.bytes,l.type),h.of(e)?.tree.add(u)}}for(const e of h.items){const t=h.of(e);if(t)for(const o of c.inputs.of(e))if(o===""||o.endsWith("/"))for(const r of d.files)r.startsWith(o)&&t.files.add(r);else d.files.includes(o)&&t.files.add(o)}for(const e of p.routes.specs.keys()){const t=await p.routes.route(e).catch(()=>{});t?.route.record&&await t.route.record(z(e),t.context).catch(()=>{})}const H=[y,await ae(y).catch(()=>y)];for(const e of d.pieces){const t=await p.source(e.id).catch(()=>{});if(!t)continue;const o=[e,...d.pieces.filter(s=>Fe(d.items,e.place).has(s.place))],r=o.map(s=>({p:s,bundle:Te(d.bundle?.chunks,s.id)})),f={files:new Set(r.flatMap(s=>[...s.bundle.files])),modules:new Set(r.flatMap(s=>[...s.bundle.modules]))},n={media:new Set,data:new Set};for(const{p:s,bundle:w}of r){const l=xe({prepared:d,piece:s,reach:h,modules:w.modules,roots:H,reads:c.checker?.reads.get(s.id),shows:U.get(s.place)});for(const u of l.media)n.media.add(u);for(const u of l.data)n.data.add(u)}const E=d.pieces.filter(s=>!o.includes(s)&&!H.some(w=>f.modules.has(P(w,s.file)))).map(s=>s.id),m=we(e.id);v(m,T(Oe(t,n,E)));const a=h.of(e.place);if(a){a.tree.add(m);for(const s of f.files)a.tree.add(`${b.build}${s}`);for(const s of n.media)a.tree.add(`${b.media}${s}`),a.tree.add(`${b.matte}${s}`),a.files.add(s)}}for(const[e,t]of A)for(const o of t)h.of(e)?.tree.add(o);for(const e of d.docs)for(const t of e.shows)h.of(e.place)?.files.add(t);for(const e of d.sheets)for(const t of e.files)h.of(e.place)?.files.add(t);const V=S.preview===!1?void 0:S.preview??(e=>$e(i,e));if(V)for(const e of F){const t=await V(e).catch(()=>{});if(t===void 0)continue;const o=ge(e.id);v(o,Buffer.from(JSON.stringify(t)),"application/json"),h.of(e.id)?.tree.add(o)}return{revision:ee,files:[...k.values()],reach:h.done(new Set(k.keys())),routes:p.routes.loads()}}function Fe(i,S){const c=new Map(i.map(k=>[k.id,k])),p=new Set,y=k=>{for(const g of c.get(k)?.uses??[])g.type===ve.live&&!p.has(g.item)&&(p.add(g.item),y(g.item))};return y(S),p}
@@ -1,6 +1,6 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{randomBytes as F}from"node:crypto";import{readFile as D}from"node:fs/promises";import{createServer as J}from"node:http";import{join as M,resolve as C}from"node:path";import{getRequestListener as W}from"@hono/node-server";import{Hono as G}from"hono";import{WebSocketServer as K}from"ws";import{KeyedStore as Y}from"@allyhub/project";import{CollaboratorStateSchema as Q,PRESENCE_PATH as V,SNAPSHOT_TREE as $,TREE_PAGES as X,stageCsp as Z}from"@allyhub/protocol";import{runtimeFile as ee}from"@allyhub/stage-page";import{pathProblem as te}from"./paths.js";import{fileResponse as g}from"./respond.js";import{ProjectServer as ne}from"./project.js";import{STILL_NAME as re,inside as x,matteFile as oe,sourceName as se}from"./tree.js";export const RPC_PATH="/rpc",RAW_PATH="/files/raw/";const p={"access-control-allow-origin":"*"},L=/^[a-z][a-z0-9+.-]*:\/\/[a-z0-9.-]+(:\d{1,5})?$/u;export const PING_MS=3e4,ALLYHUB_FORWARDED="allyhub-forwarded";export function forwardedHost(n){const d=n[ALLYHUB_FORWARDED],y=(n.forwarded??(Array.isArray(d)?d[0]:d))?.split(",")[0]?.split(";").map(i=>i.trim().split("=")).find(([i])=>i?.toLowerCase()==="host")?.[1];if(y!==void 0)return y.replace(/^"(.*)"$/u,"$1");const u=n["x-forwarded-host"];return(Array.isArray(u)?u[0]:u)?.split(",")[0]?.trim()}export function frameSources(n){const d=["'self'","http://127.0.0.1:*","http://localhost:*"];if(n===void 0)return d;const a=new URL(n.replace("{port}","1")),y=new URL(n.replace("{port}","2"));if(a.port!==y.port)return[...d,`${a.protocol}//${a.hostname}:*`];const u=a.hostname.slice(a.hostname.indexOf(".")+1);return[...d,`${a.protocol}//*.${u}`]}export async function startDevServer(n){const d=C(n.root);if(n.embedder!==void 0&&!L.test(n.embedder))throw new Error(`Not an origin: ${n.embedder}`);if(n.publicOrigin!==void 0&&!L.test(n.publicOrigin.replace("{port}","1")))throw new Error(`Not an origin: ${n.publicOrigin}`);const a=n.token??F(18).toString("base64url"),u=`/s/${F(18).toString("base64url")}/`,i=await ne.open({...n,root:d,...n.publicOrigin===void 0?{}:{reveal:!1}});let f=0;const P=()=>f===0?void 0:n.publicOrigin?.replace("{port}",String(f)),v=()=>{const e=P();return e===void 0?void 0:new URL(e).host},E=()=>{const e=v();return new Set([`127.0.0.1:${String(f)}`,`localhost:${String(f)}`,...e===void 0?[]:[e]])},R=e=>e===v()?P()??"":`http://${e}`,N=e=>new URL(e.req.url).host,T=e=>R(N(e)),A=e=>{const t=v();t!==void 0&&forwardedHost(e.headers)===t&&(e.headers.host=t)},U=e=>e??`http://127.0.0.1:${String(f)}`;i.serving={file:(e,t)=>`${U(e)}${RAW_PATH}${t.split("/").map(encodeURIComponent).join("/")}?token=${encodeURIComponent(a)}`,tree:e=>`${U(e)}${u}`};const{routes:O}=i.live,b=new G,I=async e=>{if(!n.ui)return e.text("allyhub dev serves its editors here.",200);const t=await D(M(n.ui,"index.html"),"utf8").catch(()=>{});if(t===void 0)return e.text("The page's files are missing: build them first (pnpm --filter @allyhub/editor-web build).",500);const c=F(16).toString("base64");return e.html(t.replace(/<script/gu,`<script nonce="${c}"`).replace("</head>",`<meta name="allyhub-token" content="${a}"></head>`),200,{"content-security-policy":["default-src 'self'",`script-src 'self' 'nonce-${c}'`,"style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","media-src 'self' blob:","font-src 'self' data:",`connect-src 'self' ws://${N(e)}`,`frame-src ${frameSources(n.publicOrigin).join(" ")}`,`frame-ancestors ${n.embedder??"'none'"}`].join("; "),"cache-control":"no-store"})};b.get("/",I),b.post(V,async e=>{if(e.req.header("authorization")!==`Bearer ${a}`)return e.text("forbidden",403);const t=Q.safeParse(await e.req.json().catch(()=>{}));return t.success?(i.presence.agent(t.data),e.body(null,204)):e.text(t.error.message,400)}),b.get(`${RAW_PATH}*`,async e=>{if(e.req.query("token")!==a)return e.text("forbidden",403);const t=decodeURIComponent(e.req.path.slice(RAW_PATH.length));if(te(t)!==void 0)return e.text("forbidden",403);const c=x(d,t);return c?g(c,e.req.header("range"),{"x-content-type-options":"nosniff","content-security-policy":"sandbox; default-src 'none'; img-src 'self'; media-src 'self'; style-src 'unsafe-inline'"}):e.text("forbidden",403)}),b.get(`${u}*`,async e=>{let t;try{t=decodeURIComponent(e.req.path.slice(u.length))}catch{return e.notFound()}const c=e.req.header("range"),m=T(e),l=t.slice(0,t.indexOf("/")+1),s=t.slice(l.length);switch(l){case $.runtime:{const r=ee(s);if(!r)return e.notFound();const o=Object.values(X).includes(t);return g(r,void 0,{...p,...o?{"content-security-policy":Z(`${m}${u}`,[m,...n.embedder?[n.embedder]:[],...n.framers??[]],O.loads())}:{}})}case $.build:{const r=se(s);if(r===void 0){const o=x(i.live.pieceDir,s);return o?g(o,void 0,p):e.notFound()}try{return e.json(await i.live.source(r),200,{...p,"cache-control":"no-store"})}catch(o){return e.json({error:{message:o instanceof Error?o.message:String(o)}},404,p)}}case $.media:{const o=Object.hasOwn(i.live.latest()?.media??{},s)||O.allowed(s)?x(d,s):void 0;return o?g(o,c,p):e.notFound()}case $.matte:{const r=oe(d,i.live.latest()?.media[s]);return r?g(r,c,{...p,"content-type":"video/mp4"}):e.notFound()}case $.stills:return re.test(s)?g(Y.of(d,"stills").path(s),void 0,{...p,"cache-control":"public, max-age=31536000, immutable"}):e.notFound();default:try{const r=await O.route(l);if(!r)return await e.notFound();const o=new WeakSet,h=await r.route.serve({path:s,query:new URL(e.req.url).searchParams,file:async(B,q,z)=>{const j=x(B,q);if(!j)return;const k=await g(j,c,{...p,...z});return o.add(k),k}},r.context);return h?(!o.has(h)&&!h.headers.has("access-control-allow-origin")&&h.headers.set("access-control-allow-origin","*"),h):await e.notFound()}catch(r){return e.text(r instanceof Error?r.message:String(r),500,{...p})}}}),b.get("/*",async e=>{if(!n.ui)return e.notFound();const t=x(C(n.ui),decodeURIComponent(e.req.path.slice(1)));return t?g(t,void 0,{"cache-control":"public, max-age=3600"}):e.notFound()});const S=new K({noServer:!0,maxPayload:512*1024*1024});S.on("connection",(e,t)=>{const c=i.connect(r=>{e.readyState===e.OPEN&&e.send(JSON.stringify(r))},{origin:R(t.headers.host??"")});e.on("message",(r,o)=>{if(o||!Buffer.isBuffer(r))return;let h;try{h=JSON.parse(r.toString("utf8"))}catch{e.send(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Not JSON."}}));return}c.receive(h)});const m=n.pingMs??PING_MS;let l=!0;e.on("pong",()=>{l=!0});const s=m>0?setInterval(()=>{if(!l){e.terminate();return}l=!1,e.ping()},m):void 0;s?.unref(),e.on("close",()=>{clearInterval(s),c.close()})});const H=W(b.fetch),_=(e,t)=>{e.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),e.end(t)},w=J((e,t)=>{if(A(e),!E().has(e.headers.host??"")){_(t,"forbidden host");return}H(e,t)});w.on("upgrade",(e,t,c)=>{const m=new URL(e.url??"/","http://x"),l=(r,o)=>{t.end(`HTTP/1.1 ${String(r)} ${o}\r
2
+ import{randomBytes as F}from"node:crypto";import{readFile as D}from"node:fs/promises";import{createServer as J}from"node:http";import{join as M,resolve as C}from"node:path";import{getRequestListener as W}from"@hono/node-server";import{Hono as G}from"hono";import{WebSocketServer as K}from"ws";import{migrateProject as Y}from"@allyhub/build";import{KeyedStore as Q}from"@allyhub/project";import{CollaboratorStateSchema as V,PRESENCE_PATH as X,SNAPSHOT_TREE as $,TREE_PAGES as Z,stageCsp as ee}from"@allyhub/protocol";import{runtimeFile as te}from"@allyhub/stage-page";import{pathProblem as ne}from"./paths.js";import{fileResponse as g}from"./respond.js";import{ProjectServer as re}from"./project.js";import{STILL_NAME as oe,inside as x,matteFile as se,sourceName as ie}from"./tree.js";export const RPC_PATH="/rpc",RAW_PATH="/files/raw/";const p={"access-control-allow-origin":"*"},L=/^[a-z][a-z0-9+.-]*:\/\/[a-z0-9.-]+(:\d{1,5})?$/u;export const PING_MS=3e4,ALLYHUB_FORWARDED="allyhub-forwarded";export function forwardedHost(n){const a=n[ALLYHUB_FORWARDED],y=(n.forwarded??(Array.isArray(a)?a[0]:a))?.split(",")[0]?.split(";").map(i=>i.trim().split("=")).find(([i])=>i?.toLowerCase()==="host")?.[1];if(y!==void 0)return y.replace(/^"(.*)"$/u,"$1");const u=n["x-forwarded-host"];return(Array.isArray(u)?u[0]:u)?.split(",")[0]?.trim()}export function frameSources(n){const a=["'self'","http://127.0.0.1:*","http://localhost:*"];if(n===void 0)return a;const c=new URL(n.replace("{port}","1")),y=new URL(n.replace("{port}","2"));if(c.port!==y.port)return[...a,`${c.protocol}//${c.hostname}:*`];const u=c.hostname.slice(c.hostname.indexOf(".")+1);return[...a,`${c.protocol}//*.${u}`]}export async function startDevServer(n){const a=C(n.root);if(n.embedder!==void 0&&!L.test(n.embedder))throw new Error(`Not an origin: ${n.embedder}`);if(n.publicOrigin!==void 0&&!L.test(n.publicOrigin.replace("{port}","1")))throw new Error(`Not an origin: ${n.publicOrigin}`);const c=n.token??F(18).toString("base64url"),u=`/s/${F(18).toString("base64url")}/`;await Y(a,n.kinds);const i=await re.open({...n,root:a,...n.publicOrigin===void 0?{}:{reveal:!1}});let f=0;const P=()=>f===0?void 0:n.publicOrigin?.replace("{port}",String(f)),v=()=>{const e=P();return e===void 0?void 0:new URL(e).host},E=()=>{const e=v();return new Set([`127.0.0.1:${String(f)}`,`localhost:${String(f)}`,...e===void 0?[]:[e]])},R=e=>e===v()?P()??"":`http://${e}`,N=e=>new URL(e.req.url).host,T=e=>R(N(e)),A=e=>{const t=v();t!==void 0&&forwardedHost(e.headers)===t&&(e.headers.host=t)},j=e=>e??`http://127.0.0.1:${String(f)}`;i.serving={file:(e,t)=>`${j(e)}${RAW_PATH}${t.split("/").map(encodeURIComponent).join("/")}?token=${encodeURIComponent(c)}`,tree:e=>`${j(e)}${u}`};const{routes:O}=i.live,b=new G,I=async e=>{if(!n.ui)return e.text("allyhub dev serves its editors here.",200);const t=await D(M(n.ui,"index.html"),"utf8").catch(()=>{});if(t===void 0)return e.text("The page's files are missing: build them first (pnpm --filter @allyhub/editor-web build).",500);const d=F(16).toString("base64");return e.html(t.replace(/<script/gu,`<script nonce="${d}"`).replace("</head>",`<meta name="allyhub-token" content="${c}"></head>`),200,{"content-security-policy":["default-src 'self'",`script-src 'self' 'nonce-${d}'`,"style-src 'self' 'unsafe-inline'","img-src 'self' data: blob:","media-src 'self' blob:","font-src 'self' data:",`connect-src 'self' ws://${N(e)}`,`frame-src ${frameSources(n.publicOrigin).join(" ")}`,`frame-ancestors ${n.embedder??"'none'"}`].join("; "),"cache-control":"no-store"})};b.get("/",I),b.post(X,async e=>{if(e.req.header("authorization")!==`Bearer ${c}`)return e.text("forbidden",403);const t=V.safeParse(await e.req.json().catch(()=>{}));return t.success?(i.presence.agent(t.data),e.body(null,204)):e.text(t.error.message,400)}),b.get(`${RAW_PATH}*`,async e=>{if(e.req.query("token")!==c)return e.text("forbidden",403);const t=decodeURIComponent(e.req.path.slice(RAW_PATH.length));if(ne(t)!==void 0)return e.text("forbidden",403);const d=x(a,t);return d?g(d,e.req.header("range"),{"x-content-type-options":"nosniff","content-security-policy":"sandbox; default-src 'none'; img-src 'self'; media-src 'self'; style-src 'unsafe-inline'"}):e.text("forbidden",403)}),b.get(`${u}*`,async e=>{let t;try{t=decodeURIComponent(e.req.path.slice(u.length))}catch{return e.notFound()}const d=e.req.header("range"),m=T(e),l=t.slice(0,t.indexOf("/")+1),s=t.slice(l.length);switch(l){case $.runtime:{const r=te(s);if(!r)return e.notFound();const o=Object.values(Z).includes(t);return g(r,void 0,{...p,...o?{"content-security-policy":ee(`${m}${u}`,[m,...n.embedder?[n.embedder]:[],...n.framers??[]],O.loads())}:{}})}case $.build:{const r=ie(s);if(r===void 0){const o=x(i.live.pieceDir,s);return o?g(o,void 0,p):e.notFound()}try{return e.json(await i.live.source(r),200,{...p,"cache-control":"no-store"})}catch(o){return e.json({error:{message:o instanceof Error?o.message:String(o)}},404,p)}}case $.media:{const o=Object.hasOwn(i.live.latest()?.media??{},s)||O.allowed(s)?x(a,s):void 0;return o?g(o,d,p):e.notFound()}case $.matte:{const r=se(a,i.live.latest()?.media[s]);return r?g(r,d,{...p,"content-type":"video/mp4"}):e.notFound()}case $.stills:return oe.test(s)?g(Q.of(a,"stills").path(s),void 0,{...p,"cache-control":"public, max-age=31536000, immutable"}):e.notFound();default:try{const r=await O.route(l);if(!r)return await e.notFound();const o=new WeakSet,h=await r.route.serve({path:s,query:new URL(e.req.url).searchParams,file:async(B,q,z)=>{const k=x(B,q);if(!k)return;const U=await g(k,d,{...p,...z});return o.add(U),U}},r.context);return h?(!o.has(h)&&!h.headers.has("access-control-allow-origin")&&h.headers.set("access-control-allow-origin","*"),h):await e.notFound()}catch(r){return e.text(r instanceof Error?r.message:String(r),500,{...p})}}}),b.get("/*",async e=>{if(!n.ui)return e.notFound();const t=x(C(n.ui),decodeURIComponent(e.req.path.slice(1)));return t?g(t,void 0,{"cache-control":"public, max-age=3600"}):e.notFound()});const S=new K({noServer:!0,maxPayload:512*1024*1024});S.on("connection",(e,t)=>{const d=i.connect(r=>{e.readyState===e.OPEN&&e.send(JSON.stringify(r))},{origin:R(t.headers.host??"")});e.on("message",(r,o)=>{if(o||!Buffer.isBuffer(r))return;let h;try{h=JSON.parse(r.toString("utf8"))}catch{e.send(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:-32700,message:"Not JSON."}}));return}d.receive(h)});const m=n.pingMs??PING_MS;let l=!0;e.on("pong",()=>{l=!0});const s=m>0?setInterval(()=>{if(!l){e.terminate();return}l=!1,e.ping()},m):void 0;s?.unref(),e.on("close",()=>{clearInterval(s),d.close()})});const H=W(b.fetch),_=(e,t)=>{e.writeHead(403,{"content-type":"text/plain; charset=utf-8"}),e.end(t)},w=J((e,t)=>{if(A(e),!E().has(e.headers.host??"")){_(t,"forbidden host");return}H(e,t)});w.on("upgrade",(e,t,d)=>{const m=new URL(e.url??"/","http://x"),l=(r,o)=>{t.end(`HTTP/1.1 ${String(r)} ${o}\r
3
3
  connection: close\r
4
4
  content-length: 0\r
5
5
  \r
6
- `)};A(e);const s=e.headers.host??"";if(!E().has(s)){l(403,"Forbidden");return}if(m.pathname!==RPC_PATH){l(404,"Not Found");return}if(e.headers.origin!==R(s)){l(403,"Forbidden");return}if(m.searchParams.get("token")!==a){l(403,"Forbidden");return}S.handleUpgrade(e,t,c,r=>{S.emit("connection",r,e)})});try{await new Promise((e,t)=>{w.once("error",t),w.listen(n.port??0,"127.0.0.1",()=>{e()})})}catch(e){throw await i.close(),e}return f=w.address().port,{url:`http://127.0.0.1:${String(f)}/`,port:f,token:a,tree:`http://127.0.0.1:${String(f)}${u}`,ui:n.ui,project:i,async close(){for(const e of S.clients)e.terminate();S.close(),await new Promise(e=>{w.closeAllConnections(),w.close(()=>{e()})}),await i.close()}}}
6
+ `)};A(e);const s=e.headers.host??"";if(!E().has(s)){l(403,"Forbidden");return}if(m.pathname!==RPC_PATH){l(404,"Not Found");return}if(e.headers.origin!==R(s)){l(403,"Forbidden");return}if(m.searchParams.get("token")!==c){l(403,"Forbidden");return}S.handleUpgrade(e,t,d,r=>{S.emit("connection",r,e)})});try{await new Promise((e,t)=>{w.once("error",t),w.listen(n.port??0,"127.0.0.1",()=>{e()})})}catch(e){throw await i.close(),e}return f=w.address().port,{url:`http://127.0.0.1:${String(f)}/`,port:f,token:c,tree:`http://127.0.0.1:${String(f)}${u}`,ui:n.ui,project:i,async close(){for(const e of S.clients)e.terminate();S.close(),await new Promise(e=>{w.closeAllConnections(),w.close(()=>{e()})}),await i.close()}}}
@@ -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 M}from"node:crypto";import{access as y,stat as F}from"node:fs/promises";import{basename as N,join as b,posix as E}from"node:path";import{pathToFileURL as _}from"node:url";import{inTime as T,listWork as D,projectItems as h,stageId as H}from"@allyhub/build";import{NEVER_CANCELLED as W}from"@allyhub/extension-api";import{OUT_DIR as U,fileEditorIn as j,isListedFile as R,listedFileIdOf as A,unscanned as S,WORK_FILE as K}from"@allyhub/formats";import{OpenedVersion as V,componentStills as q,itemDigests as G,keyedStills as z,parseCombo as B}from"@allyhub/project";import{runtimeFile as J,stageFiles as Q}from"@allyhub/stage-page";import{RPC_ERROR as f,RpcError as c,SNAPSHOT_TREE as I,TREE_PAGES as P,listedFileEditor as g,listedKind as $,stillPath as X}from"@allyhub/protocol";import{comboKey as Y,componentRefText as Z}from"@allyhub/piece";import{providedPreview as ee}from"./card.js";import{kindItem as te}from"./kinds.js";import{rpcErrorOf as x}from"./live.js";import{pathProblem as ne}from"./paths.js";import{forwarded as oe}from"./ports.js";import{inside as ie}from"./tree.js";const re=n=>M("sha256").update(n).digest("base64url").slice(0,16);async function O(n,t,o){const e=t.replace(/^\.\//u,""),i=(await h(n.live.root,n.live.kinds)).items.find(u=>u.id===e||u.entry===e),s=i?void 0:await se(n,e),r=i?.id??s;if(r===void 0)throw new c(f.notFound,`There is no item ${t} in the project's list, nor a file of the project an editor opens.`);const d=(o.folder??"").replace(/\/+$/u,""),a=o.file??i?.entry??r;if(d!==""&&!a.startsWith(`${d}/`))throw new c(f.invalid,`${a} is not in the folder ${d} the page is served from.`);return n.pages.url(r,d,a,{network:s!==void 0})}async function se(n,t){if(S(t)||ne(t)!==void 0||!j(n.extensions?.fileEditors()??[],t))return;const o=ie(n.live.root,t);return o&&await F(o).then(i=>i.isFile(),()=>!1)?A(t):void 0}const v=(n,t)=>{const o=n.tree();if(o===void 0)throw new c(f.unavailable,"This server serves no pages: only allyhub dev's does.");return new URL(t,o).href},C=(n,t,o)=>({url:v(n,`${t}?${o.toString()}`),probe:v(n,P.probe)});async function ae(n,t,o){if(t.title!==void 0)return t.title;const e=await n.extensions?.kindProvider(t.kind);if(!e?.title)return(await o()).get(t.id);try{const i=await e.title(te(t),n.kindContext,W);return typeof i=="string"?i:void 0}catch{return}}export function contributedTools(n,t=[]){const o=new Map;for(const e of n)for(const i of e.projectTools??[])o.has(i.name)||o.set(i.name,i);for(const e of t)o.has(e.name)||o.set(e.name,e);return o}const k=new Map;export async function contributedTool(n){let t=k.get(n.module);t||(t=import(_(n.module).href).then(e=>{if(typeof e.default!="object"||e.default===null)throw new Error(`${n.extension}'s project tools (${n.module}) have no default export.`);return e.default}),k.set(n.module,t),t.catch(()=>{k.get(n.module)===t&&k.delete(n.module)}));const o=(await t)[n.name];if(!o)throw new Error(`${n.extension} contributes the project tool "${n.name}" but its module (${n.module}) has none of that name.`);return o}export function projectToolContext(n){const{live:t}=n,o=new Map;return{root:t.root,kinds:t.kinds,prepared:()=>t.prepared(),target:(e,i)=>t.target(e,i),itemCode:e=>t.itemCode(e),items:async()=>(await h(t.root,t.kinds)).items,async version(e,i,s,r){try{return await t.withSession(async d=>{const a=await V.open({root:t.root,item:e,...i===void 0?{}:{combos:[B(i)]},purpose:s,session:d});try{return await r(a)}finally{await a.close()}})}catch(d){throw x(d)}},async componentStills(e,i,s){try{const r=await t.prepared(),{gpu:d}=await t.browser();return await z(i,{prepared:r,item:e,combo:s,gpu:d,withSession:a=>t.withSession(a)})}catch(r){throw x(r)}},served:e=>v(n,e),page:(e,i)=>C(n,e,i),buildDir:t.pieceDir,stageStyles:()=>Q().fontCss.flatMap(e=>{const i=J(e);return i===void 0?[]:[{file:i,url:v(n,`${I.runtime}${e}`)}]}),kept(e,i){return o.has(e)||o.set(e,i()),o.get(e)},held(e,i){return n.held.has(e)||n.held.set(e,i()),n.held.get(e)},jobs:n.services.jobs,cloud:n.services.cloud,env:n.services.env??process.env,forward:e=>oe(n.services.ports,e),pageOf:(e,i={})=>O(n,e,i),recordInputs:(e,i,s)=>{n.inputs.set(e,i,s)}}}export function toolHandlers(n){const{live:t}=n;return{"project/items":async()=>{const o=await h(t.root,t.kinds,void 0,n.extensions?.fileEditors()??[]);let e;const i=()=>e??=(async()=>{const a=await t.prepared().catch(()=>t.latest()),u=new Map;for(const l of a?.pieces??[]){const p=typeof l.title=="string"?l.title:void 0;p&&u.set(l.place,p)}return u})(),s=new Map((t.latest()?.items??[]).map(a=>[a.id,a.files])),r=n.extensions?.fileEditors()??[];return{items:await Promise.all(o.listed.map(async a=>{const u={id:a.id,dir:a.dir,entry:a.entry,...a.title===void 0?{}:{title:a.title},groups:a.groups};if(R(a)){const w=r.find(L=>L.id===a.editor);return{...u,...w?{kindInfo:g(w)}:{}}}const l=await ae(n,a,i),p=t.kinds.find(w=>w.id===a.kind),m=s.get(a.id);return{...u,kind:a.kind,...l?{title:l}:{},...m?{files:m}:{},...p?{kindInfo:$(p)}:{}}})),kinds:t.kinds.map(a=>({id:a.id,...$(a)})),name:N(t.root),scope:re(t.root),revision:t.revision}},"project/file":async({path:o})=>{const e=o.replace(/^\.\//u,""),i=n.extensions?.fileEditors()??[],r=(await h(t.root,t.kinds,void 0,i)).listed.find(l=>l.entry===e||l.id===e);if(r){const l={id:r.id,dir:r.dir,entry:r.entry,...r.title===void 0?{}:{title:r.title},groups:r.groups};if(R(r)){const m=i.find(w=>w.id===r.editor);return{item:{...l,...m?{kindInfo:g(m)}:{}}}}const p=t.kinds.find(m=>m.id===r.kind);return{item:{...l,kind:r.kind,...p?{kindInfo:$(p)}:{}}}}const d=!S(e)&&await F(b(t.root,e)).then(l=>l.isFile(),()=>!1),a=d?j(i,e):void 0;if(!a)throw new c(f.notFound,d?`No editor opens ${e} by its name.`:`The project has no file ${e}.`);const u=E.dirname(e);return{item:{id:e,dir:u==="."?"":u,entry:e,groups:[],kindInfo:g(a)}}},"items/preview":async({item:o})=>{const e=o.replace(/^\.\//u,""),i=(await h(t.root,t.kinds)).items.find(r=>r.id===e||r.entry===e);if(!i)throw new c(f.notFound,`There is no item ${o} in the project's list.`);const s=await ee(n.extensions,i,n.kindContext);return s===void 0?{}:{preview:s}},"items/page":async({item:o,folder:e,file:i})=>({url:await O(n,o,{folder:e,file:i})}),"work/add":async({kind:o,file:e,title:i})=>{if(!t.kinds.some(s=>s.id===o))throw new c(f.invalid,`No extension here contributes the kind ${o}.`);return await y(b(t.root,e)).catch(()=>{throw new c(f.notFound,`There is no file ${e} to list in ${K}.`)}),await D(t.root,{kind:o,file:e,...i===void 0?{}:{title:i}}),{}},"components/list":async({item:o})=>{const e=await t.prepared(),i=e.items.find(s=>s.id===o||s.entry===o)?.dir??o;return{components:e.components.map(s=>{const r=E.relative(i,s.file);return{of:Z({path:r.startsWith(".")?r:`./${r}`,name:s.export}),name:s.name,...s.label===void 0?{}:{label:s.label}}})}},"components/stage":async({item:o,version:e})=>{const{prepared:i,host:s,combo:r}=await t.componentHost(o,e);if(!("components"in s)&&T(s,i.kinds))throw new c(f.notFound,`${o} has no components to draw alone: a deck's or a doc's are.`);const{code:d}=await G(i,s),a=new URLSearchParams({piece:H(s),combo:Y(r),mode:"component",code:d.slice(0,16)});return C(n,P.stage,a)},"components/stills":async({item:o,version:e,components:i})=>{v(n,I.stills);try{const{prepared:s,host:r,combo:d}=await t.componentHost(o,e);if(!("components"in r)&&T(r,s.kinds))throw new c(f.notFound,`${o} has no components to draw alone: a deck's or a doc's are.`);const{gpu:a}=await t.browser();return{stills:(await q(i,{prepared:s,item:r,combo:d,gpu:a,withSession:l=>t.withSession(l)})).map(({key:l})=>({key:l,url:v(n,X(l))}))}}catch(s){throw x(s)}},"check/results":()=>Promise.resolve(n.checker?.state??{status:"off",revision:t.revision,problems:[],facts:[]}),"check/run":()=>{if(!n.checker)throw new c(f.unavailable,"This server runs no check.");return n.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:o,versions:e,types:i,options:s})=>{const{items:r}=await h(t.root,t.kinds);if(!r.some(d=>d.id===o))throw new c(f.notFound,`There is no item ${o}.`);return{job:n.exports.start(o,e??[],i??[],s)}},"export/cancel":({job:o})=>{if(!n.exports.cancel(o))throw new c(f.notFound,`No export ${o} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:n.exports.list(),reveal:n.reveal!==void 0}),"export/reveal":async({path:o})=>{if(!n.reveal)throw new c(f.unavailable,"This server is not on the person's computer: download the file.");if(!o.startsWith(`${U}/`))throw new c(f.notFound,`${o} is no exported file.`);const e=n.exports.savedOf(o),i=e!==void 0&&await y(e).then(()=>!0,()=>!1)?e:b(t.root,o);return await y(i).catch(()=>{throw new c(f.notFound,`There is no file ${o}.`)}),await n.reveal(i),{}}}}
2
+ import{createHash as M}from"node:crypto";import{access as y,stat as F}from"node:fs/promises";import{basename as N,join as b,posix as E}from"node:path";import{pathToFileURL as _}from"node:url";import{inTime as T,listWork as D,projectItems as h,stageId as H}from"@allyhub/build";import{NEVER_CANCELLED as W}from"@allyhub/extension-api";import{OUT_DIR as U,fileEditorIn as j,isListedFile as R,listedFileIdOf as A,unscanned as S,WORK_FILE as K}from"@allyhub/formats";import{OpenedVersion as V,componentStills as q,itemDigests as G,keyedStills as z,parseCombo as B}from"@allyhub/project";import{runtimeFile as J,stageFiles as Q}from"@allyhub/stage-page";import{RPC_ERROR as f,RpcError as c,SNAPSHOT_TREE as I,TREE_PAGES as P,listedFileEditor as g,listedKind as $,stillPath as X}from"@allyhub/protocol";import{comboKey as Y,componentRefText as Z}from"@allyhub/piece";import{providedPreview as ee}from"./card.js";import{kindItem as te}from"./kinds.js";import{rpcErrorOf as x}from"./live.js";import{pathProblem as ne}from"./paths.js";import{forwarded as oe}from"./ports.js";import{inside as ie}from"./tree.js";const re=n=>M("sha256").update(n).digest("base64url").slice(0,16);async function O(n,t,o){const e=t.replace(/^\.\//u,""),i=(await h(n.live.root,n.live.kinds)).items.find(d=>d.id===e||d.entry===e),s=i?void 0:await se(n,e),r=i?.id??s;if(r===void 0)throw new c(f.notFound,`There is no item ${t} in the project's list, nor a file of the project an editor opens.`);const l=(o.folder??"").replace(/\/+$/u,""),a=o.file??i?.entry??r;if(l!==""&&!a.startsWith(`${l}/`))throw new c(f.invalid,`${a} is not in the folder ${l} the page is served from.`);const u=s!==void 0||n.live.kinds.some(d=>d.id===i?.kind&&d.network===!0);return n.pages.url(r,l,a,{network:u})}async function se(n,t){if(S(t)||ne(t)!==void 0||!j(n.extensions?.fileEditors()??[],t))return;const o=ie(n.live.root,t);return o&&await F(o).then(i=>i.isFile(),()=>!1)?A(t):void 0}const v=(n,t)=>{const o=n.tree();if(o===void 0)throw new c(f.unavailable,"This server serves no pages: only allyhub dev's does.");return new URL(t,o).href},C=(n,t,o)=>({url:v(n,`${t}?${o.toString()}`),probe:v(n,P.probe)});async function ae(n,t,o){if(t.title!==void 0)return t.title;const e=await n.extensions?.kindProvider(t.kind);if(!e?.title)return(await o()).get(t.id);try{const i=await e.title(te(t),n.kindContext,W);return typeof i=="string"?i:void 0}catch{return}}export function contributedTools(n,t=[]){const o=new Map;for(const e of n)for(const i of e.projectTools??[])o.has(i.name)||o.set(i.name,i);for(const e of t)o.has(e.name)||o.set(e.name,e);return o}const k=new Map;export async function contributedTool(n){let t=k.get(n.module);t||(t=import(_(n.module).href).then(e=>{if(typeof e.default!="object"||e.default===null)throw new Error(`${n.extension}'s project tools (${n.module}) have no default export.`);return e.default}),k.set(n.module,t),t.catch(()=>{k.get(n.module)===t&&k.delete(n.module)}));const o=(await t)[n.name];if(!o)throw new Error(`${n.extension} contributes the project tool "${n.name}" but its module (${n.module}) has none of that name.`);return o}export function projectToolContext(n){const{live:t}=n,o=new Map;return{root:t.root,kinds:t.kinds,prepared:()=>t.prepared(),target:(e,i)=>t.target(e,i),itemCode:e=>t.itemCode(e),items:async()=>(await h(t.root,t.kinds)).items,async version(e,i,s,r){try{return await t.withSession(async l=>{const a=await V.open({root:t.root,item:e,...i===void 0?{}:{combos:[B(i)]},purpose:s,session:l});try{return await r(a)}finally{await a.close()}})}catch(l){throw x(l)}},async componentStills(e,i,s){try{const r=await t.prepared(),{gpu:l}=await t.browser();return await z(i,{prepared:r,item:e,combo:s,gpu:l,withSession:a=>t.withSession(a)})}catch(r){throw x(r)}},served:e=>v(n,e),page:(e,i)=>C(n,e,i),buildDir:t.pieceDir,stageStyles:()=>Q().fontCss.flatMap(e=>{const i=J(e);return i===void 0?[]:[{file:i,url:v(n,`${I.runtime}${e}`)}]}),kept(e,i){return o.has(e)||o.set(e,i()),o.get(e)},held(e,i){return n.held.has(e)||n.held.set(e,i()),n.held.get(e)},jobs:n.services.jobs,cloud:n.services.cloud,env:n.services.env??process.env,forward:e=>oe(n.services.ports,e),pageOf:(e,i={})=>O(n,e,i),recordInputs:(e,i,s)=>{n.inputs.set(e,i,s)}}}export function toolHandlers(n){const{live:t}=n;return{"project/items":async()=>{const o=await h(t.root,t.kinds,void 0,n.extensions?.fileEditors()??[]);let e;const i=()=>e??=(async()=>{const a=await t.prepared().catch(()=>t.latest()),u=new Map;for(const d of a?.pieces??[]){const p=typeof d.title=="string"?d.title:void 0;p&&u.set(d.place,p)}return u})(),s=new Map((t.latest()?.items??[]).map(a=>[a.id,a.files])),r=n.extensions?.fileEditors()??[];return{items:await Promise.all(o.listed.map(async a=>{const u={id:a.id,dir:a.dir,entry:a.entry,...a.title===void 0?{}:{title:a.title},groups:a.groups};if(R(a)){const w=r.find(L=>L.id===a.editor);return{...u,...w?{kindInfo:g(w)}:{}}}const d=await ae(n,a,i),p=t.kinds.find(w=>w.id===a.kind),m=s.get(a.id);return{...u,kind:a.kind,...d?{title:d}:{},...m?{files:m}:{},...p?{kindInfo:$(p)}:{}}})),kinds:t.kinds.map(a=>({id:a.id,...$(a)})),name:N(t.root),scope:re(t.root),revision:t.revision}},"project/file":async({path:o})=>{const e=o.replace(/^\.\//u,""),i=n.extensions?.fileEditors()??[],r=(await h(t.root,t.kinds,void 0,i)).listed.find(d=>d.entry===e||d.id===e);if(r){const d={id:r.id,dir:r.dir,entry:r.entry,...r.title===void 0?{}:{title:r.title},groups:r.groups};if(R(r)){const m=i.find(w=>w.id===r.editor);return{item:{...d,...m?{kindInfo:g(m)}:{}}}}const p=t.kinds.find(m=>m.id===r.kind);return{item:{...d,kind:r.kind,...p?{kindInfo:$(p)}:{}}}}const l=!S(e)&&await F(b(t.root,e)).then(d=>d.isFile(),()=>!1),a=l?j(i,e):void 0;if(!a)throw new c(f.notFound,l?`No editor opens ${e} by its name.`:`The project has no file ${e}.`);const u=E.dirname(e);return{item:{id:e,dir:u==="."?"":u,entry:e,groups:[],kindInfo:g(a)}}},"items/preview":async({item:o})=>{const e=o.replace(/^\.\//u,""),i=(await h(t.root,t.kinds)).items.find(r=>r.id===e||r.entry===e);if(!i)throw new c(f.notFound,`There is no item ${o} in the project's list.`);const s=await ee(n.extensions,i,n.kindContext);return s===void 0?{}:{preview:s}},"items/page":async({item:o,folder:e,file:i})=>({url:await O(n,o,{folder:e,file:i})}),"work/add":async({kind:o,file:e,title:i})=>{if(!t.kinds.some(s=>s.id===o))throw new c(f.invalid,`No extension here contributes the kind ${o}.`);return await y(b(t.root,e)).catch(()=>{throw new c(f.notFound,`There is no file ${e} to list in ${K}.`)}),await D(t.root,{kind:o,file:e,...i===void 0?{}:{title:i}},t.kinds),{}},"components/list":async({item:o})=>{const e=await t.prepared(),i=e.items.find(s=>s.id===o||s.entry===o)?.dir??o;return{components:e.components.map(s=>{const r=E.relative(i,s.file);return{of:Z({path:r.startsWith(".")?r:`./${r}`,name:s.export}),name:s.name,...s.label===void 0?{}:{label:s.label}}})}},"components/stage":async({item:o,version:e})=>{const{prepared:i,host:s,combo:r}=await t.componentHost(o,e);if(!("components"in s)&&T(s,i.kinds))throw new c(f.notFound,`${o} has no components to draw alone: a deck's or a doc's are.`);const{code:l}=await G(i,s),a=new URLSearchParams({piece:H(s),combo:Y(r),mode:"component",code:l.slice(0,16)});return C(n,P.stage,a)},"components/stills":async({item:o,version:e,components:i})=>{v(n,I.stills);try{const{prepared:s,host:r,combo:l}=await t.componentHost(o,e);if(!("components"in r)&&T(r,s.kinds))throw new c(f.notFound,`${o} has no components to draw alone: a deck's or a doc's are.`);const{gpu:a}=await t.browser();return{stills:(await q(i,{prepared:s,item:r,combo:l,gpu:a,withSession:d=>t.withSession(d)})).map(({key:d})=>({key:d,url:v(n,X(d))}))}}catch(s){throw x(s)}},"check/results":()=>Promise.resolve(n.checker?.state??{status:"off",revision:t.revision,problems:[],facts:[]}),"check/run":()=>{if(!n.checker)throw new c(f.unavailable,"This server runs no check.");return n.checker.schedule(!0),Promise.resolve({})},"export/start":async({item:o,versions:e,types:i,options:s})=>{const{items:r}=await h(t.root,t.kinds);if(!r.some(l=>l.id===o))throw new c(f.notFound,`There is no item ${o}.`);return{job:n.exports.start(o,e??[],i??[],s)}},"export/cancel":({job:o})=>{if(!n.exports.cancel(o))throw new c(f.notFound,`No export ${o} is under way.`);return Promise.resolve({})},"export/list":()=>Promise.resolve({jobs:n.exports.list(),reveal:n.reveal!==void 0}),"export/reveal":async({path:o})=>{if(!n.reveal)throw new c(f.unavailable,"This server is not on the person's computer: download the file.");if(!o.startsWith(`${U}/`))throw new c(f.notFound,`${o} is no exported file.`);const e=n.exports.savedOf(o),i=e!==void 0&&await y(e).then(()=>!0,()=>!1)?e:b(t.root,o);return await y(i).catch(()=>{throw new c(f.notFound,`There is no file ${o}.`)}),await n.reveal(i),{}}}}
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{parse as f}from"yaml";import{kindBuildOf as m,readWork as p}from"@allyhub/build";import{DATA_FILES as c,baseOf as $,listedWork as b}from"@allyhub/formats";const g=e=>new RegExp(`^${e.split("**/").map(a=>a.replace(/[.+?^${}()|[\]\\]/gu,"\\$&").replaceAll("*","[^/]*")).join("(?:.*/)?")}$`,"u"),k=Object.entries(c).flatMap(([e,a])=>a.files.map(n=>({name:e,re:g(n)})));export function dataFileOf(e){return k.find(a=>a.re.test(e))?.name}export async function writeProblems(e,a,n,u){const t=$(e),d=b((await p(u)).work).find(r=>r.file.replace(/^\.\//u,"")===e)?.kind,s=await m(n.find(r=>r.id===d))?.catch(()=>{});if(s?.unreadable)return[...s.unreadable(a)];const i=dataFileOf(e);if(i===void 0)return[];let o;try{o=/\.ya?ml$/u.test(t)?f(a):JSON.parse(a)}catch(r){return[`not ${/\.ya?ml$/u.test(t)?"YAML":"JSON"}: ${r.message.split(`
3
- `)[0]??""}`]}const l=c[i].schema.safeParse(o);return l.success?[]:l.error.issues.map(r=>`${r.path.length?`${r.path.join(".")}: `:""}${r.message}`)}
2
+ import{parse as m}from"yaml";import{kindBuildOf as p,readWork as $}from"@allyhub/build";import{DATA_FILES as f,baseOf as b,listedWork as g}from"@allyhub/formats";const k=r=>new RegExp(`^${r.split("**/").map(a=>a.replace(/[.+?^${}()|[\]\\]/gu,"\\$&").replaceAll("*","[^/]*")).join("(?:.*/)?")}$`,"u"),w=Object.entries(f).flatMap(([r,a])=>a.files.map(n=>({name:r,re:k(n)})));export function dataFileOf(r){return w.find(a=>a.re.test(r))?.name}export async function writeProblems(r,a,n,u,s){const i=b(r),t=g((await $(u)).work).find(e=>e.file.replace(/^\.\//u,"")===r)?.kind;if(t!==void 0&&s){const e=await s(t,a);if(e)return[...e]}else{const e=await p(n.find(d=>d.id===t))?.catch(()=>{});if(e?.unreadable)return[...e.unreadable(a)]}const o=dataFileOf(r);if(o===void 0)return[];let l;try{l=/\.ya?ml$/u.test(i)?m(a):JSON.parse(a)}catch(e){return[`not ${/\.ya?ml$/u.test(i)?"YAML":"JSON"}: ${e.message.split(`
3
+ `)[0]??""}`]}const c=f[o].schema.safeParse(l);return c.success?[]:c.error.issues.map(e=>`${e.path.length?`${e.path.join(".")}: `:""}${e.message}`)}
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{randomBytes as q}from"node:crypto";import{mkdir as $,readFile as O,readdir as I,rename as x,rm as N,stat as j,writeFile as A}from"node:fs/promises";import{dirname as g,extname as B,join as h,posix as C}from"node:path";import D from"write-file-atomic";import{listWork as H,moveEdits as z,movedPath as P,unlistedWork as M}from"@allyhub/build";import{CACHE_DIR as K,TRASH_DIR as f,WORK_FILE as S,WorkItemSchema as X}from"@allyhub/formats";import{RPC_ERROR as d,RpcError as p}from"@allyhub/protocol";import{DELETED_FILE as Y,emptyTrashOlderThan as G,hasErrorCode as Q,shortNameOf as V,utcStampOf as Z}from"./deletion.js";import{current as F,fileIn as m,pathProblem as J,versionOf as b}from"./paths.js";import{writeProblems as tt}from"./validate.js";export const UPLOAD_MAX_BYTES=200*1024*1024,LIST_LIMIT=5e3;const et=[K,f];function it(v){const i=(v.split(/[/\\]/u).pop()??"").replace(/\p{Cc}/gu,"").replace(/^\.+/u,"").trim();return i===""?"file":i}export class Writer{root;kinds;wrote;writable;queue=Promise.resolve();constructor(t,i,n=()=>{},o=()=>Promise.resolve()){this.root=t,this.kinds=i,this.wrote=n,this.writable=o}serial(t){const i=async()=>(await this.writable(),t()),n=this.queue.then(i,i);return this.queue=n.catch(()=>{}),n}async read(t){const i=await F(await m(this.root,t));return i?{text:i.bytes.toString("utf8"),version:i.version}:{text:"",version:null}}write(t,i,n,o){return this.serial(async()=>{const s=await m(this.root,t,{write:!0}),a=await F(s),w=a?.version??null;if(w!==n)throw new p(d.conflict,`${t} changed since it was read.`,{text:a?.bytes.toString("utf8")??"",version:w});const c=await tt(t,i,this.kinds,this.root);if(c.length>0)throw new p(d.invalid,`${t} would not be a file AllyHub can read: ${c[0]??""}`,{problems:c});const r=b(i);return r===w||(await $(g(s),{recursive:!0}),await D(s,i),this.wrote([{path:t,version:r,text:i}],o)),r})}upload(t,i,n,o){return n.length>UPLOAD_MAX_BYTES?Promise.reject(new p(d.invalid,`${i} is larger than ${String(UPLOAD_MAX_BYTES/1024/1024)} MB.`)):this.serial(async()=>{const s=it(i),a=B(s),w=s.slice(0,s.length-a.length);for(let c=1;;c++){const r=c===1?s:`${w}-${String(c)}${a}`,e=t===""?r:`${t}/${r}`,u=await m(this.root,e,{write:!0});if(!await y(u))return await $(g(u),{recursive:!0}),await A(u,n,{flag:"wx"}),this.wrote([{path:e,version:b(n)}],o),e}})}move(t,i,n){return this.serial(async()=>{const o=await m(this.root,t,{write:!0}),s=await m(this.root,i,{write:!0});if(i===t||i.startsWith(`${t}/`))throw new p(d.invalid,`${t} cannot move into itself.`);if(!await y(o))throw new p(d.notFound,`There is no ${t}.`);if(await y(s))throw new p(d.conflict,`${i} is taken.`,{text:"",version:null});const a=await z(this.root,t,i);for(const e of a)await D(h(this.root,e.path),e.text);const w=await R(t,o);await $(g(s),{recursive:!0}),await x(o,s);const c=w.map(e=>({path:e,version:null}));for(const e of w){const u=P(e,t,i);c.push({path:u,version:(await F(h(this.root,u)))?.version??null})}const r=a.map(e=>P(e.path,t,i));for(const e of a)P(e.path,t,i)===e.path&&c.push({path:e.path,version:b(e.text)});return this.wrote(c,n),r})}remove(t,i){return this.serial(async()=>{const n=await m(this.root,t,{write:!0});if(!await y(n))throw new p(d.notFound,`There is no ${t}.`);const o=await R(t,n),s=`${String(Date.now())}-${q(4).toString("hex")}`,a=h(this.root,f,s,...t.split("/"));await $(g(a),{recursive:!0}),await x(n,a);const w=o.map(k=>({path:k,version:null})),c=h(this.root,S),r=await O(c,"utf8").catch(()=>{}),e=r===void 0?void 0:M(r,t);e!==void 0&&(await D(c,e.text),w.push({path:S,version:b(e.text)}));const u={path:t,removed:Date.now(),...e===void 0?{}:{listed:e.items}};return await A(h(this.root,f,`${s}.json`),`${JSON.stringify(u)}
3
- `),this.wrote(w,i),s})}moveToTrashAndUnlist(t,i){return this.serial(async()=>{const n=await t.planNow(),{item:o,name:s,kind:a,entry:w}=n,c=(t.now??(()=>new Date))();await G(this.root,t.keptDays,c);const r=`${Z(c)}-${V(o)}`;let e=`${f}/${r}`;for(let l=2;await y(h(this.root,e));l++)e=`${f}/${r}-${String(l)}`;const u=h(this.root,S),k=await O(u,"utf8").catch(l=>{if(!Q(l,"ENOENT"))throw l}),T=k===void 0?void 0:M(k,w),W=[];try{for(const l of n.moves){const E=await m(this.root,l,{write:!0}),L=h(this.root,e,...l.split("/"));await $(g(L),{recursive:!0}),await x(E,L),W.push(l)}}catch(l){for(const E of W.reverse())await x(h(this.root,e,...E.split("/")),h(this.root,...E.split("/")));throw await N(h(this.root,e),{recursive:!0,force:!0}),l}const U={deletedAt:c.toISOString(),item:o,name:s,...a===void 0?{}:{kind:a},listed:T?.entries??[],files:n.moves.map(l=>({path:l}))};await $(h(this.root,e),{recursive:!0}),await A(h(this.root,e,Y),`${JSON.stringify(U,null,2)}
4
- `);const _=n.moves.map(l=>({path:l,version:null}));return T!==void 0&&(await D(u,T.text),_.push({path:S,version:b(T.text)})),this.wrote(_,i),{plan:n,trash:e,moved:n.moves}})}async trash(){const t=h(this.root,f),i=await I(t).catch(()=>[]),n=[];for(const o of i){if(!o.endsWith(".json"))continue;const s=await O(h(t,o),"utf8").then(a=>JSON.parse(a)).catch(()=>{});typeof s?.path!="string"||typeof s.removed!="number"||J(s.path)!==void 0||n.push({id:o.slice(0,-5),path:s.path,removed:s.removed})}return n.sort((o,s)=>s.removed-o.removed)}restore(t,i){return this.serial(async()=>{const n=(await this.trash()).find(e=>e.id===t);if(!n)throw new p(d.notFound,`Nothing in the bin is ${t}.`);const o=await m(this.root,n.path,{write:!0});if(await y(o))throw new p(d.conflict,`${n.path} is there again: move it before putting this back.`,{text:"",version:null});const s=h(this.root,f,t,...n.path.split("/")),a=await O(h(this.root,f,`${t}.json`),"utf8").then(e=>JSON.parse(e).listed).catch(()=>{});await $(g(o),{recursive:!0}),await x(s,o),await N(h(this.root,f,t),{recursive:!0,force:!0}),await N(h(this.root,f,`${t}.json`),{force:!0});const w=await R(n.path,o),c=(Array.isArray(a)?a:[]).flatMap(e=>{const u=X.safeParse(e);return u.success?[u.data]:[]});for(const e of c)await H(this.root,e);c.length>0&&w.push(S);const r=[];for(const e of w)r.push({path:e,version:(await F(h(this.root,e)))?.version??null});return this.wrote(r,i),n.path})}async list(t){const i=t===""?this.root:await m(this.root,t),n=[],o=[],s=async(a,w)=>{const c=await I(a,{withFileTypes:!0}).catch(()=>[]);for(const r of c.sort((e,u)=>e.name.localeCompare(u.name))){if(n.length>=LIST_LIMIT)return;const e=w===""?r.name:`${w}/${r.name}`;if(J(e)===void 0&&!(et.some(u=>e===u)&&!(t===e||t.startsWith(`${e}/`)))){if(r.isDirectory())o.push(e),await s(h(a,r.name),e);else if(r.isFile()){const u=await j(h(a,r.name)).catch(()=>{});u&&n.push({path:e,size:u.size,modified:u.mtimeMs})}}}};return await s(i,t),{files:n,dirs:o}}}const y=v=>j(v).then(()=>!0,()=>!1);async function R(v,t){const i=await j(t).catch(()=>{});if(!i)return[];if(!i.isDirectory())return[v];const n=[],o=await I(t,{recursive:!0,withFileTypes:!0});for(const s of o)s.isFile()&&n.push(C.join(v,C.relative(t.split("\\").join("/"),h(s.parentPath,s.name).split("\\").join("/"))));return n}
2
+ import{randomBytes as q}from"node:crypto";import{mkdir as $,readFile as I,readdir as F,rename as b,rm as N,stat as j,writeFile as A}from"node:fs/promises";import{dirname as g,extname as B,join as h,posix as C}from"node:path";import O from"write-file-atomic";import{listWork as H,moveEdits as z,movedPath as P,unlistedWork as M}from"@allyhub/build";import{CACHE_DIR as K,TRASH_DIR as f,WORK_FILE as x,WorkItemSchema as X}from"@allyhub/formats";import{RPC_ERROR as d,RpcError as p}from"@allyhub/protocol";import{DELETED_FILE as Y,emptyTrashOlderThan as G,hasErrorCode as Q,shortNameOf as V,utcStampOf as Z}from"./deletion.js";import{current as D,fileIn as m,pathProblem as J,versionOf as S}from"./paths.js";import{writeProblems as tt}from"./validate.js";export const UPLOAD_MAX_BYTES=200*1024*1024,LIST_LIMIT=5e3;const et=[K,f];function it(v){const i=(v.split(/[/\\]/u).pop()??"").replace(/\p{Cc}/gu,"").replace(/^\.+/u,"").trim();return i===""?"file":i}export class Writer{root;kinds;wrote;writable;unreadableIn;queue=Promise.resolve();constructor(t,i,n=()=>{},r=()=>Promise.resolve(),s){this.root=t,this.kinds=i,this.wrote=n,this.writable=r,this.unreadableIn=s}serial(t){const i=async()=>(await this.writable(),t()),n=this.queue.then(i,i);return this.queue=n.catch(()=>{}),n}async read(t){const i=await D(await m(this.root,t));return i?{text:i.bytes.toString("utf8"),version:i.version}:{text:"",version:null}}write(t,i,n,r){return this.serial(async()=>{const s=await m(this.root,t,{write:!0}),a=await D(s),l=a?.version??null;if(l!==n)throw new p(d.conflict,`${t} changed since it was read.`,{text:a?.bytes.toString("utf8")??"",version:l});const c=await tt(t,i,this.kinds,this.root,this.unreadableIn);if(c.length>0)throw new p(d.invalid,`${t} would not be a file AllyHub can read: ${c[0]??""}`,{problems:c});const o=S(i);return o===l||(await $(g(s),{recursive:!0}),await O(s,i),this.wrote([{path:t,version:o,text:i}],r)),o})}upload(t,i,n,r){return n.length>UPLOAD_MAX_BYTES?Promise.reject(new p(d.invalid,`${i} is larger than ${String(UPLOAD_MAX_BYTES/1024/1024)} MB.`)):this.serial(async()=>{const s=it(i),a=B(s),l=s.slice(0,s.length-a.length);for(let c=1;;c++){const o=c===1?s:`${l}-${String(c)}${a}`,e=t===""?o:`${t}/${o}`,u=await m(this.root,e,{write:!0});if(!await y(u))return await $(g(u),{recursive:!0}),await A(u,n,{flag:"wx"}),this.wrote([{path:e,version:S(n)}],r),e}})}move(t,i,n){return this.serial(async()=>{const r=await m(this.root,t,{write:!0}),s=await m(this.root,i,{write:!0});if(i===t||i.startsWith(`${t}/`))throw new p(d.invalid,`${t} cannot move into itself.`);if(!await y(r))throw new p(d.notFound,`There is no ${t}.`);if(await y(s))throw new p(d.conflict,`${i} is taken.`,{text:"",version:null});const a=await z(this.root,t,i);for(const e of a)await O(h(this.root,e.path),e.text);const l=await R(t,r);await $(g(s),{recursive:!0}),await b(r,s);const c=l.map(e=>({path:e,version:null}));for(const e of l){const u=P(e,t,i);c.push({path:u,version:(await D(h(this.root,u)))?.version??null})}const o=a.map(e=>P(e.path,t,i));for(const e of a)P(e.path,t,i)===e.path&&c.push({path:e.path,version:S(e.text)});return this.wrote(c,n),o})}remove(t,i){return this.serial(async()=>{const n=await m(this.root,t,{write:!0});if(!await y(n))throw new p(d.notFound,`There is no ${t}.`);const r=await R(t,n),s=`${String(Date.now())}-${q(4).toString("hex")}`,a=h(this.root,f,s,...t.split("/"));await $(g(a),{recursive:!0}),await b(n,a);const l=r.map(k=>({path:k,version:null})),c=h(this.root,x),o=await I(c,"utf8").catch(()=>{}),e=o===void 0?void 0:M(o,t);e!==void 0&&(await O(c,e.text),l.push({path:x,version:S(e.text)}));const u={path:t,removed:Date.now(),...e===void 0?{}:{listed:e.items}};return await A(h(this.root,f,`${s}.json`),`${JSON.stringify(u)}
3
+ `),this.wrote(l,i),s})}moveToTrashAndUnlist(t,i){return this.serial(async()=>{const n=await t.planNow(),{item:r,name:s,kind:a,entry:l}=n,c=(t.now??(()=>new Date))();await G(this.root,t.keptDays,c);const o=`${Z(c)}-${V(r)}`;let e=`${f}/${o}`;for(let w=2;await y(h(this.root,e));w++)e=`${f}/${o}-${String(w)}`;const u=h(this.root,x),k=await I(u,"utf8").catch(w=>{if(!Q(w,"ENOENT"))throw w}),T=k===void 0?void 0:M(k,l),W=[];try{for(const w of n.moves){const E=await m(this.root,w,{write:!0}),L=h(this.root,e,...w.split("/"));await $(g(L),{recursive:!0}),await b(E,L),W.push(w)}}catch(w){for(const E of W.reverse())await b(h(this.root,e,...E.split("/")),h(this.root,...E.split("/")));throw await N(h(this.root,e),{recursive:!0,force:!0}),w}const U={deletedAt:c.toISOString(),item:r,name:s,...a===void 0?{}:{kind:a},listed:T?.entries??[],files:n.moves.map(w=>({path:w}))};await $(h(this.root,e),{recursive:!0}),await A(h(this.root,e,Y),`${JSON.stringify(U,null,2)}
4
+ `);const _=n.moves.map(w=>({path:w,version:null}));return T!==void 0&&(await O(u,T.text),_.push({path:x,version:S(T.text)})),this.wrote(_,i),{plan:n,trash:e,moved:n.moves}})}async trash(){const t=h(this.root,f),i=await F(t).catch(()=>[]),n=[];for(const r of i){if(!r.endsWith(".json"))continue;const s=await I(h(t,r),"utf8").then(a=>JSON.parse(a)).catch(()=>{});typeof s?.path!="string"||typeof s.removed!="number"||J(s.path)!==void 0||n.push({id:r.slice(0,-5),path:s.path,removed:s.removed})}return n.sort((r,s)=>s.removed-r.removed)}restore(t,i){return this.serial(async()=>{const n=(await this.trash()).find(e=>e.id===t);if(!n)throw new p(d.notFound,`Nothing in the bin is ${t}.`);const r=await m(this.root,n.path,{write:!0});if(await y(r))throw new p(d.conflict,`${n.path} is there again: move it before putting this back.`,{text:"",version:null});const s=h(this.root,f,t,...n.path.split("/")),a=await I(h(this.root,f,`${t}.json`),"utf8").then(e=>JSON.parse(e).listed).catch(()=>{});await $(g(r),{recursive:!0}),await b(s,r),await N(h(this.root,f,t),{recursive:!0,force:!0}),await N(h(this.root,f,`${t}.json`),{force:!0});const l=await R(n.path,r),c=(Array.isArray(a)?a:[]).flatMap(e=>{const u=X.safeParse(e);return u.success?[u.data]:[]});for(const e of c)await H(this.root,e,this.kinds);c.length>0&&l.push(x);const o=[];for(const e of l)o.push({path:e,version:(await D(h(this.root,e)))?.version??null});return this.wrote(o,i),n.path})}async list(t){const i=t===""?this.root:await m(this.root,t),n=[],r=[],s=async(a,l)=>{const c=await F(a,{withFileTypes:!0}).catch(()=>[]);for(const o of c.sort((e,u)=>e.name.localeCompare(u.name))){if(n.length>=LIST_LIMIT)return;const e=l===""?o.name:`${l}/${o.name}`;if(J(e)===void 0&&!(et.some(u=>e===u)&&!(t===e||t.startsWith(`${e}/`)))){if(o.isDirectory())r.push(e),await s(h(a,o.name),e);else if(o.isFile()){const u=await j(h(a,o.name)).catch(()=>{});u&&n.push({path:e,size:u.size,modified:u.mtimeMs})}}}};return await s(i,t),{files:n,dirs:r}}}const y=v=>j(v).then(()=>!0,()=>!1);async function R(v,t){const i=await j(t).catch(()=>{});if(!i)return[];if(!i.isDirectory())return[v];const n=[],r=await F(t,{recursive:!0,withFileTypes:!0});for(const s of r)s.isFile()&&n.push(C.join(v,C.relative(t.split("\\").join("/"),h(s.parentPath,s.name).split("\\").join("/"))));return n}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/dev-server",
3
- "version": "0.18.0",
3
+ "version": "0.20.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
- export const CORE="allyhub",CORE_RULES=[{code:"AK-M001",level:"error",rule:"The fields of video(), presentation() or defineComponent do not match the format"},{code:"AK-M002",level:"error",rule:"The project's list (allyhub.yaml) cannot be read, or names a kind not loaded or a file not there"},{code:"AK-M003",level:"error",rule:"The project's list names two pieces by one id"},{code:"AK-M004",level:"error",rule:"The project has no pieces"},{code:"AK-M006",level:"error",rule:"A messages file does not match the format"},{code:"AK-M007",level:"error",rule:"A script file does not match the format"},{code:"AK-M011",level:"error",rule:"A deck names no slides file or script, or its slides file is not there, does not match the format, or names a layout, a prop, a file or a video item the deck does not have"},{code:"AK-M012",level:"error",rule:"A sheet's code reads the clock or a random number, reaches outside the project, or does not make the same sheets twice"},{code:"AK-M016",level:"error",rule:"An item uses another item's made file that is not there: no such item in the work list, no type both kinds take, or an item using itself"},{code:"AK-B001",level:"error",rule:"Two pieces have the same id"},{code:"AK-B003",level:"error",rule:"The build made a network request"},{code:"AK-B004",level:"error",rule:"The build timed out, or its result is over the size limit"},{code:"AK-B005",level:"error",rule:"An import of a file outside the project, or of a package not declared in package.json"},{code:"AK-B006",level:"error",rule:"An import of an @allyhub/sdk entry point that does not exist"},{code:"AK-B008",level:"error",rule:"The project's @allyhub/sdk is another version than the allyhub that builds it"},{code:"AK-B009",level:"error",rule:"The project's package.json declares AllyHub, but its packages are not installed"},{code:"AK-D002",level:"error",rule:"The same frame has different pixels when drawn in order and out of order"},{code:"AK-N003",level:"error",rule:"The sandbox blocked a request at run time"},{code:"AK-A001",level:"error",rule:"A referenced media or data file does not exist"},{code:"AK-P003",level:"error",rule:"A moment did not finish drawing within the piece's seekLimit (default 30 seconds): work a layer waits for (ctx.wait) or a picture it shows never settled"},{code:"AK-R001",level:"error",rule:"An unhandled exception was thrown at run time"},{code:"AK-X001",level:"error",rule:"The matrix's slots, structures, rules or combos name something that does not exist, or a combo lacks a slot of its structure"},{code:"AK-X002",level:"error",rule:"The matrix's rules leave no combination to make, or rule out a combo matrix.combos names"},{code:"AK-X004",level:"error",rule:"Two chosen combos are the same, or more alike than the matrix's differ allows"},{code:"AK-X006",level:"error",rule:"A combo is longer than its output's maxDuration"},{code:"AK-L002",level:"warn",rule:"Text overflows the frame or is clipped"},{code:"AK-L006",level:"warn",rule:"Text is drawn in a fallback font, or in a bold or italic the font does not have"}];const r=new Map(CORE_RULES.map(e=>[e.code,{extension:CORE,...e}]));export function declareRules(e,t){const s=[];for(const o of t){const l=r.get(o.code);if(l&&l.extension!==e){s.push(`${o.code} is ${l.extension===CORE?"the core's":`${l.extension}'s`} rule already.`);continue}r.set(o.code,{extension:e,code:o.code,level:o.level,rule:o.rule})}return s}export function declareAll(e){return e.flatMap(t=>declareRules(t.extension,[t]))}export const ruleOf=e=>r.get(e),isRule=e=>r.has(e),declaredRules=()=>[...r.values()];
2
+ export const CORE="allyhub",CORE_RULES=[{code:"AK-M001",level:"error",rule:"The fields of video(), presentation() or defineComponent do not match the format"},{code:"AK-M002",level:"error",rule:"The project's list (allyhub.yaml) cannot be read, records no versions or a format older than its kind's, or names a kind not loaded or a file not there"},{code:"AK-M003",level:"error",rule:"The project's list names two pieces by one id"},{code:"AK-M004",level:"error",rule:"The project has no pieces"},{code:"AK-M006",level:"error",rule:"A messages file does not match the format"},{code:"AK-M007",level:"error",rule:"A script file does not match the format"},{code:"AK-M011",level:"error",rule:"A deck names no slides file or script, or its slides file is not there, does not match the format, or names a layout, a prop, a file or a video item the deck does not have"},{code:"AK-M012",level:"error",rule:"A sheet's code reads the clock or a random number, reaches outside the project, or does not make the same sheets twice"},{code:"AK-M016",level:"error",rule:"An item uses another item's made file that is not there: no such item in the work list, no type both kinds take, or an item using itself"},{code:"AK-B001",level:"error",rule:"Two pieces have the same id"},{code:"AK-B003",level:"error",rule:"The build made a network request"},{code:"AK-B004",level:"error",rule:"The build timed out, or its result is over the size limit"},{code:"AK-B005",level:"error",rule:"An import of a file outside the project, or of a package not declared in package.json"},{code:"AK-B006",level:"error",rule:"An import of an @allyhub/sdk entry point that does not exist"},{code:"AK-B008",level:"error",rule:"The project's @allyhub/sdk is another version than the allyhub that builds it"},{code:"AK-B009",level:"error",rule:"The project's package.json declares AllyHub, but its packages are not installed"},{code:"AK-D002",level:"error",rule:"The same frame has different pixels when drawn in order and out of order"},{code:"AK-N003",level:"error",rule:"The sandbox blocked a request at run time"},{code:"AK-A001",level:"error",rule:"A referenced media or data file does not exist"},{code:"AK-P003",level:"error",rule:"A moment did not finish drawing within the piece's seekLimit (default 30 seconds): work a layer waits for (ctx.wait) or a picture it shows never settled"},{code:"AK-R001",level:"error",rule:"An unhandled exception was thrown at run time"},{code:"AK-X001",level:"error",rule:"The matrix's slots, structures, rules or combos name something that does not exist, or a combo lacks a slot of its structure"},{code:"AK-X002",level:"error",rule:"The matrix's rules leave no combination to make, or rule out a combo matrix.combos names"},{code:"AK-X004",level:"error",rule:"Two chosen combos are the same, or more alike than the matrix's differ allows"},{code:"AK-X006",level:"error",rule:"A combo is longer than its output's maxDuration"},{code:"AK-L002",level:"warn",rule:"Text overflows the frame or is clipped"},{code:"AK-L006",level:"warn",rule:"Text is drawn in a fallback font, or in a bold or italic the font does not have"}];const r=new Map(CORE_RULES.map(e=>[e.code,{extension:CORE,...e}]));export function declareRules(e,t){const s=[];for(const o of t){const l=r.get(o.code);if(l&&l.extension!==e){s.push(`${o.code} is ${l.extension===CORE?"the core's":`${l.extension}'s`} rule already.`);continue}r.set(o.code,{extension:e,code:o.code,level:o.level,rule:o.rule})}return s}export function declareAll(e){return e.flatMap(t=>declareRules(t.extension,[t]))}export const ruleOf=e=>r.get(e),isRule=e=>r.has(e),declaredRules=()=>[...r.values()];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/diagnostics",
3
- "version": "0.18.0",
3
+ "version": "0.20.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{blockAlt as f,blockDataTable as m,blockFromFile as s,blockSvg as l,iconPaths as p,paletteOf as g}from"@allyhub/blocks";import{shownPath as u,TONE_COLORS as k,toneOf as h}from"@allyhub/formats";import{chartTheme as c}from"./chart.js";import{PAPER as o,tint as b}from"./paper.js";export const LIBRARY_TAGS={Icon:{kind:"icon"},Progress:{kind:"progress"},Timeline:{kind:"timeline",item:"Milestone"},Steps:{kind:"steps",item:"Step"},Person:{kind:"person"},People:{kind:"people",item:"Person"},RiskMatrix:{kind:"risk_matrix",item:"Entry"},Sankey:{kind:"sankey",item:"Flow"},Gantt:{kind:"gantt",item:"Task"},OrgChart:{kind:"org_chart"},IssueTree:{kind:"issue_tree"},DecisionTree:{kind:"decision_tree"},Fishbone:{kind:"fishbone"},Matrix:{kind:"matrix"},Marimekko:{kind:"marimekko"},Heatmap:{kind:"heatmap"},SmallMultiples:{kind:"small_multiples"}};export function libraryBlockTable(i,r={}){const{def:e}=libraryDef(i,r),t=e===void 0?void 0:m(e,r.lang);if(!(t===void 0||t.rows.length===0))return{type:"table",rows:[t.columns,...t.rows].map(n=>n.map(d=>[{text:d,styles:{}}]))}}export const DOC_BLOCK_SCALE=.75;export function docBlockPalette(i={}){return g({text:o.ink,body:o.ink,muted:o.lead,ground:o.sheet,surface:o.sheet,well:o.stone,rule:o.rule,"rule-strong":o.ruleStrong},{theme:c(i),font:"Carlito, Calibri, Arial, sans-serif"})}export function libraryFields(i){return i.items===void 0?{...i.props}:{...i.props,items:i.items.map(r=>({...r.props}))}}export function libraryDef(i,r={}){const e=LIBRARY_TAGS[i.tag];if(e===void 0)return{problems:[`<${i.tag}> is not a block`]};const t=r.data,n=s(e.kind,libraryFields(i),{...t===void 0?{}:{data:t,shown:a=>t(u(a))},...r.base===void 0?{}:{base:r.base}}),d=n.problems.map(a=>`${a.path.length>0?`${a.path.join(".")}: `:""}${a.message}`);return n.block===void 0?{problems:d}:{def:n.block,problems:d}}export function libraryBlockSvg(i,r,e={}){const{def:t,problems:n}=libraryDef(i,e);if(t===void 0)return{problems:n};const d=f(t,e.lang);return{svg:l(t,{width:r*.75},docBlockPalette(e.page),{flow:!0,scale:DOC_BLOCK_SCALE,label:d,...e.id===void 0?{}:{id:e.id},...e.lang===void 0?{}:{lang:e.lang}}),alt:d,problems:n}}export function docStatsDef(i,r={}){const e=i.stats.map(n=>({value:n.value,label:n.label,...n.delta===void 0?{}:{delta:n.delta},...n.note===void 0?{}:{note:n.note},...n.downIsGood===!0?{good:"down"}:{},...n.status===void 0?{}:{status:n.status},...n.target===void 0?{}:{target:n.target},...n.trend===void 0?{}:{trend:n.trend},...n.icon===void 0?{}:{icon:n.icon}})),t=r.data;return s("stats",e,{...t===void 0?{}:{data:t,shown:n=>t(u(n))}}).block}export function docStatsSvg(i,r,e={}){const t=docStatsDef(i,e);if(t!==void 0)return l(t,{width:r*.75},docBlockPalette(e.page),{flow:!0,scale:DOC_BLOCK_SCALE,...e.id===void 0?{}:{id:e.id},...e.lang===void 0?{}:{lang:e.lang}})}export function inlineIconSvg(i,r){if(!/^[a-z][a-z0-9-]*$/iu.test(i))return;const e=p(i);if(e!==void 0)return`<svg class="icon" viewBox="0 0 24 24" width="1.15em" height="1.15em" fill="none" stroke="${r}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e.map(t=>`<path d="${t}"/>`).join("")}</svg>`}export function calloutTone(i,r={}){if(i===void 0)return;const e=h(i,"callout");if(e===void 0)return;if(e==="accent1"){const d=c(r).accent1;return{bg:b(d,.14),fg:o.ink,mark:d,icon:"message-square-warning"}}const t=k[e],n={info:"info",good:"circle-check",warning:"triangle-alert",bad:"octagon-alert"};return{bg:t.tint,fg:t.ink,mark:t.mark,...n[e]===void 0?{}:{icon:n[e]}}}