@atlaskit/editor-plugin-block-controls 1.5.1 → 1.5.3
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 +16 -0
- package/dist/cjs/pm-plugins/decorations.js +7 -3
- package/dist/cjs/ui/global-styles.js +1 -1
- package/dist/es2019/pm-plugins/decorations.js +7 -3
- package/dist/es2019/ui/global-styles.js +1 -1
- package/dist/esm/pm-plugins/decorations.js +7 -3
- package/dist/esm/ui/global-styles.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 1.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#115969](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115969)
|
|
8
|
+
[`915746a1da4f7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/915746a1da4f7) -
|
|
9
|
+
do not show mouse move wrapper for wrapping nodes
|
|
10
|
+
|
|
11
|
+
## 1.5.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#115190](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115190)
|
|
16
|
+
[`6f60bbf5f97a7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6f60bbf5f97a7) -
|
|
17
|
+
Update ff case
|
|
18
|
+
|
|
3
19
|
## 1.5.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -27,9 +27,7 @@ var dropTargetDecorations = exports.dropTargetDecorations = function dropTargetD
|
|
|
27
27
|
decs.push(_view.Decoration.widget(pos, function () {
|
|
28
28
|
var element = document.createElement('div');
|
|
29
29
|
element.setAttribute('data-blocks-drop-target-container', 'true');
|
|
30
|
-
|
|
31
|
-
element.style.clear = 'unset';
|
|
32
|
-
}
|
|
30
|
+
element.style.clear = 'unset';
|
|
33
31
|
_reactDom.default.render( /*#__PURE__*/(0, _react.createElement)(_dropTarget.DropTarget, {
|
|
34
32
|
api: api,
|
|
35
33
|
index: index
|
|
@@ -107,10 +105,16 @@ var mouseMoveWrapperDecorations = exports.mouseMoveWrapperDecorations = function
|
|
|
107
105
|
var decs = [];
|
|
108
106
|
unmountDecorations('data-blocks-decoration-container');
|
|
109
107
|
newState.doc.descendants(function (node, pos, _parent, index) {
|
|
108
|
+
// Do not render a mouse move wrapper for nodes that have wrapping - this causes wrapping to break
|
|
109
|
+
var hasWrapping = node.attrs.layout === 'wrap-left' || node.attrs.layout === 'wrap-right';
|
|
110
|
+
if (hasWrapping) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
110
113
|
var anchorName = "--node-anchor-".concat(node.type.name, "-").concat(index);
|
|
111
114
|
decs.push(_view.Decoration.widget(pos, function (view, getPos) {
|
|
112
115
|
var element = document.createElement('div');
|
|
113
116
|
element.setAttribute('data-blocks-decoration-container', 'true');
|
|
117
|
+
element.setAttribute('style', 'clear: unset;');
|
|
114
118
|
_reactDom.default.render( /*#__PURE__*/(0, _react.createElement)(_mouseMoveWrapper.MouseMoveWrapper, {
|
|
115
119
|
view: view,
|
|
116
120
|
api: api,
|
|
@@ -55,6 +55,6 @@ var globalStyles = (0, _react.css)({
|
|
|
55
55
|
});
|
|
56
56
|
var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWrapper() {
|
|
57
57
|
return (0, _react.jsx)(_react.Global, {
|
|
58
|
-
styles: [globalStyles, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2') && extendedHoverZone, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.elements.drag-and-drop-
|
|
58
|
+
styles: [globalStyles, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2') && extendedHoverZone, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.elements.drag-and-drop-ed-23868') ? withInlineNodeStyleFix : withoutInlineNodeStyleFix]
|
|
59
59
|
});
|
|
60
60
|
};
|
|
@@ -19,9 +19,7 @@ export const dropTargetDecorations = (oldState, newState, api) => {
|
|
|
19
19
|
decs.push(Decoration.widget(pos, () => {
|
|
20
20
|
const element = document.createElement('div');
|
|
21
21
|
element.setAttribute('data-blocks-drop-target-container', 'true');
|
|
22
|
-
|
|
23
|
-
element.style.clear = 'unset';
|
|
24
|
-
}
|
|
22
|
+
element.style.clear = 'unset';
|
|
25
23
|
ReactDOM.render( /*#__PURE__*/createElement(DropTarget, {
|
|
26
24
|
api,
|
|
27
25
|
index
|
|
@@ -101,10 +99,16 @@ export const mouseMoveWrapperDecorations = (newState, api) => {
|
|
|
101
99
|
const decs = [];
|
|
102
100
|
unmountDecorations('data-blocks-decoration-container');
|
|
103
101
|
newState.doc.descendants((node, pos, _parent, index) => {
|
|
102
|
+
// Do not render a mouse move wrapper for nodes that have wrapping - this causes wrapping to break
|
|
103
|
+
const hasWrapping = node.attrs.layout === 'wrap-left' || node.attrs.layout === 'wrap-right';
|
|
104
|
+
if (hasWrapping) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
104
107
|
const anchorName = `--node-anchor-${node.type.name}-${index}`;
|
|
105
108
|
decs.push(Decoration.widget(pos, (view, getPos) => {
|
|
106
109
|
const element = document.createElement('div');
|
|
107
110
|
element.setAttribute('data-blocks-decoration-container', 'true');
|
|
111
|
+
element.setAttribute('style', 'clear: unset;');
|
|
108
112
|
ReactDOM.render( /*#__PURE__*/createElement(MouseMoveWrapper, {
|
|
109
113
|
view,
|
|
110
114
|
api,
|
|
@@ -54,6 +54,6 @@ const globalStyles = css({
|
|
|
54
54
|
});
|
|
55
55
|
export const GlobalStylesWrapper = () => {
|
|
56
56
|
return jsx(Global, {
|
|
57
|
-
styles: [globalStyles, getBooleanFF('platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2') && extendedHoverZone, getBooleanFF('platform.editor.elements.drag-and-drop-
|
|
57
|
+
styles: [globalStyles, getBooleanFF('platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2') && extendedHoverZone, getBooleanFF('platform.editor.elements.drag-and-drop-ed-23868') ? withInlineNodeStyleFix : withoutInlineNodeStyleFix]
|
|
58
58
|
});
|
|
59
59
|
};
|
|
@@ -20,9 +20,7 @@ export var dropTargetDecorations = function dropTargetDecorations(oldState, newS
|
|
|
20
20
|
decs.push(Decoration.widget(pos, function () {
|
|
21
21
|
var element = document.createElement('div');
|
|
22
22
|
element.setAttribute('data-blocks-drop-target-container', 'true');
|
|
23
|
-
|
|
24
|
-
element.style.clear = 'unset';
|
|
25
|
-
}
|
|
23
|
+
element.style.clear = 'unset';
|
|
26
24
|
ReactDOM.render( /*#__PURE__*/createElement(DropTarget, {
|
|
27
25
|
api: api,
|
|
28
26
|
index: index
|
|
@@ -100,10 +98,16 @@ export var mouseMoveWrapperDecorations = function mouseMoveWrapperDecorations(ne
|
|
|
100
98
|
var decs = [];
|
|
101
99
|
unmountDecorations('data-blocks-decoration-container');
|
|
102
100
|
newState.doc.descendants(function (node, pos, _parent, index) {
|
|
101
|
+
// Do not render a mouse move wrapper for nodes that have wrapping - this causes wrapping to break
|
|
102
|
+
var hasWrapping = node.attrs.layout === 'wrap-left' || node.attrs.layout === 'wrap-right';
|
|
103
|
+
if (hasWrapping) {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
103
106
|
var anchorName = "--node-anchor-".concat(node.type.name, "-").concat(index);
|
|
104
107
|
decs.push(Decoration.widget(pos, function (view, getPos) {
|
|
105
108
|
var element = document.createElement('div');
|
|
106
109
|
element.setAttribute('data-blocks-decoration-container', 'true');
|
|
110
|
+
element.setAttribute('style', 'clear: unset;');
|
|
107
111
|
ReactDOM.render( /*#__PURE__*/createElement(MouseMoveWrapper, {
|
|
108
112
|
view: view,
|
|
109
113
|
api: api,
|
|
@@ -47,6 +47,6 @@ var globalStyles = css({
|
|
|
47
47
|
});
|
|
48
48
|
export var GlobalStylesWrapper = function GlobalStylesWrapper() {
|
|
49
49
|
return jsx(Global, {
|
|
50
|
-
styles: [globalStyles, getBooleanFF('platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2') && extendedHoverZone, getBooleanFF('platform.editor.elements.drag-and-drop-
|
|
50
|
+
styles: [globalStyles, getBooleanFF('platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2') && extendedHoverZone, getBooleanFF('platform.editor.elements.drag-and-drop-ed-23868') ? withInlineNodeStyleFix : withoutInlineNodeStyleFix]
|
|
51
51
|
});
|
|
52
52
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^38.0.0",
|
|
35
|
-
"@atlaskit/editor-common": "^83.
|
|
35
|
+
"@atlaskit/editor-common": "^83.4.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-disabled": "^1.1.5",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.1.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"platform.editor.elements.drag-and-drop-doc-size-limit_7k4vq": {
|
|
96
96
|
"type": "boolean"
|
|
97
97
|
},
|
|
98
|
-
"platform.editor.elements.drag-and-drop-
|
|
98
|
+
"platform.editor.elements.drag-and-drop-ed-23868": {
|
|
99
99
|
"type": "boolean"
|
|
100
100
|
},
|
|
101
101
|
"platform.editor.elements.drag-and-drop-remove-wrapper_fyqr2": {
|