@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
@@ -0,0 +1,33 @@
1
+ import type { CellRect } from 'xlcalc/contract';
2
+ import type { CellUpdate, EditOutcome } from '../contract/source.js';
3
+ import type { SheetName } from '../contract/workbook.js';
4
+ import type { SheetState } from './state.js';
5
+ /** The range a name refers to: a plain reference to a range of one sheet. */
6
+ export interface NameRange {
7
+ sheet: string;
8
+ rect: CellRect;
9
+ }
10
+ export interface NamesDeps {
11
+ /** Reads the sheets and windows again, and the number of reloads started, to tell whether the source sent `reload` during a call. */
12
+ reload: () => Promise<void>;
13
+ reloads: () => number;
14
+ /** Cells whose values a change of names changed. */
15
+ apply: (changes: CellUpdate[]) => void;
16
+ }
17
+ /** A name's identity in the list: its scope and its name, case-insensitively, as Excel tells names apart. */
18
+ export declare const nameKey: (n: SheetName) => string;
19
+ export declare function useNames(s: SheetState, deps: NamesDeps): {
20
+ list: import("vue").ShallowRef<readonly SheetName[], readonly SheetName[]>;
21
+ available: import("vue").ComputedRef<boolean>;
22
+ editable: import("vue").ComputedRef<boolean>;
23
+ compare: (a: string, b: string) => number;
24
+ read: () => void;
25
+ rangeOf: (n: SheetName) => NameRange | null;
26
+ visibleOn: (sheet: string) => SheetName[];
27
+ find: (text: string, sheet: string) => SheetName | undefined;
28
+ formulaNames: import("vue").ComputedRef<string[]>;
29
+ boxNames: import("vue").ComputedRef<SheetName[]>;
30
+ nameOf: (rect: CellRect | null) => string | null;
31
+ save: (next: SheetName[]) => Promise<EditOutcome | null>;
32
+ };
33
+ export type Names = ReturnType<typeof useNames>;
@@ -1,5 +1,7 @@
1
1
  import type { CellRect, GridReference } from 'xlcalc/contract';
2
+ import type { SheetName } from '../contract/workbook.js';
2
3
  import type { Formula } from './formula.js';
4
+ import type { Names } from './names.js';
3
5
  import type { Selection } from './selection.js';
4
6
  import type { SheetState } from './state.js';
5
7
  /** A location to return to: sheet, selection and scroll. */
