@atlaskit/editor-plugin-text-color 0.1.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 +1 -0
- package/LICENSE.md +13 -0
- package/README.md +30 -0
- package/dist/cjs/commands/change-color.js +61 -0
- package/dist/cjs/commands/remove-color.js +59 -0
- package/dist/cjs/commands/toggle-color.js +36 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/plugin.js +87 -0
- package/dist/cjs/pm-plugins/main.js +88 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/ui/ToolbarTextColor/icon.js +29 -0
- package/dist/cjs/ui/ToolbarTextColor/index.js +296 -0
- package/dist/cjs/ui/ToolbarTextColor/styles.js +35 -0
- package/dist/cjs/utils/color.js +54 -0
- package/dist/cjs/utils/disabled.js +32 -0
- package/dist/es2019/commands/change-color.js +54 -0
- package/dist/es2019/commands/remove-color.js +57 -0
- package/dist/es2019/commands/toggle-color.js +30 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/plugin.js +75 -0
- package/dist/es2019/pm-plugins/main.js +74 -0
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/ui/ToolbarTextColor/icon.js +20 -0
- package/dist/es2019/ui/ToolbarTextColor/index.js +274 -0
- package/dist/es2019/ui/ToolbarTextColor/styles.js +48 -0
- package/dist/es2019/utils/color.js +48 -0
- package/dist/es2019/utils/disabled.js +39 -0
- package/dist/esm/commands/change-color.js +56 -0
- package/dist/esm/commands/remove-color.js +53 -0
- package/dist/esm/commands/toggle-color.js +30 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/plugin.js +75 -0
- package/dist/esm/pm-plugins/main.js +74 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/ui/ToolbarTextColor/icon.js +22 -0
- package/dist/esm/ui/ToolbarTextColor/index.js +290 -0
- package/dist/esm/ui/ToolbarTextColor/styles.js +28 -0
- package/dist/esm/utils/color.js +48 -0
- package/dist/esm/utils/disabled.js +26 -0
- package/dist/types/commands/change-color.d.ts +3 -0
- package/dist/types/commands/remove-color.d.ts +2 -0
- package/dist/types/commands/toggle-color.d.ts +2 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/plugin.d.ts +6 -0
- package/dist/types/pm-plugins/main.d.ts +25 -0
- package/dist/types/types.d.ts +14 -0
- package/dist/types/ui/ToolbarTextColor/icon.d.ts +2 -0
- package/dist/types/ui/ToolbarTextColor/index.d.ts +53 -0
- package/dist/types/ui/ToolbarTextColor/styles.d.ts +3 -0
- package/dist/types/utils/color.d.ts +6 -0
- package/dist/types/utils/disabled.d.ts +2 -0
- package/dist/types-ts4.5/commands/change-color.d.ts +3 -0
- package/dist/types-ts4.5/commands/remove-color.d.ts +2 -0
- package/dist/types-ts4.5/commands/toggle-color.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +3 -0
- package/dist/types-ts4.5/plugin.d.ts +6 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +25 -0
- package/dist/types-ts4.5/types.d.ts +16 -0
- package/dist/types-ts4.5/ui/ToolbarTextColor/icon.d.ts +2 -0
- package/dist/types-ts4.5/ui/ToolbarTextColor/index.d.ts +53 -0
- package/dist/types-ts4.5/ui/ToolbarTextColor/styles.d.ts +3 -0
- package/dist/types-ts4.5/utils/color.d.ts +6 -0
- package/dist/types-ts4.5/utils/disabled.d.ts +2 -0
- package/package.json +98 -0
- package/report.api.md +82 -0
- package/tmp/api-report-tmp.d.ts +54 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import type { TextColorPluginState } from '../../pm-plugins/main';
|
|
9
|
+
import type { TextColorPlugin } from '../../types';
|
|
10
|
+
export declare const messages: {
|
|
11
|
+
textColor: {
|
|
12
|
+
id: string;
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export interface State {
|
|
18
|
+
isOpen: boolean;
|
|
19
|
+
isOpenedByKeyboard: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface Props {
|
|
22
|
+
pluginState: TextColorPluginState;
|
|
23
|
+
editorView: EditorView;
|
|
24
|
+
popupsMountPoint?: HTMLElement;
|
|
25
|
+
popupsBoundariesElement?: HTMLElement;
|
|
26
|
+
popupsScrollableElement?: HTMLElement;
|
|
27
|
+
isReducedSpacing?: boolean;
|
|
28
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
pluginInjectionApi: ExtractInjectionAPI<TextColorPlugin> | undefined;
|
|
31
|
+
}
|
|
32
|
+
export declare class ToolbarTextColor extends React.Component<Props & WrappedComponentProps, State> {
|
|
33
|
+
state: State;
|
|
34
|
+
private toolbarItemRef;
|
|
35
|
+
changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => boolean;
|
|
36
|
+
render(): jsx.JSX.Element;
|
|
37
|
+
private onOpenChange;
|
|
38
|
+
private changeTextColor;
|
|
39
|
+
private toggleOpen;
|
|
40
|
+
private onKeyDown;
|
|
41
|
+
private handleOpenChange;
|
|
42
|
+
private hide;
|
|
43
|
+
private hideonEsc;
|
|
44
|
+
private getSelectedColor;
|
|
45
|
+
private getCommonAnalyticsAttributes;
|
|
46
|
+
private buildAnalyticsPalette;
|
|
47
|
+
private buildAnalyticsSelectColor;
|
|
48
|
+
private dispatchAnalyticsEvent;
|
|
49
|
+
}
|
|
50
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
51
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TextColorPluginState } from './pm-plugins/main';
|
|
2
|
+
import { pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
3
|
+
import type { TextColorPlugin } from './types';
|
|
4
|
+
export declare const textColorPlugin: TextColorPlugin;
|
|
5
|
+
export { textColorPluginKey };
|
|
6
|
+
export type { TextColorPluginState };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
|
|
4
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
export { DEFAULT_COLOR } from '../utils/color';
|
|
6
|
+
export type TextColorPluginState = {
|
|
7
|
+
palette: Array<PaletteColor>;
|
|
8
|
+
defaultColor: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
color: string | null;
|
|
11
|
+
};
|
|
12
|
+
type TextColorDefaultColor = {
|
|
13
|
+
color: string;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
export interface TextColorPluginConfig {
|
|
17
|
+
defaultColor?: TextColorDefaultColor;
|
|
18
|
+
}
|
|
19
|
+
export declare enum ACTIONS {
|
|
20
|
+
RESET_COLOR = 0,
|
|
21
|
+
SET_COLOR = 1,
|
|
22
|
+
DISABLE = 2
|
|
23
|
+
}
|
|
24
|
+
export declare const pluginKey: PluginKey<TextColorPluginState>;
|
|
25
|
+
export declare function createPlugin(dispatch: Dispatch, pluginConfig?: TextColorPluginConfig): SafePlugin;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Command, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
+
import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
|
|
4
|
+
type Config = TextColorPluginConfig | boolean;
|
|
5
|
+
export type TextColorPluginDependencies = [
|
|
6
|
+
OptionalPlugin<AnalyticsPlugin>
|
|
7
|
+
];
|
|
8
|
+
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
9
|
+
pluginConfiguration: Config | undefined;
|
|
10
|
+
dependencies: TextColorPluginDependencies;
|
|
11
|
+
actions: {
|
|
12
|
+
changeColor: (color: string) => Command;
|
|
13
|
+
};
|
|
14
|
+
sharedState: TextColorPluginState | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import type { TextColorPluginState } from '../../pm-plugins/main';
|
|
9
|
+
import type { TextColorPlugin } from '../../types';
|
|
10
|
+
export declare const messages: {
|
|
11
|
+
textColor: {
|
|
12
|
+
id: string;
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export interface State {
|
|
18
|
+
isOpen: boolean;
|
|
19
|
+
isOpenedByKeyboard: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface Props {
|
|
22
|
+
pluginState: TextColorPluginState;
|
|
23
|
+
editorView: EditorView;
|
|
24
|
+
popupsMountPoint?: HTMLElement;
|
|
25
|
+
popupsBoundariesElement?: HTMLElement;
|
|
26
|
+
popupsScrollableElement?: HTMLElement;
|
|
27
|
+
isReducedSpacing?: boolean;
|
|
28
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
pluginInjectionApi: ExtractInjectionAPI<TextColorPlugin> | undefined;
|
|
31
|
+
}
|
|
32
|
+
export declare class ToolbarTextColor extends React.Component<Props & WrappedComponentProps, State> {
|
|
33
|
+
state: State;
|
|
34
|
+
private toolbarItemRef;
|
|
35
|
+
changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => boolean;
|
|
36
|
+
render(): jsx.JSX.Element;
|
|
37
|
+
private onOpenChange;
|
|
38
|
+
private changeTextColor;
|
|
39
|
+
private toggleOpen;
|
|
40
|
+
private onKeyDown;
|
|
41
|
+
private handleOpenChange;
|
|
42
|
+
private hide;
|
|
43
|
+
private hideonEsc;
|
|
44
|
+
private getSelectedColor;
|
|
45
|
+
private getCommonAnalyticsAttributes;
|
|
46
|
+
private buildAnalyticsPalette;
|
|
47
|
+
private buildAnalyticsSelectColor;
|
|
48
|
+
private dispatchAnalyticsEvent;
|
|
49
|
+
}
|
|
50
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
51
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-text-color",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Text color plugin for @atlaskit/editor-core",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"atlassian": {
|
|
11
|
+
"team": "Editor: Lego",
|
|
12
|
+
"inPublicMirror": false,
|
|
13
|
+
"releaseModel": "continuous"
|
|
14
|
+
},
|
|
15
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
16
|
+
"main": "dist/cjs/index.js",
|
|
17
|
+
"module": "dist/esm/index.js",
|
|
18
|
+
"module:es2019": "dist/es2019/index.js",
|
|
19
|
+
"types": "dist/types/index.d.ts",
|
|
20
|
+
"typesVersions": {
|
|
21
|
+
">=4.5 <4.9": {
|
|
22
|
+
"*": [
|
|
23
|
+
"dist/types-ts4.5/*",
|
|
24
|
+
"dist/types-ts4.5/index.d.ts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"atlaskit:src": "src/index.ts",
|
|
30
|
+
"af:exports": {
|
|
31
|
+
".": "./src/index.ts"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@atlaskit/adf-schema": "^32.0.0",
|
|
35
|
+
"@atlaskit/editor-common": "^76.14.0",
|
|
36
|
+
"@atlaskit/editor-palette": "1.5.1",
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
38
|
+
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
39
|
+
"@atlaskit/editor-shared-styles": "^2.8.0",
|
|
40
|
+
"@atlaskit/editor-tables": "^2.3.0",
|
|
41
|
+
"@atlaskit/icon": "^21.12.0",
|
|
42
|
+
"@atlaskit/theme": "^12.6.0",
|
|
43
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
44
|
+
"@babel/runtime": "^7.0.0",
|
|
45
|
+
"@emotion/react": "^11.7.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "^16.8.0",
|
|
49
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@af/visual-regression": "*",
|
|
53
|
+
"@atlaskit/ssr": "*",
|
|
54
|
+
"@atlaskit/visual-regression": "*",
|
|
55
|
+
"@atlaskit/webdriver-runner": "*",
|
|
56
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
57
|
+
"@testing-library/react": "^12.1.5",
|
|
58
|
+
"react-dom": "^16.8.0",
|
|
59
|
+
"typescript": "~4.9.5",
|
|
60
|
+
"wait-for-expect": "^1.2.0"
|
|
61
|
+
},
|
|
62
|
+
"techstack": {
|
|
63
|
+
"@atlassian/frontend": {
|
|
64
|
+
"import-structure": [
|
|
65
|
+
"atlassian-conventions"
|
|
66
|
+
],
|
|
67
|
+
"circular-dependencies": [
|
|
68
|
+
"file-and-folder-level"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"@repo/internal": {
|
|
72
|
+
"dom-events": "use-bind-event-listener",
|
|
73
|
+
"analytics": [
|
|
74
|
+
"analytics-next"
|
|
75
|
+
],
|
|
76
|
+
"design-tokens": [
|
|
77
|
+
"color"
|
|
78
|
+
],
|
|
79
|
+
"theming": [
|
|
80
|
+
"react-context"
|
|
81
|
+
],
|
|
82
|
+
"ui-components": [
|
|
83
|
+
"lite-mode"
|
|
84
|
+
],
|
|
85
|
+
"deprecation": [
|
|
86
|
+
"no-deprecated-imports"
|
|
87
|
+
],
|
|
88
|
+
"styling": [
|
|
89
|
+
"static",
|
|
90
|
+
"emotion"
|
|
91
|
+
],
|
|
92
|
+
"imports": [
|
|
93
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
98
|
+
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
|
+
|
|
3
|
+
## API Report File for "@atlaskit/editor-plugin-text-color"
|
|
4
|
+
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
9
|
+
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
12
|
+
|
|
13
|
+
### Main Entry Types
|
|
14
|
+
|
|
15
|
+
<!--SECTION START: Main Entry Types-->
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
19
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
20
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
21
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
22
|
+
import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
|
|
23
|
+
|
|
24
|
+
// @public (undocumented)
|
|
25
|
+
type Config = TextColorPluginConfig | boolean;
|
|
26
|
+
|
|
27
|
+
// @public (undocumented)
|
|
28
|
+
type TextColorDefaultColor = {
|
|
29
|
+
color: string;
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
export type TextColorPlugin = NextEditorPlugin<
|
|
35
|
+
'textColor',
|
|
36
|
+
{
|
|
37
|
+
pluginConfiguration: Config | undefined;
|
|
38
|
+
dependencies: TextColorPluginDependencies;
|
|
39
|
+
actions: {
|
|
40
|
+
changeColor: (color: string) => Command;
|
|
41
|
+
};
|
|
42
|
+
sharedState: TextColorPluginState | undefined;
|
|
43
|
+
}
|
|
44
|
+
>;
|
|
45
|
+
|
|
46
|
+
// @public (undocumented)
|
|
47
|
+
export const textColorPlugin: TextColorPlugin;
|
|
48
|
+
|
|
49
|
+
// @public (undocumented)
|
|
50
|
+
export interface TextColorPluginConfig {
|
|
51
|
+
// (undocumented)
|
|
52
|
+
defaultColor?: TextColorDefaultColor;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// @public (undocumented)
|
|
56
|
+
type TextColorPluginDependencies = [OptionalPlugin<AnalyticsPlugin>];
|
|
57
|
+
|
|
58
|
+
// @public (undocumented)
|
|
59
|
+
export type TextColorPluginState = {
|
|
60
|
+
palette: Array<PaletteColor>;
|
|
61
|
+
defaultColor: string;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
color: null | string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// (No @packageDocumentation comment for this package)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
<!--SECTION END: Main Entry Types-->
|
|
70
|
+
|
|
71
|
+
### Peer Dependencies
|
|
72
|
+
|
|
73
|
+
<!--SECTION START: Peer Dependencies-->
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"react": "^16.8.0",
|
|
78
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
<!--SECTION END: Peer Dependencies-->
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-plugin-text-color"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
8
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
11
|
+
import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
|
|
12
|
+
|
|
13
|
+
// @public (undocumented)
|
|
14
|
+
type Config = TextColorPluginConfig | boolean;
|
|
15
|
+
|
|
16
|
+
// @public (undocumented)
|
|
17
|
+
type TextColorDefaultColor = {
|
|
18
|
+
color: string;
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
24
|
+
pluginConfiguration: Config | undefined;
|
|
25
|
+
dependencies: TextColorPluginDependencies;
|
|
26
|
+
actions: {
|
|
27
|
+
changeColor: (color: string) => Command;
|
|
28
|
+
};
|
|
29
|
+
sharedState: TextColorPluginState | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
|
|
32
|
+
// @public (undocumented)
|
|
33
|
+
export const textColorPlugin: TextColorPlugin;
|
|
34
|
+
|
|
35
|
+
// @public (undocumented)
|
|
36
|
+
export interface TextColorPluginConfig {
|
|
37
|
+
// (undocumented)
|
|
38
|
+
defaultColor?: TextColorDefaultColor;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
type TextColorPluginDependencies = [OptionalPlugin<AnalyticsPlugin>];
|
|
43
|
+
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
export type TextColorPluginState = {
|
|
46
|
+
palette: Array<PaletteColor>;
|
|
47
|
+
defaultColor: string;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
color: null | string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// (No @packageDocumentation comment for this package)
|
|
53
|
+
|
|
54
|
+
```
|