@sheetxl/sdk 0.8.0-beta.10 → 0.8.0-beta.12

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 (522) hide show
  1. package/README.md +1 -1
  2. package/browser/esm/{CYyv6uGjo10ig5FP.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
  3. package/browser/esm/{CdLZWVcH8cncBUPJ.mjs → 2WuhYrIpYmOR5H73.mjs} +110 -261
  4. package/browser/esm/{Cqr3knDsBvoVZ6MN.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
  5. package/browser/esm/B3wf5vZCsWfWsDbj.mjs +12 -0
  6. package/browser/esm/{BzLfNyc6OOShIErH.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
  7. package/browser/esm/{C9B0djuUarfNdoj0.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
  8. package/browser/esm/{Btg43M1Bf-ENDreu.mjs → BdCJNawfifyPupCP.mjs} +1 -1
  9. package/browser/esm/{ClB5ix51roQOpZEr.mjs → Bg5Di9GLNAkbqQ1P.mjs} +2877 -2067
  10. package/browser/esm/BnC4-27Igwb8oDf2.mjs +1552 -0
  11. package/browser/esm/{DhKkrCVASZ6Isvz6.mjs → Bt8_m94tBdks209L.mjs} +1 -1
  12. package/browser/esm/{zqJOaweiXE9D8RY1.mjs → BudSIfXBAsTxvu-K.mjs} +31835 -40812
  13. package/browser/esm/C9u8FUewte5ugUjH.mjs +5132 -0
  14. package/browser/esm/{Di58Ji1n--3Mgc_2.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
  15. package/browser/esm/CNdjyofiRu6CYOrr.mjs +12835 -0
  16. package/browser/esm/{Dtoyt8q5RyGAlxCp.mjs → CRkYR-siY2C994KV.mjs} +1 -1
  17. package/browser/esm/CTe2qfmIUEad6FJv.mjs +199 -0
  18. package/browser/esm/CUzYuYTTGsChC_kZ.mjs +8422 -0
  19. package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
  20. package/browser/esm/CfRqiPDg6RBTg1EN.mjs +367 -0
  21. package/browser/esm/CndRBvVfQUJIYRRj.mjs +193 -0
  22. package/browser/esm/{Y79I7Sm8kjaYexhf.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
  23. package/browser/esm/{CjsUGJEQSbGjnH6R.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
  24. package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
  25. package/browser/esm/{De175LygU7ot4nQm.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
  26. package/browser/esm/{o8MFgcVXns987D6_.mjs → D9xNz46kAfXMZzp4.mjs} +6 -6
  27. package/browser/esm/{BcHmrKHwMMOlzc9_.mjs → DK899HhWX1HINMC1.mjs} +55 -55
  28. package/browser/esm/DPhGQLNGmDZwODwJ.mjs +395 -0
  29. package/browser/esm/DVroRnhi-5IDXNgM.mjs +210 -0
  30. package/browser/esm/{Bk7xxbdDpa7-sIwd.mjs → DZiivy0NmO1Vnyzk.mjs} +2 -2
  31. package/browser/esm/{CZ5oa92wZEAXebgk.mjs → DgrAuRD2qr2DvFeJ.mjs} +78 -68
  32. package/browser/esm/{D4uVlrG0xEFctsSM.mjs → DobHLF6VjHr7Xi40.mjs} +285 -67
  33. package/browser/esm/{CSx9ed1JOs7K5BXO.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
  34. package/browser/esm/DwwR3O2sEZApPSTF.mjs +86 -0
  35. package/browser/esm/Tah7cnFb_HNZdLtj.mjs +128 -0
  36. package/browser/esm/{BEAY9XgKNx-bakXW.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
  37. package/browser/esm/{BqskM7wA8oPfFQue.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
  38. package/browser/esm/index.mjs +1294 -1008
  39. package/browser/esm/{Cgd5BnM3hg9RyUel.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
  40. package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
  41. package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
  42. package/licenses/dependencies.txt +75 -75
  43. package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
  44. package/node/esm/B-HUPAcqvK0eeeCz.mjs +134 -0
  45. package/node/esm/BL2iiEoqxDEV2Xrg.mjs +8320 -0
  46. package/node/esm/{C6ZXsNyLXI6zA63X.mjs → BNXLOEddJ6O9gYws.mjs} +9 -9
  47. package/node/esm/{BH1v-E4Ro3bR7Znw.mjs → BSvOluusoDM4z_dx.mjs} +151 -302
  48. package/node/esm/{CD9wbvufChVYYkrI.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
  49. package/node/esm/{CnSQ7MTXAUAyBOoS.mjs → Btw4148Ot8ifhNc1.mjs} +285 -64
  50. package/node/esm/{B6D7sSetrcOWLsKj.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
  51. package/node/esm/C99zzq8DImQXi4BQ.mjs +133 -0
  52. package/node/esm/{BtuY37FumvLE7EBo.mjs → CBuEu5Jk-LfaDy-H.mjs} +176 -166
  53. package/node/esm/{DdFgXl-Ux2cMBTs_.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
  54. package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
  55. package/node/esm/CRt3vXe6YmXzqk3H.mjs +406 -0
  56. package/node/esm/{CUUoseJmFsCf82bb.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
  57. package/node/esm/{D7MfcID2Wf6l6VpC.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
  58. package/node/esm/CiIymQN6aJCul62g.mjs +610 -0
  59. package/node/esm/{B9ljpEIZg6wOTzRE.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
  60. package/node/esm/{Bqd62L8KFgdS0Vou.mjs → CkRYLed8Mmn3giNg.mjs} +2 -2
  61. package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
  62. package/node/esm/{DefYISWfdZJFx57m.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
  63. package/node/esm/D8hO07ToAibIuniw.mjs +13014 -0
  64. package/node/esm/{Bh4dv6tMjXX3X4nI.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
  65. package/node/esm/{DCplLG93GfTs1vNw.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
  66. package/node/esm/{CUQi5ZtMO02nhG0W.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
  67. package/node/esm/DggQ23jKMpwhENfa.mjs +372 -0
  68. package/node/esm/DhS6yWjrrSNIJMsn.mjs +1033 -0
  69. package/node/esm/{DMD12JUh7HJw2-jl.mjs → DhTya_mhmN53vskv.mjs} +1 -1
  70. package/node/esm/Dn1M7YWi25DeeYUb.mjs +210 -0
  71. package/node/esm/DrCf6ITcBhVOFpRj.mjs +86 -0
  72. package/node/esm/{BN9j8V9gCExMjVtJ.mjs → DxazKtROyaI51dWl.mjs} +1 -1
  73. package/node/esm/{MiU4rDOiocmJ-9Ry.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
  74. package/node/esm/Vocy-I9dKzZMr0Ct.mjs +59323 -0
  75. package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
  76. package/node/esm/eimUGjiIP-b8HiM6.mjs +199 -0
  77. package/node/esm/icn2nX5Z8e_3mNAv.mjs +12 -0
  78. package/node/esm/index.mjs +2808 -65678
  79. package/node/esm/lGJ42sHqg5if2bba.mjs +1770 -0
  80. package/node/esm/{Bsx9uijd4X_SKV3L.mjs → pYtP7wPyS96NQyXS.mjs} +51 -51
  81. package/package.json +6 -7
  82. package/resources/contents.json +120 -0
  83. package/resources/fonts/arial-bold-italic.hinted.json +125 -0
  84. package/resources/fonts/arial-bold-italic.metrics.json +13 -13
  85. package/resources/fonts/arial-bold-italic.rows.json +9 -0
  86. package/resources/fonts/arial-bold.hinted.json +125 -0
  87. package/resources/fonts/arial-bold.metrics.json +12 -12
  88. package/resources/fonts/arial-bold.rows.json +9 -0
  89. package/resources/fonts/arial-italic.hinted.json +125 -0
  90. package/resources/fonts/arial-italic.metrics.json +13 -13
  91. package/resources/fonts/arial-italic.rows.json +9 -0
  92. package/resources/fonts/arial-regular.hinted.json +125 -0
  93. package/resources/fonts/arial-regular.metrics.json +12 -12
  94. package/resources/fonts/arial-regular.rows.json +9 -0
  95. package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
  96. package/resources/fonts/calibri-bold-italic.metrics.json +2 -2
  97. package/resources/fonts/calibri-bold-italic.rows.json +9 -0
  98. package/resources/fonts/calibri-bold.hinted.json +122 -0
  99. package/resources/fonts/calibri-bold.metrics.json +1 -1
  100. package/resources/fonts/calibri-bold.rows.json +9 -0
  101. package/resources/fonts/calibri-italic.hinted.json +121 -0
  102. package/resources/fonts/calibri-italic.metrics.json +2 -2
  103. package/resources/fonts/calibri-italic.rows.json +9 -0
  104. package/resources/fonts/calibri-regular.hinted.json +121 -0
  105. package/resources/fonts/calibri-regular.metrics.json +1 -1
  106. package/resources/fonts/calibri-regular.rows.json +9 -0
  107. package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
  108. package/resources/fonts/cambria-bold-italic.metrics.json +26 -26
  109. package/resources/fonts/cambria-bold-italic.rows.json +9 -0
  110. package/resources/fonts/cambria-bold.hinted.json +108 -0
  111. package/resources/fonts/cambria-bold.metrics.json +19 -19
  112. package/resources/fonts/cambria-bold.rows.json +9 -0
  113. package/resources/fonts/cambria-italic.hinted.json +102 -0
  114. package/resources/fonts/cambria-italic.metrics.json +23 -23
  115. package/resources/fonts/cambria-italic.rows.json +9 -0
  116. package/resources/fonts/cambria-regular.hinted.json +110 -0
  117. package/resources/fonts/cambria-regular.metrics.json +18 -18
  118. package/resources/fonts/cambria-regular.rows.json +9 -0
  119. package/resources/fonts/contents.json +280 -0
  120. package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
  121. package/resources/fonts/courier-new-bold-italic.metrics.json +12 -12
  122. package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
  123. package/resources/fonts/courier-new-bold.hinted.json +11 -0
  124. package/resources/fonts/courier-new-bold.metrics.json +12 -12
  125. package/resources/fonts/courier-new-bold.rows.json +9 -0
  126. package/resources/fonts/courier-new-italic.hinted.json +11 -0
  127. package/resources/fonts/courier-new-italic.metrics.json +12 -12
  128. package/resources/fonts/courier-new-italic.rows.json +9 -0
  129. package/resources/fonts/courier-new-regular.hinted.json +11 -0
  130. package/resources/fonts/courier-new-regular.metrics.json +12 -12
  131. package/resources/fonts/courier-new-regular.rows.json +9 -0
  132. package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
  133. package/resources/fonts/times-new-roman-bold-italic.metrics.json +15 -15
  134. package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
  135. package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
  136. package/resources/fonts/times-new-roman-bold.metrics.json +12 -12
  137. package/resources/fonts/times-new-roman-bold.rows.json +9 -0
  138. package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
  139. package/resources/fonts/times-new-roman-italic.metrics.json +16 -16
  140. package/resources/fonts/times-new-roman-italic.rows.json +9 -0
  141. package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
  142. package/resources/fonts/times-new-roman-regular.metrics.json +16 -16
  143. package/resources/fonts/times-new-roman-regular.rows.json +9 -0
  144. package/resources/locales/de/model.msg.json +93 -9
  145. package/resources/locales/en/model.msg.json +95 -10
  146. package/types/scripting-api.json +10809 -8021
  147. package/types/scripting-enums.json +201 -44
  148. package/types/scripting.d.ts +17030 -8666
  149. package/types/src/.generated/wasm/fonts.d.ts +161 -0
  150. package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
  151. package/types/src/.generated/wasm/sdk.d.ts +122 -0
  152. package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
  153. package/types/src/address/AddressUtils.d.ts +10 -1
  154. package/types/src/address/_StructuredAddress.d.ts +58 -0
  155. package/types/src/anomalies/_Anomalies.d.ts +109 -0
  156. package/types/src/anomalies/_FocusTable.d.ts +11 -0
  157. package/types/src/anomalies/_FormulaChecks.d.ts +133 -0
  158. package/types/src/anomalies/_LabelChecks.d.ts +21 -0
  159. package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
  160. package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
  161. package/types/src/border/IBorders.d.ts +16 -0
  162. package/types/src/calculation/Calculation.d.ts +139 -371
  163. package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
  164. package/types/src/calculation/FormulaLiterals.d.ts +2 -1
  165. package/types/src/calculation/FormulaText.d.ts +18 -2
  166. package/types/src/calculation/ICalculation.d.ts +133 -18
  167. package/types/src/calculation/INamedFormulasCollection.d.ts +4 -0
  168. package/types/src/calculation/NamedFormulaCollection.d.ts +293 -22
  169. package/types/src/calculation/_CloneBoundary.d.ts +1 -1
  170. package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
  171. package/types/src/calculation/_TableExtent.d.ts +60 -0
  172. package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
  173. package/types/src/calculation/compiler/CompilerUtils.d.ts +17 -0
  174. package/types/src/calculation/compiler/ParserUtils.d.ts +16 -0
  175. package/types/src/calculation/compiler/Types.d.ts +9 -1
  176. package/types/src/calculation/engine/CalcBackend.d.ts +953 -0
  177. package/types/src/calculation/engine/index.d.ts +10 -0
  178. package/types/src/calculation/executor/CalcExecutor.d.ts +94 -24
  179. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +23 -1
  180. package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
  181. package/types/src/calculation/formula/Formula.d.ts +9 -0
  182. package/types/src/calculation/formula/FormulaBlock.d.ts +10 -3
  183. package/types/src/calculation/formula/IFormulaBlock.d.ts +21 -0
  184. package/types/src/calculation/formula/LambdaValue.d.ts +5 -3
  185. package/types/src/calculation/functions/FunctionDeclarations.d.ts +5 -1
  186. package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
  187. package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
  188. package/types/src/calculation/functions/initializeFunctions.d.ts +0 -12
  189. package/types/src/calculation/grid/CalcGrid.d.ts +44 -10
  190. package/types/src/calculation/grid/CalcGridBackend.d.ts +35 -27
  191. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -2
  192. package/types/src/calculation/grid/CalcGridUtils.d.ts +12 -3
  193. package/types/src/calculation/grid/FormulaHost.d.ts +51 -6
  194. package/types/src/calculation/grid/ICalcGrid.d.ts +48 -15
  195. package/types/src/calculation/grid/_CalcRequest.d.ts +28 -6
  196. package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
  197. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +29 -2
  198. package/types/src/calculation/spatial/SpillEntry.d.ts +16 -2
  199. package/types/src/calculation/state/CalcNode.d.ts +0 -1
  200. package/types/src/calculation/state/CalcScope.d.ts +44 -6
  201. package/types/src/calculation/state/CalcState.d.ts +36 -4
  202. package/types/src/calculation/state/CalculationContext.d.ts +30 -3
  203. package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
  204. package/types/src/calculation/state/IContextContainer.d.ts +32 -0
  205. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
  206. package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -0
  207. package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
  208. package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
  209. package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
  210. package/types/src/calculation/toolkit/index.d.ts +12 -0
  211. package/types/src/cell/ICell.d.ts +302 -34
  212. package/types/src/cell/ICellHeader.d.ts +7 -6
  213. package/types/src/cell/ICellProtection.d.ts +1 -1
  214. package/types/src/cellControl/CellControl.d.ts +67 -0
  215. package/types/src/cellControl/CellControlCollection.d.ts +29 -0
  216. package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
  217. package/types/src/cellControl/ICellControl.d.ts +99 -0
  218. package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
  219. package/types/src/cellControl/index.d.ts +4 -0
  220. package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
  221. package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
  222. package/types/src/cellRange/ICellRange.d.ts +525 -110
  223. package/types/src/cellRange/ICellRanges.d.ts +12 -6
  224. package/types/src/chart/Chart.d.ts +217 -15
  225. package/types/src/chart/ChartCollection.d.ts +7 -2
  226. package/types/src/chart/IChart.d.ts +1921 -35
  227. package/types/src/chart/IChartCollection.d.ts +27 -2
  228. package/types/src/chart/_ChartParts.d.ts +1066 -0
  229. package/types/src/chart/_ChartSource.d.ts +47 -0
  230. package/types/src/chart/createChart.d.ts +26 -0
  231. package/types/src/chart/index.d.ts +4 -0
  232. package/types/src/chart/kinds/ChartKind.d.ts +252 -0
  233. package/types/src/chart/kinds/_Area.d.ts +3 -0
  234. package/types/src/chart/kinds/_Bar.d.ts +4 -0
  235. package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
  236. package/types/src/chart/kinds/_Bubble.d.ts +3 -0
  237. package/types/src/chart/kinds/_Funnel.d.ts +4 -0
  238. package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
  239. package/types/src/chart/kinds/_Histogram.d.ts +4 -0
  240. package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
  241. package/types/src/chart/kinds/_Line.d.ts +4 -0
  242. package/types/src/chart/kinds/_OfPie.d.ts +4 -0
  243. package/types/src/chart/kinds/_Pie.d.ts +4 -0
  244. package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
  245. package/types/src/chart/kinds/_Radar.d.ts +4 -0
  246. package/types/src/chart/kinds/_Scatter.d.ts +8 -0
  247. package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
  248. package/types/src/chart/kinds/_Surface.d.ts +4 -0
  249. package/types/src/chart/kinds/_Treemap.d.ts +4 -0
  250. package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
  251. package/types/src/chart/kinds/_builtIns.d.ts +11 -0
  252. package/types/src/chart/layout/ChartLayout.d.ts +829 -0
  253. package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
  254. package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
  255. package/types/src/chart/layout/_HitTest.d.ts +36 -0
  256. package/types/src/chart/layout/_Layout.d.ts +25 -0
  257. package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
  258. package/types/src/chart/math/BoxStats.d.ts +35 -0
  259. package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
  260. package/types/src/chart/math/DisplayUnits.d.ts +53 -0
  261. package/types/src/chart/math/Histogram.d.ts +48 -0
  262. package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
  263. package/types/src/chart/math/Treemap.d.ts +28 -0
  264. package/types/src/chart/math/Trendlines.d.ts +71 -0
  265. package/types/src/chart/math/UnitCalcs.d.ts +98 -0
  266. package/types/src/chart/model/ChartModel.d.ts +681 -0
  267. package/types/src/chart/model/_ChartType.d.ts +14 -0
  268. package/types/src/chart/model/_Edits.d.ts +489 -0
  269. package/types/src/chart/model/_Grouping.d.ts +83 -0
  270. package/types/src/chart/model/_Inference.d.ts +52 -0
  271. package/types/src/chart/model/_ModelFacts.d.ts +112 -0
  272. package/types/src/chart/model/_NewChart.d.ts +208 -0
  273. package/types/src/chart/model/_OfPie.d.ts +18 -0
  274. package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
  275. package/types/src/chart/resolve/_Resolve.d.ts +61 -0
  276. package/types/src/chart/resolve/_ResolvedChart.d.ts +447 -0
  277. package/types/src/collections/ISparseGrid.d.ts +11 -2
  278. package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
  279. package/types/src/collections/RTree.d.ts +116 -36
  280. package/types/src/collections/SparseGrid.d.ts +9 -11
  281. package/types/src/collections/SpatialMap.d.ts +2 -8
  282. package/types/src/collections/SpatialMap3D.d.ts +2 -0
  283. package/types/src/collections/index.d.ts +1 -1
  284. package/types/src/comment/Comment.d.ts +32 -9
  285. package/types/src/comment/IComment.d.ts +41 -4
  286. package/types/src/comment/_NoteBox.d.ts +19 -2
  287. package/types/src/condition/AnchoredConditional.d.ts +30 -4
  288. package/types/src/condition/ICondition.d.ts +3 -2
  289. package/types/src/conditionalFormat/ConditionalFormat.d.ts +9 -3
  290. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  291. package/types/src/dataValidation/DataValidation.d.ts +1 -1
  292. package/types/src/dataValidation/DataValidationCollection.d.ts +4 -1
  293. package/types/src/dataValidation/IDataValidation.d.ts +1 -1
  294. package/types/src/dataValidation/IDataValidationCollection.d.ts +24 -0
  295. package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
  296. package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
  297. package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
  298. package/types/src/documentProperties/index.d.ts +3 -0
  299. package/types/src/externalBook/IExternalBook.d.ts +3 -4
  300. package/types/src/fetch/Fetcher.d.ts +15 -0
  301. package/types/src/fetch/IFetcher.d.ts +47 -0
  302. package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
  303. package/types/src/fetch/index.d.ts +3 -0
  304. package/types/src/fill/IFill.d.ts +7 -0
  305. package/types/src/fill/IFillable.d.ts +47 -0
  306. package/types/src/fill/IStroke.d.ts +15 -1
  307. package/types/src/fill/PaintUtils.d.ts +24 -0
  308. package/types/src/fill/index.d.ts +2 -0
  309. package/types/src/font/AdvanceBuilder.d.ts +34 -0
  310. package/types/src/font/AdvanceTable.d.ts +128 -14
  311. package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
  312. package/types/src/font/FontCapture.d.ts +4 -0
  313. package/types/src/font/FontCollection.d.ts +53 -2
  314. package/types/src/font/FontPlatform.d.ts +20 -0
  315. package/types/src/font/FontUtils.d.ts +5 -0
  316. package/types/src/font/IFont.d.ts +191 -61
  317. package/types/src/font/IFontCollection.d.ts +20 -14
  318. package/types/src/font/IFontStyle.d.ts +207 -0
  319. package/types/src/font/TableFileAdvanceBuilder.d.ts +9 -0
  320. package/types/src/font/_FontUtils.d.ts +11 -4
  321. package/types/src/font/_FontsVersion.d.ts +7 -0
  322. package/types/src/font/index.d.ts +1 -3
  323. package/types/src/font/platform.browser.d.ts +15 -0
  324. package/types/src/font/platform.node.d.ts +5 -0
  325. package/types/src/group/Group.d.ts +5 -0
  326. package/types/src/group/GroupMovableCollection.d.ts +4 -0
  327. package/types/src/history/IHistory.d.ts +19 -2
  328. package/types/src/hyperlink/IHyperlink.d.ts +17 -1
  329. package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
  330. package/types/src/index.d.ts +4 -0
  331. package/types/src/license/LicenseManager.d.ts +21 -0
  332. package/types/src/license/_Utils.d.ts +18 -1
  333. package/types/src/license/runtime.browser.d.ts +5 -0
  334. package/types/src/license/runtime.node.d.ts +10 -0
  335. package/types/src/listener/IListener.d.ts +14 -2
  336. package/types/src/listener/ListenerEmitter.d.ts +11 -3
  337. package/types/src/movable/IMovable.d.ts +28 -15
  338. package/types/src/movable/IMovableCollection.d.ts +1 -1
  339. package/types/src/movable/Movable.d.ts +12 -1
  340. package/types/src/movable/MovableCollection.d.ts +7 -3
  341. package/types/src/movable/_InsertableCollection.d.ts +16 -5
  342. package/types/src/named/INamed.d.ts +30 -0
  343. package/types/src/named/INamedCollection.d.ts +38 -2
  344. package/types/src/named/NamedCollection.d.ts +34 -4
  345. package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
  346. package/types/src/outline/IOutline.d.ts +1 -1
  347. package/types/src/outline/Outline.d.ts +2 -2
  348. package/types/src/picture/IPicture.d.ts +98 -1
  349. package/types/src/picture/Picture.d.ts +15 -7
  350. package/types/src/pivot/IPivotTable.d.ts +2 -2
  351. package/types/src/pivot/PivotTable.d.ts +5 -5
  352. package/types/src/primitives/AsyncValue.d.ts +58 -0
  353. package/types/src/primitives/ReferenceRange.d.ts +2 -2
  354. package/types/src/print/IPageLayout.d.ts +635 -0
  355. package/types/src/print/PageLayout.d.ts +258 -0
  356. package/types/src/print/index.d.ts +1 -1
  357. package/types/src/protectedRange/IProtectedRange.d.ts +2 -2
  358. package/types/src/protection/IProtection.d.ts +6 -0
  359. package/types/src/protection/PasswordHasher.d.ts +13 -0
  360. package/types/src/resource/IResource.d.ts +9 -0
  361. package/types/src/resource/IResourceCollection.d.ts +4 -0
  362. package/types/src/resource/Resource.d.ts +2 -0
  363. package/types/src/resource/_AddResource.d.ts +13 -0
  364. package/types/src/richData/CellImage.d.ts +95 -0
  365. package/types/src/richData/Hyperlink.d.ts +49 -0
  366. package/types/src/richData/IRichDataCollection.d.ts +76 -0
  367. package/types/src/richData/IRichDataKind.d.ts +66 -0
  368. package/types/src/richData/RichArray.d.ts +42 -0
  369. package/types/src/richData/RichDataCollection.d.ts +23 -0
  370. package/types/src/richData/RichDataRegistry.d.ts +89 -0
  371. package/types/src/richData/RichDataValues.d.ts +20 -0
  372. package/types/src/richData/RichRecord.d.ts +68 -0
  373. package/types/src/richData/RichText.d.ts +59 -0
  374. package/types/src/richData/index.d.ts +9 -0
  375. package/types/src/scripting/FunctionArguments.d.ts +17 -1
  376. package/types/src/scripting/FunctionCollection.d.ts +8 -0
  377. package/types/src/scripting/IModule.d.ts +3 -3
  378. package/types/src/scripting/IScript.d.ts +2 -2
  379. package/types/src/scripting/ITypedFunction.d.ts +1 -1
  380. package/types/src/scripting/Scripts.d.ts +10 -0
  381. package/types/src/scripting/TypedFunction.d.ts +2 -0
  382. package/types/src/scripting/declarations.d.ts +3 -0
  383. package/types/src/selection/ChartElementSelection.d.ts +39 -0
  384. package/types/src/selection/IChartElementSelection.d.ts +103 -0
  385. package/types/src/selection/IItemSelection.d.ts +131 -0
  386. package/types/src/selection/IMovableSelection.d.ts +6 -34
  387. package/types/src/selection/IRangeSelection.d.ts +4 -4
  388. package/types/src/selection/ItemSelection.d.ts +49 -0
  389. package/types/src/selection/MovableSelection.d.ts +11 -30
  390. package/types/src/selection/RangeSelection.d.ts +4 -4
  391. package/types/src/selection/index.d.ts +3 -0
  392. package/types/src/shape/IShape.d.ts +2 -1
  393. package/types/src/shape/IShapeStyle.d.ts +5 -31
  394. package/types/src/shape/ITextBoxStyle.d.ts +85 -0
  395. package/types/src/shape/ShapeStyleUtils.d.ts +13 -1
  396. package/types/src/shape/_Connectors.d.ts +9 -9
  397. package/types/src/shape/_ShapeStyle.d.ts +9 -0
  398. package/types/src/shape/index.d.ts +1 -0
  399. package/types/src/sheet/CellRegion.d.ts +37 -3
  400. package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
  401. package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
  402. package/types/src/sheet/ISheet.d.ts +81 -1078
  403. package/types/src/sheet/IWorksheet.d.ts +1521 -0
  404. package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +37 -12
  405. package/types/src/sheet/NamedCellRange.d.ts +2 -2
  406. package/types/src/sheet/NamedRange.d.ts +2 -2
  407. package/types/src/sheet/OpaqueSheet.d.ts +114 -0
  408. package/types/src/sheet/SheetCell.d.ts +40 -27
  409. package/types/src/sheet/SheetRange.d.ts +50 -13
  410. package/types/src/sheet/SheetRanges.d.ts +14 -12
  411. package/types/src/sheet/{Sheet.d.ts → Worksheet.d.ts} +591 -171
  412. package/types/src/sheet/WorksheetCollection.d.ts +39 -0
  413. package/types/src/sheet/_CellBuffer.d.ts +11 -1
  414. package/types/src/sheet/_CopyUtils.d.ts +13 -6
  415. package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
  416. package/types/src/sheet/_InvalidSheetRange.d.ts +3 -2
  417. package/types/src/sheet/_Kinds.d.ts +34 -0
  418. package/types/src/sheet/_Labels.d.ts +38 -0
  419. package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
  420. package/types/src/sheet/_RangeStateSweep.d.ts +2 -3
  421. package/types/src/sheet/_ScalarListFactory.d.ts +55 -7
  422. package/types/src/sheet/_SheetAutoFillUtils.d.ts +3 -3
  423. package/types/src/sheet/_SheetAutoFitUtils.d.ts +3 -3
  424. package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
  425. package/types/src/sheet/_SheetCoords.d.ts +3 -3
  426. package/types/src/sheet/_SheetEvents.d.ts +1 -1
  427. package/types/src/sheet/_SheetFilterUtils.d.ts +6 -6
  428. package/types/src/sheet/_SheetIntents.d.ts +32 -14
  429. package/types/src/sheet/_SheetMessages.d.ts +1 -1
  430. package/types/src/sheet/_SheetMutations.d.ts +11 -9
  431. package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
  432. package/types/src/sheet/_SheetStateReader.d.ts +18 -0
  433. package/types/src/sheet/_SheetStateTypes.d.ts +80 -9
  434. package/types/src/sheet/_SheetUtils.d.ts +20 -19
  435. package/types/src/sheet/_WatchAnchor.d.ts +15 -2
  436. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
  437. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
  438. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
  439. package/types/src/sheet/index.d.ts +5 -2
  440. package/types/src/sheet/style/SheetCellStyle.d.ts +67 -86
  441. package/types/src/sheet/style/SheetDirectStyle.d.ts +3 -3
  442. package/types/src/sheet/style/SheetNamedStyle.d.ts +2 -0
  443. package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
  444. package/types/src/sheet/style/_Resolvers.d.ts +3 -2
  445. package/types/src/sheet/style/_StyleUtils.d.ts +7 -43
  446. package/types/src/sheetHeader/ISheetHeader.d.ts +2 -2
  447. package/types/src/sheetHeader/SheetCellHeader.d.ts +2 -0
  448. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
  449. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
  450. package/types/src/sheetHeader/SheetHeader.d.ts +7 -6
  451. package/types/src/sheetHeader/_HeaderUtils.d.ts +2 -3
  452. package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +28 -28
  453. package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
  454. package/types/src/sheetProtection/index.d.ts +1 -1
  455. package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +168 -61
  456. package/types/src/sheetView/WorksheetView.d.ts +139 -0
  457. package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
  458. package/types/src/sheetView/index.d.ts +1 -1
  459. package/types/src/slicer/ISlicer.d.ts +2 -2
  460. package/types/src/sort/ISort.d.ts +35 -5
  461. package/types/src/style/ICellStyle.d.ts +56 -44
  462. package/types/src/style/_BuiltInStyleDefs.d.ts +4 -3
  463. package/types/src/table/AnchoredTable.d.ts +23 -7
  464. package/types/src/table/AutoTable.d.ts +1 -1
  465. package/types/src/table/ITable.d.ts +32 -19
  466. package/types/src/table/_NamedTable.d.ts +3 -3
  467. package/types/src/table/_NamedTableSource.d.ts +2 -2
  468. package/types/src/text/IText.d.ts +4 -51
  469. package/types/src/text/TextEngine.d.ts +34 -0
  470. package/types/src/text/TextFrame.d.ts +4 -2
  471. package/types/src/text/TextRun.d.ts +3 -2
  472. package/types/src/text/TextWrapper.d.ts +32 -26
  473. package/types/src/text/_TextUtils.d.ts +5 -5
  474. package/types/src/text/_TextWrapperFallback.d.ts +49 -0
  475. package/types/src/text/impl/TabStrategy.d.ts +3 -1
  476. package/types/src/text/richtext/IRichText.d.ts +16 -2
  477. package/types/src/text/richtext/index.d.ts +0 -1
  478. package/types/src/theme/ITheme.d.ts +108 -7
  479. package/types/src/theme/ThemeCollection.d.ts +5 -0
  480. package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
  481. package/types/src/transaction/ITransaction.d.ts +20 -1
  482. package/types/src/transaction/Transaction.d.ts +8 -1
  483. package/types/src/transaction/_BatchHandle.d.ts +118 -0
  484. package/types/src/type/AbstractCollection.d.ts +4 -13
  485. package/types/src/type/ICollection.d.ts +17 -4
  486. package/types/src/type/IProperties.d.ts +1 -1
  487. package/types/src/utils/_CSSUtils.d.ts +1 -1
  488. package/types/src/wasm/_fontsWasm.d.ts +7 -0
  489. package/types/src/wasm/_sdkWasm.d.ts +1 -1
  490. package/types/src/wasm/fontsWasm.d.ts +32 -0
  491. package/types/src/wasm/index.d.ts +1 -0
  492. package/types/src/wasm/loader.browser.d.ts +9 -0
  493. package/types/src/wasm/loader.node.d.ts +9 -0
  494. package/types/src/wasm/sdkWasm.d.ts +6 -3
  495. package/types/src/workbook/IWorkbook.d.ts +269 -39
  496. package/types/src/workbook/Workbook.d.ts +102 -25
  497. package/types/src/workbook/WorkbookRange.d.ts +2 -2
  498. package/types/src/workbook/WorkbookRanges.d.ts +3 -3
  499. package/types/src/workbook/_WorkbookIntents.d.ts +2 -2
  500. package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
  501. package/types/src/workbookView/IWorkbookView.d.ts +82 -0
  502. package/types/src/workbookView/WorkbookView.d.ts +21 -0
  503. package/browser/esm/BbSmt62FpFIpoVzu.mjs +0 -392
  504. package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +0 -412
  505. package/browser/esm/DOMHmhYzPcLVcpAW.mjs +0 -7
  506. package/browser/esm/DUvUK61b2_4pf4tG.mjs +0 -484
  507. package/node/esm/CCouEwT37f08qO3V.mjs +0 -7
  508. package/node/esm/CImNvdz1iP-lUlro.mjs +0 -610
  509. package/node/esm/CT0CN82y0_Qgoryk.mjs +0 -7568
  510. package/node/esm/DHUADiCmxNQS1ARz.mjs +0 -417
  511. package/node/esm/Ds0d8zXzmgOu3MGx.mjs +0 -403
  512. package/types/src/chart/_ChartXml.d.ts +0 -70
  513. package/types/src/collections/OverlappingRangeIterator.d.ts +0 -87
  514. package/types/src/collections/_RangeSweep.d.ts +0 -97
  515. package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
  516. package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
  517. package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
  518. package/types/src/print/IPrint.d.ts +0 -212
  519. package/types/src/sheet/SheetCollection.d.ts +0 -29
  520. package/types/src/sheetProtection/SheetProtection.d.ts +0 -51
  521. package/types/src/sheetView/SheetView.d.ts +0 -122
  522. package/types/src/text/richtext/IStyledFont.d.ts +0 -330
@@ -1,69 +1,40 @@
1
- import { IRange, IFormulaContext, IRuntime, Scalar } from '@sheetxl/primitives';
1
+ import { IRange, IFunction, IRuntime, Scalar } from '@sheetxl/primitives';
2
2
  import { IListener } from '../listener';
3
3
  import { FunctionProvider } from '@sheetxl/scripting';
4
4
  import { AbstractModel, IModel } from '../model';
5
5
  import { ITransaction } from '../transaction';
6
6
  import { IStringCollection } from '../string';
7
+ import { IResourceCollection } from '../resource';
7
8
  import { IFunctionCollection } from '../scripting';
8
- import { ISpatialMap, ISpatialMap3D } from '../collections';
9
9
  import { INamed, INamedCollection } from '../named';
10
10
  import { ICellRange, ICellRanges } from '../cellRange';
11
11
  import { NamedNodeInfo } from './Types';
12
12
  import { ITable } from '../table';
13
13
  import { IExternalBook, IExternalBookCollection } from '../externalBook';
14
14
  import { ExternalBookCollection } from '../externalBook/ExternalBookCollection';
15
- import { ExternalBookBindings } from './ExternalBookBindings';
16
15
  import { FormulaBlockResolvers, FormulaImager } from './formula';
17
16
  import { IFormulaCompiler } from './compiler';
18
- import { CalculationContext, IContextContainer, CalcNode } from './state';
19
- import { FormulaSpatialValue, PrecedentSpatialValue } from './spatial';
20
- import { CalcGridBackend, CalcGrid, FormulaHost, ICalcGrid } from './grid';
17
+ import { CalcGrid, FormulaHost, ICalcGrid } from './grid';
21
18
  import { CalcRequest, CalcResponse, CalcGridSpec, TableSymbols, NameSymbols } from './grid/_CalcRequest';
22
- import { CalcExecutor } from './executor';
19
+ import { CalcBackend } from './engine/CalcBackend';
23
20
  import { IndirectSymbolProvider, ISymbolRegistry } from './symbol';
24
21
  import { ICalculation } from './ICalculation';
25
22
  import { NamedFormulaCollection } from './NamedFormulaCollection';
26
23
  import { INamedFormulasCollection } from './INamedFormulasCollection';
27
- /**
28
- * What a structured reference resolves against: a live table, or a snapshot of one taken before it
29
- * was removed ({@link snapshotTableExtent}).
30
- */
31
- interface TableExtent {
32
- getRange(): {
33
- getCoords(): IRange.Coords;
34
- };
35
- getDataRange(): {
36
- getCoords(): IRange.Coords;
37
- };
38
- getHeaderRowRange(): {
39
- getCoords(): IRange.Coords;
40
- };
41
- getTotalRowRange(): {
42
- getCoords(): IRange.Coords;
43
- };
44
- isShowHeaders(): boolean;
45
- isShowTotals(): boolean;
46
- getColumnById(id: string): {
47
- getIndex(): number;
48
- } | null;
49
- getSheet(): {
50
- getId(): string;
51
- } | null | undefined;
52
- }
53
24
  /**
54
25
  * Implementation for {@link ICalculation}.
55
26
  */
56
- export declare class Calculation extends AbstractModel<State, ICalculation.JSON, ICalculation.IListeners> implements ICalculation {
57
- protected _container: IContextContainer;
58
- protected _context: CalculationContext & IFormulaContext;
27
+ export declare class Calculation extends AbstractModel<AbstractModel.State, ICalculation.JSON, ICalculation.IListeners> implements ICalculation {
28
+ protected _backend: CalcBackend | null;
29
+ protected _startReplica: CalcBackend.Replica | null;
30
+ /** The symbols formulas bind through (DESIGN-CALC-SERVICE §8): the model's, handed to the backend. */
31
+ protected _symbols: ISymbolRegistry;
59
32
  protected _status: ICalculation.Status;
60
33
  protected _statusTransition: Promise<void> | null;
61
34
  protected _runtime: IRuntime;
62
35
  protected _functions: IFunctionCollection;
63
36
  protected _namedFormulas: NamedFormulaCollection;
64
37
  protected _externalBooks: ExternalBookCollection;
65
- /** The cache as grids and the cached names as virtual grids — see {@link ExternalBookBindings}. */
66
- protected _externalBindings: ExternalBookBindings | null;
67
38
  /** `json.names` held from construction until {@link hydrateNames} — see it for why. */
68
39
  protected _pendingNames: INamed.JSON[] | null;
69
40
  protected _compiler: IFormulaCompiler;
@@ -71,28 +42,19 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
71
42
  protected _compilerEditingSig: string;
72
43
  protected _compilerEditingStorage: IFormulaCompiler | null;
73
44
  protected _compilerModule: typeof import('./compiler/FormulaCompiler');
45
+ protected _engineModule: typeof import('./engine') | null;
46
+ protected _planCache: 'off' | 'assert' | 'on' | null;
74
47
  protected _getActiveCell: () => IRange.CellCoords | null;
48
+ protected _startFunctions: (() => Promise<readonly IFunction[]>) | null;
75
49
  protected _getRange: (address: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
76
50
  protected _getRanges: (address: ICellRanges.Address, options?: ICellRange.GetRangeOptions) => ICellRanges;
77
- protected _calcExecutor: CalcExecutor;
78
- protected _cycleId: number;
79
- protected _staticEpoch: number;
80
- protected _precedentEpoch: number;
81
- protected _epochSeenFormulas: ISpatialMap3D<FormulaSpatialValue> | null;
82
- protected _epochSeenPrecedents: ISpatialMap3D<PrecedentSpatialValue> | null;
83
- protected _epochSeenDynamics: Map<FormulaSpatialValue, ISpatialMap.Entry<PrecedentSpatialValue>[]> | null;
84
- protected _volatiles: Set<CalcNode>;
85
51
  /** The current handle of every formula host's grid, by grid id. */
86
52
  protected _formulaHosts: Map<string, FormulaHost>;
87
- protected _calculatedCommitId: string | null;
88
- protected _calculatedEngineId: string | null;
89
53
  protected _modelStore: ITransaction.IStore | null;
90
54
  /** The model-side grids, by grid id (DESIGN-CALC-SERVICE §13.23): what a copy lands on, what a start seeds from. */
91
55
  protected readonly _fronts: Map<string, CalcGrid>;
92
56
  /** What each model grid is, for the `create` a start sends for it (its size is read then). */
93
57
  protected readonly _gridSpecs: Map<string, CalcGridSpec>;
94
- /** The engine holds grids: from a start's boot until a stop. */
95
- protected _engineUp: boolean;
96
58
  protected _modelStoreRemoveListener: IListener.Remove | null;
97
59
  protected _mirrorRemoveListener: IListener.Remove | null;
98
60
  _modelMirrorId: string | null;
@@ -100,13 +62,7 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
100
62
  protected _ownerStore: ITransaction.IStore;
101
63
  /** The record holding the owner's sheet list, in {@link _ownerStore}. */
102
64
  protected _sheetListId: string;
103
- protected _engineIds: Map<string, string>;
104
- protected _landingOf: Map<string, string>;
105
- protected _mirroredId: string | null;
106
- protected _lastRevert: {
107
- commitId: string;
108
- regions: Map<string, IRange.Coords[]>;
109
- } | null;
65
+ protected _landedCommits: Set<string> | null;
110
66
  protected _outstanding: Set<Promise<ICalcGrid.Results>> | null;
111
67
  protected _pendingActions: (() => Promise<unknown>)[] | null;
112
68
  protected _pendingPriority: (() => Promise<unknown>)[] | null;
@@ -126,6 +82,8 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
126
82
  /** `ready()` calls waiting for work in flight to end: woken on every check. */
127
83
  protected _calculationStateWaiters: (() => void)[] | null;
128
84
  protected _bootFull: boolean;
85
+ /** Consumer work not yet settled: see {@link waitUntil}. */
86
+ protected _consumerWork: number;
129
87
  protected _bootExplicit: boolean;
130
88
  protected _compilerWaiters: (() => void)[] | null;
131
89
  protected _wroteWhileOff: boolean;
@@ -138,8 +96,8 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
138
96
  /** The `calcPr` the file carried, kept whole so settings this engine ignores still round-trip. */
139
97
  protected _calcJSON: ICalculation.JSON | null;
140
98
  protected _removeNamedItemsListeners: (() => void) | null;
141
- protected _namedDependents: Map<string, IRange.Coords[]> | null;
142
- protected _namedDependentsOf: ISpatialMap3D<FormulaSpatialValue> | null;
99
+ /** The listeners on each table's extent, registered again whenever the named collection changes. */
100
+ protected _tableListenerRemovers: (() => void)[];
143
101
  /**
144
102
  * Resolver callbacks passed to every {@link FormulaBlock} at creation time.
145
103
  * Populated from {@link Calculation.ConstructorOptions} during `_initialize`.
@@ -151,40 +109,27 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
151
109
  constructor(options?: Calculation.ConstructorOptions);
152
110
  protected _initialize(options?: Calculation.ConstructorOptions): void;
153
111
  /**
154
- * Reverse-invalidates only the formulas that reference any of `changedIds` — the stable name/table
155
- * fake ids reported by `IndirectSymbolProvider.reconcile()` (add/heal, delete, rename).
112
+ * Makes the backend from its loaded module. Once per calculation; a restart reuses it, as
113
+ * `_dropEngine` leaves it.
156
114
  *
157
115
  * @remarks
158
- * Replaces the old `isFullCalcRequired` blanket. `bind()` assigns a stable fake id at compile time
159
- * regardless of whether the symbol resolves, and reconcile() reports that same id — so matching a
160
- * formula's `getReferencedSymbolIds()` catches the "heal" case (`#NAME?`/`#REF!` → valid) that a
161
- * precedent-range markDirty can't, because an unresolved reference has no precedent range.
162
- *
163
- * Marking the direct referencers is not enough where the referencer is another NAME. Downstream
164
- * of a cell, the dependency graph carries transitivity for free; downstream of a name it carries
165
- * nothing, because a name registers no precedent range for the formulas that mention it. So the
166
- * ids are first expanded over the symbol graph ({@link _namedTargets}), and only from the cells
167
- * that land in are the ordinary edges left to do the rest.
168
- *
169
- * O(formulas) all3D scan — same cost/scale as `recompileNamed`.
170
- *
171
- * @returns `true` if any formula was marked dirty.
116
+ * Its history starts here, at the model's current commit: nothing before a start writes to it.
117
+ * Its replicas start as the owner held them when the start was asked for.
172
118
  */
173
- protected _markDirtyReferencing(changedIds: Set<string>): boolean;
119
+ protected _attachEngine(engine: typeof import('./engine')): void;
174
120
  /**
175
- * Recompiles every formula that references any of `changedIds` — a name or a table, directly or
176
- * through a name — from its own text, so it re-derives its precedents.
177
- *
178
- * @remarks
179
- * The re-wire half of {@link _markDirtyReferencing}. A node stores the coords its references
180
- * resolved to when it was wired, and `precedentSpatial` indexes those, so a symbol that now
181
- * designates different cells (a name redefined, a table resized) leaves its readers evaluating
182
- * against the old edges; a dirty mark does not reach them. Same `all3D` scan and the same
183
- * {@link _namedTargets} expansion: a name whose body cites the symbol reaches its own readers.
184
- *
185
- * Run at a safe point only — it writes inputs.
121
+ * What the backend asks of this calculation (see {@link CalcBackend.Callbacks}): the in-process
122
+ * half of the backend's interface.
186
123
  */
187
- protected _recompileReferencing(changedIds: Set<string>): void;
124
+ protected _backendCallbacks(): CalcBackend.Callbacks;
125
+ /**
126
+ * Recompiles, at the next safe point, the formulas that reference a name - or reference a name
127
+ * that does: a name's link to the engine, held from before there is one. See
128
+ * {@link IContextContainer.recompileNamed}.
129
+ */
130
+ protected _recompileNamed(nameId: string): void;
131
+ /** Marks, at the next safe point, the formulas that reference a name out of date. See {@link IContextContainer.invalidateNamed}. */
132
+ protected _invalidateNamed(nameId: string): void;
188
133
  /**
189
134
  * @internal
190
135
  * Rewrites the formulas that reference `table`, which is about to be removed: `'error'` puts
@@ -199,41 +144,8 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
199
144
  _releaseTableReferences(table: ITable, release: 'error' | 'address'): void;
200
145
  /**
201
146
  * @internal
202
- * A table's body has changed rows: re-fit the A1 references that spanned it.
203
- *
204
- * @remarks
205
- * Excel treats a reference whose ROWS are exactly a table's body - or run from its header to the
206
- * body's end - as naming the body, whatever columns of the table it covers, and keeps it on the
207
- * body however the body's rows change (probed, `probe-table-refit.ps1`): `SUM(B2:B5)` over body
208
- * rows 2-5 reads `SUM(B2:B6)` after a row is appended, and `SUM(B2:B3)` after a resize gives two
209
- * up. Relative, absolute or mixed alike, from any sheet, and in anything that holds a reference -
210
- * a defined name, a table's held totals formula and a condition's formula are blocks too. A
211
- * reference that only starts or only ends with the body is an ordinary one, and a change of
212
- * COLUMNS re-fits nothing. A name's relative rows are read from its body's origin, A1, as Excel
213
- * reads them (`probe-table-refit-relative.ps1`); a shift never moves them, so a row at the top
214
- * leaves such a name alone.
215
- *
216
- * An insert or delete inside the body already leaves such a reference right, so this is asked
217
- * only for what a shift gets wrong: rows taken or given up at the body's end, and a row inserted
218
- * at its first row (which pushes the whole reference down).
219
- *
220
- * One search of the precedent index over the rows that match - an entry per (block, reference)
221
- * that reads them - so the cost is the readers of the body, on a change of a table's rows. The
222
- * text a cell shows catches up with the engine the way it does after any shift.
223
- *
224
- * A block is re-fitted cell by cell: only the cells whose reference spans the body are rewritten,
225
- * which splits them out of the block. An array-entered block is one formula, read at its top-left,
226
- * and is never split.
227
- *
228
- * **A DELIBERATE DIVERGENCE lives here** (Michael, 2026-09-22). Excel asks how the cell was
229
- * authored, not what it reads: a fully relative reference is left where it is when the cell
230
- * belongs to a shared-formula group, and re-fitted when it stands alone - so `SUM(B2:B5)` follows
231
- * the body when it was typed and does not when the same three formulas were filled, and the file
232
- * carries the difference as `<f t="shared">` (`probe-table-refit-fillhandle.ps1`,
233
- * `probe-table-refit-roundtrip.ps1`). Here a run is a data-model fact, not an authoring one -
234
- * cells holding the same formula are conflated whatever made them - so honoring that rule would
235
- * make a formula follow the body or not depending on what a NEIGHBOR happens to hold, which a
236
- * user cannot see. Every reference that spans the body is re-fitted, however it was written.
147
+ * A table's body has changed rows: re-fit the A1 references that spanned it (see
148
+ * {@link CalcBackend.refitTableRows}).
237
149
  *
238
150
  * @param sheet The sheet the table is on, by id or name.
239
151
  * @param columns The table's columns. A reference reaching outside them is an ordinary one.
@@ -255,16 +167,6 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
255
167
  rowStart: number;
256
168
  rowEnd: number;
257
169
  }, afterShift: boolean, isCurrent: () => boolean): void;
258
- /**
259
- * Replaces every structured reference to `tableId` on a sheet: by its address in `extent`, or by
260
- * `#REF!` when there is none.
261
- */
262
- protected _rewriteTableReferences(tableId: string, extent: TableExtent | null): void;
263
- /**
264
- * Writes `text` over `fsv`'s cells - or over `coords`, a part of them - as the engine's own input.
265
- * Safe point only.
266
- */
267
- protected _writeBlockText(fsv: FormulaSpatialValue, text: string, coords?: IRange.Coords): void;
268
170
  /**
269
171
  * @internal
270
172
  * Rewrites the 3-D spans that a tab-order change from `before` to `after` broke — an endpoint that
@@ -272,66 +174,12 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
272
174
  * so an undo of the move restores the text.
273
175
  */
274
176
  _replaceSheetSpans(before: readonly string[], after: readonly string[], movedId?: string): void;
275
- /**
276
- * {@inheritDoc IContextContainer.getNamedDependents}
277
- *
278
- * @remarks
279
- * The bucket for a NAME out of {@link _getSymbolDependents}. Kept as the name-flavored spelling
280
- * the callers read; the index underneath is one index for every symbol kind.
281
- */
282
- protected _getNamedDependents(nameId: string): readonly IRange.Coords[];
283
- /**
284
- * Every formula block that references a symbol — a defined name, a table, or an external BOOK —
285
- * by its stable id, as `{ ...ref, scope: gridId }` coords.
286
- *
287
- * @remarks
288
- * The memo is keyed on the formula spatial's IDENTITY, which is the whole invalidation story:
289
- * the map is copy-on-write (`getFormulas().clone()` before any mutation, `setFormulas` to
290
- * publish), so a formula added, removed, shifted or recompiled necessarily replaces it — and an
291
- * undo, which restores an earlier map, replaces it too. Nothing has to remember to clear this.
292
- *
293
- * The sweep is the same `all3D` walk `recompileNamed` and {@link _markDirtyReferencing} already
294
- * do, done once for every symbol instead of once per symbol. Bucketed off
295
- * `getReferencedSymbolIds()` — names, tables and books alike — so a book's dependents
296
- * (`IExternalBook.getDependents`) come out of the same walk as a name's, and a name's body that
297
- * cites a book lands in the book's bucket with the name's id as its scope.
298
- */
299
- protected _getSymbolDependents(symbolId: string): readonly IRange.Coords[];
300
- /**
301
- * Every symbol id a formula cites, to the blocks citing it — the index
302
- * {@link _getSymbolDependents} answers from, memoized the same way.
303
- */
304
- protected _getSymbolIndex(): ReadonlyMap<string, readonly IRange.Coords[]>;
305
- /**
306
- * {@inheritDoc IContextContainer.getNamedDependentNames}
307
- *
308
- * @remarks
309
- * A block that depends on a name and lives on a VIRTUAL grid is another name's BODY, and that
310
- * grid's id is that name's id — `add` binds the two together and `delete` keeps the grid rather
311
- * than dropping it. So the hop is a bucket lookup on the id itself; a sheet grid id is never a
312
- * name id, which is what {@link NamedFormulaCollection.getById} is asked to confirm before the
313
- * walk continues through one.
314
- *
315
- * Expands each id once. That is the cycle guard (`A = B+1`, `B = A+1` reaches `A` again on its
316
- * second hop) and the diamond guard both.
317
- */
318
- protected _getNamedDependentNames(nameId: string): ReadonlySet<string>;
319
- /**
320
- * `changedIds` widened to everything a change to them reaches through the SYMBOL graph: each id
321
- * plus, for the names among them, every name transitively referencing it.
322
- *
323
- * @remarks
324
- * The one expansion both `recompileNamed` and {@link _markDirtyReferencing} apply before their
325
- * all3D scan, so a formula naming an intermediate name is matched by the same pass that matches
326
- * one naming the changed name directly. Ids that are not names (a table's) expand to themselves.
327
- */
328
- protected _namedTargets(changedIds: Set<string>): ReadonlySet<string>;
329
177
  /**
330
178
  * @internal
331
179
  * Demand/plan counters and timings since construction (or the last {@link _resetStats}) — the
332
180
  * plan-cache soak rig. From a console: `SheetXL.getSelectedWorkbook().getCalculation()._stats()`.
333
181
  */
334
- _stats(): ReturnType<CalcExecutor['getDemandStats']>;
182
+ _stats(): ReturnType<CalcBackend['getDemandStats']>;
335
183
  /** @internal Zeroes every counter/timing so a measurement window starts clean. */
336
184
  _resetStats(): void;
337
185
  /**
@@ -381,15 +229,36 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
381
229
  */
382
230
  protected _abandonStart(): void;
383
231
  protected _releaseCompilerWaiters(): void;
232
+ /**
233
+ * Runs the start batch under one operation on the model's store, folded into the commit the
234
+ * batch happens during.
235
+ *
236
+ * @remarks
237
+ * What the batch vends - a seed's record, a name body's answer - the model adopts as it is
238
+ * applied, and each adoption is a write to the model's store. Made as its own root commit, each
239
+ * write copies the store's whole state map into the record it keeps (a state per sheet model, and
240
+ * one per defined name's host), so a start that answers thousands of bodies cost thousands of
241
+ * such copies - the larger part of opening a legacy file. Under one open operation the writes
242
+ * join it, and the store copies once when it closes. Nothing of the model's changes here: the
243
+ * batch is the engine's answer to what the model already holds.
244
+ */
245
+ protected _underOneModelOperation<R>(batch: () => R): R;
384
246
  /**
385
247
  * @internal
386
248
  * Resolves once the engine can compile: at once when `Running`; when the batch has applied the
387
- * seeds, ahead of the boot pass, while `Starting`; after the start it makes when `Off`.
249
+ * seeds, ahead of the boot pass, while `Starting`; and, when `Off`, once something else starts
250
+ * it. It never starts the engine itself.
388
251
  *
389
252
  * @remarks
390
253
  * What an owner that registers a formula asynchronously waits on (a condition formula's
391
254
  * evaluation). Waiting on {@link ready} instead resolves after the boot pass, and the
392
255
  * registration then costs a pass of its own (design §6.5: a boot owes one).
256
+ *
257
+ * An `Off` engine stays off (DESIGN-CALC-ON-LOAD: under `calcOnLoad: 'none'` a read starts
258
+ * nothing, and a conditional format or data validation evaluating on load is a read). Starting it
259
+ * here ran the boot pass, and the pass moved cached values — every volatile, every iterating
260
+ * cycle — in a workbook that was only being opened and saved. The waiter is released by the
261
+ * start the first mutation (or an explicit calculation) makes, and by {@link close}.
393
262
  */
394
263
  _whenCanCompile(): Promise<void>;
395
264
  /**
@@ -496,6 +365,14 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
496
365
  * read returns the raw text instead (`use-signs.test.ts`).
497
366
  */
498
367
  protected _drainPending(priorityOnly?: boolean): Promise<void>;
368
+ /** @inheritdoc ICalculation.getPendingCount */
369
+ getPendingCount(): number;
370
+ /** @inheritdoc ICalculation.whenPendingDone */
371
+ whenPendingDone(options?: {
372
+ timeout?: number;
373
+ }): Promise<boolean>;
374
+ /** @inheritdoc ICalculation.cancelAsync */
375
+ cancelAsync(options?: ICalculation.CancelOptions): Promise<ICalculation.Status>;
499
376
  /** @inheritdoc ICalculation.calculate */
500
377
  calculate(options?: ICalculation.CalculateOptions | boolean): Promise<ICalculation.Status>;
501
378
  /**
@@ -505,16 +382,22 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
505
382
  * successful one (the tail simply fell off the end), and two call sites cast the result
506
383
  * to `Status` to satisfy {@link ICalculation.calculate}.
507
384
  */
508
- protected _calculate(options?: ICalculation.CalculateOptions, gridId?: string): Promise<ICalculation.Status>;
385
+ protected _calculate(options?: ICalculation.CalculateOptions, gridId?: string, settle?: boolean): Promise<ICalculation.Status>;
509
386
  /** A pass, counted while it runs: what the calculation state reads as a pass in flight. */
510
- protected _calculateNow(options?: ICalculation.CalculateOptions, gridId?: string): Promise<ICalculation.Status>;
511
- protected _runCalculation(options?: ICalculation.CalculateOptions, gridId?: string): Promise<ICalculation.Status>;
387
+ protected _calculateNow(options?: ICalculation.CalculateOptions, gridId?: string, settle?: boolean): Promise<ICalculation.Status>;
512
388
  /**
513
- * A restore moves every grid to another snapshot and reports nothing, so each formula host is
514
- * told here what its grid now holds.
389
+ * @param settle The settle pass (DESIGN-ASYNC §4.5): seeded from what a settle marked only;
390
+ * volatiles and the dirty set are left for the pass that owes them.
391
+ */
392
+ protected _runCalculation(options?: ICalculation.CalculateOptions, gridId?: string, settle?: boolean): Promise<ICalculation.Status>;
393
+ /**
394
+ * The model commit the last pass recalculated for, `null` before the first: what a sheet
395
+ * realizing the pass's results amends them into.
515
396
  * @internal
516
397
  */
517
- protected _processRestoreOrRevert(state: State, commit: ITransaction.ICommit): void;
398
+ get _calculatedCommitId(): string | null;
399
+ /** A response's cycle: the engine's last pass, or none before there is an engine. */
400
+ protected get _cycleId(): number;
518
401
  /**
519
402
  * Formula text as a cell at `coords` would STORE it, without writing it anywhere.
520
403
  *
@@ -576,11 +459,6 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
576
459
  _createCalcGrid(options: Calculation.CalcGridOptions): CalcGrid;
577
460
  /** What a `create` for a model grid carries: its description. */
578
461
  protected _specOf(front: CalcGrid): CalcGridSpec;
579
- /**
580
- * The engine's grid for a model grid, as a `create` describes it. What it pushes reaches the
581
- * model grid under the same id.
582
- */
583
- protected _createEngineGrid(spec: CalcGridSpec): CalcGridBackend;
584
462
  /**
585
463
  * Make the engine's grids from the model's (design §6.3): each live model grid's `create`, the
586
464
  * hosts' first (a name's grid before any sheet's); each host's body sent again; then every grid
@@ -596,12 +474,6 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
596
474
  * from. The model's grids are untouched.
597
475
  */
598
476
  protected _dropEngine(): void;
599
- /**
600
- * The engine's history starts at the boot: the commits mirrored before it hold none of the
601
- * grids the boot made, so a restore to one is not followed but rebuilt ({@link _followRestore}).
602
- * The model's commit now is the boot's.
603
- */
604
- protected _forgetEarlierLandings(modelCommitId?: string | null): void;
605
477
  /**
606
478
  * The model restored itself to `commitId`: the engine restores its own history there, or - on a
607
479
  * `Running` engine whose history does not reach it (a commit from before its start, or one
@@ -618,9 +490,6 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
618
490
  * @internal
619
491
  */
620
492
  _reportError(error: unknown): void;
621
- protected _createBackendGrid(options?: CalcGridBackend.ConstructorOptions): CalcGridBackend;
622
- protected _registerGrid(grid: CalcGridBackend): void;
623
- protected _unregisterGrid(gridId: string): void;
624
493
  /** The owner's sheet list as it last said ({@link _setSheets}): what a start seeds the replica from. */
625
494
  protected _heldSheets(): Calculation.SheetList['sheets'];
626
495
  /** One sheet of {@link _heldSheets} by its grid id, or `undefined` for a grid that is no sheet. */
@@ -639,25 +508,14 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
639
508
  * record, and owes a full pass only when a sheet already listed was renamed, moved or removed.
640
509
  * @internal
641
510
  */
642
- _setSheets(sheets: readonly (readonly [id: string, name: string | null])[]): void;
643
- /**
644
- * Replaces the replica with the list a `sheets` message carries.
645
- *
646
- * @remarks
647
- * A sheet that survived with a different name or at a different position changes what the
648
- * functions reading names and positions answer (`INDIRECT`, `FORMULATEXT`, `CELL`, `SHEET`, a
649
- * 3-D span's members), and none of that is a precedent: a full pass follows, which is what the
650
- * model asked for on a rename or a move before the engine was told of either. A sheet
651
- * appended moves nothing; one inserted or deleted ahead of a survivor moves it, and counts.
652
- */
653
- protected _applySheets(sheets: readonly (readonly [id: string, name: string | null])[]): void;
511
+ _setSheets(sheets: readonly (readonly [id: string, name: string | null, gridless?: boolean])[]): void;
654
512
  /**
655
- * Before a start applies what it held: every sheet a held \`sheets\` message adds enters the
656
- * replica at the end, under the name it was first listed by. A defined name's body is applied
657
- * ahead of the seeds and may name a sheet listed while starting; the messages themselves still
658
- * apply in send order, so a seed sent before a rename binds the name it was sent under.
513
+ * Compiles every loaded name whose text mentions the sheet, ahead of a change a compiled body
514
+ * follows and text cannot: a shift of the sheet's cells, its rename, its removal. See
515
+ * {@link NamedFormulaCollection._materializeMentioning}. Nothing while `Off`: a body written
516
+ * then is sent at the next start, against the sheets as they are by then, as the text would be.
659
517
  */
660
- protected _enterHeldSheets(held: readonly HeldRequest[]): void;
518
+ protected _materializeNamesMentioning(sheetId: string, name?: string | null): void;
661
519
  /** The model's tables as the replica holds them: by id, each table's name and columns. */
662
520
  protected _liveTables(): Map<string, TableSymbols>;
663
521
  /** The defined names as the replica holds them: by id, each name's spelling and scope sheet. */
@@ -676,30 +534,33 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
676
534
  * @internal
677
535
  */
678
536
  _tableChanged(table: ITable, removed: boolean): void;
679
- /** A name written, as {@link _tableChanged} tells a table. */
680
- protected _nameWritten(written: NamedFormulaCollection.NamesWritten): void;
537
+ /** Names written, as {@link _tableChanged} tells a table: one message for a batch. */
538
+ protected _nameWritten(written: readonly NamedFormulaCollection.NamesWritten[]): void;
539
+ /** {@link _sendSymbolChanges} for one change. */
540
+ protected _sendSymbolChange<T>(kind: 'tables' | 'names', id: string, entry: T | null, same: (a: T | null | undefined, b: T | null) => boolean): void;
681
541
  /**
682
- * One change to a replica, as a message: sent to a `Starting` engine as it is (the channel holds
683
- * it in order), and to a `Running` one only when the replica does not already say so.
542
+ * Changes to a replica, as messages: sent to a `Starting` engine as they are (the channel holds
543
+ * them in order), and to a `Running` one only where the replica does not already say so, as ONE
544
+ * message - the replica is rebuilt and reconciled once per message, over every symbol, so a batch
545
+ * told a symbol at a time costs the square of its size.
684
546
  */
685
- protected _sendSymbolChange<T>(kind: 'tables' | 'names', id: string, entry: T | null, same: (a: T | null | undefined, b: T | null) => boolean): void;
547
+ protected _sendSymbolChanges<T>(kind: 'tables' | 'names', changes: readonly (readonly [string, T | null])[], same: (a: T | null | undefined, b: T | null) => boolean): void;
686
548
  /**
687
- * Applies what a `tables` message carries to the replica. A reference bound by a name the
688
- * replica did not have yet heals to it now, as one to a table added does.
549
+ * While `Starting`: per kind, the held symbol message a new symbol of that kind joins, and the
550
+ * ids every message of the start has told. Dropped with the channel - see {@link _sendSymbolChange}.
689
551
  */
690
- protected _applyTables(changes: readonly (readonly [id: string, table: TableSymbols | null])[]): void;
691
- /** Applies what a `names` message carries, as {@link _applyTables} does. */
692
- protected _applyNames(changes: readonly (readonly [id: string, name: NameSymbols | null])[]): void;
552
+ protected _openSymbolMessages: Map<'tables' | 'names', HeldRequest> | null;
553
+ protected _symbolsTold: Map<'tables' | 'names', Set<string>> | null;
693
554
  /** What a replica's change re-resolved - healed, renamed, gone - is marked for the next pass. */
694
555
  protected _markDirtyReconciled(provider: {
695
556
  reconcile(): string[];
696
557
  } | null): void;
697
- private _tablesDerived;
698
- private _namesDerived;
699
558
  /**
700
- * The table replica and its name index, or `null` while `Off`: an engine that has been told
701
- * nothing reads the model.
559
+ * Whether the engine's replicas answer: not while `Off`, nor before the start has made the
560
+ * engine. An engine that has been told nothing reads the model.
702
561
  */
562
+ protected _hasReplicas(): boolean;
563
+ /** The table replica and its name index, or `null` when there is none (see {@link _hasReplicas}). */
703
564
  protected _replicaTables(): {
704
565
  of: ReadonlyMap<string, TableSymbols>;
705
566
  idByName: Map<string, string>;
@@ -710,9 +571,8 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
710
571
  idsByName: Map<string, string[]>;
711
572
  } | null;
712
573
  /**
713
- * The name a spelling resolves to from `scope`, by the replica: that sheet's own name first, then
714
- * the global; asked from no sheet, the global, else any scoped one - the collection's rule
715
- * (`NamedFormulaCollection.getByName`). `undefined` when the replica cannot answer, and the
574
+ * The name a spelling resolves to from `scope`, by the replica (see
575
+ * {@link CalcBackend.getReplicaNameId}). `undefined` when the replica cannot answer, and the
716
576
  * collection is asked instead.
717
577
  * @internal
718
578
  */
@@ -732,8 +592,6 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
732
592
  * @internal
733
593
  */
734
594
  _imagerFor(gridId: string): FormulaImager;
735
- private _sheetsDerived;
736
- private _sheetsCache;
737
595
  /** Every sheet's grid id in tab order, from the replica. */
738
596
  protected _sheetIds(): readonly string[];
739
597
  /** A sheet's grid id by its name, as Excel reads sheet names: case-insensitively. `null` when none. */
@@ -759,66 +617,18 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
759
617
  close(): void;
760
618
  /** A model holding writes for the engine makes them on this read (`ITransaction.Hooks.writes`). */
761
619
  protected _flushModel(): void;
762
- /**
763
- * Runs `action` with its engine writes landing under `landingId`, or as they are when none.
764
- *
765
- * @remarks
766
- * A root-level request after a nested savepoint of the same root has landed: the root's own
767
- * commit is behind the tip, and the savepoint is part of the root for good, so the write joins
768
- * the tip. The engine's live maps are always the tip's.
769
- * @internal
770
- */
771
- _landUnder<R>(landingId: string | undefined, action: () => R): R;
772
- /** Whether the engine still holds a commit: its own record is in every commit made since it was built. */
773
- protected _holdsEngineCommit(engineId: string): boolean;
774
- /**
775
- * Records the model commit that just landed: its mirror, a commit of the engine's own that names
776
- * it in the engine's record.
777
- *
778
- * @remarks
779
- * A commit even when nothing landed under the model's: an engine write made after the close,
780
- * outside any model operation (a deferred recompile), amends the engine's tip, and that tip has
781
- * to be this model commit's, not the one before it, or a restore to the one before carries the
782
- * write. The engine's record changes with every mirror, so the commit is never elided.
783
- */
784
- protected _mirror(commitId: string): void;
785
- /** Forgets a landing, and the engine commit it made if it made one. */
786
- protected _dropLanding(landingId: string): void;
787
- /** Drops the landings whose engine commit the store has trimmed or pruned. Rare: sized by the store's cap. */
788
- protected _sweepLandings(): void;
789
620
  /** The model commits on the live history: the current one and its ancestors. */
790
621
  protected _modelHistory(): Set<string>;
791
622
  /**
792
- * A model root closed without landing (an amend, or nothing written): the engine commits made
793
- * under its id (`<id>:0`, `<id>:n`) fold into the mirror of the model's current commit.
623
+ * Whether a model commit landed: the model holds it, or did when a held request was judged
624
+ * against it. A snapshot that never landed (an amended root's) is not one a restore can undo.
794
625
  */
795
- protected _foldPhantom(rootId: string): void;
626
+ protected _hasLanded(commitId: string): boolean;
796
627
  /**
797
- * The engine commit an engine write made during a model operation lands in: the operation's
798
- * root (`<id>:0`) or the nested savepoint open now. `null` outside an operation, or while a
799
- * landing is already open (the write joins it).
628
+ * The landing of the model operation open now, which an engine write made during it lands in:
629
+ * the operation's root (`<id>:0`) or the nested savepoint open now. `null` outside an operation.
800
630
  */
801
631
  protected _modelLanding(): string | null;
802
- /**
803
- * Engine state is never a step of history on its own: a write is attributed to the model
804
- * operation it is made in, or folded into the current snapshot (a pass's bookkeeping).
805
- * @internal
806
- */
807
- protected _updateState(updateState?: Partial<State>, options?: ITransaction.StoreOperationOptions, events?: (keyof ICalculation.IListeners)[]): this;
808
- /** @internal */
809
- protected _amendState(updateState?: Partial<State>, options?: ITransaction.StoreOperationOptions, events?: (keyof ICalculation.IListeners)[]): this;
810
- /**
811
- * Restore the engine's history to the model's `commitId`, once; answers what changed per grid.
812
- *
813
- * @remarks
814
- * The changed regions are the union of what every engine commit between the two snapshots
815
- * recorded as touched (`IntentTouched`), whichever direction the restore goes; they are marked
816
- * dirty so the pass that follows recomputes them, and handed back so each grid can re-vend the
817
- * blocks over them. An id the engine no longer holds is answered with `null`: the engine's
818
- * history is shorter than the model's there, and a seed is what brings it back (step 3).
819
- * @internal
820
- */
821
- _revertTo(commitId: string): Map<string, IRange.Coords[]> | null;
822
632
  /**
823
633
  * Hook the rollback of the savepoint a request goes out under, the first time one does: a
824
634
  * `rollback` message follows, through the channel, if it rolls back. By a step that shares the
@@ -828,11 +638,6 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
828
638
  */
829
639
  protected _hookRollback(landingId: string): void;
830
640
  private _rollbackHooked;
831
- /**
832
- * A nested savepoint of the model rolled back: what the engine landed under it goes with it.
833
- * What a `rollback` message does.
834
- */
835
- protected _savepointRolledBack(savepointId: string): void;
836
641
  /** @inheritdoc ICalculation.getStatus */
837
642
  getStatus(): ICalculation.Status;
838
643
  /**
@@ -855,13 +660,17 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
855
660
  toJSON(): ICalculation.JSON;
856
661
  /** @inheritdoc ICalculation.ready */
857
662
  ready(options?: ICalculation.CalculateOptions): Promise<ICalculation.Status>;
663
+ /** {@inheritDoc ICalculation.waitUntil} */
664
+ waitUntil<T>(work: Promise<T>): Promise<T>;
858
665
  /** One round of `ready()`: up, drained, and the passes the dirty set owes (none in manual mode). */
859
666
  protected _readyPass(full: boolean): Promise<void>;
860
667
  /** @inheritdoc ICalculation.getCalculationState */
861
668
  getCalculationState(): ICalculation.CalculationState;
862
669
  /**
863
670
  * Work in flight: answers owed to the model, a drain posted or running, deferred actions, a pass
864
- * owed or running, the boot. What `ready()` waits out.
671
+ * owed or running, the boot, and what consumers derive from the results ({@link waitUntil}) -
672
+ * except in manual mode, where the pass that work waits for runs only when asked. What `ready()`
673
+ * waits out.
865
674
  */
866
675
  protected _isWorking(): boolean;
867
676
  /**
@@ -938,6 +747,8 @@ export declare namespace Calculation {
938
747
  authoredAt: IRange.CellCoords;
939
748
  /** Each cell of the block is its own 1x1 array-entered formula. See {@link ICalculation.EvaluateOptions.arrayFirstCell}. */
940
749
  arrayFirstCell?: boolean;
750
+ /** How long to wait for the cells' async calls. See {@link ICalculation.EvaluateOptions.timeout}. */
751
+ timeout?: number;
941
752
  }
942
753
  /** See {@link Calculation._createFormulaHost}. */
943
754
  interface FormulaHostOptions {
@@ -949,6 +760,8 @@ export declare namespace Calculation {
949
760
  unanchored?: boolean;
950
761
  /** `true` for a body whose every cell is its own 1x1 array-entered formula. See {@link ICalcGrid.isArrayFirstCell}. */
951
762
  arrayFirstCell?: boolean;
763
+ /** `true` for a body whose blank region may be evaluated a tile at a time. See {@link FormulaHost.request}. */
764
+ paged?: boolean;
952
765
  /** The grid's size: fixed, a name's. */
953
766
  entireCoords?: IRange.Coords;
954
767
  /** The grid whose size the body has, whatever it is then: a sheet's, for a body on it. */
@@ -960,8 +773,8 @@ export declare namespace Calculation {
960
773
  }
961
774
  /** The owner's sheet list as {@link Calculation._setSheets} holds it. */
962
775
  interface SheetList {
963
- /** Every sheet's grid id and name, in tab order. */
964
- readonly sheets: readonly (readonly [id: string, name: string | null])[];
776
+ /** Every sheet's grid id and name, in tab order, and `true` third for a sheet with no grid. */
777
+ readonly sheets: readonly (readonly [id: string, name: string | null, gridless?: boolean])[];
965
778
  }
966
779
  /** See {@link Calculation._createCalcGrid}. */
967
780
  interface CalcGridOptions extends CalcGrid.HostOptions, Pick<CalcGrid.ConstructorOptions, 'valuesAxis'> {
@@ -973,6 +786,8 @@ export declare namespace Calculation {
973
786
  unanchored?: boolean;
974
787
  /** See {@link CalcGridSpec.arrayFirstCell}. */
975
788
  arrayFirstCell?: boolean;
789
+ /** See {@link CalcGridSpec.paged}. */
790
+ paged?: boolean;
976
791
  /** See {@link CalcGridSpec.entireCoords}. */
977
792
  entireCoords?: IRange.Coords;
978
793
  /** See {@link CalcGridSpec.sizeOf}. */
@@ -994,6 +809,15 @@ export declare namespace Calculation {
994
809
  * @see {@link FunctionProvider}
995
810
  */
996
811
  functions?: readonly FunctionProvider[];
812
+ /**
813
+ * Custom functions to register at every start, ahead of the first pass: a workbook's script
814
+ * functions, so a formula calling one calculates on load rather than answering `#NAME?`.
815
+ *
816
+ * @remarks
817
+ * Asked once per start, alongside loading the engine. A function the registry refuses (a
818
+ * built-in's name) is reported and skipped; the start goes on with the rest.
819
+ */
820
+ startFunctions?: () => Promise<readonly IFunction[]>;
997
821
  /**
998
822
  * Returns the active cell — the current selection anchor — with its sheet id as `scope`.
999
823
  * Supplies the default scope for temporary / named-formula resolution, and the default
@@ -1051,6 +875,15 @@ export declare namespace Calculation {
1051
875
  getSheetIndex?: (sheetName?: string) => number;
1052
876
  getSheetCount?: () => number;
1053
877
  strings?: IStringCollection;
878
+ /**
879
+ * The workbook's binary resources (image bytes), for rich values a formula makes.
880
+ */
881
+ resources?: IResourceCollection;
882
+ /**
883
+ * The workbook's fetch, for async functions (`IFormulaContext.IBatchContext.fetch`). Omitted,
884
+ * the global `fetch`.
885
+ */
886
+ fetch?: (input: string, init?: RequestInit) => Promise<Response>;
1054
887
  /**
1055
888
  * Whether to perform iterative calculations when there are circular dependencies.
1056
889
  *
@@ -1090,70 +923,5 @@ interface HeldRequest {
1090
923
  resolve: (response: CalcResponse | PromiseLike<CalcResponse>) => void;
1091
924
  reject: (error: unknown) => void;
1092
925
  }
1093
- interface State extends AbstractModel.State {
1094
- /** The model commit this engine commit mirrors; written by every mirror so the commit lands. */
1095
- mirrorOf?: string;
1096
- /**
1097
- * Top down evaluation and marking dirty.
1098
- * This is the only spatial map that is completely updated via api.
1099
- *
1100
- * @remarks
1101
- * For top down evaluation and marking formulas dirty.
1102
- */
1103
- formulaSpatial: ISpatialMap3D<FormulaSpatialValue>;
1104
- /**
1105
- * Tracks the inputs to formulas.
1106
- *
1107
- * @remarks
1108
- * * For bottom up marking dirty.
1109
- * * Contains a back-pointer to the formula.
1110
- *
1111
- */
1112
- precedentSpatial: ISpatialMap3D<PrecedentSpatialValue>;
1113
- /**
1114
- * Tracks dynamic precedents by block.
1115
- * Used to remove old dynamic precedents when a block is re-evaluated and to add new ones after evaluation.
1116
- */
1117
- dynamicByBlock: Map<FormulaSpatialValue, ISpatialMap.Entry<PrecedentSpatialValue>[]>;
1118
- /**
1119
- * Dirty regions
1120
- */
1121
- dirtySpatial: ISpatialMap3D;
1122
- /**
1123
- * If true, the next calculation will be a full calc regardless of dirty state. Used for example when the engine detects a circular dependency and needs to fallback to iterative calculation or when the user explicitly requests a full calc.
1124
- */
1125
- isFullCalcRequired: boolean;
1126
- /**
1127
- * All registered grids.
1128
- */
1129
- gridsAll: Map<string, CalcGridBackend>;
1130
- /**
1131
- * The engine's replica of the model's sheet list (DESIGN-CALC-SERVICE §8): grid id to name, in
1132
- * tab order. What every symbol lookup, span and sheet-position function reads. Fed by the
1133
- * `sheets` message and by grid registration; versioned here so a revert restores it with the
1134
- * formulas that bound through it.
1135
- */
1136
- sheets: ReadonlyMap<string, string | null>;
1137
- /**
1138
- * The engine's replica of the model's tables (DESIGN-CALC-SERVICE §8): table id to its name and
1139
- * its columns' ids and names. What a structured reference binds and images through. Fed by the
1140
- * `tables` message, seeded at a start, versioned here as {@link sheets} is.
1141
- */
1142
- tables: ReadonlyMap<string, TableSymbols>;
1143
- /**
1144
- * The engine's replica of the defined names: name id to its spelling and the sheet it is scoped
1145
- * to. What a name binds and images through. Fed by the `names` message, as {@link tables} is.
1146
- */
1147
- names: ReadonlyMap<string, NameSymbols>;
1148
- /**
1149
- * Each grid's per-grid maps as of this snapshot (`CalcGridMaps`): values, contentful, spills,
1150
- * errors, pending, circular. Copy-on-write per request; handed back to the grid on a restore.
1151
- */
1152
- gridMaps: Map<string, object>;
1153
- /**
1154
- * Listeners to individual named items
1155
- */
1156
- itemRemoveListeners: (() => void)[];
1157
- }
1158
926
  export {};
1159
927
  //# sourceMappingURL=Calculation.d.ts.map