@atlaskit/editor-plugin-expand 0.4.2 → 0.4.4
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,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 0.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#67238](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/67238) [`40533849b2ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40533849b2ec) - [ED-21835] Change EditorAPI type to always union with undefined
|
|
8
|
+
|
|
9
|
+
## 0.4.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 0.4.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -21,11 +21,12 @@ var isExpandSelected = function isExpandSelected(selection) {
|
|
|
21
21
|
function expandKeymap(api) {
|
|
22
22
|
var list = {};
|
|
23
23
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveRight.common, function (state, dispatch, editorView) {
|
|
24
|
+
var _api$selection;
|
|
24
25
|
if (!editorView) {
|
|
25
26
|
return false;
|
|
26
27
|
}
|
|
27
28
|
var selection = state.selection;
|
|
28
|
-
var selectionSharedState = (api === null || api === void 0 ? void 0 :
|
|
29
|
+
var selectionSharedState = (api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.currentState()) || {};
|
|
29
30
|
var selectionRelativeToNode = selectionSharedState.selectionRelativeToNode;
|
|
30
31
|
if (isExpandSelected(selection) && selectionRelativeToNode === _selection.RelativeSelectionPos.Start) {
|
|
31
32
|
return (0, _commands.focusTitle)(selection.from + 1)(state, dispatch, editorView);
|
|
@@ -33,11 +34,12 @@ function expandKeymap(api) {
|
|
|
33
34
|
return false;
|
|
34
35
|
}, list);
|
|
35
36
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.moveLeft.common, function (state, dispatch, editorView) {
|
|
37
|
+
var _api$selection2;
|
|
36
38
|
if (!editorView) {
|
|
37
39
|
return false;
|
|
38
40
|
}
|
|
39
41
|
var selection = state.selection;
|
|
40
|
-
var selectionSharedState = (api === null || api === void 0 ? void 0 :
|
|
42
|
+
var selectionSharedState = (api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.currentState()) || {};
|
|
41
43
|
var selectionRelativeToNode = selectionSharedState.selectionRelativeToNode;
|
|
42
44
|
if (isExpandSelected(selection) && (selectionRelativeToNode === undefined || selectionRelativeToNode === _selection.RelativeSelectionPos.End)) {
|
|
43
45
|
return (0, _commands.focusTitle)(selection.from + 1)(state, dispatch, editorView);
|
|
@@ -14,13 +14,14 @@ const isExpandSelected = selection => selection instanceof NodeSelection && isEx
|
|
|
14
14
|
export function expandKeymap(api) {
|
|
15
15
|
const list = {};
|
|
16
16
|
bindKeymapWithCommand(moveRight.common, (state, dispatch, editorView) => {
|
|
17
|
+
var _api$selection;
|
|
17
18
|
if (!editorView) {
|
|
18
19
|
return false;
|
|
19
20
|
}
|
|
20
21
|
const {
|
|
21
22
|
selection
|
|
22
23
|
} = state;
|
|
23
|
-
const selectionSharedState = (api === null || api === void 0 ? void 0 : api.selection.sharedState.currentState()) || {};
|
|
24
|
+
const selectionSharedState = (api === null || api === void 0 ? void 0 : (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.currentState()) || {};
|
|
24
25
|
const {
|
|
25
26
|
selectionRelativeToNode
|
|
26
27
|
} = selectionSharedState;
|
|
@@ -30,13 +31,14 @@ export function expandKeymap(api) {
|
|
|
30
31
|
return false;
|
|
31
32
|
}, list);
|
|
32
33
|
bindKeymapWithCommand(moveLeft.common, (state, dispatch, editorView) => {
|
|
34
|
+
var _api$selection2;
|
|
33
35
|
if (!editorView) {
|
|
34
36
|
return false;
|
|
35
37
|
}
|
|
36
38
|
const {
|
|
37
39
|
selection
|
|
38
40
|
} = state;
|
|
39
|
-
const selectionSharedState = (api === null || api === void 0 ? void 0 : api.selection.sharedState.currentState()) || {};
|
|
41
|
+
const selectionSharedState = (api === null || api === void 0 ? void 0 : (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.currentState()) || {};
|
|
40
42
|
const {
|
|
41
43
|
selectionRelativeToNode
|
|
42
44
|
} = selectionSharedState;
|
|
@@ -16,11 +16,12 @@ var isExpandSelected = function isExpandSelected(selection) {
|
|
|
16
16
|
export function expandKeymap(api) {
|
|
17
17
|
var list = {};
|
|
18
18
|
bindKeymapWithCommand(moveRight.common, function (state, dispatch, editorView) {
|
|
19
|
+
var _api$selection;
|
|
19
20
|
if (!editorView) {
|
|
20
21
|
return false;
|
|
21
22
|
}
|
|
22
23
|
var selection = state.selection;
|
|
23
|
-
var selectionSharedState = (api === null || api === void 0 ? void 0 :
|
|
24
|
+
var selectionSharedState = (api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : _api$selection.sharedState.currentState()) || {};
|
|
24
25
|
var selectionRelativeToNode = selectionSharedState.selectionRelativeToNode;
|
|
25
26
|
if (isExpandSelected(selection) && selectionRelativeToNode === RelativeSelectionPos.Start) {
|
|
26
27
|
return focusTitle(selection.from + 1)(state, dispatch, editorView);
|
|
@@ -28,11 +29,12 @@ export function expandKeymap(api) {
|
|
|
28
29
|
return false;
|
|
29
30
|
}, list);
|
|
30
31
|
bindKeymapWithCommand(moveLeft.common, function (state, dispatch, editorView) {
|
|
32
|
+
var _api$selection2;
|
|
31
33
|
if (!editorView) {
|
|
32
34
|
return false;
|
|
33
35
|
}
|
|
34
36
|
var selection = state.selection;
|
|
35
|
-
var selectionSharedState = (api === null || api === void 0 ? void 0 :
|
|
37
|
+
var selectionSharedState = (api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.sharedState.currentState()) || {};
|
|
36
38
|
var selectionRelativeToNode = selectionSharedState.selectionRelativeToNode;
|
|
37
39
|
if (isExpandSelected(selection) && (selectionRelativeToNode === undefined || selectionRelativeToNode === RelativeSelectionPos.End)) {
|
|
38
40
|
return focusTitle(selection.from + 1)(state, dispatch, editorView);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"releaseModel": "continuous",
|
|
15
15
|
"runReact18": false
|
|
16
16
|
},
|
|
17
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
17
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
18
18
|
"main": "dist/cjs/index.js",
|
|
19
19
|
"module": "dist/esm/index.js",
|
|
20
20
|
"module:es2019": "dist/es2019/index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^35.3.0",
|
|
37
37
|
"@atlaskit/button": "^17.2.0",
|
|
38
|
-
"@atlaskit/editor-common": "^76.
|
|
38
|
+
"@atlaskit/editor-common": "^76.39.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
41
|
-
"@atlaskit/editor-plugin-selection": "^0.
|
|
41
|
+
"@atlaskit/editor-plugin-selection": "^0.2.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@atlaskit/editor-plugin-content-insertion": "^0.1.0",
|
|
59
59
|
"@atlaskit/editor-plugin-guideline": "^0.5.0",
|
|
60
60
|
"@atlaskit/editor-plugin-quick-insert": "^0.2.0",
|
|
61
|
-
"@atlaskit/editor-plugin-table": "^5.
|
|
61
|
+
"@atlaskit/editor-plugin-table": "^5.8.0",
|
|
62
62
|
"@atlaskit/editor-plugin-type-ahead": "^0.9.0",
|
|
63
63
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
64
64
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|