@allyhub/sdk 0.5.0 → 0.7.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 (262) hide show
  1. package/dist/define.d.ts +4 -0
  2. package/dist/define.js +1 -1
  3. package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +1 -1
  4. package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
  5. package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +4 -0
  6. package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
  7. package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
  8. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
  9. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
  10. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
  11. package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
  12. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
  13. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
  14. package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
  15. package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
  16. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +248 -18
  17. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
  18. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1114 -91
  19. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
  20. package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
  21. package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
  22. package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +4 -0
  23. package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
  24. package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
  25. package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  26. package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
  27. package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
  28. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +625 -30
  29. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
  30. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
  31. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
  32. package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
  33. package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
  34. package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
  35. package/dist/node_modules/@allyhub-next/ooxml/LICENSE +241 -0
  36. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
  37. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
  38. package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
  39. package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
  40. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
  41. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
  42. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
  43. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
  44. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
  45. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
  46. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
  47. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
  48. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
  49. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
  50. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
  51. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
  52. package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
  53. package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
  54. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
  55. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
  56. package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
  57. package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
  58. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
  59. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
  60. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
  61. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
  62. package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
  63. package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
  64. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
  65. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
  66. package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
  67. package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
  68. package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
  69. package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
  70. package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  71. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
  72. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
  73. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
  74. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
  75. package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +89 -5
  76. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
  77. package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
  78. package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
  79. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  80. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +23 -0
  81. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
  82. package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
  83. package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
  84. package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
  85. package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
  86. package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
  87. package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
  88. package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
  89. package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
  90. package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
  91. package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
  92. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +377 -0
  93. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
  94. package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
  95. package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
  96. package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
  97. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
  98. package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
  99. package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
  100. package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
  101. package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
  102. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +1 -1
  103. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +1 -0
  104. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +1 -1
  105. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
  106. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
  107. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +40 -1
  108. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +1 -1
  109. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
  110. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
  111. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
  112. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
  113. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
  114. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
  115. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
  116. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
  117. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
  118. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
  119. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
  120. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
  121. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
  122. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
  123. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
  124. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
  125. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
  126. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
  127. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
  128. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
  129. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
  130. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
  131. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
  132. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
  133. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
  134. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
  135. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
  136. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
  137. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
  138. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
  139. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
  140. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
  141. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
  142. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
  143. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
  144. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
  145. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
  146. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
  147. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
  148. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
  149. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
  150. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
  151. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
  152. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
  153. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
  154. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
  155. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
  156. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
  157. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
  158. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
  159. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
  160. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
  161. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
  162. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
  163. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
  164. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
  165. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
  166. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
  167. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
  168. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
  169. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
  170. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
  171. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
  172. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +12 -1
  173. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
  174. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
  175. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
  176. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
  177. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
  178. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +6 -1
  179. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
  180. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +44 -2
  181. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
  182. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
  183. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
  184. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
  185. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
  186. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
  187. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
  188. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
  189. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
  190. package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
  191. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
  192. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +121 -44
  193. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
  194. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
  195. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +50 -13
  196. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
  197. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +1 -1
  198. package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
  199. package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
  200. package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
  201. package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
  202. package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
  203. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +188 -5
  204. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
  205. package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
  206. package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
  207. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
  208. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
  209. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -0
  210. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
  211. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
  212. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
  213. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
  214. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
  215. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
  216. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +38 -4
  217. package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +27 -1
  218. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
  219. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +26 -5
  220. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
  221. package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
  222. package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
  223. package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
  224. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
  225. package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
  226. package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
  227. package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
  228. package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
  229. package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
  230. package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
  231. package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
  232. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
  233. package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
  234. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
  235. package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
  236. package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
  237. package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
  238. package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
  239. package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
  240. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  241. package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
  242. package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
  243. package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
  244. package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
  245. package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
  246. package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
  247. package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
  248. package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
  249. package/dist/sheets.d.ts +1 -1
  250. package/dist/sheets.js +1 -1
  251. package/dist/slides.d.ts +3 -1
  252. package/dist/slides.js +1 -1
  253. package/docs/README.md +1 -0
  254. package/docs/contract.md +1 -1
  255. package/docs/defaults.md +25 -2
  256. package/docs/layers.md +1 -1
  257. package/docs/project.md +3 -1
  258. package/docs/sheets.md +29 -3
  259. package/docs/slides.md +18 -14
  260. package/docs/sound.md +1 -1
  261. package/docs/websites.md +57 -0
  262. package/package.json +3 -1
@@ -1,13 +1,24 @@
1
- import { type AnimationFile, type ShapeFile, type TransitionFile, type SlideFile, type SlidesFile } from "@allyhub-next/formats";
1
+ import { type AnimationFile, type BackgroundFile, type ShapeFile, type TransitionFile, type SlideFile, type SlidesFile } from "@allyhub-next/formats";
2
+ import { type Document } from "yaml";
2
3
  export interface FileProblem {
3
4
  /** Where in the file, as `slides.2.shapes.Title.frame`. */
4
5
  path: string;
5
6
  line?: number;
6
7
  message: string;
7
8
  }
8
- /** slides.yaml's text read: its slides, or nothing when it is not the format, what is wrong, and the line of any path. */
9
+ /**
10
+ * slides.yaml's text read: its slides, or none when it is not the format;
11
+ * the slides of it that are (`readable`, every slide that is the format,
12
+ * the first of two of one id), so what else is wrong can be found in the
13
+ * same pass; every problem; and the line of any path.
14
+ */
9
15
  export declare function readSlidesFile(text: string): {
10
16
  file?: SlidesFile;
17
+ /** The slides that are the format, and the line of a path in them. */
18
+ readable?: {
19
+ file: SlidesFile;
20
+ lineOf: (path: string) => number | undefined;
21
+ };
11
22
  problems: FileProblem[];
12
23
  lineOf: (path: string) => number | undefined;
13
24
  };
@@ -58,6 +69,17 @@ export type SlidesEdit =
58
69
  slide: string;
59
70
  shape: string;
60
71
  }
72
+ /**
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,
75
+ * its entry is there, empty if it had none; not, it is taken away.
76
+ */
77
+ | {
78
+ op: "show";
79
+ slide: string;
80
+ shape: string;
81
+ shown: boolean;
82
+ }
61
83
  /** A shape's changes taken away: it is its layout's again. */
