@atlaskit/editor-core 204.0.0 → 204.0.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 +10 -0
- package/dist/cjs/create-editor/ReactEditorView/handleEditorFocus.js +2 -17
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView/handleEditorFocus.js +2 -12
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView/handleEditorFocus.js +2 -16
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 204.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#118064](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118064)
|
|
8
|
+
[`4f4166d9ade1e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4f4166d9ade1e) -
|
|
9
|
+
EDF-2233: Reimplement setTimeout in React18 to revert to previous behaviour to avoid .contains
|
|
10
|
+
permission errors in iframes.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 204.0.0
|
|
4
14
|
|
|
5
15
|
### Major Changes
|
|
@@ -1,30 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.handleEditorFocus = handleEditorFocus;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
7
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
8
|
function handleEditorFocus(view) {
|
|
12
9
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
13
10
|
return;
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* If startTransition is available (in React 18),
|
|
18
|
-
* don't use setTimeout as startTransition will be used in ReactEditorViewNext.
|
|
19
|
-
* setTimeout(fn, 0) will not defer the focus reliably in React 18 with
|
|
20
|
-
* concurrent rendering.
|
|
21
|
-
*/
|
|
22
|
-
var react16OnlySetTimeout = _react.default !== null && _react.default !== void 0 && _react.default.startTransition && (0, _platformFeatureFlags.fg)('platform_editor_react_18_autofocus_fix') ? function (fn) {
|
|
23
|
-
return fn();
|
|
24
|
-
} : function (fn) {
|
|
25
|
-
return window.setTimeout(fn, 0);
|
|
26
|
-
};
|
|
27
|
-
return react16OnlySetTimeout(function () {
|
|
12
|
+
return window.setTimeout(function () {
|
|
28
13
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
29
14
|
return;
|
|
30
15
|
}
|
|
@@ -57,5 +42,5 @@ function handleEditorFocus(view) {
|
|
|
57
42
|
view.dispatch(tr);
|
|
58
43
|
view.focus();
|
|
59
44
|
}
|
|
60
|
-
});
|
|
45
|
+
}, 0);
|
|
61
46
|
}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
2
|
export function handleEditorFocus(view) {
|
|
5
3
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
6
4
|
return;
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* If startTransition is available (in React 18),
|
|
11
|
-
* don't use setTimeout as startTransition will be used in ReactEditorViewNext.
|
|
12
|
-
* setTimeout(fn, 0) will not defer the focus reliably in React 18 with
|
|
13
|
-
* concurrent rendering.
|
|
14
|
-
*/
|
|
15
|
-
const react16OnlySetTimeout = React !== null && React !== void 0 && React.startTransition && fg('platform_editor_react_18_autofocus_fix') ? fn => fn() : fn => window.setTimeout(fn, 0);
|
|
16
|
-
return react16OnlySetTimeout(() => {
|
|
6
|
+
return window.setTimeout(() => {
|
|
17
7
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
18
8
|
return;
|
|
19
9
|
}
|
|
@@ -46,5 +36,5 @@ export function handleEditorFocus(view) {
|
|
|
46
36
|
view.dispatch(tr);
|
|
47
37
|
view.focus();
|
|
48
38
|
}
|
|
49
|
-
});
|
|
39
|
+
}, 0);
|
|
50
40
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "204.0.
|
|
2
|
+
export const version = "204.0.1";
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
2
|
export function handleEditorFocus(view) {
|
|
5
3
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
6
4
|
return;
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* If startTransition is available (in React 18),
|
|
11
|
-
* don't use setTimeout as startTransition will be used in ReactEditorViewNext.
|
|
12
|
-
* setTimeout(fn, 0) will not defer the focus reliably in React 18 with
|
|
13
|
-
* concurrent rendering.
|
|
14
|
-
*/
|
|
15
|
-
var react16OnlySetTimeout = React !== null && React !== void 0 && React.startTransition && fg('platform_editor_react_18_autofocus_fix') ? function (fn) {
|
|
16
|
-
return fn();
|
|
17
|
-
} : function (fn) {
|
|
18
|
-
return window.setTimeout(fn, 0);
|
|
19
|
-
};
|
|
20
|
-
return react16OnlySetTimeout(function () {
|
|
6
|
+
return window.setTimeout(function () {
|
|
21
7
|
if (view !== null && view !== void 0 && view.hasFocus()) {
|
|
22
8
|
return;
|
|
23
9
|
}
|
|
@@ -50,5 +36,5 @@ export function handleEditorFocus(view) {
|
|
|
50
36
|
view.dispatch(tr);
|
|
51
37
|
view.focus();
|
|
52
38
|
}
|
|
53
|
-
});
|
|
39
|
+
}, 0);
|
|
54
40
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "204.0.
|
|
2
|
+
export var version = "204.0.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "204.0.
|
|
3
|
+
"version": "204.0.1",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"@atlaskit/analytics-namespaced-context": "^7.0.0",
|
|
43
43
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
44
44
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
45
|
-
"@atlaskit/button": "^21.
|
|
46
|
-
"@atlaskit/editor-common": "^100.
|
|
45
|
+
"@atlaskit/button": "^21.1.0",
|
|
46
|
+
"@atlaskit/editor-common": "^100.1.0",
|
|
47
47
|
"@atlaskit/editor-json-transformer": "^8.23.0",
|
|
48
|
-
"@atlaskit/editor-performance-metrics": "2.0.
|
|
48
|
+
"@atlaskit/editor-performance-metrics": "2.0.1",
|
|
49
49
|
"@atlaskit/editor-plugin-quick-insert": "2.0.0",
|
|
50
50
|
"@atlaskit/editor-plugins": "^8.0.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
58
58
|
"@atlaskit/react-ufo": "^3.0.0",
|
|
59
59
|
"@atlaskit/task-decision": "^19.0.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^3.
|
|
61
|
-
"@atlaskit/tokens": "^4.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^3.1.0",
|
|
61
|
+
"@atlaskit/tokens": "^4.1.0",
|
|
62
62
|
"@atlaskit/tooltip": "^20.0.0",
|
|
63
63
|
"@atlaskit/width-detector": "^5.0.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
@@ -476,6 +476,10 @@
|
|
|
476
476
|
"platform_editor_nested_tables_bodied_extension_fix": {
|
|
477
477
|
"type": "boolean",
|
|
478
478
|
"referenceOnly": true
|
|
479
|
+
},
|
|
480
|
+
"platform_editor_nested_tables_resize_border_fix": {
|
|
481
|
+
"type": "boolean",
|
|
482
|
+
"referenceOnly": true
|
|
479
483
|
}
|
|
480
484
|
},
|
|
481
485
|
"stricter": {
|