@atlaskit/editor-plugin-alignment 4.2.8 → 4.2.10
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/cjs/alignmentPlugin.js +2 -2
- package/dist/cjs/pm-plugins/main.js +0 -1
- package/dist/cjs/ui/ToolbarAlignment/index.js +2 -2
- package/dist/es2019/alignmentPlugin.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/es2019/ui/ToolbarAlignment/index.js +1 -1
- package/dist/esm/alignmentPlugin.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/esm/ui/ToolbarAlignment/index.js +1 -1
- package/dist/types/alignmentPlugin.d.ts +0 -2
- package/dist/types/alignmentPluginType.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +0 -2
- 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 -20
- package/dist/types-ts4.5/alignmentPlugin.d.ts +0 -2
- package/dist/types-ts4.5/alignmentPluginType.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -2
- 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 -20
- package/package.json +7 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 4.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 4.2.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
14
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 4.2.8
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.alignmentPlugin = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -15,7 +15,7 @@ var _main = require("./pm-plugins/main");
|
|
|
15
15
|
var _FloatingToolbarComponent = require("./ui/FloatingToolbarComponent");
|
|
16
16
|
var _PrimaryToolbarComponent = require("./ui/PrimaryToolbarComponent");
|
|
17
17
|
var _toolbarComponents = require("./ui/toolbar-components");
|
|
18
|
-
var defaultConfig =
|
|
18
|
+
var defaultConfig = {
|
|
19
19
|
align: 'start'
|
|
20
20
|
};
|
|
21
21
|
var alignmentPlugin = exports.alignmentPlugin = function alignmentPlugin(_ref) {
|
|
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.createInitialPluginState = createInitialPluginState;
|
|
8
7
|
exports.createPlugin = createPlugin;
|
|
9
8
|
exports.pluginKey = void 0;
|
|
10
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
var _runtime = require("@compiled/react/runtime");
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -29,7 +29,7 @@ var _iconMap = require("./icon-map");
|
|
|
29
29
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
30
30
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
31
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
32
|
-
var AlignmentToolbar =
|
|
32
|
+
var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
33
33
|
function AlignmentToolbar() {
|
|
34
34
|
var _this;
|
|
35
35
|
(0, _classCallCheck2.default)(this, AlignmentToolbar);
|
|
@@ -8,7 +8,7 @@ import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
|
8
8
|
import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
|
|
9
9
|
import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
|
|
10
10
|
import { getToolbarComponents } from './ui/toolbar-components';
|
|
11
|
-
|
|
11
|
+
const defaultConfig = {
|
|
12
12
|
align: 'start'
|
|
13
13
|
};
|
|
14
14
|
export const alignmentPlugin = ({
|
|
@@ -2,7 +2,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { isAlignable } from '../editor-commands';
|
|
4
4
|
import { getActiveAlignment } from './utils';
|
|
5
|
-
|
|
5
|
+
function createInitialPluginState(editorState, pluginConfig) {
|
|
6
6
|
return {
|
|
7
7
|
align: getActiveAlignment(editorState) || pluginConfig.align,
|
|
8
8
|
isEnabled: true
|
|
@@ -15,7 +15,7 @@ import { ToolbarType } from '../../pm-plugins/types';
|
|
|
15
15
|
import Alignment from '../Alignment';
|
|
16
16
|
import { IconMap } from './icon-map';
|
|
17
17
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
18
|
-
|
|
18
|
+
class AlignmentToolbar extends React.Component {
|
|
19
19
|
constructor(...args) {
|
|
20
20
|
super(...args);
|
|
21
21
|
_defineProperty(this, "toolbarItemRef", /*#__PURE__*/React.createRef());
|
|
@@ -8,7 +8,7 @@ import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
|
8
8
|
import { FloatingToolbarComponent } from './ui/FloatingToolbarComponent';
|
|
9
9
|
import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
|
|
10
10
|
import { getToolbarComponents } from './ui/toolbar-components';
|
|
11
|
-
|
|
11
|
+
var defaultConfig = {
|
|
12
12
|
align: 'start'
|
|
13
13
|
};
|
|
14
14
|
export var alignmentPlugin = function alignmentPlugin(_ref) {
|
|
@@ -5,7 +5,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { isAlignable } from '../editor-commands';
|
|
7
7
|
import { getActiveAlignment } from './utils';
|
|
8
|
-
|
|
8
|
+
function createInitialPluginState(editorState, pluginConfig) {
|
|
9
9
|
return {
|
|
10
10
|
align: getActiveAlignment(editorState) || pluginConfig.align,
|
|
11
11
|
isEnabled: true
|
|
@@ -22,7 +22,7 @@ import { ToolbarType } from '../../pm-plugins/types';
|
|
|
22
22
|
import Alignment from '../Alignment';
|
|
23
23
|
import { IconMap } from './icon-map';
|
|
24
24
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
25
|
-
|
|
25
|
+
var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
26
26
|
function AlignmentToolbar() {
|
|
27
27
|
var _this;
|
|
28
28
|
_classCallCheck(this, AlignmentToolbar);
|
|
@@ -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;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
4
|
import type { AlignmentPluginState } from './types';
|
|
6
|
-
export declare function createInitialPluginState(editorState: EditorState, pluginConfig: AlignmentPluginState): AlignmentPluginState;
|
|
7
5
|
export declare const pluginKey: PluginKey<AlignmentPluginState>;
|
|
8
6
|
export declare function createPlugin(dispatch: Dispatch, pluginConfig: AlignmentPluginState): SafePlugin<AlignmentPluginState>;
|
|
@@ -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
|
};
|
|
@@ -7,33 +7,17 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
7
7
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
8
|
import type { AlignmentPlugin } from '../../alignmentPluginType';
|
|
9
9
|
import { ToolbarType, type AlignmentState } from '../../pm-plugins/types';
|
|
10
|
-
export interface State {
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
}
|
|
13
10
|
export interface Props {
|
|
14
11
|
align: AlignmentState | undefined;
|
|
12
|
+
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
15
13
|
changeAlignment: (align: AlignmentState) => void;
|
|
16
|
-
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
isReducedSpacing?: boolean;
|
|
17
16
|
popupsBoundariesElement?: HTMLElement;
|
|
17
|
+
popupsMountPoint?: HTMLElement;
|
|
18
18
|
popupsScrollableElement?: HTMLElement;
|
|
19
|
-
isReducedSpacing?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
22
19
|
toolbarType: ToolbarType;
|
|
23
20
|
}
|
|
24
|
-
export declare class AlignmentToolbar extends React.Component<Props & WrappedComponentProps, State> {
|
|
25
|
-
static displayName: string;
|
|
26
|
-
private toolbarItemRef;
|
|
27
|
-
state: State;
|
|
28
|
-
render(): JSX.Element;
|
|
29
|
-
componentDidUpdate(prevProps: Props): void;
|
|
30
|
-
private changeAlignment;
|
|
31
|
-
private toggleOpen;
|
|
32
|
-
private toggleOpenByKeyboard;
|
|
33
|
-
private handleOnItemActivated;
|
|
34
|
-
private hide;
|
|
35
|
-
private hideOnEscape;
|
|
36
|
-
}
|
|
37
21
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
38
22
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
39
23
|
};
|
|
@@ -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;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
4
|
import type { AlignmentPluginState } from './types';
|
|
6
|
-
export declare function createInitialPluginState(editorState: EditorState, pluginConfig: AlignmentPluginState): AlignmentPluginState;
|
|
7
5
|
export declare const pluginKey: PluginKey<AlignmentPluginState>;
|
|
8
6
|
export declare function createPlugin(dispatch: Dispatch, pluginConfig: AlignmentPluginState): SafePlugin<AlignmentPluginState>;
|
|
@@ -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
|
};
|
|
@@ -7,33 +7,17 @@ import type { WrappedComponentProps } from 'react-intl-next';
|
|
|
7
7
|
import { type ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
8
|
import type { AlignmentPlugin } from '../../alignmentPluginType';
|
|
9
9
|
import { ToolbarType, type AlignmentState } from '../../pm-plugins/types';
|
|
10
|
-
export interface State {
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
}
|
|
13
10
|
export interface Props {
|
|
14
11
|
align: AlignmentState | undefined;
|
|
12
|
+
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
15
13
|
changeAlignment: (align: AlignmentState) => void;
|
|
16
|
-
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
isReducedSpacing?: boolean;
|
|
17
16
|
popupsBoundariesElement?: HTMLElement;
|
|
17
|
+
popupsMountPoint?: HTMLElement;
|
|
18
18
|
popupsScrollableElement?: HTMLElement;
|
|
19
|
-
isReducedSpacing?: boolean;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
api: ExtractInjectionAPI<AlignmentPlugin> | undefined;
|
|
22
19
|
toolbarType: ToolbarType;
|
|
23
20
|
}
|
|
24
|
-
export declare class AlignmentToolbar extends React.Component<Props & WrappedComponentProps, State> {
|
|
25
|
-
static displayName: string;
|
|
26
|
-
private toolbarItemRef;
|
|
27
|
-
state: State;
|
|
28
|
-
render(): JSX.Element;
|
|
29
|
-
componentDidUpdate(prevProps: Props): void;
|
|
30
|
-
private changeAlignment;
|
|
31
|
-
private toggleOpen;
|
|
32
|
-
private toggleOpenByKeyboard;
|
|
33
|
-
private handleOnItemActivated;
|
|
34
|
-
private hide;
|
|
35
|
-
private hideOnEscape;
|
|
36
|
-
}
|
|
37
21
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
38
22
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
39
23
|
};
|
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.10",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
33
|
+
"@atlaskit/adf-schema": "^50.2.2",
|
|
34
34
|
"@atlaskit/css": "^0.12.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-primary-toolbar": "^4.1.0",
|
|
@@ -38,16 +38,16 @@
|
|
|
38
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
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
42
|
-
"@atlaskit/icon": "^28.
|
|
41
|
+
"@atlaskit/editor-toolbar": "^0.4.0",
|
|
42
|
+
"@atlaskit/icon": "^28.1.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
45
|
-
"@atlaskit/tokens": "^6.
|
|
44
|
+
"@atlaskit/tmp-editor-statsig": "^11.8.0",
|
|
45
|
+
"@atlaskit/tokens": "^6.1.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@compiled/react": "^0.18.3"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@atlaskit/editor-common": "^107.
|
|
50
|
+
"@atlaskit/editor-common": "^107.32.0",
|
|
51
51
|
"react": "^18.2.0",
|
|
52
52
|
"react-dom": "^18.2.0",
|
|
53
53
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -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"
|
|
@@ -104,8 +103,5 @@
|
|
|
104
103
|
"dist/types-ts4.5/index.d.ts"
|
|
105
104
|
]
|
|
106
105
|
}
|
|
107
|
-
},
|
|
108
|
-
"af:exports": {
|
|
109
|
-
".": "./src/index.ts"
|
|
110
106
|
}
|
|
111
107
|
}
|