@atlaskit/editor-plugin-show-diff 6.2.9 → 6.2.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.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/pm-plugins/decorations/colorSchemes/standard.js +6 -12
- package/dist/cjs/pm-plugins/decorations/colorSchemes/traditional.js +87 -20
- package/dist/cjs/pm-plugins/decorations/createBlockChangedDecoration.js +14 -14
- package/dist/cjs/pm-plugins/decorations/createInlineChangedDecoration.js +1 -1
- package/dist/cjs/pm-plugins/decorations/createNodeChangedDecorationWidget.js +2 -2
- package/dist/cjs/pm-plugins/decorations/utils/wrapBlockNodeView.js +96 -58
- package/dist/es2019/pm-plugins/decorations/colorSchemes/standard.js +5 -11
- package/dist/es2019/pm-plugins/decorations/colorSchemes/traditional.js +85 -20
- package/dist/es2019/pm-plugins/decorations/createBlockChangedDecoration.js +15 -15
- package/dist/es2019/pm-plugins/decorations/createInlineChangedDecoration.js +2 -2
- package/dist/es2019/pm-plugins/decorations/createNodeChangedDecorationWidget.js +4 -4
- package/dist/es2019/pm-plugins/decorations/utils/wrapBlockNodeView.js +46 -8
- package/dist/esm/pm-plugins/decorations/colorSchemes/standard.js +5 -11
- package/dist/esm/pm-plugins/decorations/colorSchemes/traditional.js +83 -19
- package/dist/esm/pm-plugins/decorations/createBlockChangedDecoration.js +15 -15
- package/dist/esm/pm-plugins/decorations/createInlineChangedDecoration.js +2 -2
- package/dist/esm/pm-plugins/decorations/createNodeChangedDecorationWidget.js +4 -4
- package/dist/esm/pm-plugins/decorations/utils/wrapBlockNodeView.js +98 -60
- package/dist/types/pm-plugins/decorations/colorSchemes/standard.d.ts +0 -1
- package/dist/types/pm-plugins/decorations/colorSchemes/traditional.d.ts +16 -4
- package/dist/types-ts4.5/pm-plugins/decorations/colorSchemes/standard.d.ts +0 -1
- package/dist/types-ts4.5/pm-plugins/decorations/colorSchemes/traditional.d.ts +16 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -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.deletedStyleQuoteNodeWithLozengeActive = exports.deletedStyleQuoteNodeWithLozenge = exports.deletedStyleQuoteNode = exports.deletedRowStyle = exports.deletedContentStyleUnbounded = exports.
|
|
6
|
+
exports.standardDecorationMarkerVariable = exports.editingStyleRuleNode = exports.editingStyleQuoteNode = exports.editingStyleNode = exports.editingStyleCardBlockNode = exports.editingStyleActive = exports.editingStyle = 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;
|
|
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)",
|
|
@@ -38,13 +38,6 @@ var deletedContentStyleNew = exports.deletedContentStyleNew = (0, _lazyNodeView.
|
|
|
38
38
|
position: 'relative',
|
|
39
39
|
opacity: 0.8
|
|
40
40
|
});
|
|
41
|
-
var deletedContentStyleNewActive = exports.deletedContentStyleNewActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
42
|
-
color: "var(--ds-text, #292A2E)",
|
|
43
|
-
textDecoration: 'line-through',
|
|
44
|
-
textDecorationColor: "var(--ds-text-accent-gray, #505258)",
|
|
45
|
-
position: 'relative',
|
|
46
|
-
opacity: 1
|
|
47
|
-
});
|
|
48
41
|
var deletedContentStyleUnbounded = exports.deletedContentStyleUnbounded = (0, _lazyNodeView.convertToInlineCss)({
|
|
49
42
|
position: 'absolute',
|
|
50
43
|
top: '50%',
|
|
@@ -72,7 +65,7 @@ var deletedStyleQuoteNodeWithLozengeActive = exports.deletedStyleQuoteNodeWithLo
|
|
|
72
65
|
paddingTop: "var(--ds-space-025, 2px)",
|
|
73
66
|
paddingBottom: "var(--ds-space-025, 2px)",
|
|
74
67
|
paddingLeft: "var(--ds-space-025, 2px)",
|
|
75
|
-
boxShadow: "0 0 0
|
|
68
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-border-accent-red, #E2483D)"),
|
|
76
69
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
77
70
|
});
|
|
78
71
|
var deletedBlockOutline = exports.deletedBlockOutline = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -80,7 +73,7 @@ var deletedBlockOutline = exports.deletedBlockOutline = (0, _lazyNodeView.conver
|
|
|
80
73
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
81
74
|
});
|
|
82
75
|
var deletedBlockOutlineActive = exports.deletedBlockOutlineActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
83
|
-
boxShadow: "0 0 0
|
|
76
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-border-accent-red, #E2483D)"),
|
|
84
77
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
85
78
|
});
|
|
86
79
|
var deletedBlockOutlineRounded = exports.deletedBlockOutlineRounded = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -88,7 +81,7 @@ var deletedBlockOutlineRounded = exports.deletedBlockOutlineRounded = (0, _lazyN
|
|
|
88
81
|
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
89
82
|
});
|
|
90
83
|
var deletedBlockOutlineRoundedActive = exports.deletedBlockOutlineRoundedActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
91
|
-
boxShadow: "0 0 0
|
|
84
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-border-accent-red, #E2483D)"),
|
|
92
85
|
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
93
86
|
});
|
|
94
87
|
var deletedRowStyle = exports.deletedRowStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -112,7 +105,8 @@ var editingStyleCardBlockNode = exports.editingStyleCardBlockNode = (0, _lazyNod
|
|
|
112
105
|
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
113
106
|
});
|
|
114
107
|
var standardDecorationMarkerVariable = exports.standardDecorationMarkerVariable = (0, _lazyNodeView.convertToInlineCss)({
|
|
115
|
-
'--diff-decoration-marker-color': "var(--ds-border-accent-purple, #AF59E1)"
|
|
108
|
+
'--diff-decoration-marker-color': "var(--ds-border-accent-purple, #AF59E1)",
|
|
109
|
+
'--diff-decoration-marker-ring-width': '1px'
|
|
116
110
|
});
|
|
117
111
|
var addedCellOverlayStyle = exports.addedCellOverlayStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
118
112
|
position: 'absolute',
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.
|
|
7
|
+
exports.deletedTraditionalStyleQuoteNodeActive = exports.deletedTraditionalStyleQuoteNode = exports.deletedTraditionalRowStyle = exports.deletedTraditionalContentStyleUnboundedActive = exports.deletedTraditionalContentStyleUnbounded = exports.deletedTraditionalCellOverlayStyle = exports.deletedTraditionalBlockOutlineRoundedNew = exports.deletedTraditionalBlockOutlineRoundedActive = exports.deletedTraditionalBlockOutlineRounded = exports.deletedTraditionalBlockOutlineNew = exports.deletedTraditionalBlockOutlineActive = exports.deletedTraditionalBlockOutline = void 0;
|
|
8
|
+
exports.getDeletedTraditionalInlineStyle = getDeletedTraditionalInlineStyle;
|
|
9
|
+
exports.traditionalStyleRuleNodeNew = exports.traditionalStyleRuleNodeActive = exports.traditionalStyleRuleNode = exports.traditionalStyleQuoteNodeNew = exports.traditionalStyleQuoteNodeActive = exports.traditionalStyleQuoteNode = exports.traditionalStyleNodeNew = exports.traditionalStyleNodeActive = exports.traditionalStyleNode = exports.traditionalStyleCardBlockNodeNew = exports.traditionalStyleCardBlockNodeActive = exports.traditionalStyleCardBlockNode = exports.traditionalInsertStyleActive = exports.traditionalInsertStyle = exports.traditionalDeletedDecorationMarkerVariableNew = exports.traditionalDeletedDecorationMarkerVariableActive = exports.traditionalDeletedDecorationMarkerVariable = exports.traditionalDecorationMarkerVariableNew = exports.traditionalDecorationMarkerVariableActive = exports.traditionalDecorationMarkerVariable = exports.traditionalAddedCellOverlayStyleNew = exports.traditionalAddedCellOverlayStyle = void 0;
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
11
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
14
|
var traditionalInsertStyle = exports.traditionalInsertStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
9
15
|
background: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
10
16
|
textDecoration: 'underline',
|
|
@@ -19,21 +25,21 @@ var traditionalInsertStyleActive = exports.traditionalInsertStyleActive = (0, _l
|
|
|
19
25
|
textDecorationThickness: "var(--ds-space-025, 2px)",
|
|
20
26
|
textDecorationColor: "var(--ds-text-accent-green, #216E4E)"
|
|
21
27
|
});
|
|
22
|
-
var
|
|
28
|
+
var deletedTraditionalInlineStyleBase = {
|
|
23
29
|
textDecorationColor: "var(--ds-border-accent-red, #E2483D)",
|
|
24
30
|
textDecoration: 'line-through',
|
|
25
31
|
position: 'relative',
|
|
26
32
|
opacity: 1
|
|
33
|
+
};
|
|
34
|
+
var deletedTraditionalInlineStyleActiveBase = _objectSpread(_objectSpread({}, deletedTraditionalInlineStyleBase), {}, {
|
|
35
|
+
textDecorationThickness: '2px',
|
|
36
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest-pressed, #FFB8B2)"
|
|
27
37
|
});
|
|
28
38
|
|
|
29
|
-
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
backgroundColor: "var(--ds-background-accent-red-subtlest-pressed, #FFB8B2)",
|
|
34
|
-
position: 'relative',
|
|
35
|
-
opacity: 1
|
|
36
|
-
});
|
|
39
|
+
/** Strikethrough for traditional removed inline / widget content (non-marker decorations). */
|
|
40
|
+
function getDeletedTraditionalInlineStyle(isActive) {
|
|
41
|
+
return isActive ? (0, _lazyNodeView.convertToInlineCss)(deletedTraditionalInlineStyleActiveBase) : (0, _lazyNodeView.convertToInlineCss)(deletedTraditionalInlineStyleBase);
|
|
42
|
+
}
|
|
37
43
|
var deletedTraditionalContentStyleUnbounded = exports.deletedTraditionalContentStyleUnbounded = (0, _lazyNodeView.convertToInlineCss)({
|
|
38
44
|
position: 'absolute',
|
|
39
45
|
top: '50%',
|
|
@@ -44,7 +50,7 @@ var deletedTraditionalContentStyleUnbounded = exports.deletedTraditionalContentS
|
|
|
44
50
|
zIndex: 1
|
|
45
51
|
});
|
|
46
52
|
|
|
47
|
-
/**
|
|
53
|
+
/** Strikethrough line for traditional when active (background highlight on text wrapper) */
|
|
48
54
|
var deletedTraditionalContentStyleUnboundedActive = exports.deletedTraditionalContentStyleUnboundedActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
49
55
|
position: 'absolute',
|
|
50
56
|
top: '50%',
|
|
@@ -67,7 +73,7 @@ var deletedTraditionalStyleQuoteNodeActive = exports.deletedTraditionalStyleQuot
|
|
|
67
73
|
paddingTop: "var(--ds-space-025, 2px)",
|
|
68
74
|
paddingBottom: "var(--ds-space-025, 2px)",
|
|
69
75
|
paddingLeft: "var(--ds-space-025, 2px)",
|
|
70
|
-
boxShadow: "0 0 0
|
|
76
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtler-pressed, #FD9891)"),
|
|
71
77
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
72
78
|
});
|
|
73
79
|
var deletedTraditionalBlockOutline = exports.deletedTraditionalBlockOutline = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -75,7 +81,7 @@ var deletedTraditionalBlockOutline = exports.deletedTraditionalBlockOutline = (0
|
|
|
75
81
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
76
82
|
});
|
|
77
83
|
var deletedTraditionalBlockOutlineActive = exports.deletedTraditionalBlockOutlineActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
78
|
-
boxShadow: "0 0 0
|
|
84
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtler-pressed, #FD9891)"),
|
|
79
85
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
80
86
|
});
|
|
81
87
|
var deletedTraditionalBlockOutlineRounded = exports.deletedTraditionalBlockOutlineRounded = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -83,7 +89,17 @@ var deletedTraditionalBlockOutlineRounded = exports.deletedTraditionalBlockOutli
|
|
|
83
89
|
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
84
90
|
});
|
|
85
91
|
var deletedTraditionalBlockOutlineRoundedActive = exports.deletedTraditionalBlockOutlineRoundedActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
86
|
-
boxShadow: "0 0 0
|
|
92
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtler-pressed, #FD9891)"),
|
|
93
|
+
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
/** Scroll-navigation “new” emphasis: 4px ring (see {@link traditionalStyleNodeNew}). */
|
|
97
|
+
var deletedTraditionalBlockOutlineNew = exports.deletedTraditionalBlockOutlineNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
98
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtlest, #FFECEB)"),
|
|
99
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
100
|
+
});
|
|
101
|
+
var deletedTraditionalBlockOutlineRoundedNew = exports.deletedTraditionalBlockOutlineRoundedNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
102
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtlest, #FFECEB)"),
|
|
87
103
|
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
88
104
|
});
|
|
89
105
|
var deletedTraditionalRowStyle = exports.deletedTraditionalRowStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
@@ -95,37 +111,77 @@ var deletedTraditionalRowStyle = exports.deletedTraditionalRowStyle = (0, _lazyN
|
|
|
95
111
|
var traditionalStyleQuoteNode = exports.traditionalStyleQuoteNode = (0, _lazyNodeView.convertToInlineCss)({
|
|
96
112
|
borderLeft: "2px solid ".concat("var(--ds-border-accent-green, #22A06B)")
|
|
97
113
|
});
|
|
114
|
+
var traditionalStyleQuoteNodeNew = exports.traditionalStyleQuoteNodeNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
115
|
+
borderLeft: "4px solid ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)")
|
|
116
|
+
});
|
|
98
117
|
var traditionalStyleQuoteNodeActive = exports.traditionalStyleQuoteNodeActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
99
|
-
borderLeft: "
|
|
118
|
+
borderLeft: "4px solid ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)")
|
|
100
119
|
});
|
|
101
120
|
var traditionalStyleRuleNode = exports.traditionalStyleRuleNode = (0, _lazyNodeView.convertToInlineCss)({
|
|
102
121
|
backgroundColor: "var(--ds-border-accent-green, #22A06B)"
|
|
103
122
|
});
|
|
123
|
+
var traditionalStyleRuleNodeNew = exports.traditionalStyleRuleNodeNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
124
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
125
|
+
border: 'none',
|
|
126
|
+
height: '4px',
|
|
127
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
128
|
+
});
|
|
104
129
|
var traditionalStyleRuleNodeActive = exports.traditionalStyleRuleNodeActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
105
|
-
backgroundColor: "var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"
|
|
130
|
+
backgroundColor: "var(--ds-background-accent-green-subtler-pressed, #7EE2B8)",
|
|
131
|
+
border: 'none',
|
|
132
|
+
height: '4px',
|
|
133
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
106
134
|
});
|
|
107
135
|
var traditionalStyleNode = exports.traditionalStyleNode = (0, _lazyNodeView.convertToInlineCss)({
|
|
108
136
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border-accent-green, #22A06B)"),
|
|
109
137
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
110
138
|
});
|
|
139
|
+
var traditionalStyleNodeNew = exports.traditionalStyleNodeNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
140
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)"),
|
|
141
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
142
|
+
});
|
|
111
143
|
var traditionalStyleNodeActive = exports.traditionalStyleNodeActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
112
|
-
boxShadow: "0 0 0
|
|
144
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"),
|
|
113
145
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
114
146
|
});
|
|
115
147
|
var traditionalStyleCardBlockNode = exports.traditionalStyleCardBlockNode = (0, _lazyNodeView.convertToInlineCss)({
|
|
116
148
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border-accent-green, #22A06B)"),
|
|
117
149
|
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
118
150
|
});
|
|
151
|
+
var traditionalStyleCardBlockNodeNew = exports.traditionalStyleCardBlockNodeNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
152
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)"),
|
|
153
|
+
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
154
|
+
});
|
|
119
155
|
var traditionalStyleCardBlockNodeActive = exports.traditionalStyleCardBlockNodeActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
120
|
-
boxShadow: "0 0 0
|
|
156
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"),
|
|
121
157
|
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
122
158
|
});
|
|
123
159
|
var traditionalDecorationMarkerVariable = exports.traditionalDecorationMarkerVariable = (0, _lazyNodeView.convertToInlineCss)({
|
|
124
|
-
'--diff-decoration-marker-color': "var(--ds-border-accent-green, #22A06B)"
|
|
160
|
+
'--diff-decoration-marker-color': "var(--ds-border-accent-green, #22A06B)",
|
|
161
|
+
'--diff-decoration-marker-ring-width': '1px'
|
|
162
|
+
});
|
|
163
|
+
var traditionalDecorationMarkerVariableNew = exports.traditionalDecorationMarkerVariableNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
164
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
165
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
125
166
|
});
|
|
126
167
|
var traditionalDecorationMarkerVariableActive = exports.traditionalDecorationMarkerVariableActive = (0, _lazyNodeView.convertToInlineCss)({
|
|
127
|
-
'--diff-decoration-marker-color': "var(--ds-
|
|
168
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-green-subtler-pressed, #7EE2B8)",
|
|
169
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
128
170
|
});
|
|
171
|
+
|
|
172
|
+
/** Inline deleted traditional styling plus diff marker CSS variables (extension / embedCard / listItem). */
|
|
173
|
+
var traditionalDeletedDecorationMarkerVariable = exports.traditionalDeletedDecorationMarkerVariable = (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedTraditionalInlineStyleBase), {}, {
|
|
174
|
+
'--diff-decoration-marker-color': "var(--ds-border-accent-red, #E2483D)",
|
|
175
|
+
'--diff-decoration-marker-ring-width': '1px'
|
|
176
|
+
}));
|
|
177
|
+
var traditionalDeletedDecorationMarkerVariableNew = exports.traditionalDeletedDecorationMarkerVariableNew = (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedTraditionalInlineStyleBase), {}, {
|
|
178
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
179
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
180
|
+
}));
|
|
181
|
+
var traditionalDeletedDecorationMarkerVariableActive = exports.traditionalDeletedDecorationMarkerVariableActive = (0, _lazyNodeView.convertToInlineCss)(_objectSpread(_objectSpread({}, deletedTraditionalInlineStyleActiveBase), {}, {
|
|
182
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-red-subtler-pressed, #FD9891)",
|
|
183
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
184
|
+
}));
|
|
129
185
|
var traditionalAddedCellOverlayStyle = exports.traditionalAddedCellOverlayStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
130
186
|
position: 'absolute',
|
|
131
187
|
top: 0,
|
|
@@ -137,6 +193,17 @@ var traditionalAddedCellOverlayStyle = exports.traditionalAddedCellOverlayStyle
|
|
|
137
193
|
outline: "1px solid ".concat("var(--ds-border-accent-green, #22A06B)"),
|
|
138
194
|
pointerEvents: 'none'
|
|
139
195
|
});
|
|
196
|
+
var traditionalAddedCellOverlayStyleNew = exports.traditionalAddedCellOverlayStyleNew = (0, _lazyNodeView.convertToInlineCss)({
|
|
197
|
+
position: 'absolute',
|
|
198
|
+
top: 0,
|
|
199
|
+
left: 0,
|
|
200
|
+
width: '100%',
|
|
201
|
+
height: '100%',
|
|
202
|
+
backgroundColor: "rgba(from ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)", " r g b / 0.5)"),
|
|
203
|
+
zIndex: 1,
|
|
204
|
+
outline: "1px solid ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"),
|
|
205
|
+
pointerEvents: 'none'
|
|
206
|
+
});
|
|
140
207
|
var deletedTraditionalCellOverlayStyle = exports.deletedTraditionalCellOverlayStyle = (0, _lazyNodeView.convertToInlineCss)({
|
|
141
208
|
position: 'absolute',
|
|
142
209
|
top: 0,
|
|
@@ -36,51 +36,51 @@ var getBlockNodeStyle = function getBlockNodeStyle(_ref) {
|
|
|
36
36
|
if (['extension', 'embedCard', 'listItem'].includes(nodeName)) {
|
|
37
37
|
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
38
38
|
if (isInserted) {
|
|
39
|
-
return isTraditional && isActive ? _traditional.traditionalDecorationMarkerVariableActive : isTraditional ? _traditional.traditionalDecorationMarkerVariable : _standard.standardDecorationMarkerVariable;
|
|
39
|
+
return isTraditional && isActive ? _traditional.traditionalDecorationMarkerVariableActive : isTraditional ? (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalDecorationMarkerVariableNew : _traditional.traditionalDecorationMarkerVariable : _standard.standardDecorationMarkerVariable;
|
|
40
40
|
} else {
|
|
41
|
-
return isTraditional ? _traditional.
|
|
41
|
+
return isTraditional && isActive ? _traditional.traditionalDeletedDecorationMarkerVariableActive : isTraditional ? (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalDeletedDecorationMarkerVariableNew : _traditional.traditionalDeletedDecorationMarkerVariable : _standard.deletedContentStyleNew;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
return isTraditional && isActive ? _traditional.traditionalDecorationMarkerVariableActive : isTraditional ? _traditional.traditionalDecorationMarkerVariable : _standard.standardDecorationMarkerVariable;
|
|
44
|
+
return isTraditional && isActive ? _traditional.traditionalDecorationMarkerVariableActive : isTraditional ? (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalDecorationMarkerVariableNew : _traditional.traditionalDecorationMarkerVariable : _standard.standardDecorationMarkerVariable;
|
|
45
45
|
}
|
|
46
46
|
if (nodeName === 'blockquote') {
|
|
47
47
|
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
48
48
|
if (isInserted) {
|
|
49
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleQuoteNodeActive : _traditional.traditionalStyleQuoteNode : _standard.editingStyleQuoteNode;
|
|
49
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleQuoteNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleQuoteNodeNew : _traditional.traditionalStyleQuoteNode : _standard.editingStyleQuoteNode;
|
|
50
50
|
} else {
|
|
51
51
|
return isTraditional ? _traditional.deletedTraditionalStyleQuoteNode : _standard.deletedStyleQuoteNode;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleQuoteNodeActive : _traditional.traditionalStyleQuoteNode : _standard.editingStyleQuoteNode;
|
|
54
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleQuoteNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleQuoteNodeNew : _traditional.traditionalStyleQuoteNode : _standard.editingStyleQuoteNode;
|
|
55
55
|
}
|
|
56
56
|
if (nodeName === 'rule') {
|
|
57
57
|
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
58
58
|
if (isInserted) {
|
|
59
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleRuleNodeActive : _traditional.traditionalStyleRuleNode : _standard.editingStyleRuleNode;
|
|
59
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleRuleNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleRuleNodeNew : _traditional.traditionalStyleRuleNode : _standard.editingStyleRuleNode;
|
|
60
60
|
} else {
|
|
61
|
-
return isTraditional ? _traditional.
|
|
61
|
+
return isTraditional ? (0, _traditional.getDeletedTraditionalInlineStyle)(false) : _standard.deletedContentStyleNew;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleRuleNodeActive : _traditional.traditionalStyleRuleNode : _standard.editingStyleRuleNode;
|
|
64
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleRuleNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleRuleNodeNew : _traditional.traditionalStyleRuleNode : _standard.editingStyleRuleNode;
|
|
65
65
|
}
|
|
66
66
|
if (nodeName === 'blockCard') {
|
|
67
67
|
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
68
68
|
if (isInserted) {
|
|
69
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleCardBlockNodeActive : _traditional.traditionalStyleCardBlockNode : _standard.editingStyleCardBlockNode;
|
|
69
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleCardBlockNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleCardBlockNodeNew : _traditional.traditionalStyleCardBlockNode : _standard.editingStyleCardBlockNode;
|
|
70
70
|
} else {
|
|
71
|
-
return isTraditional ? _traditional.
|
|
71
|
+
return isTraditional ? (0, _traditional.getDeletedTraditionalInlineStyle)(false) : _standard.deletedContentStyleNew;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleCardBlockNodeActive : _traditional.traditionalStyleCardBlockNode : _standard.editingStyleCardBlockNode;
|
|
74
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleCardBlockNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleCardBlockNodeNew : _traditional.traditionalStyleCardBlockNode : _standard.editingStyleCardBlockNode;
|
|
75
75
|
}
|
|
76
76
|
if ((0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
77
77
|
if (isInserted) {
|
|
78
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleNodeActive : _traditional.traditionalStyleNode : _standard.editingStyleNode;
|
|
78
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleNodeNew : _traditional.traditionalStyleNode : _standard.editingStyleNode;
|
|
79
79
|
} else {
|
|
80
|
-
return isTraditional ? _traditional.
|
|
80
|
+
return isTraditional ? (0, _traditional.getDeletedTraditionalInlineStyle)(false) : _standard.deletedContentStyleNew;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
return isTraditional ? isActive ? _traditional.traditionalStyleNodeActive : _traditional.traditionalStyleNode : _standard.editingStyleNode;
|
|
83
|
+
return isTraditional ? isActive ? _traditional.traditionalStyleNodeActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalStyleNodeNew : _traditional.traditionalStyleNode : _standard.editingStyleNode;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
/**
|
|
@@ -32,7 +32,7 @@ var createInlineChangedDecoration = exports.createInlineChangedDecoration = func
|
|
|
32
32
|
}
|
|
33
33
|
} else {
|
|
34
34
|
if (colorScheme === 'traditional') {
|
|
35
|
-
style = _traditional.
|
|
35
|
+
style = (0, _traditional.getDeletedTraditionalInlineStyle)(false);
|
|
36
36
|
} else {
|
|
37
37
|
style = isActive ? _standard.deletedContentStyleActive : _standard.deletedContentStyle;
|
|
38
38
|
}
|
|
@@ -38,10 +38,10 @@ var getInsertedContentStyle = function getInsertedContentStyle(colorScheme) {
|
|
|
38
38
|
var getDeletedContentStyle = function getDeletedContentStyle(colorScheme) {
|
|
39
39
|
var isActive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
40
40
|
if (colorScheme === 'traditional') {
|
|
41
|
-
return
|
|
41
|
+
return (0, _traditional.getDeletedTraditionalInlineStyle)(isActive);
|
|
42
42
|
}
|
|
43
43
|
if (isActive) {
|
|
44
|
-
return
|
|
44
|
+
return _standard.deletedContentStyleActive;
|
|
45
45
|
}
|
|
46
46
|
return (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? _standard.deletedContentStyleNew : _standard.deletedContentStyle;
|
|
47
47
|
};
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.wrapBlockNodeView = void 0;
|
|
7
7
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
8
8
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
11
|
var _standard = require("../colorSchemes/standard");
|
|
11
12
|
var _traditional = require("../colorSchemes/traditional");
|
|
@@ -67,10 +68,10 @@ var getChangedContentStyle = function getChangedContentStyle(colorScheme) {
|
|
|
67
68
|
return isActive ? _standard.editingStyleActive : _standard.editingStyle;
|
|
68
69
|
}
|
|
69
70
|
if (colorScheme === 'traditional') {
|
|
70
|
-
return
|
|
71
|
+
return (0, _traditional.getDeletedTraditionalInlineStyle)(isActive);
|
|
71
72
|
}
|
|
72
73
|
if (isActive) {
|
|
73
|
-
return
|
|
74
|
+
return _standard.deletedContentStyleActive;
|
|
74
75
|
}
|
|
75
76
|
return (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? _standard.deletedContentStyleNew : _standard.deletedContentStyle;
|
|
76
77
|
};
|
|
@@ -83,7 +84,10 @@ var getChangedNodeStyle = function getChangedNodeStyle(nodeName, colorScheme) {
|
|
|
83
84
|
return undefined;
|
|
84
85
|
}
|
|
85
86
|
if (isTraditional) {
|
|
86
|
-
|
|
87
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation')) {
|
|
88
|
+
return isActive ? _traditional.traditionalStyleNodeActive : _traditional.traditionalStyleNodeNew;
|
|
89
|
+
}
|
|
90
|
+
return isActive ? _traditional.traditionalStyleNodeActive : _traditional.traditionalStyleNode;
|
|
87
91
|
}
|
|
88
92
|
return _standard.editingStyleNode;
|
|
89
93
|
}
|
|
@@ -96,13 +100,13 @@ var getChangedNodeStyle = function getChangedNodeStyle(nodeName, colorScheme) {
|
|
|
96
100
|
case 'expand':
|
|
97
101
|
case 'decisionList':
|
|
98
102
|
if (isTraditional) {
|
|
99
|
-
return isActive ? _traditional.deletedTraditionalBlockOutlineActive : _traditional.deletedTraditionalBlockOutline;
|
|
103
|
+
return isActive ? _traditional.deletedTraditionalBlockOutlineActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.deletedTraditionalBlockOutlineNew : _traditional.deletedTraditionalBlockOutline;
|
|
100
104
|
}
|
|
101
105
|
return isActive ? _standard.deletedBlockOutlineActive : _standard.deletedBlockOutline;
|
|
102
106
|
case 'panel':
|
|
103
107
|
case 'codeBlock':
|
|
104
108
|
if (isTraditional) {
|
|
105
|
-
return isActive ? _traditional.deletedTraditionalBlockOutlineRoundedActive : _traditional.deletedTraditionalBlockOutlineRounded;
|
|
109
|
+
return isActive ? _traditional.deletedTraditionalBlockOutlineRoundedActive : (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.deletedTraditionalBlockOutlineRoundedNew : _traditional.deletedTraditionalBlockOutlineRounded;
|
|
106
110
|
}
|
|
107
111
|
return isActive ? _standard.deletedBlockOutlineRoundedActive : _standard.deletedBlockOutlineRounded;
|
|
108
112
|
default:
|
|
@@ -134,6 +138,22 @@ var shouldAddShowDiffDeletedNodeClass = function shouldAddShowDiffDeletedNodeCla
|
|
|
134
138
|
}
|
|
135
139
|
};
|
|
136
140
|
|
|
141
|
+
/** Scroll-nav “new” ring (4px red subtlest) for media/embed; styled in editor-core smartCardStyles. */
|
|
142
|
+
var maybeAddDeletedOutlineNewClass = function maybeAddDeletedOutlineNewClass(_ref) {
|
|
143
|
+
var nodeView = _ref.nodeView,
|
|
144
|
+
targetNode = _ref.targetNode,
|
|
145
|
+
colorScheme = _ref.colorScheme,
|
|
146
|
+
_ref$isActive = _ref.isActive,
|
|
147
|
+
isActive = _ref$isActive === void 0 ? false : _ref$isActive;
|
|
148
|
+
var name = targetNode.type.name;
|
|
149
|
+
if (name !== 'mediaSingle' && name !== 'embedCard') {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (colorScheme === 'traditional' && !isActive && (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation')) {
|
|
153
|
+
nodeView.classList.add('show-diff-deleted-outline-new');
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
137
157
|
/**
|
|
138
158
|
* Checks if a node should apply deleted styles directly without wrapper
|
|
139
159
|
* to preserve natural block-level margins
|
|
@@ -141,13 +161,13 @@ var shouldAddShowDiffDeletedNodeClass = function shouldAddShowDiffDeletedNodeCla
|
|
|
141
161
|
var shouldApplyStylesDirectly = function shouldApplyStylesDirectly(nodeName) {
|
|
142
162
|
return nodeName === 'heading';
|
|
143
163
|
};
|
|
144
|
-
var applyCellOverlayStyles = function applyCellOverlayStyles(
|
|
145
|
-
var element =
|
|
146
|
-
colorScheme =
|
|
147
|
-
isInserted =
|
|
164
|
+
var applyCellOverlayStyles = function applyCellOverlayStyles(_ref2) {
|
|
165
|
+
var element = _ref2.element,
|
|
166
|
+
colorScheme = _ref2.colorScheme,
|
|
167
|
+
isInserted = _ref2.isInserted;
|
|
148
168
|
element.querySelectorAll('td, th').forEach(function (cell) {
|
|
149
169
|
var overlay = document.createElement('span');
|
|
150
|
-
var overlayStyle = colorScheme === 'traditional' ? isInserted ? _traditional.traditionalAddedCellOverlayStyle : _traditional.deletedTraditionalCellOverlayStyle : isInserted ? _standard.addedCellOverlayStyle : _standard.deletedCellOverlayStyle;
|
|
170
|
+
var overlayStyle = colorScheme === 'traditional' ? isInserted ? (0, _platformFeatureFlags.fg)('platform_editor_show_diff_scroll_navigation') ? _traditional.traditionalAddedCellOverlayStyleNew : _traditional.traditionalAddedCellOverlayStyle : _traditional.deletedTraditionalCellOverlayStyle : isInserted ? _standard.addedCellOverlayStyle : _standard.deletedCellOverlayStyle;
|
|
151
171
|
overlay.setAttribute('style', overlayStyle);
|
|
152
172
|
cell.appendChild(overlay);
|
|
153
173
|
});
|
|
@@ -197,12 +217,12 @@ var createBlockNodeWrapper = function createBlockNodeWrapper() {
|
|
|
197
217
|
/**
|
|
198
218
|
* Applies styles directly to an HTML element by merging with existing styles
|
|
199
219
|
*/
|
|
200
|
-
var applyStylesToElement = function applyStylesToElement(
|
|
201
|
-
var element =
|
|
202
|
-
targetNode =
|
|
203
|
-
colorScheme =
|
|
204
|
-
isActive =
|
|
205
|
-
isInserted =
|
|
220
|
+
var applyStylesToElement = function applyStylesToElement(_ref3) {
|
|
221
|
+
var element = _ref3.element,
|
|
222
|
+
targetNode = _ref3.targetNode,
|
|
223
|
+
colorScheme = _ref3.colorScheme,
|
|
224
|
+
isActive = _ref3.isActive,
|
|
225
|
+
isInserted = _ref3.isInserted;
|
|
206
226
|
var currentStyle = element.getAttribute('style') || '';
|
|
207
227
|
var contentStyle = getChangedContentStyle(colorScheme, isActive, isInserted);
|
|
208
228
|
var nodeSpecificStyle = getChangedNodeStyle(targetNode.type.name, colorScheme, isInserted, isActive) || '';
|
|
@@ -212,12 +232,12 @@ var applyStylesToElement = function applyStylesToElement(_ref2) {
|
|
|
212
232
|
/**
|
|
213
233
|
* Creates a content wrapper with deleted styles for a block node
|
|
214
234
|
*/
|
|
215
|
-
var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(
|
|
216
|
-
var nodeView =
|
|
217
|
-
targetNode =
|
|
218
|
-
colorScheme =
|
|
219
|
-
isActive =
|
|
220
|
-
isInserted =
|
|
235
|
+
var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(_ref4) {
|
|
236
|
+
var nodeView = _ref4.nodeView,
|
|
237
|
+
targetNode = _ref4.targetNode,
|
|
238
|
+
colorScheme = _ref4.colorScheme,
|
|
239
|
+
isActive = _ref4.isActive,
|
|
240
|
+
isInserted = _ref4.isInserted;
|
|
221
241
|
var contentWrapper = document.createElement('div');
|
|
222
242
|
var nodeStyle = getChangedNodeStyle(targetNode.type.name, colorScheme, isInserted, isActive);
|
|
223
243
|
contentWrapper.setAttribute('style', "".concat(getChangedContentStyle(colorScheme, isActive, isInserted)).concat(nodeStyle || ''));
|
|
@@ -231,14 +251,14 @@ var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(_ref3
|
|
|
231
251
|
* to wait for the rich-media-item to appear before attaching the lozenge.
|
|
232
252
|
* @returns true if embedCard was handled
|
|
233
253
|
*/
|
|
234
|
-
var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(
|
|
235
|
-
var dom =
|
|
236
|
-
nodeView =
|
|
237
|
-
targetNode =
|
|
238
|
-
lozenge =
|
|
239
|
-
colorScheme =
|
|
240
|
-
|
|
241
|
-
isActive =
|
|
254
|
+
var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(_ref5) {
|
|
255
|
+
var dom = _ref5.dom,
|
|
256
|
+
nodeView = _ref5.nodeView,
|
|
257
|
+
targetNode = _ref5.targetNode,
|
|
258
|
+
lozenge = _ref5.lozenge,
|
|
259
|
+
colorScheme = _ref5.colorScheme,
|
|
260
|
+
_ref5$isActive = _ref5.isActive,
|
|
261
|
+
isActive = _ref5$isActive === void 0 ? false : _ref5$isActive;
|
|
242
262
|
if (targetNode.type.name !== 'embedCard' || !(nodeView instanceof HTMLElement)) {
|
|
243
263
|
return false;
|
|
244
264
|
}
|
|
@@ -264,6 +284,12 @@ var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(_ref4) {
|
|
|
264
284
|
if (isActive) {
|
|
265
285
|
nodeView.classList.add('show-diff-deleted-active');
|
|
266
286
|
}
|
|
287
|
+
maybeAddDeletedOutlineNewClass({
|
|
288
|
+
nodeView: nodeView,
|
|
289
|
+
targetNode: targetNode,
|
|
290
|
+
colorScheme: colorScheme,
|
|
291
|
+
isActive: isActive
|
|
292
|
+
});
|
|
267
293
|
}
|
|
268
294
|
dom.append(nodeView);
|
|
269
295
|
return true;
|
|
@@ -273,14 +299,14 @@ var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(_ref4) {
|
|
|
273
299
|
* Handles special mediaSingle node rendering with lozenge on child media element
|
|
274
300
|
* @returns true if mediaSingle was handled, false otherwise
|
|
275
301
|
*/
|
|
276
|
-
var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(
|
|
277
|
-
var dom =
|
|
278
|
-
nodeView =
|
|
279
|
-
targetNode =
|
|
280
|
-
lozenge =
|
|
281
|
-
colorScheme =
|
|
282
|
-
|
|
283
|
-
isActive =
|
|
302
|
+
var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(_ref6) {
|
|
303
|
+
var dom = _ref6.dom,
|
|
304
|
+
nodeView = _ref6.nodeView,
|
|
305
|
+
targetNode = _ref6.targetNode,
|
|
306
|
+
lozenge = _ref6.lozenge,
|
|
307
|
+
colorScheme = _ref6.colorScheme,
|
|
308
|
+
_ref6$isActive = _ref6.isActive,
|
|
309
|
+
isActive = _ref6$isActive === void 0 ? false : _ref6$isActive;
|
|
284
310
|
if (targetNode.type.name !== 'mediaSingle' || !(nodeView instanceof HTMLElement)) {
|
|
285
311
|
return false;
|
|
286
312
|
}
|
|
@@ -304,6 +330,12 @@ var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(_ref5)
|
|
|
304
330
|
if (isActive) {
|
|
305
331
|
nodeView.classList.add('show-diff-deleted-active');
|
|
306
332
|
}
|
|
333
|
+
maybeAddDeletedOutlineNewClass({
|
|
334
|
+
nodeView: nodeView,
|
|
335
|
+
targetNode: targetNode,
|
|
336
|
+
colorScheme: colorScheme,
|
|
337
|
+
isActive: isActive
|
|
338
|
+
});
|
|
307
339
|
}
|
|
308
340
|
dom.append(nodeView);
|
|
309
341
|
return true;
|
|
@@ -312,16 +344,16 @@ var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(_ref5)
|
|
|
312
344
|
/**
|
|
313
345
|
* Appends a block node with wrapper, lozenge, and appropriate styling
|
|
314
346
|
*/
|
|
315
|
-
var wrapBlockNode = function wrapBlockNode(
|
|
316
|
-
var dom =
|
|
317
|
-
nodeView =
|
|
318
|
-
targetNode =
|
|
319
|
-
colorScheme =
|
|
320
|
-
intl =
|
|
321
|
-
|
|
322
|
-
isActive =
|
|
323
|
-
|
|
324
|
-
isInserted =
|
|
347
|
+
var wrapBlockNode = function wrapBlockNode(_ref7) {
|
|
348
|
+
var dom = _ref7.dom,
|
|
349
|
+
nodeView = _ref7.nodeView,
|
|
350
|
+
targetNode = _ref7.targetNode,
|
|
351
|
+
colorScheme = _ref7.colorScheme,
|
|
352
|
+
intl = _ref7.intl,
|
|
353
|
+
_ref7$isActive = _ref7.isActive,
|
|
354
|
+
isActive = _ref7$isActive === void 0 ? false : _ref7$isActive,
|
|
355
|
+
_ref7$isInserted = _ref7.isInserted,
|
|
356
|
+
isInserted = _ref7$isInserted === void 0 ? false : _ref7$isInserted;
|
|
325
357
|
var blockWrapper = createBlockNodeWrapper();
|
|
326
358
|
if (shouldShowRemovedLozenge(targetNode.type.name) && (!(0, _expValEquals.expValEquals)('platform_editor_diff_plugin_extended', 'isEnabled', true) || !isInserted)) {
|
|
327
359
|
var lozenge = createRemovedLozenge(intl, isActive, colorScheme);
|
|
@@ -361,6 +393,12 @@ var wrapBlockNode = function wrapBlockNode(_ref6) {
|
|
|
361
393
|
if (isActive) {
|
|
362
394
|
nodeView.classList.add('show-diff-deleted-active');
|
|
363
395
|
}
|
|
396
|
+
maybeAddDeletedOutlineNewClass({
|
|
397
|
+
nodeView: nodeView,
|
|
398
|
+
targetNode: targetNode,
|
|
399
|
+
colorScheme: colorScheme,
|
|
400
|
+
isActive: isActive
|
|
401
|
+
});
|
|
364
402
|
}
|
|
365
403
|
dom.append(blockWrapper);
|
|
366
404
|
};
|
|
@@ -370,16 +408,16 @@ var wrapBlockNode = function wrapBlockNode(_ref6) {
|
|
|
370
408
|
* For heading nodes, applies styles directly to preserve natural margins.
|
|
371
409
|
* For other block nodes, uses wrapper approach with optional lozenge.
|
|
372
410
|
*/
|
|
373
|
-
var wrapBlockNodeView = exports.wrapBlockNodeView = function wrapBlockNodeView(
|
|
374
|
-
var dom =
|
|
375
|
-
nodeView =
|
|
376
|
-
targetNode =
|
|
377
|
-
colorScheme =
|
|
378
|
-
intl =
|
|
379
|
-
|
|
380
|
-
isActive =
|
|
381
|
-
|
|
382
|
-
isInserted =
|
|
411
|
+
var wrapBlockNodeView = exports.wrapBlockNodeView = function wrapBlockNodeView(_ref8) {
|
|
412
|
+
var dom = _ref8.dom,
|
|
413
|
+
nodeView = _ref8.nodeView,
|
|
414
|
+
targetNode = _ref8.targetNode,
|
|
415
|
+
colorScheme = _ref8.colorScheme,
|
|
416
|
+
intl = _ref8.intl,
|
|
417
|
+
_ref8$isActive = _ref8.isActive,
|
|
418
|
+
isActive = _ref8$isActive === void 0 ? false : _ref8$isActive,
|
|
419
|
+
_ref8$isInserted = _ref8.isInserted,
|
|
420
|
+
isInserted = _ref8$isInserted === void 0 ? false : _ref8$isInserted;
|
|
383
421
|
if (shouldApplyStylesDirectly(targetNode.type.name) && nodeView instanceof HTMLElement) {
|
|
384
422
|
// Apply deleted styles directly to preserve natural block-level margins
|
|
385
423
|
applyStylesToElement({
|