@atlaskit/editor-plugin-block-controls 3.19.1 → 3.19.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 +18 -0
- package/dist/cjs/blockControlsPlugin.js +4 -6
- package/dist/cjs/pm-plugins/first-node-dec-plugin.js +3 -3
- package/dist/cjs/pm-plugins/main.js +4 -6
- package/dist/es2019/blockControlsPlugin.js +4 -6
- package/dist/es2019/pm-plugins/first-node-dec-plugin.js +3 -3
- package/dist/es2019/pm-plugins/main.js +4 -6
- package/dist/esm/blockControlsPlugin.js +4 -6
- package/dist/esm/pm-plugins/first-node-dec-plugin.js +3 -3
- package/dist/esm/pm-plugins/main.js +4 -6
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 3.19.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#170734](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/170734)
|
|
8
|
+
[`85e062c13a08a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85e062c13a08a) -
|
|
9
|
+
[ED-28213] Clean up platform_editor_user_intent_plugin and
|
|
10
|
+
platform_editor_user_intent_plugin_follow_up
|
|
11
|
+
|
|
12
|
+
## 3.19.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#171539](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/171539)
|
|
17
|
+
[`823e66121b671`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/823e66121b671) -
|
|
18
|
+
[ux] Fixes height of the resize handle when advanced layouts feature is enabled.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 3.19.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -91,6 +91,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
91
91
|
},
|
|
92
92
|
setNodeDragged: function setNodeDragged(getPos, anchorName, nodeType) {
|
|
93
93
|
return function (_ref5) {
|
|
94
|
+
var _api$userIntent;
|
|
94
95
|
var tr = _ref5.tr;
|
|
95
96
|
var pos = getPos();
|
|
96
97
|
if (pos === undefined) {
|
|
@@ -114,12 +115,9 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
114
115
|
tr: tr
|
|
115
116
|
});
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
tr: tr
|
|
121
|
-
});
|
|
122
|
-
}
|
|
118
|
+
api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('dragging')({
|
|
119
|
+
tr: tr
|
|
120
|
+
});
|
|
123
121
|
return tr;
|
|
124
122
|
};
|
|
125
123
|
},
|
|
@@ -8,15 +8,15 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
10
10
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
11
|
-
var
|
|
11
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
12
|
var firstNodeDecPluginKey = exports.firstNodeDecPluginKey = new _state.PluginKey('firstNodeDec');
|
|
13
13
|
var createFirstNodeDecSet = function createFirstNodeDecSet(state) {
|
|
14
14
|
var firstNode = state.doc.firstChild;
|
|
15
15
|
if (!firstNode) {
|
|
16
16
|
return _view.DecorationSet.empty;
|
|
17
17
|
}
|
|
18
|
-
var firstNodeDecoration = (0,
|
|
19
|
-
style: 'margin-top: 0',
|
|
18
|
+
var firstNodeDecoration = (0, _expValEquals.expValEquals)('platform_editor_breakout_resizing', 'isEnabled', true) ? _view.Decoration.node(0, firstNode.nodeSize, {
|
|
19
|
+
style: 'margin-top: 0;',
|
|
20
20
|
class: 'first-node-in-document'
|
|
21
21
|
}) : _view.Decoration.node(0, firstNode.nodeSize, {
|
|
22
22
|
style: 'margin-top: 0'
|
|
@@ -108,6 +108,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
(_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
|
|
111
|
+
var _api$userIntent;
|
|
111
112
|
var tr = _ref3.tr;
|
|
112
113
|
var isMultiSelect = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
|
|
113
114
|
if (isMultiSelect) {
|
|
@@ -168,12 +169,9 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
168
169
|
tr: tr
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
tr: tr
|
|
175
|
-
});
|
|
176
|
-
}
|
|
172
|
+
(_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
|
|
173
|
+
tr: tr
|
|
174
|
+
});
|
|
177
175
|
return tr.setMeta(key, _objectSpread(_objectSpread({}, tr.getMeta(key)), {}, {
|
|
178
176
|
isDragging: false,
|
|
179
177
|
isPMDragging: false,
|
|
@@ -82,6 +82,7 @@ export const blockControlsPlugin = ({
|
|
|
82
82
|
setNodeDragged: (getPos, anchorName, nodeType) => ({
|
|
83
83
|
tr
|
|
84
84
|
}) => {
|
|
85
|
+
var _api$userIntent;
|
|
85
86
|
const pos = getPos();
|
|
86
87
|
if (pos === undefined) {
|
|
87
88
|
return tr;
|
|
@@ -105,12 +106,9 @@ export const blockControlsPlugin = ({
|
|
|
105
106
|
tr
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
tr
|
|
112
|
-
});
|
|
113
|
-
}
|
|
109
|
+
api === null || api === void 0 ? void 0 : (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('dragging')({
|
|
110
|
+
tr
|
|
111
|
+
});
|
|
114
112
|
return tr;
|
|
115
113
|
},
|
|
116
114
|
setMultiSelectPositions: (anchor, head) => ({
|
|
@@ -2,15 +2,15 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import {
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
6
|
export const firstNodeDecPluginKey = new PluginKey('firstNodeDec');
|
|
7
7
|
const createFirstNodeDecSet = state => {
|
|
8
8
|
const firstNode = state.doc.firstChild;
|
|
9
9
|
if (!firstNode) {
|
|
10
10
|
return DecorationSet.empty;
|
|
11
11
|
}
|
|
12
|
-
const firstNodeDecoration =
|
|
13
|
-
style: 'margin-top: 0',
|
|
12
|
+
const firstNodeDecoration = expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) ? Decoration.node(0, firstNode.nodeSize, {
|
|
13
|
+
style: 'margin-top: 0;',
|
|
14
14
|
class: 'first-node-in-document'
|
|
15
15
|
}) : Decoration.node(0, firstNode.nodeSize, {
|
|
16
16
|
style: 'margin-top: 0'
|
|
@@ -103,6 +103,7 @@ const destroyFn = (api, editorView) => {
|
|
|
103
103
|
(_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(({
|
|
104
104
|
tr
|
|
105
105
|
}) => {
|
|
106
|
+
var _api$userIntent;
|
|
106
107
|
const isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
107
108
|
if (isMultiSelect) {
|
|
108
109
|
var _api$blockControls, _api$selection;
|
|
@@ -165,12 +166,9 @@ const destroyFn = (api, editorView) => {
|
|
|
165
166
|
tr
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
tr
|
|
172
|
-
});
|
|
173
|
-
}
|
|
169
|
+
(_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('default')({
|
|
170
|
+
tr
|
|
171
|
+
});
|
|
174
172
|
return tr.setMeta(key, {
|
|
175
173
|
...tr.getMeta(key),
|
|
176
174
|
isDragging: false,
|
|
@@ -84,6 +84,7 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
|
|
|
84
84
|
},
|
|
85
85
|
setNodeDragged: function setNodeDragged(getPos, anchorName, nodeType) {
|
|
86
86
|
return function (_ref5) {
|
|
87
|
+
var _api$userIntent;
|
|
87
88
|
var tr = _ref5.tr;
|
|
88
89
|
var pos = getPos();
|
|
89
90
|
if (pos === undefined) {
|
|
@@ -107,12 +108,9 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
|
|
|
107
108
|
tr: tr
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
tr: tr
|
|
114
|
-
});
|
|
115
|
-
}
|
|
111
|
+
api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('dragging')({
|
|
112
|
+
tr: tr
|
|
113
|
+
});
|
|
116
114
|
return tr;
|
|
117
115
|
};
|
|
118
116
|
},
|
|
@@ -2,15 +2,15 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import {
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
6
|
export var firstNodeDecPluginKey = new PluginKey('firstNodeDec');
|
|
7
7
|
var createFirstNodeDecSet = function createFirstNodeDecSet(state) {
|
|
8
8
|
var firstNode = state.doc.firstChild;
|
|
9
9
|
if (!firstNode) {
|
|
10
10
|
return DecorationSet.empty;
|
|
11
11
|
}
|
|
12
|
-
var firstNodeDecoration =
|
|
13
|
-
style: 'margin-top: 0',
|
|
12
|
+
var firstNodeDecoration = expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) ? Decoration.node(0, firstNode.nodeSize, {
|
|
13
|
+
style: 'margin-top: 0;',
|
|
14
14
|
class: 'first-node-in-document'
|
|
15
15
|
}) : Decoration.node(0, firstNode.nodeSize, {
|
|
16
16
|
style: 'margin-top: 0'
|
|
@@ -101,6 +101,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
(_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
|
|
104
|
+
var _api$userIntent;
|
|
104
105
|
var tr = _ref3.tr;
|
|
105
106
|
var isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
106
107
|
if (isMultiSelect) {
|
|
@@ -161,12 +162,9 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
161
162
|
tr: tr
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
tr: tr
|
|
168
|
-
});
|
|
169
|
-
}
|
|
165
|
+
(_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
|
|
166
|
+
tr: tr
|
|
167
|
+
});
|
|
170
168
|
return tr.setMeta(key, _objectSpread(_objectSpread({}, tr.getMeta(key)), {}, {
|
|
171
169
|
isDragging: false,
|
|
172
170
|
isPMDragging: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "3.19.
|
|
3
|
+
"version": "3.19.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
36
|
-
"@atlaskit/editor-common": "^106.
|
|
36
|
+
"@atlaskit/editor-common": "^106.9.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
39
|
-
"@atlaskit/editor-plugin-editor-disabled": "^2.
|
|
39
|
+
"@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-feature-flags": "^1.4.0",
|
|
41
41
|
"@atlaskit/editor-plugin-interaction": "^2.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-metrics": "^3.5.0",
|
|
43
|
-
"@atlaskit/editor-plugin-quick-insert": "^2.
|
|
43
|
+
"@atlaskit/editor-plugin-quick-insert": "^2.6.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^2.2.0",
|
|
45
45
|
"@atlaskit/editor-plugin-type-ahead": "^2.7.0",
|
|
46
46
|
"@atlaskit/editor-plugin-user-intent": "^0.1.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
49
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
50
50
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
51
|
-
"@atlaskit/icon": "^
|
|
51
|
+
"@atlaskit/icon": "^27.0.0",
|
|
52
52
|
"@atlaskit/link": "^3.2.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^14.8.0",
|
|
58
58
|
"@atlaskit/theme": "^18.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^7.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^7.1.0",
|
|
60
60
|
"@atlaskit/tokens": "^5.2.0",
|
|
61
61
|
"@atlaskit/tooltip": "^20.3.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
@@ -174,9 +174,6 @@
|
|
|
174
174
|
"platform_editor_controls_patch_7": {
|
|
175
175
|
"type": "boolean"
|
|
176
176
|
},
|
|
177
|
-
"platform_editor_user_intent_plugin": {
|
|
178
|
-
"type": "boolean"
|
|
179
|
-
},
|
|
180
177
|
"platform_editor_no_cursor_on_live_doc_init": {
|
|
181
178
|
"type": "boolean"
|
|
182
179
|
},
|