@allyhub/sdk 0.8.0 → 0.9.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 (438) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/NOTICE +46 -49
  3. package/dist/dom.d.ts +1 -209
  4. package/dist/dom.js +1 -1
  5. package/dist/image.d.ts +2 -0
  6. package/dist/image.js +2 -0
  7. package/dist/index.d.ts +1 -21
  8. package/dist/index.js +1 -1
  9. package/dist/media.d.ts +1 -5
  10. package/dist/media.js +1 -1
  11. package/dist/node_modules/@allyhub/audio/dist/levels.d.ts +4 -5
  12. package/dist/node_modules/@allyhub/audio/dist/levels.js +1 -1
  13. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.d.ts +1 -6
  14. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +1 -1
  15. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  16. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +1 -1
  17. package/dist/node_modules/@allyhub/chart/dist/chart-xml.d.ts +1 -1
  18. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  19. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  20. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  21. package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
  22. package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
  23. package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
  24. package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
  25. package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
  26. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
  27. package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
  28. package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
  29. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
  30. package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
  31. package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
  32. package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
  33. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  34. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
  35. package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
  36. package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
  37. package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
  38. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +20 -82
  39. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  40. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +96 -8
  41. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  42. package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
  43. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  44. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  45. package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
  46. package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
  47. package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
  48. package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
  49. package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
  50. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
  51. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  52. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
  53. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  54. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
  55. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  56. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +46 -42
  57. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  58. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  59. package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
  60. package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
  61. package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
  62. package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
  63. package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
  64. package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
  65. package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
  66. package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
  67. package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
  68. package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
  69. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
  70. package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
  71. package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
  72. package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
  73. package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
  74. package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
  75. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
  76. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
  77. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
  78. package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
  79. package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
  80. package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
  81. package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
  82. package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
  83. package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
  84. package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
  85. package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
  86. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
  87. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
  88. package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
  89. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
  90. package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
  91. package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
  92. package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
  93. package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
  94. package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
  95. package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
  96. package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
  97. package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
  98. package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
  99. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
  100. package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
  101. package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
  102. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
  103. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
  104. package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
  105. package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
  106. package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
  107. package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
  108. package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
  109. package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
  110. package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
  111. package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
  112. package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
  113. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
  114. package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
  115. package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
  116. package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
  117. package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
  118. package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
  119. package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
  120. package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
  121. package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
  122. package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
  123. package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
  124. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
  125. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
  126. package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
  127. package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
  128. package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
  129. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
  130. package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
  131. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
  132. package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
  133. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
  134. package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
  135. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
  136. package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
  137. package/dist/node_modules/@allyhub/measure/package.json +13 -0
  138. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
  139. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
  140. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
  141. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  142. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  143. package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
  144. package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
  145. package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
  146. package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
  147. package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
  148. package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
  149. package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
  150. package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
  151. package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
  152. package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
  153. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
  154. package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
  155. package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
  156. package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
  157. package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
  158. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
  159. package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
  160. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +421 -0
  161. package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
  162. package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
  163. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
  164. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
  165. package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
  166. package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
  167. package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
  168. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
  169. package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
  170. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
  171. package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
  172. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
  173. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
  174. package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
  175. package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
  176. package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
  177. package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
  178. package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
  179. package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
  180. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
  181. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +285 -0
  182. package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
  183. package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
  184. package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
  185. package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
  186. package/dist/node_modules/@allyhub/piece/package.json +18 -0
  187. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +139 -0
  188. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  189. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
  190. package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
  191. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
  192. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  193. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +2 -0
  194. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  195. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +232 -132
  196. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  197. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
  198. package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
  199. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +22 -9
  200. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  201. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
  202. package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
  203. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +5 -0
  204. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  205. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  206. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
  207. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
  208. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +273 -0
  209. package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
  210. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +26 -0
  211. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  212. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
  213. package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
  214. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
  215. package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
  216. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
  217. package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
  218. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
  219. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  220. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
  221. package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
  222. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
  223. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  224. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
  225. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  226. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
  227. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  228. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  229. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  230. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
  231. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
  232. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
  233. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
  234. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
  235. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  236. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
  237. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
  238. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
  239. package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
  240. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  241. package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
  242. package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
  243. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  244. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  245. package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
  246. package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
  247. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
  248. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
  250. package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
  252. package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
  253. package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
  254. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  255. package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
  257. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +3 -4
  258. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  259. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +76 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
  261. package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
  262. package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
  263. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
  264. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +6 -6
  265. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  266. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -0
  267. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  268. package/dist/node_modules/@allyhub/sheet/package.json +5 -1
  269. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
  270. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  271. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +44 -4
  272. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  273. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  274. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
  275. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  276. package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
  277. package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
  278. package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
  279. package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +208 -0
  280. package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
  281. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
  282. package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
  283. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
  284. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  285. package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
  286. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  287. package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
  288. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  289. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +19 -2
  290. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
  291. package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
  292. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +17 -10
  293. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  294. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
  295. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
  296. package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
  297. package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
  298. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  299. package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
  300. package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
  301. package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
  302. package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
  303. package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
  304. package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
  305. package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
  306. package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
  307. package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
  308. package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
  309. package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
  310. package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
  311. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
  312. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  313. package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
  314. package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
  315. package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
  316. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
  317. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
  318. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
  319. package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
  320. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +22 -430
  321. package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
  322. package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
  323. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +6 -12
  324. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  325. package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
  326. package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
  327. package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
  328. package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
  329. package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
  330. package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
  331. package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
  332. package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
  333. package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
  334. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
  335. package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
  336. package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
  337. package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
  338. package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
  339. package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
  340. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  341. package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
  342. package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
  343. package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
  344. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
  345. package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
  346. package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
  347. package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
  348. package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
  349. package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
  350. package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
  351. package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
  352. package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
  353. package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
  354. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
  355. package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
  356. package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
  357. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
  358. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
  359. package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
  360. package/dist/scenery.d.ts +1 -1
  361. package/dist/scenery.js +1 -1
  362. package/dist/sheets.d.ts +1 -1
  363. package/dist/sheets.js +1 -1
  364. package/dist/slides.d.ts +1 -9
  365. package/dist/slides.js +1 -1
  366. package/docs/README.md +8 -6
  367. package/docs/batches.md +5 -5
  368. package/docs/contract.md +2 -2
  369. package/docs/defaults.md +278 -20
  370. package/docs/docs.md +77 -63
  371. package/docs/footage.md +7 -7
  372. package/docs/image.md +165 -0
  373. package/docs/layers.md +22 -13
  374. package/docs/modeling.md +4 -4
  375. package/docs/pictures.md +65 -0
  376. package/docs/project.md +51 -31
  377. package/docs/scenery.md +11 -11
  378. package/docs/sheets.md +26 -25
  379. package/docs/slides.md +73 -65
  380. package/docs/sound.md +3 -3
  381. package/docs/speech.md +8 -8
  382. package/docs/video.md +16 -13
  383. package/docs/websites.md +4 -4
  384. package/package.json +7 -2
  385. package/dist/define.js +0 -2
  386. package/dist/free.js +0 -2
  387. package/dist/input.js +0 -2
  388. package/dist/module.js +0 -2
  389. package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
  390. package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
  391. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
  392. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
  393. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
  394. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
  395. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
  396. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
  397. package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
  398. package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
  399. package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
  400. package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
  401. package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
  402. package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
  403. package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
  404. package/dist/parts.js +0 -2
  405. package/dist/piece.js +0 -2
  406. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
  407. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
  408. /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
  409. /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
  410. /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
  411. /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
  412. /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
  413. /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
  414. /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
  415. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
  416. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
  417. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
  418. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
  419. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
  420. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
  421. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
  422. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
  423. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
  424. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
  425. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
  426. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
  427. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
  428. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
  429. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
  430. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
  431. /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
  432. /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
  433. /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
  434. /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
  435. /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
  436. /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
  437. /package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +0 -0
  438. /package/dist/{phone.js → node_modules/@allyhub/video-sdk/dist/phone.js} +0 -0
