1 | import { BaseEditor } from 'slate';
|
2 | import { History } from './history';
|
3 |
|
4 |
|
5 |
|
6 | export declare const HISTORY: WeakMap<BaseEditor, History>;
|
7 | export declare const SAVING: WeakMap<BaseEditor, boolean | undefined>;
|
8 | export declare const MERGING: WeakMap<BaseEditor, boolean | undefined>;
|
9 | export declare const SPLITTING_ONCE: WeakMap<BaseEditor, boolean | undefined>;
|
10 |
|
11 |
|
12 |
|
13 | export interface HistoryEditor extends BaseEditor {
|
14 | history: History;
|
15 | undo: () => void;
|
16 | redo: () => void;
|
17 | writeHistory: (stack: 'undos' | 'redos', batch: any) => void;
|
18 | }
|
19 | export declare const HistoryEditor: {
|
20 | |
21 |
|
22 |
|
23 | isHistoryEditor(value: any): value is HistoryEditor;
|
24 | |
25 |
|
26 |
|
27 | isMerging(editor: HistoryEditor): boolean | undefined;
|
28 | |
29 |
|
30 |
|
31 | isSplittingOnce(editor: HistoryEditor): boolean | undefined;
|
32 | setSplittingOnce(editor: HistoryEditor, value: boolean | undefined): void;
|
33 | |
34 |
|
35 |
|
36 | isSaving(editor: HistoryEditor): boolean | undefined;
|
37 | |
38 |
|
39 |
|
40 | redo(editor: HistoryEditor): void;
|
41 | |
42 |
|
43 |
|
44 | undo(editor: HistoryEditor): void;
|
45 | |
46 |
|
47 |
|
48 |
|
49 | withMerging(editor: HistoryEditor, fn: () => void): void;
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 | withNewBatch(editor: HistoryEditor, fn: () => void): void;
|
56 | |
57 |
|
58 |
|
59 |
|
60 | withoutMerging(editor: HistoryEditor, fn: () => void): void;
|
61 | |
62 |
|
63 |
|
64 |
|
65 | withoutSaving(editor: HistoryEditor, fn: () => void): void;
|
66 | };
|
67 |
|
\ | No newline at end of file |