@sheetxl/sdk 0.8.0-beta.14 → 0.8.0-beta.16

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 (195) hide show
  1. package/LICENSE.md +8 -7
  2. package/browser/esm/4MbBwfmW2hDXk9_w.mjs +165 -0
  3. package/browser/esm/{ChYgQL-8qIDFmX31.mjs → 9YWdxmSjzLN4j_ts.mjs} +22 -22
  4. package/browser/esm/B6BdiHigbUdbZp3J.mjs +686 -0
  5. package/browser/esm/{CImFKFaYToUH-bSE.mjs → BF_QwkZ_hs2rFoTT.mjs} +3 -3
  6. package/browser/esm/{DBvu0tdSf-5vol4e.mjs → BMo2_9Ul36IwRm3S.mjs} +3 -3
  7. package/browser/esm/{B1aH_qa-czVyEVHd.mjs → BWY1qiidTUBVPJoD.mjs} +506 -502
  8. package/browser/esm/{BSXQAXwZdJKYTO4P.mjs → Bf80epSsm_RyAOb9.mjs} +29 -29
  9. package/browser/esm/{D_XMi4_5iO2rkET5.mjs → BfoE6Dn_GQCIkQD3.mjs} +2 -2
  10. package/browser/esm/{Dhw5XEJYFrkYjdU2.mjs → BlMYYQZP-QM-iBHz.mjs} +23 -22
  11. package/browser/esm/{MuNBN02MyZ558c_K.mjs → BqT-ASHP0NVSUUnY.mjs} +1528 -1433
  12. package/browser/esm/{DnR0xY7_iE3TmMcg.mjs → BtNuoQIrrHw_jnbJ.mjs} +4 -4
  13. package/browser/esm/BxFzcCYhvo9NXFjC.mjs +527 -0
  14. package/browser/esm/{DonQz2Tc3k9lNT8E.mjs → BxYuRTSF9ykc-Tpz.mjs} +3 -3
  15. package/browser/esm/{aRXqxIzjuSLwawMh.mjs → C2PvZwqK-uvsugVS.mjs} +2 -2
  16. package/browser/esm/C3JOjQwdG9kAig7i.mjs +2017 -0
  17. package/browser/esm/{SwLp-iElwDjfcJtv.mjs → C5x0EzqElYGTiTQc.mjs} +2 -2
  18. package/browser/esm/{AXlD9K1gCwPU4gCO.mjs → CMChv-fCFh68VQQt.mjs} +588 -587
  19. package/browser/esm/{BpwULQPKbb4R9Jew.mjs → CRbQATfI0yZxe1kX.mjs} +3 -3
  20. package/browser/esm/{CM_X1zZYzEUPaNJL.mjs → CUu3zeHqcwMRYiov.mjs} +2 -2
  21. package/{node/esm/b3XnssSr9lmvAC2N.mjs → browser/esm/C_jLGkFemj55_BP3.mjs} +3 -3
  22. package/browser/esm/{CtC__ALh4I8PKIln.mjs → CkZoDPUCK5jMUaeJ.mjs} +26955 -22064
  23. package/browser/esm/{DvvqmUQ9Z0NFm1-4.mjs → D-iHJ3q4nwOLcn1D.mjs} +2 -2
  24. package/browser/esm/{qCqzZW74-fhaIG2V.mjs → D807piM0VSokWz-L.mjs} +2 -2
  25. package/browser/esm/{BLYl-afJe_3std8i.mjs → DW3oQ39IF0bsc_lm.mjs} +2 -2
  26. package/browser/esm/{Ln4gsmhqH1LyoANj.mjs → DcB52JPBPmkc3l1m.mjs} +4 -4
  27. package/browser/esm/{DIfAk63CvaOZ3QKi.mjs → DlVnybrgwZWxWN3_.mjs} +10 -10
  28. package/browser/esm/{Dh84MDs-OhdCPCIg.mjs → DvVhatd0J1ch3OCO.mjs} +22 -22
  29. package/browser/esm/{BWoz4kQdA5KKJfl6.mjs → Dx9Fya60meMpuHqm.mjs} +2 -2
  30. package/browser/esm/{r_EZapMBdyS4gUd-.mjs → HV0FkJ6k3Ils318J.mjs} +78 -78
  31. package/browser/esm/{C7hpfT-sX2lyLS-D.mjs → JV9Szh5qTssjxJoE.mjs} +2 -2
  32. package/browser/esm/{CPIWV3Enlh_BF2TY.mjs → KpuD1kEcWB7cT0VM.mjs} +3 -3
  33. package/browser/esm/{3t4S9eda2I6jFad0.mjs → U4FL-QeC0bRUhTEo.mjs} +2 -2
  34. package/browser/esm/{D39XcmtPXVtMN4yF.mjs → WLlpmgLN5OVLoLrC.mjs} +3 -3
  35. package/browser/esm/{Cy8uYCggktF83278.mjs → WR146UAqrsUsL39e.mjs} +2 -2
  36. package/browser/esm/{BPPMKyMn65i1a1mE.mjs → WcHfawW2lkTHtWUd.mjs} +51 -49
  37. package/browser/esm/{Bdcd3QOzsc0aVMjN.mjs → Zp5-cTJ0Llb6EfGi.mjs} +4 -4
  38. package/browser/esm/{oSCy1X5CJ1iYtGDp.mjs → ad9PX897hYE4Srkc.mjs} +3 -3
  39. package/browser/esm/{UMQTbO0zNmBpzW1V.mjs → d_t-7d5BD1AdHg3u.mjs} +404 -404
  40. package/browser/esm/{BVqIknGhQCLUB_7Q.mjs → dwGdnbV-CykjNrlm.mjs} +2 -2
  41. package/browser/esm/{DiXeQjc0WJGLSVEo.mjs → e69NcYnKMLnAmqyA.mjs} +2 -2
  42. package/browser/esm/index.mjs +886 -578
  43. package/browser/esm/{yuF8SbWfjBfrxcq5.mjs → r-o0UCm7KtluNmyK.mjs} +3 -3
  44. package/licenses/dependencies.txt +69 -69
  45. package/node/esm/{BEBt5fo__rvT2q_u.mjs → 446KYBjJQa8g-8Gg.mjs} +52 -50
  46. package/node/esm/{BELc5aQ_pFPgbiso.mjs → 5OfKfTRX2_y2NwpU.mjs} +2 -2
  47. package/node/esm/{C-5JLSNof0FhkuFd.mjs → A3PEHO1HJvkHfb5n.mjs} +2 -2
  48. package/node/esm/{YpOpRyciqQLIY1-G.mjs → B4WUGzJBkQu7BXRm.mjs} +2 -2
  49. package/node/esm/{I-FZojIFWluC6X-j.mjs → BH8J6vKSO5zI_TWo.mjs} +2 -2
  50. package/node/esm/BLmdKnkLwkb3wWe6.mjs +2040 -0
  51. package/node/esm/{BuyAYLI4s33-vmgG.mjs → BZSxu_ZqX8-Uczzn.mjs} +2 -2
  52. package/node/esm/{DiCMnYA2bttmrX3q.mjs → BfPBiAgVmWhuFgFP.mjs} +3 -3
  53. package/node/esm/{BSVttk12GXNfKZ9k.mjs → Bknw7zWZhl2-w1pi.mjs} +3 -3
  54. package/node/esm/{uLrulyR7IXq0SF4j.mjs → BvIPsPiHhMclZ1kH.mjs} +22 -22
  55. package/node/esm/{clgEkmEwfB28nkz2.mjs → By2TFKOjA1HekZap.mjs} +4 -4
  56. package/node/esm/{BXg-D8Rc_iyB8p7X.mjs → BywIhvYkWk2o7MSW.mjs} +2 -2
  57. package/node/esm/{pF2vCOTmrxPAB41Q.mjs → C3zyhnMwQ2hRQBz7.mjs} +31 -30
  58. package/node/esm/{BCjHRVU8tC5lYypg.mjs → C884edhUf9yMqpPp.mjs} +2 -2
  59. package/node/esm/{B6jhx5pHPs2W5GE7.mjs → CDHY-0OyQ9348Brb.mjs} +189 -189
  60. package/node/esm/{xRGObcoaGDnAZFnj.mjs → CERNLhFrAwtu_p-q.mjs} +2 -2
  61. package/node/esm/{DbPUG2DcQ3T_QhcJ.mjs → CFkX_Cn6avQqQiVC.mjs} +78 -78
  62. package/node/esm/CJDV8P3hI8lu--3Z.mjs +530 -0
  63. package/node/esm/{Cyeq1rDslIqF1LKz.mjs → CKwiipdPJGzAiPjg.mjs} +2 -2
  64. package/node/esm/{BLPrFp_jKGYgWPX1.mjs → CLtUMJfKsy4SevWE.mjs} +3 -3
  65. package/node/esm/{DLdXl0O0TXuyqLU4.mjs → CVPieTgKCwkL21nD.mjs} +28573 -23108
  66. package/node/esm/{Dlk2ZYExFgQ0xE2H.mjs → C_fYuynP2a_70WdL.mjs} +2 -2
  67. package/{browser/esm/BEDfJP2tcuRy2Y2E.mjs → node/esm/CgdNA3B_GFG_yJiN.mjs} +3 -3
  68. package/node/esm/Cs3ibv6YHCDwLRlk.mjs +115 -0
  69. package/node/esm/{DeFE8QfuCeGw-mvd.mjs → Cxak8i2NidZ4Uv6v.mjs} +487 -483
  70. package/node/esm/{NA-8urR7T1NCwrgD.mjs → D88A3UpCyGRjcX3U.mjs} +3 -3
  71. package/node/esm/{99miMotf3dOuG5Jk.mjs → DBIUe2BC9xU7qMHR.mjs} +3 -3
  72. package/node/esm/{BEdxa3I4VOiCsvy7.mjs → DELfV5HQZo1mInBd.mjs} +4 -4
  73. package/node/esm/{BfEdeOg4iYXaYTlh.mjs → DOt3t-13tsnM7Fj6.mjs} +2 -2
  74. package/node/esm/{B3hBxzqJ2_hUylNr.mjs → DfWc3nW_Z_qqc_Wf.mjs} +1762 -1674
  75. package/node/esm/DgnwKbUEyQN5_gWT.mjs +169 -0
  76. package/node/esm/{Ccocd9DTvOnlOE9D.mjs → Dhv9JymnXqcF54oo.mjs} +2 -2
  77. package/node/esm/{Lj98EH6coGdKUzuS.mjs → DvtyKKzOnoOM80NB.mjs} +22 -22
  78. package/node/esm/{Crn6dnSQQRCQAnQ-.mjs → KDGrIa9R5XzWfjM2.mjs} +2 -2
  79. package/node/esm/{D30rC6AWaGGf3CaC.mjs → RTwm9ge1KoPdlBNt.mjs} +2 -2
  80. package/node/esm/{CdSTmD2ZvG9NesNR.mjs → _RIAmJI98l6bIFfZ.mjs} +2 -2
  81. package/node/esm/{CI8UIWR01z9QDlzH.mjs → bIGdvfpnijWeCac6.mjs} +1005 -1004
  82. package/node/esm/index.mjs +913 -598
  83. package/node/esm/kaiXmn0AA5WDsLPo.mjs +199 -0
  84. package/node/esm/{B5VmOC0jO9Zbh9Mq.mjs → mTIhoz1gEcaEm7s1.mjs} +3 -3
  85. package/package.json +7 -7
  86. package/resources/locales/de/model.msg.json +82 -1
  87. package/resources/locales/en/model.msg.json +80 -1
  88. package/types/scripting-api.json +9967 -9497
  89. package/types/scripting-enums.json +27 -0
  90. package/types/scripting.d.ts +2282 -166
  91. package/types/src/.generated/wasm/sdk.d.ts +332 -0
  92. package/types/src/calculation/Calculation.d.ts +8 -0
  93. package/types/src/calculation/ICalculation.d.ts +51 -0
  94. package/types/src/calculation/compiler/Types.d.ts +5 -0
  95. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +1 -1
  96. package/types/src/calculation/formula/FormulaBlock.d.ts +2 -0
  97. package/types/src/calculation/formula/IFormulaBlock.d.ts +18 -0
  98. package/types/src/calculation/grid/CalcGrid.d.ts +5 -1
  99. package/types/src/calculation/grid/CalcGridBackend.d.ts +36 -1
  100. package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
  101. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  102. package/types/src/calculation/grid/FormulaHost.d.ts +3 -1
  103. package/types/src/calculation/grid/ICalcGrid.d.ts +88 -0
  104. package/types/src/calculation/grid/_CalcRequest.d.ts +9 -0
  105. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  106. package/types/src/calculation/spatial/SpillEntry.d.ts +55 -4
  107. package/types/src/calculation/state/CalcNode.d.ts +6 -3
  108. package/types/src/calculation/state/CalculationContext.d.ts +4 -2
  109. package/types/src/calculation/state/_PivotView.d.ts +22 -0
  110. package/types/src/cell/ICell.d.ts +1 -21
  111. package/types/src/cellRange/ICellRange.d.ts +18 -2
  112. package/types/src/collections/MixedTypedArrayList.d.ts +16 -2
  113. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +10 -0
  114. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +3 -0
  115. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +3 -0
  116. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +3 -0
  117. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +3 -0
  118. package/types/src/condition/BuiltInOperators/MatchesOperator.d.ts +10 -0
  119. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  120. package/types/src/condition/BuiltInOperators/index.d.ts +2 -0
  121. package/types/src/condition/Condition.d.ts +1 -0
  122. package/types/src/condition/ICondition.d.ts +15 -0
  123. package/types/src/condition/_ConditionUtils.d.ts +14 -0
  124. package/types/src/conditionalFormat/ConditionalFormat.d.ts +2 -1
  125. package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
  126. package/types/src/license/LicenseDetails.d.ts +27 -0
  127. package/types/src/license/LicenseManager.d.ts +24 -7
  128. package/types/src/license/_Utils.d.ts +34 -3
  129. package/types/src/license/index.d.ts +1 -0
  130. package/types/src/license/runtime.browser.d.ts +32 -4
  131. package/types/src/license/runtime.node.d.ts +8 -5
  132. package/types/src/license/summary.d.ts +18 -0
  133. package/types/src/pivot/IPivotTable.d.ts +1549 -13
  134. package/types/src/pivot/IPivotTableCollection.d.ts +70 -4
  135. package/types/src/pivot/PivotCache.d.ts +95 -11
  136. package/types/src/pivot/PivotDataField.d.ts +73 -0
  137. package/types/src/pivot/PivotField.d.ts +142 -0
  138. package/types/src/pivot/PivotTable.d.ts +548 -14
  139. package/types/src/pivot/PivotTableCollection.d.ts +18 -3
  140. package/types/src/pivot/_PivotAreas.d.ts +48 -0
  141. package/types/src/pivot/_PivotControls.d.ts +140 -0
  142. package/types/src/pivot/_PivotEngine.d.ts +9 -0
  143. package/types/src/pivot/_PivotGroups.d.ts +25 -0
  144. package/types/src/pivot/_PivotItems.d.ts +167 -0
  145. package/types/src/pivot/_PivotStructure.d.ts +237 -0
  146. package/types/src/pivot/_PivotStylePreview.d.ts +21 -0
  147. package/types/src/pivot/_PivotUtils.d.ts +37 -0
  148. package/types/src/pivot/engine/PivotAdd.d.ts +37 -0
  149. package/types/src/pivot/engine/PivotData.d.ts +65 -0
  150. package/types/src/pivot/engine/PivotEdit.d.ts +45 -0
  151. package/types/src/pivot/engine/PivotFilters.d.ts +50 -0
  152. package/types/src/pivot/engine/PivotFormulas.d.ts +72 -0
  153. package/types/src/pivot/engine/PivotLayout.d.ts +133 -0
  154. package/types/src/pivot/engine/PivotMove.d.ts +24 -0
  155. package/types/src/pivot/engine/PivotRefresh.d.ts +87 -0
  156. package/types/src/pivot/engine/PivotSort.d.ts +26 -0
  157. package/types/src/pivot/engine/PivotViewBuilder.d.ts +22 -0
  158. package/types/src/pivot/engine/index.d.ts +15 -0
  159. package/types/src/pivot/index.d.ts +4 -0
  160. package/types/src/pivot/kernel/KernelPivot.d.ts +63 -0
  161. package/types/src/pivot/kernel/_KernelLeaves.d.ts +100 -0
  162. package/types/src/pivot/kernel/_PivotAxisTree.d.ts +71 -0
  163. package/types/src/primitives/Range.d.ts +12 -1
  164. package/types/src/sheet/IWorksheet.d.ts +35 -0
  165. package/types/src/sheet/SheetCell.d.ts +21 -14
  166. package/types/src/sheet/SheetRange.d.ts +3 -0
  167. package/types/src/sheet/Worksheet.d.ts +175 -7
  168. package/types/src/sheet/_PivotFootprint.d.ts +42 -0
  169. package/types/src/sheet/_SheetAutoFitUtils.d.ts +12 -1
  170. package/types/src/sheet/_SheetMutations.d.ts +47 -0
  171. package/types/src/sheet/_SheetStateTypes.d.ts +11 -0
  172. package/types/src/sheet/style/SheetCellStyle.d.ts +6 -0
  173. package/types/src/sheet/style/SheetPivotStyle.d.ts +83 -0
  174. package/types/src/sheet/style/_IndentUnit.d.ts +14 -0
  175. package/types/src/sheetHeader/SheetCellHeader.d.ts +1 -1
  176. package/types/src/slicer/ISlicer.d.ts +114 -34
  177. package/types/src/slicer/ITimeline.d.ts +61 -0
  178. package/types/src/slicer/Slicer.d.ts +76 -3
  179. package/types/src/slicer/_PivotSlicer.d.ts +51 -0
  180. package/types/src/slicer/index.d.ts +1 -0
  181. package/types/src/table/AnchoredTable.d.ts +11 -1
  182. package/types/src/table/ITable.d.ts +5 -6
  183. package/types/src/table/ITableStyle.d.ts +50 -34
  184. package/types/src/table/_BuiltInPivotStyles.d.ts +8 -0
  185. package/types/src/table/_BuiltInTableStyles.d.ts +0 -1
  186. package/types/src/type/ITypes.d.ts +5 -1
  187. package/types/src/workbook/IWorkbook.d.ts +8 -2
  188. package/types/src/workbook/Workbook.d.ts +72 -6
  189. package/browser/esm/D2NFcBM4xsv0JJ1q.mjs +0 -184
  190. package/browser/esm/DnqwX3-2NfGBaXXl.mjs +0 -357
  191. package/node/esm/C3S4hF1vn0NyJPPd.mjs +0 -199
  192. package/node/esm/CPsGyt3vnOdLTShj.mjs +0 -360
  193. package/node/esm/D4Y1WJgjiFEgbWrW.mjs +0 -115
  194. package/types/src/pivot/_PivotXml.d.ts +0 -24
  195. package/types/src/primitives/Grouping.d.ts +0 -65
