@atlaskit/editor-plugin-block-controls 13.2.6 → 13.2.8

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/blockControlsPlugin.js +7 -1
  3. package/dist/cjs/editor-commands/move-node.js +17 -2
  4. package/dist/cjs/pm-plugins/decorations-drop-target-active.js +1 -2
  5. package/dist/cjs/pm-plugins/decorations-drop-target.js +1 -2
  6. package/dist/cjs/pm-plugins/quick-insert-calculate-position.js +2 -2
  7. package/dist/cjs/pm-plugins/utils/drag-handle-positions.js +2 -2
  8. package/dist/cjs/ui/consts.js +2 -2
  9. package/dist/cjs/ui/drag-handle.js +1 -1
  10. package/dist/cjs/ui/inline-drop-target.js +1 -2
  11. package/dist/cjs/ui/quick-insert-button.js +1 -1
  12. package/dist/es2019/blockControlsPlugin.js +7 -1
  13. package/dist/es2019/editor-commands/move-node.js +18 -3
  14. package/dist/es2019/pm-plugins/decorations-drop-target-active.js +1 -2
  15. package/dist/es2019/pm-plugins/decorations-drop-target.js +1 -2
  16. package/dist/es2019/pm-plugins/quick-insert-calculate-position.js +2 -2
  17. package/dist/es2019/pm-plugins/utils/drag-handle-positions.js +2 -2
  18. package/dist/es2019/ui/consts.js +2 -2
  19. package/dist/es2019/ui/drag-handle.js +1 -1
  20. package/dist/es2019/ui/inline-drop-target.js +1 -2
  21. package/dist/es2019/ui/quick-insert-button.js +1 -1
  22. package/dist/esm/blockControlsPlugin.js +7 -1
  23. package/dist/esm/editor-commands/move-node.js +17 -2
  24. package/dist/esm/pm-plugins/decorations-drop-target-active.js +1 -2
  25. package/dist/esm/pm-plugins/decorations-drop-target.js +1 -2
  26. package/dist/esm/pm-plugins/quick-insert-calculate-position.js +2 -2
  27. package/dist/esm/pm-plugins/utils/drag-handle-positions.js +2 -2
  28. package/dist/esm/ui/consts.js +2 -2
  29. package/dist/esm/ui/drag-handle.js +1 -1
  30. package/dist/esm/ui/inline-drop-target.js +1 -2
  31. package/dist/esm/ui/quick-insert-button.js +1 -1
  32. package/package.json +3 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 13.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a3bbfab896310`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a3bbfab896310) -
8
+ Replace feature gate `confluence_frontend_native_tabs_extension` with experiment
9
+ `confluence_native_tabs_experiment` using `expValEquals` from
10
+ `@atlaskit/tmp-editor-statsig/exp-val-equals`. Usage:
11
+ `expValEquals('confluence_native_tabs_experiment', 'isEnabled', true)`.
12
+ - Updated dependencies
13
+
14
+ ## 13.2.7
15
+
16
+ ### Patch Changes
17
+
18
+ - [`d86bd1324d82b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d86bd1324d82b) -
19
+ Fix table cell selection when moving a table with the keyboard shortcut behind the
20
+ `platform_editor_fix_table_move_shortcut` experiment.
21
+ - Updated dependencies
22
+
3
23
  ## 13.2.6
4
24
 
5
25
  ### Patch Changes
@@ -333,10 +333,16 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
333
333
  var $from = $expandedAnchor.min($expandedHead);
334
334
  var $to = $expandedAnchor.max($expandedHead);
335
335
  var expandedNormalisedSel;
