@atlaskit/editor-plugin-show-diff 8.3.7 → 8.3.9
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 +14 -0
- package/dist/cjs/pm-plugins/decorations/colorSchemes/standard.js +8 -1
- package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.js +6 -0
- package/dist/cjs/pm-plugins/decorations/createNodeChangedDecorationWidget.js +14 -1
- package/dist/es2019/pm-plugins/decorations/colorSchemes/standard.js +7 -0
- package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.js +7 -1
- package/dist/es2019/pm-plugins/decorations/createNodeChangedDecorationWidget.js +15 -2
- package/dist/esm/pm-plugins/decorations/colorSchemes/standard.js +7 -0
- package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.js +7 -1
- package/dist/esm/pm-plugins/decorations/createNodeChangedDecorationWidget.js +15 -2
- package/dist/types/pm-plugins/decorations/colorSchemes/standard.d.ts +4 -0
- package/dist/types-ts4.5/pm-plugins/decorations/colorSchemes/standard.d.ts +4 -0
- package/docs/0-intro.tsx +5 -5
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 8.3.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 8.3.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`932b1625cbf60`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/932b1625cbf60) -
|
|
14
|
+
EDITOR-6621: Add a grey background on deleted text in standard diff theme.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 8.3.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.standardDecorationMarkerVariable = exports.editingStyleRuleNode = exports.editingStyleQuoteNode = exports.editingStyleNode = exports.editingStyleCardBlockNode = exports.editingStyleActive = exports.editingStyle = exports.editingContentStyleInBlock = exports.deletedStyleQuoteNodeWithLozengeActive = exports.deletedStyleQuoteNodeWithLozenge = exports.deletedStyleQuoteNode = exports.deletedRowStyle = exports.deletedContentStyleUnbounded = exports.deletedContentStyleNew = exports.deletedContentStyleActive = exports.deletedContentStyle = exports.deletedCellOverlayStyle = exports.deletedBlockOutlineRoundedActive = exports.deletedBlockOutlineRounded = exports.deletedBlockOutlineActive = exports.deletedBlockOutline = exports.addedCellOverlayStyle = void 0;
|
|
6
|
+
exports.standardDecorationMarkerVariable = exports.editingStyleRuleNode = exports.editingStyleQuoteNode = exports.editingStyleNode = exports.editingStyleCardBlockNode = exports.editingStyleActive = exports.editingStyle = exports.editingContentStyleInBlock = exports.deletedStyleQuoteNodeWithLozengeActive = exports.deletedStyleQuoteNodeWithLozenge = exports.deletedStyleQuoteNode = exports.deletedRowStyle = exports.deletedInlineContentBackground = exports.deletedContentStyleUnbounded = exports.deletedContentStyleNew = exports.deletedContentStyleActive = exports.deletedContentStyle = exports.deletedCellOverlayStyle = exports.deletedBlockOutlineRoundedActive = exports.deletedBlockOutlineRounded = exports.deletedBlockOutlineActive = exports.deletedBlockOutline = exports.addedCellOverlayStyle = void 0;
|
|
7
7
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
8
8
|
var editingStyle = exports.editingStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
9
9
|
background: "var(--ds-background-accent-purple-subtlest, #F8EEFE)",
|
|
@@ -44,6 +44,13 @@ var deletedContentStyleNew = exports.deletedContentStyleNew = (0, _lazyNodeView.
|
|
|
44
44
|
position: 'relative',
|
|
45
45
|
opacity: 0.8
|
|
46
46
|
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Merge into existing styles when cleaning up
|
|
50
|
+
*/
|
|
51
|
+
var deletedInlineContentBackground = exports.deletedInlineContentBackground = (0, _lazyNodeView.convertToInlineCss)({
|
|
52
|
+
backgroundColor: "var(--ds-background-accent-gray-subtlest, #F0F1F2)"
|
|
53
|
+
});
|
|
47
54
|
var deletedContentStyleUnbounded = exports.deletedContentStyleUnbounded = (0, _lazyNodeView.convertToInlineCss)({
|
|
48
55
|
position: 'absolute',
|
|
49
56
|
top: '50%',
|
|
@@ -48,6 +48,12 @@ var createInlineChangedDecoration = exports.createInlineChangedDecoration = func
|
|
|
48
48
|
style = (0, _traditional.getDeletedTraditionalInlineStyle)(false);
|
|
49
49
|
} else {
|
|
50
50
|
style = isActive ? _standard.deletedContentStyleActive : _standard.deletedContentStyle;
|
|
51
|
+
/**
|
|
52
|
+
* Merge into existing styles when cleaning up
|
|
53
|
+
*/
|
|
54
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
55
|
+
style += _standard.deletedInlineContentBackground;
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
}
|
|
53
59
|
} else {
|
|
@@ -43,6 +43,13 @@ var getDeletedContentStyle = function getDeletedContentStyle(colorScheme) {
|
|
|
43
43
|
if (colorScheme === 'traditional') {
|
|
44
44
|
return (0, _traditional.getDeletedTraditionalInlineStyle)(isActive);
|
|
45
45
|
}
|
|
46
|
+
// Merge into existing styles when cleaning up
|
|
47
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
48
|
+
if (isActive) {
|
|
49
|
+
return _standard.deletedContentStyleActive + _standard.deletedInlineContentBackground;
|
|
50
|
+
}
|
|
51
|
+
return _standard.deletedContentStyleNew + _standard.deletedInlineContentBackground;
|
|
52
|
+
}
|
|
46
53
|
if (isActive) {
|
|
47
54
|
return _standard.deletedContentStyleActive;
|
|
48
55
|
}
|
|
@@ -54,7 +61,13 @@ var getDeletedContentStyle = function getDeletedContentStyle(colorScheme) {
|
|
|
54
61
|
*/
|
|
55
62
|
var createDeletedStyleWrapperWithoutOpacity = function createDeletedStyleWrapperWithoutOpacity(colorScheme, isActive) {
|
|
56
63
|
var wrapper = document.createElement('span');
|
|
57
|
-
|
|
64
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
65
|
+
wrapper.setAttribute('style',
|
|
66
|
+
// Merge into existing styles when cleaning up
|
|
67
|
+
getDeletedContentStyle(colorScheme, isActive) + _standard.deletedInlineContentBackground);
|
|
68
|
+
} else {
|
|
69
|
+
wrapper.setAttribute('style', getDeletedContentStyle(colorScheme, isActive));
|
|
70
|
+
}
|
|
58
71
|
return wrapper;
|
|
59
72
|
};
|
|
60
73
|
|
|
@@ -38,6 +38,13 @@ export const deletedContentStyleNew = convertToInlineCss({
|
|
|
38
38
|
position: 'relative',
|
|
39
39
|
opacity: 0.8
|
|
40
40
|
});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Merge into existing styles when cleaning up
|
|
44
|
+
*/
|
|
45
|
+
export const deletedInlineContentBackground = convertToInlineCss({
|
|
46
|
+
backgroundColor: "var(--ds-background-accent-gray-subtlest, #F0F1F2)"
|
|
47
|
+
});
|
|
41
48
|
export const deletedContentStyleUnbounded = convertToInlineCss({
|
|
42
49
|
position: 'absolute',
|
|
43
50
|
top: '50%',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
2
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
-
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive } from './colorSchemes/standard';
|
|
4
|
+
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedInlineContentBackground } from './colorSchemes/standard';
|
|
5
5
|
import { traditionalInsertStyle, traditionalInsertStyleActive, getDeletedTraditionalInlineStyle } from './colorSchemes/traditional';
|
|
6
6
|
const displayNoneStyle = convertToInlineCss({
|
|
7
7
|
display: 'none'
|
|
@@ -40,6 +40,12 @@ export const createInlineChangedDecoration = ({
|
|
|
40
40
|
style = getDeletedTraditionalInlineStyle(false);
|
|
41
41
|
} else {
|
|
42
42
|
style = isActive ? deletedContentStyleActive : deletedContentStyle;
|
|
43
|
+
/**
|
|
44
|
+
* Merge into existing styles when cleaning up
|
|
45
|
+
*/
|
|
46
|
+
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
47
|
+
style += deletedInlineContentBackground;
|
|
48
|
+
}
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
51
|
} else {
|
|
@@ -2,7 +2,7 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
2
2
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
|
-
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew, deletedContentStyleUnbounded } from './colorSchemes/standard';
|
|
5
|
+
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew, deletedContentStyleUnbounded, deletedInlineContentBackground } from './colorSchemes/standard';
|
|
6
6
|
import { traditionalInsertStyle, traditionalInsertStyleActive, getDeletedTraditionalInlineStyle, deletedTraditionalContentStyleUnbounded, deletedTraditionalContentStyleUnboundedActive } from './colorSchemes/traditional';
|
|
7
7
|
import { createChangedRowDecorationWidgets } from './createChangedRowDecorationWidgets';
|
|
8
8
|
import { findSafeInsertPos } from './utils/findSafeInsertPos';
|
|
@@ -29,6 +29,13 @@ const getDeletedContentStyle = (colorScheme, isActive = false) => {
|
|
|
29
29
|
if (colorScheme === 'traditional') {
|
|
30
30
|
return getDeletedTraditionalInlineStyle(isActive);
|
|
31
31
|
}
|
|
32
|
+
// Merge into existing styles when cleaning up
|
|
33
|
+
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
34
|
+
if (isActive) {
|
|
35
|
+
return deletedContentStyleActive + deletedInlineContentBackground;
|
|
36
|
+
}
|
|
37
|
+
return deletedContentStyleNew + deletedInlineContentBackground;
|
|
38
|
+
}
|
|
32
39
|
if (isActive) {
|
|
33
40
|
return deletedContentStyleActive;
|
|
34
41
|
}
|
|
@@ -40,7 +47,13 @@ const getDeletedContentStyle = (colorScheme, isActive = false) => {
|
|
|
40
47
|
*/
|
|
41
48
|
const createDeletedStyleWrapperWithoutOpacity = (colorScheme, isActive) => {
|
|
42
49
|
const wrapper = document.createElement('span');
|
|
43
|
-
|
|
50
|
+
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
51
|
+
wrapper.setAttribute('style',
|
|
52
|
+
// Merge into existing styles when cleaning up
|
|
53
|
+
getDeletedContentStyle(colorScheme, isActive) + deletedInlineContentBackground);
|
|
54
|
+
} else {
|
|
55
|
+
wrapper.setAttribute('style', getDeletedContentStyle(colorScheme, isActive));
|
|
56
|
+
}
|
|
44
57
|
return wrapper;
|
|
45
58
|
};
|
|
46
59
|
|
|
@@ -38,6 +38,13 @@ export var deletedContentStyleNew = convertToInlineCss({
|
|
|
38
38
|
position: 'relative',
|
|
39
39
|
opacity: 0.8
|
|
40
40
|
});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Merge into existing styles when cleaning up
|
|
44
|
+
*/
|
|
45
|
+
export var deletedInlineContentBackground = convertToInlineCss({
|
|
46
|
+
backgroundColor: "var(--ds-background-accent-gray-subtlest, #F0F1F2)"
|
|
47
|
+
});
|
|
41
48
|
export var deletedContentStyleUnbounded = convertToInlineCss({
|
|
42
49
|
position: 'absolute',
|
|
43
50
|
top: '50%',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
2
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
-
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive } from './colorSchemes/standard';
|
|
4
|
+
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedInlineContentBackground } from './colorSchemes/standard';
|
|
5
5
|
import { traditionalInsertStyle, traditionalInsertStyleActive, getDeletedTraditionalInlineStyle } from './colorSchemes/traditional';
|
|
6
6
|
var displayNoneStyle = convertToInlineCss({
|
|
7
7
|
display: 'none'
|
|
@@ -42,6 +42,12 @@ export var createInlineChangedDecoration = function createInlineChangedDecoratio
|
|
|
42
42
|
style = getDeletedTraditionalInlineStyle(false);
|
|
43
43
|
} else {
|
|
44
44
|
style = isActive ? deletedContentStyleActive : deletedContentStyle;
|
|
45
|
+
/**
|
|
46
|
+
* Merge into existing styles when cleaning up
|
|
47
|
+
*/
|
|
48
|
+
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
49
|
+
style += deletedInlineContentBackground;
|
|
50
|
+
}
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
} else {
|
|
@@ -6,7 +6,7 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
6
6
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew, deletedContentStyleUnbounded } from './colorSchemes/standard';
|
|
9
|
+
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew, deletedContentStyleUnbounded, deletedInlineContentBackground } from './colorSchemes/standard';
|
|
10
10
|
import { traditionalInsertStyle, traditionalInsertStyleActive, getDeletedTraditionalInlineStyle, deletedTraditionalContentStyleUnbounded, deletedTraditionalContentStyleUnboundedActive } from './colorSchemes/traditional';
|
|
11
11
|
import { createChangedRowDecorationWidgets } from './createChangedRowDecorationWidgets';
|
|
12
12
|
import { findSafeInsertPos } from './utils/findSafeInsertPos';
|
|
@@ -36,6 +36,13 @@ var getDeletedContentStyle = function getDeletedContentStyle(colorScheme) {
|
|
|
36
36
|
if (colorScheme === 'traditional') {
|
|
37
37
|
return getDeletedTraditionalInlineStyle(isActive);
|
|
38
38
|
}
|
|
39
|
+
// Merge into existing styles when cleaning up
|
|
40
|
+
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
41
|
+
if (isActive) {
|
|
42
|
+
return deletedContentStyleActive + deletedInlineContentBackground;
|
|
43
|
+
}
|
|
44
|
+
return deletedContentStyleNew + deletedInlineContentBackground;
|
|
45
|
+
}
|
|
39
46
|
if (isActive) {
|
|
40
47
|
return deletedContentStyleActive;
|
|
41
48
|
}
|
|
@@ -47,7 +54,13 @@ var getDeletedContentStyle = function getDeletedContentStyle(colorScheme) {
|
|
|
47
54
|
*/
|
|
48
55
|
var createDeletedStyleWrapperWithoutOpacity = function createDeletedStyleWrapperWithoutOpacity(colorScheme, isActive) {
|
|
49
56
|
var wrapper = document.createElement('span');
|
|
50
|
-
|
|
57
|
+
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
58
|
+
wrapper.setAttribute('style',
|
|
59
|
+
// Merge into existing styles when cleaning up
|
|
60
|
+
getDeletedContentStyle(colorScheme, isActive) + deletedInlineContentBackground);
|
|
61
|
+
} else {
|
|
62
|
+
wrapper.setAttribute('style', getDeletedContentStyle(colorScheme, isActive));
|
|
63
|
+
}
|
|
51
64
|
return wrapper;
|
|
52
65
|
};
|
|
53
66
|
|
|
@@ -4,6 +4,10 @@ export declare const editingStyleActive: string;
|
|
|
4
4
|
export declare const deletedContentStyle: string;
|
|
5
5
|
export declare const deletedContentStyleActive: string;
|
|
6
6
|
export declare const deletedContentStyleNew: string;
|
|
7
|
+
/**
|
|
8
|
+
* Merge into existing styles when cleaning up
|
|
9
|
+
*/
|
|
10
|
+
export declare const deletedInlineContentBackground: string;
|
|
7
11
|
export declare const deletedContentStyleUnbounded: string;
|
|
8
12
|
export declare const deletedStyleQuoteNode: string;
|
|
9
13
|
export declare const deletedStyleQuoteNodeWithLozenge: string;
|
|
@@ -4,6 +4,10 @@ export declare const editingStyleActive: string;
|
|
|
4
4
|
export declare const deletedContentStyle: string;
|
|
5
5
|
export declare const deletedContentStyleActive: string;
|
|
6
6
|
export declare const deletedContentStyleNew: string;
|
|
7
|
+
/**
|
|
8
|
+
* Merge into existing styles when cleaning up
|
|
9
|
+
*/
|
|
10
|
+
export declare const deletedInlineContentBackground: string;
|
|
7
11
|
export declare const deletedContentStyleUnbounded: string;
|
|
8
12
|
export declare const deletedStyleQuoteNode: string;
|
|
9
13
|
export declare const deletedStyleQuoteNodeWithLozenge: string;
|
package/docs/0-intro.tsx
CHANGED
|
@@ -13,14 +13,14 @@ ${createEditorUseOnlyNotice('Editor Plugin Show Diff', [
|
|
|
13
13
|
])}
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
${
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
${(
|
|
17
|
+
<>
|
|
18
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
19
19
|
<div style={{ marginTop: token('space.100') }}>
|
|
20
20
|
<AtlassianInternalWarning />
|
|
21
21
|
</div>
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
</>
|
|
23
|
+
)}
|
|
24
24
|
|
|
25
25
|
This package includes the show diff plugin used by \`@atlaskit/editor-core\`.
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.9",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^52.
|
|
31
|
+
"@atlaskit/adf-schema": "^52.11.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.16.0",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^10.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-expand": "^11.1.0",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
36
36
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
38
|
+
"@atlaskit/tmp-editor-statsig": "^79.0.0",
|
|
39
39
|
"@atlaskit/tokens": "^13.0.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react-intl": "^6.6.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@atlaskit/editor-common": "^114.
|
|
61
|
+
"@atlaskit/editor-common": "^114.29.0",
|
|
62
62
|
"react": "^18.2.0"
|
|
63
63
|
},
|
|
64
64
|
"techstack": {
|