@atlaskit/editor-plugin-selection 8.0.8 → 8.0.10
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 +3 -1
- package/dist/cjs/pm-plugins/utils.js +4 -2
- package/dist/es2019/pm-plugins/selection-main.js +3 -1
- package/dist/es2019/pm-plugins/utils.js +4 -2
- package/dist/esm/pm-plugins/selection-main.js +3 -1
- package/dist/esm/pm-plugins/utils.js +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 8.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 8.0.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
|
|
14
|
+
Replace feature experiment util with cross platform alternative for platform_editor_block_menu
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 8.0.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -35,7 +35,9 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
35
35
|
var hideCursorChanged = false;
|
|
36
36
|
var blockSelectionChanged = false;
|
|
37
37
|
var needsManualSelection = (0, _experiments.editorExperiment)('platform_editor_element_drag_and_drop_multiselect', true);
|
|
38
|
-
var needsBlockSelection = (0,
|
|
38
|
+
var needsBlockSelection = (0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
39
|
+
exposure: true
|
|
40
|
+
});
|
|
39
41
|
for (var i = transactions.length - 1; i >= 0; i--) {
|
|
40
42
|
var meta = transactions[i].getMeta(_types.selectionPluginKey);
|
|
41
43
|
if ((meta === null || meta === void 0 ? void 0 : meta.hideCursor) !== undefined) {
|
|
@@ -13,7 +13,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
13
13
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
14
14
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
15
15
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
16
|
-
var
|
|
16
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
17
|
var _types = require("../types");
|
|
18
18
|
var _hideCursorDecoration = require("./cursor/ui/hide-cursor-decoration");
|
|
19
19
|
var getDecorations = exports.getDecorations = function getDecorations(tr, manualSelection, hideCursor, blockSelection) {
|
|
@@ -35,7 +35,9 @@ var getDecorations = exports.getDecorations = function getDecorations(tr, manual
|
|
|
35
35
|
|
|
36
36
|
// Only apply node decorations when there is an active block selection.
|
|
37
37
|
// When there is no block selection, text selections should use native browser selection appearance.
|
|
38
|
-
if (!(0,
|
|
38
|
+
if (!(0, _experiments.editorExperiment)('platform_editor_block_menu', true, {
|
|
39
|
+
exposure: true
|
|
40
|
+
}) || blockSelection) {
|
|
39
41
|
var selectionDecorations = getNodesToDecorateFromSelection(selection, tr.doc).map(function (_ref) {
|
|
40
42
|
var node = _ref.node,
|
|
41
43
|
pos = _ref.pos;
|
|
@@ -28,7 +28,9 @@ export const createPlugin = (api, dispatch, dispatchAnalyticsEvent, options = {}
|
|
|
28
28
|
let hideCursorChanged = false;
|
|
29
29
|
let blockSelectionChanged = false;
|
|
30
30
|
const needsManualSelection = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
31
|
-
const needsBlockSelection =
|
|
31
|
+
const needsBlockSelection = editorExperiment('platform_editor_block_menu', true, {
|
|
32
|
+
exposure: true
|
|
33
|
+
});
|
|
32
34
|
for (let i = transactions.length - 1; i >= 0; i--) {
|
|
33
35
|
const meta = transactions[i].getMeta(selectionPluginKey);
|
|
34
36
|
if ((meta === null || meta === void 0 ? void 0 : meta.hideCursor) !== undefined) {
|
|
@@ -4,7 +4,7 @@ import { AllSelection, NodeSelection, Selection, TextSelection } from '@atlaskit
|
|
|
4
4
|
import { findParentNode, findParentNodeClosestToPos, flatten, hasParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
import {
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { selectionPluginKey } from '../types';
|
|
9
9
|
import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
|
|
10
10
|
export const getDecorations = (tr, manualSelection, hideCursor, blockSelection) => {
|
|
@@ -26,7 +26,9 @@ export const getDecorations = (tr, manualSelection, hideCursor, blockSelection)
|
|
|
26
26
|
|
|
27
27
|
// Only apply node decorations when there is an active block selection.
|
|
28
28
|
// When there is no block selection, text selections should use native browser selection appearance.
|
|
29
|
-
if (!
|
|
29
|
+
if (!editorExperiment('platform_editor_block_menu', true, {
|
|
30
|
+
exposure: true
|
|
31
|
+
}) || blockSelection) {
|
|
30
32
|
const selectionDecorations = getNodesToDecorateFromSelection(selection, tr.doc).map(({
|
|
31
33
|
node,
|
|
32
34
|
pos
|
|
@@ -29,7 +29,9 @@ export var createPlugin = function createPlugin(api, dispatch, dispatchAnalytics
|
|
|
29
29
|
var hideCursorChanged = false;
|
|
30
30
|
var blockSelectionChanged = false;
|
|
31
31
|
var needsManualSelection = editorExperiment('platform_editor_element_drag_and_drop_multiselect', true);
|
|
32
|
-
var needsBlockSelection =
|
|
32
|
+
var needsBlockSelection = editorExperiment('platform_editor_block_menu', true, {
|
|
33
|
+
exposure: true
|
|
34
|
+
});
|
|
33
35
|
for (var i = transactions.length - 1; i >= 0; i--) {
|
|
34
36
|
var meta = transactions[i].getMeta(selectionPluginKey);
|
|
35
37
|
if ((meta === null || meta === void 0 ? void 0 : meta.hideCursor) !== undefined) {
|
|
@@ -5,7 +5,7 @@ import { AllSelection, NodeSelection, Selection, TextSelection } from '@atlaskit
|
|
|
5
5
|
import { findParentNode, findParentNodeClosestToPos, flatten, hasParentNode } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
|
-
import {
|
|
8
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
import { selectionPluginKey } from '../types';
|
|
10
10
|
import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
|
|
11
11
|
export var getDecorations = function getDecorations(tr, manualSelection, hideCursor, blockSelection) {
|
|
@@ -27,7 +27,9 @@ export var getDecorations = function getDecorations(tr, manualSelection, hideCur
|
|
|
27
27
|
|
|
28
28
|
// Only apply node decorations when there is an active block selection.
|
|
29
29
|
// When there is no block selection, text selections should use native browser selection appearance.
|
|
30
|
-
if (!
|
|
30
|
+
if (!editorExperiment('platform_editor_block_menu', true, {
|
|
31
|
+
exposure: true
|
|
32
|
+
}) || blockSelection) {
|
|
31
33
|
var selectionDecorations = getNodesToDecorateFromSelection(selection, tr.doc).map(function (_ref) {
|
|
32
34
|
var node = _ref.node,
|
|
33
35
|
pos = _ref.pos;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.10",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,7 +25,7 @@
|
|
|
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": "^
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^44.0.0",
|
|
29
29
|
"@atlaskit/tokens": "^11.1.0",
|
|
30
30
|
"@babel/runtime": "^7.0.0"
|
|
31
31
|
},
|