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

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 (191) hide show
  1. package/browser/esm/{BpgskG1Er_lGQ_yS.mjs → -Jx-jNHmtIQQfLvK.mjs} +1 -1
  2. package/browser/esm/{BLoUBId2xZpXAK_H.mjs → 2WuhYrIpYmOR5H73.mjs} +15 -15
  3. package/browser/esm/{Ctjb0SsxV4K4MMqG.mjs → 2mIwPy2D2JUX-9wx.mjs} +2 -2
  4. package/browser/esm/{CkxWugaJFjDGZNZ-.mjs → B3wf5vZCsWfWsDbj.mjs} +1 -1
  5. package/browser/esm/{BjkCiv5Jz6WYKZeu.mjs → BIHrHjRGWVlJglcp.mjs} +2 -2
  6. package/browser/esm/{BtvLTTfSBdAKplVG.mjs → BTFBedJMRWGvZyCE.mjs} +1 -1
  7. package/browser/esm/{C4MqfLn9Dm-l3OIk.mjs → BdCJNawfifyPupCP.mjs} +1 -1
  8. package/browser/esm/{CV5EGEjG5_-CPpP0.mjs → Bg5Di9GLNAkbqQ1P.mjs} +3 -3
  9. package/browser/esm/{C2VbEI_XVAoseAwa.mjs → BnC4-27Igwb8oDf2.mjs} +2 -2
  10. package/browser/esm/{CQYjO777cmAznUzK.mjs → Bt8_m94tBdks209L.mjs} +1 -1
  11. package/browser/esm/{C16ycKja6zG0crV_.mjs → BudSIfXBAsTxvu-K.mjs} +17836 -15712
  12. package/browser/esm/{DvAaxH6z_tGvrRzl.mjs → C9u8FUewte5ugUjH.mjs} +686 -686
  13. package/browser/esm/{DEiPS3Dr-s4fPbVZ.mjs → CBYMTDzMf1Vh7pkw.mjs} +1 -1
  14. package/browser/esm/{Dyq_ivuHvlXLwPCl.mjs → CNdjyofiRu6CYOrr.mjs} +1106 -1102
  15. package/browser/esm/{PcHFjNzQsE54POri.mjs → CRkYR-siY2C994KV.mjs} +1 -1
  16. package/browser/esm/{C5E6zSGAALWf61n4.mjs → CTe2qfmIUEad6FJv.mjs} +2 -2
  17. package/browser/esm/{BoV6zPBnfqCBCqZ7.mjs → CUzYuYTTGsChC_kZ.mjs} +3841 -3148
  18. package/browser/esm/CdEO8CEee6lEhabA.mjs +117 -0
  19. package/browser/esm/{S2dNNx1a5ydRnARM.mjs → CfRqiPDg6RBTg1EN.mjs} +2 -2
  20. package/browser/esm/{ClbvFbFzFzXLBKNN.mjs → CndRBvVfQUJIYRRj.mjs} +50 -50
  21. package/browser/esm/{BnG31I6Oj_HEtSPS.mjs → CwOPLXU3-9ZHGyOT.mjs} +1 -1
  22. package/browser/esm/{CHU6iu_WGlm7fLET.mjs → Cxjxk0ncRKx80I-w.mjs} +1 -1
  23. package/browser/esm/D2RZh0O9neOsyLAE.mjs +281 -0
  24. package/browser/esm/{BkBhLS0l6z8sxI6D.mjs → D64dM68B1pKYFzdP.mjs} +2 -2
  25. package/browser/esm/{BVDiOXGMc5_FMGfy.mjs → D9xNz46kAfXMZzp4.mjs} +2 -2
  26. package/browser/esm/{zlLuW405RSguy4Kn.mjs → DK899HhWX1HINMC1.mjs} +53 -53
  27. package/browser/esm/{B7aUIvgUjncMMD_i.mjs → DPhGQLNGmDZwODwJ.mjs} +5 -4
  28. package/browser/esm/{gssVX_FH1XFN-twD.mjs → DVroRnhi-5IDXNgM.mjs} +1 -1
  29. package/{node/esm/CZICGK_ss0HoGHCP.mjs → browser/esm/DZiivy0NmO1Vnyzk.mjs} +2 -2
  30. package/browser/esm/{ClPfI4lODvCece29.mjs → DgrAuRD2qr2DvFeJ.mjs} +61 -61
  31. package/browser/esm/{CU3DmJ-YnVVrC1_k.mjs → DobHLF6VjHr7Xi40.mjs} +1 -1
  32. package/browser/esm/{CaB7J-xgfKO2uAkG.mjs → DwZCT7DZiiXoTweg.mjs} +2 -2
  33. package/browser/esm/{BMyDRQ716j79h_bH.mjs → DwwR3O2sEZApPSTF.mjs} +6 -6
  34. package/browser/esm/{DLLE0FZNsKxbBzRn.mjs → Tah7cnFb_HNZdLtj.mjs} +45 -45
  35. package/browser/esm/{Dlmig06rIo7cInRk.mjs → fXWUMDhZ5yMSO629.mjs} +1 -1
  36. package/browser/esm/{DWNzqw7DUKwoxjri.mjs → hCQJcmIzPDxDEv2q.mjs} +2 -2
  37. package/browser/esm/index.mjs +679 -542
  38. package/browser/esm/{BFagR2JeWs74iAG3.mjs → qO-ujUrgq6H3TQix.mjs} +1 -1
  39. package/browser/esm/w6Jea0TiclPrYZ2M.mjs +1703 -0
  40. package/browser/esm/yuhcOYw6SHQ-RCm3.mjs +114 -0
  41. package/node/esm/-TA0MneBDKdGhsib.mjs +8668 -0
  42. package/node/esm/{B21JjOLghRoDOrkx.mjs → B-HUPAcqvK0eeeCz.mjs} +1 -1
  43. package/node/esm/{DNRhGK-8Tr9xcRyc.mjs → BL2iiEoqxDEV2Xrg.mjs} +3 -3
  44. package/node/esm/{D1TKBVmoKGAXf37B.mjs → BNXLOEddJ6O9gYws.mjs} +2 -2
  45. package/node/esm/{BrCKGFRsX_ezFJ4B.mjs → BSvOluusoDM4z_dx.mjs} +15 -15
  46. package/node/esm/{BIwObuhTJYf0jpUa.mjs → BskP3b8vUoIOGLY6.mjs} +2 -2
  47. package/node/esm/{2Kihw_-5lVTEnwMa.mjs → Btw4148Ot8ifhNc1.mjs} +1 -1
  48. package/node/esm/{BqiexuA89caYnAPz.mjs → C14-R6tifRh7pc0p.mjs} +1 -1
  49. package/node/esm/{DUTskXCXref-IJnI.mjs → C99zzq8DImQXi4BQ.mjs} +47 -47
  50. package/node/esm/{D8zEN-6ZdDqDvTxM.mjs → CBuEu5Jk-LfaDy-H.mjs} +61 -61
  51. package/node/esm/{yavzZOiZW_EjG9lE.mjs → CG-qBU5BAaVz7e-P.mjs} +1 -1
  52. package/node/esm/CPI58duc0j0a-HpJ.mjs +115 -0
  53. package/node/esm/{CCN5vD410obwdz38.mjs → CRt3vXe6YmXzqk3H.mjs} +15 -14
  54. package/node/esm/{CzXT00vrQa1_gvW9.mjs → C_aL7CGS1lrNn1Ng.mjs} +1 -1
  55. package/node/esm/{CZiqiay42tFTrLI4.mjs → C_xf5Bz30VqiJjXn.mjs} +1 -1
  56. package/node/esm/{BIRq1kT7lLRzns9t.mjs → CiIymQN6aJCul62g.mjs} +9 -9
  57. package/node/esm/{CNCNJNg890KdgkWh.mjs → Ci_zLYmCD7e-C79O.mjs} +1 -1
  58. package/{browser/esm/D5np__Jb1euAyaLw.mjs → node/esm/CkRYLed8Mmn3giNg.mjs} +2 -2
  59. package/node/esm/D3ptRKzASqBut1DE.mjs +117 -0
  60. package/node/esm/{cGwrLA1RCE-WhJ7w.mjs → D4ROK9UwDpS6jO3Z.mjs} +1 -1
  61. package/node/esm/{mFiBSM7XgBHV9AY7.mjs → D8hO07ToAibIuniw.mjs} +1535 -1531
  62. package/node/esm/{CDHdgJXH2vS71WMc.mjs → DUTmDHbFbhLDT4F3.mjs} +1 -1
  63. package/node/esm/{CGp6VZL-gZa9Uezx.mjs → DV5CU37aEbFbWFL0.mjs} +1 -1
  64. package/node/esm/{De2IONBxQhz-Qbyh.mjs → DdoiuKg9BKubtF1V.mjs} +1 -1
  65. package/node/esm/{Db0v7zXNnyjBIjjI.mjs → DggQ23jKMpwhENfa.mjs} +2 -2
  66. package/node/esm/{CwePQwTILHHjGDkZ.mjs → DhS6yWjrrSNIJMsn.mjs} +204 -204
  67. package/node/esm/{D_t5AUxSm7_icjzq.mjs → DhTya_mhmN53vskv.mjs} +1 -1
  68. package/node/esm/{DOU54VsOjG-m-NyQ.mjs → Dn1M7YWi25DeeYUb.mjs} +1 -1
  69. package/node/esm/{DkwIPzKc3UwdUIfM.mjs → DrCf6ITcBhVOFpRj.mjs} +6 -6
  70. package/node/esm/{D2KBymQJd1XhpeQD.mjs → DxazKtROyaI51dWl.mjs} +1 -1
  71. package/node/esm/{D6e2z7eZpxOJXHc7.mjs → Q_S1g46ZOTrdhTae.mjs} +1 -1
  72. package/node/esm/{OVfaSb506tNSIvbv.mjs → Vocy-I9dKzZMr0Ct.mjs} +19038 -16822
  73. package/node/esm/ZXPFcsT2zrALCZux.mjs +289 -0
  74. package/node/esm/{857CIBgQgGpnqrXk.mjs → eimUGjiIP-b8HiM6.mjs} +55 -55
  75. package/node/esm/{Bbf1Pm9Gk7YpLTvg.mjs → icn2nX5Z8e_3mNAv.mjs} +1 -1
  76. package/node/esm/index.mjs +740 -603
  77. package/node/esm/{Ct3h15sCus4Tgt6M.mjs → lGJ42sHqg5if2bba.mjs} +624 -616
  78. package/node/esm/{CdJHUJSBRHZoryPe.mjs → pYtP7wPyS96NQyXS.mjs} +59 -59
  79. package/package.json +6 -6
  80. package/resources/locales/de/model.msg.json +8 -2
  81. package/resources/locales/en/model.msg.json +9 -2
  82. package/types/scripting-api.json +10619 -10446
  83. package/types/scripting-enums.json +20 -1
  84. package/types/scripting.d.ts +1233 -296
  85. package/types/src/{sheet → anomalies}/_Anomalies.d.ts +3 -3
  86. package/types/src/anomalies/_FocusTable.d.ts +11 -0
  87. package/types/src/{sheet/_AnomalyFormulaChecks.d.ts → anomalies/_FormulaChecks.d.ts} +10 -2
  88. package/types/src/{sheet/_AnomalyLabelChecks.d.ts → anomalies/_LabelChecks.d.ts} +1 -1
  89. package/types/src/anomalies/_LiteralChecks.d.ts +35 -0
  90. package/types/src/anomalies/_SeriesChecks.d.ts +13 -0
  91. package/types/src/calculation/Calculation.d.ts +47 -9
  92. package/types/src/calculation/ExternalBookBindings.d.ts +2 -3
  93. package/types/src/calculation/ICalculation.d.ts +96 -9
  94. package/types/src/calculation/NamedFormulaCollection.d.ts +104 -8
  95. package/types/src/calculation/_CloneBoundary.d.ts +1 -1
  96. package/types/src/calculation/compiler/ASTTypes.d.ts +6 -2
  97. package/types/src/calculation/compiler/Types.d.ts +8 -0
  98. package/types/src/calculation/engine/CalcBackend.d.ts +104 -6
  99. package/types/src/calculation/executor/CalcExecutor.d.ts +73 -22
  100. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +17 -1
  101. package/types/src/calculation/executor/_WhatIf.d.ts +50 -0
  102. package/types/src/calculation/formula/FormulaBlock.d.ts +4 -3
  103. package/types/src/calculation/formula/IFormulaBlock.d.ts +5 -0
  104. package/types/src/calculation/functions/_DataTableFunction.d.ts +14 -0
  105. package/types/src/calculation/grid/CalcGrid.d.ts +4 -6
  106. package/types/src/calculation/grid/CalcGridBackend.d.ts +5 -27
  107. package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -2
  108. package/types/src/calculation/grid/CalcGridUtils.d.ts +4 -2
  109. package/types/src/calculation/grid/ICalcGrid.d.ts +16 -12
  110. package/types/src/calculation/grid/_CalcRequest.d.ts +17 -5
  111. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +2 -0
  112. package/types/src/calculation/spatial/SpillEntry.d.ts +16 -2
  113. package/types/src/calculation/state/CalcNode.d.ts +0 -1
  114. package/types/src/calculation/state/CalcScope.d.ts +29 -0
  115. package/types/src/calculation/state/CalcState.d.ts +26 -4
  116. package/types/src/calculation/state/CalculationContext.d.ts +28 -1
  117. package/types/src/calculation/state/DeferredCalls.d.ts +260 -0
  118. package/types/src/calculation/state/IContextContainer.d.ts +20 -0
  119. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +6 -0
  120. package/types/src/calculation/state/_WhatIfLayer.d.ts +91 -0
  121. package/types/src/cell/ICell.d.ts +53 -34
  122. package/types/src/cellControl/CellControl.d.ts +67 -0
  123. package/types/src/cellControl/CellControlCollection.d.ts +29 -0
  124. package/types/src/cellControl/CellControlRegistry.d.ts +47 -0
  125. package/types/src/cellControl/ICellControl.d.ts +99 -0
  126. package/types/src/cellControl/ICellControlCollection.d.ts +67 -0
  127. package/types/src/cellControl/index.d.ts +4 -0
  128. package/types/src/cellRange/ICellRange.d.ts +207 -59
  129. package/types/src/cellRange/ICellRanges.d.ts +4 -3
  130. package/types/src/chart/layout/ChartLayout.d.ts +5 -1
  131. package/types/src/chart/resolve/_Resolve.d.ts +10 -0
  132. package/types/src/chart/resolve/_ResolvedChart.d.ts +5 -2
  133. package/types/src/collections/ISparseGrid.d.ts +11 -2
  134. package/types/src/collections/MixedTypedArrayList.d.ts +8 -2
  135. package/types/src/collections/SparseGrid.d.ts +3 -8
  136. package/types/src/condition/AnchoredConditional.d.ts +2 -2
  137. package/types/src/externalBook/IExternalBook.d.ts +3 -4
  138. package/types/src/fetch/Fetcher.d.ts +15 -0
  139. package/types/src/fetch/IFetcher.d.ts +47 -0
  140. package/types/src/fetch/_WorkbookFetch.d.ts +43 -0
  141. package/types/src/fetch/index.d.ts +3 -0
  142. package/types/src/fill/PaintUtils.d.ts +3 -1
  143. package/types/src/hyperlink/IHyperlink.d.ts +10 -0
  144. package/types/src/hyperlink/_Hyperlink.d.ts +4 -1
  145. package/types/src/index.d.ts +2 -1
  146. package/types/src/named/INamedCollection.d.ts +36 -0
  147. package/types/src/named/NamedCollection.d.ts +18 -0
  148. package/types/src/primitives/AsyncValue.d.ts +58 -0
  149. package/types/src/resource/IResource.d.ts +9 -0
  150. package/types/src/resource/IResourceCollection.d.ts +4 -0
  151. package/types/src/resource/Resource.d.ts +2 -0
  152. package/types/src/resource/_AddResource.d.ts +13 -0
  153. package/types/src/richData/CellImage.d.ts +95 -0
  154. package/types/src/richData/Hyperlink.d.ts +49 -0
  155. package/types/src/richData/IRichDataCollection.d.ts +76 -0
  156. package/types/src/richData/IRichDataKind.d.ts +55 -11
  157. package/types/src/richData/RichArray.d.ts +42 -0
  158. package/types/src/richData/RichDataCollection.d.ts +23 -0
  159. package/types/src/richData/RichDataRegistry.d.ts +46 -14
  160. package/types/src/richData/RichDataValues.d.ts +20 -0
  161. package/types/src/richData/RichRecord.d.ts +68 -0
  162. package/types/src/richData/RichText.d.ts +5 -5
  163. package/types/src/richData/index.d.ts +6 -0
  164. package/types/src/scripting/FunctionArguments.d.ts +17 -1
  165. package/types/src/scripting/FunctionCollection.d.ts +8 -0
  166. package/types/src/scripting/Scripts.d.ts +10 -0
  167. package/types/src/scripting/TypedFunction.d.ts +2 -0
  168. package/types/src/sheet/ICellContainerOptions.d.ts +6 -0
  169. package/types/src/sheet/IWorksheet.d.ts +24 -17
  170. package/types/src/sheet/SheetCell.d.ts +17 -1
  171. package/types/src/sheet/SheetRange.d.ts +8 -2
  172. package/types/src/sheet/SheetRanges.d.ts +2 -2
  173. package/types/src/sheet/Worksheet.d.ts +110 -56
  174. package/types/src/sheet/_ListenerAnchor.d.ts +7 -1
  175. package/types/src/sheet/_ScalarListFactory.d.ts +54 -6
  176. package/types/src/sheet/_SheetMutations.d.ts +4 -1
  177. package/types/src/sheet/_SheetStateTypes.d.ts +23 -11
  178. package/types/src/workbook/IWorkbook.d.ts +40 -1
  179. package/types/src/workbook/Workbook.d.ts +25 -3
  180. package/types/src/workbook/WorkbookRanges.d.ts +1 -1
  181. package/browser/esm/BGOFfpxr2jPIdqmV.mjs +0 -40
  182. package/browser/esm/f1IoRb7tEb0QmCSt.mjs +0 -110
  183. package/browser/esm/nvU0ClAbf0g94YBK.mjs +0 -1695
  184. package/node/esm/B084DssTcdBheTp_.mjs +0 -7966
  185. package/node/esm/Df1bL6VFvrqIdSLB.mjs +0 -40
  186. package/node/esm/DrTZbfemSLq2mseG.mjs +0 -111
  187. package/types/src/dataTable/DataTable.d.ts +0 -67
  188. package/types/src/dataTable/DataTableCollection.d.ts +0 -19
  189. package/types/src/dataTable/IDataTable.d.ts +0 -99
  190. package/types/src/dataTable/IDataTableCollection.d.ts +0 -18
  191. package/types/src/dataTable/index.d.ts +0 -6