@@ -1,6 +1,179 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
 
4
+ /**
5
+ * A pivot table's inputs, allocated here and filled by the host.
6
+ */
7
+ export class LayoutRequest {
8
+ free(): void;
9
+ [Symbol.dispose](): void;
10
+ /**
11
+ * Takes data field `measure`'s values from the host: `cells + 1` values that may hold the
12
+ * types of `type_mask`, every byte zero, the last what a crossing with no cell shows. The
13
+ * address of its bytes.
14
+ */
15
+ add_calculated(measure: number, cells: number, type_mask: number): number;
16
+ /**
17
+ * Adds a field to the rows (`axis` 0) or the columns (1), with `items` item ids and the
18
+ * options' bits (subtotal 1, on top 2, blank after 4, show all 8, tabular 16). Its buffers,
19
+ * all zero, are at [`Self::field_ids`], [`Self::field_ranks`] and [`Self::field_flags`].
20
+ */
21
+ add_field(axis: number, items: number, options: number): number;
22
+ /**
23
+ * Adds a data field: value leaf `values` reduced by `reducer`, an index into `Reducer::ALL`.
24
+ */
25
+ add_measure(values: number, reducer: number): void;
26
+ /**
27
+ * Adds a page field of `items` item ids: its index for [`Self::page_ids`] and
28
+ * [`Self::page_keep`].
29
+ */
30
+ add_page(items: number): number;
31
+ /**
32
+ * Adds a value leaf of `records` values that may hold the types of `type_mask`, every byte
33
+ * zero: the address of its bytes.
34
+ */
35
+ add_values(type_mask: number): number;
36
+ /**
37
+ * Adds where the data fields sit, on the rows (`axis` 0) or the columns (1).
38
+ */
39
+ add_values_slot(axis: number, tabular: boolean): number;
40
+ /**
41
+ * The address of a field's `u8` flags per item id (hidden 1, collapsed 2).
42
+ */
43
+ field_flags(axis: number, slot: number): number;
44
+ /**
45
+ * The address of a field's `records` `u32` item ids.
46
+ */
47
+ field_ids(axis: number, slot: number): number;
48
+ /**
49
+ * The address of a field's `u32` rank per item id.
50
+ */
51
+ field_ranks(axis: number, slot: number): number;
52
+ /**
53
+ * Lays the table out. `div0`, `na` and `null` are the codes of `#DIV/0!`, `#N/A` and
54
+ * `#NULL!` in the host's error table.
55
+ */
56
+ lay_out(div0: number, na: number, _null: number): LayoutResult;
57
+ /**
58
+ * A request over `records` records.
59
+ */
60
+ constructor(records: number);
61
+ /**
62
+ * The rollup alone: what the host's formulas read.
63
+ */
64
+ operands(div0: number, na: number, _null: number): OperandsResult;
65
+ /**
66
+ * The address of a page field's `records` `u32` item ids.
67
+ */
68
+ page_ids(page: number): number;
69
+ /**
70
+ * The address of a page field's `u8` per item id, non-zero to keep its records.
71
+ */
72
+ page_keep(page: number): number;
73
+ /**
74
+ * The address of the `records` `u8` record mask: per record, 1 where the row items keep it,
75
+ * 2 where the column items do, a value counting it only with both (`Request::record_keep`).
76
+ * Allocated, every record kept by both, on the first ask. Never asked, every record is kept.
77
+ */
78
+ record_keep(): number;
79
+ /**
80
+ * Shows a field's subtotal `functions`, in line order, by index into those
81
+ * [`Self::set_functions`] counted, in place of its automatic subtotal; `across` when the
82
+ * innermost field's show one line per item across its outer items.
83
+ */
84
+ set_field_functions(axis: number, slot: number, functions: Uint32Array, across: boolean): void;
85
+ /**
86
+ * Sorts a field's items under each outer item by data field `measure`'s value, largest first
87
+ * when `descending`: their crossing with the other axis's line at `scope` (its ranks from the
88
+ * outermost field), or with its grand total when `scope` is empty.
89
+ */
90
+ set_field_sort(axis: number, slot: number, measure: number, descending: boolean, scope: Uint32Array): void;
91
+ /**
92
+ * How many subtotal functions the fields use: the last `count` × data fields measures are
93
+ * theirs, by function then data field.
94
+ */
95
+ set_functions(count: number): void;
96
+ /**
97
+ * Whether the rows' and the columns' grand total lines show.
98
+ */
99
+ set_grand(rows: boolean, columns: boolean): void;
100
+ /**
101
+ * Marks the last `count` measures as feeding the host's formulas only: no line shows them.
102
+ */
103
+ set_operand_measures(count: number): void;
104
+ /**
105
+ * Shows data field `measure`'s values as `kind`: normal 0, percent of total 1, of row 2, of
106
+ * column 3, index 4, percent of parent row 5, of parent column 6, of parent 7, running total
107
+ * 8, percent of running total 9, rank ascending 10, descending 11, difference 12, percent 13,
108
+ * percent difference 14. Kinds 7 to 14 compare along the base field at `slot` on the rows
109
+ * (`axis` 0) or the columns (1); any other axis is a base field on neither, every value
110
+ * `#N/A`. Kinds 12 to 14 compare with the base item of rank `item`, or the item before
111
+ * (`u32::MAX - 1`) or after (`u32::MAX`) each.
112
+ */
113
+ set_show_as(measure: number, kind: number, axis: number, slot: number, item: number): void;
114
+ }
115
+
116
+ /**
117
+ * What a layout produced.
118
+ */
119
+ export class LayoutResult {
120
+ private constructor();
121
+ free(): void;
122
+ [Symbol.dispose](): void;
123
+ /**
124
+ * The column lines, as [`Self::row_lines`].
125
+ */
126
+ column_lines(): Uint32Array;
127
+ /**
128
+ * The length of every column line's path.
129
+ */
130
+ column_stride(): number;
131
+ /**
132
+ * The row lines, `7 + row_stride()` `u32`s each: kind (item 0, subtotal 1, grand 2,
133
+ * blank 3), depth, node (`u32::MAX` for none), data field (`u32::MAX` for none), shows
134
+ * values (0 or 1), subtotal function (`u32::MAX` for none), across (0 or 1), then the path's
135
+ * ranks.
136
+ */
137
+ row_lines(): Uint32Array;
138
+ /**
139
+ * The length of every row line's path.
140
+ */
141
+ row_stride(): number;
142
+ /**
143
+ * Per crossing, row-major: value 0, empty 1, nothing 2.
144
+ */
145
+ states(): Uint8Array;
146
+ /**
147
+ * Per crossing, row-major, its value: the result leaf.
148
+ */
149
+ values(): ListBuffer;
150
+ }
151
+
152
+ /**
153
+ * A `MixedTypedList` in wasm memory: the host views `byte_length` bytes at `ptr`.
154
+ */
155
+ export class ListBuffer {
156
+ private constructor();
157
+ free(): void;
158
+ [Symbol.dispose](): void;
159
+ /**
160
+ * The list's bytes.
161
+ */
162
+ byte_length(): number;
163
+ /**
164
+ * The number of values.
165
+ */
166
+ length(): number;
167
+ /**
168
+ * The address of the list's first byte; 8-aligned.
169
+ */
170
+ ptr(): number;
171
+ /**
172
+ * The types the list may hold, as `1 << type`.
173
+ */
174
+ type_mask(): number;
175
+ }
176
+
4
177
  /**
5
178
  * A face's measures, filled once by the host from a shipped table or a canvas, then wrapped
6
179
  * against any number of times (DESIGN-FONTS §6.2, shape C; DESIGN-FONTS §4).
@@ -52,17 +225,158 @@ export class MetricsTable {
52
225
  wrap(text: string, px: number, line_height: number, max_width: number, max_height: number, indent: number, letter_spacing: number, super_sub: boolean): Float32Array;
53
226
  }
54
227
 
228
+ /**
229
+ * What a request's formulas read: each measure's value per cell.
230
+ */
231
+ export class OperandsResult {
232
+ private constructor();
233
+ free(): void;
234
+ [Symbol.dispose](): void;
235
+ /**
236
+ * The number of cells.
237
+ */
238
+ cell_count(): number;
239
+ /**
240
+ * A measure's value per cell, in cell order: the result leaf.
241
+ */
242
+ values(measure: number): ListBuffer;
243
+ }
244
+
245
+ /**
246
+ * A pivot's inputs, allocated here and filled by the host.
247
+ */
248
+ export class PivotRequest {
249
+ free(): void;
250
+ [Symbol.dispose](): void;
251
+ /**
252
+ * Adds a column key field: the address of its `records` `u32` item ids, all `0`.
253
+ */
254
+ add_column_field(): number;
255
+ /**
256
+ * Keeps only some records: the address of `ceil(records / 64)` `u64` words, all `0`; bit
257
+ * `i % 64` of word `i / 64` keeps record `i`.
258
+ */
259
+ add_filter(): number;
260
+ /**
261
+ * Adds a measure: value leaf `values` reduced by `reducer`, an index into `Reducer::ALL`
262
+ * (Sum, Count, CountA, Average, Min, Max, Product, VarS, VarP, StDevS, StDevP).
263
+ */
264
+ add_measure(values: number, reducer: number): void;
265
+ /**
266
+ * Adds a row key field: the address of its `records` `u32` item ids, all `0`.
267
+ */
268
+ add_row_field(): number;
269
+ /**
270
+ * Adds a value leaf of `records` values that may hold the types of `type_mask`, every byte
271
+ * zero (a run of blanks): the address of its bytes.
272
+ */
273
+ add_values(type_mask: number): number;
274
+ /**
275
+ * Forgets the measures, keeping every buffer: the next pass reads the same inputs.
276
+ */
277
+ clear_measures(): void;
278
+ /**
279
+ * Runs the pass. `div0` is the error code a division by zero answers with; `records`
280
+ * keeps each cell's records.
281
+ */
282
+ compute(div0: number, records: boolean): PivotResult;
283
+ /**
284
+ * A request over `records` records.
285
+ */
286
+ constructor(records: number);
287
+ }
288
+
289
+ /**
290
+ * What a pass produced.
291
+ */
292
+ export class PivotResult {
293
+ private constructor();
294
+ free(): void;
295
+ [Symbol.dispose](): void;
296
+ /**
297
+ * The cell of a row node and a column node, or `u32::MAX` (`0xFFFFFFFF`) when no kept record
298
+ * is in both.
299
+ */
300
+ cell(row: number, column: number): number;
301
+ /**
302
+ * The number of cells.
303
+ */
304
+ cell_count(): number;
305
+ /**
306
+ * The column tree, as [`Self::row_nodes`].
307
+ */
308
+ column_nodes(): Uint32Array;
309
+ /**
310
+ * A cell's records, ascending (empty unless records were kept).
311
+ */
312
+ records(cell: number): Uint32Array;
313
+ /**
314
+ * Per row node, its cell with column node `column`, `u32::MAX` where it has none.
315
+ */
316
+ row_cells(column: number): Uint32Array;
317
+ /**
318
+ * The row tree, five `u32`s a node in id order: parent, item, depth, first record, records.
319
+ */
320
+ row_nodes(): Uint32Array;
321
+ /**
322
+ * A measure's results, one per cell: the result leaf.
323
+ */
324
+ values(measure: number): ListBuffer;
325
+ }
326
+
55
327
  /**
56
328
  * The number of Unicode scalar values in `text` (not `text.length`, which counts UTF-16 units).
57
329
  */
