@atlaskit/editor-plugin-text-color 2.3.3 → 2.3.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 +9 -0
- package/dist/cjs/ui/FloatingToolbarComponent.js +37 -7
- package/dist/cjs/ui/PrimaryToolbarComponent.js +37 -7
- package/dist/es2019/ui/FloatingToolbarComponent.js +39 -8
- package/dist/es2019/ui/PrimaryToolbarComponent.js +39 -8
- package/dist/esm/ui/FloatingToolbarComponent.js +38 -8
- package/dist/esm/ui/PrimaryToolbarComponent.js +38 -8
- package/dist/types/ui/FloatingToolbarComponent.d.ts +1 -1
- package/dist/types/ui/PrimaryToolbarComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingToolbarComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 2.3.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#154149](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/154149)
|
|
8
|
+
[`4b955e247c793`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b955e247c793) -
|
|
9
|
+
[ED-27560] Migrate to useSharedPluginStateSelector for text color, toolbar lists indentation,
|
|
10
|
+
type-ahead, undo-redo plugins
|
|
11
|
+
|
|
3
12
|
## 2.3.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.FloatingToolbarComponent = FloatingToolbarComponent;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
10
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
10
11
|
var _types = require("../types");
|
|
11
12
|
var _ToolbarTextColor = _interopRequireDefault(require("./ToolbarTextColor"));
|
|
12
13
|
// Ignored via go/ees005
|
|
@@ -16,17 +17,46 @@ var FloatingToolbarSettings = {
|
|
|
16
17
|
disabled: false,
|
|
17
18
|
isReducedSpacing: true
|
|
18
19
|
};
|
|
20
|
+
var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
21
|
+
var color = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.color');
|
|
22
|
+
var defaultColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.defaultColor');
|
|
23
|
+
var palette = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.palette');
|
|
24
|
+
var disabled = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.disabled');
|
|
25
|
+
return {
|
|
26
|
+
color: color,
|
|
27
|
+
defaultColor: defaultColor,
|
|
28
|
+
palette: palette,
|
|
29
|
+
disabled: disabled
|
|
30
|
+
};
|
|
31
|
+
}, function (api) {
|
|
32
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['textColor']),
|
|
33
|
+
textColorState = _useSharedPluginState.textColorState;
|
|
34
|
+
return {
|
|
35
|
+
color: textColorState === null || textColorState === void 0 ? void 0 : textColorState.color,
|
|
36
|
+
defaultColor: textColorState === null || textColorState === void 0 ? void 0 : textColorState.defaultColor,
|
|
37
|
+
palette: textColorState === null || textColorState === void 0 ? void 0 : textColorState.palette,
|
|
38
|
+
disabled: textColorState === null || textColorState === void 0 ? void 0 : textColorState.disabled
|
|
39
|
+
};
|
|
40
|
+
});
|
|
19
41
|
function FloatingToolbarComponent(_ref) {
|
|
20
42
|
var api = _ref.api,
|
|
21
43
|
editorView = _ref.editorView,
|
|
22
44
|
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
45
|
+
var _useSharedState = useSharedState(api),
|
|
46
|
+
color = _useSharedState.color,
|
|
47
|
+
defaultColor = _useSharedState.defaultColor,
|
|
48
|
+
palette = _useSharedState.palette,
|
|
49
|
+
disabled = _useSharedState.disabled;
|
|
50
|
+
if (color === undefined || defaultColor === undefined || palette === undefined) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_ToolbarTextColor.default, {
|
|
54
|
+
pluginState: {
|
|
55
|
+
color: color,
|
|
56
|
+
defaultColor: defaultColor,
|
|
57
|
+
palette: palette,
|
|
58
|
+
disabled: disabled
|
|
59
|
+
},
|
|
30
60
|
isReducedSpacing: FloatingToolbarSettings.isReducedSpacing,
|
|
31
61
|
editorView: editorView,
|
|
32
62
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
@@ -7,11 +7,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.PrimaryToolbarComponent = PrimaryToolbarComponent;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
10
|
+
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
10
11
|
var _types = require("../types");
|
|
11
12
|
var _ToolbarTextColor = _interopRequireDefault(require("./ToolbarTextColor"));
|
|
12
13
|
// Ignored via go/ees005
|
|
13
14
|
// eslint-disable-next-line import/no-named-as-default
|
|
14
15
|
|
|
16
|
+
var useSharedState = (0, _hooks.sharedPluginStateHookMigratorFactory)(function (api) {
|
|
17
|
+
var color = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.color');
|
|
18
|
+
var defaultColor = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.defaultColor');
|
|
19
|
+
var palette = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.palette');
|
|
20
|
+
var textColorDisabled = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'textColor.disabled');
|
|
21
|
+
return {
|
|
22
|
+
color: color,
|
|
23
|
+
defaultColor: defaultColor,
|
|
24
|
+
palette: palette,
|
|
25
|
+
textColorDisabled: textColorDisabled
|
|
26
|
+
};
|
|
27
|
+
}, function (api) {
|
|
28
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['textColor']),
|
|
29
|
+
textColorState = _useSharedPluginState.textColorState;
|
|
30
|
+
return {
|
|
31
|
+
color: textColorState === null || textColorState === void 0 ? void 0 : textColorState.color,
|
|
32
|
+
defaultColor: textColorState === null || textColorState === void 0 ? void 0 : textColorState.defaultColor,
|
|
33
|
+
palette: textColorState === null || textColorState === void 0 ? void 0 : textColorState.palette,
|
|
34
|
+
textColorDisabled: textColorState === null || textColorState === void 0 ? void 0 : textColorState.disabled
|
|
35
|
+
};
|
|
36
|
+
});
|
|
15
37
|
function PrimaryToolbarComponent(_ref) {
|
|
16
38
|
var api = _ref.api,
|
|
17
39
|
isReducedSpacing = _ref.isReducedSpacing,
|
|
@@ -21,13 +43,21 @@ function PrimaryToolbarComponent(_ref) {
|
|
|
21
43
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
22
44
|
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
23
45
|
disabled = _ref.disabled;
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
46
|
+
var _useSharedState = useSharedState(api),
|
|
47
|
+
color = _useSharedState.color,
|
|
48
|
+
defaultColor = _useSharedState.defaultColor,
|
|
49
|
+
palette = _useSharedState.palette,
|
|
50
|
+
textColorDisabled = _useSharedState.textColorDisabled;
|
|
51
|
+
if (color === undefined || defaultColor === undefined || palette === undefined) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_ToolbarTextColor.default, {
|
|
55
|
+
pluginState: {
|
|
56
|
+
color: color,
|
|
57
|
+
defaultColor: defaultColor,
|
|
58
|
+
palette: palette,
|
|
59
|
+
disabled: textColorDisabled
|
|
60
|
+
},
|
|
31
61
|
isReducedSpacing: isReducedSpacing,
|
|
32
62
|
editorView: editorView,
|
|
33
63
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
2
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
3
4
|
import { ToolbarType } from '../types';
|
|
4
5
|
|
|
5
6
|
// Ignored via go/ees005
|
|
@@ -9,19 +10,49 @@ const FloatingToolbarSettings = {
|
|
|
9
10
|
disabled: false,
|
|
10
11
|
isReducedSpacing: true
|
|
11
12
|
};
|
|
13
|
+
const useSharedState = sharedPluginStateHookMigratorFactory(api => {
|
|
14
|
+
const color = useSharedPluginStateSelector(api, 'textColor.color');
|
|
15
|
+
const defaultColor = useSharedPluginStateSelector(api, 'textColor.defaultColor');
|
|
16
|
+
const palette = useSharedPluginStateSelector(api, 'textColor.palette');
|
|
17
|
+
const disabled = useSharedPluginStateSelector(api, 'textColor.disabled');
|
|
18
|
+
return {
|
|
19
|
+
color,
|
|
20
|
+
defaultColor,
|
|
21
|
+
palette,
|
|
22
|
+
disabled
|
|
23
|
+
};
|
|
24
|
+
}, api => {
|
|
25
|
+
const {
|
|
26
|
+
textColorState
|
|
27
|
+
} = useSharedPluginState(api, ['textColor']);
|
|
28
|
+
return {
|
|
29
|
+
color: textColorState === null || textColorState === void 0 ? void 0 : textColorState.color,
|
|
30
|
+
defaultColor: textColorState === null || textColorState === void 0 ? void 0 : textColorState.defaultColor,
|
|
31
|
+
palette: textColorState === null || textColorState === void 0 ? void 0 : textColorState.palette,
|
|
32
|
+
disabled: textColorState === null || textColorState === void 0 ? void 0 : textColorState.disabled
|
|
33
|
+
};
|
|
34
|
+
});
|
|
12
35
|
export function FloatingToolbarComponent({
|
|
13
36
|
api,
|
|
14
37
|
editorView,
|
|
15
38
|
dispatchAnalyticsEvent
|
|
16
39
|
}) {
|
|
17
40
|
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
color,
|
|
42
|
+
defaultColor,
|
|
43
|
+
palette,
|
|
44
|
+
disabled
|
|
45
|
+
} = useSharedState(api);
|
|
46
|
+
if (color === undefined || defaultColor === undefined || palette === undefined) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return /*#__PURE__*/React.createElement(ToolbarTextColor, {
|
|
50
|
+
pluginState: {
|
|
51
|
+
color,
|
|
52
|
+
defaultColor,
|
|
53
|
+
palette,
|
|
54
|
+
disabled
|
|
55
|
+
},
|
|
25
56
|
isReducedSpacing: FloatingToolbarSettings.isReducedSpacing,
|
|
26
57
|
editorView: editorView,
|
|
27
58
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
2
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
3
4
|
import { ToolbarType } from '../types';
|
|
4
5
|
|
|
5
6
|
// Ignored via go/ees005
|
|
6
7
|
// eslint-disable-next-line import/no-named-as-default
|
|
7
8
|
import ToolbarTextColor from './ToolbarTextColor';
|
|
9
|
+
const useSharedState = sharedPluginStateHookMigratorFactory(api => {
|
|
10
|
+
const color = useSharedPluginStateSelector(api, 'textColor.color');
|
|
11
|
+
const defaultColor = useSharedPluginStateSelector(api, 'textColor.defaultColor');
|
|
12
|
+
const palette = useSharedPluginStateSelector(api, 'textColor.palette');
|
|
13
|
+
const textColorDisabled = useSharedPluginStateSelector(api, 'textColor.disabled');
|
|
14
|
+
return {
|
|
15
|
+
color,
|
|
16
|
+
defaultColor,
|
|
17
|
+
palette,
|
|
18
|
+
textColorDisabled
|
|
19
|
+
};
|
|
20
|
+
}, api => {
|
|
21
|
+
const {
|
|
22
|
+
textColorState
|
|
23
|
+
} = useSharedPluginState(api, ['textColor']);
|
|
24
|
+
return {
|
|
25
|
+
color: textColorState === null || textColorState === void 0 ? void 0 : textColorState.color,
|
|
26
|
+
defaultColor: textColorState === null || textColorState === void 0 ? void 0 : textColorState.defaultColor,
|
|
27
|
+
palette: textColorState === null || textColorState === void 0 ? void 0 : textColorState.palette,
|
|
28
|
+
textColorDisabled: textColorState === null || textColorState === void 0 ? void 0 : textColorState.disabled
|
|
29
|
+
};
|
|
30
|
+
});
|
|
8
31
|
export function PrimaryToolbarComponent({
|
|
9
32
|
api,
|
|
10
33
|
isReducedSpacing,
|
|
@@ -16,13 +39,21 @@ export function PrimaryToolbarComponent({
|
|
|
16
39
|
disabled
|
|
17
40
|
}) {
|
|
18
41
|
const {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
color,
|
|
43
|
+
defaultColor,
|
|
44
|
+
palette,
|
|
45
|
+
textColorDisabled
|
|
46
|
+
} = useSharedState(api);
|
|
47
|
+
if (color === undefined || defaultColor === undefined || palette === undefined) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/React.createElement(ToolbarTextColor, {
|
|
51
|
+
pluginState: {
|
|
52
|
+
color,
|
|
53
|
+
defaultColor,
|
|
54
|
+
palette,
|
|
55
|
+
disabled: textColorDisabled
|
|
56
|
+
},
|
|
26
57
|
isReducedSpacing: isReducedSpacing,
|
|
27
58
|
editorView: editorView,
|
|
28
59
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
2
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
3
4
|
import { ToolbarType } from '../types';
|
|
4
5
|
|
|
5
6
|
// Ignored via go/ees005
|
|
@@ -9,17 +10,46 @@ var FloatingToolbarSettings = {
|
|
|
9
10
|
disabled: false,
|
|
10
11
|
isReducedSpacing: true
|
|
11
12
|
};
|
|
13
|
+
var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
14
|
+
var color = useSharedPluginStateSelector(api, 'textColor.color');
|
|
15
|
+
var defaultColor = useSharedPluginStateSelector(api, 'textColor.defaultColor');
|
|
16
|
+
var palette = useSharedPluginStateSelector(api, 'textColor.palette');
|
|
17
|
+
var disabled = useSharedPluginStateSelector(api, 'textColor.disabled');
|
|
18
|
+
return {
|
|
19
|
+
color: color,
|
|
20
|
+
defaultColor: defaultColor,
|
|
21
|
+
palette: palette,
|
|
22
|
+
disabled: disabled
|
|
23
|
+
};
|
|
24
|
+
}, function (api) {
|
|
25
|
+
var _useSharedPluginState = useSharedPluginState(api, ['textColor']),
|
|
26
|
+
textColorState = _useSharedPluginState.textColorState;
|
|
27
|
+
return {
|
|
28
|
+
color: textColorState === null || textColorState === void 0 ? void 0 : textColorState.color,
|
|
29
|
+
defaultColor: textColorState === null || textColorState === void 0 ? void 0 : textColorState.defaultColor,
|
|
30
|
+
palette: textColorState === null || textColorState === void 0 ? void 0 : textColorState.palette,
|
|
31
|
+
disabled: textColorState === null || textColorState === void 0 ? void 0 : textColorState.disabled
|
|
32
|
+
};
|
|
33
|
+
});
|
|
12
34
|
export function FloatingToolbarComponent(_ref) {
|
|
13
35
|
var api = _ref.api,
|
|
14
36
|
editorView = _ref.editorView,
|
|
15
37
|
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
38
|
+
var _useSharedState = useSharedState(api),
|
|
39
|
+
color = _useSharedState.color,
|
|
40
|
+
defaultColor = _useSharedState.defaultColor,
|
|
41
|
+
palette = _useSharedState.palette,
|
|
42
|
+
disabled = _useSharedState.disabled;
|
|
43
|
+
if (color === undefined || defaultColor === undefined || palette === undefined) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return /*#__PURE__*/React.createElement(ToolbarTextColor, {
|
|
47
|
+
pluginState: {
|
|
48
|
+
color: color,
|
|
49
|
+
defaultColor: defaultColor,
|
|
50
|
+
palette: palette,
|
|
51
|
+
disabled: disabled
|
|
52
|
+
},
|
|
23
53
|
isReducedSpacing: FloatingToolbarSettings.isReducedSpacing,
|
|
24
54
|
editorView: editorView,
|
|
25
55
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
2
|
+
import { useSharedPluginState, sharedPluginStateHookMigratorFactory } from '@atlaskit/editor-common/hooks';
|
|
3
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
3
4
|
import { ToolbarType } from '../types';
|
|
4
5
|
|
|
5
6
|
// Ignored via go/ees005
|
|
6
7
|
// eslint-disable-next-line import/no-named-as-default
|
|
7
8
|
import ToolbarTextColor from './ToolbarTextColor';
|
|
9
|
+
var useSharedState = sharedPluginStateHookMigratorFactory(function (api) {
|
|
10
|
+
var color = useSharedPluginStateSelector(api, 'textColor.color');
|
|
11
|
+
var defaultColor = useSharedPluginStateSelector(api, 'textColor.defaultColor');
|
|
12
|
+
var palette = useSharedPluginStateSelector(api, 'textColor.palette');
|
|
13
|
+
var textColorDisabled = useSharedPluginStateSelector(api, 'textColor.disabled');
|
|
14
|
+
return {
|
|
15
|
+
color: color,
|
|
16
|
+
defaultColor: defaultColor,
|
|
17
|
+
palette: palette,
|
|
18
|
+
textColorDisabled: textColorDisabled
|
|
19
|
+
};
|
|
20
|
+
}, function (api) {
|
|
21
|
+
var _useSharedPluginState = useSharedPluginState(api, ['textColor']),
|
|
22
|
+
textColorState = _useSharedPluginState.textColorState;
|
|
23
|
+
return {
|
|
24
|
+
color: textColorState === null || textColorState === void 0 ? void 0 : textColorState.color,
|
|
25
|
+
defaultColor: textColorState === null || textColorState === void 0 ? void 0 : textColorState.defaultColor,
|
|
26
|
+
palette: textColorState === null || textColorState === void 0 ? void 0 : textColorState.palette,
|
|
27
|
+
textColorDisabled: textColorState === null || textColorState === void 0 ? void 0 : textColorState.disabled
|
|
28
|
+
};
|
|
29
|
+
});
|
|
8
30
|
export function PrimaryToolbarComponent(_ref) {
|
|
9
31
|
var api = _ref.api,
|
|
10
32
|
isReducedSpacing = _ref.isReducedSpacing,
|
|
@@ -14,13 +36,21 @@ export function PrimaryToolbarComponent(_ref) {
|
|
|
14
36
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
15
37
|
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
16
38
|
disabled = _ref.disabled;
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
var _useSharedState = useSharedState(api),
|
|
40
|
+
color = _useSharedState.color,
|
|
41
|
+
defaultColor = _useSharedState.defaultColor,
|
|
42
|
+
palette = _useSharedState.palette,
|
|
43
|
+
textColorDisabled = _useSharedState.textColorDisabled;
|
|
44
|
+
if (color === undefined || defaultColor === undefined || palette === undefined) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return /*#__PURE__*/React.createElement(ToolbarTextColor, {
|
|
48
|
+
pluginState: {
|
|
49
|
+
color: color,
|
|
50
|
+
defaultColor: defaultColor,
|
|
51
|
+
palette: palette,
|
|
52
|
+
disabled: textColorDisabled
|
|
53
|
+
},
|
|
24
54
|
isReducedSpacing: isReducedSpacing,
|
|
25
55
|
editorView: editorView,
|
|
26
56
|
popupsMountPoint: popupsMountPoint,
|
|
@@ -8,5 +8,5 @@ interface FloatingToolbarComponentProps {
|
|
|
8
8
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
9
9
|
api: ExtractInjectionAPI<TextColorPlugin> | undefined;
|
|
10
10
|
}
|
|
11
|
-
export declare function FloatingToolbarComponent({ api, editorView, dispatchAnalyticsEvent, }: FloatingToolbarComponentProps): React.JSX.Element;
|
|
11
|
+
export declare function FloatingToolbarComponent({ api, editorView, dispatchAnalyticsEvent, }: FloatingToolbarComponentProps): React.JSX.Element | null;
|
|
12
12
|
export {};
|
|
@@ -13,5 +13,5 @@ interface PrimaryToolbarComponentProps {
|
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
api: ExtractInjectionAPI<TextColorPlugin> | undefined;
|
|
15
15
|
}
|
|
16
|
-
export declare function PrimaryToolbarComponent({ api, isReducedSpacing, editorView, popupsMountPoint, popupsScrollableElement, popupsBoundariesElement, dispatchAnalyticsEvent, disabled, }: PrimaryToolbarComponentProps): React.JSX.Element;
|
|
16
|
+
export declare function PrimaryToolbarComponent({ api, isReducedSpacing, editorView, popupsMountPoint, popupsScrollableElement, popupsBoundariesElement, dispatchAnalyticsEvent, disabled, }: PrimaryToolbarComponentProps): React.JSX.Element | null;
|
|
17
17
|
export {};
|
|
@@ -8,5 +8,5 @@ interface FloatingToolbarComponentProps {
|
|
|
8
8
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
9
9
|
api: ExtractInjectionAPI<TextColorPlugin> | undefined;
|
|
10
10
|
}
|
|
11
|
-
export declare function FloatingToolbarComponent({ api, editorView, dispatchAnalyticsEvent, }: FloatingToolbarComponentProps): React.JSX.Element;
|
|
11
|
+
export declare function FloatingToolbarComponent({ api, editorView, dispatchAnalyticsEvent, }: FloatingToolbarComponentProps): React.JSX.Element | null;
|
|
12
12
|
export {};
|
|
@@ -13,5 +13,5 @@ interface PrimaryToolbarComponentProps {
|
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
api: ExtractInjectionAPI<TextColorPlugin> | undefined;
|
|
15
15
|
}
|
|
16
|
-
export declare function PrimaryToolbarComponent({ api, isReducedSpacing, editorView, popupsMountPoint, popupsScrollableElement, popupsBoundariesElement, dispatchAnalyticsEvent, disabled, }: PrimaryToolbarComponentProps): React.JSX.Element;
|
|
16
|
+
export declare function PrimaryToolbarComponent({ api, isReducedSpacing, editorView, popupsMountPoint, popupsScrollableElement, popupsBoundariesElement, dispatchAnalyticsEvent, disabled, }: PrimaryToolbarComponentProps): React.JSX.Element | null;
|
|
17
17
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
|
-
"@atlaskit/editor-common": "^105.
|
|
37
|
+
"@atlaskit/editor-common": "^105.2.0",
|
|
38
38
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
39
|
-
"@atlaskit/editor-plugin-analytics": "^2.
|
|
39
|
+
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
41
41
|
"@atlaskit/editor-plugin-selection-toolbar": "^3.6.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/icon": "^26.0.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/theme": "^18.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^4.21.0",
|
|
49
49
|
"@atlaskit/tokens": "^4.8.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|