@atlaskit/editor-plugin-block-controls 2.21.3 → 2.21.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 +19 -0
- package/dist/cjs/pm-plugins/decorations-anchor.js +2 -1
- package/dist/cjs/pm-plugins/decorations-drop-target.js +1 -2
- package/dist/cjs/pm-plugins/main.js +4 -5
- package/dist/cjs/ui/drag-handle.js +9 -1
- package/dist/cjs/ui/drop-target-layout.js +1 -2
- package/dist/cjs/ui/drop-target.js +7 -6
- package/dist/cjs/ui/inline-drop-target.js +1 -2
- package/dist/es2019/pm-plugins/decorations-anchor.js +2 -1
- package/dist/es2019/pm-plugins/decorations-drop-target.js +1 -2
- package/dist/es2019/pm-plugins/main.js +4 -5
- package/dist/es2019/ui/drag-handle.js +9 -1
- package/dist/es2019/ui/drop-target-layout.js +1 -2
- package/dist/es2019/ui/drop-target.js +7 -6
- package/dist/es2019/ui/inline-drop-target.js +1 -2
- package/dist/esm/pm-plugins/decorations-anchor.js +2 -1
- package/dist/esm/pm-plugins/decorations-drop-target.js +1 -2
- package/dist/esm/pm-plugins/main.js +4 -5
- package/dist/esm/ui/drag-handle.js +9 -1
- package/dist/esm/ui/drop-target-layout.js +1 -2
- package/dist/esm/ui/drop-target.js +7 -6
- package/dist/esm/ui/inline-drop-target.js +1 -2
- package/package.json +6 -6
- package/dist/cjs/pm-plugins/utils/drag-target-debug.js +0 -11
- package/dist/es2019/pm-plugins/utils/drag-target-debug.js +0 -5
- package/dist/esm/pm-plugins/utils/drag-target-debug.js +0 -5
- package/dist/types/pm-plugins/utils/drag-target-debug.d.ts +0 -1
- package/dist/types-ts4.5/pm-plugins/utils/drag-target-debug.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 2.21.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#104365](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104365)
|
|
8
|
+
[`b23e9a45b03a1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b23e9a45b03a1) -
|
|
9
|
+
Remove use of platform_editor_element_drag_and_drop_debug for drop target VR test
|
|
10
|
+
|
|
11
|
+
## 2.21.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#102952](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102952)
|
|
16
|
+
[`6d865148eda80`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6d865148eda80) -
|
|
17
|
+
Fix incorrect drop zone on table cell
|
|
18
|
+
- [#103494](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/103494)
|
|
19
|
+
[`955dbd85f329f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/955dbd85f329f) -
|
|
20
|
+
[ux] ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
21
|
+
|
|
3
22
|
## 2.21.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.shouldDescendIntoNode = exports.nodeDecorations = exports.findNodeDecs = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
10
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
12
|
var _decorationsCommon = require("./decorations-common");
|
|
12
13
|
var IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'listItem', 'caption', 'layoutColumn'];
|
|
@@ -17,7 +18,7 @@ var shouldDescendIntoNode = exports.shouldDescendIntoNode = function shouldDesce
|
|
|
17
18
|
// Optimisation to avoid drawing node decorations for empty table cells
|
|
18
19
|
if (['tableCell', 'tableHeader'].includes(node.type.name)) {
|
|
19
20
|
var _node$firstChild;
|
|
20
|
-
if (node.childCount === 1 && ((_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.type.name) === 'paragraph') {
|
|
21
|
+
if (node.childCount === 1 && ((_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.type.name) === 'paragraph' && ((0, _platformFeatureFlags.fg)('platform_editor_element_dnd_nested_fix_patch_6') ? node.firstChild.childCount === 0 : true)) {
|
|
21
22
|
return false;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
@@ -18,7 +18,6 @@ var _dropTarget = require("../ui/drop-target");
|
|
|
18
18
|
var _dropTargetLayout = require("../ui/drop-target-layout");
|
|
19
19
|
var _decorationsCommon = require("./decorations-common");
|
|
20
20
|
var _consts2 = require("./utils/consts");
|
|
21
|
-
var _dragTargetDebug = require("./utils/drag-target-debug");
|
|
22
21
|
var _validation = require("./utils/validation");
|
|
23
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -227,7 +226,7 @@ var dropTargetDecorations = exports.dropTargetDecorations = function dropTargetD
|
|
|
227
226
|
var canDrop = activePMNode && (0, _validation.canMoveNodeToIndex)(parent, index, activePMNode, $pos, node);
|
|
228
227
|
|
|
229
228
|
//NOTE: This will block drop targets showing for nodes that are valid after transformation (i.e. expand -> nestedExpand)
|
|
230
|
-
if (!canDrop
|
|
229
|
+
if (!canDrop) {
|
|
231
230
|
pushNodeStack(node, depth);
|
|
232
231
|
return false; //not valid pos, so nested not valid either
|
|
233
232
|
}
|
|
@@ -27,7 +27,6 @@ var _handleMouseOver = require("./handle-mouse-over");
|
|
|
27
27
|
var _keymap = require("./keymap");
|
|
28
28
|
var _activeAnchorTracker = require("./utils/active-anchor-tracker");
|
|
29
29
|
var _anchorUtils = require("./utils/anchor-utils");
|
|
30
|
-
var _dragTargetDebug = require("./utils/drag-target-debug");
|
|
31
30
|
var _transactions = require("./utils/transactions");
|
|
32
31
|
var key = exports.key = new _state.PluginKey('blockControls');
|
|
33
32
|
var EDITOR_BLOCKS_DRAG_INIT = 'Editor Blocks Drag Initialization Time';
|
|
@@ -219,14 +218,14 @@ var newApply = exports.newApply = function newApply(api, formatMessage, tr, curr
|
|
|
219
218
|
var isDropTargetsMissing = ((_meta$isDragging = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging !== void 0 ? _meta$isDragging : isDragging) && maybeNodeCountChanged && !(meta !== null && meta !== void 0 && meta.nodeMoved);
|
|
220
219
|
|
|
221
220
|
// Remove drop target decorations when dragging stops or they need to be redrawn
|
|
222
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing
|
|
221
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
|
|
223
222
|
var dropTargetDecs = (0, _decorationsDropTarget.findDropTargetDecs)(decorations);
|
|
224
223
|
decorations = decorations.remove(dropTargetDecs);
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
// Add drop targets when dragging starts or some are missing
|
|
228
227
|
if (api) {
|
|
229
|
-
if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing
|
|
228
|
+
if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing) {
|
|
230
229
|
var decs = (0, _decorationsDropTarget.dropTargetDecorations)(newState, api, formatMessage, nodeViewPortalProviderAPI, latestActiveNode, anchorRectCache);
|
|
231
230
|
decorations = decorations.add(newState.doc, decs);
|
|
232
231
|
}
|
|
@@ -368,7 +367,7 @@ var oldApply = exports.oldApply = function oldApply(api, formatMessage, tr, curr
|
|
|
368
367
|
var decs = (0, _decorationsDragHandle.dragHandleDecoration)(api, formatMessage, meta.activeNode.pos, meta.activeNode.anchorName, meta.activeNode.nodeType, nodeViewPortalProviderAPI, meta.activeNode.handleOptions);
|
|
369
368
|
decorations = decorations.add(newState.doc, [decs]);
|
|
370
369
|
}
|
|
371
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing
|
|
370
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
|
|
372
371
|
// Remove drop target decoration when dragging stops
|
|
373
372
|
var dropTargetDecs = decorations.find(undefined, undefined, function (spec) {
|
|
374
373
|
return spec.type === 'drop-target-decoration';
|
|
@@ -386,7 +385,7 @@ var oldApply = exports.oldApply = function oldApply(api, formatMessage, tr, curr
|
|
|
386
385
|
if (api) {
|
|
387
386
|
// Add drop targets when node is being dragged
|
|
388
387
|
// if the transaction is only for analytics and user is dragging, continue to draw drop targets
|
|
389
|
-
if (shouldCreateDropTargets
|
|
388
|
+
if (shouldCreateDropTargets) {
|
|
390
389
|
var _meta$activeNode7;
|
|
391
390
|
var _decs = (0, _decorationsDropTarget.dropTargetDecorations)(newState, api, formatMessage, nodeViewPortalProviderAPI, isNestedEnabled ? (_meta$activeNode7 = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode7 !== void 0 ? _meta$activeNode7 : mappedActiveNodePos : meta === null || meta === void 0 ? void 0 : meta.activeNode, anchorRectCache);
|
|
392
391
|
decorations = decorations.add(newState.doc, _decs);
|
|
@@ -72,6 +72,11 @@ var dragHandleButtonStyles = (0, _react2.css)({
|
|
|
72
72
|
outline: "2px solid ".concat("var(--ds-border-focused, #388BFF)")
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
+
var dragHandleMultiLineSelectionFixFirefox = (0, _react2.css)({
|
|
76
|
+
'&::selection': {
|
|
77
|
+
backgroundColor: 'transparent'
|
|
78
|
+
}
|
|
79
|
+
});
|
|
75
80
|
var layoutColumnDragHandleStyles = (0, _react2.css)({
|
|
76
81
|
transform: 'rotate(90deg)'
|
|
77
82
|
});
|
|
@@ -430,7 +435,10 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref) {
|
|
|
430
435
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
431
436
|
(0, _react2.jsx)("button", {
|
|
432
437
|
type: "button",
|
|
433
|
-
css: [dragHandleButtonStyles,
|
|
438
|
+
css: [dragHandleButtonStyles,
|
|
439
|
+
// ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
440
|
+
// See https://product-fabric.atlassian.net/browse/ED-26266
|
|
441
|
+
_browser.browser.gecko && (0, _platformFeatureFlags.fg)('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, (0, _experiments.editorExperiment)('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
|
|
434
442
|
ref: buttonRef
|
|
435
443
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
436
444
|
,
|
|
@@ -17,7 +17,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
18
18
|
var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
|
|
19
19
|
var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
|
|
20
|
-
var _dragTargetDebug = require("../pm-plugins/utils/drag-target-debug");
|
|
21
20
|
var _updateSelection = require("../pm-plugins/utils/update-selection");
|
|
22
21
|
/**
|
|
23
22
|
* @jsxRuntime classic
|
|
@@ -131,7 +130,7 @@ var DropTargetLayout = exports.DropTargetLayout = function DropTargetLayout(prop
|
|
|
131
130
|
,
|
|
132
131
|
css: [dropTargetLayoutStyle, dropTargetStackLayoutHintStyle],
|
|
133
132
|
"data-testid": "block-ctrl-drop-indicator"
|
|
134
|
-
}, isDraggedOver
|
|
133
|
+
}, isDraggedOver ? (0, _react2.jsx)(_box.DropIndicator, {
|
|
135
134
|
edge: "right",
|
|
136
135
|
gap: "-".concat(DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH, "px")
|
|
137
136
|
}) : isActiveAnchor && (0, _react2.jsx)("div", {
|
|
@@ -18,7 +18,6 @@ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
|
18
18
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
19
19
|
var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
|
|
20
20
|
var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
|
|
21
|
-
var _dragTargetDebug = require("../pm-plugins/utils/drag-target-debug");
|
|
22
21
|
var _inlineDropTarget = require("../pm-plugins/utils/inline-drop-target");
|
|
23
22
|
var _consts = require("./consts");
|
|
24
23
|
var _inlineDropTarget2 = require("./inline-drop-target");
|
|
@@ -48,7 +47,11 @@ var styleDropIndicator = (0, _react2.css)({
|
|
|
48
47
|
height: '100%',
|
|
49
48
|
margin: '0 auto',
|
|
50
49
|
position: 'relative',
|
|
51
|
-
width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)")
|
|
50
|
+
width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)"),
|
|
51
|
+
display: 'none'
|
|
52
|
+
});
|
|
53
|
+
var styleDropIndicatorVisible = (0, _react2.css)({
|
|
54
|
+
display: 'block'
|
|
52
55
|
});
|
|
53
56
|
var nestedDropIndicatorStyle = (0, _react2.css)({
|
|
54
57
|
position: 'relative'
|
|
@@ -232,10 +235,8 @@ var DropTarget = exports.DropTarget = function DropTarget(props) {
|
|
|
232
235
|
,
|
|
233
236
|
style: dynamicStyle,
|
|
234
237
|
"data-testid": "block-ctrl-drop-target"
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
(isDraggedOver || (0, _dragTargetDebug.isBlocksDragTargetDebug)()) && (0, _react2.jsx)("div", {
|
|
238
|
-
css: styleDropIndicator,
|
|
238
|
+
}, (0, _react2.jsx)("div", {
|
|
239
|
+
css: [styleDropIndicator, isDraggedOver && styleDropIndicatorVisible],
|
|
239
240
|
"data-testid": "block-ctrl-drop-indicator"
|
|
240
241
|
}, (0, _react2.jsx)(_box.DropIndicator, {
|
|
241
242
|
edge: "bottom"
|
|
@@ -17,7 +17,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
18
18
|
var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
|
|
19
19
|
var _anchorUtils = require("../pm-plugins/utils/anchor-utils");
|
|
20
|
-
var _dragTargetDebug = require("../pm-plugins/utils/drag-target-debug");
|
|
21
20
|
var _updateSelection = require("../pm-plugins/utils/update-selection");
|
|
22
21
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
23
22
|
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
@@ -255,7 +254,7 @@ var InlineDropTarget = exports.InlineDropTarget = function InlineDropTarget(_ref
|
|
|
255
254
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
256
255
|
,
|
|
257
256
|
style: hoverZoneRectStyle
|
|
258
|
-
}, isDraggedOver
|
|
257
|
+
}, isDraggedOver ? (0, _react2.jsx)(_box.DropIndicator, {
|
|
259
258
|
edge: dropIndicatorPos
|
|
260
259
|
}) : isActiveAnchor && (0, _react2.jsx)("div", {
|
|
261
260
|
"data-testid": "block-ctrl-drop-hint",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
import { getNestedDepth, getNodeAnchor, TYPE_NODE_DEC } from './decorations-common';
|
|
4
5
|
const IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'listItem', 'caption', 'layoutColumn'];
|
|
@@ -9,7 +10,7 @@ export const shouldDescendIntoNode = node => {
|
|
|
9
10
|
// Optimisation to avoid drawing node decorations for empty table cells
|
|
10
11
|
if (['tableCell', 'tableHeader'].includes(node.type.name)) {
|
|
11
12
|
var _node$firstChild;
|
|
12
|
-
if (node.childCount === 1 && ((_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.type.name) === 'paragraph') {
|
|
13
|
+
if (node.childCount === 1 && ((_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.type.name) === 'paragraph' && (fg('platform_editor_element_dnd_nested_fix_patch_6') ? node.firstChild.childCount === 0 : true)) {
|
|
13
14
|
return false;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
@@ -10,7 +10,6 @@ import { DropTarget, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP, EDITOR_BLOCK_CONT
|
|
|
10
10
|
import { DropTargetLayout } from '../ui/drop-target-layout';
|
|
11
11
|
import { getNestedDepth, TYPE_DROP_TARGET_DEC, unmountDecorations } from './decorations-common';
|
|
12
12
|
import { maxLayoutColumnSupported } from './utils/consts';
|
|
13
|
-
import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
|
|
14
13
|
import { canMoveNodeToIndex, isInSameLayout } from './utils/validation';
|
|
15
14
|
const IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'listItem', 'caption'];
|
|
16
15
|
const PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
|
|
@@ -216,7 +215,7 @@ export const dropTargetDecorations = (newState, api, formatMessage, nodeViewPort
|
|
|
216
215
|
const canDrop = activePMNode && canMoveNodeToIndex(parent, index, activePMNode, $pos, node);
|
|
217
216
|
|
|
218
217
|
//NOTE: This will block drop targets showing for nodes that are valid after transformation (i.e. expand -> nestedExpand)
|
|
219
|
-
if (!canDrop
|
|
218
|
+
if (!canDrop) {
|
|
220
219
|
pushNodeStack(node, depth);
|
|
221
220
|
return false; //not valid pos, so nested not valid either
|
|
222
221
|
}
|
|
@@ -19,7 +19,6 @@ import { handleMouseOver } from './handle-mouse-over';
|
|
|
19
19
|
import { boundKeydownHandler } from './keymap';
|
|
20
20
|
import { defaultActiveAnchorTracker } from './utils/active-anchor-tracker';
|
|
21
21
|
import { AnchorRectCache, isAnchorSupported } from './utils/anchor-utils';
|
|
22
|
-
import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
|
|
23
22
|
import { getTrMetadata } from './utils/transactions';
|
|
24
23
|
export const key = new PluginKey('blockControls');
|
|
25
24
|
const EDITOR_BLOCKS_DRAG_INIT = 'Editor Blocks Drag Initialization Time';
|
|
@@ -219,14 +218,14 @@ export const newApply = (api, formatMessage, tr, currentState, newState, flags,
|
|
|
219
218
|
const isDropTargetsMissing = ((_meta$isDragging = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging !== void 0 ? _meta$isDragging : isDragging) && maybeNodeCountChanged && !(meta !== null && meta !== void 0 && meta.nodeMoved);
|
|
220
219
|
|
|
221
220
|
// Remove drop target decorations when dragging stops or they need to be redrawn
|
|
222
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing
|
|
221
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
|
|
223
222
|
const dropTargetDecs = findDropTargetDecs(decorations);
|
|
224
223
|
decorations = decorations.remove(dropTargetDecs);
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
// Add drop targets when dragging starts or some are missing
|
|
228
227
|
if (api) {
|
|
229
|
-
if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing
|
|
228
|
+
if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing) {
|
|
230
229
|
const decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, latestActiveNode, anchorRectCache);
|
|
231
230
|
decorations = decorations.add(newState.doc, decs);
|
|
232
231
|
}
|
|
@@ -355,7 +354,7 @@ export const oldApply = (api, formatMessage, tr, currentState, oldState, newStat
|
|
|
355
354
|
const decs = dragHandleDecoration(api, formatMessage, meta.activeNode.pos, meta.activeNode.anchorName, meta.activeNode.nodeType, nodeViewPortalProviderAPI, meta.activeNode.handleOptions);
|
|
356
355
|
decorations = decorations.add(newState.doc, [decs]);
|
|
357
356
|
}
|
|
358
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing
|
|
357
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
|
|
359
358
|
// Remove drop target decoration when dragging stops
|
|
360
359
|
const dropTargetDecs = decorations.find(undefined, undefined, spec => spec.type === 'drop-target-decoration');
|
|
361
360
|
decorations = decorations.remove(dropTargetDecs);
|
|
@@ -371,7 +370,7 @@ export const oldApply = (api, formatMessage, tr, currentState, oldState, newStat
|
|
|
371
370
|
if (api) {
|
|
372
371
|
// Add drop targets when node is being dragged
|
|
373
372
|
// if the transaction is only for analytics and user is dragging, continue to draw drop targets
|
|
374
|
-
if (shouldCreateDropTargets
|
|
373
|
+
if (shouldCreateDropTargets) {
|
|
375
374
|
var _meta$activeNode7;
|
|
376
375
|
const decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, isNestedEnabled ? (_meta$activeNode7 = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode7 !== void 0 ? _meta$activeNode7 : mappedActiveNodePos : meta === null || meta === void 0 ? void 0 : meta.activeNode, anchorRectCache);
|
|
377
376
|
decorations = decorations.add(newState.doc, decs);
|
|
@@ -61,6 +61,11 @@ const dragHandleButtonStyles = css({
|
|
|
61
61
|
outline: `2px solid ${"var(--ds-border-focused, #388BFF)"}`
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
+
const dragHandleMultiLineSelectionFixFirefox = css({
|
|
65
|
+
'&::selection': {
|
|
66
|
+
backgroundColor: 'transparent'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
64
69
|
const layoutColumnDragHandleStyles = css({
|
|
65
70
|
transform: 'rotate(90deg)'
|
|
66
71
|
});
|
|
@@ -409,7 +414,10 @@ export const DragHandle = ({
|
|
|
409
414
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
410
415
|
jsx("button", {
|
|
411
416
|
type: "button",
|
|
412
|
-
css: [dragHandleButtonStyles,
|
|
417
|
+
css: [dragHandleButtonStyles,
|
|
418
|
+
// ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
419
|
+
// See https://product-fabric.atlassian.net/browse/ED-26266
|
|
420
|
+
browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
|
|
413
421
|
ref: buttonRef
|
|
414
422
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
415
423
|
,
|
|
@@ -14,7 +14,6 @@ import { B200 } from '@atlaskit/theme/colors';
|
|
|
14
14
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
15
15
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
16
16
|
import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
|
|
17
|
-
import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
|
|
18
17
|
import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
|
|
19
18
|
|
|
20
19
|
// 8px gap + 16px on left and right
|
|
@@ -127,7 +126,7 @@ export const DropTargetLayout = props => {
|
|
|
127
126
|
,
|
|
128
127
|
css: [dropTargetLayoutStyle, dropTargetStackLayoutHintStyle],
|
|
129
128
|
"data-testid": "block-ctrl-drop-indicator"
|
|
130
|
-
}, isDraggedOver
|
|
129
|
+
}, isDraggedOver ? jsx(DropIndicator, {
|
|
131
130
|
edge: "right",
|
|
132
131
|
gap: `-${DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH}px`
|
|
133
132
|
}) : isActiveAnchor && jsx("div", {
|
|
@@ -15,7 +15,6 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
15
15
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
16
16
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
17
17
|
import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
|
|
18
|
-
import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
|
|
19
18
|
import { shouldAllowInlineDropTarget } from '../pm-plugins/utils/inline-drop-target';
|
|
20
19
|
import { getNestedNodeLeftPaddingMargin } from './consts';
|
|
21
20
|
import { InlineDropTarget } from './inline-drop-target';
|
|
@@ -38,7 +37,11 @@ const styleDropIndicator = css({
|
|
|
38
37
|
height: '100%',
|
|
39
38
|
margin: '0 auto',
|
|
40
39
|
position: 'relative',
|
|
41
|
-
width: `var(${EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH}, 100%)
|
|
40
|
+
width: `var(${EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH}, 100%)`,
|
|
41
|
+
display: 'none'
|
|
42
|
+
});
|
|
43
|
+
const styleDropIndicatorVisible = css({
|
|
44
|
+
display: 'block'
|
|
42
45
|
});
|
|
43
46
|
const nestedDropIndicatorStyle = css({
|
|
44
47
|
position: 'relative'
|
|
@@ -221,10 +224,8 @@ export const DropTarget = props => {
|
|
|
221
224
|
,
|
|
222
225
|
style: dynamicStyle,
|
|
223
226
|
"data-testid": "block-ctrl-drop-target"
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
(isDraggedOver || isBlocksDragTargetDebug()) && jsx("div", {
|
|
227
|
-
css: styleDropIndicator,
|
|
227
|
+
}, jsx("div", {
|
|
228
|
+
css: [styleDropIndicator, isDraggedOver && styleDropIndicatorVisible],
|
|
228
229
|
"data-testid": "block-ctrl-drop-indicator"
|
|
229
230
|
}, jsx(DropIndicator, {
|
|
230
231
|
edge: "bottom"
|
|
@@ -16,7 +16,6 @@ import { B200 } from '@atlaskit/theme/colors';
|
|
|
16
16
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
17
17
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
18
18
|
import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
|
|
19
|
-
import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
|
|
20
19
|
import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
|
|
21
20
|
const HOVER_ZONE_WIDTH = '--editor-blocks-inline-hover-zone-width';
|
|
22
21
|
const HOVER_ZONE_HEIGHT = '--editor-blocks-inline-hover-zone-height';
|
|
@@ -252,7 +251,7 @@ export const InlineDropTarget = ({
|
|
|
252
251
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
253
252
|
,
|
|
254
253
|
style: hoverZoneRectStyle
|
|
255
|
-
}, isDraggedOver
|
|
254
|
+
}, isDraggedOver ? jsx(DropIndicator, {
|
|
256
255
|
edge: dropIndicatorPos
|
|
257
256
|
}) : isActiveAnchor && jsx("div", {
|
|
258
257
|
"data-testid": "block-ctrl-drop-hint",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
5
|
import { getNestedDepth, getNodeAnchor, TYPE_NODE_DEC } from './decorations-common';
|
|
5
6
|
var IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'listItem', 'caption', 'layoutColumn'];
|
|
@@ -10,7 +11,7 @@ export var shouldDescendIntoNode = function shouldDescendIntoNode(node) {
|
|
|
10
11
|
// Optimisation to avoid drawing node decorations for empty table cells
|
|
11
12
|
if (['tableCell', 'tableHeader'].includes(node.type.name)) {
|
|
12
13
|
var _node$firstChild;
|
|
13
|
-
if (node.childCount === 1 && ((_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.type.name) === 'paragraph') {
|
|
14
|
+
if (node.childCount === 1 && ((_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.type.name) === 'paragraph' && (fg('platform_editor_element_dnd_nested_fix_patch_6') ? node.firstChild.childCount === 0 : true)) {
|
|
14
15
|
return false;
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -13,7 +13,6 @@ import { DropTarget, EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP, EDITOR_BLOCK_CONT
|
|
|
13
13
|
import { DropTargetLayout } from '../ui/drop-target-layout';
|
|
14
14
|
import { getNestedDepth, TYPE_DROP_TARGET_DEC, unmountDecorations } from './decorations-common';
|
|
15
15
|
import { maxLayoutColumnSupported } from './utils/consts';
|
|
16
|
-
import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
|
|
17
16
|
import { canMoveNodeToIndex, isInSameLayout } from './utils/validation';
|
|
18
17
|
var IGNORE_NODES = ['tableCell', 'tableHeader', 'tableRow', 'layoutColumn', 'listItem', 'caption'];
|
|
19
18
|
var PARENT_WITH_END_DROP_TARGET = ['tableCell', 'tableHeader', 'panel', 'layoutColumn', 'expand', 'nestedExpand', 'bodiedExtension'];
|
|
@@ -220,7 +219,7 @@ export var dropTargetDecorations = function dropTargetDecorations(newState, api,
|
|
|
220
219
|
var canDrop = activePMNode && canMoveNodeToIndex(parent, index, activePMNode, $pos, node);
|
|
221
220
|
|
|
222
221
|
//NOTE: This will block drop targets showing for nodes that are valid after transformation (i.e. expand -> nestedExpand)
|
|
223
|
-
if (!canDrop
|
|
222
|
+
if (!canDrop) {
|
|
224
223
|
pushNodeStack(node, depth);
|
|
225
224
|
return false; //not valid pos, so nested not valid either
|
|
226
225
|
}
|
|
@@ -20,7 +20,6 @@ import { handleMouseOver } from './handle-mouse-over';
|
|
|
20
20
|
import { boundKeydownHandler } from './keymap';
|
|
21
21
|
import { defaultActiveAnchorTracker } from './utils/active-anchor-tracker';
|
|
22
22
|
import { AnchorRectCache, isAnchorSupported } from './utils/anchor-utils';
|
|
23
|
-
import { isBlocksDragTargetDebug } from './utils/drag-target-debug';
|
|
24
23
|
import { getTrMetadata } from './utils/transactions';
|
|
25
24
|
export var key = new PluginKey('blockControls');
|
|
26
25
|
var EDITOR_BLOCKS_DRAG_INIT = 'Editor Blocks Drag Initialization Time';
|
|
@@ -212,14 +211,14 @@ export var newApply = function newApply(api, formatMessage, tr, currentState, ne
|
|
|
212
211
|
var isDropTargetsMissing = ((_meta$isDragging = meta === null || meta === void 0 ? void 0 : meta.isDragging) !== null && _meta$isDragging !== void 0 ? _meta$isDragging : isDragging) && maybeNodeCountChanged && !(meta !== null && meta !== void 0 && meta.nodeMoved);
|
|
213
212
|
|
|
214
213
|
// Remove drop target decorations when dragging stops or they need to be redrawn
|
|
215
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing
|
|
214
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
|
|
216
215
|
var dropTargetDecs = findDropTargetDecs(decorations);
|
|
217
216
|
decorations = decorations.remove(dropTargetDecs);
|
|
218
217
|
}
|
|
219
218
|
|
|
220
219
|
// Add drop targets when dragging starts or some are missing
|
|
221
220
|
if (api) {
|
|
222
|
-
if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing
|
|
221
|
+
if (meta !== null && meta !== void 0 && meta.isDragging || isDropTargetsMissing) {
|
|
223
222
|
var decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, latestActiveNode, anchorRectCache);
|
|
224
223
|
decorations = decorations.add(newState.doc, decs);
|
|
225
224
|
}
|
|
@@ -361,7 +360,7 @@ export var oldApply = function oldApply(api, formatMessage, tr, currentState, ol
|
|
|
361
360
|
var decs = dragHandleDecoration(api, formatMessage, meta.activeNode.pos, meta.activeNode.anchorName, meta.activeNode.nodeType, nodeViewPortalProviderAPI, meta.activeNode.handleOptions);
|
|
362
361
|
decorations = decorations.add(newState.doc, [decs]);
|
|
363
362
|
}
|
|
364
|
-
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing
|
|
363
|
+
if ((meta === null || meta === void 0 ? void 0 : meta.isDragging) === false || isDropTargetsMissing) {
|
|
365
364
|
// Remove drop target decoration when dragging stops
|
|
366
365
|
var dropTargetDecs = decorations.find(undefined, undefined, function (spec) {
|
|
367
366
|
return spec.type === 'drop-target-decoration';
|
|
@@ -379,7 +378,7 @@ export var oldApply = function oldApply(api, formatMessage, tr, currentState, ol
|
|
|
379
378
|
if (api) {
|
|
380
379
|
// Add drop targets when node is being dragged
|
|
381
380
|
// if the transaction is only for analytics and user is dragging, continue to draw drop targets
|
|
382
|
-
if (shouldCreateDropTargets
|
|
381
|
+
if (shouldCreateDropTargets) {
|
|
383
382
|
var _meta$activeNode7;
|
|
384
383
|
var _decs = dropTargetDecorations(newState, api, formatMessage, nodeViewPortalProviderAPI, isNestedEnabled ? (_meta$activeNode7 = meta === null || meta === void 0 ? void 0 : meta.activeNode) !== null && _meta$activeNode7 !== void 0 ? _meta$activeNode7 : mappedActiveNodePos : meta === null || meta === void 0 ? void 0 : meta.activeNode, anchorRectCache);
|
|
385
384
|
decorations = decorations.add(newState.doc, _decs);
|
|
@@ -63,6 +63,11 @@ var dragHandleButtonStyles = css({
|
|
|
63
63
|
outline: "2px solid ".concat("var(--ds-border-focused, #388BFF)")
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
+
var dragHandleMultiLineSelectionFixFirefox = css({
|
|
67
|
+
'&::selection': {
|
|
68
|
+
backgroundColor: 'transparent'
|
|
69
|
+
}
|
|
70
|
+
});
|
|
66
71
|
var layoutColumnDragHandleStyles = css({
|
|
67
72
|
transform: 'rotate(90deg)'
|
|
68
73
|
});
|
|
@@ -421,7 +426,10 @@ export var DragHandle = function DragHandle(_ref) {
|
|
|
421
426
|
// eslint-disable-next-line @atlaskit/design-system/no-html-button
|
|
422
427
|
jsx("button", {
|
|
423
428
|
type: "button",
|
|
424
|
-
css: [dragHandleButtonStyles,
|
|
429
|
+
css: [dragHandleButtonStyles,
|
|
430
|
+
// ED-26266: Fixed the drag handle highlight when selecting multiple line in Firefox
|
|
431
|
+
// See https://product-fabric.atlassian.net/browse/ED-26266
|
|
432
|
+
browser.gecko && fg('platform_editor_dnd_handle_highlight_fix_firefox') && dragHandleMultiLineSelectionFixFirefox, editorExperiment('advanced_layouts', true) && isLayoutColumn && layoutColumnDragHandleStyles, dragHandleSelected && selectedStyles],
|
|
425
433
|
ref: buttonRef
|
|
426
434
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
427
435
|
,
|
|
@@ -16,7 +16,6 @@ import { B200 } from '@atlaskit/theme/colors';
|
|
|
16
16
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
17
17
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
18
18
|
import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
|
|
19
|
-
import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
|
|
20
19
|
import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
|
|
21
20
|
|
|
22
21
|
// 8px gap + 16px on left and right
|
|
@@ -124,7 +123,7 @@ export var DropTargetLayout = function DropTargetLayout(props) {
|
|
|
124
123
|
,
|
|
125
124
|
css: [dropTargetLayoutStyle, dropTargetStackLayoutHintStyle],
|
|
126
125
|
"data-testid": "block-ctrl-drop-indicator"
|
|
127
|
-
}, isDraggedOver
|
|
126
|
+
}, isDraggedOver ? jsx(DropIndicator, {
|
|
128
127
|
edge: "right",
|
|
129
128
|
gap: "-".concat(DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH, "px")
|
|
130
129
|
}) : isActiveAnchor && jsx("div", {
|
|
@@ -17,7 +17,6 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
17
17
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
18
18
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
19
19
|
import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
|
|
20
|
-
import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
|
|
21
20
|
import { shouldAllowInlineDropTarget } from '../pm-plugins/utils/inline-drop-target';
|
|
22
21
|
import { getNestedNodeLeftPaddingMargin } from './consts';
|
|
23
22
|
import { InlineDropTarget } from './inline-drop-target';
|
|
@@ -40,7 +39,11 @@ var styleDropIndicator = css({
|
|
|
40
39
|
height: '100%',
|
|
41
40
|
margin: '0 auto',
|
|
42
41
|
position: 'relative',
|
|
43
|
-
width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)")
|
|
42
|
+
width: "var(".concat(EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH, ", 100%)"),
|
|
43
|
+
display: 'none'
|
|
44
|
+
});
|
|
45
|
+
var styleDropIndicatorVisible = css({
|
|
46
|
+
display: 'block'
|
|
44
47
|
});
|
|
45
48
|
var nestedDropIndicatorStyle = css({
|
|
46
49
|
position: 'relative'
|
|
@@ -224,10 +227,8 @@ export var DropTarget = function DropTarget(props) {
|
|
|
224
227
|
,
|
|
225
228
|
style: dynamicStyle,
|
|
226
229
|
"data-testid": "block-ctrl-drop-target"
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
(isDraggedOver || isBlocksDragTargetDebug()) && jsx("div", {
|
|
230
|
-
css: styleDropIndicator,
|
|
230
|
+
}, jsx("div", {
|
|
231
|
+
css: [styleDropIndicator, isDraggedOver && styleDropIndicatorVisible],
|
|
231
232
|
"data-testid": "block-ctrl-drop-indicator"
|
|
232
233
|
}, jsx(DropIndicator, {
|
|
233
234
|
edge: "bottom"
|
|
@@ -18,7 +18,6 @@ import { B200 } from '@atlaskit/theme/colors';
|
|
|
18
18
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
19
19
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
20
20
|
import { isAnchorSupported } from '../pm-plugins/utils/anchor-utils';
|
|
21
|
-
import { isBlocksDragTargetDebug } from '../pm-plugins/utils/drag-target-debug';
|
|
22
21
|
import { getInsertLayoutStep, updateSelection } from '../pm-plugins/utils/update-selection';
|
|
23
22
|
var HOVER_ZONE_WIDTH = '--editor-blocks-inline-hover-zone-width';
|
|
24
23
|
var HOVER_ZONE_HEIGHT = '--editor-blocks-inline-hover-zone-height';
|
|
@@ -247,7 +246,7 @@ export var InlineDropTarget = function InlineDropTarget(_ref) {
|
|
|
247
246
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
248
247
|
,
|
|
249
248
|
style: hoverZoneRectStyle
|
|
250
|
-
}, isDraggedOver
|
|
249
|
+
}, isDraggedOver ? jsx(DropIndicator, {
|
|
251
250
|
edge: dropIndicatorPos
|
|
252
251
|
}) : isActiveAnchor && jsx("div", {
|
|
253
252
|
"data-testid": "block-ctrl-drop-hint",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.5",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
34
|
-
"@atlaskit/editor-common": "^99.
|
|
34
|
+
"@atlaskit/editor-common": "^99.4.0",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
|
|
49
49
|
"@atlaskit/primitives": "^13.3.0",
|
|
50
50
|
"@atlaskit/theme": "^14.0.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^2.38.0",
|
|
52
52
|
"@atlaskit/tokens": "^3.1.0",
|
|
53
53
|
"@atlaskit/tooltip": "^19.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -115,9 +115,6 @@
|
|
|
115
115
|
"platform_editor_element_drag_and_drop_ed_24321": {
|
|
116
116
|
"type": "boolean"
|
|
117
117
|
},
|
|
118
|
-
"platform_editor_element_drag_and_drop_debug": {
|
|
119
|
-
"type": "boolean"
|
|
120
|
-
},
|
|
121
118
|
"platform_editor_element_dnd_nested_fix_patch_6": {
|
|
122
119
|
"type": "boolean"
|
|
123
120
|
},
|
|
@@ -147,6 +144,9 @@
|
|
|
147
144
|
},
|
|
148
145
|
"platform_editor_dnd_update_drag_start_target": {
|
|
149
146
|
"type": "boolean"
|
|
147
|
+
},
|
|
148
|
+
"platform_editor_dnd_handle_highlight_fix_firefox": {
|
|
149
|
+
"type": "boolean"
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isBlocksDragTargetDebug = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
|
-
var IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
|
|
9
|
-
var isBlocksDragTargetDebug = exports.isBlocksDragTargetDebug = function isBlocksDragTargetDebug() {
|
|
10
|
-
return IS_GEMINI_TEST_ENV && (0, _platformFeatureFlags.fg)('platform_editor_element_drag_and_drop_debug');
|
|
11
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
const IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
|
|
3
|
-
export const isBlocksDragTargetDebug = () => {
|
|
4
|
-
return IS_GEMINI_TEST_ENV && fg('platform_editor_element_drag_and_drop_debug');
|
|
5
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
var IS_GEMINI_TEST_ENV = Boolean(process.env.NODE_ENV === 'development') && Boolean(window.__gemini_set_feature_flag__);
|
|
3
|
-
export var isBlocksDragTargetDebug = function isBlocksDragTargetDebug() {
|
|
4
|
-
return IS_GEMINI_TEST_ENV && fg('platform_editor_element_drag_and_drop_debug');
|
|
5
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isBlocksDragTargetDebug: () => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isBlocksDragTargetDebug: () => boolean;
|