@atlaskit/editor-plugin-find-replace 10.2.7 → 10.2.9

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,17 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 10.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 10.2.8
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 10.2.7
4
16
 
5
17
  ### Patch Changes
@@ -40,56 +40,56 @@ var BatchDecorations = /*#__PURE__*/function () {
40
40
  value: (function () {
41
41
  var _applyAllSearchDecorations = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(editorView, containerElement, addDecorations, removeDecorations) {
42
42
  var pmElement, positions, startPos, endPos, viewportStartPos, viewportEndPos, dir, before, after, diff;
43
- return _regenerator.default.wrap(function _callee$(_context) {
43
+ return _regenerator.default.wrap(function (_context) {
44
44
  while (1) switch (_context.prev = _context.next) {
45
45
  case 0:
46
46
  this.stop();
47
47
  this.addDecorations = addDecorations;
48
48
  this.removeDecorations = removeDecorations;
49
49
  if (containerElement) {
50
- _context.next = 5;
50
+ _context.next = 1;
51
51
  break;
52
52
  }
53
53
  return _context.abrupt("return");
54
- case 5:
54
+ case 1:
55
55
  pmElement = containerElement.querySelector('.ProseMirror');
56
56
  if (pmElement) {
57
- _context.next = 8;
57
+ _context.next = 2;
58
58
  break;
59
59
  }
60
60
  return _context.abrupt("return");
61
- case 8:
61
+ case 2:
62
62
  positions = this.calcDecorationPositions(editorView, containerElement, pmElement);
63
63
  startPos = positions.startPos, endPos = positions.endPos, viewportStartPos = positions.viewportStartPos, viewportEndPos = positions.viewportEndPos;
64
64
  dir = 0;
65
65
  before = viewportStartPos;
66
66
  after = viewportEndPos - posIncrement;
67
- _context.next = 15;
67
+ _context.next = 3;
68
68
  return this.updateDecorationsBetween(editorView, viewportStartPos, viewportEndPos);
69
- case 15:
69
+ case 3:
70
70
  if (!(before > startPos || after < endPos)) {
71
- _context.next = 28;
71
+ _context.next = 7;
72
72
  break;
73
73
  }
74
74
  if (!(dir++ % 2 === 0 && before > startPos || after >= endPos)) {
75
- _context.next = 23;
75
+ _context.next = 5;
76
76
  break;
77
77
  }
78
78
  diff = before - startPos;
79
79
  before = Math.max(before - posIncrement, startPos);
80
- _context.next = 21;
80
+ _context.next = 4;
81
81
  return this.updateDecorationsBetween(editorView, before, before + Math.min(diff, posIncrement));
82
- case 21:
83
- _context.next = 26;
82
+ case 4:
83
+ _context.next = 6;
84
84
  break;
85
- case 23:
85
+ case 5:
86
86
  after = Math.min(after + posIncrement, endPos);
87
- _context.next = 26;
87
+ _context.next = 6;
88
88
  return this.updateDecorationsBetween(editorView, after, Math.min(after + posIncrement, endPos));
89
- case 26:
90
- _context.next = 15;
89
+ case 6:
90
+ _context.next = 3;
91
91
  break;
92
- case 28:
92
+ case 7:
93
93
  case "end":
94
94
  return _context.stop();
95
95
  }
@@ -104,15 +104,15 @@ var BatchDecorations = /*#__PURE__*/function () {
104
104
  key: "updateDecorationsBetween",
105
105
  value: function () {
106
106
  var _updateDecorationsBetween = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(editorView, startPos, endPos) {
107
- return _regenerator.default.wrap(function _callee2$(_context2) {
107
+ return _regenerator.default.wrap(function (_context2) {
108
108
  while (1) switch (_context2.prev = _context2.next) {
109
109
  case 0:
110
- _context2.next = 2;
110
+ _context2.next = 1;
111
111
  return this.removeDecorationsBetween(editorView, startPos, endPos);
112
- case 2:
113
- _context2.next = 4;
112
+ case 1:
113
+ _context2.next = 2;
114
114
  return this.addDecorationsBetween(editorView, startPos, endPos);
115
- case 4:
115
+ case 2:
116
116
  case "end":
117
117
  return _context2.stop();
118
118
  }
@@ -129,17 +129,17 @@ var BatchDecorations = /*#__PURE__*/function () {
129
129
  var _addDecorationsBetween = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(editorView, startPos, endPos) {
130
130
  var _this = this;
131
131
  var selection, _getPluginState, matches, decorationSet, matchesBetween, selectionMatch, selectionIndex;
132
- return _regenerator.default.wrap(function _callee3$(_context3) {
132
+ return _regenerator.default.wrap(function (_context3) {
133
133
  while (1) switch (_context3.prev = _context3.next) {
134
134
  case 0:
135
135
  selection = editorView.state.selection;
136
136
  _getPluginState = (0, _pluginFactory.getPluginState)(editorView.state), matches = _getPluginState.matches, decorationSet = _getPluginState.decorationSet;
137
137
  if (!(matches.length === 0)) {
138
- _context3.next = 4;
138
+ _context3.next = 1;
139
139
  break;
140
140
  }
141
141
  return _context3.abrupt("return");
142
- case 4:
142
+ case 1:
143
143
  matchesBetween = matches.filter(function (m) {
144
144
  return m.start >= startPos && (endPos === undefined || m.start < endPos);
145
145
  });
@@ -149,7 +149,7 @@ var BatchDecorations = /*#__PURE__*/function () {
149
149
  selectionIndex = matchesBetween.findIndex(function (match) {
150
150
  return match === selectionMatch;
151
151
  });
152
- _context3.next = 9;
152
+ _context3.next = 2;
153
153
  return this.batchRequests(function (counter) {
154
154
  var matchesToDecorate = matchesBetween.slice(counter, counter + batchIncrement);
155
155
  if (matchesToDecorate.length === 0) {
@@ -170,9 +170,9 @@ var BatchDecorations = /*#__PURE__*/function () {
170
170
  increment: batchIncrement,
171
171
  until: matchesBetween.length
172
172
  });
173
- case 9:
173
+ case 2:
174
174
  return _context3.abrupt("return", _context3.sent);
175
- case 10:
175
+ case 3:
176
176
  case "end":
177
177
  return _context3.stop();
178
178
  }
@@ -189,18 +189,18 @@ var BatchDecorations = /*#__PURE__*/function () {
189
189
  var _removeDecorationsBetween = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(editorView, startPos, endPos) {
190
190
  var _this2 = this;
191
191
  var _getPluginState2, decorationSet, decorations;
192
- return _regenerator.default.wrap(function _callee4$(_context4) {
192
+ return _regenerator.default.wrap(function (_context4) {
193
193
  while (1) switch (_context4.prev = _context4.next) {
194
194
  case 0:
195
195
  _getPluginState2 = (0, _pluginFactory.getPluginState)(editorView.state), decorationSet = _getPluginState2.decorationSet;
196
196
  decorations = decorationSet.find(startPos, endPos);
197
197
  if (!(decorations.length === 0)) {
198
- _context4.next = 4;
198
+ _context4.next = 1;
199
199
  break;
200
200
  }
201
201
  return _context4.abrupt("return");
202
- case 4:
203
- _context4.next = 6;
202
+ case 1:
203
+ _context4.next = 2;
204
204
  return this.batchRequests(function (counter) {
205
205
  var decorationsToRemove = decorations.slice(counter, counter + batchIncrement);
206
206
  if (decorationsToRemove.length === 0) {
@@ -220,9 +220,9 @@ var BatchDecorations = /*#__PURE__*/function () {
220
220
  increment: batchIncrement,
221
221
  until: decorations.length
222
222
  });
223
- case 6:
223
+ case 2:
224
224
  return _context4.abrupt("return", _context4.sent);
225
- case 7:
225
+ case 3:
226
226
  case "end":
227
227
  return _context4.stop();
228
228
  }
@@ -34,56 +34,56 @@ var BatchDecorations = /*#__PURE__*/function () {
34
34
  value: (function () {
35
35
  var _applyAllSearchDecorations = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(editorView, containerElement, addDecorations, removeDecorations) {
36
36
  var pmElement, positions, startPos, endPos, viewportStartPos, viewportEndPos, dir, before, after, diff;
37
- return _regeneratorRuntime.wrap(function _callee$(_context) {
37
+ return _regeneratorRuntime.wrap(function (_context) {
38
38
  while (1) switch (_context.prev = _context.next) {
39
39
  case 0:
40
40
  this.stop();
41
41
  this.addDecorations = addDecorations;
42
42
  this.removeDecorations = removeDecorations;
43
43
  if (containerElement) {
44
- _context.next = 5;
44
+ _context.next = 1;
45
45
  break;
46
46
  }
47
47
  return _context.abrupt("return");
48
- case 5:
48
+ case 1:
49
49
  pmElement = containerElement.querySelector('.ProseMirror');
50
50
  if (pmElement) {
51
- _context.next = 8;
51
+ _context.next = 2;
52
52
  break;
53
53
  }
54
54
  return _context.abrupt("return");
55
- case 8:
55
+ case 2:
56
56
  positions = this.calcDecorationPositions(editorView, containerElement, pmElement);
57
57
  startPos = positions.startPos, endPos = positions.endPos, viewportStartPos = positions.viewportStartPos, viewportEndPos = positions.viewportEndPos;
58
58
  dir = 0;
59
59
  before = viewportStartPos;
60
60
  after = viewportEndPos - posIncrement;
61
- _context.next = 15;
61
+ _context.next = 3;
62
62
  return this.updateDecorationsBetween(editorView, viewportStartPos, viewportEndPos);
63
- case 15:
63
+ case 3:
64
64
  if (!(before > startPos || after < endPos)) {
65
- _context.next = 28;
65
+ _context.next = 7;
66
66
  break;
67
67
  }
68
68
  if (!(dir++ % 2 === 0 && before > startPos || after >= endPos)) {
69
- _context.next = 23;
69
+ _context.next = 5;
70
70
  break;
71
71
  }
72
72
  diff = before - startPos;
73
73
  before = Math.max(before - posIncrement, startPos);
74
- _context.next = 21;
74
+ _context.next = 4;
75
75
  return this.updateDecorationsBetween(editorView, before, before + Math.min(diff, posIncrement));
76
- case 21:
77
- _context.next = 26;
76
+ case 4:
77
+ _context.next = 6;
78
78
  break;
79
- case 23:
79
+ case 5:
80
80
  after = Math.min(after + posIncrement, endPos);
81
- _context.next = 26;
81
+ _context.next = 6;
82
82
  return this.updateDecorationsBetween(editorView, after, Math.min(after + posIncrement, endPos));
83
- case 26:
84
- _context.next = 15;
83
+ case 6:
84
+ _context.next = 3;
85
85
  break;
86
- case 28:
86
+ case 7:
87
87
  case "end":
88
88
  return _context.stop();
89
89
  }
@@ -98,15 +98,15 @@ var BatchDecorations = /*#__PURE__*/function () {
98
98
  key: "updateDecorationsBetween",
99
99
  value: function () {
100
100
  var _updateDecorationsBetween = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(editorView, startPos, endPos) {
101
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
101
+ return _regeneratorRuntime.wrap(function (_context2) {
102
102
  while (1) switch (_context2.prev = _context2.next) {
103
103
  case 0:
104
- _context2.next = 2;
104
+ _context2.next = 1;
105
105
  return this.removeDecorationsBetween(editorView, startPos, endPos);
106
- case 2:
107
- _context2.next = 4;
106
+ case 1:
107
+ _context2.next = 2;
108
108
  return this.addDecorationsBetween(editorView, startPos, endPos);
109
- case 4:
109
+ case 2:
110
110
  case "end":
111
111
  return _context2.stop();
112
112
  }
@@ -123,17 +123,17 @@ var BatchDecorations = /*#__PURE__*/function () {
123
123
  var _addDecorationsBetween = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(editorView, startPos, endPos) {
124
124
  var _this = this;
125
125
  var selection, _getPluginState, matches, decorationSet, matchesBetween, selectionMatch, selectionIndex;
126
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
126
+ return _regeneratorRuntime.wrap(function (_context3) {
127
127
  while (1) switch (_context3.prev = _context3.next) {
128
128
  case 0:
129
129
  selection = editorView.state.selection;
130
130
  _getPluginState = getPluginState(editorView.state), matches = _getPluginState.matches, decorationSet = _getPluginState.decorationSet;
131
131
  if (!(matches.length === 0)) {
132
- _context3.next = 4;
132
+ _context3.next = 1;
133
133
  break;
134
134
  }
135
135
  return _context3.abrupt("return");
136
- case 4:
136
+ case 1:
137
137
  matchesBetween = matches.filter(function (m) {
138
138
  return m.start >= startPos && (endPos === undefined || m.start < endPos);
139
139
  });
@@ -143,7 +143,7 @@ var BatchDecorations = /*#__PURE__*/function () {
143
143
  selectionIndex = matchesBetween.findIndex(function (match) {
144
144
  return match === selectionMatch;
145
145
  });
146
- _context3.next = 9;
146
+ _context3.next = 2;
147
147
  return this.batchRequests(function (counter) {
148
148
  var matchesToDecorate = matchesBetween.slice(counter, counter + batchIncrement);
149
149
  if (matchesToDecorate.length === 0) {
@@ -164,9 +164,9 @@ var BatchDecorations = /*#__PURE__*/function () {
164
164
  increment: batchIncrement,
165
165
  until: matchesBetween.length
166
166
  });
167
- case 9:
167
+ case 2:
168
168
  return _context3.abrupt("return", _context3.sent);
169
- case 10:
169
+ case 3:
170
170
  case "end":
171
171
  return _context3.stop();
172
172
  }
@@ -183,18 +183,18 @@ var BatchDecorations = /*#__PURE__*/function () {
183
183
  var _removeDecorationsBetween = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(editorView, startPos, endPos) {
184
184
  var _this2 = this;
185
185
  var _getPluginState2, decorationSet, decorations;
186
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
186
+ return _regeneratorRuntime.wrap(function (_context4) {
187
187
  while (1) switch (_context4.prev = _context4.next) {
188
188
  case 0:
189
189
  _getPluginState2 = getPluginState(editorView.state), decorationSet = _getPluginState2.decorationSet;
190
190
  decorations = decorationSet.find(startPos, endPos);
191
191
  if (!(decorations.length === 0)) {
192
- _context4.next = 4;
192
+ _context4.next = 1;
193
193
  break;
194
194
  }
195
195
  return _context4.abrupt("return");
196
- case 4:
197
- _context4.next = 6;
196
+ case 1:
197
+ _context4.next = 2;
198
198
  return this.batchRequests(function (counter) {
199
199
  var decorationsToRemove = decorations.slice(counter, counter + batchIncrement);
200
200
  if (decorationsToRemove.length === 0) {
@@ -214,9 +214,9 @@ var BatchDecorations = /*#__PURE__*/function () {
214
214
  increment: batchIncrement,
215
215
  until: decorations.length
216
216
  });
217
- case 6:
217
+ case 2:
218
218
  return _context4.abrupt("return", _context4.sent);
219
- case 7:
219
+ case 3:
220
220
  case "end":
221
221
  return _context4.stop();
222
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "10.2.7",
3
+ "version": "10.2.9",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,11 +30,11 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/button": "^23.11.0",
32
32
  "@atlaskit/editor-plugin-analytics": "^10.1.0",
33
- "@atlaskit/editor-plugin-card": "^16.10.0",
33
+ "@atlaskit/editor-plugin-card": "^16.11.0",
34
34
  "@atlaskit/editor-plugin-expand": "^11.2.0",
35
- "@atlaskit/editor-plugin-mentions": "^12.2.0",
35
+ "@atlaskit/editor-plugin-mentions": "^12.3.0",
36
36
  "@atlaskit/editor-plugin-primary-toolbar": "^11.1.0",
37
- "@atlaskit/editor-plugin-synced-block": "^8.4.0",
37
+ "@atlaskit/editor-plugin-synced-block": "^8.5.0",
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
39
  "@atlaskit/editor-shared-styles": "^3.11.0",
40
40
  "@atlaskit/form": "^15.5.0",
@@ -44,9 +44,9 @@
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^19.0.0",
46
46
  "@atlaskit/textfield": "^8.3.0",
47
- "@atlaskit/tmp-editor-statsig": "^84.0.0",
48
- "@atlaskit/tokens": "^13.0.0",
49
- "@atlaskit/tooltip": "^22.3.0",
47
+ "@atlaskit/tmp-editor-statsig": "^86.0.0",
48
+ "@atlaskit/tokens": "^13.1.0",
49
+ "@atlaskit/tooltip": "^22.5.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
52
52
  "classnames": "^2.2.5",
@@ -63,7 +63,7 @@
63
63
  "react-intl": "^6.6.2"
64
64
  },
65
65
  "peerDependencies": {
66
- "@atlaskit/editor-common": "^114.47.0",
66
+ "@atlaskit/editor-common": "^114.54.0",
67
67
  "react": "^18.2.0",
68
68
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
69
69
  },