@atlaskit/editor-core 189.0.9 → 189.0.11
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 +13 -0
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/tasks-and-decisions/index.js +15 -5
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +16 -5
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/hooks/use-show-placeholder.js +40 -0
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +31 -31
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/tasks-and-decisions/index.js +11 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +16 -6
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/hooks/use-show-placeholder.js +36 -0
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +29 -30
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/tasks-and-decisions/index.js +11 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +16 -5
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/hooks/use-show-placeholder.js +34 -0
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +31 -32
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/tasks-and-decisions/nodeviews/hooks/use-show-placeholder.d.ts +11 -0
- package/dist/types/plugins/tasks-and-decisions/types.d.ts +4 -0
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/hooks/use-show-placeholder.d.ts +11 -0
- package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +4 -0
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/package.json +3 -2
- package/report.api.md +1 -12
- package/tmp/api-report-tmp.d.ts +1 -12
- package/dist/cjs/plugins/text-color/commands/change-color.js +0 -61
- package/dist/cjs/plugins/text-color/commands/remove-color.js +0 -59
- package/dist/cjs/plugins/text-color/commands/toggle-color.js +0 -36
- package/dist/cjs/plugins/text-color/index.js +0 -75
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -88
- package/dist/cjs/plugins/text-color/types.js +0 -5
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/icon.js +0 -29
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +0 -285
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/styles.js +0 -38
- package/dist/cjs/plugins/text-color/utils/color.js +0 -54
- package/dist/cjs/plugins/text-color/utils/disabled.js +0 -32
- package/dist/es2019/plugins/text-color/commands/change-color.js +0 -54
- package/dist/es2019/plugins/text-color/commands/remove-color.js +0 -57
- package/dist/es2019/plugins/text-color/commands/toggle-color.js +0 -30
- package/dist/es2019/plugins/text-color/index.js +0 -63
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +0 -75
- package/dist/es2019/plugins/text-color/types.js +0 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/icon.js +0 -20
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +0 -265
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/styles.js +0 -48
- package/dist/es2019/plugins/text-color/utils/color.js +0 -48
- package/dist/es2019/plugins/text-color/utils/disabled.js +0 -39
- package/dist/esm/plugins/text-color/commands/change-color.js +0 -56
- package/dist/esm/plugins/text-color/commands/remove-color.js +0 -53
- package/dist/esm/plugins/text-color/commands/toggle-color.js +0 -30
- package/dist/esm/plugins/text-color/index.js +0 -63
- package/dist/esm/plugins/text-color/pm-plugins/main.js +0 -75
- package/dist/esm/plugins/text-color/types.js +0 -1
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/icon.js +0 -22
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +0 -282
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/styles.js +0 -28
- package/dist/esm/plugins/text-color/utils/color.js +0 -48
- package/dist/esm/plugins/text-color/utils/disabled.js +0 -26
- package/dist/types/plugins/text-color/commands/change-color.d.ts +0 -3
- package/dist/types/plugins/text-color/commands/remove-color.d.ts +0 -2
- package/dist/types/plugins/text-color/commands/toggle-color.d.ts +0 -2
- package/dist/types/plugins/text-color/index.d.ts +0 -7
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +0 -25
- package/dist/types/plugins/text-color/types.d.ts +0 -10
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/icon.d.ts +0 -2
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -53
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/styles.d.ts +0 -3
- package/dist/types/plugins/text-color/utils/color.d.ts +0 -6
- package/dist/types/plugins/text-color/utils/disabled.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/commands/change-color.d.ts +0 -3
- package/dist/types-ts4.5/plugins/text-color/commands/remove-color.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/commands/toggle-color.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/index.d.ts +0 -7
- package/dist/types-ts4.5/plugins/text-color/pm-plugins/main.d.ts +0 -25
- package/dist/types-ts4.5/plugins/text-color/types.d.ts +0 -12
- package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/icon.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -53
- package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/styles.d.ts +0 -3
- package/dist/types-ts4.5/plugins/text-color/utils/color.d.ts +0 -6
- package/dist/types-ts4.5/plugins/text-color/utils/disabled.d.ts +0 -2
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
-
import type { TextColorPluginConfig } from './pm-plugins/main';
|
|
4
|
-
type Config = TextColorPluginConfig | boolean;
|
|
5
|
-
export type TextColorPluginDependencies = [OptionalPlugin<AnalyticsPlugin>];
|
|
6
|
-
export type TextColorPlugin = NextEditorPlugin<'textColor', {
|
|
7
|
-
pluginConfiguration: Config | undefined;
|
|
8
|
-
dependencies: TextColorPluginDependencies;
|
|
9
|
-
}>;
|
|
10
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
-
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
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;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TextColorPluginState } from './pm-plugins/main';
|
|
2
|
-
import { pluginKey as textColorPluginKey } from './pm-plugins/main';
|
|
3
|
-
import type { TextColorPlugin } from './types';
|
|
4
|
-
declare const textColorPlugin: TextColorPlugin;
|
|
5
|
-
export { textColorPluginKey };
|
|
6
|
-
export type { TextColorPluginState };
|
|
7
|
-
export default textColorPlugin;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
-
import type { TextColorPluginConfig } 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
|
-
}>;
|
|
12
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
6
|
-
import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
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;
|