@@ -1,6 +1,8 @@
1
1
  export * from "./jsonrpc.js";
2
2
  export * from "./files.js";
3
3
  export * from "./editor.js";
4
+ export * from "./presence.js";
5
+ export * from "./kinds.js";
4
6
  export * from "./notes.js";
5
7
  export * from "./frame.js";
6
8
  export * from "./tools.js";
@@ -14,10 +16,13 @@ export * from "./app.js";
14
16
  export * from "./routes.js";
15
17
  export * from "./blobs.js";
16
18
  export * from "./sites.js";
19
+ export * from "./mail.js";
17
20
  export * from "./snapshots.js";
18
21
  export * from "./sources.js";
19
22
  export * from "./shares.js";
20
23
  export * from "./account.js";
21
24
  export * from "./open.js";
22
25
  export * from "./jobs.js";
26
+ export * from "./peer.js";
27
+ export * from "./shape.js";
23
28
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";
2
+ export*from"./jsonrpc.js";export*from"./files.js";export*from"./editor.js";export*from"./presence.js";export*from"./kinds.js";export*from"./notes.js";export*from"./frame.js";export*from"./tools.js";export*from"./cli.js";export*from"./auth.js";export*from"./registry.js";export*from"./runtimes.js";export*from"./cloud.js";export*from"./teams.js";export*from"./app.js";export*from"./routes.js";export*from"./blobs.js";export*from"./sites.js";export*from"./mail.js";export*from"./snapshots.js";export*from"./sources.js";export*from"./shares.js";export*from"./account.js";export*from"./open.js";export*from"./jobs.js";export*from"./peer.js";export*from"./shape.js";
@@ -15,12 +15,12 @@ export type JobFailureReason = (typeof JOB_FAILURES)[number];
15
15
  export declare const JobAboutSchema: z.ZodObject<{
16
16
  kind: z.ZodEnum<{
17
17
  studio: "studio";
18
- agent: "agent";
19
18
  project: "project";
19
+ agent: "agent";
20
20
  piece: "piece";
21
- website: "website";
22
21
  plugin: "plugin";
23
22
  skill: "skill";
23
+ website: "website";
24
24
  }>;
25
25
  id: z.ZodString;
26
26
  }, z.core.$strict>;
