@atlaskit/editor-plugin-text-color 1.10.2 → 1.11.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 +14 -0
- package/dist/cjs/plugin.js +5 -7
- package/dist/es2019/plugin.js +5 -7
- package/dist/esm/plugin.js +5 -7
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#126478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126478)
|
|
8
|
+
[`ca1665ebbfe4d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca1665ebbfe4d) -
|
|
9
|
+
[ED-23435] Store primary toolbar component registry in a plugin variable instead of in plugin
|
|
10
|
+
state to avoid having to add effects to all plugins and enable SSR for the toolbar. [Breaking
|
|
11
|
+
change] Converted registerComponent from the primary toolbar plugin into an action.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.10.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -23,6 +23,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
23
23
|
return textColorConfig;
|
|
24
24
|
};
|
|
25
25
|
var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
26
|
+
var _api$primaryToolbar;
|
|
26
27
|
var textColorConfig = _ref.config,
|
|
27
28
|
api = _ref.api;
|
|
28
29
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
@@ -44,6 +45,10 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
44
45
|
api: api
|
|
45
46
|
});
|
|
46
47
|
};
|
|
48
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
49
|
+
name: 'textColor',
|
|
50
|
+
component: primaryToolbarComponent
|
|
51
|
+
});
|
|
47
52
|
return {
|
|
48
53
|
name: 'textColor',
|
|
49
54
|
marks: function marks() {
|
|
@@ -73,13 +78,6 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
|
|
|
73
78
|
return (0, _changeColor2.changeColor)(color, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
74
79
|
}
|
|
75
80
|
},
|
|
76
|
-
usePluginHook: function usePluginHook() {
|
|
77
|
-
var _api$core, _api$primaryToolbar;
|
|
78
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
79
|
-
name: 'textColor',
|
|
80
|
-
component: primaryToolbarComponent
|
|
81
|
-
}));
|
|
82
|
-
},
|
|
83
81
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
84
82
|
};
|
|
85
83
|
};
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -13,6 +13,7 @@ export const textColorPlugin = ({
|
|
|
13
13
|
config: textColorConfig,
|
|
14
14
|
api
|
|
15
15
|
}) => {
|
|
16
|
+
var _api$primaryToolbar;
|
|
16
17
|
const primaryToolbarComponent = ({
|
|
17
18
|
editorView,
|
|
18
19
|
popupsMountPoint,
|
|
@@ -33,6 +34,10 @@ export const textColorPlugin = ({
|
|
|
33
34
|
api: api
|
|
34
35
|
});
|
|
35
36
|
};
|
|
37
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
|
38
|
+
name: 'textColor',
|
|
39
|
+
component: primaryToolbarComponent
|
|
40
|
+
});
|
|
36
41
|
return {
|
|
37
42
|
name: 'textColor',
|
|
38
43
|
marks() {
|
|
@@ -61,13 +66,6 @@ export const textColorPlugin = ({
|
|
|
61
66
|
return changeColor(color, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
62
67
|
}
|
|
63
68
|
},
|
|
64
|
-
usePluginHook: () => {
|
|
65
|
-
var _api$core, _api$primaryToolbar;
|
|
66
|
-
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
67
|
-
name: 'textColor',
|
|
68
|
-
component: primaryToolbarComponent
|
|
69
|
-
}));
|
|
70
|
-
},
|
|
71
69
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
72
70
|
};
|
|
73
71
|
};
|
package/dist/esm/plugin.js
CHANGED
|
@@ -10,6 +10,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
|
|
|
10
10
|
return textColorConfig;
|
|
11
11
|
};
|
|
12
12
|
export var textColorPlugin = function textColorPlugin(_ref) {
|
|
13
|
+
var _api$primaryToolbar;
|
|
13
14
|
var textColorConfig = _ref.config,
|
|
14
15
|
api = _ref.api;
|
|
15
16
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
@@ -31,6 +32,10 @@ export var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
31
32
|
api: api
|
|
32
33
|
});
|
|
33
34
|
};
|
|
35
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
36
|
+
name: 'textColor',
|
|
37
|
+
component: primaryToolbarComponent
|
|
38
|
+
});
|
|
34
39
|
return {
|
|
35
40
|
name: 'textColor',
|
|
36
41
|
marks: function marks() {
|
|
@@ -60,13 +65,6 @@ export var textColorPlugin = function textColorPlugin(_ref) {
|
|
|
60
65
|
return _changeColor(color, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
61
66
|
}
|
|
62
67
|
},
|
|
63
|
-
usePluginHook: function usePluginHook() {
|
|
64
|
-
var _api$core, _api$primaryToolbar;
|
|
65
|
-
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
66
|
-
name: 'textColor',
|
|
67
|
-
component: primaryToolbarComponent
|
|
68
|
-
}));
|
|
69
|
-
},
|
|
70
68
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
71
69
|
};
|
|
72
70
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^40.3.0",
|
|
37
|
-
"@atlaskit/editor-common": "^87.
|
|
37
|
+
"@atlaskit/editor-common": "^87.3.0",
|
|
38
38
|
"@atlaskit/editor-palette": "1.6.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^1.6.0",
|
|
40
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
40
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
42
42
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
44
|
-
"@atlaskit/icon": "^22.
|
|
44
|
+
"@atlaskit/icon": "^22.9.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
46
46
|
"@atlaskit/theme": "^12.11.0",
|
|
47
47
|
"@atlaskit/tokens": "^1.56.0",
|