@atlaskit/editor-plugin-block-controls 3.19.1 → 3.19.4

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,31 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 3.19.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#172648](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172648)
8
+ [`3606178de772b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3606178de772b) -
9
+ ED-27422: Clean up platform_editor_element_drag_and_drop_ed_23873
10
+
11
+ ## 3.19.3
12
+
13
+ ### Patch Changes
14
+
15
+ - [#170734](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/170734)
16
+ [`85e062c13a08a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85e062c13a08a) -
17
+ [ED-28213] Clean up platform_editor_user_intent_plugin and
18
+ platform_editor_user_intent_plugin_follow_up
19
+
20
+ ## 3.19.2
21
+
22
+ ### Patch Changes
23
+
24
+ - [#171539](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/171539)
25
+ [`823e66121b671`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/823e66121b671) -
26
+ [ux] Fixes height of the resize handle when advanced layouts feature is enabled.
27
+ - Updated dependencies
28
+
3
29
  ## 3.19.1
4
30
 
5
31
  ### Patch Changes
@@ -91,6 +91,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
91
91
  },
92
92
  setNodeDragged: function setNodeDragged(getPos, anchorName, nodeType) {
93
93
  return function (_ref5) {
94
+ var _api$userIntent;
94
95
  var tr = _ref5.tr;
95
96
  var pos = getPos();
96
97
  if (pos === undefined) {
@@ -114,12 +115,9 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
114
115
  tr: tr
115
116
  });
116
117
  }
117
- if ((0, _platformFeatureFlags.fg)('platform_editor_user_intent_plugin')) {
118
- var _api$userIntent;
119
- api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('dragging')({
120
- tr: tr
121
- });
122
- }
118
+ api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('dragging')({
119
+ tr: tr
120
+ });
123
121
  return tr;
124
122
  };
125
123
  },
@@ -8,15 +8,15 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _transform = require("@atlaskit/editor-prosemirror/transform");
10
10
  var _view = require("@atlaskit/editor-prosemirror/view");
11
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
12
  var firstNodeDecPluginKey = exports.firstNodeDecPluginKey = new _state.PluginKey('firstNodeDec');