@@ -13,6 +15,8 @@ export interface Place {
13
15
  export interface NavigationDeps {
14
16
  pickSheet: (index: number) => Promise<void>;
15
17
  notify: (text: string) => void;
18
+ /** The workbook's defined names, which the Name Box goes to, lists, shows and defines. */
19
+ names: Names;
16
20
  }
17
21
  export declare function useNavigation(s: SheetState, sel: Selection, f: Formula, deps: NavigationDeps): {
18
22
  history: import("vue").Ref<{
@@ -63,6 +67,8 @@ export declare function useNavigation(s: SheetState, sel: Selection, f: Formula,
63
67
  goBack: () => Promise<void>;
64
68
  goPlace: (text: string) => Promise<boolean>;
65
69
  goRef: (r: GridReference) => Promise<void>;
70
+ goName: (name: SheetName) => Promise<boolean>;
71
+ boxText: import("vue").ComputedRef<string>;
66
72
  addressDraft: import("vue").Ref<string, string>;
67
73
  addressFocused: import("vue").Ref<boolean, boolean>;
68
74
  goAddress: () => Promise<boolean>;
@@ -0,0 +1,44 @@
1
+ import type { Extras } from './extras.js';
2
+ import type { MenuItem } from './menu.js';
3
+ import type { SheetState } from './state.js';
4
+ import type { Windows } from './windows.js';
5
+ /** The note being edited: its cell, its author (shown in bold above the text), its text and the text it opened with. */
6
+ export interface NoteDraft {
7
+ sheet: string;
8
+ row: number;
9
+ col: number;
10
+ author?: string;
11
+ text: string;
12
+ initial: string;
13
+ /** A new note (New Note): saved even unchanged, as Excel keeps a note once it is inserted, unless it has neither author nor text. */
14
+ fresh: boolean;
15
+ }
16
+ export interface NotesDeps {
17
+ /** The author's name for a new note: the sheet's `noteAuthor` prop. */
18
+ author: () => string | undefined;
19
+ }
20
+ export declare function useNotes(s: SheetState, w: Windows, extras: Extras, deps: NotesDeps): {
21
+ draft: import("vue").Ref<{
22
+ sheet: string;
23
+ row: number;
24
+ col: number;
25
+ author?: string | undefined;
26
+ text: string;
27
+ initial: string;
28
+ fresh: boolean;
29
+ } | null, NoteDraft | {
30
+ sheet: string;
31
+ row: number;
32
+ col: number;
33
+ author?: string | undefined;
34
+ text: string;
35
+ initial: string;
36
+ fresh: boolean;
37
+ } | null>;
38
+ available: import("vue").ComputedRef<boolean>;
39
+ open: () => boolean;
40
+ save: (refocus?: boolean) => Promise<void>;
41
+ remove: () => Promise<void>;
42
+ items: () => MenuItem[];
43
+ };
44
+ export type Notes = ReturnType<typeof useNotes>;
@@ -0,0 +1,10 @@
1
+ import type { CellRect } from 'xlcalc/contract';
2
+ /** A location from the Name Box, a hyperlink or `focus`: a range with its sheet (`B12`, `'Sheet 2'!C7:D9`, `B:B`) or a sheet alone; null for anything else (`B12+C1`). */
3
+ export declare function parsePlace(text: string): {
4
+ sheet?: string;
5
+ range?: CellRect;
6
+ } | null;
7
+ /** A range as Excel's Define Name writes the selection: absolute (`$B$2:$D$9`, `$B:$B`, `$2:$5`). */
8
+ export declare function absoluteRange(rect: CellRect): string;
9
+ /** A reference to a range of a sheet as a name's formula (without `=`): `'Sheet 2'!$B$2:$D$9`. */
10
+ export declare const rangeRef: (sheet: string, rect: CellRect) => string;
@@ -0,0 +1,11 @@
1
+ import type { CellRect, CellValue } from 'xlcalc/contract';
2
+ import type { SheetSource } from '../contract/source.js';
3
+ /** A cell as a window gives it: its displayed text, value, formula and edit text. */
4
+ export interface ReadCell {
5
+ text: string;
6
+ value: CellValue;
7
+ formula?: string;
8
+ editText?: string;
9
+ }
10
+ /** The cells of `r` by address (empty ones without text, value or formula left out); null when a window cannot be read or the workbook is still recalculating. */
11
+ export declare function readRange(source: SheetSource, sheet: string, r: CellRect, signal?: AbortSignal): Promise<Map<string, ReadCell> | null>;
@@ -1,6 +1,6 @@
1
1
  import type { CellStyle } from 'xlcalc/contract';
2
2
  import type { SheetInfo, SheetWindow } from '../contract/source.js';
3
- import type { ListSort, SheetLinkEvent, SheetViewApi, SheetViewProps, SheetViewState } from '../contract/view.js';
3
+ import type { ListSort, SheetLinkEvent, SheetViewApi, SheetViewProps, SheetViewState, SheetWatch, SheetZoomEvent } from '../contract/view.js';
4
4
  import { type EditorState } from './editing.js';
5
5
  export interface SheetEmit {
6
6
  (e: 'state', state: SheetViewState | null): void;
@@ -14,10 +14,14 @@ export interface SheetEmit {
14
14
  sheet: string;
15
15
  row: number;
16
16
  }): void;
17
+ (e: 'zoom', change: SheetZoomEvent): void;
18
+ (e: 'watches', list: SheetWatch[]): void;
17
19
  }
18
20
  export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLinks: () => boolean): {
19
21
  geo: {
20
22
  widthOf: (c: number) => number;
23
+ baseWidthOf: (c: number) => number;
24
+ widthScale: () => number;
21
25
  heightOf: (d: number) => number;
22
26
  offsets: import("vue").ComputedRef<Float64Array<ArrayBufferLike>>;
23
27
  setHeights: (rows: Iterable<readonly [number, number | undefined]>) => boolean;
@@ -33,6 +37,8 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
33
37
  };
34
38
  v: {
35
39
  showNums: import("vue").ComputedRef<boolean>;
40
+ line: import("vue").ComputedRef<number>;
41
+ lineOf: (px: number) => number;
36
42
  narrow: import("vue").ComputedRef<boolean>;
37
43
  touch: import("vue").ComputedRef<boolean>;
38
44
  numW: import("vue").ComputedRef<number>;
@@ -93,6 +99,15 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
93
99
  x: number;
94
100
  y: number;
95
101
  };
102
+ cellAtPoint: (clientX: number, clientY: number, box: {
103
+ left: number;
104
+ top: number;
105
+ }) => {
106
+ d: number;
107
+ col: number;
108
+ x: number;
109
+ y: number;
110
+ };
96
111
  };
97
112
  w: {
98
113
  slots: Record<import("./windows.js").SlotKind, import("vue").ShallowRef<import("./windows.js").Slot>>;
@@ -113,6 +128,8 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
113
128
  style?: CellStyle;
114
129
  numberFormat?: string;
115
130
  } | null;
131
+ linkOfRow: (r: number, col: number) => import("./windows.js").CellData["link"];
132
+ noteOfRow: (r: number, col: number) => import("./windows.js").CellData["note"];
116
133
  merges: import("vue").ComputedRef<import("xlcalc").CellRect[]>;
117
134
  tables: import("vue").ComputedRef<import("./windows.js").SheetTable[]>;
118
135
  notice: import("vue").ComputedRef<string>;
@@ -250,6 +267,8 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
250
267
  goBack: () => Promise<void>;
251
268
  goPlace: (text: string) => Promise<boolean>;
252
269
  goRef: (r: import("xlcalc").GridReference) => Promise<void>;
270
+ goName: (name: import("../index.js").SheetName) => Promise<boolean>;
271
+ boxText: import("vue").ComputedRef<string>;
253
272
  addressDraft: import("vue").Ref<string, string>;
254
273
  addressFocused: import("vue").Ref<boolean, boolean>;
255
274
  goAddress: () => Promise<boolean>;
@@ -268,12 +287,14 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
268
287
  place?: "cell" | "bar";
269
288
  caret?: number;
270
289
  caretEnd?: number;
290
+ focus?: boolean;
271
291
  }) => boolean;
