@atlaskit/editor-plugin-block-controls 8.2.1 → 8.3.0

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,12 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 8.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`617747c789f4e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/617747c789f4e) -
8
+ Use correct editorExperiment instead of expVal for evaluating platform_synced_block
9
+
3
10
  ## 8.2.1
4
11
 
5
12
  ### Patch Changes
@@ -46,7 +46,7 @@ var shouldCollapseMargin = function shouldCollapseMargin(prevNode, nextNode) {
46
46
  return true;
47
47
  };
48
48
  var getGapAndOffset = function getGapAndOffset(prevNode, nextNode, parentNode) {
49
- var isSyncBlockOffsetPatchEnabled = (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_2');
49
+ var isSyncBlockOffsetPatchEnabled = (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_2');
50
50
  if (!prevNode && nextNode) {
51
51
  // first node - adjust for bodied containers
52
52
  var _offset = 0;
@@ -256,7 +256,7 @@ var dropTargetDecorations = exports.dropTargetDecorations = function dropTargetD
256
256
  return false; //not valid pos, so nested not valid either
257
257
  }
258
258
  }
259
- var parentTypesWithEndDropTarget = (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_2') ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
259
+ var parentTypesWithEndDropTarget = (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_2') ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
260
260
  if (parent.lastChild === node && !(0, _utils.isEmptyParagraph)(node) && parentTypesWithEndDropTarget.includes(parent.type.name)) {
261
261
  endPos = pos + node.nodeSize;
262
262
  }
@@ -37,7 +37,7 @@ const shouldCollapseMargin = (prevNode, nextNode) => {
37
37
  return true;
38
38
  };
39
39
  const getGapAndOffset = (prevNode, nextNode, parentNode) => {
40
- const isSyncBlockOffsetPatchEnabled = expValEquals('platform_synced_block', 'isEnabled', true) && fg('platform_synced_block_patch_2');
40
+ const isSyncBlockOffsetPatchEnabled = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2');
41
41
  if (!prevNode && nextNode) {
42
42
  // first node - adjust for bodied containers
43
43
  let offset = 0;
@@ -245,7 +245,7 @@ export const dropTargetDecorations = (newState, api, formatMessage, nodeViewPort
245
245
  return false; //not valid pos, so nested not valid either
246
246
  }
247
247
  }
248
- const parentTypesWithEndDropTarget = expValEquals('platform_synced_block', 'isEnabled', true) && fg('platform_synced_block_patch_2') ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
248
+ const parentTypesWithEndDropTarget = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2') ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
249
249
  if (parent.lastChild === node && !isEmptyParagraph(node) && parentTypesWithEndDropTarget.includes(parent.type.name)) {
250
250
  endPos = pos + node.nodeSize;
251
251
  }
@@ -40,7 +40,7 @@ var shouldCollapseMargin = function shouldCollapseMargin(prevNode, nextNode) {
40
40
  return true;
41
41
  };
42
42
  var getGapAndOffset = function getGapAndOffset(prevNode, nextNode, parentNode) {
43
- var isSyncBlockOffsetPatchEnabled = expValEquals('platform_synced_block', 'isEnabled', true) && fg('platform_synced_block_patch_2');
43
+ var isSyncBlockOffsetPatchEnabled = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2');
44
44
  if (!prevNode && nextNode) {
45
45
  // first node - adjust for bodied containers
46
46
  var _offset = 0;
@@ -250,7 +250,7 @@ export var dropTargetDecorations = function dropTargetDecorations(newState, api,
250
250
  return false; //not valid pos, so nested not valid either
251
251
  }
252
252
  }
253
- var parentTypesWithEndDropTarget = expValEquals('platform_synced_block', 'isEnabled', true) && fg('platform_synced_block_patch_2') ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
253
+ var parentTypesWithEndDropTarget = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2') ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
254
254
  if (parent.lastChild === node && !isEmptyParagraph(node) && parentTypesWithEndDropTarget.includes(parent.type.name)) {
255
255
  endPos = pos + node.nodeSize;
256
256
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "8.2.1",
3
+ "version": "8.3.0",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",