@@ -92,12 +92,18 @@ export declare namespace ListenerAnchor {
92
92
  * applies that when it writes a reference out (`TokenUtils`: an endpoint outside the sheet's
93
93
  * bounds is written as `#REF!`); the node applies it here, to the same effect.
94
94
  *
95
+ * That is the `TwoCell` rule, the default. The other anchor types are the movable's
96
+ * ({@link IAnchored.Type}): `OneCell` shifts the top-left as a one-cell reference and keeps the
97
+ * extent, staying put when that cell is deleted; `Absolute` never moves, so a view listening to
98
+ * the rows it shows keeps hearing about those rows.
99
+ *
95
100
  * Handed to the map as {@link IAnchoredMap.ConstructorOptions.shiftEntry}.
96
101
  *
97
102
  * @param details The shift, as the map describes it.
98
103
  * @param entire The bounds of the sheet the node is on.
104
+ * @param anchor How the node follows the shift. Defaults to `TwoCell`.
99
105
  */
100
- function shiftReference(details: ISpatialMap.ShiftDetails, entire: IRange.Coords): IRange.Coords | null;
106
+ function shiftReference(details: ISpatialMap.ShiftDetails, entire: IRange.Coords, anchor?: IAnchored.Type): IRange.Coords | null;
101
107
  /** The container hooks a node registers; see {@link Anchored.ContainerCallbacks}. */
102
108
  type Callbacks = Anchored.ContainerCallbacks;
103
109
  }
