@atlaskit/editor-plugin-text-color 11.1.3 → 11.1.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/main/package.json +1 -8
  3. package/package.json +2 -2
  4. package/text-color-plugin/package.json +1 -8
  5. package/text-color-plugin-type/package.json +1 -8
  6. package/types/package.json +1 -8
  7. package/dist/types-ts4.5/editor-commands/change-color.d.ts +0 -4
  8. package/dist/types-ts4.5/editor-commands/palette.d.ts +0 -4
  9. package/dist/types-ts4.5/editor-commands/remove-color.d.ts +0 -2
  10. package/dist/types-ts4.5/editor-commands/toggle-color.d.ts +0 -2
  11. package/dist/types-ts4.5/entry-points/main.d.ts +0 -1
  12. package/dist/types-ts4.5/entry-points/text-color-plugin-type.d.ts +0 -1
  13. package/dist/types-ts4.5/entry-points/text-color-plugin.d.ts +0 -1
  14. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  15. package/dist/types-ts4.5/index.d.ts +0 -4
  16. package/dist/types-ts4.5/pm-plugins/commands/change-color.d.ts +0 -4
  17. package/dist/types-ts4.5/pm-plugins/commands/remove-color.d.ts +0 -2
  18. package/dist/types-ts4.5/pm-plugins/commands/toggle-color.d.ts +0 -2
  19. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -6
  20. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -40
  21. package/dist/types-ts4.5/pm-plugins/utils/color.d.ts +0 -6
  22. package/dist/types-ts4.5/pm-plugins/utils/constants.d.ts +0 -5
  23. package/dist/types-ts4.5/pm-plugins/utils/disabled.d.ts +0 -6
  24. package/dist/types-ts4.5/pm-plugins/utils/inputType.d.ts +0 -3
  25. package/dist/types-ts4.5/textColorPlugin.d.ts +0 -2
  26. package/dist/types-ts4.5/textColorPluginType.d.ts +0 -32
  27. package/dist/types-ts4.5/types/index.d.ts +0 -6
  28. package/dist/types-ts4.5/ui/FloatingToolbarComponent.d.ts +0 -12
  29. package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +0 -17
  30. package/dist/types-ts4.5/ui/RemoveColorMenuItem.d.ts +0 -9
  31. package/dist/types-ts4.5/ui/TextColorHighlightMenu.d.ts +0 -9
  32. package/dist/types-ts4.5/ui/TextColorMenuItem.d.ts +0 -10
  33. package/dist/types-ts4.5/ui/TextMenuSection.d.ts +0 -7
  34. package/dist/types-ts4.5/ui/ToolbarTextColor/icon.d.ts +0 -2
  35. package/dist/types-ts4.5/ui/ToolbarTextColor/index.d.ts +0 -48
  36. package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 11.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 11.1.3
4
10
 
5
11
  ### Patch Changes
package/main/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/main.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/main.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/main.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "11.1.3",
3
+ "version": "11.1.4",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
50
50
  "@atlaskit/platform-feature-flags-react": "^0.5.0",
51
51
  "@atlaskit/primitives": "^19.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
