@atlaskit/editor-plugin-highlight 1.19.7 → 1.19.9
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/highlightPlugin.js +3 -1
- package/dist/cjs/ui/FloatingToolbarHighlightColor.js +2 -2
- package/dist/es2019/highlightPlugin.js +3 -1
- package/dist/es2019/ui/FloatingToolbarHighlightColor.js +2 -2
- package/dist/esm/highlightPlugin.js +3 -1
- package/dist/esm/ui/FloatingToolbarHighlightColor.js +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-highlight
|
|
2
2
|
|
|
3
|
+
## 1.19.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#105009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105009)
|
|
8
|
+
[`a4039ebf7ed11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a4039ebf7ed11) -
|
|
9
|
+
[ux] Implement variant 2 cohorts experience for platform_editor_contextual_formatting_toolbar_v2
|
|
10
|
+
experiment
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.19.8
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 1.19.7
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -77,6 +77,8 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
77
77
|
selectionToolbar: function selectionToolbar() {
|
|
78
78
|
if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false, {
|
|
79
79
|
exposure: true
|
|
80
|
+
}) && (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'control', {
|
|
81
|
+
exposure: true
|
|
80
82
|
})) {
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
@@ -90,7 +92,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
90
92
|
},
|
|
91
93
|
fallback: []
|
|
92
94
|
};
|
|
93
|
-
var rank = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) ? 5 : -9;
|
|
95
|
+
var rank = (0, _experiments.editorExperiment)('contextual_formatting_toolbar', true) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
94
96
|
return {
|
|
95
97
|
rank: rank,
|
|
96
98
|
isToolbarAbove: true,
|
|
@@ -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, _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', '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,
|
|
@@ -136,7 +136,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
136
136
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
137
137
|
label: ""
|
|
138
138
|
}))
|
|
139
|
-
}, (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false) && formatMessage(_messages.highlightMessages.highlightFloatingToolbar)),
|
|
139
|
+
}, (0, _experiments.editorExperiment)('contextual_formatting_toolbar', false) && (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'control') && formatMessage(_messages.highlightMessages.highlightFloatingToolbar)),
|
|
140
140
|
onColorChange: function onColorChange(color) {
|
|
141
141
|
return handleColorChange({
|
|
142
142
|
color: color,
|
|
@@ -64,6 +64,8 @@ export const highlightPlugin = ({
|
|
|
64
64
|
selectionToolbar() {
|
|
65
65
|
if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && editorExperiment('contextual_formatting_toolbar', false, {
|
|
66
66
|
exposure: true
|
|
67
|
+
}) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control', {
|
|
68
|
+
exposure: true
|
|
67
69
|
})) {
|
|
68
70
|
return;
|
|
69
71
|
}
|
|
@@ -75,7 +77,7 @@ export const highlightPlugin = ({
|
|
|
75
77
|
}),
|
|
76
78
|
fallback: []
|
|
77
79
|
};
|
|
78
|
-
const rank = editorExperiment('contextual_formatting_toolbar', true) ? 5 : -9;
|
|
80
|
+
const rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
79
81
|
return {
|
|
80
82
|
rank,
|
|
81
83
|
isToolbarAbove: true,
|
|
@@ -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) ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
79
|
+
const title = editorExperiment('contextual_formatting_toolbar', true) || 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,
|
|
@@ -129,7 +129,7 @@ const FloatingToolbarHighlightColor = ({
|
|
|
129
129
|
}, jsx(ExpandIcon, {
|
|
130
130
|
label: ""
|
|
131
131
|
}))
|
|
132
|
-
}, editorExperiment('contextual_formatting_toolbar', false) && formatMessage(messages.highlightFloatingToolbar)),
|
|
132
|
+
}, editorExperiment('contextual_formatting_toolbar', false) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control') && formatMessage(messages.highlightFloatingToolbar)),
|
|
133
133
|
onColorChange: color => handleColorChange({
|
|
134
134
|
color,
|
|
135
135
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
@@ -70,6 +70,8 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
70
70
|
selectionToolbar: function selectionToolbar() {
|
|
71
71
|
if (!(options !== null && options !== void 0 && options.textHighlightingFloatingToolbarExperiment) && editorExperiment('contextual_formatting_toolbar', false, {
|
|
72
72
|
exposure: true
|
|
73
|
+
}) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control', {
|
|
74
|
+
exposure: true
|
|
73
75
|
})) {
|
|
74
76
|
return;
|
|
75
77
|
}
|
|
@@ -83,7 +85,7 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
83
85
|
},
|
|
84
86
|
fallback: []
|
|
85
87
|
};
|
|
86
|
-
var rank = editorExperiment('contextual_formatting_toolbar', true) ? 5 : -9;
|
|
88
|
+
var rank = editorExperiment('contextual_formatting_toolbar', true) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2') ? 5 : -9;
|
|
87
89
|
return {
|
|
88
90
|
rank: rank,
|
|
89
91
|
isToolbarAbove: true,
|
|
@@ -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) ? tooltip(toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
78
|
+
var title = editorExperiment('contextual_formatting_toolbar', true) || 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,
|
|
@@ -128,7 +128,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
128
128
|
}, jsx(ExpandIcon, {
|
|
129
129
|
label: ""
|
|
130
130
|
}))
|
|
131
|
-
}, editorExperiment('contextual_formatting_toolbar', false) && formatMessage(messages.highlightFloatingToolbar)),
|
|
131
|
+
}, editorExperiment('contextual_formatting_toolbar', false) && editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'control') && formatMessage(messages.highlightFloatingToolbar)),
|
|
132
132
|
onColorChange: function onColorChange(color) {
|
|
133
133
|
return handleColorChange({
|
|
134
134
|
color: color,
|
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.9",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
40
|
-
"@atlaskit/editor-common": "^
|
|
41
|
-
"@atlaskit/editor-palette": "1.6.
|
|
42
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
40
|
+
"@atlaskit/editor-common": "^99.5.0",
|
|
41
|
+
"@atlaskit/editor-palette": "1.6.4",
|
|
42
|
+
"@atlaskit/editor-plugin-analytics": "^1.11.0",
|
|
43
43
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
44
44
|
"@atlaskit/editor-plugin-text-formatting": "^1.16.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
46
46
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
47
47
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
48
|
-
"@atlaskit/icon": "^23.
|
|
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.
|
|
52
|
-
"@atlaskit/tokens": "^2.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^2.39.0",
|
|
52
|
+
"@atlaskit/tokens": "^3.2.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1"
|
|
55
55
|
},
|