@sheetxl/sdk 0.7.26 → 0.7.28-beta.1

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 (600) hide show
  1. package/THIRD-PARTY-NOTICES.md +34 -0
  2. package/browser/cjs/B7_pDFYCVzt-3hUs.cjs +1 -0
  3. package/browser/cjs/D590vnHyyrIYenQ7.cjs +33 -0
  4. package/browser/cjs/DfVZ_U2YapkL3Y3y.cjs +1 -0
  5. package/browser/cjs/DsII2GRIYGbaZjIE.cjs +1 -0
  6. package/browser/cjs/Dv3x6zut1ZRUt3IF.cjs +10 -0
  7. package/browser/cjs/index.cjs +3 -6
  8. package/browser/cjs/nE4y6hua6AwWSil7.cjs +1 -0
  9. package/browser/cjs/nMss3hrHzgX9s6dC.cjs +57 -0
  10. package/browser/esm/AyOmyt_vaPirbWnn.mjs +49986 -0
  11. package/browser/esm/BJ5lU2Y0r4Vy8n4q.mjs +109 -0
  12. package/browser/esm/BvaEmG7AaTSm7dFt.mjs +818 -0
  13. package/browser/esm/CWKJatjtHKfWtM2b.mjs +503 -0
  14. package/browser/esm/CkhE5KvHQvKzw4Ll.mjs +4436 -0
  15. package/browser/esm/Dpwf1IgHZjpEpK-K.mjs +24 -0
  16. package/browser/esm/index.mjs +3225 -62
  17. package/browser/esm/uFvYxePB3xD2HrP0.mjs +14 -0
  18. package/licenses/dependencies.txt +74 -193
  19. package/node/esm/CYXOvL3qwWeDE0xf.mjs +114 -0
  20. package/node/esm/Dgmq_XXiU2AQw1tX.mjs +22 -0
  21. package/node/esm/index.mjs +53619 -23254
  22. package/node/esm/qxrG4h6T0dAo8eZ6.mjs +837 -0
  23. package/package.json +19 -14
  24. package/resources/contents.json +21 -0
  25. package/resources/locales/contents.json +19 -0
  26. package/resources/locales/de/grammar.json +16 -0
  27. package/resources/locales/de/model.msg.json +510 -0
  28. package/resources/locales/en/model.msg.json +525 -0
  29. package/types/index.d.ts +2 -21294
  30. package/types/scripting-enums.json +1009 -0
  31. package/types/scripting.d.ts +26540 -31455
  32. package/types/src/address/AddressUtils.d.ts +252 -0
  33. package/types/src/address/_AddressMessages.d.ts +7 -0
  34. package/types/src/address/index.d.ts +35 -0
  35. package/types/src/anchored/AbstractAnchored.d.ts +200 -0
  36. package/types/src/anchored/Anchored.d.ts +154 -0
  37. package/types/src/anchored/AnchoredMap.d.ts +178 -0
  38. package/types/src/anchored/IAnchored.d.ts +118 -0
  39. package/types/src/anchored/IAnchoredMap.d.ts +207 -0
  40. package/types/src/anchored/_AnchorMessages.d.ts +3 -0
  41. package/types/src/anchored/index.d.ts +2 -0
  42. package/types/src/autoFill/AutoFill.d.ts +161 -0
  43. package/types/src/autoFill/IAutoFill.d.ts +117 -0
  44. package/types/src/autoFill/index.d.ts +3 -0
  45. package/types/src/border/IBorder.d.ts +284 -0
  46. package/types/src/border/index.d.ts +2 -0
  47. package/types/src/calculation/Calculation.d.ts +440 -0
  48. package/types/src/calculation/FormulaLiterals.d.ts +18 -0
  49. package/types/src/calculation/ICalculation.d.ts +1016 -0
  50. package/types/src/calculation/INamedFormulasCollection.d.ts +141 -0
  51. package/types/src/calculation/NamedFormulaCollection.d.ts +671 -0
  52. package/types/src/calculation/TokenType.d.ts +117 -0
  53. package/types/src/calculation/Types.d.ts +110 -0
  54. package/types/src/calculation/_CalculationMessages.d.ts +3 -0
  55. package/types/src/calculation/builtInNames.d.ts +2 -0
  56. package/types/src/calculation/compiler/ASTTypes.d.ts +180 -0
  57. package/types/src/calculation/compiler/CompilerLocale.d.ts +69 -0
  58. package/types/src/calculation/compiler/CompilerUtils.d.ts +331 -0
  59. package/types/src/calculation/compiler/FormulaCompiler.d.ts +69 -0
  60. package/types/src/calculation/compiler/FormulaLexer.d.ts +85 -0
  61. package/types/src/calculation/compiler/FormulaParser.d.ts +270 -0
  62. package/types/src/calculation/compiler/FormulaSeparators.d.ts +35 -0
  63. package/types/src/calculation/compiler/LiteTransform.d.ts +15 -0
  64. package/types/src/calculation/compiler/ParserUtils.d.ts +167 -0
  65. package/types/src/calculation/compiler/SRLexer.d.ts +19 -0
  66. package/types/src/calculation/compiler/SRParser.d.ts +38 -0
  67. package/types/src/calculation/compiler/Types.d.ts +274 -0
  68. package/types/src/calculation/compiler/index.d.ts +3 -0
  69. package/types/src/calculation/executor/CalcExecutor.d.ts +115 -0
  70. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +11 -0
  71. package/types/src/calculation/executor/index.d.ts +3 -0
  72. package/types/src/calculation/formula/Formula.d.ts +168 -0
  73. package/types/src/calculation/formula/FormulaBlock.d.ts +207 -0
  74. package/types/src/calculation/formula/IFormulaBlock.d.ts +181 -0
  75. package/types/src/calculation/formula/LambdaValue.d.ts +166 -0
  76. package/types/src/calculation/formula/TokenUtils.d.ts +26 -0
  77. package/types/src/calculation/formula/index.d.ts +4 -0
  78. package/types/src/calculation/functions/Operators.d.ts +30 -0
  79. package/types/src/calculation/functions/index.d.ts +2 -0
  80. package/types/src/calculation/functions/initializeFunctions.d.ts +22 -0
  81. package/types/src/calculation/grid/CalcGrid.d.ts +205 -0
  82. package/types/src/calculation/grid/CalcGridUtils.d.ts +172 -0
  83. package/types/src/calculation/grid/ICalcGrid.d.ts +500 -0
  84. package/types/src/calculation/grid/index.d.ts +3 -0
  85. package/types/src/calculation/index.d.ts +5 -0
  86. package/types/src/calculation/spatial/ContentfulSpatialValue.d.ts +25 -0
  87. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +120 -0
  88. package/types/src/calculation/spatial/PrecedentSpatialValue.d.ts +115 -0
  89. package/types/src/calculation/spatial/SpillEntry.d.ts +40 -0
  90. package/types/src/calculation/spatial/index.d.ts +5 -0
  91. package/types/src/calculation/state/CalcNode.d.ts +71 -0
  92. package/types/src/calculation/state/CalcScope.d.ts +35 -0
  93. package/types/src/calculation/state/CalcState.d.ts +28 -0
  94. package/types/src/calculation/state/CalculationContext.d.ts +125 -0
  95. package/types/src/calculation/state/IContextContainer.d.ts +320 -0
  96. package/types/src/calculation/state/index.d.ts +6 -0
  97. package/types/src/calculation/symbol/FunctionSymbolProvider.d.ts +44 -0
  98. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +93 -0
  99. package/types/src/calculation/symbol/IndirectSymbolProvider.d.ts +144 -0
  100. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +18 -0
  101. package/types/src/calculation/symbol/SymbolRegistry.d.ts +19 -0
  102. package/types/src/calculation/symbol/TableColumnSymbolProvider.d.ts +21 -0
  103. package/types/src/calculation/symbol/TableSymbolProvider.d.ts +19 -0
  104. package/types/src/calculation/symbol/index.d.ts +9 -0
  105. package/types/src/cell/ICell.d.ts +672 -0
  106. package/types/src/cell/ICellHeader.d.ts +142 -0
  107. package/types/src/cell/ICellProtection.d.ts +41 -0
  108. package/types/src/cell/index.d.ts +4 -0
  109. package/types/src/cellRange/ICellHeaderRange.d.ts +306 -0
  110. package/types/src/cellRange/ICellHeaderRanges.d.ts +107 -0
  111. package/types/src/cellRange/ICellRange.d.ts +2509 -0
  112. package/types/src/cellRange/ICellRanges.d.ts +407 -0
  113. package/types/src/cellRange/ICellRegion.d.ts +133 -0
  114. package/types/src/cellRange/_GraphNode.d.ts +38 -0
  115. package/types/src/cellRange/index.d.ts +6 -0
  116. package/types/src/chart/Chart.d.ts +53 -0
  117. package/types/src/chart/IChart.d.ts +42 -0
  118. package/types/src/chart/index.d.ts +5 -0
  119. package/types/src/collections/ArraysGrid.d.ts +72 -0
  120. package/types/src/collections/BooleanList.d.ts +67 -0
  121. package/types/src/collections/GridMap.d.ts +47 -0
  122. package/types/src/collections/HashMap.d.ts +15 -0
  123. package/types/src/collections/IGrid.d.ts +278 -0
  124. package/types/src/collections/IList.d.ts +89 -0
  125. package/types/src/collections/IMap.d.ts +45 -0
  126. package/types/src/collections/IReadableList.d.ts +120 -0
  127. package/types/src/collections/ISortedMap.d.ts +171 -0
  128. package/types/src/collections/ISparseGrid.d.ts +61 -0
  129. package/types/src/collections/ISparseList.d.ts +103 -0
  130. package/types/src/collections/ISpatialMap.d.ts +515 -0
  131. package/types/src/collections/ISpatialMap3D.d.ts +116 -0
  132. package/types/src/collections/IWritableList.d.ts +41 -0
  133. package/types/src/collections/ImmutableList.d.ts +52 -0
  134. package/types/src/collections/IteratorUtils.d.ts +91 -0
  135. package/types/src/collections/MixedTypedArrayList.d.ts +140 -0
  136. package/types/src/collections/OverlappingRangeIterator.d.ts +91 -0
  137. package/types/src/collections/RTree.d.ts +111 -0
  138. package/types/src/collections/RepeatingList.d.ts +20 -0
  139. package/types/src/collections/SortedMap.d.ts +396 -0
  140. package/types/src/collections/SparseGrid.d.ts +99 -0
  141. package/types/src/collections/SparseList.d.ts +90 -0
  142. package/types/src/collections/SpatialMap.d.ts +102 -0
  143. package/types/src/collections/SpatialMap3D.d.ts +64 -0
  144. package/types/src/collections/Tuple.d.ts +160 -0
  145. package/types/src/collections/_CollectionUtils.d.ts +25 -0
  146. package/types/src/collections/_GridUtils.d.ts +268 -0
  147. package/types/src/collections/_RunUtils.d.ts +170 -0
  148. package/types/src/collections/_SpatialUtils.d.ts +115 -0
  149. package/types/src/collections/index.d.ts +21 -0
  150. package/types/src/color/Color.d.ts +120 -0
  151. package/types/src/color/ColorSpace.d.ts +45 -0
  152. package/types/src/color/IColor.d.ts +1110 -0
  153. package/types/src/color/_BuiltInIndexDefs.d.ts +4 -0
  154. package/types/src/color/_BuiltInNamedDefs.d.ts +29 -0
  155. package/types/src/color/_BuiltInSchemeDefs.d.ts +7 -0
  156. package/types/src/color/_ColorUtils.d.ts +93 -0
  157. package/types/src/color/index.d.ts +3 -0
  158. package/types/src/comment/IComment.d.ts +108 -0
  159. package/types/src/comment/index.d.ts +2 -0
  160. package/types/src/condition/AnchoredConditional.d.ts +263 -0
  161. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +83 -0
  162. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +8 -0
  163. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +8 -0
  164. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +12 -0
  165. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +12 -0
  166. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +8 -0
  167. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +8 -0
  168. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +12 -0
  169. package/types/src/condition/BuiltInOperators/BlankOperator.d.ts +9 -0
  170. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +8 -0
  171. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +8 -0
  172. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +8 -0
  173. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +11 -0
  174. package/types/src/condition/BuiltInOperators/ErrorOperator.d.ts +9 -0
  175. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +17 -0
  176. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +8 -0
  177. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +8 -0
  178. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +8 -0
  179. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +14 -0
  180. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +8 -0
  181. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +8 -0
  182. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +12 -0
  183. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +12 -0
  184. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +8 -0
  185. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +13 -0
  186. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +12 -0
  187. package/types/src/condition/BuiltInOperators/UniqueOperator.d.ts +8 -0
  188. package/types/src/condition/BuiltInOperators/ValidEmailOperator.d.ts +8 -0
  189. package/types/src/condition/BuiltInOperators/ValidUrlOperator.d.ts +8 -0
  190. package/types/src/condition/BuiltInOperators/index.d.ts +59 -0
  191. package/types/src/condition/BuiltinSelectors/BaseSelector.d.ts +43 -0
  192. package/types/src/condition/BuiltinSelectors/DateSelector.d.ts +14 -0
  193. package/types/src/condition/BuiltinSelectors/ListSelector.d.ts +12 -0
  194. package/types/src/condition/BuiltinSelectors/TextLengthSelector.d.ts +16 -0
  195. package/types/src/condition/BuiltinSelectors/TimeSelector.d.ts +14 -0
  196. package/types/src/condition/BuiltinSelectors/WholeSelector.d.ts +14 -0
  197. package/types/src/condition/BuiltinSelectors/index.d.ts +18 -0
  198. package/types/src/condition/Condition.d.ts +123 -0
  199. package/types/src/condition/ICondition.d.ts +915 -0
  200. package/types/src/condition/_ConditionUtils.d.ts +190 -0
  201. package/types/src/condition/index.d.ts +3 -0
  202. package/types/src/conditionalFormat/ConditionalEntry.d.ts +20 -0
  203. package/types/src/conditionalFormat/ConditionalFormat.d.ts +190 -0
  204. package/types/src/conditionalFormat/ConditionalFormatCollection.d.ts +20 -0
  205. package/types/src/conditionalFormat/IConditionalFormat.d.ts +518 -0
  206. package/types/src/conditionalFormat/IConditionalFormatCollection.d.ts +70 -0
  207. package/types/src/conditionalFormat/_ConditionalMessages.d.ts +2 -0
  208. package/types/src/conditionalFormat/index.d.ts +3 -0
  209. package/types/src/dataValidation/DataValidation.d.ts +121 -0
  210. package/types/src/dataValidation/DataValidationCollection.d.ts +20 -0
  211. package/types/src/dataValidation/IDataValidation.d.ts +327 -0
  212. package/types/src/dataValidation/IDataValidationCollection.d.ts +63 -0
  213. package/types/src/dataValidation/_DataValidationMessages.d.ts +2 -0
  214. package/types/src/dataValidation/_Utils.d.ts +10 -0
  215. package/types/src/dataValidation/index.d.ts +3 -0
  216. package/types/src/date/DateUtils.d.ts +8 -0
  217. package/types/src/date/_DateUtils.d.ts +122 -0
  218. package/types/src/date/index.d.ts +2 -0
  219. package/types/src/externalBook/ExternalBookCollection.d.ts +36 -0
  220. package/types/src/externalBook/IExternalBook.d.ts +97 -0
  221. package/types/src/externalBook/IExternalBookCollection.d.ts +29 -0
  222. package/types/src/externalBook/index.d.ts +3 -0
  223. package/types/src/fill/IEffect.d.ts +389 -0
  224. package/types/src/fill/IFill.d.ts +597 -0
  225. package/types/src/fill/IStroke.d.ts +265 -0
  226. package/types/src/fill/_BuiltInPatterns.d.ts +27 -0
  227. package/types/src/fill/index.d.ts +4 -0
  228. package/types/src/filter/IFilter.d.ts +83 -0
  229. package/types/src/filter/index.d.ts +2 -0
  230. package/types/src/font/CanvasFontMeasurer.d.ts +25 -0
  231. package/types/src/font/ExtendedTextMetrics.d.ts +1 -0
  232. package/types/src/font/Font.d.ts +19 -0
  233. package/types/src/font/FontKitFontMeasurer.d.ts +11 -0
  234. package/types/src/font/FontUtils.d.ts +9 -0
  235. package/types/src/font/IFont.d.ts +261 -0
  236. package/types/src/font/IFontCollection.d.ts +31 -0
  237. package/types/src/font/SimpleFontMeasurer.d.ts +4 -0
  238. package/types/src/font/_FontUtils.d.ts +22 -0
  239. package/types/src/font/index.d.ts +5 -0
  240. package/types/src/history/IHistory.d.ts +110 -0
  241. package/types/src/history/index.d.ts +2 -0
  242. package/types/src/hyperlink/IHyperlink.d.ts +96 -0
  243. package/types/src/hyperlink/_Hyperlink.d.ts +21 -0
  244. package/types/src/hyperlink/index.d.ts +2 -0
  245. package/types/src/i18n/LanguagePack.d.ts +97 -0
  246. package/types/src/i18n/LocaleProfile.d.ts +15 -0
  247. package/types/src/i18n/_CurrencyData.d.ts +20 -0
  248. package/types/src/i18n/functionLocales.d.ts +6 -0
  249. package/types/src/i18n/index.d.ts +4 -0
  250. package/types/src/i18n/locales.d.ts +3 -0
  251. package/types/src/index.d.ts +71 -0
  252. package/types/src/io/AbstractBackingStore.d.ts +53 -0
  253. package/types/src/io/ArrayBackingStore.d.ts +34 -0
  254. package/types/src/io/IWorkbookIO.d.ts +1322 -0
  255. package/types/src/io/WorkbookIO.d.ts +91 -0
  256. package/types/src/io/WorkbookOrigin.d.ts +114 -0
  257. package/types/src/io/WorkbookRegistry.d.ts +49 -0
  258. package/types/src/io/index.d.ts +5 -0
  259. package/types/src/lib/file/file.browser.d.ts +41 -0
  260. package/types/src/lib/file/file.node.d.ts +25 -0
  261. package/types/src/lib/utils/_Utils.d.ts +20 -0
  262. package/types/src/lib/utils/banner.d.ts +6 -0
  263. package/types/src/lib/utils/utils.browser.d.ts +28 -0
  264. package/types/src/lib/utils/utils.node.d.ts +42 -0
  265. package/types/src/license/LicenseDetails.d.ts +22 -0
  266. package/types/src/license/LicenseManager.d.ts +63 -0
  267. package/types/src/license/index.d.ts +3 -0
  268. package/types/src/license/license-key.d.ts +33 -0
  269. package/types/src/listener/IListener.d.ts +62 -0
  270. package/types/src/listener/ListenerEmitter.d.ts +47 -0
  271. package/types/src/listener/index.d.ts +2 -0
  272. package/types/src/model/AbstractModel.d.ts +90 -0
  273. package/types/src/model/IModel.d.ts +108 -0
  274. package/types/src/model/_ModelMessages.d.ts +2 -0
  275. package/types/src/model/index.d.ts +3 -0
  276. package/types/src/movable/CustomElement.d.ts +42 -0
  277. package/types/src/movable/ICustomElement.d.ts +29 -0
  278. package/types/src/movable/IGroup.d.ts +30 -0
  279. package/types/src/movable/IMovable.d.ts +327 -0
  280. package/types/src/movable/IMovableCollection.d.ts +129 -0
  281. package/types/src/movable/IMovableSelection.d.ts +49 -0
  282. package/types/src/movable/Movable.d.ts +221 -0
  283. package/types/src/movable/MovableCollection.d.ts +29 -0
  284. package/types/src/movable/_MovableUtils.d.ts +4 -0
  285. package/types/src/movable/index.d.ts +4 -0
  286. package/types/src/named/AbstractNamed.d.ts +41 -0
  287. package/types/src/named/INamed.d.ts +225 -0
  288. package/types/src/named/INamedCollection.d.ts +230 -0
  289. package/types/src/named/NamedCollection.d.ts +302 -0
  290. package/types/src/named/_BuiltInNamed.d.ts +6 -0
  291. package/types/src/named/index.d.ts +3 -0
  292. package/types/src/numFmt/BuiltInFormats.d.ts +49 -0
  293. package/types/src/numFmt/IFormatEngine.d.ts +149 -0
  294. package/types/src/numFmt/NumberFormatBuilder.d.ts +46 -0
  295. package/types/src/numFmt/NumberFormatParser.d.ts +168 -0
  296. package/types/src/numFmt/NumberFormatStyles.d.ts +43 -0
  297. package/types/src/numFmt/NumberFormatType.d.ts +79 -0
  298. package/types/src/numFmt/NumfmtFormatEngine.d.ts +33 -0
  299. package/types/src/numFmt/_BuiltInNumberFormats.d.ts +12 -0
  300. package/types/src/numFmt/_FormatCell.d.ts +52 -0
  301. package/types/src/numFmt/_NumFmtUtils.d.ts +102 -0
  302. package/types/src/numFmt/index.d.ts +105 -0
  303. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +15 -0
  304. package/types/src/numFmt/vendor/numfmt/index.d.ts +721 -0
  305. package/types/src/picture/IPicture.d.ts +69 -0
  306. package/types/src/picture/Picture.d.ts +67 -0
  307. package/types/src/picture/index.d.ts +2 -0
  308. package/types/src/primitives/CompositeRangeStats.d.ts +63 -0
  309. package/types/src/primitives/Criteria.d.ts +35 -0
  310. package/types/src/primitives/FormulaContext.d.ts +2 -0
  311. package/types/src/primitives/PrimitiveUtils.d.ts +255 -0
  312. package/types/src/primitives/Range.d.ts +221 -0
  313. package/types/src/primitives/RangeStats.d.ts +48 -0
  314. package/types/src/primitives/ReferenceRange.d.ts +19 -0
  315. package/types/src/primitives/Runtime.d.ts +55 -0
  316. package/types/src/primitives/ScalarCollation.d.ts +174 -0
  317. package/types/src/primitives/TextFold.d.ts +62 -0
  318. package/types/src/primitives/_PrimitiveMessages.d.ts +3 -0
  319. package/types/src/primitives/index.d.ts +7 -0
  320. package/types/src/primitives/stats/AggregateStats.d.ts +119 -0
  321. package/types/src/primitives/stats/Cancellation.d.ts +43 -0
  322. package/types/src/primitives/stats/FrequencyStats.d.ts +94 -0
  323. package/types/src/primitives/stats/Ranked.d.ts +26 -0
  324. package/types/src/primitives/stats/ScalarOrder.d.ts +18 -0
  325. package/types/src/primitives/stats/SortedNumbers.d.ts +48 -0
  326. package/types/src/primitives/stats/index.d.ts +7 -0
  327. package/types/src/print/IPrint.d.ts +234 -0
  328. package/types/src/print/index.d.ts +2 -0
  329. package/types/src/protectedRange/IProtectedRange.d.ts +239 -0
  330. package/types/src/protectedRange/IProtectedRangeCollection.d.ts +73 -0
  331. package/types/src/protectedRange/ProtectedRange.d.ts +101 -0
  332. package/types/src/protectedRange/ProtectedRangeCollection.d.ts +21 -0
  333. package/types/src/protectedRange/index.d.ts +3 -0
  334. package/types/src/protection/DefaultProtection.d.ts +43 -0
  335. package/types/src/protection/IProtection.d.ts +170 -0
  336. package/types/src/protection/PasswordHasher.d.ts +35 -0
  337. package/types/src/protection/index.d.ts +6 -0
  338. package/types/src/resource/IResource.d.ts +98 -0
  339. package/types/src/resource/IResourceCollection.d.ts +96 -0
  340. package/types/src/resource/Resource.d.ts +39 -0
  341. package/types/src/resource/ResourceCollection.d.ts +19 -0
  342. package/types/src/resource/_ResourceMessages.d.ts +4 -0
  343. package/types/src/resource/index.d.ts +5 -0
  344. package/types/src/resource/resourceKinds.d.ts +23 -0
  345. package/types/src/richData/index.d.ts +1 -0
  346. package/types/src/scripting/FunctionCollection.d.ts +88 -0
  347. package/types/src/scripting/IFunctionCollection.d.ts +208 -0
  348. package/types/src/scripting/IModule.d.ts +82 -0
  349. package/types/src/scripting/IModuleCollection.d.ts +79 -0
  350. package/types/src/scripting/IScript.d.ts +289 -0
  351. package/types/src/scripting/ITypedFunction.d.ts +61 -0
  352. package/types/src/scripting/MacroFunction.d.ts +15 -0
  353. package/types/src/scripting/Module.d.ts +39 -0
  354. package/types/src/scripting/ModuleCollection.d.ts +56 -0
  355. package/types/src/scripting/Runtime.d.ts +16 -0
  356. package/types/src/scripting/Scripts.d.ts +79 -0
  357. package/types/src/scripting/TypedFunction.d.ts +161 -0
  358. package/types/src/scripting/_FunctionIndex.d.ts +111 -0
  359. package/types/src/scripting/_FunctionMessages.d.ts +6 -0
  360. package/types/src/scripting/_ModuleUtils.d.ts +5 -0
  361. package/types/src/scripting/_ScriptUtils.d.ts +18 -0
  362. package/types/src/scripting/enumManifest.browser.d.ts +9 -0
  363. package/types/src/scripting/enumManifest.node.d.ts +13 -0
  364. package/types/src/scripting/index.d.ts +4 -0
  365. package/types/src/selection/IRangeSelection.d.ts +307 -0
  366. package/types/src/selection/RangeSelection.d.ts +144 -0
  367. package/types/src/selection/_RangeSelectionUtils.d.ts +32 -0
  368. package/types/src/selection/index.d.ts +2 -0
  369. package/types/src/shape/IShape.d.ts +279 -0
  370. package/types/src/shape/Shape.d.ts +54 -0
  371. package/types/src/shape/index.d.ts +2 -0
  372. package/types/src/sheet/CellRegion.d.ts +106 -0
  373. package/types/src/sheet/ICellContainerOptions.d.ts +97 -0
  374. package/types/src/sheet/ISheet.d.ts +1074 -0
  375. package/types/src/sheet/ISheetCollection.d.ts +70 -0
  376. package/types/src/sheet/NamedCellRange.d.ts +45 -0
  377. package/types/src/sheet/NamedRange.d.ts +30 -0
  378. package/types/src/sheet/Sheet.d.ts +1068 -0
  379. package/types/src/sheet/SheetCell.d.ts +335 -0
  380. package/types/src/sheet/SheetCollection.d.ts +18 -0
  381. package/types/src/sheet/SheetRange.d.ts +362 -0
  382. package/types/src/sheet/SheetRanges.d.ts +225 -0
  383. package/types/src/sheet/_CopyUtils.d.ts +33 -0
  384. package/types/src/sheet/_InvalidSheetRange.d.ts +70 -0
  385. package/types/src/sheet/_SheetAutoFitUtils.d.ts +18 -0
  386. package/types/src/sheet/_SheetCoords.d.ts +54 -0
  387. package/types/src/sheet/_SheetFilterUtils.d.ts +9 -0
  388. package/types/src/sheet/_SheetMessages.d.ts +11 -0
  389. package/types/src/sheet/_SheetMutations.d.ts +137 -0
  390. package/types/src/sheet/_SheetSortUtils.d.ts +9 -0
  391. package/types/src/sheet/_SheetStateReader.d.ts +161 -0
  392. package/types/src/sheet/_SheetStateTypes.d.ts +446 -0
  393. package/types/src/sheet/_SheetUtils.d.ts +265 -0
  394. package/types/src/sheet/clipboard/IHTMLParser.d.ts +92 -0
  395. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +55 -0
  396. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +29 -0
  397. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +46 -0
  398. package/types/src/sheet/clipboard/_ClipboardUtils.d.ts +10 -0
  399. package/types/src/sheet/clipboard/index.d.ts +2 -0
  400. package/types/src/sheet/index.d.ts +6 -0
  401. package/types/src/sheet/listener/RangesListener.d.ts +32 -0
  402. package/types/src/sheet/listener/RangesListenerEntry.d.ts +19 -0
  403. package/types/src/sheet/listener/index.d.ts +3 -0
  404. package/types/src/sheet/spatial/MergeEntry.d.ts +17 -0
  405. package/types/src/sheet/spatial/index.d.ts +2 -0
  406. package/types/src/sheet/style/SheetCellStyle.d.ts +540 -0
  407. package/types/src/sheet/style/SheetDirectStyle.d.ts +130 -0
  408. package/types/src/sheet/style/SheetNamedStyle.d.ts +47 -0
  409. package/types/src/sheet/style/SheetTableStyle.d.ts +47 -0
  410. package/types/src/sheet/style/UsedRangeSpatialMap.d.ts +80 -0
  411. package/types/src/sheet/style/_Resolvers.d.ts +41 -0
  412. package/types/src/sheet/style/_StyleUtils.d.ts +69 -0
  413. package/types/src/sheet/style/index.d.ts +1 -0
  414. package/types/src/sheetHeader/ISheetHeader.d.ts +217 -0
  415. package/types/src/sheetHeader/SheetCellHeader.d.ts +61 -0
  416. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +54 -0
  417. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +46 -0
  418. package/types/src/sheetHeader/SheetHeader.d.ts +257 -0
  419. package/types/src/sheetHeader/_HeaderUtils.d.ts +94 -0
  420. package/types/src/sheetHeader/_InvalidSheetHeaderRange.d.ts +7 -0
  421. package/types/src/sheetHeader/index.d.ts +2 -0
  422. package/types/src/sheetProtection/ISheetProtection.d.ts +150 -0
  423. package/types/src/sheetProtection/SheetProtection.d.ts +39 -0
  424. package/types/src/sheetProtection/index.d.ts +2 -0
  425. package/types/src/sheetView/ISheetView.d.ts +439 -0
  426. package/types/src/sheetView/SheetView.d.ts +113 -0
  427. package/types/src/sheetView/_SheetViewUtils.d.ts +19 -0
  428. package/types/src/sheetView/index.d.ts +2 -0
  429. package/types/src/slicer/ISlicer.d.ts +38 -0
  430. package/types/src/slicer/Slicer.d.ts +41 -0
  431. package/types/src/slicer/index.d.ts +2 -0
  432. package/types/src/sort/ISort.d.ts +318 -0
  433. package/types/src/sort/Sort.d.ts +48 -0
  434. package/types/src/sort/_SortUtils.d.ts +12 -0
  435. package/types/src/sort/index.d.ts +3 -0
  436. package/types/src/string/IStringCollection.d.ts +50 -0
  437. package/types/src/string/StringCollection.d.ts +26 -0
  438. package/types/src/string/index.d.ts +3 -0
  439. package/types/src/style/IStyle.d.ts +485 -0
  440. package/types/src/style/IStyleCollection.d.ts +292 -0
  441. package/types/src/style/StyleCollection.d.ts +125 -0
  442. package/types/src/style/_BuiltInStyleDefs.d.ts +18 -0
  443. package/types/src/style/_BuiltInStyleNames.d.ts +20 -0
  444. package/types/src/style/index.d.ts +5 -0
  445. package/types/src/table/AnchoredTable.d.ts +349 -0
  446. package/types/src/table/AutoTable.d.ts +64 -0
  447. package/types/src/table/ITable.d.ts +714 -0
  448. package/types/src/table/ITableCollection.d.ts +88 -0
  449. package/types/src/table/ITableStyle.d.ts +318 -0
  450. package/types/src/table/Table.d.ts +8 -0
  451. package/types/src/table/TableCollection.d.ts +20 -0
  452. package/types/src/table/_AutoTableColumn.d.ts +27 -0
  453. package/types/src/table/_BuiltInTableStyles.d.ts +9 -0
  454. package/types/src/table/_FilterField.d.ts +30 -0
  455. package/types/src/table/_NamedTable.d.ts +84 -0
  456. package/types/src/table/_NamedTableSource.d.ts +57 -0
  457. package/types/src/table/_SortField.d.ts +29 -0
  458. package/types/src/table/_TableColumn.d.ts +51 -0
  459. package/types/src/table/_TableMessages.d.ts +5 -0
  460. package/types/src/table/_TableUtils.d.ts +94 -0
  461. package/types/src/table/index.d.ts +5 -0
  462. package/types/src/text/AutoNumberingScheme.d.ts +175 -0
  463. package/types/src/text/Bullet.d.ts +34 -0
  464. package/types/src/text/IText.d.ts +53 -0
  465. package/types/src/text/ITextFrame.d.ts +313 -0
  466. package/types/src/text/TextBoxAlignment.d.ts +141 -0
  467. package/types/src/text/TextFrame.d.ts +43 -0
  468. package/types/src/text/TextLine.d.ts +24 -0
  469. package/types/src/text/TextParagraph.d.ts +61 -0
  470. package/types/src/text/TextRotation.d.ts +106 -0
  471. package/types/src/text/TextRun.d.ts +85 -0
  472. package/types/src/text/TextUtils.d.ts +165 -0
  473. package/types/src/text/TextVisitor.d.ts +11 -0
  474. package/types/src/text/TextWrapper.d.ts +78 -0
  475. package/types/src/text/_TextUtils.d.ts +90 -0
  476. package/types/src/text/impl/Phrase.d.ts +3 -0
  477. package/types/src/text/impl/TabStrategy.d.ts +9 -0
  478. package/types/src/text/impl/WordWrapUtils.d.ts +6 -0
  479. package/types/src/text/index.d.ts +7 -0
  480. package/types/src/text/richtext/IStyledFont.d.ts +330 -0
  481. package/types/src/text/richtext/index.d.ts +2 -0
  482. package/types/src/theme/ITheme.d.ts +252 -0
  483. package/types/src/theme/IThemeCollection.d.ts +84 -0
  484. package/types/src/theme/ThemeCollection.d.ts +62 -0
  485. package/types/src/theme/_BuiltInColorSchemes.d.ts +3 -0
  486. package/types/src/theme/_BuiltInFontSchemes.d.ts +3 -0
  487. package/types/src/theme/_BuiltInThemeDefs.d.ts +3 -0
  488. package/types/src/theme/_ThemeMessages.d.ts +3 -0
  489. package/types/src/theme/_ThemeUtils.d.ts +3 -0
  490. package/types/src/theme/index.d.ts +4 -0
  491. package/types/src/transaction/ITransaction.d.ts +594 -0
  492. package/types/src/transaction/Transaction.d.ts +184 -0
  493. package/types/src/transaction/TransactionSaveStateManager.d.ts +85 -0
  494. package/types/src/transaction/TransactionUndoManager.d.ts +60 -0
  495. package/types/src/transaction/index.d.ts +5 -0
  496. package/types/src/type/ICollection.d.ts +110 -0
  497. package/types/src/type/IProperties.d.ts +51 -0
  498. package/types/src/type/ITypes.d.ts +69 -0
  499. package/types/src/type/Registry.d.ts +66 -0
  500. package/types/src/type/index.d.ts +5 -0
  501. package/types/src/utils/GeomUtils.d.ts +61 -0
  502. package/types/src/utils/ObjectPath.d.ts +9 -0
  503. package/types/src/utils/Profiler.d.ts +38 -0
  504. package/types/src/utils/_CSSUtils.d.ts +156 -0
  505. package/types/src/utils/_GeomUtils.d.ts +14 -0
  506. package/types/src/utils/_RangeCoordUtils.d.ts +84 -0
  507. package/types/src/utils/_RangeSetUtils.d.ts +55 -0
  508. package/types/src/utils/index.d.ts +2 -0
  509. package/types/src/workbook/IWorkbook.d.ts +711 -0
  510. package/types/src/workbook/Workbook.d.ts +342 -0
  511. package/types/src/workbook/WorkbookRange.d.ts +25 -0
  512. package/types/src/workbook/WorkbookRanges.d.ts +39 -0
  513. package/types/src/workbook/_WorkbookMessages.d.ts +8 -0
  514. package/types/src/workbook/_WorkbookUtils.d.ts +35 -0
  515. package/types/src/workbook/index.d.ts +3 -0
  516. package/types/src/workbookProtection/IWorkbookProtection.d.ts +57 -0
  517. package/types/src/workbookProtection/WorkbookProtection.d.ts +14 -0
  518. package/types/src/workbookProtection/index.d.ts +2 -0
  519. package/types/src/workbookView/IWorkbookView.d.ts +134 -0
  520. package/types/src/workbookView/WorkbookView.d.ts +49 -0
  521. package/types/src/workbookView/index.d.ts +3 -0
  522. package/browser/cjs/8p8T3dD14wnIxaBG.cjs +0 -6
  523. package/browser/cjs/95PbxEGMp0S1al9b.cjs +0 -6
  524. package/browser/cjs/B5N-CDhD5v6HYM0I.cjs +0 -6
  525. package/browser/cjs/BKgMJ6JZUiena1iM.cjs +0 -6
  526. package/browser/cjs/BSW7L4QsMahkhhhy.cjs +0 -6
  527. package/browser/cjs/Be4ZjrWJHL1nRmQu.cjs +0 -6
  528. package/browser/cjs/BkyqIhWBqIxRof6b.cjs +0 -6
  529. package/browser/cjs/BzjrR52QeojqLbOx.cjs +0 -7
  530. package/browser/cjs/C4h0pgfUOocSJ3Ke.cjs +0 -6
  531. package/browser/cjs/CKDSsq1v8jGWlRAi.cjs +0 -55
  532. package/browser/cjs/CYMVELYS8FNeFpiq.cjs +0 -6
  533. package/browser/cjs/CYg51Fs361BHxyRI.cjs +0 -6
  534. package/browser/cjs/CdzYFZ-48HrcE5LQ.cjs +0 -6
  535. package/browser/cjs/CfKjVPVp-cWgnToo.cjs +0 -6
  536. package/browser/cjs/D-u1ccCpAGvsjKOp.cjs +0 -6
  537. package/browser/cjs/D5fl40nw9aOYcQli.cjs +0 -6
  538. package/browser/cjs/D6KrtS3oZrLOAxO5.cjs +0 -6
  539. package/browser/cjs/DXQv5Gx-Wtfyk89a.cjs +0 -6
  540. package/browser/cjs/Di10f5RB2IX9PFHR.cjs +0 -6
  541. package/browser/cjs/DnOACT9Vxcz9_frM.cjs +0 -15
  542. package/browser/cjs/Dr2RqSffQZyFVpHL.cjs +0 -6
  543. package/browser/cjs/Dz0rduQbyCjN2Ni_.cjs +0 -6
  544. package/browser/cjs/JrzBZL5--Ock2uVj.cjs +0 -6
  545. package/browser/cjs/VLEyvfkmKqqUCKxv.cjs +0 -124
  546. package/browser/cjs/W8tk-2bTTSDGstfk.cjs +0 -6
  547. package/browser/cjs/pc9KfujdfWA19P_V.cjs +0 -6
  548. package/browser/cjs/qiB3rVaQVJILQk_N.cjs +0 -6
  549. package/browser/esm/BBYOqwrtztJDWz3c.mjs +0 -10
  550. package/browser/esm/BBst2hgdCPhA3DPd.mjs +0 -10
  551. package/browser/esm/BFrnY1TEgniZNVl8.mjs +0 -10
  552. package/browser/esm/BR4W7_ucdFJi03RO.mjs +0 -10
  553. package/browser/esm/BUci9XBsYBUNnQub.mjs +0 -10
  554. package/browser/esm/B_DMz5brejp8Mgto.mjs +0 -10
  555. package/browser/esm/B_EdCIINiuU7UuR6.mjs +0 -10
  556. package/browser/esm/BklwssraNXGXEaP2.mjs +0 -10
  557. package/browser/esm/BvccAibR-3R_xO8l.mjs +0 -10
  558. package/browser/esm/Bza5H7E2GGoHxEt7.mjs +0 -10
  559. package/browser/esm/C0brjreeBKRcVYN4.mjs +0 -10
  560. package/browser/esm/C1hdw7eWXk0zq1SS.mjs +0 -10
  561. package/browser/esm/C4Y3MpHe_UzFZEaF.mjs +0 -10
  562. package/browser/esm/CATfU6MHTqOkz5FJ.mjs +0 -10
  563. package/browser/esm/CDe9GrlTNhuZzOVh.mjs +0 -23841
  564. package/browser/esm/C_bcVsMhltCNyQij.mjs +0 -10
  565. package/browser/esm/CqpHJSTi0m49GR_q.mjs +0 -10
  566. package/browser/esm/CvVXzwNYb-2OZMBj.mjs +0 -426
  567. package/browser/esm/CwIFvNV1kcbLsXJg.mjs +0 -10
  568. package/browser/esm/D7xtXncwRYiPYQ3v.mjs +0 -10
  569. package/browser/esm/D8BmFg9FFVHUz_W1.mjs +0 -10
  570. package/browser/esm/DRm-FWBKVOv2Jp6x.mjs +0 -10
  571. package/browser/esm/Due-pSw1d9_zz_19.mjs +0 -12
  572. package/browser/esm/DvipK7b_PuSzB8G-.mjs +0 -10
  573. package/browser/esm/aTyRGVa5Smj2T_9l.mjs +0 -10
  574. package/browser/esm/lRUYQdaIClvoTNGo.mjs +0 -4022
  575. package/browser/esm/xXGFfp-8v8jL5akS.mjs +0 -5653
  576. package/node/esm/BBst2hgdCPhA3DPd.mjs +0 -10
  577. package/node/esm/BFrnY1TEgniZNVl8.mjs +0 -10
  578. package/node/esm/BLNq3EgGCGKtzrGq.mjs +0 -10
  579. package/node/esm/BLS0f7etFu8fozVg.mjs +0 -10
  580. package/node/esm/BMyNI7ZZi2ICO6Bn.mjs +0 -10
  581. package/node/esm/BR4W7_ucdFJi03RO.mjs +0 -10
  582. package/node/esm/B_EdCIINiuU7UuR6.mjs +0 -10
  583. package/node/esm/BhKeh1i4iDAeImus.mjs +0 -1072
  584. package/node/esm/BklwssraNXGXEaP2.mjs +0 -10
  585. package/node/esm/Bza5H7E2GGoHxEt7.mjs +0 -10
  586. package/node/esm/C0brjreeBKRcVYN4.mjs +0 -10
  587. package/node/esm/C1hdw7eWXk0zq1SS.mjs +0 -10
  588. package/node/esm/C4Y3MpHe_UzFZEaF.mjs +0 -10
  589. package/node/esm/CATfU6MHTqOkz5FJ.mjs +0 -10
  590. package/node/esm/COhANehqT9YVLl76.mjs +0 -10
  591. package/node/esm/CqpHJSTi0m49GR_q.mjs +0 -10
  592. package/node/esm/CuijIC4hIp5bpx9B.mjs +0 -10
  593. package/node/esm/CwIFvNV1kcbLsXJg.mjs +0 -10
  594. package/node/esm/D7xtXncwRYiPYQ3v.mjs +0 -10
  595. package/node/esm/D8BmFg9FFVHUz_W1.mjs +0 -10
  596. package/node/esm/DPs0koPRfrHYG1yO.mjs +0 -13
  597. package/node/esm/DVM4Cwe0h2V1V4vm.mjs +0 -10
  598. package/node/esm/DvipK7b_PuSzB8G-.mjs +0 -10
  599. package/node/esm/aTyRGVa5Smj2T_9l.mjs +0 -10
  600. package/node/esm/qLqMotWYwBIdEVhE.mjs +0 -2458
