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
@@ -0,0 +1,49 @@
1
+ import type { Area } from "../address.js";
2
+ import { Matrix, type Scalar } from "../values.js";
3
+ /** A value as plain data. */
4
+ export type WireScalar = number | string | boolean | null | {
5
+ error: string;
6
+ };
7
+ /** A formula cell as a pass left it. */
8
+ export interface WireCell {
9
+ sheet: number;
10
+ row: number;
11
+ col: number;
12
+ value: WireScalar;
13
+ array?: {
14
+ rows: number;
15
+ cols: number;
16
+ data: WireScalar[];
17
+ };
18
+ spill?: Area;
19
+ blocked?: Area;
20
+ }
21
+ /** What a pass computed, since the last one was sent. */
22
+ export interface Computed {
23
+ cells: WireCell[];
24
+ /** Each circular reference, as its cells. */
25
+ cycles: {
26
+ sheet: number;
27
+ row: number;
28
+ col: number;
29
+ }[][];
30
+ /** The rows filters hide, by sheet: every sheet that has some. */
31
+ hidden: {
32
+ sheet: number;
33
+ rows: number[];
34
+ }[];
35
+ }
36
+ export declare const toWire: (v: Scalar) => WireScalar;
37
+ /** A value from plain data; an error code that is none is #VALUE!. */
38
+ export declare function fromWire(v: WireScalar): Scalar;
39
+ export declare const matrixToWire: (m: Matrix) => {
40
+ rows: number;
41
+ cols: number;
42
+ data: WireScalar[];
43
+ };
44
+ export declare const matrixFromWire: (m: {
45
+ rows: number;
46
+ cols: number;
47
+ data: WireScalar[];
48
+ }) => Matrix;
49
+ //# sourceMappingURL=remote.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{CellError as o,ERR as t,Matrix as e,errorOf as a}from"../values.js";export const toWire=r=>r instanceof o?{error:r.code}:r;export function fromWire(r){return r===null||typeof r!="object"?r:a(r.error)??t.VALUE}export const matrixToWire=r=>({rows:r.rows,cols:r.cols,data:r.data.map(toWire)}),matrixFromWire=r=>new e(r.rows,r.cols,r.data.map(fromWire));
@@ -0,0 +1,82 @@
1
+ import type { SheetFile } from "@allyhub-next/formats";
2
+ import type { BookEdit } from "../edit.js";
3
+ import type { GeneratedSheets } from "../generated.js";
4
+ import { type CsvRows, type Workbook } from "../workbook.js";
5
+ import { Calc } from "./engine.js";
6
+ import type { Computed } from "./remote.js";
7
+ /** A changed cell as plain data, which crosses postMessage. */
8
+ export interface CellEdit {
9
+ /** The sheet's place in the workbook. */
10
+ sheet: number;
11
+ row: number;
12
+ col: number;
13
+ /** What it now holds, as typed; absent: empty. */
14
+ input?: string;
15
+ /** A table's calculated column whose formula it holds again. */
16
+ column?: {
17
+ table: string;
18
+ name: string;
19
+ };
20
+ /** sheet.yaml's key for it now; null: it has none. */
21
+ key?: string | null;
22
+ /** The CSV record of a table's row, now. */
23
+ record?: {
24
+ table: string;
25
+ index: number;
26
+ fields: string[];
27
+ };
28
+ }
29
+ /** An edit's changed cells, as plain data. */
30
+ export declare function cellEditsOf(edit: BookEdit): CellEdit[];
31
+ /**
32
+ * Changed cells put in a model and computed, or, for a replica, put in to
33
+ * wait for what a calculation elsewhere computes: sheet.yaml's keys, a
34
+ * table's records, the format a value typed implies, and the cell itself.
35
+ */
36
+ export declare function applyCellEdits(wb: Workbook, calc: Calc, cells: readonly CellEdit[], file?: SheetFile): void;
37
+ /** What a workbook is opened from. */
38
+ export interface Opening {
39
+ file: SheetFile;
40
+ rows: readonly (readonly [string, CsvRows])[];
41
+ /** What RAND is seeded with. */
42
+ seed: string;
43
+ generated?: GeneratedSheets;
44
+ /** The scenario on show. */
45
+ scenario?: string;
46
+ }
47
+ /** A model made from what its files say, computing or a replica. */
48
+ export declare function openWorkbook(o: Opening, mode?: {
49
+ report?: boolean;
50
+ replica?: boolean;
51
+ }): {
52
+ workbook: Workbook;
53
+ calc: Calc;
54
+ };
55
+ /**
56
+ * What a calculation elsewhere is told. Each opening starts a generation;
57
+ * what is said of an earlier one is left unanswered, and its answers are
58
+ * dropped by the page.
59
+ */
60
+ export type CalcRequest = ({
61
+ kind: "open";
62
+ generation: number;
63
+ } & Opening) | {
64
+ kind: "cells";
65
+ generation: number;
66
+ cells: CellEdit[];
67
+ file?: SheetFile;
68
+ } | {
69
+ kind: "recalculate";
70
+ generation: number;
71
+ };
72
+ export interface CalcReply {
73
+ generation: number;
74
+ computed: Computed;
75
+ }
76
+ /** The calculation a worker runs: a request in, what it computed out. */
77
+ export declare class CalcServer {
78
+ private model;
79
+ private generation;
80
+ handle(r: CalcRequest): CalcReply | undefined;
81
+ }
82
+ //# sourceMappingURL=server.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{applyScenario as p}from"../scenario.js";import{readTyped as h}from"../values.js";import{FormulaCell as m,SharedFormula as k,placeKey as y,workbookOf as b}from"../workbook.js";import{Calc as g,seededRandom as w}from"./engine.js";export function cellEditsOf(o){return o.cells.map(e=>{const r=e.column?e.sheet.tables.flatMap(t=>t.columns.map(i=>({table:t.name,col:i}))).find(t=>t.col.formula===e.column):void 0;return{sheet:e.sheet.index,row:e.row,col:e.col,...e.input===void 0?{}:{input:e.input},...r?{column:{table:r.table,name:r.col.name}}:{},...e.key===void 0?{}:{key:e.key},...e.record?{record:{table:e.record.table.name,index:e.record.index,fields:e.record.fields}}:{}}})}export function applyCellEdits(o,e,r,t){t&&o.respec(t);const i=[];for(const n of r){const l=o.sheets[n.sheet];if(!l)continue;const{row:d,col:a}=n,c=y(d,a);if(n.key===null?l.keys.delete(c):n.key!==void 0&&l.keys.set(c,n.key),n.record){const u=o.table(n.record.table);u&&(u.records[n.record.index]=n.record.fields)}l.implied.delete(c);const f=n.column?o.table(n.column.table)?.columns.find(u=>u.name===n.column?.name)?.formula:void 0;if(f){i.push({sheet:l,row:d,col:a,slot:new m(f,l,d,a)});continue}const s=h(n.input??"");s.format!==void 0&&l.implied.set(c,s.format),i.push({sheet:l,row:d,col:a,slot:s.formula===void 0?s.value??void 0:new m(new k(s.formula,d,a,{file:""}),l,d,a)})}e.change(i)}export function openWorkbook(o,e={}){const r=new Map(o.rows),t=b({file:o.file,rows:n=>r.get(n),generated:o.generated});o.scenario!==void 0&&p(t,o.scenario);const i=new g(t,{random:w(o.seed),...e}).calculate();return{workbook:t,calc:i}}export class CalcServer{model;generation=-1;handle(e){if(e.kind==="open")this.model=openWorkbook(e,{report:!0}),this.generation=e.generation;else{if(e.generation!==this.generation||!this.model)return;e.kind==="cells"?applyCellEdits(this.model.workbook,this.model.calc,e.cells,e.file):this.model.calc.recalculate()}return{generation:this.generation,computed:this.model.calc.takeComputed()}}}
@@ -24,7 +24,12 @@ export declare class Lambda {
24
24
  readonly params: readonly string[];
25
25
  readonly body: Node;
26
26
  readonly frame: Frame;
27
- constructor(params: readonly string[], body: Node, frame: Frame);
27
+ /**
28
+ * A function named alone (SUM in GROUPBY(…,SUM)), called with whatever
29
+ * it is given, as many arguments as the function takes.
30
+ */
31
+ readonly named: string | undefined;
32
+ constructor(params: readonly string[], body: Node, frame: Frame, named?: string);
28
33
  }
29
34
  /** A function's argument left empty. */
