@atlaskit/editor-plugin-highlight 3.1.1 → 4.0.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
|
@@ -57,8 +57,8 @@ function HighlightColorMenuItem(_ref2) {
|
|
|
57
57
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
58
58
|
formatMessage = _useIntl.formatMessage;
|
|
59
59
|
var activeColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'highlight.activeColor');
|
|
60
|
-
var
|
|
61
|
-
|
|
60
|
+
var context = (0, _editorToolbar.useToolbarDropdownMenu)();
|
|
61
|
+
var closeMenu = context === null || context === void 0 ? void 0 : context.closeMenu;
|
|
62
62
|
var handleHighlightColorChange = (0, _react.useCallback)(function (color) {
|
|
63
63
|
var _api$highlight;
|
|
64
64
|
if (api !== null && api !== void 0 && (_api$highlight = api.highlight) !== null && _api$highlight !== void 0 && (_api$highlight = _api$highlight.commands) !== null && _api$highlight !== void 0 && _api$highlight.changeColor) {
|
|
@@ -66,7 +66,7 @@ function HighlightColorMenuItem(_ref2) {
|
|
|
66
66
|
color: color,
|
|
67
67
|
inputMethod: (0, _toolbar.getInputMethodFromParentKeys)(parents)
|
|
68
68
|
}));
|
|
69
|
-
closeMenu();
|
|
69
|
+
closeMenu === null || closeMenu === void 0 || closeMenu();
|
|
70
70
|
}
|
|
71
71
|
}, [api, closeMenu, parents]);
|
|
72
72
|
var colorPalette = (0, _react.useMemo)(function () {
|
|
@@ -48,9 +48,8 @@ export function HighlightColorMenuItem({
|
|
|
48
48
|
formatMessage
|
|
49
49
|
} = useIntl();
|
|
50
50
|
const activeColor = useSharedPluginStateSelector(api, 'highlight.activeColor');
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
} = useToolbarDropdownMenu();
|
|
51
|
+
const context = useToolbarDropdownMenu();
|
|
52
|
+
const closeMenu = context === null || context === void 0 ? void 0 : context.closeMenu;
|
|
54
53
|
const handleHighlightColorChange = useCallback(color => {
|
|
55
54
|
var _api$highlight, _api$highlight$comman;
|
|
56
55
|
if (api !== null && api !== void 0 && (_api$highlight = api.highlight) !== null && _api$highlight !== void 0 && (_api$highlight$comman = _api$highlight.commands) !== null && _api$highlight$comman !== void 0 && _api$highlight$comman.changeColor) {
|
|
@@ -58,7 +57,7 @@ export function HighlightColorMenuItem({
|
|
|
58
57
|
color,
|
|
59
58
|
inputMethod: getInputMethodFromParentKeys(parents)
|
|
60
59
|
}));
|
|
61
|
-
closeMenu();
|
|
60
|
+
closeMenu === null || closeMenu === void 0 ? void 0 : closeMenu();
|
|
62
61
|
}
|
|
63
62
|
}, [api, closeMenu, parents]);
|
|
64
63
|
const colorPalette = useMemo(() => {
|
|
@@ -48,8 +48,8 @@ export function HighlightColorMenuItem(_ref2) {
|
|
|
48
48
|
var _useIntl = useIntl(),
|
|
49
49
|
formatMessage = _useIntl.formatMessage;
|
|
50
50
|
var activeColor = useSharedPluginStateSelector(api, 'highlight.activeColor');
|
|
51
|
-
var
|
|
52
|
-
|
|
51
|
+
var context = useToolbarDropdownMenu();
|
|
52
|
+
var closeMenu = context === null || context === void 0 ? void 0 : context.closeMenu;
|
|
53
53
|
var handleHighlightColorChange = useCallback(function (color) {
|
|
54
54
|
var _api$highlight;
|
|
55
55
|
if (api !== null && api !== void 0 && (_api$highlight = api.highlight) !== null && _api$highlight !== void 0 && (_api$highlight = _api$highlight.commands) !== null && _api$highlight !== void 0 && _api$highlight.changeColor) {
|
|
@@ -57,7 +57,7 @@ export function HighlightColorMenuItem(_ref2) {
|
|
|
57
57
|
color: color,
|
|
58
58
|
inputMethod: getInputMethodFromParentKeys(parents)
|
|
59
59
|
}));
|
|
60
|
-
closeMenu();
|
|
60
|
+
closeMenu === null || closeMenu === void 0 || closeMenu();
|
|
61
61
|
}
|
|
62
62
|
}, [api, closeMenu, parents]);
|
|
63
63
|
var colorPalette = useMemo(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
"@atlaskit/button": "^23.4.0",
|
|
37
37
|
"@atlaskit/css": "^0.12.0",
|
|
38
38
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
39
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
40
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
41
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^
|
|
42
|
-
"@atlaskit/editor-plugin-text-formatting": "^
|
|
43
|
-
"@atlaskit/editor-plugin-toolbar": "^0.
|
|
39
|
+
"@atlaskit/editor-plugin-analytics": "^4.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^5.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^5.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-text-formatting": "^4.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-toolbar": "^1.0.0",
|
|
44
44
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
45
45
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
46
46
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
47
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
48
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
47
|
+
"@atlaskit/editor-toolbar": "^0.6.0",
|
|
48
|
+
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
49
49
|
"@atlaskit/icon": "^28.1.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^14.12.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^12.0.0",
|
|
53
53
|
"@atlaskit/tokens": "^6.1.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@atlaskit/editor-common": "^
|
|
58
|
+
"@atlaskit/editor-common": "^108.0.0",
|
|
59
59
|
"react": "^18.2.0",
|
|
60
60
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
61
61
|
},
|