@allyhub/sdk 0.4.0 → 0.6.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 (561) hide show
  1. package/{node_modules → dist/node_modules}/@allyhub-next/audio/package.json +1 -1
  2. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.d.ts +31 -0
  3. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +3 -0
  4. package/{node_modules/@allyhub-next/slides-core → dist/node_modules/@allyhub-next/chart}/dist/chart.d.ts +26 -15
  5. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +2 -0
  6. package/dist/node_modules/@allyhub-next/chart/dist/index.d.ts +3 -0
  7. package/dist/node_modules/@allyhub-next/chart/dist/index.js +2 -0
  8. package/dist/node_modules/@allyhub-next/chart/package.json +14 -0
  9. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/reference.d.ts +0 -86
  10. package/dist/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
  11. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +5087 -0
  12. package/dist/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
  13. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/slides.d.ts +306 -11
  14. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +2 -0
  15. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/index.d.ts +2 -0
  16. package/dist/node_modules/@allyhub-next/formats/dist/index.js +2 -0
  17. package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/items.d.ts +1 -1
  18. package/dist/node_modules/@allyhub-next/formats/dist/items.js +2 -0
  19. package/dist/node_modules/@allyhub-next/formats/dist/schemas.d.ts +2278 -0
  20. package/dist/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
  21. package/dist/node_modules/@allyhub-next/formats/dist/strict.d.ts +28 -0
  22. package/dist/node_modules/@allyhub-next/formats/dist/strict.js +2 -0
  23. package/dist/node_modules/@allyhub-next/formats/dist/zip.d.ts +17 -0
  24. package/dist/node_modules/@allyhub-next/formats/dist/zip.js +2 -0
  25. package/{node_modules → dist/node_modules}/@allyhub-next/formats/package.json +1 -1
  26. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/editor.d.ts +20 -0
  27. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
  28. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/notes.d.ts +4 -0
  29. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +2 -0
  30. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/tools.d.ts +6 -0
  31. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
  32. package/{node_modules → dist/node_modules}/@allyhub-next/protocol/package.json +1 -1
  33. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/lock.d.ts +2 -0
  34. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
  35. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/runtimes.d.ts +6 -0
  36. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +4 -0
  37. package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/package.json +1 -1
  38. package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.d.ts +7 -0
  39. package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/phone.d.ts +3 -1
  40. package/dist/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
  41. package/{node_modules → dist/node_modules}/@allyhub-next/scenery/package.json +1 -1
  42. package/dist/node_modules/@allyhub-next/sheet/dist/address.d.ts +32 -0
  43. package/dist/node_modules/@allyhub-next/sheet/dist/address.js +2 -0
  44. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.d.ts +23 -0
  45. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +2 -0
  46. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.d.ts +204 -0
  47. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.js +2 -0
  48. package/dist/node_modules/@allyhub-next/sheet/dist/api/code.d.ts +19 -0
  49. package/dist/node_modules/@allyhub-next/sheet/dist/api/code.js +2 -0
  50. package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.d.ts +3 -0
  51. package/dist/node_modules/@allyhub-next/sheet/dist/api/hint.js +2 -0
  52. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.d.ts +8 -0
  53. package/dist/node_modules/@allyhub-next/sheet/dist/api/index.js +2 -0
  54. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.d.ts +83 -0
  55. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +2 -0
  56. package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.d.ts +4 -0
  57. package/dist/node_modules/@allyhub-next/sheet/dist/api/rectangles.js +2 -0
  58. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.d.ts +170 -0
  59. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.js +2 -0
  60. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.d.ts +117 -0
  61. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.js +2 -0
  62. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.d.ts +362 -0
  63. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +2 -0
  64. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.d.ts +68 -0
  65. package/dist/node_modules/@allyhub-next/sheet/dist/arrange.js +2 -0
  66. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.d.ts +21 -0
  67. package/dist/node_modules/@allyhub-next/sheet/dist/calc/analyse.js +2 -0
  68. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.d.ts +19 -0
  69. package/dist/node_modules/@allyhub-next/sheet/dist/calc/coerce.js +2 -0
  70. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.d.ts +152 -0
  71. package/dist/node_modules/@allyhub-next/sheet/dist/calc/engine.js +2 -0
  72. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.d.ts +2 -0
  73. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/aggregate.js +2 -0
  74. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.d.ts +15 -0
  75. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/criteria.js +2 -0
  76. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.d.ts +2 -0
  77. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/database.js +2 -0
  78. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.d.ts +2 -0
  79. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/date.js +2 -0
  80. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.d.ts +69 -0
  81. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/define.js +2 -0
  82. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.d.ts +2 -0
  83. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/distributions.js +2 -0
  84. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.d.ts +2 -0
  85. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/dynamic.js +2 -0
  86. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.d.ts +2 -0
  87. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/finance.js +2 -0
  88. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.d.ts +15 -0
  89. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/index.js +2 -0
  90. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.d.ts +2 -0
  91. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/info.js +2 -0
  92. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.d.ts +2 -0
  93. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/kernels.js +2 -0
  94. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.d.ts +2 -0
  95. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/logical.js +2 -0
  96. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.d.ts +2 -0
  97. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/lookup.js +2 -0
  98. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.d.ts +2 -0
  99. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/maths.js +2 -0
  100. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.d.ts +29 -0
  101. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/special.js +2 -0
  102. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.d.ts +2 -0
  103. package/dist/node_modules/@allyhub-next/sheet/dist/calc/functions/text.js +2 -0
  104. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.d.ts +50 -0
  105. package/dist/node_modules/@allyhub-next/sheet/dist/calc/types.js +2 -0
  106. package/dist/node_modules/@allyhub-next/sheet/dist/chart.d.ts +58 -0
  107. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +2 -0
  108. package/dist/node_modules/@allyhub-next/sheet/dist/check.d.ts +15 -0
  109. package/dist/node_modules/@allyhub-next/sheet/dist/check.js +2 -0
  110. package/dist/node_modules/@allyhub-next/sheet/dist/csv.d.ts +62 -0
  111. package/dist/node_modules/@allyhub-next/sheet/dist/csv.js +12 -0
  112. package/dist/node_modules/@allyhub-next/sheet/dist/diff.d.ts +64 -0
  113. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +2 -0
  114. package/dist/node_modules/@allyhub-next/sheet/dist/edit.d.ts +154 -0
  115. package/dist/node_modules/@allyhub-next/sheet/dist/edit.js +2 -0
  116. package/dist/node_modules/@allyhub-next/sheet/dist/export.d.ts +11 -0
  117. package/dist/node_modules/@allyhub-next/sheet/dist/export.js +6 -0
  118. package/dist/node_modules/@allyhub-next/sheet/dist/file.d.ts +19 -0
  119. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +3 -0
  120. package/dist/node_modules/@allyhub-next/sheet/dist/files.d.ts +24 -0
  121. package/dist/node_modules/@allyhub-next/sheet/dist/files.js +2 -0
  122. package/dist/node_modules/@allyhub-next/sheet/dist/fill.d.ts +30 -0
  123. package/dist/node_modules/@allyhub-next/sheet/dist/fill.js +2 -0
  124. package/dist/node_modules/@allyhub-next/sheet/dist/filter.d.ts +29 -0
  125. package/dist/node_modules/@allyhub-next/sheet/dist/filter.js +2 -0
  126. package/dist/node_modules/@allyhub-next/sheet/dist/format.d.ts +9 -0
  127. package/dist/node_modules/@allyhub-next/sheet/dist/format.js +2 -0
  128. package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.d.ts +113 -0
  129. package/dist/node_modules/@allyhub-next/sheet/dist/formula/ast.js +2 -0
  130. package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.d.ts +6 -0
  131. package/dist/node_modules/@allyhub-next/sheet/dist/formula/move.js +2 -0
  132. package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.d.ts +4 -0
  133. package/dist/node_modules/@allyhub-next/sheet/dist/formula/parse.js +2 -0
  134. package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.d.ts +6 -0
  135. package/dist/node_modules/@allyhub-next/sheet/dist/formula/print.js +2 -0
  136. package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.d.ts +65 -0
  137. package/dist/node_modules/@allyhub-next/sheet/dist/formula/rewrite.js +2 -0
  138. package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.d.ts +6 -0
  139. package/dist/node_modules/@allyhub-next/sheet/dist/formula/walk.js +2 -0
  140. package/dist/node_modules/@allyhub-next/sheet/dist/generated.d.ts +46 -0
  141. package/dist/node_modules/@allyhub-next/sheet/dist/generated.js +2 -0
  142. package/dist/node_modules/@allyhub-next/sheet/dist/html.d.ts +34 -0
  143. package/dist/node_modules/@allyhub-next/sheet/dist/html.js +20 -0
  144. package/dist/node_modules/@allyhub-next/sheet/dist/import.d.ts +11 -0
  145. package/dist/node_modules/@allyhub-next/sheet/dist/import.js +2 -0
  146. package/dist/node_modules/@allyhub-next/sheet/dist/index.d.ts +38 -0
  147. package/dist/node_modules/@allyhub-next/sheet/dist/index.js +2 -0
  148. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.d.ts +25 -0
  149. package/dist/node_modules/@allyhub-next/sheet/dist/inspect.js +2 -0
  150. package/dist/node_modules/@allyhub-next/sheet/dist/patch.d.ts +4 -0
  151. package/dist/node_modules/@allyhub-next/sheet/dist/patch.js +2 -0
  152. package/dist/node_modules/@allyhub-next/sheet/dist/profile.d.ts +30 -0
  153. package/dist/node_modules/@allyhub-next/sheet/dist/profile.js +2 -0
  154. package/dist/node_modules/@allyhub-next/sheet/dist/rules.d.ts +56 -0
  155. package/dist/node_modules/@allyhub-next/sheet/dist/rules.js +2 -0
  156. package/dist/node_modules/@allyhub-next/sheet/dist/scenario.d.ts +42 -0
  157. package/dist/node_modules/@allyhub-next/sheet/dist/scenario.js +2 -0
  158. package/dist/node_modules/@allyhub-next/sheet/dist/series.d.ts +10 -0
  159. package/dist/node_modules/@allyhub-next/sheet/dist/series.js +2 -0
  160. package/dist/node_modules/@allyhub-next/sheet/dist/sort.d.ts +24 -0
  161. package/dist/node_modules/@allyhub-next/sheet/dist/sort.js +2 -0
  162. package/dist/node_modules/@allyhub-next/sheet/dist/structure.d.ts +38 -0
  163. package/dist/node_modules/@allyhub-next/sheet/dist/structure.js +2 -0
  164. package/dist/node_modules/@allyhub-next/sheet/dist/validate.d.ts +26 -0
  165. package/dist/node_modules/@allyhub-next/sheet/dist/validate.js +2 -0
  166. package/dist/node_modules/@allyhub-next/sheet/dist/values.d.ts +67 -0
  167. package/dist/node_modules/@allyhub-next/sheet/dist/values.js +2 -0
  168. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.d.ts +315 -0
  169. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +2 -0
  170. package/dist/node_modules/@allyhub-next/sheet/dist/write.d.ts +5 -0
  171. package/dist/node_modules/@allyhub-next/sheet/dist/write.js +21 -0
  172. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.d.ts +44 -0
  173. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +2 -0
  174. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.d.ts +19 -0
  175. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/colors.js +2 -0
  176. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.d.ts +21 -0
  177. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/formula.js +4 -0
  178. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.d.ts +5 -0
  179. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/functions.js +17 -0
  180. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.d.ts +47 -0
  181. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +2 -0
  182. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.d.ts +5 -0
  183. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/index.js +2 -0
  184. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.d.ts +8 -0
  185. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/numfmt.js +2 -0
  186. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.d.ts +118 -0
  187. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +2 -0
  188. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.d.ts +23 -0
  189. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/styles.js +2 -0
  190. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.d.ts +3 -0
  191. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/theme.js +2 -0
  192. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.d.ts +17 -0
  193. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +2 -0
  194. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.d.ts +28 -0
  195. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/xml.js +3 -0
  196. package/dist/node_modules/@allyhub-next/sheet/package.json +21 -0
  197. package/dist/node_modules/@allyhub-next/slides-core/LICENSE +241 -0
  198. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/api.d.ts +64 -7
  199. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +4 -0
  200. package/dist/node_modules/@allyhub-next/slides-core/dist/capabilities.js +2 -0
  201. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/chart-api.d.ts +24 -1
  202. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +2 -0
  203. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/chart-file.d.ts +1 -1
  204. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +2 -0
  205. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/enums.d.ts +20 -0
  206. package/dist/node_modules/@allyhub-next/slides-core/dist/enums.js +2 -0
  207. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/index.d.ts +2 -1
  208. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +2 -0
  209. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/model.d.ts +39 -6
  210. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/office.d.ts +10 -0
  211. package/dist/node_modules/@allyhub-next/slides-core/dist/office.js +2 -0
  212. package/dist/node_modules/@allyhub-next/slides-core/dist/preset.d.ts +5 -0
  213. package/dist/node_modules/@allyhub-next/slides-core/dist/preset.js +2 -0
  214. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/resolve.d.ts +8 -3
  215. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +2 -0
  216. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +7 -0
  217. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +2 -0
  218. package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/package.json +1 -1
  219. package/dist/node_modules/@allyhub-next/video-core/LICENSE +241 -0
  220. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/fact.d.ts +8 -2
  221. package/dist/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
  222. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/formats.d.ts +0 -28
  223. package/dist/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
  224. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/measure.d.ts +10 -0
  225. package/dist/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
  226. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/problem.d.ts +5 -1
  227. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
  228. package/{node_modules → dist/node_modules}/@allyhub-next/video-core/package.json +1 -1
  229. package/dist/phone.js +1 -1
  230. package/dist/sheets.d.ts +2 -0
  231. package/dist/sheets.js +2 -0
  232. package/docs/README.md +2 -2
  233. package/docs/defaults.md +24 -0
  234. package/docs/project.md +1 -1
  235. package/docs/scenery.md +1 -1
  236. package/docs/sheets.md +402 -84
  237. package/docs/slides.md +5 -5
  238. package/docs/speech.md +1 -1
  239. package/package.json +11 -19
  240. package/node_modules/@allyhub-next/formats/dist/data/reference.js +0 -2
  241. package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +0 -214
  242. package/node_modules/@allyhub-next/formats/dist/data/sheet.js +0 -2
  243. package/node_modules/@allyhub-next/formats/dist/data/slides.js +0 -2
  244. package/node_modules/@allyhub-next/formats/dist/index.js +0 -2
  245. package/node_modules/@allyhub-next/formats/dist/items.js +0 -2
  246. package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +0 -719
  247. package/node_modules/@allyhub-next/formats/dist/schemas.js +0 -2
  248. package/node_modules/@allyhub-next/protocol/dist/editor.js +0 -2
  249. package/node_modules/@allyhub-next/protocol/dist/notes.js +0 -2
  250. package/node_modules/@allyhub-next/protocol/dist/tools.js +0 -2
  251. package/node_modules/@allyhub-next/runtimes/dist/lock.js +0 -2
  252. package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +0 -3
  253. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package-lock.json +0 -2533
  254. package/node_modules/@allyhub-next/runtimes/pins/exceljs/package.json +0 -8
  255. package/node_modules/@allyhub-next/scenery/dist/phone.js +0 -2
  256. package/node_modules/@allyhub-next/slides-core/dist/api.js +0 -4
  257. package/node_modules/@allyhub-next/slides-core/dist/capabilities.js +0 -2
  258. package/node_modules/@allyhub-next/slides-core/dist/chart-api.js +0 -2
  259. package/node_modules/@allyhub-next/slides-core/dist/chart-file.js +0 -2
  260. package/node_modules/@allyhub-next/slides-core/dist/chart.js +0 -2
  261. package/node_modules/@allyhub-next/slides-core/dist/enums.js +0 -2
  262. package/node_modules/@allyhub-next/slides-core/dist/index.js +0 -2
  263. package/node_modules/@allyhub-next/slides-core/dist/office.js +0 -2
  264. package/node_modules/@allyhub-next/slides-core/dist/resolve.js +0 -2
  265. package/node_modules/@allyhub-next/slides-core/dist/strict.d.ts +0 -23
  266. package/node_modules/@allyhub-next/slides-core/dist/strict.js +0 -2
  267. package/node_modules/@allyhub-next/video-core/dist/fact.js +0 -2
  268. package/node_modules/@allyhub-next/video-core/dist/formats.js +0 -2
  269. package/node_modules/@allyhub-next/video-core/dist/measure.js +0 -5
  270. package/node_modules/@allyhub-next/video-core/dist/problem.js +0 -2
  271. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/LICENSE +0 -0
  272. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.d.ts +0 -0
  273. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/at-cut.js +0 -0
  274. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.d.ts +0 -0
  275. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/decode.js +0 -0
  276. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.d.ts +0 -0
  277. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/envelope.js +0 -0
  278. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.d.ts +0 -0
  279. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/index.js +0 -0
  280. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.d.ts +0 -0
  281. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/levels.js +0 -0
  282. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.d.ts +0 -0
  283. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/master.js +0 -0
  284. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.d.ts +0 -0
  285. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/music.js +0 -0
  286. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.d.ts +0 -0
  287. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/decode.js +0 -0
  288. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.d.ts +0 -0
  289. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ebur128.js +0 -0
  290. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.d.ts +0 -0
  291. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/ffmpeg.js +0 -0
  292. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.d.ts +0 -0
  293. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/index.js +0 -0
  294. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.d.ts +0 -0
  295. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/loudness.js +0 -0
  296. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.d.ts +0 -0
  297. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/master.js +0 -0
  298. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.d.ts +0 -0
  299. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/measure.js +0 -0
  300. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.d.ts +0 -0
  301. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/node/mix.js +0 -0
  302. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.d.ts +0 -0
  303. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/plan.js +0 -0
  304. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.d.ts +0 -0
  305. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recorded.js +0 -0
  306. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.d.ts +0 -0
  307. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/bandwidth.js +0 -0
  308. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.d.ts +0 -0
  309. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/chain.js +0 -0
  310. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.d.ts +0 -0
  311. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/dynamics.js +0 -0
  312. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.d.ts +0 -0
  313. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fft.js +0 -0
  314. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.d.ts +0 -0
  315. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/filters.js +0 -0
  316. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.d.ts +0 -0
  317. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/fit.js +0 -0
  318. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.d.ts +0 -0
  319. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/index.js +0 -0
  320. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.d.ts +0 -0
  321. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/loudness.js +0 -0
  322. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.d.ts +0 -0
  323. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/measure.js +0 -0
  324. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.d.ts +0 -0
  325. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/mic.js +0 -0
  326. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.d.ts +0 -0
  327. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/noise.js +0 -0
  328. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.d.ts +0 -0
  329. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/presets.js +0 -0
  330. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.d.ts +0 -0
  331. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/room.js +0 -0
  332. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.d.ts +0 -0
  333. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/setup.js +0 -0
  334. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.d.ts +0 -0
  335. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/recording/vec.js +0 -0
  336. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.d.ts +0 -0
  337. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/render.js +0 -0
  338. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.d.ts +0 -0
  339. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/sfx.js +0 -0
  340. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.d.ts +0 -0
  341. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/shape.js +0 -0
  342. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.d.ts +0 -0
  343. /package/{node_modules → dist/node_modules}/@allyhub-next/audio/dist/voice.js +0 -0
  344. /package/{node_modules/@allyhub-next/formats → dist/node_modules/@allyhub-next/chart}/LICENSE +0 -0
  345. /package/{node_modules/@allyhub-next/protocol → dist/node_modules/@allyhub-next/formats}/LICENSE +0 -0
  346. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.d.ts +0 -0
  347. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/comments.js +0 -0
  348. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.d.ts +0 -0
  349. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/config.js +0 -0
  350. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.d.ts +0 -0
  351. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/edits.js +0 -0
  352. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.d.ts +0 -0
  353. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/elements.js +0 -0
  354. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.d.ts +0 -0
  355. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/faces.js +0 -0
  356. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.d.ts +0 -0
  357. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/file.js +0 -0
  358. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.d.ts +0 -0
  359. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/gen.js +0 -0
  360. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.d.ts +0 -0
  361. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/messages.js +0 -0
  362. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.d.ts +0 -0
  363. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/script.js +0 -0
  364. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.d.ts +0 -0
  365. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/data/words.js +0 -0
  366. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.d.ts +0 -0
  367. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/layout.js +0 -0
  368. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/note-shape.d.ts +0 -0
  369. /package/{node_modules → dist/node_modules}/@allyhub-next/formats/dist/note-shape.js +0 -0
  370. /package/{node_modules/@allyhub-next/runtimes → dist/node_modules/@allyhub-next/protocol}/LICENSE +0 -0
  371. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/app.d.ts +0 -0
  372. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/app.js +0 -0
  373. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.d.ts +0 -0
  374. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/auth.js +0 -0
  375. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.d.ts +0 -0
  376. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cli.js +0 -0
  377. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.d.ts +0 -0
  378. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/cloud.js +0 -0
  379. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.d.ts +0 -0
  380. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/files.js +0 -0
  381. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.d.ts +0 -0
  382. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/index.js +0 -0
  383. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.d.ts +0 -0
  384. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/jsonrpc.js +0 -0
  385. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.d.ts +0 -0
  386. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/registry.js +0 -0
  387. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.d.ts +0 -0
  388. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/routes.js +0 -0
  389. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.d.ts +0 -0
  390. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/runtimes.js +0 -0
  391. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.d.ts +0 -0
  392. /package/{node_modules → dist/node_modules}/@allyhub-next/protocol/dist/teams.js +0 -0
  393. /package/{node_modules/@allyhub-next/scenery → dist/node_modules/@allyhub-next/runtimes}/LICENSE +0 -0
  394. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.d.ts +0 -0
  395. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/bundled.js +0 -0
  396. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.d.ts +0 -0
  397. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/download.js +0 -0
  398. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.d.ts +0 -0
  399. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/errors.js +0 -0
  400. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.d.ts +0 -0
  401. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/home.js +0 -0
  402. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.d.ts +0 -0
  403. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/index.js +0 -0
  404. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.d.ts +0 -0
  405. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/manifest.js +0 -0
  406. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/node-program.d.ts +0 -0
  407. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/node-program.js +0 -0
  408. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/packages.d.ts +0 -0
  409. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/packages.js +0 -0
  410. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.d.ts +0 -0
  411. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/dist/unpack.js +0 -0
  412. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/manifest.json +0 -0
  413. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/docx/package-lock.json +0 -0
  414. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/docx/package.json +0 -0
  415. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/gltf-tools/package-lock.json +0 -0
  416. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/gltf-tools/package.json +0 -0
  417. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/manifold-3d/package-lock.json +0 -0
  418. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/manifold-3d/package.json +0 -0
  419. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/onnxruntime-node/package-lock.json +0 -0
  420. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/onnxruntime-node/package.json +0 -0
  421. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -0
  422. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/sherpa-onnx-node/package.json +0 -0
  423. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/tesseract.js/package-lock.json +0 -0
  424. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/pins/tesseract.js/package.json +0 -0
  425. /package/{node_modules → dist/node_modules}/@allyhub-next/runtimes/schemas/runtimes.schema.json +0 -0
  426. /package/{node_modules/@allyhub-next/slides-core → dist/node_modules/@allyhub-next/scenery}/LICENSE +0 -0
  427. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/NOTICE +0 -0
  428. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.d.ts +0 -0
  429. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/aim.js +0 -0
  430. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.d.ts +0 -0
  431. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/bake.js +0 -0
  432. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.d.ts +0 -0
  433. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/camera.js +0 -0
  434. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.d.ts +0 -0
  435. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/curve.js +0 -0
  436. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.d.ts +0 -0
  437. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/define.js +0 -0
  438. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.d.ts +0 -0
  439. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/fit.js +0 -0
  440. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.d.ts +0 -0
  441. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/glass.js +0 -0
  442. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.d.ts +0 -0
  443. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/handheld.js +0 -0
  444. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.d.ts +0 -0
  445. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/hull.js +0 -0
  446. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.d.ts +0 -0
  447. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/index.js +0 -0
  448. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.d.ts +0 -0
  449. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/lens.js +0 -0
  450. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/moire.js +0 -0
  451. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.d.ts +0 -0
  452. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/motion.js +0 -0
  453. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.d.ts +0 -0
  454. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/move.js +0 -0
  455. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.d.ts +0 -0
  456. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/noise.js +0 -0
  457. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.d.ts +0 -0
  458. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/report.js +0 -0
  459. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.d.ts +0 -0
  460. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen-focus.js +0 -0
  461. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.d.ts +0 -0
  462. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/screen.js +0 -0
  463. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.d.ts +0 -0
  464. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/solve.js +0 -0
  465. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.d.ts +0 -0
  466. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/timing.js +0 -0
  467. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.d.ts +0 -0
  468. /package/{node_modules → dist/node_modules}/@allyhub-next/scenery/dist/vec.js +0 -0
  469. /package/{node_modules/@allyhub-next/video-core → dist/node_modules/@allyhub-next/sheet}/LICENSE +0 -0
  470. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/animation.d.ts +0 -0
  471. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/animation.js +0 -0
  472. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/capabilities.d.ts +0 -0
  473. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/check.d.ts +0 -0
  474. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/check.js +0 -0
  475. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/file.d.ts +0 -0
  476. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/file.js +0 -0
  477. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/measure.d.ts +0 -0
  478. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/measure.js +0 -0
  479. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/model.js +0 -0
  480. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/path.d.ts +0 -0
  481. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/path.js +0 -0
  482. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/placeholders.d.ts +0 -0
  483. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/placeholders.js +0 -0
  484. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/script.d.ts +0 -0
  485. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/script.js +0 -0
  486. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/stage.d.ts +0 -0
  487. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/stage.js +0 -0
  488. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/theme.d.ts +0 -0
  489. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/theme.js +0 -0
  490. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/units.d.ts +0 -0
  491. /package/{node_modules → dist/node_modules}/@allyhub-next/slides-core/dist/units.js +0 -0
  492. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.d.ts +0 -0
  493. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/anchors.js +0 -0
  494. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.d.ts +0 -0
  495. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/audio-types.js +0 -0
  496. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.d.ts +0 -0
  497. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/backdrop.js +0 -0
  498. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.d.ts +0 -0
  499. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/captions.js +0 -0
  500. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.d.ts +0 -0
  501. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/console.js +0 -0
  502. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.d.ts +0 -0
  503. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/contrast.js +0 -0
  504. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.d.ts +0 -0
  505. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/cut-report.js +0 -0
  506. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.d.ts +0 -0
  507. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edit.js +0 -0
  508. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.d.ts +0 -0
  509. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/edits.js +0 -0
  510. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.d.ts +0 -0
  511. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/export.js +0 -0
  512. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.d.ts +0 -0
  513. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/footage-motion.js +0 -0
  514. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.d.ts +0 -0
  515. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/gen.js +0 -0
  516. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.d.ts +0 -0
  517. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/index.js +0 -0
  518. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.d.ts +0 -0
  519. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/look.js +0 -0
  520. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.d.ts +0 -0
  521. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/marks.js +0 -0
  522. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.d.ts +0 -0
  523. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/matrix.js +0 -0
  524. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.d.ts +0 -0
  525. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/media.js +0 -0
  526. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.d.ts +0 -0
  527. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/messages.js +0 -0
  528. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.d.ts +0 -0
  529. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/motion.js +0 -0
  530. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.d.ts +0 -0
  531. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/music.js +0 -0
  532. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.d.ts +0 -0
  533. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/piece.js +0 -0
  534. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.d.ts +0 -0
  535. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/placement.js +0 -0
  536. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.d.ts +0 -0
  537. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/render-types.js +0 -0
  538. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.d.ts +0 -0
  539. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/schema.js +0 -0
  540. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.d.ts +0 -0
  541. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script-edit.js +0 -0
  542. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.d.ts +0 -0
  543. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/script.js +0 -0
  544. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.d.ts +0 -0
  545. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/seams.js +0 -0
  546. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.d.ts +0 -0
  547. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/sound-under.js +0 -0
  548. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.d.ts +0 -0
  549. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/speech.js +0 -0
  550. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.d.ts +0 -0
  551. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timeline.js +0 -0
  552. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.d.ts +0 -0
  553. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/timing.js +0 -0
  554. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.d.ts +0 -0
  555. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transcript.js +0 -0
  556. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.d.ts +0 -0
  557. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/transition.js +0 -0
  558. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.d.ts +0 -0
  559. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/voice.js +0 -0
  560. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.d.ts +0 -0
  561. /package/{node_modules → dist/node_modules}/@allyhub-next/video-core/dist/words.js +0 -0