@@ -1,6 +1,6 @@
1
- import { Scalar } from '@sheetxl/primitives';
1
+ import { Scalar, IRichData } from '@sheetxl/primitives';
2
2
  import { IStringCollection } from '../string';
3
- import { ICell } from '../cell';
3
+ import { IRichDataKind, IRichDataCollection } from '../richData';
4
4
  import { IListLike } from '../collections';
5
5
  import { MixedTypedArrayList } from '../collections/MixedTypedArrayList';
6
6
  /**
@@ -11,8 +11,14 @@ import { MixedTypedArrayList } from '../collections/MixedTypedArrayList';
11
11
  * - shorter than {@link ScalarListFactory.TypedThreshold}: a plain array (a typed list costs
12
12
  * more than its values below that, measured at 64 on Node);
13
13
  * - one value throughout: a `RepeatingList` of period 1, which the engine reads once;
14
- * - holding rich data: a plain array (no pool for it yet);
15
- * - otherwise a {@link MixedTypedArrayList}, strings and errors by id.
14
+ * - otherwise a {@link MixedTypedArrayList}, strings, errors and rich values by id.
15
+ *
16
+ * @remarks
17
+ * The typed list is the representation that crosses threads: a worker or the Rust engine reads
18
+ * the codes and numbers from (shared) array buffers, and a string travels as its id into the
19
+ * string table, a rich value as its id into the rich data collection (DESIGN-RICH-DATA-REGISTRY
20
+ * §3.3; the wire format is DESIGN-CALC-SERVICE G7). A factory made with no rich data collection
21
+ * keeps a run holding rich data as a plain array of the values.
16
22
  *
17
23
  * @internal
18
24
  */
