@xlcalc/vue 0.21.2 → 0.23.1

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 (104) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +7 -2
  3. package/dist/components/CfDialogs.vue.d.ts +3 -0
  4. package/dist/components/CfManager.vue.d.ts +3 -0
  5. package/dist/components/CfPreview.vue.d.ts +9 -0
  6. package/dist/components/CfQuickDialog.vue.d.ts +3 -0
  7. package/dist/components/CfRuleDialog.vue.d.ts +3 -0
  8. package/dist/components/CfStyleDialog.vue.d.ts +15 -0
  9. package/dist/components/CfValuesFields.vue.d.ts +9 -0
  10. package/dist/components/DialogShell.vue.d.ts +1 -1
  11. package/dist/components/FunctionList.vue.d.ts +2 -1
  12. package/dist/components/GoToDialog.vue.d.ts +3 -0
  13. package/dist/components/LinkDialog.vue.d.ts +3 -0
  14. package/dist/components/NameBox.vue.d.ts +3 -0
  15. package/dist/components/NameDialogs.vue.d.ts +3 -0
  16. package/dist/components/NoteBox.vue.d.ts +3 -0
  17. package/dist/components/SheetToolbar.vue.d.ts +7 -4
  18. package/dist/components/SheetView.vue.d.ts +11 -4
  19. package/dist/components/SpellingDialog.vue.d.ts +3 -0
  20. package/dist/components/SymbolDialog.vue.d.ts +3 -0
  21. package/dist/components/TableDialog.vue.d.ts +3 -0
  22. package/dist/components/ToolbarBox.vue.d.ts +31 -0
  23. package/dist/components/TraceArrows.vue.d.ts +3 -0
  24. package/dist/components/ValidationDialog.vue.d.ts +3 -0
  25. package/dist/components/WatchWindow.vue.d.ts +3 -0
  26. package/dist/components/ZoomBar.vue.d.ts +3 -0
  27. package/dist/components/ZoomDialog.vue.d.ts +3 -0
  28. package/dist/components/icons.d.ts +1 -0
  29. package/dist/components/name-icons.d.ts +1 -0
  30. package/dist/components/toolbar-icons.d.ts +16 -0
  31. package/dist/contract/conditional.d.ts +16 -0
  32. package/dist/contract/memory.d.ts +5 -0
  33. package/dist/contract/messages.d.ts +260 -1
  34. package/dist/contract/source.d.ts +41 -0
  35. package/dist/contract/view.d.ts +117 -2
  36. package/dist/contract/workbook.d.ts +73 -0
  37. package/dist/contract.d.ts +4 -2
  38. package/dist/core/autocomplete.d.ts +9 -1
  39. package/dist/core/autosum.d.ts +11 -0
  40. package/dist/core/cell-style.d.ts +5 -0
  41. package/dist/core/cell-view.d.ts +2 -0
  42. package/dist/core/cf-commands.d.ts +70 -0
  43. package/dist/core/cf-describe.d.ts +4 -0
  44. package/dist/core/cf-draft.d.ts +114 -0
  45. package/dist/core/cf-formula.d.ts +30 -0
  46. package/dist/core/cf-presets.d.ts +33 -0
  47. package/dist/core/cf-ranges.d.ts +22 -0
  48. package/dist/core/commands.d.ts +4 -2
  49. package/dist/core/editing.d.ts +6 -1
  50. package/dist/core/extras.d.ts +22 -0
  51. package/dist/core/fill.d.ts +3 -0
  52. package/dist/core/formula-view.d.ts +10 -0
  53. package/dist/core/geometry.d.ts +6 -0
  54. package/dist/core/goto.d.ts +24 -0
  55. package/dist/core/links.d.ts +105 -0
  56. package/dist/core/menu.d.ts +8 -0
  57. package/dist/core/name-dialogs.d.ts +63 -0
  58. package/dist/core/names.d.ts +33 -0
  59. package/dist/core/navigation.d.ts +6 -0
  60. package/dist/core/notes.d.ts +44 -0
  61. package/dist/core/place.d.ts +10 -0
  62. package/dist/core/range-read.d.ts +11 -0
  63. package/dist/core/sheet.d.ts +337 -4
  64. package/dist/core/spell-check.d.ts +54 -0
  65. package/dist/core/state.d.ts +9 -0
  66. package/dist/core/tables.d.ts +63 -0
  67. package/dist/core/trace.d.ts +26 -0
  68. package/dist/core/validation-dialog.d.ts +33 -0
  69. package/dist/core/validation.d.ts +17 -3
  70. package/dist/core/viewport.d.ts +12 -0
  71. package/dist/core/watch.d.ts +35 -0
  72. package/dist/core/windows.d.ts +2 -0
  73. package/dist/core/zoom.d.ts +44 -0
  74. package/dist/format-cells.d.ts +0 -6
  75. package/dist/formula-shift.d.ts +3 -0
  76. package/dist/index.js +12033 -4565
  77. package/dist/local/types.d.ts +4 -1
  78. package/dist/local/workbook.d.ts +25 -0
  79. package/dist/local.js +556 -277
  80. package/dist/memory-workbook.d.ts +21 -0
  81. package/dist/messages-conditional.d.ts +3 -0
  82. package/dist/rect.d.ts +2 -0
  83. package/dist/{ru-RU-BVeg6JGM.js → ru-RU-CzebvM-s.js} +19 -2
  84. package/dist/spelling.d.ts +6 -0
  85. package/dist/style.css +1 -1
  86. package/dist/symbols.d.ts +23 -0
  87. package/dist/toolbar.d.ts +53 -1
  88. package/dist/{typed-entry-2l9Ay-hV.js → typed-entry-3r1pEbc9.js} +4546 -4453
  89. package/dist/validation-rules.d.ts +95 -0
  90. package/docs/api.md +91 -10
  91. package/docs/autocomplete.md +3 -3
  92. package/docs/checks.md +1 -1
  93. package/docs/clipboard.md +1 -1
  94. package/docs/conditional-formatting.md +135 -0
  95. package/docs/editing.md +50 -1
  96. package/docs/go-to-and-symbol.md +37 -0
  97. package/docs/links-notes.md +36 -0
  98. package/docs/local.md +1 -1
  99. package/docs/names.md +62 -0
  100. package/docs/tables.md +40 -0
  101. package/docs/toolbar.md +6 -2
  102. package/docs/validation.md +47 -0
  103. package/docs/view.md +104 -1
  104. package/package.json +2 -2
