@atlaskit/editor-plugin-text-color 2.2.0 → 2.3.1
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 +15 -0
- package/dist/cjs/pm-plugins/main.js +0 -6
- package/dist/es2019/pm-plugins/main.js +0 -7
- package/dist/esm/pm-plugins/main.js +0 -7
- package/dist/types/index.d.ts +2 -2
- package/dist/types/pm-plugins/main.d.ts +1 -7
- package/dist/types/textColorPluginType.d.ts +2 -3
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/main.d.ts +1 -7
- package/dist/types-ts4.5/textColorPluginType.d.ts +2 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-color
|
|
2
2
|
|
|
3
|
+
## 2.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#142357](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142357)
|
|
14
|
+
[`fccbc24b53f87`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fccbc24b53f87) -
|
|
15
|
+
[https://product-fabric.atlassian.net/browse/ED-27522](ED-27522) - adopt the `fullPagePreset`
|
|
16
|
+
function from @atlassian/confluence-presets package for creating an editor preset for Confluence
|
|
17
|
+
|
|
3
18
|
## 2.2.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -17,12 +17,6 @@ var _constants = require("./utils/constants");
|
|
|
17
17
|
var _disabled = require("./utils/disabled");
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
|
-
/**
|
|
21
|
-
* @private
|
|
22
|
-
* @deprecated Use {@link TextColorPluginOptions} instead.
|
|
23
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
20
|
function createInitialPluginState(editorState, pluginConfig) {
|
|
27
21
|
var defaultColor = (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.defaultColor) || _constants.DEFAULT_COLOR;
|
|
28
22
|
var palette = [{
|
|
@@ -4,13 +4,6 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import { getActiveColor } from './utils/color';
|
|
5
5
|
import { DEFAULT_COLOR } from './utils/constants';
|
|
6
6
|
import { getDisabledState } from './utils/disabled';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
* @deprecated Use {@link TextColorPluginOptions} instead.
|
|
11
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
7
|
function createInitialPluginState(editorState, pluginConfig) {
|
|
15
8
|
const defaultColor = (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.defaultColor) || DEFAULT_COLOR;
|
|
16
9
|
const palette = [{
|
|
@@ -8,13 +8,6 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
8
8
|
import { getActiveColor } from './utils/color';
|
|
9
9
|
import { DEFAULT_COLOR } from './utils/constants';
|
|
10
10
|
import { getDisabledState } from './utils/disabled';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
* @deprecated Use {@link TextColorPluginOptions} instead.
|
|
15
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
11
|
function createInitialPluginState(editorState, pluginConfig) {
|
|
19
12
|
var defaultColor = (pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.defaultColor) || DEFAULT_COLOR;
|
|
20
13
|
var palette = [{
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { textColorPlugin } from './textColorPlugin';
|
|
2
|
-
export type { TextColorPlugin } from './textColorPluginType';
|
|
2
|
+
export type { TextColorPlugin, TextColorPluginOptions } from './textColorPluginType';
|
|
3
3
|
export type { TextColorInputMethod } from './types';
|
|
4
|
-
export type { TextColorPluginState, TextColorPluginConfig
|
|
4
|
+
export type { TextColorPluginState, TextColorPluginConfig } from './pm-plugins/main';
|
|
@@ -12,15 +12,9 @@ type TextColorDefaultColor = {
|
|
|
12
12
|
color: string;
|
|
13
13
|
label: string;
|
|
14
14
|
};
|
|
15
|
-
export interface
|
|
15
|
+
export interface TextColorPluginConfig {
|
|
16
16
|
defaultColor?: TextColorDefaultColor;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
* @deprecated Use {@link TextColorPluginOptions} instead.
|
|
21
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
22
|
-
*/
|
|
23
|
-
export type TextColorPluginConfig = TextColorPluginOptions;
|
|
24
18
|
export declare enum ACTIONS {
|
|
25
19
|
RESET_COLOR = 0,
|
|
26
20
|
SET_COLOR = 1,
|
|
@@ -4,18 +4,17 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
|
|
|
4
4
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
5
5
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
6
6
|
import type { TextColorInputMethod } from './types';
|
|
7
|
-
type
|
|
7
|
+
export type TextColorPluginOptions = TextColorPluginConfig | boolean;
|
|
8
8
|
export type Dependencies = [
|
|
9
9
|
OptionalPlugin<AnalyticsPlugin>,
|
|
10
10
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
11
11
|
OptionalPlugin<SelectionToolbarPlugin>
|
|
12
12
|
];
|
|
13
13
|
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
14
|
-
pluginConfiguration:
|
|
14
|
+
pluginConfiguration: TextColorPluginOptions | undefined;
|
|
15
15
|
dependencies: Dependencies;
|
|
16
16
|
actions: {
|
|
17
17
|
changeColor: (color: string, inputMethod?: TextColorInputMethod) => Command;
|
|
18
18
|
};
|
|
19
19
|
sharedState: TextColorPluginState | undefined;
|
|
20
20
|
}>;
|
|
21
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { textColorPlugin } from './textColorPlugin';
|
|
2
|
-
export type { TextColorPlugin } from './textColorPluginType';
|
|
2
|
+
export type { TextColorPlugin, TextColorPluginOptions } from './textColorPluginType';
|
|
3
3
|
export type { TextColorInputMethod } from './types';
|
|
4
|
-
export type { TextColorPluginState, TextColorPluginConfig
|
|
4
|
+
export type { TextColorPluginState, TextColorPluginConfig } from './pm-plugins/main';
|
|
@@ -12,15 +12,9 @@ type TextColorDefaultColor = {
|
|
|
12
12
|
color: string;
|
|
13
13
|
label: string;
|
|
14
14
|
};
|
|
15
|
-
export interface
|
|
15
|
+
export interface TextColorPluginConfig {
|
|
16
16
|
defaultColor?: TextColorDefaultColor;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
* @deprecated Use {@link TextColorPluginOptions} instead.
|
|
21
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
22
|
-
*/
|
|
23
|
-
export type TextColorPluginConfig = TextColorPluginOptions;
|
|
24
18
|
export declare enum ACTIONS {
|
|
25
19
|
RESET_COLOR = 0,
|
|
26
20
|
SET_COLOR = 1,
|
|
@@ -4,18 +4,17 @@ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolb
|
|
|
4
4
|
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
5
5
|
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
6
6
|
import type { TextColorInputMethod } from './types';
|
|
7
|
-
type
|
|
7
|
+
export type TextColorPluginOptions = TextColorPluginConfig | boolean;
|
|
8
8
|
export type Dependencies = [
|
|
9
9
|
OptionalPlugin<AnalyticsPlugin>,
|
|
10
10
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
11
11
|
OptionalPlugin<SelectionToolbarPlugin>
|
|
12
12
|
];
|
|
13
13
|
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
14
|
-
pluginConfiguration:
|
|
14
|
+
pluginConfiguration: TextColorPluginOptions | undefined;
|
|
15
15
|
dependencies: Dependencies;
|
|
16
16
|
actions: {
|
|
17
17
|
changeColor: (color: string, inputMethod?: TextColorInputMethod) => Command;
|
|
18
18
|
};
|
|
19
19
|
sharedState: TextColorPluginState | undefined;
|
|
20
20
|
}>;
|
|
21
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^104.0.0",
|
|
38
38
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
40
40
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.2.0",
|
|
41
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^3.
|
|
41
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^3.5.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
43
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
44
44
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
45
|
-
"@atlaskit/icon": "^25.
|
|
45
|
+
"@atlaskit/icon": "^25.6.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/theme": "^18.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
49
|
-
"@atlaskit/tokens": "^4.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^4.16.0",
|
|
49
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|
|
52
52
|
},
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@af/visual-regression": "
|
|
60
|
-
"@atlaskit/ssr": "
|
|
61
|
-
"@atlaskit/visual-regression": "
|
|
59
|
+
"@af/visual-regression": "workspace:^",
|
|
60
|
+
"@atlaskit/ssr": "workspace:^",
|
|
61
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
62
62
|
"@testing-library/react": "^13.4.0",
|
|
63
63
|
"typescript": "~5.4.2",
|
|
64
64
|
"wait-for-expect": "^1.2.0"
|