@@ -21,9 +27,17 @@ export declare class ScalarListFactory {
21
27
  static readonly TypedThreshold = 64;
22
28
  readonly codec: MixedTypedArrayList.Codec<Scalar>;
23
29
  private readonly _strings;
30
+ private readonly _richData;
31
+ private readonly _richValues;
24
32
  private _codes;
25
33
  private _nums;
26
- constructor(strings: IStringCollection);
34
+ /**
35
+ * @param richData What rich values loaded through this factory are made for; omitted, made
36
+ * outside any workbook.
37
+ * @param richValues Where a run stores its rich values by id; omitted, a run holding one is a
38
+ * plain array.
39
+ */
40
+ constructor(strings: IStringCollection, richData?: () => IRichDataKind.Context, richValues?: IRichDataCollection);
27
41
  /**
28
42
  * The list for a run a builder collected. Passed to `Tuple.Builder` as its `createList`.
29
43
  *
@@ -43,8 +57,42 @@ export declare class ScalarListFactory {
43
57
  *
44
58
  * @param values The run's JSON values. Never empty.
45
59
  * @param onError Called with the offset of every error value, for the error index.
60
+ * @param richAt The rich value a saved id names (the file's rich data table). A value saved
61
+ * inline, as older files hold them, needs none.
62
+ */
63
+ fromJSONRun(values: readonly Scalar.JSON[], onError?: (offset: number) => void, richAt?: (id: number) => IRichData | null): IListLike<Scalar>;
64
+ /**
65
+ * One value as a file holds it, decoded on its own. {@link fromJSONRun} is the same decoding for
66
+ * a whole run, into a typed list.
67
+ *
68
+ * @param json The value. `null` and `undefined` are blank.
69
+ * @param decodeString Resolves a string id. Omitted, a string is the literal text (as an
70
+ * external link's cache holds it).
71
+ * @param richData What a rich value is made for; omitted, made outside any workbook.
72
+ */
73
+ static fromJSONValue(json: Scalar.JSON | null | undefined, decodeString?: (id: number) => string, richData?: IRichDataKind.Context): Scalar;
74
+ /**
75
+ * A run as a file holds it (`IWorksheet.JSON` data): the inverse of {@link fromJSONRun}.
76
+ *
77
+ * @param run A run as the grid stores it (a blank ends a run, so it holds none).
78
+ * @param addString Returns the persisted id for a string.
79
+ * @param toResourceId Returns the persisted id for a resource a rich value holds.
80
+ * @param addRich Returns the persisted id for a rich value; omitted, a rich value is written
81
+ * inline.
82
+ */
83
+ static toJSONRun(run: IListLike<Scalar>, addString: (value: string) => number, toResourceId?: IRichData.ToResourceId, addRich?: (value: IRichData) => number): Scalar.JSON[];
84
+ /**
85
+ * One value as a run holds it in a file: the encoding {@link toJSONRun} applies to each. Numbers and
86
+ * booleans as they are, strings as their id (as a string), errors and rich data typed.
87
+ *
88
+ * @param value The value to encode. Never `null`.
89
+ * @param addString Returns the persisted id for a string.
90
+ * @param toResourceId Returns the persisted id for a resource a rich value holds.
91
+ * @param addRich Returns the persisted id for a rich value; omitted, a rich value is written
92
+ * inline.
93
+ * @returns `undefined` for a value with no encoding.
46
94
  */
47
- fromJSONRun(values: readonly ICell.JSON[], onError?: (offset: number) => void): IListLike<Scalar>;
95
+ static toJSONValue(value: Scalar, addString: (value: string) => number, toResourceId?: IRichData.ToResourceId, addRich?: (value: IRichData) => number): Scalar.JSON | undefined;
48
96
  /**
49
97
  * The list for a run whose values are already codes and numbers, as a file holds them: string
50
98
  * ids, error codes, ints and doubles. Nothing is resolved for a typed run; a short run is
@@ -50,7 +50,9 @@ export declare function setErrorIgnored(ctx: SheetMutationContext, ranges: reado
50
50
  * @internal
51
51
  */
52
52
  export declare function setHyperlinks(ctx: SheetMutationContext, ranges: readonly ISpatialMap.Entry<IHyperlink.Update>[], defaultUpdate?: IHyperlink.Update, // we do this because updateTuples may update each
53
- options?: ITransaction.OperationOptions): void;
53
+ options?: ITransaction.OperationOptions,
54
+ /** The caller has ruled on protection for these ranges (a content clear on a locked sheet). */
55
+ isRuled?: boolean): void;
54
56
  export declare function updateStyles(ctx: SheetMutationContext, ranges: readonly ISpatialMap.Entry<ICellStyle.Update>[], defaultUpdate?: ICellStyle.Update, // we do this because updateTuples may update each
55
57
  options?: ICellStyle.UpdateOptions, calcedNumberFormat?: boolean, // this is a bit of a hack. This is prevent number formats from functions to override user defined formats.
56
58
  isStep?: boolean): void;
