@atlaskit/editor-plugin-show-diff 3.2.6 → 3.2.8

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,20 @@
1
1
  # @atlaskit/editor-plugin-show-diff
2
2
 
3
+ ## 3.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e3779b75fdeca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3779b75fdeca) -
8
+ EDITOR-1643 Promote syncBlock and bodiedSyncBlock to full schema
9
+ - Updated dependencies
10
+
11
+ ## 3.2.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [`bc52c059565f2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bc52c059565f2) -
16
+ Fix issue with simplify changes being too aggressive and dropping steps causing diffs to fail.
17
+
3
18
  ## 3.2.6
4
19
 
5
20
  ### Patch Changes
@@ -23,7 +23,9 @@ function mergeReplaceSteps(step1, step2) {
23
23
  if (!(step1 instanceof _transform.ReplaceStep) || !(step2 instanceof _transform.ReplaceStep)) {
24
24
  return null;
25
25
  }
26
- if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step1.slice.size) {
26
+ // Confirm the step overlaps exactly with the previous
27
+ var step2Length = step2.to - step2.from;
28
+ if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step2Length && step2Length === step1.slice.size && step2.slice.size >= step1.slice.size && step1.slice.openEnd === step2.slice.openEnd && step1.slice.openStart === step2.slice.openStart) {
27
29
  return new _transform.ReplaceStep(step1.from, step1.to, step2.slice);
28
30
  }
29
31
  return null;
@@ -15,7 +15,9 @@ function mergeReplaceSteps(step1, step2) {
15
15
  if (!(step1 instanceof ReplaceStep) || !(step2 instanceof ReplaceStep)) {
16
16
  return null;
17
17
  }
18
- if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step1.slice.size) {
18
+ // Confirm the step overlaps exactly with the previous
19
+ const step2Length = step2.to - step2.from;
20
+ if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step2Length && step2Length === step1.slice.size && step2.slice.size >= step1.slice.size && step1.slice.openEnd === step2.slice.openEnd && step1.slice.openStart === step2.slice.openStart) {
19
21
  return new ReplaceStep(step1.from, step1.to, step2.slice);
20
22
  }
21
23
  return null;
@@ -18,7 +18,9 @@ function mergeReplaceSteps(step1, step2) {
18
18
  if (!(step1 instanceof ReplaceStep) || !(step2 instanceof ReplaceStep)) {
19
19
  return null;
20
20
  }
21
- if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step1.slice.size) {
21
+ // Confirm the step overlaps exactly with the previous
22
+ var step2Length = step2.to - step2.from;
23
+ if (step1.from === step2.from && step2.to >= step1.to && step2.slice.size >= step2Length && step2Length === step1.slice.size && step2.slice.size >= step1.slice.size && step1.slice.openEnd === step2.slice.openEnd && step1.slice.openStart === step2.slice.openStart) {
22
24
  return new ReplaceStep(step1.from, step1.to, step2.slice);
23
25
  }
24
26
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-show-diff",
3
- "version": "3.2.6",
3
+ "version": "3.2.8",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -28,18 +28,18 @@
28
28
  "sideEffects": false,
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
- "@atlaskit/adf-schema": "^51.4.0",
31
+ "@atlaskit/adf-schema": "^51.5.1",
32
32
  "@atlaskit/editor-prosemirror": "7.0.0",
33
33
  "@atlaskit/editor-tables": "^2.9.0",
34
34
  "@atlaskit/platform-feature-flags": "^1.1.0",
35
- "@atlaskit/tokens": "^8.1.0",
35
+ "@atlaskit/tokens": "^8.4.0",
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "lodash": "^4.17.21",
38
38
  "memoize-one": "^6.0.0",
39
39
  "prosemirror-changeset": "^2.2.1"
40
40
  },
41
41
  "peerDependencies": {
42
- "@atlaskit/editor-common": "^110.33.0",
42
+ "@atlaskit/editor-common": "^110.38.0",
43
43
  "react": "^18.2.0"
44
44
  },
45
45
  "techstack": {