@atlaskit/editor-plugin-collab-edit 1.20.0 → 1.21.0

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,19 @@
1
1
  # @atlaskit/editor-plugin-collab-edit
2
2
 
3
+ ## 1.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#144601](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/144601)
8
+ [`50d30f4383c39`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/50d30f4383c39) -
9
+ Add check for removing comments in last-organic-change plugin
10
+
11
+ ## 1.20.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 1.20.0
4
18
 
5
19
  ### Minor Changes
@@ -32,7 +32,7 @@ var createPlugin = exports.createPlugin = function createPlugin() {
32
32
  // Inline comment annotations are not considered as edits to the document body
33
33
  var isAnnotationStep = !!transaction.steps.find(function (step) {
34
34
  var _step$mark;
35
- return step instanceof _transform.AddMarkStep && ((_step$mark = step.mark) === null || _step$mark === void 0 || (_step$mark = _step$mark.type) === null || _step$mark === void 0 ? void 0 : _step$mark.name) === 'annotation';
35
+ return (step instanceof _transform.AddMarkStep || step instanceof _transform.RemoveMarkStep) && ((_step$mark = step.mark) === null || _step$mark === void 0 || (_step$mark = _step$mark.type) === null || _step$mark === void 0 ? void 0 : _step$mark.name) === 'annotation';
36
36
  });
37
37
  if (isDocumentReplaceFromRemote) {
38
38
  return prevPluginState;
@@ -1,7 +1,7 @@
1
1
  import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
4
+ import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
5
5
  import { isOrganicChange } from '../utils';
6
6
  export const trackLastOrganicChangePluginKey = new PluginKey('collabTrackLastOrganicChangePlugin');
7
7
  export const createPlugin = () => {
@@ -26,7 +26,7 @@ export const createPlugin = () => {
26
26
  // Inline comment annotations are not considered as edits to the document body
27
27
  const isAnnotationStep = !!transaction.steps.find(step => {
28
28
  var _step$mark, _step$mark$type;
29
- return step instanceof AddMarkStep && ((_step$mark = step.mark) === null || _step$mark === void 0 ? void 0 : (_step$mark$type = _step$mark.type) === null || _step$mark$type === void 0 ? void 0 : _step$mark$type.name) === 'annotation';
29
+ return (step instanceof AddMarkStep || step instanceof RemoveMarkStep) && ((_step$mark = step.mark) === null || _step$mark === void 0 ? void 0 : (_step$mark$type = _step$mark.type) === null || _step$mark$type === void 0 ? void 0 : _step$mark$type.name) === 'annotation';
30
30
  });
31
31
  if (isDocumentReplaceFromRemote) {
32
32
  return prevPluginState;
@@ -1,7 +1,7 @@
1
1
  import { isDirtyTransaction } from '@atlaskit/editor-common/collab';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
- import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
4
+ import { AddMarkStep, RemoveMarkStep } from '@atlaskit/editor-prosemirror/transform';
5
5
  import { isOrganicChange } from '../utils';
6
6
  export var trackLastOrganicChangePluginKey = new PluginKey('collabTrackLastOrganicChangePlugin');
7
7
  export var createPlugin = function createPlugin() {
@@ -26,7 +26,7 @@ export var createPlugin = function createPlugin() {
26
26
  // Inline comment annotations are not considered as edits to the document body
27
27
  var isAnnotationStep = !!transaction.steps.find(function (step) {
28
28
  var _step$mark;
29
- return step instanceof AddMarkStep && ((_step$mark = step.mark) === null || _step$mark === void 0 || (_step$mark = _step$mark.type) === null || _step$mark === void 0 ? void 0 : _step$mark.name) === 'annotation';
29
+ return (step instanceof AddMarkStep || step instanceof RemoveMarkStep) && ((_step$mark = step.mark) === null || _step$mark === void 0 || (_step$mark = _step$mark.type) === null || _step$mark === void 0 ? void 0 : _step$mark.name) === 'annotation';
30
30
  });
31
31
  if (isDocumentReplaceFromRemote) {
32
32
  return prevPluginState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-collab-edit",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Collab Edit plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,12 +33,12 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^40.9.0",
35
35
  "@atlaskit/custom-steps": "^0.7.0",
36
- "@atlaskit/editor-common": "^91.0.0",
36
+ "@atlaskit/editor-common": "^91.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "1.8.8",
38
38
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
39
39
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
40
40
  "@atlaskit/editor-prosemirror": "6.0.0",
41
- "@atlaskit/editor-shared-styles": "^2.13.0",
41
+ "@atlaskit/editor-shared-styles": "^3.0.0",
42
42
  "@atlaskit/platform-feature-flags": "^0.3.0",
43
43
  "@atlaskit/prosemirror-collab": "^0.9.0",
44
44
  "@babel/runtime": "^7.0.0",