@atlaskit/editor-plugin-block-controls 1.4.4 → 1.4.6
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 +83 -67
- package/dist/cjs/pm-plugins/decorations.js +1 -0
- package/dist/cjs/ui/drag-handle.js +2 -9
- package/dist/es2019/pm-plugins/decorations.js +1 -0
- package/dist/es2019/ui/drag-handle.js +2 -9
- package/dist/esm/pm-plugins/decorations.js +1 -0
- package/dist/esm/ui/drag-handle.js +2 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,176 +1,192 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 1.4.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#104497](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104497)
|
|
8
|
+
[`68c76374f675`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/68c76374f675) -
|
|
9
|
+
[ux] Adjust drag preview offset
|
|
10
|
+
|
|
11
|
+
## 1.4.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#103935](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103935)
|
|
16
|
+
[`e9aa08ecec9b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e9aa08ecec9b) -
|
|
17
|
+
Add block control plugin libra models and tests
|
|
18
|
+
|
|
3
19
|
## 1.4.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
6
22
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
23
|
+
- [#104094](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104094)
|
|
24
|
+
[`ae80ae898d90`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ae80ae898d90) -
|
|
25
|
+
Refactor getSelection and add tests
|
|
10
26
|
|
|
11
27
|
## 1.4.3
|
|
12
28
|
|
|
13
29
|
### Patch Changes
|
|
14
30
|
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
- [#103721](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103721)
|
|
32
|
+
[`8c44ebf695aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8c44ebf695aa) -
|
|
33
|
+
Adjust drag preview opacity
|
|
18
34
|
|
|
19
35
|
## 1.4.2
|
|
20
36
|
|
|
21
37
|
### Patch Changes
|
|
22
38
|
|
|
23
|
-
-
|
|
39
|
+
- Updated dependencies
|
|
24
40
|
|
|
25
41
|
## 1.4.1
|
|
26
42
|
|
|
27
43
|
### Patch Changes
|
|
28
44
|
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
- [#102680](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102680)
|
|
46
|
+
[`8b186c4a0475`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b186c4a0475) -
|
|
47
|
+
Show text controls on drag handle click
|
|
32
48
|
|
|
33
49
|
## 1.4.0
|
|
34
50
|
|
|
35
51
|
### Minor Changes
|
|
36
52
|
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
53
|
+
- [#101384](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101384)
|
|
54
|
+
[`649f601103e0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/649f601103e0) -
|
|
55
|
+
[ux] Add autoscroller support to blocks plugin
|
|
40
56
|
|
|
41
57
|
## 1.3.12
|
|
42
58
|
|
|
43
59
|
### Patch Changes
|
|
44
60
|
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
61
|
+
- [#101305](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101305)
|
|
62
|
+
[`8df2f2cd6748`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8df2f2cd6748) -
|
|
63
|
+
Refactor drop target to use Pragmatic DnD indicator package
|
|
48
64
|
|
|
49
65
|
## 1.3.11
|
|
50
66
|
|
|
51
67
|
### Patch Changes
|
|
52
68
|
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
69
|
+
- [#100944](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100944)
|
|
70
|
+
[`236b42e205dd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/236b42e205dd) -
|
|
71
|
+
Fix drag handle position on media node
|
|
72
|
+
- Updated dependencies
|
|
57
73
|
|
|
58
74
|
## 1.3.10
|
|
59
75
|
|
|
60
76
|
### Patch Changes
|
|
61
77
|
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
- [#100964](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100964)
|
|
79
|
+
[`d58e7d6f08e4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d58e7d6f08e4) -
|
|
80
|
+
[ux] Tweak CSS styles for drop targets
|
|
65
81
|
|
|
66
82
|
## 1.3.9
|
|
67
83
|
|
|
68
84
|
### Patch Changes
|
|
69
85
|
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
86
|
+
- [#100922](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100922)
|
|
87
|
+
[`d69797fc32b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d69797fc32b6) -
|
|
88
|
+
ED-22939 Fix drag handle not appearing for first node of document
|
|
73
89
|
|
|
74
90
|
## 1.3.8
|
|
75
91
|
|
|
76
92
|
### Patch Changes
|
|
77
93
|
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
- [#100787](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100787)
|
|
95
|
+
[`50f1093f6e70`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/50f1093f6e70) -
|
|
96
|
+
[ux] Fix node controls in incorrect pos when drag handle visible
|
|
81
97
|
|
|
82
98
|
## 1.3.7
|
|
83
99
|
|
|
84
100
|
### Patch Changes
|
|
85
101
|
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
102
|
+
- [#98222](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98222)
|
|
103
|
+
[`d94cd00110eb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d94cd00110eb) -
|
|
104
|
+
[ux] ED-23206 Set node selection when drag handle is clicked, dragged and content is dropped
|
|
105
|
+
- [#100193](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100193)
|
|
106
|
+
[`e9a08f4f88aa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e9a08f4f88aa) -
|
|
107
|
+
[ux] Update drag handle position
|
|
108
|
+
- Updated dependencies
|
|
93
109
|
|
|
94
110
|
## 1.3.6
|
|
95
111
|
|
|
96
112
|
### Patch Changes
|
|
97
113
|
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
-
|
|
114
|
+
- [#100030](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100030)
|
|
115
|
+
[`f246ee5d3b7f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f246ee5d3b7f) -
|
|
116
|
+
[ux] Change drop target design, refactor styles
|
|
117
|
+
- Updated dependencies
|
|
102
118
|
|
|
103
119
|
## 1.3.5
|
|
104
120
|
|
|
105
121
|
### Patch Changes
|
|
106
122
|
|
|
107
|
-
-
|
|
123
|
+
- Updated dependencies
|
|
108
124
|
|
|
109
125
|
## 1.3.4
|
|
110
126
|
|
|
111
127
|
### Patch Changes
|
|
112
128
|
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
129
|
+
- [#99555](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99555)
|
|
130
|
+
[`703d23b83234`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/703d23b83234) -
|
|
131
|
+
[ux] Update drag handle style based on design
|
|
132
|
+
- Updated dependencies
|
|
117
133
|
|
|
118
134
|
## 1.3.3
|
|
119
135
|
|
|
120
136
|
### Patch Changes
|
|
121
137
|
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
138
|
+
- [#98101](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98101)
|
|
139
|
+
[`930a81c221d3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/930a81c221d3) -
|
|
140
|
+
Update example page to enable resizable table and media-single nodes
|
|
125
141
|
|
|
126
142
|
## 1.3.2
|
|
127
143
|
|
|
128
144
|
### Patch Changes
|
|
129
145
|
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
146
|
+
- [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
|
|
147
|
+
[`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
|
|
148
|
+
[HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
|
|
149
|
+
language triggering composition on an empty line.This was fixed in a patch bump of
|
|
150
|
+
prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
|
|
135
151
|
|
|
136
152
|
## 1.3.1
|
|
137
153
|
|
|
138
154
|
### Patch Changes
|
|
139
155
|
|
|
140
|
-
-
|
|
156
|
+
- Updated dependencies
|
|
141
157
|
|
|
142
158
|
## 1.3.0
|
|
143
159
|
|
|
144
160
|
### Minor Changes
|
|
145
161
|
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
- [#95811](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/95811)
|
|
163
|
+
[`115361312a0e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/115361312a0e) -
|
|
164
|
+
move drag position data to plugin state and map positions for collab support
|
|
149
165
|
|
|
150
166
|
## 1.2.0
|
|
151
167
|
|
|
152
168
|
### Minor Changes
|
|
153
169
|
|
|
154
|
-
-
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
- [#93512](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/93512)
|
|
171
|
+
[`15155cd6eb61`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15155cd6eb61) -
|
|
172
|
+
add basic dnd behaviour to block controls plugin
|
|
157
173
|
|
|
158
174
|
## 1.1.0
|
|
159
175
|
|
|
160
176
|
### Minor Changes
|
|
161
177
|
|
|
162
|
-
-
|
|
163
|
-
|
|
164
|
-
|
|
178
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
|
|
179
|
+
[`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
|
|
180
|
+
bumped editor-prosemirror version to 4.0.0
|
|
165
181
|
|
|
166
182
|
### Patch Changes
|
|
167
183
|
|
|
168
|
-
-
|
|
184
|
+
- Updated dependencies
|
|
169
185
|
|
|
170
186
|
## 1.0.0
|
|
171
187
|
|
|
172
188
|
### Major Changes
|
|
173
189
|
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
190
|
+
- [#91350](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91350)
|
|
191
|
+
[`f27c4b41ebed`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f27c4b41ebed) -
|
|
192
|
+
Adds new Editor Block Controls plugin
|
|
@@ -78,6 +78,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
|
|
|
78
78
|
} else {
|
|
79
79
|
element.style.top = "".concat(meta.dom.offsetTop, "px");
|
|
80
80
|
}
|
|
81
|
+
element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
|
|
81
82
|
return element;
|
|
82
83
|
}, {
|
|
83
84
|
side: -1
|
|
@@ -78,14 +78,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
78
78
|
onGenerateDragPreview: function onGenerateDragPreview(_ref3) {
|
|
79
79
|
var nativeSetDragImage = _ref3.nativeSetDragImage;
|
|
80
80
|
(0, _setCustomNativeDragPreview.setCustomNativeDragPreview)({
|
|
81
|
-
getOffset: function getOffset() {
|
|
82
|
-
var rect = domRef.current.getBoundingClientRect();
|
|
83
|
-
// Offset the drag preview to the center of the element
|
|
84
|
-
return {
|
|
85
|
-
x: 0,
|
|
86
|
-
y: rect.height / 2
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
81
|
render: function render(_ref4) {
|
|
90
82
|
var container = _ref4.container;
|
|
91
83
|
return (0, _dragPreview.dragPreview)(container, domRef);
|
|
@@ -122,7 +114,8 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
122
114
|
type: "button",
|
|
123
115
|
css: [dragHandleButtonStyles, dragHandleSelected && selectedStyles],
|
|
124
116
|
ref: buttonRef,
|
|
125
|
-
onClick: handleClick
|
|
117
|
+
onClick: handleClick,
|
|
118
|
+
"data-testid": "block-ctrl-drag-handle"
|
|
126
119
|
}, (0, _react2.jsx)(_dragHandler.default, {
|
|
127
120
|
label: "",
|
|
128
121
|
size: "medium"
|
|
@@ -69,14 +69,6 @@ export const DragHandle = ({
|
|
|
69
69
|
nativeSetDragImage
|
|
70
70
|
}) => {
|
|
71
71
|
setCustomNativeDragPreview({
|
|
72
|
-
getOffset: () => {
|
|
73
|
-
const rect = domRef.current.getBoundingClientRect();
|
|
74
|
-
// Offset the drag preview to the center of the element
|
|
75
|
-
return {
|
|
76
|
-
x: 0,
|
|
77
|
-
y: rect.height / 2
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
72
|
render: ({
|
|
81
73
|
container
|
|
82
74
|
}) => {
|
|
@@ -114,7 +106,8 @@ export const DragHandle = ({
|
|
|
114
106
|
type: "button",
|
|
115
107
|
css: [dragHandleButtonStyles, dragHandleSelected && selectedStyles],
|
|
116
108
|
ref: buttonRef,
|
|
117
|
-
onClick: handleClick
|
|
109
|
+
onClick: handleClick,
|
|
110
|
+
"data-testid": "block-ctrl-drag-handle"
|
|
118
111
|
}, jsx(DragHandlerIcon, {
|
|
119
112
|
label: "",
|
|
120
113
|
size: "medium"
|
|
@@ -71,6 +71,7 @@ export var dragHandleDecoration = function dragHandleDecoration(oldState, meta,
|
|
|
71
71
|
} else {
|
|
72
72
|
element.style.top = "".concat(meta.dom.offsetTop, "px");
|
|
73
73
|
}
|
|
74
|
+
element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
|
|
74
75
|
return element;
|
|
75
76
|
}, {
|
|
76
77
|
side: -1
|
|
@@ -70,14 +70,6 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
70
70
|
onGenerateDragPreview: function onGenerateDragPreview(_ref3) {
|
|
71
71
|
var nativeSetDragImage = _ref3.nativeSetDragImage;
|
|
72
72
|
setCustomNativeDragPreview({
|
|
73
|
-
getOffset: function getOffset() {
|
|
74
|
-
var rect = domRef.current.getBoundingClientRect();
|
|
75
|
-
// Offset the drag preview to the center of the element
|
|
76
|
-
return {
|
|
77
|
-
x: 0,
|
|
78
|
-
y: rect.height / 2
|
|
79
|
-
};
|
|
80
|
-
},
|
|
81
73
|
render: function render(_ref4) {
|
|
82
74
|
var container = _ref4.container;
|
|
83
75
|
return dragPreview(container, domRef);
|
|
@@ -114,7 +106,8 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
114
106
|
type: "button",
|
|
115
107
|
css: [dragHandleButtonStyles, dragHandleSelected && selectedStyles],
|
|
116
108
|
ref: buttonRef,
|
|
117
|
-
onClick: handleClick
|
|
109
|
+
onClick: handleClick,
|
|
110
|
+
"data-testid": "block-ctrl-drag-handle"
|
|
118
111
|
}, jsx(DragHandlerIcon, {
|
|
119
112
|
label: "",
|
|
120
113
|
size: "medium"
|