@sheetxl/sdk 0.7.28-beta.4 → 0.8.0-beta.10

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 (565) hide show
  1. package/THIRD-PARTY-NOTICES.md +1 -1
  2. package/browser/esm/{DBIu6NUHIcxOOBQp.mjs → BEAY9XgKNx-bakXW.mjs} +2 -2
  3. package/browser/esm/BbSmt62FpFIpoVzu.mjs +392 -0
  4. package/browser/esm/BcHmrKHwMMOlzc9_.mjs +357 -0
  5. package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +412 -0
  6. package/browser/esm/Bk7xxbdDpa7-sIwd.mjs +7 -0
  7. package/browser/esm/BqskM7wA8oPfFQue.mjs +20 -0
  8. package/browser/esm/Btg43M1Bf-ENDreu.mjs +540 -0
  9. package/browser/esm/BzLfNyc6OOShIErH.mjs +598 -0
  10. package/browser/esm/C9B0djuUarfNdoj0.mjs +466 -0
  11. package/browser/esm/{CHSahmMFYNB0Ajkf.mjs → CSx9ed1JOs7K5BXO.mjs} +2 -2
  12. package/browser/esm/CYyv6uGjo10ig5FP.mjs +142 -0
  13. package/browser/esm/CZ5oa92wZEAXebgk.mjs +622 -0
  14. package/browser/esm/CdLZWVcH8cncBUPJ.mjs +849 -0
  15. package/browser/esm/Cgd5BnM3hg9RyUel.mjs +171 -0
  16. package/browser/esm/CjsUGJEQSbGjnH6R.mjs +1001 -0
  17. package/browser/esm/ClB5ix51roQOpZEr.mjs +7402 -0
  18. package/browser/esm/{CKk58ZLcrllMzfou.mjs → Cqr3knDsBvoVZ6MN.mjs} +179 -202
  19. package/browser/esm/D4uVlrG0xEFctsSM.mjs +905 -0
  20. package/browser/esm/DOMHmhYzPcLVcpAW.mjs +7 -0
  21. package/browser/esm/DUvUK61b2_4pf4tG.mjs +484 -0
  22. package/browser/esm/De175LygU7ot4nQm.mjs +441 -0
  23. package/browser/esm/DhKkrCVASZ6Isvz6.mjs +527 -0
  24. package/browser/esm/Di58Ji1n--3Mgc_2.mjs +607 -0
  25. package/browser/esm/Dtoyt8q5RyGAlxCp.mjs +1141 -0
  26. package/browser/esm/Y79I7Sm8kjaYexhf.mjs +167 -0
  27. package/browser/esm/index.mjs +1472 -1023
  28. package/browser/esm/o8MFgcVXns987D6_.mjs +400 -0
  29. package/browser/esm/zqJOaweiXE9D8RY1.mjs +66681 -0
  30. package/licenses/dependencies.txt +209 -209
  31. package/node/esm/B6D7sSetrcOWLsKj.mjs +1135 -0
  32. package/node/esm/B9ljpEIZg6wOTzRE.mjs +142 -0
  33. package/node/esm/BH1v-E4Ro3bR7Znw.mjs +962 -0
  34. package/node/esm/BN9j8V9gCExMjVtJ.mjs +540 -0
  35. package/node/esm/{DUYP6faJJHCaW1Xf.mjs → Bh4dv6tMjXX3X4nI.mjs} +1 -1
  36. package/node/esm/Bqd62L8KFgdS0Vou.mjs +7 -0
  37. package/node/esm/Bsx9uijd4X_SKV3L.mjs +360 -0
  38. package/node/esm/BtuY37FumvLE7EBo.mjs +629 -0
  39. package/node/esm/C6ZXsNyLXI6zA63X.mjs +402 -0
  40. package/node/esm/CCouEwT37f08qO3V.mjs +7 -0
  41. package/node/esm/CD9wbvufChVYYkrI.mjs +451 -0
  42. package/node/esm/CImNvdz1iP-lUlro.mjs +610 -0
  43. package/node/esm/CT0CN82y0_Qgoryk.mjs +7568 -0
  44. package/node/esm/CUQi5ZtMO02nhG0W.mjs +596 -0
  45. package/node/esm/CUUoseJmFsCf82bb.mjs +28 -0
  46. package/node/esm/CnSQ7MTXAUAyBOoS.mjs +911 -0
  47. package/node/esm/D7MfcID2Wf6l6VpC.mjs +171 -0
  48. package/node/esm/DCplLG93GfTs1vNw.mjs +1860 -0
  49. package/node/esm/DHUADiCmxNQS1ARz.mjs +417 -0
  50. package/node/esm/DMD12JUh7HJw2-jl.mjs +638 -0
  51. package/node/esm/DdFgXl-Ux2cMBTs_.mjs +15 -0
  52. package/node/esm/DefYISWfdZJFx57m.mjs +255 -0
  53. package/node/esm/Ds0d8zXzmgOu3MGx.mjs +403 -0
  54. package/node/esm/MiU4rDOiocmJ-9Ry.mjs +1783 -0
  55. package/node/esm/index.mjs +49153 -36824
  56. package/package.json +15 -16
  57. package/resources/contents.json +64 -0
  58. package/resources/fonts/arial-bold-italic.metrics.json +139 -0
  59. package/resources/fonts/arial-bold.metrics.json +139 -0
  60. package/resources/fonts/arial-italic.metrics.json +139 -0
  61. package/resources/fonts/arial-regular.metrics.json +139 -0
  62. package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
  63. package/resources/fonts/calibri-bold.metrics.json +137 -0
  64. package/resources/fonts/calibri-italic.metrics.json +137 -0
  65. package/resources/fonts/calibri-regular.metrics.json +137 -0
  66. package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
  67. package/resources/fonts/cambria-bold.metrics.json +66 -0
  68. package/resources/fonts/cambria-italic.metrics.json +66 -0
  69. package/resources/fonts/cambria-regular.metrics.json +66 -0
  70. package/resources/fonts/contents.json +126 -0
  71. package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
  72. package/resources/fonts/courier-new-bold.metrics.json +143 -0
  73. package/resources/fonts/courier-new-italic.metrics.json +143 -0
  74. package/resources/fonts/courier-new-regular.metrics.json +143 -0
  75. package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
  76. package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
  77. package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
  78. package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
  79. package/resources/locales/de/model.msg.json +112 -12
  80. package/resources/locales/en/model.msg.json +119 -13
  81. package/types/scripting-api.json +8048 -0
  82. package/types/scripting-enums.json +277 -106
  83. package/types/scripting.d.ts +18126 -7971
  84. package/types/src/anchored/AbstractAnchored.d.ts +18 -8
  85. package/types/src/anchored/AnchoredMap.d.ts +2 -0
  86. package/types/src/anchored/IAnchoredMap.d.ts +52 -4
  87. package/types/src/autoFill/AutoFill.d.ts +316 -32
  88. package/types/src/autoFill/IAutoFill.d.ts +232 -15
  89. package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +42 -41
  90. package/types/src/border/index.d.ts +1 -1
  91. package/types/src/calculation/Calculation.d.ts +759 -49
  92. package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
  93. package/types/src/calculation/FormulaText.d.ts +82 -0
  94. package/types/src/calculation/ICalculation.d.ts +318 -81
  95. package/types/src/calculation/INamedFormulasCollection.d.ts +5 -8
  96. package/types/src/calculation/NamedFormulaCollection.d.ts +139 -107
  97. package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
  98. package/types/src/calculation/TokenType.d.ts +9 -0
  99. package/types/src/calculation/Types.d.ts +83 -2
  100. package/types/src/calculation/_CloneBoundary.d.ts +80 -0
  101. package/types/src/calculation/_TableRename.d.ts +13 -0
  102. package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
  103. package/types/src/calculation/compiler/CompilerUtils.d.ts +135 -44
  104. package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
  105. package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
  106. package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
  107. package/types/src/calculation/compiler/ParserUtils.d.ts +26 -1
  108. package/types/src/calculation/compiler/SRParser.d.ts +2 -1
  109. package/types/src/calculation/compiler/Types.d.ts +79 -9
  110. package/types/src/calculation/executor/CalcExecutor.d.ts +422 -34
  111. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +43 -2
  112. package/types/src/calculation/executor/CircularReference.d.ts +2 -0
  113. package/types/src/calculation/formula/Formula.d.ts +58 -21
  114. package/types/src/calculation/formula/FormulaBlock.d.ts +125 -23
  115. package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
  116. package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
  117. package/types/src/calculation/formula/IFormulaBlock.d.ts +261 -67
  118. package/types/src/calculation/formula/LambdaValue.d.ts +46 -23
  119. package/types/src/calculation/formula/LazyValue.d.ts +96 -0
  120. package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
  121. package/types/src/calculation/formula/index.d.ts +1 -0
  122. package/types/src/calculation/functions/FunctionDeclarations.d.ts +31 -0
  123. package/types/src/calculation/functions/Operators.d.ts +8 -0
  124. package/types/src/calculation/functions/initializeFunctions.d.ts +15 -2
  125. package/types/src/calculation/grid/CalcGrid.d.ts +407 -158
  126. package/types/src/calculation/grid/CalcGridBackend.d.ts +493 -0
  127. package/types/src/calculation/grid/CalcGridProxy.d.ts +133 -0
  128. package/types/src/calculation/grid/CalcGridUtils.d.ts +62 -12
  129. package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
  130. package/types/src/calculation/grid/FormulaHost.d.ts +239 -0
  131. package/types/src/calculation/grid/ICalcGrid.d.ts +499 -141
  132. package/types/src/calculation/grid/_CalcRequest.d.ts +289 -0
  133. package/types/src/calculation/grid/index.d.ts +4 -0
  134. package/types/src/calculation/index.d.ts +2 -0
  135. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
  136. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +339 -11
  137. package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
  138. package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
  139. package/types/src/calculation/spatial/index.d.ts +1 -0
  140. package/types/src/calculation/state/CalcInputs.d.ts +41 -0
  141. package/types/src/calculation/state/CalcNode.d.ts +160 -29
  142. package/types/src/calculation/state/CalcScope.d.ts +37 -0
  143. package/types/src/calculation/state/CalcState.d.ts +22 -1
  144. package/types/src/calculation/state/CalculationContext.d.ts +53 -4
  145. package/types/src/calculation/state/IContextContainer.d.ts +159 -26
  146. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
  147. package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
  148. package/types/src/calculation/state/index.d.ts +1 -0
  149. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
  150. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
  151. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
  152. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
  153. package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
  154. package/types/src/calculation/symbol/index.d.ts +3 -2
  155. package/types/src/cell/ICell.d.ts +104 -29
  156. package/types/src/cell/ICellHeader.d.ts +24 -2
  157. package/types/src/cell/ICellProtection.d.ts +50 -10
  158. package/types/src/cellRange/ICellRange.d.ts +458 -97
  159. package/types/src/cellRange/ICellRanges.d.ts +23 -21
  160. package/types/src/chart/Chart.d.ts +41 -13
  161. package/types/src/chart/ChartCollection.d.ts +26 -0
  162. package/types/src/chart/IChart.d.ts +166 -12
  163. package/types/src/chart/IChartCollection.d.ts +25 -0
  164. package/types/src/chart/_ChartXml.d.ts +70 -0
  165. package/types/src/chart/index.d.ts +1 -3
  166. package/types/src/collections/ArraysGrid.d.ts +1 -1
  167. package/types/src/collections/IGrid.d.ts +1 -1
  168. package/types/src/collections/ISparseGrid.d.ts +9 -0
  169. package/types/src/collections/ISpatialMap.d.ts +59 -21
  170. package/types/src/collections/ImmutableList.d.ts +28 -0
  171. package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
  172. package/types/src/collections/OverlappingRangeIterator.d.ts +13 -17
  173. package/types/src/collections/RepeatingList.d.ts +7 -0
  174. package/types/src/collections/ScalarGrid.d.ts +50 -0
  175. package/types/src/collections/SparseGrid.d.ts +1 -1
  176. package/types/src/collections/SpatialMap.d.ts +13 -21
  177. package/types/src/collections/Tuple.d.ts +128 -16
  178. package/types/src/collections/_GridUtils.d.ts +19 -6
  179. package/types/src/collections/_RangeSweep.d.ts +97 -0
  180. package/types/src/collections/_SpatialUtils.d.ts +20 -2
  181. package/types/src/collections/index.d.ts +1 -0
  182. package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
  183. package/types/src/comment/Comment.d.ts +223 -0
  184. package/types/src/comment/CommentCollection.d.ts +40 -0
  185. package/types/src/comment/IComment.d.ts +340 -50
  186. package/types/src/comment/ICommentCollection.d.ts +90 -0
  187. package/types/src/comment/NoteMovable.d.ts +26 -0
  188. package/types/src/comment/_CommentUtils.d.ts +50 -0
  189. package/types/src/comment/_NoteBox.d.ts +50 -0
  190. package/types/src/comment/index.d.ts +1 -0
  191. package/types/src/condition/AnchoredConditional.d.ts +82 -17
  192. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
  193. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
  194. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
  195. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
  196. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
  197. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
  198. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
  199. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
  200. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
  201. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
  202. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
  203. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
  204. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
  205. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
  206. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
  207. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
  208. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
  209. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
  210. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
  211. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
  212. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
  213. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
  214. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  215. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
  216. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
  217. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
  218. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
  219. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
  220. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
  221. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
  222. package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
  223. package/types/src/condition/Condition.d.ts +19 -1
  224. package/types/src/condition/ICondition.d.ts +293 -73
  225. package/types/src/condition/_ConditionFormula.d.ts +152 -0
  226. package/types/src/condition/_ConditionUtils.d.ts +167 -13
  227. package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
  228. package/types/src/conditionalFormat/ConditionalFormat.d.ts +25 -14
  229. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
  230. package/types/src/conditionalFormat/IConditionalFormat.d.ts +12 -10
  231. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
  232. package/types/src/dataValidation/DataValidation.d.ts +69 -3
  233. package/types/src/dataValidation/DataValidationCollection.d.ts +20 -9
  234. package/types/src/dataValidation/IDataValidation.d.ts +149 -30
  235. package/types/src/dataValidation/IDataValidationCollection.d.ts +10 -2
  236. package/types/src/date/DateUtils.d.ts +20 -0
  237. package/types/src/date/_DateUtils.d.ts +91 -7
  238. package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
  239. package/types/src/externalBook/ExternalBookName.d.ts +96 -0
  240. package/types/src/externalBook/IExternalBook.d.ts +170 -18
  241. package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
  242. package/types/src/externalBook/index.d.ts +1 -0
  243. package/types/src/{lib/file → file}/file.browser.d.ts +22 -8
  244. package/types/src/{lib/file → file}/file.node.d.ts +7 -2
  245. package/types/src/fill/IEffect.d.ts +5 -5
  246. package/types/src/fill/IFill.d.ts +123 -78
  247. package/types/src/fill/IStroke.d.ts +190 -64
  248. package/types/src/fill/RectAlignment.d.ts +20 -0
  249. package/types/src/fill/_Fills.d.ts +187 -0
  250. package/types/src/fill/_Stroke.d.ts +89 -0
  251. package/types/src/fill/index.d.ts +1 -0
  252. package/types/src/filter/IFilter.d.ts +188 -5
  253. package/types/src/font/AdvanceBuilder.d.ts +25 -0
  254. package/types/src/font/AdvanceTable.d.ts +114 -0
  255. package/types/src/font/FontCollection.d.ts +57 -0
  256. package/types/src/font/IFont.d.ts +17 -0
  257. package/types/src/font/IFontCollection.d.ts +120 -22
  258. package/types/src/font/TableFileAdvanceBuilder.d.ts +27 -0
  259. package/types/src/font/_BuiltinFontTables.d.ts +10 -0
  260. package/types/src/font/index.d.ts +4 -1
  261. package/types/src/group/Group.d.ts +136 -0
  262. package/types/src/group/GroupMovableCollection.d.ts +37 -0
  263. package/types/src/group/IGroup.d.ts +129 -0
  264. package/types/src/group/index.d.ts +2 -0
  265. package/types/src/history/IHistory.d.ts +3 -2
  266. package/types/src/hyperlink/IHyperlink.d.ts +13 -0
  267. package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
  268. package/types/src/i18n/LanguagePack.d.ts +12 -4
  269. package/types/src/index.d.ts +5 -0
  270. package/types/src/io/AbstractBackingStore.d.ts +24 -1
  271. package/types/src/io/ArrayBackingStore.d.ts +1 -1
  272. package/types/src/io/EmbeddedPart.d.ts +20 -0
  273. package/types/src/io/IEmbeddedPart.d.ts +63 -0
  274. package/types/src/io/IWorkbookIO.d.ts +185 -18
  275. package/types/src/io/WorkbookIO.d.ts +9 -0
  276. package/types/src/io/WorkbookOrigin.d.ts +20 -11
  277. package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
  278. package/types/src/io/_XmlFragment.d.ts +49 -0
  279. package/types/src/io/index.d.ts +1 -0
  280. package/types/src/license/LicenseDetails.d.ts +1 -0
  281. package/types/src/license/LicenseManager.d.ts +4 -1
  282. package/types/src/license/Types.d.ts +38 -0
  283. package/types/src/license/_Utils.d.ts +22 -0
  284. package/types/src/license/details.d.ts +24 -0
  285. package/types/src/license/license-key.d.ts +49 -2
  286. package/types/src/license/runtime.browser.d.ts +41 -0
  287. package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +9 -12
  288. package/types/src/listener/IListener.d.ts +12 -7
  289. package/types/src/listener/ListenerEmitter.d.ts +46 -5
  290. package/types/src/model/AbstractModel.d.ts +14 -5
  291. package/types/src/movable/AbstractMovableContent.d.ts +182 -0
  292. package/types/src/movable/CustomElement.d.ts +4 -5
  293. package/types/src/movable/ErrorContent.d.ts +49 -0
  294. package/types/src/movable/FormControl.d.ts +285 -0
  295. package/types/src/movable/GroupMember.d.ts +87 -0
  296. package/types/src/movable/ICustomElement.d.ts +7 -2
  297. package/types/src/movable/IErrorContent.d.ts +23 -0
  298. package/types/src/movable/IFormControl.d.ts +455 -0
  299. package/types/src/movable/IMovable.d.ts +378 -46
  300. package/types/src/movable/IMovableCollection.d.ts +63 -3
  301. package/types/src/movable/Movable.d.ts +149 -49
  302. package/types/src/movable/MovableCollection.d.ts +15 -8
  303. package/types/src/movable/MovableContentRegistry.d.ts +113 -0
  304. package/types/src/movable/_BuiltInContents.d.ts +14 -0
  305. package/types/src/movable/_ContentFactory.d.ts +35 -0
  306. package/types/src/movable/_DrawnBounds.d.ts +37 -0
  307. package/types/src/movable/_InsertableCollection.d.ts +28 -0
  308. package/types/src/movable/_MovableUtils.d.ts +5 -0
  309. package/types/src/movable/_PendingContent.d.ts +25 -0
  310. package/types/src/movable/_PlacementUtils.d.ts +55 -0
  311. package/types/src/movable/_RotatedFrame.d.ts +20 -0
  312. package/types/src/movable/index.d.ts +7 -1
  313. package/types/src/named/AbstractNamed.d.ts +1 -1
  314. package/types/src/named/INamed.d.ts +4 -1
  315. package/types/src/named/INamedCollection.d.ts +26 -0
  316. package/types/src/named/NamedCollection.d.ts +16 -15
  317. package/types/src/numFmt/BuiltInFormats.d.ts +20 -7
  318. package/types/src/numFmt/IFormatEngine.d.ts +2 -0
  319. package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
  320. package/types/src/numFmt/_FormatCell.d.ts +11 -2
  321. package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
  322. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
  323. package/types/src/outline/IOutline.d.ts +186 -0
  324. package/types/src/outline/Outline.d.ts +157 -0
  325. package/types/src/outline/index.d.ts +2 -0
  326. package/types/src/person/IPerson.d.ts +99 -0
  327. package/types/src/person/IPersonCollection.d.ts +51 -0
  328. package/types/src/person/Person.d.ts +32 -0
  329. package/types/src/person/PersonCollection.d.ts +49 -0
  330. package/types/src/person/index.d.ts +4 -0
  331. package/types/src/picture/IPicture.d.ts +33 -3
  332. package/types/src/picture/Picture.d.ts +33 -13
  333. package/types/src/pivot/IPivotTable.d.ts +72 -0
  334. package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
  335. package/types/src/pivot/PivotCache.d.ts +34 -0
  336. package/types/src/pivot/PivotTable.d.ts +61 -0
  337. package/types/src/pivot/PivotTableCollection.d.ts +25 -0
  338. package/types/src/pivot/_PivotXml.d.ts +24 -0
  339. package/types/src/pivot/index.d.ts +6 -0
  340. package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
  341. package/types/src/primitives/Criteria.d.ts +1 -1
  342. package/types/src/primitives/Grouping.d.ts +65 -0
  343. package/types/src/primitives/LambdaBrand.d.ts +26 -0
  344. package/types/src/primitives/PrimitiveUtils.d.ts +60 -21
  345. package/types/src/primitives/Range.d.ts +136 -26
  346. package/types/src/primitives/RangeStats.d.ts +30 -2
  347. package/types/src/primitives/ReferenceRange.d.ts +44 -0
  348. package/types/src/primitives/Runtime.d.ts +15 -2
  349. package/types/src/primitives/environment.browser.d.ts +9 -0
  350. package/types/src/primitives/environment.node.d.ts +10 -0
  351. package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
  352. package/types/src/primitives/stats/Cancellation.d.ts +13 -0
  353. package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
  354. package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
  355. package/types/src/primitives/stats/Ranked.d.ts +1 -1
  356. package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
  357. package/types/src/primitives/stats/index.d.ts +1 -0
  358. package/types/src/print/IPrint.d.ts +0 -22
  359. package/types/src/protectedRange/IProtectedRange.d.ts +4 -0
  360. package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
  361. package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
  362. package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
  363. package/types/src/protection/DefaultProtection.d.ts +12 -1
  364. package/types/src/protection/IProtection.d.ts +36 -2
  365. package/types/src/reference/ReferenceUtils.d.ts +80 -0
  366. package/types/src/reference/index.d.ts +2 -0
  367. package/types/src/resource/IResource.d.ts +21 -1
  368. package/types/src/resource/IResourceCollection.d.ts +9 -1
  369. package/types/src/resource/ResourceCollection.d.ts +6 -6
  370. package/types/src/scripting/FunctionArguments.d.ts +22 -0
  371. package/types/src/scripting/FunctionCollection.d.ts +49 -15
  372. package/types/src/scripting/IFunctionCollection.d.ts +62 -32
  373. package/types/src/scripting/IModule.d.ts +25 -0
  374. package/types/src/scripting/IModuleCollection.d.ts +17 -0
  375. package/types/src/scripting/IScript.d.ts +28 -26
  376. package/types/src/scripting/Module.d.ts +34 -6
  377. package/types/src/scripting/ModuleCollection.d.ts +17 -12
  378. package/types/src/scripting/Runtime.d.ts +15 -0
  379. package/types/src/scripting/Scripts.d.ts +3 -7
  380. package/types/src/scripting/TypedFunction.d.ts +200 -4
  381. package/types/src/scripting/_FunctionIndex.d.ts +8 -3
  382. package/types/src/scripting/_ModuleUtils.d.ts +11 -1
  383. package/types/src/scripting/_ScriptUtils.d.ts +3 -0
  384. package/types/src/scripting/declarations.browser.d.ts +10 -0
  385. package/types/src/scripting/declarations.d.ts +49 -0
  386. package/types/src/scripting/declarations.node.d.ts +9 -0
  387. package/types/src/scripting/index.d.ts +3 -0
  388. package/types/src/selection/IMovableSelection.d.ts +148 -0
  389. package/types/src/selection/IRangeSelection.d.ts +9 -4
  390. package/types/src/selection/MovableSelection.d.ts +48 -0
  391. package/types/src/selection/RangeSelection.d.ts +15 -0
  392. package/types/src/selection/index.d.ts +1 -0
  393. package/types/src/shape/GeometryPreset.d.ts +197 -0
  394. package/types/src/shape/IGeometry.d.ts +380 -0
  395. package/types/src/shape/IShape.d.ts +341 -194
  396. package/types/src/shape/IShapeStyle.d.ts +135 -0
  397. package/types/src/shape/Shape.d.ts +107 -21
  398. package/types/src/shape/ShapeStyleUtils.d.ts +54 -0
  399. package/types/src/shape/_ConnectorFrame.d.ts +32 -0
  400. package/types/src/shape/_ConnectorRoute.d.ts +33 -0
  401. package/types/src/shape/_Connectors.d.ts +108 -0
  402. package/types/src/shape/_Geometry.d.ts +14 -0
  403. package/types/src/shape/_GeometryLoader.d.ts +21 -0
  404. package/types/src/shape/_ShapeStyle.d.ts +70 -0
  405. package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
  406. package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
  407. package/types/src/shape/_builtIn/arrows.d.ts +6 -0
  408. package/types/src/shape/_builtIn/basic.d.ts +6 -0
  409. package/types/src/shape/_builtIn/callouts.d.ts +6 -0
  410. package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
  411. package/types/src/shape/_builtIn/lines.d.ts +6 -0
  412. package/types/src/shape/_builtIn/math.d.ts +6 -0
  413. package/types/src/shape/_builtIn/other.d.ts +6 -0
  414. package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
  415. package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
  416. package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
  417. package/types/src/shape/geometry/format.d.ts +3 -0
  418. package/types/src/shape/geometry/geometry.d.ts +85 -0
  419. package/types/src/shape/geometry/guides.d.ts +54 -0
  420. package/types/src/shape/geometry/handles.d.ts +14 -0
  421. package/types/src/shape/geometry/index.d.ts +7 -0
  422. package/types/src/shape/geometry/lineEnds.d.ts +54 -0
  423. package/types/src/shape/geometry/paths.d.ts +35 -0
  424. package/types/src/shape/geometry/segments.d.ts +114 -0
  425. package/types/src/shape/index.d.ts +3 -0
  426. package/types/src/sheet/CellRegion.d.ts +6 -0
  427. package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
  428. package/types/src/sheet/ISheet.d.ts +197 -50
  429. package/types/src/sheet/ISheetCollection.d.ts +2 -5
  430. package/types/src/sheet/NamedCellRange.d.ts +16 -7
  431. package/types/src/sheet/NamedRange.d.ts +8 -0
  432. package/types/src/sheet/Sheet.d.ts +923 -138
  433. package/types/src/sheet/SheetCell.d.ts +92 -32
  434. package/types/src/sheet/SheetCollection.d.ts +19 -8
  435. package/types/src/sheet/SheetRange.d.ts +92 -17
  436. package/types/src/sheet/SheetRanges.d.ts +22 -9
  437. package/types/src/sheet/_CellBuffer.d.ts +214 -0
  438. package/types/src/sheet/_HeldFormula.d.ts +69 -0
  439. package/types/src/sheet/_InvalidSheetRange.d.ts +7 -7
  440. package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
  441. package/types/src/sheet/_RangeStateSweep.d.ts +16 -0
  442. package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
  443. package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
  444. package/types/src/sheet/_SheetAutoFitUtils.d.ts +28 -0
  445. package/types/src/sheet/_SheetEvents.d.ts +43 -0
  446. package/types/src/sheet/_SheetFilterUtils.d.ts +49 -1
  447. package/types/src/sheet/_SheetIntents.d.ts +296 -0
  448. package/types/src/sheet/_SheetMutations.d.ts +182 -62
  449. package/types/src/sheet/_SheetStateReader.d.ts +19 -13
  450. package/types/src/sheet/_SheetStateTypes.d.ts +83 -78
  451. package/types/src/sheet/_SheetUtils.d.ts +39 -22
  452. package/types/src/sheet/_WatchAnchor.d.ts +93 -0
  453. package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
  454. package/types/src/sheet/spatial/index.d.ts +1 -0
  455. package/types/src/sheet/style/SheetCellStyle.d.ts +209 -304
  456. package/types/src/sheet/style/SheetDirectStyle.d.ts +30 -19
  457. package/types/src/sheet/style/SheetNamedStyle.d.ts +17 -17
  458. package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
  459. package/types/src/sheet/style/_Resolvers.d.ts +14 -8
  460. package/types/src/sheet/style/_StyleUtils.d.ts +38 -8
  461. package/types/src/sheetHeader/ISheetHeader.d.ts +94 -53
  462. package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
  463. package/types/src/sheetHeader/SheetHeader.d.ts +42 -22
  464. package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
  465. package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -3
  466. package/types/src/sheetProtection/ISheetProtection.d.ts +41 -7
  467. package/types/src/sheetProtection/SheetProtection.d.ts +12 -0
  468. package/types/src/sheetView/ISheetView.d.ts +69 -15
  469. package/types/src/sheetView/SheetView.d.ts +20 -11
  470. package/types/src/slicer/ISlicer.d.ts +304 -17
  471. package/types/src/slicer/ISlicerStyle.d.ts +109 -0
  472. package/types/src/slicer/Slicer.d.ts +128 -13
  473. package/types/src/slicer/SlicerStyle.d.ts +25 -0
  474. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
  475. package/types/src/slicer/_SlicerUtils.d.ts +30 -0
  476. package/types/src/slicer/index.d.ts +1 -0
  477. package/types/src/sort/ISort.d.ts +4 -2
  478. package/types/src/string/IStringCollection.d.ts +5 -0
  479. package/types/src/string/StringCollection.d.ts +6 -6
  480. package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +72 -52
  481. package/types/src/style/INamedStyleCollection.d.ts +72 -0
  482. package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
  483. package/types/src/style/IStyleCollection.d.ts +91 -60
  484. package/types/src/style/ITableStyleCollection.d.ts +89 -0
  485. package/types/src/style/NamedStyleCollection.d.ts +39 -0
  486. package/types/src/style/SlicerStyleCollection.d.ts +46 -0
  487. package/types/src/style/StyleCollection.d.ts +81 -26
  488. package/types/src/style/TableStyleCollection.d.ts +49 -0
  489. package/types/src/style/_BuiltInStyleDefs.d.ts +6 -6
  490. package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
  491. package/types/src/style/index.d.ts +7 -1
  492. package/types/src/table/AnchoredTable.d.ts +701 -72
  493. package/types/src/table/AutoTable.d.ts +7 -5
  494. package/types/src/table/ITable.d.ts +261 -34
  495. package/types/src/table/ITableCollection.d.ts +12 -0
  496. package/types/src/table/ITableStyle.d.ts +37 -37
  497. package/types/src/table/TableCollection.d.ts +19 -8
  498. package/types/src/table/_FilterField.d.ts +19 -6
  499. package/types/src/table/_NamedTable.d.ts +17 -1
  500. package/types/src/table/_NamedTableSource.d.ts +1 -0
  501. package/types/src/table/_SortField.d.ts +2 -0
  502. package/types/src/table/_TableColumn.d.ts +13 -2
  503. package/types/src/table/_TableMessages.d.ts +1 -0
  504. package/types/src/table/_TableUtils.d.ts +40 -0
  505. package/types/src/text/Bullet.d.ts +4 -0
  506. package/types/src/text/IText.d.ts +182 -0
  507. package/types/src/text/ITextFrame.d.ts +110 -1
  508. package/types/src/text/TextBoxAlignment.d.ts +25 -16
  509. package/types/src/text/TextFrame.d.ts +4 -0
  510. package/types/src/text/TextLine.d.ts +4 -0
  511. package/types/src/text/TextParagraph.d.ts +4 -0
  512. package/types/src/text/TextRotation.d.ts +3 -3
  513. package/types/src/text/TextRun.d.ts +9 -0
  514. package/types/src/text/TextStacked.d.ts +83 -0
  515. package/types/src/text/index.d.ts +1 -0
  516. package/types/src/text/richtext/IRichText.d.ts +36 -0
  517. package/types/src/text/richtext/IStyledFont.d.ts +18 -18
  518. package/types/src/text/richtext/index.d.ts +1 -0
  519. package/types/src/theme/ITheme.d.ts +45 -4
  520. package/types/src/theme/IThemeCollection.d.ts +2 -0
  521. package/types/src/theme/ThemeCollection.d.ts +11 -7
  522. package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
  523. package/types/src/transaction/ITransaction.d.ts +258 -45
  524. package/types/src/transaction/Transaction.d.ts +101 -11
  525. package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
  526. package/types/src/type/AbstractCollection.d.ts +101 -0
  527. package/types/src/type/ICollection.d.ts +117 -0
  528. package/types/src/type/ITypes.d.ts +9 -7
  529. package/types/src/type/index.d.ts +1 -0
  530. package/types/src/utils/_CSSUtils.d.ts +3 -3
  531. package/types/src/wasm/_sdkWasm.d.ts +7 -0
  532. package/types/src/wasm/index.d.ts +2 -0
  533. package/types/src/wasm/sdkWasm.d.ts +29 -0
  534. package/types/src/workbook/IWorkbook.d.ts +180 -40
  535. package/types/src/workbook/Workbook.d.ts +123 -10
  536. package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
  537. package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
  538. package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
  539. package/types/src/workbookView/IWorkbookView.d.ts +12 -0
  540. package/types/src/workbookView/WorkbookView.d.ts +5 -0
  541. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  542. package/browser/cjs/BF14ZEAnaqxXroSj.cjs +0 -1
  543. package/browser/cjs/BXtvdT1Z-MsB_o5F.cjs +0 -1
  544. package/browser/cjs/Bc4JjVVZfFo3R4He.cjs +0 -33
  545. package/browser/cjs/CD2RXdnfqSYNc6gX.cjs +0 -57
  546. package/browser/cjs/DcLpXGexEtOxi-dD.cjs +0 -1
  547. package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +0 -10
  548. package/browser/cjs/index.cjs +0 -3
  549. package/browser/esm/0Mj5WKM362q6CECb.mjs +0 -824
  550. package/browser/esm/CPTtL2f6_4iblmFM.mjs +0 -4436
  551. package/browser/esm/CoA-sUxjiIUIpTUF.mjs +0 -109
  552. package/browser/esm/Dy4Sdpju1T2icURu.mjs +0 -50854
  553. package/node/esm/BtGxbEbBm79YvF_k.mjs +0 -843
  554. package/node/esm/DqgWsVXROpSgKq6c.mjs +0 -114
  555. package/types/src/cellRange/_GraphNode.d.ts +0 -38
  556. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
  557. package/types/src/dataValidation/_Utils.d.ts +0 -10
  558. package/types/src/lib/utils/_Utils.d.ts +0 -20
  559. package/types/src/lib/utils/utils.browser.d.ts +0 -33
  560. package/types/src/movable/IGroup.d.ts +0 -30
  561. package/types/src/movable/IMovableSelection.d.ts +0 -49
  562. package/types/src/sheet/listener/RangesListener.d.ts +0 -32
  563. package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
  564. package/types/src/sheet/listener/index.d.ts +0 -3
  565. /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
