@atlaskit/editor-plugin-block-controls 1.3.7 → 1.3.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,21 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 1.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#100922](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100922)
8
+ [`d69797fc32b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d69797fc32b6) -
9
+ ED-22939 Fix drag handle not appearing for first node of document
10
+
11
+ ## 1.3.8
12
+
13
+ ### Patch Changes
14
+
15
+ - [#100787](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100787)
16
+ [`50f1093f6e70`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/50f1093f6e70) -
17
+ [ux] Fix node controls in incorrect pos when drag handle visible
18
+
3
19
  ## 1.3.7
4
20
 
5
21
  ### Patch Changes
@@ -79,5 +79,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
79
79
  element.style.top = "".concat(meta.dom.offsetTop, "px");
80
80
  }
81
81
  return element;
82
+ }, {
83
+ side: -1
82
84
  })]);
83
85
  };
@@ -93,7 +93,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api) {
93
93
  left: event.clientX,
94
94
  top: event.clientY
95
95
  });
96
- if (pos !== null && pos !== void 0 && pos.inside && pos.inside > 0) {
96
+ if ((pos === null || pos === void 0 ? void 0 : pos.inside) !== undefined && pos.inside >= 0) {
97
97
  var _api$core;
98
98
  var node = view.state.doc.nodeAt(pos.inside);
99
99
  if (!node) {
@@ -72,5 +72,7 @@ export const dragHandleDecoration = (oldState, meta, api) => {
72
72
  element.style.top = `${meta.dom.offsetTop}px`;
73
73
  }
74
74
  return element;
75
+ }, {
76
+ side: -1
75
77
  })]);
76
78
  };
@@ -91,7 +91,7 @@ export const createPlugin = api => {
91
91
  left: event.clientX,
92
92
  top: event.clientY
93
93
  });
94
- if (pos !== null && pos !== void 0 && pos.inside && pos.inside > 0) {
94
+ if ((pos === null || pos === void 0 ? void 0 : pos.inside) !== undefined && pos.inside >= 0) {
95
95
  var _api$core;
96
96
  const node = view.state.doc.nodeAt(pos.inside);
97
97
  if (!node) {
@@ -72,5 +72,7 @@ export var dragHandleDecoration = function dragHandleDecoration(oldState, meta,
72
72
  element.style.top = "".concat(meta.dom.offsetTop, "px");
73
73
  }
74
74
  return element;
75
+ }, {
76
+ side: -1
75
77
  })]);
76
78
  };
@@ -87,7 +87,7 @@ export var createPlugin = function createPlugin(api) {
87
87
  left: event.clientX,
88
88
  top: event.clientY
89
89
  });
90
- if (pos !== null && pos !== void 0 && pos.inside && pos.inside > 0) {
90
+ if ((pos === null || pos === void 0 ? void 0 : pos.inside) !== undefined && pos.inside >= 0) {
91
91
  var _api$core;
92
92
  var node = view.state.doc.nodeAt(pos.inside);
93
93
  if (!node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
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
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/editor-common": "^80.2.0",
34
+ "@atlaskit/editor-common": "^80.3.0",
35
35
  "@atlaskit/editor-prosemirror": "4.0.1",
36
36
  "@atlaskit/icon": "^22.2.0",
37
37
  "@atlaskit/pragmatic-drag-and-drop": "^1.1.0",