@atlaskit/editor-plugin-text-color 15.1.2 → 15.1.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 +2 -2
- package/dist/cjs/ui/ColorAccessibilityMenuItem.js +6 -6
- package/dist/cjs/ui/RemoveColorMenuItem.js +9 -9
- package/dist/cjs/ui/TextColorHighlightMenu.js +2 -2
- package/dist/cjs/ui/TextColorMenuItem.js +4 -4
- package/dist/cjs/ui/TextMenuSection.js +3 -3
- package/dist/es2019/textColorPlugin.js +1 -1
- package/dist/es2019/ui/ColorAccessibilityMenuItem.js +2 -2
- package/dist/es2019/ui/RemoveColorMenuItem.js +2 -2
- package/dist/es2019/ui/TextColorHighlightMenu.js +1 -1
- package/dist/es2019/ui/TextColorMenuItem.js +2 -2
- package/dist/es2019/ui/TextMenuSection.js +1 -1
- package/dist/esm/textColorPlugin.js +1 -1
- package/dist/esm/ui/ColorAccessibilityMenuItem.js +2 -2
- package/dist/esm/ui/RemoveColorMenuItem.js +2 -2
- package/dist/esm/ui/TextColorHighlightMenu.js +1 -1
- package/dist/esm/ui/TextColorMenuItem.js +2 -2
- package/dist/esm/ui/TextMenuSection.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 15.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 15.1.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
|
|
14
|
+
VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
|
|
15
|
+
voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
|
|
16
|
+
changes.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 15.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.textColorPlugin = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
|
-
var
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
12
|
var _changeColor2 = require("./editor-commands/change-color");
|
|
13
13
|
var _palette = require("./editor-commands/palette");
|
|
@@ -117,7 +117,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
117
117
|
pluginsOptions: !isToolbarAIFCEnabled ? {
|
|
118
118
|
selectionToolbar: function selectionToolbar() {
|
|
119
119
|
var _api$userPreferences, _api$selectionToolbar;
|
|
120
|
-
var toolbarDocking = (0,
|
|
120
|
+
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) === null || _api$userPreferences === void 0 || (_api$userPreferences = _api$userPreferences.currentState()) === null || _api$userPreferences === void 0 ? void 0 : _api$userPreferences.preferences.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;
|
|
121
121
|
if (toolbarDocking === 'none' && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
122
122
|
exposure: true
|
|
123
123
|
})) {
|
|
@@ -11,7 +11,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _panel = require("@atlaskit/adf-schema/panel");
|
|
14
|
-
var
|
|
14
|
+
var _button = _interopRequireDefault(require("@atlaskit/button/icon/button"));
|
|
15
15
|
var _css = require("@atlaskit/css");
|
|
16
16
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
17
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
@@ -22,7 +22,7 @@ var _editorPalette = require("@atlaskit/editor-palette");
|
|
|
22
22
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
23
23
|
var _accessibility = _interopRequireDefault(require("@atlaskit/icon/core/accessibility"));
|
|
24
24
|
var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/core/question-circle"));
|
|
25
|
-
var
|
|
25
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
26
26
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
27
27
|
var _getTokenValue = require("@atlaskit/tokens/get-token-value");
|
|
28
28
|
var _colorContrast = require("../pm-plugins/utils/color-contrast");
|
|
@@ -322,7 +322,7 @@ var ColorAccessibilityMenuItem = exports.ColorAccessibilityMenuItem = function C
|
|
|
322
322
|
editorView = _useEditorToolbar.editorView;
|
|
323
323
|
var editorState = editorView === null || editorView === void 0 ? void 0 : editorView.state;
|
|
324
324
|
var accessibilityStatus = _react.default.useMemo(function () {
|
|
325
|
-
return editorState && (0,
|
|
325
|
+
return editorState && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? getAccessibilityStatusForCurrentSelection(editorState, defaultColor, highlightColor, textColor) : getAccessibilityStatusFromColorPair(defaultColor, getResolvedBackgroundFromHighlight(highlightColor), textColor);
|
|
326
326
|
}, [defaultColor, editorState, highlightColor, textColor]);
|
|
327
327
|
if (accessibilityStatus === null) {
|
|
328
328
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
@@ -337,14 +337,14 @@ var ColorAccessibilityMenuItem = exports.ColorAccessibilityMenuItem = function C
|
|
|
337
337
|
}
|
|
338
338
|
};
|
|
339
339
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
340
|
-
xcss: (0, _css.cx)(styles.container, (0,
|
|
340
|
+
xcss: (0, _css.cx)(styles.container, (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') && styles.containerPatch)
|
|
341
341
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
|
|
342
342
|
alignBlock: "center",
|
|
343
343
|
space: "space.050"
|
|
344
344
|
}, /*#__PURE__*/_react.default.createElement(_accessibility.default, {
|
|
345
345
|
label: "",
|
|
346
346
|
size: "medium",
|
|
347
|
-
color: (0,
|
|
347
|
+
color: (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? "var(--ds-icon-subtle, #505258)" : undefined
|
|
348
348
|
}), /*#__PURE__*/_react.default.createElement(_compiled.Text, {
|
|
349
349
|
as: "span",
|
|
350
350
|
size: "small",
|
|
@@ -357,7 +357,7 @@ var ColorAccessibilityMenuItem = exports.ColorAccessibilityMenuItem = function C
|
|
|
357
357
|
}, "\u2022"), /*#__PURE__*/_react.default.createElement(AccessibilityStatus, {
|
|
358
358
|
accessibilityStatus: accessibilityStatus,
|
|
359
359
|
formatMessage: formatMessage
|
|
360
|
-
})), /*#__PURE__*/_react.default.createElement(
|
|
360
|
+
})), /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
361
361
|
icon: _questionCircle.default,
|
|
362
362
|
shape: "circle",
|
|
363
363
|
label: tooltipContent(accessibilityStatus),
|
|
@@ -11,13 +11,13 @@ require("./RemoveColorMenuItem.compiled.css");
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _reactIntl = require("react-intl");
|
|
14
|
-
var
|
|
14
|
+
var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
|
|
15
15
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
16
16
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
17
17
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
18
18
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
19
19
|
var _colourNone = _interopRequireDefault(require("@atlaskit/icon-lab/core/colour-none"));
|
|
20
|
-
var
|
|
20
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
21
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
22
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
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); }
|
|
@@ -45,7 +45,7 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
45
45
|
api.core.actions.execute(function (_ref2) {
|
|
46
46
|
var _api$highlight;
|
|
47
47
|
var tr = _ref2.tr;
|
|
48
|
-
if (!(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) || !(0,
|
|
48
|
+
if (!(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) || !(0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_2')) {
|
|
49
49
|
api.textColor.commands.changeColor(defaultColor, (0, _toolbar.getInputMethodFromParentKeys)(parents))({
|
|
50
50
|
tr: tr
|
|
51
51
|
});
|
|
@@ -63,10 +63,10 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
66
|
-
if ((0,
|
|
66
|
+
if ((0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_2')) {
|
|
67
67
|
return /*#__PURE__*/React.createElement("div", {
|
|
68
68
|
className: (0, _runtime.ax)([styles.removeColorButton, styles.removeColorButtonPatch])
|
|
69
|
-
}, /*#__PURE__*/React.createElement(
|
|
69
|
+
}, /*#__PURE__*/React.createElement(_button.default, {
|
|
70
70
|
shouldFitContainer: true,
|
|
71
71
|
appearance: "subtle",
|
|
72
72
|
onClick: onClick
|
|
@@ -78,10 +78,10 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
78
78
|
}), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
79
79
|
color: "color.text.subtle"
|
|
80
80
|
}, formatMessage(_messages.highlightMessages.removeHighlight)))));
|
|
81
|
-
} else if ((0,
|
|
81
|
+
} else if ((0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
|
|
82
82
|
return /*#__PURE__*/React.createElement("div", {
|
|
83
83
|
className: (0, _runtime.ax)([styles.removeColorButton, styles.removeColorButtonPatch])
|
|
84
|
-
}, /*#__PURE__*/React.createElement(
|
|
84
|
+
}, /*#__PURE__*/React.createElement(_button.default, {
|
|
85
85
|
shouldFitContainer: true,
|
|
86
86
|
appearance: "subtle",
|
|
87
87
|
onClick: onClick
|
|
@@ -96,7 +96,7 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
96
96
|
}
|
|
97
97
|
return /*#__PURE__*/React.createElement("div", {
|
|
98
98
|
className: (0, _runtime.ax)([styles.removeColorButton])
|
|
99
|
-
}, /*#__PURE__*/React.createElement(
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_button.default, {
|
|
100
100
|
shouldFitContainer: true,
|
|
101
101
|
appearance: "subtle",
|
|
102
102
|
onClick: onClick
|
|
@@ -111,7 +111,7 @@ var RemoveColorMenuItem = exports.RemoveColorMenuItem = function RemoveColorMenu
|
|
|
111
111
|
}
|
|
112
112
|
return /*#__PURE__*/React.createElement("div", {
|
|
113
113
|
className: (0, _runtime.ax)([styles.removeColorButton])
|
|
114
|
-
}, /*#__PURE__*/React.createElement(
|
|
114
|
+
}, /*#__PURE__*/React.createElement(_button.default, {
|
|
115
115
|
shouldFitContainer: true,
|
|
116
116
|
appearance: "subtle",
|
|
117
117
|
onClick: onClick
|
|
@@ -15,7 +15,7 @@ var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-
|
|
|
15
15
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
16
16
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
17
17
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
18
|
-
var
|
|
18
|
+
var _conditionalHooksFactory = require("@atlaskit/platform-feature-flags-react/conditional-hooks-factory");
|
|
19
19
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
20
|
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
21
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
@@ -63,7 +63,7 @@ var useTextColorHighlightMenuStateOld = function useTextColorHighlightMenuStateO
|
|
|
63
63
|
highlightColor: highlightColor
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
var useTextColorHighlightMenuState = (0,
|
|
66
|
+
var useTextColorHighlightMenuState = (0, _conditionalHooksFactory.conditionalHooksFactory)(function () {
|
|
67
67
|
return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_default_toolbar_state');
|
|
68
68
|
}, useTextColorHighlightMenuStateNew, useTextColorHighlightMenuStateOld);
|
|
69
69
|
var TextColorHighlightMenu = exports.TextColorHighlightMenu = function TextColorHighlightMenu(_ref) {
|
|
@@ -17,8 +17,8 @@ var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
|
17
17
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
18
18
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
19
19
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
20
|
-
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
21
|
-
var
|
|
20
|
+
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
21
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
22
22
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
23
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
24
|
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); }
|
|
@@ -61,7 +61,7 @@ function TextColorMenuItem(_ref) {
|
|
|
61
61
|
}, [editorView === null || editorView === void 0 ? void 0 : editorView.state, editorView === null || editorView === void 0 ? void 0 : editorView.dispatch, api === null || api === void 0 ? void 0 : api.textColor.actions, parents, closeMenu, isNewColorPaletteEnabled]);
|
|
62
62
|
var colorPalette = /*#__PURE__*/_react.default.createElement(_editorToolbar.ColorPalette, {
|
|
63
63
|
cols: isNewColorPaletteEnabled ? TEXT_COLOR_PICKER_COLUMNS : undefined,
|
|
64
|
-
gap: isNewColorPaletteEnabled && (0,
|
|
64
|
+
gap: isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? 'space.0' : undefined
|
|
65
65
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
66
66
|
,
|
|
67
67
|
onClick: function onClick(color, _, event) {
|
|
@@ -81,7 +81,7 @@ function TextColorMenuItem(_ref) {
|
|
|
81
81
|
testId: "text-color-menu-item"
|
|
82
82
|
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
83
83
|
size: "xxsmall"
|
|
84
|
-
}, formatMessage(_messages.textColorMessages.textColorTooltip)), isNewColorPaletteEnabled && (0,
|
|
84
|
+
}, formatMessage(_messages.textColorMessages.textColorTooltip)), isNewColorPaletteEnabled && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? /*#__PURE__*/_react.default.createElement(_compiled.Bleed, {
|
|
85
85
|
inline: "space.025"
|
|
86
86
|
}, colorPalette) : colorPalette);
|
|
87
87
|
}
|
|
@@ -11,7 +11,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
13
13
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
14
|
-
var
|
|
14
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
17
|
var styles = {
|
|
@@ -25,14 +25,14 @@ var TextMenuSection = exports.TextMenuSection = function TextMenuSection(_ref) {
|
|
|
25
25
|
return parent.key === _toolbar.TEXT_COLLAPSED_MENU.key;
|
|
26
26
|
});
|
|
27
27
|
var onMouseDown = function onMouseDown(event) {
|
|
28
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0,
|
|
28
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1')) {
|
|
29
29
|
event.stopPropagation();
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarDropdownItemSection, {
|
|
33
33
|
hasSeparator: hasSeparator
|
|
34
34
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
35
|
-
xcss: (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0,
|
|
35
|
+
xcss: (0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && (0, _fg.fg)('platform_editor_lovability_text_bg_color_patch_1') ? styles.menu : styles.menuOld,
|
|
36
36
|
onMouseDown: onMouseDown
|
|
37
37
|
}, children));
|
|
38
38
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { textColor } from '@atlaskit/adf-schema';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
5
|
import { changeColor as changeColorCommand } from './editor-commands/change-color';
|
|
6
6
|
import { setPalette } from './editor-commands/palette';
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
7
|
-
import
|
|
7
|
+
import IconButton from '@atlaskit/button/icon/button';
|
|
8
8
|
import { cx } from '@atlaskit/css';
|
|
9
9
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { colorAccessibilityMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -15,7 +15,7 @@ import { hexToEditorBackgroundPaletteColor, hexToEditorTextBackgroundPaletteColo
|
|
|
15
15
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
16
|
import AccessibilityIcon from '@atlaskit/icon/core/accessibility';
|
|
17
17
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
19
|
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
20
20
|
import { getTokenValue } from '@atlaskit/tokens/get-token-value';
|
|
21
21
|
import { getContrastRatio as calcContrastRatio } from '../pm-plugins/utils/color-contrast';
|
|
@@ -3,13 +3,13 @@ import "./RemoveColorMenuItem.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import Button from '@atlaskit/button/
|
|
6
|
+
import Button from '@atlaskit/button/default/button';
|
|
7
7
|
import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
9
9
|
import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
13
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
const styles = {
|
|
@@ -8,7 +8,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
8
8
|
import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
9
9
|
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
|
-
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react';
|
|
11
|
+
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react/conditional-hooks-factory';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
13
|
const getIconColor = (textColor, defaultColor, highlightColor) => {
|
|
14
14
|
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
@@ -9,8 +9,8 @@ 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';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import Heading from '@atlaskit/heading/heading';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
14
|
import { Bleed, Stack } from '@atlaskit/primitives/compiled';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
const TEXT_COLOR_PICKER_COLUMNS = 10;
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar';
|
|
6
6
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
const styles = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { textColor } from '@atlaskit/adf-schema';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
5
|
import { changeColor as changeColorCommand } from './editor-commands/change-color';
|
|
6
6
|
import { setPalette as _setPalette } from './editor-commands/palette';
|
|
@@ -7,7 +7,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
9
|
import { PanelType } from '@atlaskit/adf-schema/panel';
|
|
10
|
-
import
|
|
10
|
+
import IconButton from '@atlaskit/button/icon/button';
|
|
11
11
|
import { cx } from '@atlaskit/css';
|
|
12
12
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
13
13
|
import { colorAccessibilityMessages as messages } from '@atlaskit/editor-common/messages';
|
|
@@ -18,7 +18,7 @@ import { hexToEditorBackgroundPaletteColor, hexToEditorTextBackgroundPaletteColo
|
|
|
18
18
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
19
19
|
import AccessibilityIcon from '@atlaskit/icon/core/accessibility';
|
|
20
20
|
import QuestionCircleIcon from '@atlaskit/icon/core/question-circle';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
|
|
23
23
|
import { getTokenValue } from '@atlaskit/tokens/get-token-value';
|
|
24
24
|
import { getContrastRatio as calcContrastRatio } from '../pm-plugins/utils/color-contrast';
|
|
@@ -3,13 +3,13 @@ import "./RemoveColorMenuItem.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import Button from '@atlaskit/button/
|
|
6
|
+
import Button from '@atlaskit/button/default/button';
|
|
7
7
|
import { highlightMessages as messages } from '@atlaskit/editor-common/messages';
|
|
8
8
|
import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
9
9
|
import { REMOVE_HIGHLIGHT_COLOR } from '@atlaskit/editor-common/ui-color';
|
|
10
10
|
import { useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
11
11
|
import ColourNoneIcon from '@atlaskit/icon-lab/core/colour-none';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
13
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
var styles = {
|
|
@@ -8,7 +8,7 @@ import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared
|
|
|
8
8
|
import { hexToEditorTextPaletteColor, hexToEditorTextBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
9
9
|
import { TextColorIcon, ToolbarColorSwatch, ToolbarDropdownMenu, ToolbarDropdownMenuProvider, ToolbarTooltip, useToolbarUI } from '@atlaskit/editor-toolbar';
|
|
10
10
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
11
|
-
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react';
|
|
11
|
+
import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react/conditional-hooks-factory';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
13
|
var getIconColor = function getIconColor(textColor, defaultColor, highlightColor) {
|
|
14
14
|
if (expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true)) {
|
|
@@ -9,8 +9,8 @@ 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';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import Heading from '@atlaskit/heading/heading';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
14
|
import { Bleed, Stack } from '@atlaskit/primitives/compiled';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
var TEXT_COLOR_PICKER_COLUMNS = 10;
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { TEXT_COLLAPSED_MENU } from '@atlaskit/editor-common/toolbar';
|
|
6
6
|
import { ToolbarDropdownItemSection } from '@atlaskit/editor-toolbar';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
10
|
var styles = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.4",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
44
44
|
"@atlaskit/primitives": "^22.4.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^160.0.0",
|
|
46
46
|
"@atlaskit/tokens": "^16.8.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1"
|