@atlaskit/editor-plugin-selection 2.1.7 → 2.1.8

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,14 @@
1
1
  # @atlaskit/editor-plugin-selection
2
2
 
3
+ ## 2.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#133479](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/133479)
8
+ [`57fe747245f32`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57fe747245f32) -
9
+ Clean up experiment
10
+ - Updated dependencies
11
+
3
12
  ## 2.1.7
4
13
 
5
14
  ### Patch Changes
@@ -7,7 +7,6 @@ exports.createAutoExpandSelectionRangeOnInlineNodePlugin = void 0;
7
7
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
10
  var _autoExpandSelectionRangeOnInlineNodeKey = require("./auto-expand-selection-range-on-inline-node-key");
12
11
  var createAutoExpandSelectionRangeOnInlineNodePlugin = exports.createAutoExpandSelectionRangeOnInlineNodePlugin = function createAutoExpandSelectionRangeOnInlineNodePlugin() {
13
12
  var mouseDownElement = null;
@@ -54,21 +53,16 @@ var createAutoExpandSelectionRangeOnInlineNodePlugin = exports.createAutoExpandS
54
53
  return;
55
54
  }
56
55
 
57
- // only expand range when experiment is enabled, also fire exposure events here
58
- if ((0, _experiments.editorExperiment)('expand_selection_range_to_include_inline_node', true, {
59
- exposure: true
60
- })) {
61
- // find the document position of the mouse up element
62
- var elementStartPosition = view.posAtDOM(mouseUpElement, 0);
56
+ // find the document position of the mouse up element
57
+ var elementStartPosition = view.posAtDOM(mouseUpElement, 0);
63
58
 
64
- // find out the direction of selection
65
- var isAnchorBeforeElement = selection.$anchor.pos <= elementStartPosition;
66
- var expandedSelectionHeadPosition = isAnchorBeforeElement ? elementStartPosition + 1 : elementStartPosition;
59
+ // find out the direction of selection
60
+ var isAnchorBeforeElement = selection.$anchor.pos <= elementStartPosition;
61
+ var expandedSelectionHeadPosition = isAnchorBeforeElement ? elementStartPosition + 1 : elementStartPosition;
67
62
 
68
- // expand the selection to include the mouse up element
69
- var tr = state.tr.setSelection(_state.TextSelection.create(state.doc, selection.$anchor.pos, expandedSelectionHeadPosition));
70
- dispatch(tr);
71
- }
63
+ // expand the selection to include the mouse up element
64
+ var tr = state.tr.setSelection(_state.TextSelection.create(state.doc, selection.$anchor.pos, expandedSelectionHeadPosition));
65
+ dispatch(tr);
72
66
  }
73
67
  }
74
68
  }
@@ -1,7 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
4
  import { autoExpandSelectionRangeOnInlineNodePluginKey } from './auto-expand-selection-range-on-inline-node-key';
6
5
  export const createAutoExpandSelectionRangeOnInlineNodePlugin = () => {
7
6
  let mouseDownElement = null;
@@ -52,21 +51,16 @@ export const createAutoExpandSelectionRangeOnInlineNodePlugin = () => {
52
51
  return;
53
52
  }
54
53
 
55
- // only expand range when experiment is enabled, also fire exposure events here
56
- if (editorExperiment('expand_selection_range_to_include_inline_node', true, {
57
- exposure: true
58
- })) {
59
- // find the document position of the mouse up element
60
- const elementStartPosition = view.posAtDOM(mouseUpElement, 0);
54
+ // find the document position of the mouse up element
55
+ const elementStartPosition = view.posAtDOM(mouseUpElement, 0);
61
56
 
62
- // find out the direction of selection
63
- const isAnchorBeforeElement = selection.$anchor.pos <= elementStartPosition;
64
- const expandedSelectionHeadPosition = isAnchorBeforeElement ? elementStartPosition + 1 : elementStartPosition;
57
+ // find out the direction of selection
58
+ const isAnchorBeforeElement = selection.$anchor.pos <= elementStartPosition;
59
+ const expandedSelectionHeadPosition = isAnchorBeforeElement ? elementStartPosition + 1 : elementStartPosition;
65
60
 
66
- // expand the selection to include the mouse up element
67
- const tr = state.tr.setSelection(TextSelection.create(state.doc, selection.$anchor.pos, expandedSelectionHeadPosition));
68
- dispatch(tr);
69
- }
61
+ // expand the selection to include the mouse up element
62
+ const tr = state.tr.setSelection(TextSelection.create(state.doc, selection.$anchor.pos, expandedSelectionHeadPosition));
63
+ dispatch(tr);
70
64
  }
71
65
  }
72
66
  }
@@ -1,7 +1,6 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
4
  import { autoExpandSelectionRangeOnInlineNodePluginKey } from './auto-expand-selection-range-on-inline-node-key';
6
5
  export var createAutoExpandSelectionRangeOnInlineNodePlugin = function createAutoExpandSelectionRangeOnInlineNodePlugin() {
7
6
  var mouseDownElement = null;
@@ -48,21 +47,16 @@ export var createAutoExpandSelectionRangeOnInlineNodePlugin = function createAut
48
47
  return;
49
48
  }
50
49
 
51
- // only expand range when experiment is enabled, also fire exposure events here
52
- if (editorExperiment('expand_selection_range_to_include_inline_node', true, {
53
- exposure: true
54
- })) {
55
- // find the document position of the mouse up element
56
- var elementStartPosition = view.posAtDOM(mouseUpElement, 0);
50
+ // find the document position of the mouse up element
51
+ var elementStartPosition = view.posAtDOM(mouseUpElement, 0);
57
52
 
58
- // find out the direction of selection
59
- var isAnchorBeforeElement = selection.$anchor.pos <= elementStartPosition;
60
- var expandedSelectionHeadPosition = isAnchorBeforeElement ? elementStartPosition + 1 : elementStartPosition;
53
+ // find out the direction of selection
54
+ var isAnchorBeforeElement = selection.$anchor.pos <= elementStartPosition;
55
+ var expandedSelectionHeadPosition = isAnchorBeforeElement ? elementStartPosition + 1 : elementStartPosition;
61
56
 
62
- // expand the selection to include the mouse up element
63
- var tr = state.tr.setSelection(TextSelection.create(state.doc, selection.$anchor.pos, expandedSelectionHeadPosition));
64
- dispatch(tr);
65
- }
57
+ // expand the selection to include the mouse up element
58
+ var tr = state.tr.setSelection(TextSelection.create(state.doc, selection.$anchor.pos, expandedSelectionHeadPosition));
59
+ dispatch(tr);
66
60
  }
67
61
  }
68
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "Selection plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -20,7 +20,7 @@
20
20
  "runReact18": true
21
21
  },
22
22
  "dependencies": {
23
- "@atlaskit/editor-common": "^103.0.0",
23
+ "@atlaskit/editor-common": "^103.4.0",
24
24
  "@atlaskit/editor-prosemirror": "7.0.0",
25
25
  "@atlaskit/editor-shared-styles": "^3.4.0",
26
26
  "@atlaskit/editor-tables": "^2.9.0",