@atlaskit/editor-plugin-block-controls 7.16.0 → 7.17.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,24 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 7.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d5e222a3c15bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5e222a3c15bc) -
8
+ [ux] EDITOR-3945 Blockquote NodeSelection support
9
+ - Updated dependencies
10
+
11
+ ## 7.17.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`fdda2eb1f24ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fdda2eb1f24ec) -
16
+ Removes remaining part of platform_editor_multi_body_extension_extensibility fg for fg cleanup
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 7.16.0
4
23
 
5
24
  ### Minor Changes
@@ -92,17 +92,16 @@ var newGetSelection = function newGetSelection(doc, selectionEmpty, start) {
92
92
  return false;
93
93
  }
94
94
  var isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
95
- var isBlockQuoteEmpty = nodeName === 'blockquote' && (node === null || node === void 0 ? void 0 : node.textContent) === '';
96
95
  var isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.textContent) === '';
97
96
 
98
97
  // if block menu and empty line format menu are enabled,
99
98
  // we want to set the selection to avoid the selection goes to the top of the document
100
- if ((isParagraphHeadingEmpty || isBlockQuoteEmpty || isListEmpty) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
99
+ if ((isParagraphHeadingEmpty || isListEmpty) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
101
100
  return _state.TextSelection.create(doc, start + 1, start + 1);
102
101
  }
103
102
  var isBlockQuoteWithMediaOrExtension = nodeName === 'blockquote' && isNodeWithMediaOrExtension(doc, start, nodeSize);
104
103
  var isListWithMediaOrExtension = nodeName === 'bulletList' && isNodeWithMediaOrExtension(doc, start, nodeSize) || nodeName === 'orderedList' && isNodeWithMediaOrExtension(doc, start, nodeSize);
105
- if (isNodeSelection && nodeName !== 'blockquote' || isListWithMediaOrExtension || isBlockQuoteWithMediaOrExtension ||
104
+ if (isNodeSelection && (nodeName !== 'blockquote' || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) || isListWithMediaOrExtension || isBlockQuoteWithMediaOrExtension ||
106
105
  // decisionList/layoutColumn node is not selectable, but we want to select the whole node not just text
107
106
  ['decisionList', 'layoutColumn'].includes(nodeName || '') || nodeName === 'mediaGroup' && typeof (node === null || node === void 0 ? void 0 : node.childCount) === 'number' && (node === null || node === void 0 ? void 0 : node.childCount) > 1) {
108
107
  return new _state.NodeSelection(doc.resolve(start));
@@ -775,7 +775,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
775
775
  }) : anchorName;
776
776
  var dom = view.dom.querySelector("[".concat((0, _domAttrName.getAnchorAttrName)(), "=\"").concat(safeAnchorName, "\"]"));
777
777
  var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
778
- var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && (0, _platformFeatureFlags.fg)('platform_editor_multi_body_extension_extensibility');
778
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension';
779
779
  var isBlockCard = nodeType === 'blockCard';
780
780
  var isEmbedCard = nodeType === 'embedCard';
781
781
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -821,7 +821,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
821
821
  }) : anchorName;
822
822
  var dom = view.dom.querySelector("[".concat((0, _domAttrName.getAnchorAttrName)(), "=\"").concat(safeAnchorName, "\"]"));
823
823
  var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
824
- var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && (0, _platformFeatureFlags.fg)('platform_editor_multi_body_extension_extensibility');
824
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension';
825
825
  var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
826
826
  var isEmbedCard = nodeType === 'embedCard';
827
827
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -87,17 +87,16 @@ const newGetSelection = (doc, selectionEmpty, start) => {
87
87
  return false;
88
88
  }
89
89
  const isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
90
- const isBlockQuoteEmpty = nodeName === 'blockquote' && (node === null || node === void 0 ? void 0 : node.textContent) === '';
91
90
  const isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.textContent) === '';
92
91
 
93
92
  // if block menu and empty line format menu are enabled,
94
93
  // we want to set the selection to avoid the selection goes to the top of the document
