@atlaskit/editor-plugin-show-diff 6.2.10 → 6.2.12
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 +4 -4
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
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; }
|
|
3
|
+
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) { _defineProperty(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; }
|
|
1
4
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
5
|
export var traditionalInsertStyle = convertToInlineCss({
|
|
3
6
|
background: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
@@ -13,21 +16,21 @@ export var traditionalInsertStyleActive = convertToInlineCss({
|
|
|
13
16
|
textDecorationThickness: "var(--ds-space-025, 2px)",
|
|
14
17
|
textDecorationColor: "var(--ds-text-accent-green, #216E4E)"
|
|
15
18
|
});
|
|
16
|
-
|
|
19
|
+
var deletedTraditionalInlineStyleBase = {
|
|
17
20
|
textDecorationColor: "var(--ds-border-accent-red, #E2483D)",
|
|
18
21
|
textDecoration: 'line-through',
|
|
19
22
|
position: 'relative',
|
|
20
23
|
opacity: 1
|
|
24
|
+
};
|
|
25
|
+
var deletedTraditionalInlineStyleActiveBase = _objectSpread(_objectSpread({}, deletedTraditionalInlineStyleBase), {}, {
|
|
26
|
+
textDecorationThickness: '2px',
|
|
27
|
+
backgroundColor: "var(--ds-background-accent-red-subtlest-pressed, #FFB8B2)"
|
|
21
28
|
});
|
|
22
29
|
|
|
23
|
-
/**
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
backgroundColor: "var(--ds-background-accent-red-subtlest-pressed, #FFB8B2)",
|
|
28
|
-
position: 'relative',
|
|
29
|
-
opacity: 1
|
|
30
|
-
});
|
|
30
|
+
/** Strikethrough for traditional removed inline / widget content (non-marker decorations). */
|
|
31
|
+
export function getDeletedTraditionalInlineStyle(isActive) {
|
|
32
|
+
return isActive ? convertToInlineCss(deletedTraditionalInlineStyleActiveBase) : convertToInlineCss(deletedTraditionalInlineStyleBase);
|
|
33
|
+
}
|
|
31
34
|
export var deletedTraditionalContentStyleUnbounded = convertToInlineCss({
|
|
32
35
|
position: 'absolute',
|
|
33
36
|
top: '50%',
|
|
@@ -38,7 +41,7 @@ export var deletedTraditionalContentStyleUnbounded = convertToInlineCss({
|
|
|
38
41
|
zIndex: 1
|
|
39
42
|
});
|
|
40
43
|
|
|
41
|
-
/**
|
|
44
|
+
/** Strikethrough line for traditional when active (background highlight on text wrapper) */
|
|
42
45
|
export var deletedTraditionalContentStyleUnboundedActive = convertToInlineCss({
|
|
43
46
|
position: 'absolute',
|
|
44
47
|
top: '50%',
|
|
@@ -61,7 +64,7 @@ export var deletedTraditionalStyleQuoteNodeActive = convertToInlineCss({
|
|
|
61
64
|
paddingTop: "var(--ds-space-025, 2px)",
|
|
62
65
|
paddingBottom: "var(--ds-space-025, 2px)",
|
|
63
66
|
paddingLeft: "var(--ds-space-025, 2px)",
|
|
64
|
-
boxShadow: "0 0 0
|
|
67
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtler-pressed, #FD9891)"),
|
|
65
68
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
66
69
|
});
|
|
67
70
|
export var deletedTraditionalBlockOutline = convertToInlineCss({
|
|
@@ -69,7 +72,7 @@ export var deletedTraditionalBlockOutline = convertToInlineCss({
|
|
|
69
72
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
70
73
|
});
|
|
71
74
|
export var deletedTraditionalBlockOutlineActive = convertToInlineCss({
|
|
72
|
-
boxShadow: "0 0 0
|
|
75
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtler-pressed, #FD9891)"),
|
|
73
76
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
74
77
|
});
|
|
75
78
|
export var deletedTraditionalBlockOutlineRounded = convertToInlineCss({
|
|
@@ -77,7 +80,17 @@ export var deletedTraditionalBlockOutlineRounded = convertToInlineCss({
|
|
|
77
80
|
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
78
81
|
});
|
|
79
82
|
export var deletedTraditionalBlockOutlineRoundedActive = convertToInlineCss({
|
|
80
|
-
boxShadow: "0 0 0
|
|
83
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtler-pressed, #FD9891)"),
|
|
84
|
+
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/** Scroll-navigation “new” emphasis: 4px ring (see {@link traditionalStyleNodeNew}). */
|
|
88
|
+
export var deletedTraditionalBlockOutlineNew = convertToInlineCss({
|
|
89
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtlest, #FFECEB)"),
|
|
90
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
91
|
+
});
|
|
92
|
+
export var deletedTraditionalBlockOutlineRoundedNew = convertToInlineCss({
|
|
93
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-red-subtlest, #FFECEB)"),
|
|
81
94
|
borderRadius: "calc(".concat("var(--ds-radius-xsmall, 2px)", " + 1px)")
|
|
82
95
|
});
|
|
83
96
|
export var deletedTraditionalRowStyle = convertToInlineCss({
|
|
@@ -89,37 +102,77 @@ export var deletedTraditionalRowStyle = convertToInlineCss({
|
|
|
89
102
|
export var traditionalStyleQuoteNode = convertToInlineCss({
|
|
90
103
|
borderLeft: "2px solid ".concat("var(--ds-border-accent-green, #22A06B)")
|
|
91
104
|
});
|
|
105
|
+
export var traditionalStyleQuoteNodeNew = convertToInlineCss({
|
|
106
|
+
borderLeft: "4px solid ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)")
|
|
107
|
+
});
|
|
92
108
|
export var traditionalStyleQuoteNodeActive = convertToInlineCss({
|
|
93
|
-
borderLeft: "
|
|
109
|
+
borderLeft: "4px solid ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)")
|
|
94
110
|
});
|
|
95
111
|
export var traditionalStyleRuleNode = convertToInlineCss({
|
|
96
112
|
backgroundColor: "var(--ds-border-accent-green, #22A06B)"
|
|
97
113
|
});
|
|
114
|
+
export var traditionalStyleRuleNodeNew = convertToInlineCss({
|
|
115
|
+
backgroundColor: "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
116
|
+
border: 'none',
|
|
117
|
+
height: '4px',
|
|
118
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
119
|
+
});
|
|
98
120
|
export var traditionalStyleRuleNodeActive = convertToInlineCss({
|
|
99
|
-
backgroundColor: "var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"
|
|
121
|
+
backgroundColor: "var(--ds-background-accent-green-subtler-pressed, #7EE2B8)",
|
|
122
|
+
border: 'none',
|
|
123
|
+
height: '4px',
|
|
124
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
100
125
|
});
|
|
101
126
|
export var traditionalStyleNode = convertToInlineCss({
|
|
102
127
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border-accent-green, #22A06B)"),
|
|
103
128
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
104
129
|
});
|
|
130
|
+
export var traditionalStyleNodeNew = convertToInlineCss({
|
|
131
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)"),
|
|
132
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
133
|
+
});
|
|
105
134
|
export var traditionalStyleNodeActive = convertToInlineCss({
|
|
106
|
-
boxShadow: "0 0 0
|
|
135
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"),
|
|
107
136
|
borderRadius: "var(--ds-radius-small, 4px)"
|
|
108
137
|
});
|
|
109
138
|
export var traditionalStyleCardBlockNode = convertToInlineCss({
|
|
110
139
|
boxShadow: "0 0 0 1px ".concat("var(--ds-border-accent-green, #22A06B)"),
|
|
111
140
|
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
112
141
|
});
|
|
142
|
+
export var traditionalStyleCardBlockNodeNew = convertToInlineCss({
|
|
143
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)"),
|
|
144
|
+
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
145
|
+
});
|
|
113
146
|
export var traditionalStyleCardBlockNodeActive = convertToInlineCss({
|
|
114
|
-
boxShadow: "0 0 0
|
|
147
|
+
boxShadow: "0 0 0 4px ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"),
|
|
115
148
|
borderRadius: "var(--ds-radius-medium, 6px)"
|
|
116
149
|
});
|
|
117
150
|
export var traditionalDecorationMarkerVariable = convertToInlineCss({
|
|
118
|
-
'--diff-decoration-marker-color': "var(--ds-border-accent-green, #22A06B)"
|
|
151
|
+
'--diff-decoration-marker-color': "var(--ds-border-accent-green, #22A06B)",
|
|
152
|
+
'--diff-decoration-marker-ring-width': '1px'
|
|
153
|
+
});
|
|
154
|
+
export var traditionalDecorationMarkerVariableNew = convertToInlineCss({
|
|
155
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-green-subtlest, #DCFFF1)",
|
|
156
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
119
157
|
});
|
|
120
158
|
export var traditionalDecorationMarkerVariableActive = convertToInlineCss({
|
|
121
|
-
'--diff-decoration-marker-color': "var(--ds-
|
|
159
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-green-subtler-pressed, #7EE2B8)",
|
|
160
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
122
161
|
});
|
|
162
|
+
|
|
163
|
+
/** Inline deleted traditional styling plus diff marker CSS variables (extension / embedCard / listItem). */
|
|
164
|
+
export var traditionalDeletedDecorationMarkerVariable = convertToInlineCss(_objectSpread(_objectSpread({}, deletedTraditionalInlineStyleBase), {}, {
|
|
165
|
+
'--diff-decoration-marker-color': "var(--ds-border-accent-red, #E2483D)",
|
|
166
|
+
'--diff-decoration-marker-ring-width': '1px'
|
|
167
|
+
}));
|
|
168
|
+
export var traditionalDeletedDecorationMarkerVariableNew = convertToInlineCss(_objectSpread(_objectSpread({}, deletedTraditionalInlineStyleBase), {}, {
|
|
169
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-red-subtlest, #FFECEB)",
|
|
170
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
171
|
+
}));
|
|
172
|
+
export var traditionalDeletedDecorationMarkerVariableActive = convertToInlineCss(_objectSpread(_objectSpread({}, deletedTraditionalInlineStyleActiveBase), {}, {
|
|
173
|
+
'--diff-decoration-marker-color': "var(--ds-background-accent-red-subtler-pressed, #FD9891)",
|
|
174
|
+
'--diff-decoration-marker-ring-width': '4px'
|
|
175
|
+
}));
|
|
123
176
|
export var traditionalAddedCellOverlayStyle = convertToInlineCss({
|
|
124
177
|
position: 'absolute',
|
|
125
178
|
top: 0,
|
|
@@ -131,6 +184,17 @@ export var traditionalAddedCellOverlayStyle = convertToInlineCss({
|
|
|
131
184
|
outline: "1px solid ".concat("var(--ds-border-accent-green, #22A06B)"),
|
|
132
185
|
pointerEvents: 'none'
|
|
133
186
|
});
|
|
187
|
+
export var traditionalAddedCellOverlayStyleNew = convertToInlineCss({
|
|
188
|
+
position: 'absolute',
|
|
189
|
+
top: 0,
|
|
190
|
+
left: 0,
|
|
191
|
+
width: '100%',
|
|
192
|
+
height: '100%',
|
|
193
|
+
backgroundColor: "rgba(from ".concat("var(--ds-background-accent-green-subtlest, #DCFFF1)", " r g b / 0.5)"),
|
|
194
|
+
zIndex: 1,
|
|
195
|
+
outline: "1px solid ".concat("var(--ds-background-accent-green-subtler-pressed, #7EE2B8)"),
|
|
196
|
+
pointerEvents: 'none'
|
|
197
|
+
});
|
|
134
198
|
export var deletedTraditionalCellOverlayStyle = convertToInlineCss({
|
|
135
199
|
position: 'absolute',
|
|
136
200
|
top: 0,
|
|
@@ -2,7 +2,7 @@ import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
4
|
import { standardDecorationMarkerVariable, editingStyleQuoteNode, editingStyleRuleNode, editingStyleCardBlockNode, editingStyleNode, deletedContentStyleNew, deletedStyleQuoteNode } from './colorSchemes/standard';
|
|
5
|
-
import { traditionalDecorationMarkerVariable, traditionalDecorationMarkerVariableActive, traditionalStyleQuoteNode, traditionalStyleQuoteNodeActive, traditionalStyleRuleNode, traditionalStyleRuleNodeActive, traditionalStyleCardBlockNode, traditionalStyleCardBlockNodeActive, traditionalStyleNode, traditionalStyleNodeActive,
|
|
5
|
+
import { traditionalDecorationMarkerVariable, traditionalDecorationMarkerVariableActive, traditionalDecorationMarkerVariableNew, traditionalDeletedDecorationMarkerVariable, traditionalDeletedDecorationMarkerVariableActive, traditionalDeletedDecorationMarkerVariableNew, traditionalStyleQuoteNode, traditionalStyleQuoteNodeActive, traditionalStyleQuoteNodeNew, traditionalStyleRuleNode, traditionalStyleRuleNodeActive, traditionalStyleRuleNodeNew, traditionalStyleCardBlockNode, traditionalStyleCardBlockNodeActive, traditionalStyleCardBlockNodeNew, traditionalStyleNode, traditionalStyleNodeActive, traditionalStyleNodeNew, getDeletedTraditionalInlineStyle, deletedTraditionalStyleQuoteNode } from './colorSchemes/traditional';
|
|
6
6
|
var getNodeClass = function getNodeClass(name) {
|
|
7
7
|
switch (name) {
|
|
8
8
|
case 'extension':
|
|
@@ -30,51 +30,51 @@ var getBlockNodeStyle = function getBlockNodeStyle(_ref) {
|
|
|
30
30
|
if (['extension', 'embedCard', 'listItem'].includes(nodeName)) {
|
|
31
31
|
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
32
32
|
if (isInserted) {
|
|
33
|
-
return isTraditional && isActive ? traditionalDecorationMarkerVariableActive : isTraditional ? traditionalDecorationMarkerVariable : standardDecorationMarkerVariable;
|
|
33
|
+
return isTraditional && isActive ? traditionalDecorationMarkerVariableActive : isTraditional ? fg('platform_editor_show_diff_scroll_navigation') ? traditionalDecorationMarkerVariableNew : traditionalDecorationMarkerVariable : standardDecorationMarkerVariable;
|
|
34
34
|
} else {
|
|
35
|
-
return isTraditional ?
|
|
35
|
+
return isTraditional && isActive ? traditionalDeletedDecorationMarkerVariableActive : isTraditional ? fg('platform_editor_show_diff_scroll_navigation') ? traditionalDeletedDecorationMarkerVariableNew : traditionalDeletedDecorationMarkerVariable : deletedContentStyleNew;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
return isTraditional && isActive ? traditionalDecorationMarkerVariableActive : isTraditional ? traditionalDecorationMarkerVariable : standardDecorationMarkerVariable;
|
|
38
|
+
return isTraditional && isActive ? traditionalDecorationMarkerVariableActive : isTraditional ? fg('platform_editor_show_diff_scroll_navigation') ? traditionalDecorationMarkerVariableNew : traditionalDecorationMarkerVariable : standardDecorationMarkerVariable;
|
|
39
39
|
}
|
|
40
40
|
if (nodeName === 'blockquote') {
|
|
41
41
|
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
42
42
|
if (isInserted) {
|
|
43
|
-
return isTraditional ? isActive ? traditionalStyleQuoteNodeActive : traditionalStyleQuoteNode : editingStyleQuoteNode;
|
|
43
|
+
return isTraditional ? isActive ? traditionalStyleQuoteNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleQuoteNodeNew : traditionalStyleQuoteNode : editingStyleQuoteNode;
|
|
44
44
|
} else {
|
|
45
45
|
return isTraditional ? deletedTraditionalStyleQuoteNode : deletedStyleQuoteNode;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
return isTraditional ? isActive ? traditionalStyleQuoteNodeActive : traditionalStyleQuoteNode : editingStyleQuoteNode;
|
|
48
|
+
return isTraditional ? isActive ? traditionalStyleQuoteNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleQuoteNodeNew : traditionalStyleQuoteNode : editingStyleQuoteNode;
|
|
49
49
|
}
|
|
50
50
|
if (nodeName === 'rule') {
|
|
51
51
|
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
52
52
|
if (isInserted) {
|
|
53
|
-
return isTraditional ? isActive ? traditionalStyleRuleNodeActive : traditionalStyleRuleNode : editingStyleRuleNode;
|
|
53
|
+
return isTraditional ? isActive ? traditionalStyleRuleNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleRuleNodeNew : traditionalStyleRuleNode : editingStyleRuleNode;
|
|
54
54
|
} else {
|
|
55
|
-
return isTraditional ?
|
|
55
|
+
return isTraditional ? getDeletedTraditionalInlineStyle(false) : deletedContentStyleNew;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
return isTraditional ? isActive ? traditionalStyleRuleNodeActive : traditionalStyleRuleNode : editingStyleRuleNode;
|
|
58
|
+
return isTraditional ? isActive ? traditionalStyleRuleNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleRuleNodeNew : traditionalStyleRuleNode : editingStyleRuleNode;
|
|
59
59
|
}
|
|
60
60
|
if (nodeName === 'blockCard') {
|
|
61
61
|
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
62
62
|
if (isInserted) {
|
|
63
|
-
return isTraditional ? isActive ? traditionalStyleCardBlockNodeActive : traditionalStyleCardBlockNode : editingStyleCardBlockNode;
|
|
63
|
+
return isTraditional ? isActive ? traditionalStyleCardBlockNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleCardBlockNodeNew : traditionalStyleCardBlockNode : editingStyleCardBlockNode;
|
|
64
64
|
} else {
|
|
65
|
-
return isTraditional ?
|
|
65
|
+
return isTraditional ? getDeletedTraditionalInlineStyle(false) : deletedContentStyleNew;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
return isTraditional ? isActive ? traditionalStyleCardBlockNodeActive : traditionalStyleCardBlockNode : editingStyleCardBlockNode;
|
|
68
|
+
return isTraditional ? isActive ? traditionalStyleCardBlockNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleCardBlockNodeNew : traditionalStyleCardBlockNode : editingStyleCardBlockNode;
|
|
69
69
|
}
|
|
70
70
|
if (expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true)) {
|
|
71
71
|
if (isInserted) {
|
|
72
|
-
return isTraditional ? isActive ? traditionalStyleNodeActive : traditionalStyleNode : editingStyleNode;
|
|
72
|
+
return isTraditional ? isActive ? traditionalStyleNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleNodeNew : traditionalStyleNode : editingStyleNode;
|
|
73
73
|
} else {
|
|
74
|
-
return isTraditional ?
|
|
74
|
+
return isTraditional ? getDeletedTraditionalInlineStyle(false) : deletedContentStyleNew;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
return isTraditional ? isActive ? traditionalStyleNodeActive : traditionalStyleNode : editingStyleNode;
|
|
77
|
+
return isTraditional ? isActive ? traditionalStyleNodeActive : fg('platform_editor_show_diff_scroll_navigation') ? traditionalStyleNodeNew : traditionalStyleNode : editingStyleNode;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
2
2
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive } from './colorSchemes/standard';
|
|
4
|
-
import { traditionalInsertStyle, traditionalInsertStyleActive,
|
|
4
|
+
import { traditionalInsertStyle, traditionalInsertStyleActive, getDeletedTraditionalInlineStyle } from './colorSchemes/traditional';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Inline decoration used for insertions as the content already exists in the document
|
|
@@ -27,7 +27,7 @@ export var createInlineChangedDecoration = function createInlineChangedDecoratio
|
|
|
27
27
|
}
|
|
28
28
|
} else {
|
|
29
29
|
if (colorScheme === 'traditional') {
|
|
30
|
-
style =
|
|
30
|
+
style = getDeletedTraditionalInlineStyle(false);
|
|
31
31
|
} else {
|
|
32
32
|
style = isActive ? deletedContentStyleActive : deletedContentStyle;
|
|
33
33
|
}
|
|
@@ -3,8 +3,8 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
3
3
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
|
-
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew,
|
|
7
|
-
import { traditionalInsertStyle, traditionalInsertStyleActive,
|
|
6
|
+
import { editingStyle, editingStyleActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew, deletedContentStyleUnbounded } from './colorSchemes/standard';
|
|
7
|
+
import { traditionalInsertStyle, traditionalInsertStyleActive, getDeletedTraditionalInlineStyle, deletedTraditionalContentStyleUnbounded, deletedTraditionalContentStyleUnboundedActive } from './colorSchemes/traditional';
|
|
8
8
|
import { createChangedRowDecorationWidgets } from './createChangedRowDecorationWidgets';
|
|
9
9
|
import { findSafeInsertPos } from './utils/findSafeInsertPos';
|
|
10
10
|
import { wrapBlockNodeView } from './utils/wrapBlockNodeView';
|
|
@@ -31,10 +31,10 @@ var getInsertedContentStyle = function getInsertedContentStyle(colorScheme) {
|
|
|
31
31
|
var getDeletedContentStyle = function getDeletedContentStyle(colorScheme) {
|
|
32
32
|
var isActive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
33
33
|
if (colorScheme === 'traditional') {
|
|
34
|
-
return isActive
|
|
34
|
+
return getDeletedTraditionalInlineStyle(isActive);
|
|
35
35
|
}
|
|
36
36
|
if (isActive) {
|
|
37
|
-
return
|
|
37
|
+
return deletedContentStyleActive;
|
|
38
38
|
}
|
|
39
39
|
return expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? deletedContentStyleNew : deletedContentStyle;
|
|
40
40
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
2
|
import { trackChangesMessages } from '@atlaskit/editor-common/messages';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
-
import { deletedBlockOutline, deletedBlockOutlineActive, deletedBlockOutlineRounded, deletedBlockOutlineRoundedActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew,
|
|
5
|
-
import { deletedTraditionalBlockOutline, deletedTraditionalBlockOutlineActive, deletedTraditionalBlockOutlineRounded, deletedTraditionalBlockOutlineRoundedActive,
|
|
5
|
+
import { deletedBlockOutline, deletedBlockOutlineActive, deletedBlockOutlineRounded, deletedBlockOutlineRoundedActive, deletedContentStyle, deletedContentStyleActive, deletedContentStyleNew, deletedStyleQuoteNodeWithLozenge, deletedStyleQuoteNodeWithLozengeActive, editingStyle, editingStyleActive, editingStyleNode, addedCellOverlayStyle, deletedCellOverlayStyle } from '../colorSchemes/standard';
|
|
6
|
+
import { deletedTraditionalBlockOutline, deletedTraditionalBlockOutlineActive, deletedTraditionalBlockOutlineNew, deletedTraditionalBlockOutlineRounded, deletedTraditionalBlockOutlineRoundedActive, deletedTraditionalBlockOutlineRoundedNew, getDeletedTraditionalInlineStyle, deletedTraditionalStyleQuoteNode, deletedTraditionalStyleQuoteNodeActive, traditionalInsertStyle, traditionalInsertStyleActive, traditionalStyleNode, traditionalStyleNodeActive, traditionalStyleNodeNew, traditionalAddedCellOverlayStyle, traditionalAddedCellOverlayStyleNew, deletedTraditionalCellOverlayStyle } from '../colorSchemes/traditional';
|
|
6
7
|
var lozengeStyle = convertToInlineCss({
|
|
7
8
|
display: 'inline-flex',
|
|
8
9
|
boxSizing: 'border-box',
|
|
@@ -61,10 +62,10 @@ var getChangedContentStyle = function getChangedContentStyle(colorScheme) {
|
|
|
61
62
|
return isActive ? editingStyleActive : editingStyle;
|
|
62
63
|
}
|
|
63
64
|
if (colorScheme === 'traditional') {
|
|
64
|
-
return isActive
|
|
65
|
+
return getDeletedTraditionalInlineStyle(isActive);
|
|
65
66
|
}
|
|
66
67
|
if (isActive) {
|
|
67
|
-
return
|
|
68
|
+
return deletedContentStyleActive;
|
|
68
69
|
}
|
|
69
70
|
return expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? deletedContentStyleNew : deletedContentStyle;
|
|
70
71
|
};
|
|
@@ -77,7 +78,10 @@ var getChangedNodeStyle = function getChangedNodeStyle(nodeName, colorScheme) {
|
|
|
77
78
|
return undefined;
|
|
78
79
|
}
|
|
79
80
|
if (isTraditional) {
|
|
80
|
-
|
|
81
|
+
if (fg('platform_editor_show_diff_scroll_navigation')) {
|
|
82
|
+
return isActive ? traditionalStyleNodeActive : traditionalStyleNodeNew;
|
|
83
|
+
}
|
|
84
|
+
return isActive ? traditionalStyleNodeActive : traditionalStyleNode;
|
|
81
85
|
}
|
|
82
86
|
return editingStyleNode;
|
|
83
87
|
}
|
|
@@ -90,13 +94,13 @@ var getChangedNodeStyle = function getChangedNodeStyle(nodeName, colorScheme) {
|
|
|
90
94
|
case 'expand':
|
|
91
95
|
case 'decisionList':
|
|
92
96
|
if (isTraditional) {
|
|
93
|
-
return isActive ? deletedTraditionalBlockOutlineActive : deletedTraditionalBlockOutline;
|
|
97
|
+
return isActive ? deletedTraditionalBlockOutlineActive : fg('platform_editor_show_diff_scroll_navigation') ? deletedTraditionalBlockOutlineNew : deletedTraditionalBlockOutline;
|
|
94
98
|
}
|
|
95
99
|
return isActive ? deletedBlockOutlineActive : deletedBlockOutline;
|
|
96
100
|
case 'panel':
|
|
97
101
|
case 'codeBlock':
|
|
98
102
|
if (isTraditional) {
|
|
99
|
-
return isActive ? deletedTraditionalBlockOutlineRoundedActive : deletedTraditionalBlockOutlineRounded;
|
|
103
|
+
return isActive ? deletedTraditionalBlockOutlineRoundedActive : fg('platform_editor_show_diff_scroll_navigation') ? deletedTraditionalBlockOutlineRoundedNew : deletedTraditionalBlockOutlineRounded;
|
|
100
104
|
}
|
|
101
105
|
return isActive ? deletedBlockOutlineRoundedActive : deletedBlockOutlineRounded;
|
|
102
106
|
default:
|
|
@@ -128,6 +132,22 @@ var shouldAddShowDiffDeletedNodeClass = function shouldAddShowDiffDeletedNodeCla
|
|
|
128
132
|
}
|
|
129
133
|
};
|
|
130
134
|
|
|
135
|
+
/** Scroll-nav “new” ring (4px red subtlest) for media/embed; styled in editor-core smartCardStyles. */
|
|
136
|
+
var maybeAddDeletedOutlineNewClass = function maybeAddDeletedOutlineNewClass(_ref) {
|
|
137
|
+
var nodeView = _ref.nodeView,
|
|
138
|
+
targetNode = _ref.targetNode,
|
|
139
|
+
colorScheme = _ref.colorScheme,
|
|
140
|
+
_ref$isActive = _ref.isActive,
|
|
141
|
+
isActive = _ref$isActive === void 0 ? false : _ref$isActive;
|
|
142
|
+
var name = targetNode.type.name;
|
|
143
|
+
if (name !== 'mediaSingle' && name !== 'embedCard') {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
if (colorScheme === 'traditional' && !isActive && fg('platform_editor_show_diff_scroll_navigation')) {
|
|
147
|
+
nodeView.classList.add('show-diff-deleted-outline-new');
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
131
151
|
/**
|
|
132
152
|
* Checks if a node should apply deleted styles directly without wrapper
|
|
133
153
|
* to preserve natural block-level margins
|
|
@@ -135,13 +155,13 @@ var shouldAddShowDiffDeletedNodeClass = function shouldAddShowDiffDeletedNodeCla
|
|
|
135
155
|
var shouldApplyStylesDirectly = function shouldApplyStylesDirectly(nodeName) {
|
|
136
156
|
return nodeName === 'heading';
|
|
137
157
|
};
|
|
138
|
-
var applyCellOverlayStyles = function applyCellOverlayStyles(
|
|
139
|
-
var element =
|
|
140
|
-
colorScheme =
|
|
141
|
-
isInserted =
|
|
158
|
+
var applyCellOverlayStyles = function applyCellOverlayStyles(_ref2) {
|
|
159
|
+
var element = _ref2.element,
|
|
160
|
+
colorScheme = _ref2.colorScheme,
|
|
161
|
+
isInserted = _ref2.isInserted;
|
|
142
162
|
element.querySelectorAll('td, th').forEach(function (cell) {
|
|
143
163
|
var overlay = document.createElement('span');
|
|
144
|
-
var overlayStyle = colorScheme === 'traditional' ? isInserted ? traditionalAddedCellOverlayStyle : deletedTraditionalCellOverlayStyle : isInserted ? addedCellOverlayStyle : deletedCellOverlayStyle;
|
|
164
|
+
var overlayStyle = colorScheme === 'traditional' ? isInserted ? fg('platform_editor_show_diff_scroll_navigation') ? traditionalAddedCellOverlayStyleNew : traditionalAddedCellOverlayStyle : deletedTraditionalCellOverlayStyle : isInserted ? addedCellOverlayStyle : deletedCellOverlayStyle;
|
|
145
165
|
overlay.setAttribute('style', overlayStyle);
|
|
146
166
|
cell.appendChild(overlay);
|
|
147
167
|
});
|
|
@@ -191,12 +211,12 @@ var createBlockNodeWrapper = function createBlockNodeWrapper() {
|
|
|
191
211
|
/**
|
|
192
212
|
* Applies styles directly to an HTML element by merging with existing styles
|
|
193
213
|
*/
|
|
194
|
-
var applyStylesToElement = function applyStylesToElement(
|
|
195
|
-
var element =
|
|
196
|
-
targetNode =
|
|
197
|
-
colorScheme =
|
|
198
|
-
isActive =
|
|
199
|
-
isInserted =
|
|
214
|
+
var applyStylesToElement = function applyStylesToElement(_ref3) {
|
|
215
|
+
var element = _ref3.element,
|
|
216
|
+
targetNode = _ref3.targetNode,
|
|
217
|
+
colorScheme = _ref3.colorScheme,
|
|
218
|
+
isActive = _ref3.isActive,
|
|
219
|
+
isInserted = _ref3.isInserted;
|
|
200
220
|
var currentStyle = element.getAttribute('style') || '';
|
|
201
221
|
var contentStyle = getChangedContentStyle(colorScheme, isActive, isInserted);
|
|
202
222
|
var nodeSpecificStyle = getChangedNodeStyle(targetNode.type.name, colorScheme, isInserted, isActive) || '';
|
|
@@ -206,12 +226,12 @@ var applyStylesToElement = function applyStylesToElement(_ref2) {
|
|
|
206
226
|
/**
|
|
207
227
|
* Creates a content wrapper with deleted styles for a block node
|
|
208
228
|
*/
|
|
209
|
-
var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(
|
|
210
|
-
var nodeView =
|
|
211
|
-
targetNode =
|
|
212
|
-
colorScheme =
|
|
213
|
-
isActive =
|
|
214
|
-
isInserted =
|
|
229
|
+
var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(_ref4) {
|
|
230
|
+
var nodeView = _ref4.nodeView,
|
|
231
|
+
targetNode = _ref4.targetNode,
|
|
232
|
+
colorScheme = _ref4.colorScheme,
|
|
233
|
+
isActive = _ref4.isActive,
|
|
234
|
+
isInserted = _ref4.isInserted;
|
|
215
235
|
var contentWrapper = document.createElement('div');
|
|
216
236
|
var nodeStyle = getChangedNodeStyle(targetNode.type.name, colorScheme, isInserted, isActive);
|
|
217
237
|
contentWrapper.setAttribute('style', "".concat(getChangedContentStyle(colorScheme, isActive, isInserted)).concat(nodeStyle || ''));
|
|
@@ -225,14 +245,14 @@ var createBlockNodeContentWrapper = function createBlockNodeContentWrapper(_ref3
|
|
|
225
245
|
* to wait for the rich-media-item to appear before attaching the lozenge.
|
|
226
246
|
* @returns true if embedCard was handled
|
|
227
247
|
*/
|
|
228
|
-
var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(
|
|
229
|
-
var dom =
|
|
230
|
-
nodeView =
|
|
231
|
-
targetNode =
|
|
232
|
-
lozenge =
|
|
233
|
-
colorScheme =
|
|
234
|
-
|
|
235
|
-
isActive =
|
|
248
|
+
var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(_ref5) {
|
|
249
|
+
var dom = _ref5.dom,
|
|
250
|
+
nodeView = _ref5.nodeView,
|
|
251
|
+
targetNode = _ref5.targetNode,
|
|
252
|
+
lozenge = _ref5.lozenge,
|
|
253
|
+
colorScheme = _ref5.colorScheme,
|
|
254
|
+
_ref5$isActive = _ref5.isActive,
|
|
255
|
+
isActive = _ref5$isActive === void 0 ? false : _ref5$isActive;
|
|
236
256
|
if (targetNode.type.name !== 'embedCard' || !(nodeView instanceof HTMLElement)) {
|
|
237
257
|
return false;
|
|
238
258
|
}
|
|
@@ -258,6 +278,12 @@ var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(_ref4) {
|
|
|
258
278
|
if (isActive) {
|
|
259
279
|
nodeView.classList.add('show-diff-deleted-active');
|
|
260
280
|
}
|
|
281
|
+
maybeAddDeletedOutlineNewClass({
|
|
282
|
+
nodeView: nodeView,
|
|
283
|
+
targetNode: targetNode,
|
|
284
|
+
colorScheme: colorScheme,
|
|
285
|
+
isActive: isActive
|
|
286
|
+
});
|
|
261
287
|
}
|
|
262
288
|
dom.append(nodeView);
|
|
263
289
|
return true;
|
|
@@ -267,14 +293,14 @@ var handleEmbedCardWithLozenge = function handleEmbedCardWithLozenge(_ref4) {
|
|
|
267
293
|
* Handles special mediaSingle node rendering with lozenge on child media element
|
|
268
294
|
* @returns true if mediaSingle was handled, false otherwise
|
|
269
295
|
*/
|
|
270
|
-
var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(
|
|
271
|
-
var dom =
|
|
272
|
-
nodeView =
|
|
273
|
-
targetNode =
|
|
274
|
-
lozenge =
|
|
275
|
-
colorScheme =
|
|
276
|
-
|
|
277
|
-
isActive =
|
|
296
|
+
var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(_ref6) {
|
|
297
|
+
var dom = _ref6.dom,
|
|
298
|
+
nodeView = _ref6.nodeView,
|
|
299
|
+
targetNode = _ref6.targetNode,
|
|
300
|
+
lozenge = _ref6.lozenge,
|
|
301
|
+
colorScheme = _ref6.colorScheme,
|
|
302
|
+
_ref6$isActive = _ref6.isActive,
|
|
303
|
+
isActive = _ref6$isActive === void 0 ? false : _ref6$isActive;
|
|
278
304
|
if (targetNode.type.name !== 'mediaSingle' || !(nodeView instanceof HTMLElement)) {
|
|
279
305
|
return false;
|
|
280
306
|
}
|
|
@@ -298,6 +324,12 @@ var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(_ref5)
|
|
|
298
324
|
if (isActive) {
|
|
299
325
|
nodeView.classList.add('show-diff-deleted-active');
|
|
300
326
|
}
|
|
327
|
+
maybeAddDeletedOutlineNewClass({
|
|
328
|
+
nodeView: nodeView,
|
|
329
|
+
targetNode: targetNode,
|
|
330
|
+
colorScheme: colorScheme,
|
|
331
|
+
isActive: isActive
|
|
332
|
+
});
|
|
301
333
|
}
|
|
302
334
|
dom.append(nodeView);
|
|
303
335
|
return true;
|
|
@@ -306,16 +338,16 @@ var handleMediaSingleWithLozenge = function handleMediaSingleWithLozenge(_ref5)
|
|
|
306
338
|
/**
|
|
307
339
|
* Appends a block node with wrapper, lozenge, and appropriate styling
|
|
308
340
|
*/
|
|
309
|
-
var wrapBlockNode = function wrapBlockNode(
|
|
310
|
-
var dom =
|
|
311
|
-
nodeView =
|
|
312
|
-
targetNode =
|
|
313
|
-
colorScheme =
|
|
314
|
-
intl =
|
|
315
|
-
|
|
316
|
-
isActive =
|
|
317
|
-
|
|
318
|
-
isInserted =
|
|
341
|
+
var wrapBlockNode = function wrapBlockNode(_ref7) {
|
|
342
|
+
var dom = _ref7.dom,
|
|
343
|
+
nodeView = _ref7.nodeView,
|
|
344
|
+
targetNode = _ref7.targetNode,
|
|
345
|
+
colorScheme = _ref7.colorScheme,
|
|
346
|
+
intl = _ref7.intl,
|
|
347
|
+
_ref7$isActive = _ref7.isActive,
|
|
348
|
+
isActive = _ref7$isActive === void 0 ? false : _ref7$isActive,
|
|
349
|
+
_ref7$isInserted = _ref7.isInserted,
|
|
350
|
+
isInserted = _ref7$isInserted === void 0 ? false : _ref7$isInserted;
|
|
319
351
|
var blockWrapper = createBlockNodeWrapper();
|
|
320
352
|
if (shouldShowRemovedLozenge(targetNode.type.name) && (!expValEquals('platform_editor_diff_plugin_extended', 'isEnabled', true) || !isInserted)) {
|
|
321
353
|
var lozenge = createRemovedLozenge(intl, isActive, colorScheme);
|
|
@@ -355,6 +387,12 @@ var wrapBlockNode = function wrapBlockNode(_ref6) {
|
|
|
355
387
|
if (isActive) {
|
|
356
388
|
nodeView.classList.add('show-diff-deleted-active');
|
|
357
389
|
}
|
|
390
|
+
maybeAddDeletedOutlineNewClass({
|
|
391
|
+
nodeView: nodeView,
|
|
392
|
+
targetNode: targetNode,
|
|
393
|
+
colorScheme: colorScheme,
|
|
394
|
+
isActive: isActive
|
|
395
|
+
});
|
|
358
396
|
}
|
|
359
397
|
dom.append(blockWrapper);
|
|
360
398
|
};
|
|
@@ -364,16 +402,16 @@ var wrapBlockNode = function wrapBlockNode(_ref6) {
|
|
|
364
402
|
* For heading nodes, applies styles directly to preserve natural margins.
|
|
365
403
|
* For other block nodes, uses wrapper approach with optional lozenge.
|
|
366
404
|
*/
|
|
367
|
-
export var wrapBlockNodeView = function wrapBlockNodeView(
|
|
368
|
-
var dom =
|
|
369
|
-
nodeView =
|
|
370
|
-
targetNode =
|
|
371
|
-
colorScheme =
|
|
372
|
-
intl =
|
|
373
|
-
|
|
374
|
-
isActive =
|
|
375
|
-
|
|
376
|
-
isInserted =
|
|
405
|
+
export var wrapBlockNodeView = function wrapBlockNodeView(_ref8) {
|
|
406
|
+
var dom = _ref8.dom,
|
|
407
|
+
nodeView = _ref8.nodeView,
|
|
408
|
+
targetNode = _ref8.targetNode,
|
|
409
|
+
colorScheme = _ref8.colorScheme,
|
|
410
|
+
intl = _ref8.intl,
|
|
411
|
+
_ref8$isActive = _ref8.isActive,
|
|
412
|
+
isActive = _ref8$isActive === void 0 ? false : _ref8$isActive,
|
|
413
|
+
_ref8$isInserted = _ref8.isInserted,
|
|
414
|
+
isInserted = _ref8$isInserted === void 0 ? false : _ref8$isInserted;
|
|
377
415
|
if (shouldApplyStylesDirectly(targetNode.type.name) && nodeView instanceof HTMLElement) {
|
|
378
416
|
// Apply deleted styles directly to preserve natural block-level margins
|
|
379
417
|
applyStylesToElement({
|
|
@@ -3,7 +3,6 @@ export declare const editingStyleActive: string;
|
|
|
3
3
|
export declare const deletedContentStyle: string;
|
|
4
4
|
export declare const deletedContentStyleActive: string;
|
|
5
5
|
export declare const deletedContentStyleNew: string;
|
|
6
|
-
export declare const deletedContentStyleNewActive: string;
|
|
7
6
|
export declare const deletedContentStyleUnbounded: string;
|
|
8
7
|
export declare const deletedStyleQuoteNode: string;
|
|
9
8
|
export declare const deletedStyleQuoteNodeWithLozenge: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export declare const traditionalInsertStyle: string;
|
|
2
2
|
export declare const traditionalInsertStyleActive: string;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const deletedTraditionalContentStyleActive: string;
|
|
3
|
+
/** Strikethrough for traditional removed inline / widget content (non-marker decorations). */
|
|
4
|
+
export declare function getDeletedTraditionalInlineStyle(isActive: boolean): string;
|
|
6
5
|
export declare const deletedTraditionalContentStyleUnbounded: string;
|
|
7
|
-
/**
|
|
6
|
+
/** Strikethrough line for traditional when active (background highlight on text wrapper) */
|
|
8
7
|
export declare const deletedTraditionalContentStyleUnboundedActive: string;
|
|
9
8
|
export declare const deletedTraditionalStyleQuoteNode: string;
|
|
10
9
|
export declare const deletedTraditionalStyleQuoteNodeActive: string;
|
|
@@ -12,16 +11,29 @@ export declare const deletedTraditionalBlockOutline: string;
|
|
|
12
11
|
export declare const deletedTraditionalBlockOutlineActive: string;
|
|
13
12
|
export declare const deletedTraditionalBlockOutlineRounded: string;
|
|
14
13
|
export declare const deletedTraditionalBlockOutlineRoundedActive: string;
|
|
14
|
+
/** Scroll-navigation “new” emphasis: 4px ring (see {@link traditionalStyleNodeNew}). */
|
|
15
|
+
export declare const deletedTraditionalBlockOutlineNew: string;
|
|
16
|
+
export declare const deletedTraditionalBlockOutlineRoundedNew: string;
|
|
15
17
|
export declare const deletedTraditionalRowStyle: string;
|
|
16
18
|
export declare const traditionalStyleQuoteNode: string;
|
|
19
|
+
export declare const traditionalStyleQuoteNodeNew: string;
|
|
17
20
|
export declare const traditionalStyleQuoteNodeActive: string;
|
|
18
21
|
export declare const traditionalStyleRuleNode: string;
|
|
22
|
+
export declare const traditionalStyleRuleNodeNew: string;
|
|
19
23
|
export declare const traditionalStyleRuleNodeActive: string;
|
|
20
24
|
export declare const traditionalStyleNode: string;
|
|
25
|
+
export declare const traditionalStyleNodeNew: string;
|
|
21
26
|
export declare const traditionalStyleNodeActive: string;
|
|
22
27
|
export declare const traditionalStyleCardBlockNode: string;
|
|
28
|
+
export declare const traditionalStyleCardBlockNodeNew: string;
|
|
23
29
|
export declare const traditionalStyleCardBlockNodeActive: string;
|
|
24
30
|
export declare const traditionalDecorationMarkerVariable: string;
|
|
31
|
+
export declare const traditionalDecorationMarkerVariableNew: string;
|
|
25
32
|
export declare const traditionalDecorationMarkerVariableActive: string;
|
|
33
|
+
/** Inline deleted traditional styling plus diff marker CSS variables (extension / embedCard / listItem). */
|
|
34
|
+
export declare const traditionalDeletedDecorationMarkerVariable: string;
|
|
35
|
+
export declare const traditionalDeletedDecorationMarkerVariableNew: string;
|
|
36
|
+
export declare const traditionalDeletedDecorationMarkerVariableActive: string;
|
|
26
37
|
export declare const traditionalAddedCellOverlayStyle: string;
|
|
38
|
+
export declare const traditionalAddedCellOverlayStyleNew: string;
|
|
27
39
|
export declare const deletedTraditionalCellOverlayStyle: string;
|
|
@@ -3,7 +3,6 @@ export declare const editingStyleActive: string;
|
|
|
3
3
|
export declare const deletedContentStyle: string;
|
|
4
4
|
export declare const deletedContentStyleActive: string;
|
|
5
5
|
export declare const deletedContentStyleNew: string;
|
|
6
|
-
export declare const deletedContentStyleNewActive: string;
|
|
7
6
|
export declare const deletedContentStyleUnbounded: string;
|
|
8
7
|
export declare const deletedStyleQuoteNode: string;
|
|
9
8
|
export declare const deletedStyleQuoteNodeWithLozenge: string;
|