@allyhub/sdk 0.3.0 → 0.5.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 (564) hide show
  1. package/dist/free.d.ts +2 -2
  2. package/dist/index.d.ts +2 -9
  3. package/dist/index.js +1 -1
  4. package/dist/module.d.ts +2 -3
  5. package/dist/module.js +1 -1
  6. package/{node_modules → dist/node_modules}/@allyhub-next/audio/package.json +1 -1
  7. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.d.ts +31 -0
  8. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +3 -0
  9. package/dist/node_modules/@allyhub-next/chart/dist/chart.d.ts +195 -0
  10. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +2 -0
  11. package/dist/node_modules/@allyhub-next/chart/dist/index.d.ts +3 -0
  12. package/dist/node_modules/@allyhub-next/chart/dist/index.js +2 -0
  13. package/dist/node_modules/@allyhub-next/chart/package.json +14 -0
  14. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/reference.d.ts +0 -86
  15. package/dist/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  16. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.d.ts +22 -0
  17. package/dist/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
  18. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +4908 -0
  19. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  20. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.d.ts +1497 -0
  21. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
  22. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/index.d.ts +3 -0
  23. package/dist/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  24. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/items.d.ts +22 -1
  25. package/dist/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  26. package/dist/node_modules/@allyhub-next/formats/dist/note-shape.d.ts +39 -0
  27. package/dist/node_modules/@allyhub-next/formats/dist/note-shape.js +2 -0
  28. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +2146 -0
  29. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  30. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +28 -0
  31. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +2 -0
  32. package/{node_modules → dist/node_modules}/@allyhub-next/formats/package.json +1 -1
  33. package/dist/node_modules/@allyhub-next/protocol/dist/app.d.ts +37 -0
  34. package/dist/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
  35. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.d.ts +0 -17
  36. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.js +1 -1
  37. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.d.ts +0 -4
  38. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.js +1 -1
  39. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/editor.d.ts +17 -24
  40. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/editor.js +1 -1
  41. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.d.ts +1 -0
  42. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
  43. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +165 -0
  44. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
  45. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.d.ts +1 -1
  46. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.d.ts +3 -0
  47. package/dist/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
  48. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/tools.d.ts +43 -0
  49. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  50. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/package.json +1 -1
  51. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.d.ts +5 -1
  52. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.d.ts +1 -0
  53. package/dist/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
  54. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/lock.d.ts +2 -0
  55. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  56. package/dist/node_modules/@allyhub-next/runtimes/dist/node-program.d.ts +3 -0
  57. package/dist/node_modules/@allyhub-next/runtimes/dist/node-program.js +2 -0
  58. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.d.ts +65 -0
  59. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.js +4 -0
  60. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/runtimes.d.ts +6 -0
  61. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +4 -0
  62. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
  63. package/dist/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
  64. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/package.json +5 -1
  65. package/dist/node_modules/@allyhub-next/runtimes/pins/docx/package-lock.json +67 -0
  66. package/dist/node_modules/@allyhub-next/runtimes/pins/docx/package.json +9 -0
  67. package/dist/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +753 -0
  68. package/dist/node_modules/@allyhub-next/runtimes/pins/gltf-tools/package.json +14 -0
  69. package/dist/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +950 -0
  70. package/dist/node_modules/@allyhub-next/runtimes/pins/manifold-3d/package.json +8 -0
  71. package/dist/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +227 -0
  72. package/dist/node_modules/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +8 -0
  73. package/dist/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +105 -0
  74. package/dist/node_modules/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +8 -0
  75. package/dist/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +128 -0
  76. package/dist/node_modules/@allyhub-next/runtimes/pins/tesseract.js/package.json +9 -0
  77. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/schemas/runtimes.schema.json +5 -24
  78. package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.d.ts +7 -0
  79. package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/phone.d.ts +3 -1
  80. package/dist/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  81. package/{node_modules → dist/node_modules}/@allyhub-next/scenery/package.json +1 -1
  82. package/dist/node_modules/@allyhub-next/sheet/LICENSE +241 -0
  83. package/dist/node_modules/@allyhub-next/sheet/dist/address.d.ts +32 -0
  84. package/dist/node_modules/@allyhub-next/sheet/dist/address.js +2 -0
  85. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.d.ts +23 -0
  86. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +2 -0
  87. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.d.ts +204 -0
  88. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.js +2 -0
  89. package/dist/node_modules/@allyhub-next/sheet/dist/api/code.d.ts +19 -0
  90. package/dist/node_modules/@allyhub-next/sheet/dist/api/code.js +2 -0
  91. package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.d.ts +3 -0
  92. package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.js +2 -0
  93. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +7 -0
  94. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +2 -0
  95. package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.d.ts +4 -0
  96. package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.js +2 -0
  97. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.d.ts +170 -0
  98. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.js +2 -0
  99. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.d.ts +117 -0
  100. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.js +2 -0
  101. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +323 -0
  102. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +2 -0
  103. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.d.ts +68 -0
  104. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.js +2 -0
  105. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +21 -0
  106. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +2 -0
  107. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +19 -0
  108. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +2 -0
  109. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +152 -0
  110. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +2 -0
  111. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.d.ts +2 -0
  112. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +2 -0
  113. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.d.ts +15 -0
  114. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +2 -0
  115. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.d.ts +2 -0
  116. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +2 -0
  117. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.d.ts +2 -0
  118. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +2 -0
  119. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +69 -0
  120. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +2 -0
  121. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.d.ts +2 -0
  122. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.js +2 -0
  123. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +2 -0
  124. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +2 -0
  125. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.d.ts +2 -0
  126. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +2 -0
  127. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +15 -0
  128. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +2 -0
  129. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.d.ts +2 -0
  130. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +2 -0
  131. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.d.ts +2 -0
  132. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +2 -0
  133. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.d.ts +2 -0
  134. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +2 -0
  135. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.d.ts +2 -0
  136. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +2 -0
  137. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.d.ts +2 -0
  138. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +2 -0
  139. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.d.ts +29 -0
  140. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.js +2 -0
  141. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.d.ts +2 -0
  142. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +2 -0
  143. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +50 -0
  144. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +2 -0
  145. package/dist/node_modules/@allyhub-next/sheet/dist/chart.d.ts +58 -0
  146. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +2 -0
  147. package/dist/node_modules/@allyhub-next/sheet/dist/check.d.ts +15 -0
  148. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +2 -0
  149. package/dist/node_modules/@allyhub-next/sheet/dist/csv.d.ts +62 -0
  150. package/dist/node_modules/@allyhub-next/sheet/dist/csv.js +12 -0
  151. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +64 -0
  152. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +2 -0
  153. package/dist/node_modules/@allyhub-next/sheet/dist/edit.d.ts +154 -0
  154. package/dist/node_modules/@allyhub-next/sheet/dist/edit.js +2 -0
  155. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +11 -0
  156. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +6 -0
  157. package/dist/node_modules/@allyhub-next/sheet/dist/file.d.ts +19 -0
  158. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +3 -0
  159. package/dist/node_modules/@allyhub-next/sheet/dist/files.d.ts +24 -0
  160. package/dist/node_modules/@allyhub-next/sheet/dist/files.js +2 -0
  161. package/dist/node_modules/@allyhub-next/sheet/dist/fill.d.ts +30 -0
  162. package/dist/node_modules/@allyhub-next/sheet/dist/fill.js +2 -0
  163. package/dist/node_modules/@allyhub-next/sheet/dist/filter.d.ts +29 -0
  164. package/dist/node_modules/@allyhub-next/sheet/dist/filter.js +2 -0
  165. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +9 -0
  166. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +2 -0
  167. package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.d.ts +113 -0
  168. package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.js +2 -0
  169. package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.d.ts +6 -0
  170. package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.js +2 -0
  171. package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.d.ts +4 -0
  172. package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.js +2 -0
  173. package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.d.ts +6 -0
  174. package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.js +2 -0
  175. package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.d.ts +65 -0
  176. package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.js +2 -0
  177. package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.d.ts +6 -0
  178. package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.js +2 -0
  179. package/dist/node_modules/@allyhub-next/sheet/dist/generated.d.ts +46 -0
  180. package/dist/node_modules/@allyhub-next/sheet/dist/generated.js +2 -0
  181. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +34 -0
  182. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +20 -0
  183. package/dist/node_modules/@allyhub-next/sheet/dist/import.d.ts +11 -0
  184. package/dist/node_modules/@allyhub-next/sheet/dist/import.js +2 -0
  185. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +38 -0
  186. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +2 -0
  187. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.d.ts +25 -0
  188. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +2 -0
  189. package/dist/node_modules/@allyhub-next/sheet/dist/patch.d.ts +4 -0
  190. package/dist/node_modules/@allyhub-next/sheet/dist/patch.js +2 -0
  191. package/dist/node_modules/@allyhub-next/sheet/dist/profile.d.ts +30 -0
  192. package/dist/node_modules/@allyhub-next/sheet/dist/profile.js +2 -0
  193. package/dist/node_modules/@allyhub-next/sheet/dist/rules.d.ts +56 -0
  194. package/dist/node_modules/@allyhub-next/sheet/dist/rules.js +2 -0
  195. package/dist/node_modules/@allyhub-next/sheet/dist/scenario.d.ts +42 -0
  196. package/dist/node_modules/@allyhub-next/sheet/dist/scenario.js +2 -0
  197. package/dist/node_modules/@allyhub-next/sheet/dist/series.d.ts +10 -0
  198. package/dist/node_modules/@allyhub-next/sheet/dist/series.js +2 -0
  199. package/dist/node_modules/@allyhub-next/sheet/dist/sort.d.ts +24 -0
  200. package/dist/node_modules/@allyhub-next/sheet/dist/sort.js +2 -0
  201. package/dist/node_modules/@allyhub-next/sheet/dist/structure.d.ts +38 -0
  202. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +2 -0
  203. package/dist/node_modules/@allyhub-next/sheet/dist/validate.d.ts +26 -0
  204. package/dist/node_modules/@allyhub-next/sheet/dist/validate.js +2 -0
  205. package/dist/node_modules/@allyhub-next/sheet/dist/values.d.ts +67 -0
  206. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +2 -0
  207. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +315 -0
  208. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +2 -0
  209. package/dist/node_modules/@allyhub-next/sheet/dist/write.d.ts +5 -0
  210. package/dist/node_modules/@allyhub-next/sheet/dist/write.js +21 -0
  211. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +42 -0
  212. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +2 -0
  213. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.d.ts +19 -0
  214. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.js +2 -0
  215. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +21 -0
  216. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +4 -0
  217. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +5 -0
  218. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +17 -0
  219. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +44 -0
  220. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +2 -0
  221. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.d.ts +5 -0
  222. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.js +2 -0
  223. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.d.ts +8 -0
  224. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.js +2 -0
  225. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +117 -0
  226. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -0
  227. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +23 -0
  228. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +2 -0
  229. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.d.ts +3 -0
  230. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.js +2 -0
  231. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +17 -0
  232. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +2 -0
  233. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.d.ts +28 -0
  234. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.js +3 -0
  235. package/dist/node_modules/@allyhub-next/sheet/package.json +21 -0
  236. package/dist/node_modules/@allyhub-next/slides-core/LICENSE +241 -0
  237. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.d.ts +129 -0
  238. package/dist/node_modules/@allyhub-next/slides-core/dist/animation.js +2 -0
  239. package/dist/node_modules/@allyhub-next/slides-core/dist/api.d.ts +649 -0
  240. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
  241. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.d.ts +18 -0
  242. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
  243. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.d.ts +165 -0
  244. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
  245. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +11 -0
  246. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
  247. package/dist/node_modules/@allyhub-next/slides-core/dist/check.d.ts +7 -0
  248. package/dist/node_modules/@allyhub-next/slides-core/dist/check.js +2 -0
  249. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.d.ts +146 -0
  250. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
  251. package/dist/node_modules/@allyhub-next/slides-core/dist/file.d.ts +109 -0
  252. package/dist/node_modules/@allyhub-next/slides-core/dist/file.js +4 -0
  253. package/dist/node_modules/@allyhub-next/slides-core/dist/index.d.ts +21 -0
  254. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
  255. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.d.ts +34 -0
  256. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +2 -0
  257. package/dist/node_modules/@allyhub-next/slides-core/dist/model.d.ts +275 -0
  258. package/dist/node_modules/@allyhub-next/slides-core/dist/office.d.ts +58 -0
  259. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
  260. package/dist/node_modules/@allyhub-next/slides-core/dist/path.d.ts +6 -0
  261. package/dist/node_modules/@allyhub-next/slides-core/dist/path.js +2 -0
  262. package/dist/node_modules/@allyhub-next/slides-core/dist/placeholders.d.ts +7 -0
  263. package/dist/node_modules/@allyhub-next/slides-core/dist/placeholders.js +2 -0
  264. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.d.ts +181 -0
  265. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
  266. package/dist/node_modules/@allyhub-next/slides-core/dist/script.d.ts +43 -0
  267. package/dist/node_modules/@allyhub-next/slides-core/dist/script.js +3 -0
  268. package/dist/node_modules/@allyhub-next/slides-core/dist/stage.d.ts +63 -0
  269. package/dist/node_modules/@allyhub-next/slides-core/dist/stage.js +2 -0
  270. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +7 -0
  271. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
  272. package/dist/node_modules/@allyhub-next/slides-core/dist/theme.d.ts +72 -0
  273. package/dist/node_modules/@allyhub-next/slides-core/dist/theme.js +2 -0
  274. package/dist/node_modules/@allyhub-next/slides-core/dist/units.d.ts +35 -0
  275. package/dist/node_modules/@allyhub-next/slides-core/dist/units.js +2 -0
  276. package/dist/node_modules/@allyhub-next/slides-core/package.json +14 -0
  277. package/dist/node_modules/@allyhub-next/video-core/LICENSE +241 -0
  278. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.d.ts +6 -5
  279. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.js +1 -1
  280. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/fact.d.ts +180 -5
  281. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  282. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/formats.d.ts +6 -41
  283. package/dist/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  284. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.d.ts +0 -1
  285. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
  286. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/measure.d.ts +93 -0
  287. package/dist/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  288. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.d.ts +8 -9
  289. package/dist/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
  290. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/problem.d.ts +10 -2
  291. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  292. package/dist/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
  293. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.d.ts +0 -2
  294. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.d.ts +4 -0
  295. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.d.ts +8 -0
  296. package/dist/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
  297. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.d.ts +34 -1
  298. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/package.json +1 -1
  299. package/dist/parts.d.ts +2 -2
  300. package/dist/phone.js +1 -1
  301. package/dist/piece.d.ts +7 -32
  302. package/dist/piece.js +1 -1
  303. package/dist/props.d.ts +53 -10
  304. package/dist/sheets.d.ts +2 -0
  305. package/dist/sheets.js +2 -0
  306. package/dist/slides.d.ts +8 -0
  307. package/dist/slides.js +2 -0
  308. package/docs/README.md +3 -3
  309. package/docs/batches.md +2 -2
  310. package/docs/defaults.md +107 -3
  311. package/docs/docs.md +1 -1
  312. package/docs/project.md +6 -6
  313. package/docs/scenery.md +1 -1
  314. package/docs/sheets.md +377 -84
  315. package/docs/slides.md +182 -80
  316. package/docs/speech.md +1 -1
  317. package/package.json +17 -18
  318. package/node_modules/@allyhub-next/formats/dist/data/reference.js +0 -2
  319. package/node_modules/@allyhub-next/formats/dist/data/script.js +0 -2
  320. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +0 -214
  321. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +0 -2
  322. package/node_modules/@allyhub-next/formats/dist/index.js +0 -2
  323. package/node_modules/@allyhub-next/formats/dist/items.js +0 -2
  324. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +0 -301
  325. package/node_modules/@allyhub-next/formats/dist/schemas.js +0 -2
  326. package/node_modules/@allyhub-next/protocol/dist/app.d.ts +0 -101
  327. package/node_modules/@allyhub-next/protocol/dist/app.js +0 -2
  328. package/node_modules/@allyhub-next/protocol/dist/index.js +0 -2
  329. package/node_modules/@allyhub-next/protocol/dist/runtimes.js +0 -2
  330. package/node_modules/@allyhub-next/protocol/dist/tools.js +0 -2
  331. package/node_modules/@allyhub-next/runtimes/dist/index.js +0 -2
  332. package/node_modules/@allyhub-next/runtimes/dist/lock.js +0 -2
  333. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +0 -3
  334. package/node_modules/@allyhub-next/runtimes/dist/unpack.js +0 -2
  335. package/node_modules/@allyhub-next/scenery/dist/phone.js +0 -2
  336. package/node_modules/@allyhub-next/video-core/dist/fact.js +0 -2
  337. package/node_modules/@allyhub-next/video-core/dist/formats.js +0 -2
  338. package/node_modules/@allyhub-next/video-core/dist/index.js +0 -2
  339. package/node_modules/@allyhub-next/video-core/dist/measure.js +0 -5
  340. package/node_modules/@allyhub-next/video-core/dist/piece.js +0 -2
  341. package/node_modules/@allyhub-next/video-core/dist/problem.js +0 -2
  342. package/node_modules/@allyhub-next/video-core/dist/script.js +0 -2
  343. package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +0 -37
  344. package/node_modules/@allyhub-next/video-core/dist/slides.js +0 -2
  345. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/LICENSE +0 -0
  346. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.d.ts +0 -0
  347. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.js +0 -0
  348. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.d.ts +0 -0
  349. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.js +0 -0
  350. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.d.ts +0 -0
  351. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.js +0 -0
  352. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.d.ts +0 -0
  353. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.js +0 -0
  354. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.d.ts +0 -0
  355. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.js +0 -0
  356. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.d.ts +0 -0
  357. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.js +0 -0
  358. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.d.ts +0 -0
  359. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.js +0 -0
  360. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.d.ts +0 -0
  361. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.js +0 -0
  362. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -0
  363. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.js +0 -0
  364. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -0
  365. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.js +0 -0
  366. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.d.ts +0 -0
  367. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.js +0 -0
  368. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.d.ts +0 -0
  369. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.js +0 -0
  370. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.d.ts +0 -0
  371. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.js +0 -0
  372. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.d.ts +0 -0
  373. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.js +0 -0
  374. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.d.ts +0 -0
  375. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.js +0 -0
  376. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.d.ts +0 -0
  377. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.js +0 -0
  378. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.d.ts +0 -0
  379. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.js +0 -0
  380. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -0
  381. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.js +0 -0
  382. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.d.ts +0 -0
  383. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.js +0 -0
  384. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -0
  385. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.js +0 -0
  386. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.d.ts +0 -0
  387. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.js +0 -0
  388. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.d.ts +0 -0
  389. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.js +0 -0
  390. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.d.ts +0 -0
  391. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.js +0 -0
  392. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.d.ts +0 -0
  393. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.js +0 -0
  394. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -0
  395. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.js +0 -0
  396. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.d.ts +0 -0
  397. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.js +0 -0
  398. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.d.ts +0 -0
  399. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.js +0 -0
  400. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.d.ts +0 -0
  401. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.js +0 -0
  402. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.d.ts +0 -0
  403. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.js +0 -0
  404. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.d.ts +0 -0
  405. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.js +0 -0
  406. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.d.ts +0 -0
  407. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.js +0 -0
  408. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.d.ts +0 -0
  409. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.js +0 -0
  410. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.d.ts +0 -0
  411. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.js +0 -0
  412. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.d.ts +0 -0
  413. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.js +0 -0
  414. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.d.ts +0 -0
  415. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.js +0 -0
  416. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.d.ts +0 -0
  417. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.js +0 -0
  418. /package/{node_modules/@allyhub-next/formats → dist/node_modules/@allyhub-next/chart}/LICENSE +0 -0
  419. /package/{node_modules/@allyhub-next/protocol → dist/node_modules/@allyhub-next/formats}/LICENSE +0 -0
  420. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.d.ts +0 -0
  421. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.js +0 -0
  422. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.d.ts +0 -0
  423. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.js +0 -0
  424. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.d.ts +0 -0
  425. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.js +0 -0
  426. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.d.ts +0 -0
  427. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.js +0 -0
  428. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.d.ts +0 -0
  429. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.js +0 -0
  430. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.d.ts +0 -0
  431. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.js +0 -0
  432. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.d.ts +0 -0
  433. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.js +0 -0
  434. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.d.ts +0 -0
  435. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.js +0 -0
  436. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.d.ts +0 -0
  437. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.js +0 -0
  438. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.d.ts +0 -0
  439. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.js +0 -0
  440. /package/{node_modules/@allyhub-next/runtimes → dist/node_modules/@allyhub-next/protocol}/LICENSE +0 -0
  441. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.d.ts +0 -0
  442. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.js +0 -0
  443. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.d.ts +0 -0
  444. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.js +0 -0
  445. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.d.ts +0 -0
  446. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.js +0 -0
  447. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.js +0 -0
  448. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.d.ts +0 -0
  449. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.js +0 -0
  450. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.d.ts +0 -0
  451. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.js +0 -0
  452. /package/{node_modules/@allyhub-next/scenery → dist/node_modules/@allyhub-next/runtimes}/LICENSE +0 -0
  453. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.d.ts +0 -0
  454. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.js +0 -0
  455. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.d.ts +0 -0
  456. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.js +0 -0
  457. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.js +0 -0
  458. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.d.ts +0 -0
  459. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.js +0 -0
  460. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.d.ts +0 -0
  461. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.js +0 -0
  462. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/manifest.json +0 -0
  463. /package/{node_modules/@allyhub-next/video-core → dist/node_modules/@allyhub-next/scenery}/LICENSE +0 -0
  464. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/NOTICE +0 -0
  465. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.d.ts +0 -0
  466. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.js +0 -0
  467. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.d.ts +0 -0
  468. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.js +0 -0
  469. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.d.ts +0 -0
  470. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.js +0 -0
  471. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.d.ts +0 -0
  472. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.js +0 -0
  473. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.d.ts +0 -0
  474. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.js +0 -0
  475. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.d.ts +0 -0
  476. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.js +0 -0
  477. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.d.ts +0 -0
  478. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.js +0 -0
  479. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.d.ts +0 -0
  480. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.js +0 -0
  481. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.d.ts +0 -0
  482. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.js +0 -0
  483. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.d.ts +0 -0
  484. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.js +0 -0
  485. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.d.ts +0 -0
  486. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.js +0 -0
  487. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.js +0 -0
  488. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.d.ts +0 -0
  489. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.js +0 -0
  490. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.d.ts +0 -0
  491. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.js +0 -0
  492. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.d.ts +0 -0
  493. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.js +0 -0
  494. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.d.ts +0 -0
  495. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.js +0 -0
  496. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.d.ts +0 -0
  497. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.js +0 -0
  498. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.d.ts +0 -0
  499. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.js +0 -0
  500. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.d.ts +0 -0
  501. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.js +0 -0
  502. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.d.ts +0 -0
  503. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.js +0 -0
  504. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.d.ts +0 -0
  505. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.js +0 -0
  506. /package/{node_modules/@allyhub-next/video-core/dist/render-types.js → dist/node_modules/@allyhub-next/slides-core/dist/model.js} +0 -0
  507. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.d.ts +0 -0
  508. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.js +0 -0
  509. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.d.ts +0 -0
  510. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.js +0 -0
  511. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.d.ts +0 -0
  512. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.js +0 -0
  513. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.d.ts +0 -0
  514. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.js +0 -0
  515. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.d.ts +0 -0
  516. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.js +0 -0
  517. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.d.ts +0 -0
  518. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.js +0 -0
  519. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.d.ts +0 -0
  520. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.js +0 -0
  521. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.d.ts +0 -0
  522. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.js +0 -0
  523. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.d.ts +0 -0
  524. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.js +0 -0
  525. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.d.ts +0 -0
  526. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.js +0 -0
  527. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.d.ts +0 -0
  528. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.js +0 -0
  529. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.d.ts +0 -0
  530. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.js +0 -0
  531. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.d.ts +0 -0
  532. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.js +0 -0
  533. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.d.ts +0 -0
  534. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.js +0 -0
  535. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.d.ts +0 -0
  536. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.js +0 -0
  537. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.d.ts +0 -0
  538. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.js +0 -0
  539. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.d.ts +0 -0
  540. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.js +0 -0
  541. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.d.ts +0 -0
  542. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.js +0 -0
  543. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.d.ts +0 -0
  544. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.js +0 -0
  545. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.d.ts +0 -0
  546. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.js +0 -0
  547. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.js +0 -0
  548. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.d.ts +0 -0
  549. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.js +0 -0
  550. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.d.ts +0 -0
  551. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.js +0 -0
  552. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.d.ts +0 -0
  553. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.js +0 -0
  554. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.js +0 -0
  555. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.d.ts +0 -0
  556. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.js +0 -0
  557. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.d.ts +0 -0
  558. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.js +0 -0
  559. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.d.ts +0 -0
  560. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.js +0 -0
  561. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.d.ts +0 -0
  562. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.js +0 -0
  563. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.d.ts +0 -0
  564. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.js +0 -0
@@ -0,0 +1,64 @@
1
+ import type { Calc } from "./calc/engine.js";
2
+ export type DiffKind =
3
+ /** It computes or holds something else, its formula the same. */
4
+ "value"
5
+ /** Its formula changed, and what it computes did not. */
6
+ | "formula"
7
+ /** Its formula changed, and what it computes. */
8
+ | "both" | "added" | "removed";
9
+ export interface DiffSide {
10
+ /** Its address in this version. */
11
+ cell: string;
12
+ value: string | number | boolean | null;
13
+ shown: string;
14
+ formula?: string;
15
+ }
16
+ export interface CellChange {
17
+ kind: DiffKind;
18
+ sheet: string;
19
+ /** Its table and column, and its row's key when rows are lined up by one. */
20
+ table?: string;
21
+ column?: string;
22
+ key?: string;
23
+ was?: DiffSide;
24
+ now?: DiffSide;
25
+ }
26
+ export interface SheetDiff {
27
+ name: string;
28
+ added: boolean;
29
+ removed: boolean;
30
+ }
31
+ export interface TableDiff {
32
+ sheet: string;
33
+ name: string;
34
+ /** How rows were lined up. */
35
+ by: "key" | "position";
36
+ key?: string;
37
+ rowsAdded: string[];
38
+ rowsRemoved: string[];
39
+ columnsAdded: string[];
40
+ columnsRemoved: string[];
41
+ }
42
+ export interface WorkbookDiff {
43
+ sheets: SheetDiff[];
44
+ tables: TableDiff[];
45
+ names: {
46
+ name: string;
47
+ was?: string;
48
+ now?: string;
49
+ }[];
50
+ /** Sheets whose charts differ. */
51
+ charts: string[];
52
+ cells: CellChange[];
53
+ counts: Record<DiffKind, number>;
54
+ }
55
+ export interface DiffOptions {
56
+ /** How far apart numbers may be, as a share of the larger, and be the same. */
57
+ tolerance?: number;
58
+ }
59
+ export declare const DIFF_DEFAULTS: {
60
+ readonly tolerance: 0;
61
+ };
62
+ /** What changed from one version of a workbook to another, both computed. */
63
+ export declare function diffWorkbooks(was: Calc, now: Calc, o?: DiffOptions): WorkbookDiff;
64
+ //# sourceMappingURL=diff.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{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()}
@@ -0,0 +1,154 @@
1
+ import type { SheetFile, SheetTable, SheetWorksheet } from "@allyhub-next/formats";
2
+ import { type Area } from "./address.js";
3
+ import { restructure, type RefusedEdit } from "./structure.js";
4
+ import { type CellLook, type CsvRows, type SharedFormula, type Table, type Workbook, type Worksheet } from "./workbook.js";
5
+ /** What an edit reads: the files, and the workbook read from them. */
6
+ export interface EditBook {
7
+ file: SheetFile;
8
+ rows: ReadonlyMap<string, CsvRows>;
9
+ workbook: Workbook;
10
+ }
11
+ /** A cell an edit changed, for a model that takes it in as it is. */
12
+ export interface ChangedCell {
13
+ sheet: Worksheet;
14
+ row: number;
15
+ col: number;
16
+ /** What it now holds, as typed; nothing: empty. */
17
+ input?: string;
18
+ /** Its column's formula, as it is again when the exception goes. */
19
+ column?: SharedFormula;
20
+ /** sheet.yaml's key for it, now; null: it has none now. */
21
+ key?: string | null;
22
+ /** The CSV record of a table's row, now. */
23
+ record?: {
24
+ table: Table;
25
+ index: number;
26
+ fields: string[];
27
+ };
28
+ }
29
+ /** What an edit changed. */
30
+ export interface BookEdit {
31
+ /** sheet.yaml, when it changed. */
32
+ file?: SheetFile;
33
+ /** The CSV files that changed. */
34
+ rows: Map<string, CsvRows>;
35
+ /** Cells changed, each one that did, when nothing else did. */
36
+ cells: ChangedCell[];
37
+ /** Tables, sheets or fills changed: the model is read again. */
38
+ whole: boolean;
39
+ /** Why nothing was done. */
40
+ refused?: EditRefused;
41
+ /** A formula went in one cell of a column of typed values: it can go over all of them. */
42
+ offer?: {
43
+ sheet: string;
44
+ row: number;
45
+ col: number;
46
+ text: string;
47
+ };
48
+ /** CSV files no sheet names any more. */
49
+ removed?: string[];
50
+ }
51
+ export type EditRefused = RefusedEdit | "column-name" | "sheet-name" | "sheet-taken" | "name-invalid" | "merge-table" | "no-data" | "table-move";
52
+ /** The most typed cells written as keys of `cells`: more go in a CSV file of their own, as a script's do. */
53
+ export declare const BLOCK_CELLS = 100;
54
+ export declare const blankEdit: () => BookEdit;
55
+ export declare const refused: (why: EditRefused) => BookEdit;
56
+ export declare class Draft {
57
+ private readonly book;
58
+ private readonly specs;
59
+ private file;
60
+ private fileChanged;
61
+ /** Rows each table has in this edit: a paste may write several under it. */
62
+ private readonly grown;
63
+ /** The records of the rows added in this edit, by table and row. */
64
+ private readonly added;
65
+ readonly edit: BookEdit;
66
+ constructor(book: EditBook);
67
+ /** The sheet's entry, to change: its own copy from the first change on. */
68
+ spec(sheet: Worksheet): SheetWorksheet;
69
+ /** A table's entry, to change. */
70
+ table(sheet: Worksheet, table: Table): SheetTable;
71
+ /** A file's rows for this edit, to change: its own copy from the first change on. */
72
+ rows(path: string): (readonly string[])[];
73
+ setField(path: string, record: number, field: number, text: string): string[];
74
+ rowsOf(table: Table): number;
75
+ grow(table: Table, row: number, record: number): void;
76
+ /** The table a row added in this edit is in, and that row's record. */
77
+ addedAt(sheet: Worksheet, row: number, col: number): {
78
+ table: Table;
79
+ record: number;
80
+ } | undefined;
81
+ finish(): BookEdit;
82
+ }
83
+ export declare const movedTo: (text: string, rows: number, columns: number) => string;
84
+ export declare function writeOne(d: Draft, book: EditBook, sheet: Worksheet, row: number, col: number, text: string): BookEdit | undefined;
85
+ /** One cell written as typed, or several: `text` is what a person types there. */
86
+ export interface CellWrite {
87
+ row: number;
88
+ col: number;
89
+ text: string;
90
+ }
91
+ /** Cells of a sheet written, each in the file that holds it. */
92
+ export declare function writeCells(book: EditBook, sheetName: string, writes: readonly CellWrite[]): BookEdit;
93
+ /** Every cell of a column's rows takes the formula: what Excel's "overwrite all cells" does. */
94
+ export declare function overwriteColumn(book: EditBook, sheetName: string, row: number, col: number, text: string): BookEdit;
95
+ /** What an area holds taken out; a calculated column whose every row is taken loses its formula. */
96
+ export declare function clearCells(book: EditBook, sheetName: string, area: Area): BookEdit;
97
+ /** Keys a fill takes the place of: the cells in it, and ranges it covers. */
98
+ export declare function dropKeys(spec: SheetWorksheet, area: Area): void;
99
+ /**
100
+ * What a cell holds filled over an area, as Cmd+D and Cmd+R do. In a file of
101
+ * rows each cell takes it; loose, a formula is one key over the range.
102
+ */
103
+ export declare function fillCells(book: EditBook, sheetName: string, from: {
104
+ row: number;
105
+ col: number;
106
+ }, area: Area, input: string): BookEdit;
107
+ /** Many typed cells in empty places: a CSV file of their own, as a script's are. */
108
+ export declare function writeBlockOf(book: EditBook, sheetName: string, at: {
109
+ row: number;
110
+ col: number;
111
+ }, rows: readonly (readonly string[])[], path: string): BookEdit;
112
+ /**
113
+ * A look given to an area: sheet.yaml's `format`, or the column, row or
114
+ * table's column it covers, whichever says it plainest. What said otherwise
115
+ * of those cells and would win gives way: a key's own field goes, and a range
116
+ * key's moves to `format`, which the new look then follows. A field set to
117
+ * undefined is taken away, and written as off only where the file says it
118
+ * elsewhere.
119
+ */
120
+ export declare function setLook(book: EditBook, sheetName: string, area: Area, patch: CellLook): BookEdit;
121
+ /** The same in an edit under way. */
122
+ export declare function applyLook(d: Draft, sheet: Worksheet, area: Area, patch: CellLook): void;
123
+ /** What an edit left empty goes. */
124
+ export declare function tidied(spec: SheetWorksheet): void;
125
+ /** A column's width, in pixels; undefined: as tall or wide as nothing sets. */
126
+ export declare function setColumnWidth(book: EditBook, sheetName: string, col: number, width: number | undefined): BookEdit;
127
+ export declare function setRowHeight(book: EditBook, sheetName: string, row: number, height: number | undefined): BookEdit;
128
+ /** Excel's rules for a sheet's name. */
129
+ export declare function sheetNameProblem(book: Pick<EditBook, "workbook">, name: string, own?: string): EditRefused | undefined;
130
+ export declare function renameSheet(book: EditBook, from: string, to: string): BookEdit;
131
+ /** A new sheet, after the one named. */
132
+ export declare function addSheet(book: EditBook, name: string, after: string | undefined): BookEdit;
133
+ /** Excel's name for a copy of a sheet: "Orders (2)", cut to fit the 31 a name may hold. */
134
+ export declare function copyName(book: EditBook, name: string): string;
135
+ /** A copy of a sheet right after it, under Excel's name for one. */
136
+ export declare function duplicateSheet(book: EditBook, name: string): BookEdit;
137
+ /** A sheet taken out; what named it says #REF!. */
138
+ export declare function deleteSheet(book: EditBook, name: string): BookEdit;
139
+ /** A sheet moved to `to` among the sheets. */
140
+ export declare function moveSheet(book: EditBook, name: string, to: number): BookEdit;
141
+ /** Rows or columns put in or taken out. */
142
+ export declare function bandEdit(book: EditBook, edit: Parameters<typeof restructure>[1]): BookEdit;
143
+ /** A name given to a place, as the name box does when it holds a new one. */
144
+ export declare function defineName(book: EditBook, name: string, sheetName: string, area: Area): BookEdit;
145
+ /** What a cell holds, as a person would type it again: its formula, or its value as the file writes it. */
146
+ export declare function inputOf(book: Pick<EditBook, "rows">, sheet: Worksheet, row: number, col: number): string;
147
+ /** The cells of a table's calculated columns set apart from their formula: facts, never problems. */
148
+ export declare function exceptionsOf(table: Table): {
149
+ row: number;
150
+ col: number;
151
+ column: string;
152
+ text: string;
153
+ }[];
154
+ //# sourceMappingURL=edit.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{MAX_COLUMNS as K,MAX_ROWS as R,cellName as N,columnLetter as C,contains as q,overlaps as O,rangeName as M,readAddress as X,readArea as j}from"./address.js";import{moveFormula as z}from"./formula/move.js";import{parseFormula as D}from"./formula/parse.js";import{printFormula as G}from"./formula/print.js";import{freeColumn as B,duplicated as H,restructure as F,uniqueColumn as I,withColumnsUpTo as A}from"./structure.js";import{readTyped as T}from"./values.js";import{FormulaCell as P,placeKey as V,validName as J}from"./workbook.js";export const BLOCK_CELLS=100;const _=(n,o)=>n.top<=o.top&&n.left<=o.left&&n.bottom>=o.bottom&&n.right>=o.right,S=(n,o)=>Object.fromEntries(Object.entries(n).filter(([e])=>e!==o)),Q=n=>S(n,"formula"),b=(n,o)=>Object.fromEntries(Object.entries(n).filter(([e])=>e!==o));export const blankEdit=()=>({rows:new Map,cells:[],whole:!1}),refused=n=>({...blankEdit(),refused:n});const v=n=>T(n).formula!==void 0;function Y(n){const o=T(n);return o.formula!==void 0?n:o.value===null?null:o.format!==void 0?n:typeof o.value=="number"||typeof o.value=="boolean"?o.value:n}const Z=n=>n!==null&&typeof n=="object"?Object.fromEntries(Object.entries(n).filter(([o])=>o!=="value"&&o!=="formula")):{};export class Draft{book;specs=new Map;file;fileChanged=!1;grown=new Map;added=new Map;edit=blankEdit();constructor(o){this.book=o,this.file=o.file}spec(o){let e=this.specs.get(o.index);if(!e){const t=this.file.sheets.findIndex(s=>s.name===o.name);e={...this.file.sheets[t]??{name:o.name}},this.specs.set(o.index,e),this.fileChanged||(this.file={...this.file,sheets:[...this.file.sheets]},this.fileChanged=!0),this.file.sheets[t]=e}return e}table(o,e){const t=this.spec(o),s=[...t.tables??[]],r=s.findIndex(l=>l.name===e.name),i={...s[r]??e.spec};return s[r]=i,t.tables=s,i}rows(o){const e=this.edit.rows.get(o);if(e)return e;const t=[...this.book.rows.get(o)??[]];return this.edit.rows.set(o,t),t}setField(o,e,t,s){const r=this.rows(o),i=[...r[e]??[]];for(;i.length<=t;)i.push("");return i[t]=s,r[e]=i,i}rowsOf(o){return this.grown.get(o)??o.rows}grow(o,e,t){this.grown.set(o,this.rowsOf(o)+1);const s=this.added.get(o)??new Map;s.set(e,t),this.added.set(o,s)}addedAt(o,e,t){for(const[s,r]of this.added){const i=r.get(e);if(i!==void 0&&s.sheet===o&&t>=s.at.col&&t<s.at.col+s.columns.length)return{table:s,record:i}}}finish(){return this.fileChanged&&(this.edit.file=this.file),this.edit}}function ee(n,o,e,t){return o.tables.find(s=>{const r=s.at.row+n.rowsOf(s)+1;if(e!==r)return!1;const i=s.at.col+s.columns.length-1;if(t<s.at.col||t>i)return!1;for(let l=s.at.col;l<=i;l++)if(o.at(e,l)!==void 0)return!1;return!0})}function te(n,o,e){return n.tables.find(t=>{const{top:s,bottom:r,right:i}=t.area;if(e!==i+1||o<s||o>r)return!1;for(let l=s;l<=r;l++)if(n.at(l,e)!==void 0)return!1;return!0})}export const movedTo=(n,o,e)=>{const t=D(n);return t.ok?G(z(t.node,o,e)):n};function E(n,o,e,t,s,r){const i=e.at.row+1,l=n.table(o,e),f=movedTo(r,i-s,0);if(l.columns={...l.columns,[t.name]:{...l.columns?.[t.name],formula:f}},t.csv!==void 0){const c=e.places[s-i];c!==void 0&&n.setField(e.file,c,t.csv,"")}n.edit.whole=!0}function ne(n,o,e,t){const{csv:s}=e;if(s===void 0)return!1;const r=n.rows(o.file);return o.places.some((i,l)=>l!==t&&(r[i]?.[s]??"")!=="")}function oe(n,o,e,t,s){const r=s.trim();if(r==="")return refused("column-name");if(r===t.name)return n.finish();const i=e.columns.filter(c=>c!==t).map(c=>c.name),l=I(i,r),f=F(o,{op:"rename-column",table:e.name,from:t.name,to:l});return{...blankEdit(),file:f.file,rows:new Map(f.rows),whole:!0}}function se(n,o,e,t,s,r){const i=e.columns[s-e.at.col];if(!i)return;const l=t-e.at.row-1;if(v(r)){if(i.formula){E(n,o,e,i,t,r);return}if(!ne(n,e,i,l)){E(n,o,e,i,t,r);return}n.edit.offer={sheet:o.name,row:t,col:s,text:r}}const c=e.places[l];if(c===void 0)return;let d=i.csv;if(d===void 0){if(r==="")return;const w=e.columns.map(p=>p.name);n.edit.rows.set(e.file,A(n.rows(e.file),w,i.index)),n.edit.whole=!0,d=i.index}const a=n.setField(e.file,c,d,r);n.edit.cells.push({sheet:o,row:t,col:s,...r===""&&i.formula?{column:i.formula}:{input:r},record:{table:e,index:l,fields:a}})}function re(n,o,e,t,s){const r=n.rows(o.file),i=Math.max(r[0]?.length??1,1),l=new Array(i).fill(""),f=o.columns[t-o.at.col];f?.csv!==void 0&&(l[f.csv]=s),r.push(l),n.grow(o,e,r.length-1),n.edit.whole=!0}function ie(n,o,e,t,s){const r=n.table(o,e),i=e.columns.map(w=>w.name),l=t===e.at.row,f=l?I(i,s.trim()===""?B(i):s.trim()):B(i);if(n.edit.whole=!0,!l&&v(s)){r.columns={...r.columns,[f]:{formula:movedTo(s,e.at.row+1-t,0)}};return}const c=i.length,d=A(n.rows(e.file),i,c-1),a=d[0];if(a&&a.push(f),d.forEach((w,p)=>{p>0&&w.length>0&&w.push("")}),!l){const w=e.places[t-e.at.row-1],p=w===void 0?void 0:d[w];p&&(p[c]=s)}n.edit.rows.set(e.file,d)}function le(n,o,e,t,s,r,i){n.setField(e,s-t.top,r-t.left,i),n.edit.cells.push({sheet:o,row:s,col:r,input:i})}function fe(n,o,e){return Object.keys(n.spec.cells??{}).some(t=>{if(!t.includes(":"))return!1;const s=j(t);return s!==void 0&&q(s,o,e)})}function ce(n,o,e,t,s){const r=n.spec(o),i=N({row:e,col:t});let l={...r.cells};const f=l[i],c=f===void 0?{}:Z(f),d=Y(s),a=Object.keys(c).length===0;let w;if(d===null){const p=fe(o,e,t);w=!a||p,a&&!p?l=b(l,i):l[i]=a?null:c}else w=!0,l[i]=a?d:{...c,...v(s)?{formula:s}:{value:d}};r.cells=l,Object.keys(l).length===0&&delete r.cells,n.edit.cells.push({sheet:o,row:e,col:t,input:s,key:w?i:null})}export function writeOne(n,o,e,t,s,r){const i=n.addedAt(e,t,s);if(i){const{csv:c}=i.table.columns[s-i.table.at.col]??{};c!==void 0&&n.setField(i.table.file,i.record,c,r);return}const l=e.tableAt(t,s);if(l){const c=l.columns[s-l.at.col];if(t===l.at.row)return c?oe(n,o,l,c,r):void 0;se(n,e,l,t,s,r);return}if(r!==""){const c=ee(n,e,t,s);if(c){re(n,c,t,s,r);return}const d=te(e,t,s);if(d){ie(n,e,d,t,r);return}}const f=e.blockAt(t,s);f?le(n,e,f.file,f.area,t,s,r):ce(n,e,t,s,r)}export function writeCells(n,o,e){const t=n.workbook.sheet(o);if(!t)return refused("no-sheet");const s=new Draft(n);for(const{row:r,col:i,text:l}of[...e].sort((f,c)=>f.row-c.row||f.col-c.col)){const f=writeOne(s,n,t,r,i,l);if(f)return f}return s.finish()}export function overwriteColumn(n,o,e,t,s){const r=n.workbook.sheet(o),i=r?.tableAt(e,t);if(!r||!i)return refused("no-sheet");const l=i.columns[t-i.at.col];if(!l)return refused("no-sheet");const f=new Draft(n);E(f,r,i,l,e,s);const{csv:c}=l;if(c!==void 0)for(const d of i.places)f.setField(i.file,d,c,"");return f.finish()}function*ue(n,o){const e=Math.min(o.right,n.columnsUsed-1);for(let t=o.left;t<=e;t++){const[s,r]=n.span(t,o.top,o.bottom);for(let i=s;i<=r;i++)n.at(i,t)!==void 0&&(yield[i,t])}}export function clearCells(n,o,e){const t=n.workbook.sheet(o);if(!t)return refused("no-sheet");const s=new Draft(n);for(const r of t.tables){const{top:i,bottom:l}=r.data;if(!(l<i||e.top>i||e.bottom<l))for(const f of r.columns){const c=r.at.col+f.index;if(c<e.left||c>e.right||!f.formula)continue;const d=s.table(t,r),a=r.columns.map(L=>L.name);f.csv===void 0&&s.edit.rows.set(r.file,A(s.rows(r.file),a,f.index));const w=Q(d.columns?.[f.name]??{}),p=b(d.columns??{},f.name);d.columns=Object.keys(w).length>0?{...p,[f.name]:w}:p,Object.keys(d.columns).length===0&&delete d.columns,s.edit.whole=!0}}for(const[r,i]of ue(t,e)){if(t.tableAt(r,i)?.at.row===r)continue;const l=writeOne(s,n,t,r,i,"");if(l)return l}return s.finish()}export function dropKeys(n,o){n.cells&&(n.cells=Object.fromEntries(Object.entries(n.cells).filter(([e])=>{const t=j(e);return!t||!_(o,t)})))}export function fillCells(n,o,e,t,s){const r=n.workbook.sheet(o);if(!r)return refused("no-sheet");if(!r.tables.some(f=>O(f.area,t))&&!r.blocks.some(f=>O(f.area,t))&&v(s)){const f=new Draft(n),c=f.spec(r);dropKeys(c,t);const d=movedTo(s,t.top-e.row,t.left-e.col),a=M(t);return c.cells={...c.cells,[a]:d},f.edit.whole=!0,f.finish()}const l=[];for(let f=t.top;f<=t.bottom;f++)for(let c=t.left;c<=t.right;c++)f===e.row&&c===e.col||l.push({row:f,col:c,text:v(s)?movedTo(s,f-e.row,c-e.col):s});return writeCells(n,o,l)}export function writeBlockOf(n,o,e,t,s){const r=n.workbook.sheet(o);if(!r)return refused("no-sheet");const i=new Draft(n),l=i.spec(r);return l.blocks=[...l.blocks??[],{at:N(e),rows:s}],i.edit.rows.set(s,t),i.edit.whole=!0,i.finish()}const $=(n,o)=>Object.keys(o).some(e=>e in n),x=(n,o)=>Object.fromEntries(Object.entries(n).filter(([e])=>!(e in o)));function de(n){if(n===null||typeof n!="object")return n;const o=Object.keys(n);return o.length===1&&o[0]==="value"?n.value??null:o.length===1&&o[0]==="formula"?n.formula??null:n}const me={bold:!1,italic:!1,underline:!1,strike:!1,wrap:!1,align:"general",format:"General",color:"#000000",fill:"#FFFFFF",font:"Calibri",size:11,border:{left:{style:"none"},right:{style:"none"},top:{style:"none"},bottom:{style:"none"}}};function ae(n,o,e,t){for(const[s,r]of Object.entries(n.columns??{})){const i=X(`${s}1`)?.col;if(i!==void 0&&i>=e.left&&i<=e.right&&t in r)return!0}for(const[s,r]of Object.entries(n.rows??{})){const i=Number(s)-1;if(i>=e.top&&i<=e.bottom&&t in r)return!0}return o.tables.some(s=>O(s.area,e)&&s.columns.some(r=>r.spec!==void 0&&t in r.spec&&s.at.col+r.index>=e.left&&s.at.col+r.index<=e.right))}export function setLook(n,o,e,t){const s=n.workbook.sheet(o);if(!s)return refused("no-sheet");const r=new Draft(n);return applyLook(r,s,e,t),r.finish()}export function applyLook(n,o,e,t){const s=n.spec(o);he(n,o,s,e,t),tidied(s)}function he(n,o,e,t,s){if(e.cells){const u={...e.cells},m=[];for(const[g,h]of Object.entries(u)){if(h===null||typeof h!="object"||!$(h,s))continue;const y=j(g);!y||!O(y,t)||(g.includes(":")&&!_(t,y)&&m.push({range:g,...Object.fromEntries(Object.entries(h).filter(([W])=>W in s))}),u[g]=de(x(h,s)))}e.cells=u,m.length>0&&(e.format=[...e.format??[],...m])}const r=e.format??[],i=u=>{const m=j(u.range);return m!==void 0&&O(m,t)},l=r.some(u=>i(u)&&$(u,s)),f=Object.fromEntries(Object.entries(s).filter(([,u])=>u!==void 0)),c=t.top===0&&t.bottom===R-1,d=t.left===0&&t.right===K-1;if(c&&!d&&!l){let u={...e.columns};for(let m=t.left;m<=t.right;m++){const g=C(m),h={...x(u[g]??{},s),...f};u=Object.keys(h).length===0?b(u,g):{...u,[g]:h}}e.columns=u;return}if(d&&!c&&!l){let u={...e.rows};for(let m=t.top;m<=t.bottom;m++){const g=String(m+1),h={...x(u[g]??{},s),...f};u=Object.keys(h).length===0?b(u,g):{...u,[g]:h}}e.rows=u;return}const a=o.tables.find(u=>u.rows>0&&t.top===u.data.top&&t.bottom===u.data.bottom&&t.left>=u.area.left&&t.right<=u.area.right);if(a&&!l){const u=n.table(o,a);let m={...u.columns};for(let g=t.left;g<=t.right;g++){const h=a.columns[g-a.at.col]?.name;if(h===void 0)continue;const y={...x(m[h]??{},s),...f};m=Object.keys(y).length===0?b(m,h):{...m,[h]:y}}u.columns=m,Object.keys(m).length===0&&delete u.columns,n.edit.whole=!0;return}const w=M(t),p=r.find(u=>{const m=j(u.range);return m!==void 0&&M(m)===w}),U=(p?r.slice(r.indexOf(p)+1):[]).some(u=>i(u)&&$(u,s)),k={};for(const[u,m]of Object.entries(s)){const g=r.some(h=>h!==p&&i(h)&&u in h)||ae(e,o,t,u);m!==void 0?k[u]=m:g&&(k[u]=me[u])}if(p&&!U){const u={...x(p,s),...k};e.format=r.flatMap(m=>m!==p?[m]:Object.keys(u).length>1?[u]:[])}else Object.keys(k).length>0&&(e.format=[...r,{range:w,...k}])}export function tidied(n){n.format?.length===0&&delete n.format,n.columns&&Object.keys(n.columns).length===0&&delete n.columns,n.rows&&Object.keys(n.rows).length===0&&delete n.rows,n.cells&&Object.keys(n.cells).length===0&&delete n.cells}export function setColumnWidth(n,o,e,t){const s=n.workbook.sheet(o);if(!s)return refused("no-sheet");const r=new Draft(n),i=r.spec(s),l=C(e),f=S(i.columns?.[l]??{},"width"),c=t===void 0?f:{...f,width:t},d=b(i.columns??{},l);return i.columns=Object.keys(c).length===0?d:{...d,[l]:c},tidied(i),r.finish()}export function setRowHeight(n,o,e,t){const s=n.workbook.sheet(o);if(!s)return refused("no-sheet");const r=new Draft(n),i=r.spec(s),l=String(e+1),f=S(i.rows?.[l]??{},"height"),c=t===void 0?f:{...f,height:t},d=b(i.rows??{},l);return i.rows=Object.keys(c).length===0?d:{...d,[l]:c},tidied(i),r.finish()}export function sheetNameProblem(n,o,e){if(o.trim()===""||o.length>31||/[\\/?*[\]:]/u.test(o)||o.startsWith("'")||o.endsWith("'"))return"sheet-name";const t=n.workbook.sheet(o);if(t&&t.name!==e)return"sheet-taken"}export function renameSheet(n,o,e){const t=sheetNameProblem(n,e,o);if(t)return refused(t);const s=F(n,{op:"rename-sheet",from:o,to:e});return{...blankEdit(),file:s.file,rows:new Map(s.rows),whole:!0}}export function addSheet(n,o,e){const t=sheetNameProblem(n,o);if(t)return refused(t);const s=[...n.file.sheets],r=s.findIndex(i=>i.name===e);return s.splice(r<0?s.length:r+1,0,{name:o}),{...blankEdit(),file:{...n.file,sheets:s},whole:!0}}export function copyName(n,o){for(let e=2;;e++){const t=` (${String(e)})`,s=o.slice(0,31-t.length).trimEnd()+t;if(!n.workbook.sheet(s))return s}}export function duplicateSheet(n,o){const e=H(n,o,copyName(n,o));return e.refused?refused(e.refused):{...blankEdit(),file:e.file,rows:new Map(e.rows),whole:!0}}export function deleteSheet(n,o){const e=F(n,{op:"delete-sheet",name:o});if(e.refused)return refused(e.refused);const t=we(n.file,e.file);for(const s of t)e.rows.delete(s);return{...blankEdit(),file:e.file,rows:new Map(e.rows),whole:!0,...t.length===0?{}:{removed:t}}}function we(n,o){const e=s=>s.sheets.flatMap(r=>[...(r.tables??[]).map(i=>i.rows),...(r.blocks??[]).map(i=>i.rows)]),t=new Set(e(o));return[...new Set(e(n))].filter(s=>!t.has(s))}export function moveSheet(n,o,e){const t=[...n.file.sheets],s=t.findIndex(i=>i.name===o),[r]=t.splice(s,1);return r?(t.splice(e,0,r),{...blankEdit(),file:{...n.file,sheets:t},whole:!0}):refused("no-sheet")}export function bandEdit(n,o){const e=F(n,o);return e.refused?refused(e.refused):{...blankEdit(),file:e.file,rows:new Map(e.rows),whole:!0}}export function defineName(n,o,e,t){if(!J(o)||n.workbook.name(o)||n.workbook.table(o))return refused("name-invalid");const s=(l,f)=>`$${C(f)}$${String(l+1)}`,r=t.top===t.bottom&&t.left===t.right?s(t.top,t.left):`${s(t.top,t.left)}:${s(t.bottom,t.right)}`,i=/^[\p{L}_][\p{L}\p{N}_.]*$/u.test(e)?e:`'${e.replaceAll("'","''")}'`;return{...blankEdit(),file:{...n.file,names:{...n.file.names,[o]:`=${i}!${r}`}},whole:!0}}export function inputOf(n,o,e,t){const s=o.at(e,t);if(s===void 0)return"";if(s instanceof P)return s.text;const r=o.tableAt(e,t);if(r){const d=r.columns[t-r.at.col];if(e===r.at.row)return d?.name??"";const a=d?.csv===void 0?void 0:r.records[e-r.at.row-1]?.[d.csv];if(a!==void 0)return a}const i=o.blockAt(e,t);if(i){const d=n.rows.get(i.file)?.[e-i.area.top]?.[t-i.area.left];if(d!==void 0)return d}const l=o.keys.get(V(e,t)),f=l===void 0?void 0:o.spec.cells?.[l],c=f!==null&&typeof f=="object"?f.value:f;return c!=null?String(c):typeof s=="object"?s.code:String(s)}export function exceptionsOf(n){const o=[];for(const e of n.columns){const{csv:t}=e;!e.formula||t===void 0||n.records.forEach((s,r)=>{const i=s[t]??"";i!==""&&o.push({row:n.at.row+1+r,col:n.at.col+e.index,column:e.name,text:i})})}return o}
@@ -0,0 +1,11 @@
1
+ import { Calc } from "./calc/engine.js";
2
+ 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;
7
+ /** 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>;
11
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1,6 @@
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(`
5
+ `)}
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}}
@@ -0,0 +1,19 @@
1
+ import { type SheetFile } from "@allyhub-next/formats";
2
+ /** What is wrong with a workbook. */
3
+ export interface SheetProblem {
4
+ /** sheet.yaml or a CSV file, from the sheet's folder. */
5
+ file: string;
6
+ line?: number;
7
+ message: string;
8
+ }
9
+ export declare const ENTRY = "sheet.yaml";
10
+ export type YamlPath = readonly (string | number)[];
11
+ export interface ReadFile {
12
+ file?: SheetFile;
13
+ problems: SheetProblem[];
14
+ lineOf: (path: YamlPath) => number | undefined;
15
+ }
16
+ /** The CSV files a sheet.yaml names, from its folder. */
17
+ export declare function dataFilesOf(text: string): string[];
18
+ export declare function readSheetFile(text: string): ReadFile;
19
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1,3 @@
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}}
@@ -0,0 +1,24 @@
1
+ import { type SheetFilesColumn } from "@allyhub-next/formats";
2
+ import type { Calc } from "./calc/engine.js";
3
+ import { type Worksheet } from "./workbook.js";
4
+ export interface FileCell {
5
+ row: number;
6
+ col: number;
7
+ paths: string[];
8
+ column: SheetFilesColumn;
9
+ }
10
+ /** Whether a file is drawn in its cell. */
11
+ export declare const isPicture: (path: string) => boolean;
12
+ /** How tall a column draws its pictures, px. */
13
+ export declare const pictureHeight: (column: SheetFilesColumn) => number;
14
+ /** Whether a sheet has a `files` column, of a table or its own. */
15
+ export declare function hasFiles(sheet: Worksheet): boolean;
16
+ /** Every cell of a sheet that names files. */
17
+ export declare function fileCells(sheet: Worksheet, calc: Calc): FileCell[];
18
+ /** A picture's pixels, read from its head: PNG, JPEG and GIF. */
19
+ export declare function pictureSize(bytes: Uint8Array): {
20
+ width: number;
21
+ height: number;
22
+ type: "png" | "jpeg" | "gif";
23
+ } | undefined;
24
+ //# sourceMappingURL=files.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{SHEET_PICTURE_HEIGHT as p}from"@allyhub-next/formats";import{columnIndex as d,columnLetter as a}from"./address.js";import{filesIn as x}from"./workbook.js";const m=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/iu;export const isPicture=e=>m.test(e),pictureHeight=e=>(typeof e=="object"?e.height:void 0)??p;export function hasFiles(e){return Object.values(e.spec.columns??{}).some(t=>t.files!==void 0)||e.tables.some(t=>t.columns.some(c=>c.spec?.files))}export function fileCells(e,t){if(!hasFiles(e))return[];const c=[],o=(n,i,f)=>{const l=t.value(e,n,i);if(typeof l!="string")return;const s=x(l,f);s.length>0&&c.push({row:n,col:i,paths:s,column:f})},r=(n,i)=>e.tableAt(n,i)!==void 0;for(const[n,i]of Object.entries(e.spec.columns??{})){const f=d(n);if(f===void 0||i.files===void 0)continue;const[l,s]=e.span(f,0,e.lastRow);for(let u=l;u<=s;u++)r(u,f)||o(u,f,i.files)}for(const n of e.tables)for(const i of n.columns){const f=n.at.col+i.index,l=i.spec?.files??e.spec.columns?.[a(f)]?.files;if(l!==void 0)for(let s=n.data.top;s<=n.data.bottom;s++)o(s,f,l)}return c}export function pictureSize(e){const t=o=>e[o]??0,c=(o,r)=>{let n=0;for(let i=0;i<r;i++)n=n*256+t(o+i);return n};if(t(0)===137&&t(1)===80&&t(2)===78)return{type:"png",width:c(16,4),height:c(20,4)};if(t(0)===71&&t(1)===73&&t(2)===70)return{type:"gif",width:t(6)+t(7)*256,height:t(8)+t(9)*256};if(t(0)===255&&t(1)===216){let o=2;for(;o+9<e.length;){if(t(o)!==255)return;const r=t(o+1);if(r>=192&&r<=207&&![196,200,204].includes(r))return{type:"jpeg",width:c(o+7,2),height:c(o+5,2)};o+=2+c(o+2,2)}}}
@@ -0,0 +1,30 @@
1
+ import { type Area, type Place } from "./address.js";
2
+ import { Draft, type BookEdit, type EditBook } from "./edit.js";
3
+ import { type FillMode } from "./series.js";
4
+ import { type CellLook, type Worksheet } from "./workbook.js";
5
+ /** Pairs of where a look comes from and where it goes. */
6
+ export interface LookCopy {
7
+ from: Place;
8
+ to: Place;
9
+ }
10
+ /** Every field of a look taken away. */
11
+ export declare const NO_LOOK: CellLook;
12
+ /** Looks copied in an edit under way: only what differs is said, a rectangle at a time. */
13
+ export declare function copyLooks(d: Draft, from: Worksheet, to: Worksheet, pairs: readonly LookCopy[]): void;
14
+ /**
15
+ * What the fill handle does: `to` is the area dragged out, holding `from`.
16
+ * In one direction only, each line of `from` along it. A line of one formula
17
+ * is one key over its range when nothing but loose cells lie under it.
18
+ */
19
+ export declare function autoFill(book: EditBook, sheetName: string, from: Area, to: Area, mode?: FillMode): BookEdit;
20
+ /** Looks copied from cells to cells: Paste Special's Formats. */
21
+ export declare function pasteLooks(book: EditBook, fromSheet: string, toSheet: string, pairs: readonly LookCopy[]): BookEdit;
22
+ /** Where a double click on the handle fills to: as far down as the column beside it goes. */
23
+ export declare function fillDownTo(sheet: Worksheet, area: Area): number | undefined;
24
+ /**
25
+ * A cut pasted: the cells move, looks with them, and every formula in the
26
+ * workbook that named them follows. A table wholly among them moves too; part
27
+ * of one moves as its cells' values.
28
+ */
29
+ export declare function moveCells(book: EditBook, sheetName: string, from: Area, toSheet: string, to: Place): BookEdit;
30
+ //# sourceMappingURL=fill.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{cellName as X,contains as v,overlaps as A,rangeName as Y}from"./address.js";import{rectangles as N}from"./api/rectangles.js";import{Draft as E,applyLook as R,blankEdit as I,clearCells as Z,dropKeys as tt,inputOf as U,movedTo as W,refused as x,writeCells as ot,writeOne as et}from"./edit.js";import{relativeKey as nt}from"./formula/move.js";import{parseFormula as q}from"./formula/parse.js";import{printFormula as st}from"./formula/print.js";import{mapNode as rt}from"./formula/walk.js";import{restructure as it}from"./structure.js";import{seriesAfter as lt}from"./series.js";import{readTyped as ct}from"./values.js";import{workbookOf as ft}from"./workbook.js";const K=n=>ct(n).formula!==void 0;function ut(n,e,t){const o=q(n);return o.ok?nt(o.node,e,t):void 0}const at=(n,e)=>!n.tables.some(t=>A(t.area,e))&&!n.blocks.some(t=>A(t.area,e));function pt(n,e,t,o){if(n.some(r=>K(r.text))){const r=n.length;return e.map((f,l)=>{const a=t?n[((r-1-l)%r+r)%r]:n[l%r],b=a?.text??"";return{...f,text:a?W(b,f.row-a.row,f.col-a.col):b}})}const s=lt(n.map(r=>r.text),e.length,{mode:o,back:t});return e.map((r,f)=>({...r,text:s[f]??""}))}const G=["bold","italic","underline","strike","font","size","color","fill","align","valign","wrap","shrink","indent","rotation","border","format"];export const NO_LOOK=Object.fromEntries(G.map(n=>[n,void 0]));export function copyLooks(n,e,t,o){const i=new Map;for(const s of o){const r=e.lookAt(s.from.row,s.from.col),f=t.lookAt(s.to.row,s.to.col);if(JSON.stringify(r)===JSON.stringify(f))continue;const l=JSON.stringify(r),a=i.get(l);a?a.places.push(s.to):i.set(l,{look:r,places:[s.to]})}for(const{look:s,places:r}of i.values()){const f={};for(const l of G)f[l]=s[l];for(const l of N(r))R(n,t,l,f)}}export function autoFill(n,e,t,o,i="auto"){const s=n.workbook.sheet(e);if(!s)return x("no-sheet");const r=o.bottom>t.bottom||o.top<t.top,f=o.top<t.top||o.left<t.left,l=new E(n),a=r?{first:t.left,last:t.right}:{first:t.top,last:t.bottom},b=new Map,g=(u,w)=>{const k=`${String(u)}:${String(w)}`;let m=b.get(k);return m===void 0&&(m=U(n,s,u,w),b.set(k,m)),m},L=(t.bottom-t.top+1)*(t.right-t.left+1),y=new Set;for(let u=t.top;u<=t.bottom;u++)for(let w=t.left;w<=t.right;w++){const k=g(u,w);K(k)&&y.add(ut(k,u,w)??"")}if(y.size===1&&L>0&&at(s,o)&&wt(g,t)){const u=l.spec(s);return tt(u,o),u.cells={...u.cells,[Y(o)]:W(g(t.top,t.left),o.top-t.top,o.left-t.left)},l.edit.whole=!0,H(l,s,t,o,r),l.finish()}for(let u=a.first;u<=a.last;u++){const w=[];if(r)for(let p=t.top;p<=t.bottom;p++)w.push({row:p,col:u,text:g(p,u)});else for(let p=t.left;p<=t.right;p++)w.push({row:u,col:p,text:g(u,p)});const k=[],m=f?r?t.top-1:t.left-1:r?t.bottom+1:t.right+1,O=r?f?o.top:o.bottom:f?o.left:o.right,T=f?-1:1;for(let p=m;f?p>=O:p<=O;p+=T)k.push(r?{row:p,col:u}:{row:u,col:p});for(const p of pt(w,k,f,i))et(l,n,s,p.row,p.col,p.text)}return H(l,s,t,o,r),l.finish()}function wt(n,e){for(let t=e.top;t<=e.bottom;t++)for(let o=e.left;o<=e.right;o++)if(!K(n(t,o)))return!1;return!0}function H(n,e,t,o,i){const s=[],r=t.bottom-t.top+1,f=t.right-t.left+1;for(let l=o.top;l<=o.bottom;l++)for(let a=o.left;a<=o.right;a++){if(v(t,l,a))continue;const b=i?t.top+((l-t.top)%r+r)%r:l,g=i?a:t.left+((a-t.left)%f+f)%f;s.push({from:{row:b,col:g},to:{row:l,col:a}})}copyLooks(n,e,e,s)}export function pasteLooks(n,e,t,o){const i=n.workbook.sheet(e),s=n.workbook.sheet(t);if(!i||!s)return x("no-sheet");const r=new E(n);return copyLooks(r,i,s,o),r.finish()}export function fillDownTo(n,e){const t=(o,i)=>i>=0&&n.at(o,i)!==void 0;for(const o of[e.left-1,e.right+1]){if(!t(e.bottom,o)&&!t(e.bottom+1,o))continue;let i=e.bottom;for(;t(i+1,o);)i+=1;if(i>e.bottom)return i}}function dt(n,e,t){if(!K(n))return n;const o=q(n);if(!o.ok)return n;const i=rt(o.node,s=>s.kind!=="ref"?s:s.sheet===void 0?{...s,sheet:e}:s.sheet.toLowerCase()!==t.toLowerCase()||s.lastSheet!==void 0?s:Object.fromEntries(Object.entries(s).filter(([r])=>r!=="sheet")));return st(i)}function ht(n){const e=I();e.whole=!0;for(const t of n){t.file&&(e.file=t.file);for(const[o,i]of t.rows)e.rows.set(o,i)}return e}function S(n,e){const t=e.file??n.file,o=new Map(n.rows);for(const[i,s]of e.rows)o.set(i,s);return{file:t,rows:o,workbook:ft({file:t,rows:i=>o.get(i)})}}export function moveCells(n,e,t,o,i){const s=n.workbook.sheet(e),r=n.workbook.sheet(o);if(!s||!r)return x("no-sheet");const f=i.row-t.top,l=i.col-t.left;if(f===0&&l===0&&s===r)return I();const a={top:i.row,left:i.col,bottom:t.bottom+f,right:t.right+l},b=s.tables.filter(c=>v(t,c.area.top,c.area.left)&&v(t,c.area.bottom,c.area.right));for(const c of s.tables)if(!b.includes(c)&&A(c.area,t)&&t.top<=c.at.row)return x("table-move");if(b.length>0&&s!==r)return x("table-move");for(const c of r.tables)if(!b.includes(c)&&A(c.area,a)&&a.top<=c.at.row)return x("table-move");const g={op:"move-cells",sheet:e,area:t,rows:f,columns:l,...s===r?{}:{to:o}},L=it(n,g),y={...I(),file:L.file,rows:new Map(L.rows)},u=S(n,y),w=u.workbook.sheet(e),k=u.workbook.sheet(o);if(!w||!k)return x("no-sheet");const m=[],O=[],T=Math.min(t.right,w.columnsUsed-1),p=Math.min(t.bottom,w.lastRow),P=(c,d)=>b.some(h=>v(h.area,c,d));for(let c=t.top;c<=p;c++)for(let d=t.left;d<=T;d++)if(!P(c,d)){if(w.at(c,d)!==void 0){const h=U(u,w,c,d);m.push({row:c+f,col:d+l,text:s===r?h:dt(h,e,o)})}O.push({from:{row:c,col:d},to:{row:c+f,col:d+l}})}const F=Z(u,e,t);if(F.refused!==void 0)return F;const M=S(u,F),j=[y,F];let z=M;if(b.length>0){const c=new E(M),d=M.workbook.sheet(e);if(!d)return x("no-sheet");for(const J of b){const B=d.tables.find(V=>V.name===J.name);if(!B)continue;const Q=c.table(d,B);Q.at=X({row:J.at.row+f,col:J.at.col+l})}const h=c.finish();j.push(h),z=S(M,h)}const C=ot(z,o,m);if(C.refused!==void 0)return C;j.push(C);const D=S(z,C),_=D.workbook.sheet(e),$=D.workbook.sheet(o);if(_&&$){const c=new E(D);copyLooks(c,w,$,O);const d=O.map(h=>h.from).filter(h=>!(s===r&&v(a,h.row,h.col))&&Object.keys(w.lookAt(h.row,h.col)).length>0);for(const h of N(d))R(c,_,h,NO_LOOK);j.push(c.finish())}return ht(j)}
@@ -0,0 +1,29 @@
1
+ import { type Area, type Place } from "./address.js";
2
+ import type { Calc } from "./calc/engine.js";
3
+ import type { Scalar } from "./values.js";
4
+ import type { Filter, Worksheet } from "./workbook.js";
5
+ /** The rows a sheet's filters hide. */
6
+ export declare function filteredRows(sheet: Worksheet, calc: Calc): Set<number>;
7
+ export interface FilterChoice {
8
+ /** As the column shows it. */
9
+ text: string;
10
+ /** How many rows hold it. */
11
+ count: number;
12
+ /** Ticked. */
13
+ on: boolean;
14
+ value: Scalar;
15
+ }
16
+ /** A column's values for its list: each once, in order, those other columns' filters leave. */
17
+ export declare function filterChoices(sheet: Worksheet, calc: Calc, filter: Filter, col: number): {
18
+ values: FilterChoice[];
19
+ blanks: {
20
+ count: number;
21
+ on: boolean;
22
+ } | undefined;
23
+ };
24
+ /**
25
+ * The rectangle of cells around a place that hold something, as Excel's
26
+ * Current Region: what Sort and Filter take when one cell is selected.
27
+ */
28
+ export declare function regionAround(sheet: Worksheet, place: Place): Area | undefined;
29
+ //# sourceMappingURL=filter.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"./address.js";import{compareForSort as C}from"./sort.js";import{shownValue as h}from"./format.js";import{choicesIn as x}from"./validate.js";const g=(o,e,r,t)=>h(e.value(o,r,t),o.lookAt(r,t).format),b=(o,e)=>{if(e==="")return o.blanks===!0;const r=e.toLowerCase();return o.values?.some(t=>t.toLowerCase()===r)===!0};function v(o,e,r,t){const s=o.validations.length===0?void 0:o.validationAt(e,r);return s?.spec.multiple===!0?x(t,s.spec):[t]}function k(o,e,r,t,s){for(const[n,u]of r.columns){if(n===s)continue;const f=g(o,e,t,n);if(f===""){if(u.blanks!==!0)return!1;continue}if(!v(o,t,n,f).some(a=>b(u,a)))return!1}return!0}export function filteredRows(o,e){const r=new Set;for(const t of o.filters){if(t.columns.size===0)continue;const{top:s,bottom:n}=t.area,u=Math.min(n,o.lastRow);for(let f=s+1;f<=u;f++)k(o,e,t,f)||r.add(f)}return r}export function filterChoices(o,e,r,t){const s=r.columns.get(t),n=new Map;let u=0;const{top:f,bottom:a}=r.area,i=Math.min(a,o.lastRow);for(let l=f+1;l<=i;l++){if(!k(o,e,r,l,t))continue;const c=g(o,e,l,t);if(c===""){u+=1;continue}const d=v(o,l,t,c);for(const m of d){const p=m.toLowerCase(),w=n.get(p);w?w.count+=1:n.set(p,{text:m,count:1,on:s===void 0||b(s,m),value:d.length>1?m:e.value(o,l,t)})}}return{values:[...n.values()].sort((l,c)=>C(l.value,c.value)),blanks:u===0?void 0:{count:u,on:s===void 0||s.blanks===!0}}}export function regionAround(o,e){const r=(n,u)=>n>=0&&u>=0&&(o.at(n,u)!==void 0||o.spillAt(n,u)!==void 0),t={top:e.row,left:e.col,bottom:e.row,right:e.col};for(let n=!0;n;){n=!1;const u=a=>{for(let i=t.left-1;i<=t.right+1;i++)if(r(a,i))return!0;return!1},f=a=>{for(let i=t.top-1;i<=t.bottom+1;i++)if(r(i,a))return!0;return!1};u(t.top-1)&&(t.top-=1,n=!0),u(t.bottom+1)&&(t.bottom+=1,n=!0),f(t.left-1)&&(t.left-=1,n=!0),f(t.right+1)&&(t.right+=1,n=!0)}return t.top===t.bottom&&t.left===t.right&&!r(t.top,t.left)?void 0:t}
@@ -0,0 +1,9 @@
1
+ import { type Scalar } from "./values.js";
2
+ /** A value through a number format; General without one. */
3
+ export declare function shownValue(value: Scalar, code?: string): string;
4
+ /** The colour a number format gives a value, as [Red] does. */
5
+ export declare function shownColor(value: Scalar, code?: string): string | undefined;
6
+ 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
+ //# sourceMappingURL=format.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{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}
@@ -0,0 +1,113 @@
1
+ import type { ErrorCode } from "../values.js";
2
+ /** One edge of a reference: `A`, or `$A` when it stays as a fill moves it. */
3
+ export interface Bound {
4
+ index: number;
5
+ abs: boolean;
6
+ }
7
+ /**
8
+ * A1, A1:B2, A:B or 1:2, with its sheet when it names one. A cell has `col`
9
+ * and `row`; a range has their ends too; whole columns have no rows and
10
+ * whole rows no columns.
11
+ */
12
+ export interface RefNode {
13
+ kind: "ref";
14
+ sheet?: string;
15
+ /** The last sheet of a 3D reference: Jan:Dec!A1. */
16
+ lastSheet?: string;
17
+ col?: Bound;
18
+ row?: Bound;
19
+ col2?: Bound;
20
+ row2?: Bound;
21
+ /** Two ends written, even when they are the same place: A1:A1. */
22
+ range: boolean;
23
+ }
24
+ /** The sections a structured reference can name. */
25
+ export declare const TABLE_SECTIONS: readonly ["#All", "#Data", "#Headers", "#Totals", "#This Row"];
26
+ export type TableSection = (typeof TABLE_SECTIONS)[number];
27
+ /** orders[total], [@price], orders[[#Headers],[a]:[b]]. */
28
+ export interface StructuredNode {
29
+ kind: "structured";
30
+ /** Absent: the table the formula is in. */
31
+ table?: string;
32
+ sections: TableSection[];
33
+ /** One column, or the two ends of a run of them; none: every column. */
34
+ columns: string[];
35
+ /** Written with @: the formula's own row. */
36
+ thisRow: boolean;
37
+ }
38
+ export type BinaryOp = "+" | "-" | "*" | "/" | "^" | "&" | "=" | "<>" | "<" | "<=" | ">" | ">="
39
+ /** The range operator between what are not two plain cells: A1:INDEX(…). */
40
+ | ":"
41
+ /** Intersection: a space. */
42
+ | " "
43
+ /** Union, inside parentheses. */
44
+ | ",";
45
+ export type Node = {
46
+ kind: "number";
47
+ value: number;
48
+ raw: string;
49
+ } | {
50
+ kind: "string";
51
+ value: string;
52
+ } | {
53
+ kind: "boolean";
54
+ value: boolean;
55
+ } | {
56
+ kind: "error";
57
+ code: ErrorCode;
58
+ sheet?: string;
59
+ }
60
+ /** A function's argument left empty. */
61
+ | {
62
+ kind: "missing";
63
+ } | RefNode | StructuredNode | {
64
+ kind: "name";
65
+ name: string;
66
+ sheet?: string;
67
+ } | {
68
+ kind: "unary";
69
+ op: "-" | "+" | "@";
70
+ arg: Node;
71
+ } | {
72
+ kind: "postfix";
73
+ op: "%" | "#";
74
+ arg: Node;
75
+ } | {
76
+ kind: "binary";
77
+ op: BinaryOp;
78
+ left: Node;
79
+ right: Node;
80
+ }
81
+ /** `name` in capitals, what it is looked up by; `written` as the formula has it. */
82
+ | {
83
+ kind: "call";
84
+ name: string;
85
+ written: string;
86
+ args: Node[];
87
+ }
88
+ /** What a formula gives, called: LAMBDA(x, x + 1)(2). */
89
+ | {
90
+ kind: "invoke";
91
+ callee: Node;
92
+ args: Node[];
93
+ } | {
94
+ kind: "array";
95
+ rows: Node[][];
96
+ } | {
97
+ kind: "paren";
98
+ arg: Node;
99
+ };
100
+ /** A formula that does not parse, and where in its text. */
101
+ export interface ParseError {
102
+ message: string;
103
+ /** Characters into the formula's text, the = included. */
104
+ at: number;
105
+ }
106
+ export type Parsed = {
107
+ ok: true;
108
+ node: Node;
109
+ } | {
110
+ ok: false;
111
+ error: ParseError;
112
+ };
113
+ //# sourceMappingURL=ast.d.ts.map
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ export const TABLE_SECTIONS=["#All","#Data","#Headers","#Totals","#This Row"];
@@ -0,0 +1,6 @@
1
+ import type { Node } from "./ast.js";
2
+ /** A formula as it reads `rows` down and `columns` across from where it is. */
3
+ export declare function moveFormula(node: Node, rows: number, columns: number): Node;
4
+ /** The same text for every cell a fill of one formula gives: its relative references as distances. */
5
+ export declare function relativeKey(node: Node, row: number, col: number): string;
6
+ //# sourceMappingURL=move.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{MAX_COLUMNS as n,MAX_ROWS as l}from"../address.js";import{mapNode as a}from"./walk.js";function u(o,t,e){if(o.abs||t===0)return o;const r=o.index+t;return r<0||r>=e?void 0:{...o,index:r}}function m(o,t,e){const r=o.col&&u(o.col,e,n),i=o.col2&&u(o.col2,e,n),c=o.row&&u(o.row,t,l),f=o.row2&&u(o.row2,t,l),d=(s,w)=>s!==void 0&&w===void 0;return d(o.col,r)||d(o.col2,i)||d(o.row,c)||d(o.row2,f)?{kind:"error",code:"#REF!",...o.sheet===void 0?{}:{sheet:o.sheet}}:r===o.col&&i===o.col2&&c===o.row&&f===o.row2?o:{...o,...r?{col:r}:{},...i?{col2:i}:{},...c?{row:c}:{},...f?{row2:f}:{}}}export function moveFormula(o,t,e){return t===0&&e===0?o:a(o,r=>r.kind==="ref"?m(r,t,e):r)}export function relativeKey(o,t,e){return JSON.stringify(o,(r,i)=>{const c=i;return(r==="col"||r==="col2"||r==="row"||r==="row2")&&c?.abs===!1?[c.index-(r.startsWith("col")?e:t)]:i})}
@@ -0,0 +1,4 @@
1
+ import { type Parsed } from "./ast.js";
2
+ /** A formula's text, with or without its =, as a tree. */
3
+ export declare function parseFormula(text: string): Parsed;
4
+ //# sourceMappingURL=parse.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{MAX_COLUMNS as y,MAX_ROWS as l,columnIndex as d}from"../address.js";import{errorOf as v}from"../values.js";import{TABLE_SECTIONS as N}from"./ast.js";class m extends Error{at;constructor(t,s){super(t),this.at=s}}const R=new Set(["=","<>","<","<=",">",">="]),b={"=":1,"<>":1,"<":1,"<=":1,">":1,">=":1,"&":2,"+":3,"-":3,"*":4,"/":4,"^":5},g=i=>i>="0"&&i<="9",p=i=>/[\p{L}_\\]/u.test(i)||i>="\uD800"&&i<="\uDFFF",w=i=>/[\p{L}\p{N}\p{M}_.?\\]/u.test(i)||i>="\uD800"&&i<="\uDFFF",f=(i,t)=>({index:i,abs:t});class C{at=0;s;constructor(t){this.s=t}blanks(){const t=this.at;for(;/\s/u.test(this.s.charAt(this.at));)this.at+=1;return this.at>t}peek(t){return this.s.startsWith(t,this.at)}eat(t){return this.peek(t)?(this.at+=t.length,!0):!1}stop(t,s=this.at){throw new m(t,s)}parse(){this.eat("="),this.blanks(),this.at>=this.s.length&&this.stop("a formula with nothing in it");const t=this.expression(0);return this.blanks(),this.at<this.s.length&&this.stop(`"${this.s.charAt(this.at)}" where an operator should be`),t}operator(){this.blanks();const t=this.s.slice(this.at,this.at+2);if(R.has(t))return t;const s=this.s.charAt(this.at);return b[s]===void 0?void 0:s}expression(t){let s=this.prefix();for(;;){const e=this.operator();if(e===void 0)return s;const n=b[e]??0;if(n<=t)return s;this.at+=e.length,this.blanks();const r=this.expression(n);s={kind:"binary",op:e,left:s,right:r}}}prefix(){this.blanks();for(const t of["-","+","@"])if(this.eat(t))return{kind:"unary",op:t,arg:this.prefix()};return this.postfix()}postfix(){let t=this.references();for(;;){const s=this.at;if(this.blanks(),this.eat("%")){t={kind:"postfix",op:"%",arg:t};continue}if(this.at=s,this.peek("#")&&!A(this.s,this.at)){this.at+=1,t={kind:"postfix",op:"#",arg:t};continue}if(this.peek("(")&&(t.kind==="call"||t.kind==="paren")){const{args:e}=this.call("");t={kind:"invoke",callee:t,args:e};continue}return t}}references(){let t=this.primary();for(;;){if(this.peek(":")){this.at+=1,this.blanks();const e=this.primary();t={kind:"binary",op:":",left:t,right:e};continue}const s=this.at;if(E(t)&&this.blanks()&&this.startsReference()){const e=this.primary();t={kind:"binary",op:" ",left:t,right:e};continue}return this.at=s,t}}startsReference(){const t=this.s.charAt(this.at);return t==="$"||t==="'"||t==="("||t==="["||p(t)}primary(){this.blanks();const t=this.s.charAt(this.at);if(t===""&&this.stop("the formula ends where a value should be"),t==="(")return this.parenthesis();if(t==="{")return this.arrayConstant();if(t==='"')return{kind:"string",value:this.text()};if(g(t)||t==="."){const s=k(this.s,this.at);return s?(this.at=s.end,{kind:"ref",...s.ref}):this.number()}return t==="#"?this.errorLiteral(void 0):t==="["?this.bracket(void 0):t==="$"||t==="'"||p(t)?this.word():this.stop(`"${t}" where a value should be`)}parenthesis(){const t=this.at;this.at+=1;let s=this.expression(0);for(this.blanks();this.eat(",");){const e=this.expression(0);s={kind:"binary",op:",",left:s,right:e},this.blanks()}return this.eat(")")||this.stop("a ( that is never closed",t),{kind:"paren",arg:s}}number(){const t=/^(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/u.exec(this.s.slice(this.at));return t?(this.at+=t[0].length,{kind:"number",value:Number(t[0]),raw:t[0]}):this.stop("a number that is not one")}text(){const t=this.at;this.at+=1;let s="";for(;;){this.at>=this.s.length&&this.stop('a " that is never closed',t);const e=this.s.charAt(this.at);if(e==='"'){if(this.s.charAt(this.at+1)!=='"')return this.at+=1,s;this.at+=1}s+=e,this.at+=1}}errorLiteral(t){const s=A(this.s,this.at);return s===void 0?this.stop("a # that names no error"):(this.at+=s.length,{kind:"error",code:s,...t===void 0?{}:{sheet:t}})}arrayConstant(){const t=this.at;this.at+=1;const s=[[]];for(;;)if(this.blanks(),s[s.length-1]?.push(this.arrayItem()),this.blanks(),!this.eat(",")){if(this.eat(";")){s.push([]);continue}if(this.eat("}"))break;this.stop("a { that is never closed",t)}const e=s[0]?.length;return s.some(n=>n.length!==e)&&this.stop("an array whose rows are not all as long",t),{kind:"array",rows:s}}arrayItem(){const t=this.s.charAt(this.at);if(t==='"')return{kind:"string",value:this.text()};if(t==="#")return this.errorLiteral(void 0);if(t==="-"||t==="+")return this.at+=1,{kind:"unary",op:t,arg:this.number()};if(g(t)||t===".")return this.number();const s=this.name(),e=s.toUpperCase();return e==="TRUE"||e==="FALSE"?{kind:"boolean",value:e==="TRUE"}:this.stop(`${s} in an array: an array holds only constants`)}name(){const t=this.at;for(;this.at<this.s.length&&w(this.s.charAt(this.at));)this.at+=1;return this.s.slice(t,this.at)}quoted(){const t=this.at;this.at+=1;let s="";for(;;){this.at>=this.s.length&&this.stop("a ' that is never closed",t);const e=this.s.charAt(this.at);if(e==="'"){if(this.s.charAt(this.at+1)!=="'")return this.at+=1,s;this.at+=1}s+=e,this.at+=1}}word(){const t=this.sheetPrefix();if(t)return this.afterSheet(t.first,t.last);const s=k(this.s,this.at);if(s)return this.at=s.end,{kind:"ref",...s.ref};const e=x(this.s,this.at);if(e)return this.at=e.end,{kind:"ref",...e.ref};if(this.peek("$"))return this.stop('a "$" that is not part of a reference');const n=this.at,r=this.name();if(r==="")return this.stop(`"${this.s.charAt(n)}" in a name`);if(this.peek("("))return this.call(r);if(this.peek("["))return this.bracket(r);const h=r.toUpperCase();return h==="TRUE"||h==="FALSE"?{kind:"boolean",value:h==="TRUE"}:{kind:"name",name:r}}sheetPrefix(){const t=this.at;if(this.peek("'")){const e=this.quoted();if(!this.eat("!")){this.at=t;return}const n=e.indexOf(":");return n>0?{first:e.slice(0,n),last:e.slice(n+1)}:{first:e}}const s=this.name();if(s!==""&&this.eat("!"))return{first:s};if(s!==""&&this.eat(":")){const e=this.name();if(e!==""&&this.eat("!"))return{first:s,last:e}}this.at=t}afterSheet(t,s){const e={sheet:t,...s===void 0?{}:{lastSheet:s}};if(this.peek("#"))return this.errorLiteral(t);const n=k(this.s,this.at);if(n)return this.at=n.end,{kind:"ref",...e,...n.ref};const r=x(this.s,this.at);if(r)return this.at=r.end,{kind:"ref",...e,...r.ref};const h=this.name();return h===""?this.stop(`nothing after ${t}!`):{kind:"name",name:h,sheet:t}}call(t){const s=this.at;this.at+=1;const e=[];this.blanks();const n=()=>({kind:"call",name:t.toUpperCase(),written:t,args:e});if(this.eat(")"))return n();for(;;)if(this.blanks(),this.peek(",")||this.peek(")")?e.push({kind:"missing"}):e.push(this.expression(0)),this.blanks(),!this.eat(",")){if(this.eat(")"))return n();this.stop(`a ( of ${t.toUpperCase()} that is never closed`,s)}}columnName(){let t="";for(;;){this.at>=this.s.length&&this.stop("a [ that is never closed");const s=this.s.charAt(this.at);if(s==="]")return t;if(s==="["&&this.stop("a [ inside a column's name"),s==="'"){this.at+=1,t+=this.s.charAt(this.at),this.at+=1;continue}t+=s,this.at+=1}}bracket(t){const s=this.at;this.at+=1;const e={kind:"structured",...t===void 0?{}:{table:t},sections:[],columns:[],thisRow:!1};if(this.eat("]"))return e;if(!(this.peek("[")||this.peek("#")||this.peek("@"))){const r=this.columnName();return this.at+=1,t===void 0&&/[!']/u.test(this.s.charAt(this.at))&&this.stop("a formula that reaches into another workbook",s),t===void 0&&p(this.s.charAt(this.at))&&this.stop("a formula that reaches into another workbook",s),e.columns=[r.trim()],e}return this.eat("@")?(e.thisRow=!0,this.eat("]")||(this.peek("[")?this.items(e):e.columns=[this.columnName().trim()],this.eat("]")||this.stop("a [ that is never closed",s)),e):(this.items(e),this.eat("]")||this.stop("a [ that is never closed",s),e)}items(t){for(;;){if(this.blanks(),this.peek("#"))this.section(t);else if(this.eat("["))if(this.peek("#"))this.section(t),this.eat("]")||this.stop("a [ that is never closed");else{const s=this.columnName().trim();this.at+=1,t.columns.push(s),this.eat(":")&&(this.eat("[")||this.stop("a column's name after :"),t.columns.push(this.columnName().trim()),this.at+=1)}else this.stop("a column or a section of a table");if(this.blanks(),!this.eat(","))return}}section(t){const s=this.s.slice(this.at).toLowerCase(),e=N.find(n=>s.startsWith(n.toLowerCase()));e===void 0&&this.stop("a section of a table that is not one"),this.at+=e.length,e==="#This Row"?t.thisRow=!0:t.sections.push(e)}}const E=i=>i.kind==="ref"||i.kind==="name"||i.kind==="structured"||i.kind==="call"||i.kind==="paren"||i.kind==="binary"&&(i.op===":"||i.op===" ");function A(i,t){const s=/^#[A-Za-z0-9_/]+[!?]?/u.exec(i.slice(t));return s?v(s[0])?.code:void 0}const u=(i,t)=>{const s=i.charAt(t);return s!==""&&(w(s)||s==="("||s==="!"||s==="[")};function x(i,t){const s=i.slice(t),e=/^(\$?)([A-Za-z]{1,3}):(\$?)([A-Za-z]{1,3})/u.exec(s);if(e){const a=t+e[0].length,o=d(e[2]??""),c=d(e[4]??"");if(o!==void 0&&c!==void 0&&!u(i,a))return{ref:{col:f(o,e[1]==="$"),col2:f(c,e[3]==="$"),range:!0},end:a}}const n=/^(\$?)([A-Za-z]{1,3})(\$?)([1-9]\d*)/u.exec(s);if(!n)return;const r=$(n),h=t+n[0].length;if(!(!r||u(i,h))){if(i.charAt(h)===":"){const a=/^(\$?)([A-Za-z]{1,3})(\$?)([1-9]\d*)/u.exec(i.slice(h+1));if(a){const o=$(a),c=h+1+a[0].length;if(o&&!u(i,c))return{ref:{...r,col2:o.col,row2:o.row,range:!0},end:c}}}return{ref:{...r,range:!1},end:h}}}function $(i){const t=d(i[2]??""),s=Number(i[4])-1;if(!(t===void 0||t>=y||s>=l))return{col:f(t,i[1]==="$"),row:f(s,i[3]==="$")}}function k(i,t){const s=/^(\$?)([1-9]\d*):(\$?)([1-9]\d*)/u.exec(i.slice(t));if(!s)return;const e=t+s[0].length,n=Number(s[2])-1,r=Number(s[4])-1;if(!(n>=l||r>=l||u(i,e)))return{ref:{row:f(n,s[1]==="$"),row2:f(r,s[3]==="$"),range:!0},end:e}}export function parseFormula(i){try{return{ok:!0,node:new C(i).parse()}}catch(t){if(t instanceof m)return{ok:!1,error:{message:t.message,at:t.at}};throw t}}
@@ -0,0 +1,6 @@
1
+ import type { Node } from "./ast.js";
2
+ /** A sheet's name as a formula writes it: quoted when it has to be. */
3
+ export declare function sheetPrefix(sheet: string, last?: string): string;
4
+ /** A tree as a formula's text, its = included. */
5
+ export declare const printFormula: (node: Node) => string;
6
+ //# sourceMappingURL=print.d.ts.map