@atlaskit/editor-plugin-text-color 1.16.8 → 1.16.10
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 +18 -0
- package/dist/cjs/pm-plugins/commands/change-color.js +0 -2
- package/dist/cjs/pm-plugins/main.js +0 -2
- package/dist/cjs/textColorPlugin.js +4 -0
- package/dist/es2019/pm-plugins/commands/change-color.js +0 -2
- package/dist/es2019/pm-plugins/main.js +0 -2
- package/dist/es2019/textColorPlugin.js +4 -0
- package/dist/esm/pm-plugins/commands/change-color.js +0 -2
- package/dist/esm/pm-plugins/main.js +0 -2
- package/dist/esm/textColorPlugin.js +4 -0
- package/dist/types/textColorPluginType.d.ts +2 -1
- package/dist/types-ts4.5/textColorPluginType.d.ts +5 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 1.16.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107473](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107473)
|
|
8
|
+
[`962b3297548df`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/962b3297548df) -
|
|
9
|
+
[ux] Implement variation 2 for editor contextual toolbar formatting experiment
|
|
10
|
+
|
|
11
|
+
## 1.16.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#105009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/105009)
|
|
16
|
+
[`a4039ebf7ed11`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a4039ebf7ed11) -
|
|
17
|
+
[ux] Implement variant 2 cohorts experience for platform_editor_contextual_formatting_toolbar_v2
|
|
18
|
+
experiment
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.16.8
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -17,8 +17,6 @@ var _toggleColor = require("./toggle-color");
|
|
|
17
17
|
* @param palette - Current palette of colors
|
|
18
18
|
* @return Higher order command with analytics logic inside.
|
|
19
19
|
*/
|
|
20
|
-
// Ignored via go/ees005
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
22
20
|
function createWithColorAnalytics(newColor, previousColor, palette, editorAnalyticsApi, inputMethod) {
|
|
23
21
|
var newColorFromPalette = palette.find(function (_ref) {
|
|
24
22
|
var value = _ref.value;
|
|
@@ -46,8 +46,6 @@ function createPlugin(dispatch, pluginConfig) {
|
|
|
46
46
|
init: function init(_config, editorState) {
|
|
47
47
|
return createInitialPluginState(editorState, pluginConfig);
|
|
48
48
|
},
|
|
49
|
-
// Ignored via go/ees005
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
51
49
|
apply: function apply(tr, pluginState, _, newState) {
|
|
52
50
|
var meta = tr.getMeta(pluginKey) || {};
|
|
53
51
|
var nextState;
|
|
@@ -78,6 +78,10 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
78
78
|
selectionToolbar: function selectionToolbar() {
|
|
79
79
|
if ((0, _experiments.editorExperiment)('contextual_formatting_toolbar', true, {
|
|
80
80
|
exposure: true
|
|
81
|
+
}) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
82
|
+
exposure: true
|
|
83
|
+
}) || (0, _experiments.editorExperiment)('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
84
|
+
exposure: true
|
|
81
85
|
})) {
|
|
82
86
|
var toolbarCustom = {
|
|
83
87
|
type: 'custom',
|
|
@@ -12,8 +12,6 @@ import { toggleColor } from './toggle-color';
|
|
|
12
12
|
* @param palette - Current palette of colors
|
|
13
13
|
* @return Higher order command with analytics logic inside.
|
|
14
14
|
*/
|
|
15
|
-
// Ignored via go/ees005
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
17
15
|
function createWithColorAnalytics(newColor, previousColor, palette, editorAnalyticsApi, inputMethod) {
|
|
18
16
|
const newColorFromPalette = palette.find(({
|
|
19
17
|
value
|
|
@@ -33,8 +33,6 @@ export function createPlugin(dispatch, pluginConfig) {
|
|
|
33
33
|
init(_config, editorState) {
|
|
34
34
|
return createInitialPluginState(editorState, pluginConfig);
|
|
35
35
|
},
|
|
36
|
-
// Ignored via go/ees005
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
38
36
|
apply(tr, pluginState, _, newState) {
|
|
39
37
|
const meta = tr.getMeta(pluginKey) || {};
|
|
40
38
|
let nextState;
|
|
@@ -72,6 +72,10 @@ export const textColorPlugin = ({
|
|
|
72
72
|
selectionToolbar: () => {
|
|
73
73
|
if (editorExperiment('contextual_formatting_toolbar', true, {
|
|
74
74
|
exposure: true
|
|
75
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
76
|
+
exposure: true
|
|
77
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
78
|
+
exposure: true
|
|
75
79
|
})) {
|
|
76
80
|
const toolbarCustom = {
|
|
77
81
|
type: 'custom',
|
|
@@ -12,8 +12,6 @@ import { toggleColor } from './toggle-color';
|
|
|
12
12
|
* @param palette - Current palette of colors
|
|
13
13
|
* @return Higher order command with analytics logic inside.
|
|
14
14
|
*/
|
|
15
|
-
// Ignored via go/ees005
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
17
15
|
function createWithColorAnalytics(newColor, previousColor, palette, editorAnalyticsApi, inputMethod) {
|
|
18
16
|
var newColorFromPalette = palette.find(function (_ref) {
|
|
19
17
|
var value = _ref.value;
|
|
@@ -37,8 +37,6 @@ export function createPlugin(dispatch, pluginConfig) {
|
|
|
37
37
|
init: function init(_config, editorState) {
|
|
38
38
|
return createInitialPluginState(editorState, pluginConfig);
|
|
39
39
|
},
|
|
40
|
-
// Ignored via go/ees005
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
42
40
|
apply: function apply(tr, pluginState, _, newState) {
|
|
43
41
|
var meta = tr.getMeta(pluginKey) || {};
|
|
44
42
|
var nextState;
|
|
@@ -71,6 +71,10 @@ export var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
71
71
|
selectionToolbar: function selectionToolbar() {
|
|
72
72
|
if (editorExperiment('contextual_formatting_toolbar', true, {
|
|
73
73
|
exposure: true
|
|
74
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant1', {
|
|
75
|
+
exposure: true
|
|
76
|
+
}) || editorExperiment('platform_editor_contextual_formatting_toolbar_v2', 'variant2', {
|
|
77
|
+
exposure: true
|
|
74
78
|
})) {
|
|
75
79
|
var toolbarCustom = {
|
|
76
80
|
type: 'custom',
|
|
@@ -4,9 +4,10 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
|
|
|
4
4
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
5
5
|
import type { TextColorInputMethod } from './types';
|
|
6
6
|
type Config = TextColorPluginConfig | boolean;
|
|
7
|
+
export type Dependencies = [OptionalPlugin<AnalyticsPlugin>, OptionalPlugin<PrimaryToolbarPlugin>];
|
|
7
8
|
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
8
9
|
pluginConfiguration: Config | undefined;
|
|
9
|
-
dependencies:
|
|
10
|
+
dependencies: Dependencies;
|
|
10
11
|
actions: {
|
|
11
12
|
changeColor: (color: string, inputMethod?: TextColorInputMethod) => Command;
|
|
12
13
|
};
|
|
@@ -4,12 +4,13 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
|
|
|
4
4
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
5
5
|
import type { TextColorInputMethod } from './types';
|
|
6
6
|
type Config = TextColorPluginConfig | boolean;
|
|
7
|
+
export type Dependencies = [
|
|
8
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
9
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
|
10
|
+
];
|
|
7
11
|
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
8
12
|
pluginConfiguration: Config | undefined;
|
|
9
|
-
dependencies:
|
|
10
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
11
|
-
OptionalPlugin<PrimaryToolbarPlugin>
|
|
12
|
-
];
|
|
13
|
+
dependencies: Dependencies;
|
|
13
14
|
actions: {
|
|
14
15
|
changeColor: (color: string, inputMethod?: TextColorInputMethod) => Command;
|
|
15
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.10",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^99.
|
|
35
|
+
"@atlaskit/editor-common": "^99.5.0",
|
|
36
36
|
"@atlaskit/editor-palette": "1.6.4",
|
|
37
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^1.11.0",
|
|
38
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
40
40
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
41
41
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
42
|
+
"@atlaskit/icon": "^23.4.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
44
44
|
"@atlaskit/theme": "^14.0.0",
|
|
45
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
46
|
-
"@atlaskit/tokens": "^3.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^2.41.0",
|
|
46
|
+
"@atlaskit/tokens": "^3.2.0",
|
|
47
47
|
"@babel/runtime": "^7.0.0",
|
|
48
48
|
"@emotion/react": "^11.7.1"
|
|
49
49
|
},
|