@@ -30,12 +30,12 @@ export declare const JobSchema: z.ZodObject<{
30
30
  about: z.ZodObject<{
31
31
  kind: z.ZodEnum<{
32
32
  studio: "studio";
33
- agent: "agent";
34
33
  project: "project";
34
+ agent: "agent";
35
35
  piece: "piece";
36
- website: "website";
37
36
  plugin: "plugin";
38
37
  skill: "skill";
38
+ website: "website";
39
39
  }>;
40
40
  id: z.ZodString;
41
41
  }, z.core.$strict>;
@@ -43,9 +43,9 @@ export declare const JobSchema: z.ZodObject<{
43
43
  update: "update";
44
44
  install: "install";
45
45
  start: "start";
46
- export: "export";
47
46
  download: "download";
48
47
  wake: "wake";
48
+ export: "export";
49
49
  publish: "publish";
50
50
  }>;
51
51
  name: z.ZodOptional<z.ZodString>;
@@ -53,8 +53,8 @@ export declare const JobSchema: z.ZodObject<{
53
53
  failed: "failed";
54
54
  running: "running";
55
55
  paused: "paused";
56
- done: "done";
57
56
  queued: "queued";
57
+ done: "done";
58
58
  cancelled: "cancelled";
59
59
  }>;
60
60
  completed: z.ZodNumber;
@@ -0,0 +1,98 @@
1
+ import type { FileEditorSpec, KindSpec } from "@allyhub/formats";
2
+ import { z } from "zod";
3
+ /** What a kind's editor offers to export: the file types, the first the default; those that may come with one; how they are made. */
4
+ export declare const ExportOfferSchema: z.ZodObject<{
5
+ types: z.ZodArray<z.ZodString>;
6
+ extras: z.ZodArray<z.ZodString>;
7
+ options: z.ZodArray<z.ZodObject<{
8
+ name: z.ZodString;
9
+ only: z.ZodArray<z.ZodString>;
10
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ }, z.core.$strip>>;
12
+ names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
13
+ }, z.core.$strip>;
14
+ export type ExportOffer = z.infer<typeof ExportOfferSchema>;
15
+ /** An item's kind, its name in the person's language: HostContext's `item.kindInfo`. */
16
+ export declare const KindInfoSchema: z.ZodObject<{
17
+ noun: z.ZodString;
18
+ icon: z.ZodOptional<z.ZodString>;
19
+ color: z.ZodOptional<z.ZodString>;
20
+ editor: z.ZodOptional<z.ZodString>;
21
+ exports: z.ZodOptional<z.ZodObject<{
22
+ types: z.ZodArray<z.ZodString>;
23
+ extras: z.ZodArray<z.ZodString>;
24
+ options: z.ZodArray<z.ZodObject<{
25
+ name: z.ZodString;
26
+ only: z.ZodArray<z.ZodString>;
27
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ }, z.core.$strip>>;
29
+ names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
30
+ }, z.core.$strip>>;
31
+ share: z.ZodOptional<z.ZodBoolean>;
32
+ name: z.ZodString;
33
+ }, z.core.$strip>;
34
+ export type KindInfo = z.infer<typeof KindInfoSchema>;
35
+ /**
36
+ * An item's kind as a listing of items gives it: its name in every
37
+ * language its manifest has, for the page to choose from. A listing is
38
+ * answered without the person's language, and recorded once into a
39
+ * snapshot that anyone a share reaches reads in theirs.
40
+ */
41
+ export declare const ListedKindSchema: z.ZodObject<{
42
+ noun: z.ZodString;
43
+ icon: z.ZodOptional<z.ZodString>;
44
+ color: z.ZodOptional<z.ZodString>;
45
+ editor: z.ZodOptional<z.ZodString>;
46
+ exports: z.ZodOptional<z.ZodObject<{
47
+ types: z.ZodArray<z.ZodString>;
48
+ extras: z.ZodArray<z.ZodString>;
49
+ options: z.ZodArray<z.ZodObject<{
50
+ name: z.ZodString;
51
+ only: z.ZodArray<z.ZodString>;
52
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ }, z.core.$strip>>;
54
+ names: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
55
+ }, z.core.$strip>>;
56
+ share: z.ZodOptional<z.ZodBoolean>;
57
+ name: z.ZodRecord<z.ZodString, z.ZodString>;
58
+ plural: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
59
+ starter: z.ZodOptional<z.ZodObject<{
60
+ files: z.ZodRecord<z.ZodString, z.ZodString>;
61
+ entry: z.ZodString;
62
+ }, z.core.$strip>>;
63
+ }, z.core.$strip>;
64
+ export type ListedKind = z.infer<typeof ListedKindSchema>;
65
+ /** A kind of the kind table as a listing gives it to page code. */
66
+ export declare function listedKind(spec: KindSpec): ListedKind;
67
+ /**
68
+ * What a listing gives of a file an editor opens by its name, in a listed
69
+ * kind's shape: its name and heading, its sign and colour, and the editor
70
+ * (no starter, no Export, no Share: a file of a pattern is no item).
71
+ */
72
+ export declare function listedFileEditor(spec: FileEditorSpec): ListedKind;
73
+ /** A listed kind's name in a language: English where its manifest has none in it, its noun where it has none at all. */
74
+ export declare const kindNameIn: (listed: ListedKind, locale: string) => string;
75
+ /** A listed kind's heading over its items in a language: its plural, else its name. */
76
+ export declare const kindPluralIn: (listed: ListedKind, locale: string) => string;
77
+ /**
78
+ * A new item's files from its kind's starter, in the order they are
79
+ * written, each a path inside its folder, and the one the project's list
80
+ * names (`work/add`): `{{locale}}` in a path or a text is `locale`,
81
+ * `{{name}}` in a path or a text is `name` (as a file is named: a module
82
+ * names its files by it), `{{title}}` in a text is `title` (a JSON string
83
+ * in a YAML or JSON file, which YAML reads back).
84
+ */
85
+ export declare function starterFiles(starter: NonNullable<ListedKind["starter"]>, title: string, locale: string, name: string): {
86
+ files: {
87
+ path: string;
88
+ text: string;
89
+ }[];
90
+ entry: string;
91
+ };
92
+ /**
93
+ * An item's kind for HostContext, its name in the person's language; a
94
+ * kind its listing did not describe (a snapshot recorded before kinds were
95
+ * listed) is named by its id and offers nothing.
96
+ */
97
+ export declare function kindInfoIn(kind: string | undefined, listed: ListedKind | undefined, locale: string): KindInfo;
98
+ //# sourceMappingURL=kinds.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as r}from"zod";const s=r.object({name:r.string().min(1),only:r.array(r.string().min(1)),values:r.array(r.string().min(1)).optional()});export const ExportOfferSchema=r.object({types:r.array(r.string().min(1)),extras:r.array(r.string().min(1)),options:r.array(s),names:r.record(r.string(),r.record(r.string(),r.string())).optional()});const u={noun:r.string().min(1),icon:r.string().min(1).optional(),color:r.string().min(1).optional(),editor:r.string().min(1).optional(),exports:ExportOfferSchema.optional(),share:r.boolean().optional()};export const KindInfoSchema=r.object({name:r.string().min(1),...u}),ListedKindSchema=r.object({name:r.record(r.string(),r.string().min(1)),plural:r.record(r.string(),r.string().min(1)).optional(),starter:r.object({files:r.record(r.string().min(1),r.string()),entry:r.string().min(1)}).optional(),...u});export function listedKind(n){return{name:n.name??{en:n.noun},...n.plural===void 0?{}:{plural:{...n.plural}},...n.starter===void 0?{}:{starter:{files:{...n.starter.files},entry:n.starter.entry}},noun:n.noun,...n.icon===void 0?{}:{icon:n.icon},...n.color===void 0?{}:{color:n.color},...n.editor===void 0?{}:{editor:n.editor},...n.exports===void 0?{}:{exports:{types:[...n.exports.types],extras:[...n.exports.extras],options:n.exports.options.map(o=>({name:o.name,only:[...o.only],...o.values===void 0?{}:{values:[...o.values]}})),...n.exports.names===void 0?{}:{names:Object.fromEntries(Object.entries(n.exports.names).map(([o,e])=>[o,{...e}]))}}},...n.share===void 0?{}:{share:n.share}}}export function listedFileEditor(n){return{name:{...n.name},...n.plural===void 0?{}:{plural:{...n.plural}},noun:n.noun,...n.icon===void 0?{}:{icon:n.icon},...n.color===void 0?{}:{color:n.color},editor:n.id}}export const kindNameIn=(n,o)=>n.name[o]??n.name.en??n.noun,kindPluralIn=(n,o)=>n.plural?.[o]??n.plural?.en??kindNameIn(n,o);const f=/\.(ya?ml|json)$/u;export function starterFiles(n,o,e,i){const a=t=>t.replaceAll("{{locale}}",e).replaceAll("{{name}}",i);return{files:Object.entries(n.files).map(([t,d])=>{const l=a(t),m=f.test(l)?JSON.stringify(o):o;return{path:l,text:d.replaceAll("{{locale}}",e).replaceAll("{{name}}",i).replaceAll("{{title}}",()=>m)}}),entry:a(n.entry)}}export function kindInfoIn(n,o,e){return o===void 0?{name:n??"file",noun:n??"file"}:{name:kindNameIn(o,e),noun:o.noun,...o.icon===void 0?{}:{icon:o.icon},...o.color===void 0?{}:{color:o.color},...o.editor===void 0?{}:{editor:o.editor},...o.exports===void 0?{}:{exports:o.exports},...o.share===void 0?{}:{share:o.share}}}
@@ -0,0 +1,273 @@
1
+ import { z } from "zod";
2
+ /** What a mailbox keeps and lists, each checked by the server. */
3
+ export declare const MAIL_LIMITS: {
4
+ /** The most messages a search answers. */
5
+ readonly listed: 100;
6
+ /** How much of a message's text is kept to search and read, in bytes. */
7
+ readonly textBytes: number;
8
+ /** Aliases a mailbox may have. */
9
+ readonly aliases: 20;
10
+ /** Recipients of a message sent, To and Cc together: Email Service's own limit. */
11
+ readonly recipients: 50;
12
+ /** A subject's length: RFC 5322's line. */
13
+ readonly subject: 998;
14
+ /** A body sent, its text or its HTML, in characters. */
15
+ readonly body: number;
16
+ /** Attachments of a message sent, together, in bytes before base64. */
17
+ readonly attachmentBytes: number;
18
+ /** Attachments of a message sent: Email Service's own limit. */
19
+ readonly attachments: 32;
20
+ /** The days a mailbox may keep mail. */
21
+ readonly retentionDays: {
22
+ readonly min: 1;
23
+ readonly max: 365;
24
+ };
25
+ };
26
+ /** The words a display name must hold: a recipient knows an AI agent writes to them. */
27
+ export declare const MAIL_AGENT_WORDS = "AI agent";
28
+ /** A name in an address: the person's, an alias's or a team's. */
29
+ export declare const MAIL_NAME_LENGTH: {
30
+ readonly min: 2;
31
+ readonly max: 40;
32
+ };
33
+ /** Why a name cannot be one, in English (the API's and the CLI's); undefined when it can. */
34
+ export declare function mailNameProblem(name: string): string | undefined;
35
+ export declare const MailNameSchema: z.ZodString;
36
+ export declare const MAIL_PATH = "/api/mail";
37
+ /** A person's settings of their mailbox (PUT), said by the person, never by an agent. */
38
+ export declare const MAIL_SETTINGS_PATH = "/api/mail/settings";
39
+ /** Added to the settings' address by Studio's window when the person changes them there, as a site's live version is (`SITE_PERSON_QUERY`). */
40
+ export declare const MAIL_PERSON_QUERY = "person=1";
41
+ export declare const MAIL_SEND_PATH = "/api/mail/send";
42
+ export declare const MAIL_ALIASES_PATH = "/api/mail/aliases";
43
+ export declare const MAIL_MESSAGES_PATH = "/api/mail/messages";
44
+ export declare const mailMessagePath: (id: string) => string;
45
+ /** The message as it came, `message/rfc822`. */
46
+ export declare const mailRawPath: (id: string) => string;
47
+ /** A reply to a message, in its thread. */
48
+ export declare const mailReplyPath: (id: string) => string;
49
+ /** Whom a mailbox's agents may write to: no one, the organization's people and mailboxes, or anyone. */
50
+ export declare const MAIL_SEND_POLICIES: readonly ["off", "team", "anyone"];
51
+ /** Received, or sent. */
52
+ export declare const MAIL_DIRECTIONS: readonly ["in", "out"];
53
+ export declare const MAIL_ADDRESS_KINDS: readonly ["main", "alias"];
54
+ export declare const MailAddressSchema: z.ZodObject<{
55
+ address: z.ZodString;
56
+ kind: z.ZodUnion<readonly [z.ZodEnum<{
57
+ main: "main";
58
+ alias: "alias";
59
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
60
+ project: z.ZodNullable<z.ZodString>;
61
+ createdAt: z.ZodString;
62
+ }, z.core.$strip>;
63
+ export type MailAddress = z.infer<typeof MailAddressSchema>;
64
+ /** The caller's mailbox in its organization, made the first time it is asked for. */
65
+ export declare const MailboxSchema: z.ZodObject<{
66
+ domain: z.ZodString;
67
+ displayName: z.ZodString;
68
+ retentionDays: z.ZodNumber;
69
+ sendPolicy: z.ZodUnion<readonly [z.ZodEnum<{
70
+ off: "off";
71
+ team: "team";
72
+ anyone: "anyone";
73
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
74
+ sendsLeft: z.ZodNumber;
75
+ addresses: z.ZodArray<z.ZodObject<{
76
+ address: z.ZodString;
77
+ kind: z.ZodUnion<readonly [z.ZodEnum<{
78
+ main: "main";
79
+ alias: "alias";
80
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
81
+ project: z.ZodNullable<z.ZodString>;
82
+ createdAt: z.ZodString;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
85
+ export type Mailbox = z.infer<typeof MailboxSchema>;
86
+ export declare const MailAliasCreateSchema: z.ZodObject<{
87
+ name: z.ZodString;
88
+ project: z.ZodOptional<z.ZodString>;
89
+ }, z.core.$strict>;
90
+ export type MailAliasCreate = z.infer<typeof MailAliasCreateSchema>;
91
+ export declare const MailPersonSchema: z.ZodObject<{
92
+ address: z.ZodString;
93
+ name: z.ZodString;
94
+ }, z.core.$strip>;
95
+ export type MailPerson = z.infer<typeof MailPersonSchema>;
96
+ /** A message as a search lists it. */
97
+ export declare const MailSummarySchema: z.ZodObject<{
98
+ id: z.ZodString;
99
+ direction: z.ZodUnion<readonly [z.ZodEnum<{
100
+ out: "out";
101
+ in: "in";
102
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
103
+ receivedAt: z.ZodString;
104
+ to: z.ZodString;
105
+ tag: z.ZodNullable<z.ZodString>;
106
+ from: z.ZodNullable<z.ZodObject<{
107
+ address: z.ZodString;
108
+ name: z.ZodString;
109
+ }, z.core.$strip>>;
110
+ recipients: z.ZodDefault<z.ZodArray<z.ZodObject<{
111
+ address: z.ZodString;
112
+ name: z.ZodString;
113
+ }, z.core.$strip>>>;
114
+ subject: z.ZodString;
115
+ threadId: z.ZodString;
116
+ size: z.ZodNumber;
117
+ }, z.core.$strip>;
118
+ export type MailSummary = z.infer<typeof MailSummarySchema>;
119
+ export declare const MailLinkSchema: z.ZodObject<{
120
+ href: z.ZodString;
121
+ text: z.ZodString;
122
+ }, z.core.$strip>;
123
+ export declare const MailHeaderSchema: z.ZodObject<{
124
+ name: z.ZodString;
125
+ value: z.ZodString;
126
+ }, z.core.$strip>;
127
+ export declare const MailAttachmentSchema: z.ZodObject<{
128
+ name: z.ZodNullable<z.ZodString>;
129
+ type: z.ZodString;
130
+ size: z.ZodNumber;
131
+ }, z.core.$strip>;
132
+ /** A message read whole: what was searched, and the rest of what it says. */
133
+ export declare const MailMessageSchema: z.ZodObject<{
134
+ id: z.ZodString;
135
+ direction: z.ZodUnion<readonly [z.ZodEnum<{
136
+ out: "out";
137
+ in: "in";
138
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
139
+ receivedAt: z.ZodString;
140
+ to: z.ZodString;
141
+ tag: z.ZodNullable<z.ZodString>;
142
+ from: z.ZodNullable<z.ZodObject<{
143
+ address: z.ZodString;
144
+ name: z.ZodString;
145
+ }, z.core.$strip>>;
146
+ recipients: z.ZodDefault<z.ZodArray<z.ZodObject<{
147
+ address: z.ZodString;
148
+ name: z.ZodString;
149
+ }, z.core.$strip>>>;
150
+ subject: z.ZodString;
151
+ threadId: z.ZodString;
152
+ size: z.ZodNumber;
153
+ cc: z.ZodArray<z.ZodObject<{
154
+ address: z.ZodString;
155
+ name: z.ZodString;
156
+ }, z.core.$strip>>;
157
+ replyTo: z.ZodArray<z.ZodObject<{
158
+ address: z.ZodString;
159
+ name: z.ZodString;
160
+ }, z.core.$strip>>;
161
+ date: z.ZodNullable<z.ZodString>;
162
+ messageId: z.ZodNullable<z.ZodString>;
163
+ inReplyTo: z.ZodNullable<z.ZodString>;
164
+ references: z.ZodArray<z.ZodString>;
165
+ text: z.ZodString;
166
+ textCut: z.ZodBoolean;
167
+ links: z.ZodArray<z.ZodObject<{
168
+ href: z.ZodString;
169
+ text: z.ZodString;
170
+ }, z.core.$strip>>;
171
+ headers: z.ZodArray<z.ZodObject<{
172
+ name: z.ZodString;
173
+ value: z.ZodString;
174
+ }, z.core.$strip>>;
175
+ attachments: z.ZodArray<z.ZodObject<{
176
+ name: z.ZodNullable<z.ZodString>;
177
+ type: z.ZodString;
178
+ size: z.ZodNumber;
179
+ }, z.core.$strip>>;
180
+ html: z.ZodOptional<z.ZodString>;
181
+ }, z.core.$strip>;
182
+ export type MailMessage = z.infer<typeof MailMessageSchema>;
183
+ export declare const MAIL_ORDERS: readonly ["newest", "oldest"];
184
+ /** A search, as a query string's fields: each narrows it, all together. */
185
+ export declare const MailSearchSchema: z.ZodObject<{
186
+ to: z.ZodOptional<z.ZodString>;
187
+ from: z.ZodOptional<z.ZodString>;
188
+ subject: z.ZodOptional<z.ZodString>;
189
+ text: z.ZodOptional<z.ZodString>;
190
+ project: z.ZodOptional<z.ZodString>;
191
+ thread: z.ZodOptional<z.ZodString>;
192
+ direction: z.ZodOptional<z.ZodEnum<{
193
+ out: "out";
194
+ in: "in";
195
+ }>>;
196
+ since: z.ZodOptional<z.ZodISODateTime>;
197
+ order: z.ZodDefault<z.ZodEnum<{
198
+ newest: "newest";
199
+ oldest: "oldest";
200
+ }>>;
201
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
202
+ }, z.core.$strict>;
203
+ export type MailSearch = z.input<typeof MailSearchSchema>;
204
+ /** A search as the server reads it, its defaults filled in. */
205
+ export type MailQuery = z.output<typeof MailSearchSchema>;
206
+ export declare const MailSearchResponseSchema: z.ZodObject<{
207
+ messages: z.ZodArray<z.ZodObject<{
208
+ id: z.ZodString;
209
+ direction: z.ZodUnion<readonly [z.ZodEnum<{
210
+ out: "out";
211
+ in: "in";
212
+ }>, z.core.$ZodBranded<z.ZodString, "Unknown", "out">]>;
213
+ receivedAt: z.ZodString;
214
+ to: z.ZodString;
215
+ tag: z.ZodNullable<z.ZodString>;
216
+ from: z.ZodNullable<z.ZodObject<{
217
+ address: z.ZodString;
218
+ name: z.ZodString;
219
+ }, z.core.$strip>>;
220
+ recipients: z.ZodDefault<z.ZodArray<z.ZodObject<{
221
+ address: z.ZodString;
222
+ name: z.ZodString;
223
+ }, z.core.$strip>>>;
224
+ subject: z.ZodString;
225
+ threadId: z.ZodString;
226
+ size: z.ZodNumber;
227
+ }, z.core.$strip>>;
228
+ }, z.core.$strip>;
229
+ /** A file sent with a message, its bytes in base64. */
230
+ export declare const MailAttachmentSendSchema: z.ZodObject<{
231
+ name: z.ZodString;
232
+ type: z.ZodString;
233
+ content: z.ZodBase64;
234
+ }, z.core.$strict>;
235
+ export declare const MailSendSchema: z.ZodObject<{
236
+ text: z.ZodString;
237
+ html: z.ZodOptional<z.ZodString>;
238
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
239
+ name: z.ZodString;
240
+ type: z.ZodString;
241
+ content: z.ZodBase64;
242
+ }, z.core.$strict>>>;
243
+ from: z.ZodOptional<z.ZodString>;
244
+ to: z.ZodArray<z.ZodEmail>;
245
+ cc: z.ZodOptional<z.ZodArray<z.ZodEmail>>;
246
+ subject: z.ZodString;
247
+ }, z.core.$strict>;
248
+ export type MailSend = z.infer<typeof MailSendSchema>;
249
+ /** A reply: to its sender (its Reply-To when it has one), or with `all` to everyone it named too. */
250
+ export declare const MailReplySchema: z.ZodObject<{
251
+ text: z.ZodString;
252
+ html: z.ZodOptional<z.ZodString>;
253
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
254
+ name: z.ZodString;
255
+ type: z.ZodString;
256
+ content: z.ZodBase64;
257
+ }, z.core.$strict>>>;
258
+ from: z.ZodOptional<z.ZodString>;
259
+ all: z.ZodOptional<z.ZodBoolean>;
260
+ }, z.core.$strict>;
261
+ export type MailReply = z.infer<typeof MailReplySchema>;
262
+ /** A person's settings of their mailbox; each given is changed. */
263
+ export declare const MailSettingsSchema: z.ZodObject<{
264
+ displayName: z.ZodOptional<z.ZodString>;
265
+ sendPolicy: z.ZodOptional<z.ZodEnum<{
266
+ off: "off";
267
+ team: "team";
268
+ anyone: "anyone";
269
+ }>>;
270
+ retentionDays: z.ZodOptional<z.ZodNumber>;
271
+ }, z.core.$strict>;
272
+ export type MailSettings = z.infer<typeof MailSettingsSchema>;
273
+ //# sourceMappingURL=mail.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as t}from"zod";import{openEnum as n}from"./open.js";export const MAIL_LIMITS={listed:100,textBytes:256*1024,aliases:20,recipients:50,subject:998,body:1024*1024,attachmentBytes:10*1024*1024,attachments:32,retentionDays:{min:1,max:365}},MAIL_AGENT_WORDS="AI agent",MAIL_NAME_LENGTH={min:2,max:40};export function mailNameProblem(e){if(e.length<MAIL_NAME_LENGTH.min||e.length>MAIL_NAME_LENGTH.max)return`A name is ${String(MAIL_NAME_LENGTH.min)} to ${String(MAIL_NAME_LENGTH.max)} characters.`;if(!/^[a-z0-9-]+$/u.test(e))return"A name is lowercase letters, digits and hyphens.";if(e.startsWith("-")||e.endsWith("-"))return"A name neither starts nor ends with a hyphen.";if(e.includes("--"))return"A name does not have two hyphens in a row."}export const MailNameSchema=t.string().superRefine((e,r)=>{const a=mailNameProblem(e);a!==void 0&&r.addIssue({code:"custom",message:a})}),MAIL_PATH="/api/mail",MAIL_SETTINGS_PATH="/api/mail/settings",MAIL_PERSON_QUERY="person=1",MAIL_SEND_PATH="/api/mail/send",MAIL_ALIASES_PATH="/api/mail/aliases",MAIL_MESSAGES_PATH="/api/mail/messages",mailMessagePath=e=>`${MAIL_MESSAGES_PATH}/${encodeURIComponent(e)}`,mailRawPath=e=>`${mailMessagePath(e)}/raw`,mailReplyPath=e=>`${mailMessagePath(e)}/reply`,MAIL_SEND_POLICIES=["off","team","anyone"],MAIL_DIRECTIONS=["in","out"],MAIL_ADDRESS_KINDS=["main","alias"],MailAddressSchema=t.object({address:t.string(),kind:n(MAIL_ADDRESS_KINDS),project:t.string().nullable(),createdAt:t.string()}),MailboxSchema=t.object({domain:t.string(),displayName:t.string(),retentionDays:t.number(),sendPolicy:n(MAIL_SEND_POLICIES),sendsLeft:t.number(),addresses:t.array(MailAddressSchema)}),MailAliasCreateSchema=t.strictObject({name:MailNameSchema,project:t.string().min(1).max(200).optional()}),MailPersonSchema=t.object({address:t.string(),name:t.string()}),MailSummarySchema=t.object({id:t.string(),direction:n(MAIL_DIRECTIONS),receivedAt:t.string(),to:t.string(),tag:t.string().nullable(),from:MailPersonSchema.nullable(),recipients:t.array(MailPersonSchema).default([]),subject:t.string(),threadId:t.string(),size:t.number()}),MailLinkSchema=t.object({href:t.string(),text:t.string()}),MailHeaderSchema=t.object({name:t.string(),value:t.string()}),MailAttachmentSchema=t.object({name:t.string().nullable(),type:t.string(),size:t.number()}),MailMessageSchema=MailSummarySchema.extend({cc:t.array(MailPersonSchema),replyTo:t.array(MailPersonSchema),date:t.string().nullable(),messageId:t.string().nullable(),inReplyTo:t.string().nullable(),references:t.array(t.string()),text:t.string(),textCut:t.boolean(),links:t.array(MailLinkSchema),headers:t.array(MailHeaderSchema),attachments:t.array(MailAttachmentSchema),html:t.string().optional()}),MAIL_ORDERS=["newest","oldest"],MailSearchSchema=t.strictObject({to:t.string().min(1).max(320).optional(),from:t.string().min(1).max(320).optional(),subject:t.string().min(1).max(500).optional(),text:t.string().min(1).max(500).optional(),project:t.string().min(1).max(200).optional(),thread:t.string().min(1).max(200).optional(),direction:t.enum(MAIL_DIRECTIONS).optional(),since:t.iso.datetime({offset:!0}).optional(),order:t.enum(MAIL_ORDERS).default("newest"),limit:t.coerce.number().int().min(1).max(MAIL_LIMITS.listed).default(20)}),MailSearchResponseSchema=t.object({messages:t.array(MailSummarySchema)});const i=t.email().max(320);export const MailAttachmentSendSchema=t.strictObject({name:t.string().min(1).max(255),type:t.string().min(1).max(255),content:t.base64()});const s={text:t.string().max(MAIL_LIMITS.body),html:t.string().max(MAIL_LIMITS.body).optional(),attachments:t.array(MailAttachmentSendSchema).max(MAIL_LIMITS.attachments).optional(),from:t.string().min(3).max(320).optional()};export const MailSendSchema=t.strictObject({to:t.array(i).min(1).max(MAIL_LIMITS.recipients),cc:t.array(i).max(MAIL_LIMITS.recipients).optional(),subject:t.string().max(MAIL_LIMITS.subject),...s}),MailReplySchema=t.strictObject({all:t.boolean().optional(),...s}),MailSettingsSchema=t.strictObject({displayName:t.string().min(1).max(100).refine(e=>e.toLowerCase().includes(MAIL_AGENT_WORDS.toLowerCase()),{message:`A display name says "${MAIL_AGENT_WORDS}", so a recipient knows who writes.`}).optional(),sendPolicy:t.enum(MAIL_SEND_POLICIES).optional(),retentionDays:t.number().int().min(MAIL_LIMITS.retentionDays.min).max(MAIL_LIMITS.retentionDays.max).optional()});
@@ -147,6 +147,23 @@ export declare const NotePictureSchema: z.ZodObject<{
147
147
  data: z.ZodString;
148
148
  }, z.core.$strict>;
149
149
  export type NotePicture = z.infer<typeof NotePictureSchema>;
150
+ /**
151
+ * A mark as a region of an element's own pixels: what a tool that takes a
152
+ * mask (inpaint, remove, edit a region) is handed. The element's surface
153
+ * says where its pixels are, the mark's shape mapped into them; the host
154
+ * passes it on unread. An element may give several: a picture layer in
155
+ * its board's pixels and in its file's.
156
+ */
157
+ export declare const NoteRegionSchema: z.ZodObject<{
158
+ in: z.ZodString;
159
+ file: z.ZodOptional<z.ZodString>;
160
+ width: z.ZodNumber;
161
+ height: z.ZodNumber;
162
+ path: z.ZodString;
163
+ area: z.ZodBoolean;
164
+ scale: z.ZodNumber;
165
+ }, z.core.$strict>;
166
+ export type NoteRegion = z.infer<typeof NoteRegionSchema>;
150
167
  export declare const NoteElementSchema: z.ZodObject<{
151
168
  name: z.ZodString;
152
169
  source: z.ZodOptional<z.ZodObject<{
@@ -155,6 +172,15 @@ export declare const NoteElementSchema: z.ZodObject<{
155
172
  endLine: z.ZodOptional<z.ZodInt>;
156
173
  }, z.core.$strict>>;
157
174
  text: z.ZodOptional<z.ZodString>;
175
+ regions: z.ZodOptional<z.ZodArray<z.ZodObject<{
176
+ in: z.ZodString;
177
+ file: z.ZodOptional<z.ZodString>;
178
+ width: z.ZodNumber;
179
+ height: z.ZodNumber;
180
+ path: z.ZodString;
181
+ area: z.ZodBoolean;
182
+ scale: z.ZodNumber;
183
+ }, z.core.$strict>>>;
158
184
  }, z.core.$strict>;
159
185
  export type NoteElement = z.infer<typeof NoteElementSchema>;
160
186
  /**
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{z as t}from"zod";import{pointsOf as e,mapShape as i,touches as n}from"@allyhub/formats";import{PathSchema as o}from"./files.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()}),NotePointSchema=t.strictObject({x:t.number(),y:t.number()}),NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:NotePointSchema,to:NotePointSchema}),t.strictObject({kind:t.literal("line"),points:t.array(NotePointSchema).min(1)})]);export{i as mapShape,e as pointsOf,n as touches};export const AnchoredShapeSchema=t.strictObject({anchor:t.string().min(1),shape:NoteShapeSchema}),NoteSourceSchema=t.strictObject({path:o,line:t.int().positive().optional(),endLine:t.int().positive().optional()}),HeldSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePlacementSchema=t.strictObject({x:t.number(),y:t.number(),sx:t.number().positive(),sy:t.number().positive(),clip:NoteRectSchema}).nullable(),NotePlacementsSchema=t.record(t.string().min(1),NotePlacementSchema),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional()});
2
+ import{z as t}from"zod";import{pointsOf as i,mapShape as n,touches as o}from"@allyhub/formats";import{PathSchema as e}from"./files.js";export const NoteRectSchema=t.strictObject({x:t.number(),y:t.number(),width:t.number().nonnegative(),height:t.number().nonnegative()}),NotePointSchema=t.strictObject({x:t.number(),y:t.number()}),NoteShapeSchema=t.discriminatedUnion("kind",[t.strictObject({kind:t.literal("box"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("round"),rect:NoteRectSchema}),t.strictObject({kind:t.literal("arrow"),from:NotePointSchema,to:NotePointSchema}),t.strictObject({kind:t.literal("line"),points:t.array(NotePointSchema).min(1)})]);export{n as mapShape,i as pointsOf,o as touches};export const AnchoredShapeSchema=t.strictObject({anchor:t.string().min(1),shape:NoteShapeSchema}),NoteSourceSchema=t.strictObject({path:e,line:t.int().positive().optional(),endLine:t.int().positive().optional()}),HeldSchema=t.strictObject({key:t.string().min(1),what:t.string(),source:NoteSourceSchema.optional()}),NotePlacementSchema=t.strictObject({x:t.number(),y:t.number(),sx:t.number().positive(),sy:t.number().positive(),clip:NoteRectSchema}).nullable(),NotePlacementsSchema=t.record(t.string().min(1),NotePlacementSchema),NotePictureSchema=t.strictObject({rect:NoteRectSchema.optional(),mime:t.string().min(1),data:t.string().min(1)}),NoteRegionSchema=t.strictObject({in:t.string().min(1),file:e.optional(),width:t.number().positive(),height:t.number().positive(),path:t.string().min(1),area:t.boolean(),scale:t.number().positive()}),NoteElementSchema=t.strictObject({name:t.string().min(1),source:NoteSourceSchema.optional(),text:t.string().optional(),regions:t.array(NoteRegionSchema).optional()});
@@ -0,0 +1,59 @@
1
+ import { z } from "zod";
2
+ import { type MethodSpec, type NotificationSpec } from "./jsonrpc.js";
3
+ /** A way to send messages and hear them: what a transport gives. */
4
+ export interface Channel {
5
+ send(message: unknown): void;
6
+ /** Hears every message; answers how to stop. */
7
+ listen(on: (message: unknown) => void): () => void;
8
+ close?(): void;
9
+ }
10
+ /** LSP's code for a request its caller cancelled. */
11
+ export declare const REQUEST_CANCELLED = -32800;
12
+ /** A handler that can be cancelled: its params, and a signal aborted when the caller cancels. */
13
+ export type CancellableHandlersOf<M extends Record<string, MethodSpec>> = {
14
+ [K in keyof M]: (params: z.output<M[K]["params"]>, signal: AbortSignal) => Promise<z.input<M[K]["result"]>>;
15
+ };
16
+ /** A typed caller of a table of methods, each call cancellable. */
17
+ export type CallerOf<M extends Record<string, MethodSpec>> = {
18
+ [K in keyof M]: (params: z.input<M[K]["params"]>, signal?: AbortSignal) => Promise<z.output<M[K]["result"]>>;
19
+ };
20
+ export interface PeerOptions {
21
+ /** A call with no answer after this long, ms, fails (default five minutes). */
22
+ timeout?: number;
23
+ /** A call with no answer after this long, ms, is reported once (default ten seconds). */
24
+ stallAfter?: number;
25
+ /** Hears a stalled call. */
26
+ onStall?: (stall: {
27
+ method: string;
28
+ ms: number;
29
+ }) => void;
30
+ }
31
+ export declare class Peer {
32
+ private next;
33
+ private readonly pending;
34
+ private readonly running;
35
+ private readonly methods;
36
+ private readonly listeners;
37
+ private readonly stopListening;
38
+ private readonly timeout;
39
+ private readonly stallAfter;
40
+ private readonly onStall;
41
+ private closed;
42
+ private readonly channel;
43
+ constructor(channel: Channel, o?: PeerOptions);
44
+ /** Answers a table of methods; answers how to stop answering them. */
45
+ serve<M extends Record<string, MethodSpec>>(methods: M, handlers: CancellableHandlersOf<M>): () => void;
46
+ /** A typed caller of a table of methods the other side serves. */
47
+ caller<M extends Record<string, MethodSpec>>(methods: M): CallerOf<M>;
48
+ /** Calls a method; aborting `signal` cancels it on the other side. */
49
+ request(method: string, params: unknown, signal?: AbortSignal): Promise<unknown>;
50
+ notify<P extends z.ZodType>(name: string, spec: NotificationSpec<P>, params: z.input<P>): void;
51
+ /** Hears a notification; answers how to stop. */
52
+ on(name: string, listener: (params: unknown) => void): () => void;
53
+ close(): void;
54
+ private settle;
55
+ private receive;
56
+ }
57
+ /** Two channels joined to each other in one process: the direct transport. */
58
+ export declare function pairedChannels(): [Channel, Channel];
59
+ //# sourceMappingURL=peer.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as a}from"zod";import{JSONRPC as d,RPC_ERROR as u,RpcError as m}from"./jsonrpc.js";export const REQUEST_CANCELLED=-32800;const p="$/cancelRequest",f=a.object({jsonrpc:a.literal(d),id:a.union([a.string(),a.int(),a.null()]).optional(),method:a.string().optional(),params:a.unknown().optional(),result:a.unknown().optional(),error:a.object({code:a.int(),message:a.string(),data:a.unknown().optional()}).optional()});export class Peer{next=1;pending=new Map;running=new Map;methods=new Map;listeners=new Map;stopListening;timeout;stallAfter;onStall;closed=!1;channel;constructor(t,s={}){this.channel=t,this.timeout=s.timeout??5*6e4,this.stallAfter=s.stallAfter??1e4,this.onStall=s.onStall,this.stopListening=t.listen(e=>{this.receive(e)})}serve(t,s){for(const[e,r]of Object.entries(t)){const o=s[e];this.methods.set(e,{spec:r,run:o})}return()=>{for(const e of Object.keys(t))this.methods.delete(e)}}caller(t){const s={};for(const[e,r]of Object.entries(t))s[e]=async(o,i)=>r.result.parse(await this.request(e,r.params.parse(o),i));return s}request(t,s,e){if(this.closed)return Promise.reject(new Error("The channel is closed."));const r=this.next++;return new Promise((o,i)=>{const l=Date.now(),c={method:t,resolve:o,reject:i,timers:[setTimeout(()=>{this.onStall?.({method:t,ms:Date.now()-l})},this.stallAfter),setTimeout(()=>{this.settle(r),i(new Error(`${t} had no answer in ${String(this.timeout)} ms.`))},this.timeout)]};if(e){const n=()=>{this.channel.send({jsonrpc:d,method:p,params:{id:r}})};e.aborted?n():(e.addEventListener("abort",n,{once:!0}),c.stop=()=>{e.removeEventListener("abort",n)})}this.pending.set(r,c),this.channel.send({jsonrpc:d,id:r,method:t,params:s})})}notify(t,s,e){this.channel.send({jsonrpc:d,method:t,params:s.params.parse(e)})}on(t,s){const e=this.listeners.get(t)??new Set;return e.add(s),this.listeners.set(t,e),()=>e.delete(s)}close(){this.closed=!0,this.stopListening();for(const[t,s]of this.pending)this.settle(t),s.reject(new Error("The channel closed."));for(const t of this.running.values())t.abort();this.channel.close?.()}settle(t){const s=this.pending.get(t);if(s){this.pending.delete(t);for(const e of s.timers)clearTimeout(e);return s.stop?.(),s}}async receive(t){const s=f.safeParse(t);if(!s.success)return;const e=s.data;if(e.method===void 0){if(typeof e.id!="number")return;const n=this.settle(e.id);if(!n)return;e.error?n.reject(new m(e.error.code,e.error.message,e.error.data)):n.resolve(e.result);return}if(e.id===void 0||e.id===null){if(e.method===p){const n=e.params?.id;n!==void 0&&this.running.get(n)?.abort();return}for(const n of this.listeners.get(e.method)??[])n(e.params);return}const r=e.id,o=n=>{this.closed||this.channel.send({jsonrpc:d,id:r,...n})},i=this.methods.get(e.method);if(!i){o({error:{code:u.methodNotFound,message:`There is no method "${e.method}".`}});return}const l=i.spec.params.safeParse(e.params??{});if(!l.success){o({error:{code:u.invalidParams,message:l.error.message}});return}const c=new AbortController;this.running.set(r,c);try{const n=await i.run(l.data,c.signal);if(c.signal.aborted){o({error:{code:REQUEST_CANCELLED,message:`${e.method} was cancelled.`}});return}o({result:i.spec.result.parse(n)})}catch(n){c.signal.aborted?o({error:{code:REQUEST_CANCELLED,message:`${e.method} was cancelled.`}}):n instanceof m?o({error:{code:n.code,message:n.message,...n.data===void 0?{}:{data:n.data}}}):o({error:{code:u.internal,message:n instanceof Error?n.message:String(n)}})}finally{this.running.delete(r)}}}export function pairedChannels(){const h=()=>({hear:new Set,channel:void 0}),t=h(),s=h(),e=(r,o)=>({send(i){const l=structuredClone(i);queueMicrotask(()=>{for(const c of o.hear)c(l)})},listen(i){return r.hear.add(i),()=>r.hear.delete(i)}});return[e(t,s),e(s,t)]}
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Where the person is in an item, as its editor says it (`editor/place`)
4
+ * and opens it again (HostContext's `place`): a JSON object only the
5
+ * editor reads, a video's moment or a deck's slide, in the shape its
6
+ * `editors` contribution's `place` schema says. A host carries it
7
+ * without reading it, as VS Code's webviews keep their state; the editors'
8
+ * page drops one its editor's schema does not take, and the item opens at
9
+ * its start.
10
+ */
11
+ export declare const PlaceSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
12
+ export type Place = z.infer<typeof PlaceSchema>;
13
+ /** The parameter an editors' page's address says a place by: `place=`, its JSON. */
14
+ export declare const PLACE_PARAM = "place";
15
+ /** A place as an editors' page's address says it; none, nothing. */
16
+ export declare function placeParams(place: Place | undefined): Partial<Record<typeof PLACE_PARAM, string>>;
17
+ /** The place an editors' page's address says (its query, as URLSearchParams reads it), if it says a JSON object. */
18
+ export declare function placeIn(q: {
19
+ get(name: string): string | null;
20
+ }): Place | undefined;
21
+ //# sourceMappingURL=place.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{z as n}from"zod";export const PlaceSchema=n.record(n.string(),n.json()),PLACE_PARAM="place";export function placeParams(e){return e===void 0?{}:{[PLACE_PARAM]:JSON.stringify(e)}}export function placeIn(e){const t=e.get(PLACE_PARAM);if(t===null)return;let r;try{r=JSON.parse(t)}catch{return}const c=PlaceSchema.safeParse(r);return c.success?c.data:void 0}