@atlaskit/editor-plugin-selection-marker 6.1.2 → 6.2.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,17 @@
1
1
  # @atlaskit/editor-plugin-selection-marker
2
2
 
3
+ ## 6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`4ad69354a021d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4ad69354a021d) -
8
+ Remove references to platform_editor_toolbar_aifc_patch_1 experiment, remove
9
+ useToolbarDropdownMenuOld export from @atlaskit/editor-toolbar package
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 6.1.2
4
16
 
5
17
  ### Patch Changes
@@ -9,7 +9,6 @@ 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
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
12
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
14
13
  var _main = require("./pm-plugins/main");
15
14
  var _globalStyles = require("./ui/global-styles");
@@ -115,7 +114,7 @@ var selectionMarkerPlugin = exports.selectionMarkerPlugin = function selectionMa
115
114
  * - Via the API: If another plugin has requested it to be hidden (force hidden).
116
115
  * - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
117
116
  */
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);
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) || (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);
119
118
  requestAnimationFrame(function () {
120
119
  return (0, _main.dispatchShouldHideDecorations)(editorView, shouldHide);
121
120
  });
@@ -2,7 +2,6 @@ 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
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
7
6
  import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
8
7
  import { GlobalStylesWrapper } from './ui/global-styles';
@@ -108,7 +107,7 @@ export const selectionMarkerPlugin = ({
108
107
  * - Via the API: If another plugin has requested it to be hidden (force hidden).
109
108
  * - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
110
109
  */
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);
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) || (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);
112
111
  requestAnimationFrame(() => dispatchShouldHideDecorations(editorView, shouldHide));
113
112
  }, [editorView, hasFocus, isOpen, isForcedHidden, editorDisabled, showToolbar, hasDangerDecorations]);
114
113
  },
@@ -2,7 +2,6 @@ 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
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
7
6
  import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
8
7
  import { GlobalStylesWrapper } from './ui/global-styles';
@@ -107,7 +106,7 @@ export var selectionMarkerPlugin = function selectionMarkerPlugin(_ref) {
107
106
  * - Via the API: If another plugin has requested it to be hidden (force hidden).
108
107
  * - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
109
108
  */
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);
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) || (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
110
  requestAnimationFrame(function () {
112
111
  return dispatchShouldHideDecorations(editorView, shouldHide);
113
112
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-selection-marker",
3
- "version": "6.1.2",
3
+ "version": "6.2.0",
4
4
  "description": "Selection marker plugin for @atlaskit/editor-core.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
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": "^13.0.0",
41
+ "@atlaskit/tmp-editor-statsig": "^13.1.0",
42
42
  "@atlaskit/tokens": "^6.4.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",