@sheetxl/sdk 0.8.0-beta.10 → 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 (480) hide show
  1. package/README.md +1 -1
  2. package/browser/esm/B7aUIvgUjncMMD_i.mjs +394 -0
  3. package/browser/esm/{Cgd5BnM3hg9RyUel.mjs → BFagR2JeWs74iAG3.mjs} +1 -1
  4. package/browser/esm/BGOFfpxr2jPIdqmV.mjs +40 -0
  5. package/browser/esm/{CdLZWVcH8cncBUPJ.mjs → BLoUBId2xZpXAK_H.mjs} +110 -261
  6. package/browser/esm/BMyDRQ716j79h_bH.mjs +86 -0
  7. package/browser/esm/{o8MFgcVXns987D6_.mjs → BVDiOXGMc5_FMGfy.mjs} +6 -6
  8. package/browser/esm/{BzLfNyc6OOShIErH.mjs → BjkCiv5Jz6WYKZeu.mjs} +2 -2
  9. package/browser/esm/{De175LygU7ot4nQm.mjs → BkBhLS0l6z8sxI6D.mjs} +2 -2
  10. package/browser/esm/{Y79I7Sm8kjaYexhf.mjs → BnG31I6Oj_HEtSPS.mjs} +1 -1
  11. package/browser/esm/BoV6zPBnfqCBCqZ7.mjs +7729 -0
  12. package/browser/esm/{CYyv6uGjo10ig5FP.mjs → BpgskG1Er_lGQ_yS.mjs} +1 -1
  13. package/browser/esm/{C9B0djuUarfNdoj0.mjs → BtvLTTfSBdAKplVG.mjs} +1 -1
  14. package/browser/esm/{zqJOaweiXE9D8RY1.mjs → C16ycKja6zG0crV_.mjs} +27687 -38788
  15. package/browser/esm/C2VbEI_XVAoseAwa.mjs +1552 -0
  16. package/browser/esm/{Btg43M1Bf-ENDreu.mjs → C4MqfLn9Dm-l3OIk.mjs} +1 -1
  17. package/browser/esm/C5E6zSGAALWf61n4.mjs +199 -0
  18. package/browser/esm/{CjsUGJEQSbGjnH6R.mjs → CHU6iu_WGlm7fLET.mjs} +1 -1
  19. package/browser/esm/{DhKkrCVASZ6Isvz6.mjs → CQYjO777cmAznUzK.mjs} +1 -1
  20. package/browser/esm/{D4uVlrG0xEFctsSM.mjs → CU3DmJ-YnVVrC1_k.mjs} +285 -67
  21. package/browser/esm/{ClB5ix51roQOpZEr.mjs → CV5EGEjG5_-CPpP0.mjs} +2877 -2067
  22. package/browser/esm/{CSx9ed1JOs7K5BXO.mjs → CaB7J-xgfKO2uAkG.mjs} +2 -2
  23. package/browser/esm/CkxWugaJFjDGZNZ-.mjs +12 -0
  24. package/browser/esm/{CZ5oa92wZEAXebgk.mjs → ClPfI4lODvCece29.mjs} +32 -22
  25. package/browser/esm/ClbvFbFzFzXLBKNN.mjs +193 -0
  26. package/browser/esm/{Cqr3knDsBvoVZ6MN.mjs → Ctjb0SsxV4K4MMqG.mjs} +2 -2
  27. package/browser/esm/{Bk7xxbdDpa7-sIwd.mjs → D5np__Jb1euAyaLw.mjs} +2 -2
  28. package/browser/esm/{Di58Ji1n--3Mgc_2.mjs → DEiPS3Dr-s4fPbVZ.mjs} +1 -1
  29. package/browser/esm/DLLE0FZNsKxbBzRn.mjs +128 -0
  30. package/browser/esm/{BqskM7wA8oPfFQue.mjs → DWNzqw7DUKwoxjri.mjs} +2 -2
  31. package/browser/esm/{BEAY9XgKNx-bakXW.mjs → Dlmig06rIo7cInRk.mjs} +1 -1
  32. package/browser/esm/DvAaxH6z_tGvrRzl.mjs +5132 -0
  33. package/browser/esm/Dyq_ivuHvlXLwPCl.mjs +12831 -0
  34. package/browser/esm/{Dtoyt8q5RyGAlxCp.mjs → PcHFjNzQsE54POri.mjs} +1 -1
  35. package/browser/esm/S2dNNx1a5ydRnARM.mjs +367 -0
  36. package/browser/esm/f1IoRb7tEb0QmCSt.mjs +110 -0
  37. package/browser/esm/gssVX_FH1XFN-twD.mjs +210 -0
  38. package/browser/esm/index.mjs +999 -850
  39. package/browser/esm/nvU0ClAbf0g94YBK.mjs +1695 -0
  40. package/browser/esm/{BcHmrKHwMMOlzc9_.mjs → zlLuW405RSguy4Kn.mjs} +34 -34
  41. package/licenses/dependencies.txt +75 -75
  42. package/node/esm/{CnSQ7MTXAUAyBOoS.mjs → 2Kihw_-5lVTEnwMa.mjs} +285 -64
  43. package/node/esm/857CIBgQgGpnqrXk.mjs +199 -0
  44. package/node/esm/B084DssTcdBheTp_.mjs +7966 -0
  45. package/node/esm/B21JjOLghRoDOrkx.mjs +134 -0
  46. package/node/esm/{CImNvdz1iP-lUlro.mjs → BIRq1kT7lLRzns9t.mjs} +181 -181
  47. package/node/esm/{CD9wbvufChVYYkrI.mjs → BIwObuhTJYf0jpUa.mjs} +2 -2
  48. package/node/esm/Bbf1Pm9Gk7YpLTvg.mjs +12 -0
  49. package/node/esm/{B6D7sSetrcOWLsKj.mjs → BqiexuA89caYnAPz.mjs} +1 -1
  50. package/node/esm/{BH1v-E4Ro3bR7Znw.mjs → BrCKGFRsX_ezFJ4B.mjs} +151 -302
  51. package/node/esm/CCN5vD410obwdz38.mjs +405 -0
  52. package/node/esm/{Bh4dv6tMjXX3X4nI.mjs → CDHdgJXH2vS71WMc.mjs} +1 -1
  53. package/node/esm/{DCplLG93GfTs1vNw.mjs → CGp6VZL-gZa9Uezx.mjs} +1 -1
  54. package/node/esm/{B9ljpEIZg6wOTzRE.mjs → CNCNJNg890KdgkWh.mjs} +1 -1
  55. package/node/esm/{Bqd62L8KFgdS0Vou.mjs → CZICGK_ss0HoGHCP.mjs} +2 -2
  56. package/node/esm/{D7MfcID2Wf6l6VpC.mjs → CZiqiay42tFTrLI4.mjs} +1 -1
  57. package/node/esm/{Bsx9uijd4X_SKV3L.mjs → CdJHUJSBRHZoryPe.mjs} +41 -41
  58. package/node/esm/Ct3h15sCus4Tgt6M.mjs +1762 -0
  59. package/node/esm/CwePQwTILHHjGDkZ.mjs +1033 -0
  60. package/node/esm/{CUUoseJmFsCf82bb.mjs → CzXT00vrQa1_gvW9.mjs} +1 -1
  61. package/node/esm/{C6ZXsNyLXI6zA63X.mjs → D1TKBVmoKGAXf37B.mjs} +9 -9
  62. package/node/esm/{BN9j8V9gCExMjVtJ.mjs → D2KBymQJd1XhpeQD.mjs} +1 -1
  63. package/node/esm/{MiU4rDOiocmJ-9Ry.mjs → D6e2z7eZpxOJXHc7.mjs} +1 -1
  64. package/node/esm/{BtuY37FumvLE7EBo.mjs → D8zEN-6ZdDqDvTxM.mjs} +156 -146
  65. package/node/esm/DNRhGK-8Tr9xcRyc.mjs +8320 -0
  66. package/node/esm/DOU54VsOjG-m-NyQ.mjs +210 -0
  67. package/node/esm/DUTskXCXref-IJnI.mjs +133 -0
  68. package/node/esm/{DMD12JUh7HJw2-jl.mjs → D_t5AUxSm7_icjzq.mjs} +1 -1
  69. package/node/esm/Db0v7zXNnyjBIjjI.mjs +372 -0
  70. package/node/esm/{CUQi5ZtMO02nhG0W.mjs → De2IONBxQhz-Qbyh.mjs} +1 -1
  71. package/node/esm/Df1bL6VFvrqIdSLB.mjs +40 -0
  72. package/node/esm/DkwIPzKc3UwdUIfM.mjs +86 -0
  73. package/node/esm/DrTZbfemSLq2mseG.mjs +111 -0
  74. package/node/esm/OVfaSb506tNSIvbv.mjs +57107 -0
  75. package/node/esm/{DefYISWfdZJFx57m.mjs → cGwrLA1RCE-WhJ7w.mjs} +1 -1
  76. package/node/esm/index.mjs +2657 -65664
  77. package/node/esm/mFiBSM7XgBHV9AY7.mjs +13010 -0
  78. package/node/esm/{DdFgXl-Ux2cMBTs_.mjs → yavzZOiZW_EjG9lE.mjs} +1 -1
  79. package/package.json +6 -7
  80. package/resources/contents.json +120 -0
  81. package/resources/fonts/arial-bold-italic.hinted.json +125 -0
  82. package/resources/fonts/arial-bold-italic.metrics.json +13 -13
  83. package/resources/fonts/arial-bold-italic.rows.json +9 -0
  84. package/resources/fonts/arial-bold.hinted.json +125 -0
  85. package/resources/fonts/arial-bold.metrics.json +12 -12
  86. package/resources/fonts/arial-bold.rows.json +9 -0
  87. package/resources/fonts/arial-italic.hinted.json +125 -0
  88. package/resources/fonts/arial-italic.metrics.json +13 -13
  89. package/resources/fonts/arial-italic.rows.json +9 -0
  90. package/resources/fonts/arial-regular.hinted.json +125 -0
  91. package/resources/fonts/arial-regular.metrics.json +12 -12
  92. package/resources/fonts/arial-regular.rows.json +9 -0
  93. package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
  94. package/resources/fonts/calibri-bold-italic.metrics.json +2 -2
  95. package/resources/fonts/calibri-bold-italic.rows.json +9 -0
  96. package/resources/fonts/calibri-bold.hinted.json +122 -0
  97. package/resources/fonts/calibri-bold.metrics.json +1 -1
  98. package/resources/fonts/calibri-bold.rows.json +9 -0
  99. package/resources/fonts/calibri-italic.hinted.json +121 -0
  100. package/resources/fonts/calibri-italic.metrics.json +2 -2
  101. package/resources/fonts/calibri-italic.rows.json +9 -0
  102. package/resources/fonts/calibri-regular.hinted.json +121 -0
  103. package/resources/fonts/calibri-regular.metrics.json +1 -1
  104. package/resources/fonts/calibri-regular.rows.json +9 -0
  105. package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
  106. package/resources/fonts/cambria-bold-italic.metrics.json +26 -26
  107. package/resources/fonts/cambria-bold-italic.rows.json +9 -0
  108. package/resources/fonts/cambria-bold.hinted.json +108 -0
  109. package/resources/fonts/cambria-bold.metrics.json +19 -19
  110. package/resources/fonts/cambria-bold.rows.json +9 -0
  111. package/resources/fonts/cambria-italic.hinted.json +102 -0
  112. package/resources/fonts/cambria-italic.metrics.json +23 -23
  113. package/resources/fonts/cambria-italic.rows.json +9 -0
  114. package/resources/fonts/cambria-regular.hinted.json +110 -0
  115. package/resources/fonts/cambria-regular.metrics.json +18 -18
  116. package/resources/fonts/cambria-regular.rows.json +9 -0
  117. package/resources/fonts/contents.json +280 -0
  118. package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
  119. package/resources/fonts/courier-new-bold-italic.metrics.json +12 -12
  120. package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
  121. package/resources/fonts/courier-new-bold.hinted.json +11 -0
  122. package/resources/fonts/courier-new-bold.metrics.json +12 -12
  123. package/resources/fonts/courier-new-bold.rows.json +9 -0
  124. package/resources/fonts/courier-new-italic.hinted.json +11 -0
  125. package/resources/fonts/courier-new-italic.metrics.json +12 -12
  126. package/resources/fonts/courier-new-italic.rows.json +9 -0
  127. package/resources/fonts/courier-new-regular.hinted.json +11 -0
  128. package/resources/fonts/courier-new-regular.metrics.json +12 -12
  129. package/resources/fonts/courier-new-regular.rows.json +9 -0
  130. package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
  131. package/resources/fonts/times-new-roman-bold-italic.metrics.json +15 -15
  132. package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
  133. package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
  134. package/resources/fonts/times-new-roman-bold.metrics.json +12 -12
  135. package/resources/fonts/times-new-roman-bold.rows.json +9 -0
  136. package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
  137. package/resources/fonts/times-new-roman-italic.metrics.json +16 -16
  138. package/resources/fonts/times-new-roman-italic.rows.json +9 -0
  139. package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
  140. package/resources/fonts/times-new-roman-regular.metrics.json +16 -16
  141. package/resources/fonts/times-new-roman-regular.rows.json +9 -0
  142. package/resources/locales/de/model.msg.json +87 -9
  143. package/resources/locales/en/model.msg.json +88 -10
  144. package/types/scripting-api.json +10636 -8021
  145. package/types/scripting-enums.json +181 -43
  146. package/types/scripting.d.ts +15886 -8459
  147. package/types/src/.generated/wasm/fonts.d.ts +161 -0
  148. package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
  149. package/types/src/.generated/wasm/sdk.d.ts +122 -0
  150. package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
  151. package/types/src/address/AddressUtils.d.ts +10 -1
  152. package/types/src/address/_StructuredAddress.d.ts +58 -0
  153. package/types/src/border/IBorders.d.ts +16 -0
  154. package/types/src/calculation/Calculation.d.ts +93 -363
  155. package/types/src/calculation/FormulaLiterals.d.ts +2 -1
  156. package/types/src/calculation/FormulaText.d.ts +18 -2
  157. package/types/src/calculation/ICalculation.d.ts +37 -9
  158. package/types/src/calculation/INamedFormulasCollection.d.ts +4 -0
  159. package/types/src/calculation/NamedFormulaCollection.d.ts +190 -15
  160. package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
  161. package/types/src/calculation/_TableExtent.d.ts +60 -0
  162. package/types/src/calculation/compiler/CompilerUtils.d.ts +17 -0
  163. package/types/src/calculation/compiler/ParserUtils.d.ts +16 -0
  164. package/types/src/calculation/compiler/Types.d.ts +1 -1
  165. package/types/src/calculation/engine/CalcBackend.d.ts +855 -0
  166. package/types/src/calculation/engine/index.d.ts +10 -0
  167. package/types/src/calculation/executor/CalcExecutor.d.ts +21 -2
  168. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +6 -0
  169. package/types/src/calculation/formula/Formula.d.ts +9 -0
  170. package/types/src/calculation/formula/FormulaBlock.d.ts +6 -0
  171. package/types/src/calculation/formula/IFormulaBlock.d.ts +16 -0
  172. package/types/src/calculation/formula/LambdaValue.d.ts +5 -3
  173. package/types/src/calculation/functions/FunctionDeclarations.d.ts +5 -1
  174. package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
  175. package/types/src/calculation/functions/initializeFunctions.d.ts +0 -12
  176. package/types/src/calculation/grid/CalcGrid.d.ts +40 -4
  177. package/types/src/calculation/grid/CalcGridBackend.d.ts +30 -0
  178. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
  179. package/types/src/calculation/grid/CalcGridUtils.d.ts +8 -1
  180. package/types/src/calculation/grid/FormulaHost.d.ts +51 -6
  181. package/types/src/calculation/grid/ICalcGrid.d.ts +35 -6
  182. package/types/src/calculation/grid/_CalcRequest.d.ts +11 -1
  183. package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
  184. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +27 -2
  185. package/types/src/calculation/state/CalcScope.d.ts +15 -6
  186. package/types/src/calculation/state/CalcState.d.ts +10 -0
  187. package/types/src/calculation/state/CalculationContext.d.ts +2 -2
  188. package/types/src/calculation/state/IContextContainer.d.ts +12 -0
  189. package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
  190. package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
  191. package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
  192. package/types/src/calculation/toolkit/index.d.ts +12 -0
  193. package/types/src/cell/ICell.d.ts +256 -7
  194. package/types/src/cell/ICellHeader.d.ts +7 -6
  195. package/types/src/cell/ICellProtection.d.ts +1 -1
  196. package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
  197. package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
  198. package/types/src/cellRange/ICellRange.d.ts +322 -55
  199. package/types/src/cellRange/ICellRanges.d.ts +8 -3
  200. package/types/src/chart/Chart.d.ts +217 -15
  201. package/types/src/chart/ChartCollection.d.ts +7 -2
  202. package/types/src/chart/IChart.d.ts +1921 -35
  203. package/types/src/chart/IChartCollection.d.ts +27 -2
  204. package/types/src/chart/_ChartParts.d.ts +1066 -0
  205. package/types/src/chart/_ChartSource.d.ts +47 -0
  206. package/types/src/chart/createChart.d.ts +26 -0
  207. package/types/src/chart/index.d.ts +4 -0
  208. package/types/src/chart/kinds/ChartKind.d.ts +252 -0
  209. package/types/src/chart/kinds/_Area.d.ts +3 -0
  210. package/types/src/chart/kinds/_Bar.d.ts +4 -0
  211. package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
  212. package/types/src/chart/kinds/_Bubble.d.ts +3 -0
  213. package/types/src/chart/kinds/_Funnel.d.ts +4 -0
  214. package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
  215. package/types/src/chart/kinds/_Histogram.d.ts +4 -0
  216. package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
  217. package/types/src/chart/kinds/_Line.d.ts +4 -0
  218. package/types/src/chart/kinds/_OfPie.d.ts +4 -0
  219. package/types/src/chart/kinds/_Pie.d.ts +4 -0
  220. package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
  221. package/types/src/chart/kinds/_Radar.d.ts +4 -0
  222. package/types/src/chart/kinds/_Scatter.d.ts +8 -0
  223. package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
  224. package/types/src/chart/kinds/_Surface.d.ts +4 -0
  225. package/types/src/chart/kinds/_Treemap.d.ts +4 -0
  226. package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
  227. package/types/src/chart/kinds/_builtIns.d.ts +11 -0
  228. package/types/src/chart/layout/ChartLayout.d.ts +825 -0
  229. package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
  230. package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
  231. package/types/src/chart/layout/_HitTest.d.ts +36 -0
  232. package/types/src/chart/layout/_Layout.d.ts +25 -0
  233. package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
  234. package/types/src/chart/math/BoxStats.d.ts +35 -0
  235. package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
  236. package/types/src/chart/math/DisplayUnits.d.ts +53 -0
  237. package/types/src/chart/math/Histogram.d.ts +48 -0
  238. package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
  239. package/types/src/chart/math/Treemap.d.ts +28 -0
  240. package/types/src/chart/math/Trendlines.d.ts +71 -0
  241. package/types/src/chart/math/UnitCalcs.d.ts +98 -0
  242. package/types/src/chart/model/ChartModel.d.ts +681 -0
  243. package/types/src/chart/model/_ChartType.d.ts +14 -0
  244. package/types/src/chart/model/_Edits.d.ts +489 -0
  245. package/types/src/chart/model/_Grouping.d.ts +83 -0
  246. package/types/src/chart/model/_Inference.d.ts +52 -0
  247. package/types/src/chart/model/_ModelFacts.d.ts +112 -0
  248. package/types/src/chart/model/_NewChart.d.ts +208 -0
  249. package/types/src/chart/model/_OfPie.d.ts +18 -0
  250. package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
  251. package/types/src/chart/resolve/_Resolve.d.ts +51 -0
  252. package/types/src/chart/resolve/_ResolvedChart.d.ts +444 -0
  253. package/types/src/collections/RTree.d.ts +116 -36
  254. package/types/src/collections/SparseGrid.d.ts +6 -3
  255. package/types/src/collections/SpatialMap.d.ts +2 -8
  256. package/types/src/collections/SpatialMap3D.d.ts +2 -0
  257. package/types/src/collections/index.d.ts +1 -1
  258. package/types/src/comment/Comment.d.ts +32 -9
  259. package/types/src/comment/IComment.d.ts +41 -4
  260. package/types/src/comment/_NoteBox.d.ts +19 -2
  261. package/types/src/condition/AnchoredConditional.d.ts +28 -2
  262. package/types/src/condition/ICondition.d.ts +3 -2
  263. package/types/src/conditionalFormat/ConditionalFormat.d.ts +9 -3
  264. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  265. package/types/src/dataTable/DataTable.d.ts +67 -0
  266. package/types/src/dataTable/DataTableCollection.d.ts +19 -0
  267. package/types/src/dataTable/IDataTable.d.ts +99 -0
  268. package/types/src/dataTable/IDataTableCollection.d.ts +18 -0
  269. package/types/src/dataTable/index.d.ts +6 -0
  270. package/types/src/dataValidation/DataValidation.d.ts +1 -1
  271. package/types/src/dataValidation/DataValidationCollection.d.ts +4 -1
  272. package/types/src/dataValidation/IDataValidation.d.ts +1 -1
  273. package/types/src/dataValidation/IDataValidationCollection.d.ts +24 -0
  274. package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
  275. package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
  276. package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
  277. package/types/src/documentProperties/index.d.ts +3 -0
  278. package/types/src/externalBook/IExternalBook.d.ts +1 -1
  279. package/types/src/fill/IFill.d.ts +7 -0
  280. package/types/src/fill/IFillable.d.ts +47 -0
  281. package/types/src/fill/IStroke.d.ts +15 -1
  282. package/types/src/fill/PaintUtils.d.ts +22 -0
  283. package/types/src/fill/index.d.ts +2 -0
  284. package/types/src/font/AdvanceBuilder.d.ts +34 -0
  285. package/types/src/font/AdvanceTable.d.ts +128 -14
  286. package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
  287. package/types/src/font/FontCapture.d.ts +4 -0
  288. package/types/src/font/FontCollection.d.ts +53 -2
  289. package/types/src/font/FontPlatform.d.ts +20 -0
  290. package/types/src/font/FontUtils.d.ts +5 -0
  291. package/types/src/font/IFont.d.ts +191 -61
  292. package/types/src/font/IFontCollection.d.ts +20 -14
  293. package/types/src/font/IFontStyle.d.ts +207 -0
  294. package/types/src/font/TableFileAdvanceBuilder.d.ts +9 -0
  295. package/types/src/font/_FontUtils.d.ts +11 -4
  296. package/types/src/font/_FontsVersion.d.ts +7 -0
  297. package/types/src/font/index.d.ts +1 -3
  298. package/types/src/font/platform.browser.d.ts +15 -0
  299. package/types/src/font/platform.node.d.ts +5 -0
  300. package/types/src/group/Group.d.ts +5 -0
  301. package/types/src/group/GroupMovableCollection.d.ts +4 -0
  302. package/types/src/history/IHistory.d.ts +19 -2
  303. package/types/src/hyperlink/IHyperlink.d.ts +7 -1
  304. package/types/src/index.d.ts +3 -0
  305. package/types/src/license/LicenseManager.d.ts +21 -0
  306. package/types/src/license/_Utils.d.ts +18 -1
  307. package/types/src/license/runtime.browser.d.ts +5 -0
  308. package/types/src/license/runtime.node.d.ts +10 -0
  309. package/types/src/listener/IListener.d.ts +14 -2
  310. package/types/src/listener/ListenerEmitter.d.ts +11 -3
  311. package/types/src/movable/IMovable.d.ts +28 -15
  312. package/types/src/movable/IMovableCollection.d.ts +1 -1
  313. package/types/src/movable/Movable.d.ts +12 -1
  314. package/types/src/movable/MovableCollection.d.ts +7 -3
  315. package/types/src/movable/_InsertableCollection.d.ts +16 -5
  316. package/types/src/named/INamed.d.ts +30 -0
  317. package/types/src/named/INamedCollection.d.ts +2 -2
  318. package/types/src/named/NamedCollection.d.ts +16 -4
  319. package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
  320. package/types/src/outline/IOutline.d.ts +1 -1
  321. package/types/src/outline/Outline.d.ts +2 -2
  322. package/types/src/picture/IPicture.d.ts +98 -1
  323. package/types/src/picture/Picture.d.ts +15 -7
  324. package/types/src/pivot/IPivotTable.d.ts +2 -2
  325. package/types/src/pivot/PivotTable.d.ts +5 -5
  326. package/types/src/primitives/ReferenceRange.d.ts +2 -2
  327. package/types/src/print/IPageLayout.d.ts +635 -0
  328. package/types/src/print/PageLayout.d.ts +258 -0
  329. package/types/src/print/index.d.ts +1 -1
  330. package/types/src/protectedRange/IProtectedRange.d.ts +2 -2
  331. package/types/src/protection/IProtection.d.ts +6 -0
  332. package/types/src/protection/PasswordHasher.d.ts +13 -0
  333. package/types/src/richData/IRichDataKind.d.ts +22 -0
  334. package/types/src/richData/RichDataRegistry.d.ts +57 -0
  335. package/types/src/richData/RichText.d.ts +59 -0
  336. package/types/src/richData/index.d.ts +3 -0
  337. package/types/src/scripting/IModule.d.ts +3 -3
  338. package/types/src/scripting/IScript.d.ts +2 -2
  339. package/types/src/scripting/ITypedFunction.d.ts +1 -1
  340. package/types/src/scripting/declarations.d.ts +3 -0
  341. package/types/src/selection/ChartElementSelection.d.ts +39 -0
  342. package/types/src/selection/IChartElementSelection.d.ts +103 -0
  343. package/types/src/selection/IItemSelection.d.ts +131 -0
  344. package/types/src/selection/IMovableSelection.d.ts +6 -34
  345. package/types/src/selection/IRangeSelection.d.ts +4 -4
  346. package/types/src/selection/ItemSelection.d.ts +49 -0
  347. package/types/src/selection/MovableSelection.d.ts +11 -30
  348. package/types/src/selection/RangeSelection.d.ts +4 -4
  349. package/types/src/selection/index.d.ts +3 -0
  350. package/types/src/shape/IShape.d.ts +2 -1
  351. package/types/src/shape/IShapeStyle.d.ts +5 -31
  352. package/types/src/shape/ITextBoxStyle.d.ts +85 -0
  353. package/types/src/shape/ShapeStyleUtils.d.ts +13 -1
  354. package/types/src/shape/_Connectors.d.ts +9 -9
  355. package/types/src/shape/_ShapeStyle.d.ts +9 -0
  356. package/types/src/shape/index.d.ts +1 -0
  357. package/types/src/sheet/CellRegion.d.ts +37 -3
  358. package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
  359. package/types/src/sheet/ISheet.d.ts +81 -1078
  360. package/types/src/sheet/IWorksheet.d.ts +1514 -0
  361. package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +37 -12
  362. package/types/src/sheet/NamedCellRange.d.ts +2 -2
  363. package/types/src/sheet/NamedRange.d.ts +2 -2
  364. package/types/src/sheet/OpaqueSheet.d.ts +114 -0
  365. package/types/src/sheet/SheetCell.d.ts +24 -27
  366. package/types/src/sheet/SheetRange.d.ts +42 -11
  367. package/types/src/sheet/SheetRanges.d.ts +12 -10
  368. package/types/src/sheet/{Sheet.d.ts → Worksheet.d.ts} +510 -144
  369. package/types/src/sheet/WorksheetCollection.d.ts +39 -0
  370. package/types/src/sheet/_Anomalies.d.ts +109 -0
  371. package/types/src/sheet/_AnomalyFormulaChecks.d.ts +125 -0
  372. package/types/src/sheet/_AnomalyLabelChecks.d.ts +21 -0
  373. package/types/src/sheet/_CellBuffer.d.ts +11 -1
  374. package/types/src/sheet/_CopyUtils.d.ts +13 -6
  375. package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
  376. package/types/src/sheet/_InvalidSheetRange.d.ts +3 -2
  377. package/types/src/sheet/_Kinds.d.ts +34 -0
  378. package/types/src/sheet/_Labels.d.ts +38 -0
  379. package/types/src/sheet/_RangeStateSweep.d.ts +2 -3
  380. package/types/src/sheet/_ScalarListFactory.d.ts +1 -1
  381. package/types/src/sheet/_SheetAutoFillUtils.d.ts +3 -3
  382. package/types/src/sheet/_SheetAutoFitUtils.d.ts +3 -3
  383. package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
  384. package/types/src/sheet/_SheetCoords.d.ts +3 -3
  385. package/types/src/sheet/_SheetEvents.d.ts +1 -1
  386. package/types/src/sheet/_SheetFilterUtils.d.ts +6 -6
  387. package/types/src/sheet/_SheetIntents.d.ts +32 -14
  388. package/types/src/sheet/_SheetMessages.d.ts +1 -1
  389. package/types/src/sheet/_SheetMutations.d.ts +7 -8
  390. package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
  391. package/types/src/sheet/_SheetStateReader.d.ts +18 -0
  392. package/types/src/sheet/_SheetStateTypes.d.ts +60 -1
  393. package/types/src/sheet/_SheetUtils.d.ts +20 -19
  394. package/types/src/sheet/_WatchAnchor.d.ts +15 -2
  395. package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
  396. package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
  397. package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
  398. package/types/src/sheet/index.d.ts +5 -2
  399. package/types/src/sheet/style/SheetCellStyle.d.ts +67 -86
  400. package/types/src/sheet/style/SheetDirectStyle.d.ts +3 -3
  401. package/types/src/sheet/style/SheetNamedStyle.d.ts +2 -0
  402. package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
  403. package/types/src/sheet/style/_Resolvers.d.ts +3 -2
  404. package/types/src/sheet/style/_StyleUtils.d.ts +7 -43
  405. package/types/src/sheetHeader/ISheetHeader.d.ts +2 -2
  406. package/types/src/sheetHeader/SheetCellHeader.d.ts +2 -0
  407. package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
  408. package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
  409. package/types/src/sheetHeader/SheetHeader.d.ts +7 -6
  410. package/types/src/sheetHeader/_HeaderUtils.d.ts +2 -3
  411. package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +28 -28
  412. package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
  413. package/types/src/sheetProtection/index.d.ts +1 -1
  414. package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +168 -61
  415. package/types/src/sheetView/WorksheetView.d.ts +139 -0
  416. package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
  417. package/types/src/sheetView/index.d.ts +1 -1
  418. package/types/src/slicer/ISlicer.d.ts +2 -2
  419. package/types/src/sort/ISort.d.ts +35 -5
  420. package/types/src/style/ICellStyle.d.ts +56 -44
  421. package/types/src/style/_BuiltInStyleDefs.d.ts +4 -3
  422. package/types/src/table/AnchoredTable.d.ts +23 -7
  423. package/types/src/table/AutoTable.d.ts +1 -1
  424. package/types/src/table/ITable.d.ts +32 -19
  425. package/types/src/table/_NamedTable.d.ts +3 -3
  426. package/types/src/table/_NamedTableSource.d.ts +2 -2
  427. package/types/src/text/IText.d.ts +4 -51
  428. package/types/src/text/TextEngine.d.ts +34 -0
  429. package/types/src/text/TextFrame.d.ts +4 -2
  430. package/types/src/text/TextRun.d.ts +3 -2
  431. package/types/src/text/TextWrapper.d.ts +32 -26
  432. package/types/src/text/_TextUtils.d.ts +5 -5
  433. package/types/src/text/_TextWrapperFallback.d.ts +49 -0
  434. package/types/src/text/impl/TabStrategy.d.ts +3 -1
  435. package/types/src/text/richtext/IRichText.d.ts +16 -2
  436. package/types/src/text/richtext/index.d.ts +0 -1
  437. package/types/src/theme/ITheme.d.ts +108 -7
  438. package/types/src/theme/ThemeCollection.d.ts +5 -0
  439. package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
  440. package/types/src/transaction/ITransaction.d.ts +20 -1
  441. package/types/src/transaction/Transaction.d.ts +8 -1
  442. package/types/src/transaction/_BatchHandle.d.ts +118 -0
  443. package/types/src/type/AbstractCollection.d.ts +4 -13
  444. package/types/src/type/ICollection.d.ts +17 -4
  445. package/types/src/type/IProperties.d.ts +1 -1
  446. package/types/src/utils/_CSSUtils.d.ts +1 -1
  447. package/types/src/wasm/_fontsWasm.d.ts +7 -0
  448. package/types/src/wasm/_sdkWasm.d.ts +1 -1
  449. package/types/src/wasm/fontsWasm.d.ts +32 -0
  450. package/types/src/wasm/index.d.ts +1 -0
  451. package/types/src/wasm/loader.browser.d.ts +9 -0
  452. package/types/src/wasm/loader.node.d.ts +9 -0
  453. package/types/src/wasm/sdkWasm.d.ts +6 -3
  454. package/types/src/workbook/IWorkbook.d.ts +229 -38
  455. package/types/src/workbook/Workbook.d.ts +77 -22
  456. package/types/src/workbook/WorkbookRange.d.ts +2 -2
  457. package/types/src/workbook/WorkbookRanges.d.ts +2 -2
  458. package/types/src/workbook/_WorkbookIntents.d.ts +2 -2
  459. package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
  460. package/types/src/workbookView/IWorkbookView.d.ts +82 -0
  461. package/types/src/workbookView/WorkbookView.d.ts +21 -0
  462. package/browser/esm/BbSmt62FpFIpoVzu.mjs +0 -392
  463. package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +0 -412
  464. package/browser/esm/DOMHmhYzPcLVcpAW.mjs +0 -7
  465. package/browser/esm/DUvUK61b2_4pf4tG.mjs +0 -484
  466. package/node/esm/CCouEwT37f08qO3V.mjs +0 -7
  467. package/node/esm/CT0CN82y0_Qgoryk.mjs +0 -7568
  468. package/node/esm/DHUADiCmxNQS1ARz.mjs +0 -417
  469. package/node/esm/Ds0d8zXzmgOu3MGx.mjs +0 -403
  470. package/types/src/chart/_ChartXml.d.ts +0 -70
  471. package/types/src/collections/OverlappingRangeIterator.d.ts +0 -87
  472. package/types/src/collections/_RangeSweep.d.ts +0 -97
  473. package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
  474. package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
  475. package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
  476. package/types/src/print/IPrint.d.ts +0 -212
  477. package/types/src/sheet/SheetCollection.d.ts +0 -29
  478. package/types/src/sheetProtection/SheetProtection.d.ts +0 -51
  479. package/types/src/sheetView/SheetView.d.ts +0 -122
  480. package/types/src/text/richtext/IStyledFont.d.ts +0 -330
