@sheetxl/sdk 0.8.0-beta.1 → 0.8.0-beta.11

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 (775) hide show
  1. package/README.md +1 -1
  2. package/THIRD-PARTY-NOTICES.md +1 -1
  3. package/browser/esm/B7aUIvgUjncMMD_i.mjs +394 -0
  4. package/browser/esm/BFagR2JeWs74iAG3.mjs +171 -0
  5. package/browser/esm/BGOFfpxr2jPIdqmV.mjs +40 -0
  6. package/browser/esm/BLoUBId2xZpXAK_H.mjs +698 -0
  7. package/browser/esm/BMyDRQ716j79h_bH.mjs +86 -0
  8. package/browser/esm/BVDiOXGMc5_FMGfy.mjs +400 -0
  9. package/browser/esm/BjkCiv5Jz6WYKZeu.mjs +598 -0
  10. package/browser/esm/BkBhLS0l6z8sxI6D.mjs +441 -0
  11. package/browser/esm/BnG31I6Oj_HEtSPS.mjs +167 -0
  12. package/browser/esm/BoV6zPBnfqCBCqZ7.mjs +7729 -0
  13. package/browser/esm/BpgskG1Er_lGQ_yS.mjs +142 -0
  14. package/browser/esm/BtvLTTfSBdAKplVG.mjs +466 -0
  15. package/browser/esm/C16ycKja6zG0crV_.mjs +55580 -0
  16. package/browser/esm/C2VbEI_XVAoseAwa.mjs +1552 -0
  17. package/browser/esm/C4MqfLn9Dm-l3OIk.mjs +540 -0
  18. package/browser/esm/C5E6zSGAALWf61n4.mjs +199 -0
  19. package/browser/esm/CHU6iu_WGlm7fLET.mjs +1001 -0
  20. package/browser/esm/CQYjO777cmAznUzK.mjs +527 -0
  21. package/browser/esm/CU3DmJ-YnVVrC1_k.mjs +1123 -0
  22. package/browser/esm/CV5EGEjG5_-CPpP0.mjs +8212 -0
  23. package/browser/esm/{uyWBMSIxMlt8n5Z3.mjs → CaB7J-xgfKO2uAkG.mjs} +2 -2
  24. package/browser/esm/CkxWugaJFjDGZNZ-.mjs +12 -0
  25. package/browser/esm/ClPfI4lODvCece29.mjs +632 -0
  26. package/browser/esm/ClbvFbFzFzXLBKNN.mjs +193 -0
  27. package/browser/esm/{DlPMeIyxT9tG_WDk.mjs → Ctjb0SsxV4K4MMqG.mjs} +179 -202
  28. package/browser/esm/D5np__Jb1euAyaLw.mjs +7 -0
  29. package/browser/esm/DEiPS3Dr-s4fPbVZ.mjs +607 -0
  30. package/browser/esm/DLLE0FZNsKxbBzRn.mjs +128 -0
  31. package/browser/esm/DWNzqw7DUKwoxjri.mjs +20 -0
  32. package/browser/esm/{B0HS42a7lga1k1U_.mjs → Dlmig06rIo7cInRk.mjs} +2 -2
  33. package/browser/esm/{f2G3QRgEbvFJcoa2.mjs → DvAaxH6z_tGvrRzl.mjs} +1704 -1008
  34. package/browser/esm/Dyq_ivuHvlXLwPCl.mjs +12831 -0
  35. package/browser/esm/PcHFjNzQsE54POri.mjs +1141 -0
  36. package/browser/esm/S2dNNx1a5ydRnARM.mjs +367 -0
  37. package/browser/esm/f1IoRb7tEb0QmCSt.mjs +110 -0
  38. package/browser/esm/gssVX_FH1XFN-twD.mjs +210 -0
  39. package/browser/esm/index.mjs +1759 -1161
  40. package/browser/esm/nvU0ClAbf0g94YBK.mjs +1695 -0
  41. package/browser/esm/zlLuW405RSguy4Kn.mjs +357 -0
  42. package/licenses/dependencies.txt +141 -141
  43. package/node/esm/2Kihw_-5lVTEnwMa.mjs +1132 -0
  44. package/node/esm/857CIBgQgGpnqrXk.mjs +199 -0
  45. package/node/esm/B084DssTcdBheTp_.mjs +7966 -0
  46. package/node/esm/B21JjOLghRoDOrkx.mjs +134 -0
  47. package/node/esm/BIRq1kT7lLRzns9t.mjs +610 -0
  48. package/node/esm/BIwObuhTJYf0jpUa.mjs +451 -0
  49. package/node/esm/Bbf1Pm9Gk7YpLTvg.mjs +12 -0
  50. package/node/esm/BqiexuA89caYnAPz.mjs +1135 -0
  51. package/node/esm/BrCKGFRsX_ezFJ4B.mjs +811 -0
  52. package/node/esm/CCN5vD410obwdz38.mjs +405 -0
  53. package/node/esm/{Cku7XiUvw1xrRasi.mjs → CDHdgJXH2vS71WMc.mjs} +1 -1
  54. package/node/esm/CGp6VZL-gZa9Uezx.mjs +1860 -0
  55. package/node/esm/CNCNJNg890KdgkWh.mjs +142 -0
  56. package/node/esm/CZICGK_ss0HoGHCP.mjs +7 -0
  57. package/node/esm/CZiqiay42tFTrLI4.mjs +171 -0
  58. package/node/esm/CdJHUJSBRHZoryPe.mjs +360 -0
  59. package/node/esm/Ct3h15sCus4Tgt6M.mjs +1762 -0
  60. package/node/esm/CwePQwTILHHjGDkZ.mjs +1033 -0
  61. package/node/esm/CzXT00vrQa1_gvW9.mjs +28 -0
  62. package/node/esm/D1TKBVmoKGAXf37B.mjs +402 -0
  63. package/node/esm/D2KBymQJd1XhpeQD.mjs +540 -0
  64. package/node/esm/D6e2z7eZpxOJXHc7.mjs +1783 -0
  65. package/node/esm/D8zEN-6ZdDqDvTxM.mjs +639 -0
  66. package/node/esm/DNRhGK-8Tr9xcRyc.mjs +8320 -0
  67. package/node/esm/DOU54VsOjG-m-NyQ.mjs +210 -0
  68. package/node/esm/DUTskXCXref-IJnI.mjs +133 -0
  69. package/node/esm/D_t5AUxSm7_icjzq.mjs +638 -0
  70. package/node/esm/Db0v7zXNnyjBIjjI.mjs +372 -0
  71. package/node/esm/De2IONBxQhz-Qbyh.mjs +596 -0
  72. package/node/esm/Df1bL6VFvrqIdSLB.mjs +40 -0
  73. package/node/esm/DkwIPzKc3UwdUIfM.mjs +86 -0
  74. package/node/esm/DrTZbfemSLq2mseG.mjs +111 -0
  75. package/node/esm/OVfaSb506tNSIvbv.mjs +57107 -0
  76. package/node/esm/cGwrLA1RCE-WhJ7w.mjs +255 -0
  77. package/node/esm/index.mjs +2873 -53929
  78. package/node/esm/mFiBSM7XgBHV9AY7.mjs +13010 -0
  79. package/node/esm/yavzZOiZW_EjG9lE.mjs +15 -0
  80. package/package.json +15 -17
  81. package/resources/contents.json +184 -0
  82. package/resources/fonts/arial-bold-italic.hinted.json +125 -0
  83. package/resources/fonts/arial-bold-italic.metrics.json +139 -0
  84. package/resources/fonts/arial-bold-italic.rows.json +9 -0
  85. package/resources/fonts/arial-bold.hinted.json +125 -0
  86. package/resources/fonts/arial-bold.metrics.json +139 -0
  87. package/resources/fonts/arial-bold.rows.json +9 -0
  88. package/resources/fonts/arial-italic.hinted.json +125 -0
  89. package/resources/fonts/arial-italic.metrics.json +139 -0
  90. package/resources/fonts/arial-italic.rows.json +9 -0
  91. package/resources/fonts/arial-regular.hinted.json +125 -0
  92. package/resources/fonts/arial-regular.metrics.json +139 -0
  93. package/resources/fonts/arial-regular.rows.json +9 -0
  94. package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
  95. package/resources/fonts/calibri-bold-italic.metrics.json +137 -0
  96. package/resources/fonts/calibri-bold-italic.rows.json +9 -0
  97. package/resources/fonts/calibri-bold.hinted.json +122 -0
  98. package/resources/fonts/calibri-bold.metrics.json +137 -0
  99. package/resources/fonts/calibri-bold.rows.json +9 -0
  100. package/resources/fonts/calibri-italic.hinted.json +121 -0
  101. package/resources/fonts/calibri-italic.metrics.json +137 -0
  102. package/resources/fonts/calibri-italic.rows.json +9 -0
  103. package/resources/fonts/calibri-regular.hinted.json +121 -0
  104. package/resources/fonts/calibri-regular.metrics.json +137 -0
  105. package/resources/fonts/calibri-regular.rows.json +9 -0
  106. package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
  107. package/resources/fonts/cambria-bold-italic.metrics.json +66 -0
  108. package/resources/fonts/cambria-bold-italic.rows.json +9 -0
  109. package/resources/fonts/cambria-bold.hinted.json +108 -0
  110. package/resources/fonts/cambria-bold.metrics.json +66 -0
  111. package/resources/fonts/cambria-bold.rows.json +9 -0
  112. package/resources/fonts/cambria-italic.hinted.json +102 -0
  113. package/resources/fonts/cambria-italic.metrics.json +66 -0
  114. package/resources/fonts/cambria-italic.rows.json +9 -0
  115. package/resources/fonts/cambria-regular.hinted.json +110 -0
  116. package/resources/fonts/cambria-regular.metrics.json +66 -0
  117. package/resources/fonts/cambria-regular.rows.json +9 -0
  118. package/resources/fonts/contents.json +406 -0
  119. package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
  120. package/resources/fonts/courier-new-bold-italic.metrics.json +143 -0
  121. package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
  122. package/resources/fonts/courier-new-bold.hinted.json +11 -0
  123. package/resources/fonts/courier-new-bold.metrics.json +143 -0
  124. package/resources/fonts/courier-new-bold.rows.json +9 -0
  125. package/resources/fonts/courier-new-italic.hinted.json +11 -0
  126. package/resources/fonts/courier-new-italic.metrics.json +143 -0
  127. package/resources/fonts/courier-new-italic.rows.json +9 -0
  128. package/resources/fonts/courier-new-regular.hinted.json +11 -0
  129. package/resources/fonts/courier-new-regular.metrics.json +143 -0
  130. package/resources/fonts/courier-new-regular.rows.json +9 -0
  131. package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
  132. package/resources/fonts/times-new-roman-bold-italic.metrics.json +141 -0
  133. package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
  134. package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
  135. package/resources/fonts/times-new-roman-bold.metrics.json +141 -0
  136. package/resources/fonts/times-new-roman-bold.rows.json +9 -0
  137. package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
  138. package/resources/fonts/times-new-roman-italic.metrics.json +143 -0
  139. package/resources/fonts/times-new-roman-italic.rows.json +9 -0
  140. package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
  141. package/resources/fonts/times-new-roman-regular.metrics.json +141 -0
  142. package/resources/fonts/times-new-roman-regular.rows.json +9 -0
  143. package/resources/locales/de/model.msg.json +199 -21
  144. package/resources/locales/en/model.msg.json +207 -23
  145. package/types/scripting-api.json +10663 -0
  146. package/types/scripting-enums.json +435 -130
  147. package/types/scripting.d.ts +33010 -15730
  148. package/types/src/.generated/wasm/fonts.d.ts +161 -0
  149. package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
  150. package/types/src/.generated/wasm/sdk.d.ts +122 -0
  151. package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
  152. package/types/src/address/AddressUtils.d.ts +10 -1
  153. package/types/src/address/_StructuredAddress.d.ts +58 -0
  154. package/types/src/anchored/AbstractAnchored.d.ts +18 -8
  155. package/types/src/anchored/AnchoredMap.d.ts +2 -0
  156. package/types/src/anchored/IAnchoredMap.d.ts +52 -4
  157. package/types/src/autoFill/AutoFill.d.ts +316 -32
  158. package/types/src/autoFill/IAutoFill.d.ts +232 -15
  159. package/types/src/border/{IBorder.d.ts → IBorders.d.ts} +58 -41
  160. package/types/src/border/index.d.ts +1 -1
  161. package/types/src/calculation/Calculation.d.ts +584 -149
  162. package/types/src/calculation/ExternalBookBindings.d.ts +118 -0
  163. package/types/src/calculation/FormulaLiterals.d.ts +2 -1
  164. package/types/src/calculation/FormulaText.d.ts +98 -0
  165. package/types/src/calculation/ICalculation.d.ts +353 -88
  166. package/types/src/calculation/INamedFormulasCollection.d.ts +9 -8
  167. package/types/src/calculation/NamedFormulaCollection.d.ts +322 -115
  168. package/types/src/calculation/NamedLambdaFunction.d.ts +28 -0
  169. package/types/src/calculation/TokenType.d.ts +9 -0
  170. package/types/src/calculation/Types.d.ts +83 -2
  171. package/types/src/calculation/_CloneBoundary.d.ts +80 -0
  172. package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
  173. package/types/src/calculation/_TableExtent.d.ts +60 -0
  174. package/types/src/calculation/_TableRename.d.ts +13 -0
  175. package/types/src/calculation/compiler/ASTTypes.d.ts +71 -0
  176. package/types/src/calculation/compiler/CompilerUtils.d.ts +152 -44
  177. package/types/src/calculation/compiler/FormulaCompiler.d.ts +29 -4
  178. package/types/src/calculation/compiler/FormulaParser.d.ts +1 -2
  179. package/types/src/calculation/compiler/LiteTransform.d.ts +17 -0
  180. package/types/src/calculation/compiler/ParserUtils.d.ts +42 -1
  181. package/types/src/calculation/compiler/SRParser.d.ts +2 -1
  182. package/types/src/calculation/compiler/Types.d.ts +79 -9
  183. package/types/src/calculation/engine/CalcBackend.d.ts +855 -0
  184. package/types/src/calculation/engine/index.d.ts +10 -0
  185. package/types/src/calculation/executor/CalcExecutor.d.ts +331 -33
  186. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +49 -2
  187. package/types/src/calculation/executor/CircularReference.d.ts +2 -0
  188. package/types/src/calculation/formula/Formula.d.ts +67 -21
  189. package/types/src/calculation/formula/FormulaBlock.d.ts +131 -23
  190. package/types/src/calculation/formula/FormulaRecordView.d.ts +79 -0
  191. package/types/src/calculation/formula/FunctionValues.d.ts +10 -0
  192. package/types/src/calculation/formula/IFormulaBlock.d.ts +277 -67
  193. package/types/src/calculation/formula/LambdaValue.d.ts +51 -26
  194. package/types/src/calculation/formula/LazyValue.d.ts +96 -0
  195. package/types/src/calculation/formula/TokenUtils.d.ts +25 -1
  196. package/types/src/calculation/formula/index.d.ts +1 -0
  197. package/types/src/calculation/functions/FunctionDeclarations.d.ts +35 -0
  198. package/types/src/calculation/functions/Operators.d.ts +8 -0
  199. package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
  200. package/types/src/calculation/functions/initializeFunctions.d.ts +3 -2
  201. package/types/src/calculation/grid/CalcGrid.d.ts +443 -158
  202. package/types/src/calculation/grid/CalcGridBackend.d.ts +523 -0
  203. package/types/src/calculation/grid/CalcGridProxy.d.ts +135 -0
  204. package/types/src/calculation/grid/CalcGridUtils.d.ts +69 -12
  205. package/types/src/calculation/grid/FormulaEntry.d.ts +129 -0
  206. package/types/src/calculation/grid/FormulaHost.d.ts +284 -0
  207. package/types/src/calculation/grid/ICalcGrid.d.ts +528 -141
  208. package/types/src/calculation/grid/_CalcRequest.d.ts +299 -0
  209. package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
  210. package/types/src/calculation/grid/index.d.ts +4 -0
  211. package/types/src/calculation/index.d.ts +2 -0
  212. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +6 -2
  213. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +364 -11
  214. package/types/src/calculation/spatial/SpillEntry.d.ts +20 -5
  215. package/types/src/calculation/spatial/TouchedWindows.d.ts +86 -0
  216. package/types/src/calculation/spatial/index.d.ts +1 -0
  217. package/types/src/calculation/state/CalcInputs.d.ts +41 -0
  218. package/types/src/calculation/state/CalcNode.d.ts +141 -30
  219. package/types/src/calculation/state/CalcScope.d.ts +46 -0
  220. package/types/src/calculation/state/CalcState.d.ts +32 -1
  221. package/types/src/calculation/state/CalculationContext.d.ts +50 -3
  222. package/types/src/calculation/state/IContextContainer.d.ts +141 -27
  223. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +163 -0
  224. package/types/src/calculation/state/_ReadObservedGrid.d.ts +74 -8
  225. package/types/src/calculation/state/index.d.ts +1 -0
  226. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +80 -0
  227. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +23 -0
  228. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +16 -2
  229. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +63 -3
  230. package/types/src/calculation/symbol/SymbolRegistry.d.ts +20 -0
  231. package/types/src/calculation/symbol/index.d.ts +3 -2
  232. package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
  233. package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
  234. package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
  235. package/types/src/calculation/toolkit/index.d.ts +12 -0
  236. package/types/src/cell/ICell.d.ts +357 -33
  237. package/types/src/cell/ICellHeader.d.ts +31 -8
  238. package/types/src/cell/ICellProtection.d.ts +50 -10
  239. package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
  240. package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
  241. package/types/src/cellRange/ICellRange.d.ts +737 -130
  242. package/types/src/cellRange/ICellRanges.d.ts +31 -24
  243. package/types/src/chart/Chart.d.ts +246 -16
  244. package/types/src/chart/ChartCollection.d.ts +31 -0
  245. package/types/src/chart/IChart.d.ts +2058 -18
  246. package/types/src/chart/IChartCollection.d.ts +50 -0
  247. package/types/src/chart/_ChartParts.d.ts +1066 -0
  248. package/types/src/chart/_ChartSource.d.ts +47 -0
  249. package/types/src/chart/createChart.d.ts +26 -0
  250. package/types/src/chart/index.d.ts +5 -3
  251. package/types/src/chart/kinds/ChartKind.d.ts +252 -0
  252. package/types/src/chart/kinds/_Area.d.ts +3 -0
  253. package/types/src/chart/kinds/_Bar.d.ts +4 -0
  254. package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
  255. package/types/src/chart/kinds/_Bubble.d.ts +3 -0
  256. package/types/src/chart/kinds/_Funnel.d.ts +4 -0
  257. package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
  258. package/types/src/chart/kinds/_Histogram.d.ts +4 -0
  259. package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
  260. package/types/src/chart/kinds/_Line.d.ts +4 -0
  261. package/types/src/chart/kinds/_OfPie.d.ts +4 -0
  262. package/types/src/chart/kinds/_Pie.d.ts +4 -0
  263. package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
  264. package/types/src/chart/kinds/_Radar.d.ts +4 -0
  265. package/types/src/chart/kinds/_Scatter.d.ts +8 -0
  266. package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
  267. package/types/src/chart/kinds/_Surface.d.ts +4 -0
  268. package/types/src/chart/kinds/_Treemap.d.ts +4 -0
  269. package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
  270. package/types/src/chart/kinds/_builtIns.d.ts +11 -0
  271. package/types/src/chart/layout/ChartLayout.d.ts +825 -0
  272. package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
  273. package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
  274. package/types/src/chart/layout/_HitTest.d.ts +36 -0
  275. package/types/src/chart/layout/_Layout.d.ts +25 -0
  276. package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
  277. package/types/src/chart/math/BoxStats.d.ts +35 -0
  278. package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
  279. package/types/src/chart/math/DisplayUnits.d.ts +53 -0
  280. package/types/src/chart/math/Histogram.d.ts +48 -0
  281. package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
  282. package/types/src/chart/math/Treemap.d.ts +28 -0
  283. package/types/src/chart/math/Trendlines.d.ts +71 -0
  284. package/types/src/chart/math/UnitCalcs.d.ts +98 -0
  285. package/types/src/chart/model/ChartModel.d.ts +681 -0
  286. package/types/src/chart/model/_ChartType.d.ts +14 -0
  287. package/types/src/chart/model/_Edits.d.ts +489 -0
  288. package/types/src/chart/model/_Grouping.d.ts +83 -0
  289. package/types/src/chart/model/_Inference.d.ts +52 -0
  290. package/types/src/chart/model/_ModelFacts.d.ts +112 -0
  291. package/types/src/chart/model/_NewChart.d.ts +208 -0
  292. package/types/src/chart/model/_OfPie.d.ts +18 -0
  293. package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
  294. package/types/src/chart/resolve/_Resolve.d.ts +51 -0
  295. package/types/src/chart/resolve/_ResolvedChart.d.ts +444 -0
  296. package/types/src/collections/ArraysGrid.d.ts +1 -1
  297. package/types/src/collections/IGrid.d.ts +1 -1
  298. package/types/src/collections/ISparseGrid.d.ts +9 -0
  299. package/types/src/collections/ISpatialMap.d.ts +59 -21
  300. package/types/src/collections/ImmutableList.d.ts +28 -0
  301. package/types/src/collections/MixedTypedArrayList.d.ts +168 -108
  302. package/types/src/collections/RTree.d.ts +116 -36
  303. package/types/src/collections/RepeatingList.d.ts +7 -0
  304. package/types/src/collections/ScalarGrid.d.ts +50 -0
  305. package/types/src/collections/SparseGrid.d.ts +7 -4
  306. package/types/src/collections/SpatialMap.d.ts +15 -29
  307. package/types/src/collections/SpatialMap3D.d.ts +2 -0
  308. package/types/src/collections/Tuple.d.ts +128 -16
  309. package/types/src/collections/_GridUtils.d.ts +19 -6
  310. package/types/src/collections/_SpatialUtils.d.ts +20 -2
  311. package/types/src/collections/index.d.ts +2 -1
  312. package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
  313. package/types/src/comment/Comment.d.ts +246 -0
  314. package/types/src/comment/CommentCollection.d.ts +40 -0
  315. package/types/src/comment/IComment.d.ts +377 -50
  316. package/types/src/comment/ICommentCollection.d.ts +90 -0
  317. package/types/src/comment/NoteMovable.d.ts +26 -0
  318. package/types/src/comment/_CommentUtils.d.ts +50 -0
  319. package/types/src/comment/_NoteBox.d.ts +67 -0
  320. package/types/src/comment/index.d.ts +1 -0
  321. package/types/src/condition/AnchoredConditional.d.ts +110 -19
  322. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +42 -12
  323. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
  324. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
  325. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
  326. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
  327. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
  328. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
  329. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
  330. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
  331. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
  332. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
  333. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +4 -1
  334. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +5 -6
  335. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
  336. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
  337. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
  338. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +22 -5
  339. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
  340. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
  341. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
  342. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
  343. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
  344. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  345. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
  346. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +21 -6
  347. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +4 -5
  348. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +20 -0
  349. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +7 -5
  350. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +3 -5
  351. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +3 -5
  352. package/types/src/condition/BuiltinSelectors/index.d.ts +12 -6
  353. package/types/src/condition/Condition.d.ts +19 -1
  354. package/types/src/condition/ICondition.d.ts +296 -75
  355. package/types/src/condition/_ConditionFormula.d.ts +152 -0
  356. package/types/src/condition/_ConditionUtils.d.ts +167 -13
  357. package/types/src/conditionalFormat/ConditionalEntry.d.ts +3 -3
  358. package/types/src/conditionalFormat/ConditionalFormat.d.ts +34 -17
  359. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +19 -8
  360. package/types/src/conditionalFormat/IConditionalFormat.d.ts +16 -13
  361. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +2 -0
  362. package/types/src/dataTable/DataTable.d.ts +67 -0
  363. package/types/src/dataTable/DataTableCollection.d.ts +19 -0
  364. package/types/src/dataTable/IDataTable.d.ts +99 -0
  365. package/types/src/dataTable/IDataTableCollection.d.ts +18 -0
  366. package/types/src/dataTable/index.d.ts +6 -0
  367. package/types/src/dataValidation/DataValidation.d.ts +70 -4
  368. package/types/src/dataValidation/DataValidationCollection.d.ts +23 -9
  369. package/types/src/dataValidation/IDataValidation.d.ts +150 -31
  370. package/types/src/dataValidation/IDataValidationCollection.d.ts +34 -2
  371. package/types/src/date/DateUtils.d.ts +20 -0
  372. package/types/src/date/_DateUtils.d.ts +91 -7
  373. package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
  374. package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
  375. package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
  376. package/types/src/documentProperties/index.d.ts +3 -0
  377. package/types/src/externalBook/ExternalBookCollection.d.ts +145 -12
  378. package/types/src/externalBook/ExternalBookName.d.ts +96 -0
  379. package/types/src/externalBook/IExternalBook.d.ts +171 -19
  380. package/types/src/externalBook/IExternalBookCollection.d.ts +79 -7
  381. package/types/src/externalBook/index.d.ts +1 -0
  382. package/types/src/{lib/file → file}/file.browser.d.ts +22 -8
  383. package/types/src/{lib/file → file}/file.node.d.ts +7 -2
  384. package/types/src/fill/IEffect.d.ts +5 -5
  385. package/types/src/fill/IFill.d.ts +129 -77
  386. package/types/src/fill/IFillable.d.ts +47 -0
  387. package/types/src/fill/IStroke.d.ts +204 -64
  388. package/types/src/fill/PaintUtils.d.ts +22 -0
  389. package/types/src/fill/RectAlignment.d.ts +20 -0
  390. package/types/src/fill/_Fills.d.ts +187 -0
  391. package/types/src/fill/_Stroke.d.ts +89 -0
  392. package/types/src/fill/index.d.ts +3 -0
  393. package/types/src/filter/IFilter.d.ts +188 -5
  394. package/types/src/font/AdvanceBuilder.d.ts +59 -0
  395. package/types/src/font/AdvanceTable.d.ts +228 -0
  396. package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
  397. package/types/src/font/FontCapture.d.ts +4 -0
  398. package/types/src/font/FontCollection.d.ts +108 -0
  399. package/types/src/font/FontPlatform.d.ts +20 -0
  400. package/types/src/font/FontUtils.d.ts +5 -0
  401. package/types/src/font/IFont.d.ts +208 -61
  402. package/types/src/font/IFontCollection.d.ts +126 -22
  403. package/types/src/font/IFontStyle.d.ts +207 -0
  404. package/types/src/font/TableFileAdvanceBuilder.d.ts +36 -0
  405. package/types/src/font/_BuiltinFontTables.d.ts +10 -0
  406. package/types/src/font/_FontUtils.d.ts +11 -4
  407. package/types/src/font/_FontsVersion.d.ts +7 -0
  408. package/types/src/font/index.d.ts +2 -1
  409. package/types/src/font/platform.browser.d.ts +15 -0
  410. package/types/src/font/platform.node.d.ts +5 -0
  411. package/types/src/group/Group.d.ts +141 -0
  412. package/types/src/group/GroupMovableCollection.d.ts +41 -0
  413. package/types/src/group/IGroup.d.ts +129 -0
  414. package/types/src/group/index.d.ts +2 -0
  415. package/types/src/history/IHistory.d.ts +21 -3
  416. package/types/src/hyperlink/IHyperlink.d.ts +20 -1
  417. package/types/src/hyperlink/_Hyperlink.d.ts +5 -1
  418. package/types/src/i18n/LanguagePack.d.ts +12 -4
  419. package/types/src/index.d.ts +8 -0
  420. package/types/src/io/AbstractBackingStore.d.ts +24 -1
  421. package/types/src/io/ArrayBackingStore.d.ts +1 -1
  422. package/types/src/io/EmbeddedPart.d.ts +20 -0
  423. package/types/src/io/IEmbeddedPart.d.ts +63 -0
  424. package/types/src/io/IWorkbookIO.d.ts +185 -18
  425. package/types/src/io/WorkbookIO.d.ts +9 -0
  426. package/types/src/io/WorkbookOrigin.d.ts +20 -11
  427. package/types/src/io/WorkbookOriginProvider.d.ts +46 -0
  428. package/types/src/io/_XmlFragment.d.ts +49 -0
  429. package/types/src/io/index.d.ts +1 -0
  430. package/types/src/license/LicenseDetails.d.ts +1 -0
  431. package/types/src/license/LicenseManager.d.ts +25 -1
  432. package/types/src/license/Types.d.ts +38 -0
  433. package/types/src/license/_Utils.d.ts +39 -0
  434. package/types/src/license/details.d.ts +24 -0
  435. package/types/src/license/license-key.d.ts +49 -2
  436. package/types/src/license/runtime.browser.d.ts +46 -0
  437. package/types/src/{lib/utils/utils.node.d.ts → license/runtime.node.d.ts} +19 -12
  438. package/types/src/listener/IListener.d.ts +23 -6
  439. package/types/src/listener/ListenerEmitter.d.ts +55 -6
  440. package/types/src/model/AbstractModel.d.ts +14 -5
  441. package/types/src/movable/AbstractMovableContent.d.ts +182 -0
  442. package/types/src/movable/CustomElement.d.ts +4 -5
  443. package/types/src/movable/ErrorContent.d.ts +49 -0
  444. package/types/src/movable/FormControl.d.ts +285 -0
  445. package/types/src/movable/GroupMember.d.ts +87 -0
  446. package/types/src/movable/ICustomElement.d.ts +7 -2
  447. package/types/src/movable/IErrorContent.d.ts +23 -0
  448. package/types/src/movable/IFormControl.d.ts +455 -0
  449. package/types/src/movable/IMovable.d.ts +405 -60
  450. package/types/src/movable/IMovableCollection.d.ts +64 -4
  451. package/types/src/movable/Movable.d.ts +161 -50
  452. package/types/src/movable/MovableCollection.d.ts +21 -10
  453. package/types/src/movable/MovableContentRegistry.d.ts +113 -0
  454. package/types/src/movable/_BuiltInContents.d.ts +14 -0
  455. package/types/src/movable/_ContentFactory.d.ts +35 -0
  456. package/types/src/movable/_DrawnBounds.d.ts +37 -0
  457. package/types/src/movable/_InsertableCollection.d.ts +39 -0
  458. package/types/src/movable/_MovableUtils.d.ts +5 -0
  459. package/types/src/movable/_PendingContent.d.ts +25 -0
  460. package/types/src/movable/_PlacementUtils.d.ts +55 -0
  461. package/types/src/movable/_RotatedFrame.d.ts +20 -0
  462. package/types/src/movable/index.d.ts +7 -1
  463. package/types/src/named/AbstractNamed.d.ts +1 -1
  464. package/types/src/named/INamed.d.ts +34 -1
  465. package/types/src/named/INamedCollection.d.ts +28 -2
  466. package/types/src/named/NamedCollection.d.ts +32 -19
  467. package/types/src/numFmt/BuiltInFormats.d.ts +20 -7
  468. package/types/src/numFmt/IFormatEngine.d.ts +2 -0
  469. package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
  470. package/types/src/numFmt/NumfmtFormatEngine.d.ts +2 -0
  471. package/types/src/numFmt/_FormatCell.d.ts +11 -2
  472. package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
  473. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
  474. package/types/src/outline/IOutline.d.ts +186 -0
  475. package/types/src/outline/Outline.d.ts +157 -0
  476. package/types/src/outline/index.d.ts +2 -0
  477. package/types/src/person/IPerson.d.ts +99 -0
  478. package/types/src/person/IPersonCollection.d.ts +51 -0
  479. package/types/src/person/Person.d.ts +32 -0
  480. package/types/src/person/PersonCollection.d.ts +49 -0
  481. package/types/src/person/index.d.ts +4 -0
  482. package/types/src/picture/IPicture.d.ts +131 -4
  483. package/types/src/picture/Picture.d.ts +42 -14
  484. package/types/src/pivot/IPivotTable.d.ts +72 -0
  485. package/types/src/pivot/IPivotTableCollection.d.ts +25 -0
  486. package/types/src/pivot/PivotCache.d.ts +34 -0
  487. package/types/src/pivot/PivotTable.d.ts +61 -0
  488. package/types/src/pivot/PivotTableCollection.d.ts +25 -0
  489. package/types/src/pivot/_PivotXml.d.ts +24 -0
  490. package/types/src/pivot/index.d.ts +6 -0
  491. package/types/src/primitives/CompositeRangeStats.d.ts +2 -0
  492. package/types/src/primitives/Criteria.d.ts +1 -1
  493. package/types/src/primitives/Grouping.d.ts +65 -0
  494. package/types/src/primitives/LambdaBrand.d.ts +26 -0
  495. package/types/src/primitives/PrimitiveUtils.d.ts +56 -19
  496. package/types/src/primitives/Range.d.ts +133 -25
  497. package/types/src/primitives/RangeStats.d.ts +30 -2
  498. package/types/src/primitives/ReferenceRange.d.ts +44 -0
  499. package/types/src/primitives/Runtime.d.ts +15 -2
  500. package/types/src/primitives/environment.browser.d.ts +9 -0
  501. package/types/src/primitives/environment.node.d.ts +10 -0
  502. package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
  503. package/types/src/primitives/stats/Cancellation.d.ts +13 -0
  504. package/types/src/primitives/stats/FrequencyStats.d.ts +10 -1
  505. package/types/src/primitives/stats/LookupIndex.d.ts +46 -0
  506. package/types/src/primitives/stats/Ranked.d.ts +1 -1
  507. package/types/src/primitives/stats/SortedNumbers.d.ts +4 -2
  508. package/types/src/primitives/stats/index.d.ts +1 -0
  509. package/types/src/print/IPageLayout.d.ts +635 -0
  510. package/types/src/print/PageLayout.d.ts +258 -0
  511. package/types/src/print/index.d.ts +1 -1
  512. package/types/src/protectedRange/IProtectedRange.d.ts +6 -2
  513. package/types/src/protectedRange/IProtectedRangeCollection.d.ts +2 -0
  514. package/types/src/protectedRange/ProtectedRange.d.ts +1 -4
  515. package/types/src/protectedRange/ProtectedRangeCollection.d.ts +19 -8
  516. package/types/src/protection/DefaultProtection.d.ts +12 -1
  517. package/types/src/protection/IProtection.d.ts +42 -2
  518. package/types/src/protection/PasswordHasher.d.ts +13 -0
  519. package/types/src/reference/ReferenceUtils.d.ts +80 -0
  520. package/types/src/reference/index.d.ts +2 -0
  521. package/types/src/resource/IResource.d.ts +21 -1
  522. package/types/src/resource/IResourceCollection.d.ts +9 -1
  523. package/types/src/resource/ResourceCollection.d.ts +6 -6
  524. package/types/src/richData/IRichDataKind.d.ts +22 -0
  525. package/types/src/richData/RichDataRegistry.d.ts +57 -0
  526. package/types/src/richData/RichText.d.ts +59 -0
  527. package/types/src/richData/index.d.ts +3 -0
  528. package/types/src/scripting/FunctionCollection.d.ts +49 -15
  529. package/types/src/scripting/IFunctionCollection.d.ts +62 -32
  530. package/types/src/scripting/IModule.d.ts +25 -0
  531. package/types/src/scripting/IModuleCollection.d.ts +17 -0
  532. package/types/src/scripting/IScript.d.ts +30 -28
  533. package/types/src/scripting/ITypedFunction.d.ts +1 -1
  534. package/types/src/scripting/Module.d.ts +34 -6
  535. package/types/src/scripting/ModuleCollection.d.ts +17 -12
  536. package/types/src/scripting/Runtime.d.ts +15 -0
  537. package/types/src/scripting/Scripts.d.ts +3 -7
  538. package/types/src/scripting/TypedFunction.d.ts +154 -18
  539. package/types/src/scripting/_FunctionIndex.d.ts +8 -3
  540. package/types/src/scripting/_ModuleUtils.d.ts +11 -1
  541. package/types/src/scripting/_ScriptUtils.d.ts +3 -0
  542. package/types/src/scripting/declarations.browser.d.ts +10 -0
  543. package/types/src/scripting/declarations.d.ts +52 -0
  544. package/types/src/scripting/declarations.node.d.ts +9 -0
  545. package/types/src/scripting/index.d.ts +3 -0
  546. package/types/src/selection/ChartElementSelection.d.ts +39 -0
  547. package/types/src/selection/IChartElementSelection.d.ts +103 -0
  548. package/types/src/selection/IItemSelection.d.ts +131 -0
  549. package/types/src/selection/IMovableSelection.d.ts +120 -0
  550. package/types/src/selection/IRangeSelection.d.ts +13 -8
  551. package/types/src/selection/ItemSelection.d.ts +49 -0
  552. package/types/src/selection/MovableSelection.d.ts +29 -0
  553. package/types/src/selection/RangeSelection.d.ts +19 -4
  554. package/types/src/selection/index.d.ts +4 -0
  555. package/types/src/shape/GeometryPreset.d.ts +197 -0
  556. package/types/src/shape/IGeometry.d.ts +380 -0
  557. package/types/src/shape/IShape.d.ts +342 -194
  558. package/types/src/shape/IShapeStyle.d.ts +109 -0
  559. package/types/src/shape/ITextBoxStyle.d.ts +85 -0
  560. package/types/src/shape/Shape.d.ts +107 -21
  561. package/types/src/shape/ShapeStyleUtils.d.ts +66 -0
  562. package/types/src/shape/_ConnectorFrame.d.ts +32 -0
  563. package/types/src/shape/_ConnectorRoute.d.ts +33 -0
  564. package/types/src/shape/_Connectors.d.ts +108 -0
  565. package/types/src/shape/_Geometry.d.ts +14 -0
  566. package/types/src/shape/_GeometryLoader.d.ts +21 -0
  567. package/types/src/shape/_ShapeStyle.d.ts +79 -0
  568. package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
  569. package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
  570. package/types/src/shape/_builtIn/arrows.d.ts +6 -0
  571. package/types/src/shape/_builtIn/basic.d.ts +6 -0
  572. package/types/src/shape/_builtIn/callouts.d.ts +6 -0
  573. package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
  574. package/types/src/shape/_builtIn/lines.d.ts +6 -0
  575. package/types/src/shape/_builtIn/math.d.ts +6 -0
  576. package/types/src/shape/_builtIn/other.d.ts +6 -0
  577. package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
  578. package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
  579. package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
  580. package/types/src/shape/geometry/format.d.ts +3 -0
  581. package/types/src/shape/geometry/geometry.d.ts +85 -0
  582. package/types/src/shape/geometry/guides.d.ts +54 -0
  583. package/types/src/shape/geometry/handles.d.ts +14 -0
  584. package/types/src/shape/geometry/index.d.ts +7 -0
  585. package/types/src/shape/geometry/lineEnds.d.ts +54 -0
  586. package/types/src/shape/geometry/paths.d.ts +35 -0
  587. package/types/src/shape/geometry/segments.d.ts +114 -0
  588. package/types/src/shape/index.d.ts +4 -0
  589. package/types/src/sheet/CellRegion.d.ts +43 -3
  590. package/types/src/sheet/ICellContainerOptions.d.ts +50 -0
  591. package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
  592. package/types/src/sheet/ISheet.d.ts +81 -931
  593. package/types/src/sheet/IWorksheet.d.ts +1514 -0
  594. package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +38 -16
  595. package/types/src/sheet/NamedCellRange.d.ts +17 -8
  596. package/types/src/sheet/NamedRange.d.ts +10 -2
  597. package/types/src/sheet/OpaqueSheet.d.ts +114 -0
  598. package/types/src/sheet/SheetCell.d.ts +96 -39
  599. package/types/src/sheet/SheetRange.d.ts +130 -27
  600. package/types/src/sheet/SheetRanges.d.ts +33 -18
  601. package/types/src/sheet/Worksheet.d.ts +2250 -0
  602. package/types/src/sheet/WorksheetCollection.d.ts +39 -0
  603. package/types/src/sheet/_Anomalies.d.ts +109 -0
  604. package/types/src/sheet/_AnomalyFormulaChecks.d.ts +125 -0
  605. package/types/src/sheet/_AnomalyLabelChecks.d.ts +21 -0
  606. package/types/src/sheet/_CellBuffer.d.ts +224 -0
  607. package/types/src/sheet/_CopyUtils.d.ts +13 -6
  608. package/types/src/sheet/_HeldFormula.d.ts +69 -0
  609. package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
  610. package/types/src/sheet/_InvalidSheetRange.d.ts +10 -9
  611. package/types/src/sheet/_Kinds.d.ts +34 -0
  612. package/types/src/sheet/_Labels.d.ts +38 -0
  613. package/types/src/sheet/_ListenerAnchor.d.ts +104 -0
  614. package/types/src/sheet/_RangeStateSweep.d.ts +15 -0
  615. package/types/src/sheet/_ScalarListFactory.d.ts +61 -0
  616. package/types/src/sheet/_SheetAutoFillUtils.d.ts +74 -0
  617. package/types/src/sheet/_SheetAutoFitUtils.d.ts +5 -5
  618. package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
  619. package/types/src/sheet/_SheetCoords.d.ts +3 -3
  620. package/types/src/sheet/_SheetEvents.d.ts +43 -0
  621. package/types/src/sheet/_SheetFilterUtils.d.ts +51 -3
  622. package/types/src/sheet/_SheetIntents.d.ts +314 -0
  623. package/types/src/sheet/_SheetMessages.d.ts +1 -1
  624. package/types/src/sheet/_SheetMutations.d.ts +185 -66
  625. package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
  626. package/types/src/sheet/_SheetStateReader.d.ts +35 -11
  627. package/types/src/sheet/_SheetStateTypes.d.ts +143 -79
  628. package/types/src/sheet/_SheetUtils.d.ts +59 -41
  629. package/types/src/sheet/_WatchAnchor.d.ts +106 -0
  630. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
  631. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
  632. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
  633. package/types/src/sheet/index.d.ts +5 -2
  634. package/types/src/sheet/spatial/HeldFormulaEntry.d.ts +36 -0
  635. package/types/src/sheet/spatial/index.d.ts +1 -0
  636. package/types/src/sheet/style/SheetCellStyle.d.ts +223 -337
  637. package/types/src/sheet/style/SheetDirectStyle.d.ts +31 -20
  638. package/types/src/sheet/style/SheetNamedStyle.d.ts +19 -17
  639. package/types/src/sheet/style/SheetTableStyle.d.ts +5 -5
  640. package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
  641. package/types/src/sheet/style/_Resolvers.d.ts +17 -10
  642. package/types/src/sheet/style/_StyleUtils.d.ts +34 -40
  643. package/types/src/sheetHeader/ISheetHeader.d.ts +96 -55
  644. package/types/src/sheetHeader/SheetCellHeader.d.ts +6 -0
  645. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
  646. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
  647. package/types/src/sheetHeader/SheetHeader.d.ts +48 -27
  648. package/types/src/sheetHeader/_HeaderMetrics.d.ts +37 -0
  649. package/types/src/sheetHeader/_HeaderUtils.d.ts +5 -4
  650. package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +64 -30
  651. package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
  652. package/types/src/sheetProtection/index.d.ts +1 -1
  653. package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +230 -69
  654. package/types/src/sheetView/WorksheetView.d.ts +139 -0
  655. package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
  656. package/types/src/sheetView/index.d.ts +1 -1
  657. package/types/src/slicer/ISlicer.d.ts +304 -17
  658. package/types/src/slicer/ISlicerStyle.d.ts +109 -0
  659. package/types/src/slicer/Slicer.d.ts +128 -13
  660. package/types/src/slicer/SlicerStyle.d.ts +25 -0
  661. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +13 -0
  662. package/types/src/slicer/_SlicerUtils.d.ts +30 -0
  663. package/types/src/slicer/index.d.ts +1 -0
  664. package/types/src/sort/ISort.d.ts +39 -7
  665. package/types/src/string/IStringCollection.d.ts +5 -0
  666. package/types/src/string/StringCollection.d.ts +6 -6
  667. package/types/src/style/{IStyle.d.ts → ICellStyle.d.ts} +117 -85
  668. package/types/src/style/INamedStyleCollection.d.ts +72 -0
  669. package/types/src/style/ISlicerStyleCollection.d.ts +77 -0
  670. package/types/src/style/IStyleCollection.d.ts +91 -60
  671. package/types/src/style/ITableStyleCollection.d.ts +89 -0
  672. package/types/src/style/NamedStyleCollection.d.ts +39 -0
  673. package/types/src/style/SlicerStyleCollection.d.ts +46 -0
  674. package/types/src/style/StyleCollection.d.ts +81 -26
  675. package/types/src/style/TableStyleCollection.d.ts +49 -0
  676. package/types/src/style/_BuiltInStyleDefs.d.ts +9 -8
  677. package/types/src/style/_BuiltInStyleNames.d.ts +2 -2
  678. package/types/src/style/index.d.ts +7 -1
  679. package/types/src/table/AnchoredTable.d.ts +723 -78
  680. package/types/src/table/AutoTable.d.ts +8 -6
  681. package/types/src/table/ITable.d.ts +289 -49
  682. package/types/src/table/ITableCollection.d.ts +12 -0
  683. package/types/src/table/ITableStyle.d.ts +37 -37
  684. package/types/src/table/TableCollection.d.ts +19 -8
  685. package/types/src/table/_FilterField.d.ts +19 -6
  686. package/types/src/table/_NamedTable.d.ts +20 -4
  687. package/types/src/table/_NamedTableSource.d.ts +3 -2
  688. package/types/src/table/_SortField.d.ts +2 -0
  689. package/types/src/table/_TableColumn.d.ts +13 -2
  690. package/types/src/table/_TableMessages.d.ts +1 -0
  691. package/types/src/table/_TableUtils.d.ts +40 -0
  692. package/types/src/text/Bullet.d.ts +4 -0
  693. package/types/src/text/IText.d.ts +150 -15
  694. package/types/src/text/ITextFrame.d.ts +110 -1
  695. package/types/src/text/TextBoxAlignment.d.ts +25 -16
  696. package/types/src/text/TextEngine.d.ts +34 -0
  697. package/types/src/text/TextFrame.d.ts +8 -2
  698. package/types/src/text/TextLine.d.ts +4 -0
  699. package/types/src/text/TextParagraph.d.ts +4 -0
  700. package/types/src/text/TextRotation.d.ts +3 -3
  701. package/types/src/text/TextRun.d.ts +12 -2
  702. package/types/src/text/TextStacked.d.ts +83 -0
  703. package/types/src/text/TextWrapper.d.ts +32 -26
  704. package/types/src/text/_TextUtils.d.ts +5 -5
  705. package/types/src/text/_TextWrapperFallback.d.ts +49 -0
  706. package/types/src/text/impl/TabStrategy.d.ts +3 -1
  707. package/types/src/text/index.d.ts +1 -0
  708. package/types/src/text/richtext/IRichText.d.ts +50 -0
  709. package/types/src/text/richtext/index.d.ts +1 -1
  710. package/types/src/theme/ITheme.d.ts +153 -11
  711. package/types/src/theme/IThemeCollection.d.ts +2 -0
  712. package/types/src/theme/ThemeCollection.d.ts +16 -7
  713. package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
  714. package/types/src/theme/_OfficeFormatScheme.d.ts +3 -0
  715. package/types/src/transaction/ITransaction.d.ts +277 -45
  716. package/types/src/transaction/Transaction.d.ts +108 -11
  717. package/types/src/transaction/TransactionUndoManager.d.ts +4 -1
  718. package/types/src/transaction/_BatchHandle.d.ts +118 -0
  719. package/types/src/type/AbstractCollection.d.ts +92 -0
  720. package/types/src/type/ICollection.d.ts +131 -1
  721. package/types/src/type/IProperties.d.ts +1 -1
  722. package/types/src/type/ITypes.d.ts +9 -7
  723. package/types/src/type/index.d.ts +1 -0
  724. package/types/src/utils/_CSSUtils.d.ts +4 -4
  725. package/types/src/wasm/_fontsWasm.d.ts +7 -0
  726. package/types/src/wasm/_sdkWasm.d.ts +7 -0
  727. package/types/src/wasm/fontsWasm.d.ts +32 -0
  728. package/types/src/wasm/index.d.ts +3 -0
  729. package/types/src/wasm/loader.browser.d.ts +9 -0
  730. package/types/src/wasm/loader.node.d.ts +9 -0
  731. package/types/src/wasm/sdkWasm.d.ts +32 -0
  732. package/types/src/workbook/IWorkbook.d.ts +404 -73
  733. package/types/src/workbook/Workbook.d.ts +196 -28
  734. package/types/src/workbook/WorkbookRange.d.ts +2 -2
  735. package/types/src/workbook/WorkbookRanges.d.ts +2 -2
  736. package/types/src/workbook/_WorkbookIntents.d.ts +36 -0
  737. package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
  738. package/types/src/workbookProtection/IWorkbookProtection.d.ts +7 -0
  739. package/types/src/workbookProtection/WorkbookProtection.d.ts +3 -0
  740. package/types/src/workbookView/IWorkbookView.d.ts +94 -0
  741. package/types/src/workbookView/WorkbookView.d.ts +26 -0
  742. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +0 -1
  743. package/browser/cjs/BatsV2UUraVDCRXm.cjs +0 -57
  744. package/browser/cjs/CUz53T65cRGQRgvv.cjs +0 -33
  745. package/browser/cjs/DU0kYUtdFa3jK-im.cjs +0 -1
  746. package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +0 -10
  747. package/browser/cjs/Dv4yIPLV98M5zLHa.cjs +0 -1
  748. package/browser/cjs/a0Z-SXs_N71CtqYb.cjs +0 -1
  749. package/browser/cjs/index.cjs +0 -3
  750. package/browser/esm/6JKSOvc5czaQB2Bj.mjs +0 -109
  751. package/browser/esm/BtuJ9AGzeURtAsGo.mjs +0 -51241
  752. package/browser/esm/DGU6sM25u0EWCKl1.mjs +0 -824
  753. package/node/esm/-pxdn3M3tc6PLHs7.mjs +0 -114
  754. package/node/esm/0n5bslM9jhO1JnI2.mjs +0 -843
  755. package/types/src/cellRange/_GraphNode.d.ts +0 -38
  756. package/types/src/collections/OverlappingRangeIterator.d.ts +0 -91
  757. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +0 -12
  758. package/types/src/dataValidation/_Utils.d.ts +0 -10
  759. package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
  760. package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
  761. package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
  762. package/types/src/lib/utils/_Utils.d.ts +0 -27
  763. package/types/src/lib/utils/utils.browser.d.ts +0 -33
  764. package/types/src/movable/IGroup.d.ts +0 -30
  765. package/types/src/movable/IMovableSelection.d.ts +0 -49
  766. package/types/src/print/IPrint.d.ts +0 -234
  767. package/types/src/sheet/Sheet.d.ts +0 -1107
  768. package/types/src/sheet/SheetCollection.d.ts +0 -18
  769. package/types/src/sheet/listener/RangesListener.d.ts +0 -32
  770. package/types/src/sheet/listener/RangesListenerEntry.d.ts +0 -19
  771. package/types/src/sheet/listener/index.d.ts +0 -3
  772. package/types/src/sheetProtection/SheetProtection.d.ts +0 -39
  773. package/types/src/sheetView/SheetView.d.ts +0 -113
  774. package/types/src/text/richtext/IStyledFont.d.ts +0 -330
  775. /package/types/src/{lib/utils → license}/banner.d.ts +0 -0
