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

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 (290) hide show
  1. package/THIRD-PARTY-NOTICES.md +172 -0
  2. package/browser/esm/{DwwR3O2sEZApPSTF.mjs → -GEhXGMfNcWmHPby.mjs} +3 -3
  3. package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → 9WXf_BTKjW1cQisZ.mjs} +94 -94
  4. package/browser/esm/{CRkYR-siY2C994KV.mjs → B2SgIPPBX0wjzuq8.mjs} +1 -1
  5. package/browser/esm/{CBYMTDzMf1Vh7pkw.mjs → BC2RwlNwCdRywkoD.mjs} +1 -1
  6. package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BEqhm9xAUPiHUCFv.mjs} +1 -1
  7. package/browser/esm/BHgqi7KNrl7Vjr0W.mjs +348 -0
  8. package/browser/esm/{D64dM68B1pKYFzdP.mjs → BJKH0tDRx2FeSWvt.mjs} +2 -2
  9. package/browser/esm/{DobHLF6VjHr7Xi40.mjs → BTgWtqdQoh2cB6DL.mjs} +1 -1
  10. package/browser/esm/{CNdjyofiRu6CYOrr.mjs → BVshV1iY3bcUH9_E.mjs} +50 -48
  11. package/browser/esm/{qO-ujUrgq6H3TQix.mjs → BYQ63XU7JzB4_itX.mjs} +1 -1
  12. package/browser/esm/{C9u8FUewte5ugUjH.mjs → Bax5aOzQkbHKXW_X.mjs} +725 -716
  13. package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → BiDGKhtzV6yIy66o.mjs} +3 -3
  14. package/browser/esm/BmYrWK5OmHRtgyqM.mjs +367 -0
  15. package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → BoAlHgjPQ6mxb_oO.mjs} +44 -44
  16. package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → C0mjTq8lhrX3HiPa.mjs} +2052 -1583
  17. package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → C5j0IdwtYkWlOftv.mjs} +509 -509
  18. package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → CL84-iL2QeKlLzo5.mjs} +2 -2
  19. package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → CLkBe-6n-pStQhnz.mjs} +2 -2
  20. package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → CPzfhTPX2Y4dHX2p.mjs} +2 -2
  21. package/browser/esm/{fXWUMDhZ5yMSO629.mjs → CSJuIjYUOE387FIP.mjs} +1 -1
  22. package/browser/esm/{BIHrHjRGWVlJglcp.mjs → Cdw0mGuoV3IU2LhR.mjs} +2 -2
  23. package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → Ced5uyofOWHuL_Jy.mjs} +30 -30
  24. package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → Ci_LJ4S_GvYX0STI.mjs} +1 -1
  25. package/browser/esm/{DK899HhWX1HINMC1.mjs → CwygVKP_RXmne5Ot.mjs} +25 -25
  26. package/browser/esm/{BdCJNawfifyPupCP.mjs → D-mfK0noQrM2jZLT.mjs} +1 -1
  27. package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → D9SH_8v3FYCnxOFK.mjs} +1 -1
  28. package/browser/esm/{D9xNz46kAfXMZzp4.mjs → DPD8fop6az9HZNiK.mjs} +2 -2
  29. package/browser/esm/{D2RZh0O9neOsyLAE.mjs → DW-MmlgMH87l-_cw.mjs} +69 -48
  30. package/browser/esm/{DwZCT7DZiiXoTweg.mjs → DctIlUsO78-OU2ht.mjs} +2 -2
  31. package/browser/esm/DdcKkVb4jM6Y_epY.mjs +184 -0
  32. package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DfKzE0IY0TjaEIxG.mjs} +1 -1
  33. package/browser/esm/{BnC4-27Igwb8oDf2.mjs → DkloMquaR1pbZCER.mjs} +44 -43
  34. package/browser/esm/{BudSIfXBAsTxvu-K.mjs → Dz86-De57bv2VYIi.mjs} +10111 -9269
  35. package/browser/esm/{BTFBedJMRWGvZyCE.mjs → HApSgmV2FXRRwQac.mjs} +1 -1
  36. package/browser/esm/{Bt8_m94tBdks209L.mjs → IbVAQU4YqtFqLwYk.mjs} +1 -1
  37. package/browser/esm/index.mjs +482 -440
  38. package/browser/esm/mHQ95RAfxHzcUN2r.mjs +18 -0
  39. package/browser/esm/{CdEO8CEee6lEhabA.mjs → pm00uZZu_H3gxHFx.mjs} +2 -2
  40. package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → quEvwgrEuOb0h3q-.mjs} +1926 -1298
  41. package/browser/esm/{CndRBvVfQUJIYRRj.mjs → zZngLMg6mg6nnNGX.mjs} +50 -50
  42. package/licenses/dependencies.txt +71 -1
  43. package/node/esm/{C14-R6tifRh7pc0p.mjs → -K4Cek-bTUItkB_8.mjs} +1 -1
  44. package/node/esm/{D3ptRKzASqBut1DE.mjs → -b8yNV4v9qiq8EMY.mjs} +2 -2
  45. package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → 1V-m67YHbxmg3xk2.mjs} +44 -44
  46. package/node/esm/{DhTya_mhmN53vskv.mjs → 4ROAfJC1mokmqubv.mjs} +1 -1
  47. package/node/esm/B89et7t3uRmtxk4v.mjs +115 -0
  48. package/node/esm/BKBkCBNGhMU0nQdY.mjs +372 -0
  49. package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → BQ2XqExomMceAjfe.mjs} +10977 -10744
  50. package/node/esm/{Btw4148Ot8ifhNc1.mjs → Bfg7qjCXCwXbzW3K.mjs} +1 -1
  51. package/node/esm/{BNXLOEddJ6O9gYws.mjs → BtMeAB_dqJnOfzJM.mjs} +2 -2
  52. package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Byc_bxU_MdjYtt0x.mjs} +1 -1
  53. package/node/esm/{Ci_zLYmCD7e-C79O.mjs → Bzrl292TNCK3Cpid.mjs} +1 -1
  54. package/node/esm/{DdoiuKg9BKubtF1V.mjs → C0P9zspoypRAj7yv.mjs} +1 -1
  55. package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → C9gpMN3galHGZyoK.mjs} +1 -1
  56. package/node/esm/CKCG2peOkTq0gIIW.mjs +310 -0
  57. package/node/esm/{C99zzq8DImQXi4BQ.mjs → CWBS90g3Hz-kQDkY.mjs} +10 -10
  58. package/node/esm/{BskP3b8vUoIOGLY6.mjs → CoGSVnn-hNMtTEus.mjs} +2 -2
  59. package/node/esm/{DhS6yWjrrSNIJMsn.mjs → CzrLqStvrcPE2-hb.mjs} +234 -225
  60. package/node/esm/{CRt3vXe6YmXzqk3H.mjs → D16EdlZG1hX5WUUK.mjs} +102 -102
  61. package/node/esm/{DUTmDHbFbhLDT4F3.mjs → D1mDga2K5sjs8y07.mjs} +1 -1
  62. package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → D2jtztjE6c23RKvZ.mjs} +1 -1
  63. package/node/esm/{icn2nX5Z8e_3mNAv.mjs → D9nRcWsYk3M82iD8.mjs} +1 -1
  64. package/node/esm/{CG-qBU5BAaVz7e-P.mjs → DALYzTxZ9Ur9C69Q.mjs} +1 -1
  65. package/node/esm/{DrCf6ITcBhVOFpRj.mjs → DF0nL7s01dp7n0Bx.mjs} +7 -7
  66. package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → DO5ldLqhTvIfPXLW.mjs} +3348 -2610
  67. package/node/esm/DQz8J8ci7EJdqbuB.mjs +351 -0
  68. package/node/esm/{CiIymQN6aJCul62g.mjs → DR2OQTKqqyIkZnse.mjs} +9 -9
  69. package/node/esm/{eimUGjiIP-b8HiM6.mjs → DSTLPBgpsGW6qP9e.mjs} +52 -52
  70. package/node/esm/{DV5CU37aEbFbWFL0.mjs → DiXp7KSOZUSWXaZ5.mjs} +1 -1
  71. package/node/esm/{C_xf5Bz30VqiJjXn.mjs → DwvXHsycOQR219c7.mjs} +1 -1
  72. package/node/esm/{B-HUPAcqvK0eeeCz.mjs → Hc6B04OyVzHx2F5I.mjs} +38 -37
  73. package/node/esm/{lGJ42sHqg5if2bba.mjs → NkPNHsq2T3DXg76x.mjs} +458 -458
  74. package/node/esm/{-TA0MneBDKdGhsib.mjs → Nl_IIkO1jbk0s9i-.mjs} +3329 -2852
  75. package/node/esm/{DxazKtROyaI51dWl.mjs → OQT5lGqq8a4r5xNa.mjs} +1 -1
  76. package/node/esm/OTaaFGhF-k_iwobp.mjs +18 -0
  77. package/node/esm/{pYtP7wPyS96NQyXS.mjs → Z1elC_roIu7LhceZ.mjs} +25 -25
  78. package/node/esm/{CkRYLed8Mmn3giNg.mjs → e3F3OVXCxLJrSukW.mjs} +2 -2
  79. package/node/esm/index.mjs +584 -540
  80. package/node/esm/{D8hO07ToAibIuniw.mjs → suOBVUz-pca6ilJH.mjs} +138 -136
  81. package/package.json +8 -6
  82. package/resources/contents.json +108 -0
  83. package/resources/fonts/aptos-bold-italic.hinted.json +125 -0
  84. package/resources/fonts/aptos-bold-italic.metrics.json +221 -0
  85. package/resources/fonts/aptos-bold-italic.rows.json +8 -0
  86. package/resources/fonts/aptos-bold.hinted.json +125 -0
  87. package/resources/fonts/aptos-bold.metrics.json +221 -0
  88. package/resources/fonts/aptos-bold.rows.json +8 -0
  89. package/resources/fonts/aptos-display-bold-italic.hinted.json +125 -0
  90. package/resources/fonts/aptos-display-bold-italic.metrics.json +221 -0
  91. package/resources/fonts/aptos-display-bold-italic.rows.json +8 -0
  92. package/resources/fonts/aptos-display-bold.hinted.json +125 -0
  93. package/resources/fonts/aptos-display-bold.metrics.json +221 -0
  94. package/resources/fonts/aptos-display-bold.rows.json +8 -0
  95. package/resources/fonts/aptos-display-italic.hinted.json +124 -0
  96. package/resources/fonts/aptos-display-italic.metrics.json +221 -0
  97. package/resources/fonts/aptos-display-italic.rows.json +8 -0
  98. package/resources/fonts/aptos-display-regular.hinted.json +125 -0
  99. package/resources/fonts/aptos-display-regular.metrics.json +221 -0
  100. package/resources/fonts/aptos-display-regular.rows.json +8 -0
  101. package/resources/fonts/aptos-italic.hinted.json +125 -0
  102. package/resources/fonts/aptos-italic.metrics.json +221 -0
  103. package/resources/fonts/aptos-italic.rows.json +8 -0
  104. package/resources/fonts/aptos-narrow-bold-italic.hinted.json +125 -0
  105. package/resources/fonts/aptos-narrow-bold-italic.metrics.json +221 -0
  106. package/resources/fonts/aptos-narrow-bold-italic.rows.json +8 -0
  107. package/resources/fonts/aptos-narrow-bold.hinted.json +125 -0
  108. package/resources/fonts/aptos-narrow-bold.metrics.json +221 -0
  109. package/resources/fonts/aptos-narrow-bold.rows.json +8 -0
  110. package/resources/fonts/aptos-narrow-italic.hinted.json +125 -0
  111. package/resources/fonts/aptos-narrow-italic.metrics.json +221 -0
  112. package/resources/fonts/aptos-narrow-italic.rows.json +8 -0
  113. package/resources/fonts/aptos-narrow-regular.hinted.json +125 -0
  114. package/resources/fonts/aptos-narrow-regular.metrics.json +221 -0
  115. package/resources/fonts/aptos-narrow-regular.rows.json +8 -0
  116. package/resources/fonts/aptos-regular.hinted.json +125 -0
  117. package/resources/fonts/aptos-regular.metrics.json +221 -0
  118. package/resources/fonts/aptos-regular.rows.json +8 -0
  119. package/resources/fonts/arial-bold-italic.rows.json +0 -1
  120. package/resources/fonts/arial-bold.rows.json +0 -1
  121. package/resources/fonts/arial-italic.rows.json +0 -1
  122. package/resources/fonts/arial-regular.rows.json +0 -1
  123. package/resources/fonts/calibri-bold-italic.rows.json +0 -1
  124. package/resources/fonts/calibri-bold.rows.json +0 -1
  125. package/resources/fonts/calibri-italic.rows.json +0 -1
  126. package/resources/fonts/calibri-regular.rows.json +0 -1
  127. package/resources/fonts/cambria-bold-italic.rows.json +0 -1
  128. package/resources/fonts/cambria-bold.rows.json +0 -1
  129. package/resources/fonts/cambria-italic.rows.json +0 -1
  130. package/resources/fonts/cambria-regular.rows.json +0 -1
  131. package/resources/fonts/contents.json +240 -0
  132. package/resources/fonts/courier-new-bold-italic.rows.json +0 -1
  133. package/resources/fonts/courier-new-bold.rows.json +0 -1
  134. package/resources/fonts/courier-new-italic.rows.json +0 -1
  135. package/resources/fonts/courier-new-regular.rows.json +0 -1
  136. package/resources/fonts/times-new-roman-bold-italic.rows.json +0 -1
  137. package/resources/fonts/times-new-roman-bold.rows.json +0 -1
  138. package/resources/fonts/times-new-roman-italic.rows.json +0 -1
  139. package/resources/fonts/times-new-roman-regular.rows.json +0 -1
  140. package/resources/locales/de/model.msg.json +4 -0
  141. package/resources/locales/en/model.msg.json +4 -0
  142. package/types/scripting-api.json +9339 -9320
  143. package/types/scripting.d.ts +322 -200
  144. package/types/src/.generated/wasm/sdk.d.ts +5 -27
  145. package/types/src/address/AddressUtils.d.ts +8 -0
  146. package/types/src/address/_SheetNameQuoteChars.d.ts +3 -0
  147. package/types/src/anomalies/_FocusTable.d.ts +0 -6
  148. package/types/src/calculation/Calculation.d.ts +20 -95
  149. package/types/src/calculation/ExternalBookBindings.d.ts +0 -26
  150. package/types/src/calculation/NamedFormulaCollection.d.ts +6 -2
  151. package/types/src/calculation/TokenType.d.ts +0 -10
  152. package/types/src/calculation/_CloneBoundary.d.ts +0 -24
  153. package/types/src/calculation/_FormulaToolkit.d.ts +0 -5
  154. package/types/src/calculation/compiler/ASTTypes.d.ts +0 -13
  155. package/types/src/calculation/compiler/CompilerUtils.d.ts +0 -227
  156. package/types/src/calculation/compiler/FormulaLexer.d.ts +0 -8
  157. package/types/src/calculation/compiler/FormulaParser.d.ts +0 -61
  158. package/types/src/calculation/compiler/ParserUtils.d.ts +0 -24
  159. package/types/src/calculation/compiler/Types.d.ts +0 -52
  160. package/types/src/calculation/engine/CalcBackend.d.ts +15 -157
  161. package/types/src/calculation/engine/index.d.ts +0 -8
  162. package/types/src/calculation/executor/CalcExecutor.d.ts +13 -130
  163. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +30 -11
  164. package/types/src/calculation/executor/CircularReference.d.ts +0 -17
  165. package/types/src/calculation/executor/_BlockOrder.d.ts +29 -0
  166. package/types/src/calculation/executor/_WhatIf.d.ts +0 -19
  167. package/types/src/calculation/formula/FormulaBlock.d.ts +0 -28
  168. package/types/src/calculation/formula/FormulaRecordView.d.ts +0 -15
  169. package/types/src/calculation/formula/IFormulaBlock.d.ts +0 -12
  170. package/types/src/calculation/formula/LambdaValue.d.ts +0 -15
  171. package/types/src/calculation/formula/TokenUtils.d.ts +1 -8
  172. package/types/src/calculation/grid/CalcGrid.d.ts +5 -59
  173. package/types/src/calculation/grid/CalcGridBackend.d.ts +8 -9
  174. package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -13
  175. package/types/src/calculation/grid/CalcGridUtils.d.ts +18 -22
  176. package/types/src/calculation/grid/ICalcGrid.d.ts +13 -98
  177. package/types/src/calculation/grid/_CalcRequest.d.ts +1 -29
  178. package/types/src/calculation/spatial/CircularEntry.d.ts +0 -10
  179. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +52 -82
  180. package/types/src/calculation/spatial/SpillEntry.d.ts +10 -7
  181. package/types/src/calculation/state/CalcScope.d.ts +0 -9
  182. package/types/src/calculation/state/CalcState.d.ts +0 -12
  183. package/types/src/calculation/state/CalculationContext.d.ts +4 -37
  184. package/types/src/calculation/state/DeferredCalls.d.ts +11 -64
  185. package/types/src/calculation/state/IContextContainer.d.ts +4 -60
  186. package/types/src/calculation/state/_KeepBlanks.d.ts +5 -0
  187. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +46 -33
  188. package/types/src/calculation/state/_WhatIfLayer.d.ts +0 -14
  189. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +0 -42
  190. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +0 -6
  191. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +0 -12
  192. package/types/src/calculation/symbol/SymbolRegistry.d.ts +0 -9
  193. package/types/src/calculation/toolkit/index.d.ts +0 -8
  194. package/types/src/cell/ICell.d.ts +14 -28
  195. package/types/src/cellRange/ICellRange.d.ts +22 -11
  196. package/types/src/chart/Chart.d.ts +0 -16
  197. package/types/src/chart/_ChartParts.d.ts +0 -39
  198. package/types/src/chart/_ChartSource.d.ts +0 -14
  199. package/types/src/chart/createChart.d.ts +1 -1
  200. package/types/src/chart/kinds/ChartKind.d.ts +4 -4
  201. package/types/src/chart/kinds/_Placeholder.d.ts +0 -1
  202. package/types/src/chart/layout/TextMeasurer.d.ts +0 -20
  203. package/types/src/chart/layout/_LayoutUtils.d.ts +0 -16
  204. package/types/src/chart/math/BoxStats.d.ts +0 -8
  205. package/types/src/chart/math/DateUnitCalcs.d.ts +0 -10
  206. package/types/src/chart/math/Histogram.d.ts +0 -17
  207. package/types/src/chart/math/OrdUnitCalcs.d.ts +0 -53
  208. package/types/src/chart/math/Treemap.d.ts +0 -15
  209. package/types/src/chart/math/Trendlines.d.ts +0 -8
  210. package/types/src/chart/math/UnitCalcs.d.ts +0 -22
  211. package/types/src/chart/model/_Edits.d.ts +0 -33
  212. package/types/src/chart/model/_Grouping.d.ts +0 -25
  213. package/types/src/chart/model/_Inference.d.ts +0 -18
  214. package/types/src/chart/model/_NewChart.d.ts +0 -41
  215. package/types/src/chart/model/_OfPie.d.ts +0 -7
  216. package/types/src/chart/resolve/_LegacyStyles.d.ts +0 -20
  217. package/types/src/chart/resolve/_Resolve.d.ts +0 -19
  218. package/types/src/chart/resolve/_ResolvedChart.d.ts +0 -6
  219. package/types/src/collections/_GridUtils.d.ts +0 -10
  220. package/types/src/comment/_NoteBox.d.ts +0 -15
  221. package/types/src/condition/AnchoredConditional.d.ts +1 -23
  222. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +0 -49
  223. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +0 -10
  224. package/types/src/condition/ICondition.d.ts +2 -2
  225. package/types/src/condition/_ConditionUtils.d.ts +0 -38
  226. package/types/src/externalBook/ExternalBookCollection.d.ts +0 -15
  227. package/types/src/externalBook/ExternalBookName.d.ts +2 -3
  228. package/types/src/externalBook/IExternalBook.d.ts +13 -14
  229. package/types/src/fetch/IFetcher.d.ts +2 -1
  230. package/types/src/fetch/_WorkbookFetch.d.ts +1 -1
  231. package/types/src/font/AdvanceTable.d.ts +16 -42
  232. package/types/src/font/IFont.d.ts +32 -9
  233. package/types/src/font/TableFileAdvanceBuilder.d.ts +6 -3
  234. package/types/src/font/_FontUtils.d.ts +0 -8
  235. package/types/src/font/_StandIns.d.ts +33 -0
  236. package/types/src/io/IWorkbookIO.d.ts +3 -3
  237. package/types/src/io/WorkbookOrigin.d.ts +2 -2
  238. package/types/src/license/LicenseManager.d.ts +2 -1
  239. package/types/src/license/_Utils.d.ts +4 -3
  240. package/types/src/license/details.d.ts +3 -1
  241. package/types/src/license/keys.d.ts +6 -0
  242. package/types/src/license/license-key.d.ts +15 -33
  243. package/types/src/license/token.d.ts +55 -0
  244. package/types/src/picture/IPicture.d.ts +45 -0
  245. package/types/src/picture/Picture.d.ts +12 -0
  246. package/types/src/pivot/PivotTable.d.ts +0 -7
  247. package/types/src/primitives/AsyncValue.d.ts +0 -12
  248. package/types/src/primitives/PrimitiveUtils.d.ts +1 -110
  249. package/types/src/primitives/Range.d.ts +0 -60
  250. package/types/src/primitives/ScalarCollation.d.ts +0 -106
  251. package/types/src/primitives/stats/AggregateStats.d.ts +0 -19
  252. package/types/src/print/PageLayout.d.ts +0 -6
  253. package/types/src/reference/ReferenceUtils.d.ts +4 -2
  254. package/types/src/richData/RichDataRegistry.d.ts +6 -0
  255. package/types/src/scripting/TypedFunction.d.ts +0 -109
  256. package/types/src/sheet/IWorksheet.d.ts +2 -5
  257. package/types/src/sheet/NamedCellRange.d.ts +0 -21
  258. package/types/src/sheet/SheetCell.d.ts +8 -2
  259. package/types/src/sheet/Worksheet.d.ts +7 -48
  260. package/types/src/sheet/_DelimitedText.d.ts +13 -0
  261. package/types/src/sheet/_IgnoredErrors.d.ts +0 -12
  262. package/types/src/sheet/_ScalarListFactory.d.ts +0 -19
  263. package/types/src/sheet/_SheetCoords.d.ts +0 -7
  264. package/types/src/sheet/_SheetFilterUtils.d.ts +0 -8
  265. package/types/src/sheet/_SheetStateReader.d.ts +0 -10
  266. package/types/src/sheet/_SheetStateTypes.d.ts +0 -3
  267. package/types/src/sheet/_SheetUtils.d.ts +1 -1
  268. package/types/src/sheet/style/_RowLine.d.ts +32 -0
  269. package/types/src/sheet/style/_StyleUtils.d.ts +6 -14
  270. package/types/src/sheetView/_SheetViewUtils.d.ts +0 -1
  271. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +0 -5
  272. package/types/src/style/ICellStyle.d.ts +4 -0
  273. package/types/src/table/AnchoredTable.d.ts +0 -147
  274. package/types/src/text/TextFrame.d.ts +4 -1
  275. package/types/src/text/TextStacked.d.ts +0 -24
  276. package/types/src/text/TextWrapper.d.ts +3 -5
  277. package/types/src/text/_LineBox.d.ts +24 -0
  278. package/types/src/text/_TextUtils.d.ts +5 -2
  279. package/types/src/text/_TextWrapperFallback.d.ts +2 -1
  280. package/types/src/wasm/sdkWasm.d.ts +1 -1
  281. package/types/src/workbook/Workbook.d.ts +0 -10
  282. package/browser/esm/2WuhYrIpYmOR5H73.mjs +0 -698
  283. package/browser/esm/CTe2qfmIUEad6FJv.mjs +0 -199
  284. package/browser/esm/CfRqiPDg6RBTg1EN.mjs +0 -367
  285. package/browser/esm/DVroRnhi-5IDXNgM.mjs +0 -210
  286. package/node/esm/BSvOluusoDM4z_dx.mjs +0 -811
  287. package/node/esm/CPI58duc0j0a-HpJ.mjs +0 -115
  288. package/node/esm/DggQ23jKMpwhENfa.mjs +0 -372
  289. package/node/esm/Dn1M7YWi25DeeYUb.mjs +0 -210
  290. package/node/esm/ZXPFcsT2zrALCZux.mjs +0 -289
