@atlaskit/editor-plugin-selection 30.0.13 → 30.0.15

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,26 @@
1
1
  # @atlaskit/editor-plugin-selection
2
2
 
3
+ ## 30.0.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5115f648812e3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5115f648812e3) -
8
+ EDITOR-9978: Behind the `platform_editor_improve_inp_batch_2` experiment, reduce selection changes
9
+ and forced layout on clicks. Before calling `posAtCoords`, the gap cursor click handler now skips
10
+ clicks where it can never place a gap cursor: clicks on text or inline content, and clicks on an
11
+ atom node such as media. The media node view no longer re-dispatches a `mediaSingle` selection
12
+ that is already set.
13
+ - Updated dependencies
14
+
15
+ ## 30.0.14
16
+
17
+ ### Patch Changes
18
+
19
+ - [`861d385203ae7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/861d385203ae7) -
20
+ [FFCLEANUP-144039] remove the `platform_editor_lovability_navigation_fixes` experiment to improve
21
+ expand keyboard navigation
22
+ - Updated dependencies
23
+
3
24
  ## 30.0.13
4
25
 
5
26
  ### Patch Changes
@@ -7,7 +7,6 @@ exports.createOnKeydown = createOnKeydown;
7
7
  var _expand = require("@atlaskit/editor-common/expand");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
11
10
  /*
12
11
  * The way expand was built, no browser recognize selection on it.
13
12
  * For instance, when a selection going to a "collapsed" expand
@@ -124,7 +123,7 @@ var isNavigatingVerticallyWhenCursorIsInsideInlineNode = function isNavigatingVe
124
123
  return false;
125
124
  }
126
125
  var isNavigatingInlineNodeDownward = event.key === 'ArrowDown' && Boolean((_selection$$cursor$no3 = selection.$cursor.nodeBefore) === null || _selection$$cursor$no3 === void 0 ? void 0 : _selection$$cursor$no3.isInline) && Boolean((_selection$$cursor$no4 = selection.$cursor.nodeAfter) === null || _selection$$cursor$no4 === void 0 ? void 0 : _selection$$cursor$no4.isInline);
127
- if (isNavigatingInlineNodeDownward && (0, _expand.getNextNodeExpandPos)(view, selection) !== undefined && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_navigation_fixes', 'isEnabled', true)) {
126
+ if (isNavigatingInlineNodeDownward && (0, _expand.getNextNodeExpandPos)(view, selection) !== undefined) {
128
127
  return false;
129
128
  }
130
129
  return isNavigatingInlineNodeDownward;
@@ -9,6 +9,7 @@ exports.getMediaNearPos = getMediaNearPos;
9
9
  exports.isTextBlockNearPos = exports.isLeftCursor = exports.isIgnoredClick = void 0;
10
10
  var _constants = require("@atlaskit/editor-common/media-single/constants");
11
11
  var _selection = require("@atlaskit/editor-common/selection");
12
+ var _selection2 = require("@atlaskit/editor-common/selection/gap-cursor/selection");
12
13
  var _styles = require("@atlaskit/editor-common/styles");
13
14
  var _unsupportedContent = require("@atlaskit/editor-common/styles/unsupported-content");
14
15
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
@@ -90,7 +91,66 @@ function getLayoutModeFromTargetNode(node) {
90
91
  }
91
92
  return layout;
92
93
  }
93
- var isIgnoredClick = exports.isIgnoredClick = function isIgnoredClick(elem) {
94
+ /**
95
+ * Whether `node`, starting at `start`, is an atom whose DOM contains the click target.
96
+ */
97
+ var isClickInsideAtom = function isClickInsideAtom(elem, node, start, view) {
98
+ // ProseMirror counts text as an atom, but a text node can't contain an element.
99
+ if (!(node !== null && node !== void 0 && node.isAtom) || node.isText) {
100
+ return false;
101
+ }
102
+ var dom = view.nodeDOM(start);
103
+ return dom instanceof Node && dom.contains(elem);
104
+ };
105
+
106
+ /**
107
+ * Rule 1: no gap cursor can be placed for a click at `nodePos`.
108
+ *
109
+ * Skips clicks on text and inline atoms (mentions, emoji, status, dates, inline cards), where
110
+ * `nodePos` is inside a textblock. Inside a `mediaSingle` the handler places the gap cursor beside
111
+ * it instead, so clicks beside nested images aren't skipped.
112
+ */
113
+ var cannotPlaceGapCursorAt = function cannotPlaceGapCursorAt($pos) {
114
+ return $pos.parent.type.name !== 'mediaSingle' && !_selection2.GapCursorSelection.valid($pos);
115
+ };
116
+
117
+ /**
118
+ * Rule 2: the click target is inside the DOM of the atom before or after `nodePos`.
119
+ *
120
+ * Skips clicks on block atoms (images, block and embed cards, extensions, dividers), which the
121
+ * handler already ignored via `posAtCoords.inside`. Clicks beside them, outside their DOM, aren't
122
+ * skipped.
123
+ */
124
+ var isClickOnAdjacentAtom = function isClickOnAdjacentAtom(elem, $pos, view) {
125
+ var _nodeBefore$nodeSize;
126
+ var nodeAfter = $pos.nodeAfter,
127
+ nodeBefore = $pos.nodeBefore,
128
+ pos = $pos.pos;
129
+ return isClickInsideAtom(elem, nodeAfter, pos, view) || isClickInsideAtom(elem, nodeBefore, pos - ((_nodeBefore$nodeSize = nodeBefore === null || nodeBefore === void 0 ? void 0 : nodeBefore.nodeSize) !== null && _nodeBefore$nodeSize !== void 0 ? _nodeBefore$nodeSize : 0), view);
130
+ };
131
+
132
+ /**
133
+ * Whether the gap cursor click handler would return false whatever `posAtCoords` returns, so the
134
+ * layout read can be skipped.
135
+ */
136
+ var isClickWithoutGapCursor = function isClickWithoutGapCursor(elem, _ref) {
137
+ var view = _ref.view,
138
+ nodePos = _ref.nodePos;
139
+ var doc = view.state.doc;
140
+ if (nodePos < 0 || nodePos > doc.content.size) {
141
+ return false;
142
+ }
143
+ var $pos = doc.resolve(nodePos);
144
+ return cannotPlaceGapCursorAt($pos) || isClickOnAdjacentAtom(elem, $pos, view);
145
+ };
146
+
147
+ /**
148
+ * Whether a click should be left to other handlers instead of placing a gap cursor.
149
+ *
150
+ * Pass `clickContext` to also ignore clicks where no gap cursor can be placed: clicks on text or
151
+ * inline content, and clicks on an atom node such as media, cards or extensions.
152
+ */
153
+ var isIgnoredClick = exports.isIgnoredClick = function isIgnoredClick(elem, clickContext) {
94
154
  if ((elem === null || elem === void 0 ? void 0 : elem.nodeName) === 'BUTTON' || elem !== null && elem !== void 0 && elem.closest('button')) {
95
155
  return true;
96
156
  }
@@ -100,6 +160,12 @@ var isIgnoredClick = exports.isIgnoredClick = function isIgnoredClick(elem) {
100
160
  return true;
101
161
  }
102
162
 
163
+ // check if no gap cursor can be placed for this click (text, inline content or an atom node).
164
+ // This runs before the table check so clicks inside tables are covered too.
165
+ if (elem && clickContext && isClickWithoutGapCursor(elem, clickContext)) {
166
+ return true;
167
+ }
168
+
103
169
  // check if target node has a parent table node
104
170
  var tableWrap;
105
171
  var node = elem;
@@ -103,9 +103,13 @@ var plugin = new _safePlugin.SafePlugin({
103
103
  var _$pos$parent;
104
104
  var target = event.target instanceof HTMLElement ? event.target : null;
105
105
  // Check the experiment first so the control group runs isIgnoredClick once, after
106
- // posAtCoords, exactly as before.
106
+ // posAtCoords, exactly as before. Only this path passes { view, nodePos }, which also
107
+ // ignores clicks that can never place a gap cursor (text, inline content, atom nodes).
107
108
  var checkIgnoredClickFirst = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_improve_inp_batch_2');
108
- if (checkIgnoredClickFirst && target && (0, _utils2.isIgnoredClick)(target)) {
109
+ if (checkIgnoredClickFirst && target && (0, _utils2.isIgnoredClick)(target, {
110
+ view: view,
111
+ nodePos: nodePos
112
+ })) {
109
113
  return false;
110
114
  }
111
115
 
@@ -1,7 +1,6 @@
1
1
  import { expandedState, getNextNodeExpandPos } from '@atlaskit/editor-common/expand';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
5
4
 
6
5
  /*
7
6
  * The way expand was built, no browser recognize selection on it.
@@ -122,7 +121,7 @@ const isNavigatingVerticallyWhenCursorIsInsideInlineNode = (view, event) => {
122
121
  return false;
123
122
  }
124
123
  const isNavigatingInlineNodeDownward = event.key === 'ArrowDown' && Boolean((_selection$$cursor$no3 = selection.$cursor.nodeBefore) === null || _selection$$cursor$no3 === void 0 ? void 0 : _selection$$cursor$no3.isInline) && Boolean((_selection$$cursor$no4 = selection.$cursor.nodeAfter) === null || _selection$$cursor$no4 === void 0 ? void 0 : _selection$$cursor$no4.isInline);
125
- if (isNavigatingInlineNodeDownward && getNextNodeExpandPos(view, selection) !== undefined && expValEqualsNoExposure('platform_editor_lovability_navigation_fixes', 'isEnabled', true)) {
124
+ if (isNavigatingInlineNodeDownward && getNextNodeExpandPos(view, selection) !== undefined) {
126
125
  return false;
127
126
  }
128
127
  return isNavigatingInlineNodeDownward;
@@ -1,5 +1,6 @@
1
1
  import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single/constants';
2
2
  import { Side } from '@atlaskit/editor-common/selection';
3
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
3
4
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
4
5
  import { UnsupportedSharedCssClassName } from '@atlaskit/editor-common/styles/unsupported-content';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
@@ -77,7 +78,69 @@ export function getLayoutModeFromTargetNode(node) {
77
78
  }
78
79
  return layout;
79
80
  }
80
- export const isIgnoredClick = elem => {
81
+ /**
82
+ * Whether `node`, starting at `start`, is an atom whose DOM contains the click target.
83
+ */
84
+ const isClickInsideAtom = (elem, node, start, view) => {
85
+ // ProseMirror counts text as an atom, but a text node can't contain an element.
86
+ if (!(node !== null && node !== void 0 && node.isAtom) || node.isText) {
87
+ return false;
88
+ }
89
+ const dom = view.nodeDOM(start);
90
+ return dom instanceof Node && dom.contains(elem);
91
+ };
92
+
93
+ /**
94
+ * Rule 1: no gap cursor can be placed for a click at `nodePos`.
95
+ *
96
+ * Skips clicks on text and inline atoms (mentions, emoji, status, dates, inline cards), where
97
+ * `nodePos` is inside a textblock. Inside a `mediaSingle` the handler places the gap cursor beside
98
+ * it instead, so clicks beside nested images aren't skipped.
99
+ */
100
+ const cannotPlaceGapCursorAt = $pos => $pos.parent.type.name !== 'mediaSingle' && !GapCursorSelection.valid($pos);
101
+
102
+ /**
103
+ * Rule 2: the click target is inside the DOM of the atom before or after `nodePos`.
104
+ *
105
+ * Skips clicks on block atoms (images, block and embed cards, extensions, dividers), which the
106
+ * handler already ignored via `posAtCoords.inside`. Clicks beside them, outside their DOM, aren't
107
+ * skipped.
108
+ */
109
+ const isClickOnAdjacentAtom = (elem, $pos, view) => {
110
+ var _nodeBefore$nodeSize;
111
+ const {
112
+ nodeAfter,
113
+ nodeBefore,
114
+ pos
115
+ } = $pos;
116
+ return isClickInsideAtom(elem, nodeAfter, pos, view) || isClickInsideAtom(elem, nodeBefore, pos - ((_nodeBefore$nodeSize = nodeBefore === null || nodeBefore === void 0 ? void 0 : nodeBefore.nodeSize) !== null && _nodeBefore$nodeSize !== void 0 ? _nodeBefore$nodeSize : 0), view);
117
+ };
118
+
119
+ /**
120
+ * Whether the gap cursor click handler would return false whatever `posAtCoords` returns, so the
121
+ * layout read can be skipped.
122
+ */
123
+ const isClickWithoutGapCursor = (elem, {
124
+ view,
125
+ nodePos
126
+ }) => {
127
+ const {
128
+ doc
129
+ } = view.state;
130
+ if (nodePos < 0 || nodePos > doc.content.size) {
131
+ return false;
132
+ }
133
+ const $pos = doc.resolve(nodePos);
134
+ return cannotPlaceGapCursorAt($pos) || isClickOnAdjacentAtom(elem, $pos, view);
135
+ };
136
+
137
+ /**
138
+ * Whether a click should be left to other handlers instead of placing a gap cursor.
139
+ *
140
+ * Pass `clickContext` to also ignore clicks where no gap cursor can be placed: clicks on text or
141
+ * inline content, and clicks on an atom node such as media, cards or extensions.
142
+ */
143
+ export const isIgnoredClick = (elem, clickContext) => {
81
144
  if ((elem === null || elem === void 0 ? void 0 : elem.nodeName) === 'BUTTON' || elem !== null && elem !== void 0 && elem.closest('button')) {
82
145
  return true;
83
146
  }
@@ -87,6 +150,12 @@ export const isIgnoredClick = elem => {
87
150
  return true;
88
151
  }
89
152
 
153
+ // check if no gap cursor can be placed for this click (text, inline content or an atom node).
154
+ // This runs before the table check so clicks inside tables are covered too.
155
+ if (elem && clickContext && isClickWithoutGapCursor(elem, clickContext)) {
156
+ return true;
157
+ }
158
+
90
159
  // check if target node has a parent table node
91
160
  let tableWrap;
92
161
  let node = elem;
@@ -100,9 +100,13 @@ const plugin = new SafePlugin({
100
100
  var _$pos$parent;
101
101
  const target = event.target instanceof HTMLElement ? event.target : null;
102
102
  // Check the experiment first so the control group runs isIgnoredClick once, after
103
- // posAtCoords, exactly as before.
103
+ // posAtCoords, exactly as before. Only this path passes { view, nodePos }, which also
104
+ // ignores clicks that can never place a gap cursor (text, inline content, atom nodes).
104
105
  const checkIgnoredClickFirst = isExperimentEnabled('platform_editor_improve_inp_batch_2');
105
- if (checkIgnoredClickFirst && target && isIgnoredClick(target)) {
106
+ if (checkIgnoredClickFirst && target && isIgnoredClick(target, {
107
+ view,
108
+ nodePos
109
+ })) {
106
110
  return false;
107
111
  }
108
112
 
@@ -1,7 +1,6 @@
1
1
  import { expandedState, getNextNodeExpandPos } from '@atlaskit/editor-common/expand';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
5
4
 
6
5
  /*
7
6
  * The way expand was built, no browser recognize selection on it.
@@ -119,7 +118,7 @@ var isNavigatingVerticallyWhenCursorIsInsideInlineNode = function isNavigatingVe
119
118
  return false;
120
119
  }
121
120
  var isNavigatingInlineNodeDownward = event.key === 'ArrowDown' && Boolean((_selection$$cursor$no3 = selection.$cursor.nodeBefore) === null || _selection$$cursor$no3 === void 0 ? void 0 : _selection$$cursor$no3.isInline) && Boolean((_selection$$cursor$no4 = selection.$cursor.nodeAfter) === null || _selection$$cursor$no4 === void 0 ? void 0 : _selection$$cursor$no4.isInline);
122
- if (isNavigatingInlineNodeDownward && getNextNodeExpandPos(view, selection) !== undefined && expValEqualsNoExposure('platform_editor_lovability_navigation_fixes', 'isEnabled', true)) {
121
+ if (isNavigatingInlineNodeDownward && getNextNodeExpandPos(view, selection) !== undefined) {
123
122
  return false;
124
123
  }
125
124
  return isNavigatingInlineNodeDownward;
@@ -1,5 +1,6 @@
1
1
  import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single/constants';
2
2
  import { Side } from '@atlaskit/editor-common/selection';
3
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
3
4
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
4
5
  import { UnsupportedSharedCssClassName } from '@atlaskit/editor-common/styles/unsupported-content';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
@@ -81,7 +82,66 @@ export function getLayoutModeFromTargetNode(node) {
81
82
  }
82
83
  return layout;
83
84
  }
84
- export var isIgnoredClick = function isIgnoredClick(elem) {
85
+ /**
86
+ * Whether `node`, starting at `start`, is an atom whose DOM contains the click target.
87
+ */
88
+ var isClickInsideAtom = function isClickInsideAtom(elem, node, start, view) {
89
+ // ProseMirror counts text as an atom, but a text node can't contain an element.
90
+ if (!(node !== null && node !== void 0 && node.isAtom) || node.isText) {
91
+ return false;
92
+ }
93
+ var dom = view.nodeDOM(start);
94
+ return dom instanceof Node && dom.contains(elem);
95
+ };
96
+
97
+ /**
98
+ * Rule 1: no gap cursor can be placed for a click at `nodePos`.
99
+ *
100
+ * Skips clicks on text and inline atoms (mentions, emoji, status, dates, inline cards), where
101
+ * `nodePos` is inside a textblock. Inside a `mediaSingle` the handler places the gap cursor beside
102
+ * it instead, so clicks beside nested images aren't skipped.
103
+ */
104
+ var cannotPlaceGapCursorAt = function cannotPlaceGapCursorAt($pos) {
105
+ return $pos.parent.type.name !== 'mediaSingle' && !GapCursorSelection.valid($pos);
106
+ };
107
+
108
+ /**
109
+ * Rule 2: the click target is inside the DOM of the atom before or after `nodePos`.
110
+ *
111
+ * Skips clicks on block atoms (images, block and embed cards, extensions, dividers), which the
112
+ * handler already ignored via `posAtCoords.inside`. Clicks beside them, outside their DOM, aren't
113
+ * skipped.
114
+ */
115
+ var isClickOnAdjacentAtom = function isClickOnAdjacentAtom(elem, $pos, view) {
116
+ var _nodeBefore$nodeSize;
117
+ var nodeAfter = $pos.nodeAfter,
118
+ nodeBefore = $pos.nodeBefore,
119
+ pos = $pos.pos;
120
+ return isClickInsideAtom(elem, nodeAfter, pos, view) || isClickInsideAtom(elem, nodeBefore, pos - ((_nodeBefore$nodeSize = nodeBefore === null || nodeBefore === void 0 ? void 0 : nodeBefore.nodeSize) !== null && _nodeBefore$nodeSize !== void 0 ? _nodeBefore$nodeSize : 0), view);
121
+ };
122
+
123
+ /**
124
+ * Whether the gap cursor click handler would return false whatever `posAtCoords` returns, so the
125
+ * layout read can be skipped.
126
+ */
127
+ var isClickWithoutGapCursor = function isClickWithoutGapCursor(elem, _ref) {
128
+ var view = _ref.view,
129
+ nodePos = _ref.nodePos;
130
+ var doc = view.state.doc;
131
+ if (nodePos < 0 || nodePos > doc.content.size) {
132
+ return false;
133
+ }
134
+ var $pos = doc.resolve(nodePos);
135
+ return cannotPlaceGapCursorAt($pos) || isClickOnAdjacentAtom(elem, $pos, view);
136
+ };
137
+
138
+ /**
139
+ * Whether a click should be left to other handlers instead of placing a gap cursor.
140
+ *
141
+ * Pass `clickContext` to also ignore clicks where no gap cursor can be placed: clicks on text or
142
+ * inline content, and clicks on an atom node such as media, cards or extensions.
143
+ */
144
+ export var isIgnoredClick = function isIgnoredClick(elem, clickContext) {
85
145
  if ((elem === null || elem === void 0 ? void 0 : elem.nodeName) === 'BUTTON' || elem !== null && elem !== void 0 && elem.closest('button')) {
86
146
  return true;
87
147
  }
@@ -91,6 +151,12 @@ export var isIgnoredClick = function isIgnoredClick(elem) {
91
151
  return true;
92
152
  }
93
153
 
154
+ // check if no gap cursor can be placed for this click (text, inline content or an atom node).
155
+ // This runs before the table check so clicks inside tables are covered too.
156
+ if (elem && clickContext && isClickWithoutGapCursor(elem, clickContext)) {
157
+ return true;
158
+ }
159
+
94
160
  // check if target node has a parent table node
95
161
  var tableWrap;
96
162
  var node = elem;
@@ -97,9 +97,13 @@ var plugin = new SafePlugin({
97
97
  var _$pos$parent;
98
98
  var target = event.target instanceof HTMLElement ? event.target : null;
99
99
  // Check the experiment first so the control group runs isIgnoredClick once, after
100
- // posAtCoords, exactly as before.
100
+ // posAtCoords, exactly as before. Only this path passes { view, nodePos }, which also
101
+ // ignores clicks that can never place a gap cursor (text, inline content, atom nodes).
101
102
  var checkIgnoredClickFirst = isExperimentEnabled('platform_editor_improve_inp_batch_2');
102
- if (checkIgnoredClickFirst && target && isIgnoredClick(target)) {
103
+ if (checkIgnoredClickFirst && target && isIgnoredClick(target, {
104
+ view: view,
105
+ nodePos: nodePos
106
+ })) {
103
107
  return false;
104
108
  }
105
109
 
@@ -1,8 +1,20 @@
1
1
  import { Side } from '@atlaskit/editor-common/selection';
2
2
  import type { Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
4
  export declare const isLeftCursor: (side: Side) => side is Side.LEFT;
4
5
  export declare function getMediaNearPos(doc: PMNode, $pos: ResolvedPos, schema: Schema, dir?: number): PMNode | null;
5
6
  export declare const isTextBlockNearPos: (doc: PMNode, schema: Schema, $pos: ResolvedPos, dir: number) => boolean;
6
7
  export declare function getLayoutModeFromTargetNode(node: PMNode): string;
7
- export declare const isIgnoredClick: (elem: HTMLElement | null) => boolean | null;
8
+ type ClickContext = {
9
+ nodePos: number;
10
+ view: EditorView;
11
+ };
12
+ /**
13
+ * Whether a click should be left to other handlers instead of placing a gap cursor.
14
+ *
15
+ * Pass `clickContext` to also ignore clicks where no gap cursor can be placed: clicks on text or
16
+ * inline content, and clicks on an atom node such as media, cards or extensions.
17
+ */
18
+ export declare const isIgnoredClick: (elem: HTMLElement | null, clickContext?: ClickContext) => boolean | null;
8
19
  export declare const getComputedStyleForLayoutMode: (dom: HTMLElement, node: PMNode | undefined | null, style: CSSStyleDeclaration) => CSSStyleDeclaration;
20
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection",
3
- "version": "30.0.13",
3
+ "version": "30.0.15",
4
4
  "description": "Selection plugin for @atlaskit/editor-core",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,20 +23,20 @@
23
23
  "@atlaskit/editor-json-transformer": "^10.0.0",
24
24
  "@atlaskit/editor-plugin-interaction": "^44.0.0",
25
25
  "@atlaskit/editor-prosemirror": "^9.0.0",
26
- "@atlaskit/editor-shared-styles": "^5.0.0",
26
+ "@atlaskit/editor-shared-styles": "^5.1.0",
27
27
  "@atlaskit/editor-tables": "^3.2.0",
28
28
  "@atlaskit/platform-feature-experiments": "^0.3.0",
29
29
  "@atlaskit/primitives": "^22.6.0",
30
- "@atlaskit/tmp-editor-statsig": "^257.0.0",
30
+ "@atlaskit/tmp-editor-statsig": "^258.0.0",
31
31
  "@atlaskit/tokens": "^20.9.0",
32
32
  "@babel/runtime": "^7.0.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@atlaskit/editor-common": "^134.8.0",
35
+ "@atlaskit/editor-common": "^134.9.0",
36
36
  "react": "^18.2.0 || ^19.2.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@atlaskit/editor-common": "^134.8.0",
39
+ "@atlaskit/editor-common": "^134.9.0",
40
40
  "react": "^19.2.0"
41
41
  }
42
42
  }