@allyhub/sdk 0.8.0 → 0.10.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 (497) hide show
  1. package/CHANGELOG.md +19 -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 +4 -1
  18. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  19. package/dist/node_modules/@allyhub/chart/dist/chart.d.ts +22 -0
  20. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  21. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  22. package/dist/node_modules/@allyhub/diagnostics/LICENSE +241 -0
  23. package/dist/node_modules/@allyhub/diagnostics/dist/fact.d.ts +37 -0
  24. package/dist/node_modules/@allyhub/diagnostics/dist/fact.js +2 -0
  25. package/dist/node_modules/@allyhub/diagnostics/dist/index.d.ts +4 -0
  26. package/dist/node_modules/@allyhub/diagnostics/dist/index.js +2 -0
  27. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +43 -0
  28. package/dist/node_modules/@allyhub/diagnostics/dist/problem.js +2 -0
  29. package/dist/node_modules/@allyhub/diagnostics/dist/rules.d.ts +30 -0
  30. package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +2 -0
  31. package/dist/node_modules/@allyhub/diagnostics/package.json +14 -0
  32. package/dist/node_modules/@allyhub/formats/dist/contributed.d.ts +126 -0
  33. package/dist/node_modules/@allyhub/formats/dist/contributed.js +2 -0
  34. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  35. package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +7 -12
  36. package/dist/node_modules/@allyhub/formats/dist/data/reference.js +1 -1
  37. package/dist/node_modules/@allyhub/formats/dist/data/script.d.ts +9 -4
  38. package/dist/node_modules/@allyhub/formats/dist/data/script.js +1 -1
  39. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +107 -83
  40. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  41. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +185 -8
  42. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  43. package/dist/node_modules/@allyhub/formats/dist/data/website.d.ts +2 -1
  44. package/dist/node_modules/@allyhub/formats/dist/data/website.js +1 -1
  45. package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
  46. package/dist/node_modules/@allyhub/formats/dist/data/work.js +2 -0
  47. package/dist/node_modules/@allyhub/formats/dist/extension.d.ts +91 -0
  48. package/dist/node_modules/@allyhub/formats/dist/extension.js +2 -0
  49. package/dist/node_modules/@allyhub/formats/dist/files.d.ts +51 -0
  50. package/dist/node_modules/@allyhub/formats/dist/files.js +2 -0
  51. package/dist/node_modules/@allyhub/formats/dist/index.d.ts +5 -1
  52. package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
  53. package/dist/node_modules/@allyhub/formats/dist/items.d.ts +226 -90
  54. package/dist/node_modules/@allyhub/formats/dist/items.js +1 -1
  55. package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +7 -1
  56. package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
  57. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +96 -42
  58. package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
  59. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  60. package/dist/node_modules/@allyhub/image-draw/LICENSE +241 -0
  61. package/dist/node_modules/@allyhub/image-draw/dist/context.d.ts +5 -0
  62. package/dist/node_modules/@allyhub/image-draw/dist/context.js +2 -0
  63. package/dist/node_modules/@allyhub/image-draw/dist/contrast.d.ts +13 -0
  64. package/dist/node_modules/@allyhub/image-draw/dist/contrast.js +2 -0
  65. package/dist/node_modules/@allyhub/image-draw/dist/env.d.ts +112 -0
  66. package/dist/node_modules/@allyhub/image-draw/dist/env.js +2 -0
  67. package/dist/node_modules/@allyhub/image-draw/dist/errors.d.ts +20 -0
  68. package/dist/node_modules/@allyhub/image-draw/dist/errors.js +2 -0
  69. package/dist/node_modules/@allyhub/image-draw/dist/fonts.d.ts +110 -0
  70. package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +2 -0
  71. package/dist/node_modules/@allyhub/image-draw/dist/guards.d.ts +32 -0
  72. package/dist/node_modules/@allyhub/image-draw/dist/guards.js +2 -0
  73. package/dist/node_modules/@allyhub/image-draw/dist/hash.d.ts +3 -0
  74. package/dist/node_modules/@allyhub/image-draw/dist/hash.js +2 -0
  75. package/dist/node_modules/@allyhub/image-draw/dist/inspect.d.ts +113 -0
  76. package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +3 -0
  77. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.d.ts +151 -0
  78. package/dist/node_modules/@allyhub/image-draw/dist/layer-style.js +2 -0
  79. package/dist/node_modules/@allyhub/image-draw/dist/paint.d.ts +29 -0
  80. package/dist/node_modules/@allyhub/image-draw/dist/paint.js +2 -0
  81. package/dist/node_modules/@allyhub/image-draw/dist/pictures.d.ts +39 -0
  82. package/dist/node_modules/@allyhub/image-draw/dist/pictures.js +2 -0
  83. package/dist/node_modules/@allyhub/image-draw/dist/plan.d.ts +52 -0
  84. package/dist/node_modules/@allyhub/image-draw/dist/plan.js +2 -0
  85. package/dist/node_modules/@allyhub/image-draw/dist/reads.d.ts +145 -0
  86. package/dist/node_modules/@allyhub/image-draw/dist/reads.js +2 -0
  87. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.d.ts +26 -0
  88. package/dist/node_modules/@allyhub/image-draw/dist/shape-path.js +2 -0
  89. package/dist/node_modules/@allyhub/image-draw/dist/stage.d.ts +56 -0
  90. package/dist/node_modules/@allyhub/image-draw/dist/stage.js +2 -0
  91. package/dist/node_modules/@allyhub/image-draw/dist/styles.d.ts +35 -0
  92. package/dist/node_modules/@allyhub/image-draw/dist/styles.js +2 -0
  93. package/dist/node_modules/@allyhub/image-draw/dist/tone.d.ts +53 -0
  94. package/dist/node_modules/@allyhub/image-draw/dist/tone.js +2 -0
  95. package/dist/node_modules/@allyhub/image-draw/package.json +14 -0
  96. package/dist/node_modules/@allyhub/image-measure/LICENSE +241 -0
  97. package/dist/node_modules/@allyhub/image-measure/dist/contrast.d.ts +43 -0
  98. package/dist/node_modules/@allyhub/image-measure/dist/contrast.js +2 -0
  99. package/dist/node_modules/@allyhub/image-measure/dist/layout.d.ts +186 -0
  100. package/dist/node_modules/@allyhub/image-measure/dist/layout.js +5 -0
  101. package/dist/node_modules/@allyhub/image-measure/package.json +14 -0
  102. package/dist/node_modules/@allyhub/image-sdk/LICENSE +241 -0
  103. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.d.ts +13 -0
  104. package/dist/node_modules/@allyhub/image-sdk/dist/adjustment.js +2 -0
  105. package/dist/{define.d.ts → node_modules/@allyhub/image-sdk/dist/define.d.ts} +21 -4
  106. package/dist/node_modules/@allyhub/image-sdk/dist/define.js +2 -0
  107. package/dist/node_modules/@allyhub/image-sdk/dist/dom.d.ts +210 -0
  108. package/dist/node_modules/@allyhub/image-sdk/dist/dom.js +2 -0
  109. package/dist/node_modules/@allyhub/image-sdk/dist/fill.d.ts +21 -0
  110. package/dist/node_modules/@allyhub/image-sdk/dist/fill.js +2 -0
  111. package/dist/node_modules/@allyhub/image-sdk/dist/group.d.ts +17 -0
  112. package/dist/node_modules/@allyhub/image-sdk/dist/group.js +2 -0
  113. package/dist/node_modules/@allyhub/image-sdk/dist/index.d.ts +166 -0
  114. package/dist/node_modules/@allyhub/image-sdk/dist/index.js +2 -0
  115. package/dist/node_modules/@allyhub/image-sdk/dist/media.d.ts +6 -0
  116. package/dist/node_modules/@allyhub/image-sdk/dist/media.js +2 -0
  117. package/dist/{messages.d.ts → node_modules/@allyhub/image-sdk/dist/messages.d.ts} +1 -1
  118. package/dist/node_modules/@allyhub/image-sdk/dist/picture.d.ts +59 -0
  119. package/dist/node_modules/@allyhub/image-sdk/dist/picture.js +2 -0
  120. package/dist/{props.d.ts → node_modules/@allyhub/image-sdk/dist/props.d.ts} +4 -4
  121. package/dist/node_modules/@allyhub/image-sdk/dist/shape.d.ts +34 -0
  122. package/dist/node_modules/@allyhub/image-sdk/dist/shape.js +2 -0
  123. package/dist/node_modules/@allyhub/image-sdk/dist/stack.d.ts +16 -0
  124. package/dist/node_modules/@allyhub/image-sdk/dist/stack.js +2 -0
  125. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.d.ts +38 -0
  126. package/dist/node_modules/@allyhub/image-sdk/dist/text-layer.js +2 -0
  127. package/dist/{written.js → node_modules/@allyhub/image-sdk/dist/written.js} +1 -1
  128. package/dist/node_modules/@allyhub/image-sdk/package.json +19 -0
  129. package/dist/node_modules/@allyhub/measure/LICENSE +241 -0
  130. package/dist/node_modules/@allyhub/measure/dist/compare.d.ts +195 -0
  131. package/dist/node_modules/@allyhub/measure/dist/compare.js +2 -0
  132. package/dist/node_modules/@allyhub/measure/dist/grain.d.ts +8 -0
  133. package/dist/node_modules/@allyhub/measure/dist/grain.js +2 -0
  134. package/dist/node_modules/@allyhub/measure/dist/image.d.ts +16 -0
  135. package/dist/node_modules/@allyhub/measure/dist/image.js +2 -0
  136. package/dist/node_modules/@allyhub/measure/dist/index.d.ts +4 -0
  137. package/dist/node_modules/@allyhub/measure/dist/index.js +2 -0
  138. package/dist/node_modules/@allyhub/measure/package.json +13 -0
  139. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.d.ts +4 -1
  140. package/dist/node_modules/@allyhub/ooxml/dist/generated/presets.js +1 -1
  141. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.d.ts +15 -1
  142. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  143. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  144. package/dist/node_modules/@allyhub/piece/LICENSE +241 -0
  145. package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.d.ts +1 -9
  146. package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.js +1 -1
  147. package/dist/node_modules/@allyhub/piece/dist/context.d.ts +39 -0
  148. package/dist/node_modules/@allyhub/piece/dist/context.js +2 -0
  149. package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.d.ts +2 -2
  150. package/dist/node_modules/@allyhub/{video-core → piece}/dist/export.d.ts +27 -10
  151. package/dist/node_modules/@allyhub/piece/dist/export.js +2 -0
  152. package/dist/node_modules/@allyhub/{video-core → piece}/dist/formats.d.ts +12 -68
  153. package/dist/node_modules/@allyhub/piece/dist/formats.js +2 -0
  154. package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +104 -0
  155. package/dist/node_modules/@allyhub/piece/dist/index.d.ts +26 -0
  156. package/dist/node_modules/@allyhub/piece/dist/index.js +2 -0
  157. package/dist/node_modules/@allyhub/piece/dist/layer-style.d.ts +1558 -0
  158. package/dist/node_modules/@allyhub/piece/dist/layer-style.js +2 -0
  159. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +389 -0
  160. package/dist/node_modules/@allyhub/piece/dist/layer.js +2 -0
  161. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +437 -0
  162. package/dist/node_modules/@allyhub/piece/dist/layout.js +2 -0
  163. package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.d.ts +1 -1
  164. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.d.ts +39 -9
  165. package/dist/node_modules/@allyhub/{video-core → piece}/dist/media.js +1 -1
  166. package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.d.ts +6 -0
  167. package/dist/node_modules/@allyhub/piece/dist/names.d.ts +26 -0
  168. package/dist/node_modules/@allyhub/piece/dist/names.js +2 -0
  169. package/dist/node_modules/@allyhub/piece/dist/page/console.d.ts +21 -0
  170. package/dist/node_modules/@allyhub/piece/dist/page/console.js +2 -0
  171. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +3 -0
  172. package/dist/node_modules/@allyhub/piece/dist/page/index.js +2 -0
  173. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +4 -0
  174. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +2 -0
  175. package/dist/node_modules/@allyhub/piece/dist/picture.d.ts +62 -0
  176. package/dist/node_modules/@allyhub/piece/dist/picture.js +2 -0
  177. package/dist/node_modules/@allyhub/piece/dist/piece.d.ts +15 -0
  178. package/dist/node_modules/@allyhub/piece/dist/piece.js +2 -0
  179. package/dist/node_modules/@allyhub/{video-core → piece}/dist/script.d.ts +9 -4
  180. package/dist/node_modules/@allyhub/piece/dist/script.js +2 -0
  181. package/dist/node_modules/@allyhub/piece/dist/source.d.ts +131 -0
  182. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +291 -0
  183. package/dist/node_modules/@allyhub/piece/dist/stage.js +2 -0
  184. package/dist/node_modules/@allyhub/piece/dist/version.d.ts +15 -0
  185. package/dist/node_modules/@allyhub/piece/dist/version.js +2 -0
  186. package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.d.ts +1 -20
  187. package/dist/node_modules/@allyhub/piece/package.json +18 -0
  188. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +271 -0
  189. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  190. package/dist/node_modules/@allyhub/protocol/dist/app.d.ts +3 -10
  191. package/dist/node_modules/@allyhub/protocol/dist/app.js +1 -1
  192. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
  193. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  194. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.d.ts +337 -0
  195. package/dist/node_modules/@allyhub/protocol/dist/browser-bridge.js +2 -0
  196. package/dist/node_modules/@allyhub/protocol/dist/cli.d.ts +12 -1
  197. package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
  198. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +155 -0
  199. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  200. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +235 -133
  201. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  202. package/dist/node_modules/@allyhub/protocol/dist/files.d.ts +2 -0
  203. package/dist/node_modules/@allyhub/protocol/dist/files.js +1 -1
  204. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +65 -197
  205. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  206. package/dist/node_modules/@allyhub/protocol/dist/image.d.ts +8 -0
  207. package/dist/node_modules/@allyhub/protocol/dist/image.js +2 -0
  208. package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +6 -0
  209. package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
  210. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
  211. package/dist/node_modules/@allyhub/protocol/dist/kinds.d.ts +98 -0
  212. package/dist/node_modules/@allyhub/protocol/dist/kinds.js +2 -0
  213. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +274 -0
  214. package/dist/node_modules/@allyhub/protocol/dist/mail.js +2 -0
  215. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +77 -91
  216. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  217. package/dist/node_modules/@allyhub/protocol/dist/peer.d.ts +59 -0
  218. package/dist/node_modules/@allyhub/protocol/dist/peer.js +2 -0
  219. package/dist/node_modules/@allyhub/protocol/dist/place.d.ts +21 -0
  220. package/dist/node_modules/@allyhub/protocol/dist/place.js +2 -0
  221. package/dist/node_modules/@allyhub/protocol/dist/presence.d.ts +125 -0
  222. package/dist/node_modules/@allyhub/protocol/dist/presence.js +2 -0
  223. package/dist/node_modules/@allyhub/protocol/dist/registry.d.ts +1 -1
  224. package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
  225. package/dist/node_modules/@allyhub/protocol/dist/shape.d.ts +35 -0
  226. package/dist/node_modules/@allyhub/protocol/dist/shape.js +2 -0
  227. package/dist/node_modules/@allyhub/protocol/dist/shares.d.ts +2 -8
  228. package/dist/node_modules/@allyhub/protocol/dist/shares.js +1 -1
  229. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +70 -40
  230. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  231. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +224 -177
  232. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  233. package/dist/node_modules/@allyhub/protocol/package.json +5 -1
  234. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +1 -1
  235. package/dist/node_modules/@allyhub/runtimes/dist/declared.d.ts +14 -0
  236. package/dist/node_modules/@allyhub/runtimes/dist/declared.js +2 -0
  237. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.d.ts +15 -0
  238. package/dist/node_modules/@allyhub/runtimes/dist/ffmpeg.js +2 -0
  239. package/dist/node_modules/@allyhub/runtimes/dist/index.d.ts +2 -0
  240. package/dist/node_modules/@allyhub/runtimes/dist/index.js +1 -1
  241. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +3 -3
  242. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.d.ts +1 -0
  243. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +1 -1
  244. package/dist/node_modules/@allyhub/runtimes/manifest.json +0 -82
  245. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  246. package/dist/node_modules/@allyhub/scenery/dist/define.d.ts +2 -0
  247. package/dist/node_modules/@allyhub/scenery/dist/define.js +1 -1
  248. package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
  249. package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
  250. package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
  251. package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
  252. package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
  253. package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
  254. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  255. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/api/code.d.ts +4 -4
  257. package/dist/node_modules/@allyhub/sheet/dist/api/code.js +1 -1
  258. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.d.ts +15 -11
  259. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  261. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.d.ts +70 -0
  262. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  263. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.d.ts +6 -0
  264. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  265. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  266. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.d.ts +3 -1
  267. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
  268. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  269. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
  270. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  271. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
  272. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  273. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.d.ts +9 -0
  274. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
  275. package/dist/node_modules/@allyhub/sheet/dist/calc/server.d.ts +1 -1
  276. package/dist/node_modules/@allyhub/sheet/dist/calc/types.d.ts +6 -0
  277. package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
  278. package/dist/node_modules/@allyhub/sheet/dist/chart.d.ts +9 -0
  279. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  280. package/dist/node_modules/@allyhub/sheet/dist/export.js +1 -1
  281. package/dist/node_modules/@allyhub/sheet/dist/file.d.ts +5 -0
  282. package/dist/node_modules/@allyhub/sheet/dist/file.js +1 -1
  283. package/dist/node_modules/@allyhub/sheet/dist/formula/ast.d.ts +12 -1
  284. package/dist/node_modules/@allyhub/sheet/dist/formula/move.d.ts +5 -1
  285. package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
  286. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  287. package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
  288. package/dist/node_modules/@allyhub/sheet/dist/generated.d.ts +5 -19
  289. package/dist/node_modules/@allyhub/sheet/dist/generated.js +1 -1
  290. package/dist/node_modules/@allyhub/sheet/dist/import.d.ts +3 -1
  291. package/dist/node_modules/@allyhub/sheet/dist/import.js +1 -1
  292. package/dist/node_modules/@allyhub/sheet/dist/index.d.ts +5 -5
  293. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  294. package/dist/node_modules/@allyhub/sheet/dist/inspect.d.ts +88 -3
  295. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  296. package/dist/node_modules/@allyhub/sheet/dist/patch.d.ts +1 -1
  297. package/dist/node_modules/@allyhub/sheet/dist/patch.js +1 -1
  298. package/dist/node_modules/@allyhub/sheet/dist/printed.d.ts +19 -0
  299. package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
  300. package/dist/node_modules/@allyhub/sheet/dist/sdk.d.ts +2 -0
  301. package/dist/node_modules/@allyhub/sheet/dist/sdk.js +2 -0
  302. package/dist/node_modules/@allyhub/sheet/dist/values.d.ts +2 -0
  303. package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
  304. package/dist/node_modules/@allyhub/sheet/dist/workbook.d.ts +8 -6
  305. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  306. package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
  307. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.d.ts +6 -2
  308. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  309. package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
  310. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.d.ts +2 -1
  311. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  312. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.d.ts +3 -1
  313. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  314. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.d.ts +7 -1
  315. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
  316. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.d.ts +6 -0
  317. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  318. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.d.ts +1 -1
  319. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  320. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.d.ts +12 -1
  321. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
  322. package/dist/node_modules/@allyhub/sheet/package.json +5 -1
  323. package/dist/node_modules/@allyhub/slides-core/dist/animation.d.ts +23 -7
  324. package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
  325. package/dist/node_modules/@allyhub/slides-core/dist/api.d.ts +101 -11
  326. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  327. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  328. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.d.ts +18 -1
  329. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
  330. package/dist/node_modules/@allyhub/slides-core/dist/code.d.ts +1 -1
  331. package/dist/node_modules/@allyhub/slides-core/dist/connect.d.ts +62 -0
  332. package/dist/node_modules/@allyhub/slides-core/dist/connect.js +2 -0
  333. package/dist/node_modules/@allyhub/slides-core/dist/enums.d.ts +24 -0
  334. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  335. package/dist/node_modules/@allyhub/slides-core/dist/fact.d.ts +223 -0
  336. package/dist/node_modules/@allyhub/slides-core/dist/fact.js +2 -0
  337. package/dist/node_modules/@allyhub/slides-core/dist/file.d.ts +4 -4
  338. package/dist/node_modules/@allyhub/slides-core/dist/file.js +2 -2
  339. package/dist/node_modules/@allyhub/slides-core/dist/index.d.ts +2 -0
  340. package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
  341. package/dist/node_modules/@allyhub/slides-core/dist/measure.d.ts +4 -2
  342. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  343. package/dist/node_modules/@allyhub/slides-core/dist/merge.d.ts +5 -5
  344. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
  345. package/dist/node_modules/@allyhub/slides-core/dist/model.d.ts +25 -4
  346. package/dist/node_modules/@allyhub/slides-core/dist/office.d.ts +1 -1
  347. package/dist/node_modules/@allyhub/slides-core/dist/path.d.ts +1 -1
  348. package/dist/node_modules/@allyhub/slides-core/dist/resolve.d.ts +20 -11
  349. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  350. package/dist/node_modules/@allyhub/slides-core/dist/sdk.d.ts +18 -0
  351. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +2 -0
  352. package/dist/node_modules/@allyhub/slides-core/dist/stage.d.ts +28 -11
  353. package/dist/node_modules/@allyhub/slides-core/dist/units.d.ts +3 -6
  354. package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
  355. package/dist/node_modules/@allyhub/slides-core/package.json +5 -1
  356. package/dist/node_modules/@allyhub/video-core/dist/audio-types.d.ts +1 -2
  357. package/dist/node_modules/@allyhub/video-core/dist/captions.d.ts +1 -10
  358. package/dist/node_modules/@allyhub/video-core/dist/captions.js +1 -1
  359. package/dist/node_modules/@allyhub/video-core/dist/check.d.ts +62 -0
  360. package/dist/node_modules/@allyhub/video-core/dist/check.js +2 -0
  361. package/dist/node_modules/@allyhub/video-core/dist/cut-report.d.ts +2 -2
  362. package/dist/node_modules/@allyhub/video-core/dist/cut-report.js +1 -1
  363. package/dist/node_modules/@allyhub/video-core/dist/edits.d.ts +3 -3
  364. package/dist/node_modules/@allyhub/video-core/dist/edits.js +1 -1
  365. package/dist/node_modules/@allyhub/video-core/dist/fact.d.ts +21 -762
  366. package/dist/node_modules/@allyhub/video-core/dist/fact.js +1 -1
  367. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.d.ts +3 -2
  368. package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
  369. package/dist/node_modules/@allyhub/video-core/dist/index.d.ts +3 -17
  370. package/dist/node_modules/@allyhub/video-core/dist/index.js +1 -1
  371. package/dist/node_modules/@allyhub/video-core/dist/measure.d.ts +72 -423
  372. package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -4
  373. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.d.ts +44 -0
  374. package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +2 -0
  375. package/dist/node_modules/@allyhub/video-core/dist/motion.d.ts +1 -1
  376. package/dist/node_modules/@allyhub/video-core/dist/piece.d.ts +24 -432
  377. package/dist/node_modules/@allyhub/video-core/dist/piece.js +1 -1
  378. package/dist/node_modules/@allyhub/video-core/dist/placement.d.ts +1 -1
  379. package/dist/node_modules/@allyhub/video-core/dist/schema.d.ts +8 -14
  380. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  381. package/dist/node_modules/@allyhub/video-core/dist/script-edit.d.ts +11 -6
  382. package/dist/node_modules/@allyhub/video-core/dist/script-edit.js +1 -1
  383. package/dist/node_modules/@allyhub/video-core/dist/seams.d.ts +2 -3
  384. package/dist/node_modules/@allyhub/video-core/dist/sound-under.d.ts +2 -2
  385. package/dist/node_modules/@allyhub/video-core/dist/sound-under.js +1 -1
  386. package/dist/node_modules/@allyhub/video-core/dist/speech.d.ts +2 -4
  387. package/dist/node_modules/@allyhub/video-core/dist/speech.js +2 -2
  388. package/dist/node_modules/@allyhub/video-core/dist/stage.d.ts +52 -0
  389. package/dist/node_modules/@allyhub/video-core/dist/stage.js +2 -0
  390. package/dist/node_modules/@allyhub/video-core/dist/timeline.d.ts +18 -136
  391. package/dist/node_modules/@allyhub/video-core/dist/timeline.js +1 -1
  392. package/dist/node_modules/@allyhub/video-core/dist/timing.d.ts +3 -3
  393. package/dist/node_modules/@allyhub/video-core/dist/timing.js +1 -1
  394. package/dist/node_modules/@allyhub/video-core/dist/transcript.d.ts +2 -2
  395. package/dist/node_modules/@allyhub/video-core/dist/transcript.js +1 -1
  396. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  397. package/dist/node_modules/@allyhub/video-sdk/LICENSE +241 -0
  398. package/dist/node_modules/@allyhub/video-sdk/NOTICE +118 -0
  399. package/dist/{free.d.ts → node_modules/@allyhub/video-sdk/dist/free.d.ts} +14 -10
  400. package/dist/node_modules/@allyhub/video-sdk/dist/free.js +2 -0
  401. package/dist/node_modules/@allyhub/video-sdk/dist/index.d.ts +28 -0
  402. package/dist/node_modules/@allyhub/video-sdk/dist/index.js +2 -0
  403. package/dist/{input.d.ts → node_modules/@allyhub/video-sdk/dist/input.d.ts} +76 -22
  404. package/dist/node_modules/@allyhub/video-sdk/dist/input.js +2 -0
  405. package/dist/{module.d.ts → node_modules/@allyhub/video-sdk/dist/module.d.ts} +6 -4
  406. package/dist/node_modules/@allyhub/video-sdk/dist/module.js +2 -0
  407. package/dist/{parts.d.ts → node_modules/@allyhub/video-sdk/dist/parts.d.ts} +15 -6
  408. package/dist/node_modules/@allyhub/video-sdk/dist/parts.js +2 -0
  409. package/dist/{phone.d.ts → node_modules/@allyhub/video-sdk/dist/phone.d.ts} +12 -5
  410. package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +2 -0
  411. package/dist/{piece.d.ts → node_modules/@allyhub/video-sdk/dist/piece.d.ts} +26 -16
  412. package/dist/node_modules/@allyhub/video-sdk/dist/piece.js +2 -0
  413. package/dist/node_modules/@allyhub/video-sdk/dist/route.d.ts +46 -0
  414. package/dist/node_modules/@allyhub/video-sdk/dist/route.js +2 -0
  415. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.d.ts +2 -0
  416. package/dist/node_modules/@allyhub/video-sdk/dist/scenery.js +2 -0
  417. package/dist/node_modules/@allyhub/video-sdk/package.json +19 -0
  418. package/dist/scenery.d.ts +1 -1
  419. package/dist/scenery.js +1 -1
  420. package/dist/sheets.d.ts +1 -1
  421. package/dist/sheets.js +1 -1
  422. package/dist/slides.d.ts +1 -9
  423. package/dist/slides.js +1 -1
  424. package/docs/README.md +10 -6
  425. package/docs/batches.md +5 -5
  426. package/docs/canvas.md +28 -0
  427. package/docs/contract.md +2 -2
  428. package/docs/defaults.md +298 -22
  429. package/docs/docs.md +80 -66
  430. package/docs/footage.md +7 -7
  431. package/docs/image.md +165 -0
  432. package/docs/layers.md +22 -13
  433. package/docs/modeling.md +4 -4
  434. package/docs/pictures.md +65 -0
  435. package/docs/project.md +51 -31
  436. package/docs/scenery.md +14 -15
  437. package/docs/sheets.md +46 -28
  438. package/docs/slides.md +121 -67
  439. package/docs/sound.md +3 -3
  440. package/docs/speech.md +8 -8
  441. package/docs/video.md +16 -13
  442. package/docs/websites.md +4 -4
  443. package/docs/x.md +73 -0
  444. package/package.json +7 -2
  445. package/dist/define.js +0 -2
  446. package/dist/free.js +0 -2
  447. package/dist/input.js +0 -2
  448. package/dist/module.js +0 -2
  449. package/dist/node_modules/@allyhub/formats/dist/data/comments.d.ts +0 -94
  450. package/dist/node_modules/@allyhub/formats/dist/data/comments.js +0 -2
  451. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package-lock.json +0 -227
  452. package/dist/node_modules/@allyhub/runtimes/pins/onnxruntime-node/package.json +0 -8
  453. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -105
  454. package/dist/node_modules/@allyhub/runtimes/pins/sherpa-onnx-node/package.json +0 -8
  455. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package-lock.json +0 -128
  456. package/dist/node_modules/@allyhub/runtimes/pins/tesseract.js/package.json +0 -9
  457. package/dist/node_modules/@allyhub/video-core/dist/export.js +0 -2
  458. package/dist/node_modules/@allyhub/video-core/dist/formats.js +0 -2
  459. package/dist/node_modules/@allyhub/video-core/dist/gen.d.ts +0 -37
  460. package/dist/node_modules/@allyhub/video-core/dist/problem.d.ts +0 -278
  461. package/dist/node_modules/@allyhub/video-core/dist/problem.js +0 -2
  462. package/dist/node_modules/@allyhub/video-core/dist/script.js +0 -2
  463. package/dist/node_modules/@allyhub/video-core/dist/source.d.ts +0 -7
  464. package/dist/parts.js +0 -2
  465. package/dist/phone.js +0 -2
  466. package/dist/piece.js +0 -2
  467. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.d.ts +0 -0
  468. /package/dist/node_modules/@allyhub/{sheet → formats}/dist/csv.js +0 -0
  469. /package/dist/{fit.d.ts → node_modules/@allyhub/image-sdk/dist/fit.d.ts} +0 -0
  470. /package/dist/{fit.js → node_modules/@allyhub/image-sdk/dist/fit.js} +0 -0
  471. /package/dist/{messages.js → node_modules/@allyhub/image-sdk/dist/messages.js} +0 -0
  472. /package/dist/{props.js → node_modules/@allyhub/image-sdk/dist/props.js} +0 -0
  473. /package/dist/{text.d.ts → node_modules/@allyhub/image-sdk/dist/text.d.ts} +0 -0
  474. /package/dist/{text.js → node_modules/@allyhub/image-sdk/dist/text.js} +0 -0
  475. /package/dist/{written.d.ts → node_modules/@allyhub/image-sdk/dist/written.d.ts} +0 -0
  476. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/anchors.js +0 -0
  477. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/component.d.ts +0 -0
  478. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.d.ts +0 -0
  479. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/console.js +0 -0
  480. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/contrast.js +0 -0
  481. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/gen.js +0 -0
  482. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/look.js +0 -0
  483. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.d.ts +0 -0
  484. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/marks.js +0 -0
  485. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.d.ts +0 -0
  486. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/matrix.js +0 -0
  487. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/messages.js +0 -0
  488. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/source.js +0 -0
  489. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/voice.js +0 -0
  490. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.d.ts +0 -0
  491. /package/dist/node_modules/@allyhub/{video-core → piece}/dist/words.js +0 -0
  492. /package/dist/{anim.d.ts → node_modules/@allyhub/video-sdk/dist/anim.d.ts} +0 -0
  493. /package/dist/{anim.js → node_modules/@allyhub/video-sdk/dist/anim.js} +0 -0
  494. /package/dist/{noise.d.ts → node_modules/@allyhub/video-sdk/dist/noise.d.ts} +0 -0
  495. /package/dist/{noise.js → node_modules/@allyhub/video-sdk/dist/noise.js} +0 -0
  496. /package/dist/{paths.d.ts → node_modules/@allyhub/video-sdk/dist/paths.d.ts} +0 -0
  497. /package/dist/{paths.js → node_modules/@allyhub/video-sdk/dist/paths.js} +0 -0
