@atlaskit/editor-plugin-selection-marker 3.0.6 → 3.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 +16 -0
- package/dist/cjs/ui/global-styles.js +8 -1
- package/dist/es2019/ui/global-styles.js +8 -1
- package/dist/esm/ui/global-styles.js +8 -1
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/selectionMarkerPluginType.d.ts +4 -4
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/selectionMarkerPluginType.d.ts +4 -4
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-marker
|
|
2
2
|
|
|
3
|
+
## 3.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f0b0ea63f59bc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0b0ea63f59bc) -
|
|
8
|
+
[ux] ED-28803 Register Delete Button in block menu and add delete functionality and hover styles
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 3.0.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
16
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 3.0.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.GlobalStylesWrapper = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
8
9
|
/**
|
|
9
10
|
* @jsxRuntime classic
|
|
10
11
|
* @jsx jsx
|
|
@@ -26,8 +27,14 @@ var globalStyles = (0, _react.css)({
|
|
|
26
27
|
background: 'unset'
|
|
27
28
|
}
|
|
28
29
|
});
|
|
30
|
+
var hideSelectionStyles = (0, _react.css)({
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
32
|
+
'.ProseMirror *.danger::selection': {
|
|
33
|
+
background: 'transparent'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
29
36
|
var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWrapper() {
|
|
30
37
|
return (0, _react.jsx)(_react.Global, {
|
|
31
|
-
styles: globalStyles
|
|
38
|
+
styles: [globalStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) && hideSelectionStyles]
|
|
32
39
|
});
|
|
33
40
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { css, Global, jsx } from '@emotion/react';
|
|
7
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Unset the selection background color as we are using our own
|
|
@@ -20,8 +21,14 @@ const globalStyles = css({
|
|
|
20
21
|
background: 'unset'
|
|
21
22
|
}
|
|
22
23
|
});
|
|
24
|
+
const hideSelectionStyles = css({
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
26
|
+
'.ProseMirror *.danger::selection': {
|
|
27
|
+
background: 'transparent'
|
|
28
|
+
}
|
|
29
|
+
});
|
|
23
30
|
export const GlobalStylesWrapper = () => {
|
|
24
31
|
return jsx(Global, {
|
|
25
|
-
styles: globalStyles
|
|
32
|
+
styles: [globalStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && hideSelectionStyles]
|
|
26
33
|
});
|
|
27
34
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { css, Global, jsx } from '@emotion/react';
|
|
7
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Unset the selection background color as we are using our own
|
|
@@ -20,8 +21,14 @@ var globalStyles = css({
|
|
|
20
21
|
background: 'unset'
|
|
21
22
|
}
|
|
22
23
|
});
|
|
24
|
+
var hideSelectionStyles = css({
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
26
|
+
'.ProseMirror *.danger::selection': {
|
|
27
|
+
background: 'transparent'
|
|
28
|
+
}
|
|
29
|
+
});
|
|
23
30
|
export var GlobalStylesWrapper = function GlobalStylesWrapper() {
|
|
24
31
|
return jsx(Global, {
|
|
25
|
-
styles: globalStyles
|
|
32
|
+
styles: [globalStyles, expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) && hideSelectionStyles]
|
|
26
33
|
});
|
|
27
34
|
};
|
|
@@ -7,9 +7,9 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
7
7
|
import type { SelectionMarkerPlugin } from '../selectionMarkerPluginType';
|
|
8
8
|
export interface PluginState {
|
|
9
9
|
decorations: DecorationSet;
|
|
10
|
-
shouldHideDecorations: boolean;
|
|
11
|
-
forceHide: boolean;
|
|
12
10
|
decorationType: DecorationType;
|
|
11
|
+
forceHide: boolean;
|
|
12
|
+
shouldHideDecorations: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare const key: PluginKey<PluginState>;
|
|
15
15
|
type DecorationType = 'blur' | 'highlight' | 'none';
|
|
@@ -15,6 +15,10 @@ export type SelectionMarkerPluginOptions = {
|
|
|
15
15
|
*/
|
|
16
16
|
export type SelectionMarkerPluginConfiguration = SelectionMarkerPluginOptions;
|
|
17
17
|
export type SelectionMarkerPlugin = NextEditorPlugin<'selectionMarker', {
|
|
18
|
+
actions: {
|
|
19
|
+
hideDecoration: () => ReleaseHiddenDecoration | undefined;
|
|
20
|
+
queueHideDecoration: (setCleanup: SetCleanup) => CancelQueue;
|
|
21
|
+
};
|
|
18
22
|
dependencies: [
|
|
19
23
|
FocusPlugin,
|
|
20
24
|
OptionalPlugin<TypeAheadPlugin>,
|
|
@@ -25,9 +29,5 @@ export type SelectionMarkerPlugin = NextEditorPlugin<'selectionMarker', {
|
|
|
25
29
|
isForcedHidden: boolean;
|
|
26
30
|
isMarkerActive: boolean;
|
|
27
31
|
} | undefined;
|
|
28
|
-
actions: {
|
|
29
|
-
hideDecoration: () => ReleaseHiddenDecoration | undefined;
|
|
30
|
-
queueHideDecoration: (setCleanup: SetCleanup) => CancelQueue;
|
|
31
|
-
};
|
|
32
32
|
}>;
|
|
33
33
|
export {};
|
|
@@ -7,9 +7,9 @@ import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
|
7
7
|
import type { SelectionMarkerPlugin } from '../selectionMarkerPluginType';
|
|
8
8
|
export interface PluginState {
|
|
9
9
|
decorations: DecorationSet;
|
|
10
|
-
shouldHideDecorations: boolean;
|
|
11
|
-
forceHide: boolean;
|
|
12
10
|
decorationType: DecorationType;
|
|
11
|
+
forceHide: boolean;
|
|
12
|
+
shouldHideDecorations: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare const key: PluginKey<PluginState>;
|
|
15
15
|
type DecorationType = 'blur' | 'highlight' | 'none';
|
|
@@ -15,6 +15,10 @@ export type SelectionMarkerPluginOptions = {
|
|
|
15
15
|
*/
|
|
16
16
|
export type SelectionMarkerPluginConfiguration = SelectionMarkerPluginOptions;
|
|
17
17
|
export type SelectionMarkerPlugin = NextEditorPlugin<'selectionMarker', {
|
|
18
|
+
actions: {
|
|
19
|
+
hideDecoration: () => ReleaseHiddenDecoration | undefined;
|
|
20
|
+
queueHideDecoration: (setCleanup: SetCleanup) => CancelQueue;
|
|
21
|
+
};
|
|
18
22
|
dependencies: [
|
|
19
23
|
FocusPlugin,
|
|
20
24
|
OptionalPlugin<TypeAheadPlugin>,
|
|
@@ -25,9 +29,5 @@ export type SelectionMarkerPlugin = NextEditorPlugin<'selectionMarker', {
|
|
|
25
29
|
isForcedHidden: boolean;
|
|
26
30
|
isMarkerActive: boolean;
|
|
27
31
|
} | undefined;
|
|
28
|
-
actions: {
|
|
29
|
-
hideDecoration: () => ReleaseHiddenDecoration | undefined;
|
|
30
|
-
queueHideDecoration: (setCleanup: SetCleanup) => CancelQueue;
|
|
31
|
-
};
|
|
32
32
|
}>;
|
|
33
33
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-marker",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"description": "Selection marker plugin for @atlaskit/editor-core.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/primitives": "^14.11.0",
|
|
41
41
|
"@atlaskit/theme": "^19.0.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^11.6.0",
|
|
43
43
|
"@atlaskit/tokens": "^6.0.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1",
|
|
46
46
|
"lodash": "^4.17.21"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^107.
|
|
49
|
+
"@atlaskit/editor-common": "^107.29.0",
|
|
50
50
|
"react": "^18.2.0",
|
|
51
51
|
"react-dom": "^18.2.0"
|
|
52
52
|
},
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"@af/integration-testing": "workspace:^",
|
|
55
55
|
"@af/visual-regression": "workspace:^",
|
|
56
56
|
"@atlaskit/ssr": "workspace:^",
|
|
57
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
58
57
|
"@testing-library/react": "^13.4.0",
|
|
59
58
|
"wait-for-expect": "^1.2.0"
|
|
60
59
|
},
|