@@ -20,6 +20,11 @@ export declare function createState(props: SheetViewProps): {
20
20
  active: import("vue").Ref<number, number>;
21
21
  sheet: import("vue").ComputedRef<SheetInfo | null>;
22
22
  sheetName: import("vue").ComputedRef<string>;
23
+ defaultFont: import("vue").ComputedRef<{
24
+ name: string;
25
+ size: number;
26
+ } | null>;
27
+ defaultFontStyle: import("vue").ComputedRef<Record<string, string> | null>;
23
28
  grown: import("vue").Ref<{
24
29
  rows: number;
25
30
  cols: number;
@@ -64,6 +69,7 @@ export declare function createState(props: SheetViewProps): {
64
69
  failureOf: (error: unknown) => SheetFailure;
65
70
  loading: import("vue").Ref<boolean, boolean>;
66
71
  scroller: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
72
+ zoom: import("vue").Ref<number, number>;
67
73
  scrollTop: import("vue").Ref<number, number>;
68
74
  scrollLeft: import("vue").Ref<number, number>;
69
75
  viewH: import("vue").Ref<number, number>;
@@ -72,6 +78,7 @@ export declare function createState(props: SheetViewProps): {
72
78
  userWidths: import("vue").ShallowRef<Record<number, number>, Record<number, number>>;
73
79
  heights: import("vue").ShallowRef<Map<number, number>, Map<number, number>>;
74
80
  defaultRowPx: import("vue").Ref<number, number>;
81
+ formulaView: import("vue").Ref<boolean, boolean>;
75
82
  selected: import("vue").Ref<{
76
83
  row: number;
77
84
  col: number;
@@ -96,6 +103,8 @@ export declare function createState(props: SheetViewProps): {
96
103
  hooks: {
97
104
  unfilter: (_row: number) => void;
98
105
  changing: () => void;
106
+ stepped: () => void;
107
+ changed: () => void;
99
108
  };
100
109
  focusGrid: () => void;
101
110
  scrollGridTo: (top: number, left: number) => void;
@@ -0,0 +1,63 @@
1
+ import type { CellPosition, CellRect } from 'xlcalc/contract';
2
+ import type { EditOutcome } from '../contract/source.js';
3
+ import type { Commands } from './commands.js';
4
+ import type { Selection } from './selection.js';
5
+ import { type SheetState } from './state.js';
6
+ import type { Windows } from './windows.js';
7
+ /** The Create Table dialog: the range as typed (`=$A$1:$C$5`), My table has headers, and the reason the range was refused; or Convert to Range's question. */
8
+ export type TableDialog = {
9
+ kind: 'create';
10
+ sheet: string;
11
+ draft: string;
12
+ headers: boolean;
13
+ error: string;
14
+ } | {
15
+ kind: 'convert';
16
+ sheet: string;
17
+ table: string;
18
+ };
19
+ /** A range as Excel's Create Table box writes it: absolute, after `=` (`=$A$1:$C$5`). */
20
+ export declare const absoluteRange: (r: CellRect) => string;
21
+ /**
22
+ * Excel's current region around a cell (`Range.CurrentRegion`): the range grown, a row or column at a time, while the row or
23
+ * column just outside it, corners included, has a non-empty cell. `filled` answers within `area`; cells outside it count as empty.
24
+ */
25
+ export declare function currentRegion(at: CellPosition, area: CellRect, filled: (row: number, col: number) => boolean): CellRect;
26
+ /**
27
+ * Column names from the header cells' text, as Excel names them: an empty header `Column1` (the first number no other column
28
+ * uses), a name another column to the left already has with the next free number (`Qty`, `Qty2`), compared case-insensitively.
29
+ */
30
+ export declare function columnNames(headers: string[], prefix: string): string[];
31
+ export declare function useTables(s: SheetState, w: Windows, sel: Selection, cmd: Commands): {
32
+ available: import("vue").ComputedRef<boolean>;
33
+ canInsertHeader: import("vue").ComputedRef<boolean>;
34
+ activeTable: import("vue").ComputedRef<import("./windows.js").SheetTable | null>;
35
+ dialog: import("vue").Ref<{
36
+ kind: "create";
37
+ sheet: string;
38
+ draft: string;
39
+ headers: boolean;
40
+ error: string;
41
+ } | {
42
+ kind: "convert";
43
+ sheet: string;
44
+ table: string;
45
+ } | null, TableDialog | {
46
+ kind: "create";
47
+ sheet: string;
48
+ draft: string;
49
+ headers: boolean;
50
+ error: string;
51
+ } | {
52
+ kind: "convert";
53
+ sheet: string;
54
+ table: string;
55
+ } | null>;
56
+ openCreate: () => Promise<boolean>;
57
+ create: () => Promise<EditOutcome | null>;
58
+ convert: () => Promise<EditOutcome | null>;
59
+ remove: () => Promise<EditOutcome | null>;
60
+ close: (yes?: boolean) => void;
61
+ key: (e: KeyboardEvent) => boolean;
62
+ };
63
+ export type Tables = ReturnType<typeof useTables>;
@@ -0,0 +1,26 @@
1
+ import type { CellPosition } from 'xlcalc/contract';
2
+ import { type SheetState } from './state.js';
3
+ import type { Viewport } from './viewport.js';
4
+ import type { Windows } from './windows.js';
5
+ /** An arrow from a cell to its dependent on the sheet, or to the worksheet icon for dependents on other sheets (`to` null). */
6
+ export interface TraceArrow {
7
+ from: CellPosition;
8
+ to: CellPosition | null;
9
+ }
10
+ /** An arrow as drawn, in the scroller's content coordinates: blue, red from a cell with an error, dashed to the worksheet icon; `frozen` when an end is in frozen panes. */
11
+ export interface DrawnArrow {
12
+ key: string;
13
+ x1: number;
14
+ y1: number;
15
+ x2: number;
16
+ y2: number;
17
+ kind: 'cell' | 'error' | 'sheet';
18
+ frozen: boolean;
19
+ }
20
+ export declare function useTrace(s: SheetState, v: Viewport, w: Windows, notify: (text: string) => void): {
21
+ available: import("vue").ComputedRef<boolean>;
22
+ drawn: import("vue").ComputedRef<DrawnArrow[]>;
23
+ traceDependents: () => Promise<boolean>;
24
+ removeArrows: () => boolean;
25
+ };
26
+ export type Trace = ReturnType<typeof useTrace>;
@@ -0,0 +1,33 @@
1
+ import type { CellPosition, CellRect, DataValidation, ScanOptions } from 'xlcalc/contract';
2
+ import { type RuleSettings, type RuleText, type ValidationDraft } from '../validation-rules.js';
3
+ import type { Selection } from './selection.js';
4
+ import { type SheetState } from './state.js';
5
+ import type { AlertAnswer, SheetAlert } from './validation.js';
6
+ import type { Windows } from './windows.js';
7
+ export interface ValidationDialogDeps {
8
+ /** How the workbook's formula text is parsed; null while its locale loads. */
9
+ scan: () => ScanOptions | null;
10
+ ask: (alert: SheetAlert) => Promise<AlertAnswer>;
11
+ notify: (text: string) => void;
12
+ /** The active cell's rule changed: its dropdown and input message are requested again. */
13
+ changed: () => void;
14
+ }
15
+ /** The open dialog: the selection and active cell it was opened for, the sheet's rules then, the rule shown, and its first inputs. */
16
+ export interface ValidationDialogState {
17
+ sheet: string;
18
+ sel: CellRect;
19
+ at: CellPosition;
20
+ rules: DataValidation[];
21
+ /** The rule whose settings the dialog opened with; null for Excel's defaults. */
22
+ shown: DataValidation | null;
23
+ draft: ValidationDraft;
24
+ text: RuleText;
25
+ }
26
+ export declare function useValidationDialog(s: SheetState, sel: Selection, w: Windows, deps: ValidationDialogDeps): {
27
+ state: import("vue").ShallowRef<ValidationDialogState | null, ValidationDialogState | null>;
28
+ available: () => boolean;
29
+ open: () => boolean;
30
+ close: () => void;
31
+ apply: (rule: RuleSettings | null, applyAll: boolean) => Promise<string | null>;
32
+ };
33
+ export type ValidationDialog = ReturnType<typeof useValidationDialog>;
@@ -74,8 +74,22 @@ export interface ParenthesisAlert {
74
74
  sheet: string;
75
75
  cell: string;
76
76
  }
77
- /** What the alert displays: a rule's rejection, the prompt for a formula, Excel's correction of one and what is missing, or the warning before a merge. */
78
- export type SheetAlert = SheetValidationAlert | FormulaAlert | TypoAlert | ParenthesisAlert | MergeAlert;
77
+ /** Excel's message with OK alone over a dialog, such as Go To's for a bad reference. */
78
+ export interface NoticeAlert {
79
+ severity: 'notice';
80
+ title?: undefined;
81
+ message: string;
82
+ }
83
+ /** Excel's questions before Data Validation opens: rules of more than one kind in the selection (OK erases them, Cancel), or cells without the rule (Yes extends it, No starts afresh, Cancel). */
84
+ export interface RulesAlert {
85
+ severity: 'rulesMany' | 'rulesExtend';
86
+ title?: undefined;
87
+ message: string;
88
+ sheet: string;
89
+ cell: string;
90
+ }
91
+ /** What the alert displays: a rule's rejection, the prompt for a formula, Excel's correction of one and what is missing, the warning before a merge, a dialog's message, or Data Validation's questions. */
92
+ export type SheetAlert = SheetValidationAlert | FormulaAlert | TypoAlert | ParenthesisAlert | MergeAlert | NoticeAlert | RulesAlert;
79
93
  /** What the user's answer to an alert does with the rejected edit: send it again with `accept`, reopen the editor with the text, or leave the cell unchanged. */
80
94
  export type AlertAnswer = 'accept' | 'retry' | 'cancel';
81
95
  export type AlertButton = 'retry' | 'cancel' | 'yes' | 'no' | 'ok' | 'fix' | 'revert';
@@ -84,7 +98,7 @@ export declare const ALERT_BUTTONS: Record<SheetAlert['severity'], {
84
98
  button: AlertButton;
85
99
  answer: AlertAnswer;
86
100
  }[]>;
87
- /** The button an alert opens with, which Enter presses: Retry, No (a warning keeps a value only on a click on Yes), OK; Yes for Excel's correction. */
101
+ /** The button an alert opens with, which Enter presses: Retry, No (a warning keeps a value only on a click on Yes), OK; Yes for Excel's correction and for extending a rule. */
88
102
  export declare const ALERT_DEFAULT: Record<SheetAlert['severity'], AlertButton>;
89
103
  /** The alert for a rejected value: shown until the user answers; one at a time, and a new one answers the old one with Cancel. */
90
104
  export declare function useValidationAlert(): {
@@ -14,10 +14,13 @@ interface ViewportInput {
14
14
  scrollLeft: Ref<number>;
15
15
  viewH: Ref<number>;
16
16
  viewW: Ref<number>;
17
+ zoom: Ref<number>;
17
18
  memory: Memory;
18
19
  }
19
20
  export declare function useViewport(i: ViewportInput, geo: Geometry): {
20
21
  showNums: ComputedRef<boolean>;
22
+ line: ComputedRef<number>;
23
+ lineOf: (px: number) => number;
21
24
  narrow: ComputedRef<boolean>;
22
25
  touch: ComputedRef<boolean>;
23
26
  numW: ComputedRef<number>;
@@ -78,6 +81,15 @@ export declare function useViewport(i: ViewportInput, geo: Geometry): {
78
81
  x: number;
79
82
  y: number;
80
83
  };
84
+ cellAtPoint: (clientX: number, clientY: number, box: {
85
+ left: number;
86
+ top: number;
87
+ }) => {
88
+ d: number;
89
+ col: number;
90
+ x: number;
91
+ y: number;
92
+ };
81
93
  };
82
94
  export type Viewport = ReturnType<typeof useViewport>;
83
95
  export {};
@@ -0,0 +1,35 @@
1
+ import type { SheetWatch } from '../contract/view.js';
2
+ import type { Navigation } from './navigation.js';
3
+ import type { Selection } from './selection.js';
4
+ import type { SheetState } from './state.js';
5
+ /** At most this many cells are watched; Add Watch over a larger selection adds its first cells. */
6
+ export declare const WATCH_MAX = 1000;
7
+ /** What a watched cell shows: its displayed value and its formula with `=`; null while it is read, or when its sheet is gone. */
8
+ export interface WatchShown {
9
+ value: string;
10
+ formula: string;
11
+ }
12
+ interface WatchDeps {
13
+ /** The host's list (`SheetView`'s `watches`). */
14
+ given: () => SheetWatch[] | undefined;
15
+ /** The user changed the list: the `watches` event. */
16
+ changed: (list: SheetWatch[]) => void;
17
+ notify: (text: string) => void;
18
+ }
19
+ export declare function useWatch(s: SheetState, sel: Selection, nav: Navigation, deps: WatchDeps): {
20
+ list: import("vue").ShallowRef<SheetWatch[], SheetWatch[]>;
21
+ open: import("vue").Ref<boolean, boolean>;
22
+ chosen: import("vue").ShallowRef<Set<number>, Set<number>>;
23
+ valueOf: (w: SheetWatch) => WatchShown | null;
24
+ add: () => void;
25
+ remove: () => void;
26
+ choose: (i: number, how?: {
27
+ add?: boolean;
28
+ range?: boolean;
29
+ }) => void;
30
+ go: (i: number) => Promise<void>;
31
+ setOpen: (on?: boolean) => boolean;
32
+ canAdd: import("vue").ComputedRef<boolean>;
33
+ };
34
+ export type Watch = ReturnType<typeof useWatch>;
35
+ export {};
@@ -75,6 +75,8 @@ export declare function useWindows(s: SheetState, v: Viewport, geo: Geometry): {
75
75
  style?: CellStyle;
76
76
  numberFormat?: string;
77
77
  } | null;
78
+ linkOfRow: (r: number, col: number) => CellData["link"];
79
+ noteOfRow: (r: number, col: number) => CellData["note"];
78
80
  merges: import("vue").ComputedRef<CellRect[]>;
79
81
  tables: import("vue").ComputedRef<SheetTable[]>;
80
82
  notice: import("vue").ComputedRef<string>;
@@ -0,0 +1,44 @@
1
+ import type { Selection } from './selection.js';
2
+ import type { SheetState } from './state.js';
3
+ import type { Viewport } from './viewport.js';
4
+ export declare const MIN_ZOOM = 10;
5
+ export declare const MAX_ZOOM = 400;
6
+ /** A notch of Ctrl+wheel zooms by 15%. */
7
+ export declare const WHEEL_STEP = 15;
8
+ /** The status bar's − and + go to the next multiple of 10%. */
9
+ export declare const BUTTON_STEP = 10;
10
+ /** A zoom in whole percent within Excel's limits. */
11
+ export declare const clampZoom: (pct: number) => number;
12
+ /** The status bar's − and +: the next multiple of 10% below or above. */
13
+ export declare const stepZoom: (pct: number, dir: 1 | -1) => number;
14
+ /** Excel's zoom slider: its left half covers 10% to 100%, its right half 100% to 400%, so 100% is at the middle (`pos` 0 to 100). */
15
+ export declare const zoomOfSlider: (pos: number) => number;
16
+ export declare const sliderOfZoom: (pct: number) => number;
17
+ interface ZoomDeps {
18
+ /** The host's zooms by sheet name (`SheetView`'s `zoom`). */
19
+ given: () => Record<string, number> | undefined;
20
+ /** The user changed a sheet's zoom: the `zoom` event. */
21
+ changed: (sheet: string, zoom: number) => void;
22
+ }
23
+ export declare function useZoom(s: SheetState, v: Viewport, sel: Selection, deps: ZoomDeps): {
24
+ percent: import("vue").ComputedRef<number>;
25
+ apply: (pct: number, focus?: {
26
+ x: number;
27
+ y: number;
28
+ }) => number;
29
+ choose: (pct: number) => number;
30
+ fitSelection: (user?: boolean) => number;
31
+ enter: () => void;
32
+ onWheel: (e: WheelEvent) => void;
33
+ onTouchStart: (e: TouchEvent) => void;
34
+ onTouchMove: (e: TouchEvent) => void;
35
+ onTouchEnd: (e: TouchEvent) => void;
36
+ onGesture: (e: Event & {
37
+ scale?: number;
38
+ clientX?: number;
39
+ clientY?: number;
40
+ }) => void;
41
+ dialogOpen: import("vue").Ref<boolean, boolean>;
42
+ };
43
+ export type Zoom = ReturnType<typeof useZoom>;
44
+ export {};
@@ -7,8 +7,6 @@ type Horizontal = NonNullable<AlignmentStyle['horizontal']>;
7
7
  type Vertical = NonNullable<AlignmentStyle['vertical']>;
8
8
  export declare const HORIZONTALS: readonly Horizontal[];
9
9
  export declare const VERTICALS: readonly Vertical[];
10
- /** Excel's indent applies with the left, right and distributed alignments. */
11
- export declare const INDENTED: ReadonlySet<string>;
12
10
  /** The line styles Excel's Border tab offers, in the order of its list. */
13
11
  export declare const LINE_STYLES: readonly BorderLine['style'][];
14
12
  type FontStyleKind = 'regular' | 'italic' | 'bold' | 'boldItalic';
@@ -16,10 +14,6 @@ type Underline = 'none' | NonNullable<FontStyle['underline']>;
16
14
  /** The font styles and underlines in the order of Excel's lists. */
17
15
  export declare const FONT_STYLES: readonly FontStyleKind[];
18
16
  export declare const UNDERLINES: readonly Underline[];
19
- /** Excel's font sizes in its list; any size from 1 to 409 may be typed. */
20
- export declare const FONT_SIZES: readonly number[];
21
- /** Fonts offered in the font input's list; any name may be typed. */
22
- export declare const FONT_NAMES: readonly string[];
23
17
  /** The dialog's inputs; text inputs hold what is typed until OK parses them. */
24
18
  export interface FormatDraft {
25
19
  /** The code the cells are displayed with: an item's from Excel's list, or a typed one (the box names its category). */
@@ -0,0 +1,3 @@
1
+ import type { ScanOptions } from 'xlcalc/contract';
2
+ /** `formula` (in the locale `opts` parses) with its relative references moved `rows` down and `cols` right; absolute parts, names and table references stay. */
3
+ export declare function shiftFormula(formula: string, rows: number, cols: number, opts: ScanOptions): string;