@atlaskit/editor-plugin-text-color 4.0.4 → 4.0.6
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
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 4.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c0113eeccb2df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0113eeccb2df) -
|
|
8
|
+
[ux] ED-29120 add a new config option for default editor preset
|
|
9
|
+
(`toolbar.enableNewToolbarExperience`) which allows the new toolbar to be disabled. This is needed
|
|
10
|
+
for editors that can't be excluded at the experiment level.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 4.0.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.0.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -23,7 +23,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
23
23
|
var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
24
24
|
var textColorConfig = _ref.config,
|
|
25
25
|
api = _ref.api;
|
|
26
|
-
var
|
|
26
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true, {
|
|
27
27
|
exposure: true
|
|
28
28
|
});
|
|
29
29
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
@@ -45,7 +45,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
45
45
|
api: api
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
-
if (
|
|
48
|
+
if (isToolbarAIFCEnabled) {
|
|
49
49
|
var _api$toolbar;
|
|
50
50
|
if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents) {
|
|
51
51
|
api.toolbar.actions.registerComponents((0, _toolbarComponents.getToolbarComponents)(api));
|
|
@@ -86,7 +86,7 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
86
86
|
return (0, _changeColor2.changeColor)(color, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, inputMethod);
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
|
-
pluginsOptions: !
|
|
89
|
+
pluginsOptions: !isToolbarAIFCEnabled ? {
|
|
90
90
|
selectionToolbar: function selectionToolbar() {
|
|
91
91
|
var _api$userPreferences, _api$selectionToolbar;
|
|
92
92
|
var toolbarDocking = (0, _platformFeatureFlags.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;
|
|
@@ -17,7 +17,7 @@ export const textColorPlugin = ({
|
|
|
17
17
|
config: textColorConfig,
|
|
18
18
|
api
|
|
19
19
|
}) => {
|
|
20
|
-
const
|
|
20
|
+
const isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
21
21
|
exposure: true
|
|
22
22
|
});
|
|
23
23
|
const primaryToolbarComponent = ({
|
|
@@ -40,7 +40,7 @@ export const textColorPlugin = ({
|
|
|
40
40
|
api: api
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
if (
|
|
43
|
+
if (isToolbarAIFCEnabled) {
|
|
44
44
|
var _api$toolbar;
|
|
45
45
|
if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents) {
|
|
46
46
|
api.toolbar.actions.registerComponents(getToolbarComponents(api));
|
|
@@ -80,7 +80,7 @@ export const textColorPlugin = ({
|
|
|
80
80
|
return changeColor(color, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, inputMethod);
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
pluginsOptions: !
|
|
83
|
+
pluginsOptions: !isToolbarAIFCEnabled ? {
|
|
84
84
|
selectionToolbar: () => {
|
|
85
85
|
var _api$userPreferences, _api$userPreferences$, _api$userPreferences$2, _api$selectionToolbar, _api$selectionToolbar2, _api$selectionToolbar3;
|
|
86
86
|
const toolbarDocking = fg('platform_editor_use_preferences_plugin') ? api === null || api === void 0 ? void 0 : (_api$userPreferences = api.userPreferences) === null || _api$userPreferences === void 0 ? void 0 : (_api$userPreferences$ = _api$userPreferences.sharedState) === null || _api$userPreferences$ === void 0 ? void 0 : (_api$userPreferences$2 = _api$userPreferences$.currentState()) === null || _api$userPreferences$2 === void 0 ? void 0 : _api$userPreferences$2.preferences.toolbarDockingPosition : 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;
|
|
@@ -16,7 +16,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
16
16
|
export var textColorPlugin = function textColorPlugin(_ref) {
|
|
17
17
|
var textColorConfig = _ref.config,
|
|
18
18
|
api = _ref.api;
|
|
19
|
-
var
|
|
19
|
+
var isToolbarAIFCEnabled = Boolean(api === null || api === void 0 ? void 0 : api.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true, {
|
|
20
20
|
exposure: true
|
|
21
21
|
});
|
|
22
22
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
@@ -38,7 +38,7 @@ export var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
38
38
|
api: api
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
|
-
if (
|
|
41
|
+
if (isToolbarAIFCEnabled) {
|
|
42
42
|
var _api$toolbar;
|
|
43
43
|
if (api !== null && api !== void 0 && (_api$toolbar = api.toolbar) !== null && _api$toolbar !== void 0 && _api$toolbar.actions.registerComponents) {
|
|
44
44
|
api.toolbar.actions.registerComponents(getToolbarComponents(api));
|
|
@@ -79,7 +79,7 @@ export var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
79
79
|
return _changeColor(color, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, inputMethod);
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
|
-
pluginsOptions: !
|
|
82
|
+
pluginsOptions: !isToolbarAIFCEnabled ? {
|
|
83
83
|
selectionToolbar: function selectionToolbar() {
|
|
84
84
|
var _api$userPreferences, _api$selectionToolbar;
|
|
85
85
|
var toolbarDocking = 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;
|
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.6",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^50.2.3",
|
|
33
|
-
"@atlaskit/css": "^0.
|
|
33
|
+
"@atlaskit/css": "^0.14.0",
|
|
34
34
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^4.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-highlight": "^4.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-primary-toolbar": "^5.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-selection-toolbar": "^5.0.0",
|
|
39
|
-
"@atlaskit/editor-plugin-toolbar": "^1.
|
|
39
|
+
"@atlaskit/editor-plugin-toolbar": "^1.2.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
42
42
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"@atlaskit/heading": "^5.2.0",
|
|
46
46
|
"@atlaskit/icon": "^28.1.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/primitives": "^14.
|
|
48
|
+
"@atlaskit/primitives": "^14.14.0",
|
|
49
49
|
"@atlaskit/theme": "^20.0.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
51
|
-
"@atlaskit/tokens": "^6.
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^12.8.0",
|
|
51
|
+
"@atlaskit/tokens": "^6.3.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^108.
|
|
56
|
+
"@atlaskit/editor-common": "^108.6.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
59
|
"react-intl-next": "npm:react-intl@^5.18.1"
|