@atlaskit/editor-plugin-block-controls 4.1.4 → 4.1.6
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-find-surrounding-nodes.js +3 -4
- package/dist/cjs/pm-plugins/main.js +2 -4
- package/dist/cjs/ui/global-styles.js +1 -1
- package/dist/es2019/pm-plugins/decorations-find-surrounding-nodes.js +3 -4
- package/dist/es2019/pm-plugins/main.js +2 -4
- package/dist/es2019/ui/global-styles.js +1 -1
- package/dist/esm/pm-plugins/decorations-find-surrounding-nodes.js +3 -4
- package/dist/esm/pm-plugins/main.js +2 -4
- package/dist/esm/ui/global-styles.js +1 -1
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 4.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5d5020e5bb9f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5d5020e5bb9f5) -
|
|
8
|
+
ED-28750 cleanup dnd-perf-fix-patch-1
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.1.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.1.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -4,10 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.findSurroundingNodes = void 0;
|
|
7
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
7
|
var IGNORE_NODES = ['tableRow', 'listItem', 'caption', 'media'];
|
|
9
|
-
var blockLeafNodes = ['blockCard', 'rule'];
|
|
10
|
-
var blockLeafNodesNext = ['blockCard', 'rule', 'extension'];
|
|
8
|
+
var blockLeafNodes = ['blockCard', 'rule', 'extension'];
|
|
11
9
|
var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
|
|
12
10
|
|
|
13
11
|
/**
|
|
@@ -21,7 +19,8 @@ var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
|
|
|
21
19
|
*/
|
|
22
20
|
var _findSurroundingNodes = exports.findSurroundingNodes = function findSurroundingNodes(state, $pos, nodeType) {
|
|
23
21
|
var depth = $pos.depth;
|
|
24
|
-
var blockLeafNodeList =
|
|
22
|
+
var blockLeafNodeList = blockLeafNodes;
|
|
23
|
+
|
|
25
24
|
// special cases like hr rule here
|
|
26
25
|
if (blockLeafNodeList.includes(nodeType || '') || $pos.pos === 0) {
|
|
27
26
|
var _parent = $pos.node(depth);
|
|
@@ -660,10 +660,8 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
660
660
|
_activeAnchorTracker.defaultActiveAnchorTracker.reset();
|
|
661
661
|
}
|
|
662
662
|
if ((0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true)) {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
|
|
666
|
-
}
|
|
663
|
+
var _anchorRectCache;
|
|
664
|
+
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
|
|
667
665
|
}
|
|
668
666
|
(_anchorRectCache2 = anchorRectCache) === null || _anchorRectCache2 === void 0 || _anchorRectCache2.setEditorView(view);
|
|
669
667
|
view.dispatch(view.state.tr.setMeta(key, _objectSpread(_objectSpread({}, view.state.tr.getMeta(key)), {}, {
|
|
@@ -313,7 +313,7 @@ var blockCardWithoutLayout = (0, _react.css)({
|
|
|
313
313
|
var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
314
314
|
var api = _ref.api;
|
|
315
315
|
var isDragging = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'blockControls.isDragging', {
|
|
316
|
-
disabled: !(0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
|
|
316
|
+
disabled: !(0, _expValEquals.expValEquals)('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
|
|
317
317
|
});
|
|
318
318
|
return (0, _react.jsx)(_react.Global, {
|
|
319
319
|
styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, (0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
const IGNORE_NODES = ['tableRow', 'listItem', 'caption', 'media'];
|
|
3
|
-
const blockLeafNodes = ['blockCard', 'rule'];
|
|
4
|
-
const blockLeafNodesNext = ['blockCard', 'rule', 'extension'];
|
|
2
|
+
const blockLeafNodes = ['blockCard', 'rule', 'extension'];
|
|
5
3
|
const DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -15,7 +13,8 @@ const DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
|
|
|
15
13
|
*/
|
|
16
14
|
export const findSurroundingNodes = (state, $pos, nodeType) => {
|
|
17
15
|
const depth = $pos.depth;
|
|
18
|
-
const blockLeafNodeList =
|
|
16
|
+
const blockLeafNodeList = blockLeafNodes;
|
|
17
|
+
|
|
19
18
|
// special cases like hr rule here
|
|
20
19
|
if (blockLeafNodeList.includes(nodeType || '') || $pos.pos === 0) {
|
|
21
20
|
const parent = $pos.node(depth);
|
|
@@ -662,10 +662,8 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI) => {
|
|
|
662
662
|
defaultActiveAnchorTracker.reset();
|
|
663
663
|
}
|
|
664
664
|
if (expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)) {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 ? void 0 : _anchorRectCache.clear();
|
|
668
|
-
}
|
|
665
|
+
var _anchorRectCache;
|
|
666
|
+
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 ? void 0 : _anchorRectCache.clear();
|
|
669
667
|
}
|
|
670
668
|
(_anchorRectCache2 = anchorRectCache) === null || _anchorRectCache2 === void 0 ? void 0 : _anchorRectCache2.setEditorView(view);
|
|
671
669
|
view.dispatch(view.state.tr.setMeta(key, {
|
|
@@ -352,7 +352,7 @@ export const GlobalStylesWrapper = ({
|
|
|
352
352
|
api
|
|
353
353
|
}) => {
|
|
354
354
|
const isDragging = useSharedPluginStateSelector(api, 'blockControls.isDragging', {
|
|
355
|
-
disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
|
|
355
|
+
disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
|
|
356
356
|
});
|
|
357
357
|
return jsx(Global, {
|
|
358
358
|
styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
var IGNORE_NODES = ['tableRow', 'listItem', 'caption', 'media'];
|
|
3
|
-
var blockLeafNodes = ['blockCard', 'rule'];
|
|
4
|
-
var blockLeafNodesNext = ['blockCard', 'rule', 'extension'];
|
|
2
|
+
var blockLeafNodes = ['blockCard', 'rule', 'extension'];
|
|
5
3
|
var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -15,7 +13,8 @@ var DISABLE_CHILD_DROP_TARGET = ['orderedList', 'bulletList'];
|
|
|
15
13
|
*/
|
|
16
14
|
var _findSurroundingNodes = function findSurroundingNodes(state, $pos, nodeType) {
|
|
17
15
|
var depth = $pos.depth;
|
|
18
|
-
var blockLeafNodeList =
|
|
16
|
+
var blockLeafNodeList = blockLeafNodes;
|
|
17
|
+
|
|
19
18
|
// special cases like hr rule here
|
|
20
19
|
if (blockLeafNodeList.includes(nodeType || '') || $pos.pos === 0) {
|
|
21
20
|
var _parent = $pos.node(depth);
|
|
@@ -654,10 +654,8 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
654
654
|
defaultActiveAnchorTracker.reset();
|
|
655
655
|
}
|
|
656
656
|
if (expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)) {
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
|
|
660
|
-
}
|
|
657
|
+
var _anchorRectCache;
|
|
658
|
+
(_anchorRectCache = anchorRectCache) === null || _anchorRectCache === void 0 || _anchorRectCache.clear();
|
|
661
659
|
}
|
|
662
660
|
(_anchorRectCache2 = anchorRectCache) === null || _anchorRectCache2 === void 0 || _anchorRectCache2.setEditorView(view);
|
|
663
661
|
view.dispatch(view.state.tr.setMeta(key, _objectSpread(_objectSpread({}, view.state.tr.getMeta(key)), {}, {
|
|
@@ -306,7 +306,7 @@ var blockCardWithoutLayout = css({
|
|
|
306
306
|
export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
307
307
|
var api = _ref.api;
|
|
308
308
|
var isDragging = useSharedPluginStateSelector(api, 'blockControls.isDragging', {
|
|
309
|
-
disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
|
|
309
|
+
disabled: !expValEquals('platform_editor_block_controls_perf_optimization', 'isEnabled', true)
|
|
310
310
|
});
|
|
311
311
|
return jsx(Global, {
|
|
312
312
|
styles: [globalStyles(), globalDnDStyle, extendedHoverZone(), isDragging && extendedDragZone, expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? extendHoverZoneReduced : undefined, editorExperiment('platform_editor_controls', 'variant1') ? undefined : withInlineNodeStyle, editorExperiment('platform_editor_block_control_optimise_render', true) ? quickInsertStyles : undefined, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, fg('platform_editor_fix_safari_cursor_hidden_empty') ? withRelativePosStyle : withRelativePosStyleLegacy, topLevelNodeMarginStyles, withAnchorNameZindexStyle]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.6",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
39
|
+
"@atlaskit/editor-plugin-interaction": "^5.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-metrics": "^4.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-quick-insert": "^3.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-selection": "^3.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.5.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
49
|
-
"@atlaskit/icon": "^27.
|
|
49
|
+
"@atlaskit/icon": "^27.9.0",
|
|
50
50
|
"@atlaskit/link": "^3.2.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
55
55
|
"@atlaskit/primitives": "^14.11.0",
|
|
56
56
|
"@atlaskit/theme": "^19.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
58
|
-
"@atlaskit/tokens": "^
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^9.22.0",
|
|
58
|
+
"@atlaskit/tokens": "^6.0.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.4.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
61
61
|
"@emotion/react": "^11.7.1",
|
|
@@ -176,9 +176,6 @@
|
|
|
176
176
|
"platform_editor_controls_patch_15": {
|
|
177
177
|
"type": "boolean"
|
|
178
178
|
},
|
|
179
|
-
"platform_editor_block_controls_perf_opt_patch_1": {
|
|
180
|
-
"type": "boolean"
|
|
181
|
-
},
|
|
182
179
|
"platform_editor_breakout_resizing_widget_fix": {
|
|
183
180
|
"type": "boolean"
|
|
184
181
|
}
|