@@ -1,408 +1,44 @@
1
- import { Scalar, IRange, IRangeStats, IRuntime } from '@sheetxl/primitives';
2
- import { Bounds, Size } from '@sheetxl/utils';
3
1
  import { ITypes } from '../type';
4
2
  import { ITransaction } from '../transaction';
5
- import { Tuple } from '../collections';
6
- import { IWorkbook } from '../workbook';
7
- import { IPrint } from '../print';
8
- import { IColor } from '../color';
9
3
  import { IListener } from '../listener';
10
- import { IHyperlink } from '../hyperlink';
11
- import { IPicture } from '../picture';
12
- import { ICell, ICellHeader } from '../cell';
13
- import { ICellRange, ICellRanges, ICellRegions } from '../cellRange';
14
- import { IRangeSelection } from '../selection';
15
- import { IStyleCollection } from '../style';
16
- import { IStringCollection } from '../string';
17
- import { IResource, IResourceCollection } from '../resource';
18
- import { IMovable, IMovableCollection } from '../movable';
19
- import { IPivotTable, IPivotTableCollection } from '../pivot';
20
- import { IComment, ICommentCollection } from '../comment';
21
- import { ITable, ITableCollection } from '../table';
22
- import { IDataValidation, IDataValidationCollection } from '../dataValidation';
23
- import { IConditionalFormat, IConditionalFormatCollection } from '../conditionalFormat';
24
- import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
25
- import { IModule, IModuleCollection } from '../scripting';
26
- import { IChartCollection } from '../chart';
27
- import { INamedCollection } from '../named';
28
- import { ICalculation } from '../calculation';
29
- import { ISheetView } from '../sheetView';
30
- import { ISheetHeader } from '../sheetHeader';
31
- import { ISheetProtection } from '../sheetProtection';
32
- import { IOutline } from '../outline';
33
- import { ICellContainerOptions } from './ICellContainerOptions';
4
+ import { IColor } from '../color';
5
+ import { IWorkbook } from '../workbook';
34
6
  /**
35
- * An `ISheet` represents a collection of elements (such as {@link ICellRange | ranges},
36
- * {@link ITable | tables}, etc) contained within and visualized through a {@link ISheetView | view}.
37
- *
38
- * This interface provides methods for accessing its elements and event handling.
39
- *
40
- * Most interactions with a {@link ISheet | sheet} are done using either a {@link ICellRange | range} or {@link ICellRanges | ranges}.
7
+ * A tab in a {@link IWorkbook | workbook}: a {@link IWorksheet | worksheet}, or one of the sheet kinds
8
+ * that hold no cells.
41
9
  *
42
10
  * @remarks
43
- * While a {@link ISheet | sheet} can be used stand-alone it is typically used within the context of a {@link IWorkbook | workbook}.
11
+ * Every kind shares one name space, one tab order and one set of visibility rules, so the members
12
+ * here apply to all of them. What a sheet holds depends on its {@link getKind | kind}:
13
+ *
14
+ * * `'worksheet'` is the grid, {@link IWorksheet}.
15
+ * * `'chart'` is a chart sheet: one chart filling the tab.
16
+ * * `'macro'` is an Excel 4.0 macro sheet.
17
+ * * `'dialog'` is an Excel 5 dialog sheet.
44
18
  *
45
- * ### **Key Methods**
19
+ * The last three are {@link IOpaqueSheet | opaque}: they are carried as read and written back
20
+ * unchanged.
46
21
  *
47
- * * {@link ISheet.getRange} - For interacting with {@link ICell | cells} and {@link Scalar | values} and formatting.
48
- * * {@link ISheet.getTables} - For managing {@link ITable | tables}.
49
- * * {@link ISheet.getView} - For non-data related properties such as selection or frozen headers.
50
- * * {@link IWorkbook} - For working with collections of `ISheets`.
22
+ * Use {@link IWorkbook.getSheets} for every tab and {@link IWorkbook.getWorksheets} for the grids.
51
23
  */
