@atlaskit/editor-plugin-selection 19.0.3 → 19.0.5
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,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 19.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 19.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`1ee5ac1d4338d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1ee5ac1d4338d) -
|
|
14
|
+
Cleaning up cc_editor_focus_before_editor_on_load and platform_editor_no_cursor_on_edit_page_init
|
|
15
|
+
|
|
16
|
+
Cursor suppression on load is now driven by the presence of the interaction plugin rather than the
|
|
17
|
+
experiment, so only editors that opt into that plugin skip focus on a document with content.
|
|
18
|
+
`cc_editor_focus_before_editor_on_load` shipped disabled, so the pre-editor focus element has been
|
|
19
|
+
removed.
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 19.0.3
|
|
4
24
|
|
|
5
25
|
### 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 _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
10
|
var _types = require("../types");
|
|
12
11
|
var _actions = require("./actions");
|
|
13
12
|
var _createSelectionBetween = require("./events/create-selection-between");
|
|
@@ -89,10 +88,9 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
89
88
|
var _api$interaction;
|
|
90
89
|
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;
|
|
91
90
|
|
|
92
|
-
//
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
91
|
+
// The interaction plugin is only present for editors that suppress the cursor
|
|
92
|
+
// until first interaction, so we suppress selections for the same period.
|
|
93
|
+
if (interactionState === 'hasNotHadInteraction') {
|
|
96
94
|
return _view.DecorationSet.empty;
|
|
97
95
|
}
|
|
98
96
|
return (0, _pluginFactory.getPluginState)(state).decorationSet;
|
|
@@ -4,7 +4,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
|
|
5
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { selectionPluginKey } from '../types';
|
|
9
8
|
import { SelectionActionTypes } from './actions';
|
|
10
9
|
import { onCreateSelectionBetween } from './events/create-selection-between';
|
|
@@ -83,10 +82,9 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
|
|
|
83
82
|
var _api$interaction, _api$interaction$shar;
|
|
84
83
|
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;
|
|
85
84
|
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
85
|
+
// The interaction plugin is only present for editors that suppress the cursor
|
|
86
|
+
// until first interaction, so we suppress selections for the same period.
|
|
87
|
+
if (interactionState === 'hasNotHadInteraction') {
|
|
90
88
|
return DecorationSet.empty;
|
|
91
89
|
}
|
|
92
90
|
return getPluginState(state).decorationSet;
|
|
@@ -4,7 +4,6 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
4
4
|
|
|
5
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { selectionPluginKey } from '../types';
|
|
9
8
|
import { SelectionActionTypes } from './actions';
|
|
10
9
|
import { onCreateSelectionBetween } from './events/create-selection-between';
|
|
@@ -84,10 +83,9 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
|
|
|
84
83
|
var _api$interaction;
|
|
85
84
|
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;
|
|
86
85
|
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
86
|
+
// The interaction plugin is only present for editors that suppress the cursor
|
|
87
|
+
// until first interaction, so we suppress selections for the same period.
|
|
88
|
+
if (interactionState === 'hasNotHadInteraction') {
|
|
91
89
|
return DecorationSet.empty;
|
|
92
90
|
}
|
|
93
91
|
return getPluginState(state).decorationSet;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.5",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
23
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
23
|
+
"@atlaskit/editor-plugin-interaction": "^33.0.0",
|
|
24
24
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
25
25
|
"@atlaskit/editor-shared-styles": "^4.3.0",
|
|
26
26
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
27
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
-
"@atlaskit/tokens": "^
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^203.0.0",
|
|
28
|
+
"@atlaskit/tokens": "^19.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@atlaskit/editor-common": "^123.
|
|
32
|
+
"@atlaskit/editor-common": "^123.8.0",
|
|
33
33
|
"react": "^18.2.0 || ^19.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|