@atlaskit/editor-plugin-toolbar 7.2.0 → 7.3.1

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-toolbar
2
2
 
3
+ ## 7.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a4948eba59865`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a4948eba59865) -
8
+ Editor-5610: Fix domMutationTargetNotFound failure going up, so "Toolbars reliably open" error
9
+ budget does not keep burning down
10
+ - Updated dependencies
11
+
12
+ ## 7.3.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`ebab8f80bfc40`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ebab8f80bfc40) -
17
+ Autofix: add explicit package exports (barrel removal)
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 7.2.0
4
24
 
5
25
  ### Minor Changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "toolbarPlugin", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _toolbarPlugin.toolbarPlugin;
10
+ }
11
+ });
12
+ var _toolbarPlugin = require("../toolbarPlugin");
@@ -0,0 +1 @@
1
+ "use strict";
@@ -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
- if (shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !isSelectionWithoutTextContent(newState.selection)) {
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
  });
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { toolbarPlugin } from '../toolbarPlugin';
File without changes
@@ -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
- if (shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !isSelectionWithoutTextContent(newState.selection)) {
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
  });
File without changes
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { toolbarPlugin } from '../toolbarPlugin';
File without changes
@@ -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
- if (shiftArrowKeyPressed && !newState.selection.eq(oldState.selection) && !isSelectionWithoutTextContent(newState.selection)) {
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
  });
@@ -0,0 +1 @@
1
+ export type { ToolbarPlugin, EditorToolbarPluginState } from '../toolbarPluginType';
@@ -0,0 +1 @@
1
+ export { toolbarPlugin } from '../toolbarPlugin';
@@ -0,0 +1 @@
1
+ export type { ToolbarPluginOptions, RegisterComponentsAction } from '../types/index';
@@ -0,0 +1 @@
1
+ export type { ToolbarPlugin, EditorToolbarPluginState } from '../toolbarPluginType';
@@ -0,0 +1 @@
1
+ export { toolbarPlugin } from '../toolbarPlugin';
@@ -0,0 +1 @@
1
+ export type { ToolbarPluginOptions, RegisterComponentsAction } from '../types/index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar",
3
- "version": "7.2.0",
3
+ "version": "7.3.1",
4
4
  "description": "Toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,16 +31,16 @@
31
31
  "@atlaskit/browser-apis": "^0.0.1",
32
32
  "@atlaskit/editor-plugin-analytics": "^10.0.0",
33
33
  "@atlaskit/editor-plugin-connectivity": "^10.0.0",
34
- "@atlaskit/editor-plugin-editor-viewmode": "^12.0.0",
35
- "@atlaskit/editor-plugin-selection": "^10.0.0",
36
- "@atlaskit/editor-plugin-user-intent": "^8.1.0",
37
- "@atlaskit/editor-plugin-user-preferences": "^8.1.0",
34
+ "@atlaskit/editor-plugin-editor-viewmode": "^12.1.0",
35
+ "@atlaskit/editor-plugin-selection": "^10.1.0",
36
+ "@atlaskit/editor-plugin-user-intent": "^8.2.0",
37
+ "@atlaskit/editor-plugin-user-preferences": "^8.2.0",
38
38
  "@atlaskit/editor-prosemirror": "^7.3.0",
39
39
  "@atlaskit/editor-shared-styles": "^3.10.0",
40
- "@atlaskit/editor-toolbar": "^1.2.0",
40
+ "@atlaskit/editor-toolbar": "^1.3.0",
41
41
  "@atlaskit/editor-toolbar-model": "^0.4.0",
42
42
  "@atlaskit/platform-feature-flags": "^1.1.0",
43
- "@atlaskit/tmp-editor-statsig": "^80.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^80.1.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": {
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-toolbar/toolbar-plugin",
3
+ "main": "../dist/cjs/entry-points/toolbar-plugin.js",
4
+ "module": "../dist/esm/entry-points/toolbar-plugin.js",
5
+ "module:es2019": "../dist/es2019/entry-points/toolbar-plugin.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/toolbar-plugin.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/entry-points/toolbar-plugin.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-toolbar/toolbar-plugin-type",
3
+ "main": "../dist/cjs/entry-points/toolbar-plugin-type.js",
4
+ "module": "../dist/esm/entry-points/toolbar-plugin-type.js",
5
+ "module:es2019": "../dist/es2019/entry-points/toolbar-plugin-type.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/toolbar-plugin-type.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/entry-points/toolbar-plugin-type.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-toolbar/types",
3
+ "main": "../dist/cjs/entry-points/types.js",
4
+ "module": "../dist/esm/entry-points/types.js",
5
+ "module:es2019": "../dist/es2019/entry-points/types.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/entry-points/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/entry-points/types.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }