@atlaskit/editor-plugin-block-controls 4.2.8 → 5.0.0

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,11 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 4.2.8
4
10
 
5
11
  ### Patch Changes
@@ -15,12 +15,21 @@ var isEmptyNestedParagraphOrHeading = function isEmptyNestedParagraphOrHeading(t
15
15
  return false;
16
16
  };
17
17
  var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, event, api) {
18
- var _api$blockControls, _target$classList;
18
+ var _api$blockControls, _api$editorDisabled, _target$classList;
19
19
  var _ref = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
20
20
  isDragging = _ref.isDragging,
21
21
  activeNode = _ref.activeNode,
22
22
  isMenuOpen = _ref.isMenuOpen,
23
23
  originalAnchorName = _ref.menuTriggerBy;
24
+ var _ref2 = (api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.sharedState.currentState()) || {
25
+ editorDisabled: false
26
+ },
27
+ editorDisabled = _ref2.editorDisabled;
28
+
29
+ // We shouldn't be firing mouse over transactions when the editor is disabled
30
+ if (editorDisabled && (0, _platformFeatureFlags.fg)('platform_editor_ai_rovo_free_gen')) {
31
+ return false;
32
+ }
24
33
 
25
34
  // Most mouseover events don't fire during drag but some can slip through
26
35
  // when the drag begins. This prevents those.
@@ -9,13 +9,23 @@ const isEmptyNestedParagraphOrHeading = target => {
9
9
  return false;
10
10
  };
11
11
  export const handleMouseOver = (view, event, api) => {
12
- var _api$blockControls, _target$classList;
12
+ var _api$blockControls, _api$editorDisabled, _target$classList;
13
13
  const {
14
14
  isDragging,
15
15
  activeNode,
16
16
  isMenuOpen,
17
17
  menuTriggerBy: originalAnchorName
18
18
  } = (api === null || api === void 0 ? void 0 : (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {};
19
+ const {
20
+ editorDisabled
21
+ } = (api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.sharedState.currentState()) || {
22
+ editorDisabled: false
23
+ };
24
+
25
+ // We shouldn't be firing mouse over transactions when the editor is disabled
26
+ if (editorDisabled && fg('platform_editor_ai_rovo_free_gen')) {
27
+ return false;
28
+ }
19
29
 
20
30
  // Most mouseover events don't fire during drag but some can slip through
21
31
  // when the drag begins. This prevents those.
@@ -9,12 +9,21 @@ var isEmptyNestedParagraphOrHeading = function isEmptyNestedParagraphOrHeading(t
9
9
  return false;
10
10
  };
11
11
  export var handleMouseOver = function handleMouseOver(view, event, api) {
12
- var _api$blockControls, _target$classList;
12
+ var _api$blockControls, _api$editorDisabled, _target$classList;
13
13
  var _ref = (api === null || api === void 0 || (_api$blockControls = api.blockControls) === null || _api$blockControls === void 0 ? void 0 : _api$blockControls.sharedState.currentState()) || {},
14
14
  isDragging = _ref.isDragging,
15
15
  activeNode = _ref.activeNode,
16
16
  isMenuOpen = _ref.isMenuOpen,
17
17
  originalAnchorName = _ref.menuTriggerBy;
18
+ var _ref2 = (api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.sharedState.currentState()) || {
19
+ editorDisabled: false
20
+ },
21
+ editorDisabled = _ref2.editorDisabled;
22
+
23
+ // We shouldn't be firing mouse over transactions when the editor is disabled
24
+ if (editorDisabled && fg('platform_editor_ai_rovo_free_gen')) {
25
+ return false;
26
+ }
18
27
 
19
28
  // Most mouseover events don't fire during drag but some can slip through
20
29
  // when the drag begins. This prevents those.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "4.2.8",
3
+ "version": "5.0.0",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,18 +29,18 @@
29
29
  "atlaskit:src": "src/index.ts",
30
30
  "dependencies": {
31
31
  "@atlaskit/adf-schema": "^50.2.3",
32
- "@atlaskit/editor-plugin-accessibility-utils": "^3.0.0",
33
- "@atlaskit/editor-plugin-analytics": "^3.0.0",
34
- "@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
35
- "@atlaskit/editor-plugin-feature-flags": "^2.0.0",
36
- "@atlaskit/editor-plugin-interaction": "^5.0.0",
37
- "@atlaskit/editor-plugin-limited-mode": "^0.0.3",
38
- "@atlaskit/editor-plugin-metrics": "^4.0.0",
39
- "@atlaskit/editor-plugin-quick-insert": "^3.0.0",
40
- "@atlaskit/editor-plugin-selection": "^3.2.0",
41
- "@atlaskit/editor-plugin-type-ahead": "^3.1.0",
42
- "@atlaskit/editor-plugin-user-intent": "^1.1.0",
43
- "@atlaskit/editor-plugin-width": "^4.0.0",
32
+ "@atlaskit/editor-plugin-accessibility-utils": "^4.0.0",
33
+ "@atlaskit/editor-plugin-analytics": "^4.0.0",
34
+ "@atlaskit/editor-plugin-editor-disabled": "^4.0.0",
35
+ "@atlaskit/editor-plugin-feature-flags": "^3.0.0",
36
+ "@atlaskit/editor-plugin-interaction": "^6.0.0",
37
+ "@atlaskit/editor-plugin-limited-mode": "^1.0.0",
38
+ "@atlaskit/editor-plugin-metrics": "^5.0.0",
39
+ "@atlaskit/editor-plugin-quick-insert": "^4.0.0",
40
+ "@atlaskit/editor-plugin-selection": "^4.0.0",
41
+ "@atlaskit/editor-plugin-type-ahead": "^4.0.0",
42
+ "@atlaskit/editor-plugin-user-intent": "^2.0.0",
43
+ "@atlaskit/editor-plugin-width": "^5.0.0",
44
44
  "@atlaskit/editor-prosemirror": "7.0.0",
45
45
  "@atlaskit/editor-shared-styles": "^3.6.0",
46
46
  "@atlaskit/editor-tables": "^2.9.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
53
53
  "@atlaskit/primitives": "^14.12.0",
54
54
  "@atlaskit/theme": "^20.0.0",
55
- "@atlaskit/tmp-editor-statsig": "^11.9.0",
55
+ "@atlaskit/tmp-editor-statsig": "^12.0.0",
56
56
  "@atlaskit/tokens": "^6.1.0",
57
57
  "@atlaskit/tooltip": "^20.4.0",
58
58
  "@babel/runtime": "^7.0.0",
@@ -64,7 +64,7 @@
64
64
  "uuid": "^3.1.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@atlaskit/editor-common": "^107.33.0",
67
+ "@atlaskit/editor-common": "^108.0.0",
68
68
  "react": "^18.2.0",
69
69
  "react-dom": "^18.2.0",
70
70
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -153,6 +153,9 @@
153
153
  "platform_editor_column_count_analytics": {
154
154
  "type": "boolean"
155
155
  },
156
+ "platform_editor_ai_rovo_free_gen": {
157
+ "type": "boolean"
158
+ },
156
159
  "platform_editor_fix_widget_destroy": {
157
160
  "type": "boolean"
158
161
  },