62
84
  | {
63
85
  op: "reset";
@@ -75,9 +97,28 @@ export type SlidesEdit =
75
97
  op: "transition";
76
98
  slide: string;
77
99
  transition?: TransitionFile;
100
+ }
101
+ /** When a show goes on from it by itself, seconds; none takes it away. */
102
+ | {
103
+ op: "advance";
104
+ slide: string;
105
+ after?: number;
106
+ }
107
+ /** Its own background over its layout's; none takes it away. */
108
+ | {
109
+ op: "background";
110
+ slide: string;
111
+ background?: BackgroundFile;
78
112
  };
79
113
  /** slides.yaml's text after an edit. */
80
114
  export declare function editSlidesFile(text: string | undefined, edit: SlidesEdit): string;
115
+ /**
116
+ * An edit made on slides.yaml's parsed document, in place: only the nodes
117
+ * it changes are touched, so an editor that keeps the document edits a
118
+ * long file in the time one slide takes. False when it changed nothing
119
+ * (its slide is not there).
120
+ */
121
+ export declare function editSlidesDocument(doc: Document, edit: SlidesEdit): boolean;
81
122
  /** An id or a name no slide or shape has yet, from a stem: `cover`, `cover-2`… */
82
123
  export declare function freeName(taken: Iterable<string>, stem: string): string;
83
124
  /**
@@ -87,23 +128,4 @@ export declare function freeName(taken: Iterable<string>, stem: string): string;
87
128
  * another hand changed from `a`, they are `b`'s changes kept.
88
129
  */
89
130
  export declare function slidesEdits(a: SlidesFile, b: SlidesFile): SlidesEdit[];
90
- /** Where a person's change met another hand's: the person's stands. */
91
- export interface SlidesConflict {
92
- slide: string;
93
- shape?: string;
94
- /** The field both changed (`frame`, `text.size`, `layout`); absent when the other hand removed what the person changed. */
95
- field?: string;
96
- }
97
- /**
98
- * A person's slides.yaml (`mine`, what the editor holds, made from
99
- * `base`) merged into the file as another hand left it (`theirs`): the
100
- * person's changes made over theirs, so what the other hand changed
101
- * elsewhere stands, and where both changed one value the person's does,
102
- * said in `conflicts`. Undefined when theirs is not a slides.yaml a merge
103
- * can read: the person mends it, or the other hand does.
104
- */
105
- export declare function mergeSlides(base: string, mine: SlidesFile, theirs: string): {
106
- text: string;
107
- conflicts: SlidesConflict[];
108
- } | undefined;
109
131
  //# sourceMappingURL=file.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readDataFile as x}from"@allyhub-next/formats";import{isMap as u,isSeq as O,LineCounter as w,parseDocument as N}from"yaml";export function readSlidesFile(t){const e=new w,n=N(t,{lineCounter:e}),o=l=>{const s=l===""?[]:l.split(".");for(let a=s.length;a>=0;a--){const r=n.getIn(s.slice(0,a).map(i=>/^\d+$/u.test(i)?Number(i):i),!0)?.range?.[0];if(r!==void 0)return e.linePos(r).line}};if(n.errors.length>0)return{problems:n.errors.map(l=>({path:"",line:e.linePos(l.pos[0]).line,message:`slides.yaml is not YAML: ${l.message.split(`
