@atlaskit/editor-plugin-block-controls 3.3.11 → 3.3.13

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 (35) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/editor-commands/move-node.js +1 -3
  3. package/dist/cjs/editor-commands/move-to-layout.js +17 -63
  4. package/dist/cjs/pm-plugins/decorations-drop-target.js +1 -3
  5. package/dist/cjs/pm-plugins/handle-mouse-over.js +1 -1
  6. package/dist/cjs/pm-plugins/main.js +4 -2
  7. package/dist/cjs/pm-plugins/utils/drag-handle-positions.js +2 -7
  8. package/dist/cjs/ui/drag-handle.js +3 -7
  9. package/dist/cjs/ui/drag-preview.js +8 -19
  10. package/dist/cjs/ui/drop-target-layout.js +9 -15
  11. package/dist/cjs/ui/global-styles.js +1 -2
  12. package/dist/cjs/ui/inline-drop-target.js +9 -15
  13. package/dist/es2019/editor-commands/move-node.js +1 -3
  14. package/dist/es2019/editor-commands/move-to-layout.js +6 -54
  15. package/dist/es2019/pm-plugins/decorations-drop-target.js +1 -3
  16. package/dist/es2019/pm-plugins/handle-mouse-over.js +1 -1
  17. package/dist/es2019/pm-plugins/main.js +4 -2
  18. package/dist/es2019/pm-plugins/utils/drag-handle-positions.js +2 -7
  19. package/dist/es2019/ui/drag-handle.js +3 -7
  20. package/dist/es2019/ui/drag-preview.js +9 -20
  21. package/dist/es2019/ui/drop-target-layout.js +10 -16
  22. package/dist/es2019/ui/global-styles.js +1 -2
  23. package/dist/es2019/ui/inline-drop-target.js +10 -16
  24. package/dist/esm/editor-commands/move-node.js +1 -3
  25. package/dist/esm/editor-commands/move-to-layout.js +19 -65
  26. package/dist/esm/pm-plugins/decorations-drop-target.js +1 -3
  27. package/dist/esm/pm-plugins/handle-mouse-over.js +1 -1
  28. package/dist/esm/pm-plugins/main.js +4 -2
  29. package/dist/esm/pm-plugins/utils/drag-handle-positions.js +2 -7
  30. package/dist/esm/ui/drag-handle.js +3 -7
  31. package/dist/esm/ui/drag-preview.js +9 -20
  32. package/dist/esm/ui/drop-target-layout.js +9 -15
  33. package/dist/esm/ui/global-styles.js +1 -2
  34. package/dist/esm/ui/inline-drop-target.js +9 -15
  35. package/package.json +4 -10
@@ -11,7 +11,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
12
12
  import { css, jsx } from '@emotion/react';
13
13
  import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
14
- import { fg } from '@atlaskit/platform-feature-flags';
15
14
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
16
15
  import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
17
16
  import { B200 } from '@atlaskit/theme/colors';
@@ -183,7 +182,7 @@ export var InlineDropTarget = function InlineDropTarget(_ref) {
183
182
  var toPos = getPos();
184
183
  var mappedTo;
185
184
  if (activeNode && toPos !== undefined) {
186
- var _api$core;
185
+ var _api$core, _api$core2;
187
186
  var start = activeNode.pos;
188
187
  var moveToEnd = position === 'right';
189
188
  api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
@@ -194,22 +193,17 @@ export var InlineDropTarget = function InlineDropTarget(_ref) {
194
193
  })({
195
194
  tr: tr
196
195
  });
197
- if (fg('platform_editor_advanced_layouts_post_fix_patch_1')) {
198
- var insertLayoutStep = getInsertLayoutStep(tr);
199
- mappedTo = insertLayoutStep === null || insertLayoutStep === void 0 ? void 0 : insertLayoutStep.from;
196
+ var insertLayoutStep = getInsertLayoutStep(tr);
197
+ mappedTo = insertLayoutStep === null || insertLayoutStep === void 0 ? void 0 : insertLayoutStep.from;
198
+ return tr;
199
+ });
200
+ api === null || api === void 0 || (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute(function (_ref4) {
201
+ var tr = _ref4.tr;
202
+ if (mappedTo !== undefined) {
203
+ updateSelection(tr, mappedTo, moveToEnd);
200
204
  }
201
205
  return tr;
202
206
  });
203
- if (fg('platform_editor_advanced_layouts_post_fix_patch_1')) {
204
- var _api$core2;
205
- api === null || api === void 0 || (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute(function (_ref4) {
206
- var tr = _ref4.tr;
207
- if (mappedTo !== undefined) {
208
- updateSelection(tr, mappedTo, moveToEnd);
209
- }
210
- return tr;
211
- });
212
- }
213
207
  }
214
208
  }, [api, getPos, position]);
215
209
  var hoverZoneRectStyle = useMemo(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.3.11",
3
+ "version": "3.3.13",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^47.6.0",
36
- "@atlaskit/editor-common": "^102.4.0",
36
+ "@atlaskit/editor-common": "^102.7.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
- "@atlaskit/editor-plugin-analytics": "^2.1.0",
38
+ "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
40
40
  "@atlaskit/editor-plugin-feature-flags": "^1.3.0",
41
41
  "@atlaskit/editor-plugin-metrics": "^3.4.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/primitives": "^14.1.0",
54
54
  "@atlaskit/theme": "^18.0.0",
55
55
  "@atlaskit/tmp-editor-statsig": "^3.6.0",
56
- "@atlaskit/tokens": "^4.4.0",
56
+ "@atlaskit/tokens": "^4.5.0",
57
57
  "@atlaskit/tooltip": "^20.0.0",
58
58
  "@babel/runtime": "^7.0.0",
59
59
  "@emotion/react": "^11.7.1",
@@ -110,9 +110,6 @@
110
110
  "type": "boolean",
111
111
  "referenceOnly": true
112
112
  },
113
- "platform_editor_elements_drag_and_drop_ed_23189": {
114
- "type": "boolean"
115
- },
116
113
  "platform_editor_element_drag_and_drop_ed_23873": {
117
114
  "type": "boolean"
118
115
  },
@@ -125,9 +122,6 @@
125
122
  "platform_editor_use_nested_table_pm_nodes": {
126
123
  "type": "boolean"
127
124
  },
128
- "platform_editor_advanced_layouts_post_fix_patch_1": {
129
- "type": "boolean"
130
- },
131
125
  "platform_editor_advanced_layouts_post_fix_patch_2": {
132
126
  "type": "boolean"
133
127
  },