@lexical/history 0.38.0 → 0.38.2-nightly.20251028.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/LICENSE +21 -0
- package/LexicalHistory.dev.js +363 -0
- package/{src/index.ts → LexicalHistory.dev.mjs} +92 -336
- package/LexicalHistory.js +3 -3
- package/LexicalHistory.mjs +15 -0
- package/LexicalHistory.node.mjs +13 -0
- package/LexicalHistory.prod.js +9 -0
- package/LexicalHistory.prod.mjs +9 -0
- package/index.d.ts +63 -0
- package/package.json +4 -4
- package/src/__tests__/unit/LexicalHistory.test.tsx +0 -452
- /package/{flow/LexicalHistory.js.flow → LexicalHistory.js.flow} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
var extension = require('@lexical/extension');
|
|
12
|
+
var utils = require('@lexical/utils');
|
|
13
|
+
var lexical = require('lexical');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
const HISTORY_MERGE = 0;
|
|
24
|
+
const HISTORY_PUSH = 1;
|
|
25
|
+
const DISCARD_HISTORY_CANDIDATE = 2;
|
|
26
|
+
const OTHER = 0;
|
|
27
|
+
const COMPOSING_CHARACTER = 1;
|
|
28
|
+
const INSERT_CHARACTER_AFTER_SELECTION = 2;
|
|
29
|
+
const DELETE_CHARACTER_BEFORE_SELECTION = 3;
|
|
30
|
+
const DELETE_CHARACTER_AFTER_SELECTION = 4;
|
|
31
|
+
function getDirtyNodes(editorState, dirtyLeaves, dirtyElements) {
|
|
32
|
+
const nodeMap = editorState._nodeMap;
|
|
33
|
+
const nodes = [];
|
|
34
|
+
for (const dirtyLeafKey of dirtyLeaves) {
|
|
35
|
+
const dirtyLeaf = nodeMap.get(dirtyLeafKey);
|
|
36
|
+
if (dirtyLeaf !== undefined) {
|
|
37
|
+
nodes.push(dirtyLeaf);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
for (const [dirtyElementKey, intentionallyMarkedAsDirty] of dirtyElements) {
|
|
41
|
+
if (!intentionallyMarkedAsDirty) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const dirtyElement = nodeMap.get(dirtyElementKey);
|
|
45
|
+
if (dirtyElement !== undefined && !lexical.$isRootNode(dirtyElement)) {
|
|
46
|
+
nodes.push(dirtyElement);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return nodes;
|
|
50
|
+
}
|
|
51
|
+
function getChangeType(prevEditorState, nextEditorState, dirtyLeavesSet, dirtyElementsSet, isComposing) {
|
|
52
|
+
if (prevEditorState === null || dirtyLeavesSet.size === 0 && dirtyElementsSet.size === 0 && !isComposing) {
|
|
53
|
+
return OTHER;
|
|
54
|
+
}
|
|
55
|
+
const nextSelection = nextEditorState._selection;
|
|
56
|
+
const prevSelection = prevEditorState._selection;
|
|
57
|
+
if (isComposing) {
|
|
58
|
+
return COMPOSING_CHARACTER;
|
|
59
|
+
}
|
|
60
|
+
if (!lexical.$isRangeSelection(nextSelection) || !lexical.$isRangeSelection(prevSelection) || !prevSelection.isCollapsed() || !nextSelection.isCollapsed()) {
|
|
61
|
+
return OTHER;
|
|
62
|
+
}
|
|
63
|
+
const dirtyNodes = getDirtyNodes(nextEditorState, dirtyLeavesSet, dirtyElementsSet);
|
|
64
|
+
if (dirtyNodes.length === 0) {
|
|
65
|
+
return OTHER;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Catching the case when inserting new text node into an element (e.g. first char in paragraph/list),
|
|
69
|
+
// or after existing node.
|
|
70
|
+
if (dirtyNodes.length > 1) {
|
|
71
|
+
const nextNodeMap = nextEditorState._nodeMap;
|
|
72
|
+
const nextAnchorNode = nextNodeMap.get(nextSelection.anchor.key);
|
|
73
|
+
const prevAnchorNode = nextNodeMap.get(prevSelection.anchor.key);
|
|
74
|
+
if (nextAnchorNode && prevAnchorNode && !prevEditorState._nodeMap.has(nextAnchorNode.__key) && lexical.$isTextNode(nextAnchorNode) && nextAnchorNode.__text.length === 1 && nextSelection.anchor.offset === 1) {
|
|
75
|
+
return INSERT_CHARACTER_AFTER_SELECTION;
|
|
76
|
+
}
|
|
77
|
+
return OTHER;
|
|
78
|
+
}
|
|
79
|
+
const nextDirtyNode = dirtyNodes[0];
|
|
80
|
+
const prevDirtyNode = prevEditorState._nodeMap.get(nextDirtyNode.__key);
|
|
81
|
+
if (!lexical.$isTextNode(prevDirtyNode) || !lexical.$isTextNode(nextDirtyNode) || prevDirtyNode.__mode !== nextDirtyNode.__mode) {
|
|
82
|
+
return OTHER;
|
|
83
|
+
}
|
|
84
|
+
const prevText = prevDirtyNode.__text;
|
|
85
|
+
const nextText = nextDirtyNode.__text;
|
|
86
|
+
if (prevText === nextText) {
|
|
87
|
+
return OTHER;
|
|
88
|
+
}
|
|
89
|
+
const nextAnchor = nextSelection.anchor;
|
|
90
|
+
const prevAnchor = prevSelection.anchor;
|
|
91
|
+
if (nextAnchor.key !== prevAnchor.key || nextAnchor.type !== 'text') {
|
|
92
|
+
return OTHER;
|
|
93
|
+
}
|
|
94
|
+
const nextAnchorOffset = nextAnchor.offset;
|
|
95
|
+
const prevAnchorOffset = prevAnchor.offset;
|
|
96
|
+
const textDiff = nextText.length - prevText.length;
|
|
97
|
+
if (textDiff === 1 && prevAnchorOffset === nextAnchorOffset - 1) {
|
|
98
|
+
return INSERT_CHARACTER_AFTER_SELECTION;
|
|
99
|
+
}
|
|
100
|
+
if (textDiff === -1 && prevAnchorOffset === nextAnchorOffset + 1) {
|
|
101
|
+
return DELETE_CHARACTER_BEFORE_SELECTION;
|
|
102
|
+
}
|
|
103
|
+
if (textDiff === -1 && prevAnchorOffset === nextAnchorOffset) {
|
|
104
|
+
return DELETE_CHARACTER_AFTER_SELECTION;
|
|
105
|
+
}
|
|
106
|
+
return OTHER;
|
|
107
|
+
}
|
|
108
|
+
function isTextNodeUnchanged(key, prevEditorState, nextEditorState) {
|
|
109
|
+
const prevNode = prevEditorState._nodeMap.get(key);
|
|
110
|
+
const nextNode = nextEditorState._nodeMap.get(key);
|
|
111
|
+
const prevSelection = prevEditorState._selection;
|
|
112
|
+
const nextSelection = nextEditorState._selection;
|
|
113
|
+
const isDeletingLine = lexical.$isRangeSelection(prevSelection) && lexical.$isRangeSelection(nextSelection) && prevSelection.anchor.type === 'element' && prevSelection.focus.type === 'element' && nextSelection.anchor.type === 'text' && nextSelection.focus.type === 'text';
|
|
114
|
+
if (!isDeletingLine && lexical.$isTextNode(prevNode) && lexical.$isTextNode(nextNode) && prevNode.__parent === nextNode.__parent) {
|
|
115
|
+
// This has the assumption that object key order won't change if the
|
|
116
|
+
// content did not change, which should normally be safe given
|
|
117
|
+
// the manner in which nodes and exportJSON are typically implemented.
|
|
118
|
+
return JSON.stringify(prevEditorState.read(() => prevNode.exportJSON())) === JSON.stringify(nextEditorState.read(() => nextNode.exportJSON()));
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
function createMergeActionGetter(editor, delayOrStore) {
|
|
123
|
+
let prevChangeTime = Date.now();
|
|
124
|
+
let prevChangeType = OTHER;
|
|
125
|
+
return (prevEditorState, nextEditorState, currentHistoryEntry, dirtyLeaves, dirtyElements, tags) => {
|
|
126
|
+
const changeTime = Date.now();
|
|
127
|
+
|
|
128
|
+
// If applying changes from history stack there's no need
|
|
129
|
+
// to run history logic again, as history entries already calculated
|
|
130
|
+
if (tags.has(lexical.HISTORIC_TAG)) {
|
|
131
|
+
prevChangeType = OTHER;
|
|
132
|
+
prevChangeTime = changeTime;
|
|
133
|
+
return DISCARD_HISTORY_CANDIDATE;
|
|
134
|
+
}
|
|
135
|
+
const changeType = getChangeType(prevEditorState, nextEditorState, dirtyLeaves, dirtyElements, editor.isComposing());
|
|
136
|
+
const mergeAction = (() => {
|
|
137
|
+
const isSameEditor = currentHistoryEntry === null || currentHistoryEntry.editor === editor;
|
|
138
|
+
const shouldPushHistory = tags.has(lexical.HISTORY_PUSH_TAG);
|
|
139
|
+
const shouldMergeHistory = !shouldPushHistory && isSameEditor && tags.has(lexical.HISTORY_MERGE_TAG);
|
|
140
|
+
if (shouldMergeHistory) {
|
|
141
|
+
return HISTORY_MERGE;
|
|
142
|
+
}
|
|
143
|
+
if (prevEditorState === null) {
|
|
144
|
+
return HISTORY_PUSH;
|
|
145
|
+
}
|
|
146
|
+
const selection = nextEditorState._selection;
|
|
147
|
+
const hasDirtyNodes = dirtyLeaves.size > 0 || dirtyElements.size > 0;
|
|
148
|
+
if (!hasDirtyNodes) {
|
|
149
|
+
if (selection !== null) {
|
|
150
|
+
return HISTORY_MERGE;
|
|
151
|
+
}
|
|
152
|
+
return DISCARD_HISTORY_CANDIDATE;
|
|
153
|
+
}
|
|
154
|
+
const delay = typeof delayOrStore === 'number' ? delayOrStore : delayOrStore.peek();
|
|
155
|
+
if (shouldPushHistory === false && changeType !== OTHER && changeType === prevChangeType && changeTime < prevChangeTime + delay && isSameEditor) {
|
|
156
|
+
return HISTORY_MERGE;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// A single node might have been marked as dirty, but not have changed
|
|
160
|
+
// due to some node transform reverting the change.
|
|
161
|
+
if (dirtyLeaves.size === 1) {
|
|
162
|
+
const dirtyLeafKey = Array.from(dirtyLeaves)[0];
|
|
163
|
+
if (isTextNodeUnchanged(dirtyLeafKey, prevEditorState, nextEditorState)) {
|
|
164
|
+
return HISTORY_MERGE;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return HISTORY_PUSH;
|
|
168
|
+
})();
|
|
169
|
+
prevChangeTime = changeTime;
|
|
170
|
+
prevChangeType = changeType;
|
|
171
|
+
return mergeAction;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function redo(editor, historyState) {
|
|
175
|
+
const redoStack = historyState.redoStack;
|
|
176
|
+
const undoStack = historyState.undoStack;
|
|
177
|
+
if (redoStack.length !== 0) {
|
|
178
|
+
const current = historyState.current;
|
|
179
|
+
if (current !== null) {
|
|
180
|
+
undoStack.push(current);
|
|
181
|
+
editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, true);
|
|
182
|
+
}
|
|
183
|
+
const historyStateEntry = redoStack.pop();
|
|
184
|
+
if (redoStack.length === 0) {
|
|
185
|
+
editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);
|
|
186
|
+
}
|
|
187
|
+
historyState.current = historyStateEntry || null;
|
|
188
|
+
if (historyStateEntry) {
|
|
189
|
+
historyStateEntry.editor.setEditorState(historyStateEntry.editorState, {
|
|
190
|
+
tag: lexical.HISTORIC_TAG
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function undo(editor, historyState) {
|
|
196
|
+
const redoStack = historyState.redoStack;
|
|
197
|
+
const undoStack = historyState.undoStack;
|
|
198
|
+
const undoStackLength = undoStack.length;
|
|
199
|
+
if (undoStackLength !== 0) {
|
|
200
|
+
const current = historyState.current;
|
|
201
|
+
const historyStateEntry = undoStack.pop();
|
|
202
|
+
if (current !== null) {
|
|
203
|
+
redoStack.push(current);
|
|
204
|
+
editor.dispatchCommand(lexical.CAN_REDO_COMMAND, true);
|
|
205
|
+
}
|
|
206
|
+
if (undoStack.length === 0) {
|
|
207
|
+
editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, false);
|
|
208
|
+
}
|
|
209
|
+
historyState.current = historyStateEntry || null;
|
|
210
|
+
if (historyStateEntry) {
|
|
211
|
+
historyStateEntry.editor.setEditorState(historyStateEntry.editorState, {
|
|
212
|
+
tag: lexical.HISTORIC_TAG
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function clearHistory(historyState) {
|
|
218
|
+
historyState.undoStack = [];
|
|
219
|
+
historyState.redoStack = [];
|
|
220
|
+
historyState.current = null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Registers necessary listeners to manage undo/redo history stack and related editor commands.
|
|
225
|
+
* It returns `unregister` callback that cleans up all listeners and should be called on editor unmount.
|
|
226
|
+
* @param editor - The lexical editor.
|
|
227
|
+
* @param historyState - The history state, containing the current state and the undo/redo stack.
|
|
228
|
+
* @param delay - The time (in milliseconds) the editor should delay generating a new history stack,
|
|
229
|
+
* instead of merging the current changes with the current stack.
|
|
230
|
+
* @returns The listeners cleanup callback function.
|
|
231
|
+
*/
|
|
232
|
+
function registerHistory(editor, historyState, delay) {
|
|
233
|
+
const getMergeAction = createMergeActionGetter(editor, delay);
|
|
234
|
+
const applyChange = ({
|
|
235
|
+
editorState,
|
|
236
|
+
prevEditorState,
|
|
237
|
+
dirtyLeaves,
|
|
238
|
+
dirtyElements,
|
|
239
|
+
tags
|
|
240
|
+
}) => {
|
|
241
|
+
const current = historyState.current;
|
|
242
|
+
const redoStack = historyState.redoStack;
|
|
243
|
+
const undoStack = historyState.undoStack;
|
|
244
|
+
const currentEditorState = current === null ? null : current.editorState;
|
|
245
|
+
if (current !== null && editorState === currentEditorState) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const mergeAction = getMergeAction(prevEditorState, editorState, current, dirtyLeaves, dirtyElements, tags);
|
|
249
|
+
if (mergeAction === HISTORY_PUSH) {
|
|
250
|
+
if (redoStack.length !== 0) {
|
|
251
|
+
historyState.redoStack = [];
|
|
252
|
+
editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);
|
|
253
|
+
}
|
|
254
|
+
if (current !== null) {
|
|
255
|
+
undoStack.push({
|
|
256
|
+
...current
|
|
257
|
+
});
|
|
258
|
+
editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, true);
|
|
259
|
+
}
|
|
260
|
+
} else if (mergeAction === DISCARD_HISTORY_CANDIDATE) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Else we merge
|
|
265
|
+
historyState.current = {
|
|
266
|
+
editor,
|
|
267
|
+
editorState
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
const unregister = utils.mergeRegister(editor.registerCommand(lexical.UNDO_COMMAND, () => {
|
|
271
|
+
undo(editor, historyState);
|
|
272
|
+
return true;
|
|
273
|
+
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.REDO_COMMAND, () => {
|
|
274
|
+
redo(editor, historyState);
|
|
275
|
+
return true;
|
|
276
|
+
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CLEAR_EDITOR_COMMAND, () => {
|
|
277
|
+
clearHistory(historyState);
|
|
278
|
+
return false;
|
|
279
|
+
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerCommand(lexical.CLEAR_HISTORY_COMMAND, () => {
|
|
280
|
+
clearHistory(historyState);
|
|
281
|
+
editor.dispatchCommand(lexical.CAN_REDO_COMMAND, false);
|
|
282
|
+
editor.dispatchCommand(lexical.CAN_UNDO_COMMAND, false);
|
|
283
|
+
return true;
|
|
284
|
+
}, lexical.COMMAND_PRIORITY_EDITOR), editor.registerUpdateListener(applyChange));
|
|
285
|
+
return unregister;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Creates an empty history state.
|
|
290
|
+
* @returns - The empty history state, as an object.
|
|
291
|
+
*/
|
|
292
|
+
function createEmptyHistoryState() {
|
|
293
|
+
return {
|
|
294
|
+
current: null,
|
|
295
|
+
redoStack: [],
|
|
296
|
+
undoStack: []
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Registers necessary listeners to manage undo/redo history stack and related
|
|
301
|
+
* editor commands, via the \@lexical/history module.
|
|
302
|
+
*/
|
|
303
|
+
|
|
304
|
+
const HistoryExtension = lexical.defineExtension({
|
|
305
|
+
build: (editor, {
|
|
306
|
+
delay,
|
|
307
|
+
createInitialHistoryState,
|
|
308
|
+
disabled
|
|
309
|
+
}) => extension.namedSignals({
|
|
310
|
+
delay,
|
|
311
|
+
disabled,
|
|
312
|
+
historyState: createInitialHistoryState(editor)
|
|
313
|
+
}),
|
|
314
|
+
config: lexical.safeCast({
|
|
315
|
+
createInitialHistoryState: createEmptyHistoryState,
|
|
316
|
+
delay: 300,
|
|
317
|
+
disabled: typeof window === 'undefined'
|
|
318
|
+
}),
|
|
319
|
+
name: '@lexical/history/History',
|
|
320
|
+
register: (editor, config, state) => {
|
|
321
|
+
const stores = state.getOutput();
|
|
322
|
+
return extension.effect(() => stores.disabled.value ? undefined : registerHistory(editor, stores.historyState.value, stores.delay));
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
function getHistoryPeer(editor) {
|
|
326
|
+
return editor ? extension.getPeerDependencyFromEditor(editor, HistoryExtension.name) : null;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Registers necessary listeners to manage undo/redo history stack and related
|
|
331
|
+
* editor commands, via the \@lexical/history module, only if the parent editor
|
|
332
|
+
* has a history plugin implementation.
|
|
333
|
+
*/
|
|
334
|
+
const SharedHistoryExtension = lexical.defineExtension({
|
|
335
|
+
dependencies: [lexical.configExtension(HistoryExtension, {
|
|
336
|
+
createInitialHistoryState: () => {
|
|
337
|
+
throw new Error('SharedHistory did not inherit parent history');
|
|
338
|
+
},
|
|
339
|
+
disabled: true
|
|
340
|
+
})],
|
|
341
|
+
name: '@lexical/history/SharedHistory',
|
|
342
|
+
register(editor, _config, state) {
|
|
343
|
+
const {
|
|
344
|
+
output
|
|
345
|
+
} = state.getDependency(HistoryExtension);
|
|
346
|
+
const parentPeer = getHistoryPeer(editor._parentEditor);
|
|
347
|
+
if (!parentPeer) {
|
|
348
|
+
return () => {};
|
|
349
|
+
}
|
|
350
|
+
const parentOutput = parentPeer.output;
|
|
351
|
+
return extension.effect(() => extension.batch(() => {
|
|
352
|
+
output.delay.value = parentOutput.delay.value;
|
|
353
|
+
output.historyState.value = parentOutput.historyState.value;
|
|
354
|
+
// Note that toggling the parent history will force this to be changed
|
|
355
|
+
output.disabled.value = parentOutput.disabled.value;
|
|
356
|
+
}));
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
exports.HistoryExtension = HistoryExtension;
|
|
361
|
+
exports.SharedHistoryExtension = SharedHistoryExtension;
|
|
362
|
+
exports.createEmptyHistoryState = createEmptyHistoryState;
|
|
363
|
+
exports.registerHistory = registerHistory;
|