@atlaskit/editor-plugin-block-controls 1.4.26 → 1.4.28

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,29 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 1.4.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [#113750](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113750)
8
+ [`f0bb95b1231d8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f0bb95b1231d8) -
9
+ [ux] Fix drag handle pos for block and embed card nodes
10
+ - [#114031](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114031)
11
+ [`a9de475bcf1f7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a9de475bcf1f7) -
12
+ Highlight whole node when selecting decistion list via drag handle
13
+ - Updated dependencies
14
+
15
+ ## 1.4.27
16
+
17
+ ### Patch Changes
18
+
19
+ - [#113232](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113232)
20
+ [`0a1d7a1348305`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0a1d7a1348305) -
21
+ [ux] Fix drag previews when media is nested in the node
22
+ - [#113423](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113423)
23
+ [`e22e9f7eadce7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e22e9f7eadce7) -
24
+ Fix text spliting when deleting paragraph
25
+ - Updated dependencies
26
+
3
27
  ## 1.4.26
4
28
 
5
29
  ### Patch Changes
@@ -113,6 +113,8 @@ var mouseMoveWrapperDecorations = exports.mouseMoveWrapperDecorations = function
113
113
  var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDecoration(pos, anchorName, nodeType, api) {
114
114
  return _view.Decoration.widget(pos, function (view, getPos) {
115
115
  var element = document.createElement('div');
116
+ // Need to set it to inline to avoid text being split when merging two paragraphs
117
+ element.style.display = 'inline';
116
118
  element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
117
119
  element.setAttribute('data-blocks-drag-handle-container', 'true');
118
120
  _reactDom.default.render( /*#__PURE__*/(0, _react.createElement)(_dragHandle.DragHandle, {
@@ -248,15 +248,23 @@ var createPlugin = exports.createPlugin = function createPlugin(api) {
248
248
  var dom = editorView.dom;
249
249
 
250
250
  // Use ResizeObserver to observe height changes
251
- var resizeObserver = new ResizeObserver((0, _rafSchd.default)(function () {
252
- var editorHeight = dom.offsetHeight;
251
+ var resizeObserver = new ResizeObserver((0, _rafSchd.default)(function (entries) {
252
+ var editorHeight = entries[0].contentBoxSize[0].blockSize;
253
253
 
254
254
  // Update the plugin state when the height changes
255
255
  var pluginState = key.getState(editorView.state);
256
256
  if (!(pluginState !== null && pluginState !== void 0 && pluginState.isDragging)) {
257
- editorView.dispatch(editorView.state.tr.setMeta(key, {
258
- editorHeight: editorHeight
259
- }));
257
+ var isResizerResizing = !!dom.querySelector('.is-resizing');
258
+ var transaction = editorView.state.tr;
259
+ if ((pluginState === null || pluginState === void 0 ? void 0 : pluginState.isResizerResizing) !== isResizerResizing) {
260
+ transaction.setMeta('is-resizer-resizing', isResizerResizing);
261
+ }
262
+ if (!isResizerResizing) {
263
+ transaction.setMeta(key, {
264
+ editorHeight: editorHeight
265
+ });
266
+ }
267
+ editorView.dispatch(transaction);
260
268
  }
261
269
  }));
262
270
 
@@ -3,10 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.dragHandleGap = exports.DRAG_HANDLE_WIDTH = exports.DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_BORDER_RADIUS = void 0;
6
+ exports.dragHandleGap = exports.DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_WIDTH = exports.DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_BORDER_RADIUS = void 0;
7
+ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
7
8
  var DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_HEIGHT = 24;
8
9
  var DRAG_HANDLE_WIDTH = exports.DRAG_HANDLE_WIDTH = 12;
9
10
  var DRAG_HANDLE_BORDER_RADIUS = exports.DRAG_HANDLE_BORDER_RADIUS = 4;
11
+ var DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_ZINDEX = _editorSharedStyles.akRichMediaResizeZIndex + _editorSharedStyles.akEditorUnitZIndex; //place above legacy resizer
12
+
10
13
  var nodeTypeExcludeList = ['embedCard', 'mediaSingle', 'table'];
11
14
  var dragHandleGap = exports.dragHandleGap = function dragHandleGap(nodeType) {
12
15
  if (nodeTypeExcludeList.includes(nodeType)) {
@@ -40,7 +40,8 @@ var dragHandleButtonStyles = (0, _react2.css)({
40
40
  borderRadius: _consts.DRAG_HANDLE_BORDER_RADIUS,
41
41
  color: "var(--ds-icon, #44546F)",
42
42
  cursor: 'grab',
43
- zIndex: 2,
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
+ zIndex: _consts.DRAG_HANDLE_ZINDEX,
44
45
  '&:hover': {
45
46
  backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
46
47
  },
@@ -60,12 +61,33 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
60
61
  nodeType = _ref.nodeType;
61
62
  var start = getPos();
62
63
  var buttonRef = (0, _react.useRef)(null);
63
- var _useState = (0, _react.useState)(false),
64
+ var _useState = (0, _react.useState)(768),
64
65
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
65
- dragHandleSelected = _useState2[0],
66
- setDragHandleSelected = _useState2[1];
66
+ blockCardWidth = _useState2[0],
67
+ setBlockCardWidth = _useState2[1];
68
+ var _useState3 = (0, _react.useState)(false),
69
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
70
+ dragHandleSelected = _useState4[0],
71
+ setDragHandleSelected = _useState4[1];
67
72
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['featureFlags']),
68
73
  featureFlagsState = _useSharedPluginState.featureFlagsState;
74
+ (0, _react.useEffect)(function () {
75
+ // blockCard/datasource width is rendered correctly after this decoraton does. We need to observe for changes.
76
+ if (nodeType === 'blockCard') {
77
+ var dom = view.dom.querySelector("[data-drag-handler-anchor-name=\"".concat(anchorName, "\"]"));
78
+ var container = dom === null || dom === void 0 ? void 0 : dom.querySelector('.datasourceView-content-inner-wrap');
79
+ if (container) {
80
+ var resizeObserver = new ResizeObserver(function (entries) {
81
+ var width = entries[0].contentBoxSize[0].inlineSize;
82
+ setBlockCardWidth(width);
83
+ });
84
+ resizeObserver.observe(container);
85
+ return function () {
86
+ return resizeObserver.unobserve(container);
87
+ };
88
+ }
89
+ }
90
+ }, [anchorName, nodeType, view.dom]);
69
91
  var handleOnClick = (0, _react.useCallback)(function () {
70
92
  var _api$core, _api$core2;
71
93
  setDragHandleSelected(!dragHandleSelected);
@@ -156,17 +178,31 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
156
178
  api === null || api === void 0 || (_api$core6 = api.core) === null || _api$core6 === void 0 || _api$core6.actions.focus();
157
179
  }
158
180
  });
159
- }, [api, start, view, anchorName, nodeType]);
181
+ }, [anchorName, api, nodeType, view, start]);
160
182
  var macroInteractionUpdates = featureFlagsState === null || featureFlagsState === void 0 ? void 0 : featureFlagsState.macroInteractionUpdates;
161
183
  var positionStyles = (0, _react.useMemo)(function () {
162
184
  var supportsAnchor = CSS.supports('top', "anchor(".concat(anchorName, " start)")) && CSS.supports('left', "anchor(".concat(anchorName, " start)"));
163
185
  var dom = view.dom.querySelector("[data-drag-handler-anchor-name=\"".concat(anchorName, "\"]"));
164
- var hasResizer = anchorName.includes('table') || anchorName.includes('mediaSingle');
165
- var isExtension = anchorName.includes('extension') || anchorName.includes('bodiedExtension');
166
- var innerContainer = dom ? hasResizer ? dom.querySelector('.resizer-item') : isExtension ? dom.querySelector('.extension-container[data-layout]') : null : null;
186
+ var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
187
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension';
188
+ var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
189
+ var isEmbedCard = nodeType === 'embedCard';
190
+ var innerContainer = null;
191
+ if (dom) {
192
+ if (isEmbedCard) {
193
+ innerContainer = dom.querySelector('.rich-media-item');
194
+ } else if (hasResizer) {
195
+ innerContainer = dom.querySelector('.resizer-item');
196
+ } else if (isExtension) {
197
+ innerContainer = dom.querySelector('.extension-container[data-layout]');
198
+ } else if (isBlockCard) {
199
+ //specific to datasource blockCard
200
+ innerContainer = dom.querySelector('.datasourceView-content-inner-wrap');
201
+ }
202
+ }
167
203
  if (supportsAnchor) {
168
204
  return {
169
- left: hasResizer || isExtension ? (0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, macroInteractionUpdates) : "calc(anchor(".concat(anchorName, " start) - ").concat(_consts.DRAG_HANDLE_WIDTH, "px - ").concat((0, _consts.dragHandleGap)(nodeType), "px)"),
205
+ left: hasResizer || isExtension || isBlockCard || isEmbedCard ? (0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, macroInteractionUpdates) : "calc(anchor(".concat(anchorName, " start) - ").concat(_consts.DRAG_HANDLE_WIDTH, "px - ").concat((0, _consts.dragHandleGap)(nodeType), "px)"),
170
206
  top: anchorName.includes('table') ? "calc(anchor(".concat(anchorName, " start) + ").concat(_consts.DRAG_HANDLE_HEIGHT, "px)") : "anchor(".concat(anchorName, " start)")
171
207
  };
172
208
  }
@@ -174,7 +210,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
174
210
  left: (0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, macroInteractionUpdates),
175
211
  top: (0, _dragHandlePositions.getTopPosition)(dom)
176
212
  };
177
- }, [anchorName, view, nodeType, macroInteractionUpdates]);
213
+ }, [anchorName, nodeType, view, blockCardWidth, macroInteractionUpdates]);
178
214
  return (0, _react2.jsx)("button", {
179
215
  type: "button",
180
216
  css: [dragHandleButtonStyles, dragHandleSelected && selectedStyles],
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.dragPreview = void 0;
7
- //
7
+ var _colors = require("@atlaskit/theme/colors");
8
8
  var previewStyle = {
9
- borderColor: "var(--ds-border-focused, #388BFF)",
9
+ borderColor: "var(--ds-border-focused, ".concat(_colors.B200, ")"),
10
10
  borderStyle: 'solid',
11
- borderRadius: "var(--ds-border-radius-100, 4px)",
11
+ borderRadius: "var(--ds-border-radius-100, 3px)",
12
12
  borderWidth: "var(--ds-border-width-outline, 2px)",
13
13
  backgroundColor: "var(--ds-blanket-selected, #388BFF14)"
14
14
  };
@@ -21,23 +21,26 @@ var dragPreview = exports.dragPreview = function dragPreview(container, dom, nod
21
21
  // ProseMirror class is required to make sure the cloned dom is styled correctly
22
22
  parent.classList.add('ProseMirror');
23
23
  var shouldBeGenericPreview = nodeType === 'embedCard' || nodeType === 'extension';
24
- if (shouldBeGenericPreview) {
24
+ var embedCard = dom.querySelector('.embedCardView-content-wrap');
25
+ if (shouldBeGenericPreview || embedCard) {
25
26
  parent.style.border = "".concat(previewStyle.borderWidth, " ").concat(previewStyle.borderStyle, " ").concat(previewStyle.borderColor);
26
27
  parent.style.borderRadius = previewStyle.borderRadius;
27
28
  parent.style.backgroundColor = previewStyle.backgroundColor;
28
29
  parent.style.height = '100%';
29
30
  parent.setAttribute('data-testid', 'block-ctrl-generic-drag-preview');
30
- }
31
- var resizer = dom.querySelector('.resizer-item');
32
- var clonedDom = resizer ? resizer.cloneNode(true) : dom.cloneNode(!shouldBeGenericPreview);
31
+ } else {
32
+ var resizer = dom.querySelector('.resizer-item');
33
+ var clonedDom = resizer && ['mediaSingle', 'table'].includes(nodeType) ? resizer.cloneNode(true) : dom.cloneNode(true);
33
34
 
34
- // Remove any margin from the cloned element to ensure is doesn't position incorrectly
35
- clonedDom.style.marginLeft = '0';
36
- clonedDom.style.marginTop = '0';
37
- clonedDom.style.marginRight = '0';
38
- clonedDom.style.marginBottom = '0';
39
- clonedDom.style.opacity = '0.4';
40
- parent.appendChild(clonedDom);
35
+ // Remove any margin from the cloned element to ensure is doesn't position incorrectly
36
+ clonedDom.style.marginLeft = '0';
37
+ clonedDom.style.marginTop = '0';
38
+ clonedDom.style.marginRight = '0';
39
+ clonedDom.style.marginBottom = '0';
40
+ clonedDom.style.opacity = '0.4';
41
+ clonedDom.style.boxShadow = 'none';
42
+ parent.appendChild(clonedDom);
43
+ }
41
44
  container.appendChild(parent);
42
45
  var scrollParent = document.querySelector('.fabric-editor-popup-scroll-parent');
43
46
  var scrollParentClassNames = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.className;
@@ -10,6 +10,7 @@ var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _bindEventListener = require("bind-event-listener");
12
12
  var _dragHandlePositions = require("../utils/drag-handle-positions");
13
+ var _consts = require("./consts");
13
14
  /** @jsx jsx */
14
15
 
15
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -22,7 +23,8 @@ var basicStyles = (0, _react2.css)({
22
23
  zIndex: -1
23
24
  });
24
25
  var mouseMoveWrapperStyles = (0, _react2.css)({
25
- zIndex: 1
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
+ zIndex: _consts.DRAG_HANDLE_ZINDEX
26
28
  });
27
29
  var MouseMoveWrapper = exports.MouseMoveWrapper = function MouseMoveWrapper(_ref) {
28
30
  var view = _ref.view,
@@ -11,7 +11,9 @@ var getSelection = exports.getSelection = function getSelection(tr, start) {
11
11
  var isNodeSelection = node && _state.NodeSelection.isSelectable(node);
12
12
  var nodeSize = node ? node.nodeSize : 1;
13
13
  var $startPos = tr.doc.resolve(start);
14
- if (isNodeSelection) {
14
+
15
+ // decisionList node is not selectable, but we want to select the whole node not just text
16
+ if (isNodeSelection || (node === null || node === void 0 ? void 0 : node.type.name) === 'decisionList') {
15
17
  return new _state.NodeSelection($startPos);
16
18
  } else {
17
19
  // To trigger the annotation floating toolbar for non-selectable node, we need to select inline nodes
@@ -106,6 +106,8 @@ export const mouseMoveWrapperDecorations = (newState, api) => {
106
106
  export const dragHandleDecoration = (pos, anchorName, nodeType, api) => {
107
107
  return Decoration.widget(pos, (view, getPos) => {
108
108
  const element = document.createElement('div');
109
+ // Need to set it to inline to avoid text being split when merging two paragraphs
110
+ element.style.display = 'inline';
109
111
  element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
110
112
  element.setAttribute('data-blocks-drag-handle-container', 'true');
111
113
  ReactDOM.render( /*#__PURE__*/createElement(DragHandle, {
@@ -243,15 +243,23 @@ export const createPlugin = api => {
243
243
  const dom = editorView.dom;
244
244
 
245
245
  // Use ResizeObserver to observe height changes
246
- const resizeObserver = new ResizeObserver(rafSchedule(() => {
247
- const editorHeight = dom.offsetHeight;
246
+ const resizeObserver = new ResizeObserver(rafSchedule(entries => {
247
+ const editorHeight = entries[0].contentBoxSize[0].blockSize;
248
248
 
249
249
  // Update the plugin state when the height changes
250
250
  const pluginState = key.getState(editorView.state);
251
251
  if (!(pluginState !== null && pluginState !== void 0 && pluginState.isDragging)) {
252
- editorView.dispatch(editorView.state.tr.setMeta(key, {
253
- editorHeight
254
- }));
252
+ const isResizerResizing = !!dom.querySelector('.is-resizing');
253
+ const transaction = editorView.state.tr;
254
+ if ((pluginState === null || pluginState === void 0 ? void 0 : pluginState.isResizerResizing) !== isResizerResizing) {
255
+ transaction.setMeta('is-resizer-resizing', isResizerResizing);
256
+ }
257
+ if (!isResizerResizing) {
258
+ transaction.setMeta(key, {
259
+ editorHeight
260
+ });
261
+ }
262
+ editorView.dispatch(transaction);
255
263
  }
256
264
  }));
257
265
 
@@ -1,6 +1,9 @@
1
+ import { akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
1
2
  export const DRAG_HANDLE_HEIGHT = 24;
2
3
  export const DRAG_HANDLE_WIDTH = 12;
3
4
  export const DRAG_HANDLE_BORDER_RADIUS = 4;
5
+ export const DRAG_HANDLE_ZINDEX = akRichMediaResizeZIndex + akEditorUnitZIndex; //place above legacy resizer
6
+
4
7
  const nodeTypeExcludeList = ['embedCard', 'mediaSingle', 'table'];
5
8
  export const dragHandleGap = nodeType => {
6
9
  if (nodeTypeExcludeList.includes(nodeType)) {
@@ -11,7 +11,7 @@ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/el
11
11
  import { key } from '../pm-plugins/main';
12
12
  import { selectNode } from '../utils';
13
13
  import { getLeftPosition, getTopPosition } from '../utils/drag-handle-positions';
14
- import { DRAG_HANDLE_BORDER_RADIUS, DRAG_HANDLE_HEIGHT, DRAG_HANDLE_WIDTH, dragHandleGap } from './consts';
14
+ import { DRAG_HANDLE_BORDER_RADIUS, DRAG_HANDLE_HEIGHT, DRAG_HANDLE_WIDTH, DRAG_HANDLE_ZINDEX, dragHandleGap } from './consts';
15
15
  import { dragPreview } from './drag-preview';
16
16
  const dragHandleButtonStyles = css({
17
17
  position: 'absolute',
@@ -31,7 +31,8 @@ const dragHandleButtonStyles = css({
31
31
  borderRadius: DRAG_HANDLE_BORDER_RADIUS,
32
32
  color: "var(--ds-icon, #44546F)",
33
33
  cursor: 'grab',
34
- zIndex: 2,
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
35
+ zIndex: DRAG_HANDLE_ZINDEX,
35
36
  '&:hover': {
36
37
  backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
37
38
  },
@@ -52,10 +53,26 @@ export const DragHandle = ({
52
53
  }) => {
53
54
  const start = getPos();
54
55
  const buttonRef = useRef(null);
56
+ const [blockCardWidth, setBlockCardWidth] = useState(768);
55
57
  const [dragHandleSelected, setDragHandleSelected] = useState(false);
56
58
  const {
57
59
  featureFlagsState
58
60
  } = useSharedPluginState(api, ['featureFlags']);
61
+ useEffect(() => {
62
+ // blockCard/datasource width is rendered correctly after this decoraton does. We need to observe for changes.
63
+ if (nodeType === 'blockCard') {
64
+ const dom = view.dom.querySelector(`[data-drag-handler-anchor-name="${anchorName}"]`);
65
+ const container = dom === null || dom === void 0 ? void 0 : dom.querySelector('.datasourceView-content-inner-wrap');
66
+ if (container) {
67
+ const resizeObserver = new ResizeObserver(entries => {
68
+ const width = entries[0].contentBoxSize[0].inlineSize;
69
+ setBlockCardWidth(width);
70
+ });
71
+ resizeObserver.observe(container);
72
+ return () => resizeObserver.unobserve(container);
73
+ }
74
+ }
75
+ }, [anchorName, nodeType, view.dom]);
59
76
  const handleOnClick = useCallback(() => {
60
77
  var _api$core, _api$core2;
61
78
  setDragHandleSelected(!dragHandleSelected);
@@ -149,17 +166,31 @@ export const DragHandle = ({
149
166
  api === null || api === void 0 ? void 0 : (_api$core6 = api.core) === null || _api$core6 === void 0 ? void 0 : _api$core6.actions.focus();
150
167
  }
151
168
  });
152
- }, [api, start, view, anchorName, nodeType]);
169
+ }, [anchorName, api, nodeType, view, start]);
153
170
  const macroInteractionUpdates = featureFlagsState === null || featureFlagsState === void 0 ? void 0 : featureFlagsState.macroInteractionUpdates;
154
171
  const positionStyles = useMemo(() => {
155
172
  const supportsAnchor = CSS.supports('top', `anchor(${anchorName} start)`) && CSS.supports('left', `anchor(${anchorName} start)`);
156
173
  const dom = view.dom.querySelector(`[data-drag-handler-anchor-name="${anchorName}"]`);
157
- const hasResizer = anchorName.includes('table') || anchorName.includes('mediaSingle');
158
- const isExtension = anchorName.includes('extension') || anchorName.includes('bodiedExtension');
159
- const innerContainer = dom ? hasResizer ? dom.querySelector('.resizer-item') : isExtension ? dom.querySelector('.extension-container[data-layout]') : null : null;
174
+ const hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
175
+ const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension';
176
+ const isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
177
+ const isEmbedCard = nodeType === 'embedCard';
178
+ let innerContainer = null;
179
+ if (dom) {
180
+ if (isEmbedCard) {
181
+ innerContainer = dom.querySelector('.rich-media-item');
182
+ } else if (hasResizer) {
183
+ innerContainer = dom.querySelector('.resizer-item');
184
+ } else if (isExtension) {
185
+ innerContainer = dom.querySelector('.extension-container[data-layout]');
186
+ } else if (isBlockCard) {
187
+ //specific to datasource blockCard
188
+ innerContainer = dom.querySelector('.datasourceView-content-inner-wrap');
189
+ }
190
+ }
160
191
  if (supportsAnchor) {
161
192
  return {
162
- left: hasResizer || isExtension ? getLeftPosition(dom, nodeType, innerContainer, macroInteractionUpdates) : `calc(anchor(${anchorName} start) - ${DRAG_HANDLE_WIDTH}px - ${dragHandleGap(nodeType)}px)`,
193
+ left: hasResizer || isExtension || isBlockCard || isEmbedCard ? getLeftPosition(dom, nodeType, innerContainer, macroInteractionUpdates) : `calc(anchor(${anchorName} start) - ${DRAG_HANDLE_WIDTH}px - ${dragHandleGap(nodeType)}px)`,
163
194
  top: anchorName.includes('table') ? `calc(anchor(${anchorName} start) + ${DRAG_HANDLE_HEIGHT}px)` : `anchor(${anchorName} start)`
164
195
  };
165
196
  }
@@ -167,7 +198,7 @@ export const DragHandle = ({
167
198
  left: getLeftPosition(dom, nodeType, innerContainer, macroInteractionUpdates),
168
199
  top: getTopPosition(dom)
169
200
  };
170
- }, [anchorName, view, nodeType, macroInteractionUpdates]);
201
+ }, [anchorName, nodeType, view, blockCardWidth, macroInteractionUpdates]);
171
202
  return jsx("button", {
172
203
  type: "button",
173
204
  css: [dragHandleButtonStyles, dragHandleSelected && selectedStyles],
@@ -1,8 +1,8 @@
1
- //
1
+ import { B200 } from '@atlaskit/theme/colors';
2
2
  const previewStyle = {
3
- borderColor: "var(--ds-border-focused, #388BFF)",
3
+ borderColor: `var(--ds-border-focused, ${B200})`,
4
4
  borderStyle: 'solid',
5
- borderRadius: "var(--ds-border-radius-100, 4px)",
5
+ borderRadius: "var(--ds-border-radius-100, 3px)",
6
6
  borderWidth: "var(--ds-border-width-outline, 2px)",
7
7
  backgroundColor: "var(--ds-blanket-selected, #388BFF14)"
8
8
  };
@@ -15,23 +15,26 @@ export const dragPreview = (container, dom, nodeType) => {
15
15
  // ProseMirror class is required to make sure the cloned dom is styled correctly
16
16
  parent.classList.add('ProseMirror');
17
17
  const shouldBeGenericPreview = nodeType === 'embedCard' || nodeType === 'extension';
18
- if (shouldBeGenericPreview) {
18
+ const embedCard = dom.querySelector('.embedCardView-content-wrap');
19
+ if (shouldBeGenericPreview || embedCard) {
19
20
  parent.style.border = `${previewStyle.borderWidth} ${previewStyle.borderStyle} ${previewStyle.borderColor}`;
20
21
  parent.style.borderRadius = previewStyle.borderRadius;
21
22
  parent.style.backgroundColor = previewStyle.backgroundColor;
22
23
  parent.style.height = '100%';
23
24
  parent.setAttribute('data-testid', 'block-ctrl-generic-drag-preview');
24
- }
25
- const resizer = dom.querySelector('.resizer-item');
26
- const clonedDom = resizer ? resizer.cloneNode(true) : dom.cloneNode(!shouldBeGenericPreview);
25
+ } else {
26
+ const resizer = dom.querySelector('.resizer-item');
27
+ const clonedDom = resizer && ['mediaSingle', 'table'].includes(nodeType) ? resizer.cloneNode(true) : dom.cloneNode(true);
27
28
 
28
- // Remove any margin from the cloned element to ensure is doesn't position incorrectly
29
- clonedDom.style.marginLeft = '0';
30
- clonedDom.style.marginTop = '0';
31
- clonedDom.style.marginRight = '0';
32
- clonedDom.style.marginBottom = '0';
33
- clonedDom.style.opacity = '0.4';
34
- parent.appendChild(clonedDom);
29
+ // Remove any margin from the cloned element to ensure is doesn't position incorrectly
30
+ clonedDom.style.marginLeft = '0';
31
+ clonedDom.style.marginTop = '0';
32
+ clonedDom.style.marginRight = '0';
33
+ clonedDom.style.marginBottom = '0';
34
+ clonedDom.style.opacity = '0.4';
35
+ clonedDom.style.boxShadow = 'none';
36
+ parent.appendChild(clonedDom);
37
+ }
35
38
  container.appendChild(parent);
36
39
  const scrollParent = document.querySelector('.fabric-editor-popup-scroll-parent');
37
40
  const scrollParentClassNames = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.className;
@@ -5,6 +5,7 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { bind } from 'bind-event-listener';
7
7
  import { getTopPosition } from '../utils/drag-handle-positions';
8
+ import { DRAG_HANDLE_ZINDEX } from './consts';
8
9
  const basicStyles = css({
9
10
  position: 'absolute',
10
11
  width: '100%',
@@ -13,7 +14,8 @@ const basicStyles = css({
13
14
  zIndex: -1
14
15
  });
15
16
  const mouseMoveWrapperStyles = css({
16
- zIndex: 1
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
+ zIndex: DRAG_HANDLE_ZINDEX
17
19
  });
18
20
  export const MouseMoveWrapper = ({
19
21
  view,
@@ -5,7 +5,9 @@ export const getSelection = (tr, start) => {
5
5
  const isNodeSelection = node && NodeSelection.isSelectable(node);
6
6
  const nodeSize = node ? node.nodeSize : 1;
7
7
  const $startPos = tr.doc.resolve(start);
8
- if (isNodeSelection) {
8
+
9
+ // decisionList node is not selectable, but we want to select the whole node not just text
10
+ if (isNodeSelection || (node === null || node === void 0 ? void 0 : node.type.name) === 'decisionList') {
9
11
  return new NodeSelection($startPos);
10
12
  } else {
11
13
  // To trigger the annotation floating toolbar for non-selectable node, we need to select inline nodes
@@ -106,6 +106,8 @@ export var mouseMoveWrapperDecorations = function mouseMoveWrapperDecorations(ne
106
106
  export var dragHandleDecoration = function dragHandleDecoration(pos, anchorName, nodeType, api) {
107
107
  return Decoration.widget(pos, function (view, getPos) {
108
108
  var element = document.createElement('div');
109
+ // Need to set it to inline to avoid text being split when merging two paragraphs
110
+ element.style.display = 'inline';
109
111
  element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
110
112
  element.setAttribute('data-blocks-drag-handle-container', 'true');
111
113
  ReactDOM.render( /*#__PURE__*/createElement(DragHandle, {
@@ -241,15 +241,23 @@ export var createPlugin = function createPlugin(api) {
241
241
  var dom = editorView.dom;
242
242
 
243
243
  // Use ResizeObserver to observe height changes
244
- var resizeObserver = new ResizeObserver(rafSchedule(function () {
245
- var editorHeight = dom.offsetHeight;
244
+ var resizeObserver = new ResizeObserver(rafSchedule(function (entries) {
245
+ var editorHeight = entries[0].contentBoxSize[0].blockSize;
246
246
 
247
247
  // Update the plugin state when the height changes
248
248
  var pluginState = key.getState(editorView.state);
249
249
  if (!(pluginState !== null && pluginState !== void 0 && pluginState.isDragging)) {
250
- editorView.dispatch(editorView.state.tr.setMeta(key, {
251
- editorHeight: editorHeight
252
- }));
250
+ var isResizerResizing = !!dom.querySelector('.is-resizing');
251
+ var transaction = editorView.state.tr;
252
+ if ((pluginState === null || pluginState === void 0 ? void 0 : pluginState.isResizerResizing) !== isResizerResizing) {
253
+ transaction.setMeta('is-resizer-resizing', isResizerResizing);
254
+ }
255
+ if (!isResizerResizing) {
256
+ transaction.setMeta(key, {
257
+ editorHeight: editorHeight
258
+ });
259
+ }
260
+ editorView.dispatch(transaction);
253
261
  }
254
262
  }));
255
263
 
@@ -1,6 +1,9 @@
1
+ import { akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
1
2
  export var DRAG_HANDLE_HEIGHT = 24;
2
3
  export var DRAG_HANDLE_WIDTH = 12;
3
4
  export var DRAG_HANDLE_BORDER_RADIUS = 4;
5
+ export var DRAG_HANDLE_ZINDEX = akRichMediaResizeZIndex + akEditorUnitZIndex; //place above legacy resizer
6
+
4
7
  var nodeTypeExcludeList = ['embedCard', 'mediaSingle', 'table'];
5
8
  export var dragHandleGap = function dragHandleGap(nodeType) {
6
9
  if (nodeTypeExcludeList.includes(nodeType)) {
@@ -12,7 +12,7 @@ import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/el
12
12
  import { key } from '../pm-plugins/main';
13
13
  import { selectNode } from '../utils';
14
14
  import { getLeftPosition, getTopPosition } from '../utils/drag-handle-positions';
15
- import { DRAG_HANDLE_BORDER_RADIUS, DRAG_HANDLE_HEIGHT, DRAG_HANDLE_WIDTH, dragHandleGap } from './consts';
15
+ import { DRAG_HANDLE_BORDER_RADIUS, DRAG_HANDLE_HEIGHT, DRAG_HANDLE_WIDTH, DRAG_HANDLE_ZINDEX, dragHandleGap } from './consts';
16
16
  import { dragPreview } from './drag-preview';
17
17
  var dragHandleButtonStyles = css({
18
18
  position: 'absolute',
@@ -32,7 +32,8 @@ var dragHandleButtonStyles = css({
32
32
  borderRadius: DRAG_HANDLE_BORDER_RADIUS,
33
33
  color: "var(--ds-icon, #44546F)",
34
34
  cursor: 'grab',
35
- zIndex: 2,
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
36
+ zIndex: DRAG_HANDLE_ZINDEX,
36
37
  '&:hover': {
37
38
  backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
38
39
  },
@@ -52,12 +53,33 @@ export var DragHandle = function DragHandle(_ref) {
52
53
  nodeType = _ref.nodeType;
53
54
  var start = getPos();
54
55
  var buttonRef = useRef(null);
55
- var _useState = useState(false),
56
+ var _useState = useState(768),
56
57
  _useState2 = _slicedToArray(_useState, 2),
57
- dragHandleSelected = _useState2[0],
58
- setDragHandleSelected = _useState2[1];
58
+ blockCardWidth = _useState2[0],
59
+ setBlockCardWidth = _useState2[1];
60
+ var _useState3 = useState(false),
61
+ _useState4 = _slicedToArray(_useState3, 2),
62
+ dragHandleSelected = _useState4[0],
63
+ setDragHandleSelected = _useState4[1];
59
64
  var _useSharedPluginState = useSharedPluginState(api, ['featureFlags']),
60
65
  featureFlagsState = _useSharedPluginState.featureFlagsState;
66
+ useEffect(function () {
67
+ // blockCard/datasource width is rendered correctly after this decoraton does. We need to observe for changes.
68
+ if (nodeType === 'blockCard') {
69
+ var dom = view.dom.querySelector("[data-drag-handler-anchor-name=\"".concat(anchorName, "\"]"));
70
+ var container = dom === null || dom === void 0 ? void 0 : dom.querySelector('.datasourceView-content-inner-wrap');
71
+ if (container) {
72
+ var resizeObserver = new ResizeObserver(function (entries) {
73
+ var width = entries[0].contentBoxSize[0].inlineSize;
74
+ setBlockCardWidth(width);
75
+ });
76
+ resizeObserver.observe(container);
77
+ return function () {
78
+ return resizeObserver.unobserve(container);
79
+ };
80
+ }
81
+ }
82
+ }, [anchorName, nodeType, view.dom]);
61
83
  var handleOnClick = useCallback(function () {
62
84
  var _api$core, _api$core2;
63
85
  setDragHandleSelected(!dragHandleSelected);
@@ -148,17 +170,31 @@ export var DragHandle = function DragHandle(_ref) {
148
170
  api === null || api === void 0 || (_api$core6 = api.core) === null || _api$core6 === void 0 || _api$core6.actions.focus();
149
171
  }
150
172
  });
151
- }, [api, start, view, anchorName, nodeType]);
173
+ }, [anchorName, api, nodeType, view, start]);
152
174
  var macroInteractionUpdates = featureFlagsState === null || featureFlagsState === void 0 ? void 0 : featureFlagsState.macroInteractionUpdates;
153
175
  var positionStyles = useMemo(function () {
154
176
  var supportsAnchor = CSS.supports('top', "anchor(".concat(anchorName, " start)")) && CSS.supports('left', "anchor(".concat(anchorName, " start)"));
155
177
  var dom = view.dom.querySelector("[data-drag-handler-anchor-name=\"".concat(anchorName, "\"]"));
156
- var hasResizer = anchorName.includes('table') || anchorName.includes('mediaSingle');
157
- var isExtension = anchorName.includes('extension') || anchorName.includes('bodiedExtension');
158
- var innerContainer = dom ? hasResizer ? dom.querySelector('.resizer-item') : isExtension ? dom.querySelector('.extension-container[data-layout]') : null : null;
178
+ var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
179
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension';
180
+ var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
181
+ var isEmbedCard = nodeType === 'embedCard';
182
+ var innerContainer = null;
183
+ if (dom) {
184
+ if (isEmbedCard) {
185
+ innerContainer = dom.querySelector('.rich-media-item');
186
+ } else if (hasResizer) {
187
+ innerContainer = dom.querySelector('.resizer-item');
188
+ } else if (isExtension) {
189
+ innerContainer = dom.querySelector('.extension-container[data-layout]');
190
+ } else if (isBlockCard) {
191
+ //specific to datasource blockCard
192
+ innerContainer = dom.querySelector('.datasourceView-content-inner-wrap');
193
+ }
194
+ }
159
195
  if (supportsAnchor) {
160
196
  return {
161
- left: hasResizer || isExtension ? getLeftPosition(dom, nodeType, innerContainer, macroInteractionUpdates) : "calc(anchor(".concat(anchorName, " start) - ").concat(DRAG_HANDLE_WIDTH, "px - ").concat(dragHandleGap(nodeType), "px)"),
197
+ left: hasResizer || isExtension || isBlockCard || isEmbedCard ? getLeftPosition(dom, nodeType, innerContainer, macroInteractionUpdates) : "calc(anchor(".concat(anchorName, " start) - ").concat(DRAG_HANDLE_WIDTH, "px - ").concat(dragHandleGap(nodeType), "px)"),
162
198
  top: anchorName.includes('table') ? "calc(anchor(".concat(anchorName, " start) + ").concat(DRAG_HANDLE_HEIGHT, "px)") : "anchor(".concat(anchorName, " start)")
163
199
  };
164
200
  }
@@ -166,7 +202,7 @@ export var DragHandle = function DragHandle(_ref) {
166
202
  left: getLeftPosition(dom, nodeType, innerContainer, macroInteractionUpdates),
167
203
  top: getTopPosition(dom)
168
204
  };
169
- }, [anchorName, view, nodeType, macroInteractionUpdates]);
205
+ }, [anchorName, nodeType, view, blockCardWidth, macroInteractionUpdates]);
170
206
  return jsx("button", {
171
207
  type: "button",
172
208
  css: [dragHandleButtonStyles, dragHandleSelected && selectedStyles],
@@ -1,8 +1,8 @@
1
- //
1
+ import { B200 } from '@atlaskit/theme/colors';
2
2
  var previewStyle = {
3
- borderColor: "var(--ds-border-focused, #388BFF)",
3
+ borderColor: "var(--ds-border-focused, ".concat(B200, ")"),
4
4
  borderStyle: 'solid',
5
- borderRadius: "var(--ds-border-radius-100, 4px)",
5
+ borderRadius: "var(--ds-border-radius-100, 3px)",
6
6
  borderWidth: "var(--ds-border-width-outline, 2px)",
7
7
  backgroundColor: "var(--ds-blanket-selected, #388BFF14)"
8
8
  };
@@ -15,23 +15,26 @@ export var dragPreview = function dragPreview(container, dom, nodeType) {
15
15
  // ProseMirror class is required to make sure the cloned dom is styled correctly
16
16
  parent.classList.add('ProseMirror');
17
17
  var shouldBeGenericPreview = nodeType === 'embedCard' || nodeType === 'extension';
18
- if (shouldBeGenericPreview) {
18
+ var embedCard = dom.querySelector('.embedCardView-content-wrap');
19
+ if (shouldBeGenericPreview || embedCard) {
19
20
  parent.style.border = "".concat(previewStyle.borderWidth, " ").concat(previewStyle.borderStyle, " ").concat(previewStyle.borderColor);
20
21
  parent.style.borderRadius = previewStyle.borderRadius;
21
22
  parent.style.backgroundColor = previewStyle.backgroundColor;
22
23
  parent.style.height = '100%';
23
24
  parent.setAttribute('data-testid', 'block-ctrl-generic-drag-preview');
24
- }
25
- var resizer = dom.querySelector('.resizer-item');
26
- var clonedDom = resizer ? resizer.cloneNode(true) : dom.cloneNode(!shouldBeGenericPreview);
25
+ } else {
26
+ var resizer = dom.querySelector('.resizer-item');
27
+ var clonedDom = resizer && ['mediaSingle', 'table'].includes(nodeType) ? resizer.cloneNode(true) : dom.cloneNode(true);
27
28
 
28
- // Remove any margin from the cloned element to ensure is doesn't position incorrectly
29
- clonedDom.style.marginLeft = '0';
30
- clonedDom.style.marginTop = '0';
31
- clonedDom.style.marginRight = '0';
32
- clonedDom.style.marginBottom = '0';
33
- clonedDom.style.opacity = '0.4';
34
- parent.appendChild(clonedDom);
29
+ // Remove any margin from the cloned element to ensure is doesn't position incorrectly
30
+ clonedDom.style.marginLeft = '0';
31
+ clonedDom.style.marginTop = '0';
32
+ clonedDom.style.marginRight = '0';
33
+ clonedDom.style.marginBottom = '0';
34
+ clonedDom.style.opacity = '0.4';
35
+ clonedDom.style.boxShadow = 'none';
36
+ parent.appendChild(clonedDom);
37
+ }
35
38
  container.appendChild(parent);
36
39
  var scrollParent = document.querySelector('.fabric-editor-popup-scroll-parent');
37
40
  var scrollParentClassNames = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.className;
@@ -6,6 +6,7 @@ import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { bind } from 'bind-event-listener';
8
8
  import { getTopPosition } from '../utils/drag-handle-positions';
9
+ import { DRAG_HANDLE_ZINDEX } from './consts';
9
10
  var basicStyles = css({
10
11
  position: 'absolute',
11
12
  width: '100%',
@@ -14,7 +15,8 @@ var basicStyles = css({
14
15
  zIndex: -1
15
16
  });
16
17
  var mouseMoveWrapperStyles = css({
17
- zIndex: 1
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
+ zIndex: DRAG_HANDLE_ZINDEX
18
20
  });
19
21
  export var MouseMoveWrapper = function MouseMoveWrapper(_ref) {
20
22
  var view = _ref.view,
@@ -5,7 +5,9 @@ export var getSelection = function getSelection(tr, start) {
5
5
  var isNodeSelection = node && NodeSelection.isSelectable(node);
6
6
  var nodeSize = node ? node.nodeSize : 1;
7
7
  var $startPos = tr.doc.resolve(start);
8
- if (isNodeSelection) {
8
+
9
+ // decisionList node is not selectable, but we want to select the whole node not just text
10
+ if (isNodeSelection || (node === null || node === void 0 ? void 0 : node.type.name) === 'decisionList') {
9
11
  return new NodeSelection($startPos);
10
12
  } else {
11
13
  // To trigger the annotation floating toolbar for non-selectable node, we need to select inline nodes
@@ -1,4 +1,5 @@
1
1
  export declare const DRAG_HANDLE_HEIGHT = 24;
2
2
  export declare const DRAG_HANDLE_WIDTH = 12;
3
3
  export declare const DRAG_HANDLE_BORDER_RADIUS = 4;
4
+ export declare const DRAG_HANDLE_ZINDEX: number;
4
5
  export declare const dragHandleGap: (nodeType: string) => 12 | 8;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { type EditorView } from '@atlaskit/editor-prosemirror/dist/types/view';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { BlockControlsPlugin } from '../types';
5
5
  export declare const DragHandle: ({ view, api, getPos, anchorName, nodeType, }: {
6
6
  view: EditorView;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { type EditorView } from '@atlaskit/editor-prosemirror/dist/types/view';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { BlockControlsPlugin } from '../types';
5
5
  export declare const MouseMoveWrapper: ({ view, api, anchorName, nodeType, getPos, }: {
6
6
  view: EditorView;
@@ -1,4 +1,5 @@
1
1
  export declare const DRAG_HANDLE_HEIGHT = 24;
2
2
  export declare const DRAG_HANDLE_WIDTH = 12;
3
3
  export declare const DRAG_HANDLE_BORDER_RADIUS = 4;
4
+ export declare const DRAG_HANDLE_ZINDEX: number;
4
5
  export declare const dragHandleGap: (nodeType: string) => 12 | 8;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { type EditorView } from '@atlaskit/editor-prosemirror/dist/types/view';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { BlockControlsPlugin } from '../types';
5
5
  export declare const DragHandle: ({ view, api, getPos, anchorName, nodeType, }: {
6
6
  view: EditorView;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from '@emotion/react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import { type EditorView } from '@atlaskit/editor-prosemirror/dist/types/view';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { BlockControlsPlugin } from '../types';
5
5
  export declare const MouseMoveWrapper: ({ view, api, anchorName, nodeType, getPos, }: {
6
6
  view: EditorView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,20 +31,22 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^36.10.7",
35
- "@atlaskit/editor-common": "^82.10.0",
36
- "@atlaskit/editor-plugin-analytics": "^1.2.3",
34
+ "@atlaskit/adf-schema": "^37.0.0",
35
+ "@atlaskit/editor-common": "^82.12.0",
36
+ "@atlaskit/editor-plugin-analytics": "^1.3.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.5",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
39
39
  "@atlaskit/editor-plugin-width": "^1.1.0",
40
40
  "@atlaskit/editor-prosemirror": "4.0.1",
41
+ "@atlaskit/editor-shared-styles": "^2.12.0",
41
42
  "@atlaskit/editor-tables": "^2.7.0",
42
43
  "@atlaskit/icon": "^22.4.0",
43
44
  "@atlaskit/platform-feature-flags": "^0.2.0",
44
45
  "@atlaskit/pragmatic-drag-and-drop": "^1.1.0",
45
46
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.3.0",
46
47
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
47
- "@atlaskit/tokens": "^1.51.0",
48
+ "@atlaskit/theme": "^12.11.0",
49
+ "@atlaskit/tokens": "^1.53.0",
48
50
  "@babel/runtime": "^7.0.0",
49
51
  "@emotion/react": "^11.7.1",
50
52
  "bind-event-listener": "^3.0.0",