@atlaskit/editor-plugin-alignment 4.2.7 → 4.2.9
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 +14 -0
- package/dist/types/alignmentPluginType.d.ts +1 -1
- package/dist/types/ui/Alignment/AlignmentButton/index.d.ts +3 -3
- package/dist/types/ui/Alignment/index.d.ts +2 -2
- package/dist/types/ui/PrimaryToolbarComponent.d.ts +3 -3
- package/dist/types/ui/Toolbar/AlignmentMenu.d.ts +1 -1
- package/dist/types/ui/Toolbar/AlignmentMenuItem.d.ts +2 -2
- package/dist/types/ui/Toolbar/types.d.ts +3 -3
- package/dist/types/ui/ToolbarAlignment/index.d.ts +4 -4
- package/dist/types-ts4.5/alignmentPluginType.d.ts +1 -1
- package/dist/types-ts4.5/ui/Alignment/AlignmentButton/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/Alignment/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +3 -3
- package/dist/types-ts4.5/ui/Toolbar/AlignmentMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/Toolbar/AlignmentMenuItem.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/types.d.ts +3 -3
- package/dist/types-ts4.5/ui/ToolbarAlignment/index.d.ts +4 -4
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 4.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.2.8
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.2.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -14,7 +14,7 @@ export type AlignmentPluginDependencies = [
|
|
|
14
14
|
OptionalPlugin<ToolbarPlugin>
|
|
15
15
|
];
|
|
16
16
|
export type AlignmentPlugin = NextEditorPlugin<'alignment', {
|
|
17
|
-
sharedState: AlignmentPluginState | undefined;
|
|
18
17
|
dependencies: AlignmentPluginDependencies;
|
|
18
|
+
sharedState: AlignmentPluginState | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
export type InputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT;
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import type { AlignmentState } from '../../../pm-plugins/types';
|
|
4
4
|
export interface Props {
|
|
5
|
-
|
|
6
|
-
label: string;
|
|
5
|
+
content: React.ReactElement;
|
|
7
6
|
isSelected?: boolean;
|
|
7
|
+
label: string;
|
|
8
8
|
onClick: (value: AlignmentState, shouldClosePopup: boolean) => void;
|
|
9
|
-
content: React.ReactElement;
|
|
10
9
|
shortcut?: Keymap;
|
|
10
|
+
value: AlignmentState;
|
|
11
11
|
}
|
|
12
12
|
declare function AlignmentButton({ label, isSelected, content, shortcut, onClick, value }: Props): React.JSX.Element;
|
|
13
13
|
export default AlignmentButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
2
|
import type { AlignmentState } from '../../pm-plugins/types';
|
|
3
3
|
export interface Props {
|
|
4
|
-
selectedAlignment?: string;
|
|
5
|
-
onClick: (value: AlignmentState) => void;
|
|
6
4
|
className?: string;
|
|
5
|
+
onClick: (value: AlignmentState) => void;
|
|
6
|
+
selectedAlignment?: string;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
9
9
|
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps>;
|
|
@@ -4,12 +4,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { AlignmentPlugin } from '../alignmentPluginType';
|
|
5
5
|
interface PrimaryToolbarComponentProps {
|
|
6
6
|
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
7
|
-
editorView: EditorView;
|
|
8
7
|
disabled: boolean;
|
|
9
|
-
|
|
8
|
+
editorView: EditorView;
|
|
9
|
+
isToolbarReducedSpacing: boolean;
|
|
10
10
|
popupsBoundariesElement?: HTMLElement;
|
|
11
|
+
popupsMountPoint?: HTMLElement;
|
|
11
12
|
popupsScrollableElement?: HTMLElement;
|
|
12
|
-
isToolbarReducedSpacing: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare function PrimaryToolbarComponent({ api, editorView, disabled, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isToolbarReducedSpacing, }: PrimaryToolbarComponentProps): React.JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { type AlignmentPlugin } from '../../alignmentPluginType';
|
|
4
4
|
export declare const AlignmentMenu: ({ children, api, }: {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
5
|
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
7
|
}) => React.JSX.Element;
|
|
@@ -5,8 +5,8 @@ import type { AlignmentPlugin } from '../../alignmentPluginType';
|
|
|
5
5
|
import type { AlignmentState } from '../../pm-plugins/types';
|
|
6
6
|
import type { OptionInfo } from './types';
|
|
7
7
|
export declare const AlignmentMenuItem: ({ option: { label, icon: Icon, keymap }, api, alignment, parents, }: {
|
|
8
|
-
option: OptionInfo;
|
|
9
|
-
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
10
8
|
alignment: AlignmentState;
|
|
9
|
+
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
10
|
+
option: OptionInfo;
|
|
11
11
|
parents: ToolbarComponentTypes;
|
|
12
12
|
}) => React.JSX.Element;
|
|
@@ -2,10 +2,10 @@ import type { MessageDescriptor } from 'react-intl-next';
|
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import type { IconComponent } from '@atlaskit/editor-toolbar';
|
|
4
4
|
export type OptionInfo = {
|
|
5
|
-
key: string;
|
|
6
|
-
type: 'menu-item';
|
|
7
|
-
label: MessageDescriptor;
|
|
8
5
|
icon: IconComponent;
|
|
6
|
+
key: string;
|
|
9
7
|
keymap: Keymap;
|
|
8
|
+
label: MessageDescriptor;
|
|
10
9
|
rank: number;
|
|
10
|
+
type: 'menu-item';
|
|
11
11
|
};
|
|
@@ -12,13 +12,13 @@ export interface State {
|
|
|
12
12
|
}
|
|
13
13
|
export interface Props {
|
|
14
14
|
align: AlignmentState | undefined;
|
|
15
|
+
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
15
16
|
changeAlignment: (align: AlignmentState) => void;
|
|
16
|
-
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
isReducedSpacing?: boolean;
|
|
17
19
|
popupsBoundariesElement?: HTMLElement;
|
|
20
|
+
popupsMountPoint?: HTMLElement;
|
|
18
21
|
popupsScrollableElement?: HTMLElement;
|
|
19
|
-
isReducedSpacing?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
22
22
|
toolbarType: ToolbarType;
|
|
23
23
|
}
|
|
24
24
|
export declare class AlignmentToolbar extends React.Component<Props & WrappedComponentProps, State> {
|
|
@@ -14,7 +14,7 @@ export type AlignmentPluginDependencies = [
|
|
|
14
14
|
OptionalPlugin<ToolbarPlugin>
|
|
15
15
|
];
|
|
16
16
|
export type AlignmentPlugin = NextEditorPlugin<'alignment', {
|
|
17
|
-
sharedState: AlignmentPluginState | undefined;
|
|
18
17
|
dependencies: AlignmentPluginDependencies;
|
|
18
|
+
sharedState: AlignmentPluginState | undefined;
|
|
19
19
|
}>;
|
|
20
20
|
export type InputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.SHORTCUT;
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import type { AlignmentState } from '../../../pm-plugins/types';
|
|
4
4
|
export interface Props {
|
|
5
|
-
|
|
6
|
-
label: string;
|
|
5
|
+
content: React.ReactElement;
|
|
7
6
|
isSelected?: boolean;
|
|
7
|
+
label: string;
|
|
8
8
|
onClick: (value: AlignmentState, shouldClosePopup: boolean) => void;
|
|
9
|
-
content: React.ReactElement;
|
|
10
9
|
shortcut?: Keymap;
|
|
10
|
+
value: AlignmentState;
|
|
11
11
|
}
|
|
12
12
|
declare function AlignmentButton({ label, isSelected, content, shortcut, onClick, value }: Props): React.JSX.Element;
|
|
13
13
|
export default AlignmentButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
2
|
import type { AlignmentState } from '../../pm-plugins/types';
|
|
3
3
|
export interface Props {
|
|
4
|
-
selectedAlignment?: string;
|
|
5
|
-
onClick: (value: AlignmentState) => void;
|
|
6
4
|
className?: string;
|
|
5
|
+
onClick: (value: AlignmentState) => void;
|
|
6
|
+
selectedAlignment?: string;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
9
9
|
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps>;
|
|
@@ -4,12 +4,12 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
4
4
|
import type { AlignmentPlugin } from '../alignmentPluginType';
|
|
5
5
|
interface PrimaryToolbarComponentProps {
|
|
6
6
|
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
7
|
-
editorView: EditorView;
|
|
8
7
|
disabled: boolean;
|
|
9
|
-
|
|
8
|
+
editorView: EditorView;
|
|
9
|
+
isToolbarReducedSpacing: boolean;
|
|
10
10
|
popupsBoundariesElement?: HTMLElement;
|
|
11
|
+
popupsMountPoint?: HTMLElement;
|
|
11
12
|
popupsScrollableElement?: HTMLElement;
|
|
12
|
-
isToolbarReducedSpacing: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare function PrimaryToolbarComponent({ api, editorView, disabled, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, isToolbarReducedSpacing, }: PrimaryToolbarComponentProps): React.JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { type AlignmentPlugin } from '../../alignmentPluginType';
|
|
4
4
|
export declare const AlignmentMenu: ({ children, api, }: {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
5
|
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
7
|
}) => React.JSX.Element;
|
|
@@ -5,8 +5,8 @@ import type { AlignmentPlugin } from '../../alignmentPluginType';
|
|
|
5
5
|
import type { AlignmentState } from '../../pm-plugins/types';
|
|
6
6
|
import type { OptionInfo } from './types';
|
|
7
7
|
export declare const AlignmentMenuItem: ({ option: { label, icon: Icon, keymap }, api, alignment, parents, }: {
|
|
8
|
-
option: OptionInfo;
|
|
9
|
-
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
10
8
|
alignment: AlignmentState;
|
|
9
|
+
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
10
|
+
option: OptionInfo;
|
|
11
11
|
parents: ToolbarComponentTypes;
|
|
12
12
|
}) => React.JSX.Element;
|
|
@@ -2,10 +2,10 @@ import type { MessageDescriptor } from 'react-intl-next';
|
|
|
2
2
|
import type { Keymap } from '@atlaskit/editor-common/keymaps';
|
|
3
3
|
import type { IconComponent } from '@atlaskit/editor-toolbar';
|
|
4
4
|
export type OptionInfo = {
|
|
5
|
-
key: string;
|
|
6
|
-
type: 'menu-item';
|
|
7
|
-
label: MessageDescriptor;
|
|
8
5
|
icon: IconComponent;
|
|
6
|
+
key: string;
|
|
9
7
|
keymap: Keymap;
|
|
8
|
+
label: MessageDescriptor;
|
|
10
9
|
rank: number;
|
|
10
|
+
type: 'menu-item';
|
|
11
11
|
};
|
|
@@ -12,13 +12,13 @@ export interface State {
|
|
|
12
12
|
}
|
|
13
13
|
export interface Props {
|
|
14
14
|
align: AlignmentState | undefined;
|
|
15
|
+
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
15
16
|
changeAlignment: (align: AlignmentState) => void;
|
|
16
|
-
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
isReducedSpacing?: boolean;
|
|
17
19
|
popupsBoundariesElement?: HTMLElement;
|
|
20
|
+
popupsMountPoint?: HTMLElement;
|
|
18
21
|
popupsScrollableElement?: HTMLElement;
|
|
19
|
-
isReducedSpacing?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
22
22
|
toolbarType: ToolbarType;
|
|
23
23
|
}
|
|
24
24
|
export declare class AlignmentToolbar extends React.Component<Props & WrappedComponentProps, State> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.9",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-selection-toolbar": "^4.3.0",
|
|
38
|
-
"@atlaskit/editor-plugin-toolbar": "^0.
|
|
38
|
+
"@atlaskit/editor-plugin-toolbar": "^0.4.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
40
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
41
41
|
"@atlaskit/editor-toolbar": "^0.3.0",
|
|
42
42
|
"@atlaskit/icon": "^28.0.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
45
45
|
"@atlaskit/tokens": "^6.0.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@compiled/react": "^0.18.3"
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
"@af/visual-regression": "workspace:^",
|
|
58
58
|
"@atlaskit/editor-plugin-list": "^5.1.0",
|
|
59
59
|
"@atlaskit/ssr": "workspace:^",
|
|
60
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
61
60
|
"@testing-library/react": "^13.4.0",
|
|
62
61
|
"@testing-library/user-event": "^14.4.3",
|
|
63
62
|
"wait-for-expect": "^1.2.0"
|