58
330
  export function char_count(text: string): number;
59
331
 
332
+ /**
333
+ * The module's `WebAssembly.Memory`, for views over the buffers the exports hand back by address.
334
+ */
335
+ export function wasm_memory(): any;
336
+
60
337
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
61
338
 
62
339
  export interface InitOutput {
63
340
  readonly memory: WebAssembly.Memory;
341
+ readonly __wbg_layoutrequest_free: (a: number, b: number) => void;
342
+ readonly __wbg_layoutresult_free: (a: number, b: number) => void;
343
+ readonly __wbg_listbuffer_free: (a: number, b: number) => void;
64
344
  readonly __wbg_metricstable_free: (a: number, b: number) => void;
345
+ readonly __wbg_operandsresult_free: (a: number, b: number) => void;
346
+ readonly __wbg_pivotrequest_free: (a: number, b: number) => void;
347
+ readonly __wbg_pivotresult_free: (a: number, b: number) => void;
65
348
  readonly char_count: (a: number, b: number) => number;
349
+ readonly layoutrequest_add_calculated: (a: number, b: number, c: number, d: number, e: number) => void;
350
+ readonly layoutrequest_add_field: (a: number, b: number, c: number, d: number, e: number) => void;
351
+ readonly layoutrequest_add_measure: (a: number, b: number, c: number, d: number) => void;
352
+ readonly layoutrequest_add_page: (a: number, b: number) => number;
353
+ readonly layoutrequest_add_values: (a: number, b: number, c: number) => void;
354
+ readonly layoutrequest_add_values_slot: (a: number, b: number, c: number, d: number) => void;
355
+ readonly layoutrequest_field_flags: (a: number, b: number, c: number, d: number) => void;
356
+ readonly layoutrequest_field_ids: (a: number, b: number, c: number, d: number) => void;
357
+ readonly layoutrequest_field_ranks: (a: number, b: number, c: number, d: number) => void;
358
+ readonly layoutrequest_lay_out: (a: number, b: number, c: number, d: number, e: number) => void;
359
+ readonly layoutrequest_new: (a: number) => number;
360
+ readonly layoutrequest_operands: (a: number, b: number, c: number, d: number, e: number) => void;
361
+ readonly layoutrequest_page_ids: (a: number, b: number, c: number) => void;
362
+ readonly layoutrequest_page_keep: (a: number, b: number, c: number) => void;
363
+ readonly layoutrequest_record_keep: (a: number) => number;
364
+ readonly layoutrequest_set_field_functions: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
365
+ readonly layoutrequest_set_field_sort: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
366
+ readonly layoutrequest_set_functions: (a: number, b: number) => void;
367
+ readonly layoutrequest_set_grand: (a: number, b: number, c: number) => void;
368
+ readonly layoutrequest_set_operand_measures: (a: number, b: number) => void;
369
+ readonly layoutrequest_set_show_as: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
370
+ readonly layoutresult_column_lines: (a: number, b: number) => void;
371
+ readonly layoutresult_column_stride: (a: number) => number;
372
+ readonly layoutresult_row_lines: (a: number, b: number) => void;
373
+ readonly layoutresult_row_stride: (a: number) => number;
374
+ readonly layoutresult_states: (a: number, b: number) => void;
375
+ readonly layoutresult_values: (a: number, b: number) => void;
376
+ readonly listbuffer_byte_length: (a: number) => number;
377
+ readonly listbuffer_length: (a: number) => number;
378
+ readonly listbuffer_ptr: (a: number) => number;
379
+ readonly listbuffer_type_mask: (a: number) => number;
66
380
  readonly metricstable_fill: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
67
381
  readonly metricstable_fill_hinting: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
68
382
  readonly metricstable_fill_per_em: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -71,6 +385,24 @@ export interface InitOutput {
71
385
  readonly metricstable_new: (a: number, b: number) => number;
72
386
  readonly metricstable_text_width: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
73
387
  readonly metricstable_wrap: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
388
+ readonly operandsresult_cell_count: (a: number) => number;
389
+ readonly operandsresult_values: (a: number, b: number, c: number) => void;
390
+ readonly pivotrequest_add_column_field: (a: number) => number;
391
+ readonly pivotrequest_add_filter: (a: number) => number;
392
+ readonly pivotrequest_add_measure: (a: number, b: number, c: number, d: number) => void;
393
+ readonly pivotrequest_add_row_field: (a: number) => number;
394
+ readonly pivotrequest_add_values: (a: number, b: number, c: number) => void;
395
+ readonly pivotrequest_clear_measures: (a: number) => void;
396
+ readonly pivotrequest_compute: (a: number, b: number, c: number, d: number) => void;
397
+ readonly pivotrequest_new: (a: number) => number;
398
+ readonly pivotresult_cell: (a: number, b: number, c: number) => number;
399
+ readonly pivotresult_cell_count: (a: number) => number;
400
+ readonly pivotresult_column_nodes: (a: number, b: number) => void;
401
+ readonly pivotresult_records: (a: number, b: number, c: number) => void;
402
+ readonly pivotresult_row_cells: (a: number, b: number, c: number) => void;
403
+ readonly pivotresult_row_nodes: (a: number, b: number) => void;
404
+ readonly pivotresult_values: (a: number, b: number, c: number) => void;
405
+ readonly wasm_memory: () => number;
74
406
  readonly __wbindgen_export: (a: number, b: number) => number;
75
407
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
76
408
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -416,6 +416,14 @@ export declare class Calculation extends AbstractModel<AbstractModel.State, ICal
416
416
  * @internal
417
417
  */
418
418
  protected _evaluateOver(options: Calculation.EvaluateOverOptions): Promise<IRange>;
419
+ /**
420
+ * A host's values once its pass has landed. Each cell's async calls are waited for as `evaluate`
421
+ * waits for a formula's: until each has delivered, through the settle passes that land them.
422
+ * A clone, sharing storage until the grid writes, so it outlives the host.
423
+ */
424
+ private _settledValuesOf;
425
+ /** {@inheritDoc ICalculation.evaluateBatch} */
426
+ evaluateBatch(request: ICalculation.BatchRequest): Promise<IRange[]>;
419
427
  _createCalcGrid(options: Calculation.CalcGridOptions): CalcGrid;
420
428
  /** What a `create` for a model grid carries: its description. */
421
429
  protected _specOf(front: CalcGrid): CalcGridSpec;
@@ -1,3 +1,4 @@
1
+ import { Tuple } from '../collections';
1
2
  import { IRange, Scalar, IRuntime } from '@sheetxl/primitives';
2
3
  import { ITransaction } from '../transaction';
3
4
  import { IListener } from '../listener';
@@ -168,6 +169,35 @@ export interface ICalculation extends IModel {
168
169
  * The expression is read as storage text unless `options.target` is `'display'`.
169
170
  */
170
171
  evaluate(expression: string, options?: number | ICalculation.EvaluateOptions & Partial<IRange.CellCoords> & ICalculation.CreateFormulaOptions): Promise<Scalar | IRange>;
172
+ /**
173
+ * Evaluates several formulas over values of the caller's, in one request.
174
+ *
175
+ * @param request The values and the formulas.
176
+ * @returns One range per {@link ICalculation.BatchRequest.formulas | formula}, in the order given,
177
+ * the shape of its `coords` (a single cell included), read with local coordinates:
178
+ * `getValueAt(0, 0)` is the top-left of `coords`.
179
+ *
180
+ * @remarks
181
+ * - The values and formulas sit on a grid of their own, on no sheet, kept for this request only.
182
+ * Nothing in the workbook changes, and it is never an undo step.
183
+ * - A formula reads the values by address and may read another formula's cells; the engine
184
+ * orders them. Each is filled across its `coords`, relative references moving with it.
185
+ * - A cell that errors carries its error; the others are unaffected.
186
+ *
187
+ * @example
188
+ * ```typescript
189
+ * const [margin, doubled] = await calculation.evaluateBatch({
190
+ * values: [[0, [[0, [100, 60]]]], [1, [[0, [50, 40]]]]],
191
+ * formulas: [
192
+ * { expression: 'A1-B1', coords: { rowStart: 0, colStart: 2, rowEnd: 1, colEnd: 2 } },
193
+ * { expression: 'C1*2', coords: { rowStart: 0, colStart: 3, rowEnd: 1, colEnd: 3 } }
194
+ * ]
195
+ * });
196
+ * margin.getValueAt(1, 0); // 10
197
+ * doubled.getValueAt(1, 0); // 20
198
+ * ```
199
+ */
200
+ evaluateBatch(request: ICalculation.BatchRequest): Promise<IRange[]>;
171
201
  /**
172
202
  * When the engine recalculates on its own — Excel's Calculation Options.
173
203
  *
@@ -1066,6 +1096,27 @@ export declare namespace ICalculation {
1066
1096
  /**
1067
1097
  * Options for evaluating a formula.
1068
1098
  */
1099
+ /** What {@link ICalculation.evaluateBatch} evaluates. */
1100
+ interface BatchRequest {
1101
+ /** The values the formulas read, by row: `[row, [[column, values]]]`, A1 at row 0, column 0. */
1102
+ values: Tuple.GridTuple<Scalar>;
1103
+ /** The formulas. One over cells that hold a value replaces it. */
1104
+ formulas: readonly BatchFormula[];
1105
+ /**
1106
+ * How long to wait, in milliseconds, for the answers of async functions; a cell still waiting
1107
+ * then answers a `#TIMEOUT!` error.
1108
+ *
1109
+ * @defaultValue `30000`
1110
+ */
1111
+ timeout?: number;
1112
+ }
1113
+ /** One formula of a {@link BatchRequest}. */
1114
+ interface BatchFormula {
1115
+ /** The expression, with or without a leading `=`, written for the top-left of {@link coords}. */
1116
+ expression: string;
1117
+ /** The cells it is filled across. */
1118
+ coords: IRange.Coords;
1119
+ }
1069
1120
  interface EvaluateOptions {
1070
1121
  /**
1071
1122
  * If specified, evaluates only the token span associated with this index.
@@ -247,6 +247,11 @@ export interface CompiledFormula {
247
247
  */
248
248
  symbolIds: string[];
249
249
  hasTotals: boolean;
250
+ /**
251
+ * Whether the formula calls `GETPIVOTDATA` anywhere in its tree: what is recalculated when the
252
+ * pivot tables it reads change (`ICalcGrid.setPivots`). Resolved as {@link hasTotals} is.
253
+ */
254
+ hasPivotData: boolean;
250
255
  hasDataTable: boolean;
251
256
  hasVolatile: boolean;
252
257
  isBlankCacheable: boolean;
@@ -119,6 +119,6 @@ export declare function discoverDependencyBlock(depEntry: ISpatialMap.Entry<Prec
119
119
  * the anchor is inside the entry at all, since an entry that does not cover the anchor was never
120
120
  * in the anchor's dependents to begin with.
121
121
  */
122
- export declare function visitSpillBodyBlock(depEntry: ISpatialMap.Entry<PrecedentSpatialValue>, anchorRow: number, anchorCol: number, extentRowEnd: number, extentColEnd: number, callbackFn: (calc: CalcNode) => void, mint?: MintWindow | null): void;
122
+ export declare function visitSpillBodyBlock(depEntry: ISpatialMap.Entry<PrecedentSpatialValue>, anchorRow: number, anchorCol: number, extentRowStart: number, extentColStart: number, extentRowEnd: number, extentColEnd: number, callbackFn: (calc: CalcNode) => void, mint?: MintWindow | null): void;
123
123
  export declare function valueCompareValues(a: ISpatialMap.Entry<FormulaSpatialValue>, removing: ISpatialMap.Entry<FormulaSpatialValue>): boolean;
124
124
  //# sourceMappingURL=CalcExecutorUtils.d.ts.map
@@ -80,6 +80,8 @@ export declare class FormulaBlock implements IFormulaBlock {
80
80
  getReferencedSymbolIds(): string[];
81
81
  /** @inheritdoc IFormulaBlock.hasTotals */
82
82
  hasTotals(): boolean;
83
+ /** @inheritdoc IFormulaBlock.hasPivotData */
84
+ hasPivotData(): boolean;
83
85
  /** @inheritdoc IFormulaBlock.hasDataTable */
84
86
  hasDataTable(): boolean;
85
87
  /** @inheritdoc IFormulaBlock.hasVolatile */
@@ -334,6 +334,11 @@ export interface IFormulaBlock extends IFormulaBlockView {
334
334
  * either all of them call a total function or none do.
335
335
  */
336
336
  hasTotals(): boolean;
337
+ /**
338
+ * Whether the formula calls `GETPIVOTDATA` anywhere in its tree; read off the compiled cache as
339
+ * {@link hasTotals} is. What is recalculated when the pivot tables change.
340
+ */
341
+ hasPivotData(): boolean;
337
342
  /**
338
343
  * Whether the formula calls `TABLE`, the what-if data table, anywhere in its tree. Read off the
339
344
  * compiled cache (`CompiledFormula.hasDataTable`).
@@ -380,5 +385,18 @@ export interface IFormulaBlock extends IFormulaBlockView {
380
385
  * @param other The other formula block to compare to.
381
386
  */
382
387
  isEquals(other: IFormulaBlock): boolean;
388
+ /**
389
+ * How far above and left of its cell a spilled result starts; absent, or `null`, for a result
390
+ * that spills from its cell, as every formula's does. An engine-only block placing a pivot
391
+ * table's cells answers the rows of its page fields.
392
+ */
393
+ getSpillOrigin?(): IFormulaBlock.SpillOrigin | null;
394
+ }
395
+ export declare namespace IFormulaBlock {
396
+ /** Rows above and columns left of the anchor where a spill's extent starts; never negative. */
397
+ interface SpillOrigin {
398
+ rows: number;
399
+ columns: number;
400
+ }
383
401
  }
384
402
  //# sourceMappingURL=IFormulaBlock.d.ts.map
@@ -244,11 +244,13 @@ export declare class CalcGrid implements ICalcGrid {
244
244
  setHidden(axis: IRange.Axis, runs: readonly RunCoords[], options?: ICalcGrid.RequestOptions): void;
245
245
  /** {@inheritDoc ICalcGrid.setFiltered} */
246
246
  setFiltered(filtered: boolean, options?: ICalcGrid.RequestOptions): void;
247
+ /** {@inheritDoc ICalcGrid.setPivots} */
248
+ setPivots(pivots: readonly ICalcGrid.PivotJSON[], options?: ICalcGrid.RequestOptions): Promise<ICalcGrid.Results>;
247
249
  /**
248
250
  * Holds what the owner says of itself - its size, what it hides, whether it is filtered - in the
249
251
  * caller's operation: an undo restores it with whatever changed it.
250
252
  */
251
- protected _holdOwnerState(update: Pick<Partial<CalcGrid.State>, 'hiddenRows' | 'hiddenColumns' | 'filtered' | 'entireCoords'>): void;
253
+ protected _holdOwnerState(update: Pick<Partial<CalcGrid.State>, 'hiddenRows' | 'hiddenColumns' | 'filtered' | 'pivots' | 'entireCoords'>): void;
252
254
  /** {@inheritDoc ICalcGrid.getId} */
253
255
  getId(): string;
254
256
  /** {@inheritDoc ICalcGrid.toJSON} */
@@ -362,6 +364,8 @@ export declare namespace CalcGrid {
362
364
  hiddenColumns: readonly RunCoords[] | null;
363
365
  /** Whether the owner is filtered. See {@link ICalcGrid.setFiltered}. */
364
366
  filtered: boolean;
367
+ /** The pivot tables on the grid; `null` for none. See {@link ICalcGrid.setPivots}. */
368
+ pivots: readonly ICalcGrid.PivotJSON[] | null;
365
369
  /** The grid's size; `null` for one that has the size of its {@link ConstructorOptions.sizeOf} grid. See {@link ICalcGrid.resize}. */
366
370
  entireCoords: IRange.Coords | null;
367
371
  }
@@ -50,6 +50,8 @@ export declare class CalcGridBackend extends CalcGridProxy implements ICalcGrid.
50
50
  protected _hiddenColumns: readonly RunCoords[] | null;
51
51
  /** Whether the owner is filtered ({@link ICalcGrid.setFiltered}). Versioned with the maps. */
52
52
  protected _filtered: boolean;
53
+ /** The pivot tables on the grid ({@link ICalcGrid.setPivots}); `null` for none. Versioned with the maps. */
54
+ protected _pivots: readonly ICalcGrid.PivotJSON[] | null;
53
55
  /**
54
56
  * @see CalcGridBackend.ConstructorOptions.unanchored
55
57
  */
@@ -164,6 +166,11 @@ export declare class CalcGridBackend extends CalcGridProxy implements ICalcGrid.
164
166
  * ({@link ICalcGrid.setFiltered}). Engine-side: not on {@link ICalcGrid}.
165
167
  */
166
168
  isFiltered(): boolean;
169
+ /**
170
+ * The pivot tables on the grid ({@link ICalcGrid.setPivots}); `null` for none. Engine-side: not
171
+ * on {@link ICalcGrid}.
172
+ */
173
+ getPivots(): readonly ICalcGrid.PivotJSON[] | null;
167
174
  /**
168
175
  * A range's skip (`IRange.IteratorOptions.processRowSkip`) over the rows or columns the owner
169
176
  * hides, for a range starting at `origin` on that axis; `null` when the hidden set does not
@@ -188,8 +195,28 @@ export declare class CalcGridBackend extends CalcGridProxy implements ICalcGrid.
188
195
  protected _setHiddenNow(axis: IRange.Axis, runs: readonly RunCoords[]): void;
189
196
  /** What a `filtered` request carries, held; as {@link _setHiddenNow}, the totals are owed a pass. */
190
197
  protected _setFilteredNow(filtered: boolean): void;
198
+ /**
199
+ * What a `pivots` request carries, held; every formula that calls `GETPIVOTDATA` is owed a
200
+ * pass, on every grid, as a total is ({@link _setHiddenNow}): a pivot changes no cell the graph
201
+ * reaches.
202
+ */
203
+ protected _setPivotsNow(pivots: readonly ICalcGrid.PivotJSON[] | null, cloneKey?: string | null): void;
204
+ /**
205
+ * Each laid-out pivot table's extent, anchored at its location's top-left: the grid's pivot
206
+ * extents are removed and those of `next` placed. The extents are found where they are now, not
207
+ * at `previous`'s anchors: a shift since the last request has moved them.
208
+ *
209
+ * @remarks
210
+ * The cells are the sheet's stored values: an extent owns none of them, so placing or removing
211
+ * one writes no value. It refuses a shift that would move part of the table
212
+ * ({@link SpillEntry.checkShift}), and a write inside it neither demotes nor removes it
213
+ * (`applyContentful`). A blocked table stores `#SPILL!` at its anchor and has no extent.
214
+ */
215
+ protected _placePivots(_previous: readonly ICalcGrid.PivotJSON[] | null, next: readonly ICalcGrid.PivotJSON[] | null, _cloneKey?: string | null): void;
191
216
  /** Mark every formula that calls a total function, on every grid, and ask for a pass. */
192
217
  protected _markTotals(): void;
218
+ /** Mark every formula `select` picks, on every grid, and ask for a pass. */
219
+ protected _markFormulas(select: (value: FormulaSpatialValue) => boolean): void;
193
220
  /** @inheritdoc ICalcGrid.getId */
194
221
  getShadowOf(): string | null;
195
222
  /** @inheritdoc ICalcGrid.isArrayFirstCell */
@@ -342,7 +369,13 @@ export declare class CalcGridBackend extends CalcGridProxy implements ICalcGrid.
342
369
  * Will update absolute precedents from precedentEntries relative precedents get shifted
343
370
  */
344
371
  protected _moveTo(snapshot: CalcGridSnapshot, from: IRange.Coords, to: IRange.Coords): void;
345
- protected _notifyCalculated(cycleId: number, options: ICalculation.CalculateOptions | boolean): Promise<CalcResponse>;
372
+ /**
373
+ * Drain what is owed to the owner as one record, pushed through `onCalculated` and answered.
374
+ *
375
+ * @param commitId The snapshot the record answers for; `null` for none, the operation in
376
+ * progress; by default the last one a pass applied.
377
+ */
378
+ protected _notifyCalculated(cycleId: number, options: ICalculation.CalculateOptions | boolean, commitId?: string | null): Promise<CalcResponse>;
346
379
  /**
347
380
  * The write itself, on a `Running` engine. Records what it minted and removed for the vend rather
348
381
  * than taking it, so the engine's own callers (a reference edit, `recompileNamed`) leave the
@@ -484,6 +517,8 @@ export interface CalcGridMaps {
484
517
  hiddenColumns?: readonly RunCoords[] | null;
485
518
  /** Whether the owner is filtered. */
486
519
  filtered?: boolean;
520
+ /** The pivot tables on the grid. */
521
+ pivots?: readonly ICalcGrid.PivotJSON[] | null;
487
522
  }
488
523
  interface CalcGridSnapshot {
489
524
  calcGrid: CalcGridBackend;
@@ -29,6 +29,8 @@ export declare class CalcGridProxy implements ICalcGrid.Backend {
29
29
  setHidden(axis: IRange.Axis, runs: readonly RunCoords[], options?: ICalcGrid.RequestOptions): void;
30
30
  /** {@inheritDoc ICalcGrid.setFiltered} */
31
31
  setFiltered(filtered: boolean, options?: ICalcGrid.RequestOptions): void;
32
+ /** {@inheritDoc ICalcGrid.setPivots} */
33
+ setPivots(pivots: readonly ICalcGrid.PivotJSON[], options?: ICalcGrid.RequestOptions): Promise<ICalcGrid.Results>;
32
34
  /** {@inheritDoc ICalcGrid.addListeners} */
33
35
  addListeners(listeners: ICalcGrid.IListeners, options?: IListener.Options): IListener.Remove;
34
36
  /** @inheritdoc ICalcGrid.setInputs */
@@ -216,9 +216,11 @@ export declare function checkFixedSpillsShift(spillSpatial: ISpatialMap<SpillEnt
216
216
  /**
217
217
  * Finds all spills that intersect a range and removes them for operations.
218
218
  *
219
- * restore will behave differently depending on the top/left.
219
+ * restore will behave differently depending on the anchor.
220
220
  *
221
- * Outside of intersect: restore will put back to original location.
221
+ * Outside of intersect: restore will put back to original location, unless the anchor is past the
222
+ * intersect on the shifted axis (a spill whose extent starts above or left of its anchor, a pivot
223
+ * table's page fields): the shift moves that anchor, so the spill moves with it.
222
224
  * Inside intersect: Restore will either discard to move to restore Location if provided
223
225
  *
224
226
  * @returns a `restore` function or `null` that will restore spills.
@@ -1,5 +1,5 @@
1
1
  import { IRange, IRuntime, Scalar } from '@sheetxl/primitives';
2
- import { ISparseGrid } from '../../collections';
2
+ import { ISparseGrid, ISpatialMap, Tuple } from '../../collections';
3
3
  import { ITransaction } from '../../transaction';
4
4
  import { IFormulaBlockView } from '../formula';
5
5
  import { ICalcGrid } from './ICalcGrid';
@@ -242,6 +242,8 @@ export declare class FormulaHost {
242
242
  * longer exists), then the grid.
243
243
  */
244
244
  dispose(): void;
245
+ /** Values and formulas written together, inside the operation that makes them. */
246
+ setInputs(values: Tuple.Region<Scalar> | null, formulas: readonly ISpatialMap.Entry<string>[]): Promise<ICalcGrid.Results>;
245
247
  /**
246
248
  * A write to the model's grid, inside the operation that makes it; one made while no operation
247
249
  * is open - a name wired as the engine comes up - is folded into the commit the store is at,