@atlaskit/editor-plugin-block-controls 17.1.5 → 17.2.0

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,12 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 17.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`dce725fd04593`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dce725fd04593) -
8
+ [ux] make right block nudge remix stable gated by cc-ce-maui-remix-menu-multivariant
9
+
3
10
  ## 17.1.5
4
11
 
5
12
  ### Patch Changes
@@ -1137,11 +1137,12 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
1137
1137
  var _api$core2;
1138
1138
  // Focus moving into the registry surface remains inside the editor experience.
1139
1139
  var isChildOfSurface = !flags.legacyDragHandleEnabled && event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest(_consts.BLOCK_CONTROLS_SURFACE_SELECTOR) !== null;
1140
+ var shouldPreserveRemixInlineDropdownFocus = event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest('[data-editor-remix-inline-dropdown-preserve-focus]') !== null;
1140
1141
  var isChildOfEditor = event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest("#".concat(_ui.EDIT_AREA_ID)) !== null;
1141
1142
 
1142
1143
  // don't do anything if the event relatedTarget (the element receiving focus) is a child of the editor
1143
1144
  // or if the editor has focus
1144
- if (isChildOfEditor || isChildOfSurface || view.hasFocus()) {
1145
+ if (isChildOfEditor || isChildOfSurface || shouldPreserveRemixInlineDropdownFocus || view.hasFocus()) {
1145
1146
  return false;
1146
1147
  }
1147
1148
  api === null || api === void 0 || (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute(function (_ref6) {
@@ -1042,11 +1042,12 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI, nodeDecora
1042
1042
  var _api$core2;
1043
1043
  // Focus moving into the registry surface remains inside the editor experience.
1044
1044
  const isChildOfSurface = !flags.legacyDragHandleEnabled && event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest(BLOCK_CONTROLS_SURFACE_SELECTOR) !== null;
1045
+ const shouldPreserveRemixInlineDropdownFocus = event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest('[data-editor-remix-inline-dropdown-preserve-focus]') !== null;
1045
1046
  const isChildOfEditor = event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest(`#${EDIT_AREA_ID}`) !== null;
1046
1047
 
1047
1048
  // don't do anything if the event relatedTarget (the element receiving focus) is a child of the editor
1048
1049
  // or if the editor has focus
1049
- if (isChildOfEditor || isChildOfSurface || view.hasFocus()) {
1050
+ if (isChildOfEditor || isChildOfSurface || shouldPreserveRemixInlineDropdownFocus || view.hasFocus()) {
1050
1051
  return false;
1051
1052
  }
1052
1053
  api === null || api === void 0 ? void 0 : (_api$core2 = api.core) === null || _api$core2 === void 0 ? void 0 : _api$core2.actions.execute(({
@@ -1131,11 +1131,12 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
1131
1131
  var _api$core2;
1132
1132
  // Focus moving into the registry surface remains inside the editor experience.
1133
1133
  var isChildOfSurface = !flags.legacyDragHandleEnabled && event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest(BLOCK_CONTROLS_SURFACE_SELECTOR) !== null;
1134
+ var shouldPreserveRemixInlineDropdownFocus = event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest('[data-editor-remix-inline-dropdown-preserve-focus]') !== null;
1134
1135
  var isChildOfEditor = event.relatedTarget instanceof HTMLElement && event.relatedTarget.closest("#".concat(EDIT_AREA_ID)) !== null;
1135
1136
 
1136
1137
  // don't do anything if the event relatedTarget (the element receiving focus) is a child of the editor
1137
1138
  // or if the editor has focus
1138
- if (isChildOfEditor || isChildOfSurface || view.hasFocus()) {
1139
+ if (isChildOfEditor || isChildOfSurface || shouldPreserveRemixInlineDropdownFocus || view.hasFocus()) {
1139
1140
  return false;
1140
1141
  }
1141
1142
  api === null || api === void 0 || (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute(function (_ref6) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "17.1.5",
3
+ "version": "17.2.0",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/primitives": "^22.4.0",
56
56
  "@atlaskit/section-message": "^10.1.0",
57
57
  "@atlaskit/theme": "^28.1.0",
58
- "@atlaskit/tmp-editor-statsig": "^164.0.0",
58
+ "@atlaskit/tmp-editor-statsig": "^164.1.0",
59
59
  "@atlaskit/tokens": "^16.8.0",
60
60
  "@atlaskit/tooltip": "^24.2.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^120.5.0",
70
+ "@atlaskit/editor-common": "^120.6.0",
71
71
  "react": "^18.2.0 || ^19.2.0",
72
72
  "react-dom": "^18.2.0 || ^19.2.0",
73
73
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"