@atlaskit/editor-plugin-selection 1.2.6 → 1.2.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,19 @@
1
1
  # @atlaskit/editor-plugin-selection
2
2
 
3
+ ## 1.2.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.2.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [#111382](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111382)
14
+ [`5ce3f135c6211`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5ce3f135c6211) -
15
+ Cleanup feature flag to protect for explicit HTML element check in some places.
16
+
3
17
  ## 1.2.6
4
18
 
5
19
  ### Patch Changes
@@ -10,7 +10,6 @@ var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _utils = require("@atlaskit/editor-prosemirror/utils");
11
11
  var _view2 = require("@atlaskit/editor-prosemirror/view");
12
12
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _actions = require("../gap-cursor/actions");
15
14
  var _direction = require("../gap-cursor/direction");
16
15
  var _utils2 = require("../gap-cursor/utils");
@@ -113,14 +112,8 @@ var plugin = new _safePlugin.SafePlugin({
113
112
  left: event.clientX,
114
113
  top: event.clientY
115
114
  });
116
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.explicit-html-element-check')) {
117
- if (!posAtCoords || (0, _utils2.isIgnoredClick)(event.target instanceof HTMLElement ? event.target : null)) {
118
- return false;
119
- }
120
- } else {
121
- if (!posAtCoords || (0, _utils2.isIgnoredClick)(event.target)) {
122
- return false;
123
- }
115
+ if (!posAtCoords || (0, _utils2.isIgnoredClick)(event.target instanceof HTMLElement ? event.target : null)) {
116
+ return false;
124
117
  }
125
118
  var isInsideTheTarget = posAtCoords.pos === posAtCoords.inside;
126
119
  if (isInsideTheTarget) {
@@ -4,7 +4,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findPositionOfNodeBefore } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
6
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
7
  import { deleteNode } from '../gap-cursor/actions';
9
8
  import { Direction } from '../gap-cursor/direction';
10
9
  import { getLayoutModeFromTargetNode, isIgnoredClick } from '../gap-cursor/utils';
@@ -111,14 +110,8 @@ const plugin = new SafePlugin({
111
110
  left: event.clientX,
112
111
  top: event.clientY
113
112
  });
114
- if (getBooleanFF('platform.editor.explicit-html-element-check')) {
115
- if (!posAtCoords || isIgnoredClick(event.target instanceof HTMLElement ? event.target : null)) {
116
- return false;
117
- }
118
- } else {
119
- if (!posAtCoords || isIgnoredClick(event.target)) {
120
- return false;
121
- }
113
+ if (!posAtCoords || isIgnoredClick(event.target instanceof HTMLElement ? event.target : null)) {
114
+ return false;
122
115
  }
123
116
  const isInsideTheTarget = posAtCoords.pos === posAtCoords.inside;
124
117
  if (isInsideTheTarget) {
@@ -4,7 +4,6 @@ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { findPositionOfNodeBefore } from '@atlaskit/editor-prosemirror/utils';
5
5
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
6
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
7
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
7
  import { deleteNode } from '../gap-cursor/actions';
9
8
  import { Direction } from '../gap-cursor/direction';
10
9
  import { getLayoutModeFromTargetNode, isIgnoredClick } from '../gap-cursor/utils';
@@ -107,14 +106,8 @@ var plugin = new SafePlugin({
107
106
  left: event.clientX,
108
107
  top: event.clientY
109
108
  });
110
- if (getBooleanFF('platform.editor.explicit-html-element-check')) {
111
- if (!posAtCoords || isIgnoredClick(event.target instanceof HTMLElement ? event.target : null)) {
112
- return false;
113
- }
114
- } else {
115
- if (!posAtCoords || isIgnoredClick(event.target)) {
116
- return false;
117
- }
109
+ if (!posAtCoords || isIgnoredClick(event.target instanceof HTMLElement ? event.target : null)) {
110
+ return false;
118
111
  }
119
112
  var isInsideTheTarget = posAtCoords.pos === posAtCoords.inside;
120
113
  if (isInsideTheTarget) {
package/package.json CHANGED
@@ -1,90 +1,87 @@
1
1
  {
2
- "name": "@atlaskit/editor-plugin-selection",
3
- "version": "1.2.6",
4
- "description": "Selection plugin for @atlaskit/editor-core",
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org/"
7
- },
8
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
- "author": "Atlassian Pty Ltd",
10
- "license": "Apache-2.0",
11
- "main": "dist/cjs/index.js",
12
- "module": "dist/esm/index.js",
13
- "module:es2019": "dist/es2019/index.js",
14
- "types": "dist/types/index.d.ts",
15
- "sideEffects": false,
16
- "atlaskit:src": "src/index.ts",
17
- "atlassian": {
18
- "team": "Editor: Lego",
19
- "releaseModel": "continuous",
20
- "singleton": true,
21
- "runReact18": false
22
- },
23
- "dependencies": {
24
- "@atlaskit/editor-common": "^82.0.0",
25
- "@atlaskit/editor-prosemirror": "4.0.1",
26
- "@atlaskit/editor-shared-styles": "^2.12.0",
27
- "@atlaskit/editor-tables": "^2.7.0",
28
- "@atlaskit/platform-feature-flags": "^0.2.4",
29
- "@babel/runtime": "^7.0.0"
30
- },
31
- "peerDependencies": {
32
- "react": "^16.8.0"
33
- },
34
- "devDependencies": {
35
- "typescript": "~5.4.2"
36
- },
37
- "techstack": {
38
- "@atlassian/frontend": {
39
- "import-structure": [
40
- "atlassian-conventions"
41
- ],
42
- "circular-dependencies": [
43
- "file-and-folder-level"
44
- ]
45
- },
46
- "@repo/internal": {
47
- "dom-events": "use-bind-event-listener",
48
- "analytics": [
49
- "analytics-next"
50
- ],
51
- "design-tokens": [
52
- "color"
53
- ],
54
- "theming": [
55
- "react-context"
56
- ],
57
- "ui-components": [
58
- "lite-mode"
59
- ],
60
- "deprecation": "no-deprecated-imports",
61
- "styling": [
62
- "emotion",
63
- "emotion"
64
- ],
65
- "imports": [
66
- "import-no-extraneous-disable-for-examples-and-docs"
67
- ]
68
- }
69
- },
70
- "af:exports": {
71
- ".": "./src/index.ts",
72
- "./types": "./src/types.ts"
73
- },
74
- "stricter": {
75
- "no-unused-dependencies": {
76
- "checkDevDependencies": true
77
- }
78
- },
79
- "platform-feature-flags": {
80
- "platform.editor.change-navigation-for-atom-nodes": {
81
- "type": "boolean"
82
- },
83
- "platform.editor.single-player-expand": {
84
- "type": "boolean"
85
- },
86
- "platform.editor.explicit-html-element-check": {
87
- "type": "boolean"
88
- }
89
- }
90
- }
2
+ "name": "@atlaskit/editor-plugin-selection",
3
+ "version": "1.2.8",
4
+ "description": "Selection plugin for @atlaskit/editor-core",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
9
+ "author": "Atlassian Pty Ltd",
10
+ "license": "Apache-2.0",
11
+ "main": "dist/cjs/index.js",
12
+ "module": "dist/esm/index.js",
13
+ "module:es2019": "dist/es2019/index.js",
14
+ "types": "dist/types/index.d.ts",
15
+ "sideEffects": false,
16
+ "atlaskit:src": "src/index.ts",
17
+ "atlassian": {
18
+ "team": "Editor: Lego",
19
+ "releaseModel": "continuous",
20
+ "singleton": true,
21
+ "runReact18": false
22
+ },
23
+ "dependencies": {
24
+ "@atlaskit/editor-common": "^83.0.0",
25
+ "@atlaskit/editor-prosemirror": "4.0.1",
26
+ "@atlaskit/editor-shared-styles": "^2.12.0",
27
+ "@atlaskit/editor-tables": "^2.7.0",
28
+ "@atlaskit/platform-feature-flags": "^0.2.4",
29
+ "@babel/runtime": "^7.0.0"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "^16.8.0"
33
+ },
34
+ "devDependencies": {
35
+ "typescript": "~5.4.2"
36
+ },
37
+ "techstack": {
38
+ "@atlassian/frontend": {
39
+ "import-structure": [
40
+ "atlassian-conventions"
41
+ ],
42
+ "circular-dependencies": [
43
+ "file-and-folder-level"
44
+ ]
45
+ },
46
+ "@repo/internal": {
47
+ "dom-events": "use-bind-event-listener",
48
+ "analytics": [
49
+ "analytics-next"
50
+ ],
51
+ "design-tokens": [
52
+ "color"
53
+ ],
54
+ "theming": [
55
+ "react-context"
56
+ ],
57
+ "ui-components": [
58
+ "lite-mode"
59
+ ],
60
+ "deprecation": "no-deprecated-imports",
61
+ "styling": [
62
+ "emotion",
63
+ "emotion"
64
+ ],
65
+ "imports": [
66
+ "import-no-extraneous-disable-for-examples-and-docs"
67
+ ]
68
+ }
69
+ },
70
+ "af:exports": {
71
+ ".": "./src/index.ts",
72
+ "./types": "./src/types.ts"
73
+ },
74
+ "stricter": {
75
+ "no-unused-dependencies": {
76
+ "checkDevDependencies": true
77
+ }
78
+ },
79
+ "platform-feature-flags": {
80
+ "platform.editor.change-navigation-for-atom-nodes": {
81
+ "type": "boolean"
82
+ },
83
+ "platform.editor.single-player-expand": {
84
+ "type": "boolean"
85
+ }
86
+ }
87
+ }