@gridsheet/engine 3.3.0

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 (119) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +50 -0
  3. package/dist/constants.d.ts +21 -0
  4. package/dist/constants.d.ts.map +1 -0
  5. package/dist/formula/evaluator.d.ts +135 -0
  6. package/dist/formula/evaluator.d.ts.map +1 -0
  7. package/dist/formula/formula-error.d.ts +10 -0
  8. package/dist/formula/formula-error.d.ts.map +1 -0
  9. package/dist/formula/functions/__async.d.ts +67 -0
  10. package/dist/formula/functions/__async.d.ts.map +1 -0
  11. package/dist/formula/functions/__base.d.ts +120 -0
  12. package/dist/formula/functions/__base.d.ts.map +1 -0
  13. package/dist/formula/functions/__utils.d.ts +30 -0
  14. package/dist/formula/functions/__utils.d.ts.map +1 -0
  15. package/dist/formula/functions/abs.d.ts +9 -0
  16. package/dist/formula/functions/abs.d.ts.map +1 -0
  17. package/dist/formula/functions/add.d.ts +10 -0
  18. package/dist/formula/functions/add.d.ts.map +1 -0
  19. package/dist/formula/functions/and.d.ts +9 -0
  20. package/dist/formula/functions/and.d.ts.map +1 -0
  21. package/dist/formula/functions/arrayformula.d.ts +12 -0
  22. package/dist/formula/functions/arrayformula.d.ts.map +1 -0
  23. package/dist/formula/functions/average.d.ts +9 -0
  24. package/dist/formula/functions/average.d.ts.map +1 -0
  25. package/dist/formula/functions/concat.d.ts +9 -0
  26. package/dist/formula/functions/concat.d.ts.map +1 -0
  27. package/dist/formula/functions/count.d.ts +9 -0
  28. package/dist/formula/functions/count.d.ts.map +1 -0
  29. package/dist/formula/functions/counta.d.ts +9 -0
  30. package/dist/formula/functions/counta.d.ts.map +1 -0
  31. package/dist/formula/functions/divide.d.ts +10 -0
  32. package/dist/formula/functions/divide.d.ts.map +1 -0
  33. package/dist/formula/functions/eq.d.ts +9 -0
  34. package/dist/formula/functions/eq.d.ts.map +1 -0
  35. package/dist/formula/functions/gt.d.ts +9 -0
  36. package/dist/formula/functions/gt.d.ts.map +1 -0
  37. package/dist/formula/functions/gte.d.ts +9 -0
  38. package/dist/formula/functions/gte.d.ts.map +1 -0
  39. package/dist/formula/functions/if.d.ts +9 -0
  40. package/dist/formula/functions/if.d.ts.map +1 -0
  41. package/dist/formula/functions/iferror.d.ts +10 -0
  42. package/dist/formula/functions/iferror.d.ts.map +1 -0
  43. package/dist/formula/functions/len.d.ts +9 -0
  44. package/dist/formula/functions/len.d.ts.map +1 -0
  45. package/dist/formula/functions/lt.d.ts +9 -0
  46. package/dist/formula/functions/lt.d.ts.map +1 -0
  47. package/dist/formula/functions/lte.d.ts +9 -0
  48. package/dist/formula/functions/lte.d.ts.map +1 -0
  49. package/dist/formula/functions/max.d.ts +9 -0
  50. package/dist/formula/functions/max.d.ts.map +1 -0
  51. package/dist/formula/functions/min.d.ts +9 -0
  52. package/dist/formula/functions/min.d.ts.map +1 -0
  53. package/dist/formula/functions/minus.d.ts +10 -0
  54. package/dist/formula/functions/minus.d.ts.map +1 -0
  55. package/dist/formula/functions/multiply.d.ts +9 -0
  56. package/dist/formula/functions/multiply.d.ts.map +1 -0
  57. package/dist/formula/functions/ne.d.ts +9 -0
  58. package/dist/formula/functions/ne.d.ts.map +1 -0
  59. package/dist/formula/functions/not.d.ts +9 -0
  60. package/dist/formula/functions/not.d.ts.map +1 -0
  61. package/dist/formula/functions/now.d.ts +9 -0
  62. package/dist/formula/functions/now.d.ts.map +1 -0
  63. package/dist/formula/functions/or.d.ts +9 -0
  64. package/dist/formula/functions/or.d.ts.map +1 -0
  65. package/dist/formula/functions/power.d.ts +9 -0
  66. package/dist/formula/functions/power.d.ts.map +1 -0
  67. package/dist/formula/functions/sum.d.ts +9 -0
  68. package/dist/formula/functions/sum.d.ts.map +1 -0
  69. package/dist/formula/functions/uminus.d.ts +9 -0
  70. package/dist/formula/functions/uminus.d.ts.map +1 -0
  71. package/dist/formula/mapping.d.ts +11 -0
  72. package/dist/formula/mapping.d.ts.map +1 -0
  73. package/dist/formula/solver.d.ts +39 -0
  74. package/dist/formula/solver.d.ts.map +1 -0
  75. package/dist/index.d.ts +31 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +4888 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/lib/autofill.d.ts +22 -0
  80. package/dist/lib/autofill.d.ts.map +1 -0
  81. package/dist/lib/book.d.ts +141 -0
  82. package/dist/lib/book.d.ts.map +1 -0
  83. package/dist/lib/cell.d.ts +17 -0
  84. package/dist/lib/cell.d.ts.map +1 -0
  85. package/dist/lib/coords.d.ts +22 -0
  86. package/dist/lib/coords.d.ts.map +1 -0
  87. package/dist/lib/date.d.ts +2 -0
  88. package/dist/lib/date.d.ts.map +1 -0
  89. package/dist/lib/filter.d.ts +7 -0
  90. package/dist/lib/filter.d.ts.map +1 -0
  91. package/dist/lib/label.d.ts +4 -0
  92. package/dist/lib/label.d.ts.map +1 -0
  93. package/dist/lib/operation.d.ts +31 -0
  94. package/dist/lib/operation.d.ts.map +1 -0
  95. package/dist/lib/palette.d.ts +2 -0
  96. package/dist/lib/palette.d.ts.map +1 -0
  97. package/dist/lib/reference.d.ts +19 -0
  98. package/dist/lib/reference.d.ts.map +1 -0
  99. package/dist/lib/sheet.d.ts +626 -0
  100. package/dist/lib/sheet.d.ts.map +1 -0
  101. package/dist/lib/sheet_utils.d.ts +52 -0
  102. package/dist/lib/sheet_utils.d.ts.map +1 -0
  103. package/dist/lib/spatial.d.ts +79 -0
  104. package/dist/lib/spatial.d.ts.map +1 -0
  105. package/dist/lib/time.d.ts +29 -0
  106. package/dist/lib/time.d.ts.map +1 -0
  107. package/dist/policy/core.d.ts +161 -0
  108. package/dist/policy/core.d.ts.map +1 -0
  109. package/dist/policy/percentage.d.ts +3 -0
  110. package/dist/policy/percentage.d.ts.map +1 -0
  111. package/dist/policy/thousand_separator.d.ts +4 -0
  112. package/dist/policy/thousand_separator.d.ts.map +1 -0
  113. package/dist/sentinels.d.ts +41 -0
  114. package/dist/sentinels.d.ts.map +1 -0
  115. package/dist/types.d.ts +313 -0
  116. package/dist/types.d.ts.map +1 -0
  117. package/dist/utils.d.ts +2 -0
  118. package/dist/utils.d.ts.map +1 -0
  119. package/package.json +63 -0
