@atlaskit/editor-plugin-highlight 2.5.4 → 2.5.6
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 +12 -0
- package/dist/cjs/pm-plugins/keymap.js +16 -19
- package/dist/es2019/pm-plugins/keymap.js +15 -18
- package/dist/esm/pm-plugins/keymap.js +16 -19
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -8,10 +8,10 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
8
8
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
9
9
|
var _preset = require("@atlaskit/editor-common/preset");
|
|
10
10
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
11
|
var _changeColor = require("../editor-commands/change-color");
|
|
13
12
|
var _palette = require("../editor-commands/palette");
|
|
14
13
|
function keymapPlugin(_ref) {
|
|
14
|
+
var _api$analytics;
|
|
15
15
|
var api = _ref.api;
|
|
16
16
|
var list = {};
|
|
17
17
|
(0, _keymaps.bindKeymapWithCommand)(
|
|
@@ -23,23 +23,20 @@ function keymapPlugin(_ref) {
|
|
|
23
23
|
(0, _palette.togglePalette)(api)({
|
|
24
24
|
inputMethod: _analytics.INPUT_METHOD.SHORTCUT
|
|
25
25
|
}), list);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
inputMethod: _analytics.INPUT_METHOD.SHORTCUT
|
|
42
|
-
})), list);
|
|
43
|
-
}
|
|
26
|
+
var analyticsApi = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
27
|
+
// NOTE: This will work with fallback until we clean up `editor_text_highlight_orange_to_yellow`
|
|
28
|
+
var color = _uiColor.highlightColorPalette.find(function (_ref2) {
|
|
29
|
+
var label = _ref2.label;
|
|
30
|
+
return label === 'Yellow';
|
|
31
|
+
}) || {
|
|
32
|
+
value: '#fedec8'
|
|
33
|
+
};
|
|
34
|
+
(0, _keymaps.bindKeymapWithCommand)(
|
|
35
|
+
// Ignored via go/ees005
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
37
|
+
_keymaps.applyYellowHighlight.common, (0, _preset.editorCommandToPMCommand)((0, _changeColor.changeColor)(analyticsApi)({
|
|
38
|
+
color: color.value,
|
|
39
|
+
inputMethod: _analytics.INPUT_METHOD.SHORTCUT
|
|
40
|
+
})), list);
|
|
44
41
|
return (0, _keymaps.keymap)(list);
|
|
45
42
|
}
|
|
@@ -2,12 +2,12 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { bindKeymapWithCommand, keymap, toggleHighlightPalette, applyYellowHighlight } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
4
4
|
import { highlightColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { changeColor } from '../editor-commands/change-color';
|
|
7
6
|
import { togglePalette } from '../editor-commands/palette';
|
|
8
7
|
export function keymapPlugin({
|
|
9
8
|
api
|
|
10
9
|
}) {
|
|
10
|
+
var _api$analytics;
|
|
11
11
|
const list = {};
|
|
12
12
|
bindKeymapWithCommand(
|
|
13
13
|
// Ignored via go/ees005
|
|
@@ -18,22 +18,19 @@ export function keymapPlugin({
|
|
|
18
18
|
togglePalette(api)({
|
|
19
19
|
inputMethod: INPUT_METHOD.SHORTCUT
|
|
20
20
|
}), list);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
inputMethod: INPUT_METHOD.SHORTCUT
|
|
36
|
-
})), list);
|
|
37
|
-
}
|
|
21
|
+
const analyticsApi = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
22
|
+
// NOTE: This will work with fallback until we clean up `editor_text_highlight_orange_to_yellow`
|
|
23
|
+
const color = highlightColorPalette.find(({
|
|
24
|
+
label
|
|
25
|
+
}) => label === 'Yellow') || {
|
|
26
|
+
value: '#fedec8'
|
|
27
|
+
};
|
|
28
|
+
bindKeymapWithCommand(
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
31
|
+
applyYellowHighlight.common, editorCommandToPMCommand(changeColor(analyticsApi)({
|
|
32
|
+
color: color.value,
|
|
33
|
+
inputMethod: INPUT_METHOD.SHORTCUT
|
|
34
|
+
})), list);
|
|
38
35
|
return keymap(list);
|
|
39
36
|
}
|
|
@@ -2,10 +2,10 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { bindKeymapWithCommand, keymap, toggleHighlightPalette, applyYellowHighlight } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
4
4
|
import { highlightColorPalette } from '@atlaskit/editor-common/ui-color';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { changeColor } from '../editor-commands/change-color';
|
|
7
6
|
import { togglePalette } from '../editor-commands/palette';
|
|
8
7
|
export function keymapPlugin(_ref) {
|
|
8
|
+
var _api$analytics;
|
|
9
9
|
var api = _ref.api;
|
|
10
10
|
var list = {};
|
|
11
11
|
bindKeymapWithCommand(
|
|
@@ -17,23 +17,20 @@ export function keymapPlugin(_ref) {
|
|
|
17
17
|
togglePalette(api)({
|
|
18
18
|
inputMethod: INPUT_METHOD.SHORTCUT
|
|
19
19
|
}), list);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
inputMethod: INPUT_METHOD.SHORTCUT
|
|
36
|
-
})), list);
|
|
37
|
-
}
|
|
20
|
+
var analyticsApi = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
21
|
+
// NOTE: This will work with fallback until we clean up `editor_text_highlight_orange_to_yellow`
|
|
22
|
+
var color = highlightColorPalette.find(function (_ref2) {
|
|
23
|
+
var label = _ref2.label;
|
|
24
|
+
return label === 'Yellow';
|
|
25
|
+
}) || {
|
|
26
|
+
value: '#fedec8'
|
|
27
|
+
};
|
|
28
|
+
bindKeymapWithCommand(
|
|
29
|
+
// Ignored via go/ees005
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
31
|
+
applyYellowHighlight.common, editorCommandToPMCommand(changeColor(analyticsApi)({
|
|
32
|
+
color: color.value,
|
|
33
|
+
inputMethod: INPUT_METHOD.SHORTCUT
|
|
34
|
+
})), list);
|
|
38
35
|
return keymap(list);
|
|
39
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,20 +37,20 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
40
|
-
"@atlaskit/editor-common": "^
|
|
40
|
+
"@atlaskit/editor-common": "^106.0.0",
|
|
41
41
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
42
|
-
"@atlaskit/editor-plugin-analytics": "^2.
|
|
42
|
+
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
43
43
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection-toolbar": "^3.6.0",
|
|
45
45
|
"@atlaskit/editor-plugin-text-formatting": "^2.2.0",
|
|
46
46
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
49
|
-
"@atlaskit/icon": "^26.
|
|
49
|
+
"@atlaskit/icon": "^26.4.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^14.
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
53
|
-
"@atlaskit/tokens": "^4.
|
|
51
|
+
"@atlaskit/primitives": "^14.8.0",
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^5.2.0",
|
|
53
|
+
"@atlaskit/tokens": "^4.9.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1"
|
|
56
56
|
},
|
|
@@ -110,9 +110,6 @@
|
|
|
110
110
|
"type": "boolean",
|
|
111
111
|
"referenceOnly": "true"
|
|
112
112
|
},
|
|
113
|
-
"platform_editor_yellow_text_highlight_shortcut": {
|
|
114
|
-
"type": "boolean"
|
|
115
|
-
},
|
|
116
113
|
"platform-visual-refresh-icons": {
|
|
117
114
|
"type": "boolean"
|
|
118
115
|
}
|