@@ -0,0 +1,362 @@
1
+ import { type SheetNote, type SheetPicture, type SheetPrint, type SheetConditional, type SheetFile, type SheetFilesColumn, type SheetTable, type SheetWorksheet } from "@allyhub-next/formats";
2
+ import { Comment, HeaderFooter, PageMargins, PageSetup, SheetProtection, type Image } from "./page.js";
3
+ import { Calc } from "../calc/engine.js";
4
+ import { type ParsedCsv } from "../csv.js";
5
+ import type { SheetProblem } from "../file.js";
6
+ import { type GeneratedSheets } from "../generated.js";
7
+ import { type StructureEdit } from "../formula/rewrite.js";
8
+ import { type Scalar } from "../values.js";
9
+ import { type CellLook, type Workbook as Model, type Worksheet as ModelSheet } from "../workbook.js";
10
+ import { type ChartBase } from "./charts.js";
11
+ import { AutoFilter, ConditionalFormattingList, DataValidationList, type DataValidation } from "./rules.js";
12
+ import { Alignment, Border, Font, PatternFill } from "./styles.js";
13
+ export type CellValue = number | string | boolean | Date | null;
14
+ /** A typed cell in rows and columns of at least this many cells goes in a CSV file. */
15
+ export declare const BLOCK_CELLS = 100;
16
+ export declare class Cell {
17
+ readonly row: number;
18
+ readonly column: number;
19
+ _ws: Worksheet;
20
+ _value: Scalar;
21
+ _formula: string | undefined;
22
+ _look: CellLook;
23
+ _changed: boolean;
24
+ _styled: boolean;
25
+ /** It holds nothing in the file yet. */
26
+ _fresh: boolean;
27
+ constructor(ws: Worksheet, row: number, column: number);
28
+ get parent(): Worksheet;
29
+ get coordinate(): string;
30
+ get column_letter(): string;
31
+ get col_idx(): number;
32
+ /** What it holds: a formula is its text, as openpyxl's; with data_only, what it computes to. */
33
+ get value(): CellValue;
34
+ set value(next: CellValue);
35
+ private _shown;
36
+ /** What its formula computes to, added to openpyxl's: the workbook as it stands, saved or not. */
37
+ get computed(): CellValue;
38
+ get data_type(): string;
39
+ get is_date(): boolean;
40
+ /** What it opens: an address on the web, or `#Sheet!A1`. */
41
+ get hyperlink(): string | undefined;
42
+ set hyperlink(to: string | undefined);
43
+ /** Its note: Excel's Note, openpyxl's Comment. */
44
+ get comment(): Comment | undefined;
45
+ set comment(note: Comment | undefined);
46
+ get number_format(): string;
47
+ set number_format(code: string);
48
+ private _setLook;
49
+ get font(): Font;
50
+ set font(font: Font);
51
+ get fill(): PatternFill;
52
+ set fill(fill: PatternFill);
53
+ get border(): Border;
54
+ set border(border: Border);
55
+ get alignment(): Alignment;
56
+ set alignment(alignment: Alignment);
57
+ get has_style(): boolean;
58
+ offset(row?: number, column?: number): Cell;
59
+ }
60
+ export declare class ColumnDimension {
61
+ readonly index: string;
62
+ _width: number | undefined;
63
+ _hidden: boolean | undefined;
64
+ _files: SheetFilesColumn | undefined;
65
+ _level: number | undefined;
66
+ _ws: Worksheet;
67
+ constructor(ws: Worksheet, letter: string);
68
+ /** How deep it is grouped, Excel's outline, 1 to 7. */
69
+ get outlineLevel(): number | undefined;
70
+ set outlineLevel(level: number | undefined);
71
+ /** Its cells name files, not an openpyxl field: true, or how they join and how tall a picture is. */
72
+ get files(): SheetFilesColumn | undefined;
73
+ set files(files: SheetFilesColumn | undefined);
74
+ /** In Excel's units, as openpyxl's; the file holds pixels. */
75
+ get width(): number | undefined;
76
+ set width(units: number | undefined);
77
+ get hidden(): boolean;
78
+ set hidden(hidden: boolean);
79
+ }
80
+ export declare class RowDimension {
81
+ readonly index: number;
82
+ _height: number | undefined;
83
+ _hidden: boolean | undefined;
84
+ _level: number | undefined;
85
+ _ws: Worksheet;
86
+ constructor(ws: Worksheet, row: number);
87
+ /** How deep it is grouped, Excel's outline, 1 to 7. */
88
+ get outlineLevel(): number | undefined;
89
+ set outlineLevel(level: number | undefined);
90
+ /** In points, as openpyxl's; the file holds pixels. */
91
+ get height(): number | undefined;
92
+ set height(points: number | undefined);
93
+ get hidden(): boolean;
94
+ set hidden(hidden: boolean);
95
+ }
96
+ export interface TableOptions {
97
+ displayName: string;
98
+ ref: string;
99
+ /** Added to openpyxl's: the column that lines rows up when two hands' changes merge. */
100
+ key?: string;
101
+ }
102
+ export declare class Table {
103
+ displayName: string;
104
+ ref: string;
105
+ key: string | undefined;
106
+ /** Its entry in sheet.yaml, once it has one. */
107
+ _spec: SheetTable | undefined;
108
+ /** Its filter: its buttons are there unless a script turns them off in the files. */
109
+ readonly autoFilter: AutoFilter;
110
+ constructor(o: TableOptions);
111
+ get name(): string;
112
+ }
113
+ export declare class TableList {
114
+ _items: Map<string, Table>;
115
+ constructor();
116
+ add(table: Table): void;
117
+ get(name: string): Table | undefined;
118
+ keys(): string[];
119
+ values(): Table[];
120
+ items(): [string, Table][];
121
+ pop(name: string): Table | undefined;
122
+ }
123
+ export declare class DefinedName {
124
+ readonly name: string;
125
+ attr_text: string;
126
+ constructor(name: string, o: {
127
+ attr_text: string;
128
+ });
129
+ get value(): string;
130
+ set value(text: string);
131
+ }
132
+ export declare class DefinedNameDict {
133
+ _items: Map<string, DefinedName>;
134
+ constructor();
135
+ add(name: DefinedName): void;
136
+ get(name: string): DefinedName | undefined;
137
+ keys(): string[];
138
+ values(): DefinedName[];
139
+ items(): [string, DefinedName][];
140
+ pop(name: string): DefinedName | undefined;
141
+ }
142
+ interface HeldCsv {
143
+ parsed: ParsedCsv | undefined;
144
+ rows: string[][];
145
+ }
146
+ export type TableInput = (CellValue | undefined)[] | Record<string, CellValue>;
147
+ export declare class Worksheet {
148
+ [place: `${string}${number}`]: Cell;
149
+ _parent: Workbook;
150
+ _title: string;
151
+ _was: string | undefined;
152
+ _model: ModelSheet | undefined;
153
+ _cells: Map<number, Cell>;
154
+ _columns: Map<string, ColumnDimension>;
155
+ _rows: Map<number, RowDimension>;
156
+ _tables: TableList;
157
+ _freeze: string | undefined;
158
+ _merges: string[];
159
+ _state: "visible" | "hidden";
160
+ _dimensions: boolean;
161
+ _lastRow: number;
162
+ _rules: SheetConditional[];
163
+ _validations: DataValidation[];
164
+ _filter: AutoFilter;
165
+ /** Its charts, openpyxl's private list. */
166
+ _charts: ChartBase[];
167
+ _print: SheetPrint;
168
+ _links: Record<string, string>;
169
+ _notes: Record<string, SheetNote>;
170
+ _pictures: SheetPicture[];
171
+ _protect: boolean;
172
+ constructor(parent: Workbook, title: string, model?: ModelSheet);
173
+ _spec(): SheetWorksheet | undefined;
174
+ /** What sheet.yaml says of its rules and filter. */
175
+ _heldRules(spec: SheetWorksheet | undefined): void;
176
+ private _at;
177
+ private _rowCells;
178
+ private _area;
179
+ get parent(): Workbook;
180
+ get title(): string;
181
+ set title(name: string);
182
+ get sheet_state(): "visible" | "hidden";
183
+ set sheet_state(state: "visible" | "hidden");
184
+ /** The cell at a row and a column, from 1, as openpyxl counts them. */
185
+ cell(row: number, column: number, value?: CellValue): Cell;
186
+ /** A row under the last one written. */
187
+ append(values: TableInput): void;
188
+ get max_row(): number;
189
+ get max_column(): number;
190
+ readonly min_row = 1;
191
+ readonly min_column = 1;
192
+ get dimensions(): string;
193
+ iter_rows(o?: {
194
+ min_row?: number;
195
+ max_row?: number;
196
+ min_col?: number;
197
+ max_col?: number;
198
+ values_only?: boolean;
199
+ }): (Cell | CellValue)[][];
200
+ iter_cols(o?: {
201
+ min_row?: number;
202
+ max_row?: number;
203
+ min_col?: number;
204
+ max_col?: number;
205
+ values_only?: boolean;
206
+ }): (Cell | CellValue)[][];
207
+ get rows(): Cell[][];
208
+ get columns(): Cell[][];
209
+ get values(): CellValue[][];
210
+ /** Rows put in before row `idx`, every formula that names what moved rewritten, as Excel does and openpyxl leaves to you. */
211
+ insert_rows(idx: number, amount?: number): void;
212
+ /** Rows taken out from `idx`: a reference to one is #REF!, and a range shrinks. */
213
+ delete_rows(idx: number, amount?: number): void;
214
+ /** Columns put in before column `idx`, from 1. */
215
+ insert_cols(idx: number, amount?: number): void;
216
+ /** Columns taken out from `idx`, from 1. */
217
+ delete_cols(idx: number, amount?: number): void;
218
+ merge_cells(range: string): void;
219
+ unmerge_cells(range: string): void;
220
+ /** Each merged range's text; openpyxl's is an object of them. */
221
+ get merged_cells(): string[];
222
+ get freeze_panes(): string | undefined;
223
+ set freeze_panes(place: string | Cell | undefined);
224
+ get column_dimensions(): Record<string, ColumnDimension>;
225
+ get row_dimensions(): Record<number, RowDimension>;
226
+ get tables(): TableList;
227
+ /** The sheet's conditional formats. */
228
+ get conditional_formatting(): ConditionalFormattingList;
229
+ get data_validations(): DataValidationList;
230
+ add_data_validation(data_validation: DataValidation): void;
231
+ /** The sheet's AutoFilter: set its ref to have one. A table has its own. */
232
+ get auto_filter(): AutoFilter;
233
+ _changed(): void;
234
+ /** `print`, `links`, `notes`, `pictures` and `protect` as sheet.yaml holds them. */
235
+ _heldPage(spec: SheetWorksheet | undefined): void;
236
+ get page_setup(): PageSetup;
237
+ get page_margins(): PageMargins;
238
+ get oddHeader(): HeaderFooter;
239
+ get oddFooter(): HeaderFooter;
240
+ get protection(): SheetProtection;
241
+ /** The range that prints. */
242
+ get print_area(): string | undefined;
243
+ set print_area(area: string | undefined);
244
+ /** Rows repeated on every page, as `1:2`. */
245
+ get print_title_rows(): string | undefined;
246
+ set print_title_rows(rows: string | undefined);
247
+ /** Columns repeated on every page, as `A:B`. */
248
+ get print_title_cols(): string | undefined;
249
+ set print_title_cols(columns: string | undefined);
250
+ /** A picture over the cells, at a cell: its anchor unless it says. */
251
+ add_image(image: Image, anchor?: string): void;
252
+ /** A chart at a cell: its anchor unless it says. */
253
+ add_chart(chart: ChartBase, anchor?: string): void;
254
+ add_table(table: Table): void;
255
+ }
256
+ export interface LoadOptions {
257
+ /** cell.value reads what a formula computes to, as openpyxl's. */
258
+ data_only?: boolean;
259
+ }
260
+ export declare class Workbook {
261
+ worksheets: Worksheet[];
262
+ readonly defined_names: DefinedNameDict;
263
+ readonly data_only: boolean;
264
+ /** The workbook's title, sheet.yaml's. */
265
+ title: string | undefined;
266
+ /** Where it was opened or last saved. */
267
+ path: string | undefined;
268
+ /** How many typed cells together go in a CSV file of their own. */
269
+ block_cells: number;
270
+ _file: SheetFile;
271
+ _text: string;
272
+ /** sheet.yaml and the CSV files as they are on disk: what a save compares with. */
273
+ _disk: {
274
+ text: string;
275
+ csv: Map<string, string>;
276
+ };
277
+ _csv: Map<string, HeldCsv>;
278
+ _model: Model | undefined;
279
+ _names: Map<string, Scalar>;
280
+ _active: number;
281
+ /** Something changed since the files were last made. */
282
+ _pending: boolean;
283
+ /** It is sheet.ts's: what it makes is never saved. */
284
+ _making: boolean;
285
+ private _calc;
286
+ constructor(o?: LoadOptions);
287
+ /** A workbook's folder, read. */
288
+ static open(dir: string, o?: LoadOptions): Workbook;
289
+ private _read;
290
+ private _keepCsv;
291
+ private _load;
292
+ get active(): Worksheet;
293
+ set active(ws: Worksheet);
294
+ get sheetnames(): string[];
295
+ get_sheet_by_name(name: string): Worksheet | undefined;
296
+ index(ws: Worksheet): number;
297
+ create_sheet(title?: string, index?: number): Worksheet;
298
+ remove(ws: Worksheet): void;
299
+ move_sheet(ws: Worksheet, offset?: number): void;
300
+ _tableNamed(name: string): Table | undefined;
301
+ /** A sheet renamed in every formula that names it. */
302
+ _renameSheet(ws: Worksheet, from: string, to: string): void;
303
+ /** Rows or columns put in or taken out, through every file of the workbook. */
304
+ _restructure(edit: StructureEdit): void;
305
+ /** Every formula of the files after an edit of the workbook. */
306
+ private _rewrite;
307
+ private _rewriteCsv;
308
+ private _sheetEntry;
309
+ private _dataPath;
310
+ /** A table added since the files were read: its cells become its CSV file. */
311
+ private _writeNewTable;
312
+ /** What a column's format says needs no entry of its own in `format`. */
313
+ private _columnsStyled;
314
+ /** The formula every row of a column has, moved; undefined when they differ. */
315
+ private _columnFormula;
316
+ private _columnFormat;
317
+ private _held;
318
+ private _setCsvCell;
319
+ /** The record of a table's row, its file's blank lines not being rows. */
320
+ private _recordOf;
321
+ /** Where a changed cell of an existing table goes. */
322
+ private _writeTableCell;
323
+ private _movedColumn;
324
+ /** Writes what changed into the file objects, and reads them again. */
325
+ _apply(): void;
326
+ private _applyNames;
327
+ private _applySheet;
328
+ private _applyFilter;
329
+ private _applyTableFilters;
330
+ private _applyDimensions;
331
+ private _applyCells;
332
+ private _styleByFormat;
333
+ /** The cell's look as far as the file does not give it already. */
334
+ private _ownLook;
335
+ private _writeLoose;
336
+ /** New cells: a run of one formula is one key, many typed cells a CSV file. */
337
+ private _consolidate;
338
+ private _build;
339
+ /** The files as they now stand become what the next change is made over. */
340
+ private _rebase;
341
+ /** The workbook as it stands, computed. */
342
+ _computed(): {
343
+ calc: Calc;
344
+ model: Model;
345
+ };
346
+ /** What allyhub check would say of it as it stands, added to openpyxl's. */
347
+ check(): SheetProblem[];
348
+ /** What sheet.ts made on it: each CSV file named where it stands for no file on disk. */
349
+ _generated(): GeneratedSheets;
350
+ /** Writes sheet.yaml and its CSV files: to the folder it came from, or one named. */
351
+ save(dir?: string): void;
352
+ }
353
+ /** A workbook's folder, read: openpyxl's load_workbook. */
354
+ export declare function load_workbook(dir: string, o?: LoadOptions): Workbook;
355
+ /** openpyxl's helpers for addresses. */
356
+ export declare const get_column_letter: (column: number) => string;
357
+ export declare function column_index_from_string(letters: string): number;
358
+ export declare function coordinate_to_tuple(address: string): [number, number];
359
+ /** (first column, first row, last column, last row), from 1. */
360
+ export declare function range_boundaries(range: string): [number, number, number, number];
361
+ export {};
362
+ //# sourceMappingURL=workbook.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_DATA as G,SHEET_FILE as P,strict as g}from"@allyhub-next/formats";import{Comment as z,HeaderFooter as A,PageMargins as V,PageSetup as Y,SheetProtection as q}from"./page.js";import{columnIndex as E,columnLetter as L,cellName as C,contains as N,rangeName as x,readAddress as y,readArea as k}from"../address.js";import{Calc as Q}from"../calc/engine.js";import{checkWorkbook as X}from"../check.js";import{readCsv as Z,writeCsv as ee}from"../csv.js";import{GENERATED as te}from"../generated.js";import{moveFormula as se,relativeKey as ne}from"../formula/move.js";import{parseFormula as F}from"../formula/parse.js";import{printFormula as B}from"../formula/print.js";import{rewriteFormula as oe}from"../formula/rewrite.js";import{isDateCode as S}from"../format.js";import{patchCsv as re}from"../patch.js";import{CellError as W,dateOfSerial as ie,isoOfSerial as le,readTyped as M,serialOfDate as ae,writeTyped as he}from"../values.js";import{FormulaCell as fe,readWorkbook as I,validName as H}from"../workbook.js";import{restructure as _e,tableShape as ce}from"../structure.js";import{patchYaml as ue}from"../write.js";import{anchorOf as de,chartOfSpec as me}from"./charts.js";import{HINT as w}from"./hint.js";import{rectangles as T}from"./rectangles.js";import{AutoFilter as K,ConditionalFormattingList as pe,DataValidationList as we,validationOf as ge,validationSpec as ke}from"./rules.js";import{alignmentLook as ye,alignmentOf as be,borderLook as ve,borderOf as xe,fillLook as Ee,fillOf as Se,fontLook as $e,fontOf as Ce}from"./styles.js";const J=()=>process.getBuiltinModule("node:fs"),$=(...l)=>process.getBuiltinModule("node:path").join(...l);export const BLOCK_CELLS=100;const Te=l=>Math.round(l*7+5),Oe=l=>(l-5)/7,Le=l=>l*4/3,Ne=l=>l*3/4;function Fe(l,e){const t={},s=l,n=e;for(const o of new Set([...Object.keys(s),...Object.keys(n)])){const r=n[o];JSON.stringify(r??!1)!==JSON.stringify(s[o]??!1)&&(t[o]=r??!1)}return t}const m=l=>Object.keys(l).length===0,b=(l,e)=>{if(!Number.isInteger(l)||l<1)throw new RangeError(`A ${e} is a whole number from 1: ${String(l)}.`);return l},j=(l,e)=>Object.fromEntries(Object.entries(l).filter(([t])=>t!==e));export class Cell{row;column;_ws;_value;_formula=void 0;_look;_changed=!1;_styled=!1;_fresh=!1;constructor(e,t,s){this._ws=e,this.row=t,this.column=s;const n=t-1,o=s-1,r=e._model?.at(n,o);return this._value=null,r instanceof fe?this._formula=r.text:r!==void 0&&(this._value=r),this._look=e._model?.lookAt(n,o)??{},this._fresh=r===void 0,g(this,"Cell",w)}get parent(){return this._ws}get coordinate(){return C({row:this.row-1,col:this.column-1})}get column_letter(){return L(this.column-1)}get col_idx(){return this.column}get value(){return this._ws.parent.data_only?this.computed:this._formula!==void 0?this._formula:this._shown(this._value)}set value(e){if(e===void 0)throw new TypeError(`${this.coordinate}: a value is not undefined.`);if(this._formula=void 0,this._changed=!0,this._ws.parent._pending=!0,e instanceof Date){if(Number.isNaN(e.getTime()))throw new TypeError(`${this.coordinate}: the date is not valid.`);this._value=ae(e),S(this._look.format)||(this._look={...this._look,format:Number.isInteger(this._value)?"yyyy-mm-dd":"yyyy-mm-dd hh:mm"});return}if(typeof e=="string"&&e.length>1&&e.startsWith("=")){this._formula=e,this._value=null;return}this._value=e}_shown(e){return typeof e=="number"&&S(this._look.format)?ie(e)??e:e instanceof W?e.code:e}get computed(){const{calc:e,model:t}=this._ws.parent._computed(),s=t.sheet(this._ws.title);return s?this._shown(e.value(s,this.row-1,this.column-1)):null}get data_type(){if(this._formula!==void 0)return"f";const e=this._value;return e===null?"n":typeof e=="number"?S(this._look.format)?"d":"n":typeof e=="boolean"?"b":e instanceof W?"e":"s"}get is_date(){return this.data_type==="d"}get hyperlink(){return this._ws._links[this.coordinate]}set hyperlink(e){e===void 0?Reflect.deleteProperty(this._ws._links,this.coordinate):this._ws._links[this.coordinate]=e,this._ws._changed()}get comment(){const e=this._ws._notes[this.coordinate];if(e!==void 0)return typeof e=="string"?new z(e):new z(e.text,e.author)}set comment(e){e===void 0?Reflect.deleteProperty(this._ws._notes,this.coordinate):this._ws._notes[this.coordinate]=e._file(),this._ws._changed()}get number_format(){return this._look.format??"General"}set number_format(e){this._setLook({format:e})}_setLook(e){this._look={...this._look,...e},this._styled=!0,this._ws.parent._pending=!0}get font(){return Ce(this._look)}set font(e){this._setLook($e(e))}get fill(){return Se(this._look)}set fill(e){this._setLook(Ee(e))}get border(){return xe(this._look)}set border(e){this._setLook(ve(e))}get alignment(){return be(this._look)}set alignment(e){this._setLook(ye(e))}get has_style(){return!m(this._look)}offset(e=0,t=0){return this._ws.cell(this.row+e,this.column+t)}}export class ColumnDimension{index;_width;_hidden;_files;_level;_ws;constructor(e,t){this._ws=e,this.index=t;const s=e._spec()?.columns?.[t];return this._level=s?.level,this._width=s?.width,this._hidden=s?.hidden,this._files=s?.files,g(this,"ColumnDimension",w)}get outlineLevel(){return this._level}set outlineLevel(e){this._level=e,this._ws._dimensions=!0}get files(){return this._files}set files(e){this._files=e,this._ws._dimensions=!0}get width(){return this._width===void 0?void 0:Oe(this._width)}set width(e){this._width=e===void 0?void 0:Te(e),this._ws._dimensions=!0}get hidden(){return this._hidden??!1}set hidden(e){this._hidden=e,this._ws._dimensions=!0}}export class RowDimension{index;_height;_hidden;_level;_ws;constructor(e,t){this._ws=e,this.index=t;const s=e._spec()?.rows?.[String(t)];return this._level=s?.level,this._height=s?.height,this._hidden=s?.hidden,g(this,"RowDimension",w)}get outlineLevel(){return this._level}set outlineLevel(e){this._level=e,this._ws._dimensions=!0}get height(){return this._height===void 0?void 0:Ne(this._height)}set height(e){this._height=e===void 0?void 0:Le(e),this._ws._dimensions=!0}get hidden(){return this._hidden??!1}set hidden(e){this._hidden=e,this._ws._dimensions=!0}}export class Table{displayName;ref;key;_spec;autoFilter;constructor(e){for(const t of Object.keys(e))if(!["displayName","ref","key"].includes(t))throw new TypeError(`Table takes displayName, ref and key; it has no ${t}. ${w}`);if(!H(e.displayName))throw new TypeError(`${e.displayName} cannot be a table's name.`);if(!k(e.ref))throw new TypeError(`${e.ref} is not a range.`);return this.displayName=e.displayName,this.ref=e.ref,this.key=e.key,this.autoFilter=new K(e.ref,()=>{}),g(this,"Table",w)}get name(){return this.displayName}}export class TableList{_items=new Map;constructor(){return g(this,"TableList",w,{key:e=>this._items.get(e)})}add(e){this._items.set(e.name,e)}get(e){return this._items.get(e)}keys(){return[...this._items.keys()]}values(){return[...this._items.values()]}items(){return[...this._items.entries()]}pop(e){const t=this._items.get(e);return this._items.delete(e),t}}export class DefinedName{name;attr_text;constructor(e,t){if(!H(e))throw new TypeError(`${e} cannot be a name.`);return this.name=e,this.attr_text=t.attr_text.replace(/^=/u,""),g(this,"DefinedName",w)}get value(){return this.attr_text}set value(e){this.attr_text=e.replace(/^=/u,"")}}export class DefinedNameDict{_items=new Map;constructor(){return g(this,"DefinedNameDict",w,{key:e=>this._items.get(e),setKey:(e,t)=>t instanceof DefinedName?(this._items.set(e,t),!0):!1})}add(e){this._items.set(e.name,e)}get(e){return this._items.get(e)}keys(){return[...this._items.keys()]}values(){return[...this._items.values()]}items(){return[...this._items.entries()]}pop(e){const t=this._items.get(e);return this._items.delete(e),t}}const v=l=>{if(l._formula!==void 0)return l._formula;const e=l._value;return typeof e=="number"&&S(l._look.format)?le(e):he(e)};function U(l){if(l._formula!==void 0)return l._formula;const e=l._value;return e===null?null:typeof e=="number"&&!S(l._look.format)||typeof e=="boolean"?e:v(l)}const Me=l=>l.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/gu,"")||"rows";export class Worksheet{_parent;_title;_was;_model;_cells=new Map;_columns=new Map;_rows=new Map;_tables=new TableList;_freeze;_merges=[];_state="visible";_dimensions=!1;_lastRow=0;_rules=[];_validations=[];_filter;_charts=[];_print={};_links={};_notes={};_pictures=[];_protect=!1;constructor(e,t,s){if(this._parent=e,this._title=t,this._filter=new K(void 0,()=>{this._parent._pending=!0}),s){this._model=s,this._was=t,this._freeze=s.spec.freeze,this._heldPage(s.spec),this._merges=[...s.spec.merges??[]],this._state=s.spec.hidden===!0?"hidden":"visible",this._lastRow=(s.used?.bottom??-1)+1,this._heldRules(s.spec);for(const n of s.tables){const o=new Table({displayName:n.name,ref:x(n.area),...n.spec.key===void 0?{}:{key:n.spec.key}});o._spec=n.spec;const{filter:r}=n.spec;if(r)for(const[a,f]of Object.entries(r.columns)){const c=n.column(a);c&&o.autoFilter._columns.set(c.index,f)}this._tables.add(o)}}return g(this,"Worksheet",w,{index:n=>this._rowCells(n),key:n=>this._at(n),setKey:(n,o)=>{const r=y(n);return r?(this.cell(r.row+1,r.col+1).value=o,!0):!1}})}_spec(){return this._parent._file.sheets.find(e=>e.name===(this._was??this._title))}_heldRules(e){this._rules=[...e?.conditional??[]],this._validations=(e?.validations??[]).map(ge),this._charts=(e?.charts??[]).map(me),this._filter.ref=e?.filter?.range,this._filter._columns.clear();const t=e?.filter?k(e.filter.range):void 0;for(const[s,n]of Object.entries(e?.filter?.columns??{})){const o=E(s);t&&o!==void 0&&this._filter._columns.set(o-t.left,n)}}_at(e){const t=y(e);if(t)return this.cell(t.row+1,t.col+1);const s=k(e);if(s)return this._area(s);const n=E(e);if(n!==void 0){const o=[];for(let r=1;r<=this.max_row;r++)o.push(this.cell(r,n+1));return o}}_rowCells(e){const t=[];for(let s=1;s<=this.max_column;s++)t.push(this.cell(e,s));return t}_area(e){const t=[];for(let s=e.top;s<=e.bottom;s++){const n=[];for(let o=e.left;o<=e.right;o++)n.push(this.cell(s+1,o+1));t.push(n)}return t}get parent(){return this._parent}get title(){return this._title}set title(e){const t=this._title;e!==t&&this._parent._renameSheet(this,t,e)}get sheet_state(){return this._state}set sheet_state(e){this._state=e}cell(e,t,s){if(e<1||t<1)throw new RangeError(`Row and column values must be at least 1: ${String(e)}, ${String(t)}.`);const n=(e-1)*16384+t-1;let o=this._cells.get(n);return o||(o=new Cell(this,e,t),this._cells.set(n,o)),s!==void 0&&(o.value=s),e>this._lastRow&&(this._lastRow=e),o}append(e){const t=this._lastRow+1,s=(n,o)=>{o!=null&&this.cell(t,n,o)};if(Array.isArray(e))e.forEach((n,o)=>{s(o+1,n)});else for(const[n,o]of Object.entries(e)){const r=/^\d+$/u.test(n)?Number(n)-1:E(n);if(r===void 0)throw new TypeError(`${n} is not a column.`);s(r+1,o)}this._lastRow=t}get max_row(){return Math.max(1,this._lastRow)}get max_column(){let e=this._model?.columnsUsed??0;for(const t of this._cells.values())(t._value!==null||t._formula!==void 0)&&t.column>e&&(e=t.column);return Math.max(1,e)}min_row=1;min_column=1;get dimensions(){return x({top:0,left:0,bottom:this.max_row-1,right:this.max_column-1})}iter_rows(e={}){const t=this._area({top:(e.min_row??1)-1,left:(e.min_col??1)-1,bottom:(e.max_row??this.max_row)-1,right:(e.max_col??this.max_column)-1});return e.values_only===!0?t.map(s=>s.map(n=>n.value)):t}iter_cols(e={}){const t=this.iter_rows(e);return(t[0]??[]).map((n,o)=>t.map(r=>r[o]))}get rows(){return this.iter_rows()}get columns(){return this.iter_cols()}get values(){return this.iter_rows({values_only:!0})}insert_rows(e,t=1){this._parent._restructure({op:"insert-rows",sheet:this._title,at:b(e,"row")-1,count:b(t,"amount")})}delete_rows(e,t=1){this._parent._restructure({op:"delete-rows",sheet:this._title,at:b(e,"row")-1,count:b(t,"amount")})}insert_cols(e,t=1){this._parent._restructure({op:"insert-columns",sheet:this._title,at:b(e,"column")-1,count:b(t,"amount")})}delete_cols(e,t=1){this._parent._restructure({op:"delete-columns",sheet:this._title,at:b(e,"column")-1,count:b(t,"amount")})}merge_cells(e){if(!k(e))throw new TypeError(`${e} is not a range.`);this._merges.includes(e)||this._merges.push(e),this._parent._pending=!0}unmerge_cells(e){this._merges=this._merges.filter(t=>t!==e),this._parent._pending=!0}get merged_cells(){return[...this._merges]}get freeze_panes(){return this._freeze}set freeze_panes(e){const t=e instanceof Cell?e.coordinate:e;if(t!==void 0&&!y(t))throw new TypeError(`${t} is not a cell.`);this._freeze=t,this._parent._pending=!0}get column_dimensions(){return new Proxy({},{get:(e,t)=>{if(typeof t!="string")return;const s=t.toUpperCase();if(E(s)===void 0)throw new TypeError(`${t} is not a column.`);let n=this._columns.get(s);return n||(n=new ColumnDimension(this,s),this._columns.set(s,n)),n}})}get row_dimensions(){return new Proxy({},{get:(e,t)=>{if(typeof t!="string"||!/^[1-9]\d*$/u.test(t))throw new TypeError(`${String(t)} is not a row.`);const s=Number(t);let n=this._rows.get(s);return n||(n=new RowDimension(this,s),this._rows.set(s,n)),n}})}get tables(){return this._tables}get conditional_formatting(){return new pe(this._rules,()=>{this._parent._pending=!0})}get data_validations(){return new we(this._validations,()=>{this._parent._pending=!0})}add_data_validation(e){this._validations.push(e),this._parent._pending=!0}get auto_filter(){return this._filter}_changed(){this._parent._pending=!0}_heldPage(e){this._print=structuredClone(e?.print??{}),this._links={...e?.links},this._notes={...e?.notes},this._pictures=[...e?.pictures??[]],this._protect=e?.protect===!0}get page_setup(){return new Y(this)}get page_margins(){return new V(this)}get oddHeader(){return new A(this,"header")}get oddFooter(){return new A(this,"footer")}get protection(){return new q(()=>this._protect,e=>{this._protect=e,this._changed()})}get print_area(){return this._print.area}set print_area(e){if(e===void 0)delete this._print.area;else if(k(e))this._print.area=e;else throw new TypeError(`${e} is not a range.`);this._changed()}get print_title_rows(){return this._print.title_rows}set print_title_rows(e){e===void 0?delete this._print.title_rows:this._print.title_rows=e,this._changed()}get print_title_cols(){return this._print.title_cols}set print_title_cols(e){e===void 0?delete this._print.title_cols:this._print.title_cols=e,this._changed()}add_image(e,t){const s=t??e.anchor??"A1";if(!y(s))throw new TypeError(`${s} is not a cell.`);this._pictures.push({file:e.path,at:s,...e.width===void 0?{}:{width:e.width},...e.height===void 0?{}:{height:e.height}}),this._changed()}add_chart(e,t){e.anchor=de(t)??e.anchor,this._charts.push(e),this._parent._pending=!0}add_table(e){if(this._parent._tableNamed(e.name))throw new Error(`There is already a table named ${e.name}.`);this._tables.add(e),this._parent._pending=!0}}export class Workbook{worksheets=[];defined_names=new DefinedNameDict;data_only;title;path;block_cells=BLOCK_CELLS;_file={sheets:[]};_text="";_disk={text:"",csv:new Map};_csv=new Map;_model;_names=new Map;_active=0;_pending=!1;_making=!1;_calc=void 0;constructor(e={}){this.data_only=e.data_only??!1;const t=g(this,"Workbook",w,{key:s=>this.worksheets.find(n=>n.title===s),index:s=>this.worksheets[s]});return t.worksheets=[new Worksheet(t,"Sheet")],t}static open(e,t={}){const s=new Workbook(t);return s.path=e,s._read(e),s}_read(e){const{readFileSync:t}=J(),s=t($(e,P),"utf8"),n=new Map,o=r=>{try{const a=t($(e,r),"utf8");return n.set(r,a),a}catch{return}};this._load(s,o);for(const[r,a]of n)this._keepCsv(r,a);this._disk={text:s,csv:n}}_keepCsv(e,t){const s=Z(t);this._csv.set(e,{parsed:s,rows:s.records.map(n=>n.end===n.start?[]:[...n.fields])})}_load(e,t){const{workbook:s,problems:n}=I({text:e,read:t});if(!s)throw new Error(`sheet.yaml cannot be opened: ${n.map(o=>o.message).join("; ")}`);this._text=e,this._file=structuredClone(s.file),this._model=s,this.title=s.title,this.worksheets=s.sheets.map(o=>new Worksheet(this,o.name,o));for(const o of s.names.values()){if(o.source.path?.[0]!=="names")continue;const r=o.formula?o.formula.text:o.value??null;this._names.set(o.name,r),this.defined_names.add(new DefinedName(o.name,{attr_text:String(r)}))}}get active(){const e=this.worksheets[this._active]??this.worksheets[0];if(!e)throw new Error("The workbook has no sheets.");return e}set active(e){this._active=this.worksheets.indexOf(e)}get sheetnames(){return this.worksheets.map(e=>e.title)}get_sheet_by_name(e){return this.worksheets.find(t=>t.title===e)}index(e){return this.worksheets.indexOf(e)}create_sheet(e,t){let s=e??"Sheet";for(let o=1;this.worksheets.some(r=>r.title===s);o++)s=`${e??"Sheet"}${String(o)}`;const n=new Worksheet(this,s);return this.worksheets.splice(t??this.worksheets.length,0,n),this._pending=!0,n}remove(e){this.worksheets=this.worksheets.filter(t=>t!==e),this._pending=!0}move_sheet(e,t=0){const s=this.worksheets.indexOf(e);this.worksheets.splice(s,1),this.worksheets.splice(s+t,0,e),this._pending=!0}_tableNamed(e){for(const t of this.worksheets){const s=t._tables.get(e);if(s)return s}}_renameSheet(e,t,s){if(this.worksheets.some(o=>o!==e&&o.title===s))throw new Error(`There is already a sheet named ${s}.`);this._apply(),this._rewrite({op:"rename-sheet",from:t,to:s}),e._title=s,e._was=s;const n=this._file.sheets.find(o=>o.name===t);n&&(n.name=s),this._apply()}_restructure(e){this._apply();const t=_e({file:this._file,rows:new Map([...this._csv].map(([n,o])=>[n,o.rows]))},e);if(t.refused!==void 0)throw new Error(t.refused==="table-header"?"A table's header row is not deleted: delete the table's rows, or all of it.":"That sheet is not there.");this._file=t.file;for(const[n,o]of t.rows){const r=this._csv.get(n);r&&(r.rows=o.map(a=>[...a]))}for(const n of this.worksheets){const o=this._file.sheets.find(r=>r.name===n._title);n._cells.clear(),n._columns.clear(),n._rows.clear(),n._merges=[...o?.merges??[]],n._freeze=o?.freeze,n._heldPage(o),n._heldRules(o)}const s=this._build();this._rebase(s.text,s.files);for(const n of this.worksheets){const o=this._model?.sheet(n._title);if(o){n._lastRow=(o.used?.bottom??-1)+1;for(const r of o.tables){const a=n._tables.get(r.name);a&&(a.ref=x(r.area))}}}}_rewrite(e){const t=(n,o)=>{const r=F(n);if(!r.ok)return n;const a=oe(r.node,e,o);return a===r.node?n:B(a)},{_file:s}=this;if(s.names){for(const[n,o]of Object.entries(s.names))if(typeof o=="string"&&o.startsWith("=")){const r=t(o,s.sheets[0]?.name??"");s.names[n]=r,this._names.set(n,r);const a=this.defined_names.get(n);a&&(a.attr_text=r.slice(1))}}for(const n of s.checks??[])n.formula=t(n.formula,s.sheets[0]?.name??"");for(const n of s.sheets){for(const[o,r]of Object.entries(n.cells??{}))typeof r=="string"&&r.startsWith("=")?n.cells[o]=t(r,n.name):r!==null&&typeof r=="object"&&r.formula!==void 0&&(r.formula=t(r.formula,n.name));for(const o of n.tables??[]){for(const r of Object.values(o.columns??{}))r.formula!==void 0&&(r.formula=t(r.formula,n.name));this._rewriteCsv(o.rows,n.name,t)}for(const o of n.blocks??[])this._rewriteCsv(o.rows,n.name,t)}}_rewriteCsv(e,t,s){const n=this._csv.get(e);n&&(n.rows=n.rows.map(o=>o.map(r=>M(r).formula!==void 0?s(r,t):r)))}_sheetEntry(e){const t=e._was??e._title;let s=this._file.sheets.find(n=>n.name===t);return s||(s={name:e._title},this._file.sheets.push(s)),s.name=e._title,s}_dataPath(e){const t=`${G}/${Me(e)}`;let s=`${t}.csv`;const n=o=>this._csv.has(o)||this._file.sheets.some(r=>r.tables?.some(a=>a.rows===o)??r.blocks?.some(a=>a.rows===o));for(let o=2;n(s);o++)s=`${t}-${String(o)}.csv`;return s}_writeNewTable(e,t,s){const n=k(s.ref);if(!n)throw new Error(`${s.ref} is not a range.`);const o=[];for(let i=n.left;i<=n.right;i++){const h=e.cell(n.top+1,i+1).value;if(h===null||h==="")throw new Error(`Table ${s.name}'s header has no name at ${C({row:n.top,col:i})}.`);o.push(String(h))}const r={},a=[];o.forEach((i,h)=>{const _=n.left+h,d=this._columnFormula(e,n,_);d===void 0?a.push(h):r[i]={formula:d};const p=this._columnFormat(e,n,_);p!==void 0&&(r[i]={...r[i],format:p})}),this._columnsStyled(e,n);const f=[a.map(i=>o[i]??"")];for(let i=n.top+1;i<=n.bottom;i++)f.push(a.map(h=>v(e.cell(i+1,n.left+h+1))));t.cells&&(t.cells=Object.fromEntries(Object.entries(t.cells).filter(([i])=>{const h=y(i);return!h||!N(n,h.row,h.col)})));const c=this._dataPath(s.name);this._csv.set(c,{parsed:void 0,rows:f});const u={name:s.name,at:C({row:n.top,col:n.left}),rows:c,...s.key===void 0?{}:{key:s.key},...m(r)?{}:{columns:r}};(t.tables??=[]).push(u),s._spec=u}_columnsStyled(e,t){for(let s=t.left;s<=t.right;s++)for(let n=t.top+1;n<=t.bottom;n++){const o=e.cell(n+1,s+1),{format:r,...a}=this._ownLook(o);r!==void 0&&m(a)&&(o._styled=!1)}}_columnFormula(e,t,s){if(t.bottom<=t.top)return;const n=e.cell(t.top+2,s+1),o=R(n);if(o!==void 0){for(let r=t.top+2;r<=t.bottom;r++)if(R(e.cell(r+1,s+1))!==o)return;return n._formula}}_columnFormat(e,t,s){if(t.bottom<=t.top)return;const n=r=>this._ownLook(e.cell(r+1,s+1)).format,o=n(t.top+1);for(let r=t.top+2;r<=t.bottom;r++)if(n(r)!==o)return;return o}_held(e){const t=this._csv.get(e);if(!t)throw new Error(`${e} was not read.`);return t}_setCsvCell(e,t,s,n){const{rows:o}=this._held(e);for(;o.length<=t;)o.push([]);const r=o[t];if(r){for(;r.length<=s;)r.push("");r[s]=n}}_recordOf(e,t){let s=0;for(let n=0;n<t;){if(s+=1,s>=e.length)return s+t-n-1;e[s]?.length!==0&&(n+=1)}return s}_writeTableCell(e,t,s){const n=this._held(e.rows),o=n.rows[0]??[],r=s.column-1-t.left,a=this._recordOf(n.rows,s.row-1-t.top),f=Object.keys(e.columns??{}).filter(_=>!o.some(d=>d.trim().toLowerCase()===_.toLowerCase())),u=[...o.map(_=>_.trim()),...f][r];if(u===void 0)return;if(a===0){r<o.length&&(o[r]=v(s));return}const i=e.columns?.[u]?.formula;if(i!==void 0){const _=this._movedColumn(i,t,s);if(s._formula===_){const d=o.findIndex(p=>p.trim()===u);d>=0&&this._setCsvCell(e.rows,a,d,"");return}}let h=o.findIndex(_=>_.trim()===u);h<0&&(h=o.length,this._setCsvCell(e.rows,0,h,u)),this._setCsvCell(e.rows,a,h,v(s))}_movedColumn(e,t,s){const n=F(e);if(!n.ok)return e;const o=s.row-1-(t.top+1);return o===0?e:B(se(n.node,o,0))}_apply(){this.title===void 0?delete this._file.title:this._file.title=this.title;const e=new Set(this.worksheets.map(s=>s._was??s._title));this._file.sheets=this._file.sheets.filter(s=>e.has(s.name));for(const s of this.worksheets)this._applySheet(s);this._file.sheets=this.worksheets.map(s=>this._sheetEntry(s)),this._applyNames();const t=this._build();this._rebase(t.text,t.files)}_applyNames(){const e={};for(const t of this.defined_names.values()){const s=M(t.attr_text),n=this._names.get(t.name);e[t.name]=n!==void 0&&String(n).replace(/^=/u,"")===t.attr_text?n:typeof s.value=="number"||typeof s.value=="boolean"?s.value:/^"[^"]*"$/u.test(t.attr_text)?t.attr_text.slice(1,-1):`=${t.attr_text}`}m(e)?delete this._file.names:this._file.names=e}_applySheet(e){const t=this._sheetEntry(e);e._freeze===void 0?delete t.freeze:t.freeze=e._freeze,m(e._print)?delete t.print:t.print=e._print,m(e._links)?delete t.links:t.links=e._links,m(e._notes)?delete t.notes:t.notes=e._notes,e._pictures.length===0?delete t.pictures:t.pictures=e._pictures,e._protect?t.protect=!0:delete t.protect,e._merges.length===0?delete t.merges:t.merges=[...e._merges],e._state==="hidden"?t.hidden=!0:delete t.hidden,e._rules.length===0?delete t.conditional:t.conditional=[...e._rules],e._validations.length===0?delete t.validations:t.validations=e._validations.map(ke),e._charts.length===0?delete t.charts:t.charts=e._charts.map(n=>n._spec(e._title)),this._applyFilter(e,t);const s=new Set(t.tables?.map(n=>n.name.toLowerCase()));for(const n of e._tables.values())s.has(n.name.toLowerCase())||this._writeNewTable(e,t,n);this._applyTableFilters(e,t),this._applyCells(e,t),this._applyDimensions(e,t),t.cells&&m(t.cells)&&delete t.cells,t.columns&&m(t.columns)&&delete t.columns,t.rows&&m(t.rows)&&delete t.rows,t.format?.length===0&&delete t.format,t.tables?.length===0&&delete t.tables,t.blocks?.length===0&&delete t.blocks}_applyFilter(e,t){const{ref:s,_columns:n}=e._filter;if(s===void 0){delete t.filter;return}const o=k(s);if(!o)throw new TypeError(`${s} is not a range.`);const r={};for(const[a,f]of n)r[L(o.left+a)]=f;t.filter={range:s,...m(r)?{}:{columns:r}}}_applyTableFilters(e,t){for(const s of t.tables??[]){const n=e._tables.get(s.name);if(!n||n.autoFilter._columns.size===0)continue;const o=this._csv.get(s.rows)?.rows??[],r=ce(s,o)?.names??[],a={};for(const[f,c]of n.autoFilter._columns){const u=r[f];if(u===void 0)throw new RangeError(`Table ${s.name} has no column at ${String(f)}.`);a[u]=c}s.filter={columns:a}}}_applyDimensions(e,t){if(e._dimensions){for(const[s,n]of e._columns){const o={...t.columns?.[s]};n._width===void 0?delete o.width:o.width=n._width,n._hidden===void 0?delete o.hidden:o.hidden=n._hidden,n._files===void 0?delete o.files:o.files=n._files,n._level===void 0?delete o.level:o.level=n._level;const r=j(t.columns??{},s);t.columns=m(o)?r:{...r,[s]:o}}for(const[s,n]of e._rows){const o={...t.rows?.[String(s)]};n._height===void 0?delete o.height:o.height=n._height,n._hidden===void 0?delete o.hidden:o.hidden=n._hidden,n._level===void 0?delete o.level:o.level=n._level;const r=j(t.rows??{},String(s));t.rows=m(o)?r:{...r,[String(s)]:o}}e._dimensions=!1}}_applyCells(e,t){const s=(t.tables??[]).flatMap(r=>{const a=y(r.at),f=e._tables.get(r.name),c=f?k(f.ref):void 0;return a&&c?[{entry:r,area:c}]:[]}),n=(t.blocks??[]).flatMap(r=>{const a=e._model?.blocks.find(f=>f.file===r.rows);return a?[{entry:r,area:a.area}]:[]}),o=[];for(const r of e._cells.values()){if(!r._changed&&!r._styled)continue;const a=r.row-1,f=r.column-1,c=s.find(i=>N(i.area,a,f)),u=n.find(i=>N(i.area,a,f));c?(r._changed&&this._writeTableCell(c.entry,c.area,r),r._styled&&this._styleByFormat(t,r)):u?(r._changed&&this._setCsvCell(u.entry.rows,a-u.area.top,f-u.area.left,v(r)),r._styled&&this._styleByFormat(t,r)):r._fresh&&!e._model?.keys.has(a*16384+f)?o.push(r):this._writeLoose(e,t,r),r._changed=!1,r._styled=!1}this._consolidate(e,t,o),je(t)}_styleByFormat(e,t){(e.format??=[]).push({range:t.coordinate,...this._ownLook(t)})}_ownLook(e){const t=e._ws._model?.lookAt(e.row-1,e.column-1)??{},s=Fe(t,e._look);return s.format!==void 0&&e._formula===void 0&&M(v(e)).format===s.format&&delete s.format,s}_writeLoose(e,t,s){const n=s.coordinate,o=t.cells??={},r=U(s),a=this._ownLook(s),f=o[n],u={...f!==null&&typeof f=="object"?Object.fromEntries(Object.entries(f).filter(([_])=>_!=="value"&&_!=="formula"&&_!=="name")):{},...a},i=f!==null&&typeof f=="object"&&f.name!==void 0?{name:f.name}:{},h=e._model?.at(s.row-1,s.column-1)!==void 0;if(r===null&&m(u)&&!h){t.cells=j(o,n);return}o[n]=m(u)&&m(i)?r:{...typeof r=="string"&&r.startsWith("=")?{formula:r}:r===null?{}:{value:r},...i,...u}}_consolidate(e,t,s){const n=s.filter(i=>i._value!==null||i._formula!==void 0),o=new Map;for(const i of s){const h=this._ownLook(i);if(m(h))continue;const _=JSON.stringify(h),d=o.get(_);d?d.push(i):o.set(_,[i])}const r=new Map(n.map(i=>[`${String(i.row)}:${String(i.column)}`,i])),a=i=>r.get(`${String(i.row+1)}:${String(i.col+1)}`)??e.cell(i.row+1,i.col+1),f=new Map,c=[];for(const i of n){const h={row:i.row-1,col:i.column-1},_=i._formula===void 0?void 0:R(i);if(_===void 0){c.push(h);continue}const d=f.get(_);d?d.push(h):f.set(_,[h])}const u=t.cells??={};for(const i of f.values())for(const h of T(i))u[x(h)]=a({row:h.top,col:h.left})._formula??null;for(const i of T(c))if((i.bottom-i.top+1)*(i.right-i.left+1)>=this.block_cells){const _=[];for(let p=i.top;p<=i.bottom;p++){const D=[];for(let O=i.left;O<=i.right;O++)D.push(v(a({row:p,col:O})));_.push(D)}const d=this._dataPath(e._title);this._csv.set(d,{parsed:void 0,rows:_}),(t.blocks??=[]).push({at:C({row:i.top,col:i.left}),rows:d})}else for(let _=i.top;_<=i.bottom;_++)for(let d=i.left;d<=i.right;d++){const p=a({row:_,col:d});u[p.coordinate]=U(p)}for(const i of o.values()){const[h]=i;if(!h)continue;const _=this._ownLook(h),d=i.map(p=>({row:p.row-1,col:p.column-1}));for(const p of T(d))(t.format??=[]).push({range:x(p),..._})}}_build(){const e=new Map;for(const[t,s]of this._csv)e.set(t,s.parsed?re(s.parsed,s.rows):ee(s.rows));return{text:ue(this._text,this._file),files:e}}_rebase(e,t){const{workbook:s,problems:n}=I({text:e,read:o=>t.get(o)});if(!s)throw new Error(`The workbook is not one: ${n.map(o=>o.message).join("; ")}`);this._text=e,this._file=structuredClone(s.file),this._model=s;for(const[o,r]of t)this._keepCsv(o,r);this._calc=void 0,this._pending=!1;for(const o of this.worksheets){o._was=o._title;const r=s.sheet(o._title);r&&(o._model=r);for(const a of o._cells.values())a._fresh=r?.at(a.row-1,a.column-1)===void 0}this._names=new Map;for(const o of s.names.values())o.source.path?.[0]==="names"&&this._names.set(o.name,o.formula?o.formula.text:o.value??null)}_computed(){const e=[...this.defined_names.values()];if((this._pending||e.length!==this._names.size||e.some(t=>String(this._names.get(t.name)).replace(/^=/u,"")!==t.attr_text))&&this._apply(),!this._calc){const t=this._model;if(!t)throw new Error("The workbook has no sheets.");this._calc={calc:new Q(t).calculate(),model:t}}return this._calc}check(){this._apply();const{text:e,files:t}=this._build();return X({text:e,read:s=>t.get(s)}).problems}_generated(){if(this.worksheets.length===0)return this._applyNames(),{sheets:[],csv:{},...this._file.names?{names:this._file.names}:{}};this._apply();const e=structuredClone(this._file.sheets),t=n=>`${te}${n}`;for(const n of e){for(const o of n.tables??[])o.rows=t(o.rows);for(const o of n.blocks??[])o.rows=t(o.rows)}const s={};for(const[n,o]of this._build().files)s[t(n)]=o;return{sheets:e,csv:s,...this._file.names?{names:this._file.names}:{}}}save(e){if(this._making)throw new Error("sheet.ts makes sheets and saves nothing: what it adds to wb is what it makes.");const t=e??this.path;if(t===void 0)throw new TypeError("A new workbook is saved to a folder: wb.save('content/budget').");if(this.worksheets.length===0)throw new Error("A workbook has at least one sheet.");const{text:s,csv:n}=this._disk;this._apply();const o=new Set(this._file.sheets.flatMap(i=>[...(i.tables??[]).map(h=>h.rows),...(i.blocks??[]).map(h=>h.rows)])),r=[...this._csv.keys()].filter(i=>!o.has(i));for(const i of r)this._csv.delete(i);const{mkdirSync:a,rmSync:f,writeFileSync:c}=J(),u=process.getBuiltinModule("node:path");a(t,{recursive:!0}),(this._text!==s||e!==void 0)&&c($(t,P),this._text);for(const[i,h]of this._csv){const _=h.parsed?.source??"";if(e===void 0&&n.get(i)===_)continue;const d=$(t,i);a(u.dirname(d),{recursive:!0}),c(d,_)}if(e===void 0||t===this.path)for(const i of r)f($(t,i),{force:!0});this._disk={text:this._text,csv:new Map([...this._csv].map(([i,h])=>[i,h.parsed?.source??""]))},this.path=t}}function R(l){if(l._formula===void 0)return;const e=F(l._formula);if(e.ok)return ne(e.node,l.row-1,l.column-1)}function je(l){const e=l.format;if(!e||e.length<2)return;const t=[],s=new Map;for(const n of e){const{range:o,...r}=n,a=y(o);if(!a){t.push(n);continue}const f=JSON.stringify(r),c=s.get(f);c?c.places.push(a):s.set(f,{look:r,places:[a]})}for(const{look:n,places:o}of s.values())for(const r of T(o))t.push({range:x(r),...n});l.format=t}export function load_workbook(l,e={}){return Workbook.open(l,e)}export const get_column_letter=l=>L(l-1);export function column_index_from_string(l){const e=E(l);if(e===void 0)throw new TypeError(`${l} is not a column.`);return e+1}export function coordinate_to_tuple(l){const e=y(l);if(!e)throw new TypeError(`${l} is not a cell.`);return[e.row+1,e.col+1]}export function range_boundaries(l){const e=k(l);if(!e)throw new TypeError(`${l} is not a range.`);return[e.left+1,e.top+1,e.right+1,e.bottom+1]}
@@ -0,0 +1,68 @@
1
+ import type { SheetChart, SheetConditional, SheetFilterColumn, SheetSide, SheetValidation } from "@allyhub-next/formats";
2
+ import { type Area, type Place } from "./address.js";
3
+ import { Draft, type BookEdit, type EditBook } from "./edit.js";
4
+ import type { CellLook, Filter, Worksheet } from "./workbook.js";
5
+ /** Excel's Borders list. */
6
+ export declare const BORDER_PRESETS: readonly ["bottom", "top", "left", "right", "none", "all", "outside", "thickOutside", "bottomDouble", "thickBottom", "topBottom", "topThickBottom", "topDoubleBottom"];
7
+ export type BorderPreset = (typeof BORDER_PRESETS)[number];
8
+ type Sides = NonNullable<CellLook["border"]>;
9
+ /** Sides drawn on an area, in `format`: later entries win side by side. */
10
+ export declare function drawSides(d: Draft, sheet: Worksheet, area: Area, sides: Sides): void;
11
+ /** A preset of Excel's Borders list on an area. */
12
+ export declare function setBorders(book: EditBook, sheetName: string, area: Area, preset: BorderPreset, o?: {
13
+ style?: SheetSide["style"];
14
+ color?: string;
15
+ }): BookEdit;
16
+ /** What Format Cells' Border tab says of each side of a selection, and between its cells. */
17
+ export declare function setBorderSides(book: EditBook, sheetName: string, area: Area, sides: {
18
+ top?: SheetSide | null;
19
+ bottom?: SheetSide | null;
20
+ left?: SheetSide | null;
21
+ right?: SheetSide | null;
22
+ /** Between its rows. */
23
+ horizontal?: SheetSide | null;
24
+ /** Between its columns. */
25
+ vertical?: SheetSide | null;
26
+ }): BookEdit;
27
+ export type MergeHow = "center" | "across" | "cells";
28
+ /** Whether merging would take a value away: cells other than the first of each merge hold something. */
29
+ export declare function mergeLoses(sheet: Worksheet, area: Area, how: MergeHow): boolean;
30
+ /**
31
+ * Cells merged as Excel's Merge & Center, Merge Across and Merge Cells: the
32
+ * first value stays, in the first cell, and the others go. Tables hold no merges.
33
+ */
34
+ export declare function mergeCells(book: EditBook, sheetName: string, area: Area, how: MergeHow): BookEdit;
35
+ /** Every merge that touches an area taken out. */
36
+ export declare function unmergeCells(book: EditBook, sheetName: string, area: Area): BookEdit;
37
+ /** The panes frozen above and left of a cell; nothing unfreezes them. */
38
+ export declare function setFreeze(book: EditBook, sheetName: string, at: Place | undefined): BookEdit;
39
+ /** Rows or columns hidden, or shown again. */
40
+ export declare function setHidden(book: EditBook, sheetName: string, what: "rows" | "columns", from: number, to: number, hidden: boolean): BookEdit;
41
+ /** A sheet hidden or shown; at least one stays. */
42
+ export declare function setSheetHidden(book: EditBook, sheetName: string, hidden: boolean): BookEdit;
43
+ /** A sheet's tab given a colour, or none. */
44
+ export declare function setTabColor(book: EditBook, sheetName: string, color: string | undefined): BookEdit;
45
+ /** Cmd+Shift+L: a filter on the selection's region, or off. A table's buttons go and come. */
46
+ export declare function toggleFilter(book: EditBook, sheetName: string, area: Area): BookEdit;
47
+ /** What one column of a filter keeps; nothing clears it. */
48
+ export declare function setFilterColumn(book: EditBook, sheetName: string, filter: Filter, col: number, keep: SheetFilterColumn | undefined): BookEdit;
49
+ /** Every filter of a sheet shows all its rows again. */
50
+ export declare function clearFilters(book: EditBook, sheetName: string): BookEdit;
51
+ /** A rule added, first of all, as Excel puts a new one. */
52
+ export declare function addConditional(book: EditBook, sheetName: string, rule: SheetConditional): BookEdit;
53
+ /** Conditional formats cleared from an area, or from all the sheet. */
54
+ export declare function clearConditional(book: EditBook, sheetName: string, area: Area | undefined): BookEdit;
55
+ /** The data validation of an area: what was there goes, and `rule` holds. */
56
+ export declare function setValidation(book: EditBook, sheetName: string, area: Area, rule: Omit<SheetValidation, "range"> | undefined): BookEdit;
57
+ /** A sheet's whole grid, for what covers all of it. */
58
+ export declare const WHOLE_SHEET: Area;
59
+ /** A chart put on a sheet. */
60
+ export declare function addChart(book: EditBook, sheetName: string, chart: SheetChart): BookEdit;
61
+ /** A chart changed: what `patch` says, an undefined field taken away. */
62
+ export declare function setChart(book: EditBook, sheetName: string, index: number, patch: {
63
+ [K in keyof SheetChart]?: SheetChart[K] | undefined;
64
+ }): BookEdit;
65
+ /** A chart taken off its sheet. */
66
+ export declare function removeChart(book: EditBook, sheetName: string, index: number): BookEdit;
67
+ export {};
68
+ //# sourceMappingURL=arrange.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 S,MAX_ROWS as A,cellName as E,columnIndex as _,columnLetter as O,overlaps as k,rangeName as w,readArea as y,readAreas as v}from"./address.js";import{Draft as g,applyLook as x,blankEdit as M,refused as d,tidied as D,writeOne as B,inputOf as j}from"./edit.js";import{regionAround as R}from"./filter.js";export const BORDER_PRESETS=["bottom","top","left","right","none","all","outside","thickOutside","bottomDouble","thickBottom","topBottom","topThickBottom","topDoubleBottom"];const a=(o,s)=>Object.fromEntries(Object.entries(o).filter(([t])=>t!==s)),p={top:o=>({...o,bottom:o.top}),bottom:o=>({...o,top:o.bottom}),left:o=>({...o,right:o.left}),right:o=>({...o,left:o.right})};function L(o,s,t){const n=e=>({...t,style:e});switch(o){case"bottom":return[{area:p.bottom(s),sides:{bottom:t}}];case"top":return[{area:p.top(s),sides:{top:t}}];case"left":return[{area:p.left(s),sides:{left:t}}];case"right":return[{area:p.right(s),sides:{right:t}}];case"all":return[{area:s,sides:{left:t,right:t,top:t,bottom:t}}];case"outside":case"thickOutside":{const e=o==="outside"?t:n("thick");return[{area:p.top(s),sides:{top:e}},{area:p.bottom(s),sides:{bottom:e}},{area:p.left(s),sides:{left:e}},{area:p.right(s),sides:{right:e}}]}case"bottomDouble":return[{area:p.bottom(s),sides:{bottom:n("double")}}];case"thickBottom":return[{area:p.bottom(s),sides:{bottom:n("thick")}}];case"topBottom":return[{area:p.top(s),sides:{top:t}},{area:p.bottom(s),sides:{bottom:t}}];case"topThickBottom":return[{area:p.top(s),sides:{top:t}},{area:p.bottom(s),sides:{bottom:n("thick")}}];case"topDoubleBottom":return[{area:p.top(s),sides:{top:t}},{area:p.bottom(s),sides:{bottom:n("double")}}];case"none":return[]}}export function drawSides(o,s,t,n){const e=o.spec(s),r=w(t),i=e.format?.find(c=>c.range===r)?.border;x(o,s,t,{border:{...i,...n}})}export function setBorders(o,s,t,n,e={}){const r=o.workbook.sheet(s);if(!r)return d("no-sheet");const i=new g(o);if(n==="none")return x(i,r,t,{border:void 0}),i.finish();const c={style:e.style??"thin",...e.color===void 0?{}:{color:e.color}};for(const f of L(n,t,c))drawSides(i,r,f.area,f.sides);return i.finish()}export function setBorderSides(o,s,t,n){const e=o.workbook.sheet(s);if(!e)return d("no-sheet");const r=new g(o),i=b=>b??{style:"none"},{top:c,bottom:f,left:u,right:l,horizontal:h,vertical:m}=n;return c!==void 0&&drawSides(r,e,p.top(t),{top:i(c)}),f!==void 0&&drawSides(r,e,p.bottom(t),{bottom:i(f)}),u!==void 0&&drawSides(r,e,p.left(t),{left:i(u)}),l!==void 0&&drawSides(r,e,p.right(t),{right:i(l)}),h!==void 0&&t.bottom>t.top&&drawSides(r,e,{...t,bottom:t.bottom-1},{bottom:i(h)}),m!==void 0&&t.right>t.left&&drawSides(r,e,{...t,right:t.right-1},{right:i(m)}),r.finish()}export function mergeLoses(o,s,t){const n=Math.min(s.right,o.columnsUsed-1),e=Math.min(s.bottom,o.lastRow);for(let r=s.top;r<=e;r++){let i=!0;for(let c=s.left;c<=n;c++)if(o.at(r,c)!==void 0)if(i&&(t==="across"||r===s.top))i=!1;else return!0;if(t!=="across"&&!i&&r>=s.top){for(let c=r+1;c<=e;c++)for(let f=s.left;f<=n;f++)if(o.at(c,f)!==void 0)return!0;return!1}}return!1}export function mergeCells(o,s,t,n){const e=o.workbook.sheet(s);if(!e)return d("no-sheet");if(e.tables.some(l=>k(l.area,t)))return d("merge-table");const r=new g(o),i=r.spec(e),c=(i.merges??[]).filter(l=>{const h=y(l);return!h||!k(h,t)}),f=n==="across"?Array.from({length:t.bottom-t.top+1},(l,h)=>({...t,top:t.top+h,bottom:t.top+h})):[t],u=[];for(const l of f)l.top===l.bottom&&l.left===l.right||(u.push(w(l)),T(r,o,e,l));return u.length===0?M():(i.merges=[...c,...u],n==="center"&&x(r,e,t,{align:"center"}),r.edit.whole=!0,r.finish())}function T(o,s,t,n){let e="";const r=Math.min(n.right,t.columnsUsed-1),i=Math.min(n.bottom,t.lastRow);for(let c=n.top;c<=i;c++)for(let f=n.left;f<=r;f++)t.at(c,f)!==void 0&&(e===""&&(e=j(s,t,c,f)),(c!==n.top||f!==n.left)&&B(o,s,t,c,f,""));e!==j(s,t,n.top,n.left)&&B(o,s,t,n.top,n.left,e)}export function unmergeCells(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n),i=(r.merges??[]).filter(c=>{const f=y(c);return!f||!k(f,t)});return i.length===0?delete r.merges:r.merges=i,e.edit.whole=!0,e.finish()}export function setFreeze(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n);return t&&(t.row>0||t.col>0)?r.freeze=E(t):delete r.freeze,e.edit.whole=!0,e.finish()}export function setHidden(o,s,t,n,e,r){const i=o.workbook.sheet(s);if(!i)return d("no-sheet");const c=new g(o),f=c.spec(i),u=(l,h)=>{const m=a(l[h]??{},"hidden");return r?{...l,[h]:{...m,hidden:!0}}:Object.keys(m).length===0?a(l,h):{...l,[h]:m}};if(t==="columns"){let l={...f.columns};const h=r?Array.from({length:e-n+1},(m,b)=>O(n+b)):Object.keys(l).filter(m=>{const b=_(m);return b!==void 0&&b>=n&&b<=e});for(const m of h)l=u(l,m);f.columns=l}else{let l={...f.rows};const h=r?Array.from({length:e-n+1},(m,b)=>String(n+b+1)):Object.keys(l).filter(m=>{const b=Number(m)-1;return b>=n&&b<=e});for(const m of h)l=u(l,m);f.rows=l}return D(f),c.edit.whole=!0,c.finish()}export function setSheetHidden(o,s,t){const n=o.file.sheets,e=n.filter(u=>u.hidden!==!0),r=n.findIndex(u=>u.name===s),i=n[r];if(!i)return d("no-sheet");if(t&&e.length<=1)return d("last-sheet");const c=a(i,"hidden"),f=t?{...c,hidden:!0}:c;return{...M(),file:{...o.file,sheets:n.map((u,l)=>l===r?f:u)},whole:!0}}export function setTabColor(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n);return t===void 0?delete r.tab:r.tab=t,e.finish()}export function toggleFilter(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r={row:t.top,col:t.left},i=n.tableAt(r.row,r.col);if(i){const h=e.table(n,i);return h.filter===!1?delete h.filter:h.filter=!1,e.edit.whole=!0,e.finish()}const c=e.spec(n);if(c.filter)return delete c.filter,e.edit.whole=!0,e.finish();const u=t.top===t.bottom&&t.left===t.right?R(n,r):t;if(!u)return d("no-data");const l=n.used;return c.filter={range:w({...u,bottom:Math.min(u.bottom,l?.bottom??u.bottom),right:Math.min(u.right,l?.right??u.right)})},e.edit.whole=!0,e.finish()}export function setFilterColumn(o,s,t,n,e){const r=o.workbook.sheet(s);if(!r)return d("no-sheet");const i=new g(o),{table:c}=t;if(c){const f=i.table(r,c),u=c.columns[n-c.at.col]?.name??"",l=a(f.filter===!1||!f.filter?{}:f.filter.columns,u),h=e?{...l,[u]:e}:l;Object.keys(h).length===0?delete f.filter:f.filter={columns:h}}else{const f=i.spec(r);if(!f.filter)return d("no-sheet");const u=O(n),l=a(f.filter.columns??{},u),h=e?{...l,[u]:e}:l;f.filter={range:f.filter.range,...Object.keys(h).length===0?{}:{columns:h}}}return i.edit.whole=!0,i.finish()}export function clearFilters(o,s){const t=o.workbook.sheet(s);if(!t)return d("no-sheet");const n=new g(o),e=n.spec(t);e.filter&&(e.filter={range:e.filter.range});for(const r of t.tables)r.spec.filter&&delete n.table(t,r).filter;return n.edit.whole=!0,n.finish()}export function addConditional(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n);return r.conditional=[t,...r.conditional??[]],e.edit.whole=!0,e.finish()}function z(o,s){if(!k(o,s))return[o];const t=[];s.top>o.top&&t.push({...o,bottom:s.top-1}),s.bottom<o.bottom&&t.push({...o,top:s.bottom+1});const n=Math.max(o.top,s.top),e=Math.min(o.bottom,s.bottom);return s.left>o.left&&t.push({...o,top:n,bottom:e,right:s.left-1}),s.right<o.right&&t.push({...o,top:n,bottom:e,left:s.right+1}),t}function C(o,s){const t=v(o);if(!t)return o;const n=t.flatMap(e=>z(e,s));return n.length===0?void 0:n.map(w).join(" ")}export function clearConditional(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n),i=t?(r.conditional??[]).flatMap(c=>{const f=C(c.range,t);return f===void 0?[]:[{...c,range:f}]}):[];return i.length===0?delete r.conditional:r.conditional=i,e.edit.whole=!0,e.finish()}export function setValidation(o,s,t,n){const e=o.workbook.sheet(s);if(!e)return d("no-sheet");const r=new g(o),i=r.spec(e),c=(i.validations??[]).flatMap(u=>{const l=C(u.range,t);return l===void 0?[]:[{...u,range:l}]}),f=n?[...c,{...n,range:w(t)}]:c;return f.length===0?delete i.validations:i.validations=f,r.edit.whole=!0,r.finish()}export const WHOLE_SHEET={top:0,left:0,bottom:A-1,right:S-1};export function addChart(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n);return r.charts=[...r.charts??[],t],e.finish()}export function setChart(o,s,t,n){const e=o.workbook.sheet(s),r=e?.spec.charts?.[t];if(!e||!r)return d("no-sheet");const i=new g(o),c=i.spec(e),f=Object.fromEntries(Object.entries({...r,...n}).filter(([,u])=>u!==void 0));return c.charts=(c.charts??[]).map((u,l)=>l===t?f:u),i.finish()}export function removeChart(o,s,t){const n=o.workbook.sheet(s);if(!n)return d("no-sheet");const e=new g(o),r=e.spec(n),i=(r.charts??[]).filter((c,f)=>f!==t);return i.length>0?r.charts=i:delete r.charts,e.finish()}
@@ -0,0 +1,21 @@
1
+ import type { RefNode, StructuredNode } from "../formula/ast.js";
2
+ import type { SharedFormula, Workbook } from "../workbook.js";
3
+ export interface Analysis {
4
+ reads: (RefNode | StructuredNode)[];
5
+ /** Defined names, in lower case. */
6
+ names: Set<string>;
7
+ volatile: boolean;
8
+ /** Names that are nothing here. */
9
+ unknownNames: string[];
10
+ /** Functions that are nothing here. */
11
+ unknownFunctions: string[];
12
+ /** Functions given too few or too many arguments. */
13
+ arguments: {
14
+ name: string;
15
+ given: number;
16
+ min: number;
17
+ max: number;
18
+ }[];
19
+ }
20
+ export declare function analyse(wb: Workbook, shared: SharedFormula): Analysis;
21
+ //# sourceMappingURL=analyse.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{FUNCTIONS as g}from"./functions/index.js";export function analyse(o,f){const s={reads:[],names:new Set,volatile:!1,unknownNames:[],unknownFunctions:[],arguments:[]},m=new Set,c=(e,t)=>{const n=e.toLowerCase();if(t.has(n))return!0;const a=o.name(n);if(a)return s.names.add(n),m.has(n)||(m.add(n),a.formula?.node&&r(a.formula.node,new Set)),!0;const u=o.table(n);return u?(s.reads.push({kind:"structured",table:u.name,sections:[],columns:[],thisRow:!1}),!0):!1},r=(e,t)=>{switch(e.kind){case"ref":case"structured":s.reads.push(e);return;case"name":c(e.name,t)||s.unknownNames.push(e.name);return;case"unary":case"postfix":case"paren":r(e.arg,t);return;case"binary":r(e.left,t),r(e.right,t);return;case"array":return;case"invoke":r(e.callee,t);for(const n of e.args)r(n,t);return;case"call":{const n=g.get(e.name);if(e.name==="LET"||e.name==="LAMBDA"){const a=new Set(t),u=e.args[e.args.length-1];e.args.forEach((i,d)=>{if(i!==u){if(e.name==="LET"&&d%2===1){r(i,a);return}i.kind==="name"&&a.add(i.name.toLowerCase())}}),u&&r(u,a);return}n?(n.volatile===!0&&(s.volatile=!0),(e.args.length<n.min||e.args.length>n.max)&&s.arguments.push({name:e.name,given:e.args.length,min:n.min,max:n.max})):c(e.written,t)||s.unknownFunctions.push(e.name);for(const a of e.args)r(a,t);return}default:return}};return f.node&&r(f.node,new Set),s}
@@ -0,0 +1,19 @@
1
+ import { CellError, Matrix, type Scalar } from "../values.js";
2
+ /** The number text reads as: VALUE's rules, dates and times included. */
3
+ export declare function numberOfText(text: string): number | undefined;
4
+ export declare function toNumber(v: Scalar | undefined): number | CellError;
5
+ export declare function toText(v: Scalar | undefined): string | CellError;
6
+ export declare function toBool(v: Scalar | undefined): boolean | CellError;
7
+ /** Equal to 15 significant digits, as Excel compares numbers. */
8
+ export declare const sameNumber: (a: number, b: number) => boolean;
9
+ /** Excel's order of two values that are not errors: numbers, then text, then TRUE and FALSE. */
10
+ export declare function compare(a: Scalar, b: Scalar): number;
11
+ /** A result that is not a finite number is an error. */
12
+ export declare const finite: (n: number) => number | CellError;
13
+ /** Result rounding after an addition, as Excel does it: what is left of a cancelled sum is 0. */
14
+ export declare function snap(result: number, a: number, b: number): number;
15
+ export declare function arithmetic(op: string, a: Scalar, b: Scalar): Scalar;
16
+ export declare function binary(op: string, a: Scalar, b: Scalar): Scalar;
17
+ /** Two shapes as one array's: 1 stretches, and past a shorter side is #N/A. */
18
+ export declare function mapBoth(a: Matrix, b: Matrix, each: (x: Scalar, y: Scalar) => Scalar): Matrix;
19
+ //# sourceMappingURL=coerce.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{parseValue as d}from"numfmt";import{CellError as f,ERR as s,Matrix as x,numberText as h,readTyped as b}from"../values.js";export function numberOfText(e){const r=b(e.trim());if(typeof r.value=="number")return r.value;if(e.trim()==="")return;const t=d(e);return typeof t?.value=="number"?t.value:void 0}export function toNumber(e){return typeof e=="number"?e:e==null?0:typeof e=="boolean"?e?1:0:e instanceof f?e:numberOfText(e)??s.VALUE}export function toText(e){return typeof e=="string"?e:e==null?"":typeof e=="number"?h(e):typeof e=="boolean"?e?"TRUE":"FALSE":e}export function toBool(e){if(typeof e=="boolean")return e;if(e==null)return!1;if(typeof e=="number")return e!==0;if(e instanceof f)return e;const r=e.trim().toUpperCase();return r==="TRUE"?!0:r==="FALSE"?!1:s.VALUE}const m=e=>typeof e=="number"?0:typeof e=="string"?1:2;export const sameNumber=(e,r)=>e===r||Number(e.toPrecision(15))===Number(r.toPrecision(15));export function compare(e,r){const t=e??(typeof r=="string"?"":typeof r=="boolean"?!1:0),n=r??(typeof e=="string"?"":typeof e=="boolean"?!1:0),o=m(t),c=m(n);if(o!==c)return o<c?-1:1;if(typeof t=="number"&&typeof n=="number")return sameNumber(t,n)?0:t<n?-1:1;if(typeof t=="string"&&typeof n=="string"){const a=t.toUpperCase(),u=n.toUpperCase();return a===u?0:a<u?-1:1}return t===n?0:t===!1?-1:1}export const finite=e=>Number.isFinite(e)?e:s.NUM;export function snap(e,r,t){return Math.abs(e)<=Math.max(Math.abs(r),Math.abs(t))*89e-17?0:e}export function arithmetic(e,r,t){const n=toNumber(r);if(n instanceof f)return n;const o=toNumber(t);if(o instanceof f)return o;switch(e){case"+":return finite(snap(n+o,n,o));case"-":return finite(snap(n-o,n,o));case"*":return finite(n*o);case"/":return o===0?s.DIV0:finite(n/o);default:return n===0&&o===0?s.NUM:n===0&&o<0?s.DIV0:finite(n**o)}}export function binary(e,r,t){if(r instanceof f)return r;if(t instanceof f)return t;switch(e){case"&":{const n=toText(r);if(n instanceof f)return n;const o=toText(t);return o instanceof f?o:`${n}${o}`}case"=":return compare(r,t)===0;case"<>":return compare(r,t)!==0;case"<":return compare(r,t)<0;case"<=":return compare(r,t)<=0;case">":return compare(r,t)>0;case">=":return compare(r,t)>=0;default:return arithmetic(e,r,t)}}export function mapBoth(e,r,t){const n=Math.max(e.rows,r.rows),o=Math.max(e.cols,r.cols),c=new Array(n*o),a=(u,i,l)=>{const p=u.rows===1?0:i,y=u.cols===1?0:l;return p<u.rows&&y<u.cols?u.at(p,y):void 0};for(let u=0;u<n;u++)for(let i=0;i<o;i++){const l=a(e,u,i),p=a(r,u,i);c[u*o+i]=l===void 0||p===void 0?s.NA:t(l,p)}return new x(n,o,c)}