@atlaskit/editor-plugin-block-controls 3.19.7 → 3.19.9

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,22 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 3.19.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
8
+ [`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
9
+ Clean up platform_editor_interaction_api_refactor
10
+ - Updated dependencies
11
+
12
+ ## 3.19.8
13
+
14
+ ### Patch Changes
15
+
16
+ - [#174773](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174773)
17
+ [`d7f8b85a927ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d7f8b85a927ef) -
18
+ Fix drop target insertion into breakout mark
19
+
3
20
  ## 3.19.7
4
21
 
5
22
  ### Patch Changes
@@ -202,7 +202,7 @@ var getActiveDropTargetDecorations = exports.getActiveDropTargetDecorations = fu
202
202
  parentNode: state.doc || undefined,
203
203
  formatMessage: formatMessage,
204
204
  dropTargetStyle: 'default'
205
- }, nodeViewPortalProviderAPI, 0, undefined, false));
205
+ }, nodeViewPortalProviderAPI, -1, undefined, false));
206
206
  }
207
207
  rootNodeWithPos = {
208
208
  node: root.node,
@@ -299,7 +299,6 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
299
299
  macroInteractionUpdates = _useDragHandlePluginS.macroInteractionUpdates;
300
300
  var selection = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'selection.selection');
301
301
  var isShiftDown = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockControls.isShiftDown');
302
- var _hasHadInteraction = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'interaction.hasHadInteraction') !== false;
303
302
  var interactionState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'interaction.interactionState');
304
303
  var start = getPos();
305
304
  var isLayoutColumn = nodeType === 'layoutColumn';
@@ -846,7 +845,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
846
845
  var handleOnDrop = function handleOnDrop(event) {
847
846
  (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
848
847
  };
849
- var hasHadInteraction = !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') || ((0, _platformFeatureFlags.fg)('platform_editor_interaction_api_refactor') ? interactionState !== 'hasNotHadInteraction' : _hasHadInteraction !== false);
848
+ var hasHadInteraction = !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') || interactionState !== 'hasNotHadInteraction';
850
849
  var renderButton = function renderButton() {
851
850
  return (
852
851
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
@@ -209,7 +209,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
209
209
  var codeBlock = view.state.schema.nodes.codeBlock;
210
210
  var selection = view.state.selection;
211
211
  var codeBlockParentNode = (0, _utils.findParentNodeOfType)(codeBlock)(selection);
212
- if (codeBlockParentNode && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_11')) {
212
+ if (codeBlockParentNode) {
213
213
  // Slash command is not meant to be triggered inside code block, hence always insert slash in a new line following
214
214
  api.core.actions.execute((0, _editorCommands.createNewLine)(codeBlockParentNode.pos));
215
215
  } else if (isSelectionInsideNode) {
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.isSelectionInNode = exports.isNonEditableBlock = exports.isNestedNodeSelected = exports.isInTextSelection = void 0;
7
7
  var _state = require("@atlaskit/editor-prosemirror/state");
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
8
  var isNestedNodeSelected = exports.isNestedNodeSelected = function isNestedNodeSelected(view) {
10
9
  var selection = view.state.selection;
11
- return selection instanceof _state.NodeSelection && selection.$from.depth > ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_11') ? 0 : 1);
10
+ return selection instanceof _state.NodeSelection && selection.$from.depth > 0;
12
11
  };
13
12
  var isSelectionInNode = exports.isSelectionInNode = function isSelectionInNode(start, view) {
14
13
  var node = view.state.doc.nodeAt(start);
@@ -185,7 +185,7 @@ export const getActiveDropTargetDecorations = (activeDropTargetNode, state, api,
185
185
  parentNode: state.doc || undefined,
186
186
  formatMessage,
187
187
  dropTargetStyle: 'default'
188
- }, nodeViewPortalProviderAPI, 0, undefined, false));
188
+ }, nodeViewPortalProviderAPI, -1, undefined, false));
189
189
  }
