@atlaskit/editor-plugin-selection 16.0.7 → 16.1.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 +17 -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 +7 -7
- package/report.api.md +0 -73
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
|
|
8
|
+
Remove stale API report artifacts from published Platform packages.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 16.0.8
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 16.0.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -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.1.0",
|
|
4
4
|
"description": "Selection plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"singleton": true
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@atlaskit/editor-json-transformer": "^9.
|
|
22
|
+
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
23
23
|
"@atlaskit/editor-plugin-interaction": "^27.0.0",
|
|
24
24
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
25
|
-
"@atlaskit/editor-shared-styles": "^4.
|
|
26
|
-
"@atlaskit/editor-tables": "^3.
|
|
27
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
28
|
-
"@atlaskit/tokens": "^16.
|
|
25
|
+
"@atlaskit/editor-shared-styles": "^4.1.0",
|
|
26
|
+
"@atlaskit/editor-tables": "^3.1.0",
|
|
27
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
28
|
+
"@atlaskit/tokens": "^16.10.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@atlaskit/editor-common": "^120.
|
|
32
|
+
"@atlaskit/editor-common": "^120.9.0",
|
|
33
33
|
"react": "^18.2.0 || ^19.2.0"
|
|
34
34
|
},
|
|
35
35
|
"techstack": {
|
package/report.api.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/editor-plugin-selection"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
20
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
21
|
-
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
22
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
23
|
-
import { RelativeSelectionPos } from '@atlaskit/editor-common/selection';
|
|
24
|
-
import type { Selection as Selection_2 } from '@atlaskit/editor-prosemirror/state';
|
|
25
|
-
import type { SelectionSharedState } from '@atlaskit/editor-common/selection';
|
|
26
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
27
|
-
|
|
28
|
-
// @public (undocumented)
|
|
29
|
-
export type EditorSelectionAPI = {
|
|
30
|
-
selectNearNode: SetSelectionRelativeToNode;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// @public (undocumented)
|
|
34
|
-
export type SelectionPlugin = NextEditorPlugin<
|
|
35
|
-
'selection',
|
|
36
|
-
{
|
|
37
|
-
pluginConfiguration: SelectionPluginOptions | undefined;
|
|
38
|
-
actions: EditorSelectionAPI;
|
|
39
|
-
commands: {
|
|
40
|
-
displayGapCursor: (toggle: boolean) => EditorCommand;
|
|
41
|
-
};
|
|
42
|
-
sharedState: SelectionSharedState;
|
|
43
|
-
}
|
|
44
|
-
>;
|
|
45
|
-
|
|
46
|
-
// @public (undocumented)
|
|
47
|
-
export const selectionPlugin: SelectionPlugin;
|
|
48
|
-
|
|
49
|
-
// @public (undocumented)
|
|
50
|
-
interface SelectionPluginOptions extends LongPressSelectionPluginOptions {}
|
|
51
|
-
|
|
52
|
-
// @public (undocumented)
|
|
53
|
-
export type SetSelectionRelativeToNode = (props: {
|
|
54
|
-
selectionRelativeToNode?: RelativeSelectionPos;
|
|
55
|
-
selection?: Selection_2 | null;
|
|
56
|
-
}) => (state: EditorState) => Transaction;
|
|
57
|
-
|
|
58
|
-
// (No @packageDocumentation comment for this package)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
<!--SECTION END: Main Entry Types-->
|
|
62
|
-
|
|
63
|
-
### Peer Dependencies
|
|
64
|
-
|
|
65
|
-
<!--SECTION START: Peer Dependencies-->
|
|
66
|
-
|
|
67
|
-
```json
|
|
68
|
-
{
|
|
69
|
-
"react": "^16.8.0"
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
<!--SECTION END: Peer Dependencies-->
|