@@ -0,0 +1,223 @@
1
+ import { type Box, type Fact, type FactPlace } from "@allyhub/diagnostics";
2
+ /** An edge of a box and how far past a line it is, in points (a deck's). */
3
+ export interface DeckEdge {
4
+ side: "top" | "bottom" | "left" | "right";
5
+ pt: number;
6
+ }
7
+ /**
8
+ * Facts of a deck: what is measured of each slide as drawn (`deckFacts`, measure.ts). Every length is in points, the unit
9
+ * the slides file is written in; a box is [x, y, w, h] from the slide's top left.
10
+ */
11
+ export interface DeckFactData {
12
+ /** A shape's text past its box, by its lines' glyphs. */
13
+ "text-overflow": {
14
+ shape: string;
15
+ text: string;
16
+ box: Box;
17
+ glyphs: Box;
18
+ edges: DeckEdge[];
19
+ /** Its lines, and those past the box. */
20
+ lines: number;
21
+ past: number;
22
+ /** The share autofit shrank it to, when it did and it still does not fit. */
23
+ scale?: number;
24
+ };
25
+ /** A shape's text the slide's edge cuts: its glyphs past the slide. */
26
+ "text-off-slide": {
27
+ shape: string;
28
+ text: string;
29
+ glyphs: Box;
30
+ edges: DeckEdge[];
31
+ /** The share of its glyphs' box outside the slide (0–1). */
32
+ share: number;
33
+ };
34
+ /** A shape partly or wholly past the slide's edge. */
35
+ "shape-off-slide": {
36
+ shape: string;
37
+ box: Box;
38
+ edges: DeckEdge[];
39
+ /** Its area past the edge, as a share of its own (0–1). */
40
+ share: number;
41
+ };
42
+ /**
43
+ * Two shapes of a slide over each other, not a master's or a layout's own
44
+ * under another: what shows of each, its box when it is filled or a
45
+ * picture, else its text's glyphs.
46
+ */
47
+ "shape-overlap": {
48
+ a: string;
49
+ b: string;
50
+ /** Square points both cover, and that as a share of the smaller (0–1). */
51
+ area: number;
52
+ share: number;
53
+ };
54
+ /**
55
+ * Edges or centres of two shapes, or of a shape and the slide, nearly in
56
+ * line and not: where each line is, what it was measured by (a filled
57
+ * shape's or a picture's frame; an unfilled text's glyphs), and the
58
+ * frame's x or y that puts the one to move on the other's line.
59
+ */
60
+ "near-alignment": {
61
+ a: string;
62
+ /** Another shape, or "slide" for the slide's centre. */
63
+ b: string;
64
+ line: "left" | "right" | "top" | "bottom" | "centre-x" | "centre-y";
65
+ /** How far apart. */
66
+ gap: number;
67
+ /** Each one's line. */
68
+ at: {
69
+ a: number;
70
+ b: number;
71
+ };
72
+ by: {
73
+ a: "frame" | "glyphs";
74
+ b: "frame" | "glyphs";
75
+ };
76
+ /** The slide's own shape to move (a, unless a is a master's or a layout's), and its frame's `x` or `y` that aligns it. */
77
+ align: {
78
+ shape: string;
79
+ x?: number;
80
+ y?: number;
81
+ };
82
+ options: {
83
+ within: number;
84
+ aligned: number;
85
+ };
86
+ };
87
+ /** A shape of one name at different places on slides of one layout. */
88
+ "placement-drift": {
89
+ layout: string;
90
+ shape: string;
91
+ /** Each place, with the slides it is at. */
92
+ places: {
93
+ frame: Box;
94
+ slides: string[];
95
+ }[];
96
+ options: {
97
+ drift: number;
98
+ };
99
+ };
100
+ /** The sizes and weights the deck's text uses, and on how many slides. */
101
+ "type-in-use": {
102
+ type: {
103
+ size: number;
104
+ weight: number;
105
+ slides: number;
106
+ shapes: number;
107
+ }[];
108
+ /** The smallest size, in points. */
109
+ smallest: number;
110
+ };
111
+ /** A text's size as read: on the slide, on a screen from the farthest seat, on a phone. */
112
+ "read-size": {
113
+ shape: string;
114
+ text: string;
115
+ /** Its smallest size and lowercase x's height, in points on the slide. */
116
+ size: number;
117
+ xHeight?: number;
118
+ /**
119
+ * On a room's screen, when one is given: its lowercase x (`by: "x"`), or for text with
120
+ * no lowercase Latin letter (CJK) its em (`by: "em"`), in millimetres,
121
+ * and the angle that makes at the farthest seat, in minutes of arc.
122
+ */
123
+ screen?: {
124
+ by: "x" | "em";
125
+ mm: number;
126
+ arcmin: number;
127
+ };
128
+ /** Its size in points on the phone of `options.phone`, the slide fitted inside it. */
129
+ phone: number;
130
+ options: {
131
+ room?: {
132
+ screen: number;
133
+ distance: number;
134
+ };
135
+ phone: [number, number];
136
+ };
137
+ };
138
+ /** Words, lines and texts on a slide. */
139
+ "words-on-slide": {
140
+ words: number;
141
+ lines: number;
142
+ texts: number;
143
+ };
144
+ /** A picture drawn larger than its pixels, or stretched. */
145
+ "picture-resolution": {
146
+ shape: string;
147
+ /** Its file's pixels, and those of them it shows (its crop taken away). */
148
+ source: [number, number];
149
+ shown: [number, number];
150
+ box: Box;
151
+ /** Pixels of the slide as rendered per source pixel, the larger of the two directions (over 1: enlarged). */
152
+ scale: number;
153
+ /** Source pixels per inch of the slide, the smaller of the two directions. */
154
+ ppi: number;
155
+ /** How much wider than its pixels it is drawn, against how much taller, less 1 (0: not stretched). */
156
+ stretch: number;
157
+ };
158
+ /** A shape another covers whole. */
159
+ /** Covered whole at every step that shows it (`by`), or shown by no step. */
160
+ "shape-hidden": {
161
+ shape: string;
162
+ by?: string;
163
+ never?: true;
164
+ };
165
+ /** A table's rows its words made taller than they are set, in points, which moves all that is under them. */
166
+ "chart-data": {
167
+ shape: string;
168
+ type: string;
169
+ categories: number;
170
+ series: number;
171
+ /** The smallest and largest number it shows; absent when it shows none. */
172
+ low?: number;
173
+ high?: number;
174
+ /** The project file its numbers came from; absent: written in the slides file or the code. */
175
+ source?: string;
176
+ };
177
+ /**
178
+ * A line's two ends (a connector, or a freeform left open): each one's
179
+ * point, the arrowhead it has, the shape it is glued to, and the shape
180
+ * whose box's outline is nearest it, how far in points (0 on it).
181
+ */
182
+ "line-ends": {
183
+ shape: string;
184
+ ends: {
185
+ at: [x: number, y: number];
186
+ head: string;
187
+ glued?: string;
188
+ near?: string;
189
+ by?: number;
190
+ }[];
191
+ };
192
+ "table-grown": {
193
+ shape: string;
194
+ /** Its height as set and as drawn. */
195
+ set: number;
196
+ drawn: number;
197
+ rows: {
198
+ row: number;
199
+ set: number;
200
+ drawn: number;
201
+ }[];
202
+ };
203
+ /**
204
+ * The fonts a deck's PowerPoint file names, and whether each is one
205
+ * every PowerPoint, Keynote and Google Slides has (`options.standard`):
206
+ * one that is not is replaced where the file is opened without it.
207
+ */
208
+ "deck-fonts": {
209
+ fonts: {
210
+ name: string;
211
+ where: "theme" | "text";
212
+ standard: boolean;
213
+ }[];
214
+ options: {
215
+ standard: string[];
216
+ };
217
+ };
218
+ }
219
+ /** A fact of a deck's. */
220
+ export type DeckFact = Fact<DeckFactData>;
221
+ /** A fact of a deck's, typed by its kind. */
222
+ export declare const deckFact: <K extends keyof DeckFactData>(kind: K, place: FactPlace, data: DeckFactData[K]) => DeckFact;
223
+ //# sourceMappingURL=fact.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{factOf as f}from"@allyhub/diagnostics";export const deckFact=(t,c,o)=>f(t,c,o);
@@ -7,7 +7,7 @@ export interface FileProblem {
7
7
  message: string;
8
8
  }
