@atlaskit/editor-plugin-selection-marker 6.1.2 → 6.2.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-selection-marker
|
|
2
2
|
|
|
3
|
+
## 6.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a9d1ffcf3e2d0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a9d1ffcf3e2d0) -
|
|
8
|
+
EDITOR-2344: Should not hide selection marker based on AIFC flag.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`4ad69354a021d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4ad69354a021d) -
|
|
16
|
+
Remove references to platform_editor_toolbar_aifc_patch_1 experiment, remove
|
|
17
|
+
useToolbarDropdownMenuOld export from @atlaskit/editor-toolbar package
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 6.1.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -8,8 +8,6 @@ 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");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
11
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
14
12
|
var _main = require("./pm-plugins/main");
|
|
15
13
|
var _globalStyles = require("./ui/global-styles");
|
|
@@ -115,7 +113,7 @@ var selectionMarkerPlugin = exports.selectionMarkerPlugin = function selectionMa
|
|
|
115
113
|
* - Via the API: If another plugin has requested it to be hidden (force hidden).
|
|
116
114
|
* - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
|
|
117
115
|
*/
|
|
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) || (
|
|
116
|
+
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) || !!hasDangerDecorations && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
|
|
119
117
|
requestAnimationFrame(function () {
|
|
120
118
|
return (0, _main.dispatchShouldHideDecorations)(editorView, shouldHide);
|
|
121
119
|
});
|
|
@@ -1,8 +1,6 @@
|
|
|
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';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
5
|
import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
|
|
8
6
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
@@ -108,7 +106,7 @@ export const selectionMarkerPlugin = ({
|
|
|
108
106
|
* - Via the API: If another plugin has requested it to be hidden (force hidden).
|
|
109
107
|
* - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
|
|
110
108
|
*/
|
|
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) ||
|
|
109
|
+
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) || !!hasDangerDecorations && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
|
|
112
110
|
requestAnimationFrame(() => dispatchShouldHideDecorations(editorView, shouldHide));
|
|
113
111
|
}, [editorView, hasFocus, isOpen, isForcedHidden, editorDisabled, showToolbar, hasDangerDecorations]);
|
|
114
112
|
},
|
|
@@ -1,8 +1,6 @@
|
|
|
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';
|
|
5
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
4
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
5
|
import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
|
|
8
6
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
@@ -107,7 +105,7 @@ export var selectionMarkerPlugin = function selectionMarkerPlugin(_ref) {
|
|
|
107
105
|
* - Via the API: If another plugin has requested it to be hidden (force hidden).
|
|
108
106
|
* - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
|
|
109
107
|
*/
|
|
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) ||
|
|
108
|
+
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) || !!hasDangerDecorations && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_block_menu_keyboard_navigation', 'isEnabled', true);
|
|
111
109
|
requestAnimationFrame(function () {
|
|
112
110
|
return dispatchShouldHideDecorations(editorView, shouldHide);
|
|
113
111
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-marker",
|
|
3
|
-
"version": "6.1
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "Selection marker plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,23 +29,23 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
32
|
-
"@atlaskit/editor-plugin-editor-disabled": "^6.
|
|
32
|
+
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-focus": "^5.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-toolbar": "^3.
|
|
35
|
-
"@atlaskit/editor-plugin-type-ahead": "^6.
|
|
34
|
+
"@atlaskit/editor-plugin-toolbar": "^3.2.0",
|
|
35
|
+
"@atlaskit/editor-plugin-type-ahead": "^6.4.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": "^13.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
42
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.
|
|
48
|
+
"@atlaskit/editor-common": "^110.11.0",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
50
|
"react-dom": "^18.2.0"
|
|
51
51
|
},
|
|
@@ -98,9 +98,6 @@
|
|
|
98
98
|
},
|
|
99
99
|
"platform_editor_inline_selection_marker_cursor": {
|
|
100
100
|
"type": "boolean"
|
|
101
|
-
},
|
|
102
|
-
"aifc_create_enabled": {
|
|
103
|
-
"type": "boolean"
|
|
104
101
|
}
|
|
105
102
|
}
|
|
106
103
|
}
|