@atlaskit/editor-plugin-show-diff 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 0.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3c2fe6ae106d8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c2fe6ae106d8) -
|
|
8
|
+
Focus the editor after track changes is turned off.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 0.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -23,7 +23,8 @@ var style = (0, _lazyNodeView.convertToInlineCss)({
|
|
|
23
23
|
*/
|
|
24
24
|
var createInlineChangedDecoration = exports.createInlineChangedDecoration = function createInlineChangedDecoration(change) {
|
|
25
25
|
return _view.Decoration.inline(change.fromB, change.toB, {
|
|
26
|
-
style: style
|
|
26
|
+
style: style,
|
|
27
|
+
'data-testid': 'show-diff-changed-decoration'
|
|
27
28
|
}, {});
|
|
28
29
|
};
|
|
29
30
|
var deletedContentStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -47,7 +48,7 @@ var createDeletedContentDecoration = exports.createDeletedContentDecoration = fu
|
|
|
47
48
|
dom.setAttribute('style', deletedContentStyle);
|
|
48
49
|
|
|
49
50
|
/*
|
|
50
|
-
|
|
51
|
+
* The thinking is we separate out the fragment we got from doc.slice
|
|
51
52
|
* and if it's the first or last content, we go in however many the sliced Open
|
|
52
53
|
* or sliced End depth is and match only the content and not with the entire node.
|
|
53
54
|
*/
|
|
@@ -70,6 +71,7 @@ var createDeletedContentDecoration = exports.createDeletedContentDecoration = fu
|
|
|
70
71
|
dom.append(serializer.serializeNode(node));
|
|
71
72
|
}
|
|
72
73
|
});
|
|
74
|
+
dom.setAttribute('data-testid', 'show-diff-deleted-decoration');
|
|
73
75
|
|
|
74
76
|
// Widget decoration used for deletions as the content is not in the document
|
|
75
77
|
// and we want to display the deleted content with a style.
|
|
@@ -16,7 +16,8 @@ const style = convertToInlineCss({
|
|
|
16
16
|
* @returns Prosemirror inline decoration
|
|
17
17
|
*/
|
|
18
18
|
export const createInlineChangedDecoration = change => Decoration.inline(change.fromB, change.toB, {
|
|
19
|
-
style
|
|
19
|
+
style,
|
|
20
|
+
'data-testid': 'show-diff-changed-decoration'
|
|
20
21
|
}, {});
|
|
21
22
|
const deletedContentStyle = convertToInlineCss({
|
|
22
23
|
color: "var(--ds-text-accent-gray, #44546F)",
|
|
@@ -40,7 +41,7 @@ export const createDeletedContentDecoration = ({
|
|
|
40
41
|
dom.setAttribute('style', deletedContentStyle);
|
|
41
42
|
|
|
42
43
|
/*
|
|
43
|
-
|
|
44
|
+
* The thinking is we separate out the fragment we got from doc.slice
|
|
44
45
|
* and if it's the first or last content, we go in however many the sliced Open
|
|
45
46
|
* or sliced End depth is and match only the content and not with the entire node.
|
|
46
47
|
*/
|
|
@@ -63,6 +64,7 @@ export const createDeletedContentDecoration = ({
|
|
|
63
64
|
dom.append(serializer.serializeNode(node));
|
|
64
65
|
}
|
|
65
66
|
});
|
|
67
|
+
dom.setAttribute('data-testid', 'show-diff-deleted-decoration');
|
|
66
68
|
|
|
67
69
|
// Widget decoration used for deletions as the content is not in the document
|
|
68
70
|
// and we want to display the deleted content with a style.
|
|
@@ -17,7 +17,8 @@ var style = convertToInlineCss({
|
|
|
17
17
|
*/
|
|
18
18
|
export var createInlineChangedDecoration = function createInlineChangedDecoration(change) {
|
|
19
19
|
return Decoration.inline(change.fromB, change.toB, {
|
|
20
|
-
style: style
|
|
20
|
+
style: style,
|
|
21
|
+
'data-testid': 'show-diff-changed-decoration'
|
|
21
22
|
}, {});
|
|
22
23
|
};
|
|
23
24
|
var deletedContentStyle = convertToInlineCss({
|
|
@@ -41,7 +42,7 @@ export var createDeletedContentDecoration = function createDeletedContentDecorat
|
|
|
41
42
|
dom.setAttribute('style', deletedContentStyle);
|
|
42
43
|
|
|
43
44
|
/*
|
|
44
|
-
|
|
45
|
+
* The thinking is we separate out the fragment we got from doc.slice
|
|
45
46
|
* and if it's the first or last content, we go in however many the sliced Open
|
|
46
47
|
* or sliced End depth is and match only the content and not with the entire node.
|
|
47
48
|
*/
|
|
@@ -64,6 +65,7 @@ export var createDeletedContentDecoration = function createDeletedContentDecorat
|
|
|
64
65
|
dom.append(serializer.serializeNode(node));
|
|
65
66
|
}
|
|
66
67
|
});
|
|
68
|
+
dom.setAttribute('data-testid', 'show-diff-deleted-decoration');
|
|
67
69
|
|
|
68
70
|
// Widget decoration used for deletions as the content is not in the document
|
|
69
71
|
// and we want to display the deleted content with a style.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prosemirror-changeset": "^2.2.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@atlaskit/editor-common": "^107.
|
|
40
|
+
"@atlaskit/editor-common": "^107.19.0",
|
|
41
41
|
"react": "^18.2.0"
|
|
42
42
|
},
|
|
43
43
|
"techstack": {
|