@@ -162,6 +164,7 @@ export interface TupleScan {
162
164
  readonly allowFormatCells: boolean;
163
165
  readonly hasUnlockRanges: boolean;
164
166
  readonly runtime: SheetMutationContext['runtime'];
167
+ readonly richData: SheetMutationContext['richData'];
165
168
  /**
166
169
  * A scan that stays open holds only cells whose write cannot fail once scanned, and whose held
167
170
  * style changes that cell alone: a cell that carries a hyperlink or comments, or a style that
@@ -13,8 +13,8 @@ import { SpillEntry, ContentfulSpatialValue, CircularEntry } from '../calculatio
13
13
  import { IConditionalFormat } from '../conditionalFormat';
14
14
  import { IDataValidation } from '../dataValidation';
15
15
  import { IProtectedRange } from '../protectedRange';
16
+ import { ICellControl } from '../cellControl';
16
17
  import { IPivotTable } from '../pivot';
17
- import { IDataTable } from '../dataTable';
18
18
  import { ICell } from '../cell';
19
19
  import { IgnoredErrors } from './_IgnoredErrors';
20
20
  import { CellKind } from './_Kinds';
@@ -153,6 +153,14 @@ export declare namespace RangeState {
153
153
  * Overlaps are allowed
154
154
  */
155
155
  conditionals?: IConditionalFormat | IConditionalFormat[];
156
+ /**
157
+ * The cell's control, such as a checkbox.
158
+ *
159
+ * @remarks
160
+ * A cell has at most one; an array arises only from a file whose controls overlap, and the
161
+ * first wins (`ICell.getControl`).
162
+ */
163
+ cellControls?: ICellControl | ICellControl[];
156
164
  /**
157
165
  * The per-feature direct styles for a collection of cells (SHEET-STYLE-SPLIT). These are the
158
166
  * user-authored style, kept DISCRETE — `borderStyle` carries `borders`, `fillStyle` carries `fill`,
@@ -234,10 +242,8 @@ export declare namespace RangeState {
234
242
  * The date format as a string
235
243
  */
236
244
  dateFormat?: string;
237
- /**
238
- * Pending calcs.
239
- */
240
- pending?: boolean;
245
+ /** Why the cell is waiting on a calculation: its own function's result, or a precedent's. */
246
+ calcStatus?: ICalcGrid.CalcStatus;
241
247
  /**
242
248
  * Errors during calculation.
243
249
  */
@@ -283,12 +289,13 @@ export declare namespace RangeState {
283
289
  readonly Unlock: "unlock";
284
290
  readonly Contentful: "contentful";
285
291
  readonly Conditionals: "conditionals";
292
+ readonly CellControls: "cellControls";
286
293
  /**
287
294
  * Has a formula
288
295
  */
289
296
  readonly Formula: "formula";
290
297
  readonly Spills: "spills";
291
- readonly Pending: "pending";
298
+ readonly CalcStatus: "calcStatus";
292
299
  readonly CalcError: "calcError";
293
300
  /**
294
301
  * In a reference cycle, or downstream of one — evaluates to `0` (DESIGN-CIRCULAR-CALC.md §7).
@@ -339,8 +346,8 @@ export declare namespace RangeState {
339
346
  * spatial map (`dateFormatSpatial`, no longer internal-only), `Error` off the reconciled error
340
347
  * view. Neither needs the value-scan special-casing the old derived `Date` feature did.
341
348
  *
342
- * Internal-only members of `RangeState.Type` (`Pending`, `Continuous`, the legacy `Validation`
343
- * alias) deliberately have no public feature.
349
+ * Internal-only members of `RangeState.Type` (`Continuous`, the legacy `Validation` alias)
350
+ * deliberately have no public feature.
344
351
  */
345
352
  export declare const FeatureToRangeState: Readonly<Record<ICellRange.Feature, RangeState.Type | null>>;
346
353
  /**
@@ -358,7 +365,7 @@ export declare function featuresToSearchTypes(features?: ICellRange.Feature | re
358
365
  * would put an intersection on every valued cell (the null-check optimization dies).
359
366
  * - `Continuous` rides along with any content-style projection (it is the continuous-alignment
360
367
  * fast path — internal, so no public feature can name it).
361
- * - `Pending` rides along with `Formula`/`CalcError` (calc status accompanies calc state).
368
+ * - `CalcStatus` rides along with `Formula`/`CalcError` (calc status accompanies calc state).
362
369
  */
363
370
  export declare function cellFeaturesToSearchTypes(features?: ICellRange.Feature | readonly ICellRange.Feature[]): boolean | RangeState.SearchTypes;
364
371
  /**
@@ -463,6 +470,13 @@ export interface State {
463
470
  * Read through `RangeState.Type.Comments` — see {@link RangeState.Intersection.comments}.
464
471
  */
465
472
  comments: IAnchoredMap<IComment, IComment.JSON>;
473
+ /**
474
+ * The cell controls, such as checkboxes.
475
+ *
476
+ * @remarks
477
+ * Read through `RangeState.Type.CellControls` — see {@link RangeState.Intersection.cellControls}.
478
+ */
479
+ cellControls: IAnchoredMap<ICellControl, ICellControl.JSON>;
466
480
  /**
467
481
  * The reference each range listener watches.
468
482
  *
@@ -476,8 +490,6 @@ export interface State {
476
490
  listeners: IAnchoredMap<ListenerAnchor, never>;
477
491
  /** The pivot tables laid out on the sheet, anchored at their locations as tables are. */
478
492
  pivotTables: IAnchoredMap<IPivotTable, IPivotTable.JSON>;
479
- /** The data tables on the sheet, anchored at their result cells. */
480
- dataTables: IAnchoredMap<IDataTable, IDataTable.JSON>;
481
493
  /**
482
494
  * The grid's inputs this record pairs with, as the grid named them when the model last wrote
483
495
  * this sheet's cells (`ICalcGrid.Events.onInputsWritten`); `null` before any write.
@@ -1,8 +1,10 @@
1
- import { Scalar, IRange, IRangeStats, IRuntime, LocaleProfileOverrides } from '@sheetxl/primitives';
1
+ import { Scalar, IRange, IRangeStats, IRichType, IRuntime, LocaleProfileOverrides } from '@sheetxl/primitives';
2
2
  import { ITransaction } from '../transaction';
3
3
  import { IListener } from '../listener';
4
4
  import { IResourceCollection, IResource } from '../resource';
5
+ import { IFetcher } from '../fetch';
5
6
  import { IStringCollection } from '../string';
7
+ import { IRichDataCollection } from '../richData';
6
8
  import { ICalculation } from '../calculation';
7
9
  import { IFontCollection } from '../font';
8
10
  import { IScript, IModule, IModuleCollection } from '../scripting';
@@ -291,6 +293,34 @@ export interface IWorkbook extends ITransaction.ITransactional, IListener.ISourc
291
293
  * Returns the current shared resources.
292
294
  */
293
295
  getResources(): IResourceCollection;
296
+ /**
297
+ * The fetcher the workbook reaches outside itself with: the handlers per URL scheme a host
298
+ * registered, given as {@link IWorkbook.ConstructorOptions.fetcher}.
299
+ */
300
+ getFetcher(): IFetcher;
301
+ /**
302
+ * Fetches as the workbook does, with the standard `fetch` signature: what `IMAGE`, a web
303
+ * service function, and a renderer drawing a picture use.
304
+ *
305
+ * @remarks
306
+ * A resource with a `fetchedFrom` is the workbook's copy of that URL, and answers a fetch of it
307
+ * without a request. Anything else goes to {@link getFetcher}. The fetch saves nothing itself: a
308
+ * successful answer to a plain GET that is not a picture is cached until the workbook closes and
309
+ * answers later fetches of that URL. A response whose bytes are a picture says what they are,
310
+ * whatever the server called them. Plain GETs of one URL in flight together share one request;
311
+ * aborting one caller's signal does not stop it for the others. `cache: 'reload'` skips all of
312
+ * these and asks the source.
313
+ *
314
+ * The workbook saves a resource while a value holds it: `IMAGE` adds the picture it fetched for
315
+ * its values. A picture of the host's own goes in a cell the same way, under a URL the host mints:
316
+ *
317
+ * ```ts
318
+ * const source = `resource:${crypto.randomUUID()}`;
319
+ * const resource = workbook.getResources().add({ source: { buffer: bytes }, fetchedFrom: source });
320
+ * workbook.getRange('A1').setValue({ type: 'image', data: { source, resource } });
321
+ * ```
322
+ */
323
+ fetch(input: string, init?: RequestInit): Promise<Response>;
294
324
  /**
295
325
  * Returns the current shared resources.
296
326
  */
@@ -913,6 +943,10 @@ export declare namespace IWorkbook {
913
943
  styles?: IStyleCollection.JSON;
914
944
  resources?: IResource.JSON[];
915
945
  strings?: string[];
946
+ /** The rich values cells name by id (`{ t: 'r', v: id }`). */
947
+ richData?: IRichDataCollection.JSON[];
948
+ /** The kinds {@link richData} names that are not registered in code (a kind read from a file). */
949
+ richTypes?: IRichType.JSON[];
916
950
  /**
917
951
  * The people the workbook knows.
918
952
  *
@@ -1033,6 +1067,11 @@ export declare namespace IWorkbook {
1033
1067
  * A theme for the workbook.
1034
1068
  */
1035
1069
  theme?: ITheme;
1070
+ /**
1071
+ * How the workbook reaches outside itself: the handlers per URL scheme, with the host's
1072
+ * authentication. Omitted, a {@link Fetcher} for `http:` and `https:`.
1073
+ */
1074
+ fetcher?: IFetcher;
1036
1075
  /**
1037
1076
  * Load from JSON.
1038
1077
  */
@@ -1,4 +1,4 @@
1
- import { Scalar, IRange, IRangeStats, IRuntime, LocaleProfileOverrides } from '@sheetxl/primitives';
1
+ import { Scalar, IRange, IRangeStats, IRuntime, LocaleProfileOverrides, IFunction } from '@sheetxl/primitives';
2
2
  import { ITransaction } from '../transaction';
3
3
  import { IListener } from '../listener';
4
4
  import { INamedCollection } from '../named';
@@ -13,7 +13,10 @@ import { ICalculation } from '../calculation';
13
13
  import { IFontCollection } from '../font/IFontCollection';
14
14
  import { IScript, IModule, IModuleCollection } from '../scripting';
15
15
  import { IResourceCollection } from '../resource';
16
+ import { IFetcher } from '../fetch';
17
+ import { WorkbookFetch } from '../fetch/_WorkbookFetch';
16
18
  import { IStringCollection } from '../string';
19
+ import { IRichDataCollection } from '../richData/IRichDataCollection';
17
20
  import { ITheme } from '../theme';
18
21
  import { ICell } from '../cell';
19
22
  import { ICellRange, ICellRanges, ICellRegions } from '../cellRange';
@@ -59,6 +62,8 @@ export declare class Workbook implements IWorkbook {
59
62
  protected _scripts: IScript;
60
63
  protected _theme: ITheme;
61
64
  protected _strings: IStringCollection;
65
+ /** The rich values every sheet's runs hold by id. */
66
+ protected _richValues: IRichDataCollection;
62
67
  protected _ownStrings: boolean;
63
68
  /**
64
69
  * The pivot caches, held as read until they have a model of their own. Not workbook state:
@@ -83,6 +88,7 @@ export declare class Workbook implements IWorkbook {
83
88
  protected _ownStyles: boolean;
84
89
  protected _resources: IResourceCollection;
85
90
  protected _ownResources: boolean;
91
+ protected _fetch: WorkbookFetch;
86
92
  protected _names: INamedCollection;
87
93
  protected _ownNames: boolean;
88
94
  /**
@@ -162,6 +168,10 @@ export declare class Workbook implements IWorkbook {
162
168
  getStyles(): IStyleCollection;
163
169
  /** {@inheritDoc IWorkbook.getResources} */
164
170
  getResources(): IResourceCollection;
171
+ /** {@inheritDoc IWorkbook.getFetcher} */
172
+ getFetcher(): IFetcher;
173
+ /** {@inheritDoc IWorkbook.fetch} */
174
+ fetch(input: string, init?: RequestInit): Promise<Response>;
165
175
  /** {@inheritDoc IWorkbook.getTransactions} */
166
176
  getTransactions(): ITransaction.IStore;
167
177
  /** {@inheritDoc IWorkbook.getChanges} */
@@ -393,8 +403,12 @@ export declare class Workbook implements IWorkbook {
393
403
  protected _notifyAllChange(): void;
394
404
  /** {@inheritDoc IWorkbook.addListeners} */
395
405
  addListeners(listeners: IWorkbook.IListeners, options?: IListener.Options): IListener.Remove;
396
- /** @internal */
397
- protected _sheetToWBEvent(listenerWB: ICellRange.Listener): ICellRange.Listener;
406
+ /**
407
+ * Wrap a workbook range's listener so that what it is handed reads from the workbook: every
408
+ * range spelled with its sheet.
409
+ * @internal
410
+ */
411
+ protected _sheetToWBEvent(listenerWB: ICellRange.Listener<any>): ICellRange.Listener<any>;
398
412
  /**
399
413
  * Each pivot cache's source is held through the sheet it names, once the sheets exist, so an
400
414
  * insert above the source moves it (see `PivotCache`).
@@ -403,6 +417,14 @@ export declare class Workbook implements IWorkbook {
403
417
  protected _holdPivotCaches(): void;
404
418
  /** @internal */
405
419
  protected _fromJSON(json: IWorkbook.JSON, uids?: readonly string[]): void;
420
+ /**
421
+ * The formula functions of every module, for the calculation to register ahead of its first pass
422
+ * (`Calculation.ConstructorOptions.startFunctions`). Loads the modules without starting them.
423
+ * @internal
424
+ */
425
+ protected _startFunctions(): Promise<readonly IFunction[]>;
426
+ /** Modules whose functions a start registered: `onAdd` leaves them to it. */
427
+ protected _startModules: WeakSet<IModule>;
406
428
  /** @internal */
407
429
  protected _createScripts(json?: Record<string, IModule.JSON>): IScript;
408
430
  /** {@inheritDoc IWorkbook.toJSON} */
@@ -19,7 +19,7 @@ export declare class WorkbookRanges extends SheetRanges implements ICellRanges {
19
19
  /** {@inheritDoc ICellRanges.select} */
20
20
  select(options?: ICellRange.SelectOptions): Promise<this>;
21
21
  /** {@inheritDoc ICellRanges.addListener} */
22
- addListener(listener: ICellRange.Listener, options?: ICellRange.ListenerOptions): IListener.Remove;
22
+ addListener(listener: ICellRange.Listener<ICellRanges>, options?: ICellRange.ListenerOptions): IListener.Remove;
23
23
  get [Symbol.toStringTag](): string;
24
24
  /**
25
25
  * {@inheritDoc ICellRanges.getAddress}
@@ -1,40 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.11
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- import { ScalarType as e } from "@sheetxl/primitives";
8
- function t(t, n, r) {
9
- let i = (t) => {
10
- let n = null;
11
- t.s ? n = t.s : t.r || t.g || (n = e.Number);
12
- let a = {
13
- name: t.n,
14
- scalar: n,
15
- range: t.r ?? null,
16
- arrayDepth: t.d ?? 0,
17
- optional: t.m === "?",
18
- rest: t.m === "..."
19
- };
20
- return t.e !== void 0 && (a.enum = r(t.e)), t.l && (a.lambda = t.l), t.a !== void 0 && (a.lambdaArity = t.a), t.ae && (a.acceptError = !0), t.v !== void 0 && (a.defaultValue = t.v), t.u && (a.omittable = !0), t.w !== void 0 && (a.omittedValue = t.w), t.nl && (a.noLift = !0), t.nf && (a.noFilter = !0), t.lz && (a.lazy = !0), t.rt && (a.reportType = !0), t.vr && (a.valueOrRange = !0), t.g && (a.repeating = t.g.map(i)), delete a.dim, a;
21
- }, a = [], o = n.p;
22
- if (o) for (let e = 0; e < o.length; e++) a.push(i(o[e]));
23
- let s = null;
24
- n.r && (s = {}, n.r.s && (s.scalar = n.r.s), n.r.r && (s.range = n.r.r === "p" || n.r.r === "r" || n.r.r === "m" ? n.r.r : null), n.r.d && (s.arrayDepth = n.r.d ?? 0), n.r.l && (s.lambda = n.r.l || null), n.r.k && (s.kind = n.r.k), n.r.vol && (s.volatile = !0));
25
- let c = {
26
- name: t,
27
- parameters: a,
28
- returnType: s,
29
- context: n.c ? "calculation" : null,
30
- maxArguments: n.mx
31
- };
32
- n.h && (c.hidden = !0);
33
- let l = [];
34
- for (let e of a) for (let t of [e, ...e.repeating ?? []]) t.enum && !l.includes(t.enum.id) && l.push(t.enum.id);
35
- return {
36
- decl: c,
37
- enumIds: l
38
- };
39
- }
40
- export { t };
@@ -1,110 +0,0 @@
1
- /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.11
3
- *
4
- * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- import { An as e, Dt as t, Hn as n, Ir as r, Jn as i, Lr as a, Tt as o, cn as s, dr as c, zn as l } from "./C16ycKja6zG0crV_.mjs";
8
- import { C as u, E as d, T as f, h as p, i as m, r as h, w as g, x as _, y as v } from "./nvU0ClAbf0g94YBK.mjs";
9
- import { n as y, r as b, t as x } from "./ClbvFbFzFzXLBKNN.mjs";
10
- import { i as S, r as C } from "./DvAaxH6z_tGvrRzl.mjs";
11
- import { t as w } from "./BGOFfpxr2jPIdqmV.mjs";
12
- import { ScalarType as T } from "@sheetxl/primitives";
13
- import E from "@sheetxl/formulas/declarations";
14
- import D from "@sheetxl/formulas-extended/declarations";
15
- var O = null;
16
- function k(e) {
17
- return O ||= (() => {
18
- let e = /* @__PURE__ */ new Map(), t = [...E, ...D];
19
- for (let { declarations: n, enums: r } of t) {
20
- let t = /* @__PURE__ */ new Map(), i = (e) => {
21
- let n = t.get(e);
22
- if (!n) {
23
- let i = r?.[e];
24
- if (!i) return;
25
- n = {
26
- id: e,
27
- type: i.s === "string" ? T.String : T.Number,
28
- members: i.m
29
- }, t.set(e, n);
30
- }
31
- return n;
32
- };
33
- for (let t of Object.keys(n)) {
34
- let { decl: r } = w(t, n[t], i), a = new s(r);
35
- e.set(t.toUpperCase(), {
36
- getName: () => t,
37
- getDeclaration: () => a,
38
- isBuiltIn: () => !0
39
- });
40
- }
41
- }
42
- return e;
43
- })(), O.get(e.toUpperCase()) ?? null;
44
- }
45
- var A = null, j = Object.freeze({
46
- rowStart: 0,
47
- colStart: 0,
48
- rowEnd: a,
49
- colEnd: r
50
- }), M = (e) => k(e);
51
- function N(e, t) {
52
- if (typeof e != "string" || e.length === 0) return null;
53
- A ||= new C();
54
- let n = t?.anchor, r;
55
- try {
56
- let i = A.parse(n?.rowIndex ?? 0, n?.colIndex ?? 0, e);
57
- if (i.errors.length > 0 || !i.root || i.root.type === c.Unparsed) return null;
58
- if (r = i.root, t?.normalize) {
59
- let e = g(r, M);
60
- typeof e != "string" && (r = e), r = d(r, M), r = h(r, M), r = v(r), r = f(r), r = u(r), r = m(r), r = _(r);
61
- }
62
- } catch {
63
- return null;
64
- }
65
- return y(r, null);
66
- }
67
- function P(e, t) {
68
- return b(e, t);
69
- }
70
- function F(e, n) {
71
- let r = p(h(v(x(e)), M)), i = n?.entireCoords ?? j, a = !0 === n?.r1c1;
72
- return (e) => a ? t(r, i) : o(r, i, e?.rowIndex ?? 0, e?.colIndex ?? 0);
73
- }
74
- function I(t) {
75
- let r = t.trim();
76
- if (!r) return;
77
- let a;
78
- try {
79
- let e = S.shared().tokenize(r, !1);
80
- if (e.errors.length > 0) return;
81
- a = e.tokens;
82
- } catch {
83
- return;
84
- }
85
- let o = 0, s = 0;
86
- if (a.length === 2) {
87
- let e = a[0].tokenType?.name;
88
- e === "MinOp" ? (o = -1, s = 1) : e === "PlusOp" && (o = 1, s = 1);
89
- }
90
- if (a.length - s !== 1) return;
91
- let c = a[s], u = c.image;
92
- try {
93
- switch (c.tokenType?.name) {
94
- case "NumberToken":
95
- case "ScientificDigit":
96
- case "DigitToken": {
97
- let e = n(u).value;
98
- return o === 0 ? e : o * e;
99
- }
100
- case "StringToken": return o === 0 ? i(u).value : void 0;
101
- case "BooleanToken": return o === 0 ? e(u).value : void 0;
102
- case "LiteralError":
103
- case "RefError": return o === 0 ? l(u).value : void 0;
104
- default: return;
105
- }
106
- } catch {
107
- return;
108
- }
109
- }
110
- export { k as getFunctionDeclaration, F as imager, N as parse, I as readFormulaLiteral, P as transform };