9
9
  /**
10
- * slides.yaml's text read: its slides, or none when it is not the format;
10
+ * A slides file's text read: its slides, or none when it is not the format;
11
11
  * the slides of it that are (`readable`, every slide that is the format,
12
12
  * the first of two of one id), so what else is wrong can be found in the
13
13
  * same pass; every problem; and the line of any path.
@@ -71,7 +71,7 @@ export type SlidesEdit =
71
71
  }
72
72
  /**
73
73
  * A shape named on the slide or not: a layout's date, footer and slide
74
- * number show where slides.yaml names them (`slide-number: {}`). Shown,
74
+ * number show where the slides file names them (`slide-number: {}`). Shown,
75
75
  * its entry is there, empty if it had none; not, it is taken away.
76
76
  */
77
77
  | {
@@ -110,10 +110,10 @@ export type SlidesEdit =
110
110
  slide: string;
111
111
  background?: BackgroundFile;
112
112
  };
113
- /** slides.yaml's text after an edit. */
113
+ /** A slides file's text after an edit. */
114
114
  export declare function editSlidesFile(text: string | undefined, edit: SlidesEdit): string;
115
115
  /**
116
- * An edit made on slides.yaml's parsed document, in place: only the nodes
116
+ * An edit made on a slides file's parsed document, in place: only the nodes
117
117
  * it changes are touched, so an editor that keeps the document edits a
118
118
  * long file in the time one slide takes. False when it changed nothing
119
119
  * (its slide is not there).
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
2
  import{readDataFile as N}from"@allyhub/formats";import{isCollection as $,isMap as b,isSeq as j,LineCounter as I,parseDocument as x}from"yaml";import{commonPairs as M,sameValue as O}from"./values.js";export function readSlidesFile(t){const e=new I,s=x(t,{lineCounter:e}),o=f=>{const g=f===""?[]:f.split(".");for(let p=g.length;p>=0;p--){const S=s.getIn(g.slice(0,p).map(y=>/^\d+$/u.test(y)?Number(y):y),!0)?.range?.[0];if(S!==void 0)return e.linePos(S).line}};if(s.errors.length>0)return{problems:s.errors.map(f=>({path:"",line:e.linePos(f.pos[0]).line,message:`not YAML: ${f.message.split(`
3
- `)[0]??""}`})),lineOf:o};const l=s.toJS()??{},r=N("slides",l);if(r.ok)return{file:r.value,readable:{file:r.value,lineOf:o},problems:[],lineOf:o};const n=[],h=(f,g)=>{const p=o(f);n.push({path:f,...p===void 0?{}:{line:p},message:g})},a=(f,g)=>{h(f,C(g,P(l,f)))},i=typeof l=="object"&&l!==null&&"slides"in l?l.slides:void 0,d=Array.isArray(i)?i:[],u=N("slides",{...l,...Array.isArray(i)?{slides:[]}:{}});if(!u.ok)for(const f of u.problems)a(f.path,f.message);const c=[],k=[],m=new Set;return d.forEach((f,g)=>{const p=N("slides",{slides:[f]});if(!p.ok)for(const y of p.problems)a(y.path.replace(/^slides\.0(?=\.|$)/u,`slides.${String(g)}`),y.message);const v=typeof f=="object"&&f!==null&&"id"in f?f.id:void 0;if(typeof v=="string"){if(m.has(v)){h(`slides.${String(g)}.id`,`Two slides are "${v}".`);return}m.add(v)}const[S]=p.ok?p.value.slides:[];S&&(c.push(S),k.push(g))}),{readable:{file:{slides:c},lineOf:f=>o(f.replace(/^slides\.(\d+)/u,(g,p)=>`slides.${String(k[Number(p)]??p)}`))},problems:n,lineOf:o}}function P(t,e){let s=t;for(const o of e===""?[]:e.split(".")){if(typeof s!="object"||s===null)return;s=s[o]}return s}const C=(t,e)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?`${t.replace(/\.$/u,"")} (it is ${JSON.stringify(e)}).`:t,w=`slides: []
4
- `;function D(t){let e=t.get("slides",!0);if(j(e)||(b(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!j(e))throw new Error("slides.yaml has no slides list.");return e}const A=(t,e)=>t.findIndex(s=>b(s)&&s.get("id")===e),E=["frame","text","fill","line","z","crop"];export function editSlidesFile(t,e){const s=x(t===void 0||t.trim()===""?w:t);if(s.errors.length>0)throw new Error("slides.yaml is not YAML: it is mended by hand first.");return editSlidesDocument(s,e)?s.toString():t??w}export function editSlidesDocument(t,e){const s=D(t),o=a=>{if(a===null)return 0;const i=a===void 0?-1:A(s.items,a);return i<0?s.items.length:i+1};if(e.op==="add")return A(s.items,e.slide.id)>=0||(s.items.splice(o(e.after),0,t.createNode(e.slide)),s.flow===!0&&(s.flow=!1)),!0;const l=A(s.items,e.slide),r=s.items[l];if(l<0||!b(r))return!1;const n=a=>{let i=r.get("shapes",!0);return!b(i)&&a&&(r.set("shapes",t.createNode({})),i=r.get("shapes",!0)),b(i)?i:void 0},h=a=>{const i=n(!1);if(i){for(const d of a){const u=i.get(d,!0);b(u)&&u.items.length===0&&i.delete(d)}i.items.length===0&&r.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;s.items.splice(l,1),s.items.splice(o(e.after),0,r);break}case"duplicate":{const a=r.clone();a.set("id",e.id),s.items.splice(l+1,0,a);break}case"remove":s.items.splice(l,1);break;case"layout":r.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?r.delete("hidden"):r.set("hidden",t.createNode(e.hidden));break;case"shape":{const a=n(!0);if(!a)break;let i=a.get(e.shape,!0);if(b(i)||(a.set(e.shape,t.createNode({})),i=a.get(e.shape,!0)),!b(i))break;for(const[d,u]of Object.entries(e.set)){const c=d.split(".");if(u===void 0){i.deleteIn(c);const k=c.length>1?i.getIn(c.slice(0,-1),!0):void 0;b(k)&&k.items.length===0&&i.deleteIn(c.slice(0,-1))}else{const k=i.getIn(c,!0),m=t.createNode(u);$(k)&&$(m)&&k.flow===!0&&(m.flow=!0),i.setIn(c,m)}}h([e.shape]);break}case"unplace":{n(!1)?.delete(e.shape),h([]);break}case"show":{if(!e.shown){n(!1)?.delete(e.shape),h([]);break}const a=n(!0);a&&!a.has(e.shape)&&a.set(e.shape,t.createNode({}));break}case"background":e.background===void 0?r.delete("background"):r.set("background",t.createNode(e.background));break;case"animations":e.animations.length===0?r.delete("animations"):r.set("animations",t.createNode(e.animations));break;case"transition":e.transition===void 0?r.delete("transition"):r.set("transition",t.createNode(e.transition));break;case"advance":e.after===void 0?r.delete("advance_after"):r.set("advance_after",e.after);break;case"reset":{const a=n(!1);if(!a)break;const i=[];for(const d of a.items){const u=String(b(d.key)?"":d.key.value??d.key);if(e.shape!==void 0&&u!==e.shape)continue;const c=d.value;if(!(!b(c)||["textbox","picture","movie","geometry","component"].some(m=>c.has(m))||!E.some(m=>c.has(m)))){for(const m of E)c.delete(m);i.push(u)}}h(i);break}}return!0}export function freeName(t,e){const s=new Set(t),o=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!s.has(o))return o;for(let l=2;;l++){const r=`${o}-${String(l)}`;if(!s.has(r))return r}}const F=new Set(["text","props","crop"]);function _(t){const e=new Map;for(const[s,o]of Object.entries(t??{}))if(F.has(s)&&typeof o=="object"&&!Array.isArray(o))for(const[l,r]of Object.entries(o))e.set(`${s}.${l}`,r);else e.set(s,o);return e}const L=(t,e)=>new Set(M(t,e).map(([s])=>t[s]??""));function T(t,e){const s=[],o=e.id;e.layout!==void 0&&e.layout!==t.layout&&s.push({op:"layout",slide:o,layout:e.layout}),O(t.hidden,e.hidden)||s.push({op:"hidden",slide:o,hidden:e.hidden??!1}),O(t.animations??[],e.animations??[])||s.push({op:"animations",slide:o,animations:e.animations??[]}),O(t.transition,e.transition)||s.push({op:"transition",slide:o,...e.transition?{transition:e.transition}:{}}),t.advance_after!==e.advance_after&&s.push({op:"advance",slide:o,...e.advance_after===void 0?{}:{after:e.advance_after}}),O(t.background,e.background)||s.push({op:"background",slide:o,...e.background?{background:e.background}:{}});const l=t.shapes??{},r=e.shapes??{};for(const n of Object.keys(l))n in r||s.push({op:"unplace",slide:o,shape:n});for(const[n,h]of Object.entries(r)){const a=_(l[n]),i=_(h),d={};for(const c of new Set([...a.keys(),...i.keys()]))O(a.get(c),i.get(c))||(d[c]=i.get(c));Object.keys(d).length>0&&s.push({op:"shape",slide:o,shape:n,set:d});const u=l[n];Object.keys(h).length===0&&(u===void 0||Object.keys(u).length>0)&&s.push({op:"show",slide:o,shape:n,shown:!0})}return s}export function slidesEdits(t,e){const s=[],o=new Map(t.slides.map(n=>[n.id,n])),l=new Set(e.slides.map(n=>n.id));for(const n of t.slides)l.has(n.id)||s.push({op:"remove",slide:n.id});const r=L(t.slides.map(n=>n.id).filter(n=>l.has(n)),e.slides.map(n=>n.id).filter(n=>o.has(n)));return e.slides.forEach((n,h)=>{const a=h===0?null:e.slides[h-1]?.id??null,i=o.get(n.id);if(!i||i.generate!==n.generate){i&&s.push({op:"remove",slide:n.id}),s.push({op:"add",slide:n,after:a});return}r.has(n.id)||s.push({op:"move",slide:n.id,after:a}),s.push(...T(i,n))}),s}
3
+ `)[0]??""}`})),lineOf:o};const l=s.toJS()??{},r=N("slides",l);if(r.ok)return{file:r.value,readable:{file:r.value,lineOf:o},problems:[],lineOf:o};const n=[],h=(f,g)=>{const p=o(f);n.push({path:f,...p===void 0?{}:{line:p},message:g})},a=(f,g)=>{h(f,T(g,P(l,f)))},i=typeof l=="object"&&l!==null&&"slides"in l?l.slides:void 0,d=Array.isArray(i)?i:[],u=N("slides",{...l,...Array.isArray(i)?{slides:[]}:{}});if(!u.ok)for(const f of u.problems)a(f.path,f.message);const c=[],k=[],m=new Set;return d.forEach((f,g)=>{const p=N("slides",{slides:[f]});if(!p.ok)for(const y of p.problems)a(y.path.replace(/^slides\.0(?=\.|$)/u,`slides.${String(g)}`),y.message);const v=typeof f=="object"&&f!==null&&"id"in f?f.id:void 0;if(typeof v=="string"){if(m.has(v)){h(`slides.${String(g)}.id`,`Two slides are "${v}".`);return}m.add(v)}const[S]=p.ok?p.value.slides:[];S&&(c.push(S),k.push(g))}),{readable:{file:{slides:c},lineOf:f=>o(f.replace(/^slides\.(\d+)/u,(g,p)=>`slides.${String(k[Number(p)]??p)}`))},problems:n,lineOf:o}}function P(t,e){let s=t;for(const o of e===""?[]:e.split(".")){if(typeof s!="object"||s===null)return;s=s[o]}return s}const T=(t,e)=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?`${t.replace(/\.$/u,"")} (it is ${JSON.stringify(e)}).`:t,w=`slides: []
4
+ `;function C(t){let e=t.get("slides",!0);if(j(e)||(b(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!j(e))throw new Error("The slides file has no slides list.");return e}const A=(t,e)=>t.findIndex(s=>b(s)&&s.get("id")===e),E=["frame","text","fill","line","z","crop","connect"];export function editSlidesFile(t,e){const s=x(t===void 0||t.trim()===""?w:t);if(s.errors.length>0)throw new Error("The slides file is not YAML: it is mended by hand first.");return editSlidesDocument(s,e)?s.toString():t??w}export function editSlidesDocument(t,e){const s=C(t),o=a=>{if(a===null)return 0;const i=a===void 0?-1:A(s.items,a);return i<0?s.items.length:i+1};if(e.op==="add")return A(s.items,e.slide.id)>=0||(s.items.splice(o(e.after),0,t.createNode(e.slide)),s.flow===!0&&(s.flow=!1)),!0;const l=A(s.items,e.slide),r=s.items[l];if(l<0||!b(r))return!1;const n=a=>{let i=r.get("shapes",!0);return!b(i)&&a&&(r.set("shapes",t.createNode({})),i=r.get("shapes",!0)),b(i)?i:void 0},h=a=>{const i=n(!1);if(i){for(const d of a){const u=i.get(d,!0);b(u)&&u.items.length===0&&i.delete(d)}i.items.length===0&&r.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;s.items.splice(l,1),s.items.splice(o(e.after),0,r);break}case"duplicate":{const a=r.clone();a.set("id",e.id),s.items.splice(l+1,0,a);break}case"remove":s.items.splice(l,1);break;case"layout":r.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?r.delete("hidden"):r.set("hidden",t.createNode(e.hidden));break;case"shape":{const a=n(!0);if(!a)break;let i=a.get(e.shape,!0);if(b(i)||(a.set(e.shape,t.createNode({})),i=a.get(e.shape,!0)),!b(i))break;for(const[d,u]of Object.entries(e.set)){const c=d.split(".");if(u===void 0){i.deleteIn(c);const k=c.length>1?i.getIn(c.slice(0,-1),!0):void 0;b(k)&&k.items.length===0&&i.deleteIn(c.slice(0,-1))}else{const k=i.getIn(c,!0),m=t.createNode(u);$(k)&&$(m)&&k.flow===!0&&(m.flow=!0),i.setIn(c,m)}}h([e.shape]);break}case"unplace":{n(!1)?.delete(e.shape),h([]);break}case"show":{if(!e.shown){n(!1)?.delete(e.shape),h([]);break}const a=n(!0);a&&!a.has(e.shape)&&a.set(e.shape,t.createNode({}));break}case"background":e.background===void 0?r.delete("background"):r.set("background",t.createNode(e.background));break;case"animations":e.animations.length===0?r.delete("animations"):r.set("animations",t.createNode(e.animations));break;case"transition":e.transition===void 0?r.delete("transition"):r.set("transition",t.createNode(e.transition));break;case"advance":e.after===void 0?r.delete("advance_after"):r.set("advance_after",e.after);break;case"reset":{const a=n(!1);if(!a)break;const i=[];for(const d of a.items){const u=String(b(d.key)?"":d.key.value??d.key);if(e.shape!==void 0&&u!==e.shape)continue;const c=d.value;if(!(!b(c)||["textbox","picture","movie","geometry","component"].some(m=>c.has(m))||!E.some(m=>c.has(m)))){for(const m of E)c.delete(m);i.push(u)}}h(i);break}}return!0}export function freeName(t,e){const s=new Set(t),o=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!s.has(o))return o;for(let l=2;;l++){const r=`${o}-${String(l)}`;if(!s.has(r))return r}}const D=new Set(["text","props","crop"]);function _(t){const e=new Map;for(const[s,o]of Object.entries(t??{}))if(D.has(s)&&typeof o=="object"&&!Array.isArray(o))for(const[l,r]of Object.entries(o))e.set(`${s}.${l}`,r);else e.set(s,o);return e}const F=(t,e)=>new Set(M(t,e).map(([s])=>t[s]??""));function L(t,e){const s=[],o=e.id;e.layout!==void 0&&e.layout!==t.layout&&s.push({op:"layout",slide:o,layout:e.layout}),O(t.hidden,e.hidden)||s.push({op:"hidden",slide:o,hidden:e.hidden??!1}),O(t.animations??[],e.animations??[])||s.push({op:"animations",slide:o,animations:e.animations??[]}),O(t.transition,e.transition)||s.push({op:"transition",slide:o,...e.transition?{transition:e.transition}:{}}),t.advance_after!==e.advance_after&&s.push({op:"advance",slide:o,...e.advance_after===void 0?{}:{after:e.advance_after}}),O(t.background,e.background)||s.push({op:"background",slide:o,...e.background?{background:e.background}:{}});const l=t.shapes??{},r=e.shapes??{};for(const n of Object.keys(l))n in r||s.push({op:"unplace",slide:o,shape:n});for(const[n,h]of Object.entries(r)){const a=_(l[n]),i=_(h),d={};for(const c of new Set([...a.keys(),...i.keys()]))O(a.get(c),i.get(c))||(d[c]=i.get(c));Object.keys(d).length>0&&s.push({op:"shape",slide:o,shape:n,set:d});const u=l[n];Object.keys(h).length===0&&(u===void 0||Object.keys(u).length>0)&&s.push({op:"show",slide:o,shape:n,shown:!0})}return s}export function slidesEdits(t,e){const s=[],o=new Map(t.slides.map(n=>[n.id,n])),l=new Set(e.slides.map(n=>n.id));for(const n of t.slides)l.has(n.id)||s.push({op:"remove",slide:n.id});const r=F(t.slides.map(n=>n.id).filter(n=>l.has(n)),e.slides.map(n=>n.id).filter(n=>o.has(n)));return e.slides.forEach((n,h)=>{const a=h===0?null:e.slides[h-1]?.id??null,i=o.get(n.id);if(!i||i.generate!==n.generate){i&&s.push({op:"remove",slide:n.id}),s.push({op:"add",slide:n,after:a});return}r.has(n.id)||s.push({op:"move",slide:n.id,after:a}),s.push(...L(i,n))}),s}
@@ -10,6 +10,7 @@ export * from "./path.js";
10
10
  export * from "./placeholders.js";
11
11
  export * from "./theme.js";
12
12
  export * from "./model.js";
13
+ export * from "./connect.js";
13
14
  export * from "./api.js";
14
15
  export * from "./code.js";
15
16
  export * from "./resolve.js";
@@ -22,4 +23,5 @@ export * from "./components.js";
22
23
  export * from "./check.js";
23
24
  export * from "./capabilities.js";
24
25
  export * from "./measure.js";
26
+ export * from "./fact.js";
25
27
  //# 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"./units.js";export*from"./lang.js";export*from"./enums.js";export*from"./strict.js";export*from"./animation.js";export*from"@allyhub/chart";export*from"./chart-api.js";export*from"./office.js";export*from"./path.js";export*from"./placeholders.js";export*from"./theme.js";export*from"./model.js";export*from"./api.js";export*from"./code.js";export*from"./resolve.js";export*from"./identity.js";export*from"./file.js";export*from"./script.js";export*from"./merge.js";export*from"./stage.js";export*from"./components.js";export*from"./check.js";export*from"./capabilities.js";export*from"./measure.js";
2
+ export*from"./units.js";export*from"./lang.js";export*from"./enums.js";export*from"./strict.js";export*from"./animation.js";export*from"@allyhub/chart";export*from"./chart-api.js";export*from"./office.js";export*from"./path.js";export*from"./placeholders.js";export*from"./theme.js";export*from"./model.js";export*from"./connect.js";export*from"./api.js";export*from"./code.js";export*from"./resolve.js";export*from"./identity.js";export*from"./file.js";export*from"./script.js";export*from"./merge.js";export*from"./stage.js";export*from"./components.js";export*from"./check.js";export*from"./capabilities.js";export*from"./measure.js";export*from"./fact.js";
@@ -1,4 +1,6 @@
1
- import { type DeckLayout, type DeckShapeLayout, type Fact, type FactPlace } from "@allyhub/video-core";
1
+ import type { FactPlace } from "@allyhub/diagnostics";
2
+ import { type DeckLayout, type DeckShapeLayout } from "@allyhub/piece";
3
+ import { type DeckFact } from "./fact.js";
2
4
  export interface DeckFactOptions {
3
5
  /** near-alignment: lines this many points apart or fewer, and more than `aligned`, are reported. */