3
- `)[0]??""}`})),lineOf:o};const c=x("slides",n.toJS()??{});return c.ok?{file:c.value,problems:[],lineOf:o}:{problems:c.problems.map(l=>{const s=o(l.path);return{path:l.path,...s===void 0?{}:{line:s},message:l.message}}),lineOf:o}}const A=`slides: []
4
- `;function M(t){let e=t.get("slides",!0);if(O(e)||(u(t.contents)?t.set("slides",t.createNode([])):t.contents=t.createNode({slides:[]}),e=t.get("slides",!0)),!O(e))throw new Error("slides.yaml has no slides list.");return e}const b=(t,e)=>t.findIndex(n=>u(n)&&n.get("id")===e),E=["frame","text","fill","line","z","crop"];export function editSlidesFile(t,e){const n=N(t===void 0||t.trim()===""?A:t);if(n.errors.length>0)throw new Error("slides.yaml is not YAML: it is mended by hand first.");const o=M(n),c=r=>{if(r===null)return 0;const i=r===void 0?-1:b(o.items,r);return i<0?o.items.length:i+1};if(e.op==="add")return b(o.items,e.slide.id)>=0||(o.items.splice(c(e.after),0,n.createNode(e.slide)),o.flow===!0&&(o.flow=!1)),n.toString();const l=b(o.items,e.slide),s=o.items[l];if(l<0||!u(s))return t??A;const a=r=>{let i=s.get("shapes",!0);return!u(i)&&r&&(s.set("shapes",n.createNode({})),i=s.get("shapes",!0)),u(i)?i:void 0},f=()=>{const r=a(!1);if(r){for(const i of[...r.items])u(i.value)&&i.value.items.length===0&&r.delete(i.key);r.items.length===0&&s.delete("shapes")}};switch(e.op){case"move":{if(e.after===e.slide)break;o.items.splice(l,1),o.items.splice(c(e.after),0,s);break}case"duplicate":{const r=s.clone();r.set("id",e.id),o.items.splice(l+1,0,r);break}case"remove":o.items.splice(l,1);break;case"layout":s.set("layout",e.layout);break;case"hidden":e.hidden===!1||Array.isArray(e.hidden)&&e.hidden.length===0?s.delete("hidden"):s.set("hidden",n.createNode(e.hidden));break;case"shape":{const r=a(!0);if(!r)break;let i=r.get(e.shape,!0);if(u(i)||(r.set(e.shape,n.createNode({})),i=r.get(e.shape,!0)),!u(i))break;for(const[d,p]of Object.entries(e.set)){const m=d.split(".");if(p===void 0){i.deleteIn(m);const h=m.length>1?i.getIn(m.slice(0,-1),!0):void 0;u(h)&&h.items.length===0&&i.deleteIn(m.slice(0,-1))}else i.setIn(m,n.createNode(p))}f();break}case"unplace":{a(!1)?.delete(e.shape),f();break}case"animations":e.animations.length===0?s.delete("animations"):s.set("animations",n.createNode(e.animations));break;case"transition":e.transition===void 0?s.delete("transition"):s.set("transition",n.createNode(e.transition));break;case"reset":{const r=a(!1);if(!r)break;for(const i of r.items){const d=String(u(i.key)?"":i.key.value??i.key);if(e.shape!==void 0&&d!==e.shape)continue;const p=i.value;if(!(!u(p)||["textbox","picture","movie","geometry","component"].some(h=>p.has(h))))for(const h of E)p.delete(h)}f();break}}return n.toString()}export function freeName(t,e){const n=new Set(t),o=e.replace(/[^A-Za-z0-9_-]+/gu,"-").replace(/^-+|-+$/gu,"")||"slide";if(!n.has(o))return o;for(let c=2;;c++){const l=`${o}-${String(c)}`;if(!n.has(l))return l}}const $=new Set(["text","props","crop"]),y=t=>Array.isArray(t)?t.map(y):t!==null&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([e],[n])=>e<n?-1:e>n?1:0).map(([e,n])=>[e,y(n)])):t,k=(t,e)=>JSON.stringify(y(t))===JSON.stringify(y(e));function j(t){const e=new Map;for(const[n,o]of Object.entries(t??{}))if($.has(n)&&typeof o=="object"&&!Array.isArray(o))for(const[c,l]of Object.entries(o))e.set(`${n}.${c}`,l);else e.set(n,o);return e}function I(t,e){const n=t.length,o=e.length,c=Array.from({length:n+1},()=>new Array(o+1).fill(0));for(let s=n-1;s>=0;s--)for(let a=o-1;a>=0;a--){const f=c[s],r=c[s+1];!f||!r||(f[a]=t[s]===e[a]?(r[a+1]??0)+1:Math.max(r[a]??0,f[a+1]??0))}const l=new Set;for(let s=0,a=0;s<n&&a<o;)t[s]===e[a]?(l.add(t[s]??""),s++,a++):(c[s+1]?.[a]??0)>=(c[s]?.[a+1]??0)?s++:a++;return l}function J(t,e){const n=[],o=e.id;e.layout!==void 0&&e.layout!==t.layout&&n.push({op:"layout",slide:o,layout:e.layout}),k(t.hidden,e.hidden)||n.push({op:"hidden",slide:o,hidden:e.hidden??!1}),k(t.animations??[],e.animations??[])||n.push({op:"animations",slide:o,animations:e.animations??[]}),k(t.transition,e.transition)||n.push({op:"transition",slide:o,...e.transition?{transition:e.transition}:{}});const c=t.shapes??{},l=e.shapes??{};for(const s of Object.keys(c))s in l||n.push({op:"unplace",slide:o,shape:s});for(const[s,a]of Object.entries(l)){const f=j(c[s]),r=j(a),i={};for(const d of new Set([...f.keys(),...r.keys()]))k(f.get(d),r.get(d))||(i[d]=r.get(d));Object.keys(i).length>0&&n.push({op:"shape",slide:o,shape:s,set:i})}return n}export function slidesEdits(t,e){const n=[],o=new Map(t.slides.map(s=>[s.id,s])),c=new Set(e.slides.map(s=>s.id));for(const s of t.slides)c.has(s.id)||n.push({op:"remove",slide:s.id});const l=I(t.slides.map(s=>s.id).filter(s=>c.has(s)),e.slides.map(s=>s.id).filter(s=>o.has(s)));return e.slides.forEach((s,a)=>{const f=a===0?null:e.slides[a-1]?.id??null,r=o.get(s.id);if(!r||r.generate!==s.generate){r&&n.push({op:"remove",slide:s.id}),n.push({op:"add",slide:s,after:f});return}l.has(s.id)||n.push({op:"move",slide:s.id,after:f}),n.push(...J(r,s))}),n}const g=(t,e,n)=>JSON.stringify([t,e,n]);function v(t){const e=new Map;switch(t.op){case"layout":e.set(g(t.slide,"","layout"),t.layout);break;case"hidden":e.set(g(t.slide,"","hidden"),t.hidden);break;case"animations":e.set(g(t.slide,"","animations"),t.animations);break;case"transition":e.set(g(t.slide,"","transition"),t.transition);break;case"shape":for(const[n,o]of Object.entries(t.set))e.set(g(t.slide,t.shape,n),o);break;case"unplace":e.set(g(t.slide,t.shape,""),void 0);break;case"remove":e.set(g(t.slide,"",""),void 0);break;default:break}return e}export function mergeSlides(t,e,n){const o=readSlidesFile(t).file??{slides:[]},c=readSlidesFile(n).file;if(!c)return;const l=slidesEdits(o,e);let s=n;for(const i of l)s=editSlidesFile(s,i);const a=new Map;for(const i of slidesEdits(o,c))for(const[d,p]of v(i))a.set(d,p);const f=new Set(o.slides.map(i=>i.id).filter(i=>!c.slides.some(d=>d.id===i))),r=[];for(const i of l){if("slide"in i&&typeof i.slide=="string"&&f.has(i.slide)&&i.op!=="remove"){r.push({slide:i.slide});continue}for(const[d,p]of v(i)){if(!a.has(d)||k(a.get(d),p))continue;const[m="",h="",S=""]=JSON.parse(d);r.push({slide:m,...h===""?{}:{shape:h},...S===""?{}:{field:S}})}}return{text:s,conflicts:r}}
2
+ import{readDataFile as N}from"@allyhub-next/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}
@@ -0,0 +1,17 @@
1
+ import type { ResolvedDeck, ResolvedSlide } from "./resolve.js";
2
+ export interface SlideIdentity {
3
+ /** Changes when what draws a slide from it changes meaning. */
4
+ schema: "allyhub-slide-v1";
5
+ /** The slide's size, EMU. */
6
+ size: [width: number, height: number];
7
+ theme: ResolvedDeck["theme"];
8
+ /** The slide without its place (`file`) and when a show leaves it (`advance`), left out as JSON leaves out undefined. */
9
+ slide: Omit<ResolvedSlide, "file" | "advance"> & {
10
+ file?: undefined;
11
+ advance?: undefined;
12
+ };
13
+ }
14
+ export declare function slideIdentity(deck: Pick<ResolvedDeck, "width" | "height" | "theme">, slide: ResolvedSlide): SlideIdentity;
15
+ /** A slide's identity as one string: equal strings, equal drawings. */
16
+ export declare const slideSign: (deck: Pick<ResolvedDeck, "width" | "height" | "theme">, slide: ResolvedSlide) => string;
17
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export function slideIdentity(e,i){return{schema:"allyhub-slide-v1",size:[e.width,e.height],theme:e.theme,slide:{...i,file:void 0,advance:void 0}}}export const slideSign=(e,i)=>JSON.stringify(slideIdentity(e,i));
@@ -1,4 +1,5 @@
1
1
  export * from "./units.js";
