@atlaskit/editor-plugin-block-controls 9.1.1 → 9.1.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 +6 -0
- package/dist/cjs/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/cjs/pm-plugins/utils/marks.js +1 -2
- package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/pm-plugins/utils/marks.js +1 -2
- package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/pm-plugins/utils/marks.js +1 -2
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -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) {
|
|
@@ -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;
|
|
@@ -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) {
|
|
@@ -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
|
|
|
@@ -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) {
|
|
@@ -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/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.2",
|
|
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,9 +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
147
|
"platform_editor_native_anchor_patch_2": {
|
|
151
148
|
"type": "boolean"
|
|
152
149
|
},
|