@atlaskit/editor-plugin-block-controls 8.0.4 → 8.0.5
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 8.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0bf8d0bd8bf2c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0bf8d0bd8bf2c) -
|
|
8
|
+
[ux] EDITOR-4276 Apply block selection visual style only from drag handle
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.0.4
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -66,6 +66,15 @@ var createSelectionPreservationPlugin = exports.createSelectionPreservationPlugi
|
|
|
66
66
|
if (newState.preservedSelection && tr.docChanged) {
|
|
67
67
|
newState.preservedSelection = (0, _selection.mapPreservedSelection)(newState.preservedSelection, tr);
|
|
68
68
|
}
|
|
69
|
+
if (newState.preservedSelection !== pluginState.preservedSelection) {
|
|
70
|
+
if (newState !== null && newState !== void 0 && newState.preservedSelection) {
|
|
71
|
+
var _api$selection;
|
|
72
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 || (_api$selection = _api$selection.commands) === null || _api$selection === void 0 ? void 0 : _api$selection.setBlockSelection(newState.preservedSelection));
|
|
73
|
+
} else {
|
|
74
|
+
var _api$selection2;
|
|
75
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 || (_api$selection2 = _api$selection2.commands) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.clearBlockSelection());
|
|
76
|
+
}
|
|
77
|
+
}
|
|
69
78
|
return newState;
|
|
70
79
|
}
|
|
71
80
|
},
|
|
@@ -5,6 +5,7 @@ import { mapPreservedSelection } from '../utils/selection';
|
|
|
5
5
|
import { stopPreservingSelection } from './editor-commands';
|
|
6
6
|
import { selectionPreservationPluginKey } from './plugin-key';
|
|
7
7
|
import { getSelectionPreservationMeta, hasUserSelectionChange, isSelectionWithinCodeBlock } from './utils';
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Selection Preservation Plugin
|
|
10
11
|
*
|
|
@@ -57,6 +58,15 @@ export const createSelectionPreservationPlugin = api => () => {
|
|
|
57
58
|
if (newState.preservedSelection && tr.docChanged) {
|
|
58
59
|
newState.preservedSelection = mapPreservedSelection(newState.preservedSelection, tr);
|
|
59
60
|
}
|
|
61
|
+
if (newState.preservedSelection !== pluginState.preservedSelection) {
|
|
62
|
+
if (newState !== null && newState !== void 0 && newState.preservedSelection) {
|
|
63
|
+
var _api$selection, _api$selection$comman;
|
|
64
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$selection = api.selection) === null || _api$selection === void 0 ? void 0 : (_api$selection$comman = _api$selection.commands) === null || _api$selection$comman === void 0 ? void 0 : _api$selection$comman.setBlockSelection(newState.preservedSelection));
|
|
65
|
+
} else {
|
|
66
|
+
var _api$selection2, _api$selection2$comma;
|
|
67
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$selection2 = api.selection) === null || _api$selection2 === void 0 ? void 0 : (_api$selection2$comma = _api$selection2.commands) === null || _api$selection2$comma === void 0 ? void 0 : _api$selection2$comma.clearBlockSelection());
|
|
68
|
+
}
|
|
69
|
+
}
|
|
60
70
|
return newState;
|
|
61
71
|
}
|
|
62
72
|
},
|
|
@@ -8,6 +8,7 @@ import { mapPreservedSelection } from '../utils/selection';
|
|
|
8
8
|
import { stopPreservingSelection } from './editor-commands';
|
|
9
9
|
import { selectionPreservationPluginKey } from './plugin-key';
|
|
10
10
|
import { getSelectionPreservationMeta, hasUserSelectionChange, isSelectionWithinCodeBlock } from './utils';
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* Selection Preservation Plugin
|
|
13
14
|
*
|
|
@@ -59,6 +60,15 @@ export var createSelectionPreservationPlugin = function createSelectionPreservat
|
|
|
59
60
|
if (newState.preservedSelection && tr.docChanged) {
|
|
60
61
|
newState.preservedSelection = mapPreservedSelection(newState.preservedSelection, tr);
|
|
61
62
|
}
|
|
63
|
+
if (newState.preservedSelection !== pluginState.preservedSelection) {
|
|
64
|
+
if (newState !== null && newState !== void 0 && newState.preservedSelection) {
|
|
65
|
+
var _api$selection;
|
|
66
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$selection = api.selection) === null || _api$selection === void 0 || (_api$selection = _api$selection.commands) === null || _api$selection === void 0 ? void 0 : _api$selection.setBlockSelection(newState.preservedSelection));
|
|
67
|
+
} else {
|
|
68
|
+
var _api$selection2;
|
|
69
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$selection2 = api.selection) === null || _api$selection2 === void 0 || (_api$selection2 = _api$selection2.commands) === null || _api$selection2 === void 0 ? void 0 : _api$selection2.clearBlockSelection());
|
|
70
|
+
}
|
|
71
|
+
}
|
|
62
72
|
return newState;
|
|
63
73
|
}
|
|
64
74
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
49
|
-
"@atlaskit/icon": "^29.
|
|
49
|
+
"@atlaskit/icon": "^29.4.0",
|
|
50
50
|
"@atlaskit/link": "^3.3.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
55
55
|
"@atlaskit/primitives": "^17.0.0",
|
|
56
56
|
"@atlaskit/theme": "^21.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^16.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^16.11.0",
|
|
58
58
|
"@atlaskit/tokens": "^9.1.0",
|
|
59
|
-
"@atlaskit/tooltip": "^20.
|
|
59
|
+
"@atlaskit/tooltip": "^20.12.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
61
61
|
"@emotion/react": "^11.7.1",
|
|
62
62
|
"@popperjs/core": "^2.11.8",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"uuid": "^3.1.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@atlaskit/editor-common": "^111.
|
|
69
|
+
"@atlaskit/editor-common": "^111.7.0",
|
|
70
70
|
"react": "^18.2.0",
|
|
71
71
|
"react-dom": "^18.2.0",
|
|
72
72
|
"react-intl-next": "npm:react-intl@^5.18.1"
|