@@ -1,25 +1,59 @@
1
1
  import { IRange, IFormulaContext, IRuntime, Scalar } from '@sheetxl/primitives';
2
+ import { IListener } from '../listener';
2
3
  import { FunctionProvider } from '@sheetxl/scripting';
3
4
  import { AbstractModel, IModel } from '../model';
5
+ import { ITransaction } from '../transaction';
4
6
  import { IStringCollection } from '../string';
5
7
  import { IFunctionCollection } from '../scripting';
6
8
  import { ISpatialMap, ISpatialMap3D } from '../collections';
7
9
  import { INamed, INamedCollection } from '../named';
8
10
  import { ICellRange, ICellRanges } from '../cellRange';
9
- import { _NamedGraphNode } from '../cellRange/_GraphNode';
10
- import { FormulaBlockResolvers } from './formula';
11
+ import { NamedNodeInfo } from './Types';
12
+ import { ITable } from '../table';
13
+ import { IExternalBook, IExternalBookCollection } from '../externalBook';
14
+ import { ExternalBookCollection } from '../externalBook/ExternalBookCollection';
15
+ import { ExternalBookBindings } from './ExternalBookBindings';
16
+ import { FormulaBlockResolvers, FormulaImager } from './formula';
11
17
  import { IFormulaCompiler } from './compiler';
