@atlaskit/editor-plugin-selection 6.1.7 → 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,20 @@
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
+
11
+ ## 6.1.8
12
+
13
+ ### Patch Changes
14
+
15
+ - [`2e389ee54c1f1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e389ee54c1f1) -
16
+ Update gates to roll out minor updates faster
17
+
3
18
  ## 6.1.7
4
19
 
5
20
  ### 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) {
@@ -33,7 +33,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
33
33
  var tr = newEditorState.tr;
34
34
  var manualSelection;
35
35
  var hideCursorChanged = false;
36
- var needsHideCursor = (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta');
36
+ var needsHideCursor = (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2');
37
37
  var needsManualSelection = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
38
38
  if (needsHideCursor || needsManualSelection) {
39
39
  for (var i = transactions.length - 1; i >= 0; i--) {
@@ -19,7 +19,7 @@ var _hideCursorDecoration = require("./cursor/ui/hide-cursor-decoration");
19
19
  var getDecorations = exports.getDecorations = function getDecorations(tr, manualSelection, hideCursor) {
20
20
  var selection = tr.selection;
21
21
  var decorations = [];
22
- if (hideCursor && (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_patch_beta')) {
22
+ if (hideCursor && (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2')) {
23
23
  decorations.push((0, _hideCursorDecoration.createHideCursorDecoration)());
24
24
  }
25
25
  if (selection instanceof _state.NodeSelection) {
@@ -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({
@@ -26,7 +26,7 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
26
26
  } = newEditorState;
27
27
  let manualSelection;
28
28
  let hideCursorChanged = false;
29
- const needsHideCursor = fg('platform_editor_ai_aifc_patch_beta');
29
+ const needsHideCursor = fg('platform_editor_ai_generic_prep_for_aifc_2');
30
30
  const needsManualSelection = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
31
31
  if (needsHideCursor || needsManualSelection) {
32
32
  for (let i = transactions.length - 1; i >= 0; i--) {
@@ -10,7 +10,7 @@ import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
10
10
  export const getDecorations = (tr, manualSelection, hideCursor) => {
11
11
  let selection = tr.selection;
12
12
  const decorations = [];
13
- if (hideCursor && fg('platform_editor_ai_aifc_patch_beta')) {
13
+ if (hideCursor && fg('platform_editor_ai_generic_prep_for_aifc_2')) {
14
14
  decorations.push(createHideCursorDecoration());
15
15
  }
16
16
  if (selection instanceof NodeSelection) {
@@ -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) {
@@ -27,7 +27,7 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
27
27
  var tr = newEditorState.tr;
28
28
  var manualSelection;
29
29
  var hideCursorChanged = false;
30
- var needsHideCursor = fg('platform_editor_ai_aifc_patch_beta');
30
+ var needsHideCursor = fg('platform_editor_ai_generic_prep_for_aifc_2');
31
31
  var needsManualSelection = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
32
32
  if (needsHideCursor || needsManualSelection) {
33
33
  for (var i = transactions.length - 1; i >= 0; i--) {
@@ -11,7 +11,7 @@ import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
11
11
  export var getDecorations = function getDecorations(tr, manualSelection, hideCursor) {
12
12
  var selection = tr.selection;
13
13
  var decorations = [];
14
- if (hideCursor && fg('platform_editor_ai_aifc_patch_beta')) {
14
+ if (hideCursor && fg('platform_editor_ai_generic_prep_for_aifc_2')) {
15
15
  decorations.push(createHideCursorDecoration());
16
16
  }
17
17
  if (selection instanceof NodeSelection) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection",
3
- "version": "6.1.7",
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,12 +25,12 @@
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.2.0",
28
+ "@atlaskit/tmp-editor-statsig": "^14.7.0",
29
29
  "@atlaskit/tokens": "^8.4.0",
30
30
  "@babel/runtime": "^7.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@atlaskit/editor-common": "^110.36.0",
33
+ "@atlaskit/editor-common": "^110.38.0",
34
34
  "react": "^18.2.0"
35
35
  },
36
36
  "techstack": {
@@ -81,10 +81,10 @@
81
81
  "platform_editor_nested_tables_gap_cursor": {
82
82
  "type": "boolean"
83
83
  },
84
- "platform_editor_fix_list_item_nav_bug_in_layout": {
84
+ "platform_editor_ai_generic_prep_for_aifc_2": {
85
85
  "type": "boolean"
86
86
  },
87
- "platform_editor_ai_aifc_patch_beta": {
87
+ "platform_editor_fix_list_item_nav_bug_in_layout": {
88
88
  "type": "boolean"
89
89
  }
90
90
  }