@atlaskit/editor-plugin-text-color 4.0.2 → 4.0.4
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/textColorPlugin.js +3 -2
- package/dist/cjs/ui/TextColorMenuItem.js +6 -1
- package/dist/es2019/textColorPlugin.js +3 -2
- package/dist/es2019/ui/TextColorMenuItem.js +5 -1
- package/dist/esm/textColorPlugin.js +3 -2
- package/dist/esm/ui/TextColorMenuItem.js +5 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 4.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`555ac8f256674`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/555ac8f256674) -
|
|
8
|
+
Update menu item icon size to small, tweak paddings and font styles
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`db97eb262cc5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/db97eb262cc5a) -
|
|
16
|
+
replace platform_editor_toolbar_aifc with separate experiements for jira and confluence
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.0.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -8,7 +8,6 @@ exports.textColorPlugin = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
12
|
var _changeColor2 = require("./pm-plugins/commands/change-color");
|
|
14
13
|
var _main = require("./pm-plugins/main");
|
|
@@ -24,7 +23,9 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
24
23
|
var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
25
24
|
var textColorConfig = _ref.config,
|
|
26
25
|
api = _ref.api;
|
|
27
|
-
var isToolbarAifcEnabled = (0,
|
|
26
|
+
var isToolbarAifcEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
27
|
+
exposure: true
|
|
28
|
+
});
|
|
28
29
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
29
30
|
var editorView = _ref2.editorView,
|
|
30
31
|
popupsMountPoint = _ref2.popupsMountPoint,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* TextColorMenuItem.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
@@ -16,7 +17,9 @@ var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
|
16
17
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
17
18
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
18
19
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
20
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
19
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
23
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
21
24
|
var styles = {
|
|
22
25
|
container: "_zulp12x7"
|
|
@@ -60,7 +63,9 @@ function TextColorMenuItem(_ref) {
|
|
|
60
63
|
return /*#__PURE__*/_react.default.createElement(_compiled.Stack, {
|
|
61
64
|
xcss: styles.container,
|
|
62
65
|
testId: "text-color-menu-item"
|
|
63
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
66
|
+
}, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
67
|
+
size: "xxsmall"
|
|
68
|
+
}, formatMessage(_messages.textColorMessages.textColorTooltip)) : /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
64
69
|
weight: "bold"
|
|
65
70
|
}, formatMessage(_messages.textColorMessages.textColorTooltip)), /*#__PURE__*/_react.default.createElement(_editorToolbar.ColorPalette, {
|
|
66
71
|
onClick: function onClick(color) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { textColor } from '@atlaskit/adf-schema';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { changeColor } from './pm-plugins/commands/change-color';
|
|
7
6
|
import { createPlugin, pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
@@ -18,7 +17,9 @@ export const textColorPlugin = ({
|
|
|
18
17
|
config: textColorConfig,
|
|
19
18
|
api
|
|
20
19
|
}) => {
|
|
21
|
-
const isToolbarAifcEnabled =
|
|
20
|
+
const isToolbarAifcEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
21
|
+
exposure: true
|
|
22
|
+
});
|
|
22
23
|
const primaryToolbarComponent = ({
|
|
23
24
|
editorView,
|
|
24
25
|
popupsMountPoint,
|
|
@@ -9,7 +9,9 @@ import { getInputMethodFromParentKeys, useEditorToolbar } from '@atlaskit/editor
|
|
|
9
9
|
import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
11
11
|
import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
12
|
+
import Heading from '@atlaskit/heading';
|
|
12
13
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
15
|
const styles = {
|
|
14
16
|
container: "_zulp12x7"
|
|
15
17
|
};
|
|
@@ -57,7 +59,9 @@ export function TextColorMenuItem({
|
|
|
57
59
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
58
60
|
xcss: styles.container,
|
|
59
61
|
testId: "text-color-menu-item"
|
|
60
|
-
}, /*#__PURE__*/React.createElement(
|
|
62
|
+
}, expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Heading, {
|
|
63
|
+
size: "xxsmall"
|
|
64
|
+
}, formatMessage(messages.textColorTooltip)) : /*#__PURE__*/React.createElement(Text, {
|
|
61
65
|
weight: "bold"
|
|
62
66
|
}, formatMessage(messages.textColorTooltip)), /*#__PURE__*/React.createElement(ColorPalette, {
|
|
63
67
|
onClick: color => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { textColor } from '@atlaskit/adf-schema';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
5
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
5
|
import { changeColor as _changeColor } from './pm-plugins/commands/change-color';
|
|
7
6
|
import { createPlugin, pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
@@ -17,7 +16,9 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
17
16
|
export var textColorPlugin = function textColorPlugin(_ref) {
|
|
18
17
|
var textColorConfig = _ref.config,
|
|
19
18
|
api = _ref.api;
|
|
20
|
-
var isToolbarAifcEnabled =
|
|
19
|
+
var isToolbarAifcEnabled = editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
20
|
+
exposure: true
|
|
21
|
+
});
|
|
21
22
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
22
23
|
var editorView = _ref2.editorView,
|
|
23
24
|
popupsMountPoint = _ref2.popupsMountPoint,
|
|
@@ -9,7 +9,9 @@ import { getInputMethodFromParentKeys, useEditorToolbar } from '@atlaskit/editor
|
|
|
9
9
|
import { textPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { hexToEditorTextPaletteColor } from '@atlaskit/editor-palette';
|
|
11
11
|
import { ColorPalette, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
12
|
+
import Heading from '@atlaskit/heading';
|
|
12
13
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
15
|
var styles = {
|
|
14
16
|
container: "_zulp12x7"
|
|
15
17
|
};
|
|
@@ -52,7 +54,9 @@ export function TextColorMenuItem(_ref) {
|
|
|
52
54
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
53
55
|
xcss: styles.container,
|
|
54
56
|
testId: "text-color-menu-item"
|
|
55
|
-
}, /*#__PURE__*/React.createElement(
|
|
57
|
+
}, expValEquals('platform_editor_toolbar_aifc_patch_2', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Heading, {
|
|
58
|
+
size: "xxsmall"
|
|
59
|
+
}, formatMessage(messages.textColorTooltip)) : /*#__PURE__*/React.createElement(Text, {
|
|
56
60
|
weight: "bold"
|
|
57
61
|
}, formatMessage(messages.textColorTooltip)), /*#__PURE__*/React.createElement(ColorPalette, {
|
|
58
62
|
onClick: function onClick(color) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,17 +42,18 @@
|
|
|
42
42
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
43
43
|
"@atlaskit/editor-toolbar": "^0.8.0",
|
|
44
44
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
45
|
+
"@atlaskit/heading": "^5.2.0",
|
|
45
46
|
"@atlaskit/icon": "^28.1.0",
|
|
46
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
48
|
"@atlaskit/primitives": "^14.13.0",
|
|
48
49
|
"@atlaskit/theme": "^20.0.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^12.5.0",
|
|
50
51
|
"@atlaskit/tokens": "^6.2.0",
|
|
51
52
|
"@babel/runtime": "^7.0.0",
|
|
52
53
|
"@emotion/react": "^11.7.1"
|
|
53
54
|
},
|
|
54
55
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^108.
|
|
56
|
+
"@atlaskit/editor-common": "^108.5.0",
|
|
56
57
|
"react": "^18.2.0",
|
|
57
58
|
"react-dom": "^18.2.0",
|
|
58
59
|
"react-intl-next": "npm:react-intl@^5.18.1"
|