95
- if ((isParagraphHeadingEmpty || isBlockQuoteEmpty || isListEmpty) && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
94
+ if ((isParagraphHeadingEmpty || isListEmpty) && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
96
95
  return TextSelection.create(doc, start + 1, start + 1);
97
96
  }
98
97
  const isBlockQuoteWithMediaOrExtension = nodeName === 'blockquote' && isNodeWithMediaOrExtension(doc, start, nodeSize);
99
98
  const isListWithMediaOrExtension = nodeName === 'bulletList' && isNodeWithMediaOrExtension(doc, start, nodeSize) || nodeName === 'orderedList' && isNodeWithMediaOrExtension(doc, start, nodeSize);
100
- if (isNodeSelection && nodeName !== 'blockquote' || isListWithMediaOrExtension || isBlockQuoteWithMediaOrExtension ||
99
+ if (isNodeSelection && (nodeName !== 'blockquote' || expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) || isListWithMediaOrExtension || isBlockQuoteWithMediaOrExtension ||
101
100
  // decisionList/layoutColumn node is not selectable, but we want to select the whole node not just text
102
101
  ['decisionList', 'layoutColumn'].includes(nodeName || '') || nodeName === 'mediaGroup' && typeof (node === null || node === void 0 ? void 0 : node.childCount) === 'number' && (node === null || node === void 0 ? void 0 : node.childCount) > 1) {
103
102
  return new NodeSelection(doc.resolve(start));
@@ -759,7 +759,7 @@ export const DragHandle = ({
759
759
  }) : anchorName;
760
760
  const dom = view.dom.querySelector(`[${getAnchorAttrName()}="${safeAnchorName}"]`);
761
761
  const hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
762
- const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && fg('platform_editor_multi_body_extension_extensibility');
762
+ const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension';
763
763
  const isBlockCard = nodeType === 'blockCard';
764
764
  const isEmbedCard = nodeType === 'embedCard';
765
765
  const isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -807,7 +807,7 @@ export const DragHandle = ({
807
807
  }) : anchorName;
808
808
  const dom = view.dom.querySelector(`[${getAnchorAttrName()}="${safeAnchorName}"]`);
809
809
  const hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
810
- const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && fg('platform_editor_multi_body_extension_extensibility');
810
+ const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension';
811
811
  const isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
812
812
  const isEmbedCard = nodeType === 'embedCard';
813
813
  const isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -86,17 +86,16 @@ var newGetSelection = function newGetSelection(doc, selectionEmpty, start) {
86
86
  return false;
87
87
  }
88
88
  var isParagraphHeadingEmpty = ['paragraph', 'heading'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.childCount) === 0;
89
- var isBlockQuoteEmpty = nodeName === 'blockquote' && (node === null || node === void 0 ? void 0 : node.textContent) === '';
90
89
  var isListEmpty = ['orderedList', 'bulletList', 'taskList'].includes(nodeName || '') && selectionEmpty && (node === null || node === void 0 ? void 0 : node.textContent) === '';
91
90
 
92
91
  // if block menu and empty line format menu are enabled,
93
92
  // we want to set the selection to avoid the selection goes to the top of the document
94
- if ((isParagraphHeadingEmpty || isBlockQuoteEmpty || isListEmpty) && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
93
+ if ((isParagraphHeadingEmpty || isListEmpty) && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
95
94
  return TextSelection.create(doc, start + 1, start + 1);
96
95
  }
97
96
  var isBlockQuoteWithMediaOrExtension = nodeName === 'blockquote' && isNodeWithMediaOrExtension(doc, start, nodeSize);
98
97
  var isListWithMediaOrExtension = nodeName === 'bulletList' && isNodeWithMediaOrExtension(doc, start, nodeSize) || nodeName === 'orderedList' && isNodeWithMediaOrExtension(doc, start, nodeSize);
99
- if (isNodeSelection && nodeName !== 'blockquote' || isListWithMediaOrExtension || isBlockQuoteWithMediaOrExtension ||
98
+ if (isNodeSelection && (nodeName !== 'blockquote' || expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) || isListWithMediaOrExtension || isBlockQuoteWithMediaOrExtension ||
100
99
  // decisionList/layoutColumn node is not selectable, but we want to select the whole node not just text
101
100
  ['decisionList', 'layoutColumn'].includes(nodeName || '') || nodeName === 'mediaGroup' && typeof (node === null || node === void 0 ? void 0 : node.childCount) === 'number' && (node === null || node === void 0 ? void 0 : node.childCount) > 1) {
102
101
  return new NodeSelection(doc.resolve(start));
@@ -772,7 +772,7 @@ export var DragHandle = function DragHandle(_ref2) {
772
772
  }) : anchorName;
773
773
  var dom = view.dom.querySelector("[".concat(getAnchorAttrName(), "=\"").concat(safeAnchorName, "\"]"));
774
774
  var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
775
- var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && fg('platform_editor_multi_body_extension_extensibility');
775
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension';
776
776
  var isBlockCard = nodeType === 'blockCard';
777
777
  var isEmbedCard = nodeType === 'embedCard';
778
778
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -818,7 +818,7 @@ export var DragHandle = function DragHandle(_ref2) {
818
818
  }) : anchorName;
819
819
  var dom = view.dom.querySelector("[".concat(getAnchorAttrName(), "=\"").concat(safeAnchorName, "\"]"));
820
820
  var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
821
- var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && fg('platform_editor_multi_body_extension_extensibility');
821
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension';
822
822
  var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
823
823
  var isEmbedCard = nodeType === 'embedCard';
824
824
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "7.16.0",
3
+ "version": "7.17.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,10 +37,10 @@
37
37
  "@atlaskit/editor-plugin-interaction": "^11.0.0",
38
38
  "@atlaskit/editor-plugin-limited-mode": "^3.1.0",
39
39
  "@atlaskit/editor-plugin-metrics": "^7.1.0",
40
- "@atlaskit/editor-plugin-quick-insert": "^6.1.0",
40
+ "@atlaskit/editor-plugin-quick-insert": "^6.2.0",
41
41
  "@atlaskit/editor-plugin-selection": "^6.1.0",
42
- "@atlaskit/editor-plugin-toolbar": "^3.4.0",
43
- "@atlaskit/editor-plugin-type-ahead": "^6.5.0",
42
+ "@atlaskit/editor-plugin-toolbar": "^3.5.0",
43
+ "@atlaskit/editor-plugin-type-ahead": "^6.6.0",
44
44
  "@atlaskit/editor-plugin-user-intent": "^4.0.0",
45
45
  "@atlaskit/editor-plugin-width": "^7.0.0",
46
46
  "@atlaskit/editor-prosemirror": "^7.2.0",
@@ -66,7 +66,7 @@
66
66
  "uuid": "^3.1.0"
67
67
  },
68
68
  "peerDependencies": {
69
- "@atlaskit/editor-common": "^110.46.0",
69
+ "@atlaskit/editor-common": "^110.47.0",
70
70
  "react": "^18.2.0",
71
71
  "react-dom": "^18.2.0",
72
72
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -122,9 +122,6 @@
122
122
  "platform_editor_ease_of_use_metrics": {
123
123
  "type": "boolean"
124
124
  },
125
- "platform_editor_multi_body_extension_extensibility": {
126
- "type": "boolean"
127
- },
128
125
  "platform_editor_drag_and_drop_perf_analytics": {
129
126
  "type": "boolean"
130
127
  },