@atlaskit/editor-plugin-show-diff 10.4.5 → 10.4.6

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
+ ## 10.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`89de40d80a7ce`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/89de40d80a7ce) -
8
+ [ux] Add toggle to show/hide deleted diffs on the AI suggestion card. An eye icon button is added
9
+ inline with the Accept and Discard buttons, allowing users to hide all greyed-out deleted content
10
+ while keeping purple highlighted additions visible. The toggle resets to the default "show
11
+ deletions" state when navigating between suggestions.
12
+ - Updated dependencies
13
+
3
14
  ## 10.4.5
4
15
 
5
16
  ### Patch Changes
@@ -240,7 +240,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref3
240
240
  // shouldHideDeleted for block/node decorations: suppressed when isInverted + hideDeletedDiffs,
241
241
  // or when showGranularWithBlock (block reference widget is shown instead).
242
242
  // isInverted gates both — on an inverted diff the inserted side is visually the deleted side.
243
- var shouldHideDeleted = (0, _isExtendedEnabled.isExtendedEnabled)(diffType) ? isInverted && (hideDeletedDiffs || showGranularWithBlock) && change.deleted.length > 0 : false;
243
+ var shouldHideDeleted = (0, _isExtendedEnabled.isExtendedEnabled)(diffType) ? isInverted && (hideDeletedDiffs || showGranularWithBlock && change.deleted.length > 0) : false;
244
244
 
245
245
  // For `smart` NODE-level promotions the change range spans a whole container
246
246
  // (e.g. an entire list/table/layout, using outer node bounds). Applying a SINGLE
@@ -395,7 +395,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref3
395
395
  stepChangeList.forEach(function (change) {
396
396
  createDecorationsForChange(change, showGranularWithBlock);
397
397
  });
398
- if (showGranularWithBlock && stepChangeList.length > 0) {
398
+ if (showGranularWithBlock && stepChangeList.length > 0 && !hideDeletedDiffs) {
399
399
  var lastChange = stepChangeList[stepChangeList.length - 1];
400
400
  var granularBlockDiffId = crypto.randomUUID();
401
401
  var blockWidgets = (0, _createGranularBlockReferenceWidget.createGranularBlockReferenceWidget)({
@@ -215,7 +215,7 @@ const calculateDiffDecorationsInner = ({
215
215
  // shouldHideDeleted for block/node decorations: suppressed when isInverted + hideDeletedDiffs,
216
216
  // or when showGranularWithBlock (block reference widget is shown instead).
217
217
  // isInverted gates both — on an inverted diff the inserted side is visually the deleted side.
218
- const shouldHideDeleted = isExtendedEnabled(diffType) ? isInverted && (hideDeletedDiffs || showGranularWithBlock) && change.deleted.length > 0 : false;
218
+ const shouldHideDeleted = isExtendedEnabled(diffType) ? isInverted && (hideDeletedDiffs || showGranularWithBlock && change.deleted.length > 0) : false;
219
219
 
220
220
  // For `smart` NODE-level promotions the change range spans a whole container
221
221
  // (e.g. an entire list/table/layout, using outer node bounds). Applying a SINGLE
@@ -358,7 +358,7 @@ const calculateDiffDecorationsInner = ({
358
358
  stepChangeList.forEach(change => {
359
359
  createDecorationsForChange(change, showGranularWithBlock);
360
360
  });
361
- if (showGranularWithBlock && stepChangeList.length > 0) {
361
+ if (showGranularWithBlock && stepChangeList.length > 0 && !hideDeletedDiffs) {
362
362
  const lastChange = stepChangeList[stepChangeList.length - 1];
363
363
  const granularBlockDiffId = crypto.randomUUID();
364
364
  const blockWidgets = createGranularBlockReferenceWidget({
@@ -234,7 +234,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref3
234
234
  // shouldHideDeleted for block/node decorations: suppressed when isInverted + hideDeletedDiffs,
235
235
  // or when showGranularWithBlock (block reference widget is shown instead).
236
236
  // isInverted gates both — on an inverted diff the inserted side is visually the deleted side.
237
- var shouldHideDeleted = isExtendedEnabled(diffType) ? isInverted && (hideDeletedDiffs || showGranularWithBlock) && change.deleted.length > 0 : false;
237
+ var shouldHideDeleted = isExtendedEnabled(diffType) ? isInverted && (hideDeletedDiffs || showGranularWithBlock && change.deleted.length > 0) : false;
238
238
 
239
239
  // For `smart` NODE-level promotions the change range spans a whole container
240
240
  // (e.g. an entire list/table/layout, using outer node bounds). Applying a SINGLE
@@ -389,7 +389,7 @@ var calculateDiffDecorationsInner = function calculateDiffDecorationsInner(_ref3
389
389
  stepChangeList.forEach(function (change) {
390
390
  createDecorationsForChange(change, showGranularWithBlock);
391
391
  });
392
- if (showGranularWithBlock && stepChangeList.length > 0) {
392
+ if (showGranularWithBlock && stepChangeList.length > 0 && !hideDeletedDiffs) {
393
393
  var lastChange = stepChangeList[stepChangeList.length - 1];
394
394
  var granularBlockDiffId = crypto.randomUUID();
395
395
  var blockWidgets = createGranularBlockReferenceWidget({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-show-diff",
3
- "version": "10.4.5",
3
+ "version": "10.4.6",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,7 +28,7 @@
28
28
  "@atlaskit/editor-prosemirror": "^8.0.0",
29
29
  "@atlaskit/editor-tables": "^3.0.0",
30
30
  "@atlaskit/platform-feature-flags": "^2.0.0",
31
- "@atlaskit/tmp-editor-statsig": "^126.1.0",
31
+ "@atlaskit/tmp-editor-statsig": "^127.0.0",
32
32
  "@atlaskit/tokens": "^16.0.0",
33
33
  "@babel/runtime": "^7.0.0",
34
34
  "@compiled/react": "^0.20.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/editor-core": "^221.9.0",
45
45
  "@atlaskit/editor-json-transformer": "^9.0.0",
46
46
  "@atlaskit/form": "^16.1.0",
47
- "@atlaskit/primitives": "^21.0.0",
47
+ "@atlaskit/primitives": "^22.0.0",
48
48
  "@atlaskit/section-message": "^9.2.0",
49
49
  "@atlaskit/textarea": "^9.1.0",
50
50
  "@atlassian/confluence-presets": "workspace:^",
@@ -54,7 +54,7 @@
54
54
  "react-intl": "^7.0.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@atlaskit/editor-common": "^116.32.0",
57
+ "@atlaskit/editor-common": "^116.33.0",
58
58
  "react": "^18.2.0"
59
59
  },
60
60
  "techstack": {