@atlaskit/editor-plugin-block-controls 4.1.5 → 4.1.6

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,13 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 4.1.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5d5020e5bb9f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5d5020e5bb9f5) -
8
+ ED-28750 cleanup dnd-perf-fix-patch-1
9
+ - Updated dependencies
10
+
3
11
  ## 4.1.5
4
12
 
5
13
  ### Patch Changes
@@ -4,10 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.findSurroundingNodes = void 0;
7
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
7
  var IGNORE_NODES = ['tableRow', 'listItem', 'caption', 'media'];
9
- var blockLeafNodes = ['blockCard', 'rule'];
10
- var blockLeafNodesNext = ['blockCard', 'rule', 'extension'];
8
+ var blockLeafNodes = ['blockCard', 'rule', 'extension'];
11
9
  var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
12
10
 
13
11
  /**
@@ -21,7 +19,8 @@ var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
21
19
  */
22
20
  var _findSurroundingNodes = exports.findSurroundingNodes = function findSurroundingNodes(state, $pos, nodeType) {
23
21
  var depth = $pos.depth;
24
- var blockLeafNodeList = (0, _platformFeatureFlags.fg)('platform_editor_block_controls_perf_opt_patch_1') ? blockLeafNodesNext : blockLeafNodes;
22
+ var blockLeafNodeList = blockLeafNodes;
23
+
25
24
  // special cases like hr rule here
26
25
  if (blockLeafNodeList.includes(nodeType || '') || $pos.pos === 0) {
27
26
  var _parent = $pos.node(depth);
@@ -660,10 +660,8 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
660
660
  _activeAnchorTracker.defaultActiveAnchorTracker.reset();
661
661
  }
662
662
  if ((0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true)) {
663
- if ((0, _platformFeatureFlags.fg)('platform_editor_block_controls_perf_opt_patch_1')) {
664
- var _anchorRectCache;
665
- (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
666
- }
663
+ var _anchorRectCache;
664
+ (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
667
665
  }
668
666
  (_anchorRectCache2 = anchorRectCache) === null || _anchorRectCache2 === void 0 || _anchorRectCache2.setEditorView(view);
669
667
  view.dispatch(view.state.tr.setMeta(key, _objectSpread(_objectSpread({}, view.state.tr.getMeta(key)), {}, {
@@ -313,7 +313,7 @@ var blockCardWithoutLayout = (0, _react.css)({
313
313
  var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
314
314
  var api = _ref.api;
315
315
  var isDragging = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockControls.isDragging', {
316
- disabled: !(0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true) || !(0, _platformFeatureFlags.fg)('platform_editor_block_controls_perf_opt_patch_1')
316
+ disabled: !(0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
317
317
  });
318
318
  return (0, _react.jsx)(_react.Global, {
319
319
  styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
@@ -1,7 +1,5 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  const IGNORE_NODES = ['tableRow', 'listItem', 'caption', 'media'];
3
- const blockLeafNodes = ['blockCard', 'rule'];
4
- const blockLeafNodesNext = ['blockCard', 'rule', 'extension'];
2
+ const blockLeafNodes = ['blockCard', 'rule', 'extension'];
5
3
  const DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
6
4
 
7
5
  /**
@@ -15,7 +13,8 @@ const DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
15
13
  */
16
14
  export const findSurroundingNodes = (state, $pos, nodeType) => {
17
15
  const depth = $pos.depth;
18
- const blockLeafNodeList = fg('platform_editor_block_controls_perf_opt_patch_1') ? blockLeafNodesNext : blockLeafNodes;
16
+ const blockLeafNodeList = blockLeafNodes;
17
+
19
18
  // special cases like hr rule here
20
19
  if (blockLeafNodeList.includes(nodeType || '') || $pos.pos === 0) {
21
20
  const parent = $pos.node(depth);
@@ -662,10 +662,8 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
662
662
  defaultActiveAnchorTracker.reset();
663
663
  }
664
664
  if (expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)) {
665
- if (fg('platform_editor_block_controls_perf_opt_patch_1')) {
666
- var _anchorRectCache;
667
- (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 ? void 0 : _anchorRectCache.clear();
668
- }
665
+ var _anchorRectCache;
666
+ (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 ? void 0 : _anchorRectCache.clear();
669
667
  }
670
668
  (_anchorRectCache2 = anchorRectCache) === null || _anchorRectCache2 === void 0 ? void 0 : _anchorRectCache2.setEditorView(view);
671
669
  view.dispatch(view.state.tr.setMeta(key, {
@@ -352,7 +352,7 @@ export const GlobalStylesWrapper = ({
352
352
  api
353
353
  }) => {
354
354
  const isDragging = useSharedPluginStateSelector(api, 'blockControls.isDragging', {
355
- disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true) || !fg('platform_editor_block_controls_perf_opt_patch_1')
355
+ disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
356
356
  });
357
357
  return jsx(Global, {
358
358
  styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
@@ -1,7 +1,5 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  var IGNORE_NODES = ['tableRow', 'listItem', 'caption', 'media'];
3
- var blockLeafNodes = ['blockCard', 'rule'];
4
- var blockLeafNodesNext = ['blockCard', 'rule', 'extension'];
2
+ var blockLeafNodes = ['blockCard', 'rule', 'extension'];
5
3
  var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
6
4
 
7
5
  /**
@@ -15,7 +13,8 @@ var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
15
13
  */
16
14
  var _findSurroundingNodes = function findSurroundingNodes(state, $pos, nodeType) {
17
15
  var depth = $pos.depth;
18
- var blockLeafNodeList = fg('platform_editor_block_controls_perf_opt_patch_1') ? blockLeafNodesNext : blockLeafNodes;
16
+ var blockLeafNodeList = blockLeafNodes;
17
+
19
18
  // special cases like hr rule here
20
19
  if (blockLeafNodeList.includes(nodeType || '') || $pos.pos === 0) {
21
20
  var _parent = $pos.node(depth);
@@ -654,10 +654,8 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
654
654
  defaultActiveAnchorTracker.reset();
655
655
  }
656
656
  if (expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)) {
657
- if (fg('platform_editor_block_controls_perf_opt_patch_1')) {
658
- var _anchorRectCache;
659
- (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
660
- }
657
+ var _anchorRectCache;
658
+ (_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
661
659
  }
662
660
  (_anchorRectCache2 = anchorRectCache) === null || _anchorRectCache2 === void 0 || _anchorRectCache2.setEditorView(view);
663
661
  view.dispatch(view.state.tr.setMeta(key, _objectSpread(_objectSpread({}, view.state.tr.getMeta(key)), {}, {
@@ -306,7 +306,7 @@ var blockCardWithoutLayout = css({
306
306
  export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
307
307
  var api = _ref.api;
308
308
  var isDragging = useSharedPluginStateSelector(api, 'blockControls.isDragging', {
309
- disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true) || !fg('platform_editor_block_controls_perf_opt_patch_1')
309
+ disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
310
310
  });
311
311
  return jsx(Global, {
312
312
  styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "4.1.5",
3
+ "version": "4.1.6",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -176,9 +176,6 @@
176
176
  "platform_editor_controls_patch_15": {
177
177
  "type": "boolean"
178
178
  },
179
- "platform_editor_block_controls_perf_opt_patch_1": {
180
- "type": "boolean"
181
- },
182
179
  "platform_editor_breakout_resizing_widget_fix": {
183
180
  "type": "boolean"
184
181
  }