@atlaskit/editor-plugin-show-diff 3.2.4 → 3.2.5
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,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 3.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a05464ea42678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a05464ea42678) -
|
|
8
|
+
EDITOR-2791 bump adf-schema
|
|
9
|
+
- [`657693883946f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/657693883946f) -
|
|
10
|
+
Fix diffs for extension nodes
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 3.2.4
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/afm-jira/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"extends": "../../../../tsconfig.entry-points.jira.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"target": "es5",
|
|
5
|
-
"outDir": "../../../../../tsDist/@atlaskit__editor-plugin-show-diff/app",
|
|
5
|
+
"outDir": "../../../../../jira/tsDist/@atlaskit__editor-plugin-show-diff/app",
|
|
6
6
|
"rootDir": "../",
|
|
7
7
|
"composite": true
|
|
8
8
|
},
|
|
@@ -49,10 +49,6 @@ var getEditorStyleNode = function getEditorStyleNode(nodeName, colourScheme) {
|
|
|
49
49
|
case 'tableHeader':
|
|
50
50
|
return undefined;
|
|
51
51
|
// Handle table separately to avoid border issues
|
|
52
|
-
case 'embedCard':
|
|
53
|
-
return (0, _lazyNodeView.convertToInlineCss)({
|
|
54
|
-
'--diff-decoration-marker-color': colourScheme === 'traditional' ? "var(--ds-border-accent-green, #22A06B)" : "var(--ds-border-accent-purple, #AF59E1)"
|
|
55
|
-
});
|
|
56
52
|
case 'paragraph':
|
|
57
53
|
case 'heading':
|
|
58
54
|
case 'hardBreak':
|
|
@@ -64,6 +60,8 @@ var getEditorStyleNode = function getEditorStyleNode(nodeName, colourScheme) {
|
|
|
64
60
|
case 'bulletList':
|
|
65
61
|
case 'orderedList':
|
|
66
62
|
return undefined;
|
|
63
|
+
case 'extension':
|
|
64
|
+
case 'embedCard':
|
|
67
65
|
case 'listItem':
|
|
68
66
|
return (0, _lazyNodeView.convertToInlineCss)({
|
|
69
67
|
'--diff-decoration-marker-color': colourScheme === 'traditional' ? "var(--ds-border-accent-green, #22A06B)" : "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -143,6 +141,14 @@ var getDeletedContentStyleUnbounded = exports.getDeletedContentStyleUnbounded =
|
|
|
143
141
|
var getDeletedContentStyle = exports.getDeletedContentStyle = function getDeletedContentStyle(colourScheme) {
|
|
144
142
|
return colourScheme === 'traditional' ? deletedTraditionalContentStyle : deletedContentStyle;
|
|
145
143
|
};
|
|
144
|
+
var getNodeClass = function getNodeClass(name) {
|
|
145
|
+
switch (name) {
|
|
146
|
+
case 'extension':
|
|
147
|
+
return 'show-diff-changed-decoration-node';
|
|
148
|
+
default:
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
146
152
|
|
|
147
153
|
/**
|
|
148
154
|
* Inline decoration used for insertions as the content already exists in the document
|
|
@@ -153,7 +159,8 @@ var getDeletedContentStyle = exports.getDeletedContentStyle = function getDelete
|
|
|
153
159
|
var createBlockChangedDecoration = exports.createBlockChangedDecoration = function createBlockChangedDecoration(change, colourScheme) {
|
|
154
160
|
return _view.Decoration.node(change.from, change.to, {
|
|
155
161
|
style: getEditorStyleNode(change.name, colourScheme),
|
|
156
|
-
'data-testid': 'show-diff-changed-decoration-node'
|
|
162
|
+
'data-testid': 'show-diff-changed-decoration-node',
|
|
163
|
+
class: getNodeClass(change.name)
|
|
157
164
|
}, {});
|
|
158
165
|
};
|
|
159
166
|
var createDeletedContentDecoration = exports.createDeletedContentDecoration = function createDeletedContentDecoration(_ref) {
|
|
@@ -41,10 +41,6 @@ const getEditorStyleNode = (nodeName, colourScheme) => {
|
|
|
41
41
|
case 'tableHeader':
|
|
42
42
|
return undefined;
|
|
43
43
|
// Handle table separately to avoid border issues
|
|
44
|
-
case 'embedCard':
|
|
45
|
-
return convertToInlineCss({
|
|
46
|
-
'--diff-decoration-marker-color': colourScheme === 'traditional' ? "var(--ds-border-accent-green, #22A06B)" : "var(--ds-border-accent-purple, #AF59E1)"
|
|
47
|
-
});
|
|
48
44
|
case 'paragraph':
|
|
49
45
|
case 'heading':
|
|
50
46
|
case 'hardBreak':
|
|
@@ -56,6 +52,8 @@ const getEditorStyleNode = (nodeName, colourScheme) => {
|
|
|
56
52
|
case 'bulletList':
|
|
57
53
|
case 'orderedList':
|
|
58
54
|
return undefined;
|
|
55
|
+
case 'extension':
|
|
56
|
+
case 'embedCard':
|
|
59
57
|
case 'listItem':
|
|
60
58
|
return convertToInlineCss({
|
|
61
59
|
'--diff-decoration-marker-color': colourScheme === 'traditional' ? "var(--ds-border-accent-green, #22A06B)" : "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -131,6 +129,14 @@ const deletedTraditionalContentStyleUnbounded = convertToInlineCss({
|
|
|
131
129
|
});
|
|
132
130
|
export const getDeletedContentStyleUnbounded = colourScheme => colourScheme === 'traditional' ? deletedTraditionalContentStyleUnbounded : deletedContentStyleUnbounded;
|
|
133
131
|
export const getDeletedContentStyle = colourScheme => colourScheme === 'traditional' ? deletedTraditionalContentStyle : deletedContentStyle;
|
|
132
|
+
const getNodeClass = name => {
|
|
133
|
+
switch (name) {
|
|
134
|
+
case 'extension':
|
|
135
|
+
return 'show-diff-changed-decoration-node';
|
|
136
|
+
default:
|
|
137
|
+
return undefined;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
134
140
|
|
|
135
141
|
/**
|
|
136
142
|
* Inline decoration used for insertions as the content already exists in the document
|
|
@@ -140,7 +146,8 @@ export const getDeletedContentStyle = colourScheme => colourScheme === 'traditio
|
|
|
140
146
|
*/
|
|
141
147
|
export const createBlockChangedDecoration = (change, colourScheme) => Decoration.node(change.from, change.to, {
|
|
142
148
|
style: getEditorStyleNode(change.name, colourScheme),
|
|
143
|
-
'data-testid': 'show-diff-changed-decoration-node'
|
|
149
|
+
'data-testid': 'show-diff-changed-decoration-node',
|
|
150
|
+
class: getNodeClass(change.name)
|
|
144
151
|
}, {});
|
|
145
152
|
export const createDeletedContentDecoration = ({
|
|
146
153
|
change,
|
|
@@ -43,10 +43,6 @@ var getEditorStyleNode = function getEditorStyleNode(nodeName, colourScheme) {
|
|
|
43
43
|
case 'tableHeader':
|
|
44
44
|
return undefined;
|
|
45
45
|
// Handle table separately to avoid border issues
|
|
46
|
-
case 'embedCard':
|
|
47
|
-
return convertToInlineCss({
|
|
48
|
-
'--diff-decoration-marker-color': colourScheme === 'traditional' ? "var(--ds-border-accent-green, #22A06B)" : "var(--ds-border-accent-purple, #AF59E1)"
|
|
49
|
-
});
|
|
50
46
|
case 'paragraph':
|
|
51
47
|
case 'heading':
|
|
52
48
|
case 'hardBreak':
|
|
@@ -58,6 +54,8 @@ var getEditorStyleNode = function getEditorStyleNode(nodeName, colourScheme) {
|
|
|
58
54
|
case 'bulletList':
|
|
59
55
|
case 'orderedList':
|
|
60
56
|
return undefined;
|
|
57
|
+
case 'extension':
|
|
58
|
+
case 'embedCard':
|
|
61
59
|
case 'listItem':
|
|
62
60
|
return convertToInlineCss({
|
|
63
61
|
'--diff-decoration-marker-color': colourScheme === 'traditional' ? "var(--ds-border-accent-green, #22A06B)" : "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -137,6 +135,14 @@ export var getDeletedContentStyleUnbounded = function getDeletedContentStyleUnbo
|
|
|
137
135
|
export var getDeletedContentStyle = function getDeletedContentStyle(colourScheme) {
|
|
138
136
|
return colourScheme === 'traditional' ? deletedTraditionalContentStyle : deletedContentStyle;
|
|
139
137
|
};
|
|
138
|
+
var getNodeClass = function getNodeClass(name) {
|
|
139
|
+
switch (name) {
|
|
140
|
+
case 'extension':
|
|
141
|
+
return 'show-diff-changed-decoration-node';
|
|
142
|
+
default:
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
140
146
|
|
|
141
147
|
/**
|
|
142
148
|
* Inline decoration used for insertions as the content already exists in the document
|
|
@@ -147,7 +153,8 @@ export var getDeletedContentStyle = function getDeletedContentStyle(colourScheme
|
|
|
147
153
|
export var createBlockChangedDecoration = function createBlockChangedDecoration(change, colourScheme) {
|
|
148
154
|
return Decoration.node(change.from, change.to, {
|
|
149
155
|
style: getEditorStyleNode(change.name, colourScheme),
|
|
150
|
-
'data-testid': 'show-diff-changed-decoration-node'
|
|
156
|
+
'data-testid': 'show-diff-changed-decoration-node',
|
|
157
|
+
class: getNodeClass(change.name)
|
|
151
158
|
}, {});
|
|
152
159
|
};
|
|
153
160
|
export var createDeletedContentDecoration = function createDeletedContentDecoration(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^51.
|
|
31
|
+
"@atlaskit/adf-schema": "^51.4.0",
|
|
32
32
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
33
33
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
34
34
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prosemirror-changeset": "^2.2.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^110.
|
|
42
|
+
"@atlaskit/editor-common": "^110.32.0",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
45
45
|
"techstack": {
|