allyhub 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 (632) hide show
  1. package/dist/audio-text.js +1 -1
  2. package/dist/commands/add.js +2 -2
  3. package/dist/commands/cloud-tools.js +5 -5
  4. package/dist/commands/dev.js +1 -1
  5. package/dist/commands/frames/piece.js +1 -1
  6. package/dist/commands/frames/sheet.js +1 -1
  7. package/dist/commands/frames.js +8 -8
  8. package/dist/commands/index.js +1 -1
  9. package/dist/commands/inspect/common.js +1 -1
  10. package/dist/commands/inspect/layout.js +1 -1
  11. package/dist/commands/render.js +1 -1
  12. package/dist/commands/sheet.js +7 -7
  13. package/dist/commands/site.js +3 -2
  14. package/dist/commands/skills.js +3 -3
  15. package/dist/commands/slides.js +2 -2
  16. package/dist/node_modules/@allyhub-next/audio/dist/node/index.js +1 -1
  17. package/dist/node_modules/@allyhub-next/audio/dist/node/master.js +1 -1
  18. package/dist/node_modules/@allyhub-next/audio/package.json +1 -1
  19. package/dist/node_modules/@allyhub-next/browser/dist/html.js +1 -1
  20. package/dist/node_modules/@allyhub-next/browser/package.json +1 -1
  21. package/dist/node_modules/@allyhub-next/build/dist/content.d.ts +4 -0
  22. package/dist/node_modules/@allyhub-next/build/dist/content.js +1 -1
  23. package/dist/node_modules/@allyhub-next/build/dist/index.d.ts +2 -2
  24. package/dist/node_modules/@allyhub-next/build/dist/index.js +1 -1
  25. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.d.ts +2 -2
  26. package/dist/node_modules/@allyhub-next/build/dist/meta-worker.js +3 -3
  27. package/dist/node_modules/@allyhub-next/build/dist/move-refs.d.ts +1 -1
  28. package/dist/node_modules/@allyhub-next/build/dist/move-refs.js +1 -1
  29. package/dist/node_modules/@allyhub-next/build/dist/plugin.d.ts +12 -3
  30. package/dist/node_modules/@allyhub-next/build/dist/plugin.js +7 -6
  31. package/dist/node_modules/@allyhub-next/build/dist/prepare.d.ts +9 -5
  32. package/dist/node_modules/@allyhub-next/build/dist/prepare.js +2 -2
  33. package/dist/node_modules/@allyhub-next/build/dist/vite.d.ts +10 -0
  34. package/dist/node_modules/@allyhub-next/build/dist/vite.js +2 -2
  35. package/dist/node_modules/@allyhub-next/build/package.json +1 -1
  36. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +2 -2
  37. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +14 -5
  38. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +1 -1
  39. package/dist/node_modules/@allyhub-next/chart/package.json +1 -1
  40. package/dist/node_modules/@allyhub-next/check/dist/check.js +3 -3
  41. package/dist/node_modules/@allyhub-next/check/package.json +1 -1
  42. package/dist/node_modules/@allyhub-next/cloud/dist/blobs.js +2 -0
  43. package/dist/node_modules/@allyhub-next/cloud/dist/call.js +4 -2
  44. package/dist/node_modules/@allyhub-next/cloud/dist/client.js +1 -1
  45. package/dist/node_modules/@allyhub-next/cloud/dist/errors.js +1 -1
  46. package/dist/node_modules/@allyhub-next/cloud/dist/hashes.js +2 -0
  47. package/dist/node_modules/@allyhub-next/cloud/dist/index.js +1 -1
  48. package/dist/node_modules/@allyhub-next/cloud/dist/sites.js +2 -0
  49. package/dist/node_modules/@allyhub-next/cloud/dist/voice.js +1 -1
  50. package/dist/node_modules/@allyhub-next/cloud/package.json +1 -1
  51. package/dist/node_modules/@allyhub-next/components/package.json +1 -1
  52. package/dist/node_modules/@allyhub-next/components/r/caption-subtitle.json +1 -1
  53. package/dist/node_modules/@allyhub-next/components/src/caption-subtitle.ts +54 -16
  54. package/dist/node_modules/@allyhub-next/dev-server/dist/background.js +1 -1
  55. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.js +1 -1
  56. package/dist/node_modules/@allyhub-next/dev-server/dist/fonts.js +2 -0
  57. package/dist/node_modules/@allyhub-next/dev-server/dist/index.js +1 -1
  58. package/dist/node_modules/@allyhub-next/dev-server/dist/live.js +1 -1
  59. package/dist/node_modules/@allyhub-next/dev-server/dist/project.js +1 -1
  60. package/dist/node_modules/@allyhub-next/dev-server/dist/reach.js +2 -0
  61. package/dist/node_modules/@allyhub-next/dev-server/dist/record.js +2 -0
  62. package/dist/node_modules/@allyhub-next/dev-server/dist/server.js +2 -2
  63. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.js +1 -1
  64. package/dist/node_modules/@allyhub-next/dev-server/dist/tree.js +2 -0
  65. package/dist/node_modules/@allyhub-next/dev-server/package.json +1 -1
  66. package/dist/node_modules/@allyhub-next/doc/package.json +1 -1
  67. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.js +1 -1
  68. package/dist/node_modules/@allyhub-next/export/dist/export.js +5 -5
  69. package/dist/node_modules/@allyhub-next/export/dist/index.js +1 -1
  70. package/dist/node_modules/@allyhub-next/export/package.json +1 -1
  71. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.d.ts +205 -0
  72. package/dist/node_modules/@allyhub-next/formats/dist/data/deck-code.js +2 -0
  73. package/dist/node_modules/@allyhub-next/formats/dist/data/script.d.ts +4 -1
  74. package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +1 -1
  75. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +248 -18
  76. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +1 -1
  77. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1114 -91
  78. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +1 -1
  79. package/dist/node_modules/@allyhub-next/formats/dist/data/website.d.ts +20 -0
  80. package/dist/node_modules/@allyhub-next/formats/dist/data/website.js +2 -0
  81. package/dist/node_modules/@allyhub-next/formats/dist/index.d.ts +4 -0
  82. package/dist/node_modules/@allyhub-next/formats/dist/index.js +1 -1
  83. package/dist/node_modules/@allyhub-next/formats/dist/items.d.ts +1 -1
  84. package/dist/node_modules/@allyhub-next/formats/dist/items.js +1 -1
  85. package/dist/node_modules/@allyhub-next/formats/dist/media-type.d.ts +3 -0
  86. package/dist/node_modules/@allyhub-next/formats/dist/media-type.js +2 -0
  87. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +625 -30
  88. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +1 -1
  89. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +2 -0
  90. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +1 -1
  91. package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
  92. package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
  93. package/dist/node_modules/@allyhub-next/formats/package.json +2 -1
  94. package/dist/node_modules/@allyhub-next/measure/package.json +1 -1
  95. package/dist/node_modules/@allyhub-next/media/dist/index.d.ts +1 -1
  96. package/dist/node_modules/@allyhub-next/media/dist/index.js +1 -1
  97. package/dist/node_modules/@allyhub-next/media/dist/sheet.d.ts +2 -0
  98. package/dist/node_modules/@allyhub-next/media/dist/sheet.js +7 -7
  99. package/dist/node_modules/@allyhub-next/media/package.json +1 -1
  100. package/dist/node_modules/@allyhub-next/model/package.json +1 -1
  101. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.d.ts +31 -0
  102. package/dist/node_modules/@allyhub-next/ooxml/dist/brightness.js +2 -0
  103. package/dist/node_modules/@allyhub-next/ooxml/dist/color.d.ts +33 -0
  104. package/dist/node_modules/@allyhub-next/ooxml/dist/color.js +2 -0
  105. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.d.ts +13 -0
  106. package/dist/node_modules/@allyhub-next/ooxml/dist/enums.js +2 -0
  107. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.d.ts +79 -0
  108. package/dist/node_modules/@allyhub-next/ooxml/dist/ext.js +2 -0
  109. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.d.ts +132 -0
  110. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/enums.js +2 -0
  111. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.d.ts +28 -0
  112. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/presets.js +2 -0
  113. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.d.ts +4708 -0
  114. package/dist/node_modules/@allyhub-next/ooxml/dist/generated/spec.js +2 -0
  115. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.d.ts +57 -0
  116. package/dist/node_modules/@allyhub-next/ooxml/dist/geometry/index.js +2 -0
  117. package/dist/node_modules/@allyhub-next/ooxml/dist/index.d.ts +10 -0
  118. package/dist/node_modules/@allyhub-next/ooxml/dist/index.js +2 -0
  119. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.d.ts +12 -0
  120. package/dist/node_modules/@allyhub-next/ooxml/dist/mce.js +2 -0
  121. package/dist/node_modules/@allyhub-next/ooxml/dist/node.d.ts +111 -0
  122. package/dist/node_modules/@allyhub-next/ooxml/dist/node.js +2 -0
  123. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.d.ts +45 -0
  124. package/dist/node_modules/@allyhub-next/ooxml/dist/ns.js +2 -0
  125. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.d.ts +48 -0
  126. package/dist/node_modules/@allyhub-next/ooxml/dist/opc.js +2 -0
  127. package/dist/node_modules/@allyhub-next/ooxml/dist/report.d.ts +45 -0
  128. package/dist/node_modules/@allyhub-next/ooxml/dist/report.js +2 -0
  129. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.d.ts +28 -0
  130. package/dist/node_modules/@allyhub-next/ooxml/dist/xml.js +2 -0
  131. package/dist/node_modules/@allyhub-next/ooxml/package.json +26 -0
  132. package/dist/node_modules/@allyhub-next/project/dist/deck-keys.js +2 -0
  133. package/dist/node_modules/@allyhub-next/project/dist/deck-measure.js +2 -0
  134. package/dist/node_modules/@allyhub-next/project/dist/deck-pool.js +2 -0
  135. package/dist/node_modules/@allyhub-next/project/dist/index.js +1 -1
  136. package/dist/node_modules/@allyhub-next/project/dist/session.js +1 -1
  137. package/dist/node_modules/@allyhub-next/project/dist/stills.js +2 -0
  138. package/dist/node_modules/@allyhub-next/project/package.json +1 -1
  139. package/dist/node_modules/@allyhub-next/protocol/dist/account.d.ts +338 -0
  140. package/dist/node_modules/@allyhub-next/protocol/dist/account.js +2 -0
  141. package/dist/node_modules/@allyhub-next/protocol/dist/auth.d.ts +12 -13
  142. package/dist/node_modules/@allyhub-next/protocol/dist/auth.js +1 -1
  143. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.d.ts +35 -0
  144. package/dist/node_modules/@allyhub-next/protocol/dist/blobs.js +2 -0
  145. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +101 -32
  146. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +1 -1
  147. package/dist/node_modules/@allyhub-next/protocol/dist/editor.d.ts +89 -5
  148. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +1 -1
  149. package/dist/node_modules/@allyhub-next/protocol/dist/files.d.ts +2 -2
  150. package/dist/node_modules/@allyhub-next/protocol/dist/index.d.ts +6 -0
  151. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +1 -1
  152. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +23 -0
  153. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +1 -1
  154. package/dist/node_modules/@allyhub-next/protocol/dist/open.d.ts +13 -0
  155. package/dist/node_modules/@allyhub-next/protocol/dist/open.js +2 -0
  156. package/dist/node_modules/@allyhub-next/protocol/dist/registry.d.ts +73 -59
  157. package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +1 -1
  158. package/dist/node_modules/@allyhub-next/protocol/dist/routes.d.ts +1 -1
  159. package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +1 -1
  160. package/dist/node_modules/@allyhub-next/protocol/dist/shares.d.ts +115 -0
  161. package/dist/node_modules/@allyhub-next/protocol/dist/shares.js +2 -0
  162. package/dist/node_modules/@allyhub-next/protocol/dist/sites.d.ts +293 -0
  163. package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +2 -0
  164. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.d.ts +377 -0
  165. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +2 -0
  166. package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +27 -9
  167. package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +1 -1
  168. package/dist/node_modules/@allyhub-next/protocol/dist/tools.d.ts +53 -14
  169. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +1 -1
  170. package/dist/node_modules/@allyhub-next/protocol/package.json +2 -1
  171. package/dist/node_modules/@allyhub-next/registry/package.json +1 -1
  172. package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.js +3 -2
  173. package/dist/node_modules/@allyhub-next/render/dist/doc/index.js +1 -1
  174. package/dist/node_modules/@allyhub-next/render/dist/doc/pdf.js +34 -0
  175. package/dist/node_modules/@allyhub-next/render/dist/doc/print.js +4 -4
  176. package/dist/node_modules/@allyhub-next/render/dist/exports.js +2 -2
  177. package/dist/node_modules/@allyhub-next/render/dist/pdf.js +2 -0
  178. package/dist/node_modules/@allyhub-next/render/package.json +1 -1
  179. package/dist/node_modules/@allyhub-next/runtime/dist/fonts.js +1 -1
  180. package/dist/node_modules/@allyhub-next/runtime/dist/music.js +1 -1
  181. package/dist/node_modules/@allyhub-next/runtime/package.json +1 -1
  182. package/dist/node_modules/@allyhub-next/runtimes/package.json +1 -1
  183. package/dist/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +25 -5
  184. package/dist/node_modules/@allyhub-next/scaffold/dist/index.js +4 -4
  185. package/dist/node_modules/@allyhub-next/scaffold/package.json +1 -1
  186. package/dist/node_modules/@allyhub-next/scenery/package.json +1 -1
  187. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.d.ts +10 -0
  188. package/dist/node_modules/@allyhub-next/scenery-host/dist/bundle.js +3 -3
  189. package/dist/node_modules/@allyhub-next/scenery-host/package.json +1 -1
  190. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +1 -1
  191. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +1 -0
  192. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +1 -1
  193. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
  194. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
  195. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +40 -1
  196. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +1 -1
  197. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +9 -3
  198. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +1 -1
  199. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +5 -1
  200. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +1 -1
  201. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +60 -13
  202. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +1 -1
  203. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +1 -1
  204. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.d.ts +4 -0
  205. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/convert.js +2 -0
  206. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +1 -1
  207. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +1 -1
  208. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +1 -1
  209. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +27 -1
  210. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +1 -1
  211. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.d.ts +16 -0
  212. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/delimiters.js +2 -0
  213. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +18 -1
  214. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +1 -1
  215. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +1 -1
  216. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +2 -0
  217. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +1 -1
  218. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +1 -1
  219. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +1 -1
  220. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +1 -1
  221. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +1 -1
  222. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +1 -1
  223. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.d.ts +2 -0
  224. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/modern.js +2 -0
  225. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +1 -1
  226. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.d.ts +38 -0
  227. package/dist/node_modules/@allyhub-next/sheet/dist/calc/graph.js +2 -0
  228. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.d.ts +19 -0
  229. package/dist/node_modules/@allyhub-next/sheet/dist/calc/indexes.js +2 -0
  230. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.d.ts +49 -0
  231. package/dist/node_modules/@allyhub-next/sheet/dist/calc/remote.js +2 -0
  232. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.d.ts +82 -0
  233. package/dist/node_modules/@allyhub-next/sheet/dist/calc/server.js +2 -0
  234. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +6 -1
  235. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +1 -1
  236. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +1 -1
  237. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +1 -1
  238. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +15 -0
  239. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +1 -1
  240. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +29 -8
  241. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +3 -4
  242. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +2 -2
  243. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +8 -2
  244. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +1 -1
  245. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +52 -4
  246. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +43 -11
  247. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +7 -3
  248. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +1 -1
  249. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +1 -1
  250. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.d.ts +98 -0
  251. package/dist/node_modules/@allyhub-next/sheet/dist/paginate.js +2 -0
  252. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +1 -1
  253. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.d.ts +32 -0
  254. package/dist/node_modules/@allyhub-next/sheet/dist/table-style.js +2 -0
  255. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.d.ts +3 -0
  256. package/dist/node_modules/@allyhub-next/sheet/dist/table-styles.js +2 -0
  257. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +1 -1
  258. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +10 -1
  259. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +1 -1
  260. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +12 -1
  261. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +1 -1
  262. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +14 -4
  263. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +2 -2
  264. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +11 -1
  265. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +36 -16
  266. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +6 -1
  267. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +1 -1
  268. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +44 -2
  269. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -1
  270. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.d.ts +23 -0
  271. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/sax.js +2 -0
  272. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +2 -0
  273. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +1 -1
  274. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +6 -0
  275. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +1 -1
  276. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.d.ts +40 -0
  277. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +2 -0
  278. package/dist/node_modules/@allyhub-next/sheet/package.json +1 -1
  279. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +1 -1
  280. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +121 -44
  281. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +2 -2
  282. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +1 -1
  283. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +50 -13
  284. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +1 -1
  285. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +1 -1
  286. package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +1 -1
  287. package/dist/node_modules/@allyhub-next/slides-core/dist/code.d.ts +33 -0
  288. package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +2 -0
  289. package/dist/node_modules/@allyhub-next/slides-core/dist/components.d.ts +31 -0
  290. package/dist/node_modules/@allyhub-next/slides-core/dist/components.js +2 -0
  291. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +188 -5
  292. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +1 -1
  293. package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +43 -21
  294. package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +3 -3
  295. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.d.ts +17 -0
  296. package/dist/node_modules/@allyhub-next/slides-core/dist/identity.js +2 -0
  297. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +5 -0
  298. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +1 -1
  299. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.d.ts +6 -0
  300. package/dist/node_modules/@allyhub-next/slides-core/dist/lang.js +2 -0
  301. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +1 -1
  302. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.d.ts +58 -0
  303. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +2 -0
  304. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +38 -4
  305. package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +27 -1
  306. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +1 -1
  307. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +26 -5
  308. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +1 -1
  309. package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +18 -16
  310. package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +2 -2
  311. package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +51 -53
  312. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +1 -1
  313. package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +27 -0
  314. package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +1 -1
  315. package/dist/node_modules/@allyhub-next/slides-core/dist/values.d.ts +7 -0
  316. package/dist/node_modules/@allyhub-next/slides-core/dist/values.js +2 -0
  317. package/dist/node_modules/@allyhub-next/slides-core/package.json +1 -1
  318. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.js +1 -1
  319. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/code.js +4 -0
  320. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/index.js +3 -0
  321. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/names.js +2 -0
  322. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import/script.js +2 -0
  323. package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.js +1 -1
  324. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/chart.js +2 -0
  325. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/common.js +2 -0
  326. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/index.js +4 -0
  327. package/dist/{site.js → node_modules/@allyhub-next/slides-pptx/dist/read/model.js} +1 -1
  328. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/shapes.js +2 -0
  329. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/table.js +2 -0
  330. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/text.js +2 -0
  331. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read/timing.js +2 -0
  332. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.js +1 -1
  333. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.js +1 -1
  334. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.js +1 -1
  335. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.js +1 -1
  336. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.js +2 -2
  337. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.js +2 -2
  338. package/dist/node_modules/@allyhub-next/slides-pptx/package.json +1 -1
  339. package/dist/node_modules/@allyhub-next/slides-runtime/dist/component.js +2 -0
  340. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.js +2 -2
  341. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.js +1 -1
  342. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.js +5 -5
  343. package/dist/node_modules/@allyhub-next/slides-runtime/package.json +5 -1
  344. package/dist/node_modules/@allyhub-next/stage/dist/graphics.js +1 -1
  345. package/dist/node_modules/@allyhub-next/stage/dist/index.js +1 -1
  346. package/dist/node_modules/@allyhub-next/stage/dist/page.js +22 -12
  347. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.js +5 -5
  348. package/dist/node_modules/@allyhub-next/stage/dist/server.js +1 -1
  349. package/dist/node_modules/@allyhub-next/stage/package.json +1 -1
  350. package/dist/node_modules/@allyhub-next/stage-page/dist/host.js +1 -20
  351. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/probe.html +8 -0
  352. package/dist/{astro.js → node_modules/@allyhub-next/stage-page/dist/runtime/probe.js} +1 -1
  353. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/runtime.js +79 -0
  354. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.html +21 -0
  355. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/stage.js +3 -0
  356. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.html +9 -0
  357. package/dist/node_modules/@allyhub-next/stage-page/dist/runtime/viewer.js +3 -0
  358. package/dist/node_modules/@allyhub-next/stage-page/package.json +2 -3
  359. package/dist/node_modules/@allyhub-next/video-core/dist/captions.js +6 -6
  360. package/dist/node_modules/@allyhub-next/video-core/dist/fact.d.ts +47 -8
  361. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +1 -1
  362. package/dist/node_modules/@allyhub-next/video-core/dist/index.d.ts +1 -0
  363. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +1 -1
  364. package/dist/node_modules/@allyhub-next/video-core/dist/marks.d.ts +14 -0
  365. package/dist/node_modules/@allyhub-next/video-core/dist/marks.js +1 -1
  366. package/dist/node_modules/@allyhub-next/video-core/dist/music.d.ts +2 -1
  367. package/dist/node_modules/@allyhub-next/video-core/dist/piece.d.ts +11 -2
  368. package/dist/node_modules/@allyhub-next/video-core/dist/problem.d.ts +4 -0
  369. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +1 -1
  370. package/dist/node_modules/@allyhub-next/video-core/dist/schema.d.ts +2 -2
  371. package/dist/node_modules/@allyhub-next/video-core/dist/schema.js +1 -1
  372. package/dist/node_modules/@allyhub-next/video-core/dist/script.d.ts +2 -1
  373. package/dist/node_modules/@allyhub-next/video-core/dist/script.js +1 -1
  374. package/dist/node_modules/@allyhub-next/video-core/dist/source.d.ts +7 -0
  375. package/dist/node_modules/@allyhub-next/video-core/dist/source.js +2 -0
  376. package/dist/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +10 -33
  377. package/dist/node_modules/@allyhub-next/video-core/package.json +1 -1
  378. package/dist/node_modules/@allyhub-next/website/LICENSE +241 -0
  379. package/dist/node_modules/@allyhub-next/website/dist/index.js +2 -0
  380. package/dist/node_modules/@allyhub-next/website/dist/publish.js +3 -0
  381. package/dist/node_modules/@allyhub-next/website/dist/rules.js +2 -0
  382. package/dist/node_modules/@allyhub-next/website/dist/website.js +4 -0
  383. package/dist/node_modules/@allyhub-next/website/package.json +13 -0
  384. package/dist/text/facts-text.js +4 -4
  385. package/dist/works.js +1 -1
  386. package/editor-web/assets/calc-worker-Bz9r26p1.js +158 -0
  387. package/editor-web/assets/dist-0emakyZE.js +36 -0
  388. package/editor-web/assets/dist-B3UoDUa5.js +37 -0
  389. package/editor-web/assets/dist-B6KzR3pN.js +10 -0
  390. package/editor-web/assets/dist-Bc5iA5k1.js +1 -0
  391. package/editor-web/assets/dist-CTQIm8Im.js +10 -0
  392. package/editor-web/assets/dist-CiHNHwyq.js +2 -0
  393. package/editor-web/assets/dist-DNZ8PQ-E.js +224 -0
  394. package/editor-web/assets/index-CFt3ovRY.js +69 -0
  395. package/editor-web/assets/index-ujKjdu_s.css +2 -0
  396. package/editor-web/assets/minus-BhoPZC5P.js +1 -0
  397. package/editor-web/assets/react-C_-rEEBU.js +101 -0
  398. package/editor-web/assets/tabs-Den4gHrU.js +105 -0
  399. package/editor-web/assets/text-align-start-CsW4nqqL.js +1 -0
  400. package/editor-web/index.html +5 -5
  401. package/package.json +8 -14
  402. package/dist/astro.d.ts +0 -2
  403. package/dist/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +0 -52
  404. package/dist/node_modules/@allyhub-next/audio/dist/decode.d.ts +0 -33
  405. package/dist/node_modules/@allyhub-next/audio/dist/envelope.d.ts +0 -37
  406. package/dist/node_modules/@allyhub-next/audio/dist/index.d.ts +0 -17
  407. package/dist/node_modules/@allyhub-next/audio/dist/levels.d.ts +0 -97
  408. package/dist/node_modules/@allyhub-next/audio/dist/master.d.ts +0 -29
  409. package/dist/node_modules/@allyhub-next/audio/dist/music.d.ts +0 -11
  410. package/dist/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +0 -39
  411. package/dist/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -25
  412. package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -31
  413. package/dist/node_modules/@allyhub-next/audio/dist/node/index.d.ts +0 -8
  414. package/dist/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +0 -18
  415. package/dist/node_modules/@allyhub-next/audio/dist/node/master.d.ts +0 -42
  416. package/dist/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +0 -60
  417. package/dist/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +0 -31
  418. package/dist/node_modules/@allyhub-next/audio/dist/plan.d.ts +0 -143
  419. package/dist/node_modules/@allyhub-next/audio/dist/recorded.d.ts +0 -26
  420. package/dist/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -47
  421. package/dist/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +0 -89
  422. package/dist/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -64
  423. package/dist/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +0 -26
  424. package/dist/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +0 -42
  425. package/dist/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +0 -56
  426. package/dist/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +0 -10
  427. package/dist/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -12
  428. package/dist/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +0 -67
  429. package/dist/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +0 -32
  430. package/dist/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +0 -27
  431. package/dist/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +0 -64
  432. package/dist/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +0 -78
  433. package/dist/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +0 -111
  434. package/dist/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +0 -3
  435. package/dist/node_modules/@allyhub-next/audio/dist/render.d.ts +0 -26
  436. package/dist/node_modules/@allyhub-next/audio/dist/sfx.d.ts +0 -10
  437. package/dist/node_modules/@allyhub-next/audio/dist/shape.d.ts +0 -118
  438. package/dist/node_modules/@allyhub-next/audio/dist/voice.d.ts +0 -45
  439. package/dist/node_modules/@allyhub-next/browser/dist/browser.d.ts +0 -24
  440. package/dist/node_modules/@allyhub-next/browser/dist/capture.d.ts +0 -61
  441. package/dist/node_modules/@allyhub-next/browser/dist/cdp.d.ts +0 -51
  442. package/dist/node_modules/@allyhub-next/browser/dist/flags.d.ts +0 -13
  443. package/dist/node_modules/@allyhub-next/browser/dist/frames.d.ts +0 -35
  444. package/dist/node_modules/@allyhub-next/browser/dist/html.d.ts +0 -19
  445. package/dist/node_modules/@allyhub-next/browser/dist/index.d.ts +0 -10
  446. package/dist/node_modules/@allyhub-next/browser/dist/launch.d.ts +0 -35
  447. package/dist/node_modules/@allyhub-next/browser/dist/page.d.ts +0 -67
  448. package/dist/node_modules/@allyhub-next/browser/dist/server.d.ts +0 -26
  449. package/dist/node_modules/@allyhub-next/check/dist/cache.d.ts +0 -46
  450. package/dist/node_modules/@allyhub-next/check/dist/check.d.ts +0 -142
  451. package/dist/node_modules/@allyhub-next/check/dist/generated.d.ts +0 -22
  452. package/dist/node_modules/@allyhub-next/check/dist/index.d.ts +0 -7
  453. package/dist/node_modules/@allyhub-next/check/dist/plans.d.ts +0 -111
  454. package/dist/node_modules/@allyhub-next/check/dist/result.d.ts +0 -12
  455. package/dist/node_modules/@allyhub-next/check/dist/scenery.d.ts +0 -23
  456. package/dist/node_modules/@allyhub-next/dev-server/dist/background.d.ts +0 -50
  457. package/dist/node_modules/@allyhub-next/dev-server/dist/card.d.ts +0 -17
  458. package/dist/node_modules/@allyhub-next/dev-server/dist/exports.d.ts +0 -18
  459. package/dist/node_modules/@allyhub-next/dev-server/dist/index.d.ts +0 -11
  460. package/dist/node_modules/@allyhub-next/dev-server/dist/live.d.ts +0 -77
  461. package/dist/node_modules/@allyhub-next/dev-server/dist/mime.d.ts +0 -2
  462. package/dist/node_modules/@allyhub-next/dev-server/dist/mime.js +0 -2
  463. package/dist/node_modules/@allyhub-next/dev-server/dist/paths.d.ts +0 -27
  464. package/dist/node_modules/@allyhub-next/dev-server/dist/project.d.ts +0 -153
  465. package/dist/node_modules/@allyhub-next/dev-server/dist/reveal.d.ts +0 -6
  466. package/dist/node_modules/@allyhub-next/dev-server/dist/server.d.ts +0 -47
  467. package/dist/node_modules/@allyhub-next/dev-server/dist/sound.d.ts +0 -21
  468. package/dist/node_modules/@allyhub-next/dev-server/dist/stage.d.ts +0 -82
  469. package/dist/node_modules/@allyhub-next/dev-server/dist/stage.js +0 -121
  470. package/dist/node_modules/@allyhub-next/dev-server/dist/tools.d.ts +0 -24
  471. package/dist/node_modules/@allyhub-next/dev-server/dist/validate.d.ts +0 -6
  472. package/dist/node_modules/@allyhub-next/dev-server/dist/watcher.d.ts +0 -47
  473. package/dist/node_modules/@allyhub-next/dev-server/dist/writer.d.ts +0 -51
  474. package/dist/node_modules/@allyhub-next/export/dist/batch.d.ts +0 -70
  475. package/dist/node_modules/@allyhub-next/export/dist/deck-fonts.d.ts +0 -24
  476. package/dist/node_modules/@allyhub-next/export/dist/deck-pptx.d.ts +0 -12
  477. package/dist/node_modules/@allyhub-next/export/dist/export.d.ts +0 -123
  478. package/dist/node_modules/@allyhub-next/export/dist/index.d.ts +0 -5
  479. package/dist/node_modules/@allyhub-next/export/dist/names.d.ts +0 -36
  480. package/dist/node_modules/@allyhub-next/measure/dist/compare.d.ts +0 -195
  481. package/dist/node_modules/@allyhub-next/measure/dist/contrast.d.ts +0 -14
  482. package/dist/node_modules/@allyhub-next/measure/dist/cut-sheet.d.ts +0 -90
  483. package/dist/node_modules/@allyhub-next/measure/dist/cuts.d.ts +0 -108
  484. package/dist/node_modules/@allyhub-next/measure/dist/facts.d.ts +0 -60
  485. package/dist/node_modules/@allyhub-next/measure/dist/fidelity.d.ts +0 -40
  486. package/dist/node_modules/@allyhub-next/measure/dist/flat.d.ts +0 -42
  487. package/dist/node_modules/@allyhub-next/measure/dist/index.d.ts +0 -24
  488. package/dist/node_modules/@allyhub-next/measure/dist/loop.d.ts +0 -22
  489. package/dist/node_modules/@allyhub-next/measure/dist/overlay.d.ts +0 -57
  490. package/dist/node_modules/@allyhub-next/measure/dist/recording-report.d.ts +0 -66
  491. package/dist/node_modules/@allyhub-next/measure/dist/reference/compare.d.ts +0 -118
  492. package/dist/node_modules/@allyhub-next/measure/dist/reference/folder.d.ts +0 -75
  493. package/dist/node_modules/@allyhub-next/measure/dist/reference/interpret.d.ts +0 -39
  494. package/dist/node_modules/@allyhub-next/measure/dist/reference/piece.d.ts +0 -53
  495. package/dist/node_modules/@allyhub-next/measure/dist/reference/sections.d.ts +0 -53
  496. package/dist/node_modules/@allyhub-next/measure/dist/reference/sets.d.ts +0 -84
  497. package/dist/node_modules/@allyhub-next/measure/dist/reference/text.d.ts +0 -27
  498. package/dist/node_modules/@allyhub-next/measure/dist/reference/video.d.ts +0 -55
  499. package/dist/node_modules/@allyhub-next/measure/dist/seams.d.ts +0 -46
  500. package/dist/node_modules/@allyhub-next/measure/dist/sound-measures.d.ts +0 -74
  501. package/dist/node_modules/@allyhub-next/measure/dist/sound-report.d.ts +0 -156
  502. package/dist/node_modules/@allyhub-next/measure/dist/still.d.ts +0 -58
  503. package/dist/node_modules/@allyhub-next/measure/dist/version-voice.d.ts +0 -12
  504. package/dist/node_modules/@allyhub-next/project/dist/console.d.ts +0 -34
  505. package/dist/node_modules/@allyhub-next/project/dist/digest.d.ts +0 -9
  506. package/dist/node_modules/@allyhub-next/project/dist/index.d.ts +0 -11
  507. package/dist/node_modules/@allyhub-next/project/dist/ledger.d.ts +0 -17
  508. package/dist/node_modules/@allyhub-next/project/dist/media-index.d.ts +0 -27
  509. package/dist/node_modules/@allyhub-next/project/dist/page.d.ts +0 -119
  510. package/dist/node_modules/@allyhub-next/project/dist/says.d.ts +0 -15
  511. package/dist/node_modules/@allyhub-next/project/dist/scenery.d.ts +0 -35
  512. package/dist/node_modules/@allyhub-next/project/dist/session.d.ts +0 -37
  513. package/dist/node_modules/@allyhub-next/project/dist/stretch.d.ts +0 -38
  514. package/dist/node_modules/@allyhub-next/project/dist/version.d.ts +0 -114
  515. package/dist/node_modules/@allyhub-next/render/dist/cap.d.ts +0 -41
  516. package/dist/node_modules/@allyhub-next/render/dist/capture.d.ts +0 -78
  517. package/dist/node_modules/@allyhub-next/render/dist/clip.d.ts +0 -27
  518. package/dist/node_modules/@allyhub-next/render/dist/composite.d.ts +0 -106
  519. package/dist/node_modules/@allyhub-next/render/dist/delivery.d.ts +0 -18
  520. package/dist/node_modules/@allyhub-next/render/dist/doc/fonts.d.ts +0 -3
  521. package/dist/node_modules/@allyhub-next/render/dist/doc/index.d.ts +0 -3
  522. package/dist/node_modules/@allyhub-next/render/dist/doc/print.d.ts +0 -51
  523. package/dist/node_modules/@allyhub-next/render/dist/encode.d.ts +0 -111
  524. package/dist/node_modules/@allyhub-next/render/dist/errors.d.ts +0 -15
  525. package/dist/node_modules/@allyhub-next/render/dist/exports.d.ts +0 -76
  526. package/dist/node_modules/@allyhub-next/render/dist/ffmpeg.d.ts +0 -75
  527. package/dist/node_modules/@allyhub-next/render/dist/footage.d.ts +0 -169
  528. package/dist/node_modules/@allyhub-next/render/dist/image.d.ts +0 -16
  529. package/dist/node_modules/@allyhub-next/render/dist/index.d.ts +0 -26
  530. package/dist/node_modules/@allyhub-next/render/dist/junction.d.ts +0 -70
  531. package/dist/node_modules/@allyhub-next/render/dist/look.d.ts +0 -21
  532. package/dist/node_modules/@allyhub-next/render/dist/page.d.ts +0 -186
  533. package/dist/node_modules/@allyhub-next/render/dist/parts.d.ts +0 -140
  534. package/dist/node_modules/@allyhub-next/render/dist/png.d.ts +0 -37
  535. package/dist/node_modules/@allyhub-next/render/dist/pool.d.ts +0 -54
  536. package/dist/node_modules/@allyhub-next/render/dist/post-probe.d.ts +0 -27
  537. package/dist/node_modules/@allyhub-next/render/dist/post.d.ts +0 -27
  538. package/dist/node_modules/@allyhub-next/render/dist/render.d.ts +0 -151
  539. package/dist/node_modules/@allyhub-next/render/dist/segments.d.ts +0 -40
  540. package/dist/node_modules/@allyhub-next/render/dist/sound.d.ts +0 -24
  541. package/dist/node_modules/@allyhub-next/render/dist/stills.d.ts +0 -41
  542. package/dist/node_modules/@allyhub-next/render/dist/tools.d.ts +0 -25
  543. package/dist/node_modules/@allyhub-next/render/dist/webp.d.ts +0 -17
  544. package/dist/node_modules/@allyhub-next/runtime/dist/bridge.d.ts +0 -211
  545. package/dist/node_modules/@allyhub-next/runtime/dist/captions.d.ts +0 -24
  546. package/dist/node_modules/@allyhub-next/runtime/dist/clock.d.ts +0 -32
  547. package/dist/node_modules/@allyhub-next/runtime/dist/compose.d.ts +0 -149
  548. package/dist/node_modules/@allyhub-next/runtime/dist/console.d.ts +0 -21
  549. package/dist/node_modules/@allyhub-next/runtime/dist/contrast.d.ts +0 -13
  550. package/dist/node_modules/@allyhub-next/runtime/dist/embed.d.ts +0 -50
  551. package/dist/node_modules/@allyhub-next/runtime/dist/env.d.ts +0 -101
  552. package/dist/node_modules/@allyhub-next/runtime/dist/errors.d.ts +0 -21
  553. package/dist/node_modules/@allyhub-next/runtime/dist/facade.d.ts +0 -42
  554. package/dist/node_modules/@allyhub-next/runtime/dist/fonts.d.ts +0 -110
  555. package/dist/node_modules/@allyhub-next/runtime/dist/footage.d.ts +0 -52
  556. package/dist/node_modules/@allyhub-next/runtime/dist/frame.d.ts +0 -61
  557. package/dist/node_modules/@allyhub-next/runtime/dist/guards.d.ts +0 -32
  558. package/dist/node_modules/@allyhub-next/runtime/dist/index.d.ts +0 -14
  559. package/dist/node_modules/@allyhub-next/runtime/dist/inspect.d.ts +0 -112
  560. package/dist/node_modules/@allyhub-next/runtime/dist/locate.d.ts +0 -11
  561. package/dist/node_modules/@allyhub-next/runtime/dist/measure.d.ts +0 -41
  562. package/dist/node_modules/@allyhub-next/runtime/dist/mix-plan.d.ts +0 -42
  563. package/dist/node_modules/@allyhub-next/runtime/dist/music.d.ts +0 -29
  564. package/dist/node_modules/@allyhub-next/runtime/dist/output.d.ts +0 -5
  565. package/dist/node_modules/@allyhub-next/runtime/dist/pictures.d.ts +0 -39
  566. package/dist/node_modules/@allyhub-next/runtime/dist/piece.d.ts +0 -34
  567. package/dist/node_modules/@allyhub-next/runtime/dist/player/clips.d.ts +0 -41
  568. package/dist/node_modules/@allyhub-next/runtime/dist/player/cutout.d.ts +0 -57
  569. package/dist/node_modules/@allyhub-next/runtime/dist/player/player.d.ts +0 -78
  570. package/dist/node_modules/@allyhub-next/runtime/dist/reads.d.ts +0 -132
  571. package/dist/node_modules/@allyhub-next/runtime/dist/sound.d.ts +0 -22
  572. package/dist/node_modules/@allyhub-next/runtime/dist/speech.d.ts +0 -107
  573. package/dist/node_modules/@allyhub-next/runtime/dist/stage-kit.d.ts +0 -12
  574. package/dist/node_modules/@allyhub-next/runtime/dist/stage.d.ts +0 -34
  575. package/dist/node_modules/@allyhub-next/runtime/dist/styles.d.ts +0 -35
  576. package/dist/node_modules/@allyhub-next/runtime/dist/takes.d.ts +0 -72
  577. package/dist/node_modules/@allyhub-next/runtime/dist/titles.d.ts +0 -10
  578. package/dist/node_modules/@allyhub-next/runtime/dist/transitions.d.ts +0 -26
  579. package/dist/node_modules/@allyhub-next/site/dist/assets.d.ts +0 -59
  580. package/dist/node_modules/@allyhub-next/site/dist/assets.js +0 -2
  581. package/dist/node_modules/@allyhub-next/site/dist/astro.d.ts +0 -22
  582. package/dist/node_modules/@allyhub-next/site/dist/astro.js +0 -3
  583. package/dist/node_modules/@allyhub-next/site/dist/lockfile.d.ts +0 -40
  584. package/dist/node_modules/@allyhub-next/site/dist/lockfile.js +0 -3
  585. package/dist/node_modules/@allyhub-next/site/dist/media.d.ts +0 -24
  586. package/dist/node_modules/@allyhub-next/site/dist/media.js +0 -4
  587. package/dist/node_modules/@allyhub-next/site/package.json +0 -25
  588. package/dist/node_modules/@allyhub-next/slides-pptx/dist/charts.d.ts +0 -6
  589. package/dist/node_modules/@allyhub-next/slides-pptx/dist/fonts.d.ts +0 -45
  590. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.d.ts +0 -18
  591. package/dist/node_modules/@allyhub-next/slides-pptx/dist/import.js +0 -3
  592. package/dist/node_modules/@allyhub-next/slides-pptx/dist/index.d.ts +0 -5
  593. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.d.ts +0 -55
  594. package/dist/node_modules/@allyhub-next/slides-pptx/dist/read.js +0 -4
  595. package/dist/node_modules/@allyhub-next/slides-pptx/dist/shapes.d.ts +0 -67
  596. package/dist/node_modules/@allyhub-next/slides-pptx/dist/text.d.ts +0 -21
  597. package/dist/node_modules/@allyhub-next/slides-pptx/dist/theme.d.ts +0 -4
  598. package/dist/node_modules/@allyhub-next/slides-pptx/dist/timing.d.ts +0 -32
  599. package/dist/node_modules/@allyhub-next/slides-pptx/dist/write.d.ts +0 -32
  600. package/dist/node_modules/@allyhub-next/slides-pptx/dist/xml.d.ts +0 -26
  601. package/dist/node_modules/@allyhub-next/slides-runtime/dist/draw.d.ts +0 -40
  602. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.d.ts +0 -4
  603. package/dist/node_modules/@allyhub-next/slides-runtime/dist/edit.js +0 -2
  604. package/dist/node_modules/@allyhub-next/slides-runtime/dist/index.d.ts +0 -4
  605. package/dist/node_modules/@allyhub-next/slides-runtime/dist/ink.d.ts +0 -10
  606. package/dist/node_modules/@allyhub-next/slides-runtime/dist/load.d.ts +0 -6
  607. package/dist/node_modules/@allyhub-next/stage/dist/bakes.d.ts +0 -42
  608. package/dist/node_modules/@allyhub-next/stage/dist/graphics.d.ts +0 -7
  609. package/dist/node_modules/@allyhub-next/stage/dist/identity.d.ts +0 -2
  610. package/dist/node_modules/@allyhub-next/stage/dist/index.d.ts +0 -9
  611. package/dist/node_modules/@allyhub-next/stage/dist/page.d.ts +0 -87
  612. package/dist/node_modules/@allyhub-next/stage/dist/scenery-page.d.ts +0 -69
  613. package/dist/node_modules/@allyhub-next/stage/dist/scenery-solve.d.ts +0 -49
  614. package/dist/node_modules/@allyhub-next/stage/dist/scenery.d.ts +0 -8
  615. package/dist/node_modules/@allyhub-next/stage/dist/server.d.ts +0 -21
  616. package/dist/node_modules/@allyhub-next/stage-page/dist/host.d.ts +0 -22
  617. package/dist/node_modules/@allyhub-next/stage-page/dist/page.js +0 -79
  618. package/dist/site.d.ts +0 -2
  619. package/editor-web/assets/dist-Cg2PdedY.js +0 -6
  620. package/editor-web/assets/dist-CuW84oPe.js +0 -233
  621. package/editor-web/assets/dist-CxAS_vp7.js +0 -2
  622. package/editor-web/assets/dist-DCVaj9i1.js +0 -4
  623. package/editor-web/assets/dist-DGVUuVPB.js +0 -33
  624. package/editor-web/assets/dist-Yi3sy7Ea.js +0 -1
  625. package/editor-web/assets/index-B7S9RZhL.css +0 -2
  626. package/editor-web/assets/index-pwRfZ2Jv.js +0 -69
  627. package/editor-web/assets/minus-BizJdinJ.js +0 -1
  628. package/editor-web/assets/react-D54s6gwK.js +0 -101
  629. package/editor-web/assets/textarea-CvxipnGW.js +0 -105
  630. package/editor-web/assets/trash-2-Bq1Dt8XG.js +0 -1
  631. package/editor-web/assets/undo-2-Djhvu4xt.js +0 -1
  632. /package/dist/node_modules/@allyhub-next/{site → ooxml}/LICENSE +0 -0
