@atlaskit/editor-plugin-highlight 1.19.9 → 1.19.10
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 +8 -0
- package/dist/cjs/highlightPlugin.js +1 -1
- package/dist/cjs/pm-plugins/main.js +0 -2
- package/dist/cjs/ui/FloatingToolbarHighlightColor.js +1 -1
- package/dist/es2019/highlightPlugin.js +1 -1
- package/dist/es2019/pm-plugins/main.js +0 -2
- package/dist/es2019/ui/FloatingToolbarHighlightColor.js +1 -1
- package/dist/esm/highlightPlugin.js +1 -1
- package/dist/esm/pm-plugins/main.js +0 -2
- package/dist/esm/ui/FloatingToolbarHighlightColor.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-highlight
|
|
2
2
|
|
|
3
|
+
## 1.19.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107473](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107473)
|
|
8
|
+
[`962b3297548df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b3297548df) -
|
|
9
|
+
[ux] Implement variation 2 for editor contextual toolbar formatting experiment
|
|
10
|
+
|
|
3
11
|
## 1.19.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -92,7 +92,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
92
92
|
},
|
|
93
93
|
fallback: []
|
|
94
94
|
};
|
|
95
|
-
var rank = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
95
|
+
var rank = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
96
96
|
return {
|
|
97
97
|
rank: rank,
|
|
98
98
|
isToolbarAbove: true,
|
|
@@ -30,8 +30,6 @@ var createPlugin = exports.createPlugin = function createPlugin(_ref) {
|
|
|
30
30
|
isPaletteOpen: false
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
|
-
// Ignored via go/ees005
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
35
33
|
apply: function apply(tr, pluginState, _oldState, newState) {
|
|
36
34
|
var _tr$getMeta;
|
|
37
35
|
var action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
|
|
@@ -83,7 +83,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
83
83
|
// Get the design token for the active color (if it exists) to modify the toolbar
|
|
84
84
|
// icon, but show the nice rainbow if none is selected
|
|
85
85
|
var activeColorToken = highlightState.activeColor === null ? null : (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(highlightState.activeColor);
|
|
86
|
-
var title = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? (0, _keymaps.tooltip)(_keymaps.toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
86
|
+
var title = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? (0, _keymaps.tooltip)(_keymaps.toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
87
87
|
return (0, _react2.jsx)(_PaletteDropdown.PaletteDropdown, {
|
|
88
88
|
isOpen: isDropdownOpen && !highlightState.disabled,
|
|
89
89
|
activeColor: highlightState.activeColor,
|
|
@@ -77,7 +77,7 @@ export const highlightPlugin = ({
|
|
|
77
77
|
}),
|
|
78
78
|
fallback: []
|
|
79
79
|
};
|
|
80
|
-
const rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
80
|
+
const rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
81
81
|
return {
|
|
82
82
|
rank,
|
|
83
83
|
isToolbarAbove: true,
|
|
@@ -19,8 +19,6 @@ export const createPlugin = ({
|
|
|
19
19
|
disabled: getDisabledState(editorState),
|
|
20
20
|
isPaletteOpen: false
|
|
21
21
|
}),
|
|
22
|
-
// Ignored via go/ees005
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
24
22
|
apply: (tr, pluginState, _oldState, newState) => {
|
|
25
23
|
var _tr$getMeta;
|
|
26
24
|
const action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
|
|
@@ -76,7 +76,7 @@ const FloatingToolbarHighlightColor = ({
|
|
|
76
76
|
// Get the design token for the active color (if it exists) to modify the toolbar
|
|
77
77
|
// icon, but show the nice rainbow if none is selected
|
|
78
78
|
const activeColorToken = highlightState.activeColor === null ? null : hexToEditorTextBackgroundPaletteColor(highlightState.activeColor);
|
|
79
|
-
const title = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
79
|
+
const title = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
80
80
|
return jsx(PaletteDropdown, {
|
|
81
81
|
isOpen: isDropdownOpen && !highlightState.disabled,
|
|
82
82
|
activeColor: highlightState.activeColor,
|
|
@@ -85,7 +85,7 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
85
85
|
},
|
|
86
86
|
fallback: []
|
|
87
87
|
};
|
|
88
|
-
var rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
88
|
+
var rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
89
89
|
return {
|
|
90
90
|
rank: rank,
|
|
91
91
|
isToolbarAbove: true,
|
|
@@ -23,8 +23,6 @@ export var createPlugin = function createPlugin(_ref) {
|
|
|
23
23
|
isPaletteOpen: false
|
|
24
24
|
};
|
|
25
25
|
},
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
28
26
|
apply: function apply(tr, pluginState, _oldState, newState) {
|
|
29
27
|
var _tr$getMeta;
|
|
30
28
|
var action = (_tr$getMeta = tr.getMeta(highlightPluginKey)) === null || _tr$getMeta === void 0 ? void 0 : _tr$getMeta.type;
|
|
@@ -75,7 +75,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
75
75
|
// Get the design token for the active color (if it exists) to modify the toolbar
|
|
76
76
|
// icon, but show the nice rainbow if none is selected
|
|
77
77
|
var activeColorToken = highlightState.activeColor === null ? null : hexToEditorTextBackgroundPaletteColor(highlightState.activeColor);
|
|
78
|
-
var title = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
78
|
+
var title = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1') || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
79
79
|
return jsx(PaletteDropdown, {
|
|
80
80
|
isOpen: isDropdownOpen && !highlightState.disabled,
|
|
81
81
|
activeColor: highlightState.activeColor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.10",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@atlaskit/icon": "^23.4.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
50
50
|
"@atlaskit/primitives": "^13.3.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^2.41.0",
|
|
52
52
|
"@atlaskit/tokens": "^3.2.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1"
|