336
- if ($from.nodeAfter === $to.nodeBefore) {
336
+ if ((0, _expValEquals.expValEquals)('platform_editor_fix_table_move_shortcut', 'isEnabled', true) && $from.nodeAfter && $from.nodeAfter === $to.nodeBefore) {
337
+ // Single node
338
+ (0, _getSelection.selectNode)(tr, $from.pos, $from.nodeAfter.type.name, api);
339
+ expandedNormalisedSel = tr.selection;
340
+ } else if ($from.nodeAfter === $to.nodeBefore) {
341
+ // Single node
337
342
  (0, _getSelection.selectNode)(tr, $from.pos, $expandedAnchor.node().type.name, api);
338
343
  expandedNormalisedSel = tr.selection;
339
344
  } else if (((_$to$nodeBefore = $to.nodeBefore) === null || _$to$nodeBefore === void 0 ? void 0 : _$to$nodeBefore.type.name) === 'mediaSingle' || ((_$from$nodeAfter = $from.nodeAfter) === null || _$from$nodeAfter === void 0 ? void 0 : _$from$nodeAfter.type.name) === 'mediaSingle') {
345
+ // Media
340
346
  expandedNormalisedSel = new _state.TextSelection($expandedAnchor, $expandedHead);
341
347
  tr.setSelection(expandedNormalisedSel);
342
348
  } else {
@@ -178,11 +178,26 @@ var moveNodeViaShortcut = exports.moveNodeViaShortcut = function moveNodeViaShor
178
178
  var LAYOUT_COL_DEPTH = 3;
179
179
  hoistedPos = state.doc.resolve(from).before(LAYOUT_COL_DEPTH);
180
180
  }
181
- var currentNodePos = !getFocusedHandle(state) && !selection.empty ? hoistedPos !== null && hoistedPos !== void 0 ? hoistedPos : from : getCurrentNodePos(state);
181
+ var table = (0, _expValEquals.expValEquals)('platform_editor_fix_table_move_shortcut', 'isEnabled', true) && (0, _utils3.isTableSelected)(selection) ? (0, _utils3.findTable)(selection) : undefined;
182
+ var currentNodePos;
183
+ if (table) {
184
+ currentNodePos = table.pos;
185
+ } else if (!getFocusedHandle(state) && !selection.empty) {
186
+ currentNodePos = hoistedPos !== null && hoistedPos !== void 0 ? hoistedPos : from;
187
+ } else {
188
+ currentNodePos = getCurrentNodePos(state);
189
+ }
182
190
  if (currentNodePos > -1) {
183
191
  var _state$doc$nodeAt;
184
192
  var $currentNodePos = state.doc.resolve(currentNodePos);
185
- var nodeAfterPos = !getFocusedHandle(state) ? Math.max(expandedAnchor, expandedHead) : $currentNodePos.posAtIndex($currentNodePos.index() + 1);
193
+ var nodeAfterPos;
194
+ if (table) {
195
+ nodeAfterPos = table.pos + table.node.nodeSize;
196
+ } else if (!getFocusedHandle(state)) {
197
+ nodeAfterPos = Math.max(expandedAnchor, expandedHead);
198
+ } else {
199
+ nodeAfterPos = $currentNodePos.posAtIndex($currentNodePos.index() + 1);
200
+ }
186
201
  var isTopLevelNode = $currentNodePos.depth === 0;
187
202
  var moveToPos = -1;
188
203
  var isLayoutColumnSelected = selection instanceof _state.NodeSelection && selection.node.type.name === 'layoutColumn';
@@ -11,7 +11,6 @@ var _selection = require("@atlaskit/editor-common/selection");
11
11
  var _utils = require("@atlaskit/editor-common/utils");
12
12
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
13
13
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
15
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
16
  var _decorationsCommon = require("./decorations-common");
@@ -31,7 +30,7 @@ var PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutC
31
30
  var NODE_WITH_NO_PARENT_POS = ['tableCell', 'tableHeader', 'layoutColumn'];
32
31
  var UNSUPPORTED_LAYOUT_CONTENT = ['syncBlock', 'bodiedSyncBlock'];
33
32
  var getContainerNodeTypes = (0, _memoizeOne.default)(function () {
34
- return [].concat(PARENT_WITH_END_DROP_TARGET, (0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
33
+ return [].concat(PARENT_WITH_END_DROP_TARGET, (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
35
34
  });
36
35
  var isContainerNode = function isContainerNode(node) {
37
36
  var nodeName = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _nodeTypeUtils.getBaseNodeTypeName)(node.type) : node.type.name;
@@ -14,7 +14,6 @@ var _selection = require("@atlaskit/editor-common/selection");
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
16
16
  var _view = require("@atlaskit/editor-prosemirror/view");
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
17
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
20
19
  var _consts = require("../ui/consts");
@@ -29,7 +28,7 @@ var IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'lis
29
28
  var PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
30
29
  var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
31
30
  var getParentTypesWithEndDropTarget = (0, _memoizeOne.default)(function () {
32
- return [].concat(PARENT_WITH_END_DROP_TARGET, (0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
31
+ return [].concat(PARENT_WITH_END_DROP_TARGET, (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []), (0, _toConsumableArray2.default)((0, _experiments.editorExperiment)('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
33
32
  });
34
33
  var shouldDescend = function shouldDescend(node) {
35
34
  return !['mediaSingle', 'paragraph', 'heading'].includes(node.type.name);
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.calculatePosition = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
10
  var _consts = require("../ui/consts");
11
11
  var _anchorName = require("../ui/utils/anchor-name");
12
12
  var _domAttrName = require("../ui/utils/dom-attr-name");
@@ -35,7 +35,7 @@ var calculatePosition = exports.calculatePosition = function calculatePosition(_
35
35
  });
36
36
  var dom = view.dom.querySelector("[".concat((0, _domAttrName.getAnchorAttrName)(), "=\"").concat(safeAnchorName, "\"]"));
37
37
  var hasResizer = rootNodeType === 'table' || rootNodeType === 'mediaSingle';
38
- var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension');
38
+ var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && (0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true);
39
39
  var isBlockCard = rootNodeType === 'blockCard';
40
40
  var isEmbedCard = rootNodeType === 'embedCard';
41
41
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -8,7 +8,7 @@ exports.shouldMaskNodeControls = exports.shouldBeSticky = exports.getTopPosition
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
10
10
  var _styles = require("@atlaskit/editor-common/styles");
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
12
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
13
  var _consts = require("../../ui/consts");
14
14
  var STICKY_NODES = ['panel', 'table', 'expand', 'layoutSection', 'bodiedExtension'];
@@ -64,7 +64,7 @@ var getNodeHeight = exports.getNodeHeight = function getNodeHeight(dom, anchor,
64
64
  return (anchorRectCache === null || anchorRectCache === void 0 ? void 0 : anchorRectCache.getHeight(anchor)) || (dom === null || dom === void 0 ? void 0 : dom.offsetHeight);
65
65
  };
66
66
  var getStickyNodes = (0, _memoizeOne.default)(function () {
67
- return [].concat(STICKY_NODES, (0, _toConsumableArray2.default)((0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []));
67
+ return [].concat(STICKY_NODES, (0, _toConsumableArray2.default)((0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []));
68
68
  });
69
69
  var shouldBeSticky = exports.shouldBeSticky = function shouldBeSticky(nodeType) {
70
70
  return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && getStickyNodes().includes(nodeType);
@@ -10,7 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _utils = require("@atlaskit/editor-common/utils");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
14
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
15
15
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
16
  var _dropTargetMarginMap;
@@ -98,7 +98,7 @@ var getNestedNodeLeftPaddingMargin = exports.getNestedNodeLeftPaddingMargin = fu
98
98
  case 'bodiedExtension':
99
99
  return '28px';
100
100
  case 'multiBodiedExtension':
101
- if ((0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension')) {
101
+ if ((0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true)) {
102
102
  return '28px';
103
103
  }
104
104
  return "".concat(_styles.DRAG_HANDLE_WIDTH + DRAG_HANDLE_NARROW_GAP, "px");
@@ -873,7 +873,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
873
873
  };
874
874
  }
875
875
  var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
876
- var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension');
876
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && (0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true);
877
877
  var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
878
878
  var isEmbedCard = nodeType === 'embedCard';
879
879
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -10,7 +10,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = require("react");
11
11
  var _react2 = require("@emotion/react");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box");
15
14
  var _adapter = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
16
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -84,7 +83,7 @@ var getWidthOffset = function getWidthOffset(node, width, position) {
84
83
  return isLeftPosition ? "0.5*(var(--ak-editor--line-length) - ".concat(width, ")") : "-0.5*(var(--ak-editor--line-length) - ".concat(width, ")");
85
84
  }
86
85
  }
87
- if (node.type.name === 'bodiedExtension' || node.type.name === 'extension' || node.type.name === 'multiBodiedExtension' && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension')) {
86
+ if (node.type.name === 'bodiedExtension' || node.type.name === 'extension' || node.type.name === 'multiBodiedExtension' && (0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true)) {
88
87
  return '-12px';
89
88
  }
90
89
  };
@@ -199,7 +199,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
199
199
  };
200
200
  }
201
201
  var hasResizer = rootNodeType === 'table' || rootNodeType === 'mediaSingle';
202
- var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension');
202
+ var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && (0, _expValEquals.expValEquals)('confluence_native_tabs_experiment', 'isEnabled', true);
203
203
  var isBlockCard = rootNodeType === 'blockCard';
204
204
  var isEmbedCard = rootNodeType === 'embedCard';
205
205
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -326,10 +326,16 @@ export const blockControlsPlugin = ({
326
326
  const $from = $expandedAnchor.min($expandedHead);
327
327
  const $to = $expandedAnchor.max($expandedHead);
328
328
  let expandedNormalisedSel;
329
- if ($from.nodeAfter === $to.nodeBefore) {
329
+ if (expValEquals('platform_editor_fix_table_move_shortcut', 'isEnabled', true) && $from.nodeAfter && $from.nodeAfter === $to.nodeBefore) {
330
+ // Single node
331
+ selectNode(tr, $from.pos, $from.nodeAfter.type.name, api);
332
+ expandedNormalisedSel = tr.selection;
333
+ } else if ($from.nodeAfter === $to.nodeBefore) {
334
+ // Single node
330
335
  selectNode(tr, $from.pos, $expandedAnchor.node().type.name, api);
331
336
  expandedNormalisedSel = tr.selection;
332
337
  } else if (((_$to$nodeBefore = $to.nodeBefore) === null || _$to$nodeBefore === void 0 ? void 0 : _$to$nodeBefore.type.name) === 'mediaSingle' || ((_$from$nodeAfter = $from.nodeAfter) === null || _$from$nodeAfter === void 0 ? void 0 : _$from$nodeAfter.type.name) === 'mediaSingle') {
338
+ // Media
333
339
  expandedNormalisedSel = new TextSelection($expandedAnchor, $expandedHead);
334
340
  tr.setSelection(expandedNormalisedSel);
335
341
  } else {
@@ -161,7 +161,6 @@ const getFocusedHandle = state => {
161
161
  };
162
162
  export const moveNodeViaShortcut = (api, direction, formatMessage) => {
163
163
  return state => {
164
- var _hoistedPos;
165
164
  const {
166
165
  selection
167
166
  } = state;
@@ -176,11 +175,27 @@ export const moveNodeViaShortcut = (api, direction, formatMessage) => {
176
175
  const LAYOUT_COL_DEPTH = 3;
177
176
  hoistedPos = state.doc.resolve(from).before(LAYOUT_COL_DEPTH);
178
177
  }
179
- const currentNodePos = !getFocusedHandle(state) && !selection.empty ? (_hoistedPos = hoistedPos) !== null && _hoistedPos !== void 0 ? _hoistedPos : from : getCurrentNodePos(state);
178
+ const table = expValEquals('platform_editor_fix_table_move_shortcut', 'isEnabled', true) && isTableSelected(selection) ? findTable(selection) : undefined;
179
+ let currentNodePos;
180
+ if (table) {
181
+ currentNodePos = table.pos;
182
+ } else if (!getFocusedHandle(state) && !selection.empty) {
183
+ var _hoistedPos;
184
+ currentNodePos = (_hoistedPos = hoistedPos) !== null && _hoistedPos !== void 0 ? _hoistedPos : from;
185
+ } else {
186
+ currentNodePos = getCurrentNodePos(state);
187
+ }
180
188
  if (currentNodePos > -1) {
181
189
  var _state$doc$nodeAt;
182
190
  const $currentNodePos = state.doc.resolve(currentNodePos);
183
- const nodeAfterPos = !getFocusedHandle(state) ? Math.max(expandedAnchor, expandedHead) : $currentNodePos.posAtIndex($currentNodePos.index() + 1);
191
+ let nodeAfterPos;
192
+ if (table) {
193
+ nodeAfterPos = table.pos + table.node.nodeSize;
194
+ } else if (!getFocusedHandle(state)) {
195
+ nodeAfterPos = Math.max(expandedAnchor, expandedHead);
196
+ } else {
197
+ nodeAfterPos = $currentNodePos.posAtIndex($currentNodePos.index() + 1);
198
+ }
184
199
  const isTopLevelNode = $currentNodePos.depth === 0;
185
200
  let moveToPos = -1;
186
201
  const isLayoutColumnSelected = selection instanceof NodeSelection && selection.node.type.name === 'layoutColumn';
@@ -3,7 +3,6 @@ import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
3
3
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
4
4
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
5
5
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
8
  import { getNodeAnchor } from './decorations-common';
@@ -23,7 +22,7 @@ const PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layou
23
22
  */
24
23
  const NODE_WITH_NO_PARENT_POS = ['tableCell', 'tableHeader', 'layoutColumn'];
25
24
  const UNSUPPORTED_LAYOUT_CONTENT = ['syncBlock', 'bodiedSyncBlock'];
26
- const getContainerNodeTypes = memoizeOne(() => [...PARENT_WITH_END_DROP_TARGET, ...(fg('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []), ...(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : [])]);
25
+ const getContainerNodeTypes = memoizeOne(() => [...PARENT_WITH_END_DROP_TARGET, ...(expValEquals('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []), ...(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : [])]);
27
26
  const isContainerNode = node => {
28
27
  const nodeName = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? getBaseNodeTypeName(node.type) : node.type.name;
29
28
  return getContainerNodeTypes().includes(nodeName);
@@ -6,7 +6,6 @@ import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
6
6
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
7
7
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
8
8
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
10
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
11
  import { nodeMargins } from '../ui/consts';
@@ -18,7 +17,7 @@ import { canMoveNodeToIndex, canMoveSliceToIndex, isInSameLayout } from './utils
18
17
  const IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'listItem', 'caption'];
19
18
  const PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
20
19
  const DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
21
- const getParentTypesWithEndDropTarget = memoizeOne(() => [...PARENT_WITH_END_DROP_TARGET, ...(fg('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []), ...(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : [])]);
20
+ const getParentTypesWithEndDropTarget = memoizeOne(() => [...PARENT_WITH_END_DROP_TARGET, ...(expValEquals('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []), ...(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : [])]);
22
21
  const shouldDescend = node => {
23
22
  return !['mediaSingle', 'paragraph', 'heading'].includes(node.type.name);
24
23
  };
@@ -1,4 +1,4 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
1
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
2
  import { rootElementGap, topPositionAdjustment, QUICK_INSERT_DIMENSIONS, QUICK_INSERT_LEFT_OFFSET } from '../ui/consts';
3
3
  import { refreshAnchorName } from '../ui/utils/anchor-name';
4
4
  import { getAnchorAttrName } from '../ui/utils/dom-attr-name';
@@ -27,7 +27,7 @@ export const calculatePosition = ({
27
27
  });
28
28
  const dom = view.dom.querySelector(`[${getAnchorAttrName()}="${safeAnchorName}"]`);
29
29
  const hasResizer = rootNodeType === 'table' || rootNodeType === 'mediaSingle';
30
- const isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension');
30
+ const isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true);
31
31
  const isBlockCard = rootNodeType === 'blockCard';
32
32
  const isEmbedCard = rootNodeType === 'embedCard';
33
33
  const isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -1,6 +1,6 @@
1
1
  import memoizeOne from 'memoize-one';
2
2
  import { DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles';
3
- import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
5
  import { DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT, DRAG_HANDLE_H1_TOP_ADJUSTMENT, DRAG_HANDLE_H2_TOP_ADJUSTMENT, DRAG_HANDLE_H4_TOP_ADJUSTMENT, DRAG_HANDLE_H5_TOP_ADJUSTMENT, DRAG_HANDLE_H6_TOP_ADJUSTMENT, DRAG_HANDLE_HEIGHT, DRAG_HANDLE_PARAGRAPH_SMALL_TOP_ADJUSTMENT, DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT, dragHandleGap } from '../../ui/consts';
6
6
  const STICKY_NODES = ['panel', 'table', 'expand', 'layoutSection', 'bodiedExtension'];
@@ -53,7 +53,7 @@ export const getLeftPosition = (dom, type, innerContainer, macroInteractionUpdat
53
53
 
54
54
  // anchorRectCache seems to have a 100% cache miss rate
55
55
  export const getNodeHeight = (dom, anchor, anchorRectCache) => (anchorRectCache === null || anchorRectCache === void 0 ? void 0 : anchorRectCache.getHeight(anchor)) || (dom === null || dom === void 0 ? void 0 : dom.offsetHeight);
56
- const getStickyNodes = memoizeOne(() => [...STICKY_NODES, ...(fg('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : [])]);
56
+ const getStickyNodes = memoizeOne(() => [...STICKY_NODES, ...(expValEquals('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : [])]);
57
57
  export const shouldBeSticky = nodeType => {
58
58
  return editorExperiment('platform_editor_controls', 'variant1') && getStickyNodes().includes(nodeType);
59
59
  };
@@ -1,7 +1,7 @@
1
1
  import { DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles';
2
2
  import { breakoutResizableNodes as breakoutResizableNodesNew } from '@atlaskit/editor-common/utils';
3
3
  import { akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
5
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
7
  export const ACTIVE_DRAG_HANDLE_ATTR = 'data-active-drag-handle';
@@ -88,7 +88,7 @@ export const getNestedNodeLeftPaddingMargin = nodeType => {
88
88
  case 'bodiedExtension':
89
89
  return '28px';
90
90
  case 'multiBodiedExtension':
91
- if (fg('confluence_frontend_native_tabs_extension')) {
91
+ if (expValEquals('confluence_native_tabs_experiment', 'isEnabled', true)) {
92
92
  return '28px';
93
93
  }
94
94
  return `${DRAG_HANDLE_WIDTH + DRAG_HANDLE_NARROW_GAP}px`;
@@ -851,7 +851,7 @@ export const DragHandle = ({
851
851
  };
852
852
  }
853
853
  const hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
854
- const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension');
854
+ const isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true);
855
855
  const isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
856
856
  const isEmbedCard = nodeType === 'embedCard';
857
857
  const isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -8,7 +8,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
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 { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -73,7 +72,7 @@ const getWidthOffset = (node, width, position) => {
73
72
  return isLeftPosition ? `0.5*(var(--ak-editor--line-length) - ${width})` : `-0.5*(var(--ak-editor--line-length) - ${width})`;
74
73
  }
75
74
  }
76
- if (node.type.name === 'bodiedExtension' || node.type.name === 'extension' || node.type.name === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension')) {
75
+ if (node.type.name === 'bodiedExtension' || node.type.name === 'extension' || node.type.name === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true)) {
77
76
  return '-12px';
78
77
  }
79
78
  };
@@ -188,7 +188,7 @@ export const TypeAheadControl = ({
188
188
  };
189
189
  }
190
190
  const hasResizer = rootNodeType === 'table' || rootNodeType === 'mediaSingle';
191
- const isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension');
191
+ const isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true);
192
192
  const isBlockCard = rootNodeType === 'blockCard';
193
193
  const isEmbedCard = rootNodeType === 'embedCard';
194
194
  const isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -326,10 +326,16 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
326
326
  var $from = $expandedAnchor.min($expandedHead);
327
327
  var $to = $expandedAnchor.max($expandedHead);
328
328
  var expandedNormalisedSel;
329
- if ($from.nodeAfter === $to.nodeBefore) {
329
+ if (expValEquals('platform_editor_fix_table_move_shortcut', 'isEnabled', true) && $from.nodeAfter && $from.nodeAfter === $to.nodeBefore) {
330
+ // Single node
331
+ selectNode(tr, $from.pos, $from.nodeAfter.type.name, api);
332
+ expandedNormalisedSel = tr.selection;
333
+ } else if ($from.nodeAfter === $to.nodeBefore) {
334
+ // Single node
330
335
  selectNode(tr, $from.pos, $expandedAnchor.node().type.name, api);
331
336
  expandedNormalisedSel = tr.selection;
332
337
  } else if (((_$to$nodeBefore = $to.nodeBefore) === null || _$to$nodeBefore === void 0 ? void 0 : _$to$nodeBefore.type.name) === 'mediaSingle' || ((_$from$nodeAfter = $from.nodeAfter) === null || _$from$nodeAfter === void 0 ? void 0 : _$from$nodeAfter.type.name) === 'mediaSingle') {
338
+ // Media
333
339
  expandedNormalisedSel = new TextSelection($expandedAnchor, $expandedHead);
334
340
  tr.setSelection(expandedNormalisedSel);
335
341
  } else {
@@ -172,11 +172,26 @@ export var moveNodeViaShortcut = function moveNodeViaShortcut(api, direction, fo
172
172
  var LAYOUT_COL_DEPTH = 3;
173
173
  hoistedPos = state.doc.resolve(from).before(LAYOUT_COL_DEPTH);
174
174
  }
175
- var currentNodePos = !getFocusedHandle(state) && !selection.empty ? hoistedPos !== null && hoistedPos !== void 0 ? hoistedPos : from : getCurrentNodePos(state);
175
+ var table = expValEquals('platform_editor_fix_table_move_shortcut', 'isEnabled', true) && isTableSelected(selection) ? findTable(selection) : undefined;
176
+ var currentNodePos;
177
+ if (table) {
178
+ currentNodePos = table.pos;
179
+ } else if (!getFocusedHandle(state) && !selection.empty) {
180
+ currentNodePos = hoistedPos !== null && hoistedPos !== void 0 ? hoistedPos : from;
181
+ } else {
182
+ currentNodePos = getCurrentNodePos(state);
183
+ }
176
184
  if (currentNodePos > -1) {
177
185
  var _state$doc$nodeAt;
178
186
  var $currentNodePos = state.doc.resolve(currentNodePos);
179
- var nodeAfterPos = !getFocusedHandle(state) ? Math.max(expandedAnchor, expandedHead) : $currentNodePos.posAtIndex($currentNodePos.index() + 1);
187
+ var nodeAfterPos;
188
+ if (table) {
189
+ nodeAfterPos = table.pos + table.node.nodeSize;
190
+ } else if (!getFocusedHandle(state)) {
191
+ nodeAfterPos = Math.max(expandedAnchor, expandedHead);
192
+ } else {
193
+ nodeAfterPos = $currentNodePos.posAtIndex($currentNodePos.index() + 1);
194
+ }
180
195
  var isTopLevelNode = $currentNodePos.depth === 0;
181
196
  var moveToPos = -1;
182
197
  var isLayoutColumnSelected = selection instanceof NodeSelection && selection.node.type.name === 'layoutColumn';
@@ -4,7 +4,6 @@ import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
4
4
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
5
5
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
6
6
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
9
  import { getNodeAnchor } from './decorations-common';
@@ -25,7 +24,7 @@ var PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutC
25
24
  var NODE_WITH_NO_PARENT_POS = ['tableCell', 'tableHeader', 'layoutColumn'];
26
25
  var UNSUPPORTED_LAYOUT_CONTENT = ['syncBlock', 'bodiedSyncBlock'];
27
26
  var getContainerNodeTypes = memoizeOne(function () {
28
- return [].concat(PARENT_WITH_END_DROP_TARGET, _toConsumableArray(fg('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []), _toConsumableArray(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
27
+ return [].concat(PARENT_WITH_END_DROP_TARGET, _toConsumableArray(expValEquals('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []), _toConsumableArray(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
29
28
  });
30
29
  var isContainerNode = function isContainerNode(node) {
31
30
  var nodeName = expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) ? getBaseNodeTypeName(node.type) : node.type.name;
@@ -10,7 +10,6 @@ import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
10
10
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
11
11
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
12
12
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
14
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
16
15
  import { nodeMargins } from '../ui/consts';
@@ -23,7 +22,7 @@ var IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'lis
23
22
  var PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
24
23
  var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
25
24
  var getParentTypesWithEndDropTarget = memoizeOne(function () {
26
- return [].concat(PARENT_WITH_END_DROP_TARGET, _toConsumableArray(fg('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []), _toConsumableArray(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
25
+ return [].concat(PARENT_WITH_END_DROP_TARGET, _toConsumableArray(expValEquals('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []), _toConsumableArray(editorExperiment('platform_synced_block', true) ? ['bodiedSyncBlock'] : []));
27
26
  });
28
27
  var shouldDescend = function shouldDescend(node) {
29
28
  return !['mediaSingle', 'paragraph', 'heading'].includes(node.type.name);
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
5
  import { rootElementGap, topPositionAdjustment, QUICK_INSERT_DIMENSIONS, QUICK_INSERT_LEFT_OFFSET } from '../ui/consts';
6
6
  import { refreshAnchorName } from '../ui/utils/anchor-name';
7
7
  import { getAnchorAttrName } from '../ui/utils/dom-attr-name';
@@ -29,7 +29,7 @@ export var calculatePosition = function calculatePosition(_ref) {
29
29
  });
30
30
  var dom = view.dom.querySelector("[".concat(getAnchorAttrName(), "=\"").concat(safeAnchorName, "\"]"));
31
31
  var hasResizer = rootNodeType === 'table' || rootNodeType === 'mediaSingle';
32
- var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension');
32
+ var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true);
33
33
  var isBlockCard = rootNodeType === 'blockCard';
34
34
  var isEmbedCard = rootNodeType === 'embedCard';
35
35
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import memoizeOne from 'memoize-one';
3
3
  import { DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles';
4
- import { fg } from '@atlaskit/platform-feature-flags';
4
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
6
  import { DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT, DRAG_HANDLE_H1_TOP_ADJUSTMENT, DRAG_HANDLE_H2_TOP_ADJUSTMENT, DRAG_HANDLE_H4_TOP_ADJUSTMENT, DRAG_HANDLE_H5_TOP_ADJUSTMENT, DRAG_HANDLE_H6_TOP_ADJUSTMENT, DRAG_HANDLE_HEIGHT, DRAG_HANDLE_PARAGRAPH_SMALL_TOP_ADJUSTMENT, DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT, dragHandleGap } from '../../ui/consts';
7
7
  var STICKY_NODES = ['panel', 'table', 'expand', 'layoutSection', 'bodiedExtension'];
@@ -57,7 +57,7 @@ export var getNodeHeight = function getNodeHeight(dom, anchor, anchorRectCache)
57
57
  return (anchorRectCache === null || anchorRectCache === void 0 ? void 0 : anchorRectCache.getHeight(anchor)) || (dom === null || dom === void 0 ? void 0 : dom.offsetHeight);
58
58
  };
59
59
  var getStickyNodes = memoizeOne(function () {
60
- return [].concat(STICKY_NODES, _toConsumableArray(fg('confluence_frontend_native_tabs_extension') ? ['multiBodiedExtension'] : []));
60
+ return [].concat(STICKY_NODES, _toConsumableArray(expValEquals('confluence_native_tabs_experiment', 'isEnabled', true) ? ['multiBodiedExtension'] : []));
61
61
  });
62
62
  export var shouldBeSticky = function shouldBeSticky(nodeType) {
63
63
  return editorExperiment('platform_editor_controls', 'variant1') && getStickyNodes().includes(nodeType);
@@ -4,7 +4,7 @@ var _dropTargetMarginMap;
4
4
  import { DRAG_HANDLE_WIDTH } from '@atlaskit/editor-common/styles';
5
5
  import { breakoutResizableNodes as breakoutResizableNodesNew } from '@atlaskit/editor-common/utils';
6
6
  import { akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
7
- import { fg } from '@atlaskit/platform-feature-flags';
7
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
10
  export var ACTIVE_DRAG_HANDLE_ATTR = 'data-active-drag-handle';
@@ -91,7 +91,7 @@ export var getNestedNodeLeftPaddingMargin = function getNestedNodeLeftPaddingMar
91
91
  case 'bodiedExtension':
92
92
  return '28px';
93
93
  case 'multiBodiedExtension':
94
- if (fg('confluence_frontend_native_tabs_extension')) {
94
+ if (expValEquals('confluence_native_tabs_experiment', 'isEnabled', true)) {
95
95
  return '28px';
96
96
  }
97
97
  return "".concat(DRAG_HANDLE_WIDTH + DRAG_HANDLE_NARROW_GAP, "px");
@@ -869,7 +869,7 @@ export var DragHandle = function DragHandle(_ref) {
869
869
  };
870
870
  }
871
871
  var hasResizer = nodeType === 'table' || nodeType === 'mediaSingle';
872
- var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension');
872
+ var isExtension = nodeType === 'extension' || nodeType === 'bodiedExtension' || nodeType === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true);
873
873
  var isBlockCard = nodeType === 'blockCard' && !!blockCardWidth;
874
874
  var isEmbedCard = nodeType === 'embedCard';
875
875
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
@@ -10,7 +10,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
15
14
  import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
16
15
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -75,7 +74,7 @@ var getWidthOffset = function getWidthOffset(node, width, position) {
75
74
  return isLeftPosition ? "0.5*(var(--ak-editor--line-length) - ".concat(width, ")") : "-0.5*(var(--ak-editor--line-length) - ".concat(width, ")");
76
75
  }
77
76
  }
78
- if (node.type.name === 'bodiedExtension' || node.type.name === 'extension' || node.type.name === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension')) {
77
+ if (node.type.name === 'bodiedExtension' || node.type.name === 'extension' || node.type.name === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true)) {
79
78
  return '-12px';
80
79
  }
81
80
  };
@@ -193,7 +193,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
193
193
  };
194
194
  }
195
195
  var hasResizer = rootNodeType === 'table' || rootNodeType === 'mediaSingle';
196
- var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && fg('confluence_frontend_native_tabs_extension');
196
+ var isExtension = rootNodeType === 'extension' || rootNodeType === 'bodiedExtension' || rootNodeType === 'multiBodiedExtension' && expValEquals('confluence_native_tabs_experiment', 'isEnabled', true);
197
197
  var isBlockCard = rootNodeType === 'blockCard';
198
198
  var isEmbedCard = rootNodeType === 'embedCard';
199
199
  var isMacroInteractionUpdates = macroInteractionUpdates && isExtension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "13.2.6",
3
+ "version": "13.2.8",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -46,9 +46,9 @@
46
46
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
47
47
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
48
48
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^4.1.0",
49
- "@atlaskit/primitives": "^20.6.0",
49
+ "@atlaskit/primitives": "^21.0.0",
50
50
  "@atlaskit/theme": "^26.1.0",
51
- "@atlaskit/tmp-editor-statsig": "^125.0.0",
51
+ "@atlaskit/tmp-editor-statsig": "^125.2.0",
52
52
  "@atlaskit/tokens": "^15.8.0",
53
53
  "@atlaskit/tooltip": "^23.1.0",
54
54
  "@babel/runtime": "^7.0.0",
@@ -133,9 +133,6 @@
133
133
  "confluence_remix_button_right_side_block_fg": {
134
134
  "type": "boolean"
135
135
  },
136
- "confluence_frontend_native_tabs_extension": {
137
- "type": "boolean"
138
- },
139
136
  "platform_editor_layout_column_menu_kill_switch_1": {
140
137
  "type": "boolean",
141
138
  "referenceOnly": true