13
13
  var createFirstNodeDecSet = function createFirstNodeDecSet(state) {
14
14
  var firstNode = state.doc.firstChild;
15
15
  if (!firstNode) {
16
16
  return _view.DecorationSet.empty;
17
17
  }
18
- var firstNodeDecoration = (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) ? _view.Decoration.node(0, firstNode.nodeSize, {
19
- style: 'margin-top: 0',
18
+ var firstNodeDecoration = (0, _expValEquals.expValEquals)('platform_editor_breakout_resizing', 'isEnabled', true) ? _view.Decoration.node(0, firstNode.nodeSize, {
19
+ style: 'margin-top: 0;',
20
20
  class: 'first-node-in-document'
21
21
  }) : _view.Decoration.node(0, firstNode.nodeSize, {
22
22
  style: 'margin-top: 0'
@@ -108,6 +108,7 @@ var destroyFn = function destroyFn(api, editorView) {
108
108
  return;
109
109
  }
110
110
  (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
111
+ var _api$userIntent;
111
112
  var tr = _ref3.tr;
112
113
  var isMultiSelect = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
113
114
  if (isMultiSelect) {
@@ -168,12 +169,9 @@ var destroyFn = function destroyFn(api, editorView) {
168
169
  tr: tr
169
170
  });
170
171
  }
171
- if ((0, _platformFeatureFlags.fg)('platform_editor_user_intent_plugin')) {
172
- var _api$userIntent;
173
- (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
174
- tr: tr
175
- });
176
- }
172
+ (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
173
+ tr: tr
174
+ });
177
175
  return tr.setMeta(key, _objectSpread(_objectSpread({}, tr.getMeta(key)), {}, {
178
176
  isDragging: false,
179
177
  isPMDragging: false,
@@ -855,7 +855,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
855
855
  css: [(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && dragHandleColor,
856
856
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
857
857
  // See https://product-fabric.atlassian.net/browse/ED-26266
858
- _browser.browser.gecko && (0, _platformFeatureFlags.fg)('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles],
858
+ _browser.browser.gecko && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles],
859
859
  ref: buttonRef
860
860
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
861
861
  ,
@@ -82,6 +82,7 @@ export const blockControlsPlugin = ({
82
82
  setNodeDragged: (getPos, anchorName, nodeType) => ({
83
83
  tr
84
84
  }) => {
85
+ var _api$userIntent;
85
86
  const pos = getPos();
86
87
  if (pos === undefined) {
87
88
  return tr;
@@ -105,12 +106,9 @@ export const blockControlsPlugin = ({
105
106
  tr
106
107
  });
107
108
  }
108
- if (fg('platform_editor_user_intent_plugin')) {
109
- var _api$userIntent;
110
- api === null || api === void 0 ? void 0 : (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('dragging')({
111
- tr
112
- });
113
- }
109
+ api === null || api === void 0 ? void 0 : (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('dragging')({
110
+ tr
111
+ });
114
112
  return tr;
115
113
  },
116
114
  setMultiSelectPositions: (anchor, head) => ({
@@ -2,15 +2,15 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
4
4
  import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
5
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  export const firstNodeDecPluginKey = new PluginKey('firstNodeDec');
7
7
  const createFirstNodeDecSet = state => {
8
8
  const firstNode = state.doc.firstChild;
9
9
  if (!firstNode) {
10
10
  return DecorationSet.empty;
11
11
  }
12
- const firstNodeDecoration = editorExperiment('platform_editor_breakout_resizing', true) ? Decoration.node(0, firstNode.nodeSize, {
13
- style: 'margin-top: 0',
12
+ const firstNodeDecoration = expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) ? Decoration.node(0, firstNode.nodeSize, {
13
+ style: 'margin-top: 0;',
14
14
  class: 'first-node-in-document'
15
15
  }) : Decoration.node(0, firstNode.nodeSize, {
16
16
  style: 'margin-top: 0'
@@ -103,6 +103,7 @@ const destroyFn = (api, editorView) => {
103
103
  (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(({
104
104
  tr
105
105
  }) => {
106
+ var _api$userIntent;
106
107
  const isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
107
108
  if (isMultiSelect) {
108
109
  var _api$blockControls, _api$selection;
@@ -165,12 +166,9 @@ const destroyFn = (api, editorView) => {
165
166
  tr
166
167
  });
167
168
  }
168
- if (fg('platform_editor_user_intent_plugin')) {
169
- var _api$userIntent;
170
- (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('default')({
171
- tr
172
- });
173
- }
169
+ (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('default')({
170
+ tr
171
+ });
174
172
  return tr.setMeta(key, {
175
173
  ...tr.getMeta(key),
176
174
  isDragging: false,
@@ -842,7 +842,7 @@ export const DragHandle = ({
842
842
  css: [editorExperiment('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
843
843
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
844
844
  // See https://product-fabric.atlassian.net/browse/ED-26266
845
- browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles],
845
+ browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles],
846
846
  ref: buttonRef
847
847
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
848
848
  ,
@@ -84,6 +84,7 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
84
84
  },
85
85
  setNodeDragged: function setNodeDragged(getPos, anchorName, nodeType) {
86
86
  return function (_ref5) {
87
+ var _api$userIntent;
87
88
  var tr = _ref5.tr;
88
89
  var pos = getPos();
89
90
  if (pos === undefined) {
@@ -107,12 +108,9 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
107
108
  tr: tr
108
109
  });
109
110
  }
110
- if (fg('platform_editor_user_intent_plugin')) {
111
- var _api$userIntent;
112
- api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('dragging')({
113
- tr: tr
114
- });
115
- }
111
+ api === null || api === void 0 || (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('dragging')({
112
+ tr: tr
113
+ });
116
114
  return tr;
117
115
  };
118
116
  },
@@ -2,15 +2,15 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
3
  import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
4
4
  import { DecorationSet, Decoration } from '@atlaskit/editor-prosemirror/view';
5
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  export var firstNodeDecPluginKey = new PluginKey('firstNodeDec');
7
7
  var createFirstNodeDecSet = function createFirstNodeDecSet(state) {
8
8
  var firstNode = state.doc.firstChild;
9
9
  if (!firstNode) {
10
10
  return DecorationSet.empty;
11
11
  }
12
- var firstNodeDecoration = editorExperiment('platform_editor_breakout_resizing', true) ? Decoration.node(0, firstNode.nodeSize, {
13
- style: 'margin-top: 0',
12
+ var firstNodeDecoration = expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) ? Decoration.node(0, firstNode.nodeSize, {
13
+ style: 'margin-top: 0;',
14
14
  class: 'first-node-in-document'
15
15
  }) : Decoration.node(0, firstNode.nodeSize, {
16
16
  style: 'margin-top: 0'
@@ -101,6 +101,7 @@ var destroyFn = function destroyFn(api, editorView) {
101
101
  return;
102
102
  }
103
103
  (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
104
+ var _api$userIntent;
104
105
  var tr = _ref3.tr;
105
106
  var isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
106
107
  if (isMultiSelect) {
@@ -161,12 +162,9 @@ var destroyFn = function destroyFn(api, editorView) {
161
162
  tr: tr
162
163
  });
163
164
  }
164
- if (fg('platform_editor_user_intent_plugin')) {
165
- var _api$userIntent;
166
- (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
167
- tr: tr
168
- });
169
- }
165
+ (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
166
+ tr: tr
167
+ });
170
168
  return tr.setMeta(key, _objectSpread(_objectSpread({}, tr.getMeta(key)), {}, {
171
169
  isDragging: false,
172
170
  isPMDragging: false,
@@ -852,7 +852,7 @@ export var DragHandle = function DragHandle(_ref) {
852
852
  css: [editorExperiment('platform_editor_controls', 'variant1') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
853
853
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
854
854
  // See https://product-fabric.atlassian.net/browse/ED-26266
855
- browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles],
855
+ browser.gecko && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && hasHadInteraction && selectedStyles],
856
856
  ref: buttonRef
857
857
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
858
858
  ,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.19.1",
3
+ "version": "3.19.4",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^47.6.0",
36
- "@atlaskit/editor-common": "^106.7.0",
36
+ "@atlaskit/editor-common": "^106.9.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
39
- "@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
39
+ "@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
40
40
  "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
41
41
  "@atlaskit/editor-plugin-interaction": "^2.0.0",
42
42
  "@atlaskit/editor-plugin-metrics": "^3.5.0",
43
- "@atlaskit/editor-plugin-quick-insert": "^2.5.0",
43
+ "@atlaskit/editor-plugin-quick-insert": "^2.6.0",
44
44
  "@atlaskit/editor-plugin-selection": "^2.2.0",
45
45
  "@atlaskit/editor-plugin-type-ahead": "^2.7.0",
46
46
  "@atlaskit/editor-plugin-user-intent": "^0.1.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/editor-prosemirror": "7.0.0",
49
49
  "@atlaskit/editor-shared-styles": "^3.4.0",
50
50
  "@atlaskit/editor-tables": "^2.9.0",
51
- "@atlaskit/icon": "^26.4.0",
51
+ "@atlaskit/icon": "^27.0.0",
52
52
  "@atlaskit/link": "^3.2.0",
53
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
54
54
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
57
57
  "@atlaskit/primitives": "^14.8.0",
58
58
  "@atlaskit/theme": "^18.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^7.0.0",
59
+ "@atlaskit/tmp-editor-statsig": "^7.1.0",
60
60
  "@atlaskit/tokens": "^5.2.0",
61
61
  "@atlaskit/tooltip": "^20.3.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -123,9 +123,6 @@
123
123
  "platform_editor_dnd_update_drag_start_target": {
124
124
  "type": "boolean"
125
125
  },
126
- "platform_editor_dnd_handle_highlight_fix_firefox": {
127
- "type": "boolean"
128
- },
129
126
  "platform_editor_track_node_types": {
130
127
  "type": "boolean"
131
128
  },
@@ -174,9 +171,6 @@
174
171
  "platform_editor_controls_patch_7": {
175
172
  "type": "boolean"
176
173
  },
177
- "platform_editor_user_intent_plugin": {
178
- "type": "boolean"
179
- },
180
174
  "platform_editor_no_cursor_on_live_doc_init": {
181
175
  "type": "boolean"
182
176
  },