@atlaskit/editor-plugin-find-replace 1.7.23 → 1.8.1
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 +18 -0
- package/dist/cjs/pm-plugins/utils/batch-decorations.js +3 -5
- package/dist/cjs/pm-plugins/utils/index.js +0 -3
- package/dist/cjs/ui/ui-styles.js +1 -1
- package/dist/es2019/pm-plugins/utils/batch-decorations.js +0 -2
- package/dist/es2019/pm-plugins/utils/index.js +1 -7
- package/dist/es2019/ui/ui-styles.js +1 -1
- package/dist/esm/pm-plugins/utils/batch-decorations.js +3 -5
- package/dist/esm/pm-plugins/utils/index.js +0 -3
- package/dist/esm/ui/ui-styles.js +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-find-replace
|
|
2
2
|
|
|
3
|
+
## 1.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#109060](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109060)
|
|
14
|
+
[`4660ec858a305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4660ec858a305) -
|
|
15
|
+
Update `React` from v16 to v18
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.7.23
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -34,8 +34,6 @@ var BatchDecorations = /*#__PURE__*/function () {
|
|
|
34
34
|
* Applies the decorations needed for the current search results
|
|
35
35
|
* It does so async, splitting them up into batches to help with performance
|
|
36
36
|
*/
|
|
37
|
-
// Ignored via go/ees005
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
39
37
|
}, {
|
|
40
38
|
key: "applyAllSearchDecorations",
|
|
41
39
|
value: (function () {
|
|
@@ -288,7 +286,7 @@ var BatchDecorations = /*#__PURE__*/function () {
|
|
|
288
286
|
var increment = opts.increment,
|
|
289
287
|
until = opts.until;
|
|
290
288
|
return new Promise(function (resolve) {
|
|
291
|
-
var
|
|
289
|
+
var _batchedFn = function batchedFn() {
|
|
292
290
|
var result = fn(counter);
|
|
293
291
|
while (result === false && counter < until) {
|
|
294
292
|
counter += increment;
|
|
@@ -296,13 +294,13 @@ var BatchDecorations = /*#__PURE__*/function () {
|
|
|
296
294
|
}
|
|
297
295
|
if (counter < until) {
|
|
298
296
|
counter += increment;
|
|
299
|
-
_this3.rafId = requestAnimationFrame(
|
|
297
|
+
_this3.rafId = requestAnimationFrame(_batchedFn);
|
|
300
298
|
} else {
|
|
301
299
|
_this3.rafId = undefined;
|
|
302
300
|
resolve();
|
|
303
301
|
}
|
|
304
302
|
};
|
|
305
|
-
_this3.rafId = requestAnimationFrame(
|
|
303
|
+
_this3.rafId = requestAnimationFrame(_batchedFn);
|
|
306
304
|
});
|
|
307
305
|
}
|
|
308
306
|
}]);
|
|
@@ -35,9 +35,6 @@ var createDecoration = exports.createDecoration = function createDecoration(star
|
|
|
35
35
|
class: className
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
// Ignored via go/ees005
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
41
38
|
function findMatches(content, searchText, shouldMatchCase) {
|
|
42
39
|
var contentIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
43
40
|
var matches = [];
|
package/dist/cjs/ui/ui-styles.js
CHANGED
|
@@ -118,7 +118,7 @@ var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
|
|
|
118
118
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
119
119
|
var countStyles = exports.countStyles = (0, _react.css)({
|
|
120
120
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
121
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
121
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
122
122
|
fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
|
|
123
123
|
flex: '0 0 auto',
|
|
124
124
|
justifyContent: 'center',
|
|
@@ -19,8 +19,6 @@ class BatchDecorations {
|
|
|
19
19
|
* Applies the decorations needed for the current search results
|
|
20
20
|
* It does so async, splitting them up into batches to help with performance
|
|
21
21
|
*/
|
|
22
|
-
// Ignored via go/ees005
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
24
22
|
async applyAllSearchDecorations(editorView, containerElement, addDecorations, removeDecorations) {
|
|
25
23
|
this.stop();
|
|
26
24
|
this.addDecorations = addDecorations;
|
|
@@ -22,9 +22,6 @@ export const createDecoration = (start, end, isSelected) => {
|
|
|
22
22
|
class: className
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
25
|
export function findMatches(content, searchText, shouldMatchCase, contentIndex = 0) {
|
|
29
26
|
const matches = [];
|
|
30
27
|
const searchTextLength = searchText.length;
|
|
@@ -96,10 +93,7 @@ export function findSearchIndex(selectionPos, matches, backward = false) {
|
|
|
96
93
|
}
|
|
97
94
|
export const nextIndex = (currentIndex, total) => (currentIndex + 1) % total;
|
|
98
95
|
export const prevIndex = (currentIndex, total) => (currentIndex - 1 + total) % total;
|
|
99
|
-
export const getSelectionForMatch = (selection, doc, index, matches, offset = 0
|
|
100
|
-
// Ignored via go/ees005
|
|
101
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
102
|
-
) => {
|
|
96
|
+
export const getSelectionForMatch = (selection, doc, index, matches, offset = 0) => {
|
|
103
97
|
if (matches[index]) {
|
|
104
98
|
return TextSelection.create(doc, matches[index].start + offset);
|
|
105
99
|
}
|
|
@@ -111,7 +111,7 @@ export const nextPreviousItemStyles = css({
|
|
|
111
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
112
112
|
export const countStyles = css({
|
|
113
113
|
color: `${"var(--ds-text-subtlest, #626F86)"}`,
|
|
114
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
115
115
|
fontSize: `${relativeFontSizeToBase16(12)}`,
|
|
116
116
|
flex: '0 0 auto',
|
|
117
117
|
justifyContent: 'center',
|
|
@@ -28,8 +28,6 @@ var BatchDecorations = /*#__PURE__*/function () {
|
|
|
28
28
|
* Applies the decorations needed for the current search results
|
|
29
29
|
* It does so async, splitting them up into batches to help with performance
|
|
30
30
|
*/
|
|
31
|
-
// Ignored via go/ees005
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
33
31
|
}, {
|
|
34
32
|
key: "applyAllSearchDecorations",
|
|
35
33
|
value: (function () {
|
|
@@ -282,7 +280,7 @@ var BatchDecorations = /*#__PURE__*/function () {
|
|
|
282
280
|
var increment = opts.increment,
|
|
283
281
|
until = opts.until;
|
|
284
282
|
return new Promise(function (resolve) {
|
|
285
|
-
var
|
|
283
|
+
var _batchedFn = function batchedFn() {
|
|
286
284
|
var result = fn(counter);
|
|
287
285
|
while (result === false && counter < until) {
|
|
288
286
|
counter += increment;
|
|
@@ -290,13 +288,13 @@ var BatchDecorations = /*#__PURE__*/function () {
|
|
|
290
288
|
}
|
|
291
289
|
if (counter < until) {
|
|
292
290
|
counter += increment;
|
|
293
|
-
_this3.rafId = requestAnimationFrame(
|
|
291
|
+
_this3.rafId = requestAnimationFrame(_batchedFn);
|
|
294
292
|
} else {
|
|
295
293
|
_this3.rafId = undefined;
|
|
296
294
|
resolve();
|
|
297
295
|
}
|
|
298
296
|
};
|
|
299
|
-
_this3.rafId = requestAnimationFrame(
|
|
297
|
+
_this3.rafId = requestAnimationFrame(_batchedFn);
|
|
300
298
|
});
|
|
301
299
|
}
|
|
302
300
|
}]);
|
|
@@ -25,9 +25,6 @@ export var createDecoration = function createDecoration(start, end, isSelected)
|
|
|
25
25
|
class: className
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
// Ignored via go/ees005
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
31
28
|
export function findMatches(content, searchText, shouldMatchCase) {
|
|
32
29
|
var contentIndex = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
33
30
|
var matches = [];
|
package/dist/esm/ui/ui-styles.js
CHANGED
|
@@ -111,7 +111,7 @@ export var nextPreviousItemStyles = css({
|
|
|
111
111
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
112
112
|
export var countStyles = css({
|
|
113
113
|
color: "var(--ds-text-subtlest, #626F86)",
|
|
114
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
115
115
|
fontSize: "".concat(relativeFontSizeToBase16(12)),
|
|
116
116
|
flex: '0 0 auto',
|
|
117
117
|
justifyContent: 'center',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-find-replace",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "find replace plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"./styles": "./src/ui/styles.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/button": "^20.
|
|
36
|
-
"@atlaskit/editor-common": "^99.
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
35
|
+
"@atlaskit/button": "^20.4.0",
|
|
36
|
+
"@atlaskit/editor-common": "^99.7.0",
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^1.11.0",
|
|
38
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
40
40
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
41
|
-
"@atlaskit/form": "^11.
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
43
|
-
"@atlaskit/platform-feature-flags": "^0.
|
|
44
|
-
"@atlaskit/primitives": "^13.
|
|
45
|
-
"@atlaskit/textfield": "^6.
|
|
46
|
-
"@atlaskit/theme": "^14.
|
|
47
|
-
"@atlaskit/tokens": "^3.
|
|
48
|
-
"@atlaskit/tooltip": "^19.
|
|
41
|
+
"@atlaskit/form": "^11.1.0",
|
|
42
|
+
"@atlaskit/icon": "^23.6.0",
|
|
43
|
+
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
44
|
+
"@atlaskit/primitives": "^13.4.0",
|
|
45
|
+
"@atlaskit/textfield": "^6.8.0",
|
|
46
|
+
"@atlaskit/theme": "^14.1.0",
|
|
47
|
+
"@atlaskit/tokens": "^3.3.0",
|
|
48
|
+
"@atlaskit/tooltip": "^19.1.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"lodash": "^4.17.21",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@af/visual-regression": "*",
|
|
56
|
-
"@atlaskit/editor-plugin-block-type": "^4.
|
|
57
|
-
"@atlaskit/editor-plugin-text-formatting": "^1.
|
|
58
|
-
"@testing-library/react": "^
|
|
56
|
+
"@atlaskit/editor-plugin-block-type": "^4.2.0",
|
|
57
|
+
"@atlaskit/editor-plugin-text-formatting": "^1.17.0",
|
|
58
|
+
"@testing-library/react": "^13.4.0",
|
|
59
59
|
"@testing-library/user-event": "^14.4.3",
|
|
60
60
|
"mockdate": "^3.0.5",
|
|
61
61
|
"raf-stub": "^2.0.1",
|
|
62
|
-
"react-dom": "^
|
|
62
|
+
"react-dom": "^18.2.0"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|