@atlaskit/editor-plugin-block-controls 12.0.2 → 12.1.1
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 +19 -0
- package/dist/cjs/ui/drag-handle.js +11 -2
- package/dist/es2019/ui/drag-handle.js +11 -2
- package/dist/esm/ui/drag-handle.js +11 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 12.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`5182f0ffac22f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5182f0ffac22f) -
|
|
14
|
+
Add keyboard shortcuts and danger preview to layout column menu actions.
|
|
15
|
+
|
|
16
|
+
Fix keyboard navigation in the layout column menu.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 12.0.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -469,7 +469,8 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
469
469
|
if (nodeType === 'layoutColumn' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
470
470
|
tr.setMeta('toggleLayoutColumnMenu', {
|
|
471
471
|
anchorPos: startPos,
|
|
472
|
-
isOpen: true
|
|
472
|
+
isOpen: true,
|
|
473
|
+
openedViaKeyboard: false
|
|
473
474
|
});
|
|
474
475
|
}
|
|
475
476
|
var resolvedStartPos = tr.doc.resolve(startPos);
|
|
@@ -523,7 +524,8 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
523
524
|
if (nodeType === 'layoutColumn' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
524
525
|
tr.setMeta('toggleLayoutColumnMenu', {
|
|
525
526
|
anchorPos: startPos,
|
|
526
|
-
isOpen: true
|
|
527
|
+
isOpen: true,
|
|
528
|
+
openedViaKeyboard: false
|
|
527
529
|
});
|
|
528
530
|
}
|
|
529
531
|
var mSelect = api === null || api === void 0 || (_api$blockControls$sh = api.blockControls.sharedState.currentState()) === null || _api$blockControls$sh === void 0 ? void 0 : _api$blockControls$sh.multiSelectDnD;
|
|
@@ -611,6 +613,13 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
611
613
|
api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || _api$blockControls4.commands.startPreservingSelection()({
|
|
612
614
|
tr: tr
|
|
613
615
|
});
|
|
616
|
+
if (nodeType === 'layoutColumn' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
617
|
+
tr.setMeta('toggleLayoutColumnMenu', {
|
|
618
|
+
anchorPos: startPos,
|
|
619
|
+
isOpen: true,
|
|
620
|
+
openedViaKeyboard: true
|
|
621
|
+
});
|
|
622
|
+
}
|
|
614
623
|
var rootPos = (0, _experiments.editorExperiment)('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
|
|
615
624
|
var triggerByNode = (0, _experiments.editorExperiment)('platform_synced_block', true) ? {
|
|
616
625
|
nodeType: nodeType,
|
|
@@ -444,7 +444,8 @@ export const DragHandle = ({
|
|
|
444
444
|
if (nodeType === 'layoutColumn' && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
445
445
|
tr.setMeta('toggleLayoutColumnMenu', {
|
|
446
446
|
anchorPos: startPos,
|
|
447
|
-
isOpen: true
|
|
447
|
+
isOpen: true,
|
|
448
|
+
openedViaKeyboard: false
|
|
448
449
|
});
|
|
449
450
|
}
|
|
450
451
|
const resolvedStartPos = tr.doc.resolve(startPos);
|
|
@@ -499,7 +500,8 @@ export const DragHandle = ({
|
|
|
499
500
|
if (nodeType === 'layoutColumn' && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
500
501
|
tr.setMeta('toggleLayoutColumnMenu', {
|
|
501
502
|
anchorPos: startPos,
|
|
502
|
-
isOpen: true
|
|
503
|
+
isOpen: true,
|
|
504
|
+
openedViaKeyboard: false
|
|
503
505
|
});
|
|
504
506
|
}
|
|
505
507
|
const mSelect = api === null || api === void 0 ? void 0 : (_api$blockControls$sh = api.blockControls.sharedState.currentState()) === null || _api$blockControls$sh === void 0 ? void 0 : _api$blockControls$sh.multiSelectDnD;
|
|
@@ -587,6 +589,13 @@ export const DragHandle = ({
|
|
|
587
589
|
api === null || api === void 0 ? void 0 : (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 ? void 0 : _api$blockControls4.commands.startPreservingSelection()({
|
|
588
590
|
tr
|
|
589
591
|
});
|
|
592
|
+
if (nodeType === 'layoutColumn' && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
593
|
+
tr.setMeta('toggleLayoutColumnMenu', {
|
|
594
|
+
anchorPos: startPos,
|
|
595
|
+
isOpen: true,
|
|
596
|
+
openedViaKeyboard: true
|
|
597
|
+
});
|
|
598
|
+
}
|
|
590
599
|
const rootPos = editorExperiment('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
|
|
591
600
|
const triggerByNode = editorExperiment('platform_synced_block', true) ? {
|
|
592
601
|
nodeType,
|
|
@@ -465,7 +465,8 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
465
465
|
if (nodeType === 'layoutColumn' && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
466
466
|
tr.setMeta('toggleLayoutColumnMenu', {
|
|
467
467
|
anchorPos: startPos,
|
|
468
|
-
isOpen: true
|
|
468
|
+
isOpen: true,
|
|
469
|
+
openedViaKeyboard: false
|
|
469
470
|
});
|
|
470
471
|
}
|
|
471
472
|
var resolvedStartPos = tr.doc.resolve(startPos);
|
|
@@ -519,7 +520,8 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
519
520
|
if (nodeType === 'layoutColumn' && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
520
521
|
tr.setMeta('toggleLayoutColumnMenu', {
|
|
521
522
|
anchorPos: startPos,
|
|
522
|
-
isOpen: true
|
|
523
|
+
isOpen: true,
|
|
524
|
+
openedViaKeyboard: false
|
|
523
525
|
});
|
|
524
526
|
}
|
|
525
527
|
var mSelect = api === null || api === void 0 || (_api$blockControls$sh = api.blockControls.sharedState.currentState()) === null || _api$blockControls$sh === void 0 ? void 0 : _api$blockControls$sh.multiSelectDnD;
|
|
@@ -607,6 +609,13 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
607
609
|
api === null || api === void 0 || (_api$blockControls4 = api.blockControls) === null || _api$blockControls4 === void 0 || _api$blockControls4.commands.startPreservingSelection()({
|
|
608
610
|
tr: tr
|
|
609
611
|
});
|
|
612
|
+
if (nodeType === 'layoutColumn' && expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
|
|
613
|
+
tr.setMeta('toggleLayoutColumnMenu', {
|
|
614
|
+
anchorPos: startPos,
|
|
615
|
+
isOpen: true,
|
|
616
|
+
openedViaKeyboard: true
|
|
617
|
+
});
|
|
618
|
+
}
|
|
610
619
|
var rootPos = editorExperiment('platform_synced_block', true) ? tr.doc.resolve(startPos).before(1) : undefined;
|
|
611
620
|
var triggerByNode = editorExperiment('platform_synced_block', true) ? {
|
|
612
621
|
nodeType: nodeType,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.1.1",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^19.0.0",
|
|
58
58
|
"@atlaskit/theme": "^25.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
-
"@atlaskit/tokens": "^13.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^90.0.0",
|
|
60
|
+
"@atlaskit/tokens": "^13.3.0",
|
|
61
61
|
"@atlaskit/tooltip": "^22.6.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@emotion/react": "^11.7.1",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"uuid": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^115.
|
|
70
|
+
"@atlaskit/editor-common": "^115.7.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|
|
73
73
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|