@atlaskit/editor-plugin-block-controls 17.2.3 → 17.2.5

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 (84) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/blockControlsPlugin.js +6 -6
  3. package/dist/cjs/editor-commands/move-node-with-block-menu.js +2 -2
  4. package/dist/cjs/editor-commands/move-node.js +6 -6
  5. package/dist/cjs/editor-commands/utils/move-node-utils.js +4 -4
  6. package/dist/cjs/pm-plugins/decorations-anchor.js +4 -4
  7. package/dist/cjs/pm-plugins/decorations-drag-handle.js +3 -3
  8. package/dist/cjs/pm-plugins/decorations-drop-target-active.js +2 -2
  9. package/dist/cjs/pm-plugins/decorations-drop-target.js +2 -2
  10. package/dist/cjs/pm-plugins/decorations-quick-insert-button.js +2 -2
  11. package/dist/cjs/pm-plugins/handle-mouse-down.js +3 -3
  12. package/dist/cjs/pm-plugins/handle-mouse-over.js +7 -7
  13. package/dist/cjs/pm-plugins/interaction-tracking/pm-plugin.js +3 -3
  14. package/dist/cjs/pm-plugins/main.js +14 -14
  15. package/dist/cjs/pm-plugins/react-root-registry.js +7 -7
  16. package/dist/cjs/pm-plugins/utils/active-anchor-tracker.js +2 -2
  17. package/dist/cjs/pm-plugins/utils/consts.js +2 -2
  18. package/dist/cjs/pm-plugins/utils/drag-handle-positions.js +6 -6
  19. package/dist/cjs/pm-plugins/utils/expand-and-update-selection.js +2 -2
  20. package/dist/cjs/pm-plugins/utils/getSelection.js +5 -5
  21. package/dist/cjs/pm-plugins/utils/inline-drop-target.js +2 -2
  22. package/dist/cjs/pm-plugins/utils/remove-from-source.js +2 -2
  23. package/dist/cjs/pm-plugins/utils/validation.js +2 -2
  24. package/dist/cjs/ui/consts.js +4 -4
  25. package/dist/cjs/ui/drag-handle.js +20 -19
  26. package/dist/cjs/ui/drop-target.js +2 -2
  27. package/dist/cjs/ui/global-styles.js +5 -5
  28. package/dist/cjs/ui/visibility-container.js +2 -2
  29. package/dist/es2019/blockControlsPlugin.js +1 -1
  30. package/dist/es2019/editor-commands/move-node-with-block-menu.js +1 -1
  31. package/dist/es2019/editor-commands/move-node.js +1 -1
  32. package/dist/es2019/editor-commands/utils/move-node-utils.js +1 -1
  33. package/dist/es2019/pm-plugins/decorations-anchor.js +1 -1
  34. package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -1
  35. package/dist/es2019/pm-plugins/decorations-drop-target-active.js +1 -1
  36. package/dist/es2019/pm-plugins/decorations-drop-target.js +1 -1
  37. package/dist/es2019/pm-plugins/decorations-quick-insert-button.js +1 -1
  38. package/dist/es2019/pm-plugins/handle-mouse-down.js +1 -1
  39. package/dist/es2019/pm-plugins/handle-mouse-over.js +1 -1
  40. package/dist/es2019/pm-plugins/interaction-tracking/pm-plugin.js +1 -1
  41. package/dist/es2019/pm-plugins/main.js +1 -1
  42. package/dist/es2019/pm-plugins/react-root-registry.js +7 -7
  43. package/dist/es2019/pm-plugins/utils/active-anchor-tracker.js +1 -1
  44. package/dist/es2019/pm-plugins/utils/consts.js +1 -1
  45. package/dist/es2019/pm-plugins/utils/drag-handle-positions.js +1 -1
  46. package/dist/es2019/pm-plugins/utils/expand-and-update-selection.js +1 -1
  47. package/dist/es2019/pm-plugins/utils/getSelection.js +1 -1
  48. package/dist/es2019/pm-plugins/utils/inline-drop-target.js +1 -1
  49. package/dist/es2019/pm-plugins/utils/remove-from-source.js +1 -1
  50. package/dist/es2019/pm-plugins/utils/validation.js +1 -1
  51. package/dist/es2019/ui/consts.js +1 -1
  52. package/dist/es2019/ui/drag-handle.js +4 -3
  53. package/dist/es2019/ui/drop-target.js +1 -1
  54. package/dist/es2019/ui/global-styles.js +1 -1
  55. package/dist/es2019/ui/visibility-container.js +1 -1
  56. package/dist/esm/blockControlsPlugin.js +1 -1
  57. package/dist/esm/editor-commands/move-node-with-block-menu.js +1 -1
  58. package/dist/esm/editor-commands/move-node.js +1 -1
  59. package/dist/esm/editor-commands/utils/move-node-utils.js +1 -1
  60. package/dist/esm/pm-plugins/decorations-anchor.js +1 -1
  61. package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -1
  62. package/dist/esm/pm-plugins/decorations-drop-target-active.js +1 -1
  63. package/dist/esm/pm-plugins/decorations-drop-target.js +1 -1
  64. package/dist/esm/pm-plugins/decorations-quick-insert-button.js +1 -1
  65. package/dist/esm/pm-plugins/handle-mouse-down.js +1 -1
  66. package/dist/esm/pm-plugins/handle-mouse-over.js +1 -1
  67. package/dist/esm/pm-plugins/interaction-tracking/pm-plugin.js +1 -1
  68. package/dist/esm/pm-plugins/main.js +1 -1
  69. package/dist/esm/pm-plugins/react-root-registry.js +7 -7
  70. package/dist/esm/pm-plugins/utils/active-anchor-tracker.js +1 -1
  71. package/dist/esm/pm-plugins/utils/consts.js +1 -1
  72. package/dist/esm/pm-plugins/utils/drag-handle-positions.js +1 -1
  73. package/dist/esm/pm-plugins/utils/expand-and-update-selection.js +1 -1
  74. package/dist/esm/pm-plugins/utils/getSelection.js +1 -1
  75. package/dist/esm/pm-plugins/utils/inline-drop-target.js +1 -1
  76. package/dist/esm/pm-plugins/utils/remove-from-source.js +1 -1
  77. package/dist/esm/pm-plugins/utils/validation.js +1 -1
  78. package/dist/esm/ui/consts.js +1 -1
  79. package/dist/esm/ui/drag-handle.js +4 -3
  80. package/dist/esm/ui/drop-target.js +1 -1
  81. package/dist/esm/ui/global-styles.js +1 -1
  82. package/dist/esm/ui/visibility-container.js +1 -1
  83. package/dist/types/pm-plugins/react-root-registry.d.ts +4 -4
  84. package/package.json +4 -7
