@atlaskit/editor-plugin-block-controls 1.12.2 → 1.12.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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 1.12.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.12.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#131601](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/131601)
|
|
14
|
+
[`80035567d3d2e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80035567d3d2e) -
|
|
15
|
+
ED-24614 fix cards flickering inside a table cell
|
|
16
|
+
|
|
3
17
|
## 1.12.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -31,9 +31,20 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
|
|
|
31
31
|
var pos = view.posAtDOM(rootElement, 0, 0);
|
|
32
32
|
var rootPos;
|
|
33
33
|
if ((0, _platformFeatureFlags.fg)('platform_editor_elements_dnd_nested')) {
|
|
34
|
+
var _$rootPos$parent, _$rootPos$parent2, _$rootPos$nodeAfter;
|
|
34
35
|
var $rootPos = view.state.doc.resolve(pos);
|
|
35
36
|
var depth = $rootPos.depth;
|
|
36
|
-
rootPos =
|
|
37
|
+
var isParentAnIsolatingNode = ((_$rootPos$parent = $rootPos.parent) === null || _$rootPos$parent === void 0 ? void 0 : _$rootPos$parent.type.name) !== 'doc' && ((_$rootPos$parent2 = $rootPos.parent) === null || _$rootPos$parent2 === void 0 ? void 0 : _$rootPos$parent2.type.spec.isolating);
|
|
38
|
+
var isCurrentNodeAtom = (_$rootPos$nodeAfter = $rootPos.nodeAfter) === null || _$rootPos$nodeAfter === void 0 ? void 0 : _$rootPos$nodeAfter.isAtom;
|
|
39
|
+
/**
|
|
40
|
+
* If the parent node is an isolating node, the sides of nodes of this type are considered boundaries, such as a table cell.
|
|
41
|
+
* And the current node, as a direct child, is an atom node, meaning it does not have directly editable content.
|
|
42
|
+
* e.g. a card or an extension
|
|
43
|
+
* We maintain the original position by adding 1 to the depth.
|
|
44
|
+
* This prevents the decoration from being inserted in the wrong position, like between table cells.
|
|
45
|
+
*/
|
|
46
|
+
var posDepth = isParentAnIsolatingNode && isCurrentNodeAtom ? depth + 1 : depth;
|
|
47
|
+
rootPos = depth ? $rootPos.before(posDepth) : $rootPos.pos;
|
|
37
48
|
} else {
|
|
38
49
|
rootPos = view.state.doc.resolve(pos).start(1) - 1;
|
|
39
50
|
}
|
|
@@ -26,9 +26,20 @@ export const handleMouseOver = (view, event, api) => {
|
|
|
26
26
|
const pos = view.posAtDOM(rootElement, 0, 0);
|
|
27
27
|
let rootPos;
|
|
28
28
|
if (fg('platform_editor_elements_dnd_nested')) {
|
|
29
|
+
var _$rootPos$parent, _$rootPos$parent2, _$rootPos$nodeAfter;
|
|
29
30
|
const $rootPos = view.state.doc.resolve(pos);
|
|
30
31
|
const depth = $rootPos.depth;
|
|
31
|
-
rootPos =
|
|
32
|
+
const isParentAnIsolatingNode = ((_$rootPos$parent = $rootPos.parent) === null || _$rootPos$parent === void 0 ? void 0 : _$rootPos$parent.type.name) !== 'doc' && ((_$rootPos$parent2 = $rootPos.parent) === null || _$rootPos$parent2 === void 0 ? void 0 : _$rootPos$parent2.type.spec.isolating);
|
|
33
|
+
const isCurrentNodeAtom = (_$rootPos$nodeAfter = $rootPos.nodeAfter) === null || _$rootPos$nodeAfter === void 0 ? void 0 : _$rootPos$nodeAfter.isAtom;
|
|
34
|
+
/**
|
|
35
|
+
* If the parent node is an isolating node, the sides of nodes of this type are considered boundaries, such as a table cell.
|
|
36
|
+
* And the current node, as a direct child, is an atom node, meaning it does not have directly editable content.
|
|
37
|
+
* e.g. a card or an extension
|
|
38
|
+
* We maintain the original position by adding 1 to the depth.
|
|
39
|
+
* This prevents the decoration from being inserted in the wrong position, like between table cells.
|
|
40
|
+
*/
|
|
41
|
+
const posDepth = isParentAnIsolatingNode && isCurrentNodeAtom ? depth + 1 : depth;
|
|
42
|
+
rootPos = depth ? $rootPos.before(posDepth) : $rootPos.pos;
|
|
32
43
|
} else {
|
|
33
44
|
rootPos = view.state.doc.resolve(pos).start(1) - 1;
|
|
34
45
|
}
|
|
@@ -25,9 +25,20 @@ export var handleMouseOver = function handleMouseOver(view, event, api) {
|
|
|
25
25
|
var pos = view.posAtDOM(rootElement, 0, 0);
|
|
26
26
|
var rootPos;
|
|
27
27
|
if (fg('platform_editor_elements_dnd_nested')) {
|
|
28
|
+
var _$rootPos$parent, _$rootPos$parent2, _$rootPos$nodeAfter;
|
|
28
29
|
var $rootPos = view.state.doc.resolve(pos);
|
|
29
30
|
var depth = $rootPos.depth;
|
|
30
|
-
rootPos =
|
|
31
|
+
var isParentAnIsolatingNode = ((_$rootPos$parent = $rootPos.parent) === null || _$rootPos$parent === void 0 ? void 0 : _$rootPos$parent.type.name) !== 'doc' && ((_$rootPos$parent2 = $rootPos.parent) === null || _$rootPos$parent2 === void 0 ? void 0 : _$rootPos$parent2.type.spec.isolating);
|
|
32
|
+
var isCurrentNodeAtom = (_$rootPos$nodeAfter = $rootPos.nodeAfter) === null || _$rootPos$nodeAfter === void 0 ? void 0 : _$rootPos$nodeAfter.isAtom;
|
|
33
|
+
/**
|
|
34
|
+
* If the parent node is an isolating node, the sides of nodes of this type are considered boundaries, such as a table cell.
|
|
35
|
+
* And the current node, as a direct child, is an atom node, meaning it does not have directly editable content.
|
|
36
|
+
* e.g. a card or an extension
|
|
37
|
+
* We maintain the original position by adding 1 to the depth.
|
|
38
|
+
* This prevents the decoration from being inserted in the wrong position, like between table cells.
|
|
39
|
+
*/
|
|
40
|
+
var posDepth = isParentAnIsolatingNode && isCurrentNodeAtom ? depth + 1 : depth;
|
|
41
|
+
rootPos = depth ? $rootPos.before(posDepth) : $rootPos.pos;
|
|
31
42
|
} else {
|
|
32
43
|
rootPos = view.state.doc.resolve(pos).start(1) - 1;
|
|
33
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
34
|
+
"@atlaskit/editor-common": "^88.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
42
42
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
43
|
-
"@atlaskit/icon": "^22.
|
|
43
|
+
"@atlaskit/icon": "^22.14.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
45
45
|
"@atlaskit/pragmatic-drag-and-drop": "^1.3.0",
|
|
46
46
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",
|