@atlaskit/editor-plugin-block-controls 30.1.3 → 30.1.4
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 +8 -0
- package/dist/cjs/pm-plugins/react-root-registry.js +18 -43
- package/dist/cjs/ui/drag-handle.js +0 -19
- package/dist/es2019/pm-plugins/react-root-registry.js +16 -39
- package/dist/es2019/ui/drag-handle.js +0 -19
- package/dist/esm/pm-plugins/react-root-registry.js +18 -41
- package/dist/esm/ui/drag-handle.js +0 -19
- package/dist/types/pm-plugins/react-root-registry.d.ts +5 -16
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 30.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`116bb93a54ec6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/116bb93a54ec6) -
|
|
8
|
+
Clean up experiment `platform_editor_react19_migration`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 30.1.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.unmountFromMountPoint = exports.renderToMountPoint = void 0;
|
|
8
|
-
var _reactDom =
|
|
7
|
+
var _reactDom = require("react-dom");
|
|
9
8
|
var _client = require("react-dom/client");
|
|
10
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
11
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
9
|
/**
|
|
13
10
|
* Shared registry of React roots created via `createRoot`.
|
|
14
11
|
*
|
|
@@ -19,53 +16,31 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
19
16
|
var reactRoots = new WeakMap();
|
|
20
17
|
|
|
21
18
|
/**
|
|
22
|
-
* Mounts `element` into `mountPoint
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* legacy `ReactDOM.render` timing that ProseMirror decoration widgets depend
|
|
27
|
-
* on (focus management, anchor positioning, block-menu visibility all read
|
|
19
|
+
* Mounts `element` into `mountPoint` using the `createRoot` API wrapped in
|
|
20
|
+
* `flushSync` so the render is synchronous – matching the legacy
|
|
21
|
+
* `ReactDOM.render` timing that ProseMirror decoration widgets depend on
|
|
22
|
+
* (focus management, anchor positioning, block-menu visibility all read
|
|
28
23
|
* the rendered DOM immediately after the callback returns).
|
|
29
|
-
*
|
|
30
|
-
* Otherwise, falls back to the legacy `ReactDOM.render` path. The API is not
|
|
31
|
-
* available in React 19, so the root path is also selected when the legacy
|
|
32
|
-
* method has been removed.
|
|
33
24
|
*/
|
|
34
25
|
var renderToMountPoint = exports.renderToMountPoint = function renderToMountPoint(element, mountPoint) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
reactRoots.set(mountPoint, root);
|
|
40
|
-
}
|
|
41
|
-
var activeRoot = root;
|
|
42
|
-
|
|
43
|
-
// flushSync makes createRoot render synchronously, matching legacy
|
|
44
|
-
// ReactDOM.render timing that the widget/focus/positioning code depends on.
|
|
45
|
-
(0, _reactDom.flushSync)(function () {
|
|
46
|
-
return activeRoot.render(element);
|
|
47
|
-
});
|
|
48
|
-
} else {
|
|
49
|
-
_reactDom.default.render(element, mountPoint);
|
|
26
|
+
var root = reactRoots.get(mountPoint);
|
|
27
|
+
if (!root) {
|
|
28
|
+
root = (0, _client.createRoot)(mountPoint);
|
|
29
|
+
reactRoots.set(mountPoint, root);
|
|
50
30
|
}
|
|
31
|
+
var activeRoot = root;
|
|
32
|
+
(0, _reactDom.flushSync)(function () {
|
|
33
|
+
return activeRoot.render(element);
|
|
34
|
+
});
|
|
51
35
|
};
|
|
52
36
|
|
|
53
37
|
/**
|
|
54
|
-
* Unmounts the React tree at `mountPoint
|
|
55
|
-
*
|
|
56
|
-
* When `platform_editor_react19_migration` is **on**, looks up the root in the shared
|
|
57
|
-
* registry, calls `root.unmount()`, and removes the entry.
|
|
58
|
-
*
|
|
59
|
-
* Otherwise, falls back to `ReactDOM.unmountComponentAtNode`.
|
|
38
|
+
* Unmounts the React tree at `mountPoint` and removes it from the shared registry.
|
|
60
39
|
*/
|
|
61
40
|
var unmountFromMountPoint = exports.unmountFromMountPoint = function unmountFromMountPoint(mountPoint) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
reactRoots.delete(mountPoint);
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
_reactDom.default.unmountComponentAtNode(mountPoint);
|
|
41
|
+
var root = reactRoots.get(mountPoint);
|
|
42
|
+
if (root) {
|
|
43
|
+
root.unmount();
|
|
44
|
+
reactRoots.delete(mountPoint);
|
|
70
45
|
}
|
|
71
46
|
};
|
|
@@ -22,7 +22,6 @@ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useShar
|
|
|
22
22
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
23
23
|
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
24
24
|
var _dragHandleVertical = _interopRequireDefault(require("@atlaskit/icon/core/drag-handle-vertical"));
|
|
25
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
26
25
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
27
26
|
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
28
27
|
var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview");
|
|
@@ -901,24 +900,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
901
900
|
}, [isReliableAnchorEnabled, calculatePositionOld, view.dom, anchorName, nodeType, docDepForReliableAnchor]);
|
|
902
901
|
var isHandleShown = positionStylesOld.display !== 'none';
|
|
903
902
|
(0, _react.useEffect)(function () {
|
|
904
|
-
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_react19_migration')) {
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
if (handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && buttonRef.current) {
|
|
908
|
-
var id = requestAnimationFrame(function () {
|
|
909
|
-
var _buttonRef$current;
|
|
910
|
-
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 || _buttonRef$current.focus();
|
|
911
|
-
});
|
|
912
|
-
return function () {
|
|
913
|
-
cancelAnimationFrame(id);
|
|
914
|
-
view.focus();
|
|
915
|
-
};
|
|
916
|
-
}
|
|
917
|
-
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
918
|
-
(0, _react.useEffect)(function () {
|
|
919
|
-
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_react19_migration')) {
|
|
920
|
-
return;
|
|
921
|
-
}
|
|
922
903
|
if (!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && isHandleShown && buttonRef.current)) {
|
|
923
904
|
return;
|
|
924
905
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { flushSync } from 'react-dom';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Shared registry of React roots created via `createRoot`.
|
|
@@ -12,51 +11,29 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
|
|
|
12
11
|
const reactRoots = new WeakMap();
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
|
-
* Mounts `element` into `mountPoint
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* legacy `ReactDOM.render` timing that ProseMirror decoration widgets depend
|
|
20
|
-
* on (focus management, anchor positioning, block-menu visibility all read
|
|
14
|
+
* Mounts `element` into `mountPoint` using the `createRoot` API wrapped in
|
|
15
|
+
* `flushSync` so the render is synchronous – matching the legacy
|
|
16
|
+
* `ReactDOM.render` timing that ProseMirror decoration widgets depend on
|
|
17
|
+
* (focus management, anchor positioning, block-menu visibility all read
|
|
21
18
|
* the rendered DOM immediately after the callback returns).
|
|
22
|
-
*
|
|
23
|
-
* Otherwise, falls back to the legacy `ReactDOM.render` path. The API is not
|
|
24
|
-
* available in React 19, so the root path is also selected when the legacy
|
|
25
|
-
* method has been removed.
|
|
26
19
|
*/
|
|
27
20
|
export const renderToMountPoint = (element, mountPoint) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
reactRoots.set(mountPoint, root);
|
|
33
|
-
}
|
|
34
|
-
const activeRoot = root;
|
|
35
|
-
|
|
36
|
-
// flushSync makes createRoot render synchronously, matching legacy
|
|
37
|
-
// ReactDOM.render timing that the widget/focus/positioning code depends on.
|
|
38
|
-
flushSync(() => activeRoot.render(element));
|
|
39
|
-
} else {
|
|
40
|
-
ReactDOM.render(element, mountPoint);
|
|
21
|
+
let root = reactRoots.get(mountPoint);
|
|
22
|
+
if (!root) {
|
|
23
|
+
root = createRoot(mountPoint);
|
|
24
|
+
reactRoots.set(mountPoint, root);
|
|
41
25
|
}
|
|
26
|
+
const activeRoot = root;
|
|
27
|
+
flushSync(() => activeRoot.render(element));
|
|
42
28
|
};
|
|
43
29
|
|
|
44
30
|
/**
|
|
45
|
-
* Unmounts the React tree at `mountPoint
|
|
46
|
-
*
|
|
47
|
-
* When `platform_editor_react19_migration` is **on**, looks up the root in the shared
|
|
48
|
-
* registry, calls `root.unmount()`, and removes the entry.
|
|
49
|
-
*
|
|
50
|
-
* Otherwise, falls back to `ReactDOM.unmountComponentAtNode`.
|
|
31
|
+
* Unmounts the React tree at `mountPoint` and removes it from the shared registry.
|
|
51
32
|
*/
|
|
52
33
|
export const unmountFromMountPoint = mountPoint => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
reactRoots.delete(mountPoint);
|
|
58
|
-
}
|
|
59
|
-
} else {
|
|
60
|
-
ReactDOM.unmountComponentAtNode(mountPoint);
|
|
34
|
+
const root = reactRoots.get(mountPoint);
|
|
35
|
+
if (root) {
|
|
36
|
+
root.unmount();
|
|
37
|
+
reactRoots.delete(mountPoint);
|
|
61
38
|
}
|
|
62
39
|
};
|
|
@@ -18,7 +18,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSha
|
|
|
18
18
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
19
19
|
import { akEditorFullPageNarrowBreakout, akEditorTableToolbarSize, relativeSizeToBaseFontSize } from '@atlaskit/editor-shared-styles/constants';
|
|
20
20
|
import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
|
|
21
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
22
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
23
22
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
24
23
|
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview';
|
|
@@ -886,24 +885,6 @@ export const DragHandle = ({
|
|
|
886
885
|
}, [isReliableAnchorEnabled, calculatePositionOld, view.dom, anchorName, nodeType, docDepForReliableAnchor]);
|
|
887
886
|
const isHandleShown = positionStylesOld.display !== 'none';
|
|
888
887
|
useEffect(() => {
|
|
889
|
-
if (isExperimentEnabled('platform_editor_react19_migration')) {
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
if (handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && buttonRef.current) {
|
|
893
|
-
const id = requestAnimationFrame(() => {
|
|
894
|
-
var _buttonRef$current;
|
|
895
|
-
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
|
|
896
|
-
});
|
|
897
|
-
return () => {
|
|
898
|
-
cancelAnimationFrame(id);
|
|
899
|
-
view.focus();
|
|
900
|
-
};
|
|
901
|
-
}
|
|
902
|
-
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
903
|
-
useEffect(() => {
|
|
904
|
-
if (!isExperimentEnabled('platform_editor_react19_migration')) {
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
888
|
if (!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && isHandleShown && buttonRef.current)) {
|
|
908
889
|
return;
|
|
909
890
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { flushSync } from 'react-dom';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
5
|
* Shared registry of React roots created via `createRoot`.
|
|
@@ -12,53 +11,31 @@ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-e
|
|
|
12
11
|
var reactRoots = new WeakMap();
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
|
-
* Mounts `element` into `mountPoint
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* legacy `ReactDOM.render` timing that ProseMirror decoration widgets depend
|
|
20
|
-
* on (focus management, anchor positioning, block-menu visibility all read
|
|
14
|
+
* Mounts `element` into `mountPoint` using the `createRoot` API wrapped in
|
|
15
|
+
* `flushSync` so the render is synchronous – matching the legacy
|
|
16
|
+
* `ReactDOM.render` timing that ProseMirror decoration widgets depend on
|
|
17
|
+
* (focus management, anchor positioning, block-menu visibility all read
|
|
21
18
|
* the rendered DOM immediately after the callback returns).
|
|
22
|
-
*
|
|
23
|
-
* Otherwise, falls back to the legacy `ReactDOM.render` path. The API is not
|
|
24
|
-
* available in React 19, so the root path is also selected when the legacy
|
|
25
|
-
* method has been removed.
|
|
26
19
|
*/
|
|
27
20
|
export var renderToMountPoint = function renderToMountPoint(element, mountPoint) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
reactRoots.set(mountPoint, root);
|
|
33
|
-
}
|
|
34
|
-
var activeRoot = root;
|
|
35
|
-
|
|
36
|
-
// flushSync makes createRoot render synchronously, matching legacy
|
|
37
|
-
// ReactDOM.render timing that the widget/focus/positioning code depends on.
|
|
38
|
-
flushSync(function () {
|
|
39
|
-
return activeRoot.render(element);
|
|
40
|
-
});
|
|
41
|
-
} else {
|
|
42
|
-
ReactDOM.render(element, mountPoint);
|
|
21
|
+
var root = reactRoots.get(mountPoint);
|
|
22
|
+
if (!root) {
|
|
23
|
+
root = createRoot(mountPoint);
|
|
24
|
+
reactRoots.set(mountPoint, root);
|
|
43
25
|
}
|
|
26
|
+
var activeRoot = root;
|
|
27
|
+
flushSync(function () {
|
|
28
|
+
return activeRoot.render(element);
|
|
29
|
+
});
|
|
44
30
|
};
|
|
45
31
|
|
|
46
32
|
/**
|
|
47
|
-
* Unmounts the React tree at `mountPoint
|
|
48
|
-
*
|
|
49
|
-
* When `platform_editor_react19_migration` is **on**, looks up the root in the shared
|
|
50
|
-
* registry, calls `root.unmount()`, and removes the entry.
|
|
51
|
-
*
|
|
52
|
-
* Otherwise, falls back to `ReactDOM.unmountComponentAtNode`.
|
|
33
|
+
* Unmounts the React tree at `mountPoint` and removes it from the shared registry.
|
|
53
34
|
*/
|
|
54
35
|
export var unmountFromMountPoint = function unmountFromMountPoint(mountPoint) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
reactRoots.delete(mountPoint);
|
|
60
|
-
}
|
|
61
|
-
} else {
|
|
62
|
-
ReactDOM.unmountComponentAtNode(mountPoint);
|
|
36
|
+
var root = reactRoots.get(mountPoint);
|
|
37
|
+
if (root) {
|
|
38
|
+
root.unmount();
|
|
39
|
+
reactRoots.delete(mountPoint);
|
|
63
40
|
}
|
|
64
41
|
};
|
|
@@ -23,7 +23,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSha
|
|
|
23
23
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
24
24
|
import { akEditorFullPageNarrowBreakout, akEditorTableToolbarSize, relativeSizeToBaseFontSize } from '@atlaskit/editor-shared-styles/constants';
|
|
25
25
|
import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
|
|
26
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
27
26
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
28
27
|
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
29
28
|
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview';
|
|
@@ -897,24 +896,6 @@ export var DragHandle = function DragHandle(_ref2) {
|
|
|
897
896
|
}, [isReliableAnchorEnabled, calculatePositionOld, view.dom, anchorName, nodeType, docDepForReliableAnchor]);
|
|
898
897
|
var isHandleShown = positionStylesOld.display !== 'none';
|
|
899
898
|
useEffect(function () {
|
|
900
|
-
if (isExperimentEnabled('platform_editor_react19_migration')) {
|
|
901
|
-
return;
|
|
902
|
-
}
|
|
903
|
-
if (handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && buttonRef.current) {
|
|
904
|
-
var id = requestAnimationFrame(function () {
|
|
905
|
-
var _buttonRef$current;
|
|
906
|
-
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 || _buttonRef$current.focus();
|
|
907
|
-
});
|
|
908
|
-
return function () {
|
|
909
|
-
cancelAnimationFrame(id);
|
|
910
|
-
view.focus();
|
|
911
|
-
};
|
|
912
|
-
}
|
|
913
|
-
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
914
|
-
useEffect(function () {
|
|
915
|
-
if (!isExperimentEnabled('platform_editor_react19_migration')) {
|
|
916
|
-
return;
|
|
917
|
-
}
|
|
918
899
|
if (!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && isHandleShown && buttonRef.current)) {
|
|
919
900
|
return;
|
|
920
901
|
}
|
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
/**
|
|
3
|
-
* Mounts `element` into `mountPoint
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* legacy `ReactDOM.render` timing that ProseMirror decoration widgets depend
|
|
8
|
-
* on (focus management, anchor positioning, block-menu visibility all read
|
|
3
|
+
* Mounts `element` into `mountPoint` using the `createRoot` API wrapped in
|
|
4
|
+
* `flushSync` so the render is synchronous – matching the legacy
|
|
5
|
+
* `ReactDOM.render` timing that ProseMirror decoration widgets depend on
|
|
6
|
+
* (focus management, anchor positioning, block-menu visibility all read
|
|
9
7
|
* the rendered DOM immediately after the callback returns).
|
|
10
|
-
*
|
|
11
|
-
* Otherwise, falls back to the legacy `ReactDOM.render` path. The API is not
|
|
12
|
-
* available in React 19, so the root path is also selected when the legacy
|
|
13
|
-
* method has been removed.
|
|
14
8
|
*/
|
|
15
9
|
export declare const renderToMountPoint: (element: ReactElement, mountPoint: Element) => void;
|
|
16
10
|
/**
|
|
17
|
-
* Unmounts the React tree at `mountPoint
|
|
18
|
-
*
|
|
19
|
-
* When `platform_editor_react19_migration` is **on**, looks up the root in the shared
|
|
20
|
-
* registry, calls `root.unmount()`, and removes the entry.
|
|
21
|
-
*
|
|
22
|
-
* Otherwise, falls back to `ReactDOM.unmountComponentAtNode`.
|
|
11
|
+
* Unmounts the React tree at `mountPoint` and removes it from the shared registry.
|
|
23
12
|
*/
|
|
24
13
|
export declare const unmountFromMountPoint: (mountPoint: Element) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "30.1.
|
|
3
|
+
"version": "30.1.4",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@atlaskit/primitives": "^22.6.0",
|
|
62
62
|
"@atlaskit/section-message": "^10.2.0",
|
|
63
63
|
"@atlaskit/theme": "^28.2.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^246.
|
|
65
|
-
"@atlaskit/tokens": "^20.
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^246.1.0",
|
|
65
|
+
"@atlaskit/tokens": "^20.8.0",
|
|
66
66
|
"@atlaskit/tooltip": "^24.4.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@compiled/react": "^1.0.2",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^11.1.1"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^133.
|
|
76
|
+
"@atlaskit/editor-common": "^133.7.0",
|
|
77
77
|
"react": "^18.2.0 || ^19.2.0",
|
|
78
78
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
79
79
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|