@atlaskit/editor-plugin-toolbar 7.3.0 → 7.3.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 +16 -1
- package/dist/cjs/pm-plugins/experiences/selection-toolbar-open-experience.js +6 -1
- package/dist/es2019/pm-plugins/experiences/selection-toolbar-open-experience.js +6 -1
- package/dist/esm/pm-plugins/experiences/selection-toolbar-open-experience.js +6 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar
|
|
2
2
|
|
|
3
|
+
## 7.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 7.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`a4948eba59865`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4948eba59865) -
|
|
14
|
+
Editor-5610: Fix domMutationTargetNotFound failure going up, so "Toolbars reliably open" error
|
|
15
|
+
budget does not keep burning down
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 7.3.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
6
21
|
|
|
7
|
-
- [`
|
|
22
|
+
- [`ebab8f80bfc40`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebab8f80bfc40) -
|
|
8
23
|
Autofix: add explicit package exports (barrel removal)
|
|
9
24
|
|
|
10
25
|
### Patch Changes
|
|
@@ -88,6 +88,10 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
88
88
|
return true;
|
|
89
89
|
}
|
|
90
90
|
var target = getTarget();
|
|
91
|
+
if (!target && (0, _platformFeatureFlags.fg)('platform_editor_toolbar_open_experience_fix_2')) {
|
|
92
|
+
// when target is not found, skip the experience start
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
91
95
|
return isSelectionToolbarWithinNode(target) || isBlockMenuWithinNode(target) && (0, _platformFeatureFlags.fg)('platform_editor_toolbar_open_experience_fix');
|
|
92
96
|
};
|
|
93
97
|
return new _safePlugin.SafePlugin({
|
|
@@ -102,7 +106,8 @@ var getSelectionToolbarOpenExperiencePlugin = exports.getSelectionToolbarOpenExp
|
|
|
102
106
|
reason: ABORT_REASON.SELECTION_CLEARED
|
|
103
107
|
});
|
|
104
108
|
}
|
|
105
|
-
|
|
109
|
+
var shouldStartExperience = (0, _platformFeatureFlags.fg)('platform_editor_toolbar_open_experience_fix_2') ? shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !shouldSkipExperienceStart(newState.selection) : shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !isSelectionWithoutTextContent(newState.selection);
|
|
110
|
+
if (shouldStartExperience) {
|
|
106
111
|
experience.start({
|
|
107
112
|
method: START_METHOD.KEY_DOWN
|
|
108
113
|
});
|
|
@@ -81,6 +81,10 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
81
81
|
return true;
|
|
82
82
|
}
|
|
83
83
|
const target = getTarget();
|
|
84
|
+
if (!target && fg('platform_editor_toolbar_open_experience_fix_2')) {
|
|
85
|
+
// when target is not found, skip the experience start
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
84
88
|
return isSelectionToolbarWithinNode(target) || isBlockMenuWithinNode(target) && fg('platform_editor_toolbar_open_experience_fix');
|
|
85
89
|
};
|
|
86
90
|
return new SafePlugin({
|
|
@@ -93,7 +97,8 @@ export const getSelectionToolbarOpenExperiencePlugin = ({
|
|
|
93
97
|
reason: ABORT_REASON.SELECTION_CLEARED
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
|
-
|
|
100
|
+
const shouldStartExperience = fg('platform_editor_toolbar_open_experience_fix_2') ? shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !shouldSkipExperienceStart(newState.selection) : shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !isSelectionWithoutTextContent(newState.selection);
|
|
101
|
+
if (shouldStartExperience) {
|
|
97
102
|
experience.start({
|
|
98
103
|
method: START_METHOD.KEY_DOWN
|
|
99
104
|
});
|
|
@@ -81,6 +81,10 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
81
81
|
return true;
|
|
82
82
|
}
|
|
83
83
|
var target = getTarget();
|
|
84
|
+
if (!target && fg('platform_editor_toolbar_open_experience_fix_2')) {
|
|
85
|
+
// when target is not found, skip the experience start
|
|
86
|
+
return true;
|
|
87
|
+
}
|
|
84
88
|
return isSelectionToolbarWithinNode(target) || isBlockMenuWithinNode(target) && fg('platform_editor_toolbar_open_experience_fix');
|
|
85
89
|
};
|
|
86
90
|
return new SafePlugin({
|
|
@@ -95,7 +99,8 @@ export var getSelectionToolbarOpenExperiencePlugin = function getSelectionToolba
|
|
|
95
99
|
reason: ABORT_REASON.SELECTION_CLEARED
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
|
-
|
|
102
|
+
var shouldStartExperience = fg('platform_editor_toolbar_open_experience_fix_2') ? shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !shouldSkipExperienceStart(newState.selection) : shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !isSelectionWithoutTextContent(newState.selection);
|
|
103
|
+
if (shouldStartExperience) {
|
|
99
104
|
experience.start({
|
|
100
105
|
method: START_METHOD.KEY_DOWN
|
|
101
106
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.2",
|
|
4
4
|
"description": "Toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@atlaskit/editor-plugin-user-intent": "^8.2.0",
|
|
37
37
|
"@atlaskit/editor-plugin-user-preferences": "^8.2.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
39
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
40
|
-
"@atlaskit/editor-toolbar": "^1.
|
|
41
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
39
|
+
"@atlaskit/editor-shared-styles": "^3.11.0",
|
|
40
|
+
"@atlaskit/editor-toolbar": "^1.4.0",
|
|
41
|
+
"@atlaskit/editor-toolbar-model": "^0.5.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
|
-
"@atlaskit/tmp-editor-statsig": "^80.
|
|
43
|
+
"@atlaskit/tmp-editor-statsig": "^80.2.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"bind-event-listener": "^3.0.0"
|
|
46
46
|
},
|
|
@@ -61,6 +61,9 @@
|
|
|
61
61
|
},
|
|
62
62
|
"platform_editor_toolbar_open_experience_fix": {
|
|
63
63
|
"type": "boolean"
|
|
64
|
+
},
|
|
65
|
+
"platform_editor_toolbar_open_experience_fix_2": {
|
|
66
|
+
"type": "boolean"
|
|
64
67
|
}
|
|
65
68
|
},
|
|
66
69
|
"techstack": {
|