@ckeditor/ckeditor5-undo 41.1.0 → 41.3.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
package/dist/index.css ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
package/dist/index.js ADDED
@@ -0,0 +1,556 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';
6
+ import { transformSets, NoOperation } from '@ckeditor/ckeditor5-engine/dist/index.js';
7
+ import { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
8
+
9
+ /**
10
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
11
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
12
+ */
13
+ /**
14
+ * @module undo/basecommand
15
+ */
16
+ /**
17
+ * Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.
18
+ */
19
+ class BaseCommand extends Command {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ constructor(editor) {
24
+ super(editor);
25
+ /**
26
+ * Stack of items stored by the command. These are pairs of:
27
+ *
28
+ * * {@link module:engine/model/batch~Batch batch} saved by the command,
29
+ * * {@link module:engine/model/selection~Selection selection} state at the moment of saving the batch.
30
+ */
31
+ this._stack = [];
32
+ /**
33
+ * Stores all batches that were created by this command.
34
+ *
35
+ * @internal
36
+ */
37
+ this._createdBatches = new WeakSet();
38
+ // Refresh state, so the command is inactive right after initialization.
39
+ this.refresh();
40
+ // This command should not depend on selection change.
41
+ this._isEnabledBasedOnSelection = false;
42
+ // Set the transparent batch for the `editor.data.set()` call if the
43
+ // batch type is not set already.
44
+ this.listenTo(editor.data, 'set', (evt, data) => {
45
+ // Create a shallow copy of the options to not change the original args.
46
+ // And make sure that an object is assigned to data[ 1 ].
47
+ data[1] = { ...data[1] };
48
+ const options = data[1];
49
+ // If batch type is not set, default to non-undoable batch.
50
+ if (!options.batchType) {
51
+ options.batchType = { isUndoable: false };
52
+ }
53
+ }, { priority: 'high' });
54
+ // Clear the stack for the `transparent` batches.
55
+ this.listenTo(editor.data, 'set', (evt, data) => {
56
+ // We can assume that the object exists and it has a `batchType` property.
57
+ // It was ensured with a higher priority listener before.
58
+ const options = data[1];
59
+ if (!options.batchType.isUndoable) {
60
+ this.clearStack();
61
+ }
62
+ });
63
+ }
64
+ /**
65
+ * @inheritDoc
66
+ */
67
+ refresh() {
68
+ this.isEnabled = this._stack.length > 0;
69
+ }
70
+ /**
71
+ * Returns all batches created by this command.
72
+ */
73
+ get createdBatches() {
74
+ return this._createdBatches;
75
+ }
76
+ /**
77
+ * Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~Document document}
78
+ * created by the editor which this command is registered to.
79
+ *
80
+ * @param batch The batch to add.
81
+ */
82
+ addBatch(batch) {
83
+ const docSelection = this.editor.model.document.selection;
84
+ const selection = {
85
+ ranges: docSelection.hasOwnRange ? Array.from(docSelection.getRanges()) : [],
86
+ isBackward: docSelection.isBackward
87
+ };
88
+ this._stack.push({ batch, selection });
89
+ this.refresh();
90
+ }
91
+ /**
92
+ * Removes all items from the stack.
93
+ */
94
+ clearStack() {
95
+ this._stack = [];
96
+ this.refresh();
97
+ }
98
+ /**
99
+ * Restores the {@link module:engine/model/document~Document#selection document selection} state after a batch was undone.
100
+ *
101
+ * @param ranges Ranges to be restored.
102
+ * @param isBackward A flag describing whether the restored range was selected forward or backward.
103
+ * @param operations Operations which has been applied since selection has been stored.
104
+ */
105
+ _restoreSelection(ranges, isBackward, operations) {
106
+ const model = this.editor.model;
107
+ const document = model.document;
108
+ // This will keep the transformed selection ranges.
109
+ const selectionRanges = [];
110
+ // Transform all ranges from the restored selection.
111
+ const transformedRangeGroups = ranges.map(range => range.getTransformedByOperations(operations));
112
+ const allRanges = transformedRangeGroups.flat();
113
+ for (const rangeGroup of transformedRangeGroups) {
114
+ // While transforming there could appear ranges that are contained by other ranges, we shall ignore them.
115
+ const transformed = rangeGroup
116
+ .filter(range => range.root != document.graveyard)
117
+ .filter(range => !isRangeContainedByAnyOtherRange(range, allRanges));
118
+ // All the transformed ranges ended up in graveyard.
119
+ if (!transformed.length) {
120
+ continue;
121
+ }
122
+ // After the range got transformed, we have an array of ranges. Some of those
123
+ // ranges may be "touching" -- they can be next to each other and could be merged.
124
+ normalizeRanges(transformed);
125
+ // For each `range` from `ranges`, we take only one transformed range.
126
+ // This is because we want to prevent situation where single-range selection
127
+ // got transformed to multi-range selection.
128
+ selectionRanges.push(transformed[0]);
129
+ }
130
+ // @if CK_DEBUG_ENGINE // console.log( `Restored selection by undo: ${ selectionRanges.join( ', ' ) }` );
131
+ // `selectionRanges` may be empty if all ranges ended up in graveyard. If that is the case, do not restore selection.
132
+ if (selectionRanges.length) {
133
+ model.change(writer => {
134
+ writer.setSelection(selectionRanges, { backward: isBackward });
135
+ });
136
+ }
137
+ }
138
+ /**
139
+ * Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.
140
+ * This is a helper method for {@link #execute}.
141
+ *
142
+ * @param batchToUndo The batch to be undone.
143
+ * @param undoingBatch The batch that will contain undoing changes.
144
+ */
145
+ _undo(batchToUndo, undoingBatch) {
146
+ const model = this.editor.model;
147
+ const document = model.document;
148
+ // All changes done by the command execution will be saved as one batch.
149
+ this._createdBatches.add(undoingBatch);
150
+ const operationsToUndo = batchToUndo.operations.slice().filter(operation => operation.isDocumentOperation);
151
+ operationsToUndo.reverse();
152
+ // We will process each operation from `batchToUndo`, in reverse order. If there were operations A, B and C in undone batch,
153
+ // we need to revert them in reverse order, so first C' (reversed C), then B', then A'.
154
+ for (const operationToUndo of operationsToUndo) {
155
+ const nextBaseVersion = operationToUndo.baseVersion + 1;
156
+ const historyOperations = Array.from(document.history.getOperations(nextBaseVersion));
157
+ const transformedSets = transformSets([operationToUndo.getReversed()], historyOperations, {
158
+ useRelations: true,
159
+ document: this.editor.model.document,
160
+ padWithNoOps: false,
161
+ forceWeakRemove: true
162
+ });
163
+ const reversedOperations = transformedSets.operationsA;
164
+ // After reversed operation has been transformed by all history operations, apply it.
165
+ for (let operation of reversedOperations) {
166
+ // Do not apply any operation on non-editable space.
167
+ const affectedSelectable = operation.affectedSelectable;
168
+ if (affectedSelectable && !model.canEditAt(affectedSelectable)) {
169
+ operation = new NoOperation(operation.baseVersion);
170
+ }
171
+ // Before applying, add the operation to the `undoingBatch`.
172
+ undoingBatch.addOperation(operation);
173
+ model.applyOperation(operation);
174
+ document.history.setOperationAsUndone(operationToUndo, operation);
175
+ }
176
+ }
177
+ }
178
+ }
179
+ /**
180
+ * Normalizes list of ranges by joining intersecting or "touching" ranges.
181
+ *
182
+ * @param ranges Ranges to be normalized.
183
+ */
184
+ function normalizeRanges(ranges) {
185
+ ranges.sort((a, b) => a.start.isBefore(b.start) ? -1 : 1);
186
+ for (let i = 1; i < ranges.length; i++) {
187
+ const previousRange = ranges[i - 1];
188
+ const joinedRange = previousRange.getJoined(ranges[i], true);
189
+ if (joinedRange) {
190
+ // Replace the ranges on the list with the new joined range.
191
+ i--;
192
+ ranges.splice(i, 2, joinedRange);
193
+ }
194
+ }
195
+ }
196
+ function isRangeContainedByAnyOtherRange(range, ranges) {
197
+ return ranges.some(otherRange => otherRange !== range && otherRange.containsRange(range, true));
198
+ }
199
+
200
+ /**
201
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
202
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
203
+ */
204
+ /**
205
+ * @module undo/undocommand
206
+ */
207
+ /**
208
+ * The undo command stores {@link module:engine/model/batch~Batch batches} applied to the
209
+ * {@link module:engine/model/document~Document document} and is able to undo a batch by reversing it and transforming by
210
+ * batches from {@link module:engine/model/document~Document#history history} that happened after the reversed batch.
211
+ *
212
+ * The undo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.
213
+ */
214
+ class UndoCommand extends BaseCommand {
215
+ /**
216
+ * Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms
217
+ * and applies the reverted version on the {@link module:engine/model/document~Document document} and removes the batch from the stack.
218
+ * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.
219
+ *
220
+ * @fires execute
221
+ * @fires revert
222
+ * @param batch A batch that should be undone. If not set, the last added batch will be undone.
223
+ */
224
+ execute(batch = null) {
225
+ // If batch is not given, set `batchIndex` to the last index in command stack.
226
+ const batchIndex = batch ? this._stack.findIndex(a => a.batch == batch) : this._stack.length - 1;
227
+ const item = this._stack.splice(batchIndex, 1)[0];
228
+ const undoingBatch = this.editor.model.createBatch({ isUndo: true });
229
+ // All changes have to be done in one `enqueueChange` callback so other listeners will not
230
+ // step between consecutive operations, or won't do changes to the document before selection is properly restored.
231
+ this.editor.model.enqueueChange(undoingBatch, () => {
232
+ this._undo(item.batch, undoingBatch);
233
+ const operations = this.editor.model.document.history.getOperations(item.batch.baseVersion);
234
+ this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);
235
+ });
236
+ // Firing `revert` event after the change block to make sure that it includes all changes from post-fixers
237
+ // and make sure that the selection is "stabilized" (the selection range is saved after undo is executed and then
238
+ // restored on redo, so it is important that the selection range is saved after post-fixers are done).
239
+ this.fire('revert', item.batch, undoingBatch);
240
+ this.refresh();
241
+ }
242
+ }
243
+
244
+ /**
245
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
246
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
247
+ */
248
+ /**
249
+ * @module undo/redocommand
250
+ */
251
+ /**
252
+ * The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by
253
+ * {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing
254
+ * batches created by `UndoCommand`. The reversed batch is transformed by all the batches from
255
+ * {@link module:engine/model/document~Document#history history} that happened after the reversed undo batch.
256
+ *
257
+ * The redo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.
258
+ */
259
+ class RedoCommand extends BaseCommand {
260
+ /**
261
+ * Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to
262
+ * the command's stack, applies the reverted and transformed version on the
263
+ * {@link module:engine/model/document~Document document} and removes the batch from the stack.
264
+ * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.
265
+ *
266
+ * @fires execute
267
+ */
268
+ execute() {
269
+ const item = this._stack.pop();
270
+ const redoingBatch = this.editor.model.createBatch({ isUndo: true });
271
+ // All changes have to be done in one `enqueueChange` callback so other listeners will not step between consecutive
272
+ // operations, or won't do changes to the document before selection is properly restored.
273
+ this.editor.model.enqueueChange(redoingBatch, () => {
274
+ const lastOperation = item.batch.operations[item.batch.operations.length - 1];
275
+ const nextBaseVersion = lastOperation.baseVersion + 1;
276
+ const operations = this.editor.model.document.history.getOperations(nextBaseVersion);
277
+ this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);
278
+ this._undo(item.batch, redoingBatch);
279
+ });
280
+ this.refresh();
281
+ }
282
+ }
283
+
284
+ /**
285
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
286
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
287
+ */
288
+ /**
289
+ * @module undo/undoediting
290
+ */
291
+ /**
292
+ * The undo engine feature.
293
+ *
294
+ * It introduces the `'undo'` and `'redo'` commands to the editor.
295
+ */
296
+ class UndoEditing extends Plugin {
297
+ constructor() {
298
+ super(...arguments);
299
+ /**
300
+ * Keeps track of which batches were registered in undo.
301
+ */
302
+ this._batchRegistry = new WeakSet();
303
+ }
304
+ /**
305
+ * @inheritDoc
306
+ */
307
+ static get pluginName() {
308
+ return 'UndoEditing';
309
+ }
310
+ /**
311
+ * @inheritDoc
312
+ */
313
+ init() {
314
+ const editor = this.editor;
315
+ const t = editor.t;
316
+ // Create commands.
317
+ this._undoCommand = new UndoCommand(editor);
318
+ this._redoCommand = new RedoCommand(editor);
319
+ // Register command to the editor.
320
+ editor.commands.add('undo', this._undoCommand);
321
+ editor.commands.add('redo', this._redoCommand);
322
+ this.listenTo(editor.model, 'applyOperation', (evt, args) => {
323
+ const operation = args[0];
324
+ // Do not register batch if the operation is not a document operation.
325
+ // This prevents from creating empty undo steps, where all operations where non-document operations.
326
+ // Non-document operations creates and alters content in detached tree fragments (for example, document fragments).
327
+ // Most of time this is preparing data before it is inserted into actual tree (for example during copy & paste).
328
+ // Such operations should not be reversed.
329
+ if (!operation.isDocumentOperation) {
330
+ return;
331
+ }
332
+ const batch = operation.batch;
333
+ const isRedoBatch = this._redoCommand.createdBatches.has(batch);
334
+ const isUndoBatch = this._undoCommand.createdBatches.has(batch);
335
+ const wasProcessed = this._batchRegistry.has(batch);
336
+ // Skip the batch if it was already processed.
337
+ if (wasProcessed) {
338
+ return;
339
+ }
340
+ // Add the batch to the registry so it will not be processed again.
341
+ this._batchRegistry.add(batch);
342
+ if (!batch.isUndoable) {
343
+ return;
344
+ }
345
+ if (isRedoBatch) {
346
+ // If this batch comes from `redoCommand`, add it to the `undoCommand` stack.
347
+ this._undoCommand.addBatch(batch);
348
+ }
349
+ else if (!isUndoBatch) {
350
+ // If the batch comes neither from `redoCommand` nor from `undoCommand` then it is a new, regular batch.
351
+ // Add the batch to the `undoCommand` stack and clear the `redoCommand` stack.
352
+ this._undoCommand.addBatch(batch);
353
+ this._redoCommand.clearStack();
354
+ }
355
+ }, { priority: 'highest' });
356
+ this.listenTo(this._undoCommand, 'revert', (evt, undoneBatch, undoingBatch) => {
357
+ this._redoCommand.addBatch(undoingBatch);
358
+ });
359
+ editor.keystrokes.set('CTRL+Z', 'undo');
360
+ editor.keystrokes.set('CTRL+Y', 'redo');
361
+ editor.keystrokes.set('CTRL+SHIFT+Z', 'redo');
362
+ // Add the information about the keystrokes to the accessibility database.
363
+ editor.accessibility.addKeystrokeInfos({
364
+ keystrokes: [
365
+ {
366
+ label: t('Undo'),
367
+ keystroke: 'CTRL+Z'
368
+ },
369
+ {
370
+ label: t('Redo'),
371
+ keystroke: [['CTRL+Y'], ['CTRL+SHIFT+Z']]
372
+ }
373
+ ]
374
+ });
375
+ }
376
+ }
377
+
378
+ /**
379
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
380
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
381
+ */
382
+ /**
383
+ * @module undo/undoui
384
+ */
385
+ /**
386
+ * The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.
387
+ */
388
+ class UndoUI extends Plugin {
389
+ /**
390
+ * @inheritDoc
391
+ */
392
+ static get pluginName() {
393
+ return 'UndoUI';
394
+ }
395
+ /**
396
+ * @inheritDoc
397
+ */
398
+ init() {
399
+ const editor = this.editor;
400
+ const locale = editor.locale;
401
+ const t = editor.t;
402
+ const localizedUndoIcon = locale.uiLanguageDirection == 'ltr' ? icons.undo : icons.redo;
403
+ const localizedRedoIcon = locale.uiLanguageDirection == 'ltr' ? icons.redo : icons.undo;
404
+ this._addButton('undo', t('Undo'), 'CTRL+Z', localizedUndoIcon);
405
+ this._addButton('redo', t('Redo'), 'CTRL+Y', localizedRedoIcon);
406
+ }
407
+ /**
408
+ * Creates a button for the specified command.
409
+ *
410
+ * @param name Command name.
411
+ * @param label Button label.
412
+ * @param keystroke Command keystroke.
413
+ * @param Icon Source of the icon.
414
+ */
415
+ _addButton(name, label, keystroke, Icon) {
416
+ const editor = this.editor;
417
+ editor.ui.componentFactory.add(name, locale => {
418
+ const command = editor.commands.get(name);
419
+ const view = new ButtonView(locale);
420
+ view.set({
421
+ label,
422
+ icon: Icon,
423
+ keystroke,
424
+ tooltip: true
425
+ });
426
+ view.bind('isEnabled').to(command, 'isEnabled');
427
+ this.listenTo(view, 'execute', () => {
428
+ editor.execute(name);
429
+ editor.editing.view.focus();
430
+ });
431
+ return view;
432
+ });
433
+ }
434
+ }
435
+
436
+ /**
437
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
438
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
439
+ */
440
+ /**
441
+ * @module undo/undo
442
+ */
443
+ /**
444
+ * The undo feature.
445
+ *
446
+ * This is a "glue" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}
447
+ * and the {@link module:undo/undoui~UndoUI undo UI feature}.
448
+ *
449
+ * Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:
450
+ *
451
+ * Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the
452
+ * {@link module:engine/model/document~Document document}, it is saved to `History` as is.
453
+ * The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in
454
+ * {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the
455
+ * operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation
456
+ * and a batch is seen as one undo step.
457
+ *
458
+ * After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:
459
+ *
460
+ * ```
461
+ * History Undo stack
462
+ * ============== ==================================
463
+ * [operation A1] [ batch A ]
464
+ * [operation B1] [ batch B ]
465
+ * [operation B2] [ batch C ]
466
+ * [operation C1]
467
+ * [operation C2]
468
+ * [operation B3]
469
+ * [operation C3]
470
+ * ```
471
+ *
472
+ * Where operations starting with the same letter are from same batch.
473
+ *
474
+ * Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.
475
+ * For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing
476
+ * operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`
477
+ * need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`
478
+ * does not know that operations `Y` and `Z` happened.
479
+ *
480
+ * After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},
481
+ * one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`
482
+ * bases on up-to-date document state, so it can be applied to the document.
483
+ *
484
+ * ```
485
+ * History Undo stack
486
+ * ================= ==================================
487
+ * [ operation A1 ] [ batch A ]
488
+ * [ operation B1 ] [ batch B ]
489
+ * [ operation B2 ] [ processing undoing batch C ]
490
+ * [ operation C1 ]
491
+ * [ operation C2 ]
492
+ * [ operation B3 ]
493
+ * [ operation C3 ]
494
+ * [ operation C3r ]
495
+ * ```
496
+ *
497
+ * Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be
498
+ * transformed by operations from history that happened after it, so it "knows" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,
499
+ * where `*` means "transformed by". Rest of operations from that batch are processed in the same fashion.
500
+ *
501
+ * ```
502
+ * History Undo stack Redo stack
503
+ * ================= ================================== ==================================
504
+ * [ operation A1 ] [ batch A ] [ batch Cr ]
505
+ * [ operation B1 ] [ batch B ]
506
+ * [ operation B2 ]
507
+ * [ operation C1 ]
508
+ * [ operation C2 ]
509
+ * [ operation B3 ]
510
+ * [ operation C3 ]
511
+ * [ operation C3r ]
512
+ * [ operation C2' ]
513
+ * [ operation C1' ]
514
+ * ```
515
+ *
516
+ * Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.
517
+ * The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.
518
+ *
519
+ * Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from
520
+ * the batch that is re-done are reversed-back, transformed in proper order and applied to the document.
521
+ *
522
+ * ```
523
+ * History Undo stack Redo stack
524
+ * ================= ================================== ==================================
525
+ * [ operation A1 ] [ batch A ]
526
+ * [ operation B1 ] [ batch B ]
527
+ * [ operation B2 ] [ batch Crr ]
528
+ * [ operation C1 ]
529
+ * [ operation C2 ]
530
+ * [ operation B3 ]
531
+ * [ operation C3 ]
532
+ * [ operation C3r ]
533
+ * [ operation C2' ]
534
+ * [ operation C1' ]
535
+ * [ operation C1'r]
536
+ * [ operation C2'r]
537
+ * [ operation C3rr]
538
+ * ```
539
+ */
540
+ class Undo extends Plugin {
541
+ /**
542
+ * @inheritDoc
543
+ */
544
+ static get requires() {
545
+ return [UndoEditing, UndoUI];
546
+ }
547
+ /**
548
+ * @inheritDoc
549
+ */
550
+ static get pluginName() {
551
+ return 'Undo';
552
+ }
553
+ }
554
+
555
+ export { Undo, UndoEditing, UndoUI };
556
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js","../src/basecommand.ts","../src/undocommand.ts","../src/redocommand.ts","../src/undoediting.ts","../src/undoui.ts","../src/undo.ts"],"names":[],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACtF,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,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CAAA,CAAA,CAAA,CAAA,CAAA;ANyaD,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU;AMvad,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACI,CAAA,CAAA,CAAA,CAAA,MAAA,CAAA,GAAA,CAAW,UAAU,CAAA,CAAA,CAAA,CAAA;AAC3B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,CAAA,IAAA,CAAe,CAAC;ANyazB,CMxaE,CAAA,CAAA,CAAA,CAAA;AACD,CAAA;ANyaD;AACA,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Command, Plugin, icons } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { transformSets, NoOperation } from '@ckeditor/ckeditor5-engine/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module undo/basecommand\n */\n/**\n * Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.\n */\nclass BaseCommand extends Command {\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n /**\n * Stack of items stored by the command. These are pairs of:\n *\n * * {@link module:engine/model/batch~Batch batch} saved by the command,\n * * {@link module:engine/model/selection~Selection selection} state at the moment of saving the batch.\n */\n this._stack = [];\n /**\n * Stores all batches that were created by this command.\n *\n * @internal\n */\n this._createdBatches = new WeakSet();\n // Refresh state, so the command is inactive right after initialization.\n this.refresh();\n // This command should not depend on selection change.\n this._isEnabledBasedOnSelection = false;\n // Set the transparent batch for the `editor.data.set()` call if the\n // batch type is not set already.\n this.listenTo(editor.data, 'set', (evt, data) => {\n // Create a shallow copy of the options to not change the original args.\n // And make sure that an object is assigned to data[ 1 ].\n data[1] = { ...data[1] };\n const options = data[1];\n // If batch type is not set, default to non-undoable batch.\n if (!options.batchType) {\n options.batchType = { isUndoable: false };\n }\n }, { priority: 'high' });\n // Clear the stack for the `transparent` batches.\n this.listenTo(editor.data, 'set', (evt, data) => {\n // We can assume that the object exists and it has a `batchType` property.\n // It was ensured with a higher priority listener before.\n const options = data[1];\n if (!options.batchType.isUndoable) {\n this.clearStack();\n }\n });\n }\n /**\n * @inheritDoc\n */\n refresh() {\n this.isEnabled = this._stack.length > 0;\n }\n /**\n * Returns all batches created by this command.\n */\n get createdBatches() {\n return this._createdBatches;\n }\n /**\n * Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~Document document}\n * created by the editor which this command is registered to.\n *\n * @param batch The batch to add.\n */\n addBatch(batch) {\n const docSelection = this.editor.model.document.selection;\n const selection = {\n ranges: docSelection.hasOwnRange ? Array.from(docSelection.getRanges()) : [],\n isBackward: docSelection.isBackward\n };\n this._stack.push({ batch, selection });\n this.refresh();\n }\n /**\n * Removes all items from the stack.\n */\n clearStack() {\n this._stack = [];\n this.refresh();\n }\n /**\n * Restores the {@link module:engine/model/document~Document#selection document selection} state after a batch was undone.\n *\n * @param ranges Ranges to be restored.\n * @param isBackward A flag describing whether the restored range was selected forward or backward.\n * @param operations Operations which has been applied since selection has been stored.\n */\n _restoreSelection(ranges, isBackward, operations) {\n const model = this.editor.model;\n const document = model.document;\n // This will keep the transformed selection ranges.\n const selectionRanges = [];\n // Transform all ranges from the restored selection.\n const transformedRangeGroups = ranges.map(range => range.getTransformedByOperations(operations));\n const allRanges = transformedRangeGroups.flat();\n for (const rangeGroup of transformedRangeGroups) {\n // While transforming there could appear ranges that are contained by other ranges, we shall ignore them.\n const transformed = rangeGroup\n .filter(range => range.root != document.graveyard)\n .filter(range => !isRangeContainedByAnyOtherRange(range, allRanges));\n // All the transformed ranges ended up in graveyard.\n if (!transformed.length) {\n continue;\n }\n // After the range got transformed, we have an array of ranges. Some of those\n // ranges may be \"touching\" -- they can be next to each other and could be merged.\n normalizeRanges(transformed);\n // For each `range` from `ranges`, we take only one transformed range.\n // This is because we want to prevent situation where single-range selection\n // got transformed to multi-range selection.\n selectionRanges.push(transformed[0]);\n }\n // @if CK_DEBUG_ENGINE // console.log( `Restored selection by undo: ${ selectionRanges.join( ', ' ) }` );\n // `selectionRanges` may be empty if all ranges ended up in graveyard. If that is the case, do not restore selection.\n if (selectionRanges.length) {\n model.change(writer => {\n writer.setSelection(selectionRanges, { backward: isBackward });\n });\n }\n }\n /**\n * Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.\n * This is a helper method for {@link #execute}.\n *\n * @param batchToUndo The batch to be undone.\n * @param undoingBatch The batch that will contain undoing changes.\n */\n _undo(batchToUndo, undoingBatch) {\n const model = this.editor.model;\n const document = model.document;\n // All changes done by the command execution will be saved as one batch.\n this._createdBatches.add(undoingBatch);\n const operationsToUndo = batchToUndo.operations.slice().filter(operation => operation.isDocumentOperation);\n operationsToUndo.reverse();\n // We will process each operation from `batchToUndo`, in reverse order. If there were operations A, B and C in undone batch,\n // we need to revert them in reverse order, so first C' (reversed C), then B', then A'.\n for (const operationToUndo of operationsToUndo) {\n const nextBaseVersion = operationToUndo.baseVersion + 1;\n const historyOperations = Array.from(document.history.getOperations(nextBaseVersion));\n const transformedSets = transformSets([operationToUndo.getReversed()], historyOperations, {\n useRelations: true,\n document: this.editor.model.document,\n padWithNoOps: false,\n forceWeakRemove: true\n });\n const reversedOperations = transformedSets.operationsA;\n // After reversed operation has been transformed by all history operations, apply it.\n for (let operation of reversedOperations) {\n // Do not apply any operation on non-editable space.\n const affectedSelectable = operation.affectedSelectable;\n if (affectedSelectable && !model.canEditAt(affectedSelectable)) {\n operation = new NoOperation(operation.baseVersion);\n }\n // Before applying, add the operation to the `undoingBatch`.\n undoingBatch.addOperation(operation);\n model.applyOperation(operation);\n document.history.setOperationAsUndone(operationToUndo, operation);\n }\n }\n }\n}\n/**\n * Normalizes list of ranges by joining intersecting or \"touching\" ranges.\n *\n * @param ranges Ranges to be normalized.\n */\nfunction normalizeRanges(ranges) {\n ranges.sort((a, b) => a.start.isBefore(b.start) ? -1 : 1);\n for (let i = 1; i < ranges.length; i++) {\n const previousRange = ranges[i - 1];\n const joinedRange = previousRange.getJoined(ranges[i], true);\n if (joinedRange) {\n // Replace the ranges on the list with the new joined range.\n i--;\n ranges.splice(i, 2, joinedRange);\n }\n }\n}\nfunction isRangeContainedByAnyOtherRange(range, ranges) {\n return ranges.some(otherRange => otherRange !== range && otherRange.containsRange(range, true));\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module undo/undocommand\n */\n/**\n * The undo command stores {@link module:engine/model/batch~Batch batches} applied to the\n * {@link module:engine/model/document~Document document} and is able to undo a batch by reversing it and transforming by\n * batches from {@link module:engine/model/document~Document#history history} that happened after the reversed batch.\n *\n * The undo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.\n */\nclass UndoCommand extends BaseCommand {\n /**\n * Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms\n * and applies the reverted version on the {@link module:engine/model/document~Document document} and removes the batch from the stack.\n * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.\n *\n * @fires execute\n * @fires revert\n * @param batch A batch that should be undone. If not set, the last added batch will be undone.\n */\n execute(batch = null) {\n // If batch is not given, set `batchIndex` to the last index in command stack.\n const batchIndex = batch ? this._stack.findIndex(a => a.batch == batch) : this._stack.length - 1;\n const item = this._stack.splice(batchIndex, 1)[0];\n const undoingBatch = this.editor.model.createBatch({ isUndo: true });\n // All changes have to be done in one `enqueueChange` callback so other listeners will not\n // step between consecutive operations, or won't do changes to the document before selection is properly restored.\n this.editor.model.enqueueChange(undoingBatch, () => {\n this._undo(item.batch, undoingBatch);\n const operations = this.editor.model.document.history.getOperations(item.batch.baseVersion);\n this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);\n });\n // Firing `revert` event after the change block to make sure that it includes all changes from post-fixers\n // and make sure that the selection is \"stabilized\" (the selection range is saved after undo is executed and then\n // restored on redo, so it is important that the selection range is saved after post-fixers are done).\n this.fire('revert', item.batch, undoingBatch);\n this.refresh();\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module undo/redocommand\n */\n/**\n * The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by\n * {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing\n * batches created by `UndoCommand`. The reversed batch is transformed by all the batches from\n * {@link module:engine/model/document~Document#history history} that happened after the reversed undo batch.\n *\n * The redo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.\n */\nclass RedoCommand extends BaseCommand {\n /**\n * Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to\n * the command's stack, applies the reverted and transformed version on the\n * {@link module:engine/model/document~Document document} and removes the batch from the stack.\n * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.\n *\n * @fires execute\n */\n execute() {\n const item = this._stack.pop();\n const redoingBatch = this.editor.model.createBatch({ isUndo: true });\n // All changes have to be done in one `enqueueChange` callback so other listeners will not step between consecutive\n // operations, or won't do changes to the document before selection is properly restored.\n this.editor.model.enqueueChange(redoingBatch, () => {\n const lastOperation = item.batch.operations[item.batch.operations.length - 1];\n const nextBaseVersion = lastOperation.baseVersion + 1;\n const operations = this.editor.model.document.history.getOperations(nextBaseVersion);\n this._restoreSelection(item.selection.ranges, item.selection.isBackward, operations);\n this._undo(item.batch, redoingBatch);\n });\n this.refresh();\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module undo/undoediting\n */\n/**\n * The undo engine feature.\n *\n * It introduces the `'undo'` and `'redo'` commands to the editor.\n */\nclass UndoEditing extends Plugin {\n constructor() {\n super(...arguments);\n /**\n * Keeps track of which batches were registered in undo.\n */\n this._batchRegistry = new WeakSet();\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'UndoEditing';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const t = editor.t;\n // Create commands.\n this._undoCommand = new UndoCommand(editor);\n this._redoCommand = new RedoCommand(editor);\n // Register command to the editor.\n editor.commands.add('undo', this._undoCommand);\n editor.commands.add('redo', this._redoCommand);\n this.listenTo(editor.model, 'applyOperation', (evt, args) => {\n const operation = args[0];\n // Do not register batch if the operation is not a document operation.\n // This prevents from creating empty undo steps, where all operations where non-document operations.\n // Non-document operations creates and alters content in detached tree fragments (for example, document fragments).\n // Most of time this is preparing data before it is inserted into actual tree (for example during copy & paste).\n // Such operations should not be reversed.\n if (!operation.isDocumentOperation) {\n return;\n }\n const batch = operation.batch;\n const isRedoBatch = this._redoCommand.createdBatches.has(batch);\n const isUndoBatch = this._undoCommand.createdBatches.has(batch);\n const wasProcessed = this._batchRegistry.has(batch);\n // Skip the batch if it was already processed.\n if (wasProcessed) {\n return;\n }\n // Add the batch to the registry so it will not be processed again.\n this._batchRegistry.add(batch);\n if (!batch.isUndoable) {\n return;\n }\n if (isRedoBatch) {\n // If this batch comes from `redoCommand`, add it to the `undoCommand` stack.\n this._undoCommand.addBatch(batch);\n }\n else if (!isUndoBatch) {\n // If the batch comes neither from `redoCommand` nor from `undoCommand` then it is a new, regular batch.\n // Add the batch to the `undoCommand` stack and clear the `redoCommand` stack.\n this._undoCommand.addBatch(batch);\n this._redoCommand.clearStack();\n }\n }, { priority: 'highest' });\n this.listenTo(this._undoCommand, 'revert', (evt, undoneBatch, undoingBatch) => {\n this._redoCommand.addBatch(undoingBatch);\n });\n editor.keystrokes.set('CTRL+Z', 'undo');\n editor.keystrokes.set('CTRL+Y', 'redo');\n editor.keystrokes.set('CTRL+SHIFT+Z', 'redo');\n // Add the information about the keystrokes to the accessibility database.\n editor.accessibility.addKeystrokeInfos({\n keystrokes: [\n {\n label: t('Undo'),\n keystroke: 'CTRL+Z'\n },\n {\n label: t('Redo'),\n keystroke: [['CTRL+Y'], ['CTRL+SHIFT+Z']]\n }\n ]\n });\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module undo/undoui\n */\n/**\n * The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.\n */\nclass UndoUI extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'UndoUI';\n }\n /**\n * @inheritDoc\n */\n init() {\n const editor = this.editor;\n const locale = editor.locale;\n const t = editor.t;\n const localizedUndoIcon = locale.uiLanguageDirection == 'ltr' ? icons.undo : icons.redo;\n const localizedRedoIcon = locale.uiLanguageDirection == 'ltr' ? icons.redo : icons.undo;\n this._addButton('undo', t('Undo'), 'CTRL+Z', localizedUndoIcon);\n this._addButton('redo', t('Redo'), 'CTRL+Y', localizedRedoIcon);\n }\n /**\n * Creates a button for the specified command.\n *\n * @param name Command name.\n * @param label Button label.\n * @param keystroke Command keystroke.\n * @param Icon Source of the icon.\n */\n _addButton(name, label, keystroke, Icon) {\n const editor = this.editor;\n editor.ui.componentFactory.add(name, locale => {\n const command = editor.commands.get(name);\n const view = new ButtonView(locale);\n view.set({\n label,\n icon: Icon,\n keystroke,\n tooltip: true\n });\n view.bind('isEnabled').to(command, 'isEnabled');\n this.listenTo(view, 'execute', () => {\n editor.execute(name);\n editor.editing.view.focus();\n });\n return view;\n });\n }\n}\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module undo/undo\n */\n/**\n * The undo feature.\n *\n * This is a \"glue\" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}\n * and the {@link module:undo/undoui~UndoUI undo UI feature}.\n *\n * Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:\n *\n * Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the\n * {@link module:engine/model/document~Document document}, it is saved to `History` as is.\n * The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in\n * {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the\n * operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation\n * and a batch is seen as one undo step.\n *\n * After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:\n *\n * ```\n * History Undo stack\n * ============== ==================================\n * [operation A1] [ batch A ]\n * [operation B1] [ batch B ]\n * [operation B2] [ batch C ]\n * [operation C1]\n * [operation C2]\n * [operation B3]\n * [operation C3]\n * ```\n *\n * Where operations starting with the same letter are from same batch.\n *\n * Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.\n * For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing\n * operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`\n * need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`\n * does not know that operations `Y` and `Z` happened.\n *\n * After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},\n * one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`\n * bases on up-to-date document state, so it can be applied to the document.\n *\n * ```\n * History Undo stack\n * ================= ==================================\n * [ operation A1 ] [ batch A ]\n * [ operation B1 ] [ batch B ]\n * [ operation B2 ] [ processing undoing batch C ]\n * [ operation C1 ]\n * [ operation C2 ]\n * [ operation B3 ]\n * [ operation C3 ]\n * [ operation C3r ]\n * ```\n *\n * Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be\n * transformed by operations from history that happened after it, so it \"knows\" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,\n * where `*` means \"transformed by\". Rest of operations from that batch are processed in the same fashion.\n *\n * ```\n * History Undo stack Redo stack\n * ================= ================================== ==================================\n * [ operation A1 ] [ batch A ] [ batch Cr ]\n * [ operation B1 ] [ batch B ]\n * [ operation B2 ]\n * [ operation C1 ]\n * [ operation C2 ]\n * [ operation B3 ]\n * [ operation C3 ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * ```\n *\n * Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.\n * The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.\n *\n * Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from\n * the batch that is re-done are reversed-back, transformed in proper order and applied to the document.\n *\n * ```\n * History Undo stack Redo stack\n * ================= ================================== ==================================\n * [ operation A1 ] [ batch A ]\n * [ operation B1 ] [ batch B ]\n * [ operation B2 ] [ batch Crr ]\n * [ operation C1 ]\n * [ operation C2 ]\n * [ operation B3 ]\n * [ operation C3 ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * [ operation C1'r]\n * [ operation C2'r]\n * [ operation C3rr]\n * ```\n */\nclass Undo extends Plugin {\n /**\n * @inheritDoc\n */\n static get requires() {\n return [UndoEditing, UndoUI];\n }\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'Undo';\n }\n}\n\nexport { Undo, UndoEditing, UndoUI };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module undo/basecommand\n */\n\nimport { Command, type Editor } from '@ckeditor/ckeditor5-core';\n\nimport {\n\ttransformSets,\n\ttype Batch,\n\ttype Operation,\n\ttype DataControllerSetEvent,\n\ttype Range,\n\tNoOperation\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.\n */\nexport default abstract class BaseCommand extends Command {\n\t/**\n\t * Stack of items stored by the command. These are pairs of:\n\t *\n\t * * {@link module:engine/model/batch~Batch batch} saved by the command,\n\t * * {@link module:engine/model/selection~Selection selection} state at the moment of saving the batch.\n\t */\n\tprotected _stack: Array<{ batch: Batch; selection: { ranges: Array<Range>; isBackward: boolean } }> = [];\n\n\t/**\n\t * Stores all batches that were created by this command.\n\t *\n\t * @internal\n\t */\n\tpublic _createdBatches = new WeakSet<Batch>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\t// Refresh state, so the command is inactive right after initialization.\n\t\tthis.refresh();\n\n\t\t// This command should not depend on selection change.\n\t\tthis._isEnabledBasedOnSelection = false;\n\n\t\t// Set the transparent batch for the `editor.data.set()` call if the\n\t\t// batch type is not set already.\n\t\tthis.listenTo<DataControllerSetEvent>( editor.data, 'set', ( evt, data ) => {\n\t\t\t// Create a shallow copy of the options to not change the original args.\n\t\t\t// And make sure that an object is assigned to data[ 1 ].\n\t\t\tdata[ 1 ] = { ...data[ 1 ] };\n\n\t\t\tconst options = data[ 1 ];\n\n\t\t\t// If batch type is not set, default to non-undoable batch.\n\t\t\tif ( !options.batchType ) {\n\t\t\t\toptions.batchType = { isUndoable: false };\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// Clear the stack for the `transparent` batches.\n\t\tthis.listenTo<DataControllerSetEvent>( editor.data, 'set', ( evt, data ) => {\n\t\t\t// We can assume that the object exists and it has a `batchType` property.\n\t\t\t// It was ensured with a higher priority listener before.\n\t\t\tconst options = data[ 1 ]!;\n\n\t\t\tif ( !options.batchType!.isUndoable ) {\n\t\t\t\tthis.clearStack();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override refresh(): void {\n\t\tthis.isEnabled = this._stack.length > 0;\n\t}\n\n\t/**\n\t * Returns all batches created by this command.\n\t */\n\tpublic get createdBatches(): WeakSet<Batch> {\n\t\treturn this._createdBatches;\n\t}\n\n\t/**\n\t * Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~Document document}\n\t * created by the editor which this command is registered to.\n\t *\n\t * @param batch The batch to add.\n\t */\n\tpublic addBatch( batch: Batch ): void {\n\t\tconst docSelection = this.editor.model.document.selection;\n\n\t\tconst selection = {\n\t\t\tranges: docSelection.hasOwnRange ? Array.from( docSelection.getRanges() ) : [],\n\t\t\tisBackward: docSelection.isBackward\n\t\t};\n\n\t\tthis._stack.push( { batch, selection } );\n\t\tthis.refresh();\n\t}\n\n\t/**\n\t * Removes all items from the stack.\n\t */\n\tpublic clearStack(): void {\n\t\tthis._stack = [];\n\t\tthis.refresh();\n\t}\n\n\t/**\n\t * Restores the {@link module:engine/model/document~Document#selection document selection} state after a batch was undone.\n\t *\n\t * @param ranges Ranges to be restored.\n\t * @param isBackward A flag describing whether the restored range was selected forward or backward.\n\t * @param operations Operations which has been applied since selection has been stored.\n\t */\n\tprotected _restoreSelection(\n\t\tranges: Array<Range>,\n\t\tisBackward: boolean,\n\t\toperations: Array<Operation>\n\t): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\t// This will keep the transformed selection ranges.\n\t\tconst selectionRanges: Array<Range> = [];\n\n\t\t// Transform all ranges from the restored selection.\n\t\tconst transformedRangeGroups = ranges.map( range => range.getTransformedByOperations( operations ) );\n\t\tconst allRanges = transformedRangeGroups.flat();\n\n\t\tfor ( const rangeGroup of transformedRangeGroups ) {\n\t\t\t// While transforming there could appear ranges that are contained by other ranges, we shall ignore them.\n\t\t\tconst transformed = rangeGroup\n\t\t\t\t.filter( range => range.root != document.graveyard )\n\t\t\t\t.filter( range => !isRangeContainedByAnyOtherRange( range, allRanges ) );\n\n\t\t\t// All the transformed ranges ended up in graveyard.\n\t\t\tif ( !transformed.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// After the range got transformed, we have an array of ranges. Some of those\n\t\t\t// ranges may be \"touching\" -- they can be next to each other and could be merged.\n\t\t\tnormalizeRanges( transformed );\n\n\t\t\t// For each `range` from `ranges`, we take only one transformed range.\n\t\t\t// This is because we want to prevent situation where single-range selection\n\t\t\t// got transformed to multi-range selection.\n\t\t\tselectionRanges.push( transformed[ 0 ] );\n\t\t}\n\n\t\t// @if CK_DEBUG_ENGINE // console.log( `Restored selection by undo: ${ selectionRanges.join( ', ' ) }` );\n\n\t\t// `selectionRanges` may be empty if all ranges ended up in graveyard. If that is the case, do not restore selection.\n\t\tif ( selectionRanges.length ) {\n\t\t\tmodel.change( writer => {\n\t\t\t\twriter.setSelection( selectionRanges, { backward: isBackward } );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.\n\t * This is a helper method for {@link #execute}.\n\t *\n\t * @param batchToUndo The batch to be undone.\n\t * @param undoingBatch The batch that will contain undoing changes.\n\t */\n\tprotected _undo( batchToUndo: Batch, undoingBatch: Batch ): void {\n\t\tconst model = this.editor.model;\n\t\tconst document = model.document;\n\n\t\t// All changes done by the command execution will be saved as one batch.\n\t\tthis._createdBatches.add( undoingBatch );\n\n\t\tconst operationsToUndo = batchToUndo.operations.slice().filter( operation => operation.isDocumentOperation );\n\t\toperationsToUndo.reverse();\n\n\t\t// We will process each operation from `batchToUndo`, in reverse order. If there were operations A, B and C in undone batch,\n\t\t// we need to revert them in reverse order, so first C' (reversed C), then B', then A'.\n\t\tfor ( const operationToUndo of operationsToUndo ) {\n\t\t\tconst nextBaseVersion = operationToUndo.baseVersion! + 1;\n\t\t\tconst historyOperations = Array.from( document.history.getOperations( nextBaseVersion ) );\n\n\t\t\tconst transformedSets = transformSets(\n\t\t\t\t[ operationToUndo.getReversed() ],\n\t\t\t\thistoryOperations,\n\t\t\t\t{\n\t\t\t\t\tuseRelations: true,\n\t\t\t\t\tdocument: this.editor.model.document,\n\t\t\t\t\tpadWithNoOps: false,\n\t\t\t\t\tforceWeakRemove: true\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst reversedOperations = transformedSets.operationsA;\n\n\t\t\t// After reversed operation has been transformed by all history operations, apply it.\n\t\t\tfor ( let operation of reversedOperations ) {\n\t\t\t\t// Do not apply any operation on non-editable space.\n\t\t\t\tconst affectedSelectable = operation.affectedSelectable;\n\n\t\t\t\tif ( affectedSelectable && !model.canEditAt( affectedSelectable ) ) {\n\t\t\t\t\toperation = new NoOperation( operation.baseVersion );\n\t\t\t\t}\n\n\t\t\t\t// Before applying, add the operation to the `undoingBatch`.\n\t\t\t\tundoingBatch.addOperation( operation );\n\t\t\t\tmodel.applyOperation( operation );\n\n\t\t\t\tdocument.history.setOperationAsUndone( operationToUndo, operation );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Normalizes list of ranges by joining intersecting or \"touching\" ranges.\n *\n * @param ranges Ranges to be normalized.\n */\nfunction normalizeRanges( ranges: Array<Range> ): void {\n\tranges.sort( ( a, b ) => a.start.isBefore( b.start ) ? -1 : 1 );\n\n\tfor ( let i = 1; i < ranges.length; i++ ) {\n\t\tconst previousRange = ranges[ i - 1 ];\n\t\tconst joinedRange = previousRange.getJoined( ranges[ i ], true );\n\n\t\tif ( joinedRange ) {\n\t\t\t// Replace the ranges on the list with the new joined range.\n\t\t\ti--;\n\t\t\tranges.splice( i, 2, joinedRange );\n\t\t}\n\t}\n}\n\nfunction isRangeContainedByAnyOtherRange( range: Range, ranges: Array<Range> ): boolean {\n\treturn ranges.some( otherRange => otherRange !== range && otherRange.containsRange( range, true ) );\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module undo/undocommand\n */\n\nimport BaseCommand from './basecommand.js';\nimport type { Batch } from '@ckeditor/ckeditor5-engine';\n\n/**\n * The undo command stores {@link module:engine/model/batch~Batch batches} applied to the\n * {@link module:engine/model/document~Document document} and is able to undo a batch by reversing it and transforming by\n * batches from {@link module:engine/model/document~Document#history history} that happened after the reversed batch.\n *\n * The undo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.\n */\nexport default class UndoCommand extends BaseCommand {\n\t/**\n\t * Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms\n\t * and applies the reverted version on the {@link module:engine/model/document~Document document} and removes the batch from the stack.\n\t * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.\n\t *\n\t * @fires execute\n\t * @fires revert\n\t * @param batch A batch that should be undone. If not set, the last added batch will be undone.\n\t */\n\tpublic override execute( batch: Batch | null = null ): void {\n\t\t// If batch is not given, set `batchIndex` to the last index in command stack.\n\t\tconst batchIndex = batch ? this._stack.findIndex( a => a.batch == batch ) : this._stack.length - 1;\n\n\t\tconst item = this._stack.splice( batchIndex, 1 )[ 0 ];\n\t\tconst undoingBatch = this.editor.model.createBatch( { isUndo: true } );\n\n\t\t// All changes have to be done in one `enqueueChange` callback so other listeners will not\n\t\t// step between consecutive operations, or won't do changes to the document before selection is properly restored.\n\t\tthis.editor.model.enqueueChange( undoingBatch, () => {\n\t\t\tthis._undo( item.batch, undoingBatch );\n\n\t\t\tconst operations = this.editor.model.document.history.getOperations( item.batch.baseVersion! );\n\t\t\tthis._restoreSelection( item.selection.ranges, item.selection.isBackward, operations );\n\t\t} );\n\n\t\t// Firing `revert` event after the change block to make sure that it includes all changes from post-fixers\n\t\t// and make sure that the selection is \"stabilized\" (the selection range is saved after undo is executed and then\n\t\t// restored on redo, so it is important that the selection range is saved after post-fixers are done).\n\t\tthis.fire<UndoCommandRevertEvent>( 'revert', item.batch, undoingBatch );\n\n\t\tthis.refresh();\n\t}\n}\n\n/**\n * Fired when execution of the command reverts some batch.\n *\n * @eventName ~UndoCommand#revert\n */\nexport type UndoCommandRevertEvent = {\n\tname: 'revert';\n\targs: [ batch: Batch, undoingBatch: Batch ];\n};\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module undo/redocommand\n */\n\nimport BaseCommand from './basecommand.js';\n\n/**\n * The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by\n * {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing\n * batches created by `UndoCommand`. The reversed batch is transformed by all the batches from\n * {@link module:engine/model/document~Document#history history} that happened after the reversed undo batch.\n *\n * The redo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.\n */\nexport default class RedoCommand extends BaseCommand {\n\t/**\n\t * Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to\n\t * the command's stack, applies the reverted and transformed version on the\n\t * {@link module:engine/model/document~Document document} and removes the batch from the stack.\n\t * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.\n\t *\n\t * @fires execute\n\t */\n\tpublic override execute(): void {\n\t\tconst item = this._stack.pop()!;\n\t\tconst redoingBatch = this.editor.model.createBatch( { isUndo: true } );\n\n\t\t// All changes have to be done in one `enqueueChange` callback so other listeners will not step between consecutive\n\t\t// operations, or won't do changes to the document before selection is properly restored.\n\t\tthis.editor.model.enqueueChange( redoingBatch, () => {\n\t\t\tconst lastOperation = item.batch.operations[ item.batch.operations.length - 1 ];\n\t\t\tconst nextBaseVersion = lastOperation.baseVersion! + 1;\n\t\t\tconst operations = this.editor.model.document.history.getOperations( nextBaseVersion );\n\n\t\t\tthis._restoreSelection( item.selection.ranges, item.selection.isBackward, operations );\n\t\t\tthis._undo( item.batch, redoingBatch );\n\t\t} );\n\n\t\tthis.refresh();\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module undo/undoediting\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\n\nimport UndoCommand, { type UndoCommandRevertEvent } from './undocommand.js';\nimport RedoCommand from './redocommand.js';\n\nimport type {\n\tBatch,\n\tModelApplyOperationEvent\n} from '@ckeditor/ckeditor5-engine';\n\n/**\n * The undo engine feature.\n *\n * It introduces the `'undo'` and `'redo'` commands to the editor.\n */\nexport default class UndoEditing extends Plugin {\n\t/**\n\t * The command that manages the undo {@link module:engine/model/batch~Batch batches} stack (history).\n\t * Created and registered during the {@link #init feature initialization}.\n\t */\n\tprivate _undoCommand!: UndoCommand;\n\n\t/**\n\t * The command that manages the redo {@link module:engine/model/batch~Batch batches} stack (history).\n\t * Created and registered during the {@link #init feature initialization}.\n\t */\n\tprivate _redoCommand!: RedoCommand;\n\n\t/**\n\t * Keeps track of which batches were registered in undo.\n\t */\n\tprivate _batchRegistry = new WeakSet<Batch>();\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'UndoEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\t// Create commands.\n\t\tthis._undoCommand = new UndoCommand( editor );\n\t\tthis._redoCommand = new RedoCommand( editor );\n\n\t\t// Register command to the editor.\n\t\teditor.commands.add( 'undo', this._undoCommand );\n\t\teditor.commands.add( 'redo', this._redoCommand );\n\n\t\tthis.listenTo<ModelApplyOperationEvent>( editor.model, 'applyOperation', ( evt, args ) => {\n\t\t\tconst operation = args[ 0 ];\n\n\t\t\t// Do not register batch if the operation is not a document operation.\n\t\t\t// This prevents from creating empty undo steps, where all operations where non-document operations.\n\t\t\t// Non-document operations creates and alters content in detached tree fragments (for example, document fragments).\n\t\t\t// Most of time this is preparing data before it is inserted into actual tree (for example during copy & paste).\n\t\t\t// Such operations should not be reversed.\n\t\t\tif ( !operation.isDocumentOperation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst batch = operation.batch!;\n\n\t\t\tconst isRedoBatch = this._redoCommand.createdBatches.has( batch );\n\t\t\tconst isUndoBatch = this._undoCommand.createdBatches.has( batch );\n\t\t\tconst wasProcessed = this._batchRegistry.has( batch );\n\n\t\t\t// Skip the batch if it was already processed.\n\t\t\tif ( wasProcessed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the batch to the registry so it will not be processed again.\n\t\t\tthis._batchRegistry.add( batch );\n\n\t\t\tif ( !batch.isUndoable ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isRedoBatch ) {\n\t\t\t\t// If this batch comes from `redoCommand`, add it to the `undoCommand` stack.\n\t\t\t\tthis._undoCommand.addBatch( batch );\n\t\t\t} else if ( !isUndoBatch ) {\n\t\t\t\t// If the batch comes neither from `redoCommand` nor from `undoCommand` then it is a new, regular batch.\n\t\t\t\t// Add the batch to the `undoCommand` stack and clear the `redoCommand` stack.\n\t\t\t\tthis._undoCommand.addBatch( batch );\n\t\t\t\tthis._redoCommand.clearStack();\n\t\t\t}\n\t\t}, { priority: 'highest' } );\n\n\t\tthis.listenTo<UndoCommandRevertEvent>( this._undoCommand, 'revert', ( evt, undoneBatch, undoingBatch ) => {\n\t\t\tthis._redoCommand.addBatch( undoingBatch );\n\t\t} );\n\n\t\teditor.keystrokes.set( 'CTRL+Z', 'undo' );\n\t\teditor.keystrokes.set( 'CTRL+Y', 'redo' );\n\t\teditor.keystrokes.set( 'CTRL+SHIFT+Z', 'redo' );\n\n\t\t// Add the information about the keystrokes to the accessibility database.\n\t\teditor.accessibility.addKeystrokeInfos( {\n\t\t\tkeystrokes: [\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Undo' ),\n\t\t\t\t\tkeystroke: 'CTRL+Z'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t( 'Redo' ),\n\t\t\t\t\tkeystroke: [ [ 'CTRL+Y' ], [ 'CTRL+SHIFT+Z' ] ]\n\t\t\t\t}\n\t\t\t]\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module undo/undoui\n */\n\nimport { icons, Plugin } from '@ckeditor/ckeditor5-core';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui';\n\n/**\n * The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.\n */\nexport default class UndoUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'UndoUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst locale = editor.locale;\n\t\tconst t = editor.t;\n\n\t\tconst localizedUndoIcon = locale.uiLanguageDirection == 'ltr' ? icons.undo : icons.redo;\n\t\tconst localizedRedoIcon = locale.uiLanguageDirection == 'ltr' ? icons.redo : icons.undo;\n\n\t\tthis._addButton( 'undo', t( 'Undo' ), 'CTRL+Z', localizedUndoIcon );\n\t\tthis._addButton( 'redo', t( 'Redo' ), 'CTRL+Y', localizedRedoIcon );\n\t}\n\n\t/**\n\t * Creates a button for the specified command.\n\t *\n\t * @param name Command name.\n\t * @param label Button label.\n\t * @param keystroke Command keystroke.\n\t * @param Icon Source of the icon.\n\t */\n\tprivate _addButton( name: 'undo' | 'redo', label: string, keystroke: string, Icon: string ) {\n\t\tconst editor = this.editor;\n\n\t\teditor.ui.componentFactory.add( name, locale => {\n\t\t\tconst command = editor.commands.get( name )!;\n\t\t\tconst view = new ButtonView( locale );\n\n\t\t\tview.set( {\n\t\t\t\tlabel,\n\t\t\t\ticon: Icon,\n\t\t\t\tkeystroke,\n\t\t\t\ttooltip: true\n\t\t\t} );\n\n\t\t\tview.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\n\t\t\tthis.listenTo( view, 'execute', () => {\n\t\t\t\teditor.execute( name );\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\treturn view;\n\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module undo/undo\n */\n\nimport { Plugin } from '@ckeditor/ckeditor5-core';\nimport UndoEditing from './undoediting.js';\nimport UndoUI from './undoui.js';\n\n/**\n * The undo feature.\n *\n * This is a \"glue\" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}\n * and the {@link module:undo/undoui~UndoUI undo UI feature}.\n *\n * Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:\n *\n * Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the\n * {@link module:engine/model/document~Document document}, it is saved to `History` as is.\n * The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in\n * {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the\n * operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation\n * and a batch is seen as one undo step.\n *\n * After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:\n *\n * ```\n * History Undo stack\n * ============== ==================================\n * [operation A1] [ batch A ]\n * [operation B1] [ batch B ]\n * [operation B2] [ batch C ]\n * [operation C1]\n * [operation C2]\n * [operation B3]\n * [operation C3]\n * ```\n *\n * Where operations starting with the same letter are from same batch.\n *\n * Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.\n * For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing\n * operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`\n * need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`\n * does not know that operations `Y` and `Z` happened.\n *\n * After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},\n * one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`\n * bases on up-to-date document state, so it can be applied to the document.\n *\n * ```\n * History Undo stack\n * ================= ==================================\n * [ operation A1 ] [ batch A ]\n * [ operation B1 ] [ batch B ]\n * [ operation B2 ] [ processing undoing batch C ]\n * [ operation C1 ]\n * [ operation C2 ]\n * [ operation B3 ]\n * [ operation C3 ]\n * [ operation C3r ]\n * ```\n *\n * Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be\n * transformed by operations from history that happened after it, so it \"knows\" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,\n * where `*` means \"transformed by\". Rest of operations from that batch are processed in the same fashion.\n *\n * ```\n * History Undo stack Redo stack\n * ================= ================================== ==================================\n * [ operation A1 ] [ batch A ] [ batch Cr ]\n * [ operation B1 ] [ batch B ]\n * [ operation B2 ]\n * [ operation C1 ]\n * [ operation C2 ]\n * [ operation B3 ]\n * [ operation C3 ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * ```\n *\n * Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.\n * The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.\n *\n * Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from\n * the batch that is re-done are reversed-back, transformed in proper order and applied to the document.\n *\n * ```\n * History Undo stack Redo stack\n * ================= ================================== ==================================\n * [ operation A1 ] [ batch A ]\n * [ operation B1 ] [ batch B ]\n * [ operation B2 ] [ batch Crr ]\n * [ operation C1 ]\n * [ operation C2 ]\n * [ operation B3 ]\n * [ operation C3 ]\n * [ operation C3r ]\n * [ operation C2' ]\n * [ operation C1' ]\n * [ operation C1'r]\n * [ operation C2'r]\n * [ operation C3rr]\n * ```\n */\nexport default class Undo extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ UndoEditing, UndoUI ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'Undo' as const;\n\t}\n}\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ import type { Undo, UndoEditing, UndoUI, UndoCommand, RedoCommand } from './index.js';
6
+ declare module '@ckeditor/ckeditor5-core' {
7
+ interface CommandsMap {
8
+ undo: UndoCommand;
9
+ redo: RedoCommand;
10
+ }
11
+ interface PluginsMap {
12
+ [Undo.pluginName]: Undo;
13
+ [UndoEditing.pluginName]: UndoEditing;
14
+ [UndoUI.pluginName]: UndoUI;
15
+ }
16
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo/basecommand
7
+ */
8
+ import { Command, type Editor } from '@ckeditor/ckeditor5-core';
9
+ import { type Batch, type Operation, type Range } from '@ckeditor/ckeditor5-engine';
10
+ /**
11
+ * Base class for the undo feature commands: {@link module:undo/undocommand~UndoCommand} and {@link module:undo/redocommand~RedoCommand}.
12
+ */
13
+ export default abstract class BaseCommand extends Command {
14
+ /**
15
+ * Stack of items stored by the command. These are pairs of:
16
+ *
17
+ * * {@link module:engine/model/batch~Batch batch} saved by the command,
18
+ * * {@link module:engine/model/selection~Selection selection} state at the moment of saving the batch.
19
+ */
20
+ protected _stack: Array<{
21
+ batch: Batch;
22
+ selection: {
23
+ ranges: Array<Range>;
24
+ isBackward: boolean;
25
+ };
26
+ }>;
27
+ /**
28
+ * Stores all batches that were created by this command.
29
+ *
30
+ * @internal
31
+ */
32
+ _createdBatches: WeakSet<Batch>;
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ constructor(editor: Editor);
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ refresh(): void;
41
+ /**
42
+ * Returns all batches created by this command.
43
+ */
44
+ get createdBatches(): WeakSet<Batch>;
45
+ /**
46
+ * Stores a batch in the command, together with the selection state of the {@link module:engine/model/document~Document document}
47
+ * created by the editor which this command is registered to.
48
+ *
49
+ * @param batch The batch to add.
50
+ */
51
+ addBatch(batch: Batch): void;
52
+ /**
53
+ * Removes all items from the stack.
54
+ */
55
+ clearStack(): void;
56
+ /**
57
+ * Restores the {@link module:engine/model/document~Document#selection document selection} state after a batch was undone.
58
+ *
59
+ * @param ranges Ranges to be restored.
60
+ * @param isBackward A flag describing whether the restored range was selected forward or backward.
61
+ * @param operations Operations which has been applied since selection has been stored.
62
+ */
63
+ protected _restoreSelection(ranges: Array<Range>, isBackward: boolean, operations: Array<Operation>): void;
64
+ /**
65
+ * Undoes a batch by reversing that batch, transforming reversed batch and finally applying it.
66
+ * This is a helper method for {@link #execute}.
67
+ *
68
+ * @param batchToUndo The batch to be undone.
69
+ * @param undoingBatch The batch that will contain undoing changes.
70
+ */
71
+ protected _undo(batchToUndo: Batch, undoingBatch: Batch): void;
72
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo
7
+ */
8
+ export { default as Undo } from './undo.js';
9
+ export { default as UndoEditing } from './undoediting.js';
10
+ export { default as UndoUI } from './undoui.js';
11
+ export type { default as UndoCommand } from './undocommand.js';
12
+ export type { default as RedoCommand } from './redocommand.js';
13
+ import './augmentation.js';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo/redocommand
7
+ */
8
+ import BaseCommand from './basecommand.js';
9
+ /**
10
+ * The redo command stores {@link module:engine/model/batch~Batch batches} that were used to undo a batch by
11
+ * {@link module:undo/undocommand~UndoCommand}. It is able to redo a previously undone batch by reversing the undoing
12
+ * batches created by `UndoCommand`. The reversed batch is transformed by all the batches from
13
+ * {@link module:engine/model/document~Document#history history} that happened after the reversed undo batch.
14
+ *
15
+ * The redo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.
16
+ */
17
+ export default class RedoCommand extends BaseCommand {
18
+ /**
19
+ * Executes the command. This method reverts the last {@link module:engine/model/batch~Batch batch} added to
20
+ * the command's stack, applies the reverted and transformed version on the
21
+ * {@link module:engine/model/document~Document document} and removes the batch from the stack.
22
+ * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.
23
+ *
24
+ * @fires execute
25
+ */
26
+ execute(): void;
27
+ }
@@ -0,0 +1,117 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo/undo
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ import UndoEditing from './undoediting.js';
10
+ import UndoUI from './undoui.js';
11
+ /**
12
+ * The undo feature.
13
+ *
14
+ * This is a "glue" plugin which loads the {@link module:undo/undoediting~UndoEditing undo editing feature}
15
+ * and the {@link module:undo/undoui~UndoUI undo UI feature}.
16
+ *
17
+ * Below is an explanation of the undo mechanism working together with {@link module:engine/model/history~History History}:
18
+ *
19
+ * Whenever an {@link module:engine/model/operation/operation~Operation operation} is applied to the
20
+ * {@link module:engine/model/document~Document document}, it is saved to `History` as is.
21
+ * The {@link module:engine/model/batch~Batch batch} that owns that operation is also saved, in
22
+ * {@link module:undo/undocommand~UndoCommand}, together with the selection that was present in the document before the
23
+ * operation was applied. A batch is saved instead of the operation because changes are undone batch-by-batch, not operation-by-operation
24
+ * and a batch is seen as one undo step.
25
+ *
26
+ * After changes happen to the document, the `History` and `UndoCommand` stack can be represented as follows:
27
+ *
28
+ * ```
29
+ * History Undo stack
30
+ * ============== ==================================
31
+ * [operation A1] [ batch A ]
32
+ * [operation B1] [ batch B ]
33
+ * [operation B2] [ batch C ]
34
+ * [operation C1]
35
+ * [operation C2]
36
+ * [operation B3]
37
+ * [operation C3]
38
+ * ```
39
+ *
40
+ * Where operations starting with the same letter are from same batch.
41
+ *
42
+ * Undoing a batch means that a set of operations which will reverse the effects of that batch needs to be generated.
43
+ * For example, if a batch added several letters, undoing the batch should remove them. It is important to apply undoing
44
+ * operations in the reversed order, so if a batch has operation `X`, `Y`, `Z`, reversed operations `Zr`, `Yr` and `Xr`
45
+ * need to be applied. Otherwise reversed operation `Xr` would operate on a wrong document state, because operation `X`
46
+ * does not know that operations `Y` and `Z` happened.
47
+ *
48
+ * After operations from an undone batch got {@link module:engine/model/operation/operation~Operation#getReversed reversed},
49
+ * one needs to make sure if they are ready to be applied. In the scenario above, operation `C3` is the last operation and `C3r`
50
+ * bases on up-to-date document state, so it can be applied to the document.
51
+ *
52
+ * ```
53
+ * History Undo stack
54
+ * ================= ==================================
55
+ * [ operation A1 ] [ batch A ]
56
+ * [ operation B1 ] [ batch B ]
57
+ * [ operation B2 ] [ processing undoing batch C ]
58
+ * [ operation C1 ]
59
+ * [ operation C2 ]
60
+ * [ operation B3 ]
61
+ * [ operation C3 ]
62
+ * [ operation C3r ]
63
+ * ```
64
+ *
65
+ * Next is operation `C2`, reversed to `C2r`. `C2r` bases on `C2`, so it bases on the wrong document state. It needs to be
66
+ * transformed by operations from history that happened after it, so it "knows" about them. Let us assume that `C2' = C2r * B3 * C3 * C3r`,
67
+ * where `*` means "transformed by". Rest of operations from that batch are processed in the same fashion.
68
+ *
69
+ * ```
70
+ * History Undo stack Redo stack
71
+ * ================= ================================== ==================================
72
+ * [ operation A1 ] [ batch A ] [ batch Cr ]
73
+ * [ operation B1 ] [ batch B ]
74
+ * [ operation B2 ]
75
+ * [ operation C1 ]
76
+ * [ operation C2 ]
77
+ * [ operation B3 ]
78
+ * [ operation C3 ]
79
+ * [ operation C3r ]
80
+ * [ operation C2' ]
81
+ * [ operation C1' ]
82
+ * ```
83
+ *
84
+ * Selective undo works on the same basis, however, instead of undoing the last batch in the undo stack, any batch can be undone.
85
+ * The same algorithm applies: operations from a batch (i.e. `A1`) are reversed and then transformed by operations stored in history.
86
+ *
87
+ * Redo also is very similar to undo. It has its own stack that is filled with undoing (reversed batches). Operations from
88
+ * the batch that is re-done are reversed-back, transformed in proper order and applied to the document.
89
+ *
90
+ * ```
91
+ * History Undo stack Redo stack
92
+ * ================= ================================== ==================================
93
+ * [ operation A1 ] [ batch A ]
94
+ * [ operation B1 ] [ batch B ]
95
+ * [ operation B2 ] [ batch Crr ]
96
+ * [ operation C1 ]
97
+ * [ operation C2 ]
98
+ * [ operation B3 ]
99
+ * [ operation C3 ]
100
+ * [ operation C3r ]
101
+ * [ operation C2' ]
102
+ * [ operation C1' ]
103
+ * [ operation C1'r]
104
+ * [ operation C2'r]
105
+ * [ operation C3rr]
106
+ * ```
107
+ */
108
+ export default class Undo extends Plugin {
109
+ /**
110
+ * @inheritDoc
111
+ */
112
+ static get requires(): readonly [typeof UndoEditing, typeof UndoUI];
113
+ /**
114
+ * @inheritDoc
115
+ */
116
+ static get pluginName(): "Undo";
117
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo/undocommand
7
+ */
8
+ import BaseCommand from './basecommand.js';
9
+ import type { Batch } from '@ckeditor/ckeditor5-engine';
10
+ /**
11
+ * The undo command stores {@link module:engine/model/batch~Batch batches} applied to the
12
+ * {@link module:engine/model/document~Document document} and is able to undo a batch by reversing it and transforming by
13
+ * batches from {@link module:engine/model/document~Document#history history} that happened after the reversed batch.
14
+ *
15
+ * The undo command also takes care of restoring the {@link module:engine/model/document~Document#selection document selection}.
16
+ */
17
+ export default class UndoCommand extends BaseCommand {
18
+ /**
19
+ * Executes the command. This method reverts a {@link module:engine/model/batch~Batch batch} added to the command's stack, transforms
20
+ * and applies the reverted version on the {@link module:engine/model/document~Document document} and removes the batch from the stack.
21
+ * Then, it restores the {@link module:engine/model/document~Document#selection document selection}.
22
+ *
23
+ * @fires execute
24
+ * @fires revert
25
+ * @param batch A batch that should be undone. If not set, the last added batch will be undone.
26
+ */
27
+ execute(batch?: Batch | null): void;
28
+ }
29
+ /**
30
+ * Fired when execution of the command reverts some batch.
31
+ *
32
+ * @eventName ~UndoCommand#revert
33
+ */
34
+ export type UndoCommandRevertEvent = {
35
+ name: 'revert';
36
+ args: [batch: Batch, undoingBatch: Batch];
37
+ };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo/undoediting
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ /**
10
+ * The undo engine feature.
11
+ *
12
+ * It introduces the `'undo'` and `'redo'` commands to the editor.
13
+ */
14
+ export default class UndoEditing extends Plugin {
15
+ /**
16
+ * The command that manages the undo {@link module:engine/model/batch~Batch batches} stack (history).
17
+ * Created and registered during the {@link #init feature initialization}.
18
+ */
19
+ private _undoCommand;
20
+ /**
21
+ * The command that manages the redo {@link module:engine/model/batch~Batch batches} stack (history).
22
+ * Created and registered during the {@link #init feature initialization}.
23
+ */
24
+ private _redoCommand;
25
+ /**
26
+ * Keeps track of which batches were registered in undo.
27
+ */
28
+ private _batchRegistry;
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static get pluginName(): "UndoEditing";
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ init(): void;
37
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module undo/undoui
7
+ */
8
+ import { Plugin } from '@ckeditor/ckeditor5-core';
9
+ /**
10
+ * The undo UI feature. It introduces the `'undo'` and `'redo'` buttons to the editor.
11
+ */
12
+ export default class UndoUI extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get pluginName(): "UndoUI";
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ init(): void;
21
+ /**
22
+ * Creates a button for the specified command.
23
+ *
24
+ * @param name Command name.
25
+ * @param label Button label.
26
+ * @param keystroke Command keystroke.
27
+ * @param Icon Source of the icon.
28
+ */
29
+ private _addButton;
30
+ }
@@ -14,7 +14,7 @@ msgid ""
14
14
  msgstr ""
15
15
  "Language-Team: Hebrew (https://app.transifex.com/ckeditor/teams/11143/he/)\n"
16
16
  "Language: he\n"
17
- "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: (n % 10 == 0 && n % 1 == 0 && n > 10) ? 2 : 3;\n"
17
+ "Plural-Forms: nplurals=3; plural=(n == 1 && n % 1 == 0) ? 0 : (n == 2 && n % 1 == 0) ? 1: 2;\n"
18
18
  "Content-Type: text/plain; charset=UTF-8\n"
19
19
 
20
20
  msgctxt "Toolbar button tooltip for the Undo feature."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-undo",
3
- "version": "41.1.0",
3
+ "version": "41.3.0-alpha.0",
4
4
  "description": "Undo feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,9 +13,9 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-core": "41.1.0",
17
- "@ckeditor/ckeditor5-engine": "41.1.0",
18
- "@ckeditor/ckeditor5-ui": "41.1.0"
16
+ "@ckeditor/ckeditor5-core": "41.3.0-alpha.0",
17
+ "@ckeditor/ckeditor5-engine": "41.3.0-alpha.0",
18
+ "@ckeditor/ckeditor5-ui": "41.3.0-alpha.0"
19
19
  },
20
20
  "author": "CKSource (http://cksource.com/)",
21
21
  "license": "GPL-2.0-or-later",
@@ -27,6 +27,7 @@
27
27
  "directory": "packages/ckeditor5-undo"
28
28
  },
29
29
  "files": [
30
+ "dist",
30
31
  "lang",
31
32
  "src/**/*.js",
32
33
  "src/**/*.d.ts",
@@ -32,6 +32,7 @@ export default class UndoEditing extends Plugin {
32
32
  */
33
33
  init() {
34
34
  const editor = this.editor;
35
+ const t = editor.t;
35
36
  // Create commands.
36
37
  this._undoCommand = new UndoCommand(editor);
37
38
  this._redoCommand = new RedoCommand(editor);
@@ -78,5 +79,18 @@ export default class UndoEditing extends Plugin {
78
79
  editor.keystrokes.set('CTRL+Z', 'undo');
79
80
  editor.keystrokes.set('CTRL+Y', 'redo');
80
81
  editor.keystrokes.set('CTRL+SHIFT+Z', 'redo');
82
+ // Add the information about the keystrokes to the accessibility database.
83
+ editor.accessibility.addKeystrokeInfos({
84
+ keystrokes: [
85
+ {
86
+ label: t('Undo'),
87
+ keystroke: 'CTRL+Z'
88
+ },
89
+ {
90
+ label: t('Redo'),
91
+ keystroke: [['CTRL+Y'], ['CTRL+SHIFT+Z']]
92
+ }
93
+ ]
94
+ });
81
95
  }
82
96
  }