@atlaskit/editor-plugin-block-controls 8.0.0 → 8.0.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 8.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`908cbf07c65ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/908cbf07c65ac) -
8
+ EDITOR-4055 Fix block menu empty line handle selection
9
+ - Updated dependencies
10
+
3
11
  ## 8.0.0
4
12
 
5
13
  ### Patch Changes
@@ -91,8 +91,8 @@ var newGetSelection = function newGetSelection(doc, selectionEmpty, start) {
91
91
  if (nodeName === 'paragraph' && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0 && !(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
92
92
  return false;
93
93
  }
94
- var isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
95
- var isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.textContent) === '';
94
+ var isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
95
+ var isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && (node === null || node === void 0 ? void 0 : node.textContent) === '';
96
96
 
97
97
  // if block menu and empty line format menu are enabled,
98
98
  // we want to set the selection to avoid the selection goes to the top of the document
@@ -86,8 +86,8 @@ const newGetSelection = (doc, selectionEmpty, start) => {
86
86
  if (nodeName === 'paragraph' && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0 && !expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
87
87
  return false;
88
88
  }
89
- const isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
90
- const isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.textContent) === '';
89
+ const isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
90
+ const isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && (node === null || node === void 0 ? void 0 : node.textContent) === '';
91
91
 
92
92
  // if block menu and empty line format menu are enabled,
93
93
  // we want to set the selection to avoid the selection goes to the top of the document
@@ -85,8 +85,8 @@ var newGetSelection = function newGetSelection(doc, selectionEmpty, start) {
85
85
  if (nodeName === 'paragraph' && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0 && !expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
86
86
  return false;
87
87
  }
88
- var isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
89
- var isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.textContent) === '';
88
+ var isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
89
+ var isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && (node === null || node === void 0 ? void 0 : node.textContent) === '';
90
90
 
91
91
  // if block menu and empty line format menu are enabled,
92
92
  // we want to set the selection to avoid the selection goes to the top of the document
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",