@atlaskit/editor-plugin-selection-marker 6.1.0 → 6.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-selection-marker
2
2
 
3
+ ## 6.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`76ffc91d514f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/76ffc91d514f3) -
14
+ Changed packages over to using the generic AIFC FG rather then an experiment
15
+ - Updated dependencies
16
+
3
17
  ## 6.1.0
4
18
 
5
19
  ### Minor Changes
@@ -8,6 +8,7 @@ exports.selectionMarkerPlugin = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _hooks = require("@atlaskit/editor-common/hooks");
10
10
  var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
13
14
  var _main = require("./pm-plugins/main");
@@ -114,7 +115,7 @@ var selectionMarkerPlugin = exports.selectionMarkerPlugin = function selectionMa
114
115
  * - Via the API: If another plugin has requested it to be hidden (force hidden).
115
116
  * - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
116
117
  */
117
- var shouldHide = (config === null || config === void 0 ? void 0 : config.hideCursorOnInit) && editorHasNotBeenFocused.current || hasFocus || (isOpen !== null && isOpen !== void 0 ? isOpen : false) || isForcedHidden || (editorDisabled !== null && editorDisabled !== void 0 ? editorDisabled : false) || (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) && (showToolbar !== null && showToolbar !== void 0 ? showToolbar : false) || (0, _expValEquals.expValEquals)('platform_editor_ai_aifc', 'isEnabled', true) || !!hasDangerDecorations && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
118
+ var shouldHide = (config === null || config === void 0 ? void 0 : config.hideCursorOnInit) && editorHasNotBeenFocused.current || hasFocus || (isOpen !== null && isOpen !== void 0 ? isOpen : false) || isForcedHidden || (editorDisabled !== null && editorDisabled !== void 0 ? editorDisabled : false) || (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) && (showToolbar !== null && showToolbar !== void 0 ? showToolbar : false) || (0, _platformFeatureFlags.fg)('aifc_create_enabled') || !!hasDangerDecorations && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
118
119
  requestAnimationFrame(function () {
119
120
  return (0, _main.dispatchShouldHideDecorations)(editorView, shouldHide);
120
121
  });
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
3
3
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
7
  import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
@@ -107,7 +108,7 @@ export const selectionMarkerPlugin = ({
107
108
  * - Via the API: If another plugin has requested it to be hidden (force hidden).
108
109
  * - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
109
110
  */
110
- const shouldHide = (config === null || config === void 0 ? void 0 : config.hideCursorOnInit) && editorHasNotBeenFocused.current || hasFocus || (isOpen !== null && isOpen !== void 0 ? isOpen : false) || isForcedHidden || (editorDisabled !== null && editorDisabled !== void 0 ? editorDisabled : false) || expValEquals('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) && (showToolbar !== null && showToolbar !== void 0 ? showToolbar : false) || expValEquals('platform_editor_ai_aifc', 'isEnabled', true) || !!hasDangerDecorations && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
111
+ const shouldHide = (config === null || config === void 0 ? void 0 : config.hideCursorOnInit) && editorHasNotBeenFocused.current || hasFocus || (isOpen !== null && isOpen !== void 0 ? isOpen : false) || isForcedHidden || (editorDisabled !== null && editorDisabled !== void 0 ? editorDisabled : false) || expValEquals('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) && (showToolbar !== null && showToolbar !== void 0 ? showToolbar : false) || fg('aifc_create_enabled') || !!hasDangerDecorations && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
111
112
  requestAnimationFrame(() => dispatchShouldHideDecorations(editorView, shouldHide));
112
113
  }, [editorView, hasFocus, isOpen, isForcedHidden, editorDisabled, showToolbar, hasDangerDecorations]);
113
114
  },
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
3
3
  import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
7
  import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
@@ -106,7 +107,7 @@ export var selectionMarkerPlugin = function selectionMarkerPlugin(_ref) {
106
107
  * - Via the API: If another plugin has requested it to be hidden (force hidden).
107
108
  * - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
108
109
  */
109
- var shouldHide = (config === null || config === void 0 ? void 0 : config.hideCursorOnInit) && editorHasNotBeenFocused.current || hasFocus || (isOpen !== null && isOpen !== void 0 ? isOpen : false) || isForcedHidden || (editorDisabled !== null && editorDisabled !== void 0 ? editorDisabled : false) || expValEquals('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) && (showToolbar !== null && showToolbar !== void 0 ? showToolbar : false) || expValEquals('platform_editor_ai_aifc', 'isEnabled', true) || !!hasDangerDecorations && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
110
+ var shouldHide = (config === null || config === void 0 ? void 0 : config.hideCursorOnInit) && editorHasNotBeenFocused.current || hasFocus || (isOpen !== null && isOpen !== void 0 ? isOpen : false) || isForcedHidden || (editorDisabled !== null && editorDisabled !== void 0 ? editorDisabled : false) || expValEquals('platform_editor_toolbar_aifc_patch_1', 'isEnabled', true) && (showToolbar !== null && showToolbar !== void 0 ? showToolbar : false) || fg('aifc_create_enabled') || !!hasDangerDecorations && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
110
111
  requestAnimationFrame(function () {
111
112
  return dispatchShouldHideDecorations(editorView, shouldHide);
112
113
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-marker",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
4
4
  "description": "Selection marker plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,20 +32,20 @@
32
32
  "@atlaskit/editor-plugin-editor-disabled": "^6.0.0",
33
33
  "@atlaskit/editor-plugin-focus": "^5.0.0",
34
34
  "@atlaskit/editor-plugin-toolbar": "^3.0.0",
35
- "@atlaskit/editor-plugin-type-ahead": "^6.0.0",
35
+ "@atlaskit/editor-plugin-type-ahead": "^6.1.0",
36
36
  "@atlaskit/editor-prosemirror": "7.0.0",
37
37
  "@atlaskit/link": "^3.2.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
39
  "@atlaskit/primitives": "^14.15.0",
40
40
  "@atlaskit/theme": "^21.0.0",
41
- "@atlaskit/tmp-editor-statsig": "^12.32.0",
42
- "@atlaskit/tokens": "^6.3.0",
41
+ "@atlaskit/tmp-editor-statsig": "^13.0.0",
42
+ "@atlaskit/tokens": "^6.4.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
45
45
  "lodash": "^4.17.21"
46
46
  },
47
47
  "peerDependencies": {
48
- "@atlaskit/editor-common": "^110.1.0",
48
+ "@atlaskit/editor-common": "^110.4.0",
49
49
  "react": "^18.2.0",
50
50
  "react-dom": "^18.2.0"
51
51
  },
@@ -98,6 +98,9 @@
98
98
  },
99
99
  "platform_editor_inline_selection_marker_cursor": {
100
100
  "type": "boolean"
101
+ },
102
+ "aifc_create_enabled": {
103
+ "type": "boolean"
101
104
  }
102
105
  }
103
106
  }