@manuscripts/track-changes-plugin 1.7.10-LEAN-3136-2MB-3 → 1.7.11
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.
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.trackTransaction = void 0;
|
|
4
4
|
const prosemirror_state_1 = require("prosemirror-state");
|
|
5
|
-
const prosemirror_state_2 = require("prosemirror-state");
|
|
6
5
|
const prosemirror_transform_1 = require("prosemirror-transform");
|
|
7
6
|
const diffChangeSteps_1 = require("../change-steps/diffChangeSteps");
|
|
8
7
|
const processChangeSteps_1 = require("../change-steps/processChangeSteps");
|
|
9
8
|
const change_1 = require("../types/change");
|
|
10
9
|
const logger_1 = require("../utils/logger");
|
|
10
|
+
const mapChangeStep_1 = require("../utils/mapChangeStep");
|
|
11
11
|
const trackReplaceAroundStep_1 = require("./trackReplaceAroundStep");
|
|
12
12
|
const trackReplaceStep_1 = require("./trackReplaceStep");
|
|
13
|
-
const mapChangeStep_1 = require("../utils/mapChangeStep");
|
|
14
13
|
const getSelectionStaticConstructor = (sel) => Object.getPrototypeOf(sel).constructor;
|
|
15
14
|
const isHighlightMarkerNode = (node) => node && node.type === node.type.schema.nodes.highlight_marker;
|
|
16
15
|
function trackTransaction(tr, oldState, newTr, authorID) {
|
|
@@ -23,7 +22,7 @@ function trackTransaction(tr, oldState, newTr, authorID) {
|
|
|
23
22
|
statusUpdateAt: 0,
|
|
24
23
|
status: change_1.CHANGE_STATUS.pending,
|
|
25
24
|
};
|
|
26
|
-
const wasNodeSelection = tr.selection instanceof
|
|
25
|
+
const wasNodeSelection = tr.selection instanceof prosemirror_state_1.NodeSelection;
|
|
27
26
|
const setsNewSelection = tr.selectionSet;
|
|
28
27
|
let iters = 0;
|
|
29
28
|
logger_1.log.info('ORIGINAL transaction', tr);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { TextSelection } from 'prosemirror-state';
|
|
2
|
-
import { NodeSelection as NodeSelectionClass } from 'prosemirror-state';
|
|
1
|
+
import { NodeSelection as NodeSelectionClass, TextSelection, } from 'prosemirror-state';
|
|
3
2
|
import { ReplaceAroundStep, ReplaceStep } from 'prosemirror-transform';
|
|
4
3
|
import { diffChangeSteps } from '../change-steps/diffChangeSteps';
|
|
5
4
|
import { processChangeSteps } from '../change-steps/processChangeSteps';
|
|
6
5
|
import { CHANGE_STATUS } from '../types/change';
|
|
7
6
|
import { log } from '../utils/logger';
|
|
7
|
+
import { mapChangeSteps } from '../utils/mapChangeStep';
|
|
8
8
|
import { trackReplaceAroundStep } from './trackReplaceAroundStep';
|
|
9
9
|
import { trackReplaceStep } from './trackReplaceStep';
|
|
10
|
-
import { mapChangeSteps } from '../utils/mapChangeStep';
|
|
11
10
|
const getSelectionStaticConstructor = (sel) => Object.getPrototypeOf(sel).constructor;
|
|
12
11
|
const isHighlightMarkerNode = (node) => node && node.type === node.type.schema.nodes.highlight_marker;
|
|
13
12
|
export function trackTransaction(tr, oldState, newTr, authorID) {
|
package/package.json
CHANGED