@atlaskit/editor-plugin-collab-edit 1.19.0 → 1.19.2

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-collab-edit
2
2
 
3
+ ## 1.19.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#136348](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136348)
8
+ [`fb4fb56f1da7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fb4fb56f1da7c) -
9
+ Use optimised entry-points on editor-common for browser.
10
+ - Updated dependencies
11
+
12
+ ## 1.19.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 1.19.0
4
19
 
5
20
  ### Minor Changes
@@ -15,12 +15,12 @@ exports.getValidPos = void 0;
15
15
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
16
16
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
+ var _browser = require("@atlaskit/editor-common/browser");
18
19
  var _collab = require("@atlaskit/editor-common/collab");
19
- var _utils = require("@atlaskit/editor-common/utils");
20
20
  var _state = require("@atlaskit/editor-prosemirror/state");
21
21
  var _view = require("@atlaskit/editor-prosemirror/view");
22
22
  var _participants = require("../../participants");
23
- var _utils2 = require("../../utils");
23
+ var _utils = require("../../utils");
24
24
  /**
25
25
  * Returns position where it's possible to place a decoration.
26
26
  */
@@ -102,7 +102,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
102
102
 
103
103
  // Remove telepointers for users that left
104
104
  left.forEach(function (i) {
105
- var pointers = (0, _utils2.findPointers)(i.sessionId, _this.decorationSet);
105
+ var pointers = (0, _utils.findPointers)(i.sessionId, _this.decorationSet);
106
106
  if (pointers) {
107
107
  remove = remove.concat(pointers);
108
108
  }
@@ -111,7 +111,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
111
111
  if (telepointerData) {
112
112
  var sessionId = telepointerData.sessionId;
113
113
  if (participants.get(sessionId) && sessionId !== sid) {
114
- var oldPointers = (0, _utils2.findPointers)(telepointerData.sessionId, this.decorationSet);
114
+ var oldPointers = (0, _utils.findPointers)(telepointerData.sessionId, this.decorationSet);
115
115
  if (oldPointers) {
116
116
  remove = remove.concat(oldPointers);
117
117
  }
@@ -135,7 +135,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
135
135
  } catch (err) {
136
136
  this.onError(err);
137
137
  }
138
- add = add.concat((0, _utils2.createTelepointers)(from, to, sessionId, isSelection, this.getInitial(sessionId)));
138
+ add = add.concat((0, _utils.createTelepointers)(from, to, sessionId, isSelection, this.getInitial(sessionId)));
139
139
  }
140
140
  }
141
141
  if (tr.docChanged) {
@@ -145,14 +145,14 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
145
145
  // Reapplies decorators those got removed by the state change
146
146
  onRemove: function onRemove(spec) {
147
147
  if (spec.pointer && spec.pointer.sessionId && spec.key === "telepointer-".concat(spec.pointer.sessionId)) {
148
- var step = tr.steps.filter(_utils2.isReplaceStep)[0];
148
+ var step = tr.steps.filter(_utils.isReplaceStep)[0];
149
149
  if (step) {
150
150
  var _sessionId = spec.pointer.sessionId;
151
151
  var _ref = step,
152
152
  size = _ref.slice.content.size,
153
153
  _from = _ref.from;
154
154
  var pos = getValidPos(tr, size ? Math.min(_from + size, tr.doc.nodeSize - 3) : Math.max(_from, 1));
155
- add = add.concat((0, _utils2.createTelepointers)(pos, pos, _sessionId, false, _this.getInitial(_sessionId)));
155
+ add = add.concat((0, _utils.createTelepointers)(pos, pos, _sessionId, false, _this.getInitial(_sessionId)));
156
156
  }
157
157
  }
158
158
  }
@@ -163,7 +163,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
163
163
 
164
164
  // Remove any selection decoration within the change range,
165
165
  // takes care of the issue when after pasting we end up with a dead selection
166
- tr.steps.filter(_utils2.isReplaceStep).forEach(function (s) {
166
+ tr.steps.filter(_utils.isReplaceStep).forEach(function (s) {
167
167
  var _ref2 = s,
168
168
  from = _ref2.from,
169
169
  to = _ref2.to;
@@ -188,7 +188,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
188
188
  // Browser condition here to fix ED-14722 where telepointer
189
189
  // decorations with side -1 in Firefox causes backspace issues.
190
190
  // This is likely caused by contenteditable quirks in Firefox
191
- if (!_utils.browser.gecko) {
191
+ if (!_browser.browser.gecko) {
192
192
  deco.type.side = -1;
193
193
  }
194
194
  } else {
@@ -211,7 +211,7 @@ var PluginState = exports.PluginState = /*#__PURE__*/function () {
211
211
  if (telepointerData) {
212
212
  var _sessionId2 = telepointerData.sessionId;
213
213
  if (participants.get(_sessionId2)) {
214
- var positionForScroll = (0, _utils2.getPositionOfTelepointer)(_sessionId2, this.decorationSet);
214
+ var positionForScroll = (0, _utils.getPositionOfTelepointer)(_sessionId2, this.decorationSet);
215
215
  if (positionForScroll) {
216
216
  participants = participants.updateCursorPos(_sessionId2, positionForScroll);
217
217
  }
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { browser } from '@atlaskit/editor-common/browser';
2
3
  import { TELEPOINTER_DIM_CLASS } from '@atlaskit/editor-common/collab';
3
- import { browser } from '@atlaskit/editor-common/utils';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
6
  import { Participants } from '../../participants';
@@ -1,8 +1,8 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import { browser } from '@atlaskit/editor-common/browser';
4
5
  import { TELEPOINTER_DIM_CLASS } from '@atlaskit/editor-common/collab';
5
- import { browser } from '@atlaskit/editor-common/utils';
6
6
  import { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
8
  import { Participants } from '../../participants';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-collab-edit",
3
- "version": "1.19.0",
3
+ "version": "1.19.2",
4
4
  "description": "Collab Edit plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,9 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: Collaboration",
12
- "singleton": true,
13
- "inPublicMirror": false,
14
- "releaseModel": "continuous"
12
+ "singleton": true
15
13
  },
16
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
17
15
  "main": "dist/cjs/index.js",
@@ -34,8 +32,8 @@
34
32
  "dependencies": {
35
33
  "@atlaskit/adf-schema": "^40.9.0",
36
34
  "@atlaskit/custom-steps": "^0.7.0",
37
- "@atlaskit/editor-common": "^88.5.0",
38
- "@atlaskit/editor-plugin-analytics": "1.8.2",
35
+ "@atlaskit/editor-common": "^88.8.0",
36
+ "@atlaskit/editor-plugin-analytics": "1.8.3",
39
37
  "@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
40
38
  "@atlaskit/editor-plugin-feature-flags": "^1.2.0",
41
39
  "@atlaskit/editor-prosemirror": "5.0.1",
@@ -55,7 +53,7 @@
55
53
  "@atlaskit/editor-plugin-text-formatting": "^1.14.0",
56
54
  "@atlaskit/editor-plugin-type-ahead": "^1.8.0",
57
55
  "@atlaskit/editor-plugin-unsupported-content": "^1.8.0",
58
- "@atlaskit/editor-test-helpers": "^18.31.0",
56
+ "@atlaskit/editor-test-helpers": "^18.32.0",
59
57
  "@atlaskit/ssr": "*",
60
58
  "@atlaskit/synchrony-test-helpers": "^2.5.0",
61
59
  "@atlaskit/util-data-test": "^17.9.0",