@atlaskit/editor-plugin-selection 2.2.14 → 3.0.0
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 +48 -0
- package/dist/cjs/pm-plugins/selection-main.js +1 -2
- package/dist/es2019/pm-plugins/selection-main.js +1 -2
- package/dist/esm/pm-plugins/selection-main.js +1 -2
- package/dist/types/pm-plugins/events/mouseout.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/events/mouseout.d.ts +2 -2
- package/package.json +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#181024](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181024)
|
|
8
|
+
[`8e80c487ca307`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e80c487ca307) - ##
|
|
9
|
+
Make `@atlaskit/editor-common` a peer dependency
|
|
10
|
+
|
|
11
|
+
**WHAT:** `@atlaskit/editor-common` has been moved from `dependencies` to `peerDependencies` in
|
|
12
|
+
all editor plugin packages.
|
|
13
|
+
|
|
14
|
+
**WHY:** This change ensures that only a single version of `@atlaskit/editor-common` is used in
|
|
15
|
+
consuming applications, preventing issues caused by multiple versions of singleton libraries (such
|
|
16
|
+
as context mismatches or duplicated state). This is especially important for packages that rely on
|
|
17
|
+
shared context or singletons.
|
|
18
|
+
|
|
19
|
+
**HOW TO ADJUST:**
|
|
20
|
+
|
|
21
|
+
- Consumers must now explicitly install `@atlaskit/editor-common` in their own project if they use
|
|
22
|
+
any of these editor plugins.
|
|
23
|
+
- Ensure the version you install matches the version required by the plugins.
|
|
24
|
+
- You can use the
|
|
25
|
+
[`check-peer-dependencies`](https://www.npmjs.com/package/check-peer-dependencies) package to
|
|
26
|
+
verify that all required peer dependencies are installed and compatible.
|
|
27
|
+
- Example install command:
|
|
28
|
+
```
|
|
29
|
+
npm install @atlaskit/editor-common
|
|
30
|
+
```
|
|
31
|
+
or
|
|
32
|
+
```
|
|
33
|
+
yarn add @atlaskit/editor-common
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Note:** This is a breaking change. If `@atlaskit/editor-common` is not installed at the
|
|
37
|
+
application level, you may see errors or unexpected behavior.
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
|
|
43
|
+
## 2.2.15
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- [#180346](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/180346)
|
|
48
|
+
[`d00d1d362bd18`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d00d1d362bd18) -
|
|
49
|
+
ED-28086 Clean up platform_editor_no_cursor_on_live_doc_init
|
|
50
|
+
|
|
3
51
|
## 2.2.14
|
|
4
52
|
|
|
5
53
|
### 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");
|
|
@@ -77,7 +76,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
77
76
|
// Do not show selection decorations for live pages where the user has not
|
|
78
77
|
// interacted with the page. We do not show cursor until interaction and we do not
|
|
79
78
|
// want to show selections either.
|
|
80
|
-
if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction'
|
|
79
|
+
if ((options.__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
81
80
|
return _view.DecorationSet.empty;
|
|
82
81
|
}
|
|
83
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';
|
|
@@ -70,7 +69,7 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
|
|
|
70
69
|
// Do not show selection decorations for live pages where the user has not
|
|
71
70
|
// interacted with the page. We do not show cursor until interaction and we do not
|
|
72
71
|
// want to show selections either.
|
|
73
|
-
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction'
|
|
72
|
+
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
74
73
|
return DecorationSet.empty;
|
|
75
74
|
}
|
|
76
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';
|
|
@@ -71,7 +70,7 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
|
|
|
71
70
|
// Do not show selection decorations for live pages where the user has not
|
|
72
71
|
// interacted with the page. We do not show cursor until interaction and we do not
|
|
73
72
|
// want to show selections either.
|
|
74
|
-
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction'
|
|
73
|
+
if ((options.__livePage || expValEquals('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && interactionState === 'hasNotHadInteraction') {
|
|
75
74
|
return DecorationSet.empty;
|
|
76
75
|
}
|
|
77
76
|
return getPluginState(state).decorationSet;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
|
+
import { type Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export declare function isValidSelection(selection: Selection): boolean;
|
|
4
4
|
export declare function onMouseOut(view: EditorView, event: MouseEvent): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
|
+
import { type Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
export declare function isValidSelection(selection: Selection): boolean;
|
|
4
4
|
export declare function onMouseOut(view: EditorView, event: MouseEvent): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -16,21 +16,20 @@
|
|
|
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-
|
|
24
|
-
"@atlaskit/editor-plugin-interaction": "^3.0.0",
|
|
22
|
+
"@atlaskit/editor-plugin-interaction": "^4.0.0",
|
|
25
23
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
26
24
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
27
25
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
28
26
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
29
|
-
"@atlaskit/tmp-editor-statsig": "^8.
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^8.7.0",
|
|
30
28
|
"@atlaskit/tokens": "^5.4.0",
|
|
31
29
|
"@babel/runtime": "^7.0.0"
|
|
32
30
|
},
|
|
33
31
|
"peerDependencies": {
|
|
32
|
+
"@atlaskit/editor-common": "^107.6.0",
|
|
34
33
|
"react": "^18.2.0"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
@@ -87,9 +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
89
|
}
|
|
94
90
|
}
|
|
95
91
|
}
|