@atlaskit/editor-plugin-block-controls 13.2.7 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
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
+
3
14
  ## 13.2.7
4
15
 
5
16
  ### Patch Changes
@@ -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;
@@ -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;
@@ -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.7",
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.1.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