@atlaskit/editor-plugin-block-controls 12.2.0 → 12.2.2
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 +14 -0
- package/dist/cjs/editor-commands/move-node.js +2 -1
- package/dist/cjs/pm-plugins/decorations-drop-target.js +2 -1
- package/dist/es2019/editor-commands/move-node.js +2 -1
- package/dist/es2019/pm-plugins/decorations-drop-target.js +2 -1
- package/dist/esm/editor-commands/move-node.js +2 -1
- package/dist/esm/pm-plugins/decorations-drop-target.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 12.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.2.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`4c2645b77929d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4c2645b77929d) -
|
|
14
|
+
[ux] EDITOR-7346 add ai and diff plugin support for panel_c1
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 12.2.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -13,6 +13,7 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
13
13
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
14
14
|
var _types = require("@atlaskit/editor-common/types");
|
|
15
15
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
|
+
var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
|
|
16
17
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
17
18
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
19
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
@@ -78,7 +79,7 @@ var nodesSupportDragLayoutColumnInto = ['tableCell', 'tableHeader', 'panel', 'ex
|
|
|
78
79
|
var isDragLayoutColumnIntoSupportedNodes = function isDragLayoutColumnIntoSupportedNodes($from, $to) {
|
|
79
80
|
var _$from$nodeAfter;
|
|
80
81
|
var isTopLevel = $to.depth === 0;
|
|
81
|
-
var toParentTypeName = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0,
|
|
82
|
+
var toParentTypeName = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _nodeTypeUtils.getBaseNodeTypeName)($to.parent.type) : $to.parent.type.name;
|
|
82
83
|
var isDragIntoNodes = nodesSupportDragLayoutColumnInto.includes(toParentTypeName);
|
|
83
84
|
var supportedCondition = isDragIntoNodes || isTopLevel;
|
|
84
85
|
return ((_$from$nodeAfter = $from.nodeAfter) === null || _$from$nodeAfter === void 0 ? void 0 : _$from$nodeAfter.type.name) === 'layoutColumn' && $from.parent.type.name === 'layoutSection' && supportedCondition;
|
|
@@ -12,6 +12,7 @@ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
|
12
12
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
13
13
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
+
var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
|
|
15
16
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -250,7 +251,7 @@ var dropTargetDecorations = exports.dropTargetDecorations = function dropTargetD
|
|
|
250
251
|
pushNodeStack(node, depth);
|
|
251
252
|
return false; //not valid pos, so nested not valid either
|
|
252
253
|
}
|
|
253
|
-
var parentTypeName = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0,
|
|
254
|
+
var parentTypeName = (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) ? (0, _nodeTypeUtils.getBaseNodeTypeName)(parent.type) : parent.type.name;
|
|
254
255
|
if (parent.lastChild === node && !(0, _utils.isEmptyParagraph)(node) && parentTypesWithEndDropTarget.includes(parentTypeName)) {
|
|
255
256
|
endPos = pos + node.nodeSize;
|
|
256
257
|
}
|
|
@@ -4,7 +4,8 @@ import { blockControlsMessages } from '@atlaskit/editor-common/messages';
|
|
|
4
4
|
import { expandSelectionBounds, GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
5
5
|
import { transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
6
6
|
import { DIRECTION } from '@atlaskit/editor-common/types';
|
|
7
|
-
import {
|
|
7
|
+
import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
8
9
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
9
10
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
10
11
|
import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
|
@@ -3,7 +3,8 @@ import memoizeOne from 'memoize-one';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid';
|
|
5
5
|
import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
|
|
6
|
-
import {
|
|
6
|
+
import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
7
|
+
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
7
8
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
8
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -7,7 +7,8 @@ import { blockControlsMessages } from '@atlaskit/editor-common/messages';
|
|
|
7
7
|
import { expandSelectionBounds, GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
8
8
|
import { transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
9
9
|
import { DIRECTION } from '@atlaskit/editor-common/types';
|
|
10
|
-
import {
|
|
10
|
+
import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
11
12
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
12
13
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
13
14
|
import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
|
@@ -7,7 +7,8 @@ import memoizeOne from 'memoize-one';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
8
8
|
import uuid from 'uuid';
|
|
9
9
|
import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
|
|
10
|
-
import {
|
|
10
|
+
import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
|
|
11
|
+
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
11
12
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.2",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^19.0.0",
|
|
58
58
|
"@atlaskit/theme": "^25.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^91.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^13.3.0",
|
|
61
61
|
"@atlaskit/tooltip": "^22.6.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|