@manuscripts/track-changes-plugin 1.7.21 → 1.7.22

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.
@@ -31,6 +31,7 @@ function findChanges(state) {
31
31
  to: pos + node.nodeSize,
32
32
  dataTracked,
33
33
  text: node.text,
34
+ nodeType: node.type,
34
35
  };
35
36
  }
36
37
  else if (dataTracked.operation === change_1.CHANGE_OPERATION.set_node_attributes) {
@@ -40,7 +41,7 @@ function findChanges(state) {
40
41
  from: pos,
41
42
  to: pos + node.nodeSize,
42
43
  dataTracked,
43
- nodeType: node.type.name,
44
+ node: node,
44
45
  newAttrs: node.attrs,
45
46
  oldAttrs: dataTracked.oldAttrs,
46
47
  };
@@ -52,8 +53,9 @@ function findChanges(state) {
52
53
  from: pos,
53
54
  to: pos + node.nodeSize,
54
55
  dataTracked,
55
- nodeType: node.type.name,
56
+ node: node,
56
57
  children: [],
58
+ attrs: node.attrs,
57
59
  };
58
60
  }
59
61
  current = {
@@ -1,4 +1,19 @@
1
1
  "use strict";
2
+ /*!
3
+ * © 2023 Atypon Systems LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
  Object.defineProperty(exports, "__esModule", { value: true });
3
18
  exports.CHANGE_STATUS = exports.CHANGE_OPERATION = void 0;
4
19
  var CHANGE_OPERATION;
@@ -28,6 +28,7 @@ export function findChanges(state) {
28
28
  to: pos + node.nodeSize,
29
29
  dataTracked,
30
30
  text: node.text,
31
+ nodeType: node.type,
31
32
  };
32
33
  }
33
34
  else if (dataTracked.operation === CHANGE_OPERATION.set_node_attributes) {
@@ -37,7 +38,7 @@ export function findChanges(state) {
37
38
  from: pos,
38
39
  to: pos + node.nodeSize,
39
40
  dataTracked,
40
- nodeType: node.type.name,
41
+ node: node,
41
42
  newAttrs: node.attrs,
42
43
  oldAttrs: dataTracked.oldAttrs,
43
44
  };
@@ -49,8 +50,9 @@ export function findChanges(state) {
49
50
  from: pos,
50
51
  to: pos + node.nodeSize,
51
52
  dataTracked,
52
- nodeType: node.type.name,
53
+ node: node,
53
54
  children: [],
55
+ attrs: node.attrs,
54
56
  };
55
57
  }
56
58
  current = {
@@ -1,3 +1,18 @@
1
+ /*!
2
+ * © 2023 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
1
16
  export var CHANGE_OPERATION;
2
17
  (function (CHANGE_OPERATION) {
3
18
  CHANGE_OPERATION["insert"] = "insert";
@@ -1,3 +1,19 @@
1
+ /*!
2
+ * © 2023 Atypon Systems LLC
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Node, NodeType } from 'prosemirror-model';
1
17
  export declare enum CHANGE_OPERATION {
2
18
  insert = "insert",
3
19
  delete = "delete",
@@ -32,15 +48,17 @@ type Change = {
32
48
  export type TextChange = Change & {
33
49
  type: 'text-change';
34
50
  text: string;
51
+ nodeType: NodeType;
35
52
  };
36
53
  export type NodeChange = Change & {
37
54
  type: 'node-change';
38
- nodeType: string;
55
+ node: Node;
56
+ attrs: Record<string, any>;
39
57
  children: TrackedChange[];
40
58
  };
41
59
  export type NodeAttrChange = Change & {
42
60
  type: 'node-attr-change';
43
- nodeType: string;
61
+ node: Node;
44
62
  oldAttrs: Record<string, any>;
45
63
  newAttrs: Record<string, any>;
46
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/track-changes-plugin",
3
- "version": "1.7.21",
3
+ "version": "1.7.22",
4
4
  "author": "Atypon Systems LLC",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/Atypon-OpenSource/manuscripts-track-changes-plugin",