@pixerate/editor 0.21.0 → 0.22.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.
- package/README.md +20 -11
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.d.cts +2 -2
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/canvas/index.cjs +1269 -13
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +432 -6
- package/dist/canvas/index.d.ts +432 -6
- package/dist/canvas/index.js +1264 -8
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-U6NDQFOK.cjs → chunk-6M3BCTBD.cjs} +427 -138
- package/dist/chunk-6M3BCTBD.cjs.map +1 -0
- package/dist/{chunk-TVRC4KVT.cjs → chunk-AA4ZEVCC.cjs} +845 -90
- package/dist/chunk-AA4ZEVCC.cjs.map +1 -0
- package/dist/{chunk-LA7PEGU3.cjs → chunk-CL37JGFW.cjs} +4 -4
- package/dist/{chunk-LA7PEGU3.cjs.map → chunk-CL37JGFW.cjs.map} +1 -1
- package/dist/{chunk-A7DKIA72.js → chunk-DENSCKFC.js} +642 -69
- package/dist/chunk-DENSCKFC.js.map +1 -0
- package/dist/{chunk-4QPLEUL2.cjs → chunk-GVSMRPHB.cjs} +1046 -54
- package/dist/chunk-GVSMRPHB.cjs.map +1 -0
- package/dist/{chunk-KYRZDWM4.js → chunk-JJDLPEWL.js} +2 -2
- package/dist/{chunk-3TYMNULT.js → chunk-MJZBNWG7.js} +807 -52
- package/dist/chunk-MJZBNWG7.js.map +1 -0
- package/dist/{chunk-CYFJCKC4.js → chunk-QGHGJ56O.js} +997 -5
- package/dist/chunk-QGHGJ56O.js.map +1 -0
- package/dist/{chunk-GVW4P7BG.js → chunk-RU52I7QO.js} +305 -16
- package/dist/chunk-RU52I7QO.js.map +1 -0
- package/dist/{chunk-JYRIOFEN.cjs → chunk-SAZRENEZ.cjs} +647 -74
- package/dist/chunk-SAZRENEZ.cjs.map +1 -0
- package/dist/{controller-OUdxPY-X.d.ts → controller-B7GIybc4.d.cts} +139 -7
- package/dist/{controller-OUdxPY-X.d.cts → controller-B7GIybc4.d.ts} +139 -7
- package/dist/extensions/index.cjs +14 -4
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +3 -3
- package/dist/extensions/index.d.ts +3 -3
- package/dist/extensions/index.js +13 -3
- package/dist/{index-k3mFbPx_.d.cts → index-CCr_z9kF.d.cts} +3 -3
- package/dist/{index-Ng1pG7JE.d.ts → index-Ck6ajwXh.d.ts} +3 -3
- package/dist/index.cjs +250 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +294 -8
- package/dist/index.d.ts +294 -8
- package/dist/index.js +241 -7
- package/dist/index.js.map +1 -1
- package/dist/{registry-iAHbqkYt.d.cts → registry-GJI4gToU.d.cts} +15 -4
- package/dist/{registry-iAHbqkYt.d.ts → registry-GJI4gToU.d.ts} +15 -4
- package/dist/serializers/index.cjs +3 -3
- package/dist/serializers/index.d.cts +1 -1
- package/dist/serializers/index.d.ts +1 -1
- package/dist/serializers/index.js +2 -2
- package/dist/spreadsheet/index.cjs +7 -3
- package/dist/spreadsheet/index.cjs.map +1 -1
- package/dist/spreadsheet/index.d.cts +33 -4
- package/dist/spreadsheet/index.d.ts +33 -4
- package/dist/spreadsheet/index.js +6 -2
- package/dist/{track-changes-G8JcWB8b.d.cts → track-changes-BSF58RK0.d.cts} +92 -9
- package/dist/{track-changes-G8JcWB8b.d.ts → track-changes-BSF58RK0.d.ts} +92 -9
- package/dist/{types-DMe0vFB1.d.cts → types-CJ4U-HHI.d.cts} +1 -1
- package/dist/{types-DMe0vFB1.d.ts → types-CJ4U-HHI.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-3TYMNULT.js.map +0 -1
- package/dist/chunk-4QPLEUL2.cjs.map +0 -1
- package/dist/chunk-A7DKIA72.js.map +0 -1
- package/dist/chunk-CYFJCKC4.js.map +0 -1
- package/dist/chunk-GVW4P7BG.js.map +0 -1
- package/dist/chunk-JYRIOFEN.cjs.map +0 -1
- package/dist/chunk-TVRC4KVT.cjs.map +0 -1
- package/dist/chunk-U6NDQFOK.cjs.map +0 -1
- /package/dist/{chunk-KYRZDWM4.js.map → chunk-JJDLPEWL.js.map} +0 -0
|
@@ -45,6 +45,25 @@ interface CellData {
|
|
|
45
45
|
errorMessage?: string;
|
|
46
46
|
format?: CellFormat;
|
|
47
47
|
readOnly?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set (only) on cells showing a value spilled from a dynamic array: the
|
|
50
|
+
* anchor cell holding the formula, e.g. `A1`. Spilled cells keep an empty
|
|
51
|
+
* `raw` and are never stored in the document.
|
|
52
|
+
*/
|
|
53
|
+
spillAnchor?: string;
|
|
54
|
+
}
|
|
55
|
+
/** A dynamic array spilled from its anchor cell (the cell holding the formula). */
|
|
56
|
+
interface SpreadsheetSpill {
|
|
57
|
+
/** Anchor cell key, e.g. `A1`. */
|
|
58
|
+
key: string;
|
|
59
|
+
anchor: {
|
|
60
|
+
row: number;
|
|
61
|
+
col: number;
|
|
62
|
+
};
|
|
63
|
+
/** Every cell the array covers, anchor included. */
|
|
64
|
+
range: CellRange;
|
|
65
|
+
/** The anchor's formula. */
|
|
66
|
+
formula: string;
|
|
48
67
|
}
|
|
49
68
|
interface SpreadsheetDocument {
|
|
50
69
|
id: string;
|
|
@@ -115,7 +134,7 @@ interface SpreadsheetDataSource {
|
|
|
115
134
|
updateRecord(recordId: string, field: string, value: any): Promise<void> | void;
|
|
116
135
|
}
|
|
117
136
|
|
|
118
|
-
type FormulaTokenType = 'NUMBER' | 'STRING' | 'BOOLEAN' | 'ERROR' | 'CELL_REF' | 'RANGE' | 'PROPERTY_REF' | 'IDENTIFIER' | 'OPERATOR' | 'LPAREN' | 'RPAREN' | 'COMMA' | 'EOF';
|
|
137
|
+
type FormulaTokenType = 'NUMBER' | 'STRING' | 'BOOLEAN' | 'ERROR' | 'CELL_REF' | 'RANGE' | 'SPILL_REF' | 'PROPERTY_REF' | 'IDENTIFIER' | 'OPERATOR' | 'LPAREN' | 'RPAREN' | 'COMMA' | 'EOF';
|
|
119
138
|
interface FormulaToken {
|
|
120
139
|
type: FormulaTokenType;
|
|
121
140
|
value: string;
|
|
@@ -125,7 +144,7 @@ declare function tokenizeFormula(formula: string): FormulaToken[];
|
|
|
125
144
|
|
|
126
145
|
/** Row number used for the open end of whole-column ranges such as `A:A`. */
|
|
127
146
|
declare const WHOLE_COLUMN_END_ROW = 1048576;
|
|
128
|
-
type ASTNode = LiteralNode | CellRefNode | RangeNode | PropertyRefNode | BinaryOpNode | UnaryOpNode | FunctionCallNode;
|
|
147
|
+
type ASTNode = LiteralNode | CellRefNode | RangeNode | SpillRefNode | NameNode | PropertyRefNode | BinaryOpNode | UnaryOpNode | FunctionCallNode;
|
|
129
148
|
interface LiteralNode {
|
|
130
149
|
type: 'Literal';
|
|
131
150
|
value: number | string | boolean;
|
|
@@ -144,6 +163,19 @@ interface RangeNode {
|
|
|
144
163
|
endCol: string;
|
|
145
164
|
endRow: number;
|
|
146
165
|
}
|
|
166
|
+
/** `A1#`: the whole spill range of the dynamic array anchored at A1. */
|
|
167
|
+
interface SpillRefNode {
|
|
168
|
+
type: 'SpillRef';
|
|
169
|
+
/** Anchor cell, e.g. `A1`. */
|
|
170
|
+
ref: string;
|
|
171
|
+
col: string;
|
|
172
|
+
row: number;
|
|
173
|
+
}
|
|
174
|
+
/** A bare name: a LET variable, or `#NAME?` when nothing defines it. */
|
|
175
|
+
interface NameNode {
|
|
176
|
+
type: 'Name';
|
|
177
|
+
name: string;
|
|
178
|
+
}
|
|
147
179
|
interface PropertyRefNode {
|
|
148
180
|
type: 'PropertyRef';
|
|
149
181
|
property: string;
|
|
@@ -199,7 +231,7 @@ declare function parseFormula(formula: string): ASTNode;
|
|
|
199
231
|
*/
|
|
200
232
|
/** Spreadsheet error values. They propagate through operators and functions. */
|
|
201
233
|
declare const FORMULA_ERRORS: Set<string>;
|
|
202
|
-
type FormulaErrorCode = '#DIV/0!' | '#VALUE!' | '#REF!' | '#NAME?' | '#N/A' | '#NUM!' | '#CYCLE!' | '#ERROR!';
|
|
234
|
+
type FormulaErrorCode = '#DIV/0!' | '#VALUE!' | '#REF!' | '#NAME?' | '#N/A' | '#NUM!' | '#CYCLE!' | '#ERROR!' | '#SPILL!' | '#CALC!';
|
|
203
235
|
declare function isFormulaError(value: unknown): value is string;
|
|
204
236
|
declare function colNameToIndex(col: string): number;
|
|
205
237
|
declare function indexToColName(index: number): string;
|
|
@@ -221,6 +253,20 @@ interface EvaluationContext {
|
|
|
221
253
|
*/
|
|
222
254
|
resolveRange?: (startCol: string, startRow: number, endCol: string, endRow: number) => any[];
|
|
223
255
|
resolveProperty?: (property: string) => any;
|
|
256
|
+
/**
|
|
257
|
+
* The spilled array anchored at a cell, for `A1#` references: its shape and
|
|
258
|
+
* values (column-major, like `resolveRange`), or an error code (e.g.
|
|
259
|
+
* `#REF!` when the cell holds no array).
|
|
260
|
+
*/
|
|
261
|
+
resolveSpill?: (col: string, row: number) => FormulaRange | string;
|
|
262
|
+
/**
|
|
263
|
+
* The cell holding the formula being evaluated, used by the implicit
|
|
264
|
+
* intersection operator (`=@A:A` reads the cell in the formula's row).
|
|
265
|
+
*/
|
|
266
|
+
getFormulaCell?: () => {
|
|
267
|
+
col: string;
|
|
268
|
+
row: number;
|
|
269
|
+
} | null;
|
|
224
270
|
}
|
|
225
271
|
/** A human-readable reason for an error value. */
|
|
226
272
|
interface FormulaDiagnostic {
|
|
@@ -234,12 +280,21 @@ interface FormulaEvaluationResult {
|
|
|
234
280
|
error?: FormulaErrorCode;
|
|
235
281
|
/** Why the formula failed, e.g. `Argument 2 of SUMIF must be a range.` */
|
|
236
282
|
message?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Set when the formula returned an array of more than one value (a
|
|
285
|
+
* dynamic array). `value` is then its top-left value; a spreadsheet spills
|
|
286
|
+
* the whole array into the cells below and to the right.
|
|
287
|
+
*/
|
|
288
|
+
array?: FormulaRange;
|
|
237
289
|
}
|
|
238
290
|
/** Generic explanation of an error code, used when no specific reason was recorded. */
|
|
239
291
|
declare function describeFormulaError(code: string): string;
|
|
292
|
+
/** Largest array a formula may build (SEQUENCE, RANDARRAY, broadcasting). */
|
|
293
|
+
declare const MAX_FORMULA_ARRAY_SIZE = 1000000;
|
|
240
294
|
declare class FormulaEvaluator {
|
|
241
295
|
private context;
|
|
242
296
|
private diagnostics;
|
|
297
|
+
private scopes;
|
|
243
298
|
constructor(context?: EvaluationContext);
|
|
244
299
|
/**
|
|
245
300
|
* Evaluates a formula. Errors in the formula are returned as error values
|
|
@@ -248,15 +303,42 @@ declare class FormulaEvaluator {
|
|
|
248
303
|
evaluate(astOrFormula: ASTNode | string): any;
|
|
249
304
|
/**
|
|
250
305
|
* Evaluates a formula and explains errors. Never throws: malformed formulas
|
|
251
|
-
* return `#ERROR!` with the parser's message. A result
|
|
252
|
-
* (
|
|
306
|
+
* return `#ERROR!` with the parser's message. A result with several values
|
|
307
|
+
* (a range or a dynamic array) is returned in `array`, with its top-left
|
|
308
|
+
* value as `value`; a one-value array is just that value.
|
|
253
309
|
*/
|
|
254
310
|
evaluateWithDiagnostics(astOrFormula: ASTNode | string): FormulaEvaluationResult;
|
|
255
311
|
/** Records why an error happened and returns the error code. */
|
|
256
312
|
private fail;
|
|
257
313
|
private evaluateNode;
|
|
314
|
+
private unary;
|
|
315
|
+
/** A binary operator on two single values. */
|
|
316
|
+
private binary;
|
|
317
|
+
/**
|
|
318
|
+
* Dates are ISO text: date +/- days is a date, date - date is a number of
|
|
319
|
+
* days (fractional when times are involved).
|
|
320
|
+
*/
|
|
321
|
+
private dateArithmetic;
|
|
322
|
+
/**
|
|
323
|
+
* `@` (implicit intersection): a range reference reads the cell in the
|
|
324
|
+
* formula's row (one column) or column (one row); arrays give their
|
|
325
|
+
* top-left value.
|
|
326
|
+
*/
|
|
327
|
+
private implicitIntersection;
|
|
328
|
+
private evaluateSpillRef;
|
|
258
329
|
private evaluateRange;
|
|
259
330
|
private callFunction;
|
|
331
|
+
private finishCall;
|
|
332
|
+
private lazyArguments;
|
|
333
|
+
/**
|
|
334
|
+
* Applies a scalar function element by element when it receives arrays
|
|
335
|
+
* (`=LEN(A1:A3)`, `=IF(A1:A3>1, "y", "n")`). Arguments typed `range` are
|
|
336
|
+
* passed whole. Returns undefined when no trigger argument is a
|
|
337
|
+
* multi-value array.
|
|
338
|
+
*/
|
|
339
|
+
private liftOverArrays;
|
|
340
|
+
/** LET(name1, value1, [name2, value2, ...], calculation). */
|
|
341
|
+
private evaluateLet;
|
|
260
342
|
private createContext;
|
|
261
343
|
}
|
|
262
344
|
|
|
@@ -273,10 +355,25 @@ declare function extractCellDependencies(node: ASTNode): CellDep[];
|
|
|
273
355
|
declare class DependencyGraph {
|
|
274
356
|
private dependencies;
|
|
275
357
|
private dependents;
|
|
358
|
+
private spillDependencies;
|
|
359
|
+
private spillDependents;
|
|
360
|
+
private spillEdges;
|
|
276
361
|
setCellFormula(cellKey: string, formulaStr: string | null): void;
|
|
277
362
|
/** Removes every registered formula and dependency. */
|
|
278
363
|
clear(): void;
|
|
364
|
+
/**
|
|
365
|
+
* Records the dynamic-array edges of the anchor `anchorKey`, replacing its
|
|
366
|
+
* previous ones: every key in `spilledKeys` (cells holding its spilled
|
|
367
|
+
* values) depends on the anchor, and the anchor depends on every key in
|
|
368
|
+
* `blockingKeys` (cells that stop it spilling). Pass empty lists to remove
|
|
369
|
+
* the anchor's edges.
|
|
370
|
+
*/
|
|
371
|
+
setSpillEdges(anchorKey: string, spilledKeys: Iterable<string>, blockingKeys?: Iterable<string>): void;
|
|
372
|
+
/** The spilled cells registered for `anchorKey` by `setSpillEdges`. */
|
|
373
|
+
getSpilledKeys(anchorKey: string): string[];
|
|
374
|
+
/** Formula dependencies plus dynamic-array (spill) dependencies of a cell. */
|
|
279
375
|
getDependencies(cellKey: string): string[];
|
|
376
|
+
/** Cells depending on `cellKey`, through formulas or spills. */
|
|
280
377
|
getDependents(cellKey: string): string[];
|
|
281
378
|
/**
|
|
282
379
|
* Detects if there is a cycle containing cellKey.
|
|
@@ -324,7 +421,8 @@ declare function shiftFormulaReferences(formula: string, change: StructuralChang
|
|
|
324
421
|
/**
|
|
325
422
|
* Calls `rewrite` with the source text of every cell or range reference in
|
|
326
423
|
* `formula` (e.g. `"$A1"`, `"B2:C10"`, `"A:A"`) and splices in its result.
|
|
327
|
-
*
|
|
424
|
+
* For a spill reference (`A1#`) it receives the anchor (`"A1"`) and the `#`
|
|
425
|
+
* is kept, unless the rewrite returns `#REF!`. String literals, property references and function names (e.g. `LOG10(`)
|
|
328
426
|
* are skipped. Formulas that fail to tokenize are returned unchanged.
|
|
329
427
|
*/
|
|
330
428
|
declare function mapFormulaReferences(formula: string, rewrite: (reference: string) => string): string;
|
|
@@ -544,6 +642,11 @@ declare class SpreadsheetController {
|
|
|
544
642
|
private batching;
|
|
545
643
|
private pendingCommits;
|
|
546
644
|
private evaluatingRowIndex;
|
|
645
|
+
private evaluatingCell;
|
|
646
|
+
private spills;
|
|
647
|
+
private spilledBy;
|
|
648
|
+
private spillCells;
|
|
649
|
+
private spillChanges;
|
|
547
650
|
constructor(options?: SpreadsheetControllerOptions);
|
|
548
651
|
loadDocument(document: SpreadsheetDocument): void;
|
|
549
652
|
registerDataSource(ds: SpreadsheetDataSource): void;
|
|
@@ -562,6 +665,14 @@ declare class SpreadsheetController {
|
|
|
562
665
|
* order. Every cell in a reference cycle is marked `#CYCLE!`.
|
|
563
666
|
*/
|
|
564
667
|
recalculateCell(rowId: string, colId: string): void;
|
|
668
|
+
/**
|
|
669
|
+
* Recalculates `keys` (and, with `includeDependents`, their dependents) in
|
|
670
|
+
* dependency order. Spill ranges are only known after evaluating their
|
|
671
|
+
* anchors, so when a pass changes which cells hold spilled values (and so
|
|
672
|
+
* the dependency graph), the dependents of those cells are recalculated in
|
|
673
|
+
* another pass, until nothing changes.
|
|
674
|
+
*/
|
|
675
|
+
private recalculateKeys;
|
|
565
676
|
/**
|
|
566
677
|
* Rebuilds the dependency graph from scratch and recalculates every formula
|
|
567
678
|
* in dependency order.
|
|
@@ -571,6 +682,26 @@ declare class SpreadsheetController {
|
|
|
571
682
|
private locateCellKey;
|
|
572
683
|
private markCycle;
|
|
573
684
|
private evalSingleCellByKey;
|
|
685
|
+
/**
|
|
686
|
+
* Spills `array` from the anchor at (row, col) into the cells below and to
|
|
687
|
+
* the right. Returns why it can't (the anchor then shows `#SPILL!`), or
|
|
688
|
+
* null once placed. The grid never grows to fit an array, as in Excel.
|
|
689
|
+
*/
|
|
690
|
+
private placeSpill;
|
|
691
|
+
/** Removes the array spilled from `anchor`. With `keepEdges`, its dependency edges stay. */
|
|
692
|
+
private clearSpill;
|
|
693
|
+
private forgetSpilledCell;
|
|
694
|
+
private resolveSpillByCoord;
|
|
695
|
+
private toSpill;
|
|
696
|
+
/**
|
|
697
|
+
* The dynamic array covering (row, col), whether it is the anchor (the cell
|
|
698
|
+
* holding the formula) or a spilled cell; null when there is none.
|
|
699
|
+
*/
|
|
700
|
+
getSpillAt(row: number, col: number): SpreadsheetSpill | null;
|
|
701
|
+
/** Every dynamic array currently spilled. */
|
|
702
|
+
getSpills(): SpreadsheetSpill[];
|
|
703
|
+
/** Whether `range` overlaps a spilled array (its anchor or spilled cells). */
|
|
704
|
+
private intersectsSpill;
|
|
574
705
|
private resolveCellByCoord;
|
|
575
706
|
private resolveRangeByCoords;
|
|
576
707
|
private resolveCurrentRowProperty;
|
|
@@ -643,6 +774,7 @@ declare class SpreadsheetController {
|
|
|
643
774
|
* HTML table, then TSV. Returns false when there was nothing to paste.
|
|
644
775
|
*/
|
|
645
776
|
pasteClipboardData(source: SpreadsheetClipboardSource, target?: CellPosition): boolean;
|
|
777
|
+
private spillAnchorInRange;
|
|
646
778
|
private getSelectionTopLeft;
|
|
647
779
|
/** The table settings object, created on first use. */
|
|
648
780
|
private get table();
|
|
@@ -751,4 +883,4 @@ declare class SpreadsheetController {
|
|
|
751
883
|
private notifyChange;
|
|
752
884
|
}
|
|
753
885
|
|
|
754
|
-
export { type
|
|
886
|
+
export { type SpreadsheetDataSource as $, type ASTNode as A, type BinaryOpNode as B, type CellCoordinate as C, DEFAULT_COLUMN_WIDTH as D, type EvaluationContext as E, FORMULA_ERRORS as F, type GroupAggregate as G, type NewFilterRule as H, type PropertyRefNode as I, type RowType as J, SPREADSHEET_CLIPBOARD_MIME as K, type LiteralNode as L, MAX_FORMULA_ARRAY_SIZE as M, type NameNode as N, type SortDirection as O, type ParsedSpreadsheetClipboard as P, type SortKey as Q, type RangeNode as R, SpreadsheetController as S, type SpillRefNode as T, type SpreadsheetCellSpan as U, type SpreadsheetClipboardCell as V, type SpreadsheetClipboardData as W, type SpreadsheetClipboardPayload as X, type SpreadsheetClipboardSource as Y, type SpreadsheetColumn as Z, type SpreadsheetControllerOptions as _, type CellData as a, type SpreadsheetDataSourceField as a0, type SpreadsheetDocument as a1, type SpreadsheetFilterState as a2, type SpreadsheetGrouping as a3, type SpreadsheetRow as a4, type SpreadsheetRowGroup as a5, type SpreadsheetRowSection as a6, type SpreadsheetSpill as a7, type SpreadsheetTableSettings as a8, type SpreadsheetViewColumn as a9, serializeHtmlTable as aA, shiftFormulaReferences as aB, tokenizeFormula as aC, type SpreadsheetViewModel as aa, type SpreadsheetViewRow as ab, type StructuralChange as ac, type UnaryOpNode as ad, WHOLE_COLUMN_END_ROW as ae, buildSpreadsheetView as af, colNameToIndex as ag, columnDependencyKey as ah, computeRowGroups as ai, createSpreadsheetClipboardData as aj, describeFormulaError as ak, extractCellDependencies as al, getRowSection as am, getTableSections as an, indexToColName as ao, isFormulaError as ap, mapFormulaReferences as aq, offsetFormulaReferences as ar, parseCellReference as as, parseFormula as at, parseHtmlTable as au, parseRange as av, readSpreadsheetClipboard as aw, rebaseClipboardRows as ax, remapFormulaReferences as ay, rowPassesFilters as az, type CellDep as b, type CellFormat as c, type CellPosition as d, type CellRange as e, type CellRefNode as f, type CellValueReader as g, type ColumnBinding as h, type ColumnType as i, type CsvExportOptions as j, type CsvImportOptions as k, DEFAULT_ROW_HEIGHT as l, DataSourceBinder as m, DependencyGraph as n, type FilterOperator as o, type FilterRule as p, type FormulaDiagnostic as q, type FormulaErrorCode as r, type FormulaEvaluationResult as s, FormulaEvaluator as t, FormulaParser as u, type FormulaRange as v, type FormulaToken as w, type FormulaTokenType as x, type FunctionCallNode as y, type GroupSummary as z };
|
|
@@ -45,6 +45,25 @@ interface CellData {
|
|
|
45
45
|
errorMessage?: string;
|
|
46
46
|
format?: CellFormat;
|
|
47
47
|
readOnly?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Set (only) on cells showing a value spilled from a dynamic array: the
|
|
50
|
+
* anchor cell holding the formula, e.g. `A1`. Spilled cells keep an empty
|
|
51
|
+
* `raw` and are never stored in the document.
|
|
52
|
+
*/
|
|
53
|
+
spillAnchor?: string;
|
|
54
|
+
}
|
|
55
|
+
/** A dynamic array spilled from its anchor cell (the cell holding the formula). */
|
|
56
|
+
interface SpreadsheetSpill {
|
|
57
|
+
/** Anchor cell key, e.g. `A1`. */
|
|
58
|
+
key: string;
|
|
59
|
+
anchor: {
|
|
60
|
+
row: number;
|
|
61
|
+
col: number;
|
|
62
|
+
};
|
|
63
|
+
/** Every cell the array covers, anchor included. */
|
|
64
|
+
range: CellRange;
|
|
65
|
+
/** The anchor's formula. */
|
|
66
|
+
formula: string;
|
|
48
67
|
}
|
|
49
68
|
interface SpreadsheetDocument {
|
|
50
69
|
id: string;
|
|
@@ -115,7 +134,7 @@ interface SpreadsheetDataSource {
|
|
|
115
134
|
updateRecord(recordId: string, field: string, value: any): Promise<void> | void;
|
|
116
135
|
}
|
|
117
136
|
|
|
118
|
-
type FormulaTokenType = 'NUMBER' | 'STRING' | 'BOOLEAN' | 'ERROR' | 'CELL_REF' | 'RANGE' | 'PROPERTY_REF' | 'IDENTIFIER' | 'OPERATOR' | 'LPAREN' | 'RPAREN' | 'COMMA' | 'EOF';
|
|
137
|
+
type FormulaTokenType = 'NUMBER' | 'STRING' | 'BOOLEAN' | 'ERROR' | 'CELL_REF' | 'RANGE' | 'SPILL_REF' | 'PROPERTY_REF' | 'IDENTIFIER' | 'OPERATOR' | 'LPAREN' | 'RPAREN' | 'COMMA' | 'EOF';
|
|
119
138
|
interface FormulaToken {
|
|
120
139
|
type: FormulaTokenType;
|
|
121
140
|
value: string;
|
|
@@ -125,7 +144,7 @@ declare function tokenizeFormula(formula: string): FormulaToken[];
|
|
|
125
144
|
|
|
126
145
|
/** Row number used for the open end of whole-column ranges such as `A:A`. */
|
|
127
146
|
declare const WHOLE_COLUMN_END_ROW = 1048576;
|
|
128
|
-
type ASTNode = LiteralNode | CellRefNode | RangeNode | PropertyRefNode | BinaryOpNode | UnaryOpNode | FunctionCallNode;
|
|
147
|
+
type ASTNode = LiteralNode | CellRefNode | RangeNode | SpillRefNode | NameNode | PropertyRefNode | BinaryOpNode | UnaryOpNode | FunctionCallNode;
|
|
129
148
|
interface LiteralNode {
|
|
130
149
|
type: 'Literal';
|
|
131
150
|
value: number | string | boolean;
|
|
@@ -144,6 +163,19 @@ interface RangeNode {
|
|
|
144
163
|
endCol: string;
|
|
145
164
|
endRow: number;
|
|
146
165
|
}
|
|
166
|
+
/** `A1#`: the whole spill range of the dynamic array anchored at A1. */
|
|
167
|
+
interface SpillRefNode {
|
|
168
|
+
type: 'SpillRef';
|
|
169
|
+
/** Anchor cell, e.g. `A1`. */
|
|
170
|
+
ref: string;
|
|
171
|
+
col: string;
|
|
172
|
+
row: number;
|
|
173
|
+
}
|
|
174
|
+
/** A bare name: a LET variable, or `#NAME?` when nothing defines it. */
|
|
175
|
+
interface NameNode {
|
|
176
|
+
type: 'Name';
|
|
177
|
+
name: string;
|
|
178
|
+
}
|
|
147
179
|
interface PropertyRefNode {
|
|
148
180
|
type: 'PropertyRef';
|
|
149
181
|
property: string;
|
|
@@ -199,7 +231,7 @@ declare function parseFormula(formula: string): ASTNode;
|
|
|
199
231
|
*/
|
|
200
232
|
/** Spreadsheet error values. They propagate through operators and functions. */
|
|
201
233
|
declare const FORMULA_ERRORS: Set<string>;
|
|
202
|
-
type FormulaErrorCode = '#DIV/0!' | '#VALUE!' | '#REF!' | '#NAME?' | '#N/A' | '#NUM!' | '#CYCLE!' | '#ERROR!';
|
|
234
|
+
type FormulaErrorCode = '#DIV/0!' | '#VALUE!' | '#REF!' | '#NAME?' | '#N/A' | '#NUM!' | '#CYCLE!' | '#ERROR!' | '#SPILL!' | '#CALC!';
|
|
203
235
|
declare function isFormulaError(value: unknown): value is string;
|
|
204
236
|
declare function colNameToIndex(col: string): number;
|
|
205
237
|
declare function indexToColName(index: number): string;
|
|
@@ -221,6 +253,20 @@ interface EvaluationContext {
|
|
|
221
253
|
*/
|
|
222
254
|
resolveRange?: (startCol: string, startRow: number, endCol: string, endRow: number) => any[];
|
|
223
255
|
resolveProperty?: (property: string) => any;
|
|
256
|
+
/**
|
|
257
|
+
* The spilled array anchored at a cell, for `A1#` references: its shape and
|
|
258
|
+
* values (column-major, like `resolveRange`), or an error code (e.g.
|
|
259
|
+
* `#REF!` when the cell holds no array).
|
|
260
|
+
*/
|
|
261
|
+
resolveSpill?: (col: string, row: number) => FormulaRange | string;
|
|
262
|
+
/**
|
|
263
|
+
* The cell holding the formula being evaluated, used by the implicit
|
|
264
|
+
* intersection operator (`=@A:A` reads the cell in the formula's row).
|
|
265
|
+
*/
|
|
266
|
+
getFormulaCell?: () => {
|
|
267
|
+
col: string;
|
|
268
|
+
row: number;
|
|
269
|
+
} | null;
|
|
224
270
|
}
|
|
225
271
|
/** A human-readable reason for an error value. */
|
|
226
272
|
interface FormulaDiagnostic {
|
|
@@ -234,12 +280,21 @@ interface FormulaEvaluationResult {
|
|
|
234
280
|
error?: FormulaErrorCode;
|
|
235
281
|
/** Why the formula failed, e.g. `Argument 2 of SUMIF must be a range.` */
|
|
236
282
|
message?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Set when the formula returned an array of more than one value (a
|
|
285
|
+
* dynamic array). `value` is then its top-left value; a spreadsheet spills
|
|
286
|
+
* the whole array into the cells below and to the right.
|
|
287
|
+
*/
|
|
288
|
+
array?: FormulaRange;
|
|
237
289
|
}
|
|
238
290
|
/** Generic explanation of an error code, used when no specific reason was recorded. */
|
|
239
291
|
declare function describeFormulaError(code: string): string;
|
|
292
|
+
/** Largest array a formula may build (SEQUENCE, RANDARRAY, broadcasting). */
|
|
293
|
+
declare const MAX_FORMULA_ARRAY_SIZE = 1000000;
|
|
240
294
|
declare class FormulaEvaluator {
|
|
241
295
|
private context;
|
|
242
296
|
private diagnostics;
|
|
297
|
+
private scopes;
|
|
243
298
|
constructor(context?: EvaluationContext);
|
|
244
299
|
/**
|
|
245
300
|
* Evaluates a formula. Errors in the formula are returned as error values
|
|
@@ -248,15 +303,42 @@ declare class FormulaEvaluator {
|
|
|
248
303
|
evaluate(astOrFormula: ASTNode | string): any;
|
|
249
304
|
/**
|
|
250
305
|
* Evaluates a formula and explains errors. Never throws: malformed formulas
|
|
251
|
-
* return `#ERROR!` with the parser's message. A result
|
|
252
|
-
* (
|
|
306
|
+
* return `#ERROR!` with the parser's message. A result with several values
|
|
307
|
+
* (a range or a dynamic array) is returned in `array`, with its top-left
|
|
308
|
+
* value as `value`; a one-value array is just that value.
|
|
253
309
|
*/
|
|
254
310
|
evaluateWithDiagnostics(astOrFormula: ASTNode | string): FormulaEvaluationResult;
|
|
255
311
|
/** Records why an error happened and returns the error code. */
|
|
256
312
|
private fail;
|
|
257
313
|
private evaluateNode;
|
|
314
|
+
private unary;
|
|
315
|
+
/** A binary operator on two single values. */
|
|
316
|
+
private binary;
|
|
317
|
+
/**
|
|
318
|
+
* Dates are ISO text: date +/- days is a date, date - date is a number of
|
|
319
|
+
* days (fractional when times are involved).
|
|
320
|
+
*/
|
|
321
|
+
private dateArithmetic;
|
|
322
|
+
/**
|
|
323
|
+
* `@` (implicit intersection): a range reference reads the cell in the
|
|
324
|
+
* formula's row (one column) or column (one row); arrays give their
|
|
325
|
+
* top-left value.
|
|
326
|
+
*/
|
|
327
|
+
private implicitIntersection;
|
|
328
|
+
private evaluateSpillRef;
|
|
258
329
|
private evaluateRange;
|
|
259
330
|
private callFunction;
|
|
331
|
+
private finishCall;
|
|
332
|
+
private lazyArguments;
|
|
333
|
+
/**
|
|
334
|
+
* Applies a scalar function element by element when it receives arrays
|
|
335
|
+
* (`=LEN(A1:A3)`, `=IF(A1:A3>1, "y", "n")`). Arguments typed `range` are
|
|
336
|
+
* passed whole. Returns undefined when no trigger argument is a
|
|
337
|
+
* multi-value array.
|
|
338
|
+
*/
|
|
339
|
+
private liftOverArrays;
|
|
340
|
+
/** LET(name1, value1, [name2, value2, ...], calculation). */
|
|
341
|
+
private evaluateLet;
|
|
260
342
|
private createContext;
|
|
261
343
|
}
|
|
262
344
|
|
|
@@ -273,10 +355,25 @@ declare function extractCellDependencies(node: ASTNode): CellDep[];
|
|
|
273
355
|
declare class DependencyGraph {
|
|
274
356
|
private dependencies;
|
|
275
357
|
private dependents;
|
|
358
|
+
private spillDependencies;
|
|
359
|
+
private spillDependents;
|
|
360
|
+
private spillEdges;
|
|
276
361
|
setCellFormula(cellKey: string, formulaStr: string | null): void;
|
|
277
362
|
/** Removes every registered formula and dependency. */
|
|
278
363
|
clear(): void;
|
|
364
|
+
/**
|
|
365
|
+
* Records the dynamic-array edges of the anchor `anchorKey`, replacing its
|
|
366
|
+
* previous ones: every key in `spilledKeys` (cells holding its spilled
|
|
367
|
+
* values) depends on the anchor, and the anchor depends on every key in
|
|
368
|
+
* `blockingKeys` (cells that stop it spilling). Pass empty lists to remove
|
|
369
|
+
* the anchor's edges.
|
|
370
|
+
*/
|
|
371
|
+
setSpillEdges(anchorKey: string, spilledKeys: Iterable<string>, blockingKeys?: Iterable<string>): void;
|
|
372
|
+
/** The spilled cells registered for `anchorKey` by `setSpillEdges`. */
|
|
373
|
+
getSpilledKeys(anchorKey: string): string[];
|
|
374
|
+
/** Formula dependencies plus dynamic-array (spill) dependencies of a cell. */
|
|
279
375
|
getDependencies(cellKey: string): string[];
|
|
376
|
+
/** Cells depending on `cellKey`, through formulas or spills. */
|
|
280
377
|
getDependents(cellKey: string): string[];
|
|
281
378
|
/**
|
|
282
379
|
* Detects if there is a cycle containing cellKey.
|
|
@@ -324,7 +421,8 @@ declare function shiftFormulaReferences(formula: string, change: StructuralChang
|
|
|
324
421
|
/**
|
|
325
422
|
* Calls `rewrite` with the source text of every cell or range reference in
|
|
326
423
|
* `formula` (e.g. `"$A1"`, `"B2:C10"`, `"A:A"`) and splices in its result.
|
|
327
|
-
*
|
|
424
|
+
* For a spill reference (`A1#`) it receives the anchor (`"A1"`) and the `#`
|
|
425
|
+
* is kept, unless the rewrite returns `#REF!`. String literals, property references and function names (e.g. `LOG10(`)
|
|
328
426
|
* are skipped. Formulas that fail to tokenize are returned unchanged.
|
|
329
427
|
*/
|
|
330
428
|
declare function mapFormulaReferences(formula: string, rewrite: (reference: string) => string): string;
|
|
@@ -544,6 +642,11 @@ declare class SpreadsheetController {
|
|
|
544
642
|
private batching;
|
|
545
643
|
private pendingCommits;
|
|
546
644
|
private evaluatingRowIndex;
|
|
645
|
+
private evaluatingCell;
|
|
646
|
+
private spills;
|
|
647
|
+
private spilledBy;
|
|
648
|
+
private spillCells;
|
|
649
|
+
private spillChanges;
|
|
547
650
|
constructor(options?: SpreadsheetControllerOptions);
|
|
548
651
|
loadDocument(document: SpreadsheetDocument): void;
|
|
549
652
|
registerDataSource(ds: SpreadsheetDataSource): void;
|
|
@@ -562,6 +665,14 @@ declare class SpreadsheetController {
|
|
|
562
665
|
* order. Every cell in a reference cycle is marked `#CYCLE!`.
|
|
563
666
|
*/
|
|
564
667
|
recalculateCell(rowId: string, colId: string): void;
|
|
668
|
+
/**
|
|
669
|
+
* Recalculates `keys` (and, with `includeDependents`, their dependents) in
|
|
670
|
+
* dependency order. Spill ranges are only known after evaluating their
|
|
671
|
+
* anchors, so when a pass changes which cells hold spilled values (and so
|
|
672
|
+
* the dependency graph), the dependents of those cells are recalculated in
|
|
673
|
+
* another pass, until nothing changes.
|
|
674
|
+
*/
|
|
675
|
+
private recalculateKeys;
|
|
565
676
|
/**
|
|
566
677
|
* Rebuilds the dependency graph from scratch and recalculates every formula
|
|
567
678
|
* in dependency order.
|
|
@@ -571,6 +682,26 @@ declare class SpreadsheetController {
|
|
|
571
682
|
private locateCellKey;
|
|
572
683
|
private markCycle;
|
|
573
684
|
private evalSingleCellByKey;
|
|
685
|
+
/**
|
|
686
|
+
* Spills `array` from the anchor at (row, col) into the cells below and to
|
|
687
|
+
* the right. Returns why it can't (the anchor then shows `#SPILL!`), or
|
|
688
|
+
* null once placed. The grid never grows to fit an array, as in Excel.
|
|
689
|
+
*/
|
|
690
|
+
private placeSpill;
|
|
691
|
+
/** Removes the array spilled from `anchor`. With `keepEdges`, its dependency edges stay. */
|
|
692
|
+
private clearSpill;
|
|
693
|
+
private forgetSpilledCell;
|
|
694
|
+
private resolveSpillByCoord;
|
|
695
|
+
private toSpill;
|
|
696
|
+
/**
|
|
697
|
+
* The dynamic array covering (row, col), whether it is the anchor (the cell
|
|
698
|
+
* holding the formula) or a spilled cell; null when there is none.
|
|
699
|
+
*/
|
|
700
|
+
getSpillAt(row: number, col: number): SpreadsheetSpill | null;
|
|
701
|
+
/** Every dynamic array currently spilled. */
|
|
702
|
+
getSpills(): SpreadsheetSpill[];
|
|
703
|
+
/** Whether `range` overlaps a spilled array (its anchor or spilled cells). */
|
|
704
|
+
private intersectsSpill;
|
|
574
705
|
private resolveCellByCoord;
|
|
575
706
|
private resolveRangeByCoords;
|
|
576
707
|
private resolveCurrentRowProperty;
|
|
@@ -643,6 +774,7 @@ declare class SpreadsheetController {
|
|
|
643
774
|
* HTML table, then TSV. Returns false when there was nothing to paste.
|
|
644
775
|
*/
|
|
645
776
|
pasteClipboardData(source: SpreadsheetClipboardSource, target?: CellPosition): boolean;
|
|
777
|
+
private spillAnchorInRange;
|
|
646
778
|
private getSelectionTopLeft;
|
|
647
779
|
/** The table settings object, created on first use. */
|
|
648
780
|
private get table();
|
|
@@ -751,4 +883,4 @@ declare class SpreadsheetController {
|
|
|
751
883
|
private notifyChange;
|
|
752
884
|
}
|
|
753
885
|
|
|
754
|
-
export { type
|
|
886
|
+
export { type SpreadsheetDataSource as $, type ASTNode as A, type BinaryOpNode as B, type CellCoordinate as C, DEFAULT_COLUMN_WIDTH as D, type EvaluationContext as E, FORMULA_ERRORS as F, type GroupAggregate as G, type NewFilterRule as H, type PropertyRefNode as I, type RowType as J, SPREADSHEET_CLIPBOARD_MIME as K, type LiteralNode as L, MAX_FORMULA_ARRAY_SIZE as M, type NameNode as N, type SortDirection as O, type ParsedSpreadsheetClipboard as P, type SortKey as Q, type RangeNode as R, SpreadsheetController as S, type SpillRefNode as T, type SpreadsheetCellSpan as U, type SpreadsheetClipboardCell as V, type SpreadsheetClipboardData as W, type SpreadsheetClipboardPayload as X, type SpreadsheetClipboardSource as Y, type SpreadsheetColumn as Z, type SpreadsheetControllerOptions as _, type CellData as a, type SpreadsheetDataSourceField as a0, type SpreadsheetDocument as a1, type SpreadsheetFilterState as a2, type SpreadsheetGrouping as a3, type SpreadsheetRow as a4, type SpreadsheetRowGroup as a5, type SpreadsheetRowSection as a6, type SpreadsheetSpill as a7, type SpreadsheetTableSettings as a8, type SpreadsheetViewColumn as a9, serializeHtmlTable as aA, shiftFormulaReferences as aB, tokenizeFormula as aC, type SpreadsheetViewModel as aa, type SpreadsheetViewRow as ab, type StructuralChange as ac, type UnaryOpNode as ad, WHOLE_COLUMN_END_ROW as ae, buildSpreadsheetView as af, colNameToIndex as ag, columnDependencyKey as ah, computeRowGroups as ai, createSpreadsheetClipboardData as aj, describeFormulaError as ak, extractCellDependencies as al, getRowSection as am, getTableSections as an, indexToColName as ao, isFormulaError as ap, mapFormulaReferences as aq, offsetFormulaReferences as ar, parseCellReference as as, parseFormula as at, parseHtmlTable as au, parseRange as av, readSpreadsheetClipboard as aw, rebaseClipboardRows as ax, remapFormulaReferences as ay, rowPassesFilters as az, type CellDep as b, type CellFormat as c, type CellPosition as d, type CellRange as e, type CellRefNode as f, type CellValueReader as g, type ColumnBinding as h, type ColumnType as i, type CsvExportOptions as j, type CsvImportOptions as k, DEFAULT_ROW_HEIGHT as l, DataSourceBinder as m, DependencyGraph as n, type FilterOperator as o, type FilterRule as p, type FormulaDiagnostic as q, type FormulaErrorCode as r, type FormulaEvaluationResult as s, FormulaEvaluator as t, FormulaParser as u, type FormulaRange as v, type FormulaToken as w, type FormulaTokenType as x, type FunctionCallNode as y, type GroupSummary as z };
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
var
|
|
72
|
+
var _chunkGVSMRPHBcjs = require('../chunk-GVSMRPHB.cjs');
|
|
73
73
|
require('../chunk-AXV2ZW34.cjs');
|
|
74
|
-
require('../chunk-
|
|
74
|
+
require('../chunk-CL37JGFW.cjs');
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
|
|
@@ -90,12 +90,12 @@ require('../chunk-LA7PEGU3.cjs');
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
var _chunkTVRC4KVTcjs = require('../chunk-TVRC4KVT.cjs');
|
|
94
93
|
|
|
95
94
|
|
|
96
95
|
|
|
97
96
|
|
|
98
97
|
|
|
98
|
+
var _chunkAA4ZEVCCcjs = require('../chunk-AA4ZEVCC.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
@@ -179,5 +179,15 @@ var _chunkTVRC4KVTcjs = require('../chunk-TVRC4KVT.cjs');
|
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
exports.Autocorrect = _chunkGVSMRPHBcjs.Autocorrect; exports.BLOCK_CHANGE_ATTRIBUTE = _chunkAA4ZEVCCcjs.BLOCK_CHANGE_ATTRIBUTE; exports.Bookmark = _chunkGVSMRPHBcjs.Bookmark; exports.COMMENT_MARK_NAME = _chunkGVSMRPHBcjs.COMMENT_MARK_NAME; exports.ColorHighlighter = _chunkGVSMRPHBcjs.ColorHighlighter; exports.CommentStore = _chunkAA4ZEVCCcjs.CommentStore; exports.Comments = _chunkGVSMRPHBcjs.Comments; exports.CrossReference = _chunkGVSMRPHBcjs.CrossReference; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = _chunkGVSMRPHBcjs.DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.DELETION_MARK_NAME = _chunkAA4ZEVCCcjs.DELETION_MARK_NAME; exports.FORMAT_CHANGE_MARK_NAME = _chunkAA4ZEVCCcjs.FORMAT_CHANGE_MARK_NAME; exports.FileImport = _chunkGVSMRPHBcjs.FileImport; exports.FontSize = _chunkGVSMRPHBcjs.FontSize; exports.Footnote = _chunkGVSMRPHBcjs.Footnote; exports.FootnoteReference = _chunkGVSMRPHBcjs.FootnoteReference; exports.Footnotes = _chunkGVSMRPHBcjs.Footnotes; exports.GradientText = _chunkGVSMRPHBcjs.GradientText; exports.INSERTION_MARK_NAME = _chunkAA4ZEVCCcjs.INSERTION_MARK_NAME; exports.Image = _chunkGVSMRPHBcjs.Image; exports.LoadingNode = _chunkGVSMRPHBcjs.LoadingNode; exports.Markdown = _chunkGVSMRPHBcjs.Markdown; exports.Mention = _chunkGVSMRPHBcjs.Mention; exports.Outline = _chunkGVSMRPHBcjs.Outline; exports.RichClipboard = _chunkGVSMRPHBcjs.RichClipboard; exports.SMILIE_REPLACEMENTS = _chunkGVSMRPHBcjs.SMILIE_REPLACEMENTS; exports.SlashCommands = _chunkGVSMRPHBcjs.SlashCommands; exports.SmilieReplacer = _chunkGVSMRPHBcjs.SmilieReplacer; exports.TRACK_CHANGES_SKIP_META = _chunkAA4ZEVCCcjs.TRACK_CHANGES_SKIP_META; exports.TableOfContents = _chunkGVSMRPHBcjs.TableOfContents; exports.TemplateSuggestions = _chunkGVSMRPHBcjs.TemplateSuggestions; exports.TrackChanges = _chunkAA4ZEVCCcjs.TrackChanges; exports.TrackChangesStore = _chunkAA4ZEVCCcjs.TrackChangesStore; exports.TrackedDeletion = _chunkAA4ZEVCCcjs.TrackedDeletion; exports.TrackedFormatChange = _chunkAA4ZEVCCcjs.TrackedFormatChange; exports.TrackedInsertion = _chunkAA4ZEVCCcjs.TrackedInsertion; exports.autocorrectPluginKey = _chunkGVSMRPHBcjs.autocorrectPluginKey; exports.buildOutlineTree = _chunkGVSMRPHBcjs.buildOutlineTree; exports.capitalizeSentenceRules = _chunkGVSMRPHBcjs.capitalizeSentenceRules; exports.commentsPluginKey = _chunkGVSMRPHBcjs.commentsPluginKey; exports.computeOutline = _chunkGVSMRPHBcjs.computeOutline; exports.createCommentStore = _chunkAA4ZEVCCcjs.createCommentStore; exports.createMentionExtension = _chunkGVSMRPHBcjs.createMentionExtension; exports.createOutlineStore = _chunkGVSMRPHBcjs.createOutlineStore; exports.createReviewId = _chunkAA4ZEVCCcjs.createReviewId; exports.createRichTextPreset = _chunkGVSMRPHBcjs.createRichTextPreset; exports.crossReferencePluginKey = _chunkGVSMRPHBcjs.crossReferencePluginKey; exports.defaultAutocorrectRules = _chunkGVSMRPHBcjs.defaultAutocorrectRules; exports.describeBlockChange = _chunkAA4ZEVCCcjs.describeBlockChange; exports.describeFormatChange = _chunkAA4ZEVCCcjs.describeFormatChange; exports.documentStructureCommandItems = _chunkGVSMRPHBcjs.documentStructureCommandItems; exports.fileImportPluginKey = _chunkGVSMRPHBcjs.fileImportPluginKey; exports.findAutocorrection = _chunkGVSMRPHBcjs.findAutocorrection; exports.findCommentRanges = _chunkGVSMRPHBcjs.findCommentRanges; exports.findHexColors = _chunkGVSMRPHBcjs.findHexColors; exports.footnotesMarkdownIt = _chunkGVSMRPHBcjs.footnotesMarkdownIt; exports.footnotesPluginKey = _chunkGVSMRPHBcjs.footnotesPluginKey; exports.formatReviewTime = _chunkAA4ZEVCCcjs.formatReviewTime; exports.fractionRules = _chunkGVSMRPHBcjs.fractionRules; exports.getActiveHeading = _chunkGVSMRPHBcjs.getActiveHeading; exports.getBookmarks = _chunkGVSMRPHBcjs.getBookmarks; exports.getCommentAnchors = _chunkGVSMRPHBcjs.getCommentAnchors; exports.getCommentAuthor = _chunkGVSMRPHBcjs.getCommentAuthor; exports.getCommentIdsAt = _chunkGVSMRPHBcjs.getCommentIdsAt; exports.getCommentStore = _chunkGVSMRPHBcjs.getCommentStore; exports.getCrossReferenceTargets = _chunkGVSMRPHBcjs.getCrossReferenceTargets; exports.getDocumentStructureCommandItems = _chunkGVSMRPHBcjs.getDocumentStructureCommandItems; exports.getFootnotes = _chunkGVSMRPHBcjs.getFootnotes; exports.getOutline = _chunkGVSMRPHBcjs.getOutline; exports.getTableOfContentsEntries = _chunkGVSMRPHBcjs.getTableOfContentsEntries; exports.getTrackChangesStore = _chunkAA4ZEVCCcjs.getTrackChangesStore; exports.getTrackedChangeAt = _chunkAA4ZEVCCcjs.getTrackedChangeAt; exports.getTrackedChanges = _chunkAA4ZEVCCcjs.getTrackedChanges; exports.handleImageInsertion = _chunkGVSMRPHBcjs.handleImageInsertion; exports.imagePastePluginKey = _chunkGVSMRPHBcjs.imagePastePluginKey; exports.insertImageNode = _chunkGVSMRPHBcjs.insertImageNode; exports.isInsidePromptToken = _chunkGVSMRPHBcjs.isInsidePromptToken; exports.isTrackChangesEnabled = _chunkAA4ZEVCCcjs.isTrackChangesEnabled; exports.navigateToHeading = _chunkGVSMRPHBcjs.navigateToHeading; exports.outlinePluginKey = _chunkGVSMRPHBcjs.outlinePluginKey; exports.removeImageNode = _chunkGVSMRPHBcjs.removeImageNode; exports.resolveTrackedChanges = _chunkAA4ZEVCCcjs.resolveTrackedChanges; exports.richClipboardPluginKey = _chunkGVSMRPHBcjs.richClipboardPluginKey; exports.smartQuoteRules = _chunkGVSMRPHBcjs.smartQuoteRules; exports.smilieAutocorrectRules = _chunkGVSMRPHBcjs.smilieAutocorrectRules; exports.symbolRules = _chunkGVSMRPHBcjs.symbolRules; exports.syncFootnotes = _chunkGVSMRPHBcjs.syncFootnotes; exports.tableOfContentsMarkdownIt = _chunkGVSMRPHBcjs.tableOfContentsMarkdownIt; exports.tableOfContentsPluginKey = _chunkGVSMRPHBcjs.tableOfContentsPluginKey; exports.trackChangesPluginKey = _chunkAA4ZEVCCcjs.trackChangesPluginKey; exports.twoInitialCapitalsRules = _chunkGVSMRPHBcjs.twoInitialCapitalsRules; exports.updateImageSrc = _chunkGVSMRPHBcjs.updateImageSrc; exports.writeRichClipboard = _chunkGVSMRPHBcjs.writeRichClipboard;
|
|
183
193
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/extensions/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/extensions/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,mzLAAC","file":"/home/runner/work/editor/editor/packages/core/dist/extensions/index.cjs"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AddCommentOptions,
|
|
2
|
-
export { C as CommentAnchor, a as CommentReply, b as CommentStore, c as CommentStoreListener, d as CommentStoreOptions, e as CommentStoreSnapshot, f as CommentThread, g as CreateThreadInput, D as DELETION_MARK_NAME, I as INSERTION_MARK_NAME, M as Mention, h as MentionEntity, i as MentionOptions, R as ReviewAuthor, S as SerializedComments, T as TRACK_CHANGES_SKIP_META, j as TrackChanges, k as TrackChangesOptions, l as TrackChangesSnapshot, m as TrackChangesStorage, n as TrackChangesStore, o as
|
|
1
|
+
export { A as AddCommentOptions, b as Autocorrect, c as AutocorrectContext, d as AutocorrectCorrection, e as AutocorrectOptions, f as AutocorrectRule, g as AutocorrectStorage, h as Bookmark, i as BookmarkInfo, j as BookmarkOptions, C as COMMENT_MARK_NAME, k as ColorHighlighter, l as CommentRange, m as Comments, n as CommentsOptions, o as CommentsStorage, q as CrossReference, r as CrossReferenceOptions, s as CrossReferenceTarget, t as CrossReferenceTargetType, u as DEFAULT_AUTOCORRECT_EXCEPTIONS, v as DocumentStructureCommandArgs, w as DocumentStructureCommandItem, F as FileImport, x as FileImportOptions, y as FocusHeadingOptions, z as FontSize, E as Footnote, G as FootnoteInfo, H as FootnoteReference, I as Footnotes, J as FootnotesOptions, K as GradientText, L as GradientTextOptions, M as Image, N as ImageOptions, O as InsertFootnoteOptions, P as InsertTableOfContentsOptions, Q as LoadingNode, R as Markdown, S as Outline, T as OutlineHeading, U as OutlineOptions, V as OutlineSnapshot, W as OutlineStorage, X as OutlineStore, Y as OutlineTreeItem, Z as RichClipboard, _ as RichClipboardOptions, $ as RichClipboardStorage, a0 as RichTextPresetOptions, a1 as SMILIE_REPLACEMENTS, a2 as SetBookmarkOptions, a3 as SlashCommandMatchData, a4 as SlashCommands, a5 as SlashCommandsOptions, a6 as SmilieReplacer, a7 as TableOfContents, a8 as TableOfContentsEntry, a9 as TableOfContentsOptions, aa as TemplateSuggestions, ab as TemplateSuggestionsOptions, ac as autocorrectPluginKey, ad as buildOutlineTree, ae as capitalizeSentenceRules, af as commentsPluginKey, ag as computeOutline, ai as createOutlineStore, aj as createRichTextPreset, ak as crossReferencePluginKey, al as defaultAutocorrectRules, an as documentStructureCommandItems, ao as fileImportPluginKey, ap as findAutocorrection, aq as findCommentRanges, ar as findHexColors, at as footnotesMarkdownIt, au as footnotesPluginKey, av as fractionRules, aw as getActiveHeading, ax as getBookmarks, ay as getCommentAnchors, az as getCommentAuthor, aA as getCommentIdsAt, aB as getCommentStore, aC as getCrossReferenceTargets, aD as getDocumentStructureCommandItems, aE as getFootnotes, aG as getOutline, aH as getTableOfContentsEntries, aI as handleImageInsertion, aK as imagePastePluginKey, aM as insertImageNode, aN as isInsidePromptToken, aP as navigateToHeading, aQ as outlinePluginKey, aT as removeImageNode, aU as richClipboardPluginKey, aW as smartQuoteRules, aX as smilieAutocorrectRules, aY as symbolRules, aZ as syncFootnotes, a_ as tableOfContentsMarkdownIt, a$ as tableOfContentsPluginKey, b0 as twoInitialCapitalsRules, b2 as updateImageSrc, b3 as writeRichClipboard } from '../index-CCr_z9kF.cjs';
|
|
2
|
+
export { B as BLOCK_CHANGE_ATTRIBUTE, C as CommentAnchor, a as CommentReply, b as CommentStore, c as CommentStoreListener, d as CommentStoreOptions, e as CommentStoreSnapshot, f as CommentThread, g as CreateThreadInput, D as DELETION_MARK_NAME, F as FORMAT_CHANGE_MARK_NAME, I as INSERTION_MARK_NAME, M as Mention, h as MentionEntity, i as MentionOptions, R as ReviewAuthor, S as SerializedComments, T as TRACK_CHANGES_SKIP_META, j as TrackChanges, k as TrackChangesOptions, l as TrackChangesSnapshot, m as TrackChangesStorage, n as TrackChangesStore, o as TrackedBlockChangeAttributes, p as TrackedBlockSnapshot, q as TrackedChange, r as TrackedChangeAttributes, s as TrackedChangeType, t as TrackedChangesView, u as TrackedDeletion, v as TrackedFormatChange, w as TrackedFormatChangeAttributes, x as TrackedFormatSummary, y as TrackedInsertion, z as TrackedMark, A as createCommentStore, E as createMentionExtension, G as createReviewId, H as describeBlockChange, J as describeFormatChange, K as formatReviewTime, L as getTrackChangesStore, N as getTrackedChangeAt, O as getTrackedChanges, P as isTrackChangesEnabled, Q as resolveTrackedChanges, U as trackChangesPluginKey } from '../track-changes-BSF58RK0.cjs';
|
|
3
3
|
export { MarkdownOptions } from 'tiptap-markdown';
|
|
4
4
|
import '@tiptap/core';
|
|
5
5
|
import '../tokens-CyLZmIei.cjs';
|
|
@@ -7,6 +7,6 @@ import '@tiptap/pm/state';
|
|
|
7
7
|
import '@tiptap/pm/view';
|
|
8
8
|
import '@tiptap/pm/model';
|
|
9
9
|
import '@tiptap/extension-image';
|
|
10
|
-
import '../registry-
|
|
10
|
+
import '../registry-GJI4gToU.cjs';
|
|
11
11
|
import '@tiptap/extension-mention';
|
|
12
12
|
import '@tiptap/suggestion';
|