272
292
  inputOf: () => HTMLTextAreaElement | null;
273
293
  focusEditor: () => void;
274
294
  insertFunction: (name: string) => void;
295
+ insertText: (piece: string) => boolean;
275
296
  ac: {
276
- items: import("vue").ShallowRef<readonly string[], readonly string[]>;
297
+ items: import("vue").ShallowRef<readonly import("./autocomplete.js").CompletionItem[], readonly import("./autocomplete.js").CompletionItem[]>;
277
298
  index: import("vue").Ref<number, number>;
278
299
  open: import("vue").ComputedRef<boolean>;
279
300
  update: (text: string, caret: number | null) => void;
@@ -436,6 +457,84 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
436
457
  close: () => void;
437
458
  refresh: () => void;
438
459
  };
460
+ trace: {
461
+ available: import("vue").ComputedRef<boolean>;
462
+ drawn: import("vue").ComputedRef<import("./trace.js").DrawnArrow[]>;
463
+ traceDependents: () => Promise<boolean>;
464
+ removeArrows: () => boolean;
465
+ };
466
+ tables: {
467
+ available: import("vue").ComputedRef<boolean>;
468
+ canInsertHeader: import("vue").ComputedRef<boolean>;
469
+ activeTable: import("vue").ComputedRef<import("./windows.js").SheetTable | null>;
470
+ dialog: import("vue").Ref<{
471
+ kind: "create";
472
+ sheet: string;
473
+ draft: string;
474
+ headers: boolean;
475
+ error: string;
476
+ } | {
477
+ kind: "convert";
478
+ sheet: string;
479
+ table: string;
480
+ } | null, import("./tables.js").TableDialog | {
481
+ kind: "create";
482
+ sheet: string;
483
+ draft: string;
484
+ headers: boolean;
485
+ error: string;
486
+ } | {
487
+ kind: "convert";
488
+ sheet: string;
489
+ table: string;
490
+ } | null>;
491
+ openCreate: () => Promise<boolean>;
492
+ create: () => Promise<import("../index.js").EditOutcome | null>;
493
+ convert: () => Promise<import("../index.js").EditOutcome | null>;
494
+ remove: () => Promise<import("../index.js").EditOutcome | null>;
495
+ close: (yes?: boolean) => void;
496
+ key: (e: KeyboardEvent) => boolean;
497
+ };
498
+ spell: {
499
+ available: import("vue").ComputedRef<boolean>;
500
+ canChange: import("vue").ComputedRef<boolean>;
501
+ canLearn: import("vue").ComputedRef<boolean>;
502
+ shown: import("vue").Ref<{
503
+ hit: {
504
+ cell: string;
505
+ word: string;
506
+ at: number;
507
+ suggestions: string[];
508
+ };
509
+ at: {
510
+ row: number;
511
+ col: number;
512
+ };
513
+ text: string;
514
+ editText?: string | undefined;
515
+ choice: number;
516
+ } | null, import("./spell-check.js").SpellingShown | {
517
+ hit: {
518
+ cell: string;
519
+ word: string;
520
+ at: number;
521
+ suggestions: string[];
522
+ };
523
+ at: {
524
+ row: number;
525
+ col: number;
526
+ };
527
+ text: string;
528
+ editText?: string | undefined;
529
+ choice: number;
530
+ } | null>;
531
+ done: import("vue").Ref<boolean, boolean>;
532
+ busy: import("vue").Ref<boolean, boolean>;
533
+ check: () => boolean;
534
+ act: (kind: "ignoreOnce" | "ignoreAll" | "add" | "change" | "changeAll") => Promise<void>;
535
+ close: () => void;
536
+ key: (e: KeyboardEvent) => boolean;
537
+ };
439
538
  views: {
440
539
  spanOf: (r: number, c: number) => import("./cell-view.js").MergeSpan | null | undefined;
441
540
  coveredByMerge: (r: number, c: number) => boolean;
@@ -452,18 +551,98 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
452
551
  totals: import("vue").ComputedRef<(string | null)[] | null>;
453
552
  };
