@atlaskit/editor-plugin-block-controls 1.13.2 → 1.13.3
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,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 1.13.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#138270](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138270)
|
|
8
|
+
[`4911de090a806`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4911de090a806) -
|
|
9
|
+
[ux] [ED-24880] Fixed bug which allowed empty block experiment insert button to appear when editor
|
|
10
|
+
is disabled
|
|
11
|
+
- [#138118](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/138118)
|
|
12
|
+
[`5e4d9eb1aefe4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5e4d9eb1aefe4) -
|
|
13
|
+
NOISSUE: Upgrades editor React peer dependencies to v18
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 1.13.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -10,6 +10,11 @@ var _view = require("@atlaskit/editor-prosemirror/view");
|
|
|
10
10
|
var _widget = require("../ui/empty-block-experiment/widget");
|
|
11
11
|
var emptyBlockExperimentPluginKey = exports.emptyBlockExperimentPluginKey = new _state.PluginKey('emptyBlockExperiment');
|
|
12
12
|
var getDecorations = function getDecorations(tr, api, getIntl) {
|
|
13
|
+
var _api$editorDisabled;
|
|
14
|
+
var isEditorDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
|
|
15
|
+
if (isEditorDisabled) {
|
|
16
|
+
return _view.DecorationSet.empty;
|
|
17
|
+
}
|
|
13
18
|
var widget = (0, _widget.createEmptyBlockWidgetDecoration)(tr.selection, api, getIntl);
|
|
14
19
|
if (widget) {
|
|
15
20
|
return _view.DecorationSet.create(tr.doc, [widget]);
|
|
@@ -4,6 +4,11 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import { createEmptyBlockWidgetDecoration } from '../ui/empty-block-experiment/widget';
|
|
5
5
|
export const emptyBlockExperimentPluginKey = new PluginKey('emptyBlockExperiment');
|
|
6
6
|
const getDecorations = (tr, api, getIntl) => {
|
|
7
|
+
var _api$editorDisabled, _api$editorDisabled$s;
|
|
8
|
+
const isEditorDisabled = api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : (_api$editorDisabled$s = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled$s === void 0 ? void 0 : _api$editorDisabled$s.editorDisabled;
|
|
9
|
+
if (isEditorDisabled) {
|
|
10
|
+
return DecorationSet.empty;
|
|
11
|
+
}
|
|
7
12
|
const widget = createEmptyBlockWidgetDecoration(tr.selection, api, getIntl);
|
|
8
13
|
if (widget) {
|
|
9
14
|
return DecorationSet.create(tr.doc, [widget]);
|
|
@@ -4,6 +4,11 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import { createEmptyBlockWidgetDecoration } from '../ui/empty-block-experiment/widget';
|
|
5
5
|
export var emptyBlockExperimentPluginKey = new PluginKey('emptyBlockExperiment');
|
|
6
6
|
var getDecorations = function getDecorations(tr, api, getIntl) {
|
|
7
|
+
var _api$editorDisabled;
|
|
8
|
+
var isEditorDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
|
|
9
|
+
if (isEditorDisabled) {
|
|
10
|
+
return DecorationSet.empty;
|
|
11
|
+
}
|
|
7
12
|
var widget = createEmptyBlockWidgetDecoration(tr.selection, api, getIntl);
|
|
8
13
|
if (widget) {
|
|
9
14
|
return DecorationSet.create(tr.doc, [widget]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"registry": "https://registry.npmjs.org/"
|
|
9
9
|
},
|
|
10
10
|
"atlassian": {
|
|
11
|
-
"team": "Editor: Jenga"
|
|
11
|
+
"team": "Editor: Jenga",
|
|
12
|
+
"runReact18": true
|
|
12
13
|
},
|
|
13
14
|
"repository": "https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo",
|
|
14
15
|
"main": "dist/cjs/index.js",
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
".": "./src/index.ts"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@atlaskit/editor-common": "^88.
|
|
33
|
+
"@atlaskit/editor-common": "^88.12.0",
|
|
33
34
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
34
35
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
|
35
36
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"uuid": "^3.1.0"
|
|
58
59
|
},
|
|
59
60
|
"peerDependencies": {
|
|
60
|
-
"react": "^16.8.0",
|
|
61
|
-
"react-dom": "^16.8.0",
|
|
61
|
+
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
62
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
62
63
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
63
64
|
},
|
|
64
65
|
"techstack": {
|