@atlaskit/editor-plugin-selection 6.1.8 → 6.1.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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 6.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f1f7fc05afab1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f1f7fc05afab1) -
|
|
8
|
+
[ux] EDITOR-2461 Set selection in expand title when using arrow key to navigate into expand
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 6.1.8
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ exports.createOnKeydown = createOnKeydown;
|
|
|
7
7
|
var _expand = require("@atlaskit/editor-common/expand");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
11
|
/*
|
|
11
12
|
* The way expand was built, no browser recognize selection on it.
|
|
12
13
|
* For instance, when a selection going to a "collapsed" expand
|
|
@@ -123,6 +124,9 @@ var isNavigatingVerticallyWhenCursorIsInsideInlineNode = function isNavigatingVe
|
|
|
123
124
|
return false;
|
|
124
125
|
}
|
|
125
126
|
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)) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
126
130
|
return isNavigatingInlineNodeDownward;
|
|
127
131
|
};
|
|
128
132
|
function createOnKeydown(_ref4) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
1
|
+
import { expandedState, getNextNodeExpandPos } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
5
|
|
|
5
6
|
/*
|
|
6
7
|
* The way expand was built, no browser recognize selection on it.
|
|
@@ -121,6 +122,9 @@ const isNavigatingVerticallyWhenCursorIsInsideInlineNode = (view, event) => {
|
|
|
121
122
|
return false;
|
|
122
123
|
}
|
|
123
124
|
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)) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
124
128
|
return isNavigatingInlineNodeDownward;
|
|
125
129
|
};
|
|
126
130
|
export function createOnKeydown({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { expandedState } from '@atlaskit/editor-common/expand';
|
|
1
|
+
import { expandedState, getNextNodeExpandPos } from '@atlaskit/editor-common/expand';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
5
|
|
|
5
6
|
/*
|
|
6
7
|
* The way expand was built, no browser recognize selection on it.
|
|
@@ -118,6 +119,9 @@ var isNavigatingVerticallyWhenCursorIsInsideInlineNode = function isNavigatingVe
|
|
|
118
119
|
return false;
|
|
119
120
|
}
|
|
120
121
|
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)) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
121
125
|
return isNavigatingInlineNodeDownward;
|
|
122
126
|
};
|
|
123
127
|
export function createOnKeydown(_ref4) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.9",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
26
26
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
28
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^14.7.0",
|
|
29
29
|
"@atlaskit/tokens": "^8.4.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0"
|
|
31
31
|
},
|