@atlaskit/editor-plugin-block-controls 1.10.5 → 1.10.7

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.
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
- import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
6
+ import { useCallback, useEffect, useRef, useState } from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { bind } from 'bind-event-listener';
@@ -278,12 +278,9 @@ var DragHandleInternal = function DragHandleInternal(_ref) {
278
278
  display: 'none'
279
279
  }),
280
280
  _useState6 = _slicedToArray(_useState5, 2),
281
- newPositionStyles = _useState6[0],
282
- setNewPositionStyles = _useState6[1];
281
+ positionStyles = _useState6[0],
282
+ setPositionStyles = _useState6[1];
283
283
  useEffect(function () {
284
- if (!fg('platform_editor_element_drag_and_drop_ed_23896')) {
285
- return;
286
- }
287
284
  var cleanUpTransitionListener;
288
285
  if (nodeType === 'extension' || nodeType === 'embedCard') {
289
286
  var dom = view.dom.querySelector("[data-drag-handler-anchor-name=\"".concat(anchorName, "\"]"));
@@ -293,12 +290,12 @@ var DragHandleInternal = function DragHandleInternal(_ref) {
293
290
  cleanUpTransitionListener = bind(dom, {
294
291
  type: 'transitionend',
295
292
  listener: function listener() {
296
- setNewPositionStyles(calculatePosition());
293
+ setPositionStyles(calculatePosition());
297
294
  }
298
295
  });
299
296
  }
300
297
  var calcPos = requestAnimationFrame(function () {
301
- setNewPositionStyles(calculatePosition());
298
+ setPositionStyles(calculatePosition());
302
299
  });
303
300
  return function () {
304
301
  var _cleanUpTransitionLis;
@@ -306,12 +303,6 @@ var DragHandleInternal = function DragHandleInternal(_ref) {
306
303
  (_cleanUpTransitionLis = cleanUpTransitionListener) === null || _cleanUpTransitionLis === void 0 || _cleanUpTransitionLis();
307
304
  };
308
305
  }, [calculatePosition, view.dom, anchorName, nodeType]);
309
- var positionStyles = useMemo(function () {
310
- if (fg('platform_editor_element_drag_and_drop_ed_23896')) {
311
- return newPositionStyles;
312
- }
313
- return calculatePosition();
314
- }, [calculatePosition, newPositionStyles]);
315
306
  useEffect(function () {
316
307
  if (handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && buttonRef.current && fg('platform_editor_element_drag_and_drop_ed_23873')) {
317
308
  var id = requestAnimationFrame(function () {
@@ -345,7 +336,7 @@ var DragHandleInternal = function DragHandleInternal(_ref) {
345
336
  ref: buttonRef
346
337
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
347
338
  ,
348
- style: fg('platform_editor_element_drag_and_drop_ed_23896') ? newPositionStyles : positionStyles,
339
+ style: positionStyles,
349
340
  onClick: handleOnClick,
350
341
  onMouseDown: handleMouseDown,
351
342
  onKeyDown: handleKeyDown,
@@ -360,6 +351,7 @@ var DragHandleInternal = function DragHandleInternal(_ref) {
360
351
  content: jsx(TooltipContentWithMultipleShortcuts, {
361
352
  helpDescriptors: helpDescriptors
362
353
  }),
354
+ ignoreTooltipPointerEvents: true,
363
355
  onShow: function onShow() {
364
356
  var _api$accessibilityUti;
365
357
  api === null || api === void 0 || (_api$accessibilityUti = api.accessibilityUtils) === null || _api$accessibilityUti === void 0 || _api$accessibilityUti.actions.ariaNotify(message, {
@@ -8,7 +8,6 @@ import { useEffect, useMemo, useRef, useState } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
- import { fg } from '@atlaskit/platform-feature-flags';
12
11
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
13
12
  import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
14
13
  import { layers } from '@atlaskit/theme/constants';
@@ -46,9 +45,6 @@ var getNodeMargins = function getNodeMargins(node) {
46
45
  return nodeMargins[nodeTypeName] || nodeMargins['default'];
47
46
  };
48
47
  var getDropTargetPositionStyle = function getDropTargetPositionStyle(prevNode, nextNode) {
49
- if (!fg('platform_editor_drag_and_drop_target_gap_fix')) {
50
- return null;
51
- }
52
48
  if (!prevNode || !nextNode) {
53
49
  return null;
54
50
  }
@@ -1,5 +1,5 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
2
  var IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
3
3
  export var isBlocksDragTargetDebug = function isBlocksDragTargetDebug() {
4
- return IS_GEMINI_TEST_ENV && fg('platform_editor_drag_and_drop_target_gap_fix');
4
+ return IS_GEMINI_TEST_ENV && fg('platform_editor_element_drag_and_drop_debug');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "1.10.5",
3
+ "version": "1.10.7",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,8 +31,7 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^40.3.0",
35
- "@atlaskit/editor-common": "^87.4.0",
34
+ "@atlaskit/editor-common": "^87.5.0",
36
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
37
36
  "@atlaskit/editor-plugin-analytics": "^1.6.0",
38
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.2.0",
@@ -48,7 +47,7 @@
48
47
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
49
48
  "@atlaskit/theme": "^12.11.0",
50
49
  "@atlaskit/tokens": "^1.57.0",
51
- "@atlaskit/tooltip": "^18.5.0",
50
+ "@atlaskit/tooltip": "^18.6.0",
52
51
  "@babel/runtime": "^7.0.0",
53
52
  "@emotion/react": "^11.7.1",
54
53
  "bind-event-listener": "^3.0.0",
@@ -105,9 +104,6 @@
105
104
  "platform_editor_elements_drag_and_drop_ed_24000": {
106
105
  "type": "boolean"
107
106
  },
108
- "platform.editor.elements.drag-and-drop-ed-23816": {
109
- "type": "boolean"
110
- },
111
107
  "platform_editor_elements_drag_and_drop_ed_23189": {
112
108
  "type": "boolean"
113
109
  },
@@ -123,35 +119,23 @@
123
119
  "platform_editor_element_drag_and_drop_ed_24049": {
124
120
  "type": "boolean"
125
121
  },
126
- "platform_editor_element_drag_and_drop_ed_23896": {
127
- "type": "boolean"
128
- },
129
122
  "platform_editor_element_controls_chrome_input_fix": {
130
123
  "type": "boolean"
131
124
  },
132
- "platform_editor_drag_and_drop_target_gap_fix": {
133
- "type": "boolean"
134
- },
135
- "platform_editor_element_drag_and_drop_ed_24150": {
136
- "type": "boolean"
137
- },
138
125
  "platform_editor_element_drag_and_drop_ed_24321": {
139
126
  "type": "boolean"
140
127
  },
141
- "platform_editor_element_drag_and_drop_ed_24330": {
142
- "type": "boolean"
143
- },
144
128
  "platform_editor_element_drag_and_drop_ed_24227": {
145
129
  "type": "boolean"
146
130
  },
147
- "platform_editor_element_drag_and_drop_ed_24372": {
148
- "type": "boolean"
149
- },
150
131
  "platform_editor_elements_dnd_nested": {
151
132
  "type": "boolean"
152
133
  },
153
134
  "platform_editor_element_drag_and_drop_ed_24304": {
154
135
  "type": "boolean"
136
+ },
137
+ "platform_editor_element_drag_and_drop_debug": {
138
+ "type": "boolean"
155
139
  }
156
140
  }
157
141
  }