@atlaskit/editor-plugin-block-controls 8.5.0 → 8.5.1

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
+ ## 8.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`85444e8a5672a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85444e8a5672a) -
8
+ EDITOR-5526 clean up platform_synced_block_patch_2
9
+ - Updated dependencies
10
+
3
11
  ## 8.5.0
4
12
 
5
13
  ### Minor Changes
@@ -11,7 +11,6 @@ var _uuid = _interopRequireDefault(require("uuid"));
11
11
  var _selection = require("@atlaskit/editor-common/selection");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
13
  var _view = require("@atlaskit/editor-prosemirror/view");
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 _consts = require("../ui/consts");
@@ -46,7 +45,7 @@ var shouldCollapseMargin = function shouldCollapseMargin(prevNode, nextNode) {
46
45
  return true;
47
46
  };
48
47
  var getGapAndOffset = function getGapAndOffset(prevNode, nextNode, parentNode) {
49
- var isSyncBlockOffsetPatchEnabled = (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_2');
48
+ var isSyncBlockOffsetPatchEnabled = (0, _experiments.editorExperiment)('platform_synced_block', true);
50
49
  if (!prevNode && nextNode) {
51
50
  // first node - adjust for bodied containers
52
51
  var _offset = 0;
@@ -256,7 +255,7 @@ var dropTargetDecorations = exports.dropTargetDecorations = function dropTargetD
256
255
  return false; //not valid pos, so nested not valid either
257
256
  }
258
257
  }
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;
258
+ var parentTypesWithEndDropTarget = (0, _experiments.editorExperiment)('platform_synced_block', true) ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
260
259
  if (parent.lastChild === node && !(0, _utils.isEmptyParagraph)(node) && parentTypesWithEndDropTarget.includes(parent.type.name)) {
261
260
  endPos = pos + node.nodeSize;
262
261
  }
@@ -4,7 +4,6 @@ import uuid from 'uuid';
4
4
  import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
5
5
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
6
6
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
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 { nodeMargins } from '../ui/consts';
@@ -37,7 +36,7 @@ const shouldCollapseMargin = (prevNode, nextNode) => {
37
36
  return true;
38
37
  };
39
38
  const getGapAndOffset = (prevNode, nextNode, parentNode) => {
40
- const isSyncBlockOffsetPatchEnabled = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2');
39
+ const isSyncBlockOffsetPatchEnabled = editorExperiment('platform_synced_block', true);
41
40
  if (!prevNode && nextNode) {
42
41
  // first node - adjust for bodied containers
43
42
  let offset = 0;
@@ -245,7 +244,7 @@ export const dropTargetDecorations = (newState, api, formatMessage, nodeViewPort
245
244
  return false; //not valid pos, so nested not valid either
246
245
  }
247
246
  }
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;
247
+ const parentTypesWithEndDropTarget = editorExperiment('platform_synced_block', true) ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
249
248
  if (parent.lastChild === node && !isEmptyParagraph(node) && parentTypesWithEndDropTarget.includes(parent.type.name)) {
250
249
  endPos = pos + node.nodeSize;
251
250
  }
@@ -7,7 +7,6 @@ import uuid from 'uuid';
7
7
  import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
8
8
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
9
9
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
12
  import { nodeMargins } from '../ui/consts';
@@ -40,7 +39,7 @@ var shouldCollapseMargin = function shouldCollapseMargin(prevNode, nextNode) {
40
39
  return true;
41
40
  };
42
41
  var getGapAndOffset = function getGapAndOffset(prevNode, nextNode, parentNode) {
43
- var isSyncBlockOffsetPatchEnabled = editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_2');
42
+ var isSyncBlockOffsetPatchEnabled = editorExperiment('platform_synced_block', true);
44
43
  if (!prevNode && nextNode) {
45
44
  // first node - adjust for bodied containers
46
45
  var _offset = 0;
@@ -250,7 +249,7 @@ export var dropTargetDecorations = function dropTargetDecorations(newState, api,
250
249
  return false; //not valid pos, so nested not valid either
251
250
  }
252
251
  }
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;
252
+ var parentTypesWithEndDropTarget = editorExperiment('platform_synced_block', true) ? PARENT_WITH_END_DROP_TARGET_NEXT : PARENT_WITH_END_DROP_TARGET;
254
253
  if (parent.lastChild === node && !isEmptyParagraph(node) && parentTypesWithEndDropTarget.includes(parent.type.name)) {
255
254
  endPos = pos + node.nodeSize;
256
255
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "8.5.0",
3
+ "version": "8.5.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
57
57
  "@atlaskit/primitives": "^18.0.0",
58
58
  "@atlaskit/theme": "^21.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^29.2.0",
59
+ "@atlaskit/tmp-editor-statsig": "^29.5.0",
60
60
  "@atlaskit/tokens": "^11.0.0",
61
61
  "@atlaskit/tooltip": "^20.14.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^111.18.0",
70
+ "@atlaskit/editor-common": "^111.19.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -147,9 +147,6 @@
147
147
  "platform_editor_native_anchor_patch_2": {
148
148
  "type": "boolean"
149
149
  },
150
- "platform_synced_block_patch_2": {
151
- "type": "boolean"
152
- },
153
150
  "platform_editor_selection_sync_fix": {
154
151
  "type": "boolean"
155
152
  }