@atlaskit/editor-plugin-block-controls 3.0.0 → 3.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#118046](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118046)
8
+ [`16a2af085db1e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/16a2af085db1e) -
9
+ Removed unintentional space causing page crash in Chrome Beta
10
+ - Updated dependencies
11
+
3
12
  ## 3.0.0
4
13
 
5
14
  ### Major Changes
@@ -8,6 +8,7 @@ exports.unmountDecorations = exports.getNodeTypeWithLevel = exports.getNodeAncho
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _reactDom = _interopRequireDefault(require("react-dom"));
11
12
  var _uuid = _interopRequireDefault(require("uuid"));
12
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
14
  var TYPE_DROP_TARGET_DEC = exports.TYPE_DROP_TARGET_DEC = 'drop-target-decoration';
@@ -46,9 +47,6 @@ var unmountDecorations = exports.unmountDecorations = function unmountDecoration
46
47
  // as it was more responsive and causes less re-rendering
47
48
  var decorationsToRemove = document.querySelectorAll("[".concat(selector, "=\"true\"]"));
48
49
  decorationsToRemove.forEach(function (el) {
49
- var nodeKey = el.getAttribute(key);
50
- if (nodeKey) {
51
- nodeViewPortalProviderAPI.remove(nodeKey);
52
- }
50
+ _reactDom.default.unmountComponentAtNode(el);
53
51
  });
54
52
  };
@@ -598,7 +598,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
598
598
  // eslint-disable-next-line @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop
599
599
  ,
600
600
  onDragStart: handleIconDragStart
601
- }, ' ', (0, _react2.jsx)(_dragHandler.default, {
601
+ }, (0, _react2.jsx)(_dragHandler.default, {
602
602
  label: "",
603
603
  size: "medium"
604
604
  })))
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import ReactDOM from 'react-dom';
2
3
  import uuid from 'uuid';
3
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
5
  export const TYPE_DROP_TARGET_DEC = 'drop-target-decoration';
@@ -29,9 +30,6 @@ export const unmountDecorations = (nodeViewPortalProviderAPI, selector, key) =>
29
30
  // as it was more responsive and causes less re-rendering
30
31
  const decorationsToRemove = document.querySelectorAll(`[${selector}="true"]`);
31
32
  decorationsToRemove.forEach(el => {
32
- const nodeKey = el.getAttribute(key);
33
- if (nodeKey) {
34
- nodeViewPortalProviderAPI.remove(nodeKey);
35
- }
33
+ ReactDOM.unmountComponentAtNode(el);
36
34
  });
37
35
  };
@@ -585,7 +585,7 @@ export const DragHandle = ({
585
585
  // eslint-disable-next-line @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop
586
586
  ,
587
587
  onDragStart: handleIconDragStart
588
- }, ' ', jsx(DragHandlerIcon, {
588
+ }, jsx(DragHandlerIcon, {
589
589
  label: "",
590
590
  size: "medium"
591
591
  })));
@@ -1,6 +1,7 @@
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 ReactDOM from 'react-dom';
4
5
  import uuid from 'uuid';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  export var TYPE_DROP_TARGET_DEC = 'drop-target-decoration';
@@ -39,9 +40,6 @@ export var unmountDecorations = function unmountDecorations(nodeViewPortalProvid
39
40
  // as it was more responsive and causes less re-rendering
40
41
  var decorationsToRemove = document.querySelectorAll("[".concat(selector, "=\"true\"]"));
41
42
  decorationsToRemove.forEach(function (el) {
42
- var nodeKey = el.getAttribute(key);
43
- if (nodeKey) {
44
- nodeViewPortalProviderAPI.remove(nodeKey);
45
- }
43
+ ReactDOM.unmountComponentAtNode(el);
46
44
  });
47
45
  };
@@ -593,7 +593,7 @@ export var DragHandle = function DragHandle(_ref) {
593
593
  // eslint-disable-next-line @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop
594
594
  ,
595
595
  onDragStart: handleIconDragStart
596
- }, ' ', jsx(DragHandlerIcon, {
596
+ }, jsx(DragHandlerIcon, {
597
597
  label: "",
598
598
  size: "medium"
599
599
  })))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/adf-schema": "^47.2.1",
34
- "@atlaskit/editor-common": "^100.0.0",
34
+ "@atlaskit/editor-common": "^100.1.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^2.0.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
@@ -49,8 +49,8 @@
49
49
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^2.0.0",
50
50
  "@atlaskit/primitives": "^14.0.0",
51
51
  "@atlaskit/theme": "^17.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^3.0.0",
53
- "@atlaskit/tokens": "^4.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^3.1.0",
53
+ "@atlaskit/tokens": "^4.1.0",
54
54
  "@atlaskit/tooltip": "^20.0.0",
55
55
  "@babel/runtime": "^7.0.0",
56
56
  "@emotion/react": "^11.7.1",