2
+ export * from "./lang.js";
2
3
  export * from "./enums.js";
3
4
  export * from "./strict.js";
4
5
  export * from "./animation.js";
@@ -11,10 +12,14 @@ export * from "./placeholders.js";
11
12
  export * from "./theme.js";
12
13
  export * from "./model.js";
13
14
  export * from "./api.js";
15
+ export * from "./code.js";
14
16
  export * from "./resolve.js";
17
+ export * from "./identity.js";
15
18
  export * from "./file.js";
16
19
  export * from "./script.js";
20
+ export * from "./merge.js";
17
21
  export * from "./stage.js";
22
+ export * from "./components.js";
18
23
  export * from "./check.js";
19
24
  export * from "./capabilities.js";
20
25
  export * from "./measure.js";
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export*from"./units.js";export*from"./enums.js";export*from"./strict.js";export*from"./animation.js";export*from"@allyhub-next/chart";export*from"./chart-api.js";export{chartOfFile}from"./chart-file.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"./resolve.js";export*from"./file.js";export*from"./script.js";export*from"./stage.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-next/chart";export*from"./chart-api.js";export{chartOfFile}from"./chart-file.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";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * A run's language: kana is Japanese (`ja-JP`), hangul Korean (`ko-KR`);
3
+ * anything else, Han alone too (it is Chinese or Japanese), is the deck's.
4
+ */
5
+ export declare function runLang(text: string, lang: string | undefined): string | undefined;
6
+ //# sourceMappingURL=lang.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export function runLang(r,t){return/[\p{Script=Hiragana}\p{Script=Katakana}]/u.test(r)?"ja-JP":/\p{Script=Hangul}/u.test(r)?"ko-KR":t}
@@ -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 G,fact as u,phoneScale as J}from"@allyhub-next/video-core";import{STANDARD_FONTS as K}from"./theme.js";export const DECK_FACT_DEFAULTS={within:8,aligned:.5,drift:1,phone:G.phone,slack:1};const z=e=>e[0]+e[2],k=e=>e[1]+e[3],E=e=>Math.max(0,e[2])*Math.max(0,e[3]),M=(e,o=2)=>{const p=10**o;return Math.round(e*p)/p};function O(e,o,p){const y=[],n=(m,l)=>{l>p&&y.push({side:m,px:Math.round(l)})};return n("left",o[0]-e[0]),n("top",o[1]-e[1]),n("right",z(e)-z(o)),n("bottom",k(e)-k(o)),y}const R=(e,o)=>{const p=Math.max(e[0],o[0]),y=Math.max(e[1],o[1]);return[p,y,Math.min(z(e),z(o))-p,Math.min(k(e),k(o))-y]},Q=(e,o,p)=>e[0]>=o[0]-p&&e[1]>=o[1]-p&&z(e)<=z(o)+p&&k(e)<=k(o)+p,D={left:e=>e[0],right:z,"centre-x":e=>e[0]+e[2]/2,top:e=>e[1],bottom:k,"centre-y":e=>e[1]+e[3]/2},P=e=>e.opaque||!e.text?.glyphs?e.box:e.text.glyphs,V=new Set(Object.keys(D)),W=new Set(["left","right","top","bottom"]);function C(e){if(e.opaque)return V;if(!e.text?.glyphs)return W;const o=e.text.align??"l";return new Set([o==="ctr"?"centre-x":o==="r"?"right":"left"])}const X=(e,o)=>o.some(p=>new RegExp(`^${p.split("*").map(y=>y.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join(".*")}$`,"su").test(e)),Y=e=>e.box[2]>0||e.box[3]>0;export function deckFacts(e,o,p,y={}){const n={...DECK_FACT_DEFAULTS,...y},m=t=>M(t/e.pxPerPt),l=[],F=[0,0,o.width,o.height],L=new Map,N=new Map,H=new Map;for(const t of e.slides){const i={...p,part:t.slide,t:t.t},w=N.get(t.slide)??{at:i,total:t.steps??1,measured:0,shapes:new Map};N.set(t.slide,w),w.measured++;for(const c of t.shapes){if(c.level!=="slide")continue;const s=w.shapes.get(c.name)??{hidden:0,by:[]};c.hidden===!0&&s.hidden++,w.shapes.set(c.name,s)}const x=t.shapes.filter(c=>Y(c)&&c.hidden!==!0&&(n.levels===void 0||n.levels.includes(c.level))&&!X(c.name,n.except??[]));let A=0,q=0,I=0;for(const[c,s]of x.entries()){s.chart&&l.push(u("chart-data",i,{shape:s.name,...s.chart}));const f=(s.rows??[]).flatMap((a,d)=>a.drawn>a.set+n.slack?[{row:d,set:m(a.set),drawn:m(a.drawn)}]:[]);f.length>0&&l.push(u("table-grown",i,{shape:s.name,set:m(s.frame[3]),drawn:m(s.box[3]),rows:f}));const h=s.text;if(h?.glyphs){I++,A+=h.words,q+=h.lines.length;const a=O(h.glyphs,s.box,n.slack);a.length>0&&l.push(u("text-overflow",i,{shape:s.name,text:h.text,box:s.box,glyphs:h.glyphs,edges:a,lines:h.lines.length,past:h.lines.filter(r=>O(r,s.box,n.slack).length>0).length,...h.scale===void 0?{}:{scale:h.scale}}));for(const r of h.type){const g=`${String(r.size)}/${String(r.weight)}`,b=L.get(g)??{size:r.size,weight:r.weight,slides:new Set,shapes:new Set};b.slides.add(t.slide),b.shapes.add(`${t.slide}/${s.name}`),L.set(g,b)}const d=h.type.reduce((r,g)=>r===void 0||g.size<r.size?g:r,void 0);if(d){const r=n.room,g=d.xHeight===void 0?"em":"x",b=r&&(d.xHeight??d.size)*(r.screen*1e3/(o.width/e.pxPerPt));l.push(u("read-size",i,{shape:s.name,text:h.text,size:d.size,...d.xHeight===void 0?{}:{xHeight:d.xHeight},...r&&b!==void 0?{screen:{by:g,mm:M(b,1),arcmin:M(Math.atan(b/1e3/r.distance)*180*60/Math.PI,1)}}:{},phone:M(d.size*e.pxPerPt*J([o.width,o.height],n.phone),1),options:{...r?{room:{...r}}:{},phone:[...n.phone]}}))}}const $=O(s.box,F,n.slack);if($.length>0){const a=E(s.box);l.push(u("shape-off-slide",i,{shape:s.name,box:s.box,edges:$,share:a>0?M(1-E(R(s.box,F))/a):1}))}if(s.picture){const[a,d]=s.picture.shown;if(a>0&&d>0){const r=Math.max(s.box[2]/a,s.box[3]/d),g=b=>b/e.pxPerPt/72;l.push(u("picture-resolution",i,{shape:s.name,source:s.picture.source,shown:s.picture.shown,box:s.box,scale:M(r),ppi:Math.round(Math.min(a/g(s.box[2]),d/g(s.box[3]))),stretch:M(s.box[2]/a/(s.box[3]/d)-1)}))}}const S=x.slice(c+1).find(a=>a.opaque&&Q(s.box,a.box,n.slack)),v=w.shapes.get(s.name);if(v?v.by.push(S?.name):S&&l.push(u("shape-hidden",i,{shape:s.name,by:S.name})),s.level==="slide"){const a=`${t.layout}\0${s.name}`,d=H.get(a)??new Map,r=[m(s.frame[0]),m(s.frame[1]),m(s.frame[2]),m(s.frame[3])],g=[...d.values()].find(b=>b.frame.every((U,B)=>Math.abs(U-(r[B]??0))<=n.drift));g?g.slides.includes(t.slide)||g.slides.push(t.slide):d.set(r.join(","),{frame:r,slides:[t.slide]}),H.set(a,d)}}for(let c=0;c<x.length;c++)for(let s=c+1;s<x.length;s++){const f=x[c],h=x[s];if(!f||!h)continue;const $=f.level==="slide"||h.level==="slide",S=R(P(f),P(h));if($&&f.level==="slide"&&h.level==="slide"&&S[2]>n.slack&&S[3]>n.slack){const v=E(S);l.push(u("shape-overlap",i,{a:f.name,b:h.name,area:Math.round(v),share:M(v/Math.max(1,Math.min(E(P(f)),E(P(h)))))}))}if($)for(const[v,a]of Object.entries(D)){if(!C(f).has(v)||!C(h).has(v))continue;const d=Math.abs(m(a(P(f)))-m(a(P(h))));d>n.aligned&&d<=n.within&&l.push(u("near-alignment",i,{a:f.name,b:h.name,line:v,gap:M(d),options:{within:n.within,aligned:n.aligned}}))}}for(const c of x)if(!(c.level!=="slide"||!c.opaque))for(const s of["centre-x","centre-y"]){const f=Math.abs(m(D[s](c.box))-m(D[s](F)));f>n.aligned&&f<=n.within&&l.push(u("near-alignment",i,{a:c.name,b:"slide",line:s,gap:M(f),options:{within:n.within,aligned:n.aligned}}))}l.push(u("words-on-slide",i,{words:A,lines:q,texts:I}))}for(const[t,i]of H){if(i.size<2)continue;const[w="",x=""]=t.split("\0");l.push(u("placement-drift",p,{layout:w,shape:x,places:[...i.values()],options:{drift:n.drift}}))}if(e.fonts&&e.fonts.length>0){const t=new Set(y.standard??K);l.push(u("deck-fonts",p,{fonts:e.fonts.map(i=>({...i,standard:t.has(i.name)})),options:{standard:[...t]}}))}const T=[...L.values()].map(t=>({size:t.size,weight:t.weight,slides:t.slides.size,shapes:t.shapes.size})).sort((t,i)=>t.size-i.size||t.weight-i.weight),_=T[0];_&&l.push(u("type-in-use",p,{type:T,smallest:_.size}));for(const t of N.values())for(const[i,w]of t.shapes){const[x]=w.by;x!==void 0&&w.by.every(A=>A!==void 0)&&l.push(u("shape-hidden",t.at,{shape:i,by:x})),t.measured>=t.total&&w.hidden===t.measured&&l.push(u("shape-hidden",t.at,{shape:i,never:!0}))}const j=new Set;return l.filter(t=>{const i=JSON.stringify([t.kind,t.part,t.data]);return j.has(i)?!1:(j.add(i),!0)})}
2
+ import{READ_DEFAULTS as W,fact as m,phoneScale as X}from"@allyhub-next/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)})}
@@ -0,0 +1,58 @@
1
+ import { type ScriptFile, type SlidesFile } from "@allyhub-next/formats";
2
+ /** Where a person's change met another hand's in slides.yaml. */
3
+ export interface SlidesConflict {
4
+ slide: string;
5
+ shape?: string;
6
+ /**
7
+ * What both changed, by its path in the slide or shape (`layout`,
8
+ * `frame.x`, `text.size`, `animations.title:fade.duration`; `order`: both
9
+ * moved the slide, or the item); absent when one hand removed the slide or
10
+ * shape the other changed.
11
+ */
12
+ field?: string;
13
+ /** Each hand's value; absent where that hand removed it. */
14
+ mine?: unknown;
15
+ theirs?: unknown;
16
+ /** Whose stands: the person's, unless the person removed what the other hand changed. */
17
+ kept: "mine" | "theirs";
18
+ }
19
+ /** Where a person's words met another hand's in a deck's script. */
20
+ export interface DeckScriptConflict {
21
+ slide: string;
22
+ /** The shape whose words both changed. */
23
+ shape?: string;
24
+ /** `notes`, or what of the shape's words both changed; absent when one hand removed the row the other changed. */
25
+ field?: string;
26
+ mine?: unknown;
27
+ theirs?: unknown;
28
+ kept: "mine" | "theirs";
29
+ }
30
+ /**
31
+ * A person's slides.yaml (`mine`, what the editor holds, made from
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
34
+ * read: the person mends it, or the other hand does.
35
+ */
36
+ export declare function mergeSlides(base: string, mine: SlidesFile, theirs: string): {
37
+ text: string;
38
+ conflicts: SlidesConflict[];
39
+ } | undefined;
40
+ /**
41
+ * A person's script (`mine`, made from `base`) merged with the script as
42
+ * another hand left it (`theirs`): its slides' rows, as mergeSlides
43
+ * merges slides.yaml. Undefined when theirs is not a script.
44
+ */
45
+ export declare function mergeDeckScript(base: string, mine: ScriptFile, theirs: string): {
46
+ text: string;
47
+ conflicts: DeckScriptConflict[];
48
+ } | undefined;
49
+ /**
50
+ * An id for a slide a person adds or duplicates in the editor: its stem
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
53
+ * from what the editor sees (`slide-2`) could be one the agent is adding
54
+ * too; one of 32⁴ (about a million) is not, as PowerPoint gives a new
55
+ * slide an id no other slide has (`p:sldId/@id`).
56
+ */
57
+ export declare function newSlideId(taken: Iterable<string>, stem?: string, random?: () => number): string;
58
+ //# sourceMappingURL=merge.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{readDataFile as T}from"@allyhub-next/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}}
@@ -1,4 +1,4 @@
1
- import type { AnimationFile, LineDash, TransitionFile, LineEnd, ShapeGeometry, TextAlign, ThemeColor } from "@allyhub-next/formats";
1
+ import type { AnimationFile, LineDash, Numbering, TransitionFile, LineEnd, ShapeGeometry, TextAlign } from "@allyhub-next/formats";
2
2
  import type { ChartDef, Color } from "@allyhub-next/chart";