53
53
  "@atlaskit/tokens": "^13.4.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1"
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/text-color-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/text-color-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/text-color-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/text-color-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/text-color-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/text-color-plugin-type.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1,4 +0,0 @@
1
- import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { TextColorPlugin } from '../textColorPluginType';
3
- import type { TextColorInputMethod } from '../types';
4
- export declare const changeColor: (color: string, api: ExtractInjectionAPI<TextColorPlugin> | undefined, inputMethod?: TextColorInputMethod) => EditorCommand;
@@ -1,4 +0,0 @@
1
- import type { EditorCommand, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { TextColorPlugin } from '../textColorPluginType';
3
- export declare const togglePalette: (api: ExtractInjectionAPI<TextColorPlugin> | undefined) => EditorCommand;
4
- export declare const setPalette: (isPaletteOpen: boolean) => EditorCommand;
@@ -1,2 +0,0 @@
1
- import type { EditorCommand } from '@atlaskit/editor-common/types';
2
- export declare const removeColor: EditorCommand;
@@ -1,2 +0,0 @@
1
- import type { EditorCommand } from '@atlaskit/editor-common/types';
2
- export declare const toggleColor: (color: string) => EditorCommand;
@@ -1 +0,0 @@
1
- export type { TextColorPluginState, TextColorPluginConfig } from '../pm-plugins/main';
@@ -1 +0,0 @@
1
- export type { TextColorPlugin, TextColorPluginOptions, Dependencies } from '../textColorPluginType';
@@ -1 +0,0 @@
1
- export { textColorPlugin } from '../textColorPlugin';
@@ -1 +0,0 @@
1
- export type { TextColorInputMethod } from '../types/index';
@@ -1,4 +0,0 @@
1
- export { textColorPlugin } from './textColorPlugin';
2
- export type { TextColorPlugin, TextColorPluginOptions, Dependencies } from './textColorPluginType';
3
- export type { TextColorInputMethod } from './types';
4
- export type { TextColorPluginState, TextColorPluginConfig } from './pm-plugins/main';
@@ -1,4 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
3
- import type { TextColorInputMethod } from '../../types';
4
- export declare const changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined, inputMethod?: TextColorInputMethod) => 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,6 +0,0 @@
1
- import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { TextColorPlugin } from '../textColorPluginType';
4
- export declare function keymapPlugin({ api }: {
5
- api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
- }): SafePlugin;
@@ -1,40 +0,0 @@
1
- import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
- import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- import type { PluginToolbarComponentConfig } from '@atlaskit/editor-common/toolbar';
4
- import type { PaletteColor } from '@atlaskit/editor-common/ui-color';
5
- import { PluginKey } from '@atlaskit/editor-prosemirror/state';
6
- export type TextColorPluginState = {
7
- color: string | null;
8
- defaultColor: string;
9
- disabled?: boolean;
10
- isPaletteOpen?: boolean;
11
- palette: Array<PaletteColor>;
12
- };
13
- type TextColorDefaultColor = {
14
- color: string;
15
- label: string;
16
- };
17
- export interface TextColorPluginConfig {
18
- defaultColor?: TextColorDefaultColor;
19
- /**
20
- * Optional configuration to control this plugin's toolbar components.
21
- * @default { enabled: true }
22
- * @example
23
- * To hide toolbar component, set `enabled` to `false`.
24
- * ```ts
25
- * toolbarConfig: {
26
- * enabled: false,
27
- * },
28
- * ```
29
- */
30
- toolbarConfig?: Exclude<PluginToolbarComponentConfig, 'showAt'>;
31
- }
32
- export declare enum ACTIONS {
33
- RESET_COLOR = 0,
34
- SET_COLOR = 1,
35
- DISABLE = 2,
36
- SET_PALETTE = 3
37
- }
38
- export declare const pluginKey: PluginKey<TextColorPluginState>;
39
- export declare function createPlugin(dispatch: Dispatch, pluginConfig?: TextColorPluginConfig): SafePlugin;
40
- export {};
@@ -1,6 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- /**
3
- * Use getDisabledStateNew instead and pass in `tr`
4
- */
5
- export declare const getActiveColor: (state: EditorState) => string | null;
6
- export declare const getActiveColorNew: (tr: Transaction) => string | null;
@@ -1,5 +0,0 @@
1
- export declare const overrideMarks: string[];
2
- export declare const DEFAULT_COLOR: {
3
- color: string;
4
- label: string;
5
- };
@@ -1,6 +0,0 @@
1
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- /**
3
- * Use getDisabledStateNew instead and pass in `tr`
4
- */
5
- export declare const getDisabledState: (state: EditorState) => boolean;
6
- export declare const getDisabledStateNew: (tr: Transaction) => boolean;
@@ -1,3 +0,0 @@
1
- import type { TextColorInputMethod } from '../../types';
2
- import { ToolbarType } from '../../types';
3
- export declare const getInputMethod: (toolbarType: ToolbarType) => TextColorInputMethod;
@@ -1,2 +0,0 @@
1
- import type { TextColorPlugin } from './textColorPluginType';
2
- export declare const textColorPlugin: TextColorPlugin;
@@ -1,32 +0,0 @@
1
- import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
- import type { HighlightPlugin } from '@atlaskit/editor-plugin-highlight';
4
- import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
5
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
6
- import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
7
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
8
- import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
9
- import type { TextColorPluginConfig, TextColorPluginState } from './pm-plugins/main';
10
- import type { TextColorInputMethod } from './types';
11
- export type TextColorPluginOptions = TextColorPluginConfig | boolean;
12
- export type Dependencies = [
13
- OptionalPlugin<AnalyticsPlugin>,
14
- OptionalPlugin<PrimaryToolbarPlugin>,
15
- OptionalPlugin<SelectionToolbarPlugin>,
16
- OptionalPlugin<ToolbarPlugin>,
17
- OptionalPlugin<UserPreferencesPlugin>,
18
- OptionalPlugin<HighlightPlugin>,
19
- OptionalPlugin<InteractionPlugin>
20
- ];
21
- export type TextColorPlugin = NextEditorPlugin<'textColor', {
22
- actions: {
23
- changeColor: (color: string, inputMethod?: TextColorInputMethod) => Command;
24
- };
25
- commands: {
26
- changeColor: (color: string, inputMethod?: TextColorInputMethod) => EditorCommand;
27
- setPalette: (isPaletteOpen: boolean) => EditorCommand;
28
- };
29
- dependencies: Dependencies;
30
- pluginConfiguration: TextColorPluginOptions | undefined;
31
- sharedState: TextColorPluginState | undefined;
32
- }>;
@@ -1,6 +0,0 @@
1
- import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- export type TextColorInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
3
- export declare enum ToolbarType {
4
- PRIMARY = "primaryToolbar",
5
- FLOATING = "floatingToolbar"
6
- }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TextColorPlugin } from '../textColorPluginType';
6
- interface FloatingToolbarComponentProps {
7
- api: ExtractInjectionAPI<TextColorPlugin> | undefined;
8
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
9
- editorView: EditorView;
10
- }
11
- export declare const FloatingToolbarComponent: ({ api, editorView, dispatchAnalyticsEvent, }: FloatingToolbarComponentProps) => React.JSX.Element | null;
12
- export {};
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import type { TextColorPlugin } from '../textColorPluginType';
6
- interface PrimaryToolbarComponentProps {
7
- api: ExtractInjectionAPI<TextColorPlugin> | undefined;
8
- disabled: boolean;
9
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
10
- editorView: EditorView;
11
- isReducedSpacing: boolean;
12
- popupsBoundariesElement?: HTMLElement;
13
- popupsMountPoint?: HTMLElement;
14
- popupsScrollableElement?: HTMLElement;
15
- }
16
- export declare const PrimaryToolbarComponent: ({ api, isReducedSpacing, editorView, popupsMountPoint, popupsScrollableElement, popupsBoundariesElement, dispatchAnalyticsEvent, disabled, }: PrimaryToolbarComponentProps) => React.JSX.Element | null;
17
- export {};
@@ -1,9 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
3
- import type { TextColorPlugin } from '../textColorPluginType';
4
- type RemoveColorMenuItemButtonProps = {
5
- api?: ExtractInjectionAPI<TextColorPlugin>;
6
- parents: ToolbarComponentTypes;
7
- };
8
- export declare const RemoveColorMenuItem: ({ api, parents, }: RemoveColorMenuItemButtonProps) => JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { TextColorPlugin } from '../textColorPluginType';
4
- interface TextColorHighlightMenuProps {
5
- api: ExtractInjectionAPI<TextColorPlugin> | undefined;
6
- children: React.ReactNode;
7
- }
8
- export declare const TextColorHighlightMenu: ({ children, api, }: TextColorHighlightMenuProps) => React.JSX.Element;
9
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
4
- import type { TextColorPlugin } from '../textColorPluginType';
5
- interface TextColorMenuItemProps {
6
- api: ExtractInjectionAPI<TextColorPlugin> | undefined;
7
- parents: ToolbarComponentTypes;
8
- }
9
- export declare function TextColorMenuItem({ api, parents }: TextColorMenuItemProps): React.JSX.Element;
10
- export {};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { CommonComponentProps } from '@atlaskit/editor-toolbar-model';
3
- type TextMenuSectionProps = {
4
- children: React.ReactNode;
5
- } & CommonComponentProps;
6
- export declare const TextMenuSection: ({ children, parents }: TextMenuSectionProps) => React.JSX.Element;
7
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const EditorTextColorIcon: () => React.JSX.Element;
@@ -1,48 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
8
- import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
9
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
10
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
- import type { TextColorPluginState } from '../../pm-plugins/main';
12
- import type { TextColorPlugin } from '../../textColorPluginType';
13
- import { ToolbarType } from '../../types';
14
- export interface State {
15
- isOpen: boolean;
16
- isOpenedByKeyboard: boolean;
17
- }
18
- export interface Props {
19
- disabled?: boolean;
20
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
21
- editorView: EditorView;
22
- isReducedSpacing?: boolean;
23
- pluginInjectionApi: ExtractInjectionAPI<TextColorPlugin> | undefined;
24
- pluginState: TextColorPluginState;
25
- popupsBoundariesElement?: HTMLElement;
26
- popupsMountPoint?: HTMLElement;
27
- popupsScrollableElement?: HTMLElement;
28
- toolbarType: ToolbarType;
29
- }
30
- export declare class ToolbarTextColor extends React.Component<Props & WrappedComponentProps, State> {
31
- state: State;
32
- private toolbarItemRef;
33
- changeColor: (color: string, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => boolean;
34
- render(): jsx.JSX.Element;
35
- private changeTextColor;
36
- private toggleOpen;
37
- private onKeyDown;
38
- private handleOpenChange;
39
- private hide;
40
- private hideonEsc;
41
- private getSelectedColor;
42
- private buildAnalyticsPalette;
43
- private dispatchAnalyticsEvent;
44
- }
45
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
46
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
47
- };
48
- export default _default_1;
@@ -1,4 +0,0 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
3
- import type { TextColorPlugin } from '../textColorPluginType';
4
- export declare const getToolbarComponents: (api: ExtractInjectionAPI<TextColorPlugin> | undefined) => RegisterComponent[];