@atlaskit/editor-plugin-selection 16.0.7 → 16.0.8
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 +6 -0
- package/dist/cjs/pm-plugins/gap-cursor/utils.js +2 -2
- package/dist/cjs/pm-plugins/selection-main.js +2 -2
- package/dist/cjs/pm-plugins/utils.js +2 -2
- package/dist/es2019/pm-plugins/gap-cursor/utils.js +1 -1
- package/dist/es2019/pm-plugins/selection-main.js +1 -1
- package/dist/es2019/pm-plugins/utils.js +1 -1
- package/dist/esm/pm-plugins/gap-cursor/utils.js +1 -1
- package/dist/esm/pm-plugins/selection-main.js +1 -1
- package/dist/esm/pm-plugins/utils.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,7 @@ exports.isTextBlockNearPos = exports.isLeftCursor = exports.isIgnoredClick = voi
|
|
|
10
10
|
var _mediaSingle = require("@atlaskit/editor-common/media-single");
|
|
11
11
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
12
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
|
-
var
|
|
13
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
14
14
|
var isLeftCursor = exports.isLeftCursor = function isLeftCursor(side) {
|
|
15
15
|
return side === _selection.Side.LEFT;
|
|
16
16
|
};
|
|
@@ -136,7 +136,7 @@ var getComputedStyleForLayoutMode = exports.getComputedStyleForLayoutMode = func
|
|
|
136
136
|
return window.getComputedStyle(tableContainer);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
if ((0,
|
|
139
|
+
if ((0, _editorExperiment.editorExperiment)('advanced_layouts', true) && node && node.type.name === 'layoutSection') {
|
|
140
140
|
var layoutSectionContainer = dom.querySelector('.layout-section-container');
|
|
141
141
|
if (layoutSectionContainer) {
|
|
142
142
|
return window.getComputedStyle(layoutSectionContainer);
|
|
@@ -8,7 +8,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
10
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
|
-
var
|
|
11
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
12
12
|
var _types = require("../types");
|
|
13
13
|
var _actions = require("./actions");
|
|
14
14
|
var _createSelectionBetween = require("./events/create-selection-between");
|
|
@@ -36,7 +36,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, dispatch, d
|
|
|
36
36
|
var manualSelection;
|
|
37
37
|
var hideCursorChanged = false;
|
|
38
38
|
var blockSelectionChanged = false;
|
|
39
|
-
var needsBlockSelection = (0,
|
|
39
|
+
var needsBlockSelection = (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true, {
|
|
40
40
|
exposure: true
|
|
41
41
|
});
|
|
42
42
|
for (var i = transactions.length - 1; i >= 0; i--) {
|
|
@@ -15,7 +15,7 @@ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
|
15
15
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
-
var
|
|
18
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
19
19
|
var _types = require("../types");
|
|
20
20
|
var _hideCursorDecoration = require("./cursor/ui/hide-cursor-decoration");
|
|
21
21
|
var getDecorations = exports.getDecorations = function getDecorations(tr, manualSelection, hideCursor, blockSelection) {
|
|
@@ -37,7 +37,7 @@ var getDecorations = exports.getDecorations = function getDecorations(tr, manual
|
|
|
37
37
|
|
|
38
38
|
// Only apply node decorations when there is an active block selection.
|
|
39
39
|
// When there is no block selection, text selections should use native browser selection appearance.
|
|
40
|
-
if (!(0,
|
|
40
|
+
if (!(0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true, {
|
|
41
41
|
exposure: true
|
|
42
42
|
}) || blockSelection) {
|
|
43
43
|
var selectionDecorations = getNodesToDecorateFromSelection(selection, tr.doc).map(function (_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
2
2
|
import { Side } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import { TableSharedCssClassName, UnsupportedSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
export const isLeftCursor = side => side === Side.LEFT;
|
|
6
6
|
export function getMediaNearPos(doc, $pos, schema, dir = -1) {
|
|
7
7
|
let $currentPos = $pos;
|
|
@@ -5,7 +5,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
5
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
8
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
9
9
|
import { selectionPluginKey } from '../types';
|
|
10
10
|
import { SelectionActionTypes } from './actions';
|
|
11
11
|
import { onCreateSelectionBetween } from './events/create-selection-between';
|
|
@@ -6,7 +6,7 @@ import { findParentNode, findParentNodeClosestToPos, flatten, hasParentNode } fr
|
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { selectionPluginKey } from '../types';
|
|
11
11
|
import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
|
|
12
12
|
export const getDecorations = (tr, manualSelection, hideCursor, blockSelection) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
2
2
|
import { Side } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import { TableSharedCssClassName, UnsupportedSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
4
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
4
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
5
5
|
export var isLeftCursor = function isLeftCursor(side) {
|
|
6
6
|
return side === Side.LEFT;
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
5
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
8
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
9
9
|
import { selectionPluginKey } from '../types';
|
|
10
10
|
import { SelectionActionTypes } from './actions';
|
|
11
11
|
import { onCreateSelectionBetween } from './events/create-selection-between';
|
|
@@ -7,7 +7,7 @@ import { findParentNode, findParentNodeClosestToPos, flatten, hasParentNode } fr
|
|
|
7
7
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import { akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
11
11
|
import { selectionPluginKey } from '../types';
|
|
12
12
|
import { createHideCursorDecoration } from './cursor/ui/hide-cursor-decoration';
|
|
13
13
|
export var getDecorations = function getDecorations(tr, manualSelection, hideCursor, blockSelection) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.8",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
25
25
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
26
26
|
"@atlaskit/editor-tables": "^3.0.0",
|
|
27
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
28
28
|
"@atlaskit/tokens": "^16.9.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0"
|
|
30
30
|
},
|