@atlaskit/editor-plugin-text-formatting 3.0.10 → 3.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 +10 -0
- package/dist/types/editor-commands/utils/marks.d.ts +1 -1
- package/dist/types/ui/Toolbar/components/Component.d.ts +2 -2
- package/dist/types/ui/Toolbar/components/utils.d.ts +4 -4
- package/dist/types/ui/Toolbar/formatting-in-selection-utils.d.ts +2 -2
- package/dist/types/ui/Toolbar/index.d.ts +0 -1
- package/dist/types/ui/Toolbar/single-toolbar-buttons.d.ts +1 -1
- package/dist/types/ui/Toolbar/types.d.ts +0 -1
- package/dist/types-ts4.5/editor-commands/utils/marks.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/components/Component.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/components/utils.d.ts +4 -4
- package/dist/types-ts4.5/ui/Toolbar/formatting-in-selection-utils.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/Toolbar/single-toolbar-buttons.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/types.d.ts +0 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-text-formatting
|
|
2
2
|
|
|
3
|
+
## 3.0.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#199487](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199487)
|
|
8
|
+
[`54098ba4cc83c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/54098ba4cc83c) -
|
|
9
|
+
Add LinkSection and TextSection and add logic to hide them when toolbar is pinned. Add
|
|
10
|
+
UserPreferencesPlugin and EditorViewModePlugin as a dependency to editor-plugin-toolbar.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 3.0.10
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -10,5 +10,5 @@ import type { TextFormattingPlugin } from '../../textFormattingPluginType';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const nextToggleMark: (markType: MarkType, api: ExtractInjectionAPI<TextFormattingPlugin> | undefined, attrs?: {
|
|
12
12
|
[key: string]: any;
|
|
13
|
-
}
|
|
13
|
+
}) => EditorCommand;
|
|
14
14
|
export declare const nextApplyMarkOnRange: (from: number, to: number, removeMark: boolean, mark: Mark, tr: Transaction, api: ExtractInjectionAPI<TextFormattingPlugin> | undefined) => Transaction;
|
|
@@ -4,8 +4,8 @@ import { type ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
|
4
4
|
import type { FormatComponentProps } from './utils';
|
|
5
5
|
export declare const FormatMenuItem: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element | null;
|
|
6
6
|
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, groupLocation, }: FormatComponentProps) => React.JSX.Element;
|
|
7
|
-
export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatComponentProps,
|
|
7
|
+
export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatComponentProps, "api" | "parents">) => React.JSX.Element | null;
|
|
8
8
|
export declare const MoreFormattingMenu: ({ children, groupLocation, }: {
|
|
9
9
|
children?: ReactNode;
|
|
10
|
-
groupLocation?: ToolbarButtonGroupLocation
|
|
10
|
+
groupLocation?: ToolbarButtonGroupLocation;
|
|
11
11
|
}) => React.JSX.Element;
|
|
@@ -2,13 +2,13 @@ import type { MessageDescriptor } from 'react-intl-next';
|
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { type IconComponent, type ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
6
6
|
import type { ToggleMarkWithAnalyticsEditorCommand, ClearFormattingWithAnalyticsEditorCommand } from '../../../editor-commands/types';
|
|
7
7
|
import { type TextFormattingPlugin } from '../../../textFormattingPluginType';
|
|
8
8
|
import type { FormatOptions } from '../types';
|
|
9
9
|
export type FormatComponentProps = {
|
|
10
10
|
api?: ExtractInjectionAPI<TextFormattingPlugin>;
|
|
11
|
-
parents:
|
|
11
|
+
parents: ToolbarComponentTypes;
|
|
12
12
|
icon: IconComponent;
|
|
13
13
|
shortcut: Keymap;
|
|
14
14
|
title: MessageDescriptor;
|
|
@@ -17,8 +17,8 @@ export type FormatComponentProps = {
|
|
|
17
17
|
ariaLabel?: string;
|
|
18
18
|
groupLocation?: ToolbarButtonGroupLocation;
|
|
19
19
|
};
|
|
20
|
-
export declare const getInputMethodFromParentKeys: (parentKeys:
|
|
21
|
-
export declare const useComponentInfo: ({ api, optionType, title, shortcut, toggleMarkWithAnalyticsCallback, parents, }: Omit<FormatComponentProps,
|
|
20
|
+
export declare const getInputMethodFromParentKeys: (parentKeys: ToolbarComponentTypes) => import("@atlaskit/editor-common/types").InputMethodToolbar;
|
|
21
|
+
export declare const useComponentInfo: ({ api, optionType, title, shortcut, toggleMarkWithAnalyticsCallback, parents, }: Omit<FormatComponentProps, "icon" | "ariaLabel" | "groupLocation">) => {
|
|
22
22
|
formatTitle: string;
|
|
23
23
|
shortcutContent: string | undefined;
|
|
24
24
|
ariaLabel: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const hasMultiplePartsWithFormattingInSelection: ({ selectedContent, }: {
|
|
3
|
-
selectedContent?: PMNode[]
|
|
3
|
+
selectedContent?: PMNode[];
|
|
4
4
|
}) => boolean;
|
|
5
5
|
export declare const getCommonActiveMarks: ({ selectedContent }: {
|
|
6
|
-
selectedContent?: PMNode[]
|
|
6
|
+
selectedContent?: PMNode[];
|
|
7
7
|
}) => string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import type { ExtractInjectionAPI, TextFormattingState, ToolbarSize } from '@atlaskit/editor-common/types';
|
|
@@ -10,5 +10,5 @@ export declare const SingleToolbarButtons: React.MemoExoticComponent<({ items, i
|
|
|
10
10
|
items: MenuIconItem[];
|
|
11
11
|
isReducedSpacing: boolean;
|
|
12
12
|
editorView: EditorView;
|
|
13
|
-
hasMultiplePartsWithFormattingSelected?: boolean
|
|
13
|
+
hasMultiplePartsWithFormattingSelected?: boolean;
|
|
14
14
|
}) => jsx.JSX.Element>;
|
|
@@ -10,5 +10,5 @@ import type { TextFormattingPlugin } from '../../textFormattingPluginType';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const nextToggleMark: (markType: MarkType, api: ExtractInjectionAPI<TextFormattingPlugin> | undefined, attrs?: {
|
|
12
12
|
[key: string]: any;
|
|
13
|
-
}
|
|
13
|
+
}) => EditorCommand;
|
|
14
14
|
export declare const nextApplyMarkOnRange: (from: number, to: number, removeMark: boolean, mark: Mark, tr: Transaction, api: ExtractInjectionAPI<TextFormattingPlugin> | undefined) => Transaction;
|
|
@@ -4,8 +4,8 @@ import { type ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
|
4
4
|
import type { FormatComponentProps } from './utils';
|
|
5
5
|
export declare const FormatMenuItem: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, }: FormatComponentProps) => React.JSX.Element | null;
|
|
6
6
|
export declare const FormatButton: ({ parents, api, optionType, toggleMarkWithAnalyticsCallback, icon, shortcut, title, groupLocation, }: FormatComponentProps) => React.JSX.Element;
|
|
7
|
-
export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatComponentProps,
|
|
7
|
+
export declare const ClearFormatMenuItem: ({ api, parents, }: Pick<FormatComponentProps, "api" | "parents">) => React.JSX.Element | null;
|
|
8
8
|
export declare const MoreFormattingMenu: ({ children, groupLocation, }: {
|
|
9
9
|
children?: ReactNode;
|
|
10
|
-
groupLocation?: ToolbarButtonGroupLocation
|
|
10
|
+
groupLocation?: ToolbarButtonGroupLocation;
|
|
11
11
|
}) => React.JSX.Element;
|
|
@@ -2,13 +2,13 @@ import type { MessageDescriptor } from 'react-intl-next';
|
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { type IconComponent, type ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
5
|
-
import type {
|
|
5
|
+
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
6
6
|
import type { ToggleMarkWithAnalyticsEditorCommand, ClearFormattingWithAnalyticsEditorCommand } from '../../../editor-commands/types';
|
|
7
7
|
import { type TextFormattingPlugin } from '../../../textFormattingPluginType';
|
|
8
8
|
import type { FormatOptions } from '../types';
|
|
9
9
|
export type FormatComponentProps = {
|
|
10
10
|
api?: ExtractInjectionAPI<TextFormattingPlugin>;
|
|
11
|
-
parents:
|
|
11
|
+
parents: ToolbarComponentTypes;
|
|
12
12
|
icon: IconComponent;
|
|
13
13
|
shortcut: Keymap;
|
|
14
14
|
title: MessageDescriptor;
|
|
@@ -17,8 +17,8 @@ export type FormatComponentProps = {
|
|
|
17
17
|
ariaLabel?: string;
|
|
18
18
|
groupLocation?: ToolbarButtonGroupLocation;
|
|
19
19
|
};
|
|
20
|
-
export declare const getInputMethodFromParentKeys: (parentKeys:
|
|
21
|
-
export declare const useComponentInfo: ({ api, optionType, title, shortcut, toggleMarkWithAnalyticsCallback, parents, }: Omit<FormatComponentProps,
|
|
20
|
+
export declare const getInputMethodFromParentKeys: (parentKeys: ToolbarComponentTypes) => import("@atlaskit/editor-common/types").InputMethodToolbar;
|
|
21
|
+
export declare const useComponentInfo: ({ api, optionType, title, shortcut, toggleMarkWithAnalyticsCallback, parents, }: Omit<FormatComponentProps, "icon" | "ariaLabel" | "groupLocation">) => {
|
|
22
22
|
formatTitle: string;
|
|
23
23
|
shortcutContent: string | undefined;
|
|
24
24
|
ariaLabel: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const hasMultiplePartsWithFormattingInSelection: ({ selectedContent, }: {
|
|
3
|
-
selectedContent?: PMNode[]
|
|
3
|
+
selectedContent?: PMNode[];
|
|
4
4
|
}) => boolean;
|
|
5
5
|
export declare const getCommonActiveMarks: ({ selectedContent }: {
|
|
6
|
-
selectedContent?: PMNode[]
|
|
6
|
+
selectedContent?: PMNode[];
|
|
7
7
|
}) => string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
3
|
import type { ExtractInjectionAPI, TextFormattingState, ToolbarSize } from '@atlaskit/editor-common/types';
|
|
@@ -10,5 +10,5 @@ export declare const SingleToolbarButtons: React.MemoExoticComponent<({ items, i
|
|
|
10
10
|
items: MenuIconItem[];
|
|
11
11
|
isReducedSpacing: boolean;
|
|
12
12
|
editorView: EditorView;
|
|
13
|
-
hasMultiplePartsWithFormattingSelected?: boolean
|
|
13
|
+
hasMultiplePartsWithFormattingSelected?: boolean;
|
|
14
14
|
}) => jsx.JSX.Element>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-text-formatting",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.11",
|
|
4
4
|
"description": "Text-formatting plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-base": "^4.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection-toolbar": "^4.3.0",
|
|
40
|
-
"@atlaskit/editor-plugin-toolbar": "^0.
|
|
40
|
+
"@atlaskit/editor-plugin-toolbar": "^0.2.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
42
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
42
|
+
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
45
|
-
"@atlaskit/editor-toolbar-model": "^0.0
|
|
46
|
-
"@atlaskit/icon": "^27.
|
|
44
|
+
"@atlaskit/editor-toolbar": "^0.2.0",
|
|
45
|
+
"@atlaskit/editor-toolbar-model": "^0.1.0",
|
|
46
|
+
"@atlaskit/icon": "^27.11.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
48
|
"@atlaskit/prosemirror-input-rules": "^3.4.0",
|
|
49
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
49
|
+
"@atlaskit/tmp-editor-statsig": "^9.27.0",
|
|
50
50
|
"@atlaskit/tokens": "^6.0.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|
|
52
52
|
"@emotion/react": "^11.7.1",
|
|
53
53
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^107.
|
|
56
|
+
"@atlaskit/editor-common": "^107.20.0",
|
|
57
57
|
"react": "^18.2.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|