@svgrid/enterprise 3.0.1 → 3.0.2

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 (197) hide show
  1. package/dist/SvFormulaBar.svelte +606 -0
  2. package/dist/SvFormulaBar.svelte.d.ts +62 -0
  3. package/dist/SvPivotDesigner.svelte +65 -14
  4. package/dist/SvRibbonIcon.svelte +46 -0
  5. package/dist/SvRibbonIcon.svelte.d.ts +17 -0
  6. package/dist/SvSchemaChart.svelte +4 -2
  7. package/dist/SvSheet.svelte +4114 -0
  8. package/dist/SvSheet.svelte.d.ts +142 -0
  9. package/dist/SvSheetComment.svelte +98 -0
  10. package/dist/SvSheetComment.svelte.d.ts +22 -0
  11. package/dist/SvSheetConditionalFormat.svelte +162 -0
  12. package/dist/SvSheetConditionalFormat.svelte.d.ts +14 -0
  13. package/dist/SvSheetDataValidation.svelte +249 -0
  14. package/dist/SvSheetDataValidation.svelte.d.ts +14 -0
  15. package/dist/SvSheetFilterMenu.svelte +217 -0
  16. package/dist/SvSheetFilterMenu.svelte.d.ts +17 -0
  17. package/dist/SvSheetFindReplace.svelte +132 -0
  18. package/dist/SvSheetFindReplace.svelte.d.ts +10 -0
  19. package/dist/SvSheetFormatCells.svelte +421 -0
  20. package/dist/SvSheetFormatCells.svelte.d.ts +17 -0
  21. package/dist/SvSheetGoalSeek.svelte +144 -0
  22. package/dist/SvSheetGoalSeek.svelte.d.ts +12 -0
  23. package/dist/SvSheetInsertFunction.svelte +147 -0
  24. package/dist/SvSheetInsertFunction.svelte.d.ts +8 -0
  25. package/dist/SvSheetListPicker.svelte +89 -0
  26. package/dist/SvSheetListPicker.svelte.d.ts +16 -0
  27. package/dist/SvSheetManageRules.svelte +185 -0
  28. package/dist/SvSheetManageRules.svelte.d.ts +16 -0
  29. package/dist/SvSheetNameManager.svelte +225 -0
  30. package/dist/SvSheetNameManager.svelte.d.ts +11 -0
  31. package/dist/SvSheetPasteSpecial.svelte +105 -0
  32. package/dist/SvSheetPasteSpecial.svelte.d.ts +12 -0
  33. package/dist/SvSheetRemoveDuplicates.svelte +149 -0
  34. package/dist/SvSheetRemoveDuplicates.svelte.d.ts +12 -0
  35. package/dist/SvSheetRibbon.svelte +1201 -0
  36. package/dist/SvSheetRibbon.svelte.d.ts +34 -0
  37. package/dist/SvSheetSizeDialog.svelte +58 -0
  38. package/dist/SvSheetSizeDialog.svelte.d.ts +11 -0
  39. package/dist/SvSheetTabs.svelte +441 -0
  40. package/dist/SvSheetTabs.svelte.d.ts +36 -0
  41. package/dist/SvSheetTabs.test-harness.svelte.d.ts +17 -0
  42. package/dist/SvSheetTabs.test-harness.svelte.js +22 -0
  43. package/dist/SvSheetTextToColumns.svelte +172 -0
  44. package/dist/SvSheetTextToColumns.svelte.d.ts +13 -0
  45. package/dist/SvSheetValidationAlert.svelte +83 -0
  46. package/dist/SvSheetValidationAlert.svelte.d.ts +15 -0
  47. package/dist/cdn/svgrid-enterprise.svelte-external.js +18997 -5396
  48. package/dist/designer/assets/GridMenus-BlsvL_aU.js +8 -0
  49. package/dist/designer/assets/SvChartMenu-BYO9cYdy.css +1 -0
  50. package/dist/designer/assets/SvChartMenu-D9hEeHar.js +1 -0
  51. package/dist/designer/assets/SvDateRangeInput-BBRzrQeg.js +1 -0
  52. package/dist/designer/assets/SvDateTimePicker-DARvKUL2.js +1 -0
  53. package/dist/designer/assets/SvGridCellEditor-C7uQXYds.js +4 -0
  54. package/dist/designer/assets/SvGridChart-B8j1SSy3.js +3 -0
  55. package/dist/designer/assets/SvGridChart-BgLuPO7I.css +1 -0
  56. package/dist/designer/assets/SvGridChartBuilder-08YWWeqY.css +1 -0
  57. package/dist/designer/assets/SvGridChartBuilder-kvyIU_Rl.js +1 -0
  58. package/dist/designer/assets/SvGridChartPanel-4Pc8y5yO.css +1 -0
  59. package/dist/designer/assets/SvGridChartPanel-pT6ITc2P.js +4 -0
  60. package/dist/designer/assets/{SvGridChartView-DUc-1RUf.css → SvGridChartView-7msfnWZT.css} +1 -1
  61. package/dist/designer/assets/SvGridChartView-bg281UA1.js +1 -0
  62. package/dist/designer/assets/SvListBox-BDS66lmZ.js +110 -0
  63. package/dist/designer/assets/SvMenuList-DJ47ba1h.css +1 -0
  64. package/dist/designer/assets/SvMenuList-Dgq2D5VN.js +1 -0
  65. package/dist/designer/assets/SvTabs-DKmwb5p1.css +1 -0
  66. package/dist/designer/assets/SvTabs-UFCMTHXS.js +1 -0
  67. package/dist/designer/assets/chart-cIPUsbM5.js +1 -0
  68. package/dist/designer/assets/chart-export-B6bkQ3X8.js +11 -0
  69. package/dist/designer/assets/chart-export-pdf-BbA28-gt.js +11 -0
  70. package/dist/designer/assets/chart-panel-messages-DtTxpBUU.js +1 -0
  71. package/dist/designer/assets/chart-summary-Czu_5epb.js +1 -0
  72. package/dist/designer/assets/chart-trend-D5I5VEe8.js +1 -0
  73. package/dist/designer/assets/chart-validate-BMqM-qkF.js +1 -0
  74. package/dist/designer/assets/column-resize-BYDzR1Ve.js +1 -0
  75. package/dist/designer/assets/date-format-B8JbEtIG.js +1 -0
  76. package/dist/designer/assets/date-format-DKS-z0xS.css +1 -0
  77. package/dist/designer/assets/editor-contract-Bpoa7A5g.js +1 -0
  78. package/dist/designer/assets/focus-trap-CAreAhlU.js +1 -0
  79. package/dist/designer/assets/index-CMFgAoVV.css +1 -0
  80. package/dist/designer/assets/{index-C_a9Cj8Y.js → index-DwU7CAMm.js} +291 -290
  81. package/dist/designer/assets/list-option-BP_dWS66.js +1 -0
  82. package/dist/designer/assets/row-resize-DLktcqUK.js +1 -0
  83. package/dist/designer/assets/src-CITpcm6b.js +1 -0
  84. package/dist/designer/assets/src-EdI3Xqds.js +58 -0
  85. package/dist/designer/index.html +23 -14
  86. package/dist/export-pdf.d.ts +89 -0
  87. package/dist/export-pdf.js +130 -0
  88. package/dist/export.js +17 -10
  89. package/dist/index.d.ts +64 -1
  90. package/dist/index.js +68 -1
  91. package/dist/install.js +5 -0
  92. package/dist/node/studio.js +64 -2
  93. package/dist/pivot-chart.d.ts +25 -1
  94. package/dist/pivot-chart.js +25 -69
  95. package/dist/sheet/address.d.ts +43 -0
  96. package/dist/sheet/address.js +81 -0
  97. package/dist/sheet/ast.d.ts +94 -0
  98. package/dist/sheet/ast.js +56 -0
  99. package/dist/sheet/auto-filter.d.ts +66 -0
  100. package/dist/sheet/auto-filter.js +147 -0
  101. package/dist/sheet/autocomplete.d.ts +42 -0
  102. package/dist/sheet/autocomplete.js +162 -0
  103. package/dist/sheet/coerce.d.ts +31 -0
  104. package/dist/sheet/coerce.js +122 -0
  105. package/dist/sheet/commands.d.ts +89 -0
  106. package/dist/sheet/commands.js +230 -0
  107. package/dist/sheet/comments.d.ts +29 -0
  108. package/dist/sheet/comments.js +73 -0
  109. package/dist/sheet/conditional-formats.d.ts +144 -0
  110. package/dist/sheet/conditional-formats.js +316 -0
  111. package/dist/sheet/deps.d.ts +60 -0
  112. package/dist/sheet/deps.js +199 -0
  113. package/dist/sheet/document.d.ts +150 -0
  114. package/dist/sheet/document.js +264 -0
  115. package/dist/sheet/edit-keys.d.ts +14 -0
  116. package/dist/sheet/edit-keys.js +40 -0
  117. package/dist/sheet/entry.d.ts +31 -0
  118. package/dist/sheet/entry.js +76 -0
  119. package/dist/sheet/evaluate.d.ts +61 -0
  120. package/dist/sheet/evaluate.js +337 -0
  121. package/dist/sheet/find-replace.d.ts +62 -0
  122. package/dist/sheet/find-replace.js +152 -0
  123. package/dist/sheet/format-store.d.ts +99 -0
  124. package/dist/sheet/format-store.js +233 -0
  125. package/dist/sheet/freeze.d.ts +54 -0
  126. package/dist/sheet/freeze.js +58 -0
  127. package/dist/sheet/function-catalog.d.ts +10 -0
  128. package/dist/sheet/function-catalog.js +94 -0
  129. package/dist/sheet/functions.d.ts +28 -0
  130. package/dist/sheet/functions.js +362 -0
  131. package/dist/sheet/goal-seek.d.ts +73 -0
  132. package/dist/sheet/goal-seek.js +153 -0
  133. package/dist/sheet/index.d.ts +53 -0
  134. package/dist/sheet/index.js +53 -0
  135. package/dist/sheet/merges.d.ts +71 -0
  136. package/dist/sheet/merges.js +137 -0
  137. package/dist/sheet/names.d.ts +31 -0
  138. package/dist/sheet/names.js +87 -0
  139. package/dist/sheet/navigate.d.ts +52 -0
  140. package/dist/sheet/navigate.js +135 -0
  141. package/dist/sheet/number-format.d.ts +63 -0
  142. package/dist/sheet/number-format.js +508 -0
  143. package/dist/sheet/palette.d.ts +19 -0
  144. package/dist/sheet/palette.js +84 -0
  145. package/dist/sheet/parse.d.ts +13 -0
  146. package/dist/sheet/parse.js +108 -0
  147. package/dist/sheet/paste-special.d.ts +164 -0
  148. package/dist/sheet/paste-special.js +592 -0
  149. package/dist/sheet/protection.d.ts +21 -0
  150. package/dist/sheet/protection.js +48 -0
  151. package/dist/sheet/rects.d.ts +45 -0
  152. package/dist/sheet/rects.js +112 -0
  153. package/dist/sheet/refs.d.ts +82 -0
  154. package/dist/sheet/refs.js +266 -0
  155. package/dist/sheet/ribbon-icons.d.ts +31 -0
  156. package/dist/sheet/ribbon-icons.js +350 -0
  157. package/dist/sheet/ribbon.d.ts +173 -0
  158. package/dist/sheet/ribbon.js +753 -0
  159. package/dist/sheet/shortcuts.d.ts +164 -0
  160. package/dist/sheet/shortcuts.js +623 -0
  161. package/dist/sheet/structure.d.ts +87 -0
  162. package/dist/sheet/structure.js +166 -0
  163. package/dist/sheet/tables.d.ts +70 -0
  164. package/dist/sheet/tables.js +147 -0
  165. package/dist/sheet/tokenize.d.ts +54 -0
  166. package/dist/sheet/tokenize.js +304 -0
  167. package/dist/sheet/transforms.d.ts +76 -0
  168. package/dist/sheet/transforms.js +154 -0
  169. package/dist/sheet/validation.d.ts +92 -0
  170. package/dist/sheet/validation.js +241 -0
  171. package/dist/sheet/workbook.d.ts +72 -0
  172. package/dist/sheet/workbook.js +409 -0
  173. package/dist/sheet-enable.d.ts +6 -0
  174. package/dist/sheet-enable.js +46 -0
  175. package/dist/studio/ui-components.generated.js +63 -1
  176. package/dist/version.d.ts +1 -1
  177. package/dist/version.js +1 -1
  178. package/package.json +9 -4
  179. package/dist/designer/assets/GridMenus-B1JtIN21.js +0 -8
  180. package/dist/designer/assets/SvDateRangeInput-CjO7nn_x.js +0 -1
  181. package/dist/designer/assets/SvDateTimePicker-ByBD_ov6.js +0 -1
  182. package/dist/designer/assets/SvField-YDLipR6O.css +0 -1
  183. package/dist/designer/assets/SvField-cj1PFNgZ.js +0 -1
  184. package/dist/designer/assets/SvGridCellEditor-0W1L2hJ1.js +0 -2
  185. package/dist/designer/assets/SvGridChart-DBOR4xcz.js +0 -2
  186. package/dist/designer/assets/SvGridChart-fkMWeh1J.css +0 -1
  187. package/dist/designer/assets/SvGridChartPanel-symrhNnR.js +0 -11
  188. package/dist/designer/assets/SvGridChartView-BmRxq6mU.js +0 -1
  189. package/dist/designer/assets/SvListBox-1oUF6Iav.js +0 -110
  190. package/dist/designer/assets/chart-DXFganU8.js +0 -1
  191. package/dist/designer/assets/column-resize-C_inr5zT.js +0 -1
  192. package/dist/designer/assets/date-format-DGagAqRc.css +0 -1
  193. package/dist/designer/assets/date-format-onlYDsrY.js +0 -1
  194. package/dist/designer/assets/easing-zaypKrr0.js +0 -3
  195. package/dist/designer/assets/index-k2stW6L8.css +0 -1
  196. package/dist/designer/assets/row-resize-B0FWHcNr.js +0 -1
  197. package/dist/designer/assets/src-D9p27OGC.js +0 -58
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Precedence-climbing parser over the token stream.
3
+ *
4
+ * One structural choice worth naming: a whole-column reference like `A:A`
5
+ * lexes as a range whose `to.row` is null, and the evaluator fills that in
6
+ * from the sheet's last used row. Resolving it here instead would bake the
7
+ * row count into the AST, and the AST is cached across edits that change it.
8
+ */
9
+ import { PRECEDENCE, FormulaError, } from './ast.js';
10
+ import { tokenize } from './tokenize.js';
11
+ export function parse(tokens) {
12
+ let pos = 0;
13
+ const peek = () => tokens[pos];
14
+ const next = () => tokens[pos++];
15
+ function expression(minPrec) {
16
+ let left = postfix(primary());
17
+ for (;;) {
18
+ const t = peek();
19
+ if (!t || t.t !== 'op')
20
+ break;
21
+ const prec = PRECEDENCE[t.v];
22
+ if (prec === undefined || prec < minPrec)
23
+ break;
24
+ next();
25
+ // Left-associative for everything except `^`, which Excel binds right.
26
+ const nextMin = t.v === '^' ? prec : prec + 1;
27
+ left = { k: 'binary', op: t.v, left, right: expression(nextMin) };
28
+ }
29
+ return left;
30
+ }
31
+ /** Excel's `%` is POSTFIX and divides by a hundred: `50%` is 0.5 and
32
+ * `A1*5%` is five percent of A1. There is no binary modulo operator in
33
+ * Excel at all; `MOD()` is the function. */
34
+ function postfix(node) {
35
+ let out = node;
36
+ while (peek()?.t === 'op' && peek().v === '%') {
37
+ next();
38
+ out = { k: 'unary', op: '%', arg: out };
39
+ }
40
+ return out;
41
+ }
42
+ function primary() {
43
+ const t = next();
44
+ if (!t)
45
+ throw new FormulaError('#PARSE!');
46
+ switch (t.t) {
47
+ case 'num': return { k: 'num', v: t.v };
48
+ case 'str': return { k: 'str', v: t.v };
49
+ case 'bool': return { k: 'bool', v: t.v };
50
+ case 'ref': return { k: 'ref', ref: t.ref };
51
+ case 'range': return { k: 'range', from: t.from, to: t.to };
52
+ case 'name': return { k: 'name', name: t.v };
53
+ case 'table':
54
+ return t.columnTo === undefined
55
+ ? { k: 'table', table: t.table, column: t.column, specifier: t.specifier }
56
+ : {
57
+ k: 'table', table: t.table, column: t.column,
58
+ columnTo: t.columnTo, specifier: t.specifier,
59
+ };
60
+ case 'lparen': {
61
+ const inner = expression(1);
62
+ const close = next();
63
+ if (!close || close.t !== 'rparen')
64
+ throw new FormulaError('#PARSE!');
65
+ return inner;
66
+ }
67
+ case 'fn': {
68
+ const open = next();
69
+ if (!open || open.t !== 'lparen')
70
+ throw new FormulaError('#PARSE!');
71
+ const args = [];
72
+ if (peek()?.t !== 'rparen') {
73
+ args.push(expression(1));
74
+ while (peek()?.t === 'comma') {
75
+ next();
76
+ args.push(expression(1));
77
+ }
78
+ }
79
+ const close = next();
80
+ if (!close || close.t !== 'rparen')
81
+ throw new FormulaError('#PARSE!');
82
+ return { k: 'fn', name: t.v, args };
83
+ }
84
+ case 'op': {
85
+ // Unary. Binds tighter than every binary operator except `^`, so
86
+ // `-2^2` is -(2^2) as in Excel, and `-A1*2` is (-A1)*2.
87
+ if (t.v === '-')
88
+ return { k: 'unary', op: '-', arg: expression(5) };
89
+ if (t.v === '+')
90
+ return { k: 'unary', op: '+', arg: expression(5) };
91
+ throw new FormulaError('#PARSE!');
92
+ }
93
+ default:
94
+ throw new FormulaError('#PARSE!');
95
+ }
96
+ }
97
+ const node = expression(1);
98
+ if (pos < tokens.length)
99
+ throw new FormulaError('#PARSE!');
100
+ return node;
101
+ }
102
+ /** Tokenize and parse one formula. Accepts the leading `=` or not. */
103
+ export function parseFormula(src) {
104
+ const body = src.startsWith('=') ? src.slice(1) : src;
105
+ if (body.trim() === '')
106
+ throw new FormulaError('#PARSE!');
107
+ return parse(tokenize(body));
108
+ }
@@ -0,0 +1,164 @@
1
+ import { type CellFormatEntry } from './format-store.js';
2
+ export type PasteWhat = 'all' | 'values' | 'formulas' | 'formats';
3
+ export type PasteOperation = 'none' | 'add' | 'subtract' | 'multiply' | 'divide';
4
+ export type PasteSpecialOptions = {
5
+ what?: PasteWhat;
6
+ operation?: PasteOperation;
7
+ transpose?: boolean;
8
+ /** Leave the destination untouched where the source cell is empty. */
9
+ skipBlanks?: boolean;
10
+ };
11
+ /** One cell on its way through the clipboard. */
12
+ export type ClipboardCell = {
13
+ /** What the cell displays. Always present; this is the TSV half. */
14
+ text: string;
15
+ /** The number behind a formatted display, when there is one: written as
16
+ * `x:num` so a spreadsheet takes the number rather than re-parsing the
17
+ * text. A parsed cell carries the number in `text` instead. */
18
+ value?: string;
19
+ /** The formula source, when the cell holds one. */
20
+ formula?: string;
21
+ format?: CellFormatEntry;
22
+ };
23
+ export type ClipboardGrid = ClipboardCell[][];
24
+ /**
25
+ * A number format the way Excel writes it in `mso-number-format`: quoted,
26
+ * every literal escaped with a backslash and a double quote as `\0022`.
27
+ * Excel reads the property back from inline styles, which is how a paste
28
+ * into it keeps `#,##0.00` rather than guessing a format from the text.
29
+ */
30
+ export declare function msoNumberFormat(code: string): string;
31
+ /**
32
+ * Serialise a grid to the two clipboard flavours.
33
+ *
34
+ * The marker class is how `parseClipboardHtml` knows a paste came from a grid
35
+ * and can trust the `data-formula` attributes; HTML from anywhere else is
36
+ * read for text and styles only.
37
+ */
38
+ export declare function buildClipboardPayload(grid: ClipboardGrid,
39
+ /** Where the copy came from, so a pasted formula knows how far it moved.
40
+ * Omit for a synthetic payload; references then paste unshifted. */
41
+ origin?: {
42
+ row: number;
43
+ col: number;
44
+ }): {
45
+ text: string;
46
+ html: string;
47
+ };
48
+ /** Whether a formula is written in R1C1, as Google Sheets writes them. */
49
+ export declare function isR1C1(formula: string): boolean;
50
+ /**
51
+ * An R1C1 formula as A1, for the cell it lands in. `R[-1]C` is the cell
52
+ * above wherever the formula sits, `R2C3` is $C$2 anywhere, and a bare
53
+ * `RC` is the cell itself. Quoted strings and sheet names pass through.
54
+ */
55
+ export declare function r1c1ToA1(formula: string, row: number, col: number): string;
56
+ /** Parse a TSV clipboard into a grid of text-only cells. */
57
+ export declare function parseClipboardText(text: string): ClipboardGrid;
58
+ export declare function numFmtFromMso(value: string): string | undefined;
59
+ /**
60
+ * Parse clipboard HTML into a grid.
61
+ *
62
+ * Uses DOMParser rather than a regex: clipboard HTML from Excel is full of
63
+ * conditional comments, namespaced tags and unclosed elements, and a parser
64
+ * that already handles all of that ships in the browser.
65
+ *
66
+ * Returns null when the HTML holds no table, so the caller falls back to TSV.
67
+ */
68
+ export declare function readClipboardOrigin(html: string): {
69
+ row: number;
70
+ col: number;
71
+ } | null;
72
+ export declare function parseClipboardHtml(html: string): ClipboardGrid | null;
73
+ /** Read whichever flavour is richer. */
74
+ export declare function parseClipboard(payload: {
75
+ text?: string;
76
+ html?: string;
77
+ }): ClipboardGrid;
78
+ /** What one destination cell should become. */
79
+ export type PasteResolution = {
80
+ kind: 'skip';
81
+ } | {
82
+ kind: 'value';
83
+ value: string;
84
+ } | {
85
+ kind: 'format';
86
+ format: CellFormatEntry | undefined;
87
+ } | {
88
+ kind: 'both';
89
+ value: string;
90
+ format: CellFormatEntry | undefined;
91
+ };
92
+ /**
93
+ * Decide what lands in one cell. Pure, so the whole option matrix is testable
94
+ * without a clipboard or a grid.
95
+ *
96
+ * `offset` is how far the destination sits from where the source was copied,
97
+ * which is what lets a pasted formula shift its relative references. `at`
98
+ * is the destination itself, which an R1C1 formula (Google Sheets writes
99
+ * them so) needs to become A1; it then needs no offset, being relative to
100
+ * wherever it lands.
101
+ */
102
+ export declare function resolvePasteCell(source: ClipboardCell | undefined, existing: unknown, opts: PasteSpecialOptions, offset?: {
103
+ rows: number;
104
+ cols: number;
105
+ }, at?: {
106
+ row: number;
107
+ col: number;
108
+ }): PasteResolution;
109
+ /**
110
+ * A block from another application says nothing about where it was copied
111
+ * from, and Excel's formulas come in A1 as written: `=B2*C2` beside a
112
+ * price and a quantity. Pasted anywhere but A1 with no shift, that formula
113
+ * reads the wrong cells. What CAN be known is whether the block is
114
+ * self-contained: with the block read as if copied from A1, a formula whose
115
+ * every reference falls inside the block (a totals column, a running sum,
116
+ * the blocks people copy) is kept and moves with the paste from that A1;
117
+ * one that reaches outside is pasted as its value, which is right wherever
118
+ * the block lands. R1C1 formulas (Google Sheets) are left alone: they are
119
+ * resolved against the cell they land in.
120
+ */
121
+ export declare function anchorForeignFormulas(grid: ClipboardGrid): {
122
+ grid: ClipboardGrid;
123
+ origin: {
124
+ row: number;
125
+ col: number;
126
+ } | null;
127
+ };
128
+ /**
129
+ * Where each source cell lands.
130
+ *
131
+ * The reference offset is the same for every cell, not per-cell: source and
132
+ * destination both advance together as the grid is walked, so the shift is
133
+ * just `destination - origin`. Computing it per cell is how you end up
134
+ * translating by the destination's absolute position, which is wrong
135
+ * everywhere except the top-left corner.
136
+ *
137
+ * With no `origin` the offset is zero. That is right rather than lazy: a
138
+ * formula pasted in from another application has no position in this sheet to
139
+ * have moved from.
140
+ *
141
+ * `fill` is the selection's size. A block that fits it a whole number of
142
+ * times is repeated over it, as Excel repeats a copied cell across a
143
+ * selected range (or two copied rows over six selected ones); each repeat
144
+ * gets its own offset, so a repeated formula points where a hand-copied one
145
+ * would. Otherwise the block lands at the destination and keeps its shape.
146
+ */
147
+ export declare function planPaste(grid: ClipboardGrid, destination: {
148
+ row: number;
149
+ col: number;
150
+ }, opts?: PasteSpecialOptions, origin?: {
151
+ row: number;
152
+ col: number;
153
+ } | null, fill?: {
154
+ rows: number;
155
+ cols: number;
156
+ }): Array<{
157
+ row: number;
158
+ col: number;
159
+ source: ClipboardCell;
160
+ offset: {
161
+ rows: number;
162
+ cols: number;
163
+ };
164
+ }>;