@atlaskit/editor-plugin-selection 7.0.2 → 7.0.4
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 +14 -0
- package/dist/cjs/pm-plugins/selection-main.js +1 -6
- package/dist/cjs/pm-plugins/utils.js +1 -1
- package/dist/es2019/pm-plugins/selection-main.js +1 -6
- package/dist/es2019/pm-plugins/utils.js +1 -1
- package/dist/esm/pm-plugins/selection-main.js +1 -6
- package/dist/esm/pm-plugins/utils.js +1 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 7.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 7.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`5c3f8d87c2290`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c3f8d87c2290) -
|
|
14
|
+
Cleanup general AIFC bug fix feature gate
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 7.0.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -7,7 +7,6 @@ exports.getInitialState = exports.createPlugin = void 0;
|
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
12
|
var _types = require("../types");
|
|
@@ -35,12 +34,11 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
35
34
|
var manualSelection;
|
|
36
35
|
var hideCursorChanged = false;
|
|
37
36
|
var blockSelectionChanged = false;
|
|
38
|
-
var needsHideCursor = (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc_2');
|
|
39
37
|
var needsManualSelection = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
|
|
40
38
|
var needsBlockSelection = (0, _expValEquals.expValEquals)('platform_editor_block_menu', 'isEnabled', true);
|
|
41
39
|
for (var i = transactions.length - 1; i >= 0; i--) {
|
|
42
40
|
var meta = transactions[i].getMeta(_types.selectionPluginKey);
|
|
43
|
-
if (
|
|
41
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.hideCursor) !== undefined) {
|
|
44
42
|
var newHideCursorValue = meta.hideCursor;
|
|
45
43
|
if (cursorHidden !== newHideCursorValue) {
|
|
46
44
|
cursorHidden = newHideCursorValue;
|
|
@@ -49,9 +47,6 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
49
47
|
}
|
|
50
48
|
if (needsManualSelection && meta !== null && meta !== void 0 && meta.manualSelection && !manualSelection) {
|
|
51
49
|
manualSelection = meta.manualSelection;
|
|
52
|
-
if (!needsHideCursor && !needsBlockSelection) {
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
50
|
}
|
|
56
51
|
if (needsBlockSelection) {
|
|
57
52
|
if (meta !== null && meta !== void 0 && meta.setBlockSelection) {
|
|
@@ -20,7 +20,7 @@ var _hideCursorDecoration = require("./cursor/ui/hide-cursor-decoration");
|
|
|
20
20
|
var getDecorations = exports.getDecorations = function getDecorations(tr, manualSelection, hideCursor, blockSelection) {
|
|
21
21
|
var selection = tr.selection;
|
|
22
22
|
var decorations = [];
|
|
23
|
-
if (hideCursor
|
|
23
|
+
if (hideCursor) {
|
|
24
24
|
decorations.push((0, _hideCursorDecoration.createHideCursorDecoration)());
|
|
25
25
|
}
|
|
26
26
|
if (selection instanceof _state.NodeSelection) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { selectionPluginKey } from '../types';
|
|
@@ -28,12 +27,11 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
|
|
|
28
27
|
let manualSelection;
|
|
29
28
|
let hideCursorChanged = false;
|
|
30
29
|
let blockSelectionChanged = false;
|
|
31
|
-
const needsHideCursor = fg('platform_editor_ai_generic_prep_for_aifc_2');
|
|
32
30
|
const needsManualSelection = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
33
31
|
const needsBlockSelection = expValEquals('platform_editor_block_menu', 'isEnabled', true);
|
|
34
32
|
for (let i = transactions.length - 1; i >= 0; i--) {
|
|
35
33
|
const meta = transactions[i].getMeta(selectionPluginKey);
|
|
36
|
-
if (
|
|
34
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.hideCursor) !== undefined) {
|
|
37
35
|
const newHideCursorValue = meta.hideCursor;
|
|
38
36
|
if (cursorHidden !== newHideCursorValue) {
|
|
39
37
|
cursorHidden = newHideCursorValue;
|
|
@@ -42,9 +40,6 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
|
|
|
42
40
|
}
|
|
43
41
|
if (needsManualSelection && meta !== null && meta !== void 0 && meta.manualSelection && !manualSelection) {
|
|
44
42
|
manualSelection = meta.manualSelection;
|
|
45
|
-
if (!needsHideCursor && !needsBlockSelection) {
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
43
|
}
|
|
49
44
|
if (needsBlockSelection) {
|
|
50
45
|
if (meta !== null && meta !== void 0 && meta.setBlockSelection) {
|
|
@@ -11,7 +11,7 @@ import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
|
|
|
11
11
|
export const getDecorations = (tr, manualSelection, hideCursor, blockSelection) => {
|
|
12
12
|
let selection = tr.selection;
|
|
13
13
|
const decorations = [];
|
|
14
|
-
if (hideCursor
|
|
14
|
+
if (hideCursor) {
|
|
15
15
|
decorations.push(createHideCursorDecoration());
|
|
16
16
|
}
|
|
17
17
|
if (selection instanceof NodeSelection) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
7
6
|
import { selectionPluginKey } from '../types';
|
|
@@ -29,12 +28,11 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
|
|
|
29
28
|
var manualSelection;
|
|
30
29
|
var hideCursorChanged = false;
|
|
31
30
|
var blockSelectionChanged = false;
|
|
32
|
-
var needsHideCursor = fg('platform_editor_ai_generic_prep_for_aifc_2');
|
|
33
31
|
var needsManualSelection = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
34
32
|
var needsBlockSelection = expValEquals('platform_editor_block_menu', 'isEnabled', true);
|
|
35
33
|
for (var i = transactions.length - 1; i >= 0; i--) {
|
|
36
34
|
var meta = transactions[i].getMeta(selectionPluginKey);
|
|
37
|
-
if (
|
|
35
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.hideCursor) !== undefined) {
|
|
38
36
|
var newHideCursorValue = meta.hideCursor;
|
|
39
37
|
if (cursorHidden !== newHideCursorValue) {
|
|
40
38
|
cursorHidden = newHideCursorValue;
|
|
@@ -43,9 +41,6 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
|
|
|
43
41
|
}
|
|
44
42
|
if (needsManualSelection && meta !== null && meta !== void 0 && meta.manualSelection && !manualSelection) {
|
|
45
43
|
manualSelection = meta.manualSelection;
|
|
46
|
-
if (!needsHideCursor && !needsBlockSelection) {
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
44
|
}
|
|
50
45
|
if (needsBlockSelection) {
|
|
51
46
|
if (meta !== null && meta !== void 0 && meta.setBlockSelection) {
|
|
@@ -12,7 +12,7 @@ import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
|
|
|
12
12
|
export var getDecorations = function getDecorations(tr, manualSelection, hideCursor, blockSelection) {
|
|
13
13
|
var selection = tr.selection;
|
|
14
14
|
var decorations = [];
|
|
15
|
-
if (hideCursor
|
|
15
|
+
if (hideCursor) {
|
|
16
16
|
decorations.push(createHideCursorDecoration());
|
|
17
17
|
}
|
|
18
18
|
if (selection instanceof NodeSelection) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
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": "^
|
|
29
|
-
"@atlaskit/tokens": "^10.
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^17.0.0",
|
|
29
|
+
"@atlaskit/tokens": "^10.1.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@atlaskit/editor-common": "^111.
|
|
33
|
+
"@atlaskit/editor-common": "^111.9.0",
|
|
34
34
|
"react": "^18.2.0"
|
|
35
35
|
},
|
|
36
36
|
"techstack": {
|
|
@@ -81,9 +81,6 @@
|
|
|
81
81
|
"platform_editor_nested_tables_gap_cursor": {
|
|
82
82
|
"type": "boolean"
|
|
83
83
|
},
|
|
84
|
-
"platform_editor_ai_generic_prep_for_aifc_2": {
|
|
85
|
-
"type": "boolean"
|
|
86
|
-
},
|
|
87
84
|
"platform_editor_fix_list_item_nav_bug_in_layout": {
|
|
88
85
|
"type": "boolean"
|
|
89
86
|
}
|