@@ -23,18 +23,6 @@ import { ICalcGrid, FormulaHost } from '../grid';
23
23
  import { CalcRequest, CalcResponse, CalcGridSpec, TableSymbols, NameSymbols } from '../grid/_CalcRequest';
24
24
  import { ExternalBookBindings, ExternalNamedItem } from '../ExternalBookBindings';
25
25
  import { ISymbolRegistry } from '../symbol';
26
- /**
27
- * The calculation backend: the engine's store and everything kept in it, and the container its
28
- * grids, formulas and executor work against (DESIGN-CALC-SERVICE §5).
29
- *
30
- * @remarks
31
- * Made by the first `start()` from the loaded engine module, and kept across a stop and a restart.
32
- * Its history is its own (§13.13): every model commit has a mirror here, a request lands under the
33
- * model's operation or savepoint it was made in, and a revert names a model commit. The model's ids
34
- * are known to it through one map, landing to engine commit.
35
- *
36
- * What it asks of the calculation that made it is {@link CalcBackend.Callbacks}, and nothing else.
37
- */
38
26
  export declare class CalcBackend extends AbstractModel<CalcBackend.State> implements IContextContainer {
39
27
  protected _callbacks: CalcBackend.Callbacks;
40
28
  protected _runtime: IRuntime;
@@ -46,6 +34,8 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
46
34
  protected _gridOptions: Partial<CalcGridBackend.ConstructorOptions>;
47
35
  protected _calculation: ICalculation;
48
36
  protected _context: CalculationContext & IFormulaContext;
37
+ /** {@link _context} with no cell, for executors (`IDeferContext.getFormulaContext`); made on first ask. */
38
+ protected _cellFreeContext: (CalculationContext & IFormulaContext) | null;
49
39
  protected _calcExecutor: CalcExecutor;
50
40
  /** The cache as grids and the cached names as virtual grids — see {@link ExternalBookBindings}. */
51
41
  protected _externalBindings: ExternalBookBindings;
@@ -92,6 +82,8 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
92
82
  * a load wires every name it holds in one batch.
93
83
  */
94
84
  private _recompileNamedPending;
85
+ /** {@link _recompileNamedPending} for a name whose definition has not changed. */
86
+ private _recompileLoadedPending;
95
87
  private _invalidateNamedPending;
96
88
  constructor(options: CalcBackend.ConstructorOptions);
97
89
  /** Initializes the context: the function registry the backend calls through. */
@@ -106,34 +98,13 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
106
98
  getScope(): CalcScope;
107
99
  /** {@inheritDoc IContextContainer.getDeferred} */
108
100
  getDeferred(): DeferredCalls;
109
- /**
110
- * The settle pass (DESIGN-ASYNC §4.5): a change with no write, for every call whose latest
111
- * moved since the last one.
112
- *
113
- * @remarks
114
- * A cell whose formula is its one call reads the latest through its holder: the model is told
115
- * the cell's value as it reads now, its pending status clears, and its dependents are marked
116
- * dirty — never the cell itself. A cell whose formula is more than its call is marked dirty
117
- * itself, and its next evaluation serves each site its call. One settle pass follows, seeded from
118
- * what was marked and nothing else, and vends the repaints with its results.
119
- *
120
- * A call whose owner's cell no longer names it — the cell was edited, or its version is not the
121
- * current one — settles into that version's holder and nothing here.
122
- */
123
101
  protected _settle(): void;
124
- /**
125
- * Cancels every call `cover` covers (`ICalculation.cancelAsync`, DESIGN-ASYNC §4.6): each is
126
- * closed and its `onCancel` runs. Each owner whose cell still names its call re-evaluates in a
127
- * settle pass: served the closed call, it shows what it did and is no longer pending.
128
- *
129
- * @returns The settle pass, or `null` when nothing was cancelled.
130
- */
131
102
  cancelAsync(cover: true | string | IRange.Coords): Promise<ICalculation.Status> | null;
132
103
  /**
133
104
  * A call's result as a cell can hold it (`DeferredCalls.Normalize`): an array becomes a range
134
105
  * as a body's array return does, a one-cell range its scalar, a jagged array `#VALUE!`.
135
106
  */
136
- protected _normalizeResult(value: unknown): unknown;
107
+ protected _normalizeResult(value: unknown, options?: IFormulaContext.DeferredCall.ResolveOptions): unknown;
137
108
  /**
138
109
  * The holder at a cell: the engine grid's value there, else the entry of the spill anchored
139
110
  * there (an anchor cell holds its first element; the spill's entry carries the holder). `null`
@@ -256,7 +227,7 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
256
227
  /** {@inheritDoc IContextContainer.isLoading} */
257
228
  isLoading(): boolean;
258
229
  /** {@inheritDoc IContextContainer.recompileNamed} */
259
- recompileNamed(nameId: string): void;
230
+ recompileNamed(nameId: string, loaded?: boolean): void;
260
231
  /** {@inheritDoc IContextContainer.invalidateNamed} */
261
232
  invalidateNamed(nameId: string): void;
262
233
  /** {@inheritDoc IContextContainer.getNamedNodeInfo} */
@@ -349,28 +320,6 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
349
320
  * @throws What the grid throws applying it.
350
321
  */
351
322
  apply(gridId: string, landingId: string | undefined, request: CalcRequest, held?: boolean): CalcResponse | PromiseLike<CalcResponse>;
352
- /**
353
- * Applies what the channel held while the engine came up (DESIGN-CALC-SERVICE §6.3): every
354
- * grid made first, then a defined name's body, in its own order (`ICalcGrid.BodyOptions.priority`),
355
- * then the rest in send order. A name must be bound before any formula that mentions it is
356
- * examined, and each is held behind the create of its own grid.
357
- *
358
- * @remarks
359
- * Every sheet a held `sheets` message adds enters the replica at its end first, under the name it
360
- * was first listed by: a defined name's body is applied ahead of the seeds and may name a sheet
361
- * listed while starting. Every table a held `tables` message adds enters the same way, under the
362
- * name and columns it was first told by: a seed sent ahead of a later sheet's tables compiles a
363
- * reference to one, and a reference to a table the replica does not hold is refused. The messages
364
- * themselves still apply in send order, so a seed sent before a rename binds the name it was sent
365
- * under.
366
- *
367
- * A request whose snapshot the model has undone since (`dead`) is answered and not applied,
368
- * except a grid's `create`.
369
- *
370
- * @param wroteWhileOff Something was written while the engine was `Off`: a seed asking for a
371
- * full pass keeps it. Otherwise its values are the engine's own, or a file's.
372
- * @returns What each request answered, in the order they were applied.
373
- */
374
323
  applyHeld(batch: readonly CalcBackend.Held[], wroteWhileOff: boolean): CalcBackend.Applied[];
375
324
  /** {@inheritDoc IContextContainer.getHeldCloneKey} */
376
325
  getHeldCloneKey(): string | null;
@@ -481,51 +430,12 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
481
430
  * {@link _namedTargets} expansion: a name whose body cites the symbol reaches its own readers.
482
431
  *
483
432
  * Run at a safe point only — it writes inputs.
484
- */
485
- recompileReferencing(changedIds: ReadonlySet<string>): void;
486
- /**
487
- * A table's body has changed rows: re-fit the A1 references that spanned it.
488
- *
489
- * @remarks
490
- * Excel treats a reference whose ROWS are exactly a table's body - or run from its header to the
491
- * body's end - as naming the body, whatever columns of the table it covers, and keeps it on the
492
- * body however the body's rows change (probed, `probe-table-refit.ps1`): `SUM(B2:B5)` over body
493
- * rows 2-5 reads `SUM(B2:B6)` after a row is appended, and `SUM(B2:B3)` after a resize gives two
494
- * up. Relative, absolute or mixed alike, from any sheet, and in anything that holds a reference -
495
- * a defined name, a table's held totals formula and a condition's formula are blocks too. A
496
- * reference that only starts or only ends with the body is an ordinary one, and a change of
497
- * COLUMNS re-fits nothing. A name's relative rows are read from its body's origin, A1, as Excel
498
- * reads them (`probe-table-refit-relative.ps1`); a shift never moves them, so a row at the top
499
- * leaves such a name alone.
500
- *
501
- * An insert or delete inside the body already leaves such a reference right, so this is asked
502
- * only for what a shift gets wrong: rows taken or given up at the body's end, and a row inserted
503
- * at its first row (which pushes the whole reference down).
504
- *
505
- * One search of the precedent index over the rows that match - an entry per (block, reference)
506
- * that reads them - so the cost is the readers of the body, on a change of a table's rows. The
507
- * text a cell shows catches up with the engine the way it does after any shift.
508
- *
509
- * A block is re-fitted cell by cell: only the cells whose reference spans the body are rewritten,
510
- * which splits them out of the block. An array-entered block is one formula, read at its top-left,
511
- * and is never split.
512
433
  *
513
- * **A DELIBERATE DIVERGENCE lives here** (Michael, 2026-09-22). Excel asks how the cell was
514
- * authored, not what it reads: a fully relative reference is left where it is when the cell
515
- * belongs to a shared-formula group, and re-fitted when it stands alone - so `SUM(B2:B5)` follows
516
- * the body when it was typed and does not when the same three formulas were filled, and the file
517
- * carries the difference as `<f t="shared">` (`probe-table-refit-fillhandle.ps1`,
518
- * `probe-table-refit-roundtrip.ps1`). Here a run is a data-model fact, not an authoring one -
519
- * cells holding the same formula are conflated whatever made them - so honoring that rule would
520
- * make a formula follow the body or not depending on what a NEIGHBOR happens to hold, which a
521
- * user cannot see. Every reference that spans the body is re-fitted, however it was written.
522
- *
523
- * @param sheet The sheet the table is on, by id or name.
524
- * @param columns The table's columns. A reference reaching outside them is an ordinary one.
525
- * @param match The rows a reference has to span to be one of the body's, as they read NOW.
526
- * @param headerRow The header's row when a reference from it to `match.rowEnd` also counts.
527
- * @param to The body's rows now.
434
+ * @param loaded The definitions have not changed (see {@link recompileNamed}). What was loaded
435
+ * with them, and the bodies of other names, only re-derive their precedents: opening a file
436
+ * evaluates what the file marks dirty, and mentioning a name is not a mark.
528
437
  */
438
+ recompileReferencing(changedIds: ReadonlySet<string>, loaded?: boolean): void;
529
439
  refitTableRows(sheet: string, columns: {
530
440
  colStart: number;
531
441
  colEnd: number;
@@ -549,38 +459,6 @@ export declare class CalcBackend extends AbstractModel<CalcBackend.State> implem
549
459
  protected _writeBlockText(fsv: FormulaSpatialValue, text: string, coords?: IRange.Coords): void;
550
460
  /** Whether any cell is out of date. */
551
461
  hasDirty(): boolean;
552
- /**
553
- * Runs one pass over the dirty set (or all of it, or a range of it), and writes what it found
554
- * into the state.
555
- *
556
- * @remarks
557
- * One recalculation per COMMIT, not per notification of one.
558
- *
559
- * `gridId` marks the engine's own reactive pass — `ICalcGrid.calculate()`, which is what an
560
- * edit schedules (`Sheet.onAfterStateChange`) and what `ready()` runs per dirty grid. An
561
- * explicit `calculate()` from the API (F9, Shift+F9, a resolved async result) has no `gridId`
562
- * and is always honored.
563
- *
564
- * The reactive pass is skipped only when BOTH halves say there is nothing to do:
565
- *
566
- * - the current commit has already had its recalculation. Commits notify their listeners on
567
- * `setTimeout(0)`, so a script that writes N cells without awaiting queues N dispatchers,
568
- * none of which run until it yields. By then the store is at the LAST commit and every one
569
- * of those dispatchers asks for a pass over the same final state — N-1 of them describing
570
- * work another pass has already done.
571
- * - nothing is dirty. The dirty set is cumulative and whichever pass runs first consumes all
572
- * of it, but a seed (`CalcGridBackend._seedNow`) marks dirty without producing a commit of its
573
- * own, so the commit id alone would strand it.
574
- *
575
- * Neither half alone is enough, and the second is emphatically not sufficient: an edit that
576
- * marks nothing dirty is still a recalculation in Excel, and it is the only thing that re-rolls
577
- * `RAND`/`NOW` — see the "unrelated edit" case in `graph/volatile.test.ts`.
578
- *
579
- * Together they were the whole cost of the round-trip workbook build (`functions-to-xlsx.ts`):
580
- * 2,594 redundant passes, each re-evaluating every volatile in the workbook and everything
581
- * downstream of it, for 49,289 of 52,917 total evaluations — 93% of the engine's work, still
582
- * running six seconds after `ready()` had resolved. See DESIGN-CALC-PASS-GATING.md.
583
- */
584
462
  runPass(options: ICalculation.CalculateOptions | undefined, pass: CalcBackend.PassOptions): void;
585
463
  /** Each grid with cells out of date runs its pass - every grid, when `full`. */
586
464
  calculateGrids(full: boolean): Promise<void>;
@@ -751,10 +629,6 @@ export declare namespace CalcBackend {
751
629
  whenSafe(action: () => Promise<unknown>, priority: boolean): void;
752
630
  /** Whether the calculation is loading: draining, or starting. */
753
631
  isLoading(): boolean;
754
- /**
755
- * Runs a pass: explicit without `gridId`, reactive for it with one; a settle pass with
756
- * `settle`, seeded from what the settle marked only (DESIGN-ASYNC §4.5).
757
- */
758
632
  calculate(options?: ICalculation.CalculateOptions, gridId?: string, settle?: boolean): Promise<ICalculation.Status>;
759
633
  /** Owes a reactive pass for `gridId`, run once the current flush is over. */
760
634
  owePass(gridId: string): void;
@@ -828,17 +702,14 @@ export declare namespace CalcBackend {
828
702
  calcCoords?: IRange.Coords;
829
703
  /** The grid whose reactive pass this is; absent for an explicit one. */
830
704
  gridId?: string;
831
- /**
832
- * The settle pass (DESIGN-ASYNC §4.5, §4.8): seeded from the regions the settle marked only.
833
- * Volatiles are not collected and the dirty set is left for the pass that owes it, so a
834
- * landing result neither re-rolls `RAND` nor runs the recalculation manual mode withholds.
835
- */
836
705
  settle?: boolean;
837
706
  /**
838
707
  * `ICalculation.CalculateOptions.external`: the calls the pass makes fetch past the workbook's
839
708
  * cache, to the source.
840
709
  */
841
710
  external?: boolean;
711
+ /** The pass a load owes: see `CalcExecutor.ExecuteOptions.load`. */
712
+ load?: boolean;
842
713
  /** Iterative calculation's limits, or `null` when it is off. */
843
714
  iterate: {
844
715
  maxIteration: number;
@@ -846,10 +717,6 @@ export declare namespace CalcBackend {
846
717
  } | null;
847
718
  /** The model operation open now: what the pass's results are realized under. */
848
719
  openOperationId: string | null;
849
- /**
850
- * A reactive pass under `AutomaticExceptTables`: the what-if data tables (`TABLE` nodes) are
851
- * skipped and stay out of date (DESIGN-DATA-TABLES §4.4). Ignored by a full pass.
852
- */
853
720
  exceptTables?: boolean;
854
721
  }
855
722
  interface ConstructorOptions {
@@ -874,8 +741,10 @@ export declare namespace CalcBackend {
874
741
  books: IExternalBookCollection;
875
742
  /** What rich values a formula makes are made for; omitted, made outside any workbook. */
876
743
  richData?: IRichDataKind.Context;
877
- /** What async functions fetch through (`IBatchContext.fetch`); omitted, the global `fetch`. */
744
+ /** What async functions fetch through (`IDeferContext.fetch`); omitted, the global `fetch`. */
878
745
  fetch?: (input: string, init?: RequestInit) => Promise<Response>;
746
+ /** How async functions read delimited text (`IDeferContext.parseText`); omitted, it rejects. */
747
+ parseText?: (text: string, options?: IFormulaContext.IDeferContext.ParseTextOptions) => Promise<Scalar[][]>;
879
748
  /** The replicas as the owner holds them when the start was asked for. */
880
749
  replica?: Replica;
881
750
  /** The model's current commit, mirrored first. */
@@ -920,23 +789,12 @@ export declare namespace CalcBackend {
920
789
  * All registered grids.
921
790
  */
922
791
  gridsAll: Map<string, CalcGridBackend>;
923
- /**
924
- * The engine's replica of the model's sheet list (DESIGN-CALC-SERVICE §8): grid id to name, in
925
- * tab order. What every symbol lookup, span and sheet-position function reads. Fed by the
926
- * `sheets` message and by grid registration; versioned here so a revert restores it with the
927
- * formulas that bound through it.
928
- */
929
792
  sheets: ReadonlyMap<string, string | null>;
930
793
  /**
931
794
  * The sheets in {@link sheets} that have no grid: chart, macro and dialog sheets. They count in
932
795
  * tab order (`SHEETS`, `SHEET`, a span's members) and hold no cells.
933
796
  */
934
797
  gridless: ReadonlySet<string>;
935
- /**
936
- * The engine's replica of the model's tables (DESIGN-CALC-SERVICE §8): table id to its name and
937
- * its columns' ids and names. What a structured reference binds and images through. Fed by the
938
- * `tables` message, seeded at a start, versioned here as {@link sheets} is.
939
- */
940
798
  tables: ReadonlyMap<string, TableSymbols>;
941
799
  /**
942
800
  * The engine's replica of the defined names: name id to its spelling and the sheet it is scoped
@@ -1,10 +1,2 @@
1
- /**
2
- * The calculation backend's code: what a started engine builds and runs.
3
- *
4
- * @remarks
5
- * `Calculation` reaches every value here through this one module and nothing else, so the facade a
6
- * workbook constructs carries none of it (DESIGN-CALC-SERVICE §5, §13.25). Types are imported
7
- * directly; only values belong on this list.
8
- */
9
1
  export { CalcBackend } from './CalcBackend';
10
2
  //# sourceMappingURL=index.d.ts.map
@@ -92,6 +92,8 @@ export declare class CalcExecutor {
92
92
  protected _passActive: boolean;
93
93
  /** The pass in progress is a settle pass (`ExecuteOptions.settle`): its seeds are the settles' alone. */
94
94
  protected _settlePass: boolean;
95
+ /** The pass a load owes: see {@link _savedAnswer}. */
96
+ protected _loadPass: boolean;
95
97
  /**
96
98
  * The holder {@link _takeDeferred} made for an evaluation whose value is a range: the value keeps
97
99
  * its shape for the spill layout, which puts the holder on the spill's entry. Taken at once.
@@ -111,11 +113,6 @@ export declare class CalcExecutor {
111
113
  * while a pass evaluates. Released with {@link _flush}.
112
114
  */
113
115
  _overlays: Map<string, PendingOverlayGrid> | null;
114
- /**
115
- * The what-if layers of the data table being evaluated, per grid id (DESIGN-DATA-TABLES §4.3):
116
- * what `getGridValues` hands every read while a `TABLE` node runs its substitutions. `null`
117
- * otherwise.
118
- */
119
116
  _whatIf: Map<string, WhatIfLayer> | null;
120
117
  /**
121
118
  * A reactive pass under `AutomaticExceptTables`: a `TABLE` node is not evaluated, and is left
@@ -124,13 +121,6 @@ export declare class CalcExecutor {
124
121
  protected _exceptTables: boolean;
125
122
  /** The `TABLE` nodes the pass in progress skipped, for `ExecuteResult.skippedTables`. */
126
123
  protected _skippedTables: Set<CalcNode>;
127
- /**
128
- * The blank regions of the blocks whose representative could not stand for them this plan
129
- * (PLAN-WATCHES-BLANK-AWARE §4), and the cells of the regions that WERE shared whose value the
130
- * share moved under a reader ({@link _dirtyBlankReaders}) — handed to `doEvaluate`'s incremental
131
- * dirty set at the end of the plan, so the next iteration of the pass collects the first cell
132
- * by cell and the readers of the second.
133
- */
134
124
  protected _fallbackDirty: ISpatialMap | null;
135
125
  /**
136
126
  * The cycle table (design §7.3): per cycle id, one live {@link CircularReference} holding the
@@ -225,31 +215,15 @@ export declare class CalcExecutor {
225
215
  */
226
216
  execute(cycleId: number, options: CalcExecutor.ExecuteOptions, state: CalcExecutor.ExecuteState): CalcExecutor.ExecuteResult | null;
227
217
  /**
228
- * Takes the calls an evaluation of `node` deferred (DESIGN-ASYNC §4.4): the cell's value is an
229
- * `AsyncValue` over them and what the formula calculated from their initials, and the node is
230
- * pending with it while any is open.
218
+ * What a cell answers with instead of the calls its evaluation just made, on the pass a load owes:
219
+ * the value it was saved with, which is the cached answer until something asks the source. `undefined`
220
+ * when it should ask: the file marks it to calculate on load, nothing was saved, what was saved is
221
+ * not an answer (`#BUSY!`, a blocked spill), or the function is volatile.
231
222
  */
223
+ protected _savedAnswer(node: CalcNode): Scalar | IRange | undefined;
232
224
  protected _takeDeferred(node: CalcNode, value: any): any;
233
225
  /** The cells of the `TABLE` nodes the pass skipped, scoped; `undefined` for none. */
234
226
  private _takeSkippedTables;
235
- /**
236
- * The read hook of a pass (DESIGN-CIRCULAR-CALC.md §4.3, §5), shared by both paths: armed for
237
- * every reference while a node is evaluated by demand, and for dynamic-branch references
238
- * (`OFFSET`/`INDIRECT`/`INDEX` results) on the ordinary path. A read that lands on a node of
239
- * THIS pass decides: `Waiting` (on the in-progress stack — transitively waiting on the reader)
240
- * is a cycle; `Unevaluated` suspends the reader until it is done; `Evaluated` (in the pending
241
- * batch) is committed on the spot and read; `Done` with a cycle role makes the reader
242
- * downstream. Any other cell is a value. Inert outside a pass, so a reference built during one
243
- * and read later (a spill committed afterwards) is plain values.
244
- *
245
- * `prefetch` is the rectangle an ITERATION was asked for, announced before its first read. Only
246
- * the `Unevaluated` decision belongs to it — bringing what the sweep may need forward is free,
247
- * and over-eager is harmless (design §4.3) — while `Waiting` and a finished cycle role are left
248
- * to the per-position reports the sweep makes, which is what stops an early-exit lookup from
249
- * reporting the tail it never opened (plan item 1). It answers whether those reports can say
250
- * anything at all: a rectangle holding no node of this pass and nothing the sheet shows in a
251
- * cycle is swept unobserved.
252
- */
253
227
  private _onPassRead;
254
228
  /**
255
229
  * A read of a `Done` cycle node by the node being evaluated: the reader is downstream of that
@@ -314,27 +288,6 @@ export declare class CalcExecutor {
314
288
  * slot `length` on; returns the new length.
315
289
  */
316
290
  private _collectUnevaluated;
317
- /**
318
- * Evaluates `worklist` by demand (DESIGN-CIRCULAR-CALC.md §4.3): each node is evaluated with the
319
- * read hook armed; a read that lands on one not yet evaluated suspends the reader and evaluates
320
- * that one first (`NeedsFirst`); a read that lands on one already suspended — waiting,
321
- * transitively, on the reader — is a cycle (`Circular`), and the in-progress stack from it up
322
- * to the reader are the members, written `0`. A node that reads a member is downstream and
323
- * writes `0` too. Everything else simply computes: an unorderable static edge that is never
324
- * read (`OFFSET`'s anchor, `ROW`'s argument, an untaken `IF` branch) makes no cycle.
325
- *
326
- * @remarks
327
- * Two callers: `doEvaluate` when the plan reaches the nodes `doMarkAndPlan` could not order
328
- * (the batch, after everything ordered is committed), and `doEvaluate` again for a single
329
- * ordered node whose dynamic read landed on a node not yet evaluated — the same suspension,
330
- * on the ordinary path (§5). Every node evaluated here is flagged `circular`, so the plan
331
- * takes its `demandValue` when it reaches it, and its finalized scalar is already in the
332
- * overlay's demand layer for later lazy reads (`_pushDemand`); `flush` commits the ordered
333
- * path's pending batch when a read needs a value still sitting in it. Flat: the stack is an
334
- * array, so a 1,560-row chain is 1,560 evaluations, not 1,560 JS frames. A node is retried at
335
- * most once per `NeedsFirst` it raises, and with the prefetch of its static precedents that is
336
- * normally once.
337
- */
338
291
  protected doDemandEvaluate(cycleId: number, getUpdates: (scope: string) => ICalcGrid.IncrementalUpdates, worklist: readonly CalcNode[], flush: () => void): void;
339
292
  /**
340
293
  * The finalized scalar goes into the overlay's demand layer now, so a later lazy read sees it;
@@ -348,23 +301,7 @@ export declare class CalcExecutor {
348
301
  * `flush` of the `doEvaluate` that made it, and only that one.
349
302
  */
350
303
  private _overlayFor;
351
- /**
352
- * The results of a what-if data table, for the `TABLE` node being evaluated
353
- * (DESIGN-DATA-TABLES §4.3): the affected nodes re-evaluated under each substitution of §2.2,
354
- * through layers over what the grids read as now, the pass's uncommitted results included.
355
- *
356
- * @remarks
357
- * The read hooks and the dynamic-edge accumulator are set aside while it runs: every member
358
- * read is a plain read through the layers and registers no edge. The table's own reads of its
359
- * edge, which order it and register its edges, are made before (`_DataTableFunction`). The calc
360
- * scope is the table's again on return.
361
- */
362
304
  evaluateWhatIf(table: WhatIfTable): Scalar[][];
363
- /**
364
- * One node evaluated where it sits, under the what-if layers (DESIGN-DATA-TABLES §4.3): its
365
- * input slots are cleared so every read falls through to the funnel, as a demand evaluation's
366
- * do. An async result stands as the cell's last value; so does a read that raised a signal.
367
- */
368
305
  private _evaluateWhatIf;
369
306
  /**
370
307
  * A finalized result fitted to its cell when the block makes every cell its own 1x1
@@ -383,30 +320,6 @@ export declare class CalcExecutor {
383
320
  * arm it skipped), all of it final by now, so it is evaluated without the pass's read hook.
384
321
  */
385
322
  private _isPositionFree;
386
- /**
387
- * The representative of a gated block has finalized (PLAN-WATCHES-BLANK-AWARE §4): its scalar is
388
- * shared with the block's blank region, or the gate is closed and the region is re-collected
389
- * cell by cell.
390
- *
391
- * @remarks
392
- * Shared only when nothing the evaluation read was per cell (`CalcScope.perCellRead`: a draw, a
393
- * computed reference; a position unless {@link _isPositionFree} rules it out), the result is a
394
- * scalar, and the node ran on its own - not a promise, not pending on one, not in a cycle. A
395
- * per-cell read is a fact of the formula and
396
- * closes the gate for good ({@link FormulaSpatialValue.blankRefused}); the rest may not recur
397
- * and close it for this pass ({@link _fallbackBlank}).
398
- *
399
- * How the region is shared depends on who can read it (§4c). A block in a SHEET grid is read
400
- * by other formulas, the sheet and the error index, all through the grid's values, so the
401
- * scalar is written as runs - one per column of each blank rectangle, which for a column block
402
- * is one run. A block in a grid that SHADOWS a sheet (a watch body, a one-shot evaluation) has
403
- * exactly one reader, the range its owner holds, and that range answers the region as its empty
404
- * value from the block (`FormulaSpatialValue.getBlankValueWithin`): nothing is written, whatever
405
- * the region's size, and what an earlier pass stored there is removed so the block's answer is
406
- * the one read.
407
- *
408
- * @param refuse The caller's own reasons the result cannot stand for the region.
409
- */
410
323
  private _finalizeRepresentative;
411
324
  /**
412
325
  * Marks dirty the cells of a shared blank region whose value the share just moved, wherever a
@@ -494,29 +407,6 @@ export declare class CalcExecutor {
494
407
  * them run on (iteration on). Returns the stack index of `read`.
495
408
  */
496
409
  private _markCycleSlice;
497
- /**
498
- * Iterative calculation (design §6.3) over the members {@link _demandRun} marked. Each sweep
499
- * evaluates them in ADDRESS order, each read seeing the latest value (Gauss–Seidel in row-major
500
- * order, as Excel: `probe-iterative.ps1`), until no member moved by `maxChange` or
501
- * `maxIteration` sweeps ran.
502
- * The limits are global, as in Excel — one unsettled member keeps every cycle of the pass
503
- * sweeping. Downstream nodes read the members once more afterwards; one that feeds a swept node
504
- * is swept with them instead (`_onMemberRead`), so the rest feed no cycle and need no sweeping.
505
- * Converged means a sweep over a list that did not grow moved nothing by `maxChange`: every
506
- * node a swept node reads is then swept itself or does not move in this pass, so the state is a
507
- * fixed point and not a fragment's. The members are then registered as volatile so the next
508
- * recalculation re-runs them, which is how `=A1+1` advances per recalc (Excel re-iterates every
509
- * cycle on every `Calculate()`).
510
- *
511
- * @remarks
512
- * The evaluation that FOUND the members ran in dependency order — `B1 = B2+1` needs `B2` first,
513
- * whichever of the two the plan reached first — so its results are not a sweep of this order,
514
- * and counting them as one costs a step. The members go back to the values the pass found them
515
- * at; a member that had none is then evaluated once, in address order, for the entry evaluation
516
- * Excel gave it when it was written (§2.4), and every one of the `maxIteration` sweeps runs on
517
- * top of that. Discovery's results are never read: a node that read a member is downstream, and
518
- * evaluates again below.
519
- */
520
410
  private _demandSweep;
521
411
  /** Clears the `IterHit` flags of the hits not consumed by {@link _demandRun}'s loop and empties the list. */
522
412
  private _drainIterHits;
@@ -599,6 +489,8 @@ export declare class CalcExecutor {
599
489
  * Uses Kahn's algorithm.
600
490
  */
601
491
  doMarkAndPlan(cycleId: number, markId: number, initial: FixedPackedArray<CalcNode>, plan: FixedPackedArray<CalcNode>, forceDemand?: boolean): boolean;
492
+ /** Stamps a plan as the order later passes may take a subset of (§1.2); `orderedLength` is where its demand appendix starts. */
493
+ private _stampPlan;
602
494
  /**
603
495
  * The remembered plan whose seed set is exactly this pass's, at this epoch — or `null`. The
604
496
  * length check first: it is what rejects the common miss (a single-cell pass against a bulk
@@ -637,24 +529,18 @@ export declare namespace CalcExecutor {
637
529
  * The grid to seed the pass FROM — `ICalculation.CalculateOptions.scope`, i.e. "Calculate Sheet".
638
530
  */
639
531
  scopeGridId?: string;
640
- /**
641
- * The settle pass (DESIGN-ASYNC §4.5): seeded from what the settles marked only; the volatiles
642
- * and the dirty set are left for the pass that owes them.
643
- */
644
532
  settle?: boolean;
645
533
  /**
646
534
  * `ICalculation.CalculateOptions.external`: the calls the pass makes fetch past the workbook's
647
535
  * cache, to the source.
648
536
  */
649
537
  external?: boolean;
538
+ /** The pass a load owes: a cell with a saved value answers with it rather than asking the source. */
539
+ load?: boolean;
650
540
  /**
651
541
  * Iterative calculation (design §6.3) for the pass; `null`/absent with it off.
652
542
  */
653
543
  iterate?: IterateOptions | null;
654
- /**
655
- * A reactive pass under `AutomaticExceptTables`: `TABLE` nodes are skipped and left dirty
656
- * (DESIGN-DATA-TABLES §4.4); they come back in {@link ExecuteResult.skippedTables}.
657
- */
658
544
  exceptTables?: boolean;
659
545
  }
660
546
  /** The two limits of `ICalculation.IterativeCalculation`. */
@@ -741,12 +627,9 @@ export declare namespace CalcExecutor {
741
627
  /** Discovery searches skipped (or verified) because `dependentsEpoch` was current. */
742
628
  dependentsCacheHits: number;
743
629
  dependentsCacheMisses: number;
744
- /**
745
- * Nodes evaluated on the ORDERED path (`evaluateAt` from `doEvaluate`); `evaluations` counts
746
- * the demand path. Their sum is every formula run — what blank-aware evaluation
747
- * (PLAN-WATCHES-BLANK-AWARE §4) reduces to the touched cells plus one.
748
- */
749
630
  evaluated: number;
631
+ /** Plans ordered by formula block, with no cell-level walk (`orderByBlocks`). */
632
+ blockOrdered: number;
750
633
  discoveryMs: number;
751
634
  inDegreeMs: number;
752
635
  kahnMs: number;
@@ -45,17 +45,6 @@ export declare function rangeToTuples(range: IRange, offsetMajor?: number, offse
45
45
  * is the packing, and the result reads its grid alone. Anything else is returned as it is.
46
46
  */
47
47
  export declare function packForReturn<T>(finalized: T): T;
48
- /**
49
- * Fits a result to a fixed (array-entered) extent, per dimension: a dimension of 1 broadcasts, a
50
- * longer one is clipped, a shorter one is padded with `#N/A`. Measured against Excel
51
- * (`probe-cse.ps1`): `=SEQUENCE(5)` into 3 rows is `1,2,3`; `=SEQUENCE(2)` into 5 rows is
52
- * `1,2,#N/A,#N/A,#N/A`; `=SUM(H1:H5)` into 3x3 is the sum nine times; a 1x3 into 3x3 repeats the
53
- * row; a 3x1 into 3x3 repeats the column.
54
- *
55
- * @returns The fitted values, row-major, exactly `rowCount` x `colCount`. A blank source cell stays
56
- * blank (`null`), as it does when a dynamic array spills. The fit is a fixed point - fitting the
57
- * result again yields the same shape - so nothing downstream needs a "do not resize" guard.
58
- */
59
48
  export declare function fitToExtent(value: Scalar | IRange, rowCount: number, colCount: number): Scalar[][];
60
49
  /**
61
50
  * {@link fitToExtent} as grid tuples over `coords`, in the orientation of the grid they are written
@@ -78,10 +67,40 @@ export declare function fitToTuples(value: Scalar | IRange, coords: IRange.Coord
78
67
  * @param scratch An array the search fills; the caller's, reused across calls.
79
68
  */
80
69
  export declare function visitReaderWindows(precedentSpatial: ISpatialQuery<PrecedentSpatialValue>, region: IRange.Coords, scratch: ISpatialMap.Entry<PrecedentSpatialValue>[], visitWindow: (block: FormulaSpatialValue, rowFrom: number, rowTo: number, colFrom: number, colTo: number) => void, visitDynamic: (entry: ISpatialMap.Entry<PrecedentSpatialValue>, block: FormulaSpatialValue) => void): void;
70
+ /**
71
+ * Whether every cell of a static entry's block reads exactly one cell through it.
72
+ *
73
+ * @remarks
74
+ * Only such a reader looks at what a precedent pushes. A range reader builds its range when it
75
+ * evaluates, over that same slot. A reader this answers `false` for and that does read one cell (the
76
+ * first of `$A$1:A1`, whose range grows from there) has an empty slot, and reads the cell itself.
77
+ */
78
+ export declare function readsOneCell(depEntry: ISpatialMap.Entry<PrecedentSpatialValue>): boolean;
81
79
  /**
82
80
  * TODO - document and/or rationalize with visitPrecedentBlock
83
81
  */
84
82
  export declare function visitDependencyBlock(depEntry: ISpatialMap.Entry<PrecedentSpatialValue>, rowIndex: number, colIndex: number, callbackFn: (calc: CalcNode) => void, mint?: MintWindow | null): void;
83
+ /** The part of a reader block an entry has reached so far in one discovery, absolute and closed. */
84
+ export interface ReachedWindow {
85
+ rowFrom: number;
86
+ rowTo: number;
87
+ colFrom: number;
88
+ colTo: number;
89
+ }
90
+ /**
91
+ * {@link visitDependencyBlock} for discovery, which only has to reach each reader once.
92
+ *
93
+ * @remarks
94
+ * Every cell of a range reports to the same readers, so a running total reached from each of its n
95
+ * inputs would walk n²/2 readers to find one input's worth. What an entry has reached is kept in
96
+ * `reached` for the discovery, and each visit walks only what it adds: nothing for a running total
97
+ * after its first input, one reader per input for a sliding window. A window that does not meet what
98
+ * is held is walked whole, and the larger of the two is kept; that only costs a repeat, since
99
+ * reaching a reader twice changes nothing.
100
+ *
101
+ * An entry whose readers read one cell has one reader per input, and nothing to save.
102
+ */
103
+ export declare function discoverDependencyBlock(depEntry: ISpatialMap.Entry<PrecedentSpatialValue>, rowIndex: number, colIndex: number, callbackFn: (calc: CalcNode) => void, mint: MintWindow, reached: Map<PrecedentSpatialValue, ReachedWindow>): void;
85
104
  /**
86
105
  * Visit the cells of a dependent block that read a spill's BODY — the extent an anchor at
87
106
  * (`anchorRow`, `anchorCol`) occupies, MINUS the anchor cell itself.
@@ -13,23 +13,6 @@ export interface CycleHost {
13
13
  /** The sheet name for a grid id, or `undefined` for a virtual grid (a named formula's body). */
14
14
  resolveScope(gridId: string): string | undefined;
15
15
  }
16
- /**
17
- * One reference cycle (DESIGN-CIRCULAR-CALC.md §7.3): the executor's record of it and its public
18
- * face in one — the object a `Feature.Circular` region carries as its payload and
19
- * `ICell.getCircularReference()` answers. It holds the nodes the sheet index currently shows as
20
- * its members and as downstream of it, the interned index payloads, and how the sweep that
21
- * settled it ended. It persists across passes — a node moves between cycles when a commit writes
22
- * its delta (`_trackCircular`) — and is dropped when its last node leaves.
23
- *
24
- * @remarks
25
- * Every read filters through {@link CycleHost.isLiveNode}: a pass that deletes the offending
26
- * formula never plans, so the sets cannot clear themselves, and a member is counted only while
27
- * its cell still holds the block the cycle was found in (design §7.3, trap 5).
28
- *
29
- * The iteration answers come from the sweep that settled the cycle (design §6.3). A cycle id is
30
- * minted by the pass that finds it, so a cycle evaluated with iteration off is a different object
31
- * with no record — `isIterative()` is exactly "a sweep settled this one".
32
- */
33
16
  export declare class CircularReference implements ICalculation.ICircularReference {
34
17
  protected readonly _host: CycleHost;
35
18
  protected readonly _cycleId: number;
@@ -0,0 +1,29 @@
1
+ import { ISpatialMap3D } from '../../collections';
2
+ import { FormulaSpatialValue } from '../spatial';
3
+ import { CalcNode } from '../state';
4
+ /**
5
+ * Orders a pass by formula block rather than by cell.
6
+ *
7
+ * @remarks
8
+ * A range reader adds an edge per cell it reads, so ordering a running total cell by cell visits
9
+ * n²/2 edges to learn that one column goes before another. A block's references are the same at
10
+ * every cell at that cell's offset, so its reads are known from its corners, and the block graph is
11
+ * as many vertices as the sheet has distinct fills.
12
+ *
13
+ * Every edge between cells lies inside an edge between their blocks, so a block order that exists
14
+ * is a valid cell order. Within a block the cells go in row order or column order, whichever puts
15
+ * everything the block reads of itself first. The block graph can refuse an order the cells have
16
+ * (`A1=B1`, `B1=A2`, filled down: each column reads the other); that answer is `false`, and is not
17
+ * a statement about cycles. Cell-level ordering decides those.
18
+ *
19
+ * Inputs and spills are the caller's: a spill's body edges are not in a block's references, and a
20
+ * reader of a cycle shown elsewhere is found by the cell-level walk.
21
+ *
22
+ * @param nodes The affected nodes.
23
+ * @param length The number of affected nodes.
24
+ * @param formulas The formula map the references resolve against.
25
+ * @param out Receives the nodes in order. Written over on `false` as well.
26
+ * @returns Whether `out` is a valid order.
27
+ */
28
+ export declare function orderByBlocks(nodes: CalcNode[], length: number, formulas: ISpatialMap3D<FormulaSpatialValue>, out: CalcNode[]): boolean;
29
+ //# sourceMappingURL=_BlockOrder.d.ts.map