@@ -0,0 +1,1016 @@
1
+ import { FormulaError, IRange, Scalar, IRuntime } from '@sheetxl/primitives';
2
+ import { ITransaction } from '../transaction';
3
+ import { IListener } from '../listener';
4
+ import { IModel } from '../model';
5
+ import { IFunctionCollection } from '../scripting';
6
+ import { ICellRange, ICellRanges } from '../cellRange';
7
+ import { INamed } from '../named';
8
+ import { INamedFormulasCollection } from './INamedFormulasCollection';
9
+ /**
10
+ * Calculation is the process of computing formulas and then displaying the results
11
+ * as values in the cells that contain the formulas.
12
+ */
13
+ export interface ICalculation extends IModel {
14
+ /**
15
+ * Execute a calculate on the Graph.
16
+ *
17
+ * @param options The options or a boolean. If `true' a full calculation will be done.
18
+ * @returns A promise that will be resolved when the calculation is completed.
19
+ *
20
+ * @remarks
21
+ * For async functions this will return before they are completed.
22
+ */
23
+ calculate(options?: boolean | ICalculation.CalculateOptions): Promise<ICalculation.Status>;
24
+ /**
25
+ * Starts the ICalculation engine.
26
+ *
27
+ * @remarks
28
+ * * This is required to be called before any calculations can be performed.
29
+ * * This will initialize the calculation engine and prepare it for use.
30
+ * * Will fire events and return a promise when the calculation is started. (or errors);
31
+ */
32
+ start: () => Promise<void>;
33
+ /**
34
+ * Stops the ICalculation engine.
35
+ */
36
+ stop: () => Promise<void>;
37
+ /**
38
+ * Returns when all calculations are complete and there are no pending calculations.
39
+ *
40
+ * @remarks
41
+ * * This is useful when needing to ensure that the values in the calculation cycle are up-to-date.
42
+ * * For streaming functions still will return the current value.
43
+ */
44
+ ready(): Promise<ICalculation.Status>;
45
+ /**
46
+ * Returns the current status of the calculation engine.
47
+ */
48
+ getStatus(): ICalculation.Status;
49
+ /**
50
+ * Returns the functions available for the calculation engine.
51
+ */
52
+ getFunctions(): IFunctionCollection;
53
+ /**
54
+ * Returns the named formulas available in the calculation engine.
55
+ */
56
+ getNamedFormulas(): INamedFormulasCollection;
57
+ /** @inheritdoc IFormulaContext.getRuntime */
58
+ getRuntime(): IRuntime;
59
+ /**
60
+ * Parses a formula expression and returns a *transient* formula object.
61
+ *
62
+ * @remarks
63
+ * - This does **not** register the formula in the workbook or dependency graph.
64
+ * - Use it for:
65
+ * - interactive editing (tooltips, watches, function help)
66
+ * - condition / validation expressions
67
+ * - ad-hoc “what-if” evaluations
68
+ */
69
+ createFormula(expression: string, coords?: Partial<IRange.CellCoords>): ICalculation.IFormula;
70
+ /**
71
+ * Evaluates a expression in the context of the sheet and returns the resulting value.
72
+ *
73
+ * @param expression The expression to evaluate.
74
+ * @param options Optional evaluation options.
75
+ *
76
+ * @remarks
77
+ * This is similar convenience method for `getCalculation().createFormula(expression).evaluate(options)`.
78
+ */
79
+ evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords>): Promise<Scalar | IRange>;
80
+ /**
81
+ * Add Listeners.
82
+ *
83
+ * @see
84
+ * {@link IListener.ISource.addListeners}
85
+ */
86
+ addListeners(listeners: ICalculation.IListeners, options?: IListener.Options): IListener.Remove;
87
+ }
88
+ /**
89
+ * {@inheritDoc ICalculation}
90
+ * @see
91
+ * ### **Interface**
92
+ *
93
+ * {@link ICalculation}
94
+ */
95
+ export declare namespace ICalculation {
96
+ /**
97
+ * The most characters a formula expression can hold, matching Excel's limit on formula
98
+ * contents.
99
+ *
100
+ * @remarks
101
+ * The leading `=` is not part of the expression and does not count against this.
102
+ *
103
+ * Longer text is refused at compile rather than parsed: the formula carries a parse error and
104
+ * {@link IFormula.getTokens} answers a single unparsed token. Nothing downstream — the
105
+ * tokenizer, the AST, a formula input — is ever handed an expression of unbounded size.
106
+ */
107
+ const MAX_EXPRESSION_LENGTH = 8192;
108
+ /**
109
+ * Represents a formula that can be evaluated.
110
+ */
111
+ interface IFormula {
112
+ /**
113
+ * Return the value for a formula.
114
+ *
115
+ * @see ICalculation.FormulaToken.evalIndex
116
+ */
117
+ evaluate(options?: number | ICalculation.EvaluateOptions): Promise<Scalar | IRange>;
118
+ /**
119
+ * Returns the status.
120
+ */
121
+ getCalculationStatus(): ICalculation.ResultStatus;
122
+ /**
123
+ * Return the formula's expression — the text WITHOUT a leading `=`.
124
+ *
125
+ * @param options Options for converting the formula to text.
126
+ *
127
+ * @remarks
128
+ * One shape for every kind of formula, a cell's and a defined name's alike. It is the STORED
129
+ * shape, which is what OOXML `<f>` and `<definedName>` hold and what {@link setExpression}
130
+ * takes back, so read/modify/write needs no adjusting in between.
131
+ *
132
+ * Displaying a formula means prefixing `'=' +` — Excel's own API answers that prefixed form
133
+ * (`Range.Formula`, `Name.RefersTo`) because ITS setters treat the `=` as the formula-ness
134
+ * marker: assigning `Range.Formula = "SUM(1,2)"` stores text. Ours do not — every entry point
135
+ * accepts the expression with or without it — so the prefix is presentation, and belongs at
136
+ * the point of display rather than in a second accessor.
137
+ */
138
+ getExpression(options?: ICalculation.FormulaTextOptions): string;
139
+ /**
140
+ * The cell this formula is anchored at — the cell its relative references are written from.
141
+ *
142
+ * @remarks
143
+ * `A1` in a formula anchored at `B1` means "the cell to my left"; the same text anchored at
144
+ * `B6` means "five rows up and one left". The anchor is what makes that text unambiguous, and
145
+ * a caller re-siting a formula ({@link shift}) needs it to know where it is starting from.
146
+ *
147
+ * `null` for a formula with no cell of its own — a temporary formula created without coords,
148
+ * which evaluates in a virtual space.
149
+ */
150
+ getAnchor(): IRange.CellCoords | null;
151
+ /**
152
+ * This formula as it would read at `target`: a DETACHED copy, filled.
153
+ *
154
+ * @param target The cell the copy is anchored at.
155
+ *
156
+ * @returns The filled copy, or `null` when this formula has no compiler behind it to mint one.
157
+ *
158
+ * @remarks
159
+ * Excel's **fill/copy**, not its move: relative references follow the formula to its new home
160
+ * and absolute (`$`) ones stay put, so the copy means at `target` what this one means at its
161
+ * own {@link getAnchor | anchor}. `A1*2` anchored at `B1`, shifted to `B6`, is `A6*2`.
162
+ *
163
+ * The distinction matters and is easy to invert. Re-compiling {@link getExpression}'s text at
164
+ * another cell keeps the TEXT and changes the meaning — that is a move, and a formula that
165
+ * meant "myself" starts meaning "some cells up". This keeps the meaning and changes the text.
166
+ *
167
+ * Nothing is committed; the copy is anchored at `target` whether or not anything lives there.
168
+ */
169
+ shift(target: IRange.CellCoords): IFormula | null;
170
+ /**
171
+ * Returns an ordered list of ranges referenced in this formula.
172
+ *
173
+ * @remarks
174
+ * * Returns `null` if there are no references.
175
+ * * These are the resolved ranges from `setReferenceAt()`
176
+ */
177
+ getReferences(): ICellRanges | null;
178
+ /**
179
+ * Whether any reference in this formula is unresolvable — `#REF!`.
180
+ *
181
+ * @remarks
182
+ * Asks the compiled references, not the text: a `"#REF!"` STRING literal in the formula is
183
+ * not a reference error. A reference degrades to one when its target is deleted, or when a
184
+ * {@link shift} pushes a relative reference above or left of the sheet.
185
+ */
186
+ hasRefError(): boolean;
187
+ /**
188
+ * Replaces a specific reference in the formula with a new one.
189
+ *
190
+ * @param index The zero-based index of the reference to be updated (from `getReferences()`).
191
+ * @param reference The new address or range to occupy that position.
192
+ * @param options Optional transaction or operation options.
193
+ * @throws Error is `index` is out of bounds relative to `getReferences()`.
194
+ *
195
+ * @remarks
196
+ * This is the primary way to "refactor" a formula—for example, if a user
197
+ * drags a highlighted range in the UI to a new location.
198
+ */
199
+ setReferenceAt(index: number, reference: ICellRange.Address, options?: string | ITransaction.OperationOptions): this;
200
+ /**
201
+ * Cycles the absolute/relative (`$`) style of the reference at the specified index.
202
+ *
203
+ * @param index The zero-based index of the reference to be cycled (from `getReferences()`).
204
+ * @param side Which part of the reference to cycle (relative to a range operator `:`):
205
+ * - `'self'` (default) — the reference has no range operator (a single cell); cycles the whole
206
+ * reference as a unit, keeping it a single cell.
207
+ * - `'left'` — the left operand of a range (the "start" corner).
208
+ * - `'right'` — the right operand of a range (the "end" corner).
209
+ * A single-cell **range** (e.g. `A1:A1`) is still a range — it has a `'left'` and a `'right'`, so
210
+ * it is NOT `'self'`. That distinction only survives in the tokens (see {@link FormulaToken.refSide}).
211
+ * @param mode Optional target mode. If omitted, cycles to the next mode in the sequence.
212
+ * @param options Optional transaction or operation options.
213
+ *
214
+ * @remarks
215
+ * The modes are:
216
+ * - `0`: Absolute (e.g., $A$1)
217
+ * - `1`: Absolute row, relative column (e.g., A$1)
218
+ * - `2`: Absolute column, relative row (e.g., $A1)
219
+ * - `3`: Relative (e.g., A1)
220
+ *
221
+ * * This is the `F4 Cycle` behavior commonly found in spreadsheet editors.
222
+ */
223
+ setReferenceModeAt(index: number, side?: ICalculation.ReferenceSide, mode?: number, options?: string | ITransaction.OperationOptions): this;
224
+ /**
225
+ * Returns true if the formula consists entirely of cell or range references and
226
+ * range operators (`:`, ` `, `#`, etc.) with no function calls or computed expressions.
227
+ *
228
+ * @remarks
229
+ * A pure-reference formula always resolves to a range, making it suitable for use as a navigation
230
+ * target. Named formulas that return true can meaningfully implement `getRanges()`.
231
+ */
232
+ isReferenceOnly(): boolean;
233
+ /**
234
+ * Returns true if this formula contains one or more volatile functions
235
+ * (e.g. `NOW`, `RAND`, `OFFSET`, `INDIRECT`).
236
+ *
237
+ * @remarks
238
+ * - Volatile formulas are re-evaluated on every calculation cycle regardless
239
+ * of whether their inputs have changed.
240
+ * - This is a runtime property tracked by the calculation engine — it cannot
241
+ * be derived from static AST analysis alone.
242
+ * - Named formulas where `isVolatile()` is true should not be used as
243
+ * navigation targets even if `isReferenceOnly()` returns true, since their
244
+ * resolved range may differ by context.
245
+ */
246
+ isVolatile(): boolean;
247
+ /**
248
+ * Return the formula as an array of tokenized values.
249
+ *
250
+ * @param evalIndex Allows for a partial evaluation based on a token index.
251
+ *
252
+ * @remarks
253
+ * These can be used by advanced editors.
254
+ *
255
+ * @see ICalculation.FormulaToken.evalIndex
256
+ */
257
+ getTokens(evalIndex?: number): readonly ICalculation.FormulaToken[];
258
+ /**
259
+ * Whether the formula text **parsed** without error. `false` for an in-progress / malformed formula
260
+ * (`=SUM(`, `=A1:`, `=1+`) — the parser recovered a best-effort token stream but the input isn't a
261
+ * complete expression. This is a PARSE concern only: a well-formed formula that evaluates to an error
262
+ * (`=1/0`) is still valid. Lets an editor flag "more input expected" without re-parsing.
263
+ */
264
+ isValid(): boolean;
265
+ /**
266
+ * Attempt Excel-style **Formula AutoCorrect** on an invalid formula.
267
+ *
268
+ * @returns A corrected, DETACHED formula (not committed anywhere — the same shape
269
+ * {@link ICalculation.createFormula} returns, anchored at this formula's cell), or
270
+ * `null` when this formula is already {@link isValid | valid} or no safe correction exists.
271
+ *
272
+ * @remarks
273
+ * Currently ONE deliberately narrow rule: append the missing trailing closers (`)`, `}`) —
274
+ * `=SUM(A1:A2` → `=SUM(A1:A2)` — and only when the repaired text parses clean. A repair that
275
+ * would still be invalid (`=SUM(` → `=SUM()` fails arity) is never returned, nor is anything
276
+ * attempted for over-closed / interleaved brackets or an unterminated string. Never mutates
277
+ * this formula. Interactive hosts call this at commit; programmatic writes (`setValue`, file
278
+ * load) never auto-correct.
279
+ */
280
+ autoCorrect(): IFormula | null;
281
+ /**
282
+ * For runtime type checking.
283
+ */
284
+ readonly isIFormula: true;
285
+ }
286
+ /**
287
+ * A named formula — a persistent, user-facing formula bound to a name.
288
+ *
289
+ * @remarks
290
+ * Combines the full {@link IFormula} contract (evaluate, tokenize, inspect) with
291
+ * {@link INamed.INamedValue} (stable id, user-visible name, optional range coords).
292
+ * `getCoords()` returns non-null only when `isReferenceOnly()` is `true`.
293
+ */
294
+ /**
295
+ * A defined name owned by the calculation engine.
296
+ *
297
+ * @remarks
298
+ * Extends {@link INamed} so calc's items can flow through the aggregating `INamedCollection`
299
+ * without an adapter — an adapter would carry a second copy of each name's state, which is the
300
+ * duplication defined-name ownership exists to remove.
301
+ *
302
+ * It is both: a name (`getName`, `getScope`, `isHidden`) and the formula that name is bound to
303
+ * (`getText`, `getReferences`, `evaluate`). `INamed.getRanges` arrives from `INamed` and is
304
+ * meaningful exactly when {@link IFormula.isReferenceOnly} holds.
305
+ */
306
+ interface INamedFormula extends IFormula, INamed<string> {
307
+ /**
308
+ * The sheet name this formula is scoped to, or `null` for global scope.
309
+ */
310
+ getScope(): string | null;
311
+ /**
312
+ * Renames this defined name.
313
+ *
314
+ * @remarks
315
+ * A rename, not a redefinition: the stable symbol id is unchanged, so formulas that reference
316
+ * this name keep resolving and re-render with the new text.
317
+ */
318
+ setName(name: string): this;
319
+ /**
320
+ * Redefines the expression this name is bound to.
321
+ *
322
+ * @remarks
323
+ * A redefinition, not a replacement: the stable symbol id is unchanged, so formulas referencing
324
+ * this name pick up the new expression rather than going `#NAME?`. A leading `=` is optional —
325
+ * a bare range address is simply a reference expression.
326
+ */
327
+ setExpression(expression: string, options?: ITransaction.OperationOptions): this;
328
+ /**
329
+ * The comment, or `null` if none has been set.
330
+ */
331
+ getComment(): string | null;
332
+ /**
333
+ * If `true` the name is not shown in the UI. This does not affect resolution in formulas.
334
+ */
335
+ isHidden(): boolean;
336
+ /**
337
+ * {@link isHidden}
338
+ *
339
+ * @remarks
340
+ * Required here — every named formula supports hiding, unlike the broader {@link INamed}.
341
+ */
342
+ setHidden(hidden: boolean, options?: ITransaction.OperationOptions): this;
343
+ /**
344
+ * The ranges this name designates, or `null` when it holds an expression.
345
+ *
346
+ * @remarks
347
+ * Required here — every named formula answers (with `null` unless
348
+ * {@link IFormula.isReferenceOnly} holds), unlike the broader {@link INamed}.
349
+ */
350
+ getRanges(): ICellRanges | null;
351
+ /**
352
+ * {@link INamed.toJSON}
353
+ *
354
+ * @remarks
355
+ * Required here — every named formula serializes, unlike the broader {@link INamed}.
356
+ */
357
+ toJSON(): INamed.JSON | null;
358
+ /**
359
+ * What this name's body reads — cells and names, one hop, one answer; `null` when it reads
360
+ * nothing.
361
+ *
362
+ * @remarks
363
+ * The precedent half of the same four graph methods {@link ICell} exposes, resolved at the
364
+ * DEFINING anchor (the cell the body was authored from) — the same answer the Name Manager
365
+ * gives, since a name with relative references has no one answer until applied somewhere.
366
+ *
367
+ * A name the body reads rides in the collection as an `INamedRange` node, exactly as in
368
+ * {@link getDirectDependents} — `Doubled = Base*2` reports the `Base` node plus whatever
369
+ * cells the body reads directly. Contrast {@link IFormula.getReferences}: that is the ordered,
370
+ * index-aligned reference list (the `setReferenceAt` currency, `#REF!` slots included); this
371
+ * is the graph answer.
372
+ */
373
+ getDirectPrecedents(): ICellRanges | null;
374
+ /**
375
+ * Everything upstream of this name — {@link getDirectPrecedents} walked to exhaustion.
376
+ *
377
+ * @remarks
378
+ * The walk unions the body's cell-graph precedents with every name the body reaches through
379
+ * the symbol graph, each contributing its own body's walk; a cycle terminates and reports the
380
+ * names on it. One hop it deliberately does not flatten: a name referenced by an UPSTREAM
381
+ * CELL (`X = A1*2`, `A1 = SomeName`) is that cell's precedent, not this answer's — a tree
382
+ * walk crosses it through the cell's own {@link ICell.getDirectPrecedents}.
383
+ */
384
+ getPrecedents(): ICellRanges | null;
385
+ /**
386
+ * What references this SYMBOL — cells and names, one answer; `null` when nothing does.
387
+ *
388
+ * @remarks
389
+ * **Symbol-level, not target-level.** `=SUM(Revenue)` is a dependent of `Revenue`;
390
+ * `=SUM(Sales!$B$2:$B$100)` is not, even where that is exactly what `Revenue` designates. So
391
+ * `named.getRanges()?.getDirectDependents()` is not a substitute — it answers the address
392
+ * question, and for a name holding an expression (`TaxRate = 0.21`) there are no ranges to ask
393
+ * at all.
394
+ *
395
+ * **A dependent NAME rides in the same collection** as an `INamedRange` node: with
396
+ * `Doubled = Base*2`, `Doubled` is a dependent of `Base` as surely as any cell that names it —
397
+ * delete `Base` and every cell reading `Doubled` goes `#NAME?` too, without ever having
398
+ * mentioned `Base`. Such a member carries the `isINamedRange` brand; its coords are the name's
399
+ * ANCHOR (its defining cell), never a target, so lead with `getName()` when displaying one.
400
+ *
401
+ * This is the "is it safe to redefine or delete this name?" primitive: these are precisely the
402
+ * dependents that go `#NAME?` if the name is removed — an answer with no members at all
403
+ * (`null`) is the only genuinely-unused reading. The engine already tracks both edges — a name
404
+ * compiles into its own grid, and every formula that mentions one carries its id — so this is
405
+ * a door onto existing bookkeeping.
406
+ *
407
+ * Cells are reduced to regions rather than listed per cell, exactly as
408
+ * {@link ICell.getDirectDependents} does: a column of 400 formulas reading the name comes back
409
+ * as one range. Name nodes lead, cells follow.
410
+ */
411
+ getDirectDependents(): ICellRanges | null;
412
+ /**
413
+ * The transitive downstream of this name — everything that would recalculate if its expression
414
+ * changed, cells and names both.
415
+ *
416
+ * @remarks
417
+ * {@link getDirectDependents} walked to exhaustion across BOTH graphs (the symbol edges names
418
+ * ride on, and the ordinary cell graph between them), and the same distinction the cell family
419
+ * draws ({@link ICell.getDependents}). Direct is the blast radius of DELETING the name (those
420
+ * dependents go `#NAME?`); this is the blast radius of REDEFINING it.
421
+ *
422
+ * With `Outer = Mid*3` and `Mid = Base*2`, `Base` reports `Mid` and `Outer` as name nodes plus
423
+ * every cell downstream of either. A cycle terminates and reports the names on it, this one
424
+ * included.
425
+ */
426
+ getDependents(): ICellRanges | null;
427
+ /**
428
+ * Removes this named formula from its collection.
429
+ */
430
+ delete(): void;
431
+ }
432
+ /**
433
+ * What a {@link FormulaTokenContext} names — the two constructs that open an argument
434
+ * list, and the two registries that can resolve {@link FormulaTokenContext.name}.
435
+ */
436
+ type FormulaTokenContextType = 'function' | 'table';
437
+ /**
438
+ * What a token sits INSIDE — the enclosing call and, for a token that is one, which argument.
439
+ *
440
+ * @remarks
441
+ * Stamped on every token within an argument list, including the delimiters that opened and closed
442
+ * it (they carry `argIndex: -1`). It is what turns a flat token list into a tree: `B2` at argument
443
+ * 0 of `SUM`, rather than just `B2`.
444
+ */
445
+ interface FormulaTokenContext {
446
+ /**
447
+ * The display name of the enclosing function (`SUM`) or table (`Sales`).
448
+ *
449
+ * @remarks
450
+ * Always a DISPLAY name, never the stable id the AST carries — resolved alongside the token's
451
+ * own `value`/`text`, and localized the same way (see {@link FormulaToken.value}). An unknown
452
+ * function keeps the name as typed.
453
+ */
454
+ name: string;
455
+ /**
456
+ * Which argument of {@link name} this token belongs to, zero-based.
457
+ *
458
+ * @remarks
459
+ * `-1` when the token is not in an argument at all — the delimiters themselves (`(`, `)`, `[`,
460
+ * `]`). A separator belongs to the argument BEFORE it.
461
+ */
462
+ argIndex: number;
463
+ /**
464
+ * Whether {@link name} is a function (`SUM(`) or a table (`Sales[`).
465
+ */
466
+ type: FormulaTokenContextType;
467
+ }
468
+ /**
469
+ * Which part of a reference a cell token is, relative to a range operator `:` — the signal
470
+ * {@link IFormula.setReferenceModeAt} needs to cycle the correct corner.
471
+ * - `'self'` — a standalone cell reference (no `:`).
472
+ * - `'left'` / `'right'` — the operands of a range. A single-cell range `A1:A1` is still a range, so
473
+ * its two cell tokens are `'left'` and `'right'` — NOT `'self'` (coords alone can't tell them apart).
474
+ */
475
+ type ReferenceSide = 'left' | 'right' | 'self';
476
+ /**
477
+ * The {@link FormulaToken.value} of a `named` token — a reference to a named formula, split into
478
+ * its name and its optional sheet qualifier.
479
+ *
480
+ * @remarks
481
+ * The counterpart of {@link IRange.FixableCellCoords} for a `cell` token: the qualifier lives
482
+ * beside the name rather than smeared into it, so a serializer can re-emit `Sheet1!MyName`
483
+ * without re-parsing the text.
484
+ */
485
+ interface NamedRef {
486
+ /**
487
+ * The name as it should be displayed or typed, e.g. `MyName`.
488
+ *
489
+ * @remarks
490
+ * Always the CURRENT display name — a rename is already reflected here, and the name a consumer
491
+ * reads is the one they can hand back to the API.
492
+ */
493
+ readonly name: string;
494
+ /**
495
+ * The sheet name for a sheet-scoped name (`Sheet1!MyName`).
496
+ *
497
+ * @remarks
498
+ * Absent (or `null`) for a workbook-scoped name — the common case. Bare, so it still needs
499
+ * quoting when it contains spaces.
500
+ */
501
+ readonly scope?: string | null;
502
+ /**
503
+ * `true` on an OPTIONAL `LAMBDA` parameter DECLARATION — the `[b]` in `LAMBDA(a,[b],a+1)`.
504
+ *
505
+ * @remarks
506
+ * The brackets are declaration syntax, not part of the name (`name` stays `b`), so they are
507
+ * carried as this flag and re-imaged by the serializer — the same split as a sheet qualifier.
508
+ * Never set on a USE of the parameter, nor outside a `LAMBDA` declaration list.
509
+ */
510
+ readonly optional?: boolean;
511
+ }
512
+ /**
513
+ * The {@link FormulaToken.value} of an error-REFERENCE token — `#REF!` or `#NAME?`, a reference
514
+ * whose target is gone — split into the error it resolves to and its optional sheet qualifier.
515
+ *
516
+ * @remarks
517
+ * `Data!#REF!` is what a row delete leaves behind, and the qualifier is the only remaining record
518
+ * of WHICH sheet's cells died — so it is carried beside the error rather than smeared into the
519
+ * text, exactly as {@link NamedRef} carries a name's. OOXML models the same distinction natively
520
+ * (`PtgRefErr` vs `PtgRefErr3d`).
521
+ *
522
+ * Only error tokens that are REFERENCES take this shape. An error LITERAL (`#DIV/0!`, `#N/A`) is a
523
+ * value, never scoped, and its `value` stays a plain {@link FormulaError}. Both arrive as
524
+ * `type: 'error'`, so a consumer that wants the error either way reads `value.error ?? value`.
525
+ *
526
+ * Reference-layer only: EVALUATION of a `#REF!` still produces the plain {@link FormulaError}, so
527
+ * a cell value never holds one of these.
528
+ */
529
+ interface ErrorRef {
530
+ /**
531
+ * The error the dead reference resolves to — `#REF!` (deleted cells) or `#NAME?` (a stored
532
+ * unresolvable name).
533
+ */
534
+ readonly error: FormulaError.Known;
535
+ /**
536
+ * The sheet name for a qualified error reference (`Data!#REF!`).
537
+ *
538
+ * @remarks
539
+ * Absent (or `null`) when the break was local to the formula's own sheet — the bare form Excel
540
+ * writes for a same-sheet delete, and the only form it writes when the SHEET itself is deleted.
541
+ * Bare, so it still needs quoting when it contains spaces.
542
+ */
543
+ readonly scope?: string | null;
544
+ }
545
+ /**
546
+ * Represents a portion of a formula for rendering typical in an editor.
547
+ */
548
+ interface FormulaToken {
549
+ /**
550
+ * The type of token.
551
+ */
552
+ type: string;
553
+ /**
554
+ * The resolved/normalized form of the token; the shape depends on {@link type}.
555
+ *
556
+ * @remarks
557
+ * Reference tokens are structured — a `cell` token carries {@link IRange.FixableCellCoords},
558
+ * a `named` token a {@link NamedRef}, and an error REFERENCE token (`#REF!`, `#NAME?`) an
559
+ * {@link ErrorRef}, each holding its own sheet qualifier (`coords.scope` / `ref.scope`) so
560
+ * serializers can re-emit `Sheet1!…`. Most other tokens (operators, function names, separators)
561
+ * carry a string; literals carry their parsed value (number, boolean, error).
562
+ */
563
+ value: string | IRange.FixableCellCoords | NamedRef | ErrorRef | any;
564
+ /**
565
+ * The raw source text this token occupied — exactly the characters that produced it (a whitespace
566
+ * token holds the literal spaces). Concatenating `text` across the whole array reproduces the
567
+ * original expression, so a consumer can derive each token's character offset as the running sum
568
+ * of `text.length` — no separate start/end is needed.
569
+ *
570
+ * @remarks
571
+ * Pairs with {@link value}: `text` is what was typed, `value` is the resolved/normalized form. The
572
+ * two diverge exactly where normalization is lossy — a number (`3.0` → `3`, `1**2` → `100`) or a
573
+ * cell (raw `b2` vs the resolved coords). `undefined` only for a token with no captured source
574
+ * image (e.g. a reference the engine rewrote programmatically rather than one the user typed).
575
+ */
576
+ text?: string;
577
+ /**
578
+ * Allows for partial formula evaluation for tooltips or formula writing.
579
+ * Only available for tokens types that can be evaluated.
580
+ *
581
+ * @remarks
582
+ * To determine the 'token span' for the evaluation you can can tokens left and right
583
+ * until you reach a token that has a larger evalIndex or there are no more tokens.
584
+ */
585
+ evalIndex?: number;
586
+ /**
587
+ * `true` when this token is part of a reference *literal* — a cell (`A1`), a range operator that
588
+ * binds one (`:`, ` `, `#`, `@`), a named reference, or a structured-reference part. Lets an editor
589
+ * color the whole reference span (operators included) without enumerating token types.
590
+ *
591
+ * @remarks
592
+ * Distinct from merely having a {@link referenceIndex}: a function that *returns* a reference (e.g.
593
+ * `INDEX`, `OFFSET`) carries a `referenceIndex` but is **not** a reference literal, so `isReference`
594
+ * is absent on its `function` token. Color by `referenceIndex` only when `isReference` is `true`.
595
+ */
596
+ isReference?: boolean;
597
+ /**
598
+ * `true` when this token is a **name-completion candidate** — an identifier that could be resolved
599
+ * against the function / named-reference / table registries: a function name, a named reference, a
600
+ * table reference, or a partial identifier still being typed (a trailing run in an `unparsed` tail).
601
+ * The sibling of {@link isReference}: it lets an editor decide, from the caret's token alone, that an
602
+ * autocomplete list belongs here — without re-scanning the raw text. Use the token's `text` as the
603
+ * prefix to filter. Absent on non-candidate tokens (numbers, strings, cells, operators, punctuation).
604
+ */
605
+ isLookup?: boolean;
606
+ /**
607
+ * Indicates that the token is part of a reference.
608
+ *
609
+ * @remarks
610
+ * * Multiple tokens can be part of the same reference.
611
+ * * The referenceIndex will be the offset of the range in the {@link ICalculation.IFormula.getReferences} array.
612
+ */
613
+ referenceIndex?: number;
614
+ /**
615
+ * For a reference **cell** token, which part of the reference it is — `'self'` for a standalone cell,
616
+ * or `'left'`/`'right'` for the operands of a range `:` (see {@link ReferenceSide}). Lets an editor
617
+ * pick the range corner for {@link IFormula.setReferenceModeAt} (F4) without re-parsing. Absent on
618
+ * non-reference tokens.
619
+ */
620
+ refSide?: ICalculation.ReferenceSide;
621
+ /**
622
+ * If the token is part of a a function this will be set. This will be the 'closest' function if nested.
623
+ */
624
+ context?: ICalculation.FormulaTokenContext;
625
+ }
626
+ /**
627
+ * A read-only "lite" view of one node of a formula's AST, as presented to a
628
+ * {@link FormulaTransform}.
629
+ *
630
+ * @remarks
631
+ * Values are DISPLAY-resolved — a `named` node presents its display text ({@link NamedRef}),
632
+ * a `function` node its canonical (English) name, a `tableReference`/`tableColumn` its display
633
+ * name, and a `cell` node its coordinates with a sheet display-name qualifier. Stable internal
634
+ * ids never appear. Internal compilation details (trivia/whitespace, evaluation indices,
635
+ * caches) are not exposed; whitespace and typed images are carried across a transform by the
636
+ * engine invisibly.
637
+ *
638
+ * `type` uses the same vocabulary as {@link FormulaToken.type} (`'function'`, `'infix'`,
639
+ * `'prefix'`, `'postfix'`, `'named'`, `'cell'`, `'tableReference'`, `'tableSpecifier'`,
640
+ * `'tableColumn'`, `'number'`, `'string'`, `'boolean'`, `'error'`, …).
641
+ *
642
+ * A transform returns nodes as PLAIN OBJECTS in this shape — either a shallow spread-copy of a
643
+ * node it received (`{ ...node, value }` to rename, `{ ...node, inputs }` to re-child; identity
644
+ * and whitespace trivia are preserved through a spread) or a fresh literal
645
+ * (`{ type: 'function', value: name, inputs }`). The engine derives the internals (reference
646
+ * flags, images) from `type` + `value`; there is no node class to construct.
647
+ */
648
+ interface FormulaNode {
649
+ /**
650
+ * The node type — same vocabulary as {@link FormulaToken.type}.
651
+ */
652
+ readonly type: string;
653
+ /**
654
+ * The display-resolved value; the shape depends on {@link type} (see {@link FormulaToken.value}).
655
+ */
656
+ readonly value?: any;
657
+ /**
658
+ * Child nodes, or `null`/absent for a leaf.
659
+ */
660
+ readonly inputs?: readonly FormulaNode[] | null;
661
+ /**
662
+ * `true` when the node is part of a reference expression (a cell, a range operator, a named
663
+ * reference, a structured-reference part).
664
+ */
665
+ readonly isReference?: boolean;
666
+ }
667
+ /**
668
+ * A structural transform over a formula's AST — a visitor applied where formulas serialize
669
+ * ({@link ISheet.ToJSONOptions.formulaTransform | toJSON}) or parse.
670
+ *
671
+ * @remarks
672
+ * Called once for every node, children before parents (depth-first). Return a replacement
673
+ * {@link FormulaNode} to substitute the node, or `undefined`/`void` to leave it alone.
674
+ * Replacement is copy-on-write — untouched subtrees are shared. The ROOT is visited last with
675
+ * `parent === undefined`, so a whole-tree (multi-pass) rewrite is simply a visitor that acts
676
+ * only there and returns the new root.
677
+ *
678
+ * `parent` is the enclosing node — needed by parent-sensitive rules (e.g. `@` directly under
679
+ * a `tableReference` is a this-row marker, elsewhere an implicit intersection).
680
+ *
681
+ * The transform runs ONCE per formula block on the compiled AST (per-cell re-anchoring and
682
+ * re-imaging stay untouched); a transform that replaces nothing costs no recompile. It must be
683
+ * side-effect free and no-op-safe on a partially parsed (errored) tree.
684
+ */
685
+ type FormulaTransform = (node: FormulaNode, parent: FormulaNode | undefined) => FormulaNode | void;
686
+ /**
687
+ * Options for evaluating a formula.
688
+ */
689
+ interface EvaluateOptions {
690
+ /**
691
+ * If specified, evaluates only the token span associated with this index.
692
+ *
693
+ * @defaultValue `-1` (full evaluation)
694
+ *
695
+ * @remarks
696
+ * Use {@link ICalculation.FormulaToken.evalIndex} to discover valid indices.
697
+ */
698
+ evalIndex?: number;
699
+ /**
700
+ * Temporary range of values to use for this evaluation.
701
+ *
702
+ * @remarks
703
+ * - **Not implemented yet** — evaluation currently ignores this option.
704
+ * - Does **not** mutate the workbook.
705
+ * - Acts as a pure overlay for one or more precedents used by this formula.
706
+ * - Typically a literal or computed `IRange` created via `ctx.getRange(...)`
707
+ * in predicates or editors.
708
+ */
709
+ values?: IRange;
710
+ /**
711
+ * Evaluate the formula once per cell of the given coordinates.
712
+ *
713
+ * @remarks
714
+ * - The formula must be anchored at the top-left of `block` (the `coords` passed to
715
+ * {@link ICalculation.createFormula}); relative and structured references
716
+ * are adjusted per-cell, exactly as a formula filled across the shape.
717
+ * - The result is an `IRange` of the block's shape, read with local coordinates
718
+ * (`getValueAt(0, 0)` is the block's top-left). A 1×1 block still unboxes to a
719
+ * scalar unless {@link alwaysReturnRange} is set.
720
+ * - A cell whose evaluation errors carries the error as that cell's value; other
721
+ * cells are unaffected.
722
+ * - Cells evaluate sequentially — an async cell (a formula hitting an async function)
723
+ * settles before the next cell starts.
724
+ * - Honored by temporary formulas ({@link ICalculation.evaluate} /
725
+ * {@link ICalculation.createFormula}); a committed cell formula ignores it.
726
+ * - Often used for "preview this formula over this region" or batched
727
+ * validation of an expression over a condition range.
728
+ */
729
+ block?: IRange.Coords;
730
+ /**
731
+ * If specified, the result will always be returned as an `IRange`,
732
+ * even when the logical result is a single scalar value.
733
+ *
734
+ * @remarks
735
+ * By default, formulas that evaluate to a single cell return a scalar
736
+ * value. Setting this to `true` disables that scalar unboxing and
737
+ * keeps the result in range form (1×1), which can be useful for
738
+ * batch-oriented or shape-sensitive consumers.
739
+ */
740
+ alwaysReturnRange?: boolean;
741
+ }
742
+ /**
743
+ * Options for converting a formula to text.
744
+ */
745
+ interface FormulaTextOptions {
746
+ /**
747
+ * If `true`, the formula will be returned in R1C1 notation.
748
+ *
749
+ * @defaultValue `false`
750
+ */
751
+ r1c1?: boolean;
752
+ /**
753
+ * The cell coordinates for which the formula text is being requested.
754
+ */
755
+ cell?: IRange.CellCoords;
756
+ /**
757
+ * If specified, the formula text will only be generate for a given eval index.
758
+ */
759
+ evalIndex?: number;
760
+ /**
761
+ * If `true`, function names are returned in CANONICAL (English) form — the
762
+ * persistence/interchange representation (files, clipboard interchange, APIs).
763
+ * Default `false` = display form, localized via the active language pack
764
+ * (I18N-DESIGN.md Plane 3).
765
+ *
766
+ * @defaultValue `false`
767
+ */
768
+ canonical?: boolean;
769
+ /**
770
+ * A structural transform applied to the compiled AST before imaging — how a format
771
+ * exporter (e.g. xlsx) applies its version-compatibility spellings.
772
+ *
773
+ * @see {@link FormulaTransform}
774
+ */
775
+ formulaTransform?: FormulaTransform;
776
+ }
777
+ interface Events extends IModel.Events {
778
+ /**
779
+ * Called when the calculation has been updated and
780
+ * a calculation has not been started.
781
+ */
782
+ onStale?(source: ICalculation): void;
783
+ /**
784
+ * Called when a calculation is starting.
785
+ */
786
+ onStarting?(source: ICalculation): void;
787
+ /**
788
+ * Called when a calculation is stopping.
789
+ */
790
+ onStopping?(source: ICalculation): void;
791
+ /**
792
+ * Called when the calculation status has changed.
793
+ */
794
+ onStatusChange?(source: ICalculation): void;
795
+ /**
796
+ * Called when a calculation is completed.
797
+ */
798
+ onComplete?(source: ICalculation): void;
799
+ /**
800
+ * Called when the calculation engine is unable to calc.
801
+ *
802
+ * @remarks
803
+ * This is not when a specific function fails, but when the calculation engine is unable to complete the calculation.
804
+ */
805
+ onError?(source: ICalculation): void;
806
+ /**
807
+ * Called when the ICalculation has been loaded and is ready to calc.
808
+ */
809
+ onReady?(source: ICalculation): void;
810
+ /**
811
+ * Called when the ICalculation has been loaded and is ready to calc.
812
+ */
813
+ onStop?(source: ICalculation): void;
814
+ }
815
+ /**
816
+ * Represents the calculation engine's overall status.
817
+ */
818
+ const Status: {
819
+ /**
820
+ * The calculation engine is in manual mode and will only update cell values when a calculation is explicitly triggered.
821
+ */
822
+ readonly Ready: "ready";
823
+ /**
824
+ * The calculation engine has encountered an error and is unable to perform calculations.
825
+ * This status represents engine-level errors, separate from cell-level errors (which are represented as Scalar.Error values).
826
+ */
827
+ readonly Error: "error";
828
+ /**
829
+ * The calculation engine is starting up and initializing its internal state.
830
+ */
831
+ readonly Starting: "starting";
832
+ /**
833
+ * The calculation engine is stopping and cleaning up its internal state.
834
+ */
835
+ readonly Stopping: "stopping";
836
+ /**
837
+ * The calculation engine is disabled.
838
+ */
839
+ readonly Off: "off";
840
+ };
841
+ type Status = typeof Status[keyof typeof Status];
842
+ /**
843
+ * Represents the calculation mode of the engine, which determines when and how formulas are recalculated.
844
+ */
845
+ const CalculationMode: {
846
+ /**
847
+ * In automatic calculation mode, the calculation engine automatically recalculates all dependent formulas
848
+ * whenever a change is made to the workbook that affects their inputs. This is the default mode and ensures
849
+ * that all formula results are always up to date.
850
+ */
851
+ readonly Automatic: "auto";
852
+ /**
853
+ * In manual calculation mode, the calculation engine does not automatically recalculate formulas when changes
854
+ * are made. Instead, formulas are only recalculated when the user explicitly triggers a calculation
855
+ * (e.g., by pressing F9 or calling `calculate()`).
856
+ * This mode can improve performance in large workbooks where automatic recalculation would be too slow, but it
857
+ * requires users to remember to manually recalculate to see updated results.
858
+ */
859
+ readonly Manual: "manual";
860
+ /**
861
+ * Calculates new formula results every time the relevant data is changed, unless the formula is in a data table.
862
+ */
863
+ readonly AutomaticExceptTables: "automaticExceptTables";
864
+ };
865
+ type CalculationMode = typeof CalculationMode[keyof typeof CalculationMode];
866
+ /**
867
+ * Represents the status of a calculation result
868
+ */
869
+ const ResultStatus: {
870
+ /**
871
+ * The value is up-to-date and reflects the latest calculation.
872
+ */
873
+ readonly Ready: "ready";
874
+ /**
875
+ * The value may not reflect the latest calculation, typically due to the calculation engine being in manual mode.
876
+ */
877
+ readonly Stale: "stale";
878
+ /**
879
+ * The value is being calculated asynchronously, typically because the function used returned a Promise.
880
+ * All dependent values will also be in the Pending state. If the promise returns an error or times out, the value will be an error value.
881
+ */
882
+ readonly Pending: "pending";
883
+ /**
884
+ * The value is up-to-date, but the underlying data source is streaming live updates.
885
+ */
886
+ readonly Streaming: "streaming";
887
+ };
888
+ type ResultStatus = typeof ResultStatus[keyof typeof ResultStatus];
889
+ /**
890
+ * Options for when calculating.
891
+ */
892
+ interface CalculateOptions {
893
+ /**
894
+ * If `true` a full calc will be done not just invalid values.
895
+ *
896
+ * @defaultValue `false`
897
+ */
898
+ full?: boolean;
899
+ /**
900
+ * If specified, only the formulas intersecting with this range will be calculated.
901
+ *
902
+ * @remarks
903
+ * If `full` is `true`, this option is ignored and a full calculation is performed.
904
+ */
905
+ range?: ICellRange.Address;
906
+ /**
907
+ * If specified, only the named sheet SEEDS the pass — Excel's "Calculate Sheet" (Shift+F9).
908
+ *
909
+ * @remarks
910
+ * Unlike {@link range}, which collects every formula it covers whether or not it is out of date,
911
+ * this still respects dirtiness: it narrows WHICH sheet's pending work is picked up, not whether
912
+ * up-to-date formulas are recalculated. Combine with `full` to force one sheet.
913
+ *
914
+ * Only the seed is scoped. Dependents on other sheets are still evaluated (they are reached by
915
+ * the dependency walk), and volatiles are still collected workbook-wide — they are drained and
916
+ * re-registered by evaluation, so skipping them would deregister the other sheets' volatiles.
917
+ * Excel leaves both stale; being more current is the safe direction.
918
+ *
919
+ * This is deliberately NOT the internal per-grid entry point (`ICalcGrid.calculate`), which is
920
+ * how ordinary edits schedule their pass and must stay workbook-wide — a formula's precedents
921
+ * live in other sheets, and a named formula's body lives in a virtual grid of its own.
922
+ */
923
+ scope?: string;
924
+ }
925
+ interface JSON {
926
+ /**
927
+ * Indicates whether the workbook has completed its last calculation cycle.
928
+ *
929
+ * @remarks
930
+ * If `true`, the workbook is up to date with calculations.
931
+ */
932
+ calcCompleted?: boolean;
933
+ /**
934
+ * Defines the calculation mode for the workbook.
935
+ */
936
+ calcMode?: ICalculation.CalculationMode;
937
+ /**
938
+ * Specifies whether calculations should be performed when the workbook is saved.
939
+ *
940
+ * @remarks
941
+ * If `true`, the workbook recalculates all formulas before saving.
942
+ */
943
+ calcOnSave?: boolean;
944
+ /**
945
+ * Specifies whether calculations should be performed concurrently across multiple threads.
946
+ *
947
+ * @remarks
948
+ * If `true`, the workbook uses multi-threading for calculations.
949
+ */
950
+ concurrentCalc?: boolean;
951
+ /**
952
+ * Specifies whether concurrent calculations are allowed in manual calculation mode.
953
+ *
954
+ * @remarks
955
+ * If `true`, manual calculations can utilize multiple threads.
956
+ */
957
+ concurrentManualCount?: boolean;
958
+ /**
959
+ * Specifies whether the workbook forces a full recalculation of all formulas.
960
+ *
961
+ * @remarks
962
+ * If `true`, all formulas will be recalculated from scratch regardless of dependencies.
963
+ */
964
+ forceFullCalc?: boolean;
965
+ /**
966
+ * Specifies whether a full recalculation should be performed when the workbook is loaded.
967
+ *
968
+ * @remarks
969
+ * If `true`, the workbook recalculates all formulas upon loading.
970
+ */
971
+ fullCalcOnLoad?: boolean;
972
+ /**
973
+ * Indicates whether calculations should be performed using full precision.
974
+ *
975
+ * @remarks
976
+ * If `true`, all calculations are performed with the maximum precision available.
977
+ */
978
+ fullPrecision?: boolean;
979
+ /**
980
+ * Specifies whether the workbook should iterate calculations when circular references are present.
981
+ *
982
+ * @remarks
983
+ * If `true`, the workbook allows iterative calculations to resolve circular references.
984
+ */
985
+ iterate?: boolean;
986
+ /**
987
+ * Defines the maximum number of iterations allowed when performing iterative calculations.
988
+ *
989
+ * @defaultValue `100`
990
+ *
991
+ * @remarks
992
+ * This value is only used if `iterate` is set to `true`.
993
+ */
994
+ maxIterations?: number;
995
+ /**
996
+ * Defines the maximum change between iterations that must be reached before the iterative calculation stops.
997
+ *
998
+ * @defaultValue `0.001`
999
+ *
1000
+ * @remarks
1001
+ * A smaller delta will make the iterative calculation more precise but may take longer to complete.
1002
+ *
1003
+ */
1004
+ maxIterateChange?: number;
1005
+ /**
1006
+ * Specifies the reference mode for calculations.
1007
+ *
1008
+ * @remarks
1009
+ * Possible values could include 'A1' or 'R1C1', representing different reference styles.
1010
+ */
1011
+ refMode?: string;
1012
+ }
1013
+ interface IListeners extends IListener.Callbacks<ICalculation, ICalculation.Events> {
1014
+ }
1015
+ }
1016
+ //# sourceMappingURL=ICalculation.d.ts.map