4
6
  within: number;
@@ -30,5 +32,5 @@ export declare const DECK_FACT_DEFAULTS: DeckFactOptions;
30
32
  export declare function deckFacts(layout: DeckLayout, frame: {
31
33
  width: number;
32
34
  height: number;
33
- }, place: FactPlace, given?: Partial<DeckFactOptions>): Fact[];
35
+ }, place: FactPlace, given?: Partial<DeckFactOptions>): DeckFact[];
34
36
  //# sourceMappingURL=measure.d.ts.map
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{READ_DEFAULTS as W,fact as m,phoneScale as X}from"@allyhub/video-core";import{STANDARD_FONTS as Y}from"./theme.js";export const DECK_FACT_DEFAULTS={within:8,aligned:.5,drift:1,phone:W.phone,slack:1};const E=e=>e[0]+e[2],$=e=>e[1]+e[3],A=e=>Math.max(0,e[2])*Math.max(0,e[3]),w=(e,h=2)=>{const d=10**h;return Math.round(e*d)/d};function N(e,h,d){const M=[],a=(r,k)=>{k>d&&M.push({side:r,px:k})};return a("left",h[0]-e[0]),a("top",h[1]-e[1]),a("right",E(e)-E(h)),a("bottom",$(e)-$(h)),M}const R=(e,h)=>{const d=Math.max(e[0],h[0]),M=Math.max(e[1],h[1]);return[d,M,Math.min(E(e),E(h))-d,Math.min($(e),$(h))-M]},Z=(e,h,d)=>e[0]>=h[0]-d&&e[1]>=h[1]-d&&E(e)<=E(h)+d&&$(e)<=$(h)+d,O={left:e=>e[0],right:E,"centre-x":e=>e[0]+e[2]/2,top:e=>e[1],bottom:$,"centre-y":e=>e[1]+e[3]/2},D=e=>e.opaque||!e.text?.glyphs?e.box:e.text.glyphs,ee=new Set(Object.keys(O)),se=new Set(["left","right","top","bottom"]);function Q(e){if(e.opaque)return ee;if(!e.text?.glyphs)return se;const h=e.text.align??"l";return new Set([h==="ctr"?"centre-x":h==="r"?"right":"left"])}const te=(e,h)=>h.some(d=>new RegExp(`^${d.split("*").map(M=>M.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join(".*")}$`,"su").test(e)),ne=e=>e.box[2]>0||e.box[3]>0;export function deckFacts(e,h,d,M={}){const a={...DECK_FACT_DEFAULTS,...M},r=s=>w(s/e.pxPerPt),k=s=>[r(s[0]),r(s[1]),r(s[2]),r(s[3])],q=s=>s.map(n=>({side:n.side,pt:w(n.px/e.pxPerPt,1)})),H=s=>w(s,3),B=s=>s.opaque||!s.text?.glyphs?"frame":"glyphs",T=(s,n,x)=>n==="left"||n==="right"||n==="centre-x"?{shape:s.name,x:w(r(s.frame[0])+x)}:{shape:s.name,y:w(r(s.frame[1])+x)},g=[],F=[0,0,h.width,h.height],_=new Map,j=new Map,I=new Map;for(const s of e.slides){const n={...d,part:s.slide,t:s.t},x=j.get(s.slide)??{at:n,total:s.steps??1,measured:0,shapes:new Map};j.set(s.slide,x),x.measured++;for(const c of s.shapes){if(c.level!=="slide")continue;const t=x.shapes.get(c.name)??{hidden:0,by:[]};c.hidden===!0&&t.hidden++,x.shapes.set(c.name,t)}const b=s.shapes.filter(c=>ne(c)&&c.hidden!==!0&&(a.levels===void 0||a.levels.includes(c.level))&&!te(c.name,a.except??[]));let L=0,J=0,K=0;for(const[c,t]of b.entries()){t.chart&&g.push(m("chart-data",n,{shape:t.name,...t.chart}));const p=(t.rows??[]).flatMap((l,u)=>l.drawn>l.set+a.slack?[{row:u,set:r(l.set),drawn:r(l.drawn)}]:[]);p.length>0&&g.push(m("table-grown",n,{shape:t.name,set:r(t.frame[3]),drawn:r(t.box[3]),rows:p}));const o=t.text;if(o?.glyphs){K++,L+=o.words,J+=o.lines.length;const l=N(o.glyphs,t.box,a.slack);l.length>0&&g.push(m("text-overflow",n,{shape:t.name,text:o.text,box:k(t.box),glyphs:k(o.glyphs),edges:q(l),lines:o.lines.length,past:o.lines.filter(i=>N(i,t.box,a.slack).length>0).length,...o.scale===void 0?{}:{scale:o.scale}}));const u=N(o.glyphs,F,a.slack);if(u.length>0){const i=A(o.glyphs);g.push(m("text-off-slide",n,{shape:t.name,text:o.text,glyphs:k(o.glyphs),edges:q(u),share:i>0?H(1-A(R(o.glyphs,F))/i):1}))}for(const i of o.type){const v=`${String(i.size)}/${String(i.weight)}`,z=_.get(v)??{size:i.size,weight:i.weight,slides:new Set,shapes:new Set};z.slides.add(s.slide),z.shapes.add(`${s.slide}/${t.name}`),_.set(v,z)}const f=o.type.reduce((i,v)=>i===void 0||v.size<i.size?v:i,void 0);if(f){const i=a.room,v=f.xHeight===void 0?"em":"x",z=i&&(f.xHeight??f.size)*(i.screen*1e3/(h.width/e.pxPerPt));g.push(m("read-size",n,{shape:t.name,text:o.text,size:f.size,...f.xHeight===void 0?{}:{xHeight:f.xHeight},...i&&z!==void 0?{screen:{by:v,mm:w(z,1),arcmin:w(Math.atan(z/1e3/i.distance)*180*60/Math.PI,1)}}:{},phone:w(f.size*e.pxPerPt*X([h.width,h.height],a.phone),1),options:{...i?{room:{...i}}:{},phone:[...a.phone]}}))}}const S=N(t.box,F,a.slack);if(S.length>0){const l=A(t.box);g.push(m("shape-off-slide",n,{shape:t.name,box:k(t.box),edges:q(S),share:l>0?H(1-A(R(t.box,F))/l):1}))}if(t.picture){const[l,u]=t.picture.shown;if(l>0&&u>0){const f=Math.max(t.box[2]/l,t.box[3]/u),i=v=>v/e.pxPerPt/72;g.push(m("picture-resolution",n,{shape:t.name,source:t.picture.source,shown:t.picture.shown,box:k(t.box),scale:w(f),ppi:Math.round(Math.min(l/i(t.box[2]),u/i(t.box[3]))),stretch:w(t.box[2]/l/(t.box[3]/u)-1)}))}}const P=b.slice(c+1).find(l=>l.opaque&&Z(t.box,l.box,a.slack)),y=x.shapes.get(t.name);if(y?y.by.push(P?.name):P&&g.push(m("shape-hidden",n,{shape:t.name,by:P.name})),t.level==="slide"){const l=`${s.layout}\0${t.name}`,u=I.get(l)??new Map,f=[r(t.frame[0]),r(t.frame[1]),r(t.frame[2]),r(t.frame[3])],i=[...u.values()].find(v=>v.frame.every((z,V)=>Math.abs(z-(f[V]??0))<=a.drift));i?i.slides.includes(s.slide)||i.slides.push(s.slide):u.set(f.join(","),{frame:f,slides:[s.slide]}),I.set(l,u)}}for(let c=0;c<b.length;c++)for(let t=c+1;t<b.length;t++){const p=b[c],o=b[t];if(!p||!o)continue;const S=p.level==="slide"||o.level==="slide",P=R(D(p),D(o));if(S&&p.level==="slide"&&o.level==="slide"&&P[2]>a.slack&&P[3]>a.slack){const y=A(P);g.push(m("shape-overlap",n,{a:p.name,b:o.name,area:w(y/e.pxPerPt**2,1),share:H(y/Math.max(1,Math.min(A(D(p)),A(D(o)))))}))}if(S)for(const[y,l]of Object.entries(O)){if(!Q(p).has(y)||!Q(o).has(y))continue;const u=r(l(D(p))),f=r(l(D(o))),i=Math.abs(u-f);i>a.aligned&&i<=a.within&&g.push(m("near-alignment",n,{a:p.name,b:o.name,line:y,gap:w(i),at:{a:u,b:f},by:{a:B(p),b:B(o)},align:p.level==="slide"?T(p,y,f-u):T(o,y,u-f),options:{within:a.within,aligned:a.aligned}}))}}for(const c of b)if(!(c.level!=="slide"||!c.opaque))for(const t of["centre-x","centre-y"]){const p=r(O[t](c.box)),o=r(O[t](F)),S=Math.abs(p-o);S>a.aligned&&S<=a.within&&g.push(m("near-alignment",n,{a:c.name,b:"slide",line:t,gap:w(S),at:{a:p,b:o},by:{a:"frame",b:"frame"},align:T(c,t,o-p),options:{within:a.within,aligned:a.aligned}}))}g.push(m("words-on-slide",n,{words:L,lines:J,texts:K}))}for(const[s,n]of I){if(n.size<2)continue;const[x="",b=""]=s.split("\0");g.push(m("placement-drift",d,{layout:x,shape:b,places:[...n.values()],options:{drift:a.drift}}))}if(e.fonts&&e.fonts.length>0){const s=new Set(M.standard??Y);g.push(m("deck-fonts",d,{fonts:e.fonts.map(n=>({...n,standard:s.has(n.name)})),options:{standard:[...s]}}))}const C=[..._.values()].map(s=>({size:s.size,weight:s.weight,slides:s.slides.size,shapes:s.shapes.size})).sort((s,n)=>s.size-n.size||s.weight-n.weight),U=C[0];U&&g.push(m("type-in-use",d,{type:C,smallest:U.size}));for(const s of j.values())for(const[n,x]of s.shapes){const[b]=x.by;b!==void 0&&x.by.every(L=>L!==void 0)&&g.push(m("shape-hidden",s.at,{shape:n,by:b})),s.measured>=s.total&&x.hidden===s.measured&&g.push(m("shape-hidden",s.at,{shape:n,never:!0}))}const G=new Set;return g.filter(s=>{const n=JSON.stringify([s.kind,s.part,s.data]);return G.has(n)?!1:(G.add(n),!0)})}
2
+ import{READ_DEFAULTS as Y,phoneScale as Z}from"@allyhub/piece";import{deckFact as m}from"./fact.js";import{STANDARD_FONTS as ee}from"./theme.js";export const DECK_FACT_DEFAULTS={within:8,aligned:.5,drift:1,phone:Y.phone,slack:1};const k=e=>e[0]+e[2],P=e=>e[1]+e[3],F=e=>Math.max(0,e[2])*Math.max(0,e[3]),M=(e,n=2)=>{const c=10**n;return Math.round(e*c)/c};function te(e,n){const[c,x]=e;if(c>=n[0]&&c<=k(n)&&x>=n[1]&&x<=P(n))return Math.min(c-n[0],k(n)-c,x-n[1],P(n)-x);const r=Math.max(n[0]-c,0,c-k(n)),z=Math.max(n[1]-x,0,x-P(n));return Math.hypot(r,z)}function O(e,n,c){const x=[],h=(r,z)=>{z>c&&x.push({side:r,px:z})};return h("left",n[0]-e[0]),h("top",n[1]-e[1]),h("right",k(e)-k(n)),h("bottom",P(e)-P(n)),x}const B=(e,n)=>{const c=Math.max(e[0],n[0]),x=Math.max(e[1],n[1]);return[c,x,Math.min(k(e),k(n))-c,Math.min(P(e),P(n))-x]},se=(e,n,c)=>e[0]>=n[0]-c&&e[1]>=n[1]-c&&k(e)<=k(n)+c&&P(e)<=P(n)+c,_={left:e=>e[0],right:k,"centre-x":e=>e[0]+e[2]/2,top:e=>e[1],bottom:P,"centre-y":e=>e[1]+e[3]/2},L=e=>e.opaque||!e.text?.glyphs?e.box:e.text.glyphs,ne=new Set(Object.keys(_)),oe=new Set,C=e=>e.kind==="line"||e.ends!==void 0,ie=new Set(["left","right","top","bottom"]);function W(e){if(C(e))return oe;if(e.opaque)return ne;if(!e.text?.glyphs)return ie;const n=e.text.align??"l";return new Set([n==="ctr"?"centre-x":n==="r"?"right":"left"])}const ae=(e,n)=>n.some(c=>new RegExp(`^${c.split("*").map(x=>x.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join(".*")}$`,"su").test(e)),he=e=>e.box[2]>0||e.box[3]>0;export function deckFacts(e,n,c,x={}){const h={...DECK_FACT_DEFAULTS,...x},r=s=>M(s/e.pxPerPt),z=s=>[r(s[0]),r(s[1]),r(s[2]),r(s[3])],q=s=>s.map(i=>({side:i.side,pt:M(i.px/e.pxPerPt,1)})),H=s=>M(s,3),U=s=>s.opaque||!s.text?.glyphs?"frame":"glyphs",T=(s,i,w)=>i==="left"||i==="right"||i==="centre-x"?{shape:s.name,x:M(r(s.frame[0])+w)}:{shape:s.name,y:M(r(s.frame[1])+w)},f=[],N=[0,0,n.width,n.height],j=new Map,I=new Map,R=new Map;for(const s of e.slides){const i={...c,part:s.slide,t:s.t},w=I.get(s.slide)??{at:i,total:s.steps??1,measured:0,shapes:new Map};I.set(s.slide,w),w.measured++;for(const d of s.shapes){if(d.level!=="slide")continue;const t=w.shapes.get(d.name)??{hidden:0,by:[]};d.hidden===!0&&t.hidden++,w.shapes.set(d.name,t)}const y=s.shapes.filter(d=>he(d)&&d.hidden!==!0&&(h.levels===void 0||h.levels.includes(d.level))&&!ae(d.name,h.except??[]));let A=0,Q=0,V=0;const X=y.filter(d=>d.ends===void 0);for(const d of y)d.ends&&f.push(m("line-ends",i,{shape:d.name,ends:d.ends.map(t=>{let l;for(const o of X){const v=te(t.at,o.box);(!l||v<l.by)&&(l={name:o.name,by:v})}return{at:[r(t.at[0]),r(t.at[1])],head:t.head,...t.glued===void 0?{}:{glued:t.glued},...l?{near:l.name,by:r(l.by)}:{}}})}));for(const[d,t]of y.entries()){t.chart&&f.push(m("chart-data",i,{shape:t.name,...t.chart}));const l=(t.rows??[]).flatMap((a,g)=>a.drawn>a.set+h.slack?[{row:g,set:r(a.set),drawn:r(a.drawn)}]:[]);l.length>0&&f.push(m("table-grown",i,{shape:t.name,set:r(t.frame[3]),drawn:r(t.box[3]),rows:l}));const o=t.text;if(o?.glyphs){V++,A+=o.words,Q+=o.lines.length;const a=o.own??{box:t.box,glyphs:o.glyphs,lines:o.lines},g=a.glyphs?O(a.glyphs,a.box,h.slack):[];g.length>0&&a.glyphs&&f.push(m("text-overflow",i,{shape:t.name,text:o.text,box:z(a.box),glyphs:z(a.glyphs),edges:q(g),lines:a.lines.length,past:a.lines.filter(p=>O(p,a.box,h.slack).length>0).length,...o.scale===void 0?{}:{scale:o.scale}}));const b=O(o.glyphs,N,h.slack);if(b.length>0){const p=F(o.glyphs);f.push(m("text-off-slide",i,{shape:t.name,text:o.text,glyphs:z(o.glyphs),edges:q(b),share:p>0?H(1-F(B(o.glyphs,N))/p):1}))}for(const p of o.type){const E=`${String(p.size)}/${String(p.weight)}`,$=j.get(E)??{size:p.size,weight:p.weight,slides:new Set,shapes:new Set};$.slides.add(s.slide),$.shapes.add(`${s.slide}/${t.name}`),j.set(E,$)}const u=o.type.reduce((p,E)=>p===void 0||E.size<p.size?E:p,void 0);if(u){const p=h.room,E=u.xHeight===void 0?"em":"x",$=p&&(u.xHeight??u.size)*(p.screen*1e3/(n.width/e.pxPerPt));f.push(m("read-size",i,{shape:t.name,text:o.text,size:u.size,...u.xHeight===void 0?{}:{xHeight:u.xHeight},...p&&$!==void 0?{screen:{by:E,mm:M($,1),arcmin:M(Math.atan($/1e3/p.distance)*180*60/Math.PI,1)}}:{},phone:M(u.size*e.pxPerPt*Z([n.width,n.height],h.phone),1),options:{...p?{room:{...p}}:{},phone:[...h.phone]}}))}}const v=O(t.box,N,h.slack);if(v.length>0){const a=F(t.box);f.push(m("shape-off-slide",i,{shape:t.name,box:z(t.box),edges:q(v),share:a>0?H(1-F(B(t.box,N))/a):1}))}if(t.picture){const[a,g]=t.picture.shown;if(a>0&&g>0){const b=Math.max(t.box[2]/a,t.box[3]/g),u=p=>p/e.pxPerPt/72;f.push(m("picture-resolution",i,{shape:t.name,source:t.picture.source,shown:t.picture.shown,box:z(t.box),scale:M(b),ppi:Math.round(Math.min(a/u(t.box[2]),g/u(t.box[3]))),stretch:M(t.box[2]/a/(t.box[3]/g)-1)}))}}const D=y.slice(d+1).find(a=>a.opaque&&se(t.box,a.box,h.slack)),S=w.shapes.get(t.name);if(S?S.by.push(D?.name):D&&f.push(m("shape-hidden",i,{shape:t.name,by:D.name})),t.level==="slide"){const a=`${s.layout}\0${t.name}`,g=R.get(a)??new Map,b=[r(t.frame[0]),r(t.frame[1]),r(t.frame[2]),r(t.frame[3])],u=[...g.values()].find(p=>p.frame.every((E,$)=>Math.abs(E-(b[$]??0))<=h.drift));u?u.slides.includes(s.slide)||u.slides.push(s.slide):g.set(b.join(","),{frame:b,slides:[s.slide]}),R.set(a,g)}}for(let d=0;d<y.length;d++)for(let t=d+1;t<y.length;t++){const l=y[d],o=y[t];if(!l||!o)continue;const v=l.level==="slide"||o.level==="slide",D=B(L(l),L(o));if(v&&!C(l)&&!C(o)&&l.level==="slide"&&o.level==="slide"&&D[2]>h.slack&&D[3]>h.slack){const S=F(D);f.push(m("shape-overlap",i,{a:l.name,b:o.name,area:M(S/e.pxPerPt**2,1),share:H(S/Math.max(1,Math.min(F(L(l)),F(L(o)))))}))}if(v)for(const[S,a]of Object.entries(_)){if(!W(l).has(S)||!W(o).has(S))continue;const g=r(a(L(l))),b=r(a(L(o))),u=Math.abs(g-b);u>h.aligned&&u<=h.within&&f.push(m("near-alignment",i,{a:l.name,b:o.name,line:S,gap:M(u),at:{a:g,b},by:{a:U(l),b:U(o)},align:l.level==="slide"?T(l,S,b-g):T(o,S,g-b),options:{within:h.within,aligned:h.aligned}}))}}for(const d of y)if(!(d.level!=="slide"||!d.opaque))for(const t of["centre-x","centre-y"]){const l=r(_[t](d.box)),o=r(_[t](N)),v=Math.abs(l-o);v>h.aligned&&v<=h.within&&f.push(m("near-alignment",i,{a:d.name,b:"slide",line:t,gap:M(v),at:{a:l,b:o},by:{a:"frame",b:"frame"},align:T(d,t,o-l),options:{within:h.within,aligned:h.aligned}}))}f.push(m("words-on-slide",i,{words:A,lines:Q,texts:V}))}for(const[s,i]of R){if(i.size<2)continue;const[w="",y=""]=s.split("\0");f.push(m("placement-drift",c,{layout:w,shape:y,places:[...i.values()],options:{drift:h.drift}}))}if(e.fonts&&e.fonts.length>0){const s=new Set(x.standard??ee);f.push(m("deck-fonts",c,{fonts:e.fonts.map(i=>({...i,standard:s.has(i.name)})),options:{standard:[...s]}}))}const G=[...j.values()].map(s=>({size:s.size,weight:s.weight,slides:s.slides.size,shapes:s.shapes.size})).sort((s,i)=>s.size-i.size||s.weight-i.weight),J=G[0];J&&f.push(m("type-in-use",c,{type:G,smallest:J.size}));for(const s of I.values())for(const[i,w]of s.shapes){const[y]=w.by;y!==void 0&&w.by.every(A=>A!==void 0)&&f.push(m("shape-hidden",s.at,{shape:i,by:y})),s.measured>=s.total&&w.hidden===s.measured&&f.push(m("shape-hidden",s.at,{shape:i,never:!0}))}const K=new Set;return f.filter(s=>{const i=JSON.stringify([s.kind,s.part,s.data]);return K.has(i)?!1:(K.add(i),!0)})}
@@ -1,5 +1,5 @@
1
1
  import { type ScriptFile, type SlidesFile } from "@allyhub/formats";