@@ -0,0 +1,626 @@
1
+ import { Id, AreaType, CellsByAddressType, PointType, Address, CellFilter, MatrixType, CellType, FilterConfig, HistoryType, StorePatchType, ShapeType, RectType, OperatorType, OperationType, RawCellType, RefLike, Resolution, System } from '../types';
2
+ import { FunctionMapping } from '../formula/functions/__base';
3
+ import { ProcessFormulaProps } from '../formula/evaluator';
4
+ import { SolveOptions } from '../formula/solver';
5
+ import { Registry } from './book';
6
+ import { PolicyType, RenderProps } from '../policy/core';
7
+ type CellField = keyof CellType;
8
+ export type SheetLimits = {
9
+ minRows?: number;
10
+ maxRows?: number;
11
+ minCols?: number;
12
+ maxCols?: number;
13
+ };
14
+ type Props = {
15
+ limits?: SheetLimits;
16
+ functions?: FunctionMapping;
17
+ name?: string;
18
+ registry?: Registry;
19
+ /** Opt into eager resolution for this sheet (see {@link Sheet.eager}). */
20
+ eager?: boolean;
21
+ };
22
+ type MoveProps = {
23
+ srcSheet?: UserSheet;
24
+ src: AreaType;
25
+ dst: AreaType;
26
+ operator?: OperatorType;
27
+ undoReflection?: StorePatchType;
28
+ redoReflection?: StorePatchType;
29
+ historicize?: boolean;
30
+ };
31
+ export interface UserSheet {
32
+ changedTime: number;
33
+ lastChangedTime?: number;
34
+ area: AreaType;
35
+ top: number;
36
+ left: number;
37
+ bottom: number;
38
+ right: number;
39
+ minNumRows: number;
40
+ maxNumRows: number;
41
+ minNumCols: number;
42
+ maxNumCols: number;
43
+ headerWidth: number;
44
+ headerHeight: number;
45
+ name: string;
46
+ /**
47
+ * Returns the raw sheet object, which is used for internal operations.
48
+ * This is not intended for public use and may change in future versions.
49
+ */
50
+ __raw__: Sheet;
51
+ getRectSize(area: AreaType): RectType;
52
+ getCell(point: PointType, options?: {
53
+ resolution?: Resolution;
54
+ raise?: boolean;
55
+ }): CellType | undefined;
56
+ getPolicy(point: PointType): PolicyType;
57
+ get numRows(): number;
58
+ get numCols(): number;
59
+ get shape(): ShapeType;
60
+ move(args: MoveProps): UserSheet;
61
+ copy(args: MoveProps & {
62
+ onlyValue?: boolean;
63
+ }): UserSheet;
64
+ update(args: {
65
+ diff: CellsByAddressType;
66
+ historicize?: boolean;
67
+ partial?: boolean;
68
+ updateChangedTime?: boolean;
69
+ reflection?: StorePatchType;
70
+ }): UserSheet;
71
+ writeMatrix(args: {
72
+ point: PointType;
73
+ matrix: MatrixType<string>;
74
+ updateChangedTime?: boolean;
75
+ reflection?: StorePatchType;
76
+ }): UserSheet;
77
+ write(args: {
78
+ point: PointType;
79
+ value: string;
80
+ updateChangedTime?: boolean;
81
+ reflection?: StorePatchType;
82
+ }): UserSheet;
83
+ insertRows(args: {
84
+ y: number;
85
+ numRows: number;
86
+ baseY: number;
87
+ diff?: CellsByAddressType;
88
+ partial?: boolean;
89
+ updateChangedTime?: boolean;
90
+ reflection?: StorePatchType;
91
+ }): UserSheet;
92
+ removeRows(args: {
93
+ y: number;
94
+ numRows: number;
95
+ reflection?: StorePatchType;
96
+ }): UserSheet;
97
+ insertCols(args: {
98
+ x: number;
99
+ numCols: number;
100
+ baseX: number;
101
+ diff?: CellsByAddressType;
102
+ partial?: boolean;
103
+ updateChangedTime?: boolean;
104
+ reflection?: StorePatchType;
105
+ }): UserSheet;
106
+ removeCols(args: {
107
+ x: number;
108
+ numCols: number;
109
+ reflection?: StorePatchType;
110
+ }): UserSheet;
111
+ undo(): {
112
+ history: HistoryType | null;
113
+ };
114
+ redo(): {
115
+ history: HistoryType | null;
116
+ };
117
+ histories(): HistoryType[];
118
+ historyIndex(): number;
119
+ historySize(): number;
120
+ setHeaderHeight(height: number, historicize?: boolean): UserSheet;
121
+ setHeaderWidth(width: number, historicize?: boolean): UserSheet;
122
+ sortRows(args: {
123
+ x: number;
124
+ direction: 'asc' | 'desc';
125
+ }): UserSheet;
126
+ filterRows(args?: {
127
+ x?: number;
128
+ filter?: FilterConfig;
129
+ }): UserSheet;
130
+ isRowFiltered(y: number): boolean;
131
+ hasActiveFilters(): boolean;
132
+ hasPendingCells(): boolean;
133
+ waitForPending(): Promise<void>;
134
+ resolveAll(): number;
135
+ getLastChangedAddresses(): Address[];
136
+ getSerializedValue(props: {
137
+ point: PointType;
138
+ cell?: CellType;
139
+ resolution?: Resolution;
140
+ }): string;
141
+ }
142
+ type InternalToValueMatrixProps = {
143
+ area?: AreaType;
144
+ resolution?: Resolution;
145
+ raise?: boolean;
146
+ filter?: CellFilter;
147
+ asScalar?: boolean;
148
+ at?: Id;
149
+ };
150
+ export declare class Sheet implements UserSheet {
151
+ /** @internal */
152
+ __gsType: string;
153
+ /** Cached result of strip (NONE = not yet stripped). */
154
+ private _stripped;
155
+ changedTime: number;
156
+ lastChangedTime?: number;
157
+ area: AreaType;
158
+ /** @internal */
159
+ private _limits;
160
+ get minNumRows(): number;
161
+ get maxNumRows(): number;
162
+ get minNumCols(): number;
163
+ get maxNumCols(): number;
164
+ /** @internal */
165
+ id: number;
166
+ name: string;
167
+ /**
168
+ * Opt into eager resolution for this sheet. When enabled, every formula cell
169
+ * is solved regardless of the visible range, so off-screen async formulas fire
170
+ * and fill in instead of staying unevaluated until scrolled into view (see
171
+ * {@link Sheet.resolveAll}).
172
+ *
173
+ * OFF by default to preserve virtualization. Whether to resolve everything is a
174
+ * property of the dataset (how many rows, how costly the async side effects),
175
+ * not of any individual function — so it is scoped per sheet and opted into
176
+ * explicitly rather than inferred from the formulas a sheet happens to contain.
177
+ */
178
+ eager: boolean;
179
+ /** @internal */
180
+ prevName: string;
181
+ /** @internal */
182
+ status: 0 | 1 | 2;
183
+ /** @internal */
184
+ registry: Registry;
185
+ /** @internal */
186
+ idsToBeIdentified: Id[];
187
+ /** @internal */
188
+ totalWidth: number;
189
+ /** @internal */
190
+ totalHeight: number;
191
+ /** @internal */
192
+ fullHeight: number;
193
+ /** @internal */
194
+ defaultColWidth: number;
195
+ /** @internal */
196
+ defaultRowHeight: number;
197
+ /** @internal */
198
+ private version;
199
+ /** @internal */
200
+ private idMatrix;
201
+ /** @internal */
202
+ private addressCaches;
203
+ /** @internal */
204
+ private lastChangedAddresses;
205
+ /** @internal — stored cell defaults from initialize() for lazy cell resolution */
206
+ private _initCells;
207
+ /** @internal — default cell config from cells['default'] / cells['*'] */
208
+ private _common;
209
+ /** @internal — default column config from cells['defaultCol'] / cells['*C'] */
210
+ private _commonCol;
211
+ /** @internal — default row config from cells['defaultRow'] / cells['*R'] */
212
+ private _commonRow;
213
+ /** @internal — deferred matrices from buildInitialCells (large datasets) */
214
+ private _initMatrices;
215
+ /** @internal — flattenAs key for deferred matrices */
216
+ private _initFlattenAs;
217
+ /** @internal — parsed base points for each matrix key, cached once */
218
+ private _matrixBases;
219
+ /** @internal — raw matrix references keyed by base address for O(1) lookup */
220
+ private _matrixByBase;
221
+ /** @internal — precomputed column letters for lazy ID row creation */
222
+ private _colLetters;
223
+ /** @internal — tracks custom row heights (row y → height) for arithmetic offset computation */
224
+ private _rowHeightOverrides;
225
+ /** @internal — tracks filtered rows for offset computation */
226
+ private _filteredRows;
227
+ constructor({ limits, name, registry, eager }: Props);
228
+ static is(obj: any): obj is Sheet;
229
+ toString(): string;
230
+ get headerHeight(): number;
231
+ setHeaderHeight(height: number, historicize?: boolean): Sheet;
232
+ get headerWidth(): number;
233
+ setHeaderWidth(width: number, historicize?: boolean): Sheet;
234
+ /**
235
+ * Get the raw (mutable) cell data for a point. Unlike getCell, this returns the actual registry.data reference.
236
+ * @internal
237
+ */
238
+ private _pointToRawCell;
239
+ isRowFiltered(y: number): boolean;
240
+ hasActiveFilters(): boolean;
241
+ /**
242
+ * Returns true if any data cell in this sheet currently holds a Pending value
243
+ * (i.e. an async formula that hasn't resolved yet).
244
+ */
245
+ hasPendingCells(): boolean;
246
+ /**
247
+ * Returns a Promise that resolves when all in-flight async formula computations
248
+ * have completed and no data cells hold Pending values.
249
+ * If nothing is pending, resolves immediately.
250
+ * Useful for waiting before sort/filter so that cell values are fully resolved.
251
+ */
252
+ waitForPending(): Promise<void>;
253
+ /**
254
+ * Returns the addresses that were changed in the most recent `_update()` call.
255
+ * Useful inside `onChange` to know which cells were modified.
256
+ */
257
+ getLastChangedAddresses(): Address[];
258
+ /**
259
+ * Eagerly fire every async formula cell in this sheet, ignoring the visible
260
+ * range.
261
+ *
262
+ * GridSheet is virtualized: normally only cells the UI renders get solved, so
263
+ * an off-screen `=…` formula that calls an async function never fires. Only
264
+ * async cells need this — sync formulas have no side effects and resolve when
265
+ * read (e.g. by serialization), whereas an async cell must be *fired* and given
266
+ * time to settle before its value can be read. `resolveAll()` therefore walks
267
+ * the async-formula index ({@link Registry.asyncFormulaCells}) and solves each
268
+ * one, which fires it through the usual machinery: it resolves, populates the
269
+ * per-cell async cache, and triggers a re-render via `transmit()`. Sync cells
270
+ * that depend on those results resolve normally on the next read.
271
+ *
272
+ * Cells already resolved (async-cache hit) or in flight (Pending) are not
273
+ * re-fired — solving is a cache hit for them — so repeated calls converge and
274
+ * are cheap. After awaiting {@link waitForPending}, serialization helpers such
275
+ * as `toValueMatrix` return resolved values for off-screen cells too.
276
+ *
277
+ * This is the building block behind the opt-in `eager` sheet option; call it
278
+ * directly to resolve on demand without enabling eager mode.
279
+ *
280
+ * @returns the number of async formula cells visited (for diagnostics/tests).
281
+ */
282
+ resolveAll(): number;
283
+ /**
284
+ * Capture the full cell state of all filter-related header cells as a CellsByIdType snapshot.
285
+ * @internal
286
+ */
287
+ private _captureFilterCellStates;
288
+ filterRows({ x, filter, }?: {
289
+ x?: number;
290
+ filter?: FilterConfig;
291
+ }): Sheet;
292
+ /** @internal */
293
+ private _reapplyFilters;
294
+ sortRows({ x, direction }: {
295
+ x: number;
296
+ direction: 'asc' | 'desc';
297
+ }): Sheet;
298
+ /** @internal */
299
+ private _sortRowMapping;
300
+ get isInitialized(): boolean;
301
+ get policies(): {
302
+ [policyName: string]: import('..').Policy | null;
303
+ };
304
+ /** @internal */
305
+ getSystem(point: PointType): System | undefined;
306
+ /** @internal */
307
+ processFormula(value: any, { idMap, ...props }: ProcessFormulaProps): any;
308
+ /**
309
+ * Whether a tokenized formula calls at least one async function, decided via
310
+ * the function class's static `isAsync` flag (no instantiation). Drives the
311
+ * async-formula index that {@link resolveAll} walks.
312
+ * @internal
313
+ */
314
+ private _formulaHasAsync;
315
+ /** @internal */
316
+ resolveFormulas(): void;
317
+ /** @internal */
318
+ getSheetBySheetName(sheetName: string): any;
319
+ /** @internal */
320
+ getSheetBySheetId(sheetId: number): any;
321
+ /** @internal */
322
+ private static _stack;
323
+ /** @internal */
324
+ initialize(cells: CellsByAddressType): void;
325
+ /** @internal */
326
+ private _incrementVersion;
327
+ /** @internal */
328
+ private _xsheetDispatch;
329
+ /** @internal */
330
+ private _generateId;
331
+ /**
332
+ * Lazily generate the ID row for the given y-coordinate.
333
+ * If the row already exists, returns it immediately.
334
+ * @internal
335
+ */
336
+ private _ensureIdRow;
337
+ /**
338
+ * Ensure that registry.data and registry.systems exist for a given cell.
339
+ * Performs lazy cell stacking using stored initialization defaults.
340
+ * @internal
341
+ */
342
+ private _ensureCellPopulated;
343
+ /**
344
+ * Materialize all lazy ID rows. Call this before operations that need the full
345
+ * idMatrix (e.g. .flat(), .map(), .slice() for sort/move/undo/redo).
346
+ * @internal
347
+ */
348
+ private _materializeIdMatrix;
349
+ /**
350
+ * Compute the absolute top offset for a given row using arithmetic + overrides.
351
+ * Avoids iterating all rows — O(overrides) instead of O(numRows).
352
+ * @internal
353
+ */
354
+ getOffsetTop(y: number): number;
355
+ /**
356
+ * Re-key the row-metadata caches after rows are removed at [y, y+numRows).
357
+ * These maps are keyed by absolute row number, so deletions must drop the removed
358
+ * keys and shift later keys down — otherwise stale entries corrupt getOffsetTop().
359
+ * @internal
360
+ */
361
+ private _shiftRowMetaForRemove;
362
+ /**
363
+ * Re-key the row-metadata caches after numRows are inserted at y, shifting keys >= y up.
364
+ * @internal
365
+ */
366
+ private _shiftRowMetaForInsert;
367
+ /**
368
+ * (Re)seed row-metadata for the rows at [y, y+numRows) from their current header cells.
369
+ * Used after rows are added (insert / undo-remove / redo-insert) so non-default heights
370
+ * and filtered state are reflected immediately rather than only on the next lazy read.
371
+ * @internal
372
+ */
373
+ private _seedRowMeta;
374
+ getRectSize({ top, left, bottom, right }: AreaType): RectType;
375
+ /** @internal */
376
+ setTotalSize(): void;
377
+ /** @internal */
378
+ refresh(relocate?: boolean, resize?: boolean): Sheet;
379
+ /** @internal */
380
+ clone(relocate?: boolean): Sheet;
381
+ /** @internal */
382
+ getPointById(id: Id, slideY?: number, slideX?: number): PointType & {
383
+ absCol: boolean;
384
+ absRow: boolean;
385
+ };
386
+ /** @internal */
387
+ getAddressById(id: Id, slideY?: number, slideX?: number): string | undefined;
388
+ /** @internal */
389
+ clearAddressCaches(): void;
390
+ /** @internal */
391
+ private _warmAddressCaches;
392
+ /** @internal */
393
+ getId(point: PointType): string;
394
+ /** @internal */
395
+ getCell(point: PointType, { resolution, raise }?: SolveOptions): CellType | undefined;
396
+ /** @internal */
397
+ get numRows(): number;
398
+ get numCols(): number;
399
+ get top(): number;
400
+ get left(): number;
401
+ get bottom(): number;
402
+ get right(): number;
403
+ /** @internal */
404
+ _toValueMatrix({ area, at, resolution, raise, filter, asScalar, }?: InternalToValueMatrixProps): any[][];
405
+ /** @internal */
406
+ private _pushHistory;
407
+ /** @internal */
408
+ private _cleanObsolete;
409
+ /** @internal */
410
+ private _cleanStrayed;
411
+ /**
412
+ * Remove an id from registry.data and registry.dependents entirely.
413
+ * @internal
414
+ */
415
+ private _deleteOrphanedId;
416
+ /** @internal */
417
+ private _copyCellLayout;
418
+ move({ srcSheet, src, dst, historicize, operator, undoReflection, redoReflection, }: MoveProps): Sheet;
419
+ /**
420
+ * Build MoveRelations from src area to dst area, skipping filtered rows.
421
+ *
422
+ * Layout of the returned array (processed in this order by _moveCells):
423
+ * 1. Entries where [0] is a newly-generated ID — these fill the vacated src cells (processed last in forward order)
424
+ * 2. Entries where [0] is a src address and [1] is a dst address — the actual moves (processed first in forward order, descending)
425
+ * Entries whose [1] is an existing ID mean the destination cell is displaced/overflowed and
426
+ * is no longer addressable; on forward pass they are skipped; on reverse pass the ID is written back.
427
+ */
428
+ /** @internal */
429
+ private _createMoveRelations;
430
+ get defaultPolicy(): PolicyType;
431
+ /**
432
+ * Apply (or reverse) a MoveRelations list.
433
+ *
434
+ * Forward (reverse=false): process descending — actual ID moves happen bottom-up so
435
+ * earlier entries don't clobber later ones; vacate entries (at front of array) are
436
+ * applied last.
437
+ * Reverse (reverse=true): process ascending — restores IDs in the natural order.
438
+ *
439
+ * On forward pass: applies policy, collects diffBefore, runs ReferencePreserver.
440
+ * On reverse pass: only moves IDs (caller is responsible for applyDiff(diffBefore)).
441
+ */
442
+ /** @internal */
443
+ private _moveCells;
444
+ copy({ srcSheet, src, dst, onlyValue, operator, undoReflection, redoReflection, }: MoveProps & {
445
+ onlyValue?: boolean;
446
+ }): Sheet;
447
+ getPolicy(point: PointType): PolicyType;
448
+ /** @internal */
449
+ private _update;
450
+ update({ diff, partial, updateChangedTime, historicize, operator, operation: op, ignoreFields, undoReflection, redoReflection, }: {
451
+ diff: CellsByAddressType;
452
+ partial?: boolean;
453
+ updateChangedTime?: boolean;
454
+ historicize?: boolean;
455
+ operator?: OperatorType;
456
+ operation?: OperationType;
457
+ ignoreFields?: CellField[];
458
+ undoReflection?: StorePatchType;
459
+ redoReflection?: StorePatchType;
460
+ }): Sheet;
461
+ /** @internal */
462
+ writeRawCellMatrix({ point, matrix, updateChangedTime, historicize, onlyValue, operator, undoReflection, redoReflection, }: {
463
+ point: PointType;
464
+ matrix: MatrixType<RawCellType>;
465
+ updateChangedTime?: boolean;
466
+ historicize?: boolean;
467
+ onlyValue?: boolean;
468
+ operator?: OperatorType;
469
+ undoReflection?: StorePatchType;
470
+ redoReflection?: StorePatchType;
471
+ }): Sheet;
472
+ writeMatrix(props: {
473
+ point: PointType;
474
+ matrix: MatrixType<string>;
475
+ updateChangedTime?: boolean;
476
+ historicize?: boolean;
477
+ operator?: OperatorType;
478
+ undoReflection?: StorePatchType;
479
+ redoReflection?: StorePatchType;
480
+ }): Sheet;
481
+ write(props: {
482
+ point: PointType;
483
+ value: string;
484
+ updateChangedTime?: boolean;
485
+ historicize?: boolean;
486
+ operator?: OperatorType;
487
+ undoReflection?: StorePatchType;
488
+ redoReflection?: StorePatchType;
489
+ }): Sheet;
490
+ insertRows({ y, numRows, baseY, diff, partial, updateChangedTime, operator, undoReflection, redoReflection, }: {
491
+ y: number;
492
+ numRows: number;
493
+ baseY: number;
494
+ diff?: CellsByAddressType;
495
+ partial?: boolean;
496
+ updateChangedTime?: boolean;
497
+ operator?: OperatorType;
498
+ undoReflection?: StorePatchType;
499
+ redoReflection?: StorePatchType;
500
+ }): Sheet;
501
+ removeRows({ y, numRows, operator, undoReflection, redoReflection, }: {
502
+ y: number;
503
+ numRows: number;
504
+ operator?: OperatorType;
505
+ undoReflection?: StorePatchType;
506
+ redoReflection?: StorePatchType;
507
+ }): Sheet;
508
+ insertCols({ x, numCols, baseX, diff, partial, updateChangedTime, operator, undoReflection, redoReflection, }: {
509
+ x: number;
510
+ numCols: number;
511
+ baseX: number;
512
+ diff?: CellsByAddressType;
513
+ partial?: boolean;
514
+ updateChangedTime?: boolean;
515
+ operator?: OperatorType;
516
+ undoReflection?: StorePatchType;
517
+ redoReflection?: StorePatchType;
518
+ }): Sheet;
519
+ removeCols({ x, numCols, operator, undoReflection, redoReflection, }: {
520
+ x: number;
521
+ numCols: number;
522
+ operator?: OperatorType;
523
+ undoReflection?: StorePatchType;
524
+ redoReflection?: StorePatchType;
525
+ }): Sheet;
526
+ /** @internal */
527
+ histories(): HistoryType[];
528
+ /** @internal */
529
+ historyIndex(): number;
530
+ /** @internal */
531
+ historySize(): number;
532
+ /** @internal */
533
+ getHistoryLimit(): number;
534
+ /** @internal */
535
+ parse(point: PointType, value: any): CellType;
536
+ /** @internal */
537
+ render(props: RenderProps): any;
538
+ getSerializedValue({ point, cell, resolution, }: {
539
+ point: PointType;
540
+ cell?: CellType;
541
+ resolution?: Resolution;
542
+ }): string;
543
+ /** @internal */
544
+ trim(area: AreaType): Sheet;
545
+ /**
546
+ * Solve all formulas in this sheet and return a 2D matrix of resolved values.
547
+ * @internal
548
+ */
549
+ solve({ raise, at }: {
550
+ raise?: boolean;
551
+ at: Id;
552
+ }): any[][];
553
+ /**
554
+ * Collapse this sheet to a scalar (top-left cell value).
555
+ * @internal
556
+ */
557
+ strip({ raise, at }: {
558
+ raise?: boolean;
559
+ at?: Id;
560
+ }): any;
561
+ /** @internal */
562
+ private _applyDiff;
563
+ undo(): {
564
+ history: null;
565
+ newSheet: Sheet;
566
+ callback?: undefined;
567
+ } | {
568
+ history: HistoryType;
569
+ callback: ({ sheetReactive: sheetRef }: {
570
+ sheetReactive: RefLike<Sheet>;
571
+ }) => void;
572
+ newSheet?: undefined;
573
+ };
574
+ redo(): {
575
+ history: null;
576
+ newSheet: Sheet;
577
+ callback?: undefined;
578
+ } | {
579
+ history: HistoryType;
580
+ callback: ({ sheetReactive: sheetRef }: {
581
+ sheetReactive: RefLike<Sheet>;
582
+ }) => void;
583
+ newSheet?: undefined;
584
+ };
585
+ /** @internal */
586
+ getFunctionByName(name: string): typeof import('..').BaseFunction;
587
+ /** @internal */
588
+ clearDependencies(id: Id): void;
589
+ /** @internal */
590
+ addDependency(id: Id, dependency: Id): void;
591
+ /** @internal */
592
+ getSolvedCache(point: PointType): [boolean, any];
593
+ /** @internal */
594
+ setSolvingCache(point: PointType): void;
595
+ /** @internal */
596
+ finishSolvedCache(point: PointType, value: any): void;
597
+ /** @internal */
598
+ clearSolvedCaches(): void;
599
+ /**
600
+ * Spill a 2D matrix of values starting from the origin cell.
601
+ * The origin cell receives matrix[0][0] and adjacent cells receive spill values in solvedCaches.
602
+ * For a 1×1 matrix, no spill occurs — the single value is cached directly.
603
+ * Throws FormulaError('#REF!') if the spill range is obstructed.
604
+ *
605
+ * @param origin The anchor cell that produced the spill.
606
+ * @param matrix The 2D array of resolved scalar values.
607
+ * @returns The top-left value (matrix[0][0]).
608
+ * @internal
609
+ */
610
+ spill(origin: PointType, matrix: any[][]): any;
611
+ /** @internal */
612
+ sheetPrefix(omit?: boolean): string;
613
+ /** @internal */
614
+ rangeToArea(range: string): {
615
+ top: number;
616
+ left: number;
617
+ bottom: number;
618
+ right: number;
619
+ };
620
+ get __raw__(): Sheet;
621
+ get shape(): ShapeType;
622
+ get hasSingleCell(): boolean;
623
+ get currentVersion(): number;
624
+ }
625
+ export {};
626
+ //# sourceMappingURL=sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/lib/sheet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EAGF,QAAQ,EAER,kBAAkB,EAClB,SAAS,EACT,OAAO,EACP,UAAU,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EAEX,cAAc,EACd,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,WAAW,EAEX,OAAO,EACP,UAAU,EAIV,MAAM,EACP,MAAM,UAAU,CAAC;AAGlB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAS,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAgB,YAAY,EAA0B,MAAM,mBAAmB,CAAC;AA6BvF,OAAO,EAAE,QAAQ,EAAkB,MAAM,QAAQ,CAAC;AAClD,OAAO,EAAc,UAAU,EAAuB,WAAW,EAAe,MAAM,gBAAgB,CAAC;AAIvG,KAAK,SAAS,GAAG,MAAM,QAAQ,CAAC;AAEhC,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAA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