3
3
  import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
4
4
  import type { ThemeInput } from "./theme.js";
@@ -18,11 +18,17 @@ export interface FontDef {
18
18
  bold?: boolean;
19
19
  italic?: boolean;
20
20
  underline?: boolean;
21
- color?: ThemeColor;
22
- /** A colour that is not the theme's, `#RRGGBB`. */
23
- rgb?: string;
21
+ color?: Color;
24
22
  /** Space added between letters (negative tightens), EMU (`a:rPr` spc). */
25
23
  spacing?: Length;
24
+ /** A line through it (`@strike`). */
25
+ strike?: boolean;
26
+ /** Raised (above 0) or lowered, a share of its size: superscript 0.3, subscript -0.25 (`@baseline`). */
27
+ baseline?: number;
28
+ /** The colour behind it, `#RRGGBB` (`a:highlight`). */
29
+ highlight?: string;
30
+ /** The address it opens (`a:hlinkClick`): drawn in the theme's link colour, underlined. */
31
+ link?: string;
26
32
  }
27
33
  export interface RunDef {
28
34
  /** Its text; `\v` is a line break in the paragraph (`a:br`). */
@@ -30,6 +36,8 @@ export interface RunDef {
30
36
  font?: FontDef;
31
37
  /** The script's `` `code` ``: its font is the theme's code font. */
32
38
  code?: boolean;
39
+ /** Its text is the slide's number, which PowerPoint keeps up to date (`a:fld`). */
40
+ field?: "slidenum";
33
41
  }
34
42
  /** Line spacing (`a:lnSpc`): a multiple of the line (`a:spcPct`) or a fixed height (`a:spcPts`). */
35
43
  export type LineSpacing = {
@@ -47,6 +55,8 @@ export interface ParagraphFormatDef {
47
55
  bullet?: string | null;
48
56
  /** The bullet's typeface (`a:buFont`). */
49
57
  bullet_font?: string;
58
+ /** Counted in place of a bullet (`a:buAutoNum`). */
59
+ numbered?: Numbering;
50
60
  /** Where its lines start (`@marL`), and its first line from there (`@indent`, negative for a hanging bullet). */
51
61
  margin_left?: Length;
52
62
  indent?: Length;
@@ -131,6 +141,25 @@ export interface FreeformPath {
131
141
  h: number;
132
142
  steps: PathStep[];
133
143
  }
144
+ /** A gradient fill (`a:gradFill`), `at` and `transparency` shares. */
145
+ export interface GradientDef {
146
+ /** Degrees clockwise from left to right. */
147
+ angle: number;
148
+ stops: {
149
+ at: number;
150
+ color: Color;
151
+ transparency?: number;
152
+ }[];
153
+ }
154
+ /** A shadow outside a shape (`a:outerShdw`). */
155
+ export interface ShadowDef {
156
+ color: Color;
157
+ blur: Length;
158
+ distance: Length;
159
+ /** Degrees clockwise from the right. */
160
+ angle: number;
161
+ transparency: number;
162
+ }
134
163
  /** A shape as a master, a layout or a generator's code makes it. */
135
164
  export interface ShapeDef {
136
165
  name: string;
@@ -150,6 +179,11 @@ export interface ShapeDef {
150
179
  };
151
180
  text?: TextFrameDef;
152
181
  fill?: Color | null;
182
+ /** How much of its fill shows through, a share (`a:alpha`). */
183
+ fill_transparency?: number;
184
+ /** A gradient in place of its fill. */
185
+ gradient?: GradientDef;
186
+ shadow?: ShadowDef;
153
187
  line?: Color | null;
154
188
  line_width?: Length;
155
189
  line_dash?: LineDash;
@@ -1,5 +1,5 @@
1
1
  import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
2
- import type { Color, FontDef, ParagraphFormatDef, TextStylesDef } from "./model.js";
2
+ import type { Color, FontDef, LevelsDef, ParagraphFormatDef, TextStylesDef } from "./model.js";
3
3
  import { type Length } from "./units.js";
4
4
  /** A master's text styles, as Office's master has them (`p:txStyles`). */
5
5
  export declare const OFFICE_TEXT_STYLES: TextStylesDef;
@@ -22,6 +22,13 @@ export declare function placeholderFrame(type: PlaceholderType): {
22
22
  auto_size: AutoSize;
23
23
  word_wrap: boolean;
24
24
  };
25
+ /**
26
+ * A new placeholder's own list style, as Office's layouts have it: a
27
+ * subtitle's levels have no bullet and no hanging indent, each half an
28
+ * inch in from the last (Title Slide's `a:buNone`, `marL`, `indent="0"`),
29
+ * over the master's body style; every other type sets nothing.
30
+ */
31
+ export declare const placeholderLevels: (type: PlaceholderType) => LevelsDef;
25
32
  /** The idx a placeholder of a type has when it is not the only one (PowerPoint's: title 0, a layout's footers 10, 11, 12). */
26
33
  export declare const FOOTER_IDX: Partial<Record<PlaceholderType, number>>;
27
34
  /** A text box as python-pptx's `add_textbox` makes it: no wrapping, the shape fitted to its text. */
@@ -55,4 +62,23 @@ export declare const CONNECTOR_STYLE: {
55
62
  readonly line: "accent1";
56
63
  readonly line_width: number;
57
64
  };
65
+ /**
66
+ * The presets that are a connector (`p:cxnSp`, PowerPoint's Lines): ECMA's
67
+ * `line` and its straight, bent and curved connectors. Each runs from its
68
+ * frame's top left to its bottom right unless flipped, has the connector's
69
+ * style, ends that may carry arrowheads, and no fill and no text.
70
+ */
71
+ export declare const CONNECTOR_GEOMETRIES: readonly ["line", "straightConnector1", "bentConnector2", "bentConnector3", "bentConnector4", "bentConnector5", "curvedConnector2", "curvedConnector3", "curvedConnector4", "curvedConnector5"];
72
+ /** Whether a geometry is a connector's (CONNECTOR_GEOMETRIES). */
73
+ export declare const isConnectorGeometry: (geometry: string | undefined) => boolean;
74
+ /** A shadow where it says nothing, as PowerPoint's Offset preset: lengths in EMU, the colour black. */
75
+ export declare const SHADOW_DEFAULTS: {
76
+ readonly color: {
77
+ readonly rgb: "#000000";
78
+ };
79
+ readonly blur: number;
80
+ readonly distance: number;
81
+ readonly angle: 45;
82
+ readonly transparency: 0.6;
83
+ };
58
84
  //# sourceMappingURL=office.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{Emu as n,Inches as o,Pt as e}from"./units.js";const c=9,r=t=>Array.from({length:c},(l,i)=>t(i));export const OFFICE_TEXT_STYLES={title:r(()=>({alignment:"l",line_spacing:{lines:.9},space_before:0,bullet:null,font:{name:"+mj-lt",size:e(44),color:"dk1"}})),body:r(t=>({alignment:"l",line_spacing:{lines:.9},space_before:t===0?e(10):e(5),bullet:"•",bullet_font:"Arial",margin_left:n(228600+t*457200),indent:n(-228600),font:{name:"+mn-lt",size:e([28,24,20][t]??18),color:"dk1"}})),other:r(t=>({alignment:"l",margin_left:n(t*457200),font:{name:"+mn-lt",size:e(18),color:"dk1"}}))},TEXT_FALLBACK={alignment:"l",line_spacing:{lines:1},space_before:0,space_after:0,indent:0,font:{name:"+mn-lt",size:e(18),color:"dk1"}},TEXT_INSETS={left:o(.1),top:o(.05),right:o(.1),bottom:o(.05)},styleKindOf=t=>t===void 0?"other":t==="title"||t==="ctrTitle"?"title":"body";export function placeholderFrame(t){const l=t==="dt"||t==="ftr"||t==="sldNum";return{vertical_anchor:t==="title"||t==="ctrTitle"||l?"ctr":"t",auto_size:l?"none":"text",word_wrap:!0}}export const FOOTER_IDX={dt:10,ftr:11,sldNum:12},TEXTBOX_FRAME={word_wrap:!1,auto_size:"shape"},DRAWN_TEXTBOX_FRAME={word_wrap:!0,auto_size:"shape"},AUTOSHAPE_STYLE={fill:"accent1",line:"accent1",line_width:n(6350),font_color:"lt1",vertical_anchor:"ctr",alignment:"ctr"},CONNECTOR_STYLE={line:"accent1",line_width:n(12700)};
2
+ import{Emu as o,Inches as r,Pt as e}from"./units.js";const i=9,l=t=>Array.from({length:i},(n,c)=>t(c));export const OFFICE_TEXT_STYLES={title:l(()=>({alignment:"l",line_spacing:{lines:.9},space_before:0,bullet:null,font:{name:"+mj-lt",size:e(44),color:"dk1"}})),body:l(t=>({alignment:"l",line_spacing:{lines:.9},space_before:t===0?e(10):e(5),bullet:"•",bullet_font:"Arial",margin_left:o(228600+t*457200),indent:o(-228600),font:{name:"+mn-lt",size:e([28,24,20][t]??18),color:"dk1"}})),other:l(t=>({alignment:"l",margin_left:o(t*457200),font:{name:"+mn-lt",size:e(18),color:"dk1"}}))},TEXT_FALLBACK={alignment:"l",line_spacing:{lines:1},space_before:0,space_after:0,indent:0,font:{name:"+mn-lt",size:e(18),color:"dk1"}},TEXT_INSETS={left:r(.1),top:r(.05),right:r(.1),bottom:r(.05)},styleKindOf=t=>t===void 0||t==="dt"||t==="ftr"||t==="sldNum"?"other":t==="title"||t==="ctrTitle"?"title":"body";export function placeholderFrame(t){const n=t==="dt"||t==="ftr"||t==="sldNum";return{vertical_anchor:t==="title"||t==="ctrTitle"||n?"ctr":"t",auto_size:n?"none":"text",word_wrap:!0}}export const placeholderLevels=t=>l(t==="subTitle"?n=>({bullet:null,margin_left:r(.5*n),indent:0}):()=>({})),FOOTER_IDX={dt:10,ftr:11,sldNum:12},TEXTBOX_FRAME={word_wrap:!1,auto_size:"shape"},DRAWN_TEXTBOX_FRAME={word_wrap:!0,auto_size:"shape"},AUTOSHAPE_STYLE={fill:"accent1",line:"accent1",line_width:o(6350),font_color:"lt1",vertical_anchor:"ctr",alignment:"ctr"},CONNECTOR_STYLE={line:"accent1",line_width:o(12700)},CONNECTOR_GEOMETRIES=["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"];const s=new Set(CONNECTOR_GEOMETRIES);export const isConnectorGeometry=t=>t!==void 0&&s.has(t),SHADOW_DEFAULTS={color:{rgb:"#000000"},blur:e(4),distance:e(3),angle:45,transparency:.6};
@@ -1,7 +1,8 @@
1
- import type { ShapeFile, SlidesFile, TextAlign } from "@allyhub-next/formats";
1
+ import { type ShapeFile, type SlidesFile, type Numbering, type TextAlign } from "@allyhub-next/formats";
2
2
  import type { ChartDef } from "@allyhub-next/chart";
3
+ import type { DeckCode } from "./code.js";
3
4
  import type { Anchor, AutoSize, PlaceholderType } from "./enums.js";
4
- import type { Color, DeckDef, FontDef, Frame, LevelsDef, LineSpacing, MasterDef, ParagraphDef, ShapeDef, ShapeKind, TableCellDef, TableDef, TextFrameDef } from "./model.js";
5
+ import type { Color, FontDef, Frame, LevelsDef, LineSpacing, MasterDef, ParagraphDef, GradientDef, ShadowDef, ShapeDef, ShapeKind, TableCellDef, TableDef, TextFrameDef } from "./model.js";
5
6
  import { type ResolvedAnimation, type ResolvedTransition } from "./animation.js";
6
7
  import { type Theme } from "./theme.js";
7
8
  import { type Length } from "./units.js";
@@ -22,6 +23,8 @@ export interface LevelStyle {
22
23
  char: string;
23
24
  font?: string;
24
25
  };
26
+ /** Counted in place of a bullet. */
27
+ numbered?: Numbering;
25
28
  margin_left: Length;
26
29
  indent: Length;
27
30
  }
@@ -58,6 +61,8 @@ export interface ResolvedShape {
58
61
  };
59
62
  /** Degrees clockwise about its centre. */
60
63
  rotation?: number;
64
+ /** Its alternative text, the script's: what a screen reader says (`p:cNvPr/@descr`). */
65
+ alt?: string;
61
66
  /** The level it belongs to: the master's and the layout's own shapes are on every slide of them, not the slide's to change. */
62
67
  level: "master" | "layout" | "slide";
63
68
  placeholder?: {
@@ -66,6 +71,9 @@ export interface ResolvedShape {
66
71
  };
67
72
  text?: ResolvedText;
68
73
  fill?: Color | null;
74
+ fill_transparency?: number;
75
+ gradient?: GradientDef;
76
+ shadow?: ShadowDef;
69
77
  line?: Color | null;
70
78
  line_width?: Length;
71
79
  line_dash?: NonNullable<ShapeDef["line_dash"]>;
@@ -75,6 +83,8 @@ export interface ResolvedShape {
75
83
  table?: ResolvedTable;
76
84
  chart?: ChartDef;
77
85
  group?: string;
86
+ /** PowerPoint's Lock: not moved, sized or turned by hand. */
87
+ locked?: boolean;
78
88
  geometry?: ShapeDef["geometry"];
79
89
  adjustments?: number[];
80
90
  /** A picture or a movie: its project path, its poster, its crop. */
@@ -99,6 +109,8 @@ export interface ResolvedShape {
99
109
  text?: ValueSource;
100
110
  fill?: ValueSource;
101
111
  line?: ValueSource;
112
+ /** A picture's or a movie's file. */
113
+ media?: ValueSource;
102
114
  };
103
115
  }
104
116
  export interface ResolvedSlide {
@@ -107,13 +119,19 @@ export interface ResolvedSlide {
107
119
  layout: string;
108
120
  master: string;
109
121
  hidden: boolean;
122
+ /** Its background's colour: its own, or its layout's or master's. */
110
123
  background: Color;
124
+ /** Its own background, a gradient or a picture (a project path), over the colour. */
125
+ background_gradient?: GradientDef;
126
+ background_picture?: string;
111
127
  /** Back to front. */
112
128
  shapes: ResolvedShape[];
113
129
  /** Its Animation Pane, in order. */
114
130
  animations: ResolvedAnimation[];
115
131
  /** How it comes on from the slide before. */
116
132
  transition?: ResolvedTransition;
133
+ /** Seconds after it comes on that a show goes on by itself (`advance_after`). */
134
+ advance?: number;
117
135
  notes?: string;
118
136
  /** Its place in slides.yaml's `slides`, and its block's generator for a generated slide. */
119
137
  file: {
@@ -134,6 +152,8 @@ export interface DeckProblem {
134
152
  shape?: string;
135
153
  /** slides.yaml's path, when the problem is there. */
136
154
  path?: string;
155
+ /** The stack of an exception slides.ts's code threw: its line is the problem's place. */
156
+ stack?: string;
137
157
  }
138
158
  /** Words of the script: a text, a list of them (paragraphs, nested a level deeper), or none. */
139
159
  export type Words = string | readonly Words[] | undefined;
@@ -151,7 +171,8 @@ export type ResolvedTable = Omit<TableDef, "rows"> & {
151
171
  }[];
152
172
  };
153
173
  export interface ResolveInput {
154
- def: DeckDef;
174
+ /** What the deck's code made, as data (code.ts). */
175
+ code: DeckCode;
155
176
  file: SlidesFile;
156
177
  /** The script's words of a key, `<prefix>.<slide>.<shape>` or `.notes`. */
157
178
  words: (key: string) => Words;
@@ -160,7 +181,7 @@ export interface ResolveInput {
160
181
  base: string;
161
182
  /** The theme under the deck's own: the project's look as a theme. */
162
183
  theme?: Theme;
163
- /** A generator's data reader. */
184
+ /** A data file's content, from the deck's folder (a chart's `data`). */
164
185
  data?: (path: string) => unknown;
165
186
  }
166
187
  /** A project path from a folder and a path relative to it. */
@@ -169,7 +190,7 @@ export declare function joinPath(base: string, rel: string): string;
169
190
  export declare function levelsOver(base: readonly LevelStyle[], ...over: (LevelsDef | undefined)[]): LevelStyle[];
170
191
  /** What the text of a shape that is not a placeholder starts from under a master: PowerPoint's own, then the master's other style. */
171
192
  export declare const plainLevels: (master: MasterDef) => LevelStyle[];
172
- /** A colour slides.yaml names: the theme's, or `#RRGGBB`. */
193
+ /** A colour slides.yaml names (its format has checked it): the theme's, lighter or darker, or `#RRGGBB`. */
173
194
  export declare const colorOfFile: (c: string) => Color;
174
195
  /** Paragraphs from the script's words: a line each; a list's items each a paragraph, a nested list a level deeper; `**bold**`, `*italic*`, `` `code` `` (in the font `code` names) and spans (WORDS_SPAN) as runs. */
175
196
  export declare function paragraphsOfWords(words: Words, level?: number, code?: string): ParagraphDef[];