@atlaskit/editor-plugin-selection 1.6.1 → 1.6.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,14 @@
1
1
  # @atlaskit/editor-plugin-selection
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#178297](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178297)
8
+ [`a067ce11e9631`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a067ce11e9631) -
9
+ NO-ISSUE-restrict-auto-selection-expand-on-textselection
10
+ - Updated dependencies
11
+
3
12
  ## 1.6.1
4
13
 
5
14
  ### Patch Changes
@@ -33,8 +33,8 @@ var createAutoExpandSelectionRangeOnInlineNodePlugin = exports.createAutoExpandS
33
33
  state = view.state;
34
34
  var selection = state.selection;
35
35
 
36
- // terminate early if current selection is on a node
37
- if (selection instanceof _state.NodeSelection) {
36
+ // terminate early if current selection is not a text selection -> e.g. table cell selection
37
+ if (!(selection instanceof _state.TextSelection)) {
38
38
  return;
39
39
  }
40
40
 
@@ -1 +1,4 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
1
4
  export { selectionPlugin } from './selectionPlugin';
@@ -1,5 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
2
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { autoExpandSelectionRangeOnInlineNodePluginKey } from './auto-expand-selection-range-on-inline-node-key';
5
5
  export const createAutoExpandSelectionRangeOnInlineNodePlugin = () => {
@@ -31,8 +31,8 @@ export const createAutoExpandSelectionRangeOnInlineNodePlugin = () => {
31
31
  selection
32
32
  } = state;
33
33
 
34
- // terminate early if current selection is on a node
35
- if (selection instanceof NodeSelection) {
34
+ // terminate early if current selection is not a text selection -> e.g. table cell selection
35
+ if (!(selection instanceof TextSelection)) {
36
36
  return;
37
37
  }
38
38
 
package/dist/esm/index.js CHANGED
@@ -1 +1,4 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
1
4
  export { selectionPlugin } from './selectionPlugin';
@@ -1,5 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
2
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { autoExpandSelectionRangeOnInlineNodePluginKey } from './auto-expand-selection-range-on-inline-node-key';
5
5
  export var createAutoExpandSelectionRangeOnInlineNodePlugin = function createAutoExpandSelectionRangeOnInlineNodePlugin() {
@@ -27,8 +27,8 @@ export var createAutoExpandSelectionRangeOnInlineNodePlugin = function createAut
27
27
  state = view.state;
28
28
  var selection = state.selection;
29
29
 
30
- // terminate early if current selection is on a node
31
- if (selection instanceof NodeSelection) {
30
+ // terminate early if current selection is not a text selection -> e.g. table cell selection
31
+ if (!(selection instanceof TextSelection)) {
32
32
  return;
33
33
  }
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "Selection plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -20,12 +20,12 @@
20
20
  "runReact18": true
21
21
  },
22
22
  "dependencies": {
23
- "@atlaskit/editor-common": "^96.4.0",
23
+ "@atlaskit/editor-common": "^96.5.0",
24
24
  "@atlaskit/editor-prosemirror": "6.2.1",
25
25
  "@atlaskit/editor-shared-styles": "^3.2.0",
26
26
  "@atlaskit/editor-tables": "^2.8.0",
27
27
  "@atlaskit/platform-feature-flags": "^0.3.0",
28
- "@atlaskit/tmp-editor-statsig": "2.26.0",
28
+ "@atlaskit/tmp-editor-statsig": "2.26.1",
29
29
  "@atlaskit/tokens": "^2.4.0",
30
30
  "@babel/runtime": "^7.0.0"
31
31
  },