@@ -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[];
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readMarks as le,markRuns as de}from"@allyhub-next/video-core";import{chartOfFile as se}from"./chart-file.js";import{AUTOSHAPE_STYLE as j,CONNECTOR_STYLE as V,DRAWN_TEXTBOX_FRAME as Z,TEXT_FALLBACK as q,TEXT_INSETS as N,placeholderFrame as fe,styleKindOf as pe}from"./office.js";import{resolveAnimation as ue,resolveTransition as J}from"./animation.js";import{pathSteps as ce}from"./path.js";import{masterPlaceholder as he}from"./placeholders.js";import{DECK_FONTS as me,OFFICE_THEME as ge,themeOver as _e}from"./theme.js";import{Pt as A}from"./units.js";export function joinPath(t,o){if(o.startsWith("/"))return o.slice(1);const m=t===""?[]:t.split("/");for(const l of o.split("/"))l===""||l==="."||(l===".."?m.pop():m.push(l));return m.join("/")}const Q={left:0,top:0,width:0,height:0},P=()=>Array.from({length:9},()=>({...q,font:{...q.font},margin_left:0}));export function levelsOver(t,...o){return t.map((m,l)=>{let s={...m,font:{...m.font}};for(const $ of o){const r=$?.[l];r&&(s={...s,...r.alignment===void 0?{}:{alignment:r.alignment},...r.line_spacing===void 0?{}:{line_spacing:r.line_spacing},...r.space_before===void 0?{}:{space_before:r.space_before},...r.space_after===void 0?{}:{space_after:r.space_after},...r.margin_left===void 0?{}:{margin_left:r.margin_left},...r.indent===void 0?{}:{indent:r.indent},font:{...s.font,...r.font}},r.font?.color!==void 0&&delete s.font.rgb,r.font?.rgb!==void 0&&delete s.font.color,r.bullet===null?delete s.bullet:r.bullet!==void 0?s.bullet={char:r.bullet,...r.bullet_font===void 0?{}:{font:r.bullet_font}}:r.bullet_font!==void 0&&s.bullet&&(s.bullet={...s.bullet,font:r.bullet_font}))}return s})}function K(t,...o){const m=o.filter(s=>s!==void 0),l=s=>{for(let $=m.length-1;$>=0;$--){const r=m[$]?.[s];if(r!==void 0)return r}};return{vertical_anchor:l("vertical_anchor")??t.vertical_anchor,auto_size:l("auto_size")??t.auto_size,word_wrap:l("word_wrap")??t.word_wrap,margins:{left:l("margin_left")??N.left,top:l("margin_top")??N.top,right:l("margin_right")??N.right,bottom:l("margin_bottom")??N.bottom}}}const I={vertical_anchor:"t",auto_size:"none",word_wrap:!0};export const plainLevels=t=>levelsOver(P(),t.text_styles.other);function B(t,o){return{...K(I,o),levels:levelsOver(P(),t.text_styles.other,o.levels)}}function ye(t,o,...m){return{...K(fe(o),...m),levels:levelsOver(P(),t.text_styles[pe(o)],...m.map(l=>l?.levels))}}const $e=Array.from({length:9},()=>({font:{color:j.font_color}})),ee={vertical_anchor:j.vertical_anchor};function ne(t,o){return{...K(I,o),levels:levelsOver(P(),t.text_styles.other,$e,o.levels)}}const L=t=>{const o={...t};return delete o.paragraphs,o},R=t=>({paragraphs:[],levels:[],...t}),W=t=>t==="none"?null:colorOfFile(t),xe=/<span((?:\s+(?:color|font)="[^"\n]*")+)\s*>(.*?)<\/span>/gu,be=/(color|font)="([^"\n]*)"/gu,D=57344,we=256,te="",ke=/[\ue000-\ue100]|[^\ue000-\ue100]+/gu;export const colorOfFile=t=>t.startsWith("#")?{rgb:t.toUpperCase()}:t;function ie(t,o,m=[]){return{...t,rows:t.rows.map((l,s)=>({height:l.height,cells:l.cells.map($=>{const r=m[s];return{...$,text:{paragraphs:$.text.paragraphs,style:H({...B(o,$.text),auto_size:"shape"},r),own:L($.text),empty:!1},...r?{fileText:r}:{}}})}))}}function H(t,o){return o?{...t,levels:t.levels.map(m=>{const l={...m.font,...o.size===void 0?{}:{size:A(o.size)},...o.bold===void 0?{}:{bold:o.bold},...o.italic===void 0?{}:{italic:o.italic},...o.font===void 0?{}:{name:o.font}};if(o.color!==void 0){const s=colorOfFile(o.color);typeof s=="string"?(l.color=s,delete l.rgb):(l.rgb=s.rgb,delete l.color)}return{...m,font:l,...o.align===void 0?{}:{alignment:o.align}}})}:t}function Se(t){const o={};for(const[,m,l=""]of t.matchAll(be))if(m==="font")o.name=l.trim();else{const s=colorOfFile(l);typeof s=="string"?o.color=s:o.rgb=s.rgb}return o}export function paragraphsOfWords(t,o=0,m=me.code){return t===void 0?[]:typeof t=="string"?t.split(/\r?\n/u).map(l=>{const s=[],$=l.replace(xe,(v,T,z)=>(s.push(Se(T)),`${String.fromCharCode(D+s.length-1)}${z}${te}`)),r=le($);let O;const E=de(r.text,r.marks).flatMap(v=>{const T=v.kinds.includes("code"),z={...v.kinds.includes("strong")?{bold:!0}:{},...v.kinds.includes("em")?{italic:!0}:{},...T?{name:m}:{}};return[...v.text.matchAll(ke)].flatMap(U=>{const M=U[0],F=M.charCodeAt(0);if(M===te)return O=void 0,[];if(F>=D&&F<D+we)return O=s[F-D],[];const C={...O,...z};return[{text:M,...Object.keys(C).length>0?{font:C}:{},...T?{code:!0}:{}}]})});return{runs:E.length>0?E:[{text:""}],level:o}}):t.flatMap(l=>paragraphsOfWords(l,Array.isArray(l)?Math.min(o+1,8):o,m))}const oe=t=>({left:A(t.x),top:A(t.y),width:A(t.w),height:A(t.h)}),re=t=>t===void 0?void 0:{left:t.left??0,top:t.top??0,right:t.right??0,bottom:t.bottom??0};export function resolveDeck(t){const{def:o,file:m,words:l,prefix:s,base:$}=t,r=[],O=_e(t.theme??ge,o.theme),E=new Map;for(const e of o.masters)for(const n of e.layouts)E.set(n.name,{layout:n,master:e});const v=[],T=(e,n,f)=>({name:e.name,kind:e.kind,frame:{...e.frame??Q},...e.flip?{flip:{...e.flip}}:{},...e.rotation===void 0?{}:{rotation:e.rotation},level:n,...e.text?{text:{paragraphs:e.text.paragraphs,style:e.kind==="autoshape"?ne(f,e.text):B(f,e.text),own:L(e.text),empty:!1}}:{},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{line_width:e.line_width},...e.line_dash===void 0?{}:{line_dash:e.line_dash},...e.line_begin===void 0?{}:{line_begin:e.line_begin},...e.line_end===void 0?{}:{line_end:e.line_end},...e.path?{path:e.path}:{},...e.table?{table:ie(e.table,f)}:{},...e.chart?{chart:e.chart}:{},...e.group===void 0?{}:{group:e.group},...e.geometry?{geometry:e.geometry}:{},...e.adjustments?{adjustments:[...e.adjustments]}:{},...e.media?{media:{path:joinPath(e.media.base,e.media.path),...e.media.poster===void 0?{}:{poster:e.media.poster}}}:{},...e.component?{component:{...e.component}}:{},sources:{frame:{from:n}}}),z=(e,n)=>{const f=e.placeholder?.type??"body",c=he(n,f),x=e.frame??c?.frame??Q;return{name:e.name,kind:"placeholder",frame:{...x},level:"slide",...e.placeholder?{placeholder:{...e.placeholder}}:{},text:{paragraphs:[],style:ye(n,f,c?.text,e.text),empty:!0},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},sources:{frame:{from:e.frame||!c?"layout":"master"},text:{from:"layout"}}}},U=(e,n,f)=>{const c=o.components[e];if(!c){r.push({...f,message:`There is no component ${e} in slides.ts (it has ${Object.keys(o.components).join(", ")||"none"}).`});return}for(const x of Object.keys(n??{}))Object.hasOwn(c.props,x)||r.push({...f,message:`Component ${e} has no prop ${x} a person sets (it has ${Object.keys(c.props).join(", ")||"none"}).`});return{name:e,props:{...n??{}}}},M=(e,n,f,c,x)=>{const b={slide:c,shape:e,path:f};if(!n.frame){r.push({...b,message:`Shape ${e} is the slide's own: it needs a frame { x, y, w, h } in points.`});return}const S=oe(n.frame),a={frame:{from:"slide",path:`${f}.frame`}},_={name:e,frame:S,level:"slide",...n.fill===void 0?{}:{fill:colorOfFile(n.fill)},...n.line===void 0?{}:{line:W(n.line)},...n.line_dash===void 0?{}:{line_dash:n.line_dash},...n.line_begin===void 0?{}:{line_begin:n.line_begin},...n.line_end===void 0?{}:{line_end:n.line_end},...n.group===void 0?{}:{group:n.group}};if(n.textbox)return{..._,kind:"textbox",text:{paragraphs:paragraphsOfWords(l(`${s}.${c}.${e}`),0,O.fonts.code),style:H(B(x,R(Z)),n.text),own:L(R(Z)),empty:!1},...n.text?{fileText:{...n.text}}:{},sources:{...a,text:{from:"slide",path:`${f}.text`}}};if(n.picture!==void 0){const d=re(n.crop);return{..._,kind:"picture",media:{path:joinPath($,n.picture),...d?{crop:d}:{}},sources:a}}if(n.movie!==void 0)return{..._,kind:"movie",media:{path:joinPath($,n.movie),...n.poster===void 0?{}:{poster:n.poster}},sources:a};if(n.chart){const d=l(`${s}.${c}.${e}`),h=se(n.chart,{title:typeof d=="string"?d:void 0,base:$,rows:i=>t.data?.(i),problem:i=>{r.push({...b,message:`Chart ${e}: ${i}`})}});return h?{..._,kind:"chart",chart:h,sources:a}:void 0}if(n.table){const d=n.table,h=S.width/d.columns.reduce((g,w)=>g+w,0),i=S.height/d.rows.reduce((g,w)=>g+w.height,0),p=l(`${s}.${c}.${e}`),y=Array.isArray(p)?p:[];return y.length>d.rows.length&&r.push({...b,message:`Table ${e} has ${String(d.rows.length)} rows and its words ${String(y.length)}.`}),{..._,kind:"table",table:ie({columns:d.columns.map(g=>Math.round(g*h)),rows:d.rows.map((g,w)=>{const k=y[w],X=Array.isArray(k)?k:k===void 0?[]:[k];return{height:Math.round(g.height*i),cells:d.columns.map((ve,ae)=>({text:{levels:[],paragraphs:paragraphsOfWords(X[ae],0,O.fonts.code)},...g.fill===void 0?{}:{fill:colorOfFile(g.fill)},...g.line===void 0?{}:{borders:{bottom:{color:colorOfFile(g.line),width:A(1)}}}}))}})},x,d.rows.map(g=>g.text)),sources:a}}const u=n.path&&ce(n.path.d);if(n.path&&!u){r.push({...b,message:`Shape ${e}'s path starts with M and says only M, L, C and Z, absolute.`});return}if(n.geometry!==void 0||n.path&&u)return{..._,kind:"autoshape",...n.path&&u?{path:{w:n.path.w,h:n.path.h,steps:u}}:n.geometry===void 0?{}:{geometry:n.geometry},...n.geometry==="line"?{line:n.line===void 0?V.line:W(n.line),line_width:n.line_width===void 0?V.line_width:A(n.line_width)}:{fill:n.fill===void 0?j.fill:colorOfFile(n.fill),line:n.line===void 0?j.line:W(n.line),line_width:n.line_width===void 0?j.line_width:A(n.line_width)},...n.text&&n.geometry!=="line"?{fileText:{...n.text}}:{},...n.geometry==="line"?{}:{text:{paragraphs:paragraphsOfWords(l(`${s}.${c}.${e}`)).map(d=>n.text?.align===void 0?{alignment:j.alignment,...d}:d),style:H(ne(x,R(ee)),n.text),own:L(R(ee)),empty:!1}},sources:{...a,fill:{from:"slide",path:`${f}.fill`}}};if(n.component!==void 0){const d=U(n.component,n.props,b);return d?{..._,kind:"component",component:d,sources:a}:void 0}},F=(e,n,f)=>{if(n.frame&&(e.frame=oe(n.frame),e.sources.frame={from:"slide",path:`${f}.frame`}),n.text&&e.text&&(e.text.style=H(e.text.style,n.text),e.fileText={...n.text},e.sources.text={from:"slide",path:`${f}.text`}),n.line!==void 0&&(e.line=W(n.line),e.sources.line={from:"slide",path:`${f}.line`}),n.line_width!==void 0&&(e.line_width=A(n.line_width)),n.line_dash!==void 0&&(e.line_dash=n.line_dash),n.line_begin!==void 0&&(e.line_begin=n.line_begin),n.line_end!==void 0&&(e.line_end=n.line_end),n.fill!==void 0&&(e.fill=colorOfFile(n.fill),e.sources.fill={from:"slide",path:`${f}.fill`}),(n.picture!==void 0||n.movie!==void 0)&&(e.placeholder?.type==="pic"||e.placeholder?.type==="media"||e.placeholder?.type==="obj")){const c=re(n.crop);e.kind=n.picture!==void 0?"picture":"movie",e.media={path:joinPath($,n.picture??n.movie??""),...c?{crop:c}:{},...n.poster===void 0?{}:{poster:n.poster}},delete e.text}},C=(e,n,f,c,x)=>{const b=E.get(n);if(!b){r.push({slide:e,path:`slides.${String(f)}.layout`,message:`Slide ${e} is on the layout "${n}", which slides.ts does not have (it has ${[...E.keys()].join(", ")||"none"}).`});return}const{layout:S,master:a}=b,_=[...(S.display_master_shapes===!1?[]:a.shapes).filter(d=>d.kind!=="placeholder").map(d=>T(d,"master",a)),...S.shapes.filter(d=>d.kind!=="placeholder").map(d=>T(d,"layout",a))],u=S.shapes.filter(d=>d.kind==="placeholder").map((d,h)=>({shape:z(d,a),order:h}));return{slide:{id:e,layout:S.name,master:a.name,hidden:c,background:S.background??a.background,shapes:_,animations:[],file:{index:f,...x===void 0?{}:{generate:x}}},placed:u,master:a}},G=(e,n,f,c,x,b,S,a,_)=>{const u=new Set(f.map(h=>h.shape.name));let d=f.length;for(const[h,i]of Object.entries(c??{})){const p=b(h);if(p===void 0)continue;const y=`${x}.shapes.${h}`,g=i.textbox!==void 0||i.geometry!==void 0||i.path!==void 0||i.table!==void 0||i.chart!==void 0||i.component!==void 0||(i.picture!==void 0||i.movie!==void 0)&&!u.has(p),w=f.find(X=>X.shape.name===p);if(w&&!g){F(w.shape,i,y),i.z!==void 0&&(w.z=i.z);continue}if(w){r.push({slide:e.id,shape:p,path:y,message:`Slide ${e.id} has a ${w.shape.kind} ${p} already: a shape of its own needs another name.`});continue}if(!g){r.push({slide:e.id,shape:p,path:y,message:`Slide ${e.id} has no shape ${p} to change (its layout's placeholders and its own shapes are ${[...u].join(", ")||"none"}).`});continue}const k=M(p,i,y,e.id,n);k&&(f.push({shape:k,order:d++,...i.z===void 0?{}:{z:i.z}}),u.add(p))}f.sort((h,i)=>(h.z??0)-(i.z??0)||h.order-i.order);for(const h of f){const i=h.shape.text;if(h.shape.kind==="placeholder"&&i){const p=S(h.shape);i.paragraphs=paragraphsOfWords(p,0,O.fonts.code),i.empty=i.paragraphs.length===0||i.paragraphs.every(y=>y.runs.every(g=>g.text===""))}}e.shapes.push(...f.map(h=>h.shape)),a!==void 0&&a.trim()!==""&&(e.notes=a);for(const[h,i]of(_??[]).entries()){const p=b(i.shape);if(p===void 0)continue;const y={slide:e.id,shape:p,path:`${x}.animations.${String(h)}`},g=e.shapes.find(k=>k.name===p&&k.level==="slide");if(!g){r.push({...y,message:`Slide ${e.id} has no shape ${p} to animate (it has ${e.shapes.filter(k=>k.level==="slide").map(k=>k.name).join(", ")}).`});continue}if(i.paragraph!==void 0&&i.paragraph>=(g.text?.paragraphs.length??0)){r.push({...y,message:`Shape ${p} has no paragraph ${String(i.paragraph)} to animate (it has ${String(g.text?.paragraphs.length??0)}).`});continue}const w=ue({...i,shape:p});w?e.animations.push(w):r.push({...y,message:`The animation of ${p} needs a path that starts with M and says only M, L and C, absolute.`})}},Y=new Set;return m.slides.forEach((e,n)=>{const f=`slides.${String(n)}`;if(e.layout!==void 0){const a=C(e.id,e.layout,n,e.hidden===!0);if(!a)return;const _=l(`${s}.${e.id}.notes`);e.transition&&(a.slide.transition=J(e.transition)),G(a.slide,a.master,a.placed,e.shapes,f,u=>u,u=>l(`${s}.${e.id}.${u.name}`),typeof _=="string"?_:void 0,e.animations),v.push(a.slide),Y.add(e.id);return}const c=e.generate??"",x=o.generators[c];if(!x){r.push({slide:e.id,path:`${f}.generate`,message:`There is no generator ${c} in slides.ts (it has ${Object.keys(o.generators).join(", ")||"none"}).`});return}let b;try{b=x.make({data:t.data??(()=>{throw new Error("No data here.")})})}catch(a){r.push({slide:e.id,path:`${f}.generate`,message:`Generator ${c} failed: ${a instanceof Error?a.message:String(a)}`});return}const S=new Set(Array.isArray(e.hidden)?e.hidden:[]);for(const a of b){const _=`${e.id}/${a.id}`,u=C(_,a.layout,n,S.has(a.id),c);if(!u)continue;for(const i of a.shapes){const p=i.placeholder?u.placed.find(y=>y.shape.placeholder?.idx===i.placeholder?.idx):void 0;if(p)i.frame&&(p.shape.frame={...i.frame}),p.shape.sources.frame={from:"code"};else{const y=T(i,"layout",u.master);u.placed.push({shape:{...y,level:"slide",sources:{frame:{from:"code"}}},order:u.placed.length})}}const d=`${a.id}/`,h=a.transition??(a===b[0]?e.transition:void 0);h&&(u.slide.transition=J(h)),G(u.slide,u.master,u.placed,e.shapes,f,i=>i.startsWith(d)?i.slice(d.length):void 0,i=>{const p=i.placeholder===void 0?void 0:a.text[i.placeholder.idx];return p===void 0?void 0:p.map(y=>y.runs.map(g=>g.text).join(""))},a.notes,[...(a.animations??[]).map(i=>({...i,shape:`${d}${i.shape}`})),...e.animations??[]]);for(const i of u.slide.shapes){const p=i.placeholder===void 0?void 0:a.text[i.placeholder.idx];p&&i.text&&(i.text.paragraphs=p,i.text.empty=!1)}v.push(u.slide),Y.add(_)}for(const a of Object.keys(e.shapes??{})){const[_]=a.split("/");_!==void 0&&!b.some(u=>u.id===_)&&r.push({slide:e.id,path:`${f}.shapes.${a}`,message:`Generator ${c} makes no slide ${_}: ${a} changes nothing.`})}}),{deck:{width:o.slide_width,height:o.slide_height,theme:O,slides:v},problems:r}}
2
+ import{colorOfFile as Q}from"@allyhub-next/formats";import{readMarks as ge,markRuns as _e}from"@allyhub-next/video-core";import{chartOfFile as be}from"./chart-file.js";import{AUTOSHAPE_STYLE as C,SHADOW_DEFAULTS as H,CONNECTOR_STYLE as ee,DRAWN_TEXTBOX_FRAME as ne,TEXT_FALLBACK as te,TEXT_INSETS as W,isConnectorGeometry as ye,placeholderFrame as $e,styleKindOf as xe}from"./office.js";import{resolveAnimation as we,resolveTransition as ie}from"./animation.js";import{pathSteps as ke}from"./path.js";import{masterPlaceholder as ve}from"./placeholders.js";import{DECK_FONTS as Se,OFFICE_THEME as Ae,themeOver as Oe}from"./theme.js";import{Pt as S}from"./units.js";export function joinPath(i,t){if(t.startsWith("/"))return t.slice(1);const u=i===""?[]:i.split("/");for(const o of t.split("/"))o===""||o==="."||(o===".."?u.pop():u.push(o));return u.join("/")}const re={left:0,top:0,width:0,height:0},U=()=>Array.from({length:9},()=>({...te,font:{...te.font},margin_left:0}));export function levelsOver(i,...t){return i.map((u,o)=>{let r={...u,font:{...u.font}};for(const y of t){const l=y?.[o];l&&(r={...r,...l.alignment===void 0?{}:{alignment:l.alignment},...l.line_spacing===void 0?{}:{line_spacing:l.line_spacing},...l.space_before===void 0?{}:{space_before:l.space_before},...l.space_after===void 0?{}:{space_after:l.space_after},...l.margin_left===void 0?{}:{margin_left:l.margin_left},...l.indent===void 0?{}:{indent:l.indent},font:{...r.font,...l.font}},l.numbered!==void 0&&(r.numbered=l.numbered,delete r.bullet),l.bullet===null?(delete r.bullet,delete r.numbered):l.bullet!==void 0?(delete r.numbered,r.bullet={char:l.bullet,...l.bullet_font===void 0?{}:{font:l.bullet_font}}):l.bullet_font!==void 0&&r.bullet&&(r.bullet={...r.bullet,font:l.bullet_font}))}return r})}function I(i,...t){const u=t.filter(r=>r!==void 0),o=r=>{for(let y=u.length-1;y>=0;y--){const l=u[y]?.[r];if(l!==void 0)return l}};return{vertical_anchor:o("vertical_anchor")??i.vertical_anchor,auto_size:o("auto_size")??i.auto_size,word_wrap:o("word_wrap")??i.word_wrap,margins:{left:o("margin_left")??W.left,top:o("margin_top")??W.top,right:o("margin_right")??W.right,bottom:o("margin_bottom")??W.bottom}}}const oe={vertical_anchor:"t",auto_size:"none",word_wrap:!0};export const plainLevels=i=>levelsOver(U(),i.text_styles.other);function V(i,t){return{...I(oe,t),levels:levelsOver(U(),i.text_styles.other,t.levels)}}function Te(i,t,...u){return{...I($e(t),...u),levels:levelsOver(U(),i.text_styles[xe(t)],...u.map(o=>o?.levels))}}const Ee=Array.from({length:9},()=>({font:{color:C.font_color}})),ae={vertical_anchor:C.vertical_anchor};function le(i,t){return{...I(oe,t),levels:levelsOver(U(),i.text_styles.other,Ee,t.levels)}}const X=i=>{const t={...i};return delete t.paragraphs,t},G=i=>({paragraphs:[],levels:[],...i}),z=i=>i==="none"?null:colorOfFile(i),je=/<span((?:\s+(?:color|font|size|bold|italic|underline|link|highlight|baseline|strike)="[^"\n]*")+)\s*>(.*?)<\/span>/gu,Fe=/(color|font|size|bold|italic|underline|link|highlight|baseline|strike)="([^"\n]*)"/gu,K=57344,Ne=256,de="",ze=/[\ue000-\ue100]|[^\ue000-\ue100]+/gu;export const colorOfFile=i=>Q(i)??"dk1";function Z(i){const{shadow:t,gradient:u}=i;return{...i.fill_transparency===void 0?{}:{fill_transparency:i.fill_transparency},...u?{gradient:{angle:u.angle??0,stops:u.stops.map(o=>({at:o.at,color:colorOfFile(o.color),...o.transparency===void 0?{}:{transparency:o.transparency}}))}}:{},...t?{shadow:{color:t.color===void 0?H.color:colorOfFile(t.color),blur:t.blur===void 0?H.blur:S(t.blur),distance:t.distance===void 0?H.distance:S(t.distance),angle:t.angle??H.angle,transparency:t.transparency??H.transparency}}:{}}}function se(i,t,u=[]){return{...i,rows:i.rows.map((o,r)=>({height:o.height,cells:o.cells.map(y=>{const l=u[r];return{...y,text:{paragraphs:y.text.paragraphs,style:B({...V(t,y.text),auto_size:"shape"},l),own:X(y.text),empty:!1},...l?{fileText:l}:{}}})}))}}function B(i,t){return t?{...i,...t.anchor===void 0?{}:{vertical_anchor:t.anchor},levels:i.levels.map(u=>{const o={...u.font,...t.size===void 0?{}:{size:S(t.size)},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.underline===void 0?{}:{underline:t.underline},...t.strike===void 0?{}:{strike:t.strike},...t.font===void 0?{}:{name:t.font}};t.color!==void 0&&(o.color=colorOfFile(t.color));const r={...u,font:o,...t.align===void 0?{}:{alignment:t.align},...t.line_spacing===void 0?{}:{line_spacing:{lines:t.line_spacing}},...t.space_before===void 0?{}:{space_before:S(t.space_before)},...t.space_after===void 0?{}:{space_after:S(t.space_after)}};return t.numbered!==void 0?(r.numbered=t.numbered,delete r.bullet):t.bullet===!1?(delete r.bullet,delete r.numbered):t.bullet!==void 0&&(r.bullet={char:t.bullet},delete r.numbered),(t.numbered!==void 0||t.bullet!==void 0&&t.bullet!==!1)&&u.margin_left===0?{...r,margin_left:fe,indent:-fe}:r})}:i}function Me(i,t){if(!t)return[...i];const u=t.numbered!==void 0||t.bullet!==void 0;return i.map(o=>{const r={...o};return t.align!==void 0&&delete r.alignment,t.line_spacing!==void 0&&delete r.line_spacing,t.space_before!==void 0&&delete r.space_before,t.space_after!==void 0&&delete r.space_after,u&&(delete r.bullet,delete r.bullet_font,delete r.numbered),r})}function Ce(i){const t={};for(const[,u,o=""]of i.matchAll(Fe))if(u==="font")t.name=o.trim();else if(u==="link")t.link=o.trim();else if(u==="highlight")t.highlight=o.trim().toUpperCase();else if(u==="bold")t.bold=o.trim()!=="false";else if(u==="italic")t.italic=o.trim()!=="false";else if(u==="strike")t.strike=o.trim()!=="false";else if(u==="underline")t.underline=o.trim()!=="false";else if(u==="size"){const r=Number(o);Number.isFinite(r)&&r>0&&(t.size=S(r))}else if(u==="baseline"){const r=Number(o);Number.isFinite(r)&&(t.baseline=r)}else{const r=Q(o.trim());r!==void 0&&(t.color=r)}return t}const fe=342900;export function paragraphsOfWords(i,t=0,u=Se.code){return i===void 0?[]:typeof i=="string"?i.split(/\r?\n/u).map(o=>{const r=[],y=o.replace(je,(T,N,P)=>(r.push(Ce(N)),`${String.fromCharCode(K+r.length-1)}${P}${de}`)),l=ge(y);let F;const M=_e(l.text,l.marks).flatMap(T=>{const N=T.kinds.includes("code"),P={...T.kinds.includes("strong")?{bold:!0}:{},...T.kinds.includes("em")?{italic:!0}:{},...N?{name:u}:{}};return[...T.text.matchAll(ze)].flatMap(Y=>{const L=Y[0],R=L.charCodeAt(0);if(L===de)return F=void 0,[];if(R>=K&&R<K+Ne)return F=r[R-K],[];const D={...F,...P};return[{text:L,...Object.keys(D).length>0?{font:D}:{},...N?{code:!0}:{}}]})});return{runs:M.length>0?M:[{text:""}],level:t}}):i.flatMap(o=>paragraphsOfWords(o,Array.isArray(o)?Math.min(t+1,8):t,u))}const ue=i=>({left:S(i.x),top:S(i.y),width:S(i.w),height:S(i.h)}),Pe=new Set(["dt","ftr","sldNum"]),ce=i=>({...i.locked?{locked:!0}:{},...i.rotation===void 0||i.rotation===0?{}:{rotation:i.rotation},...i.flip_h||i.flip_v?{flip:{...i.flip_h?{h:!0}:{},...i.flip_v?{v:!0}:{}}}:{}});function pe(i,t,u){if(!t)return;t.fill!==void 0&&(i.background=colorOfFile(t.fill));const o=t.gradient&&Z({gradient:t.gradient}).gradient;o&&(i.background_gradient=o),t.picture!==void 0&&(i.background_picture=joinPath(u,t.picture))}const he=i=>i===void 0?void 0:{left:i.left??0,top:i.top??0,right:i.right??0,bottom:i.bottom??0};export function resolveDeck(i){const{code:t,file:u,words:o,prefix:r,base:y}=i,l=[],F=Oe(i.theme??Ae,t.theme),M=new Map;for(const e of t.masters)for(const n of e.layouts)M.set(n.name,{layout:n,master:e});const T=[],N=(e,n,a)=>({name:e.name,kind:e.kind,frame:{...e.frame??re},...e.flip?{flip:{...e.flip}}:{},...e.rotation===void 0?{}:{rotation:e.rotation},level:n,...e.text?{text:{paragraphs:e.text.paragraphs,style:e.kind==="autoshape"?le(a,e.text):V(a,e.text),own:X(e.text),empty:!1}}:{},...e.fill===void 0?{}:{fill:e.fill},...e.fill_transparency===void 0?{}:{fill_transparency:e.fill_transparency},...e.gradient?{gradient:e.gradient}:{},...e.shadow?{shadow:e.shadow}:{},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{line_width:e.line_width},...e.line_dash===void 0?{}:{line_dash:e.line_dash},...e.line_begin===void 0?{}:{line_begin:e.line_begin},...e.line_end===void 0?{}:{line_end:e.line_end},...e.path?{path:e.path}:{},...e.table?{table:se(e.table,a)}:{},...e.chart?{chart:e.chart}:{},...e.group===void 0?{}:{group:e.group},...e.geometry?{geometry:e.geometry}:{},...e.adjustments?{adjustments:[...e.adjustments]}:{},...e.media?{media:{path:joinPath(e.media.base,e.media.path),...e.media.poster===void 0?{}:{poster:e.media.poster}}}:{},...e.component?{component:{...e.component}}:{},sources:{frame:{from:n}}}),P=(e,n)=>{const a=e.placeholder?.type??"body",g=ve(n,a),_=e.frame??g?.frame??re;return{name:e.name,kind:"placeholder",frame:{..._},level:"slide",...e.placeholder?{placeholder:{...e.placeholder}}:{},text:{paragraphs:[],style:Te(n,a,g?.text,e.text),empty:!0},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},sources:{frame:{from:e.frame||!g?"layout":"master"},text:{from:"layout"}}}},Y=(e,n,a)=>{const g=t.components[e];if(!g){l.push({...a,message:`There is no component ${e} in slides.ts (it has ${Object.keys(t.components).join(", ")||"none"}).`});return}for(const _ of Object.keys(n??{}))Object.hasOwn(g.props,_)||l.push({...a,message:`Component ${e} has no prop ${_} a person sets (it has ${Object.keys(g.props).join(", ")||"none"}).`});return{name:e,props:{...n??{}}}},L=(e,n,a,g,_)=>{const $={slide:g,shape:e,path:a};if(!n.frame){l.push({...$,message:`Shape ${e} is the slide's own: it needs a frame { x, y, w, h } in points.`});return}const w=ue(n.frame),d={frame:{from:"slide",path:`${a}.frame`}},b={name:e,frame:w,level:"slide",...n.fill===void 0?{}:{fill:z(n.fill)},...Z(n),...n.line===void 0?{}:{line:z(n.line)},...n.line_dash===void 0?{}:{line_dash:n.line_dash},...n.line_begin===void 0?{}:{line_begin:n.line_begin},...n.line_end===void 0?{}:{line_end:n.line_end},...n.group===void 0?{}:{group:n.group},...ce(n)};if(n.textbox)return{...b,kind:"textbox",text:{paragraphs:paragraphsOfWords(o(`${r}.${g}.${e}`),0,F.fonts.code),style:B(V(_,G(ne)),n.text),own:X(G(ne)),empty:!1},...n.text?{fileText:{...n.text}}:{},sources:{...d,text:{from:"slide",path:`${a}.text`}}};if(n.picture!==void 0){const s=he(n.crop);return{...b,kind:"picture",media:{path:joinPath(y,n.picture),...s?{crop:s}:{}},sources:{...d,media:{from:"slide",path:`${a}.picture`}}}}if(n.movie!==void 0)return{...b,kind:"movie",media:{path:joinPath(y,n.movie),...n.poster===void 0?{}:{poster:n.poster}},sources:{...d,media:{from:"slide",path:`${a}.movie`}}};if(n.chart){const s=o(`${r}.${g}.${e}`),k=be(n.chart,{title:typeof s=="string"?s:void 0,base:y,rows:m=>i.data?.(m),problem:m=>{l.push({...$,message:`Chart ${e}: ${m}`})}});return k?{...b,kind:"chart",chart:k,sources:d}:void 0}if(n.table){const s=n.table,k=w.width/s.columns.reduce((f,c)=>f+c,0),m=w.height/s.rows.reduce((f,c)=>f+c.height,0),x=o(`${r}.${g}.${e}`),O=Array.isArray(x)?x:[];return O.length>s.rows.length&&l.push({...$,message:`Table ${e} has ${String(s.rows.length)} rows and its words ${String(O.length)}.`}),{...b,kind:"table",table:se({columns:s.columns.map(f=>Math.round(f*k)),rows:s.rows.map((f,c)=>{const p=O[c],v=Array.isArray(p)?p:p===void 0?[]:[p];return{height:Math.round(f.height*m),cells:s.columns.map((E,A)=>({text:{levels:[],paragraphs:paragraphsOfWords(v[A],0,F.fonts.code)},...f.fill===void 0?{}:{fill:colorOfFile(f.fill)},...f.line===void 0?{}:{borders:{bottom:{color:colorOfFile(f.line),width:S(1)}}}}))}})},_,s.rows.map(f=>f.text)),sources:d}}const h=n.path&&ke(n.path.d);if(n.path&&!h){l.push({...$,message:`Shape ${e}'s path starts with M and says only M, L, C and Z, absolute.`});return}if(n.geometry!==void 0||n.path&&h){const s=!n.path&&ye(n.geometry);return{...b,kind:"autoshape",...n.path&&h?{path:{w:n.path.w,h:n.path.h,steps:h}}:n.geometry===void 0?{}:{geometry:n.geometry,...n.adjustments?{adjustments:[...n.adjustments]}:{}},...s?{line:n.line===void 0?ee.line:z(n.line),line_width:n.line_width===void 0?ee.line_width:S(n.line_width)}:{fill:n.fill===void 0?C.fill:z(n.fill),line:n.line===void 0?C.line:z(n.line),line_width:n.line_width===void 0?C.line_width:S(n.line_width)},...n.text&&!s?{fileText:{...n.text}}:{},...s?{}:{text:{paragraphs:paragraphsOfWords(o(`${r}.${g}.${e}`)).map(k=>n.text?.align===void 0?{alignment:C.alignment,...k}:k),style:B(le(_,G(ae)),n.text),own:X(G(ae)),empty:!1}},sources:{...d,fill:{from:"slide",path:`${a}.fill`}}}}if(n.component!==void 0){const s=Y(n.component,n.props,$);return s?{...b,kind:"component",component:s,sources:d}:void 0}},R=(e,n,a)=>{if(n.frame&&(e.frame=ue(n.frame),e.sources.frame={from:"slide",path:`${a}.frame`}),Object.assign(e,ce(n)),n.text&&e.text&&(e.text.style=B(e.text.style,n.text),e.text.paragraphs=Me(e.text.paragraphs,n.text),e.fileText={...n.text},e.sources.text={from:"slide",path:`${a}.text`}),n.line!==void 0&&(e.line=z(n.line),e.sources.line={from:"slide",path:`${a}.line`}),n.line_width!==void 0&&(e.line_width=S(n.line_width)),n.line_dash!==void 0&&(e.line_dash=n.line_dash),n.line_begin!==void 0&&(e.line_begin=n.line_begin),n.line_end!==void 0&&(e.line_end=n.line_end),n.fill!==void 0&&(e.fill=z(n.fill),e.sources.fill={from:"slide",path:`${a}.fill`}),Object.assign(e,Z(n)),(n.picture!==void 0||n.movie!==void 0)&&(e.placeholder?.type==="pic"||e.placeholder?.type==="media"||e.placeholder?.type==="obj")){const g=he(n.crop);e.kind=n.picture!==void 0?"picture":"movie",e.media={path:joinPath(y,n.picture??n.movie??""),...g?{crop:g}:{},...n.poster===void 0?{}:{poster:n.poster}},e.sources.media={from:"slide",path:`${a}.${n.picture!==void 0?"picture":"movie"}`},delete e.text}},D=(e,n,a,g,_)=>{const $=M.get(n);if(!$){l.push({slide:e,path:`slides.${String(a)}.layout`,message:`Slide ${e} is on the layout "${n}", which slides.ts does not have (it has ${[...M.keys()].join(", ")||"none"}).`});return}const{layout:w,master:d}=$,b=[...(w.display_master_shapes===!1?[]:d.shapes).filter(s=>s.kind!=="placeholder").map(s=>N(s,"master",d)),...w.shapes.filter(s=>s.kind!=="placeholder").map(s=>N(s,"layout",d))],h=w.shapes.filter(s=>s.kind==="placeholder").map((s,k)=>({shape:P(s,d),order:k}));return{slide:{id:e,layout:w.name,master:d.name,hidden:g,background:w.background??d.background,shapes:b,animations:[],file:{index:a,..._===void 0?{}:{generate:_}}},placed:h,master:d}},q=(e,n,a,g,_,$,w,d,b,h=()=>{})=>{const s=new Set(a.map(f=>f.shape.name));let k=a.length;for(const[f,c]of Object.entries(g??{})){const p=$(f);if(p===void 0)continue;const v=`${_}.shapes.${f}`,E=c.textbox!==void 0||c.geometry!==void 0||c.path!==void 0||c.table!==void 0||c.chart!==void 0||c.component!==void 0||(c.picture!==void 0||c.movie!==void 0)&&!s.has(p),A=a.find(me=>me.shape.name===p);if(A&&!E){R(A.shape,c,v),A.shown=!0,c.z!==void 0&&(A.z=c.z);continue}if(A){l.push({slide:e.id,shape:p,path:v,message:`Slide ${e.id} has a ${A.shape.kind} ${p} already: a shape of its own needs another name.`});continue}if(!E){l.push({slide:e.id,shape:p,path:v,message:`Slide ${e.id} has no shape ${p} to change (its layout's placeholders and its own shapes are ${[...s].join(", ")||"none"}).`});continue}const j=L(p,c,v,e.id,n);j&&(a.push({shape:j,order:k++,...c.z===void 0?{}:{z:c.z}}),s.add(p))}const m=a.filter(f=>f.shown===!0||!Pe.has(f.shape.placeholder?.type??"")||w(f.shape)!==void 0);a.splice(0,a.length,...m),a.sort((f,c)=>(f.z??0)-(c.z??0)||f.order-c.order);const x=new Map(a.flatMap((f,c)=>f.shape.group===void 0?[]:[[f.shape.group,c]])),O=a.flatMap((f,c)=>{const p=f.shape.group;return p===void 0?[f]:x.get(p)===c?a.filter(v=>v.shape.group===p):[]});a.splice(0,a.length,...O);for(const f of a){const c=h(f.shape);c!==void 0&&(f.shape.alt=c);const p=f.shape.text;if(f.shape.kind==="placeholder"&&p){const v=w(f.shape);p.paragraphs=paragraphsOfWords(v,0,F.fonts.code),p.empty=p.paragraphs.length===0||p.paragraphs.every(E=>E.runs.every(A=>A.text===""))}}e.shapes.push(...a.map(f=>f.shape)),d!==void 0&&d.trim()!==""&&(e.notes=d);for(const[f,c]of(b??[]).entries()){const p=$(c.shape);if(p===void 0)continue;const v={slide:e.id,shape:p,path:`${_}.animations.${String(f)}`},E=e.shapes.find(j=>j.name===p&&j.level==="slide");if(!E){l.push({...v,message:`Slide ${e.id} has no shape ${p} to animate (it has ${e.shapes.filter(j=>j.level==="slide").map(j=>j.name).join(", ")}).`});continue}if(c.paragraph!==void 0&&c.paragraph>=(E.text?.paragraphs.length??0)){l.push({...v,message:`Shape ${p} has no paragraph ${String(c.paragraph)} to animate (it has ${String(E.text?.paragraphs.length??0)}).`});continue}const A=we({...c,shape:p});A?e.animations.push(A):l.push({...v,message:`The animation of ${p} needs a path that starts with M and says only M, L and C, absolute.`})}},J=new Set;return u.slides.forEach((e,n)=>{const a=`slides.${String(n)}`;if(e.layout!==void 0){const d=D(e.id,e.layout,n,e.hidden===!0);if(!d)return;const b=o(`${r}.${e.id}.notes`);e.transition&&(d.slide.transition=ie(e.transition)),e.advance_after!==void 0&&(d.slide.advance=e.advance_after),pe(d.slide,e.background,y),q(d.slide,d.master,d.placed,e.shapes,a,h=>h,h=>o(`${r}.${e.id}.${h.name}`),typeof b=="string"?b:void 0,e.animations,h=>{const s=o(`${r}.${e.id}.alt.${h.name}`);return typeof s=="string"?s:void 0}),T.push(d.slide),J.add(e.id);return}const g=e.generate??"",_=t.generators[g];if(_===void 0){l.push({slide:e.id,path:`${a}.generate`,message:`There is no generator ${g} in slides.ts (it has ${Object.keys(t.generators).join(", ")||"none"}).`});return}if(!Array.isArray(_)){l.push({slide:e.id,path:`${a}.generate`,message:`Generator ${g} threw: ${_.error}`,..._.stack===void 0?{}:{stack:_.stack}});return}const $=_,w=new Set(Array.isArray(e.hidden)?e.hidden:[]);for(const d of $){const b=`${e.id}/${d.id}`,h=D(b,d.layout,n,w.has(d.id),g);if(!h)continue;for(const m of d.shapes){const x=m.placeholder?h.placed.find(O=>O.shape.placeholder?.idx===m.placeholder?.idx):void 0;if(x)m.frame&&(x.shape.frame={...m.frame}),x.shape.sources.frame={from:"code"},x.shown=!0;else{const O=N(m,"layout",h.master);h.placed.push({shape:{...O,level:"slide",sources:{frame:{from:"code"}}},order:h.placed.length})}}const s=`${d.id}/`,k=d.transition??(d===$[0]?e.transition:void 0);pe(h.slide,e.background,y),k&&(h.slide.transition=ie(k)),q(h.slide,h.master,h.placed,e.shapes,a,m=>m.startsWith(s)?m.slice(s.length):void 0,m=>{const x=m.placeholder===void 0?void 0:d.text[m.placeholder.idx];return x===void 0?void 0:x.map(O=>O.runs.map(f=>f.text).join(""))},d.notes,[...(d.animations??[]).map(m=>({...m,shape:`${s}${m.shape}`})),...e.animations??[]]);for(const m of h.slide.shapes){const x=m.placeholder===void 0?void 0:d.text[m.placeholder.idx];x&&m.text&&(m.text.paragraphs=x,m.text.empty=!1)}T.push(h.slide),J.add(b)}for(const d of Object.keys(e.shapes??{})){const[b]=d.split("/");b!==void 0&&!$.some(h=>h.id===b)&&l.push({slide:e.id,path:`${a}.shapes.${d}`,message:`Generator ${g} makes no slide ${b}: ${d} changes nothing.`})}}),T.forEach((e,n)=>{for(const a of e.shapes)a.placeholder?.type==="sldNum"&&a.text&&(a.text.paragraphs=[{level:0,runs:[{text:String(n+1),field:"slidenum"}]}],a.text.empty=!1)}),{deck:{width:t.slide_width,height:t.slide_height,theme:F,slides:T},problems:l}}