@atlaskit/editor-plugin-block-controls 3.10.3 → 3.11.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,27 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 3.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#140969](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/140969)
8
+ [`b4ac22e73d43c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4ac22e73d43c) -
9
+ [ux] [ED-27253] hide selection states until editor has been interacted with
10
+ - Updated dependencies
11
+
12
+ ## 3.11.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#141095](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/141095)
17
+ [`5f0694bcf5c1f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f0694bcf5c1f) -
18
+ Add UserIntentPlugin as an optional dependency, and add its corresponding package as package
19
+ dependency
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 3.10.3
4
26
 
5
27
  ### Patch Changes
@@ -114,6 +114,12 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
114
114
  tr: tr
115
115
  });
116
116
  }
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
+ }
117
123
  return tr;
118
124
  };
119
125
  },
@@ -83,12 +83,15 @@ var destroyFn = function destroyFn(api, editorView) {
83
83
  if (isHTMLElement(scrollable)) {
84
84
  scrollable.style.setProperty('scroll-behavior', null);
85
85
  }
86
- api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
86
+ if (!api) {
87
+ return;
88
+ }
89
+ (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
87
90
  var tr = _ref3.tr;
88
91
  var isMultiSelect = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
89
92
  if (isMultiSelect) {
90
93
  var _api$blockControls, _api$selection;
91
- var _ref4 = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
94
+ var _ref4 = ((_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
92
95
  multiSelectDnD = _ref4.multiSelectDnD;
93
96
  // Restore the users initial Editor selection when the drop completes
94
97
  if (multiSelectDnD) {
@@ -105,7 +108,7 @@ var destroyFn = function destroyFn(api, editorView) {
105
108
  }
106
109
  }
107
110
  }
108
- api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 || _api$selection.commands.clearManualSelection()({
111
+ (_api$selection = api.selection) === null || _api$selection === void 0 || _api$selection.commands.clearManualSelection()({
109
112
  tr: tr
110
113
  });
111
114
  }
@@ -116,7 +119,7 @@ var destroyFn = function destroyFn(api, editorView) {
116
119
  if (lastDragCancelled) {
117
120
  var _api$analytics2;
118
121
  var nodeTypes, hasSelectedMultipleNodes;
119
- if (isMultiSelect && api) {
122
+ if (isMultiSelect) {
120
123
  var position = (0, _selection2.getSelectedSlicePosition)(start, tr, api);
121
124
  var attributes = (0, _analytics2.getMultiSelectAnalyticsAttributes)(tr, position.from, position.to);
122
125
  nodeTypes = attributes.nodeTypes;
@@ -124,7 +127,7 @@ var destroyFn = function destroyFn(api, editorView) {
124
127
  }
125
128
  var resolvedMovingNode = tr.doc.resolve(start);
126
129
  var maybeNode = resolvedMovingNode.nodeAfter;
127
- api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
130
+ (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
128
131
  eventType: _analytics.EVENT_TYPE.UI,
129
132
  action: _analytics.ACTION.CANCELLED,
130
133
  actionSubject: _analytics.ACTION_SUBJECT.DRAG,
@@ -140,7 +143,13 @@ var destroyFn = function destroyFn(api, editorView) {
140
143
  }
141
144
  if ((0, _platformFeatureFlags.fg)('platform_editor_ease_of_use_metrics')) {
142
145
  var _api$metrics;
143
- api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.startActiveSessionTimer()({
146
+ (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.startActiveSessionTimer()({
147
+ tr: tr
148
+ });
149
+ }
150
+ if ((0, _platformFeatureFlags.fg)('platform_editor_user_intent_plugin')) {
151
+ var _api$userIntent;
152
+ (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
144
153
  tr: tr
145
154
  });
146
155
  }
@@ -278,6 +278,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
278
278
  featureFlagsState = _useSharedPluginState.featureFlagsState;
279
279
  var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
280
280
  var isShiftDown = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockControls.isShiftDown');
281
+ var hasHadInteraction = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'interaction.hasHadInteraction') !== false;
281
282
  var isLayoutColumn = nodeType === 'layoutColumn';
282
283
  var isMultiSelect = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
283
284
  (0, _react.useEffect)(function () {
@@ -753,7 +754,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
753
754
  css: [(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_sticky_controls') ? dragHandleButtonStyles : dragHandleButtonStylesOld, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && dragHandleColor,
754
755
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
755
756
  // See https://product-fabric.atlassian.net/browse/ED-26266
756
- _browser.browser.gecko && (0, _platformFeatureFlags.fg)('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
757
+ _browser.browser.gecko && (0, _platformFeatureFlags.fg)('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && (!(0, _platformFeatureFlags.fg)('platform_editor_no_selection_until_interaction') || hasHadInteraction) && selectedStyles],
757
758
  ref: buttonRef
758
759
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
759
760
  ,
@@ -105,6 +105,12 @@ export const blockControlsPlugin = ({
105
105
  tr
106
106
  });
107
107
  }
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
+ }
108
114
  return tr;
109
115
  },
110
116
  setMultiSelectPositions: (anchor, head) => ({
@@ -75,7 +75,10 @@ const destroyFn = (api, editorView) => {
75
75
  if (isHTMLElement(scrollable)) {
76
76
  scrollable.style.setProperty('scroll-behavior', null);
77
77
  }
78
- api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(({
78
+ if (!api) {
79
+ return;
80
+ }
81
+ (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(({
79
82
  tr
80
83
  }) => {
81
84
  const isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
@@ -83,7 +86,7 @@ const destroyFn = (api, editorView) => {
83
86
  var _api$blockControls, _api$selection;
84
87
  const {
85
88
  multiSelectDnD
86
- } = (api === null || api === void 0 ? void 0 : (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {};
89
+ } = ((_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {};
87
90
  // Restore the users initial Editor selection when the drop completes
88
91
  if (multiSelectDnD) {
89
92
  // If the TextSelection between the drag start and end has changed, the document has changed, and we should not reapply the last selection
@@ -99,7 +102,7 @@ const destroyFn = (api, editorView) => {
99
102
  }
100
103
  }
101
104
  }
102
- api === null || api === void 0 ? void 0 : (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.commands.clearManualSelection()({
105
+ (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.commands.clearManualSelection()({
103
106
  tr
104
107
  });
105
108
  }
@@ -111,7 +114,7 @@ const destroyFn = (api, editorView) => {
111
114
  if (lastDragCancelled) {
112
115
  var _api$analytics2;
113
116
  let nodeTypes, hasSelectedMultipleNodes;
114
- if (isMultiSelect && api) {
117
+ if (isMultiSelect) {
115
118
  const position = getSelectedSlicePosition(start, tr, api);
116
119
  const attributes = getMultiSelectAnalyticsAttributes(tr, position.from, position.to);
117
120
  nodeTypes = attributes.nodeTypes;
@@ -119,7 +122,7 @@ const destroyFn = (api, editorView) => {
119
122
  }
120
123
  const resolvedMovingNode = tr.doc.resolve(start);
121
124
  const maybeNode = resolvedMovingNode.nodeAfter;
122
- api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
125
+ (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.attachAnalyticsEvent({
123
126
  eventType: EVENT_TYPE.UI,
124
127
  action: ACTION.CANCELLED,
125
128
  actionSubject: ACTION_SUBJECT.DRAG,
@@ -136,7 +139,13 @@ const destroyFn = (api, editorView) => {
136
139
  }
137
140
  if (fg('platform_editor_ease_of_use_metrics')) {
138
141
  var _api$metrics;
139
- api === null || api === void 0 ? void 0 : (_api$metrics = api.metrics) === null || _api$metrics === void 0 ? void 0 : _api$metrics.commands.startActiveSessionTimer()({
142
+ (_api$metrics = api.metrics) === null || _api$metrics === void 0 ? void 0 : _api$metrics.commands.startActiveSessionTimer()({
143
+ tr
144
+ });
145
+ }
146
+ if (fg('platform_editor_user_intent_plugin')) {
147
+ var _api$userIntent;
148
+ (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 ? void 0 : _api$userIntent.commands.setCurrentUserIntent('default')({
140
149
  tr
141
150
  });
142
151
  }
@@ -262,6 +262,7 @@ export const DragHandle = ({
262
262
  } = useSharedPluginState(api, ['featureFlags']);
263
263
  const selection = useSharedPluginStateSelector(api, 'selection.selection');
264
264
  const isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
265
+ const hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
265
266
  const isLayoutColumn = nodeType === 'layoutColumn';
266
267
  const isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
267
268
  useEffect(() => {
@@ -740,7 +741,7 @@ export const DragHandle = ({
740
741
  css: [editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_sticky_controls') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
741
742
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
742
743
  // See https://product-fabric.atlassian.net/browse/ED-26266
743
- browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
744
+ browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && (!fg('platform_editor_no_selection_until_interaction') || hasHadInteraction) && selectedStyles],
744
745
  ref: buttonRef
745
746
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
746
747
  ,
@@ -107,6 +107,12 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
107
107
  tr: tr
108
108
  });
109
109
  }
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
+ }
110
116
  return tr;
111
117
  };
112
118
  },
@@ -76,12 +76,15 @@ var destroyFn = function destroyFn(api, editorView) {
76
76
  if (isHTMLElement(scrollable)) {
77
77
  scrollable.style.setProperty('scroll-behavior', null);
78
78
  }
79
- api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
79
+ if (!api) {
80
+ return;
81
+ }
82
+ (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(function (_ref3) {
80
83
  var tr = _ref3.tr;
81
84
  var isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
82
85
  if (isMultiSelect) {
83
86
  var _api$blockControls, _api$selection;
84
- var _ref4 = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
87
+ var _ref4 = ((_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
85
88
  multiSelectDnD = _ref4.multiSelectDnD;
86
89
  // Restore the users initial Editor selection when the drop completes
87
90
  if (multiSelectDnD) {
@@ -98,7 +101,7 @@ var destroyFn = function destroyFn(api, editorView) {
98
101
  }
99
102
  }
100
103
  }
101
- api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 || _api$selection.commands.clearManualSelection()({
104
+ (_api$selection = api.selection) === null || _api$selection === void 0 || _api$selection.commands.clearManualSelection()({
102
105
  tr: tr
103
106
  });
104
107
  }
@@ -109,7 +112,7 @@ var destroyFn = function destroyFn(api, editorView) {
109
112
  if (lastDragCancelled) {
110
113
  var _api$analytics2;
111
114
  var nodeTypes, hasSelectedMultipleNodes;
112
- if (isMultiSelect && api) {
115
+ if (isMultiSelect) {
113
116
  var position = getSelectedSlicePosition(start, tr, api);
114
117
  var attributes = getMultiSelectAnalyticsAttributes(tr, position.from, position.to);
115
118
  nodeTypes = attributes.nodeTypes;
@@ -117,7 +120,7 @@ var destroyFn = function destroyFn(api, editorView) {
117
120
  }
118
121
  var resolvedMovingNode = tr.doc.resolve(start);
119
122
  var maybeNode = resolvedMovingNode.nodeAfter;
120
- api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
123
+ (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
121
124
  eventType: EVENT_TYPE.UI,
122
125
  action: ACTION.CANCELLED,
123
126
  actionSubject: ACTION_SUBJECT.DRAG,
@@ -133,7 +136,13 @@ var destroyFn = function destroyFn(api, editorView) {
133
136
  }
134
137
  if (fg('platform_editor_ease_of_use_metrics')) {
135
138
  var _api$metrics;
136
- api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.startActiveSessionTimer()({
139
+ (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.startActiveSessionTimer()({
140
+ tr: tr
141
+ });
142
+ }
143
+ if (fg('platform_editor_user_intent_plugin')) {
144
+ var _api$userIntent;
145
+ (_api$userIntent = api.userIntent) === null || _api$userIntent === void 0 || _api$userIntent.commands.setCurrentUserIntent('default')({
137
146
  tr: tr
138
147
  });
139
148
  }
@@ -275,6 +275,7 @@ export var DragHandle = function DragHandle(_ref) {
275
275
  featureFlagsState = _useSharedPluginState.featureFlagsState;
276
276
  var selection = useSharedPluginStateSelector(api, 'selection.selection');
277
277
  var isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
278
+ var hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
278
279
  var isLayoutColumn = nodeType === 'layoutColumn';
279
280
  var isMultiSelect = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
280
281
  useEffect(function () {
@@ -750,7 +751,7 @@ export var DragHandle = function DragHandle(_ref) {
750
751
  css: [editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_sticky_controls') ? dragHandleButtonStyles : dragHandleButtonStylesOld, editorExperiment('platform_editor_controls', 'variant1') && dragHandleColor,
751
752
  // ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
752
753
  // See https://product-fabric.atlassian.net/browse/ED-26266
753
- browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
754
+ browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && (!fg('platform_editor_no_selection_until_interaction') || hasHadInteraction) && selectedStyles],
754
755
  ref: buttonRef
755
756
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
756
757
  ,
@@ -5,10 +5,12 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
5
5
  import { type AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
7
7
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
+ import { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
8
9
  import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
9
10
  import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
10
11
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
11
12
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
13
+ import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
12
14
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
13
15
  import { type DecorationSet } from '@atlaskit/editor-prosemirror/view';
14
16
  export type ActiveNode = {
@@ -77,7 +79,9 @@ export type BlockControlsPluginDependencies = [
77
79
  OptionalPlugin<QuickInsertPlugin>,
78
80
  OptionalPlugin<TypeAheadPlugin>,
79
81
  OptionalPlugin<SelectionPlugin>,
80
- OptionalPlugin<MetricsPlugin>
82
+ OptionalPlugin<MetricsPlugin>,
83
+ OptionalPlugin<InteractionPlugin>,
84
+ OptionalPlugin<UserIntentPlugin>
81
85
  ];
82
86
  export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
83
87
  dependencies: BlockControlsPluginDependencies;
@@ -5,10 +5,12 @@ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibi
5
5
  import { type AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
7
7
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
+ import { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
8
9
  import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
9
10
  import type { QuickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
10
11
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
11
12
  import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
13
+ import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
12
14
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
13
15
  import { type DecorationSet } from '@atlaskit/editor-prosemirror/view';
14
16
  export type ActiveNode = {
@@ -77,7 +79,9 @@ export type BlockControlsPluginDependencies = [
77
79
  OptionalPlugin<QuickInsertPlugin>,
78
80
  OptionalPlugin<TypeAheadPlugin>,
79
81
  OptionalPlugin<SelectionPlugin>,
80
- OptionalPlugin<MetricsPlugin>
82
+ OptionalPlugin<MetricsPlugin>,
83
+ OptionalPlugin<InteractionPlugin>,
84
+ OptionalPlugin<UserIntentPlugin>
81
85
  ];
82
86
  export type BlockControlsPlugin = NextEditorPlugin<'blockControls', {
83
87
  dependencies: BlockControlsPluginDependencies;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.10.3",
3
+ "version": "3.11.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,15 +33,17 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^47.6.0",
36
- "@atlaskit/editor-common": "^103.9.0",
36
+ "@atlaskit/editor-common": "^103.11.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
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.4.0",
41
+ "@atlaskit/editor-plugin-interaction": "^1.0.0",
41
42
  "@atlaskit/editor-plugin-metrics": "^3.4.0",
42
43
  "@atlaskit/editor-plugin-quick-insert": "^2.4.0",
43
44
  "@atlaskit/editor-plugin-selection": "^2.1.0",
44
45
  "@atlaskit/editor-plugin-type-ahead": "^2.5.0",
46
+ "@atlaskit/editor-plugin-user-intent": "^0.1.0",
45
47
  "@atlaskit/editor-plugin-width": "^3.0.0",
46
48
  "@atlaskit/editor-prosemirror": "7.0.0",
47
49
  "@atlaskit/editor-shared-styles": "^3.4.0",
@@ -176,9 +178,15 @@
176
178
  "platform_editor_controls_patch_5": {
177
179
  "type": "boolean"
178
180
  },
181
+ "platform_editor_user_intent_plugin": {
182
+ "type": "boolean"
183
+ },
179
184
  "platform_editor_controls_sticky_mask": {
180
185
  "type": "boolean"
181
186
  },
187
+ "platform_editor_no_selection_until_interaction": {
188
+ "type": "boolean"
189
+ },
182
190
  "platform_editor_fix_widget_destroy": {
183
191
  "type": "boolean"
184
192
  }