@atlaskit/editor-plugin-highlight 16.0.6 → 16.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 +12 -0
- package/dist/cjs/highlightPlugin.js +3 -3
- package/dist/cjs/ui/FloatingToolbarHighlightColor.js +4 -4
- package/dist/es2019/highlightPlugin.js +1 -1
- package/dist/es2019/ui/FloatingToolbarHighlightColor.js +1 -1
- package/dist/esm/highlightPlugin.js +1 -1
- package/dist/esm/ui/FloatingToolbarHighlightColor.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -11,7 +11,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
11
11
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
12
12
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
|
-
var
|
|
14
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
15
15
|
var _changeColor = require("./editor-commands/change-color");
|
|
16
16
|
var _highlightPadding = require("./pm-plugins/highlight-padding");
|
|
17
17
|
var _keymap = require("./pm-plugins/keymap");
|
|
@@ -107,7 +107,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
107
107
|
selectionToolbar: function selectionToolbar() {
|
|
108
108
|
var _api$userPreferences, _api$selectionToolbar;
|
|
109
109
|
var toolbarDocking = (0, _fg.fg)('platform_editor_use_preferences_plugin') ? api === null || api === void 0 || (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.sharedState.currentState()) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.preferences) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.toolbarDockingPosition : api === null || api === void 0 || (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar === void 0 || (_api$selectionToolbar = _api$selectionToolbar.currentState()) === null || _api$selectionToolbar === void 0 ? void 0 : _api$selectionToolbar.toolbarDocking;
|
|
110
|
-
if (toolbarDocking === 'none' && (0,
|
|
110
|
+
if (toolbarDocking === 'none' && (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
111
111
|
exposure: true
|
|
112
112
|
})) {
|
|
113
113
|
var toolbarCustom = {
|
|
@@ -121,7 +121,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
121
121
|
},
|
|
122
122
|
fallback: []
|
|
123
123
|
};
|
|
124
|
-
var rank = (0,
|
|
124
|
+
var rank = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? 5 : -9;
|
|
125
125
|
return {
|
|
126
126
|
rank: rank,
|
|
127
127
|
isToolbarAbove: true,
|
|
@@ -18,7 +18,7 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
18
18
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
19
19
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
20
20
|
var _highlight = _interopRequireDefault(require("@atlaskit/icon/core/highlight"));
|
|
21
|
-
var
|
|
21
|
+
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
22
22
|
var _palette = require("../editor-commands/palette");
|
|
23
23
|
var _PaletteDropdown = require("./shared/PaletteDropdown");
|
|
24
24
|
var _useDropdownEvents2 = require("./shared/useDropdownEvents");
|
|
@@ -89,7 +89,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
89
89
|
// Get the design token for the active color (if it exists) to modify the toolbar
|
|
90
90
|
// icon, but show the nice rainbow if none is selected
|
|
91
91
|
var activeColorToken = activeColor === null ? null : (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(activeColor);
|
|
92
|
-
var title = (0,
|
|
92
|
+
var title = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? (0, _keymaps.tooltip)(_keymaps.toggleHighlightPalette, toolbarButtonLabel) : toolbarButtonLabel;
|
|
93
93
|
return (0, _react2.jsx)(_PaletteDropdown.PaletteDropdown, {
|
|
94
94
|
isOpen: isDropdownOpen && !disabled,
|
|
95
95
|
activeColor: activeColor,
|
|
@@ -98,7 +98,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
98
98
|
, {
|
|
99
99
|
css: _styles.disableBlueBorderStyles,
|
|
100
100
|
buttonId: _uiMenu.TOOLBAR_BUTTON.BACKGROUND_COLOR,
|
|
101
|
-
spacing: (0,
|
|
101
|
+
spacing: (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : 'compact',
|
|
102
102
|
disabled: disabled,
|
|
103
103
|
selected: isDropdownOpen,
|
|
104
104
|
"aria-label": title,
|
|
@@ -130,7 +130,7 @@ var FloatingToolbarHighlightColor = function FloatingToolbarHighlightColor(_ref)
|
|
|
130
130
|
color: "currentColor",
|
|
131
131
|
size: "small"
|
|
132
132
|
})))
|
|
133
|
-
}, (0,
|
|
133
|
+
}, (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'control') && formatMessage(_messages.highlightMessages.highlightFloatingToolbar))
|
|
134
134
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
135
135
|
,
|
|
136
136
|
onColorChange: function onColorChange(color) {
|
|
@@ -3,7 +3,7 @@ import { backgroundColor } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
6
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
7
|
import { changeColor } from './editor-commands/change-color';
|
|
8
8
|
import { createHighlightPaddingPlugin } from './pm-plugins/highlight-padding';
|
|
9
9
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
@@ -16,7 +16,7 @@ import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
|
16
16
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
17
17
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
18
18
|
import HighlightIcon from '@atlaskit/icon/core/highlight';
|
|
19
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
19
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
20
20
|
import { setPalette } from '../editor-commands/palette';
|
|
21
21
|
import { PaletteDropdown } from './shared/PaletteDropdown';
|
|
22
22
|
import { useDropdownEvents } from './shared/useDropdownEvents';
|
|
@@ -6,7 +6,7 @@ import { backgroundColor } from '@atlaskit/adf-schema';
|
|
|
6
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
10
|
import { changeColor } from './editor-commands/change-color';
|
|
11
11
|
import { createHighlightPaddingPlugin } from './pm-plugins/highlight-padding';
|
|
12
12
|
import { keymapPlugin } from './pm-plugins/keymap';
|
|
@@ -16,7 +16,7 @@ import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
|
16
16
|
import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
17
17
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
18
18
|
import HighlightIcon from '@atlaskit/icon/core/highlight';
|
|
19
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/
|
|
19
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
20
20
|
import { setPalette } from '../editor-commands/palette';
|
|
21
21
|
import { PaletteDropdown } from './shared/PaletteDropdown';
|
|
22
22
|
import { useDropdownEvents } from './shared/useDropdownEvents';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.8",
|
|
4
4
|
"description": "Highlight plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
44
44
|
"@atlaskit/primitives": "^22.4.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
-
"@atlaskit/tokens": "^16.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^168.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^16.9.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^120.
|
|
51
|
+
"@atlaskit/editor-common": "^120.7.0",
|
|
52
52
|
"react": "^18.2.0 || ^19.2.0",
|
|
53
53
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
54
54
|
},
|