@atlaskit/editor-plugin-block-controls 4.2.8 → 5.0.1
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 +16 -0
- package/dist/cjs/editor-commands/move-node.js +1 -1
- package/dist/cjs/pm-plugins/handle-mouse-over.js +10 -1
- package/dist/cjs/ui/drag-preview.js +1 -1
- package/dist/es2019/editor-commands/move-node.js +1 -1
- package/dist/es2019/pm-plugins/handle-mouse-over.js +11 -1
- package/dist/es2019/ui/drag-preview.js +1 -1
- package/dist/esm/editor-commands/move-node.js +1 -1
- package/dist/esm/pm-plugins/handle-mouse-over.js +10 -1
- package/dist/esm/ui/drag-preview.js +1 -1
- package/package.json +18 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 5.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`e5001e144b74e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e5001e144b74e) -
|
|
8
|
+
Internal changes to how border radius is applied.
|
|
9
|
+
- [`6e785bffbac45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e785bffbac45) -
|
|
10
|
+
ED-29126: Fixed dnd task range error
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 5.0.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.2.8
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -411,7 +411,7 @@ var moveNode = exports.moveNode = function moveNode(api) {
|
|
|
411
411
|
if (!convertedNode) {
|
|
412
412
|
return tr;
|
|
413
413
|
}
|
|
414
|
-
if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type.name) === 'taskList' && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
414
|
+
if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type.name) === 'taskList' && sliceFrom > 0 && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
415
415
|
sliceFrom = sliceFrom - 1;
|
|
416
416
|
}
|
|
417
417
|
|
|
@@ -15,12 +15,21 @@ var isEmptyNestedParagraphOrHeading = function isEmptyNestedParagraphOrHeading(t
|
|
|
15
15
|
return false;
|
|
16
16
|
};
|
|
17
17
|
var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, event, api) {
|
|
18
|
-
var _api$blockControls, _target$classList;
|
|
18
|
+
var _api$blockControls, _api$editorDisabled, _target$classList;
|
|
19
19
|
var _ref = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
|
|
20
20
|
isDragging = _ref.isDragging,
|
|
21
21
|
activeNode = _ref.activeNode,
|
|
22
22
|
isMenuOpen = _ref.isMenuOpen,
|
|
23
23
|
originalAnchorName = _ref.menuTriggerBy;
|
|
24
|
+
var _ref2 = (api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.sharedState.currentState()) || {
|
|
25
|
+
editorDisabled: false
|
|
26
|
+
},
|
|
27
|
+
editorDisabled = _ref2.editorDisabled;
|
|
28
|
+
|
|
29
|
+
// We shouldn't be firing mouse over transactions when the editor is disabled
|
|
30
|
+
if (editorDisabled && (0, _platformFeatureFlags.fg)('platform_editor_ai_rovo_free_gen')) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
24
33
|
|
|
25
34
|
// Most mouseover events don't fire during drag but some can slip through
|
|
26
35
|
// when the drag begins. This prevents those.
|
|
@@ -11,7 +11,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
11
11
|
var previewStyle = {
|
|
12
12
|
borderColor: "var(--ds-border, ".concat(_colors.N30, ")"),
|
|
13
13
|
borderStyle: 'solid',
|
|
14
|
-
borderRadius: "var(--ds-
|
|
14
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
15
15
|
borderWidth: "var(--ds-border-width-outline, 2px)",
|
|
16
16
|
backgroundColor: "var(--ds-skeleton-subtle, ".concat(_colors.N20, ")")
|
|
17
17
|
};
|
|
@@ -414,7 +414,7 @@ export const moveNode = api => (start, to, inputMethod = INPUT_METHOD.DRAG_AND_D
|
|
|
414
414
|
if (!convertedNode) {
|
|
415
415
|
return tr;
|
|
416
416
|
}
|
|
417
|
-
if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type.name) === 'taskList' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
417
|
+
if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type.name) === 'taskList' && sliceFrom > 0 && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
418
418
|
sliceFrom = sliceFrom - 1;
|
|
419
419
|
}
|
|
420
420
|
|
|
@@ -9,13 +9,23 @@ const isEmptyNestedParagraphOrHeading = target => {
|
|
|
9
9
|
return false;
|
|
10
10
|
};
|
|
11
11
|
export const handleMouseOver = (view, event, api) => {
|
|
12
|
-
var _api$blockControls, _target$classList;
|
|
12
|
+
var _api$blockControls, _api$editorDisabled, _target$classList;
|
|
13
13
|
const {
|
|
14
14
|
isDragging,
|
|
15
15
|
activeNode,
|
|
16
16
|
isMenuOpen,
|
|
17
17
|
menuTriggerBy: originalAnchorName
|
|
18
18
|
} = (api === null || api === void 0 ? void 0 : (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {};
|
|
19
|
+
const {
|
|
20
|
+
editorDisabled
|
|
21
|
+
} = (api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.sharedState.currentState()) || {
|
|
22
|
+
editorDisabled: false
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// We shouldn't be firing mouse over transactions when the editor is disabled
|
|
26
|
+
if (editorDisabled && fg('platform_editor_ai_rovo_free_gen')) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
19
29
|
|
|
20
30
|
// Most mouseover events don't fire during drag but some can slip through
|
|
21
31
|
// when the drag begins. This prevents those.
|
|
@@ -3,7 +3,7 @@ import { N20, N30 } from '@atlaskit/theme/colors';
|
|
|
3
3
|
const previewStyle = {
|
|
4
4
|
borderColor: `var(--ds-border, ${N30})`,
|
|
5
5
|
borderStyle: 'solid',
|
|
6
|
-
borderRadius: "var(--ds-
|
|
6
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
7
7
|
borderWidth: "var(--ds-border-width-outline, 2px)",
|
|
8
8
|
backgroundColor: `var(--ds-skeleton-subtle, ${N20})`
|
|
9
9
|
};
|
|
@@ -405,7 +405,7 @@ export var moveNode = function moveNode(api) {
|
|
|
405
405
|
if (!convertedNode) {
|
|
406
406
|
return tr;
|
|
407
407
|
}
|
|
408
|
-
if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type.name) === 'taskList' && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
408
|
+
if ((sourceNode === null || sourceNode === void 0 ? void 0 : sourceNode.type.name) === 'taskList' && sliceFrom > 0 && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
409
409
|
sliceFrom = sliceFrom - 1;
|
|
410
410
|
}
|
|
411
411
|
|
|
@@ -9,12 +9,21 @@ var isEmptyNestedParagraphOrHeading = function isEmptyNestedParagraphOrHeading(t
|
|
|
9
9
|
return false;
|
|
10
10
|
};
|
|
11
11
|
export var handleMouseOver = function handleMouseOver(view, event, api) {
|
|
12
|
-
var _api$blockControls, _target$classList;
|
|
12
|
+
var _api$blockControls, _api$editorDisabled, _target$classList;
|
|
13
13
|
var _ref = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
|
|
14
14
|
isDragging = _ref.isDragging,
|
|
15
15
|
activeNode = _ref.activeNode,
|
|
16
16
|
isMenuOpen = _ref.isMenuOpen,
|
|
17
17
|
originalAnchorName = _ref.menuTriggerBy;
|
|
18
|
+
var _ref2 = (api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.sharedState.currentState()) || {
|
|
19
|
+
editorDisabled: false
|
|
20
|
+
},
|
|
21
|
+
editorDisabled = _ref2.editorDisabled;
|
|
22
|
+
|
|
23
|
+
// We shouldn't be firing mouse over transactions when the editor is disabled
|
|
24
|
+
if (editorDisabled && fg('platform_editor_ai_rovo_free_gen')) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
18
27
|
|
|
19
28
|
// Most mouseover events don't fire during drag but some can slip through
|
|
20
29
|
// when the drag begins. This prevents those.
|
|
@@ -4,7 +4,7 @@ import { N20, N30 } from '@atlaskit/theme/colors';
|
|
|
4
4
|
var previewStyle = {
|
|
5
5
|
borderColor: "var(--ds-border, ".concat(N30, ")"),
|
|
6
6
|
borderStyle: 'solid',
|
|
7
|
-
borderRadius: "var(--ds-
|
|
7
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
8
8
|
borderWidth: "var(--ds-border-width-outline, 2px)",
|
|
9
9
|
backgroundColor: "var(--ds-skeleton-subtle, ".concat(N20, ")")
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^50.2.3",
|
|
32
|
-
"@atlaskit/editor-plugin-accessibility-utils": "^
|
|
33
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
34
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
35
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
36
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
37
|
-
"@atlaskit/editor-plugin-limited-mode": "^0.0
|
|
38
|
-
"@atlaskit/editor-plugin-metrics": "^
|
|
39
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
40
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
41
|
-
"@atlaskit/editor-plugin-type-ahead": "^
|
|
42
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
43
|
-
"@atlaskit/editor-plugin-width": "^
|
|
32
|
+
"@atlaskit/editor-plugin-accessibility-utils": "^4.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-analytics": "^4.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-editor-disabled": "^4.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-feature-flags": "^3.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-interaction": "^6.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-limited-mode": "^1.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-metrics": "^5.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-quick-insert": "^4.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-selection": "^4.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-type-ahead": "^4.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-user-intent": "^2.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-width": "^5.0.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
45
45
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
46
46
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
53
53
|
"@atlaskit/primitives": "^14.12.0",
|
|
54
54
|
"@atlaskit/theme": "^20.0.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^12.1.0",
|
|
56
56
|
"@atlaskit/tokens": "^6.1.0",
|
|
57
57
|
"@atlaskit/tooltip": "^20.4.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"uuid": "^3.1.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^
|
|
67
|
+
"@atlaskit/editor-common": "^108.0.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-dom": "^18.2.0",
|
|
70
70
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -153,6 +153,9 @@
|
|
|
153
153
|
"platform_editor_column_count_analytics": {
|
|
154
154
|
"type": "boolean"
|
|
155
155
|
},
|
|
156
|
+
"platform_editor_ai_rovo_free_gen": {
|
|
157
|
+
"type": "boolean"
|
|
158
|
+
},
|
|
156
159
|
"platform_editor_fix_widget_destroy": {
|
|
157
160
|
"type": "boolean"
|
|
158
161
|
},
|