@atlaskit/editor-plugin-highlight 2.3.0 → 2.4.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 +17 -0
- package/dist/cjs/highlightPlugin.js +1 -1
- package/dist/cjs/ui/PrimaryToolbarHighlightColor.js +3 -3
- package/dist/cjs/ui/shared/EditorHighlightIcon.js +2 -2
- package/dist/es2019/highlightPlugin.js +1 -1
- package/dist/es2019/ui/PrimaryToolbarHighlightColor.js +1 -1
- package/dist/es2019/ui/shared/EditorHighlightIcon.js +1 -1
- package/dist/esm/highlightPlugin.js +1 -1
- package/dist/esm/ui/PrimaryToolbarHighlightColor.js +1 -1
- package/dist/esm/ui/shared/EditorHighlightIcon.js +1 -1
- package/dist/types/highlightPluginType.d.ts +0 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/highlightPluginType.d.ts +0 -4
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-highlight
|
|
2
2
|
|
|
3
|
+
## 2.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#144636](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144636)
|
|
8
|
+
[`b13ed93531996`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b13ed93531996) -
|
|
9
|
+
Clean-up unused text highlight floating toolbar configuration
|
|
10
|
+
|
|
11
|
+
## 2.3.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#142352](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142352)
|
|
16
|
+
[`05903fde6d94d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/05903fde6d94d) -
|
|
17
|
+
Internal change to use Compiled variant of `@atlaskit/primitives`.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 2.3.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -76,7 +76,7 @@ var highlightPlugin = exports.highlightPlugin = function highlightPlugin(_ref) {
|
|
|
76
76
|
pluginsOptions: {
|
|
77
77
|
selectionToolbar: function selectionToolbar() {
|
|
78
78
|
var _api$selectionToolbar;
|
|
79
|
-
if (
|
|
79
|
+
if ((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) === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
80
80
|
exposure: true
|
|
81
81
|
})) {
|
|
82
82
|
var toolbarCustom = {
|
|
@@ -19,7 +19,7 @@ var _editorPalette = require("@atlaskit/editor-palette");
|
|
|
19
19
|
var _highlight = _interopRequireDefault(require("@atlaskit/icon/core/highlight"));
|
|
20
20
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
|
-
var
|
|
22
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
23
|
var _palette = require("../editor-commands/palette");
|
|
24
24
|
var _EditorHighlightIcon = require("./shared/EditorHighlightIcon");
|
|
25
25
|
var _PaletteDropdown = require("./shared/PaletteDropdown");
|
|
@@ -78,7 +78,7 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
|
|
|
78
78
|
// Get the design token for the active color (if it exists) to modify the toolbar
|
|
79
79
|
// icon, but show the nice rainbow if none is selected
|
|
80
80
|
var activeColorToken = highlightState.activeColor === null ? null : (0, _editorPalette.hexToEditorTextBackgroundPaletteColor)(highlightState.activeColor);
|
|
81
|
-
return (0, _react2.jsx)(
|
|
81
|
+
return (0, _react2.jsx)(_compiled.Flex, {
|
|
82
82
|
alignItems: "center"
|
|
83
83
|
}, (0, _react2.jsx)(_PaletteDropdown.PaletteDropdown, {
|
|
84
84
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -123,7 +123,7 @@ var PrimaryToolbarHighlightColor = function PrimaryToolbarHighlightColor(_ref) {
|
|
|
123
123
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
124
124
|
label: "",
|
|
125
125
|
color: "currentColor"
|
|
126
|
-
}))) : (0, _react2.jsx)(
|
|
126
|
+
}))) : (0, _react2.jsx)(_compiled.Flex, null, (0, _react2.jsx)(_EditorHighlightIcon.EditorHighlightIcon, {
|
|
127
127
|
selectedColor: activeColorToken,
|
|
128
128
|
disabled: highlightState.disabled
|
|
129
129
|
}), (0, _react2.jsx)("span", {
|
|
@@ -8,11 +8,11 @@ exports.EditorHighlightIcon = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _icons = require("@atlaskit/editor-common/icons");
|
|
10
10
|
var _editEditFilled = _interopRequireDefault(require("@atlaskit/icon/core/migration/edit--edit-filled"));
|
|
11
|
-
var
|
|
11
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
12
12
|
var EditorHighlightIcon = exports.EditorHighlightIcon = function EditorHighlightIcon(_ref) {
|
|
13
13
|
var disabled = _ref.disabled,
|
|
14
14
|
selectedColor = _ref.selectedColor;
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
16
16
|
paddingInline: "space.050"
|
|
17
17
|
}, /*#__PURE__*/_react.default.createElement(_icons.SteppedRainbowIconDecoration, {
|
|
18
18
|
selectedColor: selectedColor,
|
|
@@ -65,7 +65,7 @@ export const highlightPlugin = ({
|
|
|
65
65
|
pluginsOptions: {
|
|
66
66
|
selectionToolbar() {
|
|
67
67
|
var _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
68
|
-
if (
|
|
68
|
+
if ((api === null || api === void 0 ? void 0 : (_api$selectionToolbar = api.selectionToolbar) === null || _api$selectionToolbar === void 0 ? void 0 : (_api$selectionToolbar2 = _api$selectionToolbar.sharedState) === null || _api$selectionToolbar2 === void 0 ? void 0 : (_api$selectionToolbar3 = _api$selectionToolbar2.currentState()) === null || _api$selectionToolbar3 === void 0 ? void 0 : _api$selectionToolbar3.toolbarDocking) === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
69
69
|
exposure: true
|
|
70
70
|
})) {
|
|
71
71
|
const toolbarCustom = {
|
|
@@ -18,7 +18,7 @@ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette'
|
|
|
18
18
|
import HighlightIcon from '@atlaskit/icon/core/highlight';
|
|
19
19
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
20
20
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
-
import { Flex } from '@atlaskit/primitives';
|
|
21
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
22
22
|
import { setPalette } from '../editor-commands/palette';
|
|
23
23
|
import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
|
|
24
24
|
import { PaletteDropdown } from './shared/PaletteDropdown';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons';
|
|
3
3
|
import EditFilledIcon from '@atlaskit/icon/core/migration/edit--edit-filled';
|
|
4
|
-
import { Box } from '@atlaskit/primitives';
|
|
4
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
5
|
export const EditorHighlightIcon = ({
|
|
6
6
|
disabled,
|
|
7
7
|
selectedColor
|
|
@@ -69,7 +69,7 @@ export var highlightPlugin = function highlightPlugin(_ref) {
|
|
|
69
69
|
pluginsOptions: {
|
|
70
70
|
selectionToolbar: function selectionToolbar() {
|
|
71
71
|
var _api$selectionToolbar;
|
|
72
|
-
if (
|
|
72
|
+
if ((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) === 'none' && editorExperiment('platform_editor_controls', 'variant1', {
|
|
73
73
|
exposure: true
|
|
74
74
|
})) {
|
|
75
75
|
var toolbarCustom = {
|
|
@@ -18,7 +18,7 @@ import { hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette'
|
|
|
18
18
|
import HighlightIcon from '@atlaskit/icon/core/highlight';
|
|
19
19
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
20
20
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
-
import { Flex } from '@atlaskit/primitives';
|
|
21
|
+
import { Flex } from '@atlaskit/primitives/compiled';
|
|
22
22
|
import { setPalette } from '../editor-commands/palette';
|
|
23
23
|
import { EditorHighlightIcon } from './shared/EditorHighlightIcon';
|
|
24
24
|
import { PaletteDropdown } from './shared/PaletteDropdown';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SteppedRainbowIconDecoration } from '@atlaskit/editor-common/icons';
|
|
3
3
|
import EditFilledIcon from '@atlaskit/icon/core/migration/edit--edit-filled';
|
|
4
|
-
import { Box } from '@atlaskit/primitives';
|
|
4
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
5
|
export var EditorHighlightIcon = function EditorHighlightIcon(_ref) {
|
|
6
6
|
var disabled = _ref.disabled,
|
|
7
7
|
selectedColor = _ref.selectedColor;
|
|
@@ -5,11 +5,7 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
|
|
|
5
5
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
6
6
|
import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
7
7
|
import type { HighlightPluginState } from './pm-plugins/main';
|
|
8
|
-
export type HighlightPluginOptions = {
|
|
9
|
-
textHighlightingFloatingToolbarExperiment?: boolean;
|
|
10
|
-
};
|
|
11
8
|
export type HighlightPlugin = NextEditorPlugin<'highlight', {
|
|
12
|
-
pluginConfiguration?: HighlightPluginOptions;
|
|
13
9
|
dependencies: [
|
|
14
10
|
OptionalPlugin<AnalyticsPlugin>,
|
|
15
11
|
OptionalPlugin<TextFormattingPlugin>,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -5,11 +5,7 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
|
|
|
5
5
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
6
6
|
import type { TextFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
7
7
|
import type { HighlightPluginState } from './pm-plugins/main';
|
|
8
|
-
export type HighlightPluginOptions = {
|
|
9
|
-
textHighlightingFloatingToolbarExperiment?: boolean;
|
|
10
|
-
};
|
|
11
8
|
export type HighlightPlugin = NextEditorPlugin<'highlight', {
|
|
12
|
-
pluginConfiguration?: HighlightPluginOptions;
|
|
13
9
|
dependencies: [
|
|
14
10
|
OptionalPlugin<AnalyticsPlugin>,
|
|
15
11
|
OptionalPlugin<TextFormattingPlugin>,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-highlight",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
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": "^103.
|
|
40
|
+
"@atlaskit/editor-common": "^103.15.0",
|
|
41
41
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
42
42
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
43
43
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
44
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
|
44
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.5.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": "^25.
|
|
49
|
+
"@atlaskit/icon": "^25.6.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/primitives": "^14.4.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
53
|
-
"@atlaskit/tokens": "^4.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^4.13.0",
|
|
53
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1"
|
|
56
56
|
},
|