454
553
  cmd: {
455
- can: (name: "outline" | "freeze" | "structure" | "layout" | "format") => boolean;
554
+ can: (name: "outline" | "freeze" | "table" | "structure" | "layout" | "format") => boolean;
456
555
  canRanges: import("vue").ComputedRef<boolean>;
457
556
  format: (patches: import("../index.js").SheetFormatPatch[]) => Promise<import("../index.js").EditOutcome | null>;
458
557
  structure: (op: import("../index.js").SheetOp, endsCopy?: boolean) => Promise<import("../index.js").EditOutcome | null>;
459
558
  layout: (edit: import("../index.js").LayoutChange) => Promise<import("../index.js").EditOutcome | null>;
460
559
  outline: (command: import("../index.js").OutlineChange) => Promise<import("../index.js").EditOutcome | null>;
560
+ table: (op: import("../index.js").TableOp) => Promise<import("../index.js").EditOutcome | null>;
461
561
  freeze: (mode?: import("../index.js").FreezeMode) => Promise<import("../index.js").EditOutcome | null>;
462
- fontKey: (e: KeyboardEvent) => boolean;
562
+ formatKey: (e: KeyboardEvent) => boolean;
463
563
  formatOpen: import("vue").Ref<boolean, boolean>;
464
564
  openFormat: () => boolean;
465
565
  closeFormat: () => void;
466
566
  };