12
18
  import { CalculationContext, IContextContainer, CalcNode } from './state';
13
19
  import { FormulaSpatialValue, PrecedentSpatialValue } from './spatial';
14
- import { CalcGrid, ICalcGrid } from './grid';
20
+ import { CalcGridBackend, CalcGrid, FormulaHost, ICalcGrid } from './grid';
21
+ import { CalcRequest, CalcResponse, CalcGridSpec, TableSymbols, NameSymbols } from './grid/_CalcRequest';
15
22
  import { CalcExecutor } from './executor';
23
+ import { IndirectSymbolProvider, ISymbolRegistry } from './symbol';
16
24
  import { ICalculation } from './ICalculation';
17
25
  import { NamedFormulaCollection } from './NamedFormulaCollection';
18
26
  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
+ }
19
53
  /**
20
54
  * Implementation for {@link ICalculation}.
21
55
  */
22
- export declare class Calculation extends AbstractModel<State, ICalculation.JSON, CommitView, ICalculation.IListeners> implements ICalculation {
56
+ export declare class Calculation extends AbstractModel<State, ICalculation.JSON, ICalculation.IListeners> implements ICalculation {
23
57
  protected _container: IContextContainer;
24
58
  protected _context: CalculationContext & IFormulaContext;
25
59
  protected _status: ICalculation.Status;
@@ -27,29 +61,79 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
27
61
  protected _runtime: IRuntime;
28
62
  protected _functions: IFunctionCollection;
29
63
  protected _namedFormulas: NamedFormulaCollection;
64
+ protected _externalBooks: ExternalBookCollection;
65
+ /** The cache as grids and the cached names as virtual grids — see {@link ExternalBookBindings}. */
66
+ protected _externalBindings: ExternalBookBindings | null;
30
67
  /** `json.names` held from construction until {@link hydrateNames} — see it for why. */
31
68
  protected _pendingNames: INamed.JSON[] | null;
32
69
  protected _compiler: IFormulaCompiler;
33
70
  protected _compilerEditing: IFormulaCompiler;
34
71
  protected _compilerEditingSig: string;
72
+ protected _compilerEditingStorage: IFormulaCompiler | null;
35
73
  protected _compilerModule: typeof import('./compiler/FormulaCompiler');
36
74
  protected _getActiveCell: () => IRange.CellCoords | null;
37
75
  protected _getRange: (address: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
38
76
  protected _getRanges: (address: ICellRanges.Address, options?: ICellRange.GetRangeOptions) => ICellRanges;
39
77
  protected _calcExecutor: CalcExecutor;
40
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;
41
84
  protected _volatiles: Set<CalcNode>;
85
+ /** The current handle of every formula host's grid, by grid id. */
86
+ protected _formulaHosts: Map<string, FormulaHost>;
42
87
  protected _calculatedCommitId: string | null;
88
+ protected _calculatedEngineId: string | null;
89
+ protected _modelStore: ITransaction.IStore | null;
90
+ /** The model-side grids, by grid id (DESIGN-CALC-SERVICE §13.23): what a copy lands on, what a start seeds from. */
91
+ protected readonly _fronts: Map<string, CalcGrid>;
92
+ /** What each model grid is, for the `create` a start sends for it (its size is read then). */
93
+ protected readonly _gridSpecs: Map<string, CalcGridSpec>;
94
+ /** The engine holds grids: from a start's boot until a stop. */
95
+ protected _engineUp: boolean;
96
+ protected _modelStoreRemoveListener: IListener.Remove | null;
97
+ protected _mirrorRemoveListener: IListener.Remove | null;
98
+ _modelMirrorId: string | null;
99
+ /** Where the owner's sheet list is held ({@link _setSheets}): the model's store, or a transient one with no model. */
100
+ protected _ownerStore: ITransaction.IStore;
101
+ /** The record holding the owner's sheet list, in {@link _ownerStore}. */
102
+ 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;
110
+ protected _outstanding: Set<Promise<ICalcGrid.Results>> | null;
43
111
  protected _pendingActions: (() => Promise<unknown>)[] | null;
44
112
  protected _pendingPriority: (() => Promise<unknown>)[] | null;
45
113
  protected _draining: boolean;
114
+ protected _drainDepth: number;
46
115
  protected _drainScheduled: boolean;
47
116
  protected _calcOwed: boolean;
117
+ protected _calcOwedBy: string | null;
118
+ protected _channel: HeldRequest[] | null;
119
+ protected _bootPending: Promise<void> | null;
120
+ /** Passes running now: see {@link _calculateNow}. */
121
+ protected _passesInFlight: number;
122
+ /** The calculation state last announced (`onCalculationStateChange`). */
123
+ protected _calculationState: ICalculation.CalculationState;
124
+ /** A check of the calculation state is posted: see {@link _noteCalculationState}. */
125
+ protected _calculationStatePosted: boolean;
126
+ /** `ready()` calls waiting for work in flight to end: woken on every check. */
127
+ protected _calculationStateWaiters: (() => void)[] | null;
128
+ protected _bootFull: boolean;
129
+ protected _bootExplicit: boolean;
130
+ protected _compilerWaiters: (() => void)[] | null;
131
+ protected _wroteWhileOff: boolean;
48
132
  /** {@link ICalculation.getCalculationMode} — gates the reactive pass in {@link _calculate}. */
49
133
  protected _calcMode: ICalculation.CalculationMode;
50
134
  /** {@link ICalculation.getIterativeCalculation} — handed to the executor per pass. */
51
135
  protected _iterate: boolean;
52
- protected _maxIterations: number;
136
+ protected _maxIteration: number;
53
137
  protected _maxIterateChange: number;
54
138
  /** The `calcPr` the file carried, kept whole so settings this engine ignores still round-trip. */
55
139
  protected _calcJSON: ICalculation.JSON | null;
@@ -61,6 +145,9 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
61
145
  * Populated from {@link Calculation.ConstructorOptions} during `_initialize`.
62
146
  */
63
147
  protected _resolvers: FormulaBlockResolvers | null;
148
+ /** Tables as symbols: a table's stable id, which is what a structured reference stores. */
149
+ protected _tableSymbols: IndirectSymbolProvider<INamed<ITable>> | null;
150
+ protected _nameSymbols: IndirectSymbolProvider<ICalculation.INamedFormula> | null;
64
151
  constructor(options?: Calculation.ConstructorOptions);
65
152
  protected _initialize(options?: Calculation.ConstructorOptions): void;
66
153
  /**
@@ -84,19 +171,137 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
84
171
  * @returns `true` if any formula was marked dirty.
85
172
  */
86
173
  protected _markDirtyReferencing(changedIds: Set<string>): boolean;
174
+ /**
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.
186
+ */
187
+ protected _recompileReferencing(changedIds: Set<string>): void;
188
+ /**
189
+ * @internal
190
+ * Rewrites the formulas that reference `table`, which is about to be removed: `'error'` puts
191
+ * `#REF!` in place of each reference (a delete), `'address'` the absolute range it designated
192
+ * (a convert to range).
193
+ *
194
+ * @remarks
195
+ * Called while the table still exists: its id and its extent are read now, and the rewrite runs at
196
+ * the next safe point. A defined name whose body cites the table is not rewritten; it evaluates
197
+ * `#REF!` once the table is gone.
198
+ */
199
+ _releaseTableReferences(table: ITable, release: 'error' | 'address'): void;
200
+ /**
201
+ * @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.
237
+ *
238
+ * @param sheet The sheet the table is on, by id or name.
239
+ * @param columns The table's columns. A reference reaching outside them is an ordinary one.
240
+ * @param match The rows a reference has to span to be one of the body's, as they read NOW.
241
+ * @param headerRow The header's row when a reference from it to `match.rowEnd` also counts.
242
+ * @param to The body's rows now.
243
+ * @param afterShift The rows to match are where a shift THIS edit makes will have put them - a
244
+ * row inserted at the body's first row. The table hears of a shift before the engine has made it,
245
+ * so this waits for the next safe point.
246
+ * @param isCurrent Whether the table is still as this change left it.
247
+ */
248
+ _refitTableRows(sheet: string, columns: {
249
+ colStart: number;
250
+ colEnd: number;
251
+ }, match: {
252
+ rowStart: number;
253
+ rowEnd: number;
254
+ }, headerRow: number | null, to: {
255
+ rowStart: number;
256
+ rowEnd: number;
257
+ }, 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
+ /**
269
+ * @internal
270
+ * Rewrites the 3-D spans that a tab-order change from `before` to `after` broke — an endpoint that
271
+ * `movedId` carried across the other — to their inward neighbor. Called inside the move's commit,
272
+ * so an undo of the move restores the text.
273
+ */
274
+ _replaceSheetSpans(before: readonly string[], after: readonly string[], movedId?: string): void;
87
275
  /**
88
276
  * {@inheritDoc IContextContainer.getNamedDependents}
89
277
  *
90
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
91
288
  * The memo is keyed on the formula spatial's IDENTITY, which is the whole invalidation story:
92
289
  * the map is copy-on-write (`getFormulas().clone()` before any mutation, `setFormulas` to
93
290
  * publish), so a formula added, removed, shifted or recompiled necessarily replaces it — and an
94
291
  * undo, which restores an earlier map, replaces it too. Nothing has to remember to clear this.
95
292
  *
96
293
  * The sweep is the same `all3D` walk `recompileNamed` and {@link _markDirtyReferencing} already
97
- * do, done once for every name instead of once per name.
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.
98
298
  */
99
- protected _getNamedDependents(nameId: string): readonly IRange.Coords[];
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[]>;
100
305
  /**
101
306
  * {@inheritDoc IContextContainer.getNamedDependentNames}
102
307
  *
@@ -121,6 +326,20 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
121
326
  * one naming the changed name directly. Ids that are not names (a table's) expand to themselves.
122
327
  */
123
328
  protected _namedTargets(changedIds: Set<string>): ReadonlySet<string>;
329
+ /**
330
+ * @internal
331
+ * Demand/plan counters and timings since construction (or the last {@link _resetStats}) — the
332
+ * plan-cache soak rig. From a console: `SheetXL.getSelectedWorkbook().getCalculation()._stats()`.
333
+ */
334
+ _stats(): ReturnType<CalcExecutor['getDemandStats']>;
335
+ /** @internal Zeroes every counter/timing so a measurement window starts clean. */
336
+ _resetStats(): void;
337
+ /**
338
+ * @internal
339
+ * Read (no argument) or set the plan-cache mode: `'on'` | `'assert'` | `'off'`. `'assert'` is the
340
+ * diagnostic to flip to if values ever look stale — see `CalcExecutor.planCacheMode`.
341
+ */
342
+ _planCacheMode(mode?: 'off' | 'assert' | 'on'): 'off' | 'assert' | 'on';
124
343
  /** @inheritdoc ICalculation.start */
125
344
  start(): Promise<void>;
126
345
  /**
@@ -132,7 +351,7 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
132
351
  *
133
352
  * - `Starting` — held for `start()`'s drain, which always follows and loops until empty.
134
353
  * - Inside a drain — picked up by the loop already running.
135
- * - `Ready` and settled — a microtask drain is posted (see {@link _scheduleDrain}).
354
+ * - `Running` and settled — a microtask drain is posted (see {@link _scheduleDrain}).
136
355
  *
137
356
  * That last case is why this is no longer called `whenStarting`. It only ever handled work that
138
357
  * arrived while starting: queuing scheduled nothing, and the array was pumped as a side effect of
@@ -146,13 +365,65 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
146
365
  * only inside a calculation. The drain is a safe point, not a synchronization point.
147
366
  */
148
367
  _whenSafe(action: () => Promise<unknown>, priority?: boolean): void;
368
+ /**
369
+ * Sends a grid request through the channel (DESIGN-CALC-SERVICE §4): applied now on a `Running`
370
+ * engine, held in send order while `Starting`, and neither recorded nor sent on an `Off` one -
371
+ * the caller's own view is the truth there, and a start is seeded from it.
372
+ */
373
+ protected _sendRequest(gridId: string, landingId: string | undefined, request: CalcRequest): Promise<ICalcGrid.Results>;
374
+ protected _sendRequestNow(gridId: string, landingId: string | undefined, request: CalcRequest): Promise<CalcResponse>;
375
+ /** Re-judges every held request: `dead` is what `isDead` answers for it now. */
376
+ protected _markHeld(isDead: (held: HeldRequest) => boolean): void;
377
+ /**
378
+ * A start that did not complete: what the channel held is resolved with nothing (the model
379
+ * keeps every write, and the next start is seeded from it), and whoever waited for the
380
+ * compiler is released.
381
+ */
382
+ protected _abandonStart(): void;
383
+ protected _releaseCompilerWaiters(): void;
384
+ /**
385
+ * @internal
386
+ * 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`.
388
+ *
389
+ * @remarks
390
+ * What an owner that registers a formula asynchronously waits on (a condition formula's
391
+ * evaluation). Waiting on {@link ready} instead resolves after the boot pass, and the
392
+ * registration then costs a pass of its own (design §6.5: a boot owes one).
393
+ */
394
+ _whenCanCompile(): Promise<void>;
395
+ /**
396
+ * The start batch (DESIGN-CALC-SERVICE §6.3), in the order the service owns: service-level
397
+ * content first (the names, wired from the priority queue), then the channel in send order
398
+ * (every seed and every request made while the engine was coming up), then the owners that
399
+ * hold a formula of their own (a host whose grid lost its body writes it again; a watch held for
400
+ * the engine registers inside `onReady`), then the one pass the boot owes.
401
+ *
402
+ * @remarks
403
+ * `isLoading()` holds for the whole batch, so a grid seeded here owes its pass rather than
404
+ * running one against siblings not yet seeded. The pass itself runs on a task of its own
405
+ * ({@link _runBoot}): a consumer whose registration chains through promises resolved here (a
406
+ * data validation's, a conditional format's) lands ahead of it, and N of them cost one pass.
407
+ *
408
+ * A held request lands under the engine's current commit: the snapshot it named has been
409
+ * mirrored already, so its writes belong to the tip, and the maps are versioned under that key.
410
+ * One whose snapshot the model has undone since is skipped.
411
+ */
412
+ protected _boot(): Promise<void>;
413
+ /**
414
+ * Posts the boot pass on a task of its own, and answers the promise `start()`, `ready()` and a
415
+ * `calculate()` made meanwhile wait on. One at a time.
416
+ */
417
+ protected _scheduleBoot(): Promise<void>;
418
+ /** The boot pass: what the batch, and the consumers that registered since, owe - once. */
419
+ protected _runBoot(): Promise<void>;
149
420
  /**
150
421
  * Posts a microtask drain, if one is not already coming.
151
422
  *
152
423
  * @remarks
153
424
  * A no-op in the two cases where a drain is already guaranteed to reach this action:
154
425
  *
155
- * - not `Ready` — `start()` drains at the tail of its transition, and does so inline so
426
+ * - not `Running` — `start()` drains at the tail of its transition, and does so inline so
156
427
  * `await start()` covers the queued work. Posting here would race that.
157
428
  * - already draining — `_drainPending` loops until the queue is empty, so an action appended
158
429
  * during a drain is picked up by the pass in flight.
@@ -181,8 +452,23 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
181
452
  * This is deliberately not folded into {@link _drainPending}. The other three sites would then
182
453
  * calculate twice, and `start()` would calculate mid-load — which is the thing `isLoading()`
183
454
  * exists to prevent.
455
+ *
456
+ * The pass is reactive whether or not a grid owed it, so manual mode holds it for `calculate()`.
457
+ * That includes the load: a manual-mode file opens with no pass, as Excel's does — its `ca`
458
+ * cells and value-less formulas stay dirty (`isCalculationRequired()`) until asked. A file whose
459
+ * `calcId` says it needs recalculating still gets one; that is the explicit full pass of
460
+ * `calcOnLoad: 'full'`.
184
461
  */
185
462
  protected _drainStandalone(): Promise<void>;
463
+ /**
464
+ * Owe a reactive pass for `gridId`, to run once the current flush is over.
465
+ *
466
+ * @remarks
467
+ * The posted form of `calculateGrid`: the drain scheduler already coalesces everything owed at
468
+ * the end of a flush into one pass, and this is how a consumer asks for that pass without
469
+ * running one itself. See {@link IContextContainer.requestCalculateGrid}.
470
+ */
471
+ protected _owePass(gridId: string): void;
186
472
  /**
187
473
  * Runs queued actions until the queue is empty. The one drain, used by every site that drains.
188
474
  *
@@ -199,8 +485,8 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
199
485
  * shape, and got away with it only because it goes on to call `grid.calculate()` per dirty grid —
200
486
  * which loop-drains. It held if something was dirty and did not if nothing was.
201
487
  *
202
- * `_draining` is restored rather than cleared, so a nested drain (an action that calculates)
203
- * leaves the outer one's window intact.
488
+ * `_draining` stays set until the last run in flight finishes ({@link _drainDepth}), so a nested
489
+ * drain (an action that calculates) or an overlapping one leaves the other's window intact.
204
490
  *
205
491
  * **Call this under `if (this._pendingActions?.length)`, not unconditionally.** `await` on an
206
492
  * async call yields to the microtask queue even when the callee does nothing, and a calculation
@@ -209,24 +495,352 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
209
495
  * between. An unconditional drain here pushes the whole pass past a microtask boundary and that
210
496
  * read returns the raw text instead (`use-signs.test.ts`).
211
497
  */
212
- protected _drainPending(): Promise<void>;
498
+ protected _drainPending(priorityOnly?: boolean): Promise<void>;
213
499
  /** @inheritdoc ICalculation.calculate */
214
500
  calculate(options?: ICalculation.CalculateOptions | boolean): Promise<ICalculation.Status>;
215
501
  /**
216
502
  * @returns The status the engine is in once the pass has run — `Starting` if the request was
217
- * deferred to the start-up drain, and whatever non-`Ready` status turned it away
503
+ * deferred to the start-up drain, and whatever non-`Running` status turned it away
218
504
  * otherwise. Never `undefined`: it used to resolve that on every path including the
219
505
  * successful one (the tail simply fell off the end), and two call sites cast the result
220
506
  * to `Status` to satisfy {@link ICalculation.calculate}.
221
507
  */
222
508
  protected _calculate(options?: ICalculation.CalculateOptions, gridId?: string): Promise<ICalculation.Status>;
223
- protected _createCalcGrid(options?: CalcGrid.ConstructorOptions): ICalcGrid;
224
- protected _registerGrid(grid: ICalcGrid): void;
509
+ /** 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>;
512
+ /**
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.
515
+ * @internal
516
+ */
517
+ protected _processRestoreOrRevert(state: State, commit: ITransaction.ICommit): void;
518
+ /**
519
+ * Formula text as a cell at `coords` would STORE it, without writing it anywhere.
520
+ *
521
+ * @remarks
522
+ * {@link createFormula} compiles for editing, which keeps what was typed. A committed cell is
523
+ * compiled for storage: `[#This Row]` becomes `@`, and an unqualified structured reference is
524
+ * given the name of the table it binds to - the one at `coords`. An owner that holds formula text
525
+ * apart from any cell (a table column's totals formula while its row is hidden) stores it
526
+ * through this, so it holds what a cell would.
527
+ *
528
+ * @param coords The cell the text is authored at, on the sheet `scope` names (by id or name).
529
+ * @throws When the engine is not Ready, or `scope` names no sheet.
530
+ * @internal
531
+ */
532
+ _toStoredText(expression: string, coords: IRange.CellCoords & {
533
+ scope: string;
534
+ }): string;
535
+ /**
536
+ * Whether a grid under `id` is in the model as the store is now: a held formula's grid that came
537
+ * back with an undone delete is attached to rather than written again.
538
+ * @internal
539
+ */
540
+ /**
541
+ * A grid that holds exactly one formula block, as a handle - see {@link FormulaHost}.
542
+ *
543
+ * @remarks
544
+ * Creates the grid unless the container already has one under `id` (a name's grid outlives a
545
+ * redefine and a delete), then answers a handle over it. The handle resolves the grid by id on
546
+ * every use, so it is safe to hold across snapshots.
547
+ *
548
+ * @internal
549
+ */
550
+ _hasLiveGrid(id: string): boolean;
551
+ _createFormulaHost(options: Calculation.FormulaHostOptions): FormulaHost;
552
+ /**
553
+ * Evaluate an expression once over a block, through the engine.
554
+ *
555
+ * @remarks
556
+ * The implementation of {@link ICalculation.EvaluateOptions.block}: a watch with no lifetime.
557
+ * The body is written over `coords` in a grid that shadows the sheet, exactly as a watch's is
558
+ * (see `WatchAnchor`), one pass evaluates it, and the grid is dropped. What comes back reads over
559
+ * a copy-on-write clone of the dropped grid's values, taken before the drop, so it outlives the
560
+ * grid as a plain object.
561
+ *
562
+ * The grid and its body amend the current commit, as a watch's do: never an undo step. The
563
+ * pass is explicit and seeded from the one grid, so it runs under manual calculation without
564
+ * recalculating what the user has deferred.
565
+ * @internal
566
+ */
567
+ protected _evaluateOver(options: Calculation.EvaluateOverOptions): Promise<IRange>;
568
+ /**
569
+ * A grid for a model to hold (DESIGN-CALC-SERVICE §13.23): the synchronous half, versioned in
570
+ * the model's store, forwarding every verb as a request. The engine's grid is made by the
571
+ * grid's first request, `create`, which an `Off` engine drops: a start makes it then, from this
572
+ * one. What the engine pushes reaches the owner through the grid's events. It opens empty: the
573
+ * owner attaches its listeners, then seeds it.
574
+ * @internal
575
+ */
576
+ _createCalcGrid(options: Calculation.CalcGridOptions): CalcGrid;
577
+ /** What a `create` for a model grid carries: its description. */
578
+ 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
+ /**
585
+ * Make the engine's grids from the model's (design §6.3): each live model grid's `create`, the
586
+ * hosts' first (a name's grid before any sheet's); each host's body sent again; then every grid
587
+ * a sheet owns seeded from what it holds now. Requests like any other: held while `Starting`,
588
+ * applied at once on a `Running` engine that is rebuilt.
589
+ *
590
+ * @param full The seeds ask for a full pass - a start's, which the boot keeps only when
591
+ * something was written while `Off`.
592
+ */
593
+ protected _openEngineGrids(full: boolean): void;
594
+ /**
595
+ * The engine's graph and every grid in it, gone: what `stop()` leaves, and what a rebuild starts
596
+ * from. The model's grids are untouched.
597
+ */
598
+ 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
+ /**
606
+ * The model restored itself to `commitId`: the engine restores its own history there, or - on a
607
+ * `Running` engine whose history does not reach it (a commit from before its start, or one
608
+ * trimmed since) - is rebuilt from the model's grids as they are there, at the next safe point.
609
+ */
610
+ protected _followRestore(commitId: string): void;
611
+ /**
612
+ * Make the engine again from the model, as a start does: its replicas, its grids and their
613
+ * seeds, with the values the model holds trusted.
614
+ */
615
+ protected _rebuildEngine(): void;
616
+ /**
617
+ * Report a failure of a request no caller awaits - a grid's seed - as this calculation's error.
618
+ * @internal
619
+ */
620
+ _reportError(error: unknown): void;
621
+ protected _createBackendGrid(options?: CalcGridBackend.ConstructorOptions): CalcGridBackend;
622
+ protected _registerGrid(grid: CalcGridBackend): void;
225
623
  protected _unregisterGrid(gridId: string): void;
624
+ /** The owner's sheet list as it last said ({@link _setSheets}): what a start seeds the replica from. */
625
+ protected _heldSheets(): Calculation.SheetList['sheets'];
626
+ /** One sheet of {@link _heldSheets} by its grid id, or `undefined` for a grid that is no sheet. */
627
+ protected _heldSheetAt(id: string): Calculation.SheetList['sheets'][number] | undefined;
628
+ /**
629
+ * The owner's sheet list as it is now: every sheet's grid id and name, in tab order, hidden ones
630
+ * included (DESIGN-CALC-SERVICE §8). The owner calls this whenever its list changes - a sheet
631
+ * added, deleted, moved, copied or renamed - and before any grid that names a sheet in it
632
+ * seeds. Not on a restore: this record is restored with the owner's own, and the engine's
633
+ * replica with the engine's store.
634
+ *
635
+ * @remarks
636
+ * Held in the caller's operation (folded into the current commit when none is open) and sent
637
+ * to the engine as one `sheets` message: applied at once on a `Running` engine, held in order
638
+ * while `Starting`. An `Off` engine is told nothing; its next start seeds the replica from this
639
+ * record, and owes a full pass only when a sheet already listed was renamed, moved or removed.
640
+ * @internal
641
+ */
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;
654
+ /**
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.
659
+ */
660
+ protected _enterHeldSheets(held: readonly HeldRequest[]): void;
661
+ /** The model's tables as the replica holds them: by id, each table's name and columns. */
662
+ protected _liveTables(): Map<string, TableSymbols>;
663
+ /** The defined names as the replica holds them: by id, each name's spelling and scope sheet. */
664
+ protected _liveNames(): Map<string, NameSymbols>;
665
+ /**
666
+ * Tell the engine one table's name and columns as they are now, or that it is gone - from the
667
+ * model, at the moment it changes, inside the operation (the sheet's table callbacks). So the
668
+ * message is in the channel where the change happened, between the requests made before it and
669
+ * those made after, and a request held while `Starting` binds the names it was sent under. A
670
+ * restore changes nothing here: it reaches the engine as the revert of its own store. An `Off`
671
+ * engine is told nothing; a start seeds the replica from the model.
672
+ *
673
+ * @remarks
674
+ * Reads the table's own record only: a read of the sheet inside an open operation would make the
675
+ * writes a cell buffer holds.
676
+ * @internal
677
+ */
678
+ _tableChanged(table: ITable, removed: boolean): void;
679
+ /** A name written, as {@link _tableChanged} tells a table. */
680
+ protected _nameWritten(written: NamedFormulaCollection.NamesWritten): void;
681
+ /**
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.
684
+ */
685
+ protected _sendSymbolChange<T>(kind: 'tables' | 'names', id: string, entry: T | null, same: (a: T | null | undefined, b: T | null) => boolean): void;
686
+ /**
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.
689
+ */
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;
693
+ /** What a replica's change re-resolved - healed, renamed, gone - is marked for the next pass. */
694
+ protected _markDirtyReconciled(provider: {
695
+ reconcile(): string[];
696
+ } | null): void;
697
+ private _tablesDerived;
698
+ private _namesDerived;
699
+ /**
700
+ * The table replica and its name index, or `null` while `Off`: an engine that has been told
701
+ * nothing reads the model.
702
+ */
703
+ protected _replicaTables(): {
704
+ of: ReadonlyMap<string, TableSymbols>;
705
+ idByName: Map<string, string>;
706
+ } | null;
707
+ /** The name replica and its spelling index, as {@link _replicaTables}. @internal */
708
+ _replicaNames(): {
709
+ of: ReadonlyMap<string, NameSymbols>;
710
+ idsByName: Map<string, string[]>;
711
+ } | null;
712
+ /**
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
716
+ * collection is asked instead.
717
+ * @internal
718
+ */
719
+ _replicaNameId(name: string, scope: string | null | undefined): string | undefined;
720
+ /** See {@link _modelSymbols}. */
721
+ protected _modelSymbolRegistry: ISymbolRegistry;
722
+ /**
723
+ * The model's symbol map (DESIGN-CALC-SERVICE §8): what the facade images the engine's records
724
+ * against. Sheets answer from the model's live list; the rest from the engine's providers.
725
+ * @internal
726
+ */
727
+ _modelSymbols(): ISymbolRegistry;
728
+ /**
729
+ * What images a grid's records for the model (DESIGN-CALC-SERVICE §8): the model's symbol map,
730
+ * the grid as home scope, its bounds and the reader's locale, both read live so a rename or a
731
+ * locale switch shows without a recompile.
732
+ * @internal
733
+ */
734
+ _imagerFor(gridId: string): FormulaImager;
735
+ private _sheetsDerived;
736
+ private _sheetsCache;
737
+ /** Every sheet's grid id in tab order, from the replica. */
738
+ protected _sheetIds(): readonly string[];
739
+ /** A sheet's grid id by its name, as Excel reads sheet names: case-insensitively. `null` when none. */
740
+ protected _sheetIdByName(name: string): string | null;
741
+ /** A sheet's name by its grid id, or `null` for a grid that is no sheet. */
742
+ protected _sheetName(gridId: string): string | null;
226
743
  /** @inheritdoc ICalculation.stop */
227
744
  stop(): Promise<void>;
745
+ /**
746
+ * {@inheritDoc ITransaction.ITransactional.close}
747
+ *
748
+ * @remarks
749
+ * Brings the ENGINE down before the model goes away. The inherited close is a model close — it
750
+ * flips the closed flag and detaches the transaction listener — which left a closed calculation
751
+ * still reporting {@link ICalculation.Status.Running}, with `onStopping`/`onStop` never sent to
752
+ * listeners that were about to be discarded.
753
+ *
754
+ * {@link stop} resolves synchronously (it awaits nothing), so the `void` here loses no ordering;
755
+ * it is `async` only because the interface says so. It is also a no-op unless the status is
756
+ * `Running`, which is what makes closing a still-STARTING engine safe — `start()` observes the close
757
+ * at its own await points instead.
758
+ */
759
+ close(): void;
760
+ /** A model holding writes for the engine makes them on this read (`ITransaction.Hooks.writes`). */
761
+ 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
+ /** The model commits on the live history: the current one and its ancestors. */
790
+ protected _modelHistory(): Set<string>;
791
+ /**
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.
794
+ */
795
+ protected _foldPhantom(rootId: string): void;
796
+ /**
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).
800
+ */
801
+ 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
+ /**
823
+ * Hook the rollback of the savepoint a request goes out under, the first time one does: a
824
+ * `rollback` message follows, through the channel, if it rolls back. By a step that shares the
825
+ * savepoint and writes nothing - its outcome hooks pass to the savepoint when it closes. A
826
+ * request landing on the operation's own commit (`<id>:0`) needs none: a root rollback is seen by
827
+ * the engine's listener on the store.
828
+ */
829
+ protected _hookRollback(landingId: string): void;
830
+ 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;
228
836
  /** @inheritdoc ICalculation.getStatus */
229
837
  getStatus(): ICalculation.Status;
838
+ /**
839
+ * Resolves once every request sent to a grid has settled and its sender has handled the
840
+ * response. What a save waits for after `ready()`.
841
+ * @internal
842
+ */
843
+ _whenRequestsSettled(): Promise<void>;
230
844
  /** @inheritdoc ICalculation.getCalculationMode */
231
845
  getCalculationMode(): ICalculation.CalculationMode;
232
846
  /** @inheritdoc ICalculation.setCalculationMode */
@@ -241,19 +855,36 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
241
855
  toJSON(): ICalculation.JSON;
242
856
  /** @inheritdoc ICalculation.ready */
243
857
  ready(options?: ICalculation.CalculateOptions): Promise<ICalculation.Status>;
858
+ /** One round of `ready()`: up, drained, and the passes the dirty set owes (none in manual mode). */
859
+ protected _readyPass(full: boolean): Promise<void>;
860
+ /** @inheritdoc ICalculation.getCalculationState */
861
+ getCalculationState(): ICalculation.CalculationState;
862
+ /**
863
+ * 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.
865
+ */
866
+ protected _isWorking(): boolean;
867
+ /**
868
+ * Checks the calculation state once the current flush is over: announces a change, and wakes
869
+ * every `ready()` waiting for work in flight to end. Called wherever that work starts or ends.
870
+ */
871
+ protected _noteCalculationState(): void;
244
872
  /**
245
873
  * The locale-aware editing compiler, (re)built when the workbook locale (separators, Plane 1) or
246
874
  * active spreadsheet-language pack (boolean literals, Plane 3) has changed since it was last built.
247
875
  * Only the editing path uses locale-specific separators; the calc path (`_compiler`) is always
248
876
  * canonical because it only ever parses stored/API text.
249
877
  */
250
- protected _getEditingCompiler(): IFormulaCompiler;
878
+ protected _getEditingCompiler(target?: ICalculation.FormulaTarget): IFormulaCompiler;
251
879
  /** @inheritdoc ICalculation.createFormula */
252
- createFormula(expression: string, coords?: Partial<IRange.CellCoords>): ICalculation.IFormula;
880
+ createFormula(expression: string, coords?: Partial<IRange.CellCoords>, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
881
+ protected _createFormula(expression: string, coords: Partial<IRange.CellCoords> | undefined, target: ICalculation.FormulaTarget): ICalculation.IFormula;
253
882
  /** {@inheritDoc ICalculation.evaluate} */
254
- evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords>): Promise<Scalar | IRange>;
883
+ evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
255
884
  /** @inheritdoc ICalculation.getFunctions */
256
885
  getFunctions(): IFunctionCollection;
886
+ /** @inheritdoc ICalculation.getExternalBooks */
887
+ getExternalBooks(): IExternalBookCollection;
257
888
  /** @inheritdoc ICalculation.getNamedFormulas */
258
889
  getNamedFormulas(): INamedFormulasCollection;
259
890
  /**
@@ -283,6 +914,8 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
283
914
  protected _statusMessage(): string;
284
915
  get [Symbol.toStringTag](): string;
285
916
  toString(): string;
917
+ /** {@inheritDoc ICalculation.isICalculation} */
918
+ get isICalculation(): true;
286
919
  }
287
920
  /**
288
921
  * Interfaces for creating `Calculation` items.
@@ -293,6 +926,58 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
293
926
  * {@link Calculation}
294
927
  */
295
928
  export declare namespace Calculation {
929
+ /** See {@link Calculation._evaluateOver}. */
930
+ interface EvaluateOverOptions {
931
+ /** The sheet whose coordinate space the block is in. */
932
+ sheetGridId: string;
933
+ /** The block: the body is filled over it. */
934
+ coords: IRange.Coords;
935
+ /** The expression as authored, without a leading `=`. */
936
+ expression: string;
937
+ /** Where the expression is authored; `coords`' top-left for a plain fill. */
938
+ authoredAt: IRange.CellCoords;
939
+ /** Each cell of the block is its own 1x1 array-entered formula. See {@link ICalculation.EvaluateOptions.arrayFirstCell}. */
940
+ arrayFirstCell?: boolean;
941
+ }
942
+ /** See {@link Calculation._createFormulaHost}. */
943
+ interface FormulaHostOptions {
944
+ /** The grid's id; an existing grid under it is reused. */
945
+ id: string;
946
+ /** The sheet grid whose coordinate space the body lives in - a watch. See {@link ICalcGrid.getShadowOf}. */
947
+ shadowOf?: string;
948
+ /** `true` for a grid whose (0,0) is a synthetic anchor - a name. See {@link CalcGridBackend.ConstructorOptions.unanchored}. */
949
+ unanchored?: boolean;
950
+ /** `true` for a body whose every cell is its own 1x1 array-entered formula. See {@link ICalcGrid.isArrayFirstCell}. */
951
+ arrayFirstCell?: boolean;
952
+ /** The grid's size: fixed, a name's. */
953
+ entireCoords?: IRange.Coords;
954
+ /** The grid whose size the body has, whatever it is then: a sheet's, for a body on it. */
955
+ sizeOf?: string;
956
+ /** Told after every pass that wrote the grid. */
957
+ onCalculated?: (results: ICalcGrid.Results) => void;
958
+ /** Told after a restore or revert has replaced the body under the host. */
959
+ onResync?: () => void;
960
+ }
961
+ /** The owner's sheet list as {@link Calculation._setSheets} holds it. */
962
+ interface SheetList {
963
+ /** Every sheet's grid id and name, in tab order. */
964
+ readonly sheets: readonly (readonly [id: string, name: string | null])[];
965
+ }
966
+ /** See {@link Calculation._createCalcGrid}. */
967
+ interface CalcGridOptions extends CalcGrid.HostOptions, Pick<CalcGrid.ConstructorOptions, 'valuesAxis'> {
968
+ /** The grid's id; a new one is made when absent. */
969
+ uuid?: string;
970
+ /** See {@link CalcGridSpec.shadowOf}. */
971
+ shadowOf?: string;
972
+ /** See {@link CalcGridSpec.unanchored}. */
973
+ unanchored?: boolean;
974
+ /** See {@link CalcGridSpec.arrayFirstCell}. */
975
+ arrayFirstCell?: boolean;
976
+ /** See {@link CalcGridSpec.entireCoords}. */
977
+ entireCoords?: IRange.Coords;
978
+ /** See {@link CalcGridSpec.sizeOf}. */
979
+ sizeOf?: string;
980
+ }
296
981
  /**
297
982
  * Options available when creating a Calculation Service.
298
983
  */
@@ -316,29 +1001,21 @@ export declare namespace Calculation {
316
1001
  */
317
1002
  getActiveCell?: () => IRange.CellCoords | null;
318
1003
  /**
319
- * Returns a sheet handle given an id.
1004
+ * Whether defined names refuse edits, on top of the calculation's own read-only state. A
1005
+ * workbook answers with its structure protection.
320
1006
  */
1007
+ isNamesReadOnly?: () => boolean;
321
1008
  /**
322
- * `getRange`/`getRanges` are OPTIONAL and structural on purpose — this keeps `Calculation` decoupled
323
- * from `ISheet` while letting a real sheet hand over its own address resolvers. A temporary formula
324
- * anchored to that sheet uses them so an unscoped (same-sheet) reference resolves THERE rather than
325
- * against the workbook's active sheet. See `createFormula`.
326
- */
327
- getSheetById?: (sheetId: string) => {
328
- getId(): string;
329
- getName(): string;
330
- getEntireCoords: () => IRange.Coords | null;
331
- getRange?: (address: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
332
- getRanges?: (address: ICellRanges.Address, options?: ICellRange.GetRangeOptions) => ICellRanges;
333
- } | null;
334
- /**
335
- * Returns a sheet handle given a name.
1009
+ * External books to hydrate at construction, in `IWorkbook.JSON.externalBooks` form — `[n]`
1010
+ * order, `null` for a DDE/OLE gap.
1011
+ *
1012
+ * @remarks
1013
+ * The engine owns the collection ({@link ICalculation.getExternalBooks}) for the reason it owns
1014
+ * defined names: a book is a symbol formulas bind into, and its dependents are the engine's index.
336
1015
  */
337
- getSheetByName?: (sheetName: string) => {
338
- getId(): string;
339
- getName(): string;
340
- getEntireCoords: () => IRange.Coords | null;
341
- } | null;
1016
+ externalBooks?: (IExternalBook.JSON | null)[];
1017
+ /** See {@link ICellContainerOptions.externalBookResolver}; held by the collection for the engine's life. */
1018
+ externalBookResolver?: IExternalBook.IResolver;
342
1019
  /**
343
1020
  * Named item collection shared with the workbook.
344
1021
  *
@@ -357,12 +1034,6 @@ export declare namespace Calculation {
357
1034
  * engine has no pre-load lifecycle state.
358
1035
  */
359
1036
  names?: INamed.JSON[];
360
- /**
361
- * A structural transform applied to each hydrated name's expression as it compiles — the READ
362
- * half of the format-dialect hook (see `IWorkbook.ConstructorOptions.formulaTransform`).
363
- * Applies only to {@link names}; formulas added later compile without it.
364
- */
365
- formulaTransform?: ICalculation.FormulaTransform;
366
1037
  getRanges?: (address: ICellRanges.Address, options?: ICellRange.GetRangeOptions) => ICellRanges;
367
1038
  getRange?: (address: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
368
1039
  /**
@@ -376,7 +1047,7 @@ export declare namespace Calculation {
376
1047
  * `INamedRange` — see DESIGN-NAMED-FORMULAS.md §4). Structural like `getRange`/`getRanges`,
377
1048
  * and like them supplied by the workbook. Without it, graph answers fall back to cells only.
378
1049
  */
379
- createGraphRanges?: (cells: readonly IRange.Coords[], names: readonly _NamedGraphNode[]) => ICellRanges | null;
1050
+ createGraphRanges?: (cells: readonly IRange.Coords[], names: readonly NamedNodeInfo[]) => ICellRanges | null;
380
1051
  getSheetIndex?: (sheetName?: string) => number;
381
1052
  getSheetCount?: () => number;
382
1053
  strings?: IStringCollection;
@@ -391,7 +1062,7 @@ export declare namespace Calculation {
391
1062
  *
392
1063
  * @defaultValue 100
393
1064
  */
394
- maxIterations?: number;
1065
+ maxIteration?: number;
395
1066
  /**
396
1067
  * The maximum change allowed between iterations when performing iterative calculations.
397
1068
  *
@@ -403,7 +1074,25 @@ export declare namespace Calculation {
403
1074
  /**
404
1075
  * Transaction State for Calculation
405
1076
  */
1077
+ /**
1078
+ * A grid request the channel holds while the engine is `Starting` (DESIGN-CALC-SERVICE §4): the
1079
+ * request as data, the snapshot it names, and the caller's continuation.
1080
+ */
1081
+ interface HeldRequest {
1082
+ gridId: string;
1083
+ request: CalcRequest;
1084
+ /** The engine commit it would have landed in; what a nested rollback names. */
1085
+ landingId: string | undefined;
1086
+ /** The model snapshot it was made at (`RequestOptions.commitId`); what a restore names. */
1087
+ commitId: string | undefined;
1088
+ /** The model has undone the snapshot it was made at: skipped when applied, unless a redo revives it. */
1089
+ dead: boolean;
1090
+ resolve: (response: CalcResponse | PromiseLike<CalcResponse>) => void;
1091
+ reject: (error: unknown) => void;
1092
+ }
406
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;
407
1096
  /**
408
1097
  * Top down evaluation and marking dirty.
409
1098
  * This is the only spatial map that is completely updated via api.
@@ -437,13 +1126,34 @@ interface State extends AbstractModel.State {
437
1126
  /**
438
1127
  * All registered grids.
439
1128
  */
440
- gridsAll: Map<string, ICalcGrid>;
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>;
441
1153
  /**
442
1154
  * Listeners to individual named items
443
1155
  */
444
1156
  itemRemoveListeners: (() => void)[];
445
1157
  }
446
- interface CommitView extends AbstractModel.CommitView {
447
- }
448
1158
  export {};
449
1159
  //# sourceMappingURL=Calculation.d.ts.map