2
- /** Where a person's change met another hand's in slides.yaml. */
2
+ /** Where a person's change met another hand's in the slides file. */
3
3
  export interface SlidesConflict {
4
4
  slide: string;
5
5
  shape?: string;
@@ -28,9 +28,9 @@ export interface DeckScriptConflict {
28
28
  kept: "mine" | "theirs";
29
29
  }
30
30
  /**
31
- * A person's slides.yaml (`mine`, what the editor holds, made from
31
+ * A person's slides file (`mine`, what the editor holds, made from
32
32
  * `base`) merged with the file as another hand left it (`theirs`), written
33
- * over theirs. Undefined when theirs is not a slides.yaml a merge can
33
+ * over theirs. Undefined when theirs is not a slides file a merge can
34
34
  * read: the person mends it, or the other hand does.
35
35
  */
36
36
  export declare function mergeSlides(base: string, mine: SlidesFile, theirs: string): {
@@ -40,7 +40,7 @@ export declare function mergeSlides(base: string, mine: SlidesFile, theirs: stri
40
40
  /**
41
41
  * A person's script (`mine`, made from `base`) merged with the script as
42
42
  * another hand left it (`theirs`): its slides' rows, as mergeSlides
43
- * merges slides.yaml. Undefined when theirs is not a script.
43
+ * merges the slides file. Undefined when theirs is not a script.
44
44
  */
45
45
  export declare function mergeDeckScript(base: string, mine: ScriptFile, theirs: string): {
46
46
  text: string;
@@ -49,7 +49,7 @@ export declare function mergeDeckScript(base: string, mine: ScriptFile, theirs:
49
49
  /**
50
50
  * An id for a slide a person adds or duplicates in the editor: its stem
51
51
  * and four random letters (`slide-k3f9`), none a slide has yet. The
52
- * agent writes slides.yaml while the person edits it, so an id counted up
52
+ * agent writes the slides file while the person edits it, so an id counted up
53
53
  * from what the editor sees (`slide-2`) could be one the agent is adding
54
54
  * too; one of 32⁴ (about a million) is not, as PowerPoint gives a new
55
55
  * slide an id no other slide has (`p:sldId/@id`).
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readDataFile as T}from"@allyhub/formats";import{editSlidesFile as I,readSlidesFile as v,slidesEdits as O}from"./file.js";import{deckScriptEdits as _,editDeckScript as C,readScript as A}from"./script.js";import{commonPairs as $,isRecord as M,sameValue as y,valueKey as F}from"./values.js";const N="order";function E(e,n,o,t,i,c){if(y(t,i))return t;if(y(o,t))return i;if(y(o,i))return t;if(t===void 0||i===void 0)return c.push({path:n,mine:t,theirs:i,kept:t===void 0?"theirs":"mine"}),t??i;if(M(t)&&M(i)&&(o===void 0||M(o))&&!e.whole(n)){const s={};for(const d of new Set([...Object.keys(i),...Object.keys(t)])){const f=E(e,[...n,d],o?.[d],t[d],i[d],c);f!==void 0&&(s[d]=f)}return s}if(Array.isArray(t)&&Array.isArray(i)&&(o===void 0||Array.isArray(o))){const s=e.list(n),d=o??[];if(s==="lines")return B(n,d,t,i,c);if(s)return z(e,n,d,t,i,s,c)}return c.push({path:n,mine:t,theirs:i,kept:"mine"}),t}function R(e,n){const o=[],t=new Map,i=new Map;for(const c of e){const s=n(c),d=(i.get(s)??0)+1;i.set(s,d);const f=d===1?s:`${s}#${String(d)}`;o.push(f),t.set(f,c)}return{order:o,byKey:t}}function K(e,n){const o=new Set(n),t=new Set(e),i=e.filter(s=>o.has(s)),c=n.filter(s=>t.has(s));return new Set($(i,c).map(([s])=>i[s]??""))}function z(e,n,o,t,i,c,s){const d=R(o,c),f=R(t,c),a=R(i,c),g=new Map;for(const r of new Set([...a.order,...f.order,...d.order])){const m=E(e,[...n,r],d.byKey.get(r),f.byKey.get(r),a.byKey.get(r),s);m!==void 0&&g.set(r,m)}const S=new Set(d.order),u=K(d.order,f.order),l=K(d.order,a.order),p=a.order.filter(r=>g.has(r));return f.order.forEach((r,m)=>{if(!g.has(r))return;const h=p.indexOf(r);if(h>=0&&S.has(r)&&u.has(r))return;h>=0&&p.splice(h,1);let x=0;for(let w=m-1;w>=0;w--){const k=p.indexOf(f.order[w]??"");if(k>=0){x=k+1;break}}if(p.splice(x,0,r),S.has(r)&&h>=0&&!l.has(r)){const w=(k,L)=>k[k.indexOf(L)-1]??null;w(a.order,r)!==w(f.order,r)&&s.push({path:[...n,r,N],mine:{after:w(f.order,r)},theirs:{after:w(a.order,r)},kept:"mine"})}}),p.map(r=>g.get(r))}function B(e,n,o,t,i){const c=u=>u.map(F),s=new Map($(c(n),c(o))),d=new Map($(c(n),c(t))),f=[];let a=0,g=0,S=0;for(;;){let u=a;for(;u<n.length&&!(s.has(u)&&d.has(u));)u++;const l=u<n.length?s.get(u)??o.length:o.length,p=u<n.length?d.get(u)??t.length:t.length;if(u===a&&l===g&&p===S){if(u>=n.length)break;f.push(o[g]),a++,g++,S++;continue}const r=n.slice(a,u),m=o.slice(g,l),h=t.slice(S,p);y(r,m)?f.push(...h):y(r,h)||y(m,h)?f.push(...m):r.length===0?f.push(...m,...h):(i.push({path:e,mine:m,theirs:h,kept:"mine"}),f.push(...m)),a=u,g=l,S=p}return f}function b(e,n,o){let t=[...e],i=[...n],c=[...o];const s=d=>({...d,id:""});for(const d of["theirs","mine"]){const f=d==="theirs"?c:i,a=d==="theirs"?i:c,g=new Set(f.map(l=>l.id)),S=new Set(t.map(l=>l.id)),u=f.filter(l=>!S.has(l.id));for(const l of t.filter(p=>!g.has(p.id))){const p=u.filter(h=>y(s(h),s(l))),[r]=p;if(p.length!==1||!r||!a.some(h=>h.id===l.id)||a.some(h=>h.id===r.id))continue;const m=h=>h.map(x=>x.id===l.id?{...x,id:r.id}:x);t=m(t),d==="theirs"?i=m(i):c=m(c)}}return[t,i,c]}const P=e=>{const n=e;return`${n.shape??""}${n.paragraph===void 0?"":`[${String(n.paragraph)}]`}:${n.effect??""}`},U={list(e){if(e.length===1)return n=>M(n)?String(n.id):"";if(e.length===3&&e[2]==="animations")return P;if(e.length===3&&e[2]==="hidden")return n=>String(n)},whole:e=>e.length===5&&e[4]==="path"||e.length===3&&e[2]==="background"},q={list(e){if(e.length===1)return n=>M(n)?String(n.id):"";if(e.length>=4&&e[2]==="text")return"lines"},whole:()=>!1},j=e=>({...e.mine===void 0?{}:{mine:e.mine},...e.theirs===void 0?{}:{theirs:e.theirs},kept:e.kept});function V(e){const[,n="",...o]=e.path,t=o[0]==="shapes"&&o.length>=2,i=(t?o.slice(2):o).join(".");return{slide:n,...t&&o[1]!==void 0?{shape:o[1]}:{},...i===""?{}:{field:i},...j(e)}}function Z(e){const[,n="",...o]=e.path,t=o[0]==="text"&&o.length>=2,i=(t?o.slice(2):o).join(".");return{slide:n,...t&&o[1]!==void 0?{shape:o[1]}:{},...i===""?{}:{field:i},...j(e)}}export function mergeSlides(e,n,o){const t=v(e).file??{slides:[]},i=v(o).file;if(!i)return;const[c,s,d]=b(t.slides,n.slides,i.slides),f=[],a=E(U,["slides"],c,s,d,f)??[],g=T("slides",{slides:a});if(!g.ok)for(const u of new Set(g.problems.flatMap(l=>{const[p,r]=l.path.split(".");return p==="slides"&&r!==void 0?[Number(r)]:[]}))){const l=a[u]?.id,p=s.find(r=>r.id===l)??d.find(r=>r.id===l);l===void 0||!p||(a[u]=p,f.push({path:["slides",l],mine:s.find(r=>r.id===l),theirs:d.find(r=>r.id===l),kept:s.some(r=>r.id===l)?"mine":"theirs"}))}return{text:O(i,{slides:a}).reduce((u,l)=>I(u,l),o),conflicts:f.map(V)}}export function mergeDeckScript(e,n,o){const t=A(e)??{parts:[],slides:[]},i=A(o);if(!i)return;const[c,s,d]=b(t.slides,n.slides,i.slides),f=[],a=E(q,["slides"],c,s,d,f)??[];return{text:_(i,{...i,slides:a}).reduce((S,u)=>C(S,u),o),conflicts:f.map(Z)}}const D="abcdefghijkmnpqrstuvwxyz23456789";export function newSlideId(e,n="slide",o=Math.random){const t=new Set(e),i=n.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";for(;;){let c="";for(let d=0;d<4;d++)c+=D[Math.floor(o()*D.length)]??"a";const s=`${i}-${c}`;if(!t.has(s))return s}}
2
+ import{readDataFile as T}from"@allyhub/formats";import{editSlidesFile as I,readSlidesFile as b,slidesEdits as O}from"./file.js";import{deckScriptEdits as _,editDeckScript as C,readScript as v}from"./script.js";import{commonPairs as $,isRecord as M,sameValue as y,valueKey as F}from"./values.js";const N="order";function E(e,n,o,t,i,c){if(y(t,i))return t;if(y(o,t))return i;if(y(o,i))return t;if(t===void 0||i===void 0)return c.push({path:n,mine:t,theirs:i,kept:t===void 0?"theirs":"mine"}),t??i;if(M(t)&&M(i)&&(o===void 0||M(o))&&!e.whole(n)){const s={};for(const d of new Set([...Object.keys(i),...Object.keys(t)])){const f=E(e,[...n,d],o?.[d],t[d],i[d],c);f!==void 0&&(s[d]=f)}return s}if(Array.isArray(t)&&Array.isArray(i)&&(o===void 0||Array.isArray(o))){const s=e.list(n),d=o??[];if(s==="lines")return B(n,d,t,i,c);if(s)return z(e,n,d,t,i,s,c)}return c.push({path:n,mine:t,theirs:i,kept:"mine"}),t}function R(e,n){const o=[],t=new Map,i=new Map;for(const c of e){const s=n(c),d=(i.get(s)??0)+1;i.set(s,d);const f=d===1?s:`${s}#${String(d)}`;o.push(f),t.set(f,c)}return{order:o,byKey:t}}function A(e,n){const o=new Set(n),t=new Set(e),i=e.filter(s=>o.has(s)),c=n.filter(s=>t.has(s));return new Set($(i,c).map(([s])=>i[s]??""))}function z(e,n,o,t,i,c,s){const d=R(o,c),f=R(t,c),a=R(i,c),g=new Map;for(const r of new Set([...a.order,...f.order,...d.order])){const m=E(e,[...n,r],d.byKey.get(r),f.byKey.get(r),a.byKey.get(r),s);m!==void 0&&g.set(r,m)}const S=new Set(d.order),u=A(d.order,f.order),l=A(d.order,a.order),p=a.order.filter(r=>g.has(r));return f.order.forEach((r,m)=>{if(!g.has(r))return;const h=p.indexOf(r);if(h>=0&&S.has(r)&&u.has(r))return;h>=0&&p.splice(h,1);let x=0;for(let w=m-1;w>=0;w--){const k=p.indexOf(f.order[w]??"");if(k>=0){x=k+1;break}}if(p.splice(x,0,r),S.has(r)&&h>=0&&!l.has(r)){const w=(k,L)=>k[k.indexOf(L)-1]??null;w(a.order,r)!==w(f.order,r)&&s.push({path:[...n,r,N],mine:{after:w(f.order,r)},theirs:{after:w(a.order,r)},kept:"mine"})}}),p.map(r=>g.get(r))}function B(e,n,o,t,i){const c=u=>u.map(F),s=new Map($(c(n),c(o))),d=new Map($(c(n),c(t))),f=[];let a=0,g=0,S=0;for(;;){let u=a;for(;u<n.length&&!(s.has(u)&&d.has(u));)u++;const l=u<n.length?s.get(u)??o.length:o.length,p=u<n.length?d.get(u)??t.length:t.length;if(u===a&&l===g&&p===S){if(u>=n.length)break;f.push(o[g]),a++,g++,S++;continue}const r=n.slice(a,u),m=o.slice(g,l),h=t.slice(S,p);y(r,m)?f.push(...h):y(r,h)||y(m,h)?f.push(...m):r.length===0?f.push(...m,...h):(i.push({path:e,mine:m,theirs:h,kept:"mine"}),f.push(...m)),a=u,g=l,S=p}return f}function K(e,n,o){let t=[...e],i=[...n],c=[...o];const s=d=>({...d,id:""});for(const d of["theirs","mine"]){const f=d==="theirs"?c:i,a=d==="theirs"?i:c,g=new Set(f.map(l=>l.id)),S=new Set(t.map(l=>l.id)),u=f.filter(l=>!S.has(l.id));for(const l of t.filter(p=>!g.has(p.id))){const p=u.filter(h=>y(s(h),s(l))),[r]=p;if(p.length!==1||!r||!a.some(h=>h.id===l.id)||a.some(h=>h.id===r.id))continue;const m=h=>h.map(x=>x.id===l.id?{...x,id:r.id}:x);t=m(t),d==="theirs"?i=m(i):c=m(c)}}return[t,i,c]}const P=e=>{const n=e;return`${n.shape??""}${n.paragraph===void 0?"":`[${String(n.paragraph)}]`}:${n.effect??""}`},U={list(e){if(e.length===1)return n=>M(n)?String(n.id):"";if(e.length===3&&e[2]==="animations")return P;if(e.length===3&&e[2]==="hidden")return n=>String(n)},whole:e=>e.length===5&&e[4]==="path"||e.length===3&&e[2]==="background"},q={list(e){if(e.length===1)return n=>M(n)?String(n.id):"";if(e.length>=4&&e[2]==="text")return"lines"},whole:()=>!1},j=e=>({...e.mine===void 0?{}:{mine:e.mine},...e.theirs===void 0?{}:{theirs:e.theirs},kept:e.kept});function V(e){const[,n="",...o]=e.path,t=o[0]==="shapes"&&o.length>=2,i=(t?o.slice(2):o).join(".");return{slide:n,...t&&o[1]!==void 0?{shape:o[1]}:{},...i===""?{}:{field:i},...j(e)}}function Z(e){const[,n="",...o]=e.path,t=o[0]==="text"&&o.length>=2,i=(t?o.slice(2):o).join(".");return{slide:n,...t&&o[1]!==void 0?{shape:o[1]}:{},...i===""?{}:{field:i},...j(e)}}export function mergeSlides(e,n,o){const t=b(e).file??{slides:[]},i=b(o).file;if(!i)return;const[c,s,d]=K(t.slides,n.slides,i.slides),f=[],a=E(U,["slides"],c,s,d,f)??[],g=T("slides",{slides:a});if(!g.ok)for(const u of new Set(g.problems.flatMap(l=>{const[p,r]=l.path.split(".");return p==="slides"&&r!==void 0?[Number(r)]:[]}))){const l=a[u]?.id,p=s.find(r=>r.id===l)??d.find(r=>r.id===l);l===void 0||!p||(a[u]=p,f.push({path:["slides",l],mine:s.find(r=>r.id===l),theirs:d.find(r=>r.id===l),kept:s.some(r=>r.id===l)?"mine":"theirs"}))}return{text:O(i,{slides:a}).reduce((u,l)=>I(u,l),o),conflicts:f.map(V)}}export function mergeDeckScript(e,n,o){const t=v(e)??{parts:[],slides:[],boards:[]},i=v(o);if(!i)return;const[c,s,d]=K(t.slides,n.slides,i.slides),f=[],a=E(q,["slides"],c,s,d,f)??[];return{text:_(i,{...i,slides:a}).reduce((S,u)=>C(S,u),o),conflicts:f.map(Z)}}const D="abcdefghijkmnpqrstuvwxyz23456789";export function newSlideId(e,n="slide",o=Math.random){const t=new Set(e),i=n.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";for(;;){let c="";for(let d=0;d<4;d++)c+=D[Math.floor(o()*D.length)]??"a";const s=`${i}-${c}`;if(!t.has(s))return s}}
@@ -1,6 +1,6 @@
1
- import type { AnimationFile, LineDash, Numbering, TransitionFile, LineEnd, ShapeGeometry, TextAlign } from "@allyhub/formats";
1
+ import type { AnimationFile, LineDash, Numbering, TransitionFile, LineEnd, LineEndSize, ShapeGeometry, TextAlign } from "@allyhub/formats";
2
2
  import type { ChartDef, Color } from "@allyhub/chart";
3
- import type { ComponentFrame, FramedComponent, PropType } from "@allyhub/video-core";
3
+ import type { ComponentFrame, FramedComponent, PropType } from "@allyhub/piece";
4
4
  import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
5
5
  import type { ThemeInput } from "./theme.js";
6
6
  import type { Length } from "./units.js";
@@ -161,6 +161,16 @@ export interface ShadowDef {
161
161
  angle: number;
162
162
  transparency: number;
163
163
  }
164
+ /**
165
+ * A connector's end glued to a shape (`a:stCxn`, `a:endCxn`): the shape by
166
+ * its name among its part's shapes, and the connection site of its
167
+ * geometry the end sits on (a rectangle's 0 top, 1 left, 2 bottom, 3
168
+ * right). The end follows the shape where it moves.
169
+ */
170
+ export interface Glue {
171
+ shape: string;
172
+ site: number;
173
+ }
164
174
  /** A shape as a master, a layout or a generator's code makes it. */
165
175
  export interface ShapeDef {
166
176
  name: string;
@@ -172,6 +182,11 @@ export interface ShapeDef {
172
182
  h?: boolean;
173
183
  v?: boolean;
174
184
  };
185
+ /** A connector's ends glued to shapes (python-pptx's begin_connect, end_connect). */
186
+ connect?: {
187
+ begin?: Glue;
188
+ end?: Glue;
189
+ };
175
190
  /** Degrees clockwise about its centre, 0 up to 360 (`a:xfrm` rot). */
176
191
  rotation?: number;
177
192
  placeholder?: {
@@ -184,13 +199,17 @@ export interface ShapeDef {
184
199
  fill_transparency?: number;
185
200
  /** A gradient in place of its fill. */
186
201
  gradient?: GradientDef;
187
- shadow?: ShadowDef;
202
+ /** null: no effects of its own, an empty `a:effectLst` (python-pptx's `shadow.inherit = False`). */
203
+ shadow?: ShadowDef | null;
188
204
  line?: Color | null;
189
205
  line_width?: Length;
190
206
  line_dash?: LineDash;
191
207
  /** What the end of its line where it starts has (`a:headEnd`), and where it ends (`a:tailEnd`). */
192
208
  line_begin?: LineEnd;
193
209
  line_end?: LineEnd;
210
+ /** How large each end's arrowhead is (`a:headEnd/@w`, `@len`; `a:tailEnd`); what it leaves out is medium. */
211
+ line_begin_size?: LineEndSize;
212
+ line_end_size?: LineEndSize;
194
213
  geometry?: ShapeGeometry;
195
214
  /** A freeform's outline (`a:custGeom`), in place of a geometry. */
196
215
  path?: FreeformPath;
@@ -208,9 +227,11 @@ export interface ShapeDef {
208
227
  base: string;
209
228
  poster?: number;
210
229
  };
230
+ /** A component: its name, its props, and how long it moves (seconds; SLIDE_SECONDS when absent). */
211
231
  component?: {
212
232
  name: string;
213
233
  props: Record<string, unknown>;
234
+ dur?: number;
214
235
  };
215
236
  }
216
237
  export interface LayoutDef {
@@ -265,7 +286,7 @@ export interface GeneratorDef {
265
286
  name: string;
266
287
  make: (ctx: GeneratorContext) => GeneratedSlideDef[];
267
288
  }
268
- /** A deck's definition: what slides.ts makes. */
289
+ /** A deck's definition: what the deck's module makes. */
269
290
  export interface DeckDef {
270
291
  slide_width: Length;
271
292
  slide_height: Length;
@@ -46,7 +46,7 @@ export declare const DRAWN_TEXTBOX_FRAME: {
46
46
  * and outlined in accent 1 (the theme's first line, 0.5 pt), its text in
47
47
  * light 1 and in its middle. Its one empty paragraph is centred: text set
48
48
  * with `text` replaces it and is not (python-pptx's, and PowerPoint draws
49
- * it so); a shape slides.yaml makes centres each of its paragraphs, as
49
+ * it so); a shape the slides file makes centres each of its paragraphs, as
50
50
  * PowerPoint's Shapes do.
51
51
  */
52
52
  export declare const AUTOSHAPE_STYLE: {
@@ -1,6 +1,6 @@
1
1
  import type { PathStep } from "./model.js";
2
2
  /** A path's steps; undefined when it says anything but those four. */
3
3
  export declare function pathSteps(d: string): PathStep[] | undefined;
4
- /** Steps as slides.yaml writes them. */
4
+ /** Steps as the slides file writes them. */
5
5
  export declare const pathText: (steps: readonly PathStep[]) => string;
6
6
  //# sourceMappingURL=path.d.ts.map