52
- export interface ISheet extends ITransaction.ITransactional, IListener.ISource<ISheet, ISheet.IListeners> {
53
- /**
54
- * Returns an {@link ICellRange} used to interact with a
55
- * a rectangular 2D collection of cells at a specific range.
56
- *
57
- * @param address Address of the ranges. Omit for the selected range — selection is modeled
58
- * by the SDK (not a UI mode), and many operations default to it. `getSelectedRange` remains
59
- * the explicit form.
60
- * @param options Options for the ranges.
61
- */
62
- getRange(address?: ICellRange.Address, options?: ICellRange.GetRangeOptions): ICellRange;
63
- /**
64
- * Returns a {@link ICell} at the specified address.
65
- *
66
- * @param address Address of the cell. Omit for the selected cell — selection is modeled
67
- * by the SDK (not a UI mode), and many operations default to it. `getSelectedCell` remains
68
- * the explicit form.
69
- */
70
- getCell(address?: ICell.Address): ICell;
71
- /**
72
- * Returns an {@link ICellRanges}. An {@link ICellRanges} is an ordered list of
73
- * {@link ICellRange}s. These are used to interact with a set of contiguous 2D ranges.
74
- *
75
- * @param address Address of the ranges.
76
- * @param options Options for the ranges.
77
- */
78
- getRanges(address: ICellRanges.Address, options?: ICellRange.GetRangeOptions): ICellRanges;
79
- /**
80
- * Returns the range for the entire sheet.
81
- *
82
- * @remarks
83
- * This can be updated via {@link ISheet.setEntireSize}.
84
- *
85
- * @see
86
- * {@link ICellRange}
87
- */
88
- getEntireRange(options?: ICellRange.GetRangeOptions): ICellRange;
89
- /**
90
- * Returns the coords for the entire sheet.
91
- *
92
- * @remarks
93
- * This is a lightweight call to `ISheet.getEntireRange().getCoords()`.
94
- */
95
- getEntireCoords(): IRange.Coords;
96
- /**
97
- * Returns the smallest range within the sheet that contains any used cells.
98
- *
99
- * @see
100
- * {@link ICellRange.getUsedRange}
101
- */
102
- getUsedRange(options?: ICellRange.GetRangeOptions): ICellRange | null;
103
- /**
104
- * Returns the statistics for the used cells of the sheet.
105
- *
106
- * @param options Iterator options the stats are created with — most usefully
107
- * `{ onError: 'ignore' }` so aggregate reads degrade instead of faulting on error values.
108
- *
109
- * @remarks
110
- * Equivalent to `getUsedRange().getStats(…)` except **null-safe** — an empty sheet returns
111
- * empty statistics (`getSize() === 0`) rather than forcing the caller to branch on
112
- * {@link getUsedRange} returning `null`.
113
- *
114
- * @see
115
- * {@link ICellRange.getStats}
116
- */
117
- getStats(options?: ICellRange.GetStatsOptions): IRangeStats;
118
- /**
119
- * Returns the uniform regions for the requested features across the whole sheet.
120
- *
121
- * @remarks
122
- * The partition operator belongs on the thing partitioned, and *"where are the blocks in this
123
- * sheet"* is the question an agent actually has — the `ICellRange` flavor is how you
124
- * **constrain** that query, not how you start it.
125
- *
126
- * Equivalent to `getEntireRange().getRegions(…)`: the partition reads the feature indexes, so
127
- * it costs the used cells rather than the address space.
128
- * @see
129
- * {@link ICellRange.getRegions}
130
- */
131
- getRegions(features?: ICellRange.Feature | readonly ICellRange.Feature[], options?: ICellRange.GetRegionsOptions): ICellRegions;
132
- /**
133
- * Returns the current selection.
134
- *
135
- * @remarks
136
- * This allows for listening to selection changes and advanced navigation.
137
- */
138
- getSelection(): IRangeSelection;
139
- /**
140
- * Returns the selected cell.
141
- *
142
- * @remarks
143
- * This is a convenience method for 'getSelection().getCell()'.
144
- */
145
- getSelectedCell(): ICell;
146
- /**
147
- * Returns a range of cells for the current selection.
148
- *
149
- * @remarks
150
- * This is a convenience method for 'getSelection().getRange()'.
151
- */
152
- getSelectedRange(options?: ICellRange.GetRangeOptions): ICellRange;
153
- /**
154
- * Returns ranges of cells for the current selection.
155
- *
156
- * @remarks
157
- * This is a convenience method for 'getSelection().getRanges()'.
158
- */
159
- getSelectedRanges(options?: ICellRange.GetRangeOptions): ICellRanges;
160
- /**
161
- * Returns an iterator of ICells that match the results.
162
- *
163
- * @param options This is either a search string or {@link ICellRange.FindOptions}.
164
- *
165
- * @remarks
166
- * This is the equivalent of `getEntireRange().find`.
167
- * @see
168
- * {@link ICellRange.find}
169
- */
170
- find(options: string | ICellRange.FindOptions): Iterator<ICell>;
171
- /**
172
- * Creates a 'light' table used for stateful filtering and sorting with-in a sheet.
173
- *
174
- * @see {@link ITable}
175
- */
176
- addAutoTable(address?: ICellRange, options?: ICellRange.AddAutoTableOptions): ITable;
177
- /**
178
- * Returns the {@link ITable} created using {@link addAutoTable}.
179
- */
180
- getAutoTable(): ITable | null;
181
- /**
182
- * Returns a collection of tables that are embedded in this sheet.
183
- */
184
- getTables(): ITableCollection;
185
- /**
186
- * Returns a collection of validations that are embedded in this sheet.
187
- */
188
- getDataValidations(): IDataValidationCollection;
189
- /**
190
- * Returns a collection of conditional formats that are embedded in this sheet.
191
- */
192
- getConditionalFormats(): IConditionalFormatCollection;
193
- /**
194
- * Returns a collection of ranges that stay editable while this sheet is protected.
195
- *
196
- * @remarks
197
- * Excel's *Review → Allow Edit Ranges*. Only consulted while
198
- * {@link ISheetProtection.isLocked} is true.
199
- */
200
- getProtectedRanges(): IProtectedRangeCollection;
201
- /**
202
- * Returns the comments and notes on this sheet.
203
- *
204
- * @remarks
205
- * One per cell. The workbook's {@link IWorkbook.getComments} walks every sheet's.
206
- */
207
- getComments(): ICommentCollection;
208
- /**
209
- * Returns a collection of movables that are embedded in this sheet.
210
- */
211
- getMovables(): IMovableCollection;
212
- /**
213
- * Returns the charts on this sheet.
214
- *
215
- * @remarks
216
- * A view over {@link ISheet.getMovables}: every chart is the content of a movable, which is what
217
- * places and names it. Read-only for now — a chart is added by adding a movable with chart
218
- * content.
219
- */
220
- getCharts(): IChartCollection;
221
- /**
222
- * Returns the row headers managed by the sheet.
223
- */
224
- getRowHeaders(): ISheetHeader;
225
- /**
226
- * Returns the column headers managed by the sheet.
227
- */
228
- getColumnHeaders(): ISheetHeader;
229
- /**
230
- * Return a custom color or `null` if no custom color has been set.
231
- *
232
- * @defaultValue null
233
- */
234
- getTabColor(): IColor;
235
- /**
236
- * See the tab color for the sheet.
237
- *
238
- * @param color The color
239
- *
240
- * @remarks
241
- * * If set to `null` the color will revert to the default.
242
- * * The tab color is not used by the sheet but rather by the workbook.
243
- */
244
- setTabColor(color: IColor | string | null): this;
245
- /**
246
- * The sheet's VBA code name, or `null` if it has none.
247
- *
248
- * @defaultValue null
249
- *
250
- * @remarks
251
- * The identifier VBA binds a sheet through — `Sheet1.Range("A1")` in a macro resolves by code
252
- * name, never by tab name. It is a **second, independent identity** for the sheet: renaming the
253
- * tab does not change it, and it is not the sheet's position. Excel's default happens to look
254
- * positional (`Sheet1`, `Sheet2`, …) but drifts from position the moment sheets are reordered,
255
- * inserted or deleted, so it can only be carried — never derived.
256
- *
257
- * Present on any workbook that has, or has ever had, a VBA project: it survives the project
258
- * being stripped, so an `.xlsx` saved down from an `.xlsm` still carries code names. A workbook
259
- * that never had one has none, and this is `null` throughout.
260
- *
261
- * **Read-only.** SheetXL preserves what a file declared and never mints one — a code name is
262
- * assigned by the VBA editor, and inventing one would create a binding target no macro refers
263
- * to. There is deliberately no `setCodeName`.
264
- */
265
- getCodeName(): string | null;
266
- /**
267
- * The row and column groups on this sheet, and how they are laid out.
268
- */
269
- getOutline(): IOutline;
270
- /**
271
- * Whether conditional formats on this sheet are recalculated as the sheet changes.
272
- *
273
- * @defaultValue true
274
- *
275
- * @remarks
276
- * Excel exposes this only to VBA (`Worksheet.EnableFormatConditionsCalculation`). It is carried
277
- * so a workbook that turned it off keeps it off when saved; SheetXL still evaluates conditional
278
- * formats either way.
279
- */
280
- isConditionalFormatCalculationEnabled(): boolean;
281
- /**
282
- * Returns the modules this sheet owns.
283
- *
284
- * @remarks
285
- * A sheet's modules are stored by the sheet rather than tagged with its name, so the state a
286
- * tag would allow — a module left behind pointing at a sheet that no longer exists — cannot
287
- * occur: delete the sheet and its modules go with it, which is also what Excel does.
288
- *
289
- * These modules are scoped to the sheet ({@link IModule.getScope}), and scope is a visibility
290
- * rule: a function declared here is **not** callable from a cell formula, on this sheet or any
291
- * other. Only globally scoped modules contribute to the formula namespace.
292
- *
293
- * The VBA document module for this sheet lands here, joined to it by
294
- * {@link ISheet.getCodeName} — for a document module the module name *is* the code name.
295
- *
296
- * As with {@link IWorkbook.getScripts}, the collection filters to TypeScript unless asked
297
- * otherwise; imported VBA is read with `getItems({ language: 'vba' })`.
298
- */
299
- getModules(): IModuleCollection;
24
+ export interface ISheet extends IListener.ISource<ISheet, ISheet.IListeners> {
300
25
  /**
301
- * Returns the sheet protection.
26
+ * What the sheet holds.
302
27
  */
303
- getProtection(): ISheetProtection;
28
+ getKind(): ISheet.Kind;
304
29
  /**
305
- * Returns the current view settings
306
- * View settings determine how the sheet is displayed and interacted with (e.g., frozen panes, zoom level, selection) but do not affect the underlying data itself.
307
- *
308
- * @returns The {@link ISheetView} object representing the current view settings.
309
- */
310
- getView(): ISheetView;
311
- /**
312
- * Set a specific view.
313
- *
314
- * @param view The view properties.
315
- */
316
- setView(view: ISheetView): this;
317
- /**
318
- * Returns `IStyleCollection` associated with this sheet.
319
- */
320
- getStyles(): IStyleCollection;
321
- /**
322
- * Returns the current shared resources.
323
- */
324
- getResources(): IResourceCollection;
325
- /**
326
- * Returns the current shared resources.
327
- */
328
- getStrings(): IStringCollection;
329
- /**
330
- * Returns the current shared resources.
331
- */
332
- getTransactions(): ITransaction.IStore;
333
- /**
334
- * Returns the runtime used for this sheet.
335
- *
336
- * @remarks
337
- * This can not be set on the `ISheet`. This is managed by the sheet's container.
30
+ * The sheet's id: what formulas and operations identify it by. Unique among all in-memory sheets.
338
31
  */
339
- getRuntime(): IRuntime;
340
- /**
341
- * Returns the column width as a font unit.
342
- *
343
- * This is used as an informative tooltip.
344
- *
345
- * @param pixelWidth
346
- *
347
- * @see
348
- * * {@link https://docs.microsoft.com/en-us/office/troubleshoot/excel/determine-column-widths}
349
- * * {@link https://www.ablebits.com/office-addins-blog/change-autofit-column-width-excel/}
350
- */
351
- getColumnWidthAsFontUnit(pixelWidth: number): number;
352
- /**
353
- * Returns the {@link ICellRange | range} for a given pixel bounds.
354
- *
355
- * @param bounds
356
- */
357
- getRangeAtBounds(bounds: Bounds, options?: ICellRange.GetRangeOptions): ICellRange;
358
- /**
359
- * Returns a 1×1 cell or an explicit range at the specified **absolute** sheet coordinates.
360
- *
361
- * @see {@link ICellRange.getRangeAt} for relative coordinates.
362
- */
363
- getRangeAt(rowStart: number, columnStart: number, rowEnd?: number, columnEnd?: number, options?: ICellRange.GetRangeOptions): ICellRange;
364
- /**
365
- * Creates a cell that is not including at a coordinate but adopts all rendering.
366
- *
367
- * @param update Cell Update
368
- * @param coords Optional CellCoord
369
- * @param options How the update is read. See {@link ICell.CreateCellOptions}.
370
- * @returns A detached ICell
371
- *
372
- * @remarks
373
- * * Useful for previewing values such as tooltip, or what typed text would be entered as.
374
- * * Does not add to the sheet but provides a standalone ICell.
375
- * * If the coords are passed it will return disconnect cell update for that value.
376
- */
377
- createCell(update: ICell.Update, coords?: IRange.FixableCellCoords, options?: ICell.CreateCellOptions): ICell;
378
- /**
379
- * Parses a formula expression and returns a *transient* formula object anchored to this sheet.
380
- *
381
- * @param expression The formula expression to parse.
382
- * @param coords Optional anchor coordinates.
383
- * @param options Optional parse options; the expression is storage text unless `target` is `'display'`.
384
- *
385
- * @remarks
386
- * This is a convenience method for `getCalculation().createFormula(expression, coords, options)`;
387
- * like everything reached through the sheet's {@link getCalculation}, a bare reference (`A2`)
388
- * resolves against THIS sheet rather than the selected one.
389
- *
390
- * @see {@link ICalculation.createFormula}
391
- */
392
- createFormula(expression: string, coords?: Partial<IRange.CellCoords>, options?: ICalculation.CreateFormulaOptions): ICalculation.IFormula;
393
- /**
394
- * Add Listeners.
395
- *
396
- * @see
397
- * {@link IListener.ISource.addListeners}
398
- */
399
- addListeners(listeners: ISheet.IListeners, options?: IListener.Options): IListener.Remove;
32
+ getId(): string;
400
33
  /**
401
34
  * Returns the display name for the sheet.
402
35
  */
403
36
  getName(): string;
404
37
  /**
405
38
  * Set the display name for the sheet.
39
+ *
40
+ * @remarks
41
+ * Names are unique across every kind of sheet, ignoring case.
406
42
  */
407
43
  setName(name: string, options?: ITransaction.OperationOptions): this;
408
44
  /**
@@ -413,78 +49,41 @@ export interface ISheet extends ITransaction.ITransactional, IListener.ISource<I
413
49
  * Change the visibility of the sheet.
414
50
  *
415
51
  * @defaultValue ISheet.Visibility.Visible
416
- */
417
- setVisibility(visibility?: ISheet.Visibility | boolean, options?: ITransaction.OperationOptions): ISheet;
418
- /**
419
- * The {@link INamed}s **visible from this sheet** — what a formula written here can refer to.
420
52
  *
421
53
  * @remarks
422
- * The global items (every table among them, since a table name is always global) plus this sheet's
423
- * own scoped names, with shadowing resolved: where a sheet-scoped name and a global share a name,
424
- * only this sheet's is returned, because that is the one a formula here resolves to. Another
425
- * sheet's scoped names are never included.
426
- *
427
- * Everything is anchored to THIS sheet, not the selected one: `getByName` resolves against it, and
428
- * `getByRanges` reads unqualified coords as being on it — which is what lets this sheet's own
429
- * selection be passed straight in.
430
- *
431
- * Use {@link IWorkbook.getNames} for every name in the workbook (a name manager), and
432
- * {@link ISheet.getTables} for the tables that LIVE on this sheet — scope here is visibility, never
433
- * location, so a table anchored to another sheet is still visible from this one.
54
+ * The last visible sheet, of any kind, cannot be hidden.
434
55
  */
435
- getNames(): INamedCollection;
56
+ setVisibility(visibility?: ISheet.Visibility | boolean, options?: ITransaction.OperationOptions): ISheet;
436
57
  /**
437
- * Returns the {@link ICalculation} **anchored to this sheet**.
58
+ * Returns the position of the sheet among every sheet in its workbook, hidden ones and every
59
+ * kind included.
438
60
  *
439
61
  * @remarks
440
- * The engine itself is workbook-wide; this is a view over it that supplies THIS sheet as the context
441
- * whenever a caller doesn't name one. So an expression parsed or evaluated through it resolves a bare
442
- * reference (`A2`) against this sheet — not against whichever sheet happens to be selected.
443
- *
444
- * That matters for anything anchored by coords alone, e.g.
445
- * `sheet.getCalculation().createFormula('=A2+B2', cell.getCoords())`: reached through the
446
- * workbook ({@link IWorkbook.getCalculation}) the same call has no sheet context and falls back to the
447
- * active cell's sheet, which makes the parse depend on UI selection state. Pass an explicit
448
- * `coords.scope` to override the anchor (a cross-sheet reference is unaffected either way — it names its
449
- * own sheet).
62
+ * Will return -1 if not in a workbook.
450
63
  */
451
- getCalculation(): ICalculation;
64
+ getIndex(): number;
452
65
  /**
453
- * Recalculates THIS sheet — Excel's "Calculate Sheet" (Shift+F9) / `Worksheet.Calculate`.
454
- *
455
- * @param full When `true`, recalculate every formula on the sheet. Otherwise only the ones whose
456
- * inputs changed (plus volatiles), which is what Excel's Shift+F9 does.
66
+ * Moves the sheet in the tab order.
457
67
  *
458
68
  * @remarks
459
- * Distinct from `getEntireRange().calculate(full)`, which marks the range dirty first and is
460
- * therefore always a FORCE for those cells. This is the dirty-respecting sheet-scoped pass.
461
- *
462
- * Only the SEED is scoped to this sheet: dependents on other sheets still recalculate, and
463
- * volatiles are still workbook-wide. Excel leaves both stale; being more current is the safe
464
- * direction, and the volatile registry is drained per pass, so skipping them would deregister
465
- * them outright.
69
+ * This is zero-based.
466
70
  */
467
- calculate(full?: boolean): Promise<ICalculation.Status>;
71
+ setIndex(index: number): this;
468
72
  /**
469
- * Evaluates a formula in the context of the sheet and returns the resulting value.
470
- *
471
- * @param formula The formula to evaluate.
472
- * @param options Optional evaluation options.
73
+ * Return a custom color or `null` if no custom color has been set.
473
74
  *
474
- * @remarks
475
- * This is similar convenience method for `getCalculation().createFormula(expression).evaluate(options)`.
75
+ * @defaultValue null
476
76
  */
477
- evaluate(formula: string, options?: ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
77
+ getTabColor(): IColor;
478
78
  /**
479
- * Returns when all calculations are complete and there are no pending calculations.
79
+ * Set the tab color for the sheet.
80
+ *
81
+ * @param color The color
480
82
  *
481
83
  * @remarks
482
- * * Also waits for the load-time start: the pass {@link ICellContainerOptions.calcOnLoad} asks
483
- * for. This is the settle point after constructing from JSON.
484
- * * Otherwise a convenience method for `getCalculation().ready()`, which starts the engine if
485
- * it has not been started.
84
+ * If set to `null` the color will revert to the default.
486
85
  */
487
- whenCalculationReady(): Promise<ICalculation.Status>;
86
+ setTabColor(color: IColor | string | null): this;
488
87
  /**
489
88
  * Returns the {@link IWorkbook} for the sheet.
490
89
  *
@@ -493,83 +92,30 @@ export interface ISheet extends ITransaction.ITransactional, IListener.ISource<I
493
92
  */
494
93
  getWorkbook(): IWorkbook | null;
495
94
  /**
496
- * Removes from a container. This is usually the `Workbook`. If this is being
497
- * used standalone this operation will throw an exception.
498
- */
499
- delete(): void;
500
- /**
501
- * Returns if the sheet has been deleted from its container.
502
- */
503
- isDeleted(): boolean;
504
- /**
505
- * Select the `ISheet`.
95
+ * Make the sheet the active tab.
506
96
  */
507
97
  select(options?: ITypes.SelectOptions): Promise<this>;
508
98
  /**
509
- * Attempt to scroll the range into view.
510
- *
511
- * @param coords The partial coords to scroll to.
512
- * @param options {@link ISheet.ScrollToOptions}.
513
- */
514
- scrollTo(coords: Partial<IRange.Coords>, options: ISheet.ScrollToOptions): Promise<boolean>;
515
- /**
516
- * Returns a promise that will resolve to a copy of the current sheet.
99
+ * Removes the sheet from its workbook.
517
100
  */
518
- duplicate(): Promise<this>;
519
- /**
520
- * Returns the current index of the `ISheet` within its container.
521
- *
522
- * @remarks
523
- * Will return -1 if not in a Workbook or other sheet container.
524
- */
525
- getIndex(): number;
526
- /**
527
- * Reorders the `ISheet` with in the container. This is generally the tab order within an `IWorkbook` but may
528
- * be the zIndex if the `ISheets` are movable. This only affects visual listings of the sheets (but selection doesn't change).
529
- *
530
- * @remarks
531
- * This is zero-based.
532
- */
533
- setIndex(index: number): this;
534
- /**
535
- * Set the entire size of the sheet.
536
- *
537
- * @remarks
538
- * Calling with a `null` size will reset the sheet size to the default.
539
- */
540
- setEntireSize(size?: Partial<Size> | null, options?: ITransaction.OperationOptions): this;
541
- /**
542
- * Returns the picture interface for the sheet.
543
- */
544
- getPicture(): IPicture | null;
545
- /**
546
- * Returns the pivot tables laid out on this sheet, in the order they were read.
547
- *
548
- * @remarks
549
- * Read-only for now: each table is carried as it was read and written back unchanged. The
550
- * workbook's {@link IWorkbook.getPivotTables} walks every sheet's.
551
- */
552
- getPivotTables(): IPivotTableCollection;
101
+ delete(): void;
553
102
  /**
554
- * Set the picture interface for the entire sheet.
555
- * @param picture The picture interface to set for the sheet, or null to remove it.
103
+ * Returns if the sheet has been deleted from its workbook.
556
104
  */
557
- setPicture(picture: string | IResource | IResourceCollection.AddOptions | null, options?: ITransaction.OperationOptions): this;
105
+ isDeleted(): boolean;
558
106
  /**
559
- * Returns a JSON representation of the sheet.
107
+ * Add Listeners.
560
108
  *
561
- * @param options Options to control the JSON output.
109
+ * @see
110
+ * {@link IListener.ISource.addListeners}
562
111
  */
563
- toJSON(options?: ISheet.ToJSONOptions): Promise<ISheet.JSON>;
112
+ addListeners(listeners: ISheet.IListeners, options?: IListener.Options): IListener.Remove;
564
113
  /**
565
114
  * Free all resources associated with the sheet.
566
115
  *
567
116
  * @remarks
568
- * * Called by workbooks when the workbook is is closed.
569
- * * This is different than delete which removes the sheet from the workbook.
570
- *
571
- * @see
572
- * {@link ISheet.addListeners} for closeEvent
117
+ * Called by the workbook when it is closed. This is different than {@link delete}, which removes
118
+ * the sheet from the workbook.
573
119
  */
574
120
  close(): void;
575
121
  /**
@@ -587,47 +133,30 @@ export interface ISheet extends ITransaction.ITransactional, IListener.ISource<I
587
133
  * ### **Interface**
588
134
  *
589
135
  * {@link ISheet}
590
- *
591
- * ### **Implementation**
592
- *
593
- * {@link Sheet}
594
136
  */
595
137
  export declare namespace ISheet {
596
138
  /**
597
- * The different ways to identify a range within a sheet,
598
- * supporting both relative and absolute (fixed) addressing.
599
- *
600
- * Accepts:
601
- * - `ICellRange`
602
- * - A parsable `string` representing a range address (e.g., A1 or $A$1 notation).
603
- * - A partial `IRange.Coords` object (specifying at least some of the range boundaries),
604
- * optionally with a `$fixed` flag to indicate absolute addressing.
605
- * - `ICellRange.Address` (representing a single cell within the sheet),
606
- * optionally with a `$fixed` flag to indicate absolute addressing.
607
- *
608
- * @example
609
- * ```typescript
610
- * const address1: Address = "A1:B2"; // Relative addressing (A1 notation)
611
- * const address2: Address = "$A$1:$B$2"; // Absolute addressing (A1 notation)
612
- * ```
139
+ * What a sheet holds.
613
140
  */
614
- type RangeAddress = ICellRange | string | Partial<IRange.FixableCoords> | ICell.Address;
615
- /**
616
- * Represents the different ways to identify multiple ranges within a sheet.
617
- *
618
- * Accepts:
619
- * - `ICellRanges`
620
- * - A parsable `string` containing multiple range addresses separated by commas (e.g., "A1:B2,C3:D4").
621
- * - An array of `ICellRange.Address` objects, each representing a single range.
622
- *
623
- * @example
624
- * ```typescript
625
- * const address1: ICellRanges.Address = "A1:B2,C3:D4"; // String with multiple ranges.
626
- * ```
627
- * @remarks
628
- * This extends {@link ICellRange.Address} to support multiple values.
629
- */
630
- type RangesAddress = ICellRanges | string | ICellRange.Address | ICellRange.Address[];
141
+ const Kind: {
142
+ /**
143
+ * A grid of cells. See {@link IWorksheet}.
144
+ */
145
+ readonly Worksheet: "worksheet";
146
+ /**
147
+ * A chart filling the tab.
148
+ */
149
+ readonly Chart: "chart";
150
+ /**
151
+ * An Excel 4.0 macro sheet.
152
+ */
153
+ readonly Macro: "macro";
154
+ /**
155
+ * An Excel 5 dialog sheet.
156
+ */
157
+ readonly Dialog: "dialog";
158
+ };
159
+ type Kind = typeof Kind[keyof typeof Kind];
631
160
  /**
632
161
  * Indicates how a sheet should be available to the user.
633
162
  */
@@ -650,256 +179,34 @@ export declare namespace ISheet {
650
179
  };
651
180
  type Visibility = typeof Visibility[keyof typeof Visibility];
652
181
  /**
653
- * Options for scrolling to a specific range.
654
- */
655
- interface ScrollToOptions {
656
- /**
657
- * The partial coords to scroll to.
658
- */
659
- coords?: Partial<IRange.Coords>;
660
- /**
661
- * Any pixel offsets
662
- */
663
- offsets?: Bounds;
664
- /**
665
- * The scrollTo options.
666
- */
667
- scroll?: globalThis.ScrollIntoViewOptions | boolean;
668
- }
669
- /**
670
- * Events for {@link ISheet}.
182
+ * Events for {@link ISheet}, shared by every kind.
671
183
  */
672
184
  interface Events {
673
185
  /**
674
- * Called when the UsedRange bounds changes.
675
- *
676
- * @remarks
677
- * Useful when interested in knowing when the bounds of the area
678
- * that is being used within the sheet changes; for example this is used
679
- * by the scrollbars to adjust the size.
680
- * @see
681
- * {@link ISheet.getUsedRange}
682
- */
683
- onUsedRangeChange?(source: ISheet): void;
684
- /**
685
- * Called when any data has changed.
686
- *
687
- * @remarks
688
- * This is a course event that indicates that data has changed.
689
- * To listen for changes on data regions use {@link ICellRange.addListener}.
690
- */
691
- onDataChange?(source: ISheet): void;
692
- /**
693
- * Called when the sheet tab color changes.
186
+ * Called when the tab color changes.
694
187
  */
695
188
  onTabColorChange?(source: ISheet): void;
696
189
  /**
697
- * Called when any merges are added or removed.
698
- */
699
- onMergesChange?(source: ISheet): void;
700
- /**
701
- * Called if any spills occur.
702
- */
703
- onSpillsChange?(source: ISheet): void;
704
- /**
705
- * Called when any movables are added or removed.
706
- */
707
- onMovablesChange?(source: ISheet): void;
708
- /**
709
- * Called when any table are added or removed.
710
- */
711
- onTablesChange?(source: ISheet): void;
712
- /**
713
- * Called when any data validation is added, removed, re-anchored, or re-evaluates its results.
714
- *
715
- * @remarks
716
- * Always accompanied by the coarse {@link onStyleChange}. Listen here only when reacting to
717
- * the validations themselves (an editor panel, the alert indicators); renderers should listen
718
- * to the class event instead.
719
- */
720
- onDataValidationsChange?(source: ISheet): void;
721
- /**
722
- * Called when any conditional format is added, removed, re-anchored, reordered, or finishes
723
- * (re)evaluating — a rule's results land asynchronously, after the calculation engine answers.
724
- *
725
- * @remarks
726
- * Always accompanied by the coarse {@link onStyleChange}. Listen here only when reacting to
727
- * the rules themselves (an editor panel); renderers should listen to the class event instead.
728
- */
729
- onConditionalFormatsChange?(source: ISheet): void;
730
- /**
731
- * Called when protected ranges are added, removed, renamed, reordered or re-anchored.
732
- *
733
- * @remarks
734
- * Always accompanied by the coarse {@link onProtectionChange}.
735
- */
736
- onProtectedRangesChange?(source: ISheet): void;
737
- /**
738
- * Called when a comment is added, removed, edited, resolved, replied to or re-anchored.
739
- *
740
- * @remarks
741
- * Always accompanied by the coarse {@link onStyleChange}, since a cell paints its comment
742
- * indicator.
743
- */
744
- onCommentsChange?(source: ISheet): void;
745
- /**
746
- * Called when the auto table is added or removed.
747
- */
748
- onAutoTableChange?(source: ISheet): void;
749
- /**
750
- * Called when anything that affects how cells PAINT (other than data or layout) changes.
751
- *
752
- * @remarks
753
- * One of the three coarse class events (with {@link onLayoutChange} and
754
- * {@link onProtectionChange}): a single subscription for "the sheet may render differently",
755
- * meant for renderers so they never have to accumulate the finer-grained events. It fires
756
- * alongside each of them — direct and named style edits, table styling
757
- * ({@link onTablesChange}), conditional formatting results
758
- * ({@link onConditionalFormatsChange}, including their asynchronous evaluation completing),
759
- * and data validation visuals ({@link onDataValidationsChange}) all raise it. Listen to a
760
- * finer event only when reacting to that specific collection.
761
- */
762
- onStyleChange?(source: ISheet): void;
763
- /**
764
- * Called when the sizes of the cells change.
765
- *
766
- * @remarks
767
- * One of the three coarse class events (see {@link onStyleChange}): the single subscription
768
- * for "cell geometry moved".
769
- * * This can be be due to row/column sizes changes or changing the max rows columns.
770
- * * Zoom and viewport do not change the underlying layout.
771
- */
772
- onLayoutChange?(source: ISheet): void;
773
- /**
774
- * Called when which rows are hidden has changed.
775
- */
776
- onRowsHiddenChange?(source: ISheet): void;
777
- /**
778
- * Called when which columns are hidden has changed.
779
- */
780
- onColumnsHiddenChange?(source: ISheet): void;
781
- /**
782
- * Called on any protection changes.
783
- *
784
- * @remarks
785
- * One of the three coarse class events (see {@link onStyleChange}): the single subscription
786
- * for "what the user may touch changed" — the sheet lock state, its allowed actions, and the
787
- * protected ranges ({@link onProtectedRangesChange}) all raise it.
788
- */
789
- onProtectionChange?(source: ISheet): void;
790
- /**
791
- * Called before load. If any exception is thrown this
792
- * exception will be returned to the client and delete will fail.
793
- */
794
- onBeforeLoad?(source: ISheet, json: ISheet.JSON): void;
795
- /**
796
- * Called after load.
190
+ * Called when the name changes.
797
191
  */
798
- onLoad?(source: ISheet): void;
192
+ onNameChange?(source: ISheet): void;
799
193
  /**
800
- * Called before load. If any exception is thrown this
801
- * exception will be returned to the client and delete will be aborted.
194
+ * Called when the visibility changes.
802
195
  */
803
- onBeforeSave?(source: ISheet): Promise<void> | void;
196
+ onVisibilityChange?(source: ISheet): void;
804
197
  /**
805
- * Called after save.
198
+ * Called when the position in the tab order changes.
806
199
  */
807
- onSave?(source: ISheet, json: ISheet.JSON): void;
200
+ onIndexChange?(source: ISheet): void;
808
201
  /**
809
- * Called before delete. If any exception is thrown the
810
- * exception will be returned to the client and delete will be aborted.
202
+ * Called before the sheet is deleted. If any exception is thrown the delete is aborted and the
203
+ * exception is returned to the caller.
811
204
  */
812
205
  onBeforeDelete?(source: ISheet): void;
813
- /**
814
- * Request that the sheet become focused.
815
- * @returns A promise indicating if the focus was honored.
816
- *
817
- * @remarks
818
- * This should only be handled by one consumer.
819
- */
820
- onRequestScrollIntoView?(source: ISheet, options: ISheet.ScrollToOptions): Promise<boolean>;
821
- /**
822
- * Request that the sheet become focused.
823
- * @returns A promise indicating if the focus was honored.
824
- * @remarks
825
- * This should only be handled by one consumer.
826
- */
827
- onRequestFocus?(source: ISheet): Promise<boolean>;
828
- /**
829
- * Request the visible viewport ("window") bounds in absolute sheet pixels — the one placement input the
830
- * model can't derive itself. Used to center a bounds-less movable (e.g. a chart via
831
- * {@link IMovableCollection.AddOptions.autoPlace}); when no consumer responds (headless) the add falls
832
- * back to default cursor placement.
833
- *
834
- * @remarks
835
- * This should only be handled by one consumer (the grid view).
836
- */
837
- onRequestViewport?(source: ISheet): Promise<Bounds | null>;
838
206
  /**
839
207
  * Called when the sheet is deleted.
840
208
  */
841
209
  onDelete?(source: ISheet): void;
842
- /**
843
- * Called when the `ISheetView` changes.
844
- *
845
- * This is not called when individual properties on the view change.
846
- */
847
- onViewChange?(source: ISheet): void;
848
- /**
849
- * Called when the topLeft changes.
850
- *
851
- * @remarks
852
- * This is a delegated event from the `ISheetView`.
853
- */
854
- onTopLeftChange?(source: ISheet): void;
855
- /**
856
- * Called when the selection changes.
857
- *
858
- * @remarks
859
- * This is a delegated event from the `ISheetView`.
860
- */
861
- onSelectionChange?(source: ISheet): void;
862
- /**
863
- * Called when freeze or split settings have changed.
864
- *
865
- * @remarks
866
- * This is a delegated event from the `ISheetView`.
867
- */
868
- onFreezePaneChange?(source: ISheet): void;
869
- /**
870
- * Called when the zoom scale changes.
871
- *
872
- * @remarks
873
- * This is a delegated event from the `ISheetView`.
874
- */
875
- onZoomScaleChange?(source: ISheet): void;
876
- /**
877
- * Called when the movable selection changes.
878
- *
879
- * @remarks
880
- * This is a delegated event from the `ISheetView`.
881
- */
882
- onMovableSelectionChange?(source: ISheet): void;
883
- /**
884
- * Called when the view changes.
885
- */
886
- onViewChange?(source: ISheet): void;
887
- /**
888
- * Called when the name changes.
889
- */
890
- onNameChange?(source: ISheet): void;
891
- /**
892
- * Called when the visibility changes..
893
- */
894
- onVisibilityChange?(source: ISheet): void;
895
- /**
896
- * Called when the index changes.
897
- */
898
- onIndexChange?(source: ISheet): void;
899
- /**
900
- * Called when the state has been updated due to a undo/redo and a rerender is required.
901
- */
902
- onInvalidated?(source: ISheet): void;
903
210
  /**
904
211
  * Called when the sheet is closed.
905
212
  */
@@ -907,315 +214,11 @@ export declare namespace ISheet {
907
214
  }
908
215
  interface IListeners extends IListener.Callbacks<ISheet, ISheet.Events> {
909
216
  }
910
- interface ToJSONOptions {
911
- /**
912
- * If `true` the raw values will not be included in the JSON.
913
- *
914
- * @remarks
915
- * When ignoring Data the strings will also not be included in the JSON.
916
- */
917
- ignoreData?: boolean;
918
- /**
919
- * How resources — images and the other binaries the sheet references — are written.
920
- *
921
- * * `'embed'` serializes each one into the JSON, base64 encoded.
922
- * * `'ignore'` writes every id as `0` and no resources.
923
- * * An {@link IResource.Writer} puts each one wherever the caller wants and records what it
924
- * returns, so resources can be stored outside the JSON — uploaded and referenced by `uri`,
925
- * or emitted as parts of another format and referenced by id alone.
926
- *
927
- * @defaultValue 'embed'
928
- */
929
- resources?: 'embed' | 'ignore' | IResource.Writer;
930
- /**
931
- * If `true` the resources will not include formatting.
932
- *
933
- * @remarks
934
- * This will also ignore merges and hyperlinks styles
935
- */
936
- ignoreStyles?: boolean;
937
- /**
938
- * If `true` the formulas will not be included in the JSON.
939
- */
940
- ignoreFormulas?: boolean;
941
- /**
942
- * If `true` header styles will be included in the JSON.
943
- *
944
- * @remarks
945
- * This is useful when exporting to formats such as ooxml that do not support
946
- * ranged direct styles.
947
- * * If ignoreStyles is true this is ignored
948
- */
949
- includeHeaderStyles?: boolean;
950
- /**
951
- * If `true` styled borders will be split into individual border elements in the JSON.
952
- *
953
- * @remarks
954
- * This is useful when exporting to formats such as ooxml that do not support
955
- * ranged border elements.
956
- *
957
- * Ignored if ignoreStyles is `true`.
958
- */
959
- splitDirectBorders?: boolean;
960
- }
961
- /**
962
- * Optional values used in the construction of am {@link ISheet}.
963
- *
964
- * @remarks
965
- * Changes to these options will be ignored after construction.
966
- */
967
- interface ConstructorOptions extends ICellContainerOptions {
968
- /**
969
- * When adding to another container.
970
- */
971
- container?: ISheet.ContainerOptions;
972
- /**
973
- * The sheet's id ({@link ISheet.getId}): what formulas and operations (copy/paste) identify it
974
- * by. Must be unique among all in-memory sheets.
975
- *
976
- * @returns The id. If not provided a new one is made.
977
- * @remarks
978
- * Not saved as part of the {@link ISheet.JSON} persisted model. A container that names its
979
- * sheets before it builds them (a workbook loading its sheets) supplies it.
980
- */
981
- uid?: () => string;
982
- /**
983
- * Initial JSON.
984
- */
985
- json?: ISheet.JSON;
986
- }
987
- /**
988
- * Options needed for embedding a sheet into another container such as a workbook.
989
- */
990
- interface ContainerOptions {
991
- /**
992
- * Required to be called before from JSON.
993
- * @param self -The Sheet
994
- *
995
- * @remarks
996
- * This is needed to ensure the contain has access to the sheet reference so that
997
- * it can resolve references.
998
- */
999
- beforeFromJSON?: (self: ISheet) => void;
1000
- /**
1001
- * Callback to provide a sheet with a logical name. This is used
1002
- * when a sheet name property is invoked.
1003
- *
1004
- * @remarks
1005
- * Sheets don't have a name by default but as a convenience we allow
1006
- * for the name to be called from the sheet.
1007
- */
1008
- getName: () => string | null;
1009
- setName?: (name: string | null, options?: ITransaction.OperationOptions) => void;
1010
- setNameChangeCallback?: (callback: () => void) => void;
1011
- /**
1012
- * Return the current index.
1013
- */
1014
- getIndex?: () => number | null;
1015
- /**
1016
- * Request that this moved.
1017
- *
1018
- * @param index The index to set to.
1019
- *
1020
- * @remarks
1021
- * For traditional workbooks with not docking tabs this will be the tab position.
1022
- */
1023
- setIndex?: (index: number, options?: ITransaction.OperationOptions) => boolean;
1024
- setIndexCallback?: (callback: () => void) => void;
1025
- /**
1026
- * Callback to provide a sheet with a visibility.
1027
- *
1028
- * @remarks
1029
- * Sheets don't manage this but as a convenience we allow
1030
- * for the visibility to be called from the sheet.
1031
- */
1032
- getVisibility?: () => ISheet.Visibility;
1033
- setVisibility?: (visibility: ISheet.Visibility, options?: ITransaction.OperationOptions) => void;
1034
- setVisibilityCallback?: (callback: () => void) => void;
1035
- /**
1036
- * Returns a copy of the sheet provided sheet.
1037
- */
1038
- duplicate?: () => Promise<ISheet>;
1039
- /**
1040
- * Request that the sheet become the active sheet.
1041
- *
1042
- * @returns A flag indicating that the sheet was brought to the front.
1043
- *
1044
- * @remarks
1045
- * In a workbook context there is only one active sheet at a time but other clients
1046
- * may treat this this differently.
1047
- */
1048
- requestSelect?: (options?: ITypes.SelectOptions) => Promise<boolean>;
1049
- }
1050
217
  /**
1051
- * A set of properties for `ISheet`.
1052
- */
1053
- interface PropertiesJSON {
1054
- custom?: Record<string, string>;
1055
- calc?: {
1056
- fullCalcOnLoad?: boolean;
1057
- };
1058
- ignoreErrors?: Record<string, string[]>;
1059
- /** {@inheritDoc IPrint.HeaderFooter} */
1060
- headerFooter?: IPrint.HeaderFooter;
1061
- /** {@inheritDoc IPrint.PageSetup} */
1062
- pageSetup?: IPrint.PageSetup;
1063
- /** {@inheritDoc IPrint.PageSetUpProperties} */
1064
- pageSetUpPr?: IPrint.PageSetUpProperties;
1065
- /** {@inheritDoc IPrint.PrintOptions} */
1066
- printOptions?: IPrint.PrintOptions;
1067
- rowBreaks?: IPrint.Break[];
1068
- colBreaks?: IPrint.Break[];
1069
- phoneticPr?: {
1070
- alignment?: string;
1071
- fontId?: number;
1072
- type: string;
1073
- };
1074
- }
1075
- /**
1076
- * A drawing whose shapes are described in the origin format's own legacy vector markup rather
1077
- * than through {@link IMovable | movables}.
1078
- *
1079
- * @remarks
1080
- * A carrier, not a concept: what a spreadsheet keeps out of its main drawing — the box a note is
1081
- * displayed in, a form control's shape, and the pictures placed in a header or footer — held as
1082
- * one unit and put back on save, so a document that has them survives a round trip. Each piece
1083
- * folds into its own model as that lands (the note's box onto the note, the control's shape onto
1084
- * the control, the pictures onto the print header), and the carrier goes with the last of them.
1085
- *
1086
- * The markup is opaque: it is held as it was read and replayed unchanged, which also means the
1087
- * positions in it do not follow rows and columns that are inserted or deleted. Its images are
1088
- * carried by {@link IResource} id, each under the id the markup references it by.
1089
- */
1090
- interface LegacyDrawingJSON {
1091
- xml: string;
1092
- images?: {
1093
- id: string;
1094
- resId: number;
1095
- }[];
1096
- }
1097
- /**
1098
- * JSON representation of an `ISheet` used for serialization and deserialization.
218
+ * What the JSON of every kind of sheet has. Each kind adds its own body.
1099
219
  */
1100
220
  interface JSON {
1101
- data?: Tuple.GridTuple<ICell.JSON>;
1102
- formulas?: IRange.JSONReferenceTuple<string>[];
1103
- /**
1104
- * The extent occupied by an array formula, and which of the three
1105
- * {@link ITypes.FormulaArrayKind | kinds} of array formula it is.
1106
- *
1107
- * @remarks
1108
- * Every array formula earns an entry, degenerate 1x1 ones included - a 1x1 extent is not the
1109
- * same thing as no extent. Only the `kind` distinguishes a fixed one-cell block from a
1110
- * dynamic formula that happened not to spill; the extent cannot.
1111
- */
1112
- formulaArray?: IRange.JSONReferenceTuple<ITypes.FormulaArrayKind>[];
1113
- volatile?: IRange.Address[];
1114
- /**
1115
- * Column headers, each addressed as an entire-column run (`'E:E'`, `'E:H'`).
1116
- *
1117
- * @remarks
1118
- * Can be empty. The address carries the orientation, so a row address is read here too.
1119
- */
1120
- cols?: IRange.JSONReference<ICellHeader.JSON>[];
1121
- defaultColSize?: number;
1122
- /**
1123
- * Row headers, each addressed as an entire-row run (`'5:5'`, `'5:12'`).
1124
- *
1125
- * @remarks
1126
- * Can be empty. The address carries the orientation, so a column address is read here too.
1127
- */
1128
- rows?: IRange.JSONReference<ICellHeader.JSON>[];
1129
- defaultRowSize?: number;
1130
- styles?: IStyleCollection.JSON;
1131
- resources?: IResource.JSON[];
1132
- strings?: string[];
1133
- /**
1134
- * Modules owned by this sheet, keyed by module name.
1135
- *
1136
- * @see {@link ISheet.getModules}
1137
- */
1138
- modules?: Record<string, IModule.JSON>;
1139
- /**
1140
- * The comments and notes, one per cell, each thread with its replies.
1141
- *
1142
- * @see {@link ISheet.getComments}
1143
- */
1144
- comments?: IRange.JSONReference<IComment.JSON>[];
1145
- hyperlinks?: IRange.JSONReference<IHyperlink.JSON>[];
1146
- /**
1147
- * A generalize solution for dynamic areas.
1148
- * This is used for externalData
1149
- *
1150
- "C5:G10": {
1151
- "type": "externalData",
1152
- "error": false, // Or true if the last refresh failed
1153
- "source": "Query1", // Example: Type-specific info
1154
- "overrides": { // Object storing user edits within the region
1155
- "D6": "Manual Edit", // Key = Cell Address within region
1156
- "F8": 123.45 // Value = User-entered value
1157
- }
1158
- }
1159
- */
1160
- /**
1161
- * Either an object with RangeAddress to style id or an array of RangeCoordValue to style id.
1162
- */
1163
- directStyles?: IRange.JSONReferenceTuple<number>[];
1164
- merges?: IRange.Address[];
1165
- autoTable?: IRange.JSONReference<ITable.JSON>;
1166
- tables?: IRange.JSONReference<ITable.JSON>[];
1167
- conditionals?: IRange.JSONReference<IConditionalFormat.JSON>[];
1168
- validations?: IRange.JSONReference<IDataValidation.JSON>[];
1169
- protectedRanges?: IRange.JSONReference<IProtectedRange.JSON>[];
1170
- movables?: IMovable.JSON[];
1171
221
  tabColor?: string;
1172
- /**
1173
- * The sheet's VBA code name. Absent when it has none.
1174
- *
1175
- * @see {@link ISheet.getCodeName}
1176
- */
1177
- codeName?: string;
1178
- /**
1179
- * The outline settings that differ from their defaults.
1180
- *
1181
- * @see {@link ISheet.getOutline}
1182
- */
1183
- outline?: IOutline.JSON;
1184
- /**
1185
- * Present, as `false`, only when conditional format calculation is turned off.
1186
- *
1187
- * @see {@link ISheet.isConditionalFormatCalculationEnabled}
1188
- */
1189
- conditionalFormatCalculation?: boolean;
1190
- /**
1191
- * The sheet's picture.
1192
- */
1193
- picture?: IPicture.JSON;
1194
- /**
1195
- * The sheet's legacy drawing: note boxes and form control shapes.
1196
- *
1197
- * @see {@link ISheet.LegacyDrawingJSON}
1198
- */
1199
- legacyDrawing?: LegacyDrawingJSON;
1200
- /**
1201
- * The legacy drawing for the sheet's header and footer, which holds their pictures.
1202
- *
1203
- * @see {@link ISheet.LegacyDrawingJSON}
1204
- */
1205
- legacyDrawingHF?: LegacyDrawingJSON;
1206
- /**
1207
- * The sheet's pivot tables.
1208
- *
1209
- * @see {@link ISheet.getPivotTables}
1210
- */
1211
- pivotTables?: IPivotTable.JSON[];
1212
- protection?: ISheetProtection.JSON;
1213
- view?: ISheetView.JSON;
1214
- pageMargins?: Partial<IPrint.PageMargin>;
1215
- /**
1216
- * If specified this indicates the entire range of the sheet.
1217
- */
1218
- entireSize?: Partial<Size>;
1219
222
  }
1220
223
  }
1221
224
  //# sourceMappingURL=ISheet.d.ts.map