@atlaskit/editor-plugin-selection 2.2.13 → 2.2.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,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 2.2.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
|
|
8
|
+
[`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
|
|
9
|
+
ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
|
|
10
|
+
|
|
11
|
+
## 2.2.14
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#173895](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173895)
|
|
16
|
+
[`6e123631d7c26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e123631d7c26) -
|
|
17
|
+
Clean up platform_editor_interaction_api_refactor
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 2.2.13
|
|
4
21
|
|
|
5
22
|
### 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");
|
|
@@ -71,14 +70,13 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
71
70
|
props: {
|
|
72
71
|
createSelectionBetween: _createSelectionBetween.onCreateSelectionBetween,
|
|
73
72
|
decorations: function decorations(state) {
|
|
74
|
-
var _api$interaction
|
|
75
|
-
var
|
|
76
|
-
var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
|
|
73
|
+
var _api$interaction;
|
|
74
|
+
var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
|
|
77
75
|
|
|
78
76
|
// Do not show selection decorations for live pages where the user has not
|
|
79
77
|
// interacted with the page. We do not show cursor until interaction and we do not
|
|
80
78
|
// want to show selections either.
|
|
81
|
-
if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) &&
|
|
79
|
+
if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
82
80
|
return _view.DecorationSet.empty;
|
|
83
81
|
}
|
|
84
82
|
return (0, _pluginFactory.getPluginState)(state).decorationSet;
|
|
@@ -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';
|
|
@@ -64,14 +63,13 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
|
|
|
64
63
|
props: {
|
|
65
64
|
createSelectionBetween: onCreateSelectionBetween,
|
|
66
65
|
decorations(state) {
|
|
67
|
-
var _api$interaction, _api$interaction$shar
|
|
68
|
-
const
|
|
69
|
-
const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 ? void 0 : (_api$interaction2$sha = _api$interaction2.sharedState.currentState()) === null || _api$interaction2$sha === void 0 ? void 0 : _api$interaction2$sha.interactionState;
|
|
66
|
+
var _api$interaction, _api$interaction$shar;
|
|
67
|
+
const interactionState = api === null || api === void 0 ? void 0 : (_api$interaction = api.interaction) === null || _api$interaction === void 0 ? void 0 : (_api$interaction$shar = _api$interaction.sharedState.currentState()) === null || _api$interaction$shar === void 0 ? void 0 : _api$interaction$shar.interactionState;
|
|
70
68
|
|
|
71
69
|
// Do not show selection decorations for live pages where the user has not
|
|
72
70
|
// interacted with the page. We do not show cursor until interaction and we do not
|
|
73
71
|
// want to show selections either.
|
|
74
|
-
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) &&
|
|
72
|
+
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
75
73
|
return DecorationSet.empty;
|
|
76
74
|
}
|
|
77
75
|
return getPluginState(state).decorationSet;
|
|
@@ -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';
|
|
@@ -65,14 +64,13 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
|
|
|
65
64
|
props: {
|
|
66
65
|
createSelectionBetween: onCreateSelectionBetween,
|
|
67
66
|
decorations: function decorations(state) {
|
|
68
|
-
var _api$interaction
|
|
69
|
-
var
|
|
70
|
-
var interactionState = api === null || api === void 0 || (_api$interaction2 = api.interaction) === null || _api$interaction2 === void 0 || (_api$interaction2 = _api$interaction2.sharedState.currentState()) === null || _api$interaction2 === void 0 ? void 0 : _api$interaction2.interactionState;
|
|
67
|
+
var _api$interaction;
|
|
68
|
+
var interactionState = api === null || api === void 0 || (_api$interaction = api.interaction) === null || _api$interaction === void 0 || (_api$interaction = _api$interaction.sharedState.currentState()) === null || _api$interaction === void 0 ? void 0 : _api$interaction.interactionState;
|
|
71
69
|
|
|
72
70
|
// Do not show selection decorations for live pages where the user has not
|
|
73
71
|
// interacted with the page. We do not show cursor until interaction and we do not
|
|
74
72
|
// want to show selections either.
|
|
75
|
-
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) &&
|
|
73
|
+
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
76
74
|
return DecorationSet.empty;
|
|
77
75
|
}
|
|
78
76
|
return getPluginState(state).decorationSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.15",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -16,18 +16,17 @@
|
|
|
16
16
|
"atlaskit:src": "src/index.ts",
|
|
17
17
|
"atlassian": {
|
|
18
18
|
"team": "Editor: Lego",
|
|
19
|
-
"singleton": true
|
|
20
|
-
"runReact18": true
|
|
19
|
+
"singleton": true
|
|
21
20
|
},
|
|
22
21
|
"dependencies": {
|
|
23
|
-
"@atlaskit/editor-common": "^107.
|
|
24
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
22
|
+
"@atlaskit/editor-common": "^107.4.0",
|
|
23
|
+
"@atlaskit/editor-plugin-interaction": "^3.0.0",
|
|
25
24
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
26
25
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
27
26
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
28
27
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
29
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
30
|
-
"@atlaskit/tokens": "^5.
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^8.6.0",
|
|
29
|
+
"@atlaskit/tokens": "^5.4.0",
|
|
31
30
|
"@babel/runtime": "^7.0.0"
|
|
32
31
|
},
|
|
33
32
|
"peerDependencies": {
|
|
@@ -87,12 +86,6 @@
|
|
|
87
86
|
},
|
|
88
87
|
"platform_editor_nested_tables_gap_cursor": {
|
|
89
88
|
"type": "boolean"
|
|
90
|
-
},
|
|
91
|
-
"platform_editor_no_cursor_on_live_doc_init": {
|
|
92
|
-
"type": "boolean"
|
|
93
|
-
},
|
|
94
|
-
"platform_editor_interaction_api_refactor": {
|
|
95
|
-
"type": "boolean"
|
|
96
89
|
}
|
|
97
90
|
}
|
|
98
91
|
}
|