@atlaskit/editor-plugin-block-controls 9.1.1 → 9.1.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 +14 -0
- package/dist/cjs/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/cjs/pm-plugins/main.js +2 -2
- package/dist/cjs/pm-plugins/utils/marks.js +1 -2
- package/dist/cjs/ui/consts.js +5 -1
- package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/pm-plugins/utils/marks.js +1 -2
- package/dist/es2019/ui/consts.js +4 -0
- package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/pm-plugins/utils/marks.js +1 -2
- package/dist/esm/ui/consts.js +4 -0
- package/dist/types/ui/consts.d.ts +1 -0
- package/dist/types-ts4.5/ui/consts.d.ts +1 -0
- package/package.json +6 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 9.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d1a0ee6dbcefd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1a0ee6dbcefd) -
|
|
8
|
+
Clean up feature gate platform_editor_native_anchor_patch_2
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 9.1.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 9.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -73,7 +73,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
|
|
|
73
73
|
type: _decorationsCommon.TYPE_HANDLE_DEC,
|
|
74
74
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
75
75
|
testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.default)()),
|
|
76
|
-
marks: (0, _expValEquals.expValEquals)('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
76
|
+
marks: (0, _expValEquals.expValEquals)('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? (0, _marks.getActiveBlockMarks)(editorState, pos) : undefined,
|
|
77
77
|
destroy: function destroy(node) {
|
|
78
78
|
unbind && unbind();
|
|
79
79
|
if ((0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -958,7 +958,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
958
958
|
// another layer of protection to prevent handling mouseover
|
|
959
959
|
// when native anchor with dnd is enabled in limited mode
|
|
960
960
|
// in case there are descripancies between getNodeIdProvider limited mode state
|
|
961
|
-
if ((_getNodeIdProvider = (0, _nodeAnchor.getNodeIdProvider)(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
961
|
+
if ((_getNodeIdProvider = (0, _nodeAnchor.getNodeIdProvider)(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
962
962
|
return;
|
|
963
963
|
}
|
|
964
964
|
(0, _handleMouseOver.handleMouseOver)(view, event, api);
|
|
@@ -1093,7 +1093,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
1093
1093
|
editorView.dispatch(transaction);
|
|
1094
1094
|
}
|
|
1095
1095
|
}));
|
|
1096
|
-
var shouldObserve = (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
1096
|
+
var shouldObserve = (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? !(0, _anchorUtils.isAnchorSupported)() : true;
|
|
1097
1097
|
if (editorContentArea && shouldObserve) {
|
|
1098
1098
|
resizeObserverWidth.observe(editorContentArea);
|
|
1099
1099
|
}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getActiveBlockMarks = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
9
8
|
/**
|
|
10
9
|
* Remove this when platform_editor_clean_up_widget_mark_logic is cleaned up.
|
|
@@ -38,7 +37,7 @@ var getActiveBlockMarks = exports.getActiveBlockMarks = function getActiveBlockM
|
|
|
38
37
|
* the widget from inheriting alignment marks. This ensures the widget is positioned
|
|
39
38
|
* correctly at the boundary rather than being absorbed into the alignment wrapper.
|
|
40
39
|
*/
|
|
41
|
-
if (supportedMarks.length > 0 && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
40
|
+
if (supportedMarks.length > 0 && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
42
41
|
var _resolvedPos$nodeAfte;
|
|
43
42
|
var nextNodeMarks = ((_resolvedPos$nodeAfte = resolvedPos.nodeAfter) === null || _resolvedPos$nodeAfte === void 0 ? void 0 : _resolvedPos$nodeAfte.marks.filter(function (mark) {
|
|
44
43
|
return mark.type === alignment;
|
package/dist/cjs/ui/consts.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.topPositionAdjustment = exports.spacingBetweenNodesForPreview = exports.spaceLookupMap = exports.rootElementGap = exports.nodeMargins = exports.getNestedNodeLeftPaddingMargin = exports.dropTargetMarginMap = exports.dragHandleGap = exports.STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER = exports.STICKY_CONTROLS_TOP_MARGIN = exports.QUICK_INSERT_WIDTH = exports.QUICK_INSERT_LEFT_OFFSET = exports.QUICK_INSERT_HEIGHT = exports.QUICK_INSERT_DIMENSIONS = exports.DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT = exports.DRAG_HANDLE_NARROW_GAP = exports.DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = exports.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH = exports.DRAG_HANDLE_MAX_GAP = exports.DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT = exports.DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_H6_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H5_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H4_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H3_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H2_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H1_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DEFAULT_GAP = exports.DRAG_HANDLE_BORDER_RADIUS = exports.DEFAULT_COLUMN_DISTRIBUTIONS = void 0;
|
|
7
|
+
exports.topPositionAdjustment = exports.spacingBetweenNodesForPreview = exports.spaceLookupMap = exports.rootElementGap = exports.nodeMargins = exports.getNestedNodeLeftPaddingMargin = exports.dropTargetMarginMap = exports.dragHandleGap = exports.STICKY_CONTROLS_TOP_MARGIN_FOR_STICKY_HEADER = exports.STICKY_CONTROLS_TOP_MARGIN = exports.QUICK_INSERT_WIDTH = exports.QUICK_INSERT_LEFT_OFFSET = exports.QUICK_INSERT_HEIGHT = exports.QUICK_INSERT_DIMENSIONS = exports.DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_SYNCED_BLOCK_GAP = exports.DRAG_HANDLE_PARAGRAPH_TOP_ADJUSTMENT = exports.DRAG_HANDLE_NARROW_GAP = exports.DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = exports.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH = exports.DRAG_HANDLE_MAX_GAP = exports.DRAG_HANDLE_LAYOUT_SECTION_TOP_ADJUSTMENT = exports.DRAG_HANDLE_HEIGHT = exports.DRAG_HANDLE_H6_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H5_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H4_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H3_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H2_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H1_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DEFAULT_GAP = exports.DRAG_HANDLE_BORDER_RADIUS = exports.DEFAULT_COLUMN_DISTRIBUTIONS = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
10
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -17,6 +17,7 @@ var DRAG_HANDLE_ZINDEX = exports.DRAG_HANDLE_ZINDEX = _editorSharedStyles.akRich
|
|
|
17
17
|
var DRAG_HANDLE_DEFAULT_GAP = exports.DRAG_HANDLE_DEFAULT_GAP = 8;
|
|
18
18
|
var DRAG_HANDLE_NARROW_GAP = exports.DRAG_HANDLE_NARROW_GAP = 4;
|
|
19
19
|
var DRAG_HANDLE_MAX_GAP = exports.DRAG_HANDLE_MAX_GAP = 12;
|
|
20
|
+
var DRAG_HANDLE_SYNCED_BLOCK_GAP = exports.DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
|
|
20
21
|
var DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = exports.DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = _styles.DRAG_HANDLE_WIDTH + DRAG_HANDLE_MAX_GAP;
|
|
21
22
|
var DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = exports.DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = 4 + 2; // 4px for the divider vertical padding and 2px for the divider height
|
|
22
23
|
var DRAG_HANDLE_H1_TOP_ADJUSTMENT = exports.DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
|
|
@@ -47,6 +48,9 @@ var QUICK_INSERT_LEFT_OFFSET = exports.QUICK_INSERT_LEFT_OFFSET = 16;
|
|
|
47
48
|
var nodeTypeExcludeList = ['embedCard', 'mediaSingle', 'table'];
|
|
48
49
|
var breakoutResizableNodes = ['expand', 'layoutSection', 'codeBlock'];
|
|
49
50
|
var dragHandleGap = exports.dragHandleGap = function dragHandleGap(nodeType, parentNodeType) {
|
|
51
|
+
if (parentNodeType === 'syncBlock' || parentNodeType === 'bodiedSyncBlock') {
|
|
52
|
+
return DRAG_HANDLE_SYNCED_BLOCK_GAP;
|
|
53
|
+
}
|
|
50
54
|
if (parentNodeType && parentNodeType !== 'doc') {
|
|
51
55
|
return DRAG_HANDLE_NARROW_GAP;
|
|
52
56
|
}
|
|
@@ -64,7 +64,7 @@ export const dragHandleDecoration = ({
|
|
|
64
64
|
type: TYPE_HANDLE_DEC,
|
|
65
65
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
66
66
|
testid: `${TYPE_HANDLE_DEC}-${uuid()}`,
|
|
67
|
-
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
67
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? getActiveBlockMarks(editorState, pos) : undefined,
|
|
68
68
|
destroy: node => {
|
|
69
69
|
unbind && unbind();
|
|
70
70
|
if (editorExperiment('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -862,7 +862,7 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI, nodeDecora
|
|
|
862
862
|
// another layer of protection to prevent handling mouseover
|
|
863
863
|
// when native anchor with dnd is enabled in limited mode
|
|
864
864
|
// in case there are descripancies between getNodeIdProvider limited mode state
|
|
865
|
-
if ((_getNodeIdProvider = getNodeIdProvider(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
865
|
+
if ((_getNodeIdProvider = getNodeIdProvider(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
866
866
|
return;
|
|
867
867
|
}
|
|
868
868
|
handleMouseOver(view, event, api);
|
|
@@ -1002,7 +1002,7 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI, nodeDecora
|
|
|
1002
1002
|
editorView.dispatch(transaction);
|
|
1003
1003
|
}
|
|
1004
1004
|
}));
|
|
1005
|
-
const shouldObserve = expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
1005
|
+
const shouldObserve = expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? !isAnchorSupported() : true;
|
|
1006
1006
|
if (editorContentArea && shouldObserve) {
|
|
1007
1007
|
resizeObserverWidth.observe(editorContentArea);
|
|
1008
1008
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -33,7 +32,7 @@ export const getActiveBlockMarks = (state, pos) => {
|
|
|
33
32
|
* the widget from inheriting alignment marks. This ensures the widget is positioned
|
|
34
33
|
* correctly at the boundary rather than being absorbed into the alignment wrapper.
|
|
35
34
|
*/
|
|
36
|
-
if (supportedMarks.length > 0 && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
35
|
+
if (supportedMarks.length > 0 && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
37
36
|
var _resolvedPos$nodeAfte;
|
|
38
37
|
const nextNodeMarks = ((_resolvedPos$nodeAfte = resolvedPos.nodeAfter) === null || _resolvedPos$nodeAfte === void 0 ? void 0 : _resolvedPos$nodeAfte.marks.filter(mark => mark.type === alignment)) || [];
|
|
39
38
|
|
package/dist/es2019/ui/consts.js
CHANGED
|
@@ -8,6 +8,7 @@ export const DRAG_HANDLE_ZINDEX = akRichMediaResizeZIndex + akEditorUnitZIndex;
|
|
|
8
8
|
export const DRAG_HANDLE_DEFAULT_GAP = 8;
|
|
9
9
|
export const DRAG_HANDLE_NARROW_GAP = 4;
|
|
10
10
|
export const DRAG_HANDLE_MAX_GAP = 12;
|
|
11
|
+
export const DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
|
|
11
12
|
export const DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = DRAG_HANDLE_WIDTH + DRAG_HANDLE_MAX_GAP;
|
|
12
13
|
export const DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = 4 + 2; // 4px for the divider vertical padding and 2px for the divider height
|
|
13
14
|
export const DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
|
|
@@ -38,6 +39,9 @@ export const QUICK_INSERT_LEFT_OFFSET = 16;
|
|
|
38
39
|
const nodeTypeExcludeList = ['embedCard', 'mediaSingle', 'table'];
|
|
39
40
|
const breakoutResizableNodes = ['expand', 'layoutSection', 'codeBlock'];
|
|
40
41
|
export const dragHandleGap = (nodeType, parentNodeType) => {
|
|
42
|
+
if (parentNodeType === 'syncBlock' || parentNodeType === 'bodiedSyncBlock') {
|
|
43
|
+
return DRAG_HANDLE_SYNCED_BLOCK_GAP;
|
|
44
|
+
}
|
|
41
45
|
if (parentNodeType && parentNodeType !== 'doc') {
|
|
42
46
|
return DRAG_HANDLE_NARROW_GAP;
|
|
43
47
|
}
|
|
@@ -65,7 +65,7 @@ export var dragHandleDecoration = function dragHandleDecoration(_ref) {
|
|
|
65
65
|
type: TYPE_HANDLE_DEC,
|
|
66
66
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
67
67
|
testid: "".concat(TYPE_HANDLE_DEC, "-").concat(uuid()),
|
|
68
|
-
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
68
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? getActiveBlockMarks(editorState, pos) : undefined,
|
|
69
69
|
destroy: function destroy(node) {
|
|
70
70
|
unbind && unbind();
|
|
71
71
|
if (editorExperiment('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -952,7 +952,7 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
952
952
|
// another layer of protection to prevent handling mouseover
|
|
953
953
|
// when native anchor with dnd is enabled in limited mode
|
|
954
954
|
// in case there are descripancies between getNodeIdProvider limited mode state
|
|
955
|
-
if ((_getNodeIdProvider = getNodeIdProvider(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
955
|
+
if ((_getNodeIdProvider = getNodeIdProvider(view)) !== null && _getNodeIdProvider !== void 0 && _getNodeIdProvider.isLimitedMode() && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
956
956
|
return;
|
|
957
957
|
}
|
|
958
958
|
handleMouseOver(view, event, api);
|
|
@@ -1087,7 +1087,7 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
1087
1087
|
editorView.dispatch(transaction);
|
|
1088
1088
|
}
|
|
1089
1089
|
}));
|
|
1090
|
-
var shouldObserve = expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
1090
|
+
var shouldObserve = expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? !isAnchorSupported() : true;
|
|
1091
1091
|
if (editorContentArea && shouldObserve) {
|
|
1092
1092
|
resizeObserverWidth.observe(editorContentArea);
|
|
1093
1093
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -33,7 +32,7 @@ export var getActiveBlockMarks = function getActiveBlockMarks(state, pos) {
|
|
|
33
32
|
* the widget from inheriting alignment marks. This ensures the widget is positioned
|
|
34
33
|
* correctly at the boundary rather than being absorbed into the alignment wrapper.
|
|
35
34
|
*/
|
|
36
|
-
if (supportedMarks.length > 0 && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)
|
|
35
|
+
if (supportedMarks.length > 0 && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
|
|
37
36
|
var _resolvedPos$nodeAfte;
|
|
38
37
|
var nextNodeMarks = ((_resolvedPos$nodeAfte = resolvedPos.nodeAfter) === null || _resolvedPos$nodeAfte === void 0 ? void 0 : _resolvedPos$nodeAfte.marks.filter(function (mark) {
|
|
39
38
|
return mark.type === alignment;
|
package/dist/esm/ui/consts.js
CHANGED
|
@@ -10,6 +10,7 @@ export var DRAG_HANDLE_ZINDEX = akRichMediaResizeZIndex + akEditorUnitZIndex; //
|
|
|
10
10
|
export var DRAG_HANDLE_DEFAULT_GAP = 8;
|
|
11
11
|
export var DRAG_HANDLE_NARROW_GAP = 4;
|
|
12
12
|
export var DRAG_HANDLE_MAX_GAP = 12;
|
|
13
|
+
export var DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
|
|
13
14
|
export var DRAG_HANDLE_MAX_WIDTH_PLUS_GAP = DRAG_HANDLE_WIDTH + DRAG_HANDLE_MAX_GAP;
|
|
14
15
|
export var DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT = 4 + 2; // 4px for the divider vertical padding and 2px for the divider height
|
|
15
16
|
export var DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
|
|
@@ -40,6 +41,9 @@ export var QUICK_INSERT_LEFT_OFFSET = 16;
|
|
|
40
41
|
var nodeTypeExcludeList = ['embedCard', 'mediaSingle', 'table'];
|
|
41
42
|
var breakoutResizableNodes = ['expand', 'layoutSection', 'codeBlock'];
|
|
42
43
|
export var dragHandleGap = function dragHandleGap(nodeType, parentNodeType) {
|
|
44
|
+
if (parentNodeType === 'syncBlock' || parentNodeType === 'bodiedSyncBlock') {
|
|
45
|
+
return DRAG_HANDLE_SYNCED_BLOCK_GAP;
|
|
46
|
+
}
|
|
43
47
|
if (parentNodeType && parentNodeType !== 'doc') {
|
|
44
48
|
return DRAG_HANDLE_NARROW_GAP;
|
|
45
49
|
}
|
|
@@ -4,6 +4,7 @@ export declare const DRAG_HANDLE_ZINDEX: number;
|
|
|
4
4
|
export declare const DRAG_HANDLE_DEFAULT_GAP = 8;
|
|
5
5
|
export declare const DRAG_HANDLE_NARROW_GAP = 4;
|
|
6
6
|
export declare const DRAG_HANDLE_MAX_GAP = 12;
|
|
7
|
+
export declare const DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
|
|
7
8
|
export declare const DRAG_HANDLE_MAX_WIDTH_PLUS_GAP: number;
|
|
8
9
|
export declare const DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT: number;
|
|
9
10
|
export declare const DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
|
|
@@ -4,6 +4,7 @@ export declare const DRAG_HANDLE_ZINDEX: number;
|
|
|
4
4
|
export declare const DRAG_HANDLE_DEFAULT_GAP = 8;
|
|
5
5
|
export declare const DRAG_HANDLE_NARROW_GAP = 4;
|
|
6
6
|
export declare const DRAG_HANDLE_MAX_GAP = 12;
|
|
7
|
+
export declare const DRAG_HANDLE_SYNCED_BLOCK_GAP = 2.5;
|
|
7
8
|
export declare const DRAG_HANDLE_MAX_WIDTH_PLUS_GAP: number;
|
|
8
9
|
export declare const DRAG_HANDLE_DIVIDER_TOP_ADJUSTMENT: number;
|
|
9
10
|
export declare const DRAG_HANDLE_H1_TOP_ADJUSTMENT = 5;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/browser-apis": "^0.0.1",
|
|
32
|
-
"@atlaskit/button": "^23.
|
|
32
|
+
"@atlaskit/button": "^23.11.0",
|
|
33
33
|
"@atlaskit/editor-plugin-accessibility-utils": "^8.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^8.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-editor-disabled": "^8.0.0",
|
|
@@ -41,22 +41,22 @@
|
|
|
41
41
|
"@atlaskit/editor-plugin-quick-insert": "^8.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-selection": "^8.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-toolbar": "^5.1.0",
|
|
44
|
-
"@atlaskit/editor-plugin-type-ahead": "^8.
|
|
44
|
+
"@atlaskit/editor-plugin-type-ahead": "^8.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-user-intent": "^6.0.0",
|
|
46
46
|
"@atlaskit/editor-plugin-width": "^9.0.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
48
48
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
50
50
|
"@atlaskit/icon": "^34.0.0",
|
|
51
|
-
"@atlaskit/icon-lab": "^6.
|
|
52
|
-
"@atlaskit/link": "^3.
|
|
51
|
+
"@atlaskit/icon-lab": "^6.4.0",
|
|
52
|
+
"@atlaskit/link": "^3.4.0",
|
|
53
53
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
55
55
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
56
56
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
57
57
|
"@atlaskit/primitives": "^18.1.0",
|
|
58
58
|
"@atlaskit/theme": "^22.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^55.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^11.4.0",
|
|
61
61
|
"@atlaskit/tooltip": "^21.1.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
@@ -144,12 +144,6 @@
|
|
|
144
144
|
"platform_editor_expose_block_controls_deco_api": {
|
|
145
145
|
"type": "boolean"
|
|
146
146
|
},
|
|
147
|
-
"platform_editor_native_anchor_patch_1": {
|
|
148
|
-
"type": "boolean"
|
|
149
|
-
},
|
|
150
|
-
"platform_editor_native_anchor_patch_2": {
|
|
151
|
-
"type": "boolean"
|
|
152
|
-
},
|
|
153
147
|
"confluence_remix_button_right_side_block_fg": {
|
|
154
148
|
"type": "boolean"
|
|
155
149
|
}
|