@atlaskit/editor-plugin-block-controls 1.7.0 → 1.7.2

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,23 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 1.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#123621](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/123621)
8
+ [`4184bd66727cb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4184bd66727cb) -
9
+ Update drag preview opacity on windows
10
+ - Updated dependencies
11
+
12
+ ## 1.7.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [#122706](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/122706)
17
+ [`1d88c71435949`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1d88c71435949) -
18
+ ED-24330 Dispatch meta to set isDragging to false in PM drop handler to remove drop target
19
+ decorations
20
+
3
21
  ## 1.7.0
4
22
 
5
23
  ### Minor Changes
@@ -255,7 +255,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl) {
255
255
  }
256
256
 
257
257
  // Remove drop target decoration when dragging stops
258
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false && !tr.docChanged) {
258
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false && ((0, _platformFeatureFlags.fg)('platform_editor_element_drag_and_drop_ed_24330') ? true : !tr.docChanged)) {
259
259
  var dropTargetDecs = decorations.find().filter(function (_ref11) {
260
260
  var spec = _ref11.spec;
261
261
  return spec.type === 'drop-target-decoration';
@@ -330,7 +330,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl) {
330
330
  handleDOMEvents: {
331
331
  drop: function drop(view, event) {
332
332
  // prosemirror has sends a default transaction on drop (meta where uiEvent is 'drop'),
333
- // this duplicates the an empty version of the node it was dropping,
333
+ // this duplicates an empty version of the node it was dropping,
334
334
  // Adding some check here to prevent that if drop position is within activeNode
335
335
  var state = view.state,
336
336
  dispatch = view.dispatch,
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.dragPreview = void 0;
7
+ var _utils = require("@atlaskit/editor-common/utils");
7
8
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
9
  var _colors = require("@atlaskit/theme/colors");
9
10
  var previewStyle = {
@@ -52,7 +53,7 @@ var dragPreview = exports.dragPreview = function dragPreview(container, dom, nod
52
53
  clonedDom.style.marginRight = '0';
53
54
  clonedDom.style.marginBottom = '0';
54
55
  clonedDom.style.boxShadow = 'none';
55
- clonedDom.style.opacity = (0, _platformFeatureFlags.fg)('platform_editor_elements_drag_and_drop_ed_23189') ? '0.31' : '0.4';
56
+ clonedDom.style.opacity = _utils.browser.windows ? '1' : (0, _platformFeatureFlags.fg)('platform_editor_elements_drag_and_drop_ed_23189') ? '0.31' : '0.4';
56
57
  parent.appendChild(clonedDom);
57
58
  }
58
59
  container.appendChild(parent);
@@ -244,7 +244,7 @@ export const createPlugin = (api, getIntl) => {
244
244
  }
245
245
 
246
246
  // Remove drop target decoration when dragging stops
247
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false && !tr.docChanged) {
247
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false && (fg('platform_editor_element_drag_and_drop_ed_24330') ? true : !tr.docChanged)) {
248
248
  const dropTargetDecs = decorations.find().filter(({
249
249
  spec
250
250
  }) => spec.type === 'drop-target-decoration');
@@ -318,7 +318,7 @@ export const createPlugin = (api, getIntl) => {
318
318
  handleDOMEvents: {
319
319
  drop(view, event) {
320
320
  // prosemirror has sends a default transaction on drop (meta where uiEvent is 'drop'),
321
- // this duplicates the an empty version of the node it was dropping,
321
+ // this duplicates an empty version of the node it was dropping,
322
322
  // Adding some check here to prevent that if drop position is within activeNode
323
323
  const {
324
324
  state,
@@ -1,3 +1,4 @@
1
+ import { browser } from '@atlaskit/editor-common/utils';
1
2
  import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { B200, N20, N30 } from '@atlaskit/theme/colors';
3
4
  const previewStyle = {
@@ -46,7 +47,7 @@ export const dragPreview = (container, dom, nodeType) => {
46
47
  clonedDom.style.marginRight = '0';
47
48
  clonedDom.style.marginBottom = '0';
48
49
  clonedDom.style.boxShadow = 'none';
49
- clonedDom.style.opacity = fg('platform_editor_elements_drag_and_drop_ed_23189') ? '0.31' : '0.4';
50
+ clonedDom.style.opacity = browser.windows ? '1' : fg('platform_editor_elements_drag_and_drop_ed_23189') ? '0.31' : '0.4';
50
51
  parent.appendChild(clonedDom);
51
52
  }
52
53
  container.appendChild(parent);
@@ -248,7 +248,7 @@ export var createPlugin = function createPlugin(api, getIntl) {
248
248
  }
249
249
 
250
250
  // Remove drop target decoration when dragging stops
251
- if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false && !tr.docChanged) {
251
+ if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false && (fg('platform_editor_element_drag_and_drop_ed_24330') ? true : !tr.docChanged)) {
252
252
  var dropTargetDecs = decorations.find().filter(function (_ref11) {
253
253
  var spec = _ref11.spec;
254
254
  return spec.type === 'drop-target-decoration';
@@ -323,7 +323,7 @@ export var createPlugin = function createPlugin(api, getIntl) {
323
323
  handleDOMEvents: {
324
324
  drop: function drop(view, event) {
325
325
  // prosemirror has sends a default transaction on drop (meta where uiEvent is 'drop'),
326
- // this duplicates the an empty version of the node it was dropping,
326
+ // this duplicates an empty version of the node it was dropping,
327
327
  // Adding some check here to prevent that if drop position is within activeNode
328
328
  var state = view.state,
329
329
  dispatch = view.dispatch,
@@ -1,3 +1,4 @@
1
+ import { browser } from '@atlaskit/editor-common/utils';
1
2
  import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { B200, N20, N30 } from '@atlaskit/theme/colors';
3
4
  var previewStyle = {
@@ -46,7 +47,7 @@ export var dragPreview = function dragPreview(container, dom, nodeType) {
46
47
  clonedDom.style.marginRight = '0';
47
48
  clonedDom.style.marginBottom = '0';
48
49
  clonedDom.style.boxShadow = 'none';
49
- clonedDom.style.opacity = fg('platform_editor_elements_drag_and_drop_ed_23189') ? '0.31' : '0.4';
50
+ clonedDom.style.opacity = browser.windows ? '1' : fg('platform_editor_elements_drag_and_drop_ed_23189') ? '0.31' : '0.4';
50
51
  parent.appendChild(clonedDom);
51
52
  }
52
53
  container.appendChild(parent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^39.0.3",
35
- "@atlaskit/editor-common": "^86.4.0",
35
+ "@atlaskit/editor-common": "^86.6.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.4.0",
37
37
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.5",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^1.1.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/editor-prosemirror": "4.0.1",
41
41
  "@atlaskit/editor-shared-styles": "^2.13.0",
42
42
  "@atlaskit/editor-tables": "^2.7.0",
43
- "@atlaskit/icon": "^22.6.0",
43
+ "@atlaskit/icon": "^22.7.0",
44
44
  "@atlaskit/platform-feature-flags": "^0.3.0",
45
45
  "@atlaskit/pragmatic-drag-and-drop": "^1.2.0",
46
46
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",
@@ -157,6 +157,9 @@
157
157
  },
158
158
  "platform_editor_element_drag_and_drop_ed_24150": {
159
159
  "type": "boolean"
160
+ },
161
+ "platform_editor_element_drag_and_drop_ed_24330": {
162
+ "type": "boolean"
160
163
  }
161
164
  }
162
165
  }