567
+ extras: {
568
+ method: <K extends "note" | "clear" | "link">(name: K) => NonNullable<import("../index.js").SheetSource[K]> | null;
569
+ change: (call: () => Promise<import("../index.js").EditOutcome>, sheet: string, ranges: string[]) => Promise<import("../index.js").EditOutcome>;
570
+ locked: (rect: import("xlcalc").CellRect | null) => boolean;
571
+ clear: (what: import("../index.js").ClearKind) => Promise<import("../index.js").EditOutcome | null>;
572
+ };
573
+ links: {
574
+ draft: import("vue").Ref<{
575
+ sheet: string;
576
+ range: string;
577
+ cell: string;
578
+ old: {
579
+ href?: string | undefined;
580
+ location?: string | undefined;
581
+ tooltip?: string | undefined;
582
+ } | null;
583
+ tab: import("./links.js").LinkTab;
584
+ text: string | null;
585
+ shown: string;
586
+ textTyped: boolean;
587
+ address: string;
588
+ ref: string;
589
+ place: string;
590
+ tooltip: string;
591
+ error: string;
592
+ } | null, import("./links.js").LinkDraft | {
593
+ sheet: string;
594
+ range: string;
595
+ cell: string;
596
+ old: {
597
+ href?: string | undefined;
598
+ location?: string | undefined;
599
+ tooltip?: string | undefined;
600
+ } | null;
601
+ tab: import("./links.js").LinkTab;
602
+ text: string | null;
603
+ shown: string;
604
+ textTyped: boolean;
605
+ address: string;
606
+ ref: string;
607
+ place: string;
608
+ tooltip: string;
609
+ error: string;
610
+ } | null>;
611
+ available: import("vue").ComputedRef<boolean>;
612
+ places: import("vue").ComputedRef<import("./links.js").LinkPlaceGroup[]>;
613
+ refOn: import("vue").ComputedRef<boolean>;
614
+ follow: () => void;
615
+ open: () => boolean;
616
+ close: () => void;
617
+ apply: () => Promise<void>;
618
+ remove: (range?: string) => Promise<void>;
619
+ openLink: (link: NonNullable<SheetWindow["links"]>[string], row: number, col: number, viaClick?: boolean) => boolean;
620
+ items: () => import("./menu.js").MenuItem[];
621
+ };
622
+ notes: {
623
+ draft: import("vue").Ref<{
624
+ sheet: string;
625
+ row: number;
626
+ col: number;
627
+ author?: string | undefined;
628
+ text: string;
629
+ initial: string;
630
+ fresh: boolean;
631
+ } | null, import("./notes.js").NoteDraft | {
632
+ sheet: string;
633
+ row: number;
634
+ col: number;
635
+ author?: string | undefined;
636
+ text: string;
637
+ initial: string;
638
+ fresh: boolean;
639
+ } | null>;
640
+ available: import("vue").ComputedRef<boolean>;
641
+ open: () => boolean;
642
+ save: (refocus?: boolean) => Promise<void>;
643
+ remove: () => Promise<void>;
644
+ items: () => import("./menu.js").MenuItem[];
645
+ };
467
646
  api: SheetViewApi;
468
647
  clip: {
469
648
  mark: import("vue").ShallowRef<import("./clip.js").ClipMark | null, import("./clip.js").ClipMark | null>;
@@ -504,6 +683,14 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
504
683
  onUp: (e: PointerEvent) => void;
505
684
  onCancel: () => void;
506
685
  autofill: () => Promise<void>;
686
+ fillFrom: (direction: "down" | "right") => Promise<import("../index.js").EditOutcome | null>;
687
+ key: (e: KeyboardEvent) => boolean;
688
+ };
689
+ formulaView: {
690
+ read: () => void;
691
+ show: (on?: boolean) => boolean;
692
+ key: (e: KeyboardEvent) => boolean;
693
+ textOf: (data: import("./windows.js").CellData) => string;
507
694
  };
508
695
  viewState: import("vue").ComputedRef<SheetViewState | null>;
509
696
  validation: {
@@ -523,6 +710,13 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
523
710
  choose: (i?: number) => boolean;
524
711
  onKey: (e: KeyboardEvent) => boolean;
525
712
  };