@@ -0,0 +1,2250 @@
1
+ import { IRange, Scalar, InteropScalar, IRangeStats, IRuntime } from '@sheetxl/primitives';
2
+ import { CoordUtils, Size, Bounds, Point } from '@sheetxl/utils';
3
+ import { ITypes, ICollection, IProperties } from '../type';
4
+ import { IWorkbook } from '../workbook';
5
+ import { IListener } from '../listener';
6
+ import { ITransaction } from '../transaction';
7
+ import { BatchHandle } from '../transaction/_BatchHandle';
8
+ import { IResource, IResourceCollection } from '../resource';
9
+ import { IStringCollection } from '../string';
10
+ import { IProtection } from '../protection';
11
+ import { IComment, ICommentCollection } from '../comment';
12
+ import { IColor } from '../color';
13
+ import { IHyperlink } from '../hyperlink';
14
+ import { ISort } from '../sort';
15
+ import { IAutoFill } from '../autoFill';
16
+ import { IAnchored } from '../anchored';
17
+ import { Anchored } from '../anchored/Anchored';
18
+ import { IAnchoredMap } from '../anchored/IAnchoredMap';
19
+ import { ITable, ITableCollection } from '../table';
20
+ import { NamedTableSource } from '../table/_NamedTableSource';
21
+ import { AnchoredTable } from '../table/AnchoredTable';
22
+ import { INamedCollection } from '../named';
23
+ import { IModuleCollection } from '../scripting';
24
+ import { ModuleCollection } from '../scripting/ModuleCollection';
25
+ import { IMovable, IMovableCollection } from '../movable';
26
+ import { Movable } from '../movable/Movable';
27
+ import { AbstractMovableContent } from '../movable/AbstractMovableContent';
28
+ import { IChartCollection } from '../chart';
29
+ import { IPicture } from '../picture';
30
+ import { InsertableCollection } from '../movable/_InsertableCollection';
31
+ import { IPivotTable, IPivotTableCollection } from '../pivot';
32
+ import { IDataTable, IDataTableCollection } from '../dataTable';
33
+ import { AnomalyFindings, AnomalySet, AnomalySource, RoleSource } from './_Anomalies';
34
+ import { CellKind } from './_Kinds';
35
+ import { ICell } from '../cell';
36
+ import { ICellRange, ICellRegions, ICellRanges } from '../cellRange';
37
+ import { ICellStyle, IStyleCollection } from '../style';
38
+ import { IRangeSelection } from '../selection';
39
+ import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
40
+ import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
41
+ import { Tuple, ISpatialMap, ISpatialQuery } from '../collections';
42
+ import { ListenerEmitter } from '../listener/ListenerEmitter';
43
+ import { ICondition } from '../condition';
44
+ import { ConditionalFormat } from '../conditionalFormat/ConditionalFormat';
45
+ import { IDataValidationCollection, IDataValidation } from '../dataValidation';
46
+ import { DataValidation } from '../dataValidation/DataValidation';
47
+ import { ProtectedRange } from '../protectedRange/ProtectedRange';
48
+ import { Comment } from '../comment/Comment';
49
+ import { NoteMovable } from '../comment/NoteMovable';
50
+ import { NoteLayout } from '../comment/_NoteBox';
51
+ import { IWorksheetProtection } from '../sheetProtection';
52
+ import { IOutline } from '../outline';
53
+ import { IPageLayout } from '../print';
54
+ import { ISheetHeader } from '../sheetHeader';
55
+ import { IWorksheetView } from '../sheetView';
56
+ import { IWorksheet } from './IWorksheet';
57
+ import { ISheet } from './ISheet';
58
+ import { ScalarListFactory } from './_ScalarListFactory';
59
+ import { ListenerAnchor } from './_ListenerAnchor';
60
+ import { WatchAnchor } from './_WatchAnchor';
61
+ import { ShiftIntent } from './_SheetIntents';
62
+ import { EventCategory, SheetEvents } from './_SheetEvents';
63
+ import { SheetChangeDetails } from './_SheetChangeEvent';
64
+ import { SheetHeader } from '../sheetHeader/SheetHeader';
65
+ import { SheetDirectStyle } from './style/SheetDirectStyle';
66
+ import { IUsedRangeSpatialMap } from './style/UsedRangeSpatialMap';
67
+ import { RangeState, CellState, State, MovableEntry, MovableIndex, InternalTupleUpdate } from './_SheetStateTypes';
68
+ import { CellBuffer } from './_CellBuffer';
69
+ import { SheetReadContext, GetTypedRangeOptions, OverFlowsAndStops } from './_SheetStateReader';
70
+ import { AutoFillProjection, AutoFillPreviewCache } from './_SheetAutoFillUtils';
71
+ import { ProtectionCheck } from './_SheetCoords';
72
+ import { WorksheetProtection } from '../sheetProtection/WorksheetProtection';
73
+ import { Outline } from '../outline/Outline';
74
+ import { PageLayout } from '../print/PageLayout';
75
+ import { SheetCellOptions } from './SheetCell';
76
+ import { ICalculation } from '../calculation';
77
+ import { ICalcGrid } from '../calculation/grid';
78
+ import * as _SheetFilterUtils from './_SheetFilterUtils';
79
+ /** The font colors a workbook writes its roles in, and a key that compares by content. */
80
+ interface WorkbookRoleColors {
81
+ readonly key: string;
82
+ readonly colors: ReadonlySet<string>;
83
+ }
84
+ /**
85
+ * Implementation of {@link IWorksheet}.
86
+ */
87
+ /**
88
+ * The internal capability surface a {@link Worksheet} vends to `SheetRange`/`SheetRanges` and (later)
89
+ * extracted operation modules. It carries ONLY genuinely-internal operations; the public `IWorksheet`
90
+ * API is reached via `getWorksheet()` and never duplicated here. The type is derived from the concrete
91
+ * `_internal` object so it can never drift from the implementation.
92
+ * @internal
93
+ */
94
+ export type IWorksheetInternal = ReturnType<Worksheet['_getInternal']>;
95
+ /**
96
+ * The context a {@link Worksheet} vends to `_SheetMutations` (the shift/insert/delete engine). Derived
97
+ * from the concrete `_buildMutationCtx` object so it can never drift from the implementation.
98
+ * @internal
99
+ */
100
+ export type SheetMutationContext = ReturnType<Worksheet['_buildMutationCtx']>;
101
+ /**
102
+ * The context a {@link Worksheet} vends to `_SheetCoords` (address/coord resolution). Derived from the
103
+ * concrete `_buildCoordCtx` object so it can never drift from the implementation.
104
+ * @internal
105
+ */
106
+ export type SheetCoordContext = ReturnType<Worksheet['_buildCoordCtx']>;
107
+ /**
108
+ * What an operation hands {@link Worksheet._commitWithDirectives} beyond its selection and options.
109
+ * @internal
110
+ */
111
+ export interface CommitDirectives {
112
+ /** Where an undo lands, when it is not the selection. See `Sheet._recordSelection`. */
113
+ undo?: Partial<IRangeSelection.Coords> | null;
114
+ /** The axis the selection is scrolled along. */
115
+ axis?: IRange.Axis;
116
+ /** Handed to the commit. */
117
+ commit?: ITransaction.StoreOperationOptions;
118
+ }
119
+ /** The sheet's legacy drawing as it holds it: {@link IWorksheet.LegacyDrawingJSON} with each image resolved to its {@link IResource}, so paste and `.sxl` keep working. */
120
+ interface LegacyDrawing {
121
+ xml: string;
122
+ images?: LegacyDrawingImage[];
123
+ }
124
+ interface LegacyDrawingImage {
125
+ /** The id {@link LegacyDrawing.xml} references this image by. */
126
+ id: string;
127
+ resource: IResource;
128
+ }
129
+ export declare class Worksheet implements IWorksheet {
130
+ protected _options: IWorksheet.ConstructorOptions;
131
+ protected _id: string;
132
+ /** The store-issued key for this sheet's state record. Distinct from `_id`, the document-level id (formula scope / JSON). */
133
+ protected _stateId: string;
134
+ protected _transactions: ITransaction.IStore;
135
+ protected _ownTransactions: boolean;
136
+ protected _transactionsRemoveListener: IListener.Remove;
137
+ protected _transactionsCloseRemoveListener: IListener.Remove;
138
+ /** The view's selection when the open root began. See {@link _onRootTransactionClose}. */
139
+ protected _selectionAtCommitStart: IRangeSelection.Coords | null;
140
+ /**
141
+ * The movables each closed root selects once it lands, by id. Kept per commit: other roots can
142
+ * close before an earlier one lands. See {@link _onRootTransactionClose}.
143
+ */
144
+ protected _movableSelectionAtCommitEnd: Map<ITransaction.ICommit, readonly string[]>;
145
+ /**
146
+ * What calculation passes realized while a root was open, told to listener nodes once it
147
+ * closes. See {@link _realizeCalcedValues}.
148
+ */
149
+ protected _heldPassRanges: IRange.Coords[] | null;
150
+ protected _emitter: ListenerEmitter<IWorksheet, IWorksheet.IListeners>;
151
+ protected _initializing: boolean;
152
+ protected _starting: Promise<void> | null;
153
+ protected _strings: IStringCollection;
154
+ /** Makes the lists cell values are stored as, over `_strings`. */
155
+ protected _lists: ScalarListFactory;
156
+ protected _ownStrings: boolean;
157
+ protected _styles: IStyleCollection;
158
+ protected _ownStyles: boolean;
159
+ protected _stylesRemoveListener: IListener.Remove;
160
+ protected _languageRemoveListener?: IListener.Remove;
161
+ protected _fontsRemoveListener?: IListener.Remove;
162
+ protected _regionalRemoveListener?: IListener.Remove;
163
+ /** Autofits that measured with a stand-in while a face was loading; taken again when it lands. */
164
+ /** Fits owed once the faces have loaded: held before they ran (`ran` false), or run against a stand-in. */
165
+ protected _pendingFits: {
166
+ ranges: readonly IRange.Coords[];
167
+ options?: ICellRange.AutoFitOptions;
168
+ ran: boolean;
169
+ }[];
170
+ /** Set while fits are owed to the text engine's arrival; see {@link _autoFit}. */
171
+ private _engineWait;
172
+ /**
173
+ * Whether the load-time row fit was skipped (`disableLoadAutoFit`): the stored heights are the
174
+ * file's, so no row was measured with a stand-in and a font arriving has none to correct.
175
+ */
176
+ protected _loadFitSkipped: boolean;
177
+ protected _stylesListener: IStyleCollection.IListeners;
178
+ protected _normalStyleRanged: IProperties.ICellRanged<ICellStyle.Properties>;
179
+ protected _resources: IResourceCollection;
180
+ protected _ownResources: boolean;
181
+ /**
182
+ * The sheet's own legacy drawing and the header/footer's, held as read until the shapes in them
183
+ * have models of their own. Not sheet state: nothing edits them, so they neither transact nor
184
+ * notify.
185
+ */
186
+ protected _legacyDrawing: LegacyDrawing | null;
187
+ protected _legacyDrawingHF: LegacyDrawing | null;
188
+ /** The sheet's pivot tables, held as read for the same reason. */
189
+ protected _pivotTableCollection: IPivotTableCollection;
190
+ /** The sheet's data tables, carried as read. */
191
+ protected _dataTableCollection: IDataTableCollection;
192
+ /**
193
+ * Anchored items whose delete this sheet announced itself.
194
+ *
195
+ * @remarks
196
+ * An item's `onDelete` reaches the sheet after the operation lands, and the sheet re-announces
197
+ * it as the collection's change — that is how a delete driven by a row or column removal is
198
+ * announced at all. An item deleted through its own `delete()` comes back to the sheet's
199
+ * `deleteFromContainer`, which announces inside the operation; it records the item here so the
200
+ * later `onDelete` is not a second announcement of the same delete.
201
+ */
202
+ protected _announcedDeletes: WeakSet<IAnchored>;
203
+ protected _names: INamedCollection;
204
+ /** Lazy sheet-anchored view over {@link _names} — see {@link getNames}. */
205
+ protected _namesScoped: INamedCollection | null;
206
+ protected _ownNames: boolean;
207
+ /** Presents this sheet's tables to {@link _names}. Single stable instance — see `Workbook`. */
208
+ protected _namedTableSource: NamedTableSource;
209
+ protected _namesRemoveListener: IListener.Remove;
210
+ protected _calculation: ICalculation;
211
+ protected _ownCalculation: boolean;
212
+ protected _calculationScoped: ICalculation;
213
+ protected _workbook: IWorkbook | null;
214
+ protected _cacheTableColumnHeaders: TableColumnHeaders;
215
+ protected _tables: ITableCollection;
216
+ protected _conditionals: IConditionalFormatCollection;
217
+ protected _dataValidations: IDataValidationCollection;
218
+ protected _protectedRanges: IProtectedRangeCollection;
219
+ protected _comments: ICommentCollection;
220
+ protected _movables: IMovableCollection;
221
+ protected _charts: IChartCollection;
222
+ protected _emitterMovables: ListenerEmitter<IMovableCollection, ICollection.IListeners>;
223
+ /**
224
+ * The callbacks for the reference nodes in `State.listeners`, keyed by node id.
225
+ *
226
+ * @remarks
227
+ * On the instance, never in state: a listener is an observer, not part of the document. An entry
228
+ * in the map with no callback here belongs to a snapshot this sheet no longer serves and is inert.
229
+ */
230
+ protected _listenerNodes: Map<number, ListenerNodeEntry>;
231
+ protected _lastCellDecoded: {
232
+ address: ICell.Address | null;
233
+ coords: IRange.CellCoords | null;
234
+ };
235
+ protected _lastCellSelected: {
236
+ coords: IRange.CellCoords | null;
237
+ cell: ICell | null;
238
+ };
239
+ protected _lastCellRead: {
240
+ coords: IRange.CellCoords | null;
241
+ cell: ICell | null;
242
+ };
243
+ protected _lastValueRead: {
244
+ range: IRange.Coords | null;
245
+ isDateOrTime: boolean | null;
246
+ };
247
+ protected _lastGetRangeRead: Record<string, {
248
+ ranges: readonly IRange.Coords[];
249
+ ignoreHidden: boolean | IRange.Axis;
250
+ results: any[];
251
+ }> | null;
252
+ protected _lastUsedCoordsRead: {
253
+ coords: IRange.Coords | null;
254
+ range: ICellRange | null;
255
+ };
256
+ protected _lastRangeRead: {
257
+ address: ICellRange.Address | null;
258
+ range: ICellRange | null;
259
+ ranges: ICellRanges | null;
260
+ };
261
+ protected _entireCoordsCache: IRange.Coords | null;
262
+ protected _entireRangeCache: ICellRange | null;
263
+ protected _isDataColumn: boolean;
264
+ protected _view: IWorksheetView;
265
+ protected _viewListener: IWorksheetView.IListeners;
266
+ protected _viewRemoveListener: IListener.Remove;
267
+ protected _protection: WorksheetProtection;
268
+ protected _protectionListener: IProtection.IListeners;
269
+ protected _protectionRemoveListener: IListener.Remove;
270
+ protected _tabColor: IColor | null;
271
+ /** VBA binding identity; carried from the file, never minted. See {@link IWorksheet.getCodeName}. */
272
+ protected _codeName: string | null;
273
+ /** See {@link IWorksheet.JSON.baseColSize}. `null` is the default, 8. */
274
+ protected _baseColSize: number | null;
275
+ protected _outline: Outline;
276
+ protected _pageLayout: PageLayout;
277
+ protected _conditionalFormatCalculation: boolean;
278
+ /** Carried from `sheetPr`; see {@link IWorksheet.isTransitionFormulaEvaluation} and its neighbors. */
279
+ /** Carried from the file. See {@link IDataValidationCollection.getSettings}. */
280
+ protected _validationSettings: Readonly<IDataValidationCollection.Settings>;
281
+ protected _sheetPr: Pick<IWorksheet.JSON, 'transitionFormulaEvaluation' | 'transitionFormulaEntry' | 'excludeFromPublishing' | 'syncScroll'>;
282
+ /**
283
+ * Modules this sheet owns — see {@link getModules}.
284
+ *
285
+ * Built with the sheet rather than on first ask, because building one opens a transaction and
286
+ * `getModules()` is a READ: a lazy build would fold an initialization commit into whatever
287
+ * unrelated commit happened to be the tip, every time a report walked the sheets.
288
+ */
289
+ protected _modules: ModuleCollection;
290
+ protected _runtime: IRuntime;
291
+ protected _isDate1904: boolean;
292
+ protected _colHeaders: SheetHeader;
293
+ protected _colHeadersShiftCallback: SheetHeader.ShiftCallback | null;
294
+ protected _colHeadersListener: ISheetHeader.IListeners | null;
295
+ protected _colHeadersRemoveListener: IListener.Remove | null;
296
+ protected _colHeadersHiddenRemoveListener: IListener.Remove | null;
297
+ protected _rowHeaders: SheetHeader;
298
+ protected _rowHeadersShiftCallback: SheetHeader.ShiftCallback | null;
299
+ protected _rowHeadersListener: ISheetHeader.IListeners | null;
300
+ protected _rowHeadersRemoveListener: IListener.Remove | null;
301
+ protected _rowHeadersHiddenRemoveListener: IListener.Remove | null;
302
+ protected _isAdjustHeaders: boolean;
303
+ /** Built by the movables moved in the shift under way, and taken by it when it writes. */
304
+ protected _shiftedMovableModels: Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
305
+ /** The same for the note boxes, which shift as their own index. */
306
+ protected _shiftedNoteModels: Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
307
+ /** The placed movables' index and the note boxes' index, as the entry builder addresses them. */
308
+ protected _placedIndex: MovableIndex;
309
+ protected _noteIndex: MovableIndex;
310
+ /** What every comment on this sheet places its note's box through. */
311
+ protected _noteBoxes: Comment.Boxes;
312
+ protected _emptyCell: ICell;
313
+ protected _cellOptions: SheetCellOptions;
314
+ protected _closed: boolean;
315
+ protected _cellBuffer: CellBuffer | null;
316
+ protected _defaultColWidthCache: number | null;
317
+ protected _defaultRowHeightCache: number | null;
318
+ protected _defaultFontBoundsCache: Readonly<Size> | null;
319
+ protected _defaultFontsVersion: number;
320
+ /**
321
+ * The internal capability object handed to `SheetRange`/`SheetRanges` (and future extracted
322
+ * modules) so they can drive the sheet without touching its (non-public) methods or the concrete
323
+ * class shape. The closures reach `Sheet`'s protected members because they are lexically inside the
324
+ * class. Public `IWorksheet` API is reached via `getWorksheet()` (never duplicated here). As internal logic
325
+ * moves out to modules, only the relevant closure repoints — consumers never change.
326
+ * The `IWorksheetInternal` type is derived from this object (see below) so it can never drift.
327
+ * @internal
328
+ */
329
+ private readonly _internal;
330
+ /** @internal Access the internal capability object. See {@link IWorksheetInternal}. */
331
+ _getInternal(): {
332
+ getSheet: () => IWorksheet;
333
+ getState: () => Readonly<State>;
334
+ getCalcGrid: () => ICalcGrid;
335
+ isDataColumn: () => boolean;
336
+ createRange: (coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null) => ICellRange;
337
+ isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => boolean;
338
+ cellToCoords: (address: ICell.Address) => IRange.CellCoords;
339
+ rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
340
+ rangesToCoords: (address: ICellRanges.Address, protectionCheck?: ProtectionCheck | null | undefined, lookupNames?: boolean, requireSameSheet?: boolean, allowOutOfBounds?: boolean) => IRange.Coords[];
341
+ validateCoords: (coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean) => void;
342
+ getScalar: (rowIndex: number, columnIndex: number, asJSDate?: boolean) => Scalar | InteropScalar;
343
+ getCellAt: (rowIndex: number, colIndex: number) => ICell;
344
+ cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
345
+ getVisible: (coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions) => readonly IRange.Coords[];
346
+ getUsedCoords: (options?: ICellRange.GetRangeOptions) => IRange.Coords | null;
347
+ updateTuples: (boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null) => void;
348
+ merge: (ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null) => void;
349
+ unmerge: (ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions) => void;
350
+ getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
351
+ insertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => Promise<IRange.Coords>;
352
+ canInsertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => boolean;
353
+ insertCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator) => void;
354
+ deleteCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions) => void;
355
+ getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: ICellStyle.Update, options?: ICellStyle.UpdateOptions) => void) => ICellStyle;
356
+ updateStyles: (ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean) => void;
357
+ getSnapshot: (coordsFrom: readonly IRange.Coords[], optionsMark?: ICellRange.CopyOptions, getTransactionId?: () => string) => ICellRange.ISnapshot;
358
+ getRangeStats: (coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions) => IRangeStats;
359
+ getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
360
+ getDefaultSortCriteria: (rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address) => ISort.DefaultSortCriteria;
361
+ getDefaultAutoFillCriteria: (rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords) => IAutoFill.DefaultCriteria | null;
362
+ find: (ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions) => Iterator<ICell>;
363
+ copyFrom: (destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions) => Promise<IRange.Coords>;
364
+ contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => Partial<Record<ICell.Content, number>>;
365
+ featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => ICellRange.Counts;
366
+ featureRegions: (bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions) => IRange.Coords[];
367
+ dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => Promise<ICellRanges | null>;
368
+ clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null) => void;
369
+ calculate: (ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions) => void;
370
+ autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
371
+ beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
372
+ recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
373
+ commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
374
+ autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions, holdWhileLoading?: boolean) => void;
375
+ getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
376
+ invalidateRendering: (axes?: IRange.AxisSelection | null) => void;
377
+ addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions) => IListener.Remove;
378
+ addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: WatchAnchor.Options) => IListener.Remove;
379
+ surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
380
+ getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
381
+ sort: (coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | (ISort.RangeOptions & ITransaction.OperationOptions)) => IRange.Coords;
382
+ filter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions) => Promise<IRange.Coords>;
383
+ evalFilter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined) => Promise<_SheetFilterUtils.FilterRuns>;
384
+ applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
385
+ filteredTables: () => ITable[];
386
+ setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
387
+ setErrorIgnored: (ranges: readonly IRange.Coords[], check: ICell.ErrorCheck, ignored: boolean, options?: ITransaction.OperationOptions) => void;
388
+ setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
389
+ getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
390
+ extendRange: (direction: IRange.Direction, cell: IRange.CellCoords) => Readonly<IRange.Coords>;
391
+ createTupleBuilder: <T>(transpose?: boolean) => Tuple.IBuilder<T>;
392
+ createSparseBuilder: (options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate) => ICellRange.SparseBuilder;
393
+ autoFill: (template: IRange.Coords, destination: IRange.Coords, options?: ICellRange.AutoFillOptions) => boolean | AutoFillProjection;
394
+ autoFillRange: (template: IRange.Coords, destination: IRange.Coords) => IRange.Coords;
395
+ };
396
+ /** @internal Cached read-engine context. State/headers/cellOptions are getters so they stay
397
+ * current if reassigned; the bound functions are stable. See {@link SheetReadContext}. */
398
+ protected _readCtx: SheetReadContext | null;
399
+ /**
400
+ * The context handed to `_SheetStateReader` functions. Callers can spread to override a portion
401
+ * for a scoped read (e.g. `{ ...ctx, cellOptions }`). See {@link SheetReadContext}.
402
+ * @internal
403
+ */
404
+ protected _getReadCtx(): SheetReadContext;
405
+ /** This sheet's first-pass findings and what they were derived from; see {@link _getAnomalyFindings}. */
406
+ protected _anomalyFindings: {
407
+ state: Readonly<State>;
408
+ values: unknown;
409
+ formulas: unknown;
410
+ epoch: number;
411
+ roleColors: string;
412
+ findings: AnomalyFindings;
413
+ } | null;
414
+ /**
415
+ * The error checks' findings on this sheet, each ranked alone. Derived on the first read that
416
+ * asks for it and kept until the sheet's state, its formulas or its values move, or the
417
+ * workbook's role colors change.
418
+ * @internal
419
+ */
420
+ protected _getAnomalyFindings(roleColors?: WorkbookRoleColors): AnomalyFindings;
421
+ /** This worksheet and the workbook's others, very hidden included. */
422
+ protected _getWorkbookSheets(): Worksheet[];
423
+ /** The workbook's role colors and the sheets' sets they were the union of; see {@link _getWorkbookRoleColors}. */
424
+ protected _workbookRoleColors: (WorkbookRoleColors & {
425
+ sheets: readonly ReadonlySet<string>[];
426
+ }) | null;
427
+ /**
428
+ * The font colors any sheet writes a role in, the union `styleRole` reads. `key` changes only
429
+ * when the union does, so an edit that recolors nothing keeps the other sheets' findings.
430
+ * @internal
431
+ */
432
+ protected _getWorkbookRoleColors(): WorkbookRoleColors;
433
+ /** The anomalies map and the workbook's findings it was ranked against; see {@link _getAnomalies}. */
434
+ protected _anomalies: {
435
+ workbook: readonly AnomalyFindings[];
436
+ map: ISpatialMap<AnomalySet>;
437
+ } | null;
438
+ /**
439
+ * Where the error checks fire on this sheet (`ICellRange.Feature.Anomalies`).
440
+ *
441
+ * @remarks
442
+ * A finding's rank depends on how often it repeats across the workbook, so the first read on
443
+ * any sheet derives every sheet's findings; each is kept until its own sheet moves, and this map
444
+ * until any of them does. Nothing on a write or a calculation pays for it.
445
+ * @internal
446
+ */
447
+ protected _getAnomalies(): ISpatialMap<AnomalySet>;
448
+ /** What the role layer is read from: this sheet's content and formulas, as they are now. */
449
+ protected _roleSource(): RoleSource;
450
+ /** The roles map and what it was derived from; see {@link _getRoles}. */
451
+ protected _roles: {
452
+ state: Readonly<State>;
453
+ values: unknown;
454
+ formulas: unknown;
455
+ epoch: number;
456
+ map: ISpatialMap<ICell.Role>;
457
+ } | null;
458
+ /**
459
+ * Each cell's job (`ICellRange.Feature.Role`), derived on the first read that asks for it and
460
+ * kept, like {@link _getAnomalies}, until the sheet moves.
461
+ * @internal
462
+ */
463
+ protected _getRoles(): ISpatialMap<ICell.Role>;
464
+ /** What the checks read of this sheet, as it is now. */
465
+ protected _anomalySource(): AnomalySource;
466
+ /** The role colors and what they were derived from; see {@link _getRoleColors}. */
467
+ protected _roleColors: {
468
+ state: Readonly<State>;
469
+ values: unknown;
470
+ formulas: unknown;
471
+ epoch: number;
472
+ colors: ReadonlySet<string>;
473
+ } | null;
474
+ /**
475
+ * The font colors this sheet writes its roles in, for another sheet's `styleRole` check. Derived
476
+ * on the first read and kept, like {@link _getAnomalies}, until the sheet moves.
477
+ */
478
+ protected _getRoleColors(): ReadonlySet<string>;
479
+ /** The kinds map and what it was derived from; see {@link _getKinds}. */
480
+ protected _kinds: {
481
+ state: Readonly<State>;
482
+ values: unknown;
483
+ epoch: number;
484
+ map: ISpatialMap<CellKind>;
485
+ } | null;
486
+ /**
487
+ * What each cell holds, by kind (`ICellRange.Feature.Kind`).
488
+ *
489
+ * @remarks
490
+ * One scan of the values, derived on the first read that asks for it and kept until the sheet's
491
+ * state or its values move, as {@link _getAnomalies} is.
492
+ * @internal
493
+ */
494
+ protected _getKinds(): ISpatialMap<CellKind>;
495
+ /**
496
+ * The sheet's grid: the synchronous half of the calculation service for this sheet
497
+ * (DESIGN-CALC-SERVICE §13.23, §13.24), holding everything a cell contains - the formulas, the
498
+ * values and the indexes over them - and forwarding every verb to its backend.
499
+ *
500
+ * @remarks
501
+ * A plain field, NOT part of `State` (§13.24 a): one grid serves every version of the sheet, so
502
+ * a versioned slot would answer with the CURRENT maps from a historic record - which the sheet
503
+ * reads (`_resolveInheritedFormats`, the snapshot sheets). What the grid HOLDS versions, in its
504
+ * own record; its reads take the transaction to answer for. Opened by `_fromJSON`, so it is
505
+ * absent until then; a snapshot sheet is handed the source's grid by `_clone`.
506
+ * @internal
507
+ */
508
+ protected _calcGrid: ICalcGrid;
509
+ /** `false` for a snapshot sheet, which holds its source's grid and must not close it. */
510
+ protected _ownsCalcGrid: boolean;
511
+ /** @internal Cached mutation-engine context. See {@link SheetMutationContext}. */
512
+ protected _mutationCtx: ReturnType<Worksheet['_buildMutationCtx']> | null;
513
+ /** @internal Access the mutation context (cached). See {@link SheetMutationContext}. */
514
+ protected _getMutationCtx(): SheetMutationContext;
515
+ /**
516
+ * The context handed to `_SheetMutations` functions (the shift/insert/delete engine). Richer than
517
+ * {@link SheetReadContext}: it carries the commit/state-write machinery mutation orchestration
518
+ * needs. The `SheetMutationContext` type is derived from this object so it can never drift.
519
+ * @internal
520
+ */
521
+ protected _buildMutationCtx(): {
522
+ readonly rowHeaders: SheetHeader;
523
+ readonly columnHeaders: SheetHeader;
524
+ readonly pageLayout: PageLayout;
525
+ readonly rowHeadersShiftCallback: SheetHeader.ShiftCallback | null;
526
+ readonly columnHeadersShiftCallback: SheetHeader.ShiftCallback | null;
527
+ getEntireCoords: () => IRange.Coords;
528
+ getView: () => IWorksheetView;
529
+ beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
530
+ updateState: (updateState?: Partial<State>, options?: ITransaction.OperationOptions | string) => State;
531
+ getState: () => Readonly<State>;
532
+ stateFor: (trans: ITransaction) => State;
533
+ readonly calcGrid: ICalcGrid;
534
+ /** Invalidate the cached used-range read (a mutation may change the used bounds). */
535
+ invalidateUsedCoords: () => void;
536
+ validateCoords: (coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean) => void;
537
+ protectionCheck: (check?: ProtectionCheck | null, coords?: Readonly<IRange.Coords> | readonly IRange.Coords[] | null, action?: string | null) => void;
538
+ getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
539
+ processLayoutChange: () => void;
540
+ /** The movables' by-model index as a shift left it, or `null` if the shift moved none. */
541
+ takeShiftedMovableModels: () => Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
542
+ /** The same for the note boxes' index. */
543
+ takeShiftedNoteModels: () => Map<IMovable, ISpatialMap.Entry<MovableEntry>> | null;
544
+ markColumnHeaderTableNames: () => void;
545
+ commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
546
+ recordAutoFit: (trans: ITransaction, ranges: readonly IRange.Coords[], autoFit: boolean | ICellRange.AutoFitOptions) => void;
547
+ readonly styles: IStyleCollection;
548
+ getRangedEntries: <T, E = T>(spatial: ISpatialQuery, ranges: readonly IRange.Coords[], options?: GetTypedRangeOptions<T, E>, spatialSort?: boolean) => T[];
549
+ createSparseBuilder: (options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate) => ICellRange.SparseBuilder;
550
+ composeDirectStyleView: (region?: IRange.Coords, sourceMaps?: {
551
+ border: IUsedRangeSpatialMap<SheetDirectStyle>;
552
+ fill: IUsedRangeSpatialMap<SheetDirectStyle>;
553
+ content: IUsedRangeSpatialMap<SheetDirectStyle>;
554
+ }) => IUsedRangeSpatialMap<SheetDirectStyle>;
555
+ autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions, holdWhileLoading?: boolean) => void;
556
+ recordAutoFormat: (trans: ITransaction) => void;
557
+ recordSkipProtectionCheck: (trans: ITransaction) => void;
558
+ recordFreezePanes: (trans: ITransaction, before: IRange.CellCoords, after: IRange.CellCoords) => void;
559
+ recordShift: (trans: ITransaction, kind: IWorksheet.ShiftKind, axis: IRange.Axis, ranges: readonly IRange.Coords[]) => void;
560
+ recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
561
+ notify: (key: keyof IWorksheet.IListeners) => void | Promise<any>;
562
+ getRange: (address?: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
563
+ getSelection: () => IRangeSelection;
564
+ getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
565
+ indexMerges: (mergeInserts: IRange.Coords[] | null, mergeRemoves?: IRange.Coords[] | null) => void;
566
+ validateOrRemoveOverlaps: (rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean, absorbAutoTable?: boolean) => void;
567
+ autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
568
+ readonly isDataColumn: boolean;
569
+ readonly strings: IStringCollection;
570
+ readonly lists: ScalarListFactory;
571
+ readonly cellOptions: SheetCellOptions;
572
+ readonly runtime: IRuntime;
573
+ getProtection: () => IWorksheetProtection;
574
+ hasRangedEntries: (key: keyof State, range: IRange.Coords) => boolean;
575
+ rangeStateIterator: (options: RangeState.IteratorOptions) => RangeState.Iterator;
576
+ recordChange: (trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[] | null | undefined, shifts?: readonly ShiftIntent[]) => void;
577
+ loadComments: (map: IAnchoredMap<IComment, IComment.JSON>, refs: IRange.JSONReference<IComment.JSON>[]) => IAnchoredMap<IComment, IComment.JSON>;
578
+ newCommentJSON: (modifiers: IComment.Modifiers) => IComment.JSON;
579
+ notifyCommentsChange: () => void;
580
+ recordFormulasEntered: (trans: ITransaction, ranges: readonly IRange.Coords[] | null | undefined) => void;
581
+ getTables: () => ITableCollection;
582
+ getAutoTable: () => ITable | null;
583
+ cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
584
+ cellStateIterator: (options?: CellState.IteratorOptions) => CellState.Iterator;
585
+ rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
586
+ getCell: (address?: ICell.Address) => ICell;
587
+ createCell: (update: ICell.Update, coords?: IRange.CellCoords | null, options?: ICell.CreateCellOptions) => ICell;
588
+ getAutoFillPreviewCache: () => AutoFillPreviewCache | null;
589
+ setAutoFillPreviewCache: (cache: AutoFillPreviewCache) => void;
590
+ };
591
+ /** @internal Single-entry memo behind `autoFill({ preview })`. See {@link AutoFillPreviewCache}. */
592
+ protected _autoFillPreviewCache: AutoFillPreviewCache | null;
593
+ /** @internal Cached coord-resolution context. See {@link SheetCoordContext}. */
594
+ protected _coordCtx: ReturnType<Worksheet['_buildCoordCtx']> | null;
595
+ /** @internal Access the coord-resolution context (cached). See {@link SheetCoordContext}. */
596
+ protected _getCoordCtx(): SheetCoordContext;
597
+ /**
598
+ * The context handed to `_SheetCoords` functions (address/coord resolution + range construction).
599
+ * The `SheetCoordContext` type is derived from this object so it can never drift.
600
+ * @internal
601
+ */
602
+ protected _buildCoordCtx(): {
603
+ readonly internal: {
604
+ getSheet: () => IWorksheet;
605
+ getState: () => Readonly<State>;
606
+ getCalcGrid: () => ICalcGrid;
607
+ isDataColumn: () => boolean;
608
+ createRange: (coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null) => ICellRange;
609
+ isContentful: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => boolean;
610
+ cellToCoords: (address: ICell.Address) => IRange.CellCoords;
611
+ rangeToCoords: (address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean) => IRange.Coords;
612
+ rangesToCoords: (address: ICellRanges.Address, protectionCheck?: ProtectionCheck | null | undefined, lookupNames?: boolean, requireSameSheet?: boolean, allowOutOfBounds?: boolean) => IRange.Coords[];
613
+ validateCoords: (coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean) => void;
614
+ getScalar: (rowIndex: number, columnIndex: number, asJSDate?: boolean) => Scalar | InteropScalar;
615
+ getCellAt: (rowIndex: number, colIndex: number) => ICell;
616
+ cellIterator: (options: CellState.IteratorOptions) => IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
617
+ getVisible: (coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions) => readonly IRange.Coords[];
618
+ getUsedCoords: (options?: ICellRange.GetRangeOptions) => IRange.Coords | null;
619
+ updateTuples: (boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null) => void;
620
+ merge: (ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null) => void;
621
+ unmerge: (ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions) => void;
622
+ getMerges: (ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis) => IRange.Coords[];
623
+ insertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => Promise<IRange.Coords>;
624
+ canInsertFrom: (ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions) => boolean;
625
+ insertCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator) => void;
626
+ deleteCells: (ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions) => void;
627
+ getStyle: (ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: ICellStyle.Update, options?: ICellStyle.UpdateOptions) => void) => ICellStyle;
628
+ updateStyles: (ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean) => void;
629
+ getSnapshot: (coordsFrom: readonly IRange.Coords[], optionsMark?: ICellRange.CopyOptions, getTransactionId?: () => string) => ICellRange.ISnapshot;
630
+ getRangeStats: (coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions) => IRangeStats;
631
+ getDefaultShiftAxis: (coords?: IRange.Coords) => IRange.Axis;
632
+ getDefaultSortCriteria: (rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address) => ISort.DefaultSortCriteria;
633
+ getDefaultAutoFillCriteria: (rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords) => IAutoFill.DefaultCriteria | null;
634
+ find: (ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions) => Iterator<ICell>;
635
+ copyFrom: (destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions) => Promise<IRange.Coords>;
636
+ contentCounts: (ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => Partial<Record<ICell.Content, number>>;
637
+ featureCounts: (ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean) => ICellRange.Counts;
638
+ featureRegions: (bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions) => IRange.Coords[];
639
+ dependencyRanges: (coords: IRange.Coords, kind: "precedents" | "dependents", direct: boolean) => Promise<ICellRanges | null>;
640
+ clear: (ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null) => void;
641
+ calculate: (ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions) => void;
642
+ autoSelect: (options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => Promise<IRange.Coords[]>;
643
+ beginCommit: (options?: ITransaction.StoreOperationOptions | string) => ITransaction;
644
+ recordSelection: (trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, "autoSelect" | "autoSelectRestore"> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis) => void;
645
+ commitWithDirectives: (trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives) => void;
646
+ autoFit: (ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions, holdWhileLoading?: boolean) => void;
647
+ getBestFit: (range: IRange.Coords, options?: ICellRange.BestFitOptions) => Size;
648
+ invalidateRendering: (axes?: IRange.AxisSelection | null) => void;
649
+ addListenerNode: (ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions) => IListener.Remove;
650
+ addWatch: (coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: WatchAnchor.Options) => IListener.Remove;
651
+ surroundingRegion: (range: IRange.Coords, options?: ICellRange.GetSurroundingOptions) => IRange.Coords;
652
+ getTraverseRegion: (cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean) => IRange.Coords | null;
653
+ sort: (coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | (ISort.RangeOptions & ITransaction.OperationOptions)) => IRange.Coords;
654
+ filter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions) => Promise<IRange.Coords>;
655
+ evalFilter: (coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined) => Promise<_SheetFilterUtils.FilterRuns>;
656
+ applyFilterRuns: (runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions) => void;
657
+ filteredTables: () => ITable[];
658
+ setHyperlinks: (ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, options?: ITransaction.OperationOptions) => void;
659
+ setErrorIgnored: (ranges: readonly IRange.Coords[], check: ICell.ErrorCheck, ignored: boolean, options?: ITransaction.OperationOptions) => void;
660
+ setComments: (ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, options?: ITransaction.OperationOptions) => void;
661
+ getBoundsAtCoords: (coords: IRange.Coords) => Bounds;
662
+ extendRange: (direction: IRange.Direction, cell: IRange.CellCoords) => Readonly<IRange.Coords>;
663
+ createTupleBuilder: <T>(transpose?: boolean) => Tuple.IBuilder<T>;
664
+ createSparseBuilder: (options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate) => ICellRange.SparseBuilder;
665
+ autoFill: (template: IRange.Coords, destination: IRange.Coords, options?: ICellRange.AutoFillOptions) => boolean | AutoFillProjection;
666
+ autoFillRange: (template: IRange.Coords, destination: IRange.Coords) => IRange.Coords;
667
+ };
668
+ readonly readonly: boolean;
669
+ readonly isClosed: boolean;
670
+ readonly isInitializing: boolean;
671
+ readonly lastCellDecoded: {
672
+ address: ICell.Address | null;
673
+ coords: IRange.CellCoords | null;
674
+ };
675
+ getEntireCoords: () => IRange.Coords;
676
+ getNamedFormulas: () => import('..').INamedFormulasCollection;
677
+ getNames: () => INamedCollection;
678
+ getProtection: () => IWorksheetProtection;
679
+ getName: () => string;
680
+ resolveRange: (coord: ICellRange.Address) => ICellRange | null | undefined;
681
+ };
682
+ constructor(options?: IWorksheet.ConstructorOptions);
683
+ /** @internal Logic lives in `_SheetCoords.createRange`. */
684
+ protected _createRange(coords: Readonly<IRange.FixableCoords> | string, getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null): ICellRange;
685
+ /** @internal Logic lives in `_SheetCoords.createRanges`. */
686
+ protected _createRanges(coords: readonly (IRange.Coords | string | ICellRange)[], getOptions?: ICellRange.GetRangeOptions, readOnly?: string | null): ICellRanges;
687
+ /** {@inheritDoc IWorksheet.getRange} */
688
+ getRange(address?: ICellRange.Address, options?: ICellRange.GetRangeOptions): ICellRange;
689
+ /** {@inheritDoc IWorksheet.getCell} */
690
+ getCell(address?: ICell.Address): ICell;
691
+ /** {@inheritDoc IWorksheet.getRange} */
692
+ getRanges(address: ICellRanges.Address, options?: ICellRange.GetRangeOptions): ICellRanges;
693
+ /** {@inheritDoc IWorksheet.getEntireRange} */
694
+ getEntireRange(options?: ICellRange.GetRangeOptions): ICellRange;
695
+ protected _getEntireCoords(): IRange.Coords;
696
+ /** {@inheritDoc IWorksheet.getEntireCoords} */
697
+ getEntireCoords(): IRange.Coords;
698
+ /** {@inheritDoc IWorksheet.getUsedRange} */
699
+ getUsedRange(options?: ICellRange.GetRangeOptions): ICellRange | null;
700
+ /** {@inheritDoc IWorksheet.getStats} */
701
+ getStats(options?: ICellRange.GetStatsOptions): IRangeStats;
702
+ /** {@inheritDoc IWorksheet.getRegions} */
703
+ getRegions(features?: ICellRange.Feature | readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions): ICellRegions;
704
+ /** {@inheritDoc IWorksheet.getAnomalies} */
705
+ getAnomalies(options?: ICellRange.GetAnomaliesOptions): ICellRegions;
706
+ /** @internal Logic lives in `_SheetCoords.cellToCoords`. */
707
+ protected _cellToCoords(address: ICell.Address): IRange.CellCoords;
708
+ /** @internal Logic lives in `_SheetCoords.validateCoords`. */
709
+ protected _validateCoords(coords: IRange.Coords, oobMessage?: string, allowOutOfBounds?: boolean): void;
710
+ /** @internal Logic lives in `_SheetCoords.createRangeError`. */
711
+ protected _createRangeError(address: ICellRanges.Address): Error;
712
+ /** @internal Logic lives in `_SheetCoords.protectionCheck`. */
713
+ protected _protectionCheck(check?: ProtectionCheck | null, coords?: Readonly<IRange.Coords> | readonly IRange.Coords[] | null, action?: string | null): void;
714
+ /**
715
+ * Returns an array of ranges. Logic lives in `_SheetCoords.rangesToCoords`.
716
+ *
717
+ * @remarks
718
+ * Defaults to maxCoords. Returns an error if the address is unparsable.
719
+ * @internal
720
+ */
721
+ protected _rangesToCoords(address: ICellRanges.Address, protectionCheck?: ProtectionCheck | null | undefined, lookupNames?: boolean, requireSameSheet?: boolean, allowOutOfBounds?: boolean): IRange.Coords[];
722
+ /**
723
+ * Returns exactly 1 range. Logic lives in `_SheetCoords.rangeToCoords`.
724
+ *
725
+ * @remarks
726
+ * This does not default address to maxCoords and fill error if anything other than 1 range is returned.
727
+ * @internal
728
+ */
729
+ protected _rangeToCoords(address: ICellRange.Address, protectionCheck?: ProtectionCheck | null, lookupNames?: boolean): IRange.Coords;
730
+ /**
731
+ * Collects ranges.
732
+ *
733
+ * @param searchTypes If value is in record it will be search, boolean flag is used for fullyEnclosed.
734
+ * @internal
735
+ */
736
+ protected _collectRanges(queryCoords: IRange.Coords, rangesByType?: ISpatialMap.Entry<RangeState.Intersection>[], searchTypes?: boolean | RangeState.SearchTypes | null, state?: State, injectReferences?: IRange.JSONReference<any>[][], transaction?: ITransaction | null): void;
737
+ /**
738
+ * This wraps the stateIterator with a ICell.IteratorContext.
739
+ * // TODO - **PERFORMANCE** We are creating a new CellState on very call
740
+ * // TODO - **PERFORMANCE** This slower than expected but _cellStateIterator but still reasonable.
741
+ * @internal
742
+ */
743
+ protected _cellIterator(options: CellState.IteratorOptions): IterableIterator<ICellRange.Entry, ICellRange.Entry, IRange.CellCoords>;
744
+ /**
745
+ * `Options` is required. Will return Done if not provided.
746
+ * @internal
747
+ */
748
+ protected _rangeStateIterator(options: RangeState.IteratorOptions): RangeState.Iterator;
749
+ /**
750
+ * iterator for overlaps and stops.
751
+ *
752
+ * @param view
753
+ *
754
+ * @internal
755
+ */
756
+ protected _overflowAndStops(bounds: IRange.Coords, maxDistance?: number): OverFlowsAndStops | null;
757
+ /**
758
+ * Creates a an iterator that combines the values and ranges into a single iterator.
759
+ * @internal
760
+ */
761
+ protected _cellStateIterator(options?: CellState.IteratorOptions): CellState.Iterator;
762
+ /** @internal */
763
+ protected _indexMerges(mergeInserts: IRange.Coords[] | null, mergeRemoves?: IRange.Coords[] | null): void;
764
+ /**
765
+ * SHEET-STYLE-SPLIT: rebuild a transient merged (blob-shaped) directStyle map from the three
766
+ * per-feature maps, overlaying **border-last** so bordered ranges keep their range/tile (the merge
767
+ * itself lives in {@link SheetDirectStyle.mergeOverlay}). Lets the persistent blob retire while the
768
+ * few places that still want a single merged view — serialization (`toJSON`) and the function-form /
769
+ * hyperlink write paths — reconstruct it on demand. Pass `region` to scope the overlay.
770
+ *
771
+ * `sourceMaps` overrides which maps are composed. It defaults to the committed state maps (what
772
+ * `toJSON`/`merge` want), but a write in progress must pass its WORKING clones — otherwise a later
773
+ * overlapping update composes stale committed state and its `rederiveFeatureMaps` clears the region,
774
+ * wiping an earlier in-call write (e.g. two dates set together lost the first cell's number format).
775
+ * @internal
776
+ */
777
+ protected _composeDirectStyleView(region?: IRange.Coords, sourceMaps?: {
778
+ border: IUsedRangeSpatialMap<SheetDirectStyle>;
779
+ fill: IUsedRangeSpatialMap<SheetDirectStyle>;
780
+ content: IUsedRangeSpatialMap<SheetDirectStyle>;
781
+ }): IUsedRangeSpatialMap<SheetDirectStyle>;
782
+ /** @internal Logic lives in `_SheetMutations.updateStyles`. */
783
+ protected _updateStyles(ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, // we do this because updateTuples may update each
784
+ options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean): void;
785
+ /**
786
+ * Holds a style set on one cell in the buffer the cell writes of an open transaction are held in
787
+ * ({@link CellBuffer.holdStyle}).
788
+ *
789
+ * @returns `false` if it is to be written as it comes.
790
+ * @internal
791
+ */
792
+ protected _holdStyle(range: ISpatialMap.Entry<ICellStyle.Update>, defaultUpdate?: ICellStyle.Update, options?: ICellStyle.UpdateOptions): boolean;
793
+ /**
794
+ * Whether a style update written to one cell changes that cell alone; a caller's callback is not
795
+ * known to. (The style typed input implies is not asked: it is a number format, a quote prefix or
796
+ * a wrap.)
797
+ * @internal
798
+ */
799
+ protected _isLocalStyle(state: Readonly<State>, rowIndex: number, colIndex: number, update: ICellStyle.Update): boolean;
800
+ /** @internal */
801
+ protected _createSparseBuilder(options?: ICellRange.SparseBuilderOptions, sheetRange?: ICellRange | null, internal?: InternalTupleUpdate): ICellRange.SparseBuilder;
802
+ /**
803
+ * TODO - how to support virtual lists (we need to allow for direct sets of lists (that don't iterator over each value) )
804
+ * Logic lives in `_SheetMutations.updateTuples`.
805
+ * @internal
806
+ */
807
+ protected _updateTuples(boundedTuples: Tuple.Region<ICell.Update> | null, options?: ICellRange.UpdateCellsOptions, coordValidator?: CoordUtils.CoordValidator | null | undefined, internalOptions?: InternalTupleUpdate | null): void;
808
+ /**
809
+ * The buffer single-cell writes made inside an open transaction are held in ({@link CellBuffer}).
810
+ * @internal
811
+ */
812
+ protected _getCellBuffer(): CellBuffer;
813
+ /** @internal */
814
+ protected _sort(coords: Readonly<IRange.Coords>, options?: boolean | ISort.Options[] | ISort.RangeOptions & ITransaction.OperationOptions): IRange.Coords;
815
+ /** @internal */
816
+ protected _filter(coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions): Promise<IRange.Coords>;
817
+ /** @internal The read-only half of {@link _filter}: settles the runs without writing. */
818
+ protected _evalFilter(coords: Readonly<IRange.Coords>, condition: ICondition.Input | ICondition.RangeOptions | null | undefined): Promise<_SheetFilterUtils.FilterRuns>;
819
+ /** @internal The write half of {@link _filter}: inside the caller's open transaction. */
820
+ protected _applyFilterRuns(runs: _SheetFilterUtils.FilterRuns, options?: ITransaction.OperationOptions): void;
821
+ /** @internal Logic lives in `_SheetMutations.autoFill`. */
822
+ protected _autoFill(template: IRange.Coords, destination: IRange.Coords, options?: ICellRange.AutoFillOptions): boolean | AutoFillProjection;
823
+ /** @internal Logic lives in `_SheetMutations.autoFillRange`. */
824
+ protected _autoFillRange(template: IRange.Coords, destination: IRange.Coords): IRange.Coords;
825
+ /** @internal Logic lives in `_SheetMutations.autoFillShrink`. */
826
+ protected _autoFillShrink(template: IRange.Coords, destination: IRange.Coords, direction: IRange.Direction, options?: ICellRange.AutoFillOptions): boolean;
827
+ /** @internal Logic lives in `_SheetMutations.setErrorIgnored`. */
828
+ protected _setErrorIgnored(ranges: readonly IRange.Coords[], check: ICell.ErrorCheck, ignored: boolean, options?: ITransaction.OperationOptions): void;
829
+ /** @internal Logic lives in `_SheetMutations.setHyperlinks`. */
830
+ protected _setHyperlinks(ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, // we do this because updateTuples may update each
831
+ options?: ITransaction.OperationOptions): void;
832
+ /**
833
+ * The request options for a grid call made under `transaction`: the snapshot it names and the
834
+ * savepoint its maps are cloned under.
835
+ * @internal
836
+ */
837
+ protected _requestFor(transaction: ITransaction | null): ICalcGrid.RequestOptions;
838
+ /**
839
+ * The formats the entered cells of the blocks inherit, as of a commit.
840
+ *
841
+ * Excel's entry rule: a formula typed into a General cell takes the number format of the first
842
+ * cell it reads that has one - `=A1+B1` shows currency when `A1` does. Which cells, and in what
843
+ * order, the engine reports with the results ({@link ICalcGrid.Results.formatInserts}); which
844
+ * formats they carry is read from the ENTERING commit's snapshot, so a pass that comes late -
845
+ * after an engine start, or an F9 under manual calculation - sees the inputs as they were when
846
+ * the formula was entered, whatever was formatted since. Never through a name.
847
+ *
848
+ * @remarks
849
+ * Range-shaped, not per cell. A relative reference names a different cell from each cell of
850
+ * its block, so the cells a block reads through it are a rectangle the block's size offset by
851
+ * the reference; the styled entries found there are shifted back onto the block. A fixed axis
852
+ * reads one row or column for the whole block. A reference stands for its top-left cell.
853
+ * References are written from the last to the first, so the first reference that formats a
854
+ * cell is the one that stands - "the first that is not General", per cell.
855
+ * @internal
856
+ */
857
+ protected _resolveInheritedFormats(commitId: string, blocks: readonly EnteredBlock[], entered: readonly IRange.Coords[]): ISpatialMap.Entry<ICellStyle.Update>[];
858
+ /**
859
+ * Land a record the engine pushed - a pass's results, a seed's - in the sheet's snapshots.
860
+ *
861
+ * @remarks
862
+ * The record names the snapshot it answers for (`commitId`). Everything it says about cells -
863
+ * the formulas, the values, the spills, the errors, the pending and circular marks - has been
864
+ * landed in the grid's own snapshots by the time this runs, and a record naming a snapshot off
865
+ * the live history never reaches here at all. What is left is the sheet's: what is PROMOTED -
866
+ * number formats, sizes - amended into the commit that entered the formulas, and the
867
+ * notifications, which realize has to make by hand.
868
+ * @internal
869
+ */
870
+ protected _realizeCalcedValues(results: ICalcGrid.Results): void;
871
+ /**
872
+ * Tell listener nodes what calculation passes realized. A pass belongs to no commit, so the
873
+ * event carries no transaction id.
874
+ * @internal
875
+ */
876
+ protected _notifyPassToListenerNodes(ranges: readonly IRange.Coords[]): void;
877
+ /**
878
+ * Land the promoted half of a pass's results - number formats and sizes - in the commit that
879
+ * entered the formulas they belong to.
880
+ *
881
+ * @remarks
882
+ * Excel's rule: entering a formula formats and fits it; recalculating it does not. So the set is
883
+ * the formulas the target commit entered on this sheet, clipped to what this pass realized; the
884
+ * directives are the target's own (`autoFormat`, `autoFit`); and once resolved the sheet is
885
+ * marked on the target ({@link IntentCalcResolved}), so a later pass for the same commit - a
886
+ * dependent on another sheet, an explicit recalculation, the pass a redo triggers - leaves what
887
+ * is now in the snapshot alone. The mark is written with the sheet's record so that it lands
888
+ * even when nothing was promoted; an amend with no writes is elided. It is written only by a
889
+ * pass that realized the entered cells: an engine starting up runs a pass that realizes
890
+ * nothing before the one that carries the results.
891
+ *
892
+ * The number format is the engine's pick per cell ({@link ICalcGrid.Results.formatInserts}):
893
+ * the references the formula inherits one from, resolved here against the entering commit's
894
+ * snapshot ({@link _resolveInheritedFormats}), or else the format its functions supplied.
895
+ *
896
+ * One pass can answer for several entering commits: writes made before the engine runs are
897
+ * calculated together, and the pass names only the last of them. Each one still formats and
898
+ * fits under its own directives and against its own snapshot ({@link _enteredSince}), but the
899
+ * writes land in the target, since an amend reaches only the snapshot it names.
900
+ *
901
+ * @internal
902
+ */
903
+ protected _promoteCalcResults(target: ITransaction.ICommit, results: ICalcGrid.Results): void;
904
+ /**
905
+ * The commits a pass targeting `target` answers for on this sheet, newest first, each with the
906
+ * cells it entered that the pass realized and no newer one of them re-entered.
907
+ *
908
+ * @remarks
909
+ * Walks back from the target to the first commit already resolved for this sheet: anything
910
+ * older was answered by that commit's pass. Bounded by {@link _MAX_PROMOTE_WALK}, since the walk
911
+ * runs on every pass.
912
+ *
913
+ * @internal
914
+ */
915
+ protected _enteredSince(target: ITransaction.ICommit, bounds: IRange.Coords): {
916
+ commit: ITransaction.ICommit;
917
+ entered: IRange.Coords[];
918
+ }[];
919
+ /** How far back a pass looks for entering commits it answers for. */
920
+ private static readonly _MAX_PROMOTE_WALK;
921
+ /** {@inheritDoc IWorksheet.calculate} */
922
+ calculate(full?: boolean): Promise<ICalculation.Status>;
923
+ /** @internal */
924
+ protected _calculate(ranges: ICellRanges.Coords, options?: ICalculation.CalculateOptions): void;
925
+ /** @internal */
926
+ protected _calculateFull(): void;
927
+ /** @internal */
928
+ /** @internal Logic lives in `_SheetMutations.setComments`. */
929
+ protected _setComments(ranges: readonly ISpatialMap.Entry<IComment.Update>[], comments?: IComment.Update | IComment.JSON, // `undefined` = each entry carries its own (updateTuples)
930
+ options?: ITransaction.OperationOptions): void;
931
+ /** @internal Logic lives in `_SheetMutations.clear`. */
932
+ protected _clear(ranges: readonly IRange.Coords[], applyTo?: ICell.Content | null, options?: ITransaction.OperationOptions, excludeSorts?: boolean, cutFrom?: IRange.Coords | null): void;
933
+ /** @internal Logic lives in `_SheetMutations.merge`. */
934
+ protected _merge(ranges: readonly IRange.Coords[], options?: IRange.AxisSelection | ICellRange.MergeOptions | null): void;
935
+ /** @internal Logic lives in `_SheetMutations.unmerge`. */
936
+ protected _unmerge(ranges: readonly IRange.Coords[], options?: ITransaction.OperationOptions): void;
937
+ /** @internal */
938
+ protected _getMerges(ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis): IRange.Coords[];
939
+ /** @internal */
940
+ protected _clone(): IWorksheet;
941
+ /**
942
+ * A read-only sheet as this sheet was at a commit, or `null` when the store no longer has the
943
+ * commit or the sheet did not exist at it.
944
+ *
945
+ * @remarks
946
+ * Built on demand and not kept: it copies no cells, only the state record and a grid pinned
947
+ * to the commit's record.
948
+ * @internal
949
+ */
950
+ _snapshotAt(commitId: string): IWorksheet | null;
951
+ /** The snapshot sheet `_clone` and `_snapshotAt` build, over a given state and grid. */
952
+ private _cloneOver;
953
+ /** @internal */
954
+ protected _getSnapshot(coordsFrom: readonly IRange.Coords[], optionsMark?: ICellRange.CopyOptions, getTransactionId?: () => string): ICellRange.ISnapshot;
955
+ /**
956
+ * Copy all items at a sheetRange.
957
+ * @internal
958
+ `*/
959
+ protected _copyRange(sheetFrom: Worksheet, sheetMark: Worksheet, coordsFrom: readonly IRange.Coords[], sheetRangeTo: ICellRange, options: ICellRange.CopyOptions | undefined, toInfo: any): IRange.Coords;
960
+ /**
961
+ * Returns `null` if invalid.
962
+ * @internal
963
+ */
964
+ protected _snapShotFromSource(source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): ICellRange.ISnapshot;
965
+ /**
966
+ * A paste: what the snapshot has to wait for is waited for first, outside any transaction
967
+ * ({@link ICellRange.ISnapshot.prepare}), and the paste itself then opens, writes and commits its
968
+ * transaction in one synchronous extent ({@link _copyFromNow}). With nothing to wait for, the
969
+ * whole paste runs in the caller's synchronous extent: a paste begun while another is suspended
970
+ * is never nested in it, and a read made right after sees the pasted cells.
971
+ * @internal
972
+ */
973
+ protected _copyFrom(destination: IRange.Coords, source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.CopyOptions): Promise<IRange.Coords>;
974
+ /**
975
+ * The paste itself, once its snapshot has prepared: one transaction, opened, written and
976
+ * committed here.
977
+ * @internal
978
+ */
979
+ protected _copyFromNow(destination: IRange.Coords, snapshot: ICellRange.ISnapshot, options?: ICellRange.CopyOptions): IRange.Coords;
980
+ /**
981
+ * Where a {@link _copyFrom} lands, and whether the merges there let it - Excel's rules:
982
+ *
983
+ * - A cut lands the source's own size at the destination's top-left (it can't tile).
984
+ * - A single cell - or one merged cell - copied onto exactly one merged cell fills that merge,
985
+ * bigger or not (the snapshot pastes it values-only). A cut gets no such treatment.
986
+ * - A copy that would cut through a merge is refused, its own source's included.
987
+ * - A cut destroys the merges it lands across instead - but not its OWN merge, which it would have
988
+ * to tear in two; that is refused (Excel silently loses the merge).
989
+ *
990
+ * Runs inside the copy's transaction: the merges a cut destroys roll back with it.
991
+ * @internal
992
+ */
993
+ protected _resolveCopyDestination(destination: IRange.Coords, snapshot: ICellRange.ISnapshot, options: ICellRange.CopyOptions | undefined, isCut: boolean): IRange.Coords;
994
+ /** {@inheritDoc IWorksheet.addAutoTable} */
995
+ addAutoTable(address?: ICellRange.Address, options?: ICellRange.AddAutoTableOptions): ITable;
996
+ /** {@inheritDoc IWorksheet.getAutoTable} */
997
+ getAutoTable(): ITable | null;
998
+ /**
999
+ * The tables on this sheet that hold a filter condition: the AutoTable, then the tables. What
1000
+ * makes the sheet "filtered" ({@link ISheetHeader.getFilteredRanges}).
1001
+ */
1002
+ private _filteredTables;
1003
+ /**
1004
+ * Tells the grid whether this sheet is filtered now ({@link _filteredTables}), from
1005
+ * inside the operation that may have changed it: a table's condition set or cleared, a table
1006
+ * added or deleted. The grid writes only a different answer, so telling it more often than it
1007
+ * changes costs a walk of the tables. A restore is not told, as {@link _tellHidden}.
1008
+ */
1009
+ protected _tellFiltered(): void;
1010
+ /** @internal */
1011
+ protected _getDefaultShiftAxis(coords?: IRange.Coords): IRange.Axis;
1012
+ /** @internal */
1013
+ protected _getTables(address: ICellRanges.Address, ignoreHidden?: boolean, fullyContained?: boolean): ITable[];
1014
+ /** @internal */
1015
+ protected _getDefaultAutoFillCriteria(rangeCoords: IRange.Coords, direction?: IRange.Direction, destination?: IRange.Coords): IAutoFill.DefaultCriteria | null;
1016
+ /** @internal */
1017
+ protected _getDefaultSortCriteria(rangeCoords: IRange.Coords, axis?: IRange.Axis, cell?: ICell.Address): ISort.DefaultSortCriteria;
1018
+ /**
1019
+ * The refusal an {@link ICellRange.insertFrom} would raise, as a localized message - `null` when it
1020
+ * would go through. Asked BEFORE anything is committed, both by `_insertFrom` itself (so a refusal
1021
+ * leaves nothing to roll back and carries the message that fits the reason) and by the public
1022
+ * `canInsertFrom`, which is what lets a drag preview show a drop as refused before it is attempted.
1023
+ *
1024
+ * @internal
1025
+ */
1026
+ protected _getInsertFromRefusal(coordsInsert: IRange.Coords, coordsCut: IRange.Coords, axis: IRange.Axis, isCut: boolean, isSameSheet: boolean): string | null;
1027
+ /**
1028
+ * {@inheritDoc ICellRange.canInsertFrom}
1029
+ * @internal
1030
+ */
1031
+ protected _canInsertFrom(ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): boolean;
1032
+ /**
1033
+ * An insert-paste, in the two parts of a {@link _copyFrom}: the snapshot prepares outside any
1034
+ * transaction, then {@link _insertFromNow} inserts, pastes and commits in one synchronous extent.
1035
+ * @internal
1036
+ */
1037
+ protected _insertFrom(ranges: readonly IRange.Coords[], source: ICellRange.Address | ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): Promise<IRange.Coords>;
1038
+ /** @internal */
1039
+ protected _insertFromNow(ranges: readonly IRange.Coords[], snapshot: ICellRange.ISnapshot, options?: ICellRange.InsertFromOptions): IRange.Coords;
1040
+ /**
1041
+ * Insert cells, shifting existing content down/right.
1042
+ * @internal
1043
+ */
1044
+ protected _insertCells(ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.InsertOptions, coordValidator?: CoordUtils.CoordValidator): void;
1045
+ /** Delete cells, shifting existing content up/left. */
1046
+ protected _deleteCells(ranges: readonly IRange.Coords[], options?: IRange.Axis | ICellRange.DeleteOptions): void;
1047
+ /**
1048
+ * The shared insert/delete engine. Logic lives in `_SheetMutations.shiftCells`.
1049
+ * @internal
1050
+ */
1051
+ protected _shiftCells(ranges: readonly IRange.Coords[], options: IRange.Axis | ICellRange.InsertOptions | ICellRange.DeleteOptions | undefined, isInsert: boolean, coordValidator?: CoordUtils.CoordValidator): void;
1052
+ protected _processLayoutChange(): void;
1053
+ /**
1054
+ * Automatically adjusts row heights and column widths to fit cell content and styles.
1055
+ *
1056
+ * @param ranges Ranges to autofit.
1057
+ * @param options AutoFit options (axis, expandOnly, skipCustomSize, etc).
1058
+ * @internal
1059
+ *
1060
+ * @remarks
1061
+ * Implementation lives in `_SheetAutoFitUtils` (same pattern as `_SheetSortUtils.doSort`).
1062
+ * A fit that measured a face still loading (answered with a stand-in) is kept and taken again
1063
+ * when the face lands; a fit that measured only loaded faces is final.
1064
+ */
1065
+ protected _autoFit(ranges: readonly IRange.Coords[], options?: ICellRange.AutoFitOptions, holdWhileLoading?: boolean): void;
1066
+ /**
1067
+ * Runs the fits owed (see {@link _autoFit}): one held runs for the first time as it was asked;
1068
+ * one that ran against a stand-in runs again, leaving alone a custom size or a hidden row set
1069
+ * since (its first run already cleared what the caller asked to override).
1070
+ *
1071
+ * @returns `false` if none were owed.
1072
+ */
1073
+ private _runPendingFits;
1074
+ /**
1075
+ * The size a range's content needs, without writing it. See {@link ICellRange.getBestFit}.
1076
+ *
1077
+ * @internal
1078
+ */
1079
+ protected _getBestFit(range: IRange.Coords, options?: ICellRange.BestFitOptions): Size;
1080
+ /** @internal */
1081
+ protected _createRangeEvent(coords: (readonly IRange.FixableCoords[]) | IRange.FixableCoords, options: NotifierOptions, coordsFrom?: (readonly IRange.FixableCoords[]) | IRange.FixableCoords): ICellRange.Event;
1082
+ /**
1083
+ * Register a reference node for a range listener.
1084
+ *
1085
+ * @remarks
1086
+ * The node is written into the anchored map by an AMEND on the current commit, so registering
1087
+ * never becomes an undo step, and every snapshot from this commit forward carries the node at
1088
+ * whatever coords it has then. That one write is where the whole contract comes from: undo to a
1089
+ * snapshot at or after registration and the node is there, at the coords of that moment; undo to
1090
+ * one from BEFORE it and the map simply has no entry, which is what `#N/A` is.
1091
+ *
1092
+ * The callback never enters state - it is held on the instance, keyed by node id.
1093
+ *
1094
+ * @internal
1095
+ */
1096
+ protected _addListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
1097
+ /**
1098
+ * {@link _addListenerNode}, also handing back the node, for a caller that reads its coords.
1099
+ * @internal
1100
+ */
1101
+ protected _registerListenerNode(ranges: readonly IRange.Coords[], listener: ICellRange.Listener, options?: ICellRange.ListenerOptions, createNode?: (options: ListenerAnchor.ConstructorOptions) => ListenerAnchor): {
1102
+ node: ListenerAnchor;
1103
+ remove: IListener.Remove;
1104
+ };
1105
+ /**
1106
+ * Register a watch: an expression kept evaluated over a range.
1107
+ *
1108
+ * @remarks
1109
+ * A watch is a range listener that fires on formula evaluation - see {@link WatchAnchor}. Its
1110
+ * location is a node in `State.listeners`, and its body is a formula block in a grid of its own
1111
+ * that shadows this sheet, written at the watched coords exactly as if it had been typed there.
1112
+ * A watch is allowed to overlap other formulas, which is why the body has a grid of its own: the
1113
+ * sheet's formula map holds one formula per cell, and a validation, a conditional format and a
1114
+ * real formula can all sit on D1:D3 at once.
1115
+ *
1116
+ * Registration waits for the engine and never starts it: a watch added while calculation is off
1117
+ * delivers nothing until calculation is started, and registers then. It lands as one amend: the node, the grid and the body join the current commit, so a
1118
+ * watch is never an undo step. A snapshot older than the watch has neither, which is `#N/A`.
1119
+ * The first delivery is the first pass that evaluates the body.
1120
+ *
1121
+ * @param coords The range the body is evaluated over.
1122
+ * @param formula The expression, authored at `origin`, or a compiled formula anchored at
1123
+ * `coords`' top-left.
1124
+ * @param handlers `onValues` receives the body's values after every pass that changed them;
1125
+ * `onChange` is told that an evaluation happened, without the values.
1126
+ * @param origin Where `formula` is authored when it is not `coords`' own top-left: the shared
1127
+ * origin of a multi-area watch, from which the body is filled to `coords`.
1128
+ * @param options `arrayFirstCell`: every cell of the body is its own 1x1 array-entered formula.
1129
+ * `paged`: the body's blank region is evaluated where its owner asks (see
1130
+ * {@link WatchAnchor.Options.paged}).
1131
+ * @internal
1132
+ */
1133
+ protected _addWatch(coords: IRange.Coords, formula: ICalculation.IFormula | string, handlers: WatchAnchor.Handlers, origin?: IRange.CellCoords, options?: WatchAnchor.Options): IListener.Remove;
1134
+ /**
1135
+ * The one amend that creates a watch: its node, its grid and its body.
1136
+ *
1137
+ * @remarks
1138
+ * Everything about the BODY is the node's ({@link WatchAnchor.reconcile},
1139
+ * {@link WatchAnchor.deliver}). What is here is what every listener gets from the sheet: the
1140
+ * node in the versioned map, the entry that holds its callbacks, and the removal.
1141
+ * @internal
1142
+ */
1143
+ protected _registerWatch(coords: IRange.Coords, expression: string, authoredAt: IRange.CellCoords, handlers: WatchAnchor.Handlers, arrayFirstCell: boolean, paged: boolean): IListener.Remove;
1144
+ /**
1145
+ * A watch's body is a grid the engine holds once, for every snapshot, so a watch is made and
1146
+ * removed against the commit the store is at. Inside an amend of any other commit its node and
1147
+ * its grid's maps would land in that snapshot alone: the engine would hold a grid the current
1148
+ * snapshot has no record of, and removing it later would leave the engine its body.
1149
+ */
1150
+ protected _ensureWatchAtCurrent(action: 'added' | 'removed'): void;
1151
+ /**
1152
+ * The `addWatch` a content is given: holds a formula that belongs to no cell - a chart's
1153
+ * series, a control's linked cell - in the calculation engine, and tells the content each time
1154
+ * the engine rewrites it.
1155
+ *
1156
+ * @remarks
1157
+ * One unanchored formula host per call, its body authored at `origin` (the content's anchor
1158
+ * top-left unless given), exactly as a defined name's body is held: the engine keeps its
1159
+ * references on the cells they name, so an insert or delete rewrites them, a cut carries them, a
1160
+ * deleted sheet leaves `#REF!`, and undo puts all of it back. The body demands its first cell
1161
+ * only, so holding a reference to a column costs a pass one read, not the column.
1162
+ *
1163
+ * The callback carries a {@link HeldFormula}, a live view over the host: every read answers the
1164
+ * body as the store holds it now. It is delivered once the engine has compiled the body and
1165
+ * again after every change to its text - a structural edit, a pass that rewrote it, a restore.
1166
+ *
1167
+ * Registration waits for the engine's next safe point and then amends the current commit, as a
1168
+ * watch's does. An engine that is never started holds nothing, and the content reads its text as
1169
+ * set. A formula the engine cannot compile is not held either.
1170
+ *
1171
+ * A {@link HeldFormula} handed back in - a content restored after a delete re-holding what it
1172
+ * had - attaches to the grid the formula lived in when that grid came back with the restore, and
1173
+ * is held afresh from the formula's last text otherwise.
1174
+ *
1175
+ * @param getAnchor The content's anchor top-left, read when the watch registers.
1176
+ * @internal
1177
+ */
1178
+ _contentAddWatch(getAnchor: () => IRange.CellCoords | null): AbstractMovableContent.AddWatch;
1179
+ /**
1180
+ * Carry every reference a cut encloses from its source to its destination.
1181
+ *
1182
+ * @remarks
1183
+ * A cut moves cells, and everything that NAMES those cells goes with them - which is what the
1184
+ * calc graph does for a formula precedent (`movePrecedents`), and what a range listener's
1185
+ * reference and a watch's location must do for the same reason and by the same rule: the cut
1186
+ * carries a reference only when it fully encloses it. Cut B2 to D5 and a listener on B2 reads
1187
+ * D5; cut a block that merely clips the reference and it stays put, pointing at cells that are
1188
+ * now empty.
1189
+ *
1190
+ * Called from the cut path beside the calc grid's own move, so the two land in one commit and
1191
+ * one undo puts both back. A watch's body follows its node from the node's own address event
1192
+ * at commit end (see {@link WatchAnchor.reconcile}).
1193
+ *
1194
+ * @param from The cut's source.
1195
+ * @param to Where the cut's source lands.
1196
+ * @internal
1197
+ */
1198
+ protected _moveReferences(from: IRange.Coords, to: IRange.Coords): void;
1199
+ /**
1200
+ * Drop a node from the current snapshot.
1201
+ *
1202
+ * @remarks
1203
+ * The same amend as registering. Older snapshots keep the entry; one whose callback is gone from
1204
+ * the instance is inert, and is swept the next time this runs.
1205
+ *
1206
+ * @internal
1207
+ */
1208
+ protected _removeListenerNode(node: ListenerAnchor): void;
1209
+ /**
1210
+ * Tell the participants bound to `batch` of each of its steps, from the step's own intents.
1211
+ *
1212
+ * @remarks
1213
+ * Told inline, as the step commits and before the operation that made it returns, so what a
1214
+ * participant writes is the batch's next step. Moves first, as at the root's end.
1215
+ *
1216
+ * @internal
1217
+ */
1218
+ protected _hearBatchSteps(batch: BatchHandle): void;
1219
+ protected _batchesHeard: WeakSet<BatchHandle> | null;
1220
+ /**
1221
+ * Deliver to every node whose reference intersects what changed.
1222
+ *
1223
+ * @remarks
1224
+ * A transactional node is told from inside the transaction, before the commit seals, so what it
1225
+ * writes joins that commit; every other node is told once the store has settled. The two are
1226
+ * never told from the same place, so `transactional` selects which half this call is for.
1227
+ *
1228
+ * `ranges` is the commit's change set, so a batch of operations is ONE change to a node: it is
1229
+ * told once, carrying every range of the commit that reached it.
1230
+ *
1231
+ * @internal
1232
+ */
1233
+ protected _notifyListenerNodes(state: State, ranges: readonly IRange.Coords[] | null, notificationOptions: NotifierOptions, transactional: boolean, renamed?: boolean, includes?: ((entry: ListenerNodeEntry) => boolean) | null): void;
1234
+ /**
1235
+ * Deliver to every live node whose reference is no longer where it was.
1236
+ *
1237
+ * @remarks
1238
+ * Nothing is compared against the log, and the direction the store moved does not matter. The
1239
+ * map either holds the node - at whatever coords it has in THIS snapshot - or it does not, and
1240
+ * each case answers itself: a difference from the coords last delivered is an `address` change,
1241
+ * and no entry at all is `#N/A`, a world from before the node was registered.
1242
+ *
1243
+ * `transactional` selects which nodes this call is for (see {@link _notifyListenerNodes}). With
1244
+ * `notificationOptions` `null` the nodes are only re-based - their last-delivered coords are set
1245
+ * to this snapshot's without a delivery. That is a restore seen by a transactional node: it is
1246
+ * never told about one, but the next forward move must be measured from where the restore left
1247
+ * the reference, not from where it was before.
1248
+ *
1249
+ * @internal
1250
+ */
1251
+ protected _notifyListenerNodeMoves(state: State, transactional: boolean, notificationOptions: NotifierOptions | null, includes?: ((entry: ListenerNodeEntry) => boolean) | null): void;
1252
+ /**
1253
+ * One delivery, after the option filters.
1254
+ *
1255
+ * @internal
1256
+ */
1257
+ protected _deliverToNode(entry: ListenerNodeEntry, trigger: 'data' | 'address' | 'restore', notificationOptions: NotifierOptions, from?: readonly IRange.Coords[]): void;
1258
+ /** @internal */
1259
+ protected _notifyUsedRangeChange(): void;
1260
+ /** @internal */
1261
+ protected _notify(key: keyof IWorksheet.IListeners): void | Promise<any>;
1262
+ /**
1263
+ * Fires one of the events that carry a {@link IWorksheet.ChangeEvent}.
1264
+ *
1265
+ * @param coords What changed, or `null` for the whole sheet.
1266
+ * @param details What wrote it; a `null` commit for a change not written.
1267
+ * @internal
1268
+ */
1269
+ protected _notifyChange(key: IWorksheet.ChangeEventKey, coords: readonly IRange.Coords[] | null, details: SheetChangeDetails): void;
1270
+ /**
1271
+ * The change events a commit announces on this sheet, in the order they fire: what the commit
1272
+ * path delivers and {@link IWorkbook.getChanges} reads back.
1273
+ * @internal
1274
+ */
1275
+ protected _commitChanges(scoped: SheetEvents | null, details: SheetChangeDetails): {
1276
+ key: IWorksheet.ChangeEventKey;
1277
+ coords: IRange.Coords[];
1278
+ details: SheetChangeDetails;
1279
+ }[];
1280
+ /**
1281
+ * What a commit wrote on this sheet, as {@link IWorkbook.getChanges} reports it.
1282
+ * @internal
1283
+ */
1284
+ _changeEventsOf(commit: ITransaction.ICommit, previous: ITransaction.ICommit | null): IWorksheet.ChangeEvent[];
1285
+ /**
1286
+ * Every collection change fires its fine-grained event PLUS the coarse class event it belongs
1287
+ * to (see `IWorksheet.Events.onStyleChange` / `onProtectionChange`), so renderers subscribe to the
1288
+ * class alone. These helpers are the single place that pairing lives — fire sites must use them
1289
+ * rather than `_notify` directly so a collection can never drift out of its class.
1290
+ * @internal
1291
+ */
1292
+ protected _notifyConditionalFormatsChange(): void;
1293
+ /** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
1294
+ protected _notifyTablesChange(): void;
1295
+ /** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
1296
+ protected _notifyDataValidationsChange(): void;
1297
+ /** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
1298
+ protected _notifyProtectedRangesChange(): void;
1299
+ /** {@inheritDoc Sheet._notifyConditionalFormatsChange} @internal */
1300
+ protected _notifyCommentsChange(): void;
1301
+ /**
1302
+ * Presents one of the sheet's own events as a collection's `onCollectionChange`, and the
1303
+ * sheet's `onInvalidated` as the collection's, with the collection as the source of both.
1304
+ *
1305
+ * @remarks
1306
+ * The sheet keeps the state and fires the fine-grained event; the collection is a front over
1307
+ * it. Forwarding, rather than a second emitter, is what keeps the two from drifting apart.
1308
+ * @internal
1309
+ */
1310
+ protected _forwardCollectionListeners(key: 'onTablesChange' | 'onConditionalFormatsChange' | 'onDataValidationsChange' | 'onProtectedRangesChange' | 'onCommentsChange', collection: () => ICollection<any>): (listeners: ICollection.IListeners, options?: IListener.Options) => IListener.Remove;
1311
+ /** {@inheritDoc IWorksheet.addListeners} */
1312
+ addListeners(listeners: IWorksheet.IListeners, options?: IListener.Options): IListener.Remove;
1313
+ /** @internal */
1314
+ protected _getUsedCoords(options?: ICellRange.GetRangeOptions): IRange.Coords | null;
1315
+ /** @internal */
1316
+ protected _getRangeStats(coords: readonly IRange.Coords[], iteratorOptions?: ICellRange.GetStatsOptions): IRangeStats;
1317
+ /** @internal */
1318
+ protected _isContentful(ranges: readonly IRange.Coords[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean): boolean;
1319
+ /**
1320
+ * Legacy Content-keyed counting — internal callers only (`clear` preflight).
1321
+ * The public path is `_featureCounts`, keyed by `ICellRange.Feature`.
1322
+ * @internal
1323
+ */
1324
+ protected _contentCounts(ranges: readonly IRange.Coords[], types: ICell.Content[] | undefined, ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean): Partial<Record<ICell.Content, number>>;
1325
+ /**
1326
+ * Per-feature cell counts — the engine behind `ICellRange.getCounts`.
1327
+ *
1328
+ * Every public feature is counted INDEPENDENTLY (no refinement — a refined count is
1329
+ * `getRegions`), and the result carries the full `ICellRange.Feature` key set with explicit
1330
+ * zeros, except `anomalies`, which is keyed only when requested. Every feature reads off its own state map now — `DateFormat` off `dateFormatSpatial`,
1331
+ * `Error` off the reconciled error spatial (cached per state version) — grouped by backing map
1332
+ * so shared backings (the three content-style projections) iterate once. There is no value-scan
1333
+ * branch left: that used to exist for the scalar kinds (`String`/`Number`/`Boolean`, and the old
1334
+ * derived `Date`), all of which have since either been retired from the public vocabulary
1335
+ * (`range.getStats().getTypedCounts()` already answers "how many numbers", richer) or replaced
1336
+ * by a real, directly indexed feature (`DateFormat`).
1337
+ * @internal
1338
+ */
1339
+ protected _featureCounts(ranges: readonly IRange.Coords[], features?: ICellRange.Feature | readonly ICellRange.Feature[], ignoreHidden?: boolean | IRange.Axis, ignoreSpilled?: boolean): ICellRange.Counts;
1340
+ /**
1341
+ * Calculation-graph neighbors of a range — the engine behind `ICellRange`'s and `ICell`'s
1342
+ * precedents/dependents family.
1343
+ *
1344
+ * The calc grid is already range-shaped (`getPrecedentsAt` and friends take `IRange.Coords`),
1345
+ * so a range query is the same call a cell makes, not a fan-out over cells: the cell form is
1346
+ * this one over a 1×1. The result is the UNION over the range and is not filtered against it —
1347
+ * a range that contains both a formula and its input legitimately lists that input, and
1348
+ * removing it would answer a different question than "what does this block read".
1349
+ * @internal
1350
+ */
1351
+ protected _dependencyRanges(coords: IRange.Coords, kind: 'precedents' | 'dependents', direct: boolean): Promise<ICellRanges | null>;
1352
+ /**
1353
+ * Name ids -> the range objects that carry them in a graph answer.
1354
+ *
1355
+ * @remarks
1356
+ * The id half of step 3. Liveness and "is this actually a name" were already applied by the
1357
+ * grid; an id that no longer resolves simply drops. Each node is anchored on ITS OWN sheet
1358
+ * (the name's defining cell), which is why the internal is re-resolved per id.
1359
+ * @internal
1360
+ */
1361
+ private _namedGraphRanges;
1362
+ /**
1363
+ * Calc-currency scopes → range-currency scopes: the boundary the whole scope model rests on.
1364
+ *
1365
+ * @remarks
1366
+ * A neighbor found in the graph is scoped by its GRID — a sheet's stableId, or (for a named
1367
+ * formula, which compiles into a virtual grid holding one cell at 0,0) the name's id. Neither is
1368
+ * addressable: `getRanges` looks sheets up by name, so a stableId reaching it is a `#REF!` and a
1369
+ * name's id is a phantom `A1` on whatever sheet was asked.
1370
+ *
1371
+ * So sheet grids are translated to display names here, and everything else is either COLLECTED
1372
+ * (`nameGrids` — a dependent landing on a name's virtual grid is that name's body reading these
1373
+ * cells, reported as a name NODE by the caller under the phase-5 liveness rule) or dropped. The
1374
+ * consuming cell is reported directly either way (references apply at eval, so `C1 = SUM(MyRange)`
1375
+ * is a direct dependent of `A1` in its own right) — the node is additive labeling, which is why
1376
+ * a dead name's silence degrades nothing but the label.
1377
+ * @internal
1378
+ */
1379
+ private _toRangeScopes;
1380
+ /**
1381
+ * A sheet stableId → its display name, across the workbook when attached, else just this sheet.
1382
+ *
1383
+ * @remarks
1384
+ * Calc scopes references by stableId so a rename cannot break them; every public surface speaks
1385
+ * names. Returns `null` when the id names no sheet — a deleted one, or a grid that was never a
1386
+ * sheet at all.
1387
+ * @internal
1388
+ */
1389
+ protected _resolveSheetScope(stableId: string): string | null;
1390
+ /**
1391
+ * Uniform feature regions — the engine behind `ICellRange.getRegions`.
1392
+ *
1393
+ * Returns the coords of rectangles whose cells agree on every requested feature; the public
1394
+ * objects (`CellRegions`/`CellRegion`) are built by the caller, which is also what defers the
1395
+ * whole computation until the partition is actually used. Blocks carrying none of the
1396
+ * requested features are elided. `features` arrives already resolved (`resolveRegionFeatures`).
1397
+ *
1398
+ * Known v1 bounds, recorded in AGENT-PLAN B2: the blank/complement side of the partition is
1399
+ * not yielded. Every requested feature partitions — there is no unsupported-feature throw left
1400
+ * in this function.
1401
+ * @internal
1402
+ */
1403
+ protected _featureRegions(bounds: IRange.Coords, requested: readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions): IRange.Coords[];
1404
+ /** {@inheritDoc IWorksheet.find} */
1405
+ find(options?: string | ICellRange.FindOptions): Iterator<ICell>;
1406
+ /** {@inheritDoc IWorksheet.setEntireSize} */
1407
+ setEntireSize(size?: Partial<IWorksheet.EntireSize> | null, options?: ITransaction.OperationOptions): this;
1408
+ private _getEntireSize;
1409
+ /** The size that ends where the sheet's content does. */
1410
+ private _getFittedSize;
1411
+ /**
1412
+ * Moves the sheet's end to `size`, within the caller's transaction. The cells it adds or removes
1413
+ * are inserted and deleted at the end, so ranges that reach the end follow it.
1414
+ */
1415
+ private _resizeEntire;
1416
+ /** @internal */
1417
+ protected _find(ranges: readonly IRange.Coords[], options: string | ICellRange.FindOptions): Iterator<ICell>;
1418
+ /** {@inheritDoc IWorksheet.getRuntime} */
1419
+ getRuntime(): IRuntime;
1420
+ /**
1421
+ * The region a bare-cursor traverse from `cell` wraps within, or `null` for a plain move. A table
1422
+ * under the cursor answers for itself.
1423
+ * @internal
1424
+ */
1425
+ protected _getTraverseRegion(cell: IRange.CellCoords, axis: IRange.Axis, reverse: boolean): IRange.Coords | null;
1426
+ /** @internal */
1427
+ protected _surroundingRegion(range: IRange.Coords, options?: ICellRange.GetSurroundingOptions): IRange.Coords;
1428
+ /** @internal */
1429
+ protected _extendRange(direction: IRange.Direction, cell: IRange.CellCoords): Readonly<IRange.Coords>;
1430
+ /** @internal */
1431
+ protected _defaultFontDims(): Readonly<Size>;
1432
+ /** {@inheritDoc IWorksheet.getColumnWidthAsFontUnit} */
1433
+ getColumnWidthAsFontUnit(pixelWidth: number): number;
1434
+ protected _createTupleBuilder<T>(transpose?: boolean): Tuple.IBuilder<T>;
1435
+ /**
1436
+ * col width in character units
1437
+ * @internal
1438
+ */
1439
+ protected _defaultColWidth(): number;
1440
+ /**
1441
+ * row height in character pts. To get pixels multiple by scale
1442
+ * @internal
1443
+ */
1444
+ protected _defaultRowHeight(): number;
1445
+ /** {@inheritDoc IWorksheet.getProtection} */
1446
+ getProtection(): IWorksheetProtection;
1447
+ /** @internal */
1448
+ protected _scrollIntoView(coords: IRange.Coords, scrollIntoView?: boolean | ICellRange.ScrollIntoViewOptions): Promise<boolean>;
1449
+ /** @internal */
1450
+ protected _selectSheet(coords: IRange.Coords, scrollIntoView?: boolean | ICellRange.ScrollIntoViewOptions): Promise<boolean>;
1451
+ /** {@inheritDoc IWorksheet.scrollTo} */
1452
+ scrollTo(coords: Partial<IRange.Coords>, options?: IWorksheet.ScrollToOptions): Promise<boolean>;
1453
+ /** @internal */
1454
+ protected _resolveSelectOptions(selectOptions: boolean | ICellRange.SelectOptions, axis?: IRange.Axis): ICellRange.SelectOptions | null;
1455
+ /**
1456
+ * Record the operation's directives over what it produced, then commit.
1457
+ *
1458
+ * @remarks
1459
+ * `options` is the object the operation was handed, so what it declares through
1460
+ * {@link ICellRange.OperationOptions} is what is honored here: `autoSelect` names where the
1461
+ * operation leaves the user, `autoFit` fits the ranges it produced. Both are read from the one
1462
+ * object, so an operation cannot accept a directive it then ignores.
1463
+ *
1464
+ * @internal
1465
+ */
1466
+ protected _commitWithDirectives(trans: ITransaction, selection: Partial<IRangeSelection.Coords> | null, options?: ICellRange.OperationOptions, directives?: CommitDirectives): void;
1467
+ /**
1468
+ * Declare where the operation leaves the user, and where an undo of it lands when that is not
1469
+ * the same place.
1470
+ *
1471
+ * @param selection Where the operation leaves the user - what it acted on, or what it produced
1472
+ * when that is somewhere else (a paste fitted to its source). Also where a redo lands.
1473
+ * @param options The operation's own options, passed through as they were given: its `autoSelect`
1474
+ * and `autoSelectRestore`.
1475
+ * @param undo Where an undo lands, when it is not `selection`: a cut-drag and an insert-from
1476
+ * undo to the SOURCE, an auto-fill to the TEMPLATE it was dragged from.
1477
+ *
1478
+ * @remarks
1479
+ * A declaration, never an action: every operation declares, whatever it was asked, and whether
1480
+ * the view moves - now, on undo or on redo - is decided once, when the commit closes
1481
+ * ({@link resolveSelection}).
1482
+ *
1483
+ * @internal
1484
+ */
1485
+ protected _recordSelection(trans: ITransaction, selection: Partial<IRangeSelection.Coords>, options?: Pick<ICellRange.OperationOptions, 'autoSelect' | 'autoSelectRestore'> | null, undo?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis): void;
1486
+ /**
1487
+ * Where an undo or a redo of a commit puts this sheet's view, or `null` when it leaves it
1488
+ * alone. See {@link resolveSelection}.
1489
+ *
1490
+ * @remarks
1491
+ * A sheet can be shown through more than one view, and a view instance is replaced on load and
1492
+ * by {@link setView}, so the match is on {@link IWorksheetView.getId}.
1493
+ *
1494
+ * @internal
1495
+ */
1496
+ protected _restoredSelection(intents: Readonly<Record<string, any>> | undefined, isUndo: boolean): {
1497
+ selection: Partial<IRangeSelection.Coords>;
1498
+ options: boolean | ICellRange.SelectOptions;
1499
+ } | null;
1500
+ /**
1501
+ * Record what this operation has to announce when it lands, under one category.
1502
+ *
1503
+ * @remarks
1504
+ * Recorded as the `sheet.events` intent on the ROOT and unioned there, so a batch of operations
1505
+ * announces all of them rather than the last. Keyed by {@link getId}, so a commit that spans
1506
+ * sheets announces each sheet separately. The intent travels on the commit, which is what lets
1507
+ * an undo deliver the same categories the forward commit did.
1508
+ *
1509
+ * Copy-on-write: an amend's accumulator is handed the value on the commit it folds into, and
1510
+ * mutating that would announce the whole of the target commit rather than what the amend
1511
+ * recorded - which is what makes a registration amend silent. The range list is the exception
1512
+ * once this operation has made its own ({@link _appendOwnedRanges}): one write per cell in a
1513
+ * batch would otherwise copy every range recorded so far on each of them.
1514
+ *
1515
+ * @internal
1516
+ */
1517
+ protected _recordChange(trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[] | null | undefined, shifts?: readonly ShiftIntent[]): void;
1518
+ /** Whether a participant hears this sheet's change events, so its writes are made as they come. */
1519
+ protected _hasChangeParticipants(): boolean;
1520
+ /**
1521
+ * Announce a write as it is made, under the event its category belongs to.
1522
+ *
1523
+ * @remarks
1524
+ * Announced inside the operation, so a participant hears each write inline and what it writes
1525
+ * joins the operation, while an observer is told once the operation lands, every write of it
1526
+ * merged into one event (`SheetChangeEvent.merge`). An undo or a redo has no writes to announce
1527
+ * from, and announces what the commit recorded instead (`onAfterStateChange`).
1528
+ *
1529
+ * A load announces nothing ({@link IntentInitial}).
1530
+ *
1531
+ * @internal
1532
+ */
1533
+ protected _announceChange(trans: ITransaction, category: EventCategory, ranges: readonly IRange.Coords[], shifts?: readonly ShiftIntent[]): void;
1534
+ /**
1535
+ * Record the ranges a formula was entered over.
1536
+ *
1537
+ * @remarks
1538
+ * A subset of the `data` category that no event fires for: it is what the calculation's amend
1539
+ * formats and fits once the results exist ({@link _promoteCalcResults}). Unioned and written
1540
+ * copy-on-write for the same reasons as {@link _recordChange}.
1541
+ *
1542
+ * @internal
1543
+ */
1544
+ protected _recordFormulasEntered(trans: ITransaction, ranges: readonly IRange.Coords[] | null | undefined): void;
1545
+ /**
1546
+ * This sheet's half of what a commit announces.
1547
+ *
1548
+ * @internal
1549
+ */
1550
+ protected _sheetEvents(intents: Readonly<Record<string, any>> | undefined): SheetEvents | null;
1551
+ /**
1552
+ * Every range this sheet announces from a commit, across the given categories (all of them when
1553
+ * `categories` is omitted).
1554
+ *
1555
+ * @remarks
1556
+ * The union is what a consumer asking "did anything happen in my box" wants, and taking it over
1557
+ * every category is what keeps a category added later from silently ceasing to reach one.
1558
+ *
1559
+ * @internal
1560
+ */
1561
+ protected _changedRanges(intents: Readonly<Record<string, any>> | undefined, categories?: readonly EventCategory[]): readonly IRange.Coords[] | null;
1562
+ /**
1563
+ * Record ranges to fit when the operation completes.
1564
+ *
1565
+ * @remarks
1566
+ * The fit is a union over the operation: entries for the same sheet and the same options
1567
+ * accumulate ranges, so a batch measures each column once, at the end, against the finished
1568
+ * content. Resolved by {@link _resolveAutoFit} as the operation's last write.
1569
+ *
1570
+ * @internal
1571
+ */
1572
+ protected _recordAutoFit(trans: ITransaction, ranges: readonly IRange.Coords[], autoFit: boolean | ICellRange.AutoFitOptions): void;
1573
+ /**
1574
+ * Record that the formulas this operation enters take the number format their results carry.
1575
+ *
1576
+ * @remarks
1577
+ * Resolved by the calculation's amend into this commit rather than when the operation
1578
+ * completes: the results do not exist yet. See {@link IntentAutoFormat}.
1579
+ *
1580
+ * @internal
1581
+ */
1582
+ protected _recordAutoFormat(trans: ITransaction): void;
1583
+ /**
1584
+ * Record that this operation has ruled on its own protection, so the commit-time catch-all
1585
+ * stands down. See {@link IntentSkipProtectionCheck}.
1586
+ *
1587
+ * @internal
1588
+ */
1589
+ protected _recordSkipProtectionCheck(trans: ITransaction): void;
1590
+ /**
1591
+ * Whether the open operation has ruled on this sheet's protection. See
1592
+ * {@link _recordSkipProtectionCheck}.
1593
+ *
1594
+ * @internal
1595
+ */
1596
+ protected _isProtectionRuled(): boolean;
1597
+ /**
1598
+ * Record that this commit is a load of the sheet: not a user's write, so the protection check
1599
+ * stands down, and not an edit, so nothing it wrote is announced. See {@link IntentInitial}.
1600
+ *
1601
+ * @internal
1602
+ */
1603
+ protected _recordInitial(trans: ITransaction): void;
1604
+ /**
1605
+ * Record where the freeze panes were and where the operation moved them. See
1606
+ * {@link FreezePanesIntent} for how a batch merges the pair.
1607
+ *
1608
+ * @internal
1609
+ */
1610
+ protected _recordFreezePanes(trans: ITransaction, before: IRange.CellCoords, after: IRange.CellCoords): void;
1611
+ /**
1612
+ * Record an insert or delete of cells. See {@link ShiftsIntent}.
1613
+ *
1614
+ * @internal
1615
+ */
1616
+ protected _recordShift(trans: ITransaction, kind: IWorksheet.ShiftKind, axis: IRange.Axis, ranges: readonly IRange.Coords[]): void;
1617
+ /**
1618
+ * This sheet's inserts and deletes in a commit, as a change event reports them: for an undo,
1619
+ * the inverse of each, last first.
1620
+ *
1621
+ * @internal
1622
+ */
1623
+ protected _sheetShifts(intents: Readonly<Record<string, any>> | undefined, isUndo: boolean): readonly ShiftIntent[];
1624
+ /**
1625
+ * The movables of this sheet with the given ids, in that order. Ids no longer on the sheet are
1626
+ * skipped: an undo of the insert that created a movable lands on a state without it.
1627
+ *
1628
+ * @internal
1629
+ */
1630
+ protected _movablesOfIds(ids: readonly string[]): IMovable[];
1631
+ /**
1632
+ * Fold writes into the current commit without a log entry. See `IStore.amend`.
1633
+ * @internal
1634
+ */
1635
+ protected _amendCurrent<R>(callback: () => R): R;
1636
+ /**
1637
+ * An amend the sheet makes for itself (a listener node, a watch, a promoted calc result) is not
1638
+ * a user's write, so a protected sheet must not refuse it. Only an amend that opens its own
1639
+ * root stands the check down; nested, it joins an operation that answers for itself.
1640
+ * @internal
1641
+ */
1642
+ protected _amendBookkeeping<R>(commitId: string, callback: (commit: ITransaction.ICommit) => R): R;
1643
+ /**
1644
+ * Fit the ranges the operation asked for, as its last write.
1645
+ *
1646
+ * @remarks
1647
+ * Runs while the root transaction is still open so the sizes belong to the same commit as the
1648
+ * content they measure - one undo puts both back. The intent is left on the record: it is what
1649
+ * a redo fits from.
1650
+ *
1651
+ * @internal
1652
+ */
1653
+ protected _resolveAutoFit(commit: ITransaction.ICommit): void;
1654
+ /**
1655
+ * Resolve the operation's directives once its root transaction has closed.
1656
+ *
1657
+ * @internal
1658
+ */
1659
+ protected _onRootTransactionClose(commit: ITransaction.ICommit, isRollback?: boolean, isElided?: boolean, isAmend?: boolean): void;
1660
+ /**
1661
+ * Keep the view's selection somewhere it can be once the sheet has changed: inside the sheet,
1662
+ * and with its active cell on the top-left of the merge it falls in.
1663
+ *
1664
+ * @param isMergesChanged Whether the change merged anything, which is the only way the active
1665
+ * cell comes to sit inside a merge.
1666
+ *
1667
+ * @remarks
1668
+ * A correction of the view, not an operation's selection: it applies whoever made the change,
1669
+ * and is not undone with it.
1670
+ *
1671
+ * @internal
1672
+ */
1673
+ protected _normalizeSelection(isMergesChanged: boolean): void;
1674
+ /** The selection pulled inside the sheet's end, or itself when it already is. */
1675
+ protected _selectionWithinEntire(coords: IRangeSelection.Coords, entire?: IRange.Coords): IRangeSelection.Coords;
1676
+ /** @internal */
1677
+ protected _autoSelect(options?: boolean | ICellRange.SelectOptions, selectionOverride?: Partial<IRangeSelection.Coords> | null, axis?: IRange.Axis): Promise<IRange.Coords[]>;
1678
+ /** {@inheritDoc IWorksheet.getSelection} */
1679
+ getSelection(): IRangeSelection;
1680
+ /** {@inheritDoc IWorksheet.getSelectedCell} */
1681
+ getSelectedCell(): ICell;
1682
+ /** {@inheritDoc IWorksheet.getSelectedRange} */
1683
+ getSelectedRange(options?: ICellRange.GetRangeOptions): ICellRange;
1684
+ /** {@inheritDoc IWorksheet.getSelectedRanges} */
1685
+ getSelectedRanges(options?: ICellRange.GetRangeOptions): ICellRanges;
1686
+ /** {@inheritDoc IWorksheet.getView} */
1687
+ getView(): IWorksheetView;
1688
+ /** {@inheritDoc IWorksheet.setView} */
1689
+ setView(view: IWorksheetView): this;
1690
+ /** {@inheritDoc IWorksheet.getTabColor} */
1691
+ getTabColor(): IColor;
1692
+ /** {@inheritDoc IWorksheet.setTabColor} */
1693
+ setTabColor(color: IColor | string | null): this;
1694
+ /** {@inheritDoc IWorksheet.getCodeName} */
1695
+ getCodeName(): string | null;
1696
+ /** {@inheritDoc IWorksheet.getOutline} */
1697
+ getOutline(): IOutline;
1698
+ /** {@inheritDoc IWorksheet.getPageLayout} */
1699
+ getPageLayout(): IPageLayout;
1700
+ /** {@inheritDoc IWorksheet.getHorizontalPageBreaks} */
1701
+ getHorizontalPageBreaks(): IPageLayout.IPageBreak[];
1702
+ /** {@inheritDoc IWorksheet.getVerticalPageBreaks} */
1703
+ getVerticalPageBreaks(): IPageLayout.IPageBreak[];
1704
+ /** {@inheritDoc IWorksheet.addHorizontalPageBreak} */
1705
+ addHorizontalPageBreak(pageBreakRange: ICellRange.Address, options?: ITransaction.OperationOptions): IPageLayout.IPageBreak;
1706
+ /** {@inheritDoc IWorksheet.addVerticalPageBreak} */
1707
+ addVerticalPageBreak(pageBreakRange: ICellRange.Address, options?: ITransaction.OperationOptions): IPageLayout.IPageBreak;
1708
+ /** {@inheritDoc IWorksheet.removeAllHorizontalPageBreaks} */
1709
+ removeAllHorizontalPageBreaks(options?: ITransaction.OperationOptions): void;
1710
+ /** {@inheritDoc IWorksheet.removeAllVerticalPageBreaks} */
1711
+ removeAllVerticalPageBreaks(options?: ITransaction.OperationOptions): void;
1712
+ /** {@inheritDoc IWorksheet.isConditionalFormatCalculationEnabled} */
1713
+ isConditionalFormatCalculationEnabled(): boolean;
1714
+ /** {@inheritDoc IWorksheet.isTransitionFormulaEvaluation} */
1715
+ isTransitionFormulaEvaluation(): boolean;
1716
+ /** {@inheritDoc IWorksheet.isTransitionFormulaEntry} */
1717
+ isTransitionFormulaEntry(): boolean;
1718
+ /** {@inheritDoc IWorksheet.isExcludedFromPublishing} */
1719
+ isExcludedFromPublishing(): boolean;
1720
+ /** {@inheritDoc IWorksheet.getSyncScroll} */
1721
+ getSyncScroll(): IWorksheet.SyncScroll | null;
1722
+ /**
1723
+ * A sheet's scripts are workbook structure, like the workbook's own.
1724
+ * @internal
1725
+ */
1726
+ protected _isModulesReadOnly(): boolean;
1727
+ /** {@inheritDoc IWorksheet.getModules} */
1728
+ getModules(): IModuleCollection;
1729
+ /** {@inheritDoc IWorksheet.getRowHeaders} */
1730
+ getRowHeaders(): ISheetHeader;
1731
+ /** {@inheritDoc IWorksheet.getColumnHeaders} */
1732
+ getColumnHeaders(): ISheetHeader;
1733
+ /**
1734
+ * The sheet's grid, whatever the calculation hands back (DESIGN-CALC-SERVICE §5): opened from
1735
+ * `json` (§6.6), the file's formulas, array extents and cached values, trusted. What the engine
1736
+ * makes of them arrives through the grid's `onComplete`, before this returns when the engine is
1737
+ * `Running`. The grid holds every cell map, and answers an `Off` save and a start's seed itself.
1738
+ * A snapshot sheet over another sheet's state (a copy) shares the grid: the owner answers, with
1739
+ * the state as it is now.
1740
+ */
1741
+ protected _openCalcGrid(json: ICalcGrid.JSON | undefined): ICalcGrid;
1742
+ /** {@inheritDoc IWorksheet.toJSON} */
1743
+ toJSON(options?: IWorksheet.ToJSONOptions): Promise<IWorksheet.JSON>;
1744
+ /** {@inheritDoc IWorksheet.getStyles} */
1745
+ getStyles(): IStyleCollection;
1746
+ /** {@inheritDoc IWorksheet.getResources} */
1747
+ getResources(): IResourceCollection;
1748
+ /** {@inheritDoc IWorksheet.getTransactions} */
1749
+ getTransactions(): ITransaction.IStore;
1750
+ /** {@inheritDoc IWorksheet.getStrings} */
1751
+ getStrings(): IStringCollection;
1752
+ /**
1753
+ * The sheet's movables: those placed on it, then the boxes of its notes.
1754
+ * @internal
1755
+ */
1756
+ protected _searchMovables(options?: IMovableCollection.GetItemsOptions): IMovable[];
1757
+ /**
1758
+ * Places a note's box among the sheet's movables. See {@link Comment.Boxes.add}.
1759
+ * @internal
1760
+ */
1761
+ protected _addNoteBox(comment: Comment, placement: Comment.BoxPlacement | null, hidden: boolean): NoteMovable;
1762
+ /**
1763
+ * A movable, or something in it, was placed anew as part of the open operation: every connector
1764
+ * glued to it follows in the same operation (`translated` when it only moved). A target whose
1765
+ * sites have not evaluated yet is followed once they have, folded into the commit then current.
1766
+ */
1767
+ protected _glueConnectors(movable: IMovable, translated?: boolean): void;
1768
+ /** Whether the movable index read last holds a connector or a group; groups are not looked into. */
1769
+ private _connectorScan;
1770
+ /**
1771
+ * The cells under the movables changed size, after the operation that sized them: every glued
1772
+ * connector whose ends left their sites is put back, folded into that operation. Nothing is
1773
+ * written when every end is in place, as on an undo or redo of that operation.
1774
+ */
1775
+ protected _glueStrayConnectors(): void;
1776
+ /**
1777
+ * The cell geometry a note's box is placed with.
1778
+ * @internal
1779
+ */
1780
+ /** The merge a cell is in, from the merges themselves: a sheet still loading has no cells to ask. */
1781
+ protected _mergeAt(cell: IRange.CellCoords): IRange.Coords | null;
1782
+ protected _noteLayout(): NoteLayout;
1783
+ /** The farthest any movable of the index paints past its anchor, for each `drawn` version. */
1784
+ private _movableOverhangs;
1785
+ /**
1786
+ * Called when a movable's content has a newer answer for what it paints: the next search reads
1787
+ * it, and listeners are told once per batch of answers.
1788
+ */
1789
+ private _drawnNotifyQueued;
1790
+ private _onMovableDrawnReady;
1791
+ /**
1792
+ * The farthest any of `models` paints past its anchor, in pixels.
1793
+ * @internal
1794
+ */
1795
+ protected _maxMovableOverhang(models: Map<IMovable, unknown>): number;
1796
+ /**
1797
+ * The movables of one index that match the filter, in z-order.
1798
+ * @internal
1799
+ */
1800
+ protected _searchMovableIndex(spatial: ISpatialMap<MovableEntry>, options?: IMovableCollection.GetItemsOptions): IMovable[];
1801
+ /** @internal */
1802
+ /**
1803
+ * @param description A COMPLETE undo description (callers pass a `messageKey`). It used to be a
1804
+ * verb that this method glued a noun onto (`${action} Picture`); that produced an untranslatable
1805
+ * fragment, and once callers began passing keys it produced literal `op.x Picture` text.
1806
+ */
1807
+ protected _updateSelectedMovables(update: (movable: IMovable) => void, description?: string): void;
1808
+ /** @internal */
1809
+ protected _addMovable(options?: IMovableCollection.AddOptions): Promise<IMovable>;
1810
+ /**
1811
+ * Everything an add waits for, before the insert opens its transaction.
1812
+ *
1813
+ * A kind registered with a loader is loaded first, so the movable is made with its real content,
1814
+ * a group's members included. A load that fails leaves the stand-in, as it does on a read. A
1815
+ * position the caller left open is settled here too ({@link _placeMovable}).
1816
+ * @internal
1817
+ */
1818
+ protected _prepareMovable(options?: IMovableCollection.AddOptions): Promise<InsertableCollection.InsertOptions>;
1819
+ /**
1820
+ * Where a new movable of a known size goes when the caller left its position open: the visible
1821
+ * window's center for `autoPlace: 'viewport'`, else the selection's top-left; then, on the axes the
1822
+ * caller left open, down and right off any movable already in that spot, so repeated inserts
1823
+ * cascade instead of stacking.
1824
+ *
1825
+ * Resolved before the insert transaction opens: the viewport request must reach the live listeners
1826
+ * (not the transactional set) and must not `await` mid-commit (that desyncs the movable from its
1827
+ * resizers). The grid answers `onRequestViewport` with the visible window in absolute px; headless
1828
+ * (no responder) falls back to the selection.
1829
+ */
1830
+ protected _placeMovable(options: IMovableCollection.AddOptions, bounds: Size & Partial<Point>): Promise<Bounds>;
1831
+ /** Refuses an insert this sheet cannot take. */
1832
+ protected _checkInsertMovable(options?: IMovableCollection.AddOptions): asserts options is IMovableCollection.AddOptions;
1833
+ /**
1834
+ * Inserts a movable whose content kind is already loaded, without waiting: what an operation
1835
+ * that cannot wait, such as a delete that dissolves a group, frees onto the sheet.
1836
+ * @internal
1837
+ */
1838
+ protected _insertMovable(options: InsertableCollection.InsertOptions): IMovable;
1839
+ /**
1840
+ * Groups movables of this sheet into one (GROUPS-DESIGN §5 Phase B): the group's frame is the
1841
+ * union of the boxes they occupy as rotated, its child space equals its frame, and each member
1842
+ * keeps its frame, rotation and flips; the originals are deleted. One undo step, the selection
1843
+ * recorded for undo and redo.
1844
+ * @internal
1845
+ */
1846
+ protected _groupMovables(movables: readonly IMovable[], options?: IMovableCollection.GroupOptions): Promise<IMovable>;
1847
+ /**
1848
+ * Everything an added picture waits for, before the insert opens its transaction: the image
1849
+ * decoded for its size, then what {@link _prepareMovable} waits for.
1850
+ * @internal
1851
+ */
1852
+ protected _preparePicture(picture: string | IResourceCollection.AddOptions | IResource, options?: IMovableCollection.AddOptions): Promise<InsertableCollection.InsertOptions>;
1853
+ /** {@inheritDoc IWorksheet.setPicture} */
1854
+ setPicture(picture: string | IResource | IResourceCollection.AddOptions | null, options?: ITransaction.OperationOptions): this;
1855
+ /** {@inheritDoc IWorksheet.getPicture} */
1856
+ getPicture(): IPicture | null;
1857
+ /** {@inheritDoc IWorksheet.getDataTables} */
1858
+ getDataTables(): IDataTableCollection;
1859
+ /**
1860
+ * An edit to cell data, here or on any sheet, can change what every data table in the workbook
1861
+ * would calculate, and nothing recalculates their results. Marks each to be recalculated by Excel
1862
+ * when it opens the file ({@link IDataTable.JSON.calculateAlways}).
1863
+ *
1864
+ * TODO - A stand-in until the engine evaluates `TABLE`. A data table is a calculation: each result
1865
+ * is the table's formula evaluated with that cell's row and column values put in the input cells.
1866
+ * The engine should own it like an array block, its dependencies being the formula's plus the
1867
+ * input cells and the row and column values, and recalculate it when one changes. Its results
1868
+ * are then never stale, `calculateAlways` stays as read, and this method and
1869
+ * `DataTable._markStale` go. Until then it marks every table on any data edit, because which
1870
+ * cells the formula depends on is only known to the engine.
1871
+ * @internal
1872
+ */
1873
+ protected _markDataTablesStale(): void;
1874
+ /** {@inheritDoc IWorksheet.getPivotTables} */
1875
+ getPivotTables(): IPivotTableCollection;
1876
+ /** {@inheritDoc IWorksheet.getTables} */
1877
+ getTables(): ITableCollection;
1878
+ /** {@inheritDoc IWorksheet.getDataValidations} */
1879
+ getDataValidations(): IDataValidationCollection;
1880
+ /** {@inheritDoc IWorksheet.getConditionalFormats} */
1881
+ getConditionalFormats(): IConditionalFormatCollection;
1882
+ /** {@inheritDoc IWorksheet.getProtectedRanges} */
1883
+ getProtectedRanges(): IProtectedRangeCollection;
1884
+ /** {@inheritDoc IWorksheet.getComments} */
1885
+ getComments(): ICommentCollection;
1886
+ /** @deprecated Use {@link IWorksheet.getConditionalFormats} */
1887
+ getConditionals(): IConditionalFormatCollection;
1888
+ /** {@inheritDoc IWorksheet.getMovables} */
1889
+ getMovables(): IMovableCollection;
1890
+ /** {@inheritDoc IWorksheet.getCharts} */
1891
+ getCharts(): IChartCollection;
1892
+ /** @internal */
1893
+ protected _validateOrRemoveOverlaps(rangeCoords: IRange.Coords, type: string, table?: ITable | null, removeIfContains?: boolean, absorbAutoTable?: boolean): void;
1894
+ /**
1895
+ * The filter and sort criteria a sheet AutoFilter hands over to a table built in its place.
1896
+ *
1897
+ * @remarks
1898
+ * Read BEFORE `_validateOrRemoveOverlaps` absorbs the AutoFilter and replayed once the table
1899
+ * exists. Excel moves them across only when the table takes EXACTLY the AutoFilter's range —
1900
+ * probed: one extra row or column, or a shifted start, and the new table starts clean. Answers
1901
+ * `null` when there is nothing to carry, which is the common case.
1902
+ * @internal
1903
+ */
1904
+ protected _getAutoTableCarryOver(rangeCoords: IRange.Coords): {
1905
+ conditions: ICondition.Input[];
1906
+ sorts: ISort.Options[];
1907
+ } | null;
1908
+ /**
1909
+ * Used by the TableCollection wrapper so we resolve ICellRange.Address here
1910
+ * @internal
1911
+ */
1912
+ protected _addTable(address: ICellRange.Address, options: ITableCollection.AddOptions | boolean): ITable;
1913
+ /**
1914
+ * The add shared by the anchored collections — conditional formats, data validations, protected
1915
+ * ranges. Resolves an item-or-address input, keeps the option keys out of the persisted JSON, and
1916
+ * either redefines the item at `index` (when `replaceExisting` and the collection agrees it is the
1917
+ * same item) or inserts there — first by default, as in Excel.
1918
+ * @internal
1919
+ */
1920
+ protected _addAnchored<T extends IAnchored & {
1921
+ getRanges(): ICellRanges;
1922
+ toJSON(): J | null;
1923
+ }, J extends object>(add: ICellRanges.Address | T | null | undefined, options: (IAnchored.AddOptions & J) | undefined, spec: {
1924
+ /** The sheet-state slot the collection lives in. */
1925
+ key: 'conditionalFormats' | 'dataValidations' | 'protectedRanges' | 'comments';
1926
+ /**
1927
+ * The sheet-protection allowances the add needs. Empty when no option allows it, so the add is
1928
+ * refused whenever the sheet is locked.
1929
+ */
1930
+ allowance: IWorksheetProtection.PropertyKeys[];
1931
+ isItem: (add: unknown) => add is T;
1932
+ description: string;
1933
+ /** Loads one ref into the map, handing the created model to `capture`. */
1934
+ load: (map: IAnchoredMap<T, J>, ref: IRange.JSONReference<J>, capture: (model: T) => void) => IAnchoredMap<T, J>;
1935
+ /**
1936
+ * Whether the item at `index` — already known to cover exactly the same ranges — is the one
1937
+ * `json` redefines: the per-collection half of `replaceExisting`. Omit to match on ranges alone.
1938
+ */
1939
+ isSameItem?: (existing: T, json: J) => boolean;
1940
+ /** Redefines `existing` from `json`, inside the add's commit. */
1941
+ replace: (existing: T, json: J, options: ITransaction.OperationOptions) => void;
1942
+ /** A last look at the JSON before it is inserted (a protected range mints its name here). */
1943
+ prepareInsert?: (json: J) => J;
1944
+ notify: () => void;
1945
+ /** Widen the item's columns after an insert — a validation or format may show a dropdown. */
1946
+ autoFit?: boolean;
1947
+ }): T;
1948
+ /**
1949
+ * @internal
1950
+ */
1951
+ protected _addDataValidation(add: ICellRanges.Address | IDataValidation, options?: IDataValidationCollection.AddOptions): IDataValidation;
1952
+ /**
1953
+ * @internal
1954
+ */
1955
+ protected _addConditionalFormat(add: ICellRanges.Address | IConditionalFormat, options?: IConditionalFormatCollection.AddOptions): IConditionalFormat;
1956
+ /**
1957
+ * The first unused `Range<n>` name, matching Excel's default for a new Allow-Edit-Range.
1958
+ * @internal
1959
+ */
1960
+ protected _nextProtectedRangeName(): string;
1961
+ /**
1962
+ * @internal
1963
+ */
1964
+ protected _addProtectedRange(add: ICellRanges.Address | IProtectedRange, options?: IProtectedRangeCollection.AddOptions): IProtectedRange;
1965
+ /**
1966
+ * @internal
1967
+ */
1968
+ protected _addComment(address: ICellRange.Address, content: IComment.Content, options?: ICommentCollection.AddOptions): IComment;
1969
+ /** {@inheritDoc IWorksheet.createCell} */
1970
+ createCell(update: ICell.Update, coords?: IRange.CellCoords | null, options?: ICell.CreateCellOptions): ICell;
1971
+ /** @internal */
1972
+ protected _getBoundsAtCoords(coords: IRange.Coords): Bounds;
1973
+ /** @internal */
1974
+ protected _getCoordsAtBounds(bounds: Bounds): IRange.Coords;
1975
+ /** {@inheritDoc IWorksheet.getRangeAtBounds} */
1976
+ getRangeAtBounds(bounds: Bounds, options?: ICellRange.GetRangeOptions): ICellRange;
1977
+ /** {@inheritDoc IWorksheet.getRangeAtBounds} */
1978
+ getRangeAt(rowStart: number, colStart: number, rowEnd?: number, colEnd?: number, options?: ICellRange.GetRangeOptions): ICellRange;
1979
+ /** @internal */
1980
+ protected _getVisible(coords: readonly IRange.Coords[], options?: ICellRange.GetVisibleOptions): readonly IRange.Coords[];
1981
+ /**
1982
+ * Check if the spatial map has any entries in the given range.
1983
+ * @internal
1984
+ */
1985
+ protected _hasRangedEntries(key: keyof State, range: IRange.Coords): boolean;
1986
+ /**
1987
+ * Search spatial map for entries in the given range.
1988
+ *
1989
+ * @remarks
1990
+ * Tries to cache and can exclude hidden.
1991
+ * @internal
1992
+ */
1993
+ protected _getRangedEntries<T, E = T>(spatial: ISpatialQuery, ranges: readonly IRange.Coords[], options?: GetTypedRangeOptions<T, E>, spatialSort?: boolean): T[];
1994
+ /** @internal */
1995
+ protected _processAnchorShift<T extends Anchored.Entry<any>>(options: ISpatialMap.ShiftDetails<T>): ISpatialMap.Entry<T> | null;
1996
+ /** {@inheritDoc IWorksheet.delete} */
1997
+ delete(): void;
1998
+ /** {@inheritDoc IWorksheet.doBatch} */
1999
+ doBatch<R>(callback: (commit: ITransaction.ICommit, sheet: this) => Promise<R> | R, options?: string | ITransaction.OperationOptions): Promise<R> | R;
2000
+ /** {@inheritDoc IWorksheet.isDeleted} */
2001
+ isDeleted(): boolean;
2002
+ /** {@inheritDoc IWorksheet.isClosed} */
2003
+ isClosed(): boolean;
2004
+ /** {@inheritDoc IWorksheet.close} */
2005
+ close(): void;
2006
+ /** {@inheritDoc ITransaction.ITransactional.beginCommit} */
2007
+ beginCommit(options?: string | ITransaction.OperationOptions): ITransaction;
2008
+ /** @internal */
2009
+ protected _getState(): Readonly<State>;
2010
+ /**
2011
+ * The store-issued key for this sheet's state record.
2012
+ * @internal
2013
+ */
2014
+ _getStateId(): string;
2015
+ /** @internal */
2016
+ protected _beginCommit(options?: ITransaction.StoreOperationOptions | string): ITransaction;
2017
+ /** @internal */
2018
+ protected _updateState(updateState?: Partial<State>, options?: ITransaction.OperationOptions | string): State;
2019
+ /** @internal */
2020
+ protected _getScalar(rowIndex: number, columnIndex: number, asJSDate?: boolean): Scalar | InteropScalar;
2021
+ /**
2022
+ * This is mostly optimized except for scrolling. On scroll y it must requery. We could debounce this.
2023
+ * @internal
2024
+ */
2025
+ protected _markColumnHeaderTableNames(): void;
2026
+ /**
2027
+ * Fast single-cell access: resolves the value + intersection directly and builds the cell,
2028
+ * skipping the iterator machinery the range readers use. Produces a cell equivalent to the
2029
+ * iterator path (AllRangeTypes intersection, no merge-overflow rewrite). Used for random access
2030
+ * (`ICellRange.getCell()`/`getFormula()`).
2031
+ * @internal
2032
+ */
2033
+ protected _getCellAt(rowIndex: number, colIndex: number): ICell;
2034
+ /**
2035
+ * The cell as `state` has it, or - for `held` - as the held write to it leaves it.
2036
+ *
2037
+ * @returns `null` if the write has to be made to know: the cell has a formula or a calculation
2038
+ * status the write changes, or a style update that reaches past the cell (see
2039
+ * `intersectionAfterStyleUpdate`).
2040
+ * @internal
2041
+ */
2042
+ protected _getCellAtState(state: Readonly<State>, transaction: ITransaction | null, rowIndex: number, colIndex: number, held: CellBuffer.HeldCell | null): ICell | null;
2043
+ protected _queryStyle(anchorCoords: IRange.Coords, cellOptions: SheetCellOptions, extent?: IRange.Coords): ICellStyle;
2044
+ /**
2045
+ * @param updateStyles Replaces the write half of the returned style. A style READS from the
2046
+ * anchor cell and WRITES to every range, so a set spanning sheets needs the read to stay here
2047
+ * (this sheet owns `ranges[0]`) while the write fans out across the others — which only the
2048
+ * caller holding the whole set can do. See `SheetRanges.getStyle`.
2049
+ * @internal
2050
+ */
2051
+ protected _getStyle(ranges: IRange.Coords[], anchor?: IRangeSelection.Coords, updateStyles?: (update: ICellStyle.Update, options?: ICellStyle.UpdateOptions) => void): ICellStyle;
2052
+ /** @internal */
2053
+ protected _initHeadersState(jsonColumns?: ISheetHeader.JSON, jsonRows?: ISheetHeader.JSON): void;
2054
+ /**
2055
+ * Tells the grid which rows or columns are hidden now, from inside the operation that changed
2056
+ * them: the formulas that skip hidden cells recalculate under that operation.
2057
+ *
2058
+ * @remarks
2059
+ * A restore is heard here too, with no operation open, and is not told: the grid's record of
2060
+ * the set is restored with the sheet's, and the engine's with its own history
2061
+ * (DESIGN-CALC-SERVICE §7.5). Telling it as well would land the restored set under the snapshot
2062
+ * being left.
2063
+ */
2064
+ protected _tellHidden(axis: IRange.Axis): void;
2065
+ /**
2066
+ * Drop every read-through cache that a data change can invalidate.
2067
+ *
2068
+ * @remarks
2069
+ * Normally driven by the transaction state listener, but `_realizeCalcedValues` must call it
2070
+ * directly — see the note there on why calc results never reach that listener.
2071
+ * @internal
2072
+ */
2073
+ protected _invalidateCaches(): void;
2074
+ /**
2075
+ * Initialize static listeners
2076
+ * @internal
2077
+ */
2078
+ protected _initListenerState(): void;
2079
+ /**
2080
+ * Re-derive everything that is a function of how a cell *paints* rather than of what it holds:
2081
+ * the default font metrics, the layout, and the header sizes fitted to that paint.
2082
+ *
2083
+ * @remarks
2084
+ * The theme is the familiar case. A language or locale switch is the same shape — the cell
2085
+ * paints a different word (`WAHR`, `#WERT!`, `15.03.2023`) for a value that never changed — so
2086
+ * the columns fitted to the old word are stale, and nothing below the sheet is told otherwise.
2087
+ * The fit only grows: a maintenance pass must never take back a width the sheet already had.
2088
+ *
2089
+ * @internal
2090
+ */
2091
+ /**
2092
+ * Everything measured is stale: drop the caches, tell the views, and re-fit what grows with its
2093
+ * content (expand only, never a custom size). A language switch re-fits both axes; a font
2094
+ * arriving re-fits rows only, as the load autofit does, since Excel never widens a column for
2095
+ * a font.
2096
+ */
2097
+ protected _invalidateRendering(axes?: IRange.AxisSelection | null): void;
2098
+ /** @internal */
2099
+ protected _initViewState(entireCoords: IRange.Coords, json: IWorksheetView.JSON): void;
2100
+ protected _initCellState(): void;
2101
+ /** @internal */
2102
+ protected _createTables(tables: IAnchoredMap<ITable, ITable.JSON>, key: keyof State, refs: IRange.JSONReference<ITable.JSON>[], createModel: (options: AnchoredTable.ConstructorOptions) => ITable): IAnchoredMap<ITable, ITable.JSON>;
2103
+ /** @internal */
2104
+ protected _createDataValidations(dataValidations: IAnchoredMap<IDataValidation, IDataValidation.JSON>, key: keyof State, refs: IRange.JSONReference<IDataValidation.JSON>[], createModel: (options: DataValidation.ConstructorOptions) => IDataValidation, addListeners?: (model: IDataValidation) => IListener.Remove): IAnchoredMap<IDataValidation, IDataValidation.JSON>;
2105
+ /** @internal */
2106
+ protected _createConditionalFormats(conditionalFormats: IAnchoredMap<IConditionalFormat, IConditionalFormat.JSON>, key: keyof State, refs: IRange.JSONReference<IConditionalFormat.JSON>[], createModel: (options: ConditionalFormat.ConstructorOptions) => IConditionalFormat, addListeners?: (model: IConditionalFormat) => IListener.Remove): IAnchoredMap<IConditionalFormat, IConditionalFormat.JSON>;
2107
+ /** @internal */
2108
+ protected _createProtectedRanges(protectedRanges: IAnchoredMap<IProtectedRange, IProtectedRange.JSON>, key: keyof State, refs: IRange.JSONReference<IProtectedRange.JSON>[], createModel: (options: ProtectedRange.ConstructorOptions) => IProtectedRange, addListeners?: (model: IProtectedRange) => IListener.Remove): IAnchoredMap<IProtectedRange, IProtectedRange.JSON>;
2109
+ /**
2110
+ * Loads the pivot tables into their anchored map, each anchored where its part says it sits.
2111
+ * The map moves and deletes them with structural edits; the table itself rules on the edit
2112
+ * (`PivotTable._processContainerShift`).
2113
+ * @internal
2114
+ */
2115
+ protected _createPivotTables(pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>, key: keyof State, refs: IRange.JSONReference<IPivotTable.JSON>[], fromResourceId?: (resourceId: number) => IResource): IAnchoredMap<IPivotTable, IPivotTable.JSON>;
2116
+ /**
2117
+ * Loads the data tables into their anchored map, each anchored on its result cells, its input
2118
+ * cells held in the engine. The table rules on structural edits itself
2119
+ * (`DataTable._processContainerShift`).
2120
+ * @internal
2121
+ */
2122
+ protected _createDataTables(dataTables: IAnchoredMap<IDataTable, IDataTable.JSON>, key: keyof State, refs: IRange.JSONReference<IDataTable.JSON>[]): IAnchoredMap<IDataTable, IDataTable.JSON>;
2123
+ /** @internal */
2124
+ protected _createComments(comments: IAnchoredMap<IComment, IComment.JSON>, key: keyof State, refs: IRange.JSONReference<IComment.JSON>[], createModel: (options: Comment.ConstructorOptions) => IComment, addListeners?: (model: IComment) => IListener.Remove): IAnchoredMap<IComment, IComment.JSON>;
2125
+ /**
2126
+ * The JSON for a comment authored now: modifiers with an id, an author and a date minted.
2127
+ * @internal
2128
+ */
2129
+ protected _newCommentJSON(modifiers: IComment.Modifiers): IComment.JSON;
2130
+ /** @internal */
2131
+ protected _createMovableEntry(json: IMovable.JSON, zIndex: number, fromResourceId?: (resourceId: number) => IResource, index?: MovableIndex, contentGiven?: Movable.Content): ISpatialMap.Entry<MovableEntry>;
2132
+ /** @internal */
2133
+ protected _fromJSON(json: IWorksheet.JSON | undefined, disableLoadAutoFit?: boolean): void;
2134
+ /** {@inheritDoc ITransaction.ITransactional.getId} */
2135
+ getId(): string;
2136
+ /** {@inheritDoc ITransaction.ITransactional.getVersionId} */
2137
+ getVersionId(): number;
2138
+ /** {@inheritDoc IWorksheet.getName} */
2139
+ getName(): string;
2140
+ /** {@inheritDoc IWorksheet.setName} */
2141
+ setName(name: string, options?: ITransaction.OperationOptions): this;
2142
+ /** {@inheritDoc IWorksheet.getVisibility} */
2143
+ getVisibility(): ISheet.Visibility;
2144
+ /** {@inheritDoc IWorksheet.setVisibility} */
2145
+ setVisibility(visibility?: ISheet.Visibility | boolean, options?: ITransaction.OperationOptions): this;
2146
+ /** {@inheritDoc IWorksheet.select} */
2147
+ select(options: ITypes.SelectOptions): Promise<this>;
2148
+ /** {@inheritDoc IWorksheet.duplicate} */
2149
+ duplicate(): Promise<this>;
2150
+ /** {@inheritDoc IWorksheet.getIndex} */
2151
+ getIndex(): number;
2152
+ /** {@inheritDoc IWorksheet.setIndex} */
2153
+ setIndex(index: number, options?: ITransaction.OperationOptions): this;
2154
+ /** {@inheritDoc IWorksheet.getNames} */
2155
+ getNames(): INamedCollection;
2156
+ /** {@inheritDoc IWorksheet.getCalculation} */
2157
+ /** {@inheritDoc IWorksheet.getCalculation} */
2158
+ getCalculation(): ICalculation;
2159
+ /** {@inheritDoc IWorksheet.createFormula} */
2160
+ createFormula(expression: string, coords?: Partial<IRange.CellCoords>, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
2161
+ /** {@inheritDoc IWorksheet.evaluate} */
2162
+ evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
2163
+ /** {@inheritDoc IWorksheet.whenCalculationReady} */
2164
+ whenCalculationReady(): Promise<ICalculation.Status>;
2165
+ /** {@inheritDoc IWorksheet.getWorkbook} */
2166
+ getWorkbook(): IWorkbook | null;
2167
+ get [Symbol.toStringTag](): string;
2168
+ toString(): string;
2169
+ /** {@inheritDoc IWorksheet.getKind} */
2170
+ getKind(): typeof ISheet.Kind.Worksheet;
2171
+ /** {@inheritDoc ISheet.isISheet} */
2172
+ get isISheet(): true;
2173
+ /** {@inheritDoc IWorksheet.isIWorksheet} */
2174
+ get isIWorksheet(): true;
2175
+ }
2176
+ /**
2177
+ * Builds an {@link ICellRange.Counts} from a plain feature record.
2178
+ *
2179
+ * @remarks
2180
+ * For callers that have to total a set spanning more than one sheet (`SheetRanges.getCounts`):
2181
+ * each sheet counts its own coords and the records are summed, which needs the brand applied
2182
+ * somewhere that is not a sheet.
2183
+ * @internal
2184
+ */
2185
+ export declare function createCellRangeCounts(counts: Readonly<Record<ICellRange.Feature, number>>): ICellRange.Counts;
2186
+ /**
2187
+ * Used for signalling tupleUpdate was called via private apis.
2188
+ * This allows use to 'avoid side effects' and skip validation checks.
2189
+ * @internal
2190
+ */
2191
+ interface NotifierOptions {
2192
+ /**
2193
+ * Which error an invalid source reports - `#REF!` when the cells were deleted, `#N/A` when the
2194
+ * world predates the listener.
2195
+ *
2196
+ * @defaultValue `#REF!`
2197
+ */
2198
+ invalidError?: string;
2199
+ isDataChange?: boolean;
2200
+ getTransactionId: () => string;
2201
+ isUndo?: boolean;
2202
+ isRestoreOrRevert?: boolean;
2203
+ trigger?: string;
2204
+ /** Spell the source with its sheet qualifier (a workbook range), as the listener registered it. */
2205
+ qualified?: boolean;
2206
+ from?: ICellRanges;
2207
+ timeStamp?: number;
2208
+ }
2209
+ interface TableColumnHeaders {
2210
+ table: ITable | null;
2211
+ tableMin: number;
2212
+ tableMax: number;
2213
+ showInHeader: boolean;
2214
+ lastTop: number;
2215
+ lastRowIndex: number;
2216
+ lastColIndex: number;
2217
+ }
2218
+ /**
2219
+ * A live range listener: its node in the versioned map, and the callback the map must never hold.
2220
+ * @internal
2221
+ */
2222
+ interface ListenerNodeEntry {
2223
+ node: ListenerAnchor;
2224
+ handler: ICellRange.Listener | null;
2225
+ handlerW: WeakRef<ICellRange.Listener> | null;
2226
+ options: ICellRange.ListenerOptions;
2227
+ /** The coords last delivered, so a restore can tell whether the reference moved. */
2228
+ lastCoords: IRange.Coords[] | null;
2229
+ /**
2230
+ * Whether the ranges were registered with a sheet qualifier. A qualified address names its
2231
+ * sheet, so a rename of the sheet changes it: the node is told, and its source is spelled
2232
+ * qualified. A bare address is the anchor's and a rename is nothing to it.
2233
+ */
2234
+ qualified: boolean;
2235
+ /** Present when the node is a {@link WatchAnchor}: what the watch is told. */
2236
+ watch?: WatchAnchor.Handlers;
2237
+ /** The batch a participant was added through: it is told as each step of that batch is made. */
2238
+ batch?: BatchHandle | null;
2239
+ }
2240
+ /**
2241
+ * A run of formula cells with the references they inherit a number format from, relative to the
2242
+ * run's top-left ({@link ICalcGrid.Results.formatInserts}) - what `Sheet._resolveInheritedFormats`
2243
+ * resolves.
2244
+ */
2245
+ interface EnteredBlock {
2246
+ coords: IRange.Coords;
2247
+ references: readonly IRange.FixableCoords[];
2248
+ }
2249
+ export {};
2250
+ //# sourceMappingURL=Worksheet.d.ts.map