30
35
  export declare class Missing {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- export class Reference{sheet;top;left;bottom;right;constructor(t,i,r,e,o){this.sheet=t,this.top=i,this.left=r,this.bottom=e,this.right=o}get rows(){return this.bottom-this.top+1}get cols(){return this.right-this.left+1}get single(){return this.top===this.bottom&&this.left===this.right}get key(){return`${String(this.sheet.index)}!${String(this.top)},${String(this.left)}:${String(this.bottom)},${String(this.right)}`}}export class Union{parts;constructor(t){this.parts=t}}export class Lambda{params;body;frame;constructor(t,i,r){this.params=t,this.body=i,this.frame=r}}export class Missing{missing=!0}export const MISSING=new Missing;
2
+ export class Reference{sheet;top;left;bottom;right;constructor(t,i,r,e,o){this.sheet=t,this.top=i,this.left=r,this.bottom=e,this.right=o}get rows(){return this.bottom-this.top+1}get cols(){return this.right-this.left+1}get single(){return this.top===this.bottom&&this.left===this.right}get key(){return`${String(this.sheet.index)}!${String(this.top)},${String(this.left)}:${String(this.bottom)},${String(this.right)}`}}export class Union{parts;constructor(t){this.parts=t}}export class Lambda{params;body;frame;named;constructor(t,i,r,e){this.params=t,this.body=i,this.frame=r,this.named=e}}export class Missing{missing=!0}export const MISSING=new Missing;
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{chartDrawing as B,isRound as F,isScatter as R}from"@allyhub-next/chart";import{cellName as U,columnLetter as q,contains as I,rangeName as j,readAddress as V,readArea as W}from"./address.js";import{Reference as N,Union as G}from"./calc/types.js";import{shownValue as J}from"./format.js";import{sheetPrefix as D}from"./formula/print.js";import{CellError as K,Matrix as T}from"./values.js";export const SHEET_CHART_DEFAULTS={width:480,height:288,size:9,titleSize:14,ink:"#595959",pixelsToPoints:.75};const Q={dk1:"#000000",lt1:"#FFFFFF",dk2:"#44546A",lt2:"#E7E6E6",accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47",hlink:"#0563C1",folHlink:"#954F72"},k=e=>typeof e=="string"?Q[e]??"#000000":e.rgb;function z(e,o,n){const{node:t}=n;if(!t)return[];const i=e.eval(t,{sheet:o,row:0,col:0,dr:0,dc:0}),s=u=>{const a=u.sheet,h=e.filtered(a),m=[],x=Math.min(u.bottom,a.lastRow),g=Math.min(u.right,a.columnsUsed-1);for(let c=u.top;c<=x;c++)if(!(h.has(c)||a.spec.rows?.[String(c+1)]?.hidden===!0))for(let l=u.left;l<=g;l++)a.spec.columns?.[q(l)]?.hidden!==!0&&m.push({value:e.value(a,c,l),sheet:a,row:c,col:l});return m};if(i instanceof N)return s(i);if(i instanceof G)return i.parts.flatMap(s);if(i instanceof T)return i.data.map(u=>({value:u}));const r=e.flat(i);return r instanceof T?r.data.map(u=>({value:u})):[{value:r}]}const E=e=>{if(e.value===null)return"";const o=e.sheet&&e.row!==void 0&&e.col!==void 0?e.sheet.lookAt(e.row,e.col).format:void 0;return J(e.value,o)};function H(e){return typeof e=="number"?Number.isFinite(e)?e:null:e===null||e instanceof K?null:typeof e=="boolean"&&e?1:0}const P=e=>e&&{...e.min===void 0?{}:{minimum_scale:e.min},...e.max===void 0?{}:{maximum_scale:e.max},...e.major===void 0?{}:{major_unit:e.major},...e.gridlines===void 0?{}:{has_major_gridlines:e.gridlines},...e.visible===void 0?{}:{visible:e.visible},...e.format===void 0?{}:{number_format:e.format},...e.reverse===void 0?{}:{reverse_order:e.reverse},...e.title===void 0||e.title===""?{}:{title:e.title}},C=e=>e===void 0?void 0:{rgb:e};function X(e){if(e===void 0||e===!1)return;if(e===!0)return{show_value:!0};const o=typeof e.color=="string"?C(e.color):void 0;return{...e.value===void 0?{}:{show_value:e.value},...e.percentage===void 0?{}:{show_percentage:e.percentage},...e.category===void 0?{}:{show_category_name:e.category},...e.series===void 0?{}:{show_series_name:e.series},...e.format===void 0?{}:{number_format:e.format},...e.position===void 0?{}:{position:e.position},...e.size===void 0?{}:{size:e.size},...o?{color:o}:{}}}const Y=e=>{const o=e.find(n=>n.sheet);return o?.sheet&&o.row!==void 0&&o.col!==void 0?o.sheet.lookAt(o.row,o.col).format:void 0};export function chartDef(e,o,n){const{spec:t}=n,i=R(t.type),s=n.categories?z(e,o,n.categories):void 0,r=n.series.map((l,b)=>{const p=t.series[b],v=z(e,o,l.values),$=l.name?z(e,o,l.name)[0]:void 0,A=l.x?z(e,o,l.x):i?s:void 0,w=p.format??Y(v),y=C(p.color);return{name:($?E($):p.name)??`Series${String(b+1)}`,values:v.map(f=>H(f.value)),...A?{x:A.map(f=>H(f.value))}:{},...w===void 0?{}:{number_format:w},...y?{color:y}:{},...p.smooth===void 0?{}:{smooth:p.smooth},...p.line_width===void 0?{}:{line_width:p.line_width},...p.marker_size===void 0?{}:{marker_size:p.marker_size}}}),u=Math.max(0,...r.map(l=>l.values.length)),a=s?s.map(E):Array.from({length:u},(l,b)=>String(b+1)),h=n.title?z(e,o,n.title)[0]:void 0,m=h?E(h):t.title,x=X(t.labels),g=P(t.value_axis),c=P(t.category_axis);return{type:t.type,categories:a,series:r,...m===void 0||m===""?{}:{title:m},...t.legend===void 0?{}:{legend:t.legend},...x?{labels:x}:{},...t.gap_width===void 0?{}:{gap_width:t.gap_width},...t.overlap===void 0?{}:{overlap:t.overlap},...t.vary_by_categories===void 0?{}:{vary_by_categories:t.vary_by_categories},...t.hole_size===void 0?{}:{hole_size:t.hole_size},...g?{value_axis:g}:{},...c?{category_axis:c}:{},font_size:t.size??SHEET_CHART_DEFAULTS.size,title_size:t.title_size??SHEET_CHART_DEFAULTS.titleSize,font_color:C(t.color)??{rgb:SHEET_CHART_DEFAULTS.ink}}}export const chartSize=e=>({width:e.width??SHEET_CHART_DEFAULTS.width,height:e.height??SHEET_CHART_DEFAULTS.height});const Z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},O=e=>e.replace(/[&<>"]/gu,o=>Z[o]??o),d=e=>String(Number(e.toFixed(3)));function L(e){const o=e.fill===void 0?"none":k(e.fill),n=e.width>0?k(e.color):"none";return`<path d="${O(e.d)}" fill="${o}" stroke="${n}" stroke-width="${d(e.width)}" stroke-linejoin="round"/>`}function ee(e){const o=[];for(const n of[...e.grid,...e.shapes])o.push(L(n));for(const n of[...e.boxes,...e.keys])o.push(`<rect x="${d(n.x)}" y="${d(n.y)}" width="${d(n.width)}" height="${d(n.height)}" fill="${k(n.color)}"/>`);for(const n of[...e.axes,...e.lines])o.push(L(n));for(const n of e.dots)o.push(`<circle cx="${d(n.x)}" cy="${d(n.y)}" r="${d(n.r)}" fill="${k(n.color)}"/>`);for(const n of e.words){const t=n.rotate===void 0?"":` transform="rotate(${d(n.rotate)} ${d(n.x)} ${d(n.y)})"`;o.push(`<text x="${d(n.x)}" y="${d(n.y)}" font-size="${d(n.size)}" text-anchor="${n.anchor}" dominant-baseline="central" fill="${k(n.color)}"${t}>${O(n.text)}</text>`)}return o.join("")}export function chartSvg(e,o,n,t={}){const i=SHEET_CHART_DEFAULTS.pixelsToPoints,s=o*i,r=n*i,u=t.font??"Carlito, Calibri, Arial, sans-serif",a=t.paper??"#FFFFFF",h=t.edge??"#D9D9D9";return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${d(s)} ${d(r)}" width="${d(o)}" height="${d(n)}" font-family="${O(u)}"><rect x="0.375" y="0.375" width="${d(s-.75)}" height="${d(r-.75)}" fill="${a}" stroke="${h==="none"?"none":h}" stroke-width="0.75"/>${ee(B(e,s,r))}</svg>`}export function chartAfter(e,o){const n=i=>i?.startsWith("=")===!0?o(i):i,t=n(e.title);return{...e,...t===void 0?{}:{title:t},...e.categories===void 0?{}:{categories:o(e.categories)},series:e.series.map(i=>{const s=n(i.name);return{...i,values:o(i.values),...i.x===void 0?{}:{x:o(i.x)},...s===void 0?{}:{name:s}}})}}function te(e,o,n,t){if(t){const i=t.data;if(n.top===i.top&&n.bottom===i.bottom&&n.left===n.right){const s=t.columns[n.left-t.at.col];if(s)return`${t.name}[${s.name}]`}}return`${o===e?"":D(o.name)}${j(n)}`}const ne=(e,o,n,t)=>typeof e.value(o,n,t)=="number",oe=(e,o,n,t)=>{const i=e.value(o,n,t);if(typeof i=="string")return!0;const s=o.lookAt(n,t).format;return typeof i=="number"&&s!==void 0&&/[ymd]/iu.test(s)};export function chartOfRange(e,o,n,t,i){const s=t.bottom-t.top+1,r=t.right-t.left+1,u=o.tables.find(f=>I(f.area,t.top,t.left)),a=f=>te(n,o,f,u),h=R(i),m=s>1&&Array.from({length:r},(f,_)=>t.left+_).some(f=>!ne(e,o,t.top,f)),x=r>1&&(h||Array.from({length:s-(m?1:0)},(f,_)=>_).every(f=>oe(e,o,t.top+(m?1:0)+f,t.left)||e.value(o,t.top+(m?1:0)+f,t.left)===null)),g=t.top+(m?1:0),c=t.left+(x?1:0);if(g>t.bottom||c>t.right)return;const l=!h&&!F(i)&&t.right-c>t.bottom-g,b=[],p=(f,_)=>e.value(o,f,_)===null?void 0:`=${o===n?"":D(o.name)}${U({row:f,col:_})}`,v=l?{first:g,last:t.bottom}:{first:c,last:t.right};for(let f=v.first;f<=v.last;f++){const _=l?{top:f,left:c,bottom:f,right:t.right}:{top:g,left:f,bottom:t.bottom,right:f},M=l?x?p(f,t.left):void 0:m?p(t.top,f):void 0;b.push({values:a(_),...M===void 0?{}:{name:M}})}const $=l?m?{top:t.top,left:c,bottom:t.top,right:t.right}:void 0:x?{top:g,left:t.left,bottom:t.bottom,right:t.left}:void 0,A=b.length>1&&!F(i),w=F(i)?b.slice(0,1):b,y=w.length===1?w[0]?.name:void 0;return{type:i,...$?{categories:a($)}:{},series:w,...A||F(i)?{legend:"bottom"}:{},...y===void 0?{}:{title:y}}}function S(e,o,n){if(!n?.node)return;const t=e.eval(n.node,{sheet:o,row:0,col:0,dr:0,dc:0});return t instanceof N?{sheet:t.sheet,area:{top:t.top,left:t.left,bottom:Math.min(t.bottom,Math.max(t.top,t.sheet.lastRow)),right:t.right}}:void 0}export function chartDataRange(e,o,n){const t=[S(e,o,n.categories),...n.series.flatMap(r=>[S(e,o,r.values),S(e,o,r.name),S(e,o,r.x)])].filter(r=>r!==void 0),i=t[0];if(!i||t.some(r=>r.sheet!==i.sheet))return;const s={top:Math.min(...t.map(r=>r.area.top)),left:Math.min(...t.map(r=>r.area.left)),bottom:Math.max(...t.map(r=>r.area.bottom)),right:Math.max(...t.map(r=>r.area.right))};return`${i.sheet===o?"":D(i.sheet.name)}${j(s)}`}export function readDataRange(e,o,n){const t=n.lastIndexOf("!"),i=t<0?void 0:n.slice(0,t).replace(/^'|'$/gu,""),s=i===void 0?o:e.wb.sheet(i.replaceAll("''","'")),r=W(n.slice(t+1).replaceAll("$",""));return s&&r?{sheet:s,area:r}:void 0}export function chartPlace(e,o,n){const t=V(e.at)??{row:0,col:0};return{left:n(t.col)+(e.x??0),top:o(t.row)+(e.y??0),...chartSize(e)}}
2
+ import{chartDrawing as B,colorRgb as U,isRound as F,isScatter as R}from"@allyhub-next/chart";import{cellName as q,columnLetter as I,contains as V,rangeName as j,readAddress as W,readArea as G}from"./address.js";import{Reference as N,Union as J}from"./calc/types.js";import{shownValue as K}from"./format.js";import{sheetPrefix as D}from"./formula/print.js";import{CellError as Q,Matrix as T}from"./values.js";export const SHEET_CHART_DEFAULTS={width:480,height:288,size:9,titleSize:14,ink:"#595959",pixelsToPoints:.75};const X={dk1:"#000000",lt1:"#FFFFFF",dk2:"#44546A",lt2:"#E7E6E6",accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47",hlink:"#0563C1",folHlink:"#954F72"},k=e=>U(e,X);function z(e,o,n){const{node:t}=n;if(!t)return[];const i=e.eval(t,{sheet:o,row:0,col:0,dr:0,dc:0}),s=u=>{const a=u.sheet,p=e.filtered(a),m=[],x=Math.min(u.bottom,a.lastRow),g=Math.min(u.right,a.columnsUsed-1);for(let c=u.top;c<=x;c++)if(!(p.has(c)||a.spec.rows?.[String(c+1)]?.hidden===!0))for(let d=u.left;d<=g;d++)a.spec.columns?.[I(d)]?.hidden!==!0&&m.push({value:e.value(a,c,d),sheet:a,row:c,col:d});return m};if(i instanceof N)return s(i);if(i instanceof J)return i.parts.flatMap(s);if(i instanceof T)return i.data.map(u=>({value:u}));const r=e.flat(i);return r instanceof T?r.data.map(u=>({value:u})):[{value:r}]}const E=e=>{if(e.value===null)return"";const o=e.sheet&&e.row!==void 0&&e.col!==void 0?e.sheet.lookAt(e.row,e.col).format:void 0;return K(e.value,o)};function H(e){return typeof e=="number"?Number.isFinite(e)?e:null:e===null||e instanceof Q?null:typeof e=="boolean"&&e?1:0}const P=e=>e&&{...e.min===void 0?{}:{minimum_scale:e.min},...e.max===void 0?{}:{maximum_scale:e.max},...e.major===void 0?{}:{major_unit:e.major},...e.gridlines===void 0?{}:{has_major_gridlines:e.gridlines},...e.visible===void 0?{}:{visible:e.visible},...e.format===void 0?{}:{number_format:e.format},...e.reverse===void 0?{}:{reverse_order:e.reverse},...e.title===void 0||e.title===""?{}:{title:e.title}},C=e=>e===void 0?void 0:{rgb:e};function Y(e){if(e===void 0||e===!1)return;if(e===!0)return{show_value:!0};const o=typeof e.color=="string"?C(e.color):void 0;return{...e.value===void 0?{}:{show_value:e.value},...e.percentage===void 0?{}:{show_percentage:e.percentage},...e.category===void 0?{}:{show_category_name:e.category},...e.series===void 0?{}:{show_series_name:e.series},...e.format===void 0?{}:{number_format:e.format},...e.position===void 0?{}:{position:e.position},...e.size===void 0?{}:{size:e.size},...o?{color:o}:{}}}const Z=e=>{const o=e.find(n=>n.sheet);return o?.sheet&&o.row!==void 0&&o.col!==void 0?o.sheet.lookAt(o.row,o.col).format:void 0};export function chartDef(e,o,n){const{spec:t}=n,i=R(t.type),s=n.categories?z(e,o,n.categories):void 0,r=n.series.map((d,b)=>{const h=t.series[b],v=z(e,o,d.values),$=d.name?z(e,o,d.name)[0]:void 0,A=d.x?z(e,o,d.x):i?s:void 0,w=h.format??Z(v),y=C(h.color);return{name:($?E($):h.name)??`Series${String(b+1)}`,values:v.map(f=>H(f.value)),...A?{x:A.map(f=>H(f.value))}:{},...w===void 0?{}:{number_format:w},...y?{color:y}:{},...h.smooth===void 0?{}:{smooth:h.smooth},...h.line_width===void 0?{}:{line_width:h.line_width},...h.marker_size===void 0?{}:{marker_size:h.marker_size}}}),u=Math.max(0,...r.map(d=>d.values.length)),a=s?s.map(E):Array.from({length:u},(d,b)=>String(b+1)),p=n.title?z(e,o,n.title)[0]:void 0,m=p?E(p):t.title,x=Y(t.labels),g=P(t.value_axis),c=P(t.category_axis);return{type:t.type,categories:a,series:r,...m===void 0||m===""?{}:{title:m},...t.legend===void 0?{}:{legend:t.legend},...x?{labels:x}:{},...t.gap_width===void 0?{}:{gap_width:t.gap_width},...t.overlap===void 0?{}:{overlap:t.overlap},...t.vary_by_categories===void 0?{}:{vary_by_categories:t.vary_by_categories},...t.hole_size===void 0?{}:{hole_size:t.hole_size},...g?{value_axis:g}:{},...c?{category_axis:c}:{},font_size:t.size??SHEET_CHART_DEFAULTS.size,title_size:t.title_size??SHEET_CHART_DEFAULTS.titleSize,font_color:C(t.color)??{rgb:SHEET_CHART_DEFAULTS.ink}}}export const chartSize=e=>({width:e.width??SHEET_CHART_DEFAULTS.width,height:e.height??SHEET_CHART_DEFAULTS.height});const ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},O=e=>e.replace(/[&<>"]/gu,o=>ee[o]??o),l=e=>String(Number(e.toFixed(3)));function L(e){const o=e.fill===void 0?"none":k(e.fill),n=e.width>0?k(e.color):"none";return`<path d="${O(e.d)}" fill="${o}" stroke="${n}" stroke-width="${l(e.width)}" stroke-linejoin="round"/>`}function te(e){const o=[];for(const n of[...e.grid,...e.shapes])o.push(L(n));for(const n of[...e.boxes,...e.keys])o.push(`<rect x="${l(n.x)}" y="${l(n.y)}" width="${l(n.width)}" height="${l(n.height)}" fill="${k(n.color)}"/>`);for(const n of[...e.axes,...e.lines])o.push(L(n));for(const n of e.dots)o.push(`<circle cx="${l(n.x)}" cy="${l(n.y)}" r="${l(n.r)}" fill="${k(n.color)}"/>`);for(const n of e.words){const t=n.rotate===void 0?"":` transform="rotate(${l(n.rotate)} ${l(n.x)} ${l(n.y)})"`;o.push(`<text x="${l(n.x)}" y="${l(n.y)}" font-size="${l(n.size)}" text-anchor="${n.anchor}" dominant-baseline="central" fill="${k(n.color)}"${t}>${O(n.text)}</text>`)}return o.join("")}export function chartSvg(e,o,n,t={}){const i=SHEET_CHART_DEFAULTS.pixelsToPoints,s=o*i,r=n*i,u=t.font??"Carlito, Calibri, Arial, sans-serif",a=t.paper??"#FFFFFF",p=t.edge??"#D9D9D9";return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${l(s)} ${l(r)}" width="${l(o)}" height="${l(n)}" font-family="${O(u)}"><rect x="0.375" y="0.375" width="${l(s-.75)}" height="${l(r-.75)}" fill="${a}" stroke="${p==="none"?"none":p}" stroke-width="0.75"/>${te(B(e,s,r))}</svg>`}export function chartAfter(e,o){const n=i=>i?.startsWith("=")===!0?o(i):i,t=n(e.title);return{...e,...t===void 0?{}:{title:t},...e.categories===void 0?{}:{categories:o(e.categories)},series:e.series.map(i=>{const s=n(i.name);return{...i,values:o(i.values),...i.x===void 0?{}:{x:o(i.x)},...s===void 0?{}:{name:s}}})}}function ne(e,o,n,t){if(t){const i=t.data;if(n.top===i.top&&n.bottom===i.bottom&&n.left===n.right){const s=t.columns[n.left-t.at.col];if(s)return`${t.name}[${s.name}]`}}return`${o===e?"":D(o.name)}${j(n)}`}const oe=(e,o,n,t)=>typeof e.value(o,n,t)=="number",ie=(e,o,n,t)=>{const i=e.value(o,n,t);if(typeof i=="string")return!0;const s=o.lookAt(n,t).format;return typeof i=="number"&&s!==void 0&&/[ymd]/iu.test(s)};export function chartOfRange(e,o,n,t,i){const s=t.bottom-t.top+1,r=t.right-t.left+1,u=o.tables.find(f=>V(f.area,t.top,t.left)),a=f=>ne(n,o,f,u),p=R(i),m=s>1&&Array.from({length:r},(f,_)=>t.left+_).some(f=>!oe(e,o,t.top,f)),x=r>1&&(p||Array.from({length:s-(m?1:0)},(f,_)=>_).every(f=>ie(e,o,t.top+(m?1:0)+f,t.left)||e.value(o,t.top+(m?1:0)+f,t.left)===null)),g=t.top+(m?1:0),c=t.left+(x?1:0);if(g>t.bottom||c>t.right)return;const d=!p&&!F(i)&&t.right-c>t.bottom-g,b=[],h=(f,_)=>e.value(o,f,_)===null?void 0:`=${o===n?"":D(o.name)}${q({row:f,col:_})}`,v=d?{first:g,last:t.bottom}:{first:c,last:t.right};for(let f=v.first;f<=v.last;f++){const _=d?{top:f,left:c,bottom:f,right:t.right}:{top:g,left:f,bottom:t.bottom,right:f},M=d?x?h(f,t.left):void 0:m?h(t.top,f):void 0;b.push({values:a(_),...M===void 0?{}:{name:M}})}const $=d?m?{top:t.top,left:c,bottom:t.top,right:t.right}:void 0:x?{top:g,left:t.left,bottom:t.bottom,right:t.left}:void 0,A=b.length>1&&!F(i),w=F(i)?b.slice(0,1):b,y=w.length===1?w[0]?.name:void 0;return{type:i,...$?{categories:a($)}:{},series:w,...A||F(i)?{legend:"bottom"}:{},...y===void 0?{}:{title:y}}}function S(e,o,n){if(!n?.node)return;const t=e.eval(n.node,{sheet:o,row:0,col:0,dr:0,dc:0});return t instanceof N?{sheet:t.sheet,area:{top:t.top,left:t.left,bottom:Math.min(t.bottom,Math.max(t.top,t.sheet.lastRow)),right:t.right}}:void 0}export function chartDataRange(e,o,n){const t=[S(e,o,n.categories),...n.series.flatMap(r=>[S(e,o,r.values),S(e,o,r.name),S(e,o,r.x)])].filter(r=>r!==void 0),i=t[0];if(!i||t.some(r=>r.sheet!==i.sheet))return;const s={top:Math.min(...t.map(r=>r.area.top)),left:Math.min(...t.map(r=>r.area.left)),bottom:Math.max(...t.map(r=>r.area.bottom)),right:Math.max(...t.map(r=>r.area.right))};return`${i.sheet===o?"":D(i.sheet.name)}${j(s)}`}export function readDataRange(e,o,n){const t=n.lastIndexOf("!"),i=t<0?void 0:n.slice(0,t).replace(/^'|'$/gu,""),s=i===void 0?o:e.wb.sheet(i.replaceAll("''","'")),r=G(n.slice(t+1).replaceAll("$",""));return s&&r?{sheet:s,area:r}:void 0}export function chartPlace(e,o,n){const t=W(e.at)??{row:0,col:0};return{left:n(t.col)+(e.x??0),top:o(t.row)+(e.y??0),...chartSize(e)}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{cellName as d,rangeName as b}from"./address.js";import{ERR as p,Matrix as w,CellError as m}from"./values.js";import{analyse as $}from"./calc/analyse.js";import{Calc as k}from"./calc/engine.js";import{toBool as g}from"./calc/coerce.js";import{ENTRY as l}from"./file.js";import{fileCells as x}from"./files.js";import{applyScenario as y}from"./scenario.js";import{readWorkbook as S}from"./workbook.js";class O{problems;wb;lineOf;constructor(t,e){this.wb=t,this.problems=[...e.problems],this.lineOf=e.lineOf}at(t,e){const o=t.line??(t.path===void 0?void 0:this.lineOf(t.path));this.problems.push({file:t.file===""?l:t.file,...o===void 0?{}:{line:o},message:e})}formulas(){const t=new Map;for(const e of this.wb.sheets){for(const o of e.formulas)t.set(o.shared,e);for(const o of e.tables)for(const n of o.columns)n.formula&&t.set(n.formula,e);for(const o of e.conditions)for(const n of o.formulas)t.set(n,e);for(const o of e.validations)for(const n of o.formulas)n&&t.set(n,e);for(const o of e.charts){o.title&&t.set(o.title,e),o.categories&&t.set(o.categories,e);for(const n of o.series)t.set(n.values,e),n.x&&t.set(n.x,e),n.name&&t.set(n.name,e)}}for(const e of this.wb.names.values())e.formula&&t.set(e.formula,void 0);for(const e of this.wb.checks)t.set(e.formula,void 0);return t}formulaProblems(){for(const[t,e]of this.formulas()){const o=s=>{this.at(t.source,`${t.text}: ${s}`)};if(t.error){o(`does not parse: ${t.error.message}`);continue}const n=$(this.wb,t);t.analysis=n;for(const s of new Set(n.unknownNames))o(`there is no name ${s}`);for(const s of new Set(n.unknownFunctions))o(`there is no function ${s}`);for(const s of n.arguments)o(`${s.name} takes ${s.min===s.max?String(s.min):`${String(s.min)} to ${String(s.max)}`} arguments and is given ${String(s.given)}`);for(const s of n.reads){if(s.kind==="ref"){for(const r of[s.sheet,s.lastSheet])r!==void 0&&!this.wb.sheet(r)&&o(`there is no sheet ${r}`);continue}const f=s.table===void 0?e?.tableAt(t.row,t.col):this.wb.table(s.table);if(!f){o(s.table===void 0?"a column named with no table, outside a table":`there is no table ${s.table}`);continue}for(const r of s.columns)f.column(r)||o(`table ${f.name} has no column ${r}; it has ${f.columns.map(c=>c.name).join(", ")}`)}}}cycles(t){for(const e of t.cycles){const o=e.reduce((r,c,h)=>{const a=e[r];return a&&(c.row<a.row||c.row===a.row&&c.col<a.col)?h:r},0),n=[...e.slice(o),...e.slice(0,o)],s=n[0];if(!s)continue;const f=[...n,s].map(r=>`${r.sheet.name}!${d(r)}`).join(" → ");this.at(s.shared.source,`a circular reference: ${f}`)}}scenarios(){const{scenarios:t}=this.wb.file;for(const[e,o]of Object.entries(t??{}))for(const n of Object.keys(o))this.wb.name(n)||this.at({file:l,path:["scenarios",e,n]},`scenario ${e} sets ${n}, and there is no name ${n}`)}files(t,e){for(const o of this.wb.sheets)for(const{row:n,col:s,paths:f}of x(o,t))for(const r of f)e(r)||this.at(this.wb.sourceOf(o,n,s)??{file:l},`${placeName(o,n,s)} names ${r}, which is not there`)}checks(t){const e=this.wb.sheets[0];if(e)for(const o of this.wb.checks){if(!o.formula.node)continue;const n=t.evaluate(o.formula,e),s=u(n);s!==void 0&&this.at(o.source,`check "${o.name}" does not hold: ${o.formula.text} is ${s}`)}}}function u(i){if(i instanceof w){for(const e of i.data){const o=u(e);if(o!==void 0)return o}return}if(i instanceof m)return i.code;const t=g(i);return t instanceof m?p.VALUE.code:t?void 0:"FALSE"}export function checkWorkbook(i,t={}){const e=S(i),{workbook:o}=e;if(!o)return{problems:e.problems};const n=new O(o,e);n.scenarios(),t.scenario!==void 0&&y(o,t.scenario);const s=new k(o,t);return n.formulaProblems(),s.calculate(),n.cycles(s),n.checks(s),i.exists&&n.files(s,i.exists),{workbook:o,calc:s,problems:n.problems}}export const placeName=(i,t,e)=>`${i.name}!${b({top:t,left:e,bottom:t,right:e})}`;
2
+ import{cellName as d,rangeName as b}from"./address.js";import{ERR as p,Matrix as $,CellError as m}from"./values.js";import{analyse as w}from"./calc/analyse.js";import{Calc as g}from"./calc/engine.js";import{toBool as k}from"./calc/coerce.js";import{ENTRY as l}from"./file.js";import{fileCells as S}from"./files.js";import{applyScenario as x}from"./scenario.js";import{readWorkbook as v}from"./workbook.js";class y{problems;wb;lineOf;constructor(t,o){this.wb=t,this.problems=[...o.problems],this.lineOf=o.lineOf}at(t,o){const e=t.line??(t.path===void 0?void 0:this.lineOf(t.path));this.problems.push({file:t.file===""?l:t.file,...e===void 0?{}:{line:e},message:o})}formulas(){const t=new Map;for(const o of this.wb.sheets){for(const e of o.formulas)t.set(e.shared,o);for(const e of o.names.values())e.formula&&t.set(e.formula,o);for(const e of o.tables)for(const s of e.columns)s.formula&&t.set(s.formula,o);for(const e of o.conditions)for(const s of e.formulas)t.set(s,o);for(const e of o.validations)for(const s of e.formulas)s&&t.set(s,o);for(const e of o.charts){e.title&&t.set(e.title,o),e.categories&&t.set(e.categories,o);for(const s of e.series)t.set(s.values,o),s.x&&t.set(s.x,o),s.name&&t.set(s.name,o)}}for(const o of this.wb.names.values())o.formula&&t.set(o.formula,void 0);for(const o of this.wb.checks)t.set(o.formula,void 0);return t}formulaProblems(){for(const[t,o]of this.formulas()){const e=n=>{this.at(t.source,`${t.text}: ${n}`)};if(t.error){e(`does not parse: ${t.error.message}`);continue}const s=w(this.wb,t,o);t.analysis=s;for(const n of new Set(s.unknownNames))e(`there is no name ${n}`);for(const n of new Set(s.unknownFunctions))e(`there is no function ${n}`);for(const n of s.arguments)e(n.group===void 0?`${n.name} takes ${n.min===n.max?String(n.min):`${String(n.min)} to ${String(n.max)}`} arguments and is given ${String(n.given)}`:`${n.name} takes its last arguments in groups of ${String(n.group)} and is given ${String(n.given)}, which leaves one short`);for(const n of s.reads){if(n.kind==="ref"){for(const r of[n.sheet,n.lastSheet])r!==void 0&&!this.wb.sheet(r)&&e(`there is no sheet ${r}`);continue}const f=n.table===void 0?o?.tableAt(t.row,t.col):this.wb.table(n.table);if(!f){e(n.table===void 0?"a column named with no table, outside a table":`there is no table ${n.table}`);continue}for(const r of n.columns)f.column(r)||e(`table ${f.name} has no column ${r}; it has ${f.columns.map(a=>a.name).join(", ")}`)}}}cycles(t){for(const o of t.cycles){const e=o.reduce((r,a,h)=>{const c=o[r];return c&&(a.row<c.row||a.row===c.row&&a.col<c.col)?h:r},0),s=[...o.slice(e),...o.slice(0,e)],n=s[0];if(!n)continue;const f=[...s,n].map(r=>`${r.sheet.name}!${d(r)}`).join(" → ");this.at(n.shared.source,`a circular reference: ${f}`)}}scenarios(){const{scenarios:t}=this.wb.file;for(const[o,e]of Object.entries(t??{}))for(const s of Object.keys(e))this.wb.name(s)||this.at({file:l,path:["scenarios",o,s]},`scenario ${o} sets ${s}, and there is no name ${s}`)}files(t,o){for(const e of this.wb.sheets)for(const{row:s,col:n,paths:f}of S(e,t))for(const r of f)o(r)||this.at(this.wb.sourceOf(e,s,n)??{file:l},`${placeName(e,s,n)} names ${r}, which is not there`);for(const e of this.wb.sheets)for(const s of e.spec.pictures??[])o(s.file)||this.at({file:l},`${e.name} has a picture ${s.file}, which is not there`)}checks(t){const o=this.wb.sheets[0];if(o)for(const e of this.wb.checks){if(!e.formula.node)continue;const s=t.evaluate(e.formula,o),n=u(s);n!==void 0&&this.at(e.source,`check "${e.name}" does not hold: ${e.formula.text} is ${n}`)}}}function u(i){if(i instanceof $){for(const o of i.data){const e=u(o);if(e!==void 0)return e}return}if(i instanceof m)return i.code;const t=k(i);return t instanceof m?p.VALUE.code:t?void 0:"FALSE"}export function checkWorkbook(i,t={}){const o=v(i),{workbook:e}=o;if(!e)return{problems:o.problems};const s=new y(e,o);s.scenarios(),t.scenario!==void 0&&x(e,t.scenario);const n=new g(e,t);return s.formulaProblems(),n.calculate(),s.cycles(n),s.checks(n),i.exists&&s.files(n,i.exists),{workbook:e,calc:n,problems:s.problems}}export const placeName=(i,t,o)=>`${i.name}!${b({top:t,left:o,bottom:t,right:o})}`;
@@ -39,14 +39,29 @@ export interface TableDiff {
39
39
  columnsAdded: string[];
40
40
  columnsRemoved: string[];
41
41
  }
42
+ /** What changed outside the cells: how a sheet prints, its notes, links, rules, pictures, sizes. */
43
+ export interface PartChange {
44
+ /** The sheet it is of; absent: the workbook's. */
45
+ sheet?: string;
46
+ /** Which part: `print`, `notes`, `links`, `validations`, `conditional`, `pictures`, `protect`, `freeze`, `merges`, `filter`, `columns`, `rows`, `view`, `title`, `hidden names`. */
47
+ part: string;
48
+ /** Which of it: a note's or a link's cell, a column's letter, a row's number. */
49
+ key?: string;
50
+ /** What it was and is, as JSON (a note's or a link's text as it is); absent: none. */
51
+ was?: string;
52
+ now?: string;
53
+ }
42
54
  export interface WorkbookDiff {
43
55
  sheets: SheetDiff[];
44
56
  tables: TableDiff[];
57
+ /** The workbook's names, and each sheet's own as `Sheet!name`. */
45
58
  names: {
46
59
  name: string;
47
60
  was?: string;
48
61
  now?: string;
49
62
  }[];
63
+ /** What changed outside the cells. */
64
+ parts: PartChange[];
50
65
  /** Sheets whose charts differ. */
51
66
  charts: string[];
52
67
  cells: CellChange[];
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{cellName as N}from"./address.js";import{dataValue as D,shownValue as b}from"./format.js";import{CellError as y}from"./values.js";import{FormulaCell as M}from"./workbook.js";export const DIFF_DEFAULTS={tolerance:0};const J=(a,e)=>{if(a!=="written")return e};function U(a){const{row:e,col:t}=a;return JSON.stringify(a.moved,(s,c)=>(s==="col"||s==="col2"||s==="row"||s==="row2")&&typeof c=="object"&&c!==null&&c.abs===!1?[c.index-(s.startsWith("col")?t:e)]:J(s,c))}function j(a,e,t){if(a===e)return!0;if(typeof a=="number"&&typeof e=="number"){const s=Math.max(Math.abs(a),Math.abs(e));return Math.abs(a-e)<=t*s}return a instanceof y&&e instanceof y?a.code===e.code:!1}function A(a,e,t,s){const c=a.value(e,t,s),r=e.lookAt(t,s).format,o=e.at(t,s);return{cell:N({row:t,col:s}),value:D(c,r),shown:b(c,r),...o instanceof M?{formula:o.text}:{}}}const S=(a,e,t)=>{const s=a.at(e,t);return s instanceof M&&s.shared.node?U(s):void 0},O=(a,e,t)=>a.at(e,t)!==void 0||a.spillAt(e,t)!==void 0;class C{out={sheets:[],tables:[],names:[],charts:[],cells:[],counts:{value:0,formula:0,both:0,added:0,removed:0}};a;b;tolerance;constructor(e,t,s){this.a=e,this.b=t,this.tolerance=s}push(e){this.out.counts[e.kind]+=1,this.out.cells.push(e)}cell(e,t,s){const c=this.a.value(e.sheet,e.row,e.col),r=this.b.value(t.sheet,t.row,t.col),o=O(e.sheet,e.row,e.col),i=O(t.sheet,t.row,t.col);if(!o&&!i)return;const u=t.sheet.name,l=()=>({was:A(this.a,e.sheet,e.row,e.col),now:A(this.b,t.sheet,t.row,t.col)});if(!o){this.push({...s,sheet:u,kind:"added",now:l().now});return}if(!i){this.push({...s,sheet:u,kind:"removed",was:l().was});return}const h=j(c,r,this.tolerance),w=S(e.sheet,e.row,e.col)===S(t.sheet,t.row,t.col);if(h&&w)return;const v=w?"value":h?"formula":"both";this.push({...s,sheet:u,kind:v,...l()})}loose(e,t){const s=(o,i,u)=>o.tableAt(i,u)!==void 0,c=Math.max(e.lastRow,t.lastRow),r=Math.max(e.columnsUsed,t.columnsUsed)-1;for(let o=0;o<=r;o++){const[i,u]=E(e,t,o,c);for(let l=i;l<=u;l++)s(e,l,o)||s(t,l,o)||this.cell({sheet:e,row:l,col:o},{sheet:t,row:l,col:o},{})}}table(e,t){const s=t.spec.key??e.spec.key,c=e.column(s??""),r=t.column(s??""),o=(n,f,p)=>{const d=new Map;if(p){for(let m=0;m<n.rows;m++){const F=f.value(n.sheet,n.at.row+1+m,n.at.col+p.index),x=b(F);if(x===""||d.has(x))return;d.set(x,m)}return d}},i=o(e,this.a,c),u=o(t,this.b,r),l=i&&u?{from:i,to:u}:void 0,h=[];if(l){for(const[n,f]of l.from)h.push([f,l.to.get(n),n]);for(const[n,f]of l.to)l.from.has(n)||h.push([void 0,f,n])}else for(let n=0;n<Math.max(e.rows,t.rows);n++)h.push([n<e.rows?n:void 0,n<t.rows?n:void 0,String(n+1)]);const w=[],v=[],R=t.columns.filter(n=>e.column(n.name));for(const[n,f,p]of h)if(n===void 0)w.push(p);else if(f===void 0)v.push(p);else for(const d of R){const m=e.column(d.name);m&&this.cell({sheet:e.sheet,row:e.at.row+1+n,col:e.at.col+m.index},{sheet:t.sheet,row:t.at.row+1+f,col:t.at.col+d.index},{table:t.name,column:d.name,...l?{key:p}:{}})}const k=t.columns.filter(n=>!e.column(n.name)).map(n=>n.name),g=e.columns.filter(n=>!t.column(n.name)).map(n=>n.name);(w.length+v.length+k.length+g.length>0||l)&&this.out.tables.push({sheet:t.sheet.name,name:t.name,by:l?"key":"position",...l&&s!==void 0?{key:s}:{},rowsAdded:w,rowsRemoved:v,columnsAdded:k,columnsRemoved:g})}names(e,t){const s=(r,o)=>{const i=r.name(o);if(i)return i.formula?.text??b(i.value??null)},c=new Set([...e.names.values(),...t.names.values()].map(r=>r.name));for(const r of[...c].sort()){const o=s(e,r),i=s(t,r);o!==i&&this.out.names.push({name:r,...o===void 0?{}:{was:o},...i===void 0?{}:{now:i}})}}run(){const{wb:e}=this.a,{wb:t}=this.b;this.names(e,t);for(const s of e.sheets)t.sheet(s.name)||this.out.sheets.push({name:s.name,added:!1,removed:!0});for(const s of t.sheets){const c=e.sheet(s.name);if(!c){this.out.sheets.push({name:s.name,added:!0,removed:!1});continue}this.loose(c,s);for(const r of s.tables){const o=e.table(r.name);o?this.table(o,r):this.out.tables.push({sheet:s.name,name:r.name,by:"position",rowsAdded:[String(r.rows)],rowsRemoved:[],columnsAdded:r.columns.map(i=>i.name),columnsRemoved:[]})}JSON.stringify(c.spec.charts??[])!==JSON.stringify(s.spec.charts??[])&&this.out.charts.push(s.name)}return this.out}}function E(a,e,t,s){const[c,r]=a.span(t,0,s),[o,i]=e.span(t,0,s);return[Math.min(c,o),Math.max(r,i)]}export function diffWorkbooks(a,e,t={}){return new C(a,e,t.tolerance??DIFF_DEFAULTS.tolerance).run()}
2
+ import{SHEET_MARGINS as F,SHEET_NOTE_AUTHOR as H}from"@allyhub-next/formats";import{cellName as U,readAddress as A}from"./address.js";import{dataValue as _}from"./export.js";import{shownValue as j}from"./format.js";import{sheetPrefix as S}from"./formula/print.js";import{CellError as M}from"./values.js";import{FormulaCell as N}from"./workbook.js";export const DIFF_DEFAULTS={tolerance:0};const I=(o,e)=>{if(o!=="written")return e};function J(o){const{row:e,col:n}=o;return JSON.stringify(o.moved,(t,s)=>(t==="col"||t==="col2"||t==="row"||t==="row2")&&typeof s=="object"&&s!==null&&s.abs===!1?[s.index-(t.startsWith("col")?n:e)]:I(t,s))}function P(o,e,n){if(o===e)return!0;if(typeof o=="number"&&typeof e=="number"){const t=Math.max(Math.abs(o),Math.abs(e));return Math.abs(o-e)<=n*t}return o instanceof M&&e instanceof M?o.code===e.code:!1}function E(o,e,n,t){const s=o.value(e,n,t),i=e.lookAt(n,t).format,r=e.at(n,t);return{cell:U({row:n,col:t}),value:_(s,i),shown:j(s,i),...r instanceof N?{formula:r.text}:{}}}const R=(o,e,n)=>{const t=o.at(e,n);return t instanceof N&&t.shared.node?J(t):void 0},T=(o,e,n)=>o.at(e,n)!==void 0||o.spillAt(e,n)!==void 0;class D{out={sheets:[],tables:[],names:[],parts:[],charts:[],cells:[],counts:{value:0,formula:0,both:0,added:0,removed:0}};a;b;tolerance;constructor(e,n,t){this.a=e,this.b=n,this.tolerance=t}push(e){this.out.counts[e.kind]+=1,this.out.cells.push(e)}cell(e,n,t){const s=this.a.value(e.sheet,e.row,e.col),i=this.b.value(n.sheet,n.row,n.col),r=T(e.sheet,e.row,e.col),d=T(n.sheet,n.row,n.col);if(!r&&!d)return;const u=n.sheet.name,c=()=>({was:E(this.a,e.sheet,e.row,e.col),now:E(this.b,n.sheet,n.row,n.col)});if(!r){this.push({...t,sheet:u,kind:"added",now:c().now});return}if(!d){this.push({...t,sheet:u,kind:"removed",was:c().was});return}const f=P(s,i,this.tolerance),l=R(e.sheet,e.row,e.col)===R(n.sheet,n.row,n.col);if(f&&l)return;const h=l?"value":f?"formula":"both";this.push({...t,sheet:u,kind:h,...c()})}loose(e,n){const t=(r,d,u)=>r.tableAt(d,u)!==void 0,s=Math.max(e.lastRow,n.lastRow),i=Math.max(e.columnsUsed,n.columnsUsed)-1;for(let r=0;r<=i;r++){const[d,u]=W(e,n,r,s);for(let c=d;c<=u;c++)t(e,c,r)||t(n,c,r)||this.cell({sheet:e,row:c,col:r},{sheet:n,row:c,col:r},{})}}table(e,n){const t=n.spec.key??e.spec.key,s=e.column(t??""),i=n.column(t??""),r=(a,m,g)=>{const w=new Map;if(g){for(let p=0;p<a.rows;p++){const C=m.value(a.sheet,a.at.row+1+p,a.at.col+g.index),v=j(C);if(v===""||w.has(v))return;w.set(v,p)}return w}},d=r(e,this.a,s),u=r(n,this.b,i),c=d&&u?{from:d,to:u}:void 0,f=[];if(c){for(const[a,m]of c.from)f.push([m,c.to.get(a),a]);for(const[a,m]of c.to)c.from.has(a)||f.push([void 0,m,a])}else for(let a=0;a<Math.max(e.rows,n.rows);a++)f.push([a<e.rows?a:void 0,a<n.rows?a:void 0,String(a+1)]);const l=[],h=[],y=n.columns.filter(a=>e.column(a.name));for(const[a,m,g]of f)if(a===void 0)l.push(g);else if(m===void 0)h.push(g);else for(const w of y){const p=e.column(w.name);p&&this.cell({sheet:e.sheet,row:e.at.row+1+a,col:e.at.col+p.index},{sheet:n.sheet,row:n.at.row+1+m,col:n.at.col+w.index},{table:n.name,column:w.name,...c?{key:g}:{}})}const k=n.columns.filter(a=>!e.column(a.name)).map(a=>a.name),x=e.columns.filter(a=>!n.column(a.name)).map(a=>a.name);(l.length+h.length+k.length+x.length>0||c)&&this.out.tables.push({sheet:n.sheet.name,name:n.name,by:c?"key":"position",...c&&t!==void 0?{key:t}:{},rowsAdded:l,rowsRemoved:h,columnsAdded:k,columnsRemoved:x})}names(e,n){const t=u=>{const c=new Map;for(const f of u.names.values())c.set(f.name.toLowerCase(),f);for(const f of u.sheets)for(const l of f.names.values())c.set(`${S(f.name)}${l.name}`.toLowerCase(),l);return c},s=u=>u&&(u.formula?.text??j(u.value??null)),i=t(e),r=t(n),d=new Map;for(const[u,c]of[...i,...r])d.set(u,c.sheet?`${S(c.sheet.name)}${c.name}`:c.name);for(const u of[...d.keys()].sort()){const c=s(i.get(u)),f=s(r.get(u));c!==f&&this.out.names.push({name:d.get(u)??u,...c===void 0?{}:{was:c},...f===void 0?{}:{now:f}});const l=k=>k===void 0?void 0:k.hidden===!0,h=l(i.get(u)),y=l(r.get(u));h!==void 0&&y!==void 0&&h!==y&&this.out.parts.push({part:"hidden names",key:d.get(u)??u,was:String(h),now:String(y)})}}part(e){this.out.parts.push(e)}whole(e,n,t,s){const i=b(t),r=b(s);i!==r&&this.part({...e===void 0?{}:{sheet:e},part:n,...i===void 0?{}:{was:i},...r===void 0?{}:{now:r}})}keyed(e,n,t,s,i=b){const r=new Set([...Object.keys(t??{}),...Object.keys(s??{})]);for(const d of[...r].sort(L)){const u=i(t?.[d]),c=i(s?.[d]);u!==c&&this.part({sheet:e,part:n,key:d,...u===void 0?{}:{was:u},...c===void 0?{}:{now:c}})}}listed(e,n,t,s,i=!0){const r=d=>d===void 0||d.length===0?void 0:i?d:d.map(u=>b(u)??"").sort();this.whole(e,n,r(t),r(s))}sheetParts(e,n){const t=e.spec,s=n.spec,i=n.name;this.whole(i,"print",$(t.print),$(s.print)),this.keyed(i,"notes",t.notes,s.notes,V),this.keyed(i,"links",t.links,s.links,r=>typeof r=="string"?r:void 0),this.listed(i,"validations",t.validations,s.validations,!1),this.listed(i,"conditional",t.conditional,s.conditional),this.listed(i,"pictures",t.pictures,s.pictures),this.whole(i,"protect",t.protect===!0||void 0,s.protect===!0||void 0),this.whole(i,"freeze",t.freeze,s.freeze),this.listed(i,"merges",t.merges,s.merges,!1),this.whole(i,"filter",t.filter,s.filter),this.keyed(i,"columns",O(t.columns),O(s.columns)),this.keyed(i,"rows",O(t.rows),O(s.rows)),this.whole(i,"view",z(t),z(s))}run(){const{wb:e}=this.a,{wb:n}=this.b;this.names(e,n),this.whole(void 0,"title",e.title,n.title);for(const t of e.sheets)n.sheet(t.name)||this.out.sheets.push({name:t.name,added:!1,removed:!0});for(const t of n.sheets){const s=e.sheet(t.name);if(!s){this.out.sheets.push({name:t.name,added:!0,removed:!1});continue}this.loose(s,t),this.sheetParts(s,t);for(const i of t.tables){const r=e.table(i.name);r?this.table(r,i):this.out.tables.push({sheet:t.name,name:i.name,by:"position",rowsAdded:[String(i.rows)],rowsRemoved:[],columnsAdded:i.columns.map(d=>d.name),columnsRemoved:[]})}JSON.stringify(s.spec.charts??[])!==JSON.stringify(t.spec.charts??[])&&this.out.charts.push(t.name)}return this.out}}function b(o){if(o!==void 0)return JSON.stringify(o,(e,n)=>n!==null&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.entries(n).sort(([t],[s])=>t<s?-1:t>s?1:0)):n)}function L(o,e){const n=A(o),t=A(e);if(n&&t)return n.row-t.row||n.col-t.col;const s=Number(o),i=Number(e);return Number.isInteger(s)&&Number.isInteger(i)?s-i:o.length-e.length||(o<e?-1:o>e?1:0)}function V(o){if(typeof o=="string")return o;if(o===null||typeof o!="object")return;const e=o;return e.author===void 0||e.author===H?e.text:`${e.text} (${e.author})`}function $(o){if(!o)return;const e=Object.fromEntries(Object.entries(o.margins??{}).filter(([t,s])=>F[t]!==s)),n={...o};return Object.keys(e).length>0?n.margins=e:delete n.margins,Object.keys(n).length>0?n:void 0}function O(o){if(!o)return;const e={};for(const[n,t]of Object.entries(o)){const s={..."width"in t&&t.width!==void 0?{width:t.width}:{},..."height"in t&&t.height!==void 0?{height:t.height}:{},...t.hidden===!0?{hidden:!0}:{},...t.level===void 0?{}:{level:t.level}};Object.keys(s).length>0&&(e[n]=s)}return e}const z=o=>{const e={...o.hidden===!0?{hidden:!0}:{},...o.tab===void 0?{}:{tab:o.tab.toUpperCase()},...o.gridlines===!1?{gridlines:!1}:{}};return Object.keys(e).length>0?e:void 0};function W(o,e,n,t){const[s,i]=o.span(n,0,t),[r,d]=e.span(n,0,t);return[Math.min(s,r),Math.max(i,d)]}export function diffWorkbooks(o,e,n={}){return new D(o,e,n.tolerance??DIFF_DEFAULTS.tolerance).run()}
@@ -1,11 +1,32 @@
1
- import { Calc } from "./calc/engine.js";
1
+ import type { Calc } from "./calc/engine.js";
2
+ import { type Scalar } from "./values.js";
2
3
  import type { Table, Worksheet } from "./workbook.js";
3
- /** A sheet as CSV: dates as ISO text, numbers as numbers. */
4
- export declare function csvOf(calc: Calc, sheet: Worksheet): string;
5
- /** A sheet as a Markdown table, values as their formats show them, its first row the head. */
6
- export declare function markdownOf(calc: Calc, sheet: Worksheet): string;
4
+ /** What a value is written as: data, or as its format shows it. */
5
+ export type ValueMode = "data" | "shown";
6
+ export interface ValueOptions {
7
+ /** Default "data" for CSV and JSON, "shown" for Markdown. */
8
+ values?: ValueMode;
9
+ }
10
+ export interface CsvOptions extends ValueOptions {
11
+ /** A UTF-8 byte-order mark first, by which Excel reads the file as UTF-8 (é, €, 中文); default true. */
12
+ bom?: boolean;
13
+ }
14
+ /** A number as Excel keeps it: 15 significant digits, -0 as 0. */
15
+ export declare const excelNumber: (n: number) => number;
16
+ /** A value as one CSV field. */
17
+ export declare function csvText(value: Scalar, code: string | undefined, mode?: ValueMode): string;
18
+ /** A value as JSON holds it: a number, text, true or false, an error's code, or null. */
19
+ export declare function dataValue(value: Scalar, code: string | undefined, mode?: ValueMode): string | number | boolean | null;
20
+ /** A sheet as CSV (RFC 4180: CRLF between records), from A1 to the last cell it uses. */
21
+ export declare function csvOf(calc: Calc, sheet: Worksheet, o?: CsvOptions): string;
22
+ /**
23
+ * A sheet as a Markdown table, its first row the head: values as their
24
+ * formats show them unless `values` is "data"; a column whose values are
25
+ * all numbers is aligned right.
26
+ */
27
+ export declare function markdownOf(calc: Calc, sheet: Worksheet, o?: ValueOptions): string;
7
28
  /** A table's computed rows, by header. */
8
- export declare function tableRows(calc: Calc, table: Table): Record<string, string | number | boolean | null>[];
9
- /** The workbook as data: each sheet's rows, each table's rows by header, each name's value. */
10
- export declare function jsonOf(calc: Calc): Record<string, unknown>;
29
+ export declare function tableRows(calc: Calc, table: Table, o?: ValueOptions): Record<string, string | number | boolean | null>[];
30
+ /** The workbook as data: each sheet's rows, each table's rows by header. */
31
+ export declare function jsonOf(calc: Calc, o?: ValueOptions): Record<string, unknown>;
11
32
  //# sourceMappingURL=export.d.ts.map
@@ -1,6 +1,5 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import"./calc/engine.js";import{csvRecord as i}from"./csv.js";import{dataValue as a,shownValue as m}from"./format.js";const p=(r,t,e,o)=>m(r.value(t,e,o),t.lookAt(e,o).format),u=(r,t,e,o)=>a(r.value(t,e,o),t.lookAt(e,o).format);function f(r,t){const e=r.used;if(!e)return[];const o=[];for(let s=0;s<=e.bottom;s++){const n=[];for(let c=0;c<=e.right;c++)n.push(t(s,c));o.push(n)}return o}export function csvOf(r,t){return f(t,(o,s)=>{const n=u(r,t,o,s);return n===null?"":typeof n=="boolean"?n?"TRUE":"FALSE":String(n)}).map(o=>`${i(o)}
3
- `).join("")}const w=r=>r.replaceAll("|","\\|").replaceAll(`
4
- `,"<br>");export function markdownOf(r,t){const e=f(t,(c,l)=>p(r,t,c,l)),[o,...s]=e;if(!o)return"";const n=c=>`| ${c.map(w).join(" | ")} |`;return`${[n(o),n(o.map(()=>"---")),...s.map(n)].join(`
2
+ import{writeCsv as S}from"./csv.js";import{isDateCode as k,shownValue as b}from"./format.js";import{CellError as w,dateOf as j}from"./values.js";const y=t=>(t.split(";")[0]??"").replace(/"[^"]*"|\\.|_.|\*./gu,"").replace(/\[(?![hms]+\])[^\]]*\]/giu,""),h=new Map;function _(t){if(t===void 0)return;if(h.has(t))return h.get(t);let n;if(k(t)){const r=y(t).toLowerCase(),o=/\[(h+|m+|s+)\]/u.test(r),e=[...r.matchAll(/\[?([ydhms])\1*\]?|am\/pm|a\/p/gu)].map(c=>c[0]);let s=!1,i=!1,u=!1;for(const[c,a]of e.entries()){const f=a.replace(/[[\]]/gu,"")[0];if(f==="y"||f==="d")s=!0;else if(f==="h"||a.includes("/"))i=!0;else if(f==="s")i=!0,u=!0;else if(f==="m"){const l=e[c-1]?.replace(/[[\]]/gu,"")[0],m=e[c+1]?.replace(/[[\]]/gu,"")[0];a.startsWith("[")||l==="h"||m==="s"?i=!0:s=!0}}o?n={kind:"duration",seconds:u}:s&&i?n={kind:"datetime",seconds:u}:i?n={kind:"time",seconds:u}:s&&(n={kind:"date",seconds:!1})}return h.set(t,n),n}const $=864e5,A=2958465,d=(t,n=2)=>String(t).padStart(n,"0");export const excelNumber=t=>t===0?0:Number(t.toPrecision(15));function x(t,n,r=2){const o=Math.floor(t/1e3),e=t%1e3;let s=`${d(Math.floor(o/3600),r)}:${d(Math.floor(o/60)%60)}`;return(n||o%60!==0||e!==0)&&(s+=`:${d(o%60)}`),e!==0&&(s+=`.${d(e,3).replace(/0+$/u,"")}`),s}function T(t){const n=t<0?"-":"";let r=Math.abs(t);const o=Math.floor(r/36e5);r-=o*36e5;const e=Math.floor(r/6e4);r-=e*6e4;const s=[o>0?`${String(o)}H`:"",e>0?`${String(e)}M`:"",r>0?`${String(r/1e3)}S`:""].join("");return`${n}PT${s||"0S"}`}function M(t,n,r){const o=Math.round(t*$);if(n.kind==="duration")return r==="json"?T(o):`${o<0?"-":""}${x(Math.abs(o),n.seconds,1)}`;if(t<0||t>=A+1)return;const e=Math.floor(o/$),s=x(o-e*$,n.seconds||r==="json");if(e===0||n.kind==="time")return s;if(e===60)return;const{year:i,month:u,day:c}=j(e),a=`${d(i,4)}-${d(u)}-${d(c)}`;return n.kind==="date"?a:`${a}${r==="json"?"T":" "}${s}`}export function csvText(t,n,r="data"){if(t===null)return"";if(r==="shown")return b(t,n);if(typeof t=="boolean")return t?"TRUE":"FALSE";if(t instanceof w)return t.code;if(typeof t=="string")return t;const o=_(n);return(o&&M(t,o,"csv"))??String(excelNumber(t))}export function dataValue(t,n,r="data"){if(t===null)return null;if(r==="shown")return b(t,n);if(t instanceof w)return t.code;if(typeof t!="number")return t;const o=_(n);return(o&&M(t,o,"json"))??excelNumber(t)}const p=(t,n,r)=>t.lookAt(n,r).format;function g(t,n){const r=t.used;if(!r)return[];const o=[];for(let e=0;e<=r.bottom;e++){const s=[];for(let i=0;i<=r.right;i++)s.push(n(e,i));o.push(s)}return o}export function csvOf(t,n,r={}){const o=g(n,(e,s)=>csvText(t.value(n,e,s),p(n,e,s),r.values));return S(o,{delimiter:",",newline:`\r
3
+ `,bom:r.bom??!0,finalNewline:!0})}const E=t=>t.replaceAll("|","\\|").replace(/\r?\n/gu,"<br>");export function markdownOf(t,n,r={}){const o=r.values??"shown",e=[],s=g(n,(f,l)=>{const m=t.value(n,f,l);return f>0&&m!==null&&(e[l]=(e[l]??!0)&&typeof m=="number"),csvText(m,p(n,f,l),o)}),[i,...u]=s;if(!i)return"";const c=f=>`| ${f.map(E).join(" | ")} |`,a=i.map((f,l)=>e[l]===!0?"---:":"---");return`${[c(i),`| ${a.join(" | ")} |`,...u.map(c)].join(`
5
4
  `)}
6
- `}export function tableRows(r,t){const{sheet:e,at:o}=t,s=[];for(let n=0;n<t.rows;n++){const c={};for(const l of t.columns)c[l.name]=u(r,e,o.row+1+n,o.col+l.index);s.push(c)}return s}export function jsonOf(r){const{wb:t}=r,e={};for(const o of t.sheets){const s={};for(const n of o.tables)s[n.name]=tableRows(r,n);e[o.name]={rows:f(o,(n,c)=>u(r,o,n,c)),...o.tables.length>0?{tables:s}:{}}}return{...t.title===void 0?{}:{title:t.title},sheets:e}}
5
+ `}export function tableRows(t,n,r={}){const{sheet:o,at:e}=n,s=[];for(let i=0;i<n.rows;i++){const u={};for(const c of n.columns){const a=e.row+1+i,f=e.col+c.index;u[c.name]=dataValue(t.value(o,a,f),p(o,a,f),r.values)}s.push(u)}return s}export function jsonOf(t,n={}){const{wb:r}=t,o={};for(const e of r.sheets){const s={};for(const i of e.tables)s[i.name]=tableRows(t,i,n);o[e.name]={rows:g(e,(i,u)=>dataValue(t.value(e,i,u),p(e,i,u),n.values)),...e.tables.length>0?{tables:s}:{}}}return{...r.title===void 0?{}:{title:r.title},sheets:o}}
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{readDataFile as m}from"@allyhub-next/formats";import{LineCounter as u,parseDocument as f}from"yaml";export const ENTRY="sheet.yaml";export function dataFilesOf(l){const{file:o}=readSheetFile(l);return[...new Set(o?.sheets.flatMap(n=>[...(n.tables??[]).map(t=>t.rows),...(n.blocks??[]).map(t=>t.rows)])??[])]}export function readSheetFile(l){const o=new u,n=f(l,{lineCounter:o}),t=e=>{for(let r=e.length;r>=0;r--){const a=n.getIn(e.slice(0,r),!0)?.range?.[0];if(a!==void 0)return o.linePos(a).line}};if(n.errors.length>0)return{problems:n.errors.map(e=>({file:ENTRY,line:o.linePos(e.pos[0]).line,message:`not YAML: ${e.message.split(`
3
- `)[0]??""}`})),lineOf:t};const i=m("sheet",n.toJS()??{});return i.ok?{file:i.value,problems:[],lineOf:t}:{problems:i.problems.map(e=>{const r=t(e.path===""?[]:e.path.split(".").map(s=>/^\d+$/u.test(s)?Number(s):s));return{file:ENTRY,...r===void 0?{}:{line:r},message:`${e.path===""?"":`${e.path}: `}${e.message}`}}),lineOf:t}}
2
+ import{readDataFile as c}from"@allyhub-next/formats";import{LineCounter as p,isMap as m,isScalar as f,parseDocument as d,visit as g}from"yaml";export const ENTRY="sheet.yaml";export function dataFilesOf(i){const{file:t}=readSheetFile(i);return[...new Set(t?.sheets.flatMap(s=>[...(s.tables??[]).map(n=>n.rows),...(s.blocks??[]).map(n=>n.rows)])??[])]}function h(i){const t=[];return g(i,{Map(s,n){if(!m(n))return;const a=new Set;for(const o of n.items){const e=f(o.key)?String(o.key.value):void 0;if(e!==void 0)if(a.has(e)){const r=f(o.key)?o.key.range?.[0]??0:0;t.push({at:r,key:e})}else a.add(e)}}}),t}export function readSheetFile(i){const t=new p,s=d(i,{lineCounter:t,uniqueKeys:!1}),n=e=>{for(let r=e.length;r>=0;r--){const u=s.getIn(e.slice(0,r),!0)?.range?.[0];if(u!==void 0)return t.linePos(u).line}},a=h(s);if(s.errors.length>0||a.length>0)return{problems:[...s.errors.map(e=>({file:ENTRY,line:t.linePos(e.pos[0]).line,message:`not YAML: ${e.message.split(`
3
+ `)[0]??""}`})),...a.map(e=>({file:ENTRY,line:t.linePos(e.at).line,message:`not YAML: Map keys must be unique (${e.key})`}))],lineOf:n};const o=c("sheet",s.toJS()??{});return o.ok?{file:o.value,problems:[],lineOf:n}:{problems:o.problems.map(e=>{const r=n(e.path===""?[]:e.path.split(".").map(l=>/^\d+$/u.test(l)?Number(l):l));return{file:ENTRY,...r===void 0?{}:{line:r},message:`${e.path===""?"":`${e.path}: `}${e.message}`}}),lineOf:n}}
@@ -1,9 +1,15 @@
1
1
  import { type Scalar } from "./values.js";
2
+ /**
3
+ * What General can show a number as, widest first: as it is (at most 11
4
+ * characters), then with fewer digits, then with an exponent. A cell shows
5
+ * the first that fits it; none is ####.
6
+ */
7
+ export declare function generalForms(value: number): string[];
8
+ /** A number as General shows it, in a cell as wide as `fits` allows when it is given: undefined when nothing fits (####). */
9
+ export declare function generalText(value: number, fits?: (text: string) => boolean): string | undefined;
2
10
  /** A value through a number format; General without one. */
3
11
  export declare function shownValue(value: Scalar, code?: string): string;
4
12
  /** The colour a number format gives a value, as [Red] does. */
5
13
  export declare function shownColor(value: Scalar, code?: string): string | undefined;
6
14
  export declare const isDateCode: (code: string | undefined) => boolean;
7
- /** A value as data: a date as ISO text, an error as its code. */
8
- export declare function dataValue(value: Scalar, code: string | undefined): string | number | boolean | null;
9
15
  //# sourceMappingURL=format.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{format as e,formatColor as s,isDateFormat as p,isValidFormat as o}from"numfmt";import{CellError as f,isoOfSerial as m,numberText as i}from"./values.js";export function shownValue(r,n){if(r===null)return"";if(r instanceof f)return r.code;if(typeof r=="boolean")return r?"TRUE":"FALSE";const t=n??"General";if(typeof r=="string")return n!==void 0&&o(n)?e(n,r):r;if(t==="General"||!o(t))return i(r);try{return e(t,r)}catch{return i(r)}}export function shownColor(r,n){if(typeof r!="number"||n===void 0||!o(n))return;const t=s(n,r);return typeof t=="string"?t:void 0}export const isDateCode=r=>r!==void 0&&o(r)&&p(r);export function dataValue(r,n){return r instanceof f?r.code:typeof r=="number"&&isDateCode(n)?m(r):r}
2
+ import{format as i,formatColor as p,isDateFormat as u,isValidFormat as f}from"numfmt";import{CellError as l,numberText as s}from"./values.js";export function generalForms(n){const r=i("General",n),t=[r];for(let e=10;e>=1;e--){const o=i("General",Number(n.toPrecision(e)));o.length<(t[t.length-1]??r).length&&t.push(o)}for(let e=5;e>=0;e--){const o=n.toExponential(e).replace(/e([+-])(\d)$/u,"E$10$2").replace(/e/u,"E");o.length<(t[t.length-1]??r).length&&t.push(o)}return t}export function generalText(n,r){const t=generalForms(n);return r?t.find(r):t[0]}export function shownValue(n,r){if(n===null)return"";if(n instanceof l)return n.code;if(typeof n=="boolean")return n?"TRUE":"FALSE";const t=r??"General";if(typeof n=="string")return r!==void 0&&f(r)?i(r,n):n;if(t==="General"||!f(t))return generalText(n)??s(n);try{return i(t,n)}catch{return generalText(n)??s(n)}}export function shownColor(n,r){if(typeof n!="number"||r===void 0||!f(r))return;const t=p(r,n);return typeof t=="string"?t:void 0}export const isDateCode=n=>n!==void 0&&f(n)&&u(n);
@@ -1,9 +1,8 @@
1
1
  import { type Area } from "./address.js";
2
2
  import type { Calc } from "./calc/engine.js";
3
+ import { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT, type PrintJob } from "./paginate.js";
3
4
  import { type Worksheet } from "./workbook.js";
4
- /** A cell of a size nothing sets. */
5
- export declare const DEFAULT_COLUMN_WIDTH = 64;
6
- export declare const DEFAULT_ROW_HEIGHT = 20;
5
+ export { DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_HEIGHT };
7
6
  export interface SheetHtmlOptions {
8
7
  /** The sheets drawn; default every one that is not hidden. */
9
8
  sheets?: readonly Worksheet[];
@@ -29,6 +28,55 @@ export interface SheetHtml {
29
28
  /** What `rows` and `columns` left out, a line per sheet. */
30
29
  cut: string[];
31
30
  }
32
- /** A workbook's sheets as one page of HTML. */
31
+ /** A workbook's sheets as one page of HTML, as a person sees them: for a picture, and frames. */
33
32
  export declare function sheetHtml(calc: Calc, o?: SheetHtmlOptions): SheetHtml;
33
+ /** What a header's or footer's codes name, for one page. */
34
+ export interface PageFields {
35
+ page: number;
36
+ pages: number;
37
+ sheet: string;
38
+ /** The workbook's file name, &F. */
39
+ file: string;
40
+ /** When it is printed, for &D and &T. */
41
+ date: Date;
42
+ }
43
+ /**
44
+ * A header's or footer's section as HTML: Excel's codes, &P and &N (with
45
+ * +n or -n), &D, &T, &F, &A, &Z, &&, &B, &I, &U, &E, &S, &X, &Y, a font
46
+ * (&"name,style"), a size (&14) and a colour (&KFF0000). A picture (&G)
47
+ * draws nothing.
48
+ */
49
+ export declare function headerFooterHtml(text: string, f: PageFields): string;
50
+ export interface PrintHtmlOptions {
51
+ css?: string;
52
+ font?: string;
53
+ /** The workbook's file name, a header's &F. */
54
+ name: string;
55
+ /** When it is printed, a header's &D and &T. */
56
+ date: Date;
57
+ }
58
+ /**
59
+ * A workbook on paper: its pages, laid out once, and any stretch of them
60
+ * as one HTML page that prints them. What drawing a sheet needs (its
61
+ * pictures, its tables' stripes, its charts) is read once for every
62
+ * stretch.
63
+ */
64
+ export declare class SheetPrint {
65
+ readonly job: PrintJob;
66
+ private readonly calc;
67
+ private readonly drawers;
68
+ private readonly file;
69
+ constructor(calc: Calc, o?: {
70
+ sheets?: readonly Worksheet[];
71
+ file?: SheetHtmlOptions["file"];
72
+ });
73
+ private drawer;
74
+ /**
75
+ * Pages `from` to before `to` as one HTML page that prints them: each
76
+ * the paper's size, its header and footer in its margins, its title rows
77
+ * and columns, then its own, scaled, and the charts that fall in them.
78
+ */
79
+ html(from: number, to: number, o: PrintHtmlOptions): string;
80
+ private page;
81
+ }
34
82
  //# sourceMappingURL=html.d.ts.map