190
190
  rootNodeWithPos = {
191
191
  node: root.node,
@@ -278,7 +278,6 @@ export const DragHandle = ({
278
278
  } = useDragHandlePluginState(api);
279
279
  const selection = useSharedPluginStateSelector(api, 'selection.selection');
280
280
  const isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
281
- const _hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
282
281
  const interactionState = useSharedPluginStateSelector(api, 'interaction.interactionState');
283
282
  const start = getPos();
284
283
  const isLayoutColumn = nodeType === 'layoutColumn';
@@ -834,7 +833,7 @@ export const DragHandle = ({
834
833
  const handleOnDrop = event => {
835
834
  editorExperiment('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
836
835
  };
837
- const hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') || (fg('platform_editor_interaction_api_refactor') ? interactionState !== 'hasNotHadInteraction' : _hasHadInteraction !== false);
836
+ const hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') || interactionState !== 'hasNotHadInteraction';
838
837
  const renderButton = () =>
839
838
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
840
839
  jsx("button", {
@@ -204,7 +204,7 @@ export const TypeAheadControl = ({
204
204
  selection
205
205
  } = view.state;
206
206
  const codeBlockParentNode = findParentNodeOfType(codeBlock)(selection);
207
- if (codeBlockParentNode && fg('platform_editor_controls_patch_11')) {
207
+ if (codeBlockParentNode) {
208
208
  // Slash command is not meant to be triggered inside code block, hence always insert slash in a new line following
209
209
  api.core.actions.execute(createNewLine(codeBlockParentNode.pos));
210
210
  } else if (isSelectionInsideNode) {
@@ -1,8 +1,7 @@
1
1
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  export const isNestedNodeSelected = view => {
4
3
  const selection = view.state.selection;
5
- return selection instanceof NodeSelection && selection.$from.depth > (fg('platform_editor_controls_patch_11') ? 0 : 1);
4
+ return selection instanceof NodeSelection && selection.$from.depth > 0;
6
5
  };
7
6
  export const isSelectionInNode = (start, view) => {
8
7
  const node = view.state.doc.nodeAt(start);
@@ -197,7 +197,7 @@ export var getActiveDropTargetDecorations = function getActiveDropTargetDecorati
197
197
  parentNode: state.doc || undefined,
198
198
  formatMessage: formatMessage,
199
199
  dropTargetStyle: 'default'
200
- }, nodeViewPortalProviderAPI, 0, undefined, false));
200
+ }, nodeViewPortalProviderAPI, -1, undefined, false));
201
201
  }
202
202
  rootNodeWithPos = {
203
203
  node: root.node,
@@ -296,7 +296,6 @@ export var DragHandle = function DragHandle(_ref) {
296
296
  macroInteractionUpdates = _useDragHandlePluginS.macroInteractionUpdates;
297
297
  var selection = useSharedPluginStateSelector(api, 'selection.selection');
298
298
  var isShiftDown = useSharedPluginStateSelector(api, 'blockControls.isShiftDown');
299
- var _hasHadInteraction = useSharedPluginStateSelector(api, 'interaction.hasHadInteraction') !== false;
300
299
  var interactionState = useSharedPluginStateSelector(api, 'interaction.interactionState');
301
300
  var start = getPos();
302
301
  var isLayoutColumn = nodeType === 'layoutColumn';
@@ -843,7 +842,7 @@ export var DragHandle = function DragHandle(_ref) {
843
842
  var handleOnDrop = function handleOnDrop(event) {
844
843
  editorExperiment('platform_editor_element_drag_and_drop_multiselect', true) && event.stopPropagation();
845
844
  };
846
- var hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') || (fg('platform_editor_interaction_api_refactor') ? interactionState !== 'hasNotHadInteraction' : _hasHadInteraction !== false);
845
+ var hasHadInteraction = !fg('platform_editor_no_cursor_on_live_doc_init') || interactionState !== 'hasNotHadInteraction';
847
846
  var renderButton = function renderButton() {
848
847
  return (
849
848
  // eslint-disable-next-line @atlaskit/design-system/no-html-button
@@ -204,7 +204,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
204
204
  var codeBlock = view.state.schema.nodes.codeBlock;
205
205
  var selection = view.state.selection;
206
206
  var codeBlockParentNode = findParentNodeOfType(codeBlock)(selection);
207
- if (codeBlockParentNode && fg('platform_editor_controls_patch_11')) {
207
+ if (codeBlockParentNode) {
208
208
  // Slash command is not meant to be triggered inside code block, hence always insert slash in a new line following
209
209
  api.core.actions.execute(createNewLine(codeBlockParentNode.pos));
210
210
  } else if (isSelectionInsideNode) {
@@ -1,8 +1,7 @@
1
1
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  export var isNestedNodeSelected = function isNestedNodeSelected(view) {
4
3
  var selection = view.state.selection;
5
- return selection instanceof NodeSelection && selection.$from.depth > (fg('platform_editor_controls_patch_11') ? 0 : 1);
4
+ return selection instanceof NodeSelection && selection.$from.depth > 0;
6
5
  };
7
6
  export var isSelectionInNode = function isSelectionInNode(start, view) {
8
7
  var node = view.state.doc.nodeAt(start);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "3.19.7",
3
+ "version": "3.19.9",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,12 +33,12 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/adf-schema": "^47.6.0",
36
- "@atlaskit/editor-common": "^107.0.0",
36
+ "@atlaskit/editor-common": "^107.1.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.3.0",
39
39
  "@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
40
40
  "@atlaskit/editor-plugin-feature-flags": "^1.4.0",
41
- "@atlaskit/editor-plugin-interaction": "^2.0.0",
41
+ "@atlaskit/editor-plugin-interaction": "^3.0.0",
42
42
  "@atlaskit/editor-plugin-metrics": "^3.5.0",
43
43
  "@atlaskit/editor-plugin-quick-insert": "^2.6.0",
44
44
  "@atlaskit/editor-plugin-selection": "^2.2.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": "^27.0.0",
51
+ "@atlaskit/icon": "^27.1.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",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/primitives": "^14.9.0",
58
58
  "@atlaskit/theme": "^18.0.0",
59
59
  "@atlaskit/tmp-editor-statsig": "^8.0.0",
60
- "@atlaskit/tokens": "^5.3.0",
60
+ "@atlaskit/tokens": "^5.4.0",
61
61
  "@atlaskit/tooltip": "^20.3.0",
62
62
  "@babel/runtime": "^7.0.0",
63
63
  "@emotion/react": "^11.7.1",
@@ -177,15 +177,9 @@
177
177
  "platform_editor_table_drag_handle_shift_fix": {
178
178
  "type": "boolean"
179
179
  },
180
- "platform_editor_interaction_api_refactor": {
181
- "type": "boolean"
182
- },
183
180
  "dst-a11y__replace-anchor-with-link__editor-jenga": {
184
181
  "type": "boolean"
185
182
  },
186
- "platform_editor_controls_patch_11": {
187
- "type": "boolean"
188
- },
189
183
  "platform_editor_controls_patch_13": {
190
184
  "type": "boolean"
191
185
  },