@atlaskit/editor-plugin-selection-marker 16.0.7 → 16.0.8
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 +6 -0
- package/dist/cjs/selectionMarkerPlugin.js +3 -3
- package/dist/cjs/ui/global-styles.js +2 -2
- package/dist/es2019/selectionMarkerPlugin.js +1 -1
- package/dist/es2019/ui/global-styles.js +1 -1
- package/dist/esm/selectionMarkerPlugin.js +1 -1
- package/dist/esm/ui/global-styles.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ 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 _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
12
|
-
var
|
|
12
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
13
|
var _main = require("./pm-plugins/main");
|
|
14
14
|
var _globalStyles = require("./ui/global-styles");
|
|
15
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -106,7 +106,7 @@ var selectionMarkerPlugin = exports.selectionMarkerPlugin = function selectionMa
|
|
|
106
106
|
if (hasFocus === true) {
|
|
107
107
|
editorHasNotBeenFocused.current = false;
|
|
108
108
|
}
|
|
109
|
-
var isBlockMenuOpen = currentUserIntent === 'blockMenuOpen' && (0,
|
|
109
|
+
var isBlockMenuOpen = currentUserIntent === 'blockMenuOpen' && (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true);
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* There are a number of conditions we should not show the marker,
|
|
@@ -117,7 +117,7 @@ var selectionMarkerPlugin = exports.selectionMarkerPlugin = function selectionMa
|
|
|
117
117
|
* - Via the API: If another plugin has requested it to be hidden (force hidden).
|
|
118
118
|
* - If danger styles is shown in decorationsPlugin, then we don't need to show the selection marker
|
|
119
119
|
*/
|
|
120
|
-
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,
|
|
120
|
+
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, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) || isBlockMenuOpen;
|
|
121
121
|
requestAnimationFrame(function () {
|
|
122
122
|
return (0, _main.dispatchShouldHideDecorations)(editorView, shouldHide);
|
|
123
123
|
});
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GlobalStylesWrapper = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var
|
|
8
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
9
9
|
/**
|
|
10
10
|
* @jsxRuntime classic
|
|
11
11
|
* @jsx jsx
|
|
@@ -37,6 +37,6 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
|
|
|
37
37
|
return (0, _react.jsx)(_react.Global
|
|
38
38
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
39
39
|
, {
|
|
40
|
-
styles: [globalStyles, (0,
|
|
40
|
+
styles: [globalStyles, (0, _editorExperiment.editorExperiment)('platform_editor_block_menu', true) && hideSelectionStyles]
|
|
41
41
|
});
|
|
42
42
|
};
|
|
@@ -2,7 +2,7 @@ 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 { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
|
|
7
7
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
8
8
|
export const selectionMarkerPlugin = ({
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { css, Global, jsx } from '@emotion/react';
|
|
7
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Unset the selection background color as we are using our own
|
|
@@ -2,7 +2,7 @@ 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 { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
5
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
6
|
import { createPlugin, dispatchShouldHideDecorations, key } from './pm-plugins/main';
|
|
7
7
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
8
8
|
export var selectionMarkerPlugin = function selectionMarkerPlugin(_ref) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
6
6
|
import { css, Global, jsx } from '@emotion/react';
|
|
7
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
7
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Unset the selection background color as we are using our own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-marker",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.8",
|
|
4
4
|
"description": "Selection marker plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
33
33
|
"@atlaskit/section-message": "^10.1.0",
|
|
34
34
|
"@atlaskit/theme": "^28.1.0",
|
|
35
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
35
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
36
36
|
"@atlaskit/tokens": "^16.9.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0",
|
|
38
38
|
"@emotion/react": "^11.7.1",
|