713
+ rules: {
714
+ state: import("vue").ShallowRef<import("./validation-dialog.js").ValidationDialogState | null, import("./validation-dialog.js").ValidationDialogState | null>;
715
+ available: () => boolean;
716
+ open: () => boolean;
717
+ close: () => void;
718
+ apply: (rule: import("../validation-rules.js").RuleSettings | null, applyAll: boolean) => Promise<string | null>;
719
+ };
526
720
  alerts: {
527
721
  alert: import("vue").ShallowRef<import("./validation.js").SheetAlert | null, import("./validation.js").SheetAlert | null>;
528
722
  ask: (next: import("./validation.js").SheetAlert) => Promise<import("./validation.js").AlertAnswer>;
@@ -625,6 +819,137 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
625
819
  context: (e: MouseEvent) => boolean;
626
820
  };
627
821
  };
822
+ goto: {
823
+ open: import("vue").Ref<boolean, boolean>;
824
+ places: import("vue").Ref<string[], string[]>;
825
+ items: import("vue").ComputedRef<string[]>;
826
+ jump: (text: string) => Promise<boolean>;
827
+ openGoTo: () => boolean;
828
+ go: (text: string) => Promise<boolean>;
829
+ close: () => void;
830
+ key: (e: KeyboardEvent) => boolean;
831
+ };
832
+ symbolOpen: import("vue").Ref<boolean, boolean>;
833
+ closeSymbol: () => void;
834
+ names: {
835
+ list: import("vue").ShallowRef<readonly import("../index.js").SheetName[], readonly import("../index.js").SheetName[]>;
836
+ available: import("vue").ComputedRef<boolean>;
837
+ editable: import("vue").ComputedRef<boolean>;
838
+ compare: (a: string, b: string) => number;
839
+ read: () => void;
840
+ rangeOf: (n: import("../index.js").SheetName) => import("./names.js").NameRange | null;
841
+ visibleOn: (sheet: string) => import("../index.js").SheetName[];
842
+ find: (text: string, sheet: string) => import("../index.js").SheetName | undefined;
843
+ formulaNames: import("vue").ComputedRef<string[]>;
844
+ boxNames: import("vue").ComputedRef<import("../index.js").SheetName[]>;
845
+ nameOf: (rect: import("xlcalc").CellRect | null) => string | null;
846
+ save: (next: import("../index.js").SheetName[]) => Promise<import("../index.js").EditOutcome | null>;
847
+ };
848
+ nameDialogs: {
849
+ draft: import("vue").Ref<{
850
+ editing: string | null;
851
+ name: string;
852
+ scope: string;
853
+ ref: string;
854
+ } | null, import("./name-dialogs.js").NameDraft | {
855
+ editing: string | null;
856
+ name: string;
857
+ scope: string;
858
+ ref: string;
859
+ } | null>;
860
+ manager: import("vue").Ref<{
861
+ selected: string | null;
862
+ ref: string | null;
863
+ } | null, import("./name-dialogs.js").NameManagerState | {
864
+ selected: string | null;
865
+ ref: string | null;
866
+ } | null>;
867
+ ask: import("vue").ShallowRef<import("./name-dialogs.js").NameAsk | null, import("./name-dialogs.js").NameAsk | null>;
868
+ answer: (yes: boolean) => void;
869
+ busy: import("vue").Ref<boolean, boolean>;
870
+ rows: import("vue").ComputedRef<import("../index.js").SheetName[]>;
871
+ selected: import("vue").ComputedRef<import("../index.js").SheetName | null>;
872
+ refText: import("vue").ComputedRef<string>;
873
+ refChanged: import("vue").ComputedRef<boolean>;
874
+ define: () => boolean;
875
+ openManager: () => boolean;
876
+ select: (n: import("../index.js").SheetName) => void;
877
+ edit: () => void;
878
+ submit: () => Promise<void>;
879
+ closeDraft: () => void;
880
+ remove: () => Promise<void>;
881
+ editRef: (text: string) => void;
882
+ commitRef: () => Promise<boolean>;
883
+ cancelRef: () => void;
884
+ closeManager: () => Promise<void>;
885
+ };
886
+ zoomer: {
887
+ percent: import("vue").ComputedRef<number>;
888
+ apply: (pct: number, focus?: {
889
+ x: number;
890
+ y: number;
891
+ }) => number;
892
+ choose: (pct: number) => number;
893
+ fitSelection: (user?: boolean) => number;
894
+ enter: () => void;
895
+ onWheel: (e: WheelEvent) => void;
896
+ onTouchStart: (e: TouchEvent) => void;
897
+ onTouchMove: (e: TouchEvent) => void;
898
+ onTouchEnd: (e: TouchEvent) => void;
899
+ onGesture: (e: Event & {
900
+ scale?: number;
901
+ clientX?: number;
902
+ clientY?: number;
903
+ }) => void;
904
+ dialogOpen: import("vue").Ref<boolean, boolean>;
905
+ };
906
+ watches: {
907
+ list: import("vue").ShallowRef<SheetWatch[], SheetWatch[]>;
908
+ open: import("vue").Ref<boolean, boolean>;
909
+ chosen: import("vue").ShallowRef<Set<number>, Set<number>>;
910
+ valueOf: (w: SheetWatch) => import("./watch.js").WatchShown | null;
911
+ add: () => void;
912
+ remove: () => void;
913
+ choose: (i: number, how?: {
914
+ add?: boolean;
915
+ range?: boolean;
916
+ }) => void;
917
+ go: (i: number) => Promise<void>;
918
+ setOpen: (on?: boolean) => boolean;
919
+ canAdd: import("vue").ComputedRef<boolean>;
920
+ };
921
+ cf: {
922
+ api: {
923
+ quickRule: (kind: import("../index.js").QuickRule) => boolean;
924
+ dataBars: (color: import("../index.js").DataBarColor, fill?: "gradient" | "solid") => Promise<import("../index.js").EditOutcome | null>;
925
+ colorScale: (preset: import("../index.js").ColorScalePreset) => Promise<import("../index.js").EditOutcome | null>;
926
+ iconSet: (icons: import("xlcalc").IconSetName) => Promise<import("../index.js").EditOutcome | null>;
927
+ clearRules: (from: import("../index.js").ClearRulesFrom) => Promise<import("../index.js").EditOutcome | null>;
928
+ newRule: () => boolean;
929
+ manageRules: () => boolean;
930
+ };
931
+ quick: import("vue").ShallowRef<(import("./cf-commands.js").RuleTarget & {
932
+ kind: import("../index.js").QuickRule;
933
+ }) | null, (import("./cf-commands.js").RuleTarget & {
934
+ kind: import("../index.js").QuickRule;
935
+ }) | null>;
936
+ rule: import("vue").ShallowRef<import("./cf-commands.js").RuleDialog | null, import("./cf-commands.js").RuleDialog | null>;
937
+ style: import("vue").ShallowRef<import("./cf-commands.js").StyleDialog | null, import("./cf-commands.js").StyleDialog | null>;
938
+ manager: import("vue").ShallowRef<import("./cf-commands.js").ManagerState | null, import("./cf-commands.js").ManagerState | null>;
939
+ locale: () => import("xlcalc").Locale | undefined;
940
+ stored: (t: import("./cf-commands.js").RuleTarget, ranges?: string[]) => (formula: string) => string;
941
+ shown: (t: import("./cf-commands.js").RuleTarget, ranges: string[]) => (formula: string) => string;
942
+ activeAddress: (t: import("./cf-commands.js").RuleTarget) => string;
943
+ quickOk: (q: import("./cf-presets.js").QuickInput) => void;
944
+ quickClose: () => void;
945
+ openRule: (d: import("./cf-commands.js").RuleDialog) => void;
946
+ ruleClose: () => void;
947
+ openStyle: (d: import("./cf-commands.js").StyleDialog) => import("./cf-commands.js").StyleDialog;
948
+ styleClose: (made: import("xlcalc").ConditionalStyle | null) => void;
949
+ managerWrite: (next: import("xlcalc").ConditionalFormat[], close: boolean) => Promise<void>;
950
+ managerClose: () => void;
951
+ closeAll: () => void;
952
+ };
628
953
  editor: import("vue").Ref<{
629
954
  sheet: string;
630
955
  row: number;
@@ -689,6 +1014,11 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
689
1014
  active: import("vue").Ref<number, number>;
690
1015
  sheet: import("vue").ComputedRef<SheetInfo | null>;
691
1016
  sheetName: import("vue").ComputedRef<string>;
1017
+ defaultFont: import("vue").ComputedRef<{
1018
+ name: string;
1019
+ size: number;
1020
+ } | null>;
1021
+ defaultFontStyle: import("vue").ComputedRef<Record<string, string> | null>;
692
1022
  grown: import("vue").Ref<{
693
1023
  rows: number;
694
1024
  cols: number;
@@ -733,6 +1063,7 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
733
1063
  failureOf: (error: unknown) => import("../index.js").SheetFailure;
734
1064
  loading: import("vue").Ref<boolean, boolean>;
735
1065
  scroller: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
1066
+ zoom: import("vue").Ref<number, number>;
736
1067
  scrollTop: import("vue").Ref<number, number>;
737
1068
  scrollLeft: import("vue").Ref<number, number>;
738
1069
  viewH: import("vue").Ref<number, number>;
@@ -765,6 +1096,8 @@ export declare function useSheet(props: SheetViewProps, emit: SheetEmit, hostLin
765
1096
  hooks: {
766
1097
  unfilter: (_row: number) => void;
767
1098
  changing: () => void;
1099
+ stepped: () => void;
1100
+ changed: () => void;
768
1101
  };
769
1102
  focusGrid: () => void;
770
1103
  scrollGridTo: (top: number, left: number) => void;
@@ -0,0 +1,54 @@
1
+ import type { CellPosition } from 'xlcalc/contract';
2
+ import type { SpellingHit } from '../contract/workbook.js';
3
+ import type { Editing } from './editing.js';
4
+ import type { Selection } from './selection.js';
5
+ import { type SheetState } from './state.js';
6
+ /** The word shown in the dialog: the hit, its cell's text (and edit text) and the suggestion chosen for Change. */
7
+ export interface SpellingShown {
8
+ hit: SpellingHit;
9
+ at: CellPosition;
10
+ text: string;
11
+ editText?: string;
12
+ choice: number;
13
+ }
14
+ export declare function useSpellCheck(s: SheetState, sel: Selection, ed: Editing, notify: (text: string) => void): {
15
+ available: import("vue").ComputedRef<boolean>;
16
+ canChange: import("vue").ComputedRef<boolean>;
17
+ canLearn: import("vue").ComputedRef<boolean>;
18
+ shown: import("vue").Ref<{
19
+ hit: {
20
+ cell: string;
21
+ word: string;
22
+ at: number;
23
+ suggestions: string[];
24
+ };
25
+ at: {
26
+ row: number;
27
+ col: number;
28
+ };
29
+ text: string;
30
+ editText?: string | undefined;
31
+ choice: number;
32
+ } | null, SpellingShown | {
33
+ hit: {
34
+ cell: string;
35
+ word: string;
36
+ at: number;
37
+ suggestions: string[];
38
+ };
39
+ at: {
40
+ row: number;
41
+ col: number;
42
+ };
43
+ text: string;
44
+ editText?: string | undefined;
45
+ choice: number;
46
+ } | null>;
47
+ done: import("vue").Ref<boolean, boolean>;
48
+ busy: import("vue").Ref<boolean, boolean>;
49
+ check: () => boolean;
50
+ act: (kind: "ignoreOnce" | "ignoreAll" | "add" | "change" | "changeAll") => Promise<void>;
51
+ close: () => void;
52
+ key: (e: KeyboardEvent) => boolean;
53
+ };
54
+ export type SpellCheck = ReturnType<typeof useSpellCheck>;