@atlaskit/editor-plugin-block-controls 9.0.14 → 9.0.15
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 +8 -0
- package/dist/cjs/pm-plugins/decorations-drag-handle.js +2 -2
- package/dist/cjs/pm-plugins/decorations-quick-insert-button.js +1 -1
- package/dist/cjs/pm-plugins/utils/marks.js +2 -0
- package/dist/es2019/pm-plugins/decorations-drag-handle.js +2 -2
- package/dist/es2019/pm-plugins/decorations-quick-insert-button.js +1 -1
- package/dist/es2019/pm-plugins/utils/marks.js +2 -0
- package/dist/esm/pm-plugins/decorations-drag-handle.js +2 -2
- package/dist/esm/pm-plugins/decorations-quick-insert-button.js +1 -1
- package/dist/esm/pm-plugins/utils/marks.js +2 -0
- package/dist/types/pm-plugins/utils/marks.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/utils/marks.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 9.0.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c9d8de9fd5a33`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c9d8de9fd5a33) -
|
|
8
|
+
Avoid wrapping block controls in any block mark - fixes issues with font size mark.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 9.0.14
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -62,7 +62,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
|
|
|
62
62
|
* Exclude 'breakout' on purpose, so the widgets render at the top of the document to avoid z-index issues
|
|
63
63
|
* Other block marks must be added, otherwise PM will split the DOM elements causing mutations and re-draws
|
|
64
64
|
*/
|
|
65
|
-
marks: (0, _marks.getActiveBlockMarks)(editorState, pos),
|
|
65
|
+
marks: (0, _expValEquals.expValEquals)('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : (0, _marks.getActiveBlockMarks)(editorState, pos),
|
|
66
66
|
destroy: function destroy(node) {
|
|
67
67
|
unbind && unbind();
|
|
68
68
|
if ((0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -74,7 +74,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
|
|
|
74
74
|
type: _decorationsCommon.TYPE_HANDLE_DEC,
|
|
75
75
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
76
76
|
testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.default)()),
|
|
77
|
-
marks: (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_native_anchor_patch_1') ? (0, _marks.getActiveBlockMarks)(editorState, pos) : undefined,
|
|
77
|
+
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, _platformFeatureFlags.fg)('platform_editor_native_anchor_patch_1') ? (0, _marks.getActiveBlockMarks)(editorState, pos) : undefined,
|
|
78
78
|
destroy: function destroy(node) {
|
|
79
79
|
unbind && unbind();
|
|
80
80
|
if ((0, _experiments.editorExperiment)('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -46,7 +46,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
|
|
|
46
46
|
* Other block marks must be added, otherwise PM will split the DOM elements causing mutations and re-draws
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
|
-
marks: (0, _marks.getActiveBlockMarks)(editorState, rootPos),
|
|
49
|
+
marks: (0, _expValEquals.expValEquals)('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : (0, _marks.getActiveBlockMarks)(editorState, rootPos),
|
|
50
50
|
destroy: function destroy(_) {
|
|
51
51
|
if ((0, _platformFeatureFlags.fg)('platform_editor_fix_widget_destroy')) {
|
|
52
52
|
nodeViewPortalProviderAPI.remove(key);
|
|
@@ -7,6 +7,8 @@ exports.getActiveBlockMarks = void 0;
|
|
|
7
7
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
8
8
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
9
9
|
/**
|
|
10
|
+
* Remove this when platform_editor_clean_up_widget_mark_logic is cleaned up.
|
|
11
|
+
*
|
|
10
12
|
* Returns list of block marks on schema that widgets are allowed to render inside
|
|
11
13
|
* Currently
|
|
12
14
|
* - indent
|
|
@@ -53,7 +53,7 @@ export const dragHandleDecoration = ({
|
|
|
53
53
|
* Exclude 'breakout' on purpose, so the widgets render at the top of the document to avoid z-index issues
|
|
54
54
|
* Other block marks must be added, otherwise PM will split the DOM elements causing mutations and re-draws
|
|
55
55
|
*/
|
|
56
|
-
marks: getActiveBlockMarks(editorState, pos),
|
|
56
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : getActiveBlockMarks(editorState, pos),
|
|
57
57
|
destroy: node => {
|
|
58
58
|
unbind && unbind();
|
|
59
59
|
if (editorExperiment('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -65,7 +65,7 @@ export const dragHandleDecoration = ({
|
|
|
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: `${TYPE_HANDLE_DEC}-${uuid()}`,
|
|
68
|
-
marks: expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && fg('platform_editor_native_anchor_patch_1') ? getActiveBlockMarks(editorState, pos) : undefined,
|
|
68
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && fg('platform_editor_native_anchor_patch_1') ? getActiveBlockMarks(editorState, pos) : undefined,
|
|
69
69
|
destroy: node => {
|
|
70
70
|
unbind && unbind();
|
|
71
71
|
if (editorExperiment('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -37,7 +37,7 @@ export const quickInsertButtonDecoration = ({
|
|
|
37
37
|
* Other block marks must be added, otherwise PM will split the DOM elements causing mutations and re-draws
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
marks: getActiveBlockMarks(editorState, rootPos),
|
|
40
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : getActiveBlockMarks(editorState, rootPos),
|
|
41
41
|
destroy: _ => {
|
|
42
42
|
if (fg('platform_editor_fix_widget_destroy')) {
|
|
43
43
|
nodeViewPortalProviderAPI.remove(key);
|
|
@@ -2,6 +2,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
2
2
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
+
* Remove this when platform_editor_clean_up_widget_mark_logic is cleaned up.
|
|
6
|
+
*
|
|
5
7
|
* Returns list of block marks on schema that widgets are allowed to render inside
|
|
6
8
|
* Currently
|
|
7
9
|
* - indent
|
|
@@ -54,7 +54,7 @@ export var dragHandleDecoration = function dragHandleDecoration(_ref) {
|
|
|
54
54
|
* Exclude 'breakout' on purpose, so the widgets render at the top of the document to avoid z-index issues
|
|
55
55
|
* Other block marks must be added, otherwise PM will split the DOM elements causing mutations and re-draws
|
|
56
56
|
*/
|
|
57
|
-
marks: getActiveBlockMarks(editorState, pos),
|
|
57
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : getActiveBlockMarks(editorState, pos),
|
|
58
58
|
destroy: function destroy(node) {
|
|
59
59
|
unbind && unbind();
|
|
60
60
|
if (editorExperiment('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -66,7 +66,7 @@ export var dragHandleDecoration = function dragHandleDecoration(_ref) {
|
|
|
66
66
|
type: TYPE_HANDLE_DEC,
|
|
67
67
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
68
68
|
testid: "".concat(TYPE_HANDLE_DEC, "-").concat(uuid()),
|
|
69
|
-
marks: expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && fg('platform_editor_native_anchor_patch_1') ? getActiveBlockMarks(editorState, pos) : undefined,
|
|
69
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && fg('platform_editor_native_anchor_patch_1') ? getActiveBlockMarks(editorState, pos) : undefined,
|
|
70
70
|
destroy: function destroy(node) {
|
|
71
71
|
unbind && unbind();
|
|
72
72
|
if (editorExperiment('platform_editor_block_control_optimise_render', true) && node instanceof HTMLElement) {
|
|
@@ -38,7 +38,7 @@ export var quickInsertButtonDecoration = function quickInsertButtonDecoration(_r
|
|
|
38
38
|
* Other block marks must be added, otherwise PM will split the DOM elements causing mutations and re-draws
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
-
marks: getActiveBlockMarks(editorState, rootPos),
|
|
41
|
+
marks: expValEquals('platform_editor_clean_up_widget_mark_logic', 'isEnabled', true) ? [] : getActiveBlockMarks(editorState, rootPos),
|
|
42
42
|
destroy: function destroy(_) {
|
|
43
43
|
if (fg('platform_editor_fix_widget_destroy')) {
|
|
44
44
|
nodeViewPortalProviderAPI.remove(key);
|
|
@@ -2,6 +2,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
2
2
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
+
* Remove this when platform_editor_clean_up_widget_mark_logic is cleaned up.
|
|
6
|
+
*
|
|
5
7
|
* Returns list of block marks on schema that widgets are allowed to render inside
|
|
6
8
|
* Currently
|
|
7
9
|
* - indent
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
/**
|
|
4
|
+
* Remove this when platform_editor_clean_up_widget_mark_logic is cleaned up.
|
|
5
|
+
*
|
|
4
6
|
* Returns list of block marks on schema that widgets are allowed to render inside
|
|
5
7
|
* Currently
|
|
6
8
|
* - indent
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Mark } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
/**
|
|
4
|
+
* Remove this when platform_editor_clean_up_widget_mark_logic is cleaned up.
|
|
5
|
+
*
|
|
4
6
|
* Returns list of block marks on schema that widgets are allowed to render inside
|
|
5
7
|
* Currently
|
|
6
8
|
* - indent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.15",
|
|
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": "^18.0.0",
|
|
58
58
|
"@atlaskit/theme": "^22.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^43.0.0",
|
|
60
60
|
"@atlaskit/tokens": "^11.1.0",
|
|
61
61
|
"@atlaskit/tooltip": "^21.0.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|