@atlaskit/editor-plugin-show-diff 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 3.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`be40850b186a8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be40850b186a8) -
|
|
8
|
+
Rolled up editor AIFC beta gates into the parent streaming gate. Also decoupled the placholder
|
|
9
|
+
from the main AIFC FG by utilising the withEmptyParagraph plugin option, since this prop is only
|
|
10
|
+
set when AIFC is enabled. This means we don't need refs to this gate in the plugin because it's
|
|
11
|
+
already controlled by a prop.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 3.3.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -199,9 +199,6 @@ var createDeletedContentDecoration = exports.createDeletedContentDecoration = fu
|
|
|
199
199
|
|
|
200
200
|
// For non-table content, use the existing span wrapper approach
|
|
201
201
|
var dom = document.createElement('span');
|
|
202
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta_2')) {
|
|
203
|
-
dom.setAttribute('style', getDeletedContentStyle(colourScheme));
|
|
204
|
-
}
|
|
205
202
|
|
|
206
203
|
/*
|
|
207
204
|
* The thinking is we separate out the fragment we got from doc.slice
|
|
@@ -240,13 +237,9 @@ var createDeletedContentDecoration = exports.createDeletedContentDecoration = fu
|
|
|
240
237
|
// Fallback to serializing the individual child node
|
|
241
238
|
var serializedChild = serializer.serializeNode(childNode);
|
|
242
239
|
if (serializedChild) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
dom.append(_wrapper);
|
|
247
|
-
} else {
|
|
248
|
-
dom.append(serializedChild);
|
|
249
|
-
}
|
|
240
|
+
var _wrapper = createWrapperWithStrikethrough();
|
|
241
|
+
_wrapper.append(serializedChild);
|
|
242
|
+
dom.append(_wrapper);
|
|
250
243
|
}
|
|
251
244
|
}
|
|
252
245
|
});
|
|
@@ -302,11 +295,9 @@ var createDeletedContentDecoration = exports.createDeletedContentDecoration = fu
|
|
|
302
295
|
var wrapper = createWrapperWithStrikethrough();
|
|
303
296
|
wrapper.append(nodeView);
|
|
304
297
|
dom.append(wrapper);
|
|
305
|
-
} else
|
|
298
|
+
} else {
|
|
306
299
|
// Handle all block nodes with unified function
|
|
307
300
|
(0, _deletedBlocksHandler.handleBlockNodeView)(dom, nodeView, targetNode, colourScheme, intl);
|
|
308
|
-
} else {
|
|
309
|
-
dom.append(nodeView);
|
|
310
301
|
}
|
|
311
302
|
} else if (nodeViewSerializer.getFilteredNodeViewBlocklist(['paragraph', 'tableRow']).has(targetNode.type.name)) {
|
|
312
303
|
// Skip the case where the node is a paragraph or table row that way it can still be rendered and delete the entire table
|
|
@@ -314,13 +305,9 @@ var createDeletedContentDecoration = exports.createDeletedContentDecoration = fu
|
|
|
314
305
|
} else {
|
|
315
306
|
var fallbackNode = fallbackSerialization();
|
|
316
307
|
if (fallbackNode) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
dom.append(_wrapper2);
|
|
321
|
-
} else {
|
|
322
|
-
dom.append(fallbackNode);
|
|
323
|
-
}
|
|
308
|
+
var _wrapper2 = (0, _deletedBlocksHandler.createDeletedStyleWrapperWithoutOpacity)(colourScheme);
|
|
309
|
+
_wrapper2.append(fallbackNode);
|
|
310
|
+
dom.append(_wrapper2);
|
|
324
311
|
}
|
|
325
312
|
}
|
|
326
313
|
});
|
|
@@ -179,9 +179,6 @@ export const createDeletedContentDecoration = ({
|
|
|
179
179
|
|
|
180
180
|
// For non-table content, use the existing span wrapper approach
|
|
181
181
|
const dom = document.createElement('span');
|
|
182
|
-
if (!fg('platform_editor_ai_aifc_patch_beta_2')) {
|
|
183
|
-
dom.setAttribute('style', getDeletedContentStyle(colourScheme));
|
|
184
|
-
}
|
|
185
182
|
|
|
186
183
|
/*
|
|
187
184
|
* The thinking is we separate out the fragment we got from doc.slice
|
|
@@ -220,13 +217,9 @@ export const createDeletedContentDecoration = ({
|
|
|
220
217
|
// Fallback to serializing the individual child node
|
|
221
218
|
const serializedChild = serializer.serializeNode(childNode);
|
|
222
219
|
if (serializedChild) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
dom.append(wrapper);
|
|
227
|
-
} else {
|
|
228
|
-
dom.append(serializedChild);
|
|
229
|
-
}
|
|
220
|
+
const wrapper = createWrapperWithStrikethrough();
|
|
221
|
+
wrapper.append(serializedChild);
|
|
222
|
+
dom.append(wrapper);
|
|
230
223
|
}
|
|
231
224
|
}
|
|
232
225
|
});
|
|
@@ -278,11 +271,9 @@ export const createDeletedContentDecoration = ({
|
|
|
278
271
|
const wrapper = createWrapperWithStrikethrough();
|
|
279
272
|
wrapper.append(nodeView);
|
|
280
273
|
dom.append(wrapper);
|
|
281
|
-
} else
|
|
274
|
+
} else {
|
|
282
275
|
// Handle all block nodes with unified function
|
|
283
276
|
handleBlockNodeView(dom, nodeView, targetNode, colourScheme, intl);
|
|
284
|
-
} else {
|
|
285
|
-
dom.append(nodeView);
|
|
286
277
|
}
|
|
287
278
|
} else if (nodeViewSerializer.getFilteredNodeViewBlocklist(['paragraph', 'tableRow']).has(targetNode.type.name)) {
|
|
288
279
|
// Skip the case where the node is a paragraph or table row that way it can still be rendered and delete the entire table
|
|
@@ -290,13 +281,9 @@ export const createDeletedContentDecoration = ({
|
|
|
290
281
|
} else {
|
|
291
282
|
const fallbackNode = fallbackSerialization();
|
|
292
283
|
if (fallbackNode) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
dom.append(wrapper);
|
|
297
|
-
} else {
|
|
298
|
-
dom.append(fallbackNode);
|
|
299
|
-
}
|
|
284
|
+
const wrapper = createDeletedStyleWrapperWithoutOpacity(colourScheme);
|
|
285
|
+
wrapper.append(fallbackNode);
|
|
286
|
+
dom.append(wrapper);
|
|
300
287
|
}
|
|
301
288
|
}
|
|
302
289
|
});
|
|
@@ -193,9 +193,6 @@ export var createDeletedContentDecoration = function createDeletedContentDecorat
|
|
|
193
193
|
|
|
194
194
|
// For non-table content, use the existing span wrapper approach
|
|
195
195
|
var dom = document.createElement('span');
|
|
196
|
-
if (!fg('platform_editor_ai_aifc_patch_beta_2')) {
|
|
197
|
-
dom.setAttribute('style', getDeletedContentStyle(colourScheme));
|
|
198
|
-
}
|
|
199
196
|
|
|
200
197
|
/*
|
|
201
198
|
* The thinking is we separate out the fragment we got from doc.slice
|
|
@@ -234,13 +231,9 @@ export var createDeletedContentDecoration = function createDeletedContentDecorat
|
|
|
234
231
|
// Fallback to serializing the individual child node
|
|
235
232
|
var serializedChild = serializer.serializeNode(childNode);
|
|
236
233
|
if (serializedChild) {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
dom.append(_wrapper);
|
|
241
|
-
} else {
|
|
242
|
-
dom.append(serializedChild);
|
|
243
|
-
}
|
|
234
|
+
var _wrapper = createWrapperWithStrikethrough();
|
|
235
|
+
_wrapper.append(serializedChild);
|
|
236
|
+
dom.append(_wrapper);
|
|
244
237
|
}
|
|
245
238
|
}
|
|
246
239
|
});
|
|
@@ -296,11 +289,9 @@ export var createDeletedContentDecoration = function createDeletedContentDecorat
|
|
|
296
289
|
var wrapper = createWrapperWithStrikethrough();
|
|
297
290
|
wrapper.append(nodeView);
|
|
298
291
|
dom.append(wrapper);
|
|
299
|
-
} else
|
|
292
|
+
} else {
|
|
300
293
|
// Handle all block nodes with unified function
|
|
301
294
|
handleBlockNodeView(dom, nodeView, targetNode, colourScheme, intl);
|
|
302
|
-
} else {
|
|
303
|
-
dom.append(nodeView);
|
|
304
295
|
}
|
|
305
296
|
} else if (nodeViewSerializer.getFilteredNodeViewBlocklist(['paragraph', 'tableRow']).has(targetNode.type.name)) {
|
|
306
297
|
// Skip the case where the node is a paragraph or table row that way it can still be rendered and delete the entire table
|
|
@@ -308,13 +299,9 @@ export var createDeletedContentDecoration = function createDeletedContentDecorat
|
|
|
308
299
|
} else {
|
|
309
300
|
var fallbackNode = fallbackSerialization();
|
|
310
301
|
if (fallbackNode) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
dom.append(_wrapper2);
|
|
315
|
-
} else {
|
|
316
|
-
dom.append(fallbackNode);
|
|
317
|
-
}
|
|
302
|
+
var _wrapper2 = createDeletedStyleWrapperWithoutOpacity(colourScheme);
|
|
303
|
+
_wrapper2.append(fallbackNode);
|
|
304
|
+
dom.append(_wrapper2);
|
|
318
305
|
}
|
|
319
306
|
}
|
|
320
307
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prosemirror-changeset": "^2.2.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@atlaskit/editor-common": "^110.
|
|
42
|
+
"@atlaskit/editor-common": "^110.40.0",
|
|
43
43
|
"react": "^18.2.0"
|
|
44
44
|
},
|
|
45
45
|
"techstack": {
|
|
@@ -79,9 +79,6 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"platform-feature-flags": {
|
|
82
|
-
"platform_editor_ai_aifc_patch_beta_2": {
|
|
83
|
-
"type": "boolean"
|
|
84
|
-
},
|
|
85
82
|
"platform_editor_ai_aifc_patch_ga": {
|
|
86
83
|
"type": "boolean"
|
|
87
84
|
},
|