@atlaskit/editor-core 189.0.10 → 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.
Files changed (72) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/plugins/index.js +0 -7
  3. package/dist/cjs/presets/universal.js +2 -1
  4. package/dist/cjs/version-wrapper.js +1 -1
  5. package/dist/es2019/plugins/index.js +0 -1
  6. package/dist/es2019/presets/universal.js +2 -1
  7. package/dist/es2019/version-wrapper.js +1 -1
  8. package/dist/esm/plugins/index.js +0 -1
  9. package/dist/esm/presets/universal.js +2 -1
  10. package/dist/esm/version-wrapper.js +1 -1
  11. package/dist/types/plugins/index.d.ts +0 -1
  12. package/dist/types/types/editor-props.d.ts +1 -1
  13. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  14. package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
  15. package/package.json +3 -2
  16. package/report.api.md +1 -12
  17. package/tmp/api-report-tmp.d.ts +1 -12
  18. package/dist/cjs/plugins/text-color/commands/change-color.js +0 -61
  19. package/dist/cjs/plugins/text-color/commands/remove-color.js +0 -59
  20. package/dist/cjs/plugins/text-color/commands/toggle-color.js +0 -36
  21. package/dist/cjs/plugins/text-color/index.js +0 -75
  22. package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -88
  23. package/dist/cjs/plugins/text-color/types.js +0 -5
  24. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/icon.js +0 -29
  25. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +0 -285
  26. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/styles.js +0 -38
  27. package/dist/cjs/plugins/text-color/utils/color.js +0 -54
  28. package/dist/cjs/plugins/text-color/utils/disabled.js +0 -32
  29. package/dist/es2019/plugins/text-color/commands/change-color.js +0 -54
  30. package/dist/es2019/plugins/text-color/commands/remove-color.js +0 -57
  31. package/dist/es2019/plugins/text-color/commands/toggle-color.js +0 -30
  32. package/dist/es2019/plugins/text-color/index.js +0 -63
  33. package/dist/es2019/plugins/text-color/pm-plugins/main.js +0 -75
  34. package/dist/es2019/plugins/text-color/types.js +0 -1
  35. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/icon.js +0 -20
  36. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +0 -265
  37. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/styles.js +0 -48
  38. package/dist/es2019/plugins/text-color/utils/color.js +0 -48
  39. package/dist/es2019/plugins/text-color/utils/disabled.js +0 -39
  40. package/dist/esm/plugins/text-color/commands/change-color.js +0 -56
  41. package/dist/esm/plugins/text-color/commands/remove-color.js +0 -53
  42. package/dist/esm/plugins/text-color/commands/toggle-color.js +0 -30
  43. package/dist/esm/plugins/text-color/index.js +0 -63
  44. package/dist/esm/plugins/text-color/pm-plugins/main.js +0 -75
  45. package/dist/esm/plugins/text-color/types.js +0 -1
  46. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/icon.js +0 -22
  47. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +0 -282
  48. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/styles.js +0 -28
  49. package/dist/esm/plugins/text-color/utils/color.js +0 -48
  50. package/dist/esm/plugins/text-color/utils/disabled.js +0 -26
  51. package/dist/types/plugins/text-color/commands/change-color.d.ts +0 -3
  52. package/dist/types/plugins/text-color/commands/remove-color.d.ts +0 -2
  53. package/dist/types/plugins/text-color/commands/toggle-color.d.ts +0 -2
  54. package/dist/types/plugins/text-color/index.d.ts +0 -7
  55. package/dist/types/plugins/text-color/pm-plugins/main.d.ts +0 -25
  56. package/dist/types/plugins/text-color/types.d.ts +0 -10
  57. package/dist/types/plugins/text-color/ui/ToolbarTextColor/icon.d.ts +0 -2
  58. package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -53
  59. package/dist/types/plugins/text-color/ui/ToolbarTextColor/styles.d.ts +0 -3
  60. package/dist/types/plugins/text-color/utils/color.d.ts +0 -6
  61. package/dist/types/plugins/text-color/utils/disabled.d.ts +0 -2
  62. package/dist/types-ts4.5/plugins/text-color/commands/change-color.d.ts +0 -3
  63. package/dist/types-ts4.5/plugins/text-color/commands/remove-color.d.ts +0 -2
  64. package/dist/types-ts4.5/plugins/text-color/commands/toggle-color.d.ts +0 -2
  65. package/dist/types-ts4.5/plugins/text-color/index.d.ts +0 -7
  66. package/dist/types-ts4.5/plugins/text-color/pm-plugins/main.d.ts +0 -25
  67. package/dist/types-ts4.5/plugins/text-color/types.d.ts +0 -12
  68. package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/icon.d.ts +0 -2
  69. package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -53
  70. package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/styles.d.ts +0 -3
  71. package/dist/types-ts4.5/plugins/text-color/utils/color.d.ts +0 -6
  72. package/dist/types-ts4.5/plugins/text-color/utils/disabled.d.ts +0 -2
@@ -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,3 +0,0 @@
1
- export declare const textColorIconWrapper: import("@emotion/react").SerializedStyles;
2
- export declare const textColorIconBar: import("@emotion/react").SerializedStyles;
3
- export declare const backgroundDisabled: import("@emotion/react").SerializedStyles;
@@ -1,6 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare const DEFAULT_COLOR: {
3
- color: string;
4
- label: string;
5
- };
6
- export declare const getActiveColor: (state: EditorState) => string | null;
@@ -1,2 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare const getDisabledState: (state: EditorState) => boolean;
@@ -1,3 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
3
- export declare const changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
@@ -1,2 +0,0 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
2
- export declare const removeColor: () => Command;
@@ -1,2 +0,0 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
2
- export declare const toggleColor: (color: string) => Command;
@@ -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,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const EditorTextColorIcon: () => JSX.Element;
@@ -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,3 +0,0 @@
1
- export declare const textColorIconWrapper: import("@emotion/react").SerializedStyles;
2
- export declare const textColorIconBar: import("@emotion/react").SerializedStyles;
3
- export declare const backgroundDisabled: import("@emotion/react").SerializedStyles;
@@ -1,6 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare const DEFAULT_COLOR: {
3
- color: string;
4
- label: string;
5
- };
6
- export declare const getActiveColor: (state: EditorState) => string | null;
@@ -1,2 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare const getDisabledState: (state: EditorState) => boolean;