@@ -9,7 +9,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
9
9
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
10
10
  var _styles = require("@atlaskit/editor-common/styles");
11
11
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
12
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
13
13
  var _consts = require("../../ui/consts");
14
14
  var STICKY_NODES = ['panel', 'table', 'expand', 'layoutSection', 'bodiedExtension'];
15
15
  var getTopPosition = exports.getTopPosition = function getTopPosition(dom, type) {
@@ -67,24 +67,24 @@ var getStickyNodes = (0, _memoizeOne.default)(function () {
67
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
- return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && getStickyNodes().includes(nodeType);
70
+ return (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && getStickyNodes().includes(nodeType);
71
71
  };
72
72
  var getControlBottomCSSValue = exports.getControlBottomCSSValue = function getControlBottomCSSValue(anchor, isSticky, isTopLevelNode, isLayoutColumn, fallbackAnchor) {
73
73
  if ((0, _expValEquals.expValEquals)('platform_editor_controls_reliable_anchor', 'isEnabled', true)) {
74
- return (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn || !isSticky || !isTopLevelNode ? {
74
+ return (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn || !isSticky || !isTopLevelNode ? {
75
75
  bottom: 'unset'
76
76
  } : {
77
77
  bottom: fallbackAnchor ? "anchor(".concat(anchor, " end, anchor(").concat(fallbackAnchor, " end))") : "anchor(".concat(anchor, " end)")
78
78
  };
79
79
  }
80
- return (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn || !isSticky || !isTopLevelNode ? {
80
+ return (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn || !isSticky || !isTopLevelNode ? {
81
81
  bottom: 'unset'
82
82
  } : {
83
83
  bottom: "anchor(".concat(anchor, " end)")
84
84
  };
85
85
  };
86
86
  var getControlHeightCSSValue = exports.getControlHeightCSSValue = function getControlHeightCSSValue(nodeHeight, isSticky, isTopLevelNode, fallbackPxHeight, isLayoutColumn) {
87
- return (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn || !isSticky || !isTopLevelNode ? {
87
+ return (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn || !isSticky || !isTopLevelNode ? {
88
88
  height: 'unset'
89
89
  } : {
90
90
  height: "".concat(nodeHeight || fallbackPxHeight, "px")
@@ -93,6 +93,6 @@ var getControlHeightCSSValue = exports.getControlHeightCSSValue = function getCo
93
93
  var shouldMaskNodeControls = exports.shouldMaskNodeControls = function shouldMaskNodeControls(nodeType, isTopLevelNode) {
94
94
  return (
95
95
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
96
- isTopLevelNode && ['table'].includes(nodeType) && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')
96
+ isTopLevelNode && ['table'].includes(nodeType) && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')
97
97
  );
98
98
  };
@@ -10,7 +10,7 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
10
10
  var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils = require("@atlaskit/editor-tables/utils");
12
12
  var _fg = require("@atlaskit/platform-feature-flags/fg");
13
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
14
14
  var _getSelection = require("./getSelection");
15
15
  var _selection2 = require("./selection");
16
16
  var isPosWithinRange = function isPosWithinRange(pos, range) {
@@ -66,7 +66,7 @@ var expandAndUpdateSelection = exports.expandAndUpdateSelection = function expan
66
66
  tr.setSelection(_state.TextSelection.create(tr.doc, Math.min(selection.from, expandedRange.$from.pos), Math.max(selection.to, expandedRange.$to.pos)));
67
67
  } else if (
68
68
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
69
- (0, _fg.fg)('platform_editor_maui_jira_updates') && ((0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar)) || (0, _experiments.editorExperiment)('platform_editor_block_menu', true))) {
69
+ (0, _fg.fg)('platform_editor_maui_jira_updates') && ((0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar)) || (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true))) {
70
70
  // Under the gate (and when on the simplified newGetSelection path), use
71
71
  // the platform-level composer — same path as open-remix-modal, no drift.
72
72
  (0, _nodeSelection.selectNodeAtPos)(tr, startPos, nodeType);
@@ -11,7 +11,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
11
11
  var _utils = require("@atlaskit/editor-prosemirror/utils");
12
12
  var _utils2 = require("@atlaskit/editor-tables/utils");
13
13
  var _fg = require("@atlaskit/platform-feature-flags/fg");
14
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
15
15
  var getInlineNodePos = exports.getInlineNodePos = function getInlineNodePos(doc, start, nodeSize) {
16
16
  var $startPos = doc.resolve(start);
17
17
  // To trigger the annotation floating toolbar for non-selectable node, we need to select inline nodes
@@ -100,14 +100,14 @@ var newGetSelection = exports.newGetSelection = function newGetSelection(doc, se
100
100
  // inline nodes correctly with TextSelection.
101
101
  if (
102
102
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
103
- (0, _fg.fg)('platform_editor_maui_jira_updates') && (0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
103
+ (0, _fg.fg)('platform_editor_maui_jira_updates') && (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
104
104
  return (0, _nodeSelection.getNodeSelectionForPos)(doc, start) || false;
105
105
  }
106
106
  var node = doc.nodeAt(start);
107
107
  var isNodeSelection = node && _state.NodeSelection.isSelectable(node);
108
108
  var nodeSize = node ? node.nodeSize : 1;
109
109
  var nodeName = node === null || node === void 0 ? void 0 : node.type.name;
110
- if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
110
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
111
111
  // if mediaGroup only has a single child, we want to select the child
112
112
  if (nodeName === 'mediaGroup' && (node === null || node === void 0 ? void 0 : node.childCount) === 1) {
113
113
  var $mediaStartPos = doc.resolve(start + 1);
@@ -142,7 +142,7 @@ var newGetSelection = exports.newGetSelection = function newGetSelection(doc, se
142
142
  return new _state.TextSelection(doc.resolve(inlineNodePos), doc.resolve(inlineNodeEndPos));
143
143
  };
144
144
  var getSelection = exports.getSelection = function getSelection(tr, start, api) {
145
- if ((0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar)) || (0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
145
+ if ((0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar)) || (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
146
146
  return newGetSelection(tr.doc, tr.selection.empty, start);
147
147
  }
148
148
  return oldGetSelection(tr, start);
@@ -154,7 +154,7 @@ var selectNode = exports.selectNode = function selectNode(tr, start, nodeType, a
154
154
  // TextSelection) in legacy contexts where those flags are off.
155
155
  if (
156
156
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
157
- (0, _fg.fg)('platform_editor_maui_jira_updates') && (0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
157
+ (0, _fg.fg)('platform_editor_maui_jira_updates') && (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
158
158
  return (0, _nodeSelection.selectNodeAtPos)(tr, start, nodeType);
159
159
  }
160
160
  if (nodeType === 'table') {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.shouldAllowInlineDropTarget = void 0;
7
7
  var _utils = require("@atlaskit/editor-common/utils");
8
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
8
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
9
9
  var _checkMediaLayout = require("./check-media-layout");
10
10
  var _consts = require("./consts");
11
11
  var syncedBlockTypes = ['syncBlock', 'bodiedSyncBlock'];
@@ -14,7 +14,7 @@ var shouldAllowInlineDropTarget = exports.shouldAllowInlineDropTarget = function
14
14
  var activeNode = arguments.length > 3 ? arguments[3] : undefined;
15
15
  var parentNode = arguments.length > 4 ? arguments[4] : undefined;
16
16
  var isInsideBodiedSyncBlock = (parentNode === null || parentNode === void 0 ? void 0 : parentNode.type.name) === 'bodiedSyncBlock';
17
- if ((0, _experiments.editorExperiment)('advanced_layouts', false) || isNested) {
17
+ if ((0, _editorExperiment.editorExperiment)('advanced_layouts', false) || isNested) {
18
18
  // If nested inside bodiedSyncBlock, enable inline drop target so user can drop to create a layout inside it
19
19
  if (isInsideBodiedSyncBlock) {
20
20
  return true;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.removeFromSource = void 0;
7
7
  var _model = require("@atlaskit/editor-prosemirror/model");
8
8
  var _utils = require("@atlaskit/editor-prosemirror/utils");
9
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
9
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
10
10
  var _checkFragment = require("./check-fragment");
11
11
  var _consts = require("./consts");
12
12
  var _updateColumnWidths = require("./update-column-widths");
@@ -19,7 +19,7 @@ var removeFromSource = exports.removeFromSource = function removeFromSource(tr,
19
19
  * that contains only 2 child node, and single column layouts are not enabled.
20
20
  * In this case, we delete the layout column and replace it with its content.
21
21
  */
22
- if (isLayoutColumn && !(0, _experiments.editorExperiment)('single_column_layouts', true)) {
22
+ if (isLayoutColumn && !(0, _editorExperiment.editorExperiment)('single_column_layouts', true)) {
23
23
  var sourceParent = $from.parent;
24
24
  if (sourceParent.childCount === _consts.MIN_LAYOUT_COLUMN) {
25
25
  // Only delete the layout content, but keep the layout column itself
@@ -14,7 +14,7 @@ var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
14
14
  var _model = require("@atlaskit/editor-prosemirror/model");
15
15
  var _utils = require("@atlaskit/editor-prosemirror/utils");
16
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
18
18
  var isInsideTable = exports.isInsideTable = function isInsideTable(nodeType) {
19
19
  var _nodeType$schema$node = nodeType.schema.nodes,
20
20
  tableCell = _nodeType$schema$node.tableCell,
@@ -156,7 +156,7 @@ function canMoveNodeToIndex(destParent, indexIntoParent, srcNode, $destNodePos,
156
156
  var activeNodeType = srcNode === null || srcNode === void 0 ? void 0 : srcNode.type;
157
157
  var layoutColumnContent = srcNode.content;
158
158
  var isNestingTablesSupported = (0, _nesting.isNestedTablesSupported)(schema);
159
- if (activeNodeType === layoutColumn && (0, _experiments.editorExperiment)('advanced_layouts', true)) {
159
+ if (activeNodeType === layoutColumn && (0, _editorExperiment.editorExperiment)('advanced_layouts', true)) {
160
160
  // Allow drag layout column and drop into layout section
161
161
  if ((destNode === null || destNode === void 0 ? void 0 : destNode.type) === layoutSection || destParentNodeType === doc) {
162
162
  return true;
@@ -13,7 +13,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
14
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
15
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
16
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
17
17
  var _dropTargetMarginMap;
18
18
  var ACTIVE_DRAG_HANDLE_ATTR = exports.ACTIVE_DRAG_HANDLE_ATTR = 'data-active-drag-handle';
19
19
  var ACTIVE_QUICK_INSERT_ATTR = exports.ACTIVE_QUICK_INSERT_ATTR = 'data-active-quick-insert';
@@ -70,7 +70,7 @@ var dragHandleGap = exports.dragHandleGap = function dragHandleGap(nodeType, par
70
70
  } else {
71
71
  breakoutResizableNodesList = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? [].concat((0, _toConsumableArray2.default)(_utils.breakoutResizableNodes), ['rule', 'panel']) : _utils.breakoutResizableNodes;
72
72
  }
73
- if ((0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) && breakoutResizableNodesList.includes(nodeType)) {
73
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_breakout_resizing', true) && breakoutResizableNodesList.includes(nodeType)) {
74
74
  if (nodeType === 'layoutSection') {
75
75
  return DRAG_HANDLE_MAX_GAP + 20;
76
76
  } else {
@@ -94,7 +94,7 @@ var rootElementGap = exports.rootElementGap = function rootElementGap(nodeType)
94
94
  } else {
95
95
  breakoutResizableNodesList = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) ? [].concat((0, _toConsumableArray2.default)(_utils.breakoutResizableNodes), ['rule', 'panel']) : _utils.breakoutResizableNodes;
96
96
  }
97
- if (nodeTypeExcludeList.includes(nodeType) || (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) && breakoutResizableNodesList.includes(nodeType)) {
97
+ if (nodeTypeExcludeList.includes(nodeType) || (0, _editorExperiment.editorExperiment)('platform_editor_breakout_resizing', true) && breakoutResizableNodesList.includes(nodeType)) {
98
98
  if (nodeType === 'layoutSection') {
99
99
  return DRAG_HANDLE_MAX_GAP + 20;
100
100
  } else {
@@ -131,7 +131,7 @@ var getNestedNodeLeftPaddingMargin = exports.getNestedNodeLeftPaddingMargin = fu
131
131
  }
132
132
  };
133
133
  var topPositionAdjustment = exports.topPositionAdjustment = function topPositionAdjustment(nodeType, layout) {
134
- if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
134
+ if ((0, _editorExperiment.editorExperiment)('advanced_layouts', true)) {
135
135
  switch (nodeType) {
136
136
  case 'layoutSection':
137
137
  return DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT;
@@ -22,13 +22,14 @@ var _state = require("@atlaskit/editor-prosemirror/state");
22
22
  var _utils = require("@atlaskit/editor-prosemirror/utils");
23
23
  var _consts = require("@atlaskit/editor-shared-styles/consts");
24
24
  var _dragHandleVertical = _interopRequireDefault(require("@atlaskit/icon/core/drag-handle-vertical"));
25
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
25
26
  var _fg = require("@atlaskit/platform-feature-flags/fg");
26
27
  var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
27
28
  var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview");
28
29
  var _primitives = require("@atlaskit/primitives");
29
30
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
30
31
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
31
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
32
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
32
33
  var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
33
34
  var _decorationsCommon = require("../pm-plugins/decorations-common");
34
35
  var _main = require("../pm-plugins/main");
@@ -831,7 +832,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
831
832
  var node = parentPos !== undefined ? view.state.doc.nodeAt(parentPos) : undefined;
832
833
  var parentNodeType = node === null || node === void 0 ? void 0 : node.type.name;
833
834
  var supportsAnchor = CSS.supports('top', "anchor(".concat(anchorName, " start)")) && CSS.supports('left', "anchor(".concat(anchorName, " start)"));
834
- var safeAnchorName = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _anchorName.refreshAnchorName)({
835
+ var safeAnchorName = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _anchorName.refreshAnchorName)({
835
836
  getPos: getPos,
836
837
  view: view,
837
838
  anchorName: anchorName
@@ -883,13 +884,13 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
883
884
  edge: 'right',
884
885
  safeAnchorName: safeAnchorName
885
886
  });
886
- var bottom = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _dragHandlePositions.getControlBottomCSSValue)(safeAnchorName, isSticky, isTopLevelNodeValue, isLayoutColumn, _consts2.ACTIVE_DRAG_HANDLE_FALLBACK_ANCHOR_NAME) : {};
887
+ var bottom = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _dragHandlePositions.getControlBottomCSSValue)(safeAnchorName, isSticky, isTopLevelNodeValue, isLayoutColumn, _consts2.ACTIVE_DRAG_HANDLE_FALLBACK_ANCHOR_NAME) : {};
887
888
  return _objectSpread({
888
- left: isEdgeCase ? "calc(".concat(anchorStart, " + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn ? "calc((".concat(anchorRight, " + ").concat(anchorLeft, ")/2 - ").concat(_consts2.DRAG_HANDLE_HEIGHT / 2, "px)") : "calc(".concat(anchorStart, " - ").concat(_styles.DRAG_HANDLE_WIDTH, "px - ").concat((0, _consts2.dragHandleGap)(nodeType, parentNodeType), "px)"),
889
- top: (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn ? "calc(".concat(anchorTop, " - ").concat(_styles.DRAG_HANDLE_WIDTH, "px)") : "calc(".concat(anchorStart, " + ").concat((0, _consts2.topPositionAdjustment)((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? $pos && $pos.nodeAfter && (0, _decorationsCommon.getNodeTypeWithLevel)($pos.nodeAfter) || nodeType : nodeType, (dom === null || dom === void 0 ? void 0 : dom.getAttribute('layout')) || ''), "px)")
889
+ left: isEdgeCase ? "calc(".concat(anchorStart, " + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn ? "calc((".concat(anchorRight, " + ").concat(anchorLeft, ")/2 - ").concat(_consts2.DRAG_HANDLE_HEIGHT / 2, "px)") : "calc(".concat(anchorStart, " - ").concat(_styles.DRAG_HANDLE_WIDTH, "px - ").concat((0, _consts2.dragHandleGap)(nodeType, parentNodeType), "px)"),
890
+ top: (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn ? "calc(".concat(anchorTop, " - ").concat(_styles.DRAG_HANDLE_WIDTH, "px)") : "calc(".concat(anchorStart, " + ").concat((0, _consts2.topPositionAdjustment)((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? $pos && $pos.nodeAfter && (0, _decorationsCommon.getNodeTypeWithLevel)($pos.nodeAfter) || nodeType : nodeType, (dom === null || dom === void 0 ? void 0 : dom.getAttribute('layout')) || ''), "px)")
890
891
  }, bottom);
891
892
  }
892
- var height = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _dragHandlePositions.getControlHeightCSSValue)((0, _dragHandlePositions.getNodeHeight)(dom, safeAnchorName, anchorRectCache) || 0, isSticky, isTopLevelNodeValue, "".concat(_consts2.DRAG_HANDLE_HEIGHT), isLayoutColumn) : {};
893
+ var height = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _dragHandlePositions.getControlHeightCSSValue)((0, _dragHandlePositions.getNodeHeight)(dom, safeAnchorName, anchorRectCache) || 0, isSticky, isTopLevelNodeValue, "".concat(_consts2.DRAG_HANDLE_HEIGHT), isLayoutColumn) : {};
893
894
  return _objectSpread({
894
895
  left: isEdgeCase ? "calc(".concat((dom === null || dom === void 0 ? void 0 : dom.offsetLeft) || 0, "px + ").concat((0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType), ")") : (0, _dragHandlePositions.getLeftPosition)(dom, nodeType, innerContainer, isMacroInteractionUpdates, parentNodeType),
895
896
  top: (0, _dragHandlePositions.getTopPosition)(dom, nodeType)
@@ -979,7 +980,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
979
980
  }, [isReliableAnchorEnabled, calculatePositionOld, view.dom, anchorName, nodeType, docDepForReliableAnchor]);
980
981
  var isHandleShown = positionStylesOld.display !== 'none';
981
982
  (0, _react.useEffect)(function () {
982
- if ((0, _fg.fg)('nike_r19_render_unmount')) {
983
+ if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_react19_migration')) {
983
984
  return;
984
985
  }
985
986
  if (handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && buttonRef.current) {
@@ -994,7 +995,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
994
995
  }
995
996
  }, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
996
997
  (0, _react.useEffect)(function () {
997
- if (!(0, _fg.fg)('nike_r19_render_unmount')) {
998
+ if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_react19_migration')) {
998
999
  return;
999
1000
  }
1000
1001
  if (!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && isHandleShown && buttonRef.current)) {
@@ -1050,7 +1051,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1050
1051
  setDragHandleDisabled(false);
1051
1052
  }
1052
1053
  }, [api === null || api === void 0 || (_api$blockControls8 = api.blockControls) === null || _api$blockControls8 === void 0 ? void 0 : _api$blockControls8.sharedState, isLayoutColumn, isShiftDown, isTopLevelNodeValue, view]);
1053
- var dragHandleMessage = (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? formatMessage(_messages.blockControlsMessages.dragToMoveClickToOpen, {
1054
+ var dragHandleMessage = (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) ? formatMessage(_messages.blockControlsMessages.dragToMoveClickToOpen, {
1054
1055
  br: (0, _react2.jsx)("br", null)
1055
1056
  }) : formatMessage(_messages.blockControlsMessages.dragToMove);
1056
1057
 
@@ -1101,7 +1102,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1101
1102
  }
1102
1103
 
1103
1104
  // When advanced layout is on, layout column drag handle show only show 'Drag to move', no shortcuts
1104
- if ((0, _experiments.editorExperiment)('advanced_layouts', true) && nodeType === 'layoutColumn') {
1105
+ if ((0, _editorExperiment.editorExperiment)('advanced_layouts', true) && nodeType === 'layoutColumn') {
1105
1106
  helpDescriptors = [{
1106
1107
  description: formatMessage(_messages.blockControlsMessages.dragToRearrange)
1107
1108
  }, {
@@ -1118,7 +1119,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1118
1119
  keymap: _keymaps.dragToMoveRight
1119
1120
  }];
1120
1121
  }
1121
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
1122
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1')) {
1122
1123
  helpDescriptors = [{
1123
1124
  description: dragHandleMessage
1124
1125
  }];
@@ -1136,18 +1137,18 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1136
1137
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
1137
1138
  (0, _react2.jsx)("button", {
1138
1139
  type: "button",
1139
- css: [(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && dragHandleColor,
1140
+ css: [(0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && dragHandleColor,
1140
1141
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
1141
1142
  // See https://product-fabric.atlassian.net/browse/ED-26266
1142
- browser.gecko && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && (0, _experiments.editorExperiment)('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && isFocused && keyboardFocusedDragHandleStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? focusedStyles : focusedStylesOld, dragHandleButtonScaledStyles],
1143
+ browser.gecko && dragHandleMultiLineSelectionFixFirefox, (0, _editorExperiment.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles, (0, _editorExperiment.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') && dragHandleButtonSmallScreenStyles, (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) && isFocused && keyboardFocusedDragHandleStyles, (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) ? focusedStyles : focusedStylesOld, dragHandleButtonScaledStyles],
1143
1144
  ref: buttonRef
1144
1145
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1145
1146
  ,
1146
- style: !(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? positionStylesOld : {},
1147
+ style: !(0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? positionStylesOld : {},
1147
1148
  onMouseDown: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_selection_toolbar_block_handle', 'isEnabled', true) ? handleMouseDown : undefined,
1148
- onMouseUp: (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? handleMouseUp : undefined,
1149
- onClick: (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? handleOnClickNew : handleOnClick,
1150
- onKeyDown: (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? handleKeyDownNew : handleKeyDown
1149
+ onMouseUp: (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) ? handleMouseUp : undefined,
1150
+ onClick: (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) ? handleOnClickNew : handleOnClick,
1151
+ onKeyDown: (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) ? handleKeyDownNew : handleKeyDown
1151
1152
  // eslint-disable-next-line @atlaskit/design-system/no-direct-use-of-web-platform-drag-and-drop
1152
1153
  ,
1153
1154
  onDrop: handleOnDrop,
@@ -1157,7 +1158,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1157
1158
  "data-testid": "block-ctrl-drag-handle",
1158
1159
  "aria-label": dragHandleAriaLabel,
1159
1160
  onBlur: function onBlur() {
1160
- if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
1161
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true)) {
1161
1162
  setIsFocused(false);
1162
1163
  }
1163
1164
  var pos = getPos();
@@ -1256,7 +1257,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
1256
1257
  var isTooltip = !dragHandleDisabled;
1257
1258
  var stickyRender = isTooltip ? stickyWithTooltip() : stickyWithoutTooltip();
1258
1259
  var render = isTooltip ? buttonWithTooltip() : renderButton();
1259
- return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? stickyRender : render;
1260
+ return (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? stickyRender : render;
1260
1261
  };
1261
1262
  var DragHandleWithVisibility = exports.DragHandleWithVisibility = function DragHandleWithVisibility(_ref10) {
1262
1263
  var view = _ref10.view,
@@ -16,7 +16,7 @@ var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box")
16
16
  var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
17
17
  var _constants = require("@atlaskit/theme/constants");
18
18
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
19
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
19
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
20
20
  var _decorationsCommon = require("../pm-plugins/decorations-common");
21
21
  var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
22
22
  var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
@@ -114,7 +114,7 @@ var HoverZone = function HoverZone(_ref) {
114
114
  return (0, _elementAdapter.dropTargetForElements)({
115
115
  element: ref.current,
116
116
  onDragEnter: function onDragEnter() {
117
- if ((!isNestedDropTarget || isInsideBodiedSyncBlock) && (0, _experiments.editorExperiment)('advanced_layouts', true)) {
117
+ if ((!isNestedDropTarget || isInsideBodiedSyncBlock) && (0, _editorExperiment.editorExperiment)('advanced_layouts', true)) {
118
118
  setActiveAnchor();
119
119
  }
120
120
  _onDragEnter();
@@ -13,7 +13,7 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
13
13
  var _whitespace = require("@atlaskit/editor-common/whitespace");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
17
17
  var _consts = require("./consts");
18
18
  var _domAttrName = require("./utils/dom-attr-name");
19
19
  /**
@@ -38,10 +38,10 @@ var dragHandlerAnchorSelectorNext = "[".concat(_domAttrName.NODE_ANCHOR_ATTR_NAM
38
38
  */
39
39
  var dragHandlerAnchorSelectorWithTaskExclusion = "[".concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "]:not([data-prosemirror-node-name=\"tableRow\"], [data-prosemirror-node-name=\"tableCell\"], [data-prosemirror-node-name=\"tableHeader\"], [data-prosemirror-node-name=\"media\"], [data-prosemirror-node-inline=\"true\"], [data-prosemirror-node-name=\"taskList\"] [").concat(_domAttrName.NODE_ANCHOR_ATTR_NAME, "])");
40
40
  var gutterPaddingWidth = function gutterPaddingWidth() {
41
- return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '100%';
41
+ return (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '100%';
42
42
  };
43
43
  var gutterPaddingLeft = function gutterPaddingLeft() {
44
- return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? "-".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '-100px';
44
+ return (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? "-".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px") : '-100px';
45
45
  };
46
46
  var extendedHoverZone = function extendedHoverZone() {
47
47
  return (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".block-ctrl-drag-preview ".concat(dragHandlerAnchorSelector, "::after"), {
@@ -419,11 +419,11 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
419
419
  return (0, _react.jsx)(_react.Global
420
420
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
421
421
  , {
422
- styles: [globalStyles(), globalDnDStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
422
+ styles: [globalStyles(), globalDnDStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedHoverZoneNext() : extendedHoverZone(), isDragging && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendedDragZoneNext : extendedDragZone), (0, _editorExperiment.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
423
423
  exposure: true
424
424
  }) ? (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
425
425
  // platform_editor_controls note: this allows drag handles to render on empty lines
426
- toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, (0, _expValEquals.expValEquals)('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
426
+ toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _editorExperiment.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, (0, _expValEquals.expValEquals)('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
427
427
  // dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
428
428
  // staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
429
429
  // shouldRenderAnchors guards both: only apply anchor styles on browsers that support CSS anchor positioning.
@@ -14,7 +14,7 @@ var _hooks = require("@atlaskit/editor-common/hooks");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
15
  var _primitives = require("@atlaskit/primitives");
16
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
17
+ var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
18
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
19
  /**
20
20
  * @jsxRuntime classic
@@ -135,7 +135,7 @@ var VisibilityContainer = exports.VisibilityContainer = function VisibilityConta
135
135
  };
136
136
  }, [shouldHideImmediate, isRightControlViewMode]);
137
137
  var shouldHide = isRightControlViewMode ? delayedShouldHide : shouldHideImmediate;
138
- if ((0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
138
+ if ((0, _editorExperiment.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
139
139
  exposure: true
140
140
  })) {
141
141
  return (0, _react2.jsx)("div", {
@@ -7,7 +7,7 @@ import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
7
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
8
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
11
11
  import { handleKeyDownWithPreservedSelection } from './editor-commands/handle-key-down-with-preserved-selection';
12
12
  import { mapPreservedSelection } from './editor-commands/map-preserved-selection';
13
13
  import { moveNode } from './editor-commands/move-node';
@@ -1,6 +1,6 @@
1
1
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import { DIRECTION } from '@atlaskit/editor-common/types';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
4
  import { key } from '../pm-plugins/main';
5
5
  import { mapPreservedSelection } from '../pm-plugins/utils/selection';
6
6
  import { moveNode } from './move-node';
@@ -14,7 +14,7 @@ import { findTable, isInTable, isTableSelected } from '@atlaskit/editor-tables/u
14
14
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
15
15
  import { fg } from '@atlaskit/platform-feature-flags/fg';
16
16
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
17
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
18
18
  import { key } from '../pm-plugins/main';
19
19
  import { attachMoveNodeAnalytics, getMultiSelectAnalyticsAttributes } from '../pm-plugins/utils/analytics';
20
20
  import { getNestedNodePosition } from '../pm-plugins/utils/getNestedNodePosition';
@@ -1,6 +1,6 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { findTable, isTableSelected } from '@atlaskit/editor-tables/utils';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
4
  import { createPreservedSelection } from '../../pm-plugins/utils/selection';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
4
  import { getNodeAnchor, getNodeTypeWithLevel, NESTED_DEPTH, TYPE_NODE_DEC } from './decorations-common';
5
5
  const IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'listItem', 'caption', 'layoutColumn'];
6
6
  export const IGNORE_NODES_NEXT = ['tableCell', 'tableHeader', 'tableRow', 'listItem', 'caption'];
@@ -4,7 +4,7 @@ import uuid from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
8
  import { ACTIVE_DRAG_HANDLE_ATTR } from '../ui/consts';
9
9
  import { DragHandle, DragHandleWithVisibility } from '../ui/drag-handle';
10
10
  import { TYPE_HANDLE_DEC, TYPE_NODE_DEC, unmountDecorations } from './decorations-common';
@@ -4,7 +4,7 @@ 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
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
8
  import { getNodeAnchor } from './decorations-common';
9
9
  import { createDropTargetDecoration, createLayoutDropTargetDecoration } from './decorations-drop-target';
10
10
  import { findSurroundingNodes } from './decorations-find-surrounding-nodes';
@@ -7,7 +7,7 @@ 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
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
11
11
  import { nodeMargins } from '../ui/consts';
12
12
  import { DropTarget, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_OFFSET } from '../ui/drop-target';
13
13
  import { DropTargetLayout, DropTargetLayoutNativeAnchorSupport } from '../ui/drop-target-layout';
@@ -4,7 +4,7 @@ import uuid from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
8
  import { ACTIVE_QUICK_INSERT_ATTR } from '../ui/consts';
9
9
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
10
10
  import { getMatchingBlockMarks } from './utils/marks';
@@ -1,6 +1,6 @@
1
1
  import { DRAG_HANDLE_SELECTOR } from '@atlaskit/editor-common/styles';
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
4
4
  export const handleMouseDown = api => (view, event) => {
5
5
  if (!(event.target instanceof HTMLElement)) {
6
6
  return false;
@@ -4,7 +4,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
4
4
  import { fg } from '@atlaskit/platform-feature-flags/fg';
5
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
8
  import { getAnchorAttrName, getTypeNameAttrName, getTypeNameFromDom, NODE_ANCHOR_ATTR_NAME } from '../ui/utils/dom-attr-name';
9
9
  import { IGNORE_NODE_DESCENDANTS_ADVANCED_LAYOUT, IGNORE_NODES_NEXT } from './decorations-anchor';
10
10
  import { selectionPreservationPluginKey } from './selection-preservation/plugin-key';
@@ -4,7 +4,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
5
5
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
6
6
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
7
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
8
8
  import { RIGHT_MARGIN_ROVO_GAP_PX } from './constants';
9
9
  import { handleKeyDown } from './handle-key-down';
10
10
  import { handleMouseEnter, handleMouseLeave, handleMouseMove } from './handle-mouse-move';
@@ -18,7 +18,7 @@ import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-sc
18
18
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
19
19
  import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
20
20
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
21
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
21
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
22
22
  import { BLOCK_CONTROLS_SURFACE_SELECTOR } from '../ui/consts';
23
23
  import { getAnchorAttrName } from '../ui/utils/dom-attr-name';
24
24
  import { findNodeDecs, nodeDecorations } from './decorations-anchor';
@@ -1,6 +1,6 @@
1
1
  import ReactDOM, { flushSync } from 'react-dom';
2
2
  import { createRoot } from 'react-dom/client';
3
- import { fg } from '@atlaskit/platform-feature-flags/fg';
3
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
4
 
5
5
  /**
6
6
  * Shared registry of React roots created via `createRoot`.
@@ -14,16 +14,16 @@ const reactRoots = new WeakMap();
14
14
  /**
15
15
  * Mounts `element` into `mountPoint`.
16
16
  *
17
- * When `nike_r19_render_unmount` is **on**, uses the React 18/19 `createRoot`
17
+ * When `platform_editor_react19_migration` is **on**, uses the React 18/19 `createRoot`
18
18
  * API wrapped in `flushSync` so the render is synchronous – matching the
19
19
  * legacy `ReactDOM.render` timing that ProseMirror decoration widgets depend
20
20
  * on (focus management, anchor positioning, block-menu visibility all read
21
21
  * the rendered DOM immediately after the callback returns).
22
22
  *
23
- * When the gate is **off**, falls back to the legacy `ReactDOM.render` path.
23
+ * Otherwise, falls back to the legacy `ReactDOM.render` path.
24
24
  */
25
25
  export const renderToMountPoint = (element, mountPoint) => {
26
- if (fg('nike_r19_render_unmount')) {
26
+ if (isExperimentEnabled('platform_editor_react19_migration')) {
27
27
  let root = reactRoots.get(mountPoint);
28
28
  if (!root) {
29
29
  root = createRoot(mountPoint);
@@ -42,13 +42,13 @@ export const renderToMountPoint = (element, mountPoint) => {
42
42
  /**
43
43
  * Unmounts the React tree at `mountPoint`.
44
44
  *
45
- * When `nike_r19_render_unmount` is **on**, looks up the root in the shared
45
+ * When `platform_editor_react19_migration` is **on**, looks up the root in the shared
46
46
  * registry, calls `root.unmount()`, and removes the entry.
47
47
  *
48
- * When the gate is **off**, falls back to `ReactDOM.unmountComponentAtNode`.
48
+ * Otherwise, falls back to `ReactDOM.unmountComponentAtNode`.
49
49
  */
50
50
  export const unmountFromMountPoint = mountPoint => {
51
- if (fg('nike_r19_render_unmount')) {
51
+ if (isExperimentEnabled('platform_editor_react19_migration')) {
52
52
  const root = reactRoots.get(mountPoint);
53
53
  if (root) {
54
54
  root.unmount();