@atlaskit/editor-plugin-floating-toolbar 5.2.0 → 5.2.2
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/floatingToolbarPluginType.d.ts +2 -2
- package/dist/types/pm-plugins/toolbar-data/types.d.ts +1 -1
- package/dist/types/ui/Dropdown.d.ts +19 -19
- package/dist/types/ui/DropdownMenu.d.ts +5 -5
- package/dist/types/ui/EmojiPickerButton.d.ts +4 -4
- package/dist/types/ui/ExtensionsPlaceholder.d.ts +9 -9
- package/dist/types/ui/Input.d.ts +2 -2
- package/dist/types/ui/ScrollButton.d.ts +2 -2
- package/dist/types/ui/ScrollButtons.d.ts +2 -2
- package/dist/types/ui/Select.d.ts +10 -10
- package/dist/types/ui/Toolbar.d.ts +13 -13
- package/dist/types-ts4.5/floatingToolbarPluginType.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/toolbar-data/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/Dropdown.d.ts +19 -19
- package/dist/types-ts4.5/ui/DropdownMenu.d.ts +5 -5
- package/dist/types-ts4.5/ui/EmojiPickerButton.d.ts +4 -4
- package/dist/types-ts4.5/ui/ExtensionsPlaceholder.d.ts +9 -9
- package/dist/types-ts4.5/ui/Input.d.ts +2 -2
- package/dist/types-ts4.5/ui/ScrollButton.d.ts +2 -2
- package/dist/types-ts4.5/ui/ScrollButtons.d.ts +2 -2
- package/dist/types-ts4.5/ui/Select.d.ts +10 -10
- package/dist/types-ts4.5/ui/Toolbar.d.ts +13 -13
- package/package.json +10 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 5.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 5.2.1
|
|
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
|
## 5.2.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -14,8 +14,8 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
14
14
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
15
15
|
export type ConfigWithNodeInfo = {
|
|
16
16
|
config: FloatingToolbarConfig | undefined;
|
|
17
|
-
pos: number;
|
|
18
17
|
node: Node;
|
|
18
|
+
pos: number;
|
|
19
19
|
};
|
|
20
20
|
export type FloatingToolbarPluginState = {
|
|
21
21
|
getConfigWithNodeInfo: (state: EditorState) => ConfigWithNodeInfo | null | undefined;
|
|
@@ -42,10 +42,10 @@ export type FloatingToolbarPluginDependencies = [
|
|
|
42
42
|
OptionalPlugin<AnalyticsPlugin>
|
|
43
43
|
];
|
|
44
44
|
export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
|
|
45
|
-
dependencies: FloatingToolbarPluginDependencies;
|
|
46
45
|
actions: {
|
|
47
46
|
forceFocusSelector: ForceFocusSelector;
|
|
48
47
|
};
|
|
48
|
+
dependencies: FloatingToolbarPluginDependencies;
|
|
49
49
|
sharedState: {
|
|
50
50
|
configWithNodeInfo: ConfigWithNodeInfo | undefined;
|
|
51
51
|
floatingToolbarData: FloatingToolbarPluginData | undefined;
|
|
@@ -10,33 +10,33 @@ import type { CommandDispatch, DropdownOptions, ExtensionDropdownOptions, Floati
|
|
|
10
10
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
export interface Props {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
iconBefore?: ReactElement<any>;
|
|
16
|
-
hideExpandIcon?: boolean;
|
|
17
|
-
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function> | ExtensionDropdownOptions;
|
|
18
|
-
dispatchCommand: (command: Function) => void;
|
|
19
|
-
mountPoint?: HTMLElement;
|
|
13
|
+
alignDropdownWithToolbar?: boolean;
|
|
14
|
+
alignX?: 'left' | 'right' | 'center';
|
|
20
15
|
boundariesElement?: HTMLElement;
|
|
21
|
-
scrollableElement?: HTMLElement;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
tooltip?: string;
|
|
24
16
|
buttonTestId?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
dispatchCommand: (command: Function) => void;
|
|
19
|
+
dropdownListId?: string;
|
|
25
20
|
dropdownWidth?: number;
|
|
26
|
-
showSelected?: boolean;
|
|
27
|
-
setDisableParentScroll?: (disable: boolean) => void;
|
|
28
21
|
editorView?: EditorView;
|
|
29
|
-
dropdownListId?: string;
|
|
30
|
-
alignDropdownWithToolbar?: boolean;
|
|
31
|
-
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
32
|
-
onMount?: () => void;
|
|
33
|
-
onClick?: () => void;
|
|
34
22
|
footer?: React.ReactNode;
|
|
23
|
+
hideExpandIcon?: boolean;
|
|
24
|
+
icon?: ReactElement<any>;
|
|
25
|
+
iconBefore?: ReactElement<any>;
|
|
26
|
+
mountPoint?: HTMLElement;
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
onMount?: () => void;
|
|
29
|
+
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
30
|
+
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function> | ExtensionDropdownOptions;
|
|
35
31
|
/** If true, the component will have pulse onboarding effect around it. */
|
|
36
32
|
pulse?: boolean;
|
|
37
|
-
|
|
33
|
+
scrollableElement?: HTMLElement;
|
|
34
|
+
setDisableParentScroll?: (disable: boolean) => void;
|
|
38
35
|
shouldFitContainer?: boolean;
|
|
39
|
-
|
|
36
|
+
showSelected?: boolean;
|
|
37
|
+
spotlightConfig?: FloatingToolbarButtonSpotlightConfig;
|
|
38
|
+
title: string;
|
|
39
|
+
tooltip?: string;
|
|
40
40
|
}
|
|
41
41
|
export interface State {
|
|
42
42
|
isOpen: boolean;
|
|
@@ -9,23 +9,23 @@ export declare const menuItemDimensions: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const itemSpacing: number;
|
|
11
11
|
export interface Props {
|
|
12
|
-
hide: Function;
|
|
13
12
|
dispatchCommand: Function;
|
|
13
|
+
editorView?: EditorView;
|
|
14
|
+
hide: Function;
|
|
14
15
|
items: Array<DropdownOptionT<Function>> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
15
16
|
showSelected?: boolean;
|
|
16
|
-
editorView?: EditorView;
|
|
17
17
|
}
|
|
18
18
|
export type ExtensionProps = {
|
|
19
19
|
extensionApi?: ExtensionAPI;
|
|
20
20
|
extensionProvider?: Promise<ExtensionProvider>;
|
|
21
21
|
};
|
|
22
22
|
export interface DropdownButtonItemProps extends ButtonItemProps {
|
|
23
|
+
onBlur?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
24
|
+
onFocus?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
23
25
|
onMouseEnter?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
24
|
-
onMouseOver?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
25
26
|
onMouseLeave?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
26
27
|
onMouseOut?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
27
|
-
|
|
28
|
-
onBlur?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
28
|
+
onMouseOver?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
29
29
|
}
|
|
30
30
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
31
31
|
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps>;
|
|
@@ -7,14 +7,14 @@ type EmojiPickerButtonReturnType = (props: {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
editorView?: EditorView;
|
|
9
9
|
idx?: number;
|
|
10
|
-
providerFactory?: ProviderFactory;
|
|
11
|
-
title?: string;
|
|
12
|
-
onChange?: (emoji: EmojiId) => void;
|
|
13
10
|
isSelected?: boolean;
|
|
14
11
|
mountPoint?: HTMLElement;
|
|
12
|
+
onChange?: (emoji: EmojiId) => void;
|
|
13
|
+
pluginInjectionApi?: ExtractInjectionAPI<FloatingToolbarPlugin>;
|
|
15
14
|
popupsBoundariesElement?: HTMLElement;
|
|
15
|
+
providerFactory?: ProviderFactory;
|
|
16
16
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
17
|
-
|
|
17
|
+
title?: string;
|
|
18
18
|
}) => JSX.Element;
|
|
19
19
|
export declare const EmojiPickerButton: EmojiPickerButtonReturnType;
|
|
20
20
|
export {};
|
|
@@ -4,20 +4,20 @@ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
8
|
-
extensionProvider: Promise<ExtensionProvider>;
|
|
9
|
-
editorView: EditorView;
|
|
10
|
-
separator?: 'start' | 'end' | 'both';
|
|
7
|
+
alignDropdownWithToolbar?: boolean;
|
|
11
8
|
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
12
|
-
extensionApi: ExtensionAPI | undefined;
|
|
13
|
-
scrollable?: boolean;
|
|
14
|
-
setDisableScroll?: (disable: boolean) => void;
|
|
15
9
|
dispatchCommand?: (command: Function) => void;
|
|
16
|
-
|
|
10
|
+
editorView: EditorView;
|
|
11
|
+
extensionApi: ExtensionAPI | undefined;
|
|
12
|
+
extensionProvider: Promise<ExtensionProvider>;
|
|
13
|
+
node: PMNode;
|
|
17
14
|
popupsBoundariesElement?: HTMLElement;
|
|
15
|
+
popupsMountPoint?: HTMLElement;
|
|
18
16
|
popupsScrollableElement?: HTMLElement;
|
|
17
|
+
scrollable?: boolean;
|
|
18
|
+
separator?: 'start' | 'end' | 'both';
|
|
19
19
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
20
|
-
|
|
20
|
+
setDisableScroll?: (disable: boolean) => void;
|
|
21
21
|
}
|
|
22
22
|
export declare const ExtensionsPlaceholder: (props: Props) => React.JSX.Element | null;
|
|
23
23
|
export {};
|
package/dist/types/ui/Input.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
export interface Props {
|
|
3
|
-
mountPoint?: HTMLElement;
|
|
4
3
|
boundariesElement?: HTMLElement;
|
|
5
4
|
defaultValue?: string;
|
|
6
|
-
|
|
5
|
+
mountPoint?: HTMLElement;
|
|
7
6
|
onBlur?: (text: string) => void;
|
|
8
7
|
onSubmit?: (text: string) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface State {
|
|
11
11
|
text: string;
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
type ScrollButtonProps = {
|
|
5
|
+
disabled: boolean;
|
|
5
6
|
intl: IntlShape;
|
|
6
|
-
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
7
7
|
node: Node;
|
|
8
|
-
|
|
8
|
+
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
9
9
|
side: 'left' | 'right';
|
|
10
10
|
};
|
|
11
11
|
export declare const ScrollButton: ({ intl, scrollContainerRef, node, disabled, side, }: ScrollButtonProps) => false | React.JSX.Element;
|
|
@@ -7,10 +7,10 @@ import { jsx } from '@emotion/react';
|
|
|
7
7
|
import type { IntlShape } from 'react-intl-next';
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
interface ScrollButtonsProps {
|
|
10
|
+
disabled: boolean;
|
|
10
11
|
intl: IntlShape;
|
|
11
|
-
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
12
12
|
node: Node;
|
|
13
|
-
|
|
13
|
+
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
14
14
|
}
|
|
15
15
|
export declare const ScrollButtons: ({ intl, scrollContainerRef, node, disabled }: ScrollButtonsProps) => jsx.JSX.Element | null;
|
|
16
16
|
export {};
|
|
@@ -2,19 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import type { SelectOption } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { ValueType } from '@atlaskit/select';
|
|
4
4
|
export interface Props {
|
|
5
|
-
|
|
6
|
-
options: SelectOption[];
|
|
7
|
-
dispatchCommand: (command: Function) => void;
|
|
8
|
-
mountPoint?: HTMLElement;
|
|
5
|
+
ariaLabel?: string;
|
|
9
6
|
boundariesElement?: HTMLElement;
|
|
10
|
-
|
|
7
|
+
classNamePrefix?: string;
|
|
11
8
|
defaultValue?: SelectOption | null;
|
|
12
|
-
|
|
13
|
-
onChange?: (change: ValueType<SelectOption>) => void;
|
|
14
|
-
width?: number;
|
|
9
|
+
dispatchCommand: (command: Function) => void;
|
|
15
10
|
filterOption?: ((option: SelectOption, rawInput: string) => boolean) | null;
|
|
11
|
+
hideExpandIcon?: boolean;
|
|
12
|
+
mountPoint?: HTMLElement;
|
|
13
|
+
onChange?: (change: ValueType<SelectOption>) => void;
|
|
14
|
+
options: SelectOption[];
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
scrollableElement?: HTMLElement;
|
|
16
17
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
17
|
-
|
|
18
|
-
classNamePrefix?: string;
|
|
18
|
+
width?: number;
|
|
19
19
|
}
|
|
20
20
|
export default function Search(props: Props): React.JSX.Element;
|
|
@@ -13,30 +13,30 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
13
13
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
14
|
import type { FloatingToolbarPlugin } from '../floatingToolbarPluginType';
|
|
15
15
|
export interface Props {
|
|
16
|
-
|
|
16
|
+
api: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
17
|
+
className?: string;
|
|
18
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
17
19
|
dispatchCommand: (command?: Function) => void;
|
|
18
|
-
|
|
20
|
+
editorView?: EditorView;
|
|
21
|
+
extensionsProvider?: Promise<ExtensionProvider>;
|
|
22
|
+
focusEditor?: () => void;
|
|
23
|
+
groupLabel?: string;
|
|
24
|
+
items: Array<Item>;
|
|
25
|
+
mediaAssistiveMessage?: string;
|
|
26
|
+
node: Node;
|
|
19
27
|
popupsBoundariesElement?: HTMLElement;
|
|
28
|
+
popupsMountPoint?: HTMLElement;
|
|
20
29
|
popupsScrollableElement?: HTMLElement;
|
|
21
30
|
providerFactory?: ProviderFactory;
|
|
22
|
-
className?: string;
|
|
23
|
-
groupLabel?: string;
|
|
24
|
-
focusEditor?: () => void;
|
|
25
|
-
editorView?: EditorView;
|
|
26
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
27
|
-
target?: HTMLElement;
|
|
28
|
-
node: Node;
|
|
29
|
-
extensionsProvider?: Promise<ExtensionProvider>;
|
|
30
31
|
scrollable?: boolean;
|
|
31
|
-
api: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
32
|
-
mediaAssistiveMessage?: string;
|
|
33
32
|
shouldFitContainer?: boolean;
|
|
33
|
+
target?: HTMLElement;
|
|
34
34
|
}
|
|
35
35
|
type GroupedItems = (Item | Item[])[];
|
|
36
36
|
export declare function groupItems(items: Item[]): GroupedItems;
|
|
37
37
|
export interface State {
|
|
38
|
-
scrollDisabled: boolean;
|
|
39
38
|
mounted: boolean;
|
|
39
|
+
scrollDisabled: boolean;
|
|
40
40
|
}
|
|
41
41
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
42
42
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
@@ -14,8 +14,8 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
14
14
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
15
15
|
export type ConfigWithNodeInfo = {
|
|
16
16
|
config: FloatingToolbarConfig | undefined;
|
|
17
|
-
pos: number;
|
|
18
17
|
node: Node;
|
|
18
|
+
pos: number;
|
|
19
19
|
};
|
|
20
20
|
export type FloatingToolbarPluginState = {
|
|
21
21
|
getConfigWithNodeInfo: (state: EditorState) => ConfigWithNodeInfo | null | undefined;
|
|
@@ -42,10 +42,10 @@ export type FloatingToolbarPluginDependencies = [
|
|
|
42
42
|
OptionalPlugin<AnalyticsPlugin>
|
|
43
43
|
];
|
|
44
44
|
export type FloatingToolbarPlugin = NextEditorPlugin<'floatingToolbar', {
|
|
45
|
-
dependencies: FloatingToolbarPluginDependencies;
|
|
46
45
|
actions: {
|
|
47
46
|
forceFocusSelector: ForceFocusSelector;
|
|
48
47
|
};
|
|
48
|
+
dependencies: FloatingToolbarPluginDependencies;
|
|
49
49
|
sharedState: {
|
|
50
50
|
configWithNodeInfo: ConfigWithNodeInfo | undefined;
|
|
51
51
|
floatingToolbarData: FloatingToolbarPluginData | undefined;
|
|
@@ -10,33 +10,33 @@ import type { CommandDispatch, DropdownOptions, ExtensionDropdownOptions, Floati
|
|
|
10
10
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
11
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
12
|
export interface Props {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
iconBefore?: ReactElement<any>;
|
|
16
|
-
hideExpandIcon?: boolean;
|
|
17
|
-
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function> | ExtensionDropdownOptions;
|
|
18
|
-
dispatchCommand: (command: Function) => void;
|
|
19
|
-
mountPoint?: HTMLElement;
|
|
13
|
+
alignDropdownWithToolbar?: boolean;
|
|
14
|
+
alignX?: 'left' | 'right' | 'center';
|
|
20
15
|
boundariesElement?: HTMLElement;
|
|
21
|
-
scrollableElement?: HTMLElement;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
tooltip?: string;
|
|
24
16
|
buttonTestId?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
dispatchCommand: (command: Function) => void;
|
|
19
|
+
dropdownListId?: string;
|
|
25
20
|
dropdownWidth?: number;
|
|
26
|
-
showSelected?: boolean;
|
|
27
|
-
setDisableParentScroll?: (disable: boolean) => void;
|
|
28
21
|
editorView?: EditorView;
|
|
29
|
-
dropdownListId?: string;
|
|
30
|
-
alignDropdownWithToolbar?: boolean;
|
|
31
|
-
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
32
|
-
onMount?: () => void;
|
|
33
|
-
onClick?: () => void;
|
|
34
22
|
footer?: React.ReactNode;
|
|
23
|
+
hideExpandIcon?: boolean;
|
|
24
|
+
icon?: ReactElement<any>;
|
|
25
|
+
iconBefore?: ReactElement<any>;
|
|
26
|
+
mountPoint?: HTMLElement;
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
onMount?: () => void;
|
|
29
|
+
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
30
|
+
options: DropdownOptions<Function> | FloatingToolbarOverflowDropdownOptions<Function> | ExtensionDropdownOptions;
|
|
35
31
|
/** If true, the component will have pulse onboarding effect around it. */
|
|
36
32
|
pulse?: boolean;
|
|
37
|
-
|
|
33
|
+
scrollableElement?: HTMLElement;
|
|
34
|
+
setDisableParentScroll?: (disable: boolean) => void;
|
|
38
35
|
shouldFitContainer?: boolean;
|
|
39
|
-
|
|
36
|
+
showSelected?: boolean;
|
|
37
|
+
spotlightConfig?: FloatingToolbarButtonSpotlightConfig;
|
|
38
|
+
title: string;
|
|
39
|
+
tooltip?: string;
|
|
40
40
|
}
|
|
41
41
|
export interface State {
|
|
42
42
|
isOpen: boolean;
|
|
@@ -9,23 +9,23 @@ export declare const menuItemDimensions: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const itemSpacing: number;
|
|
11
11
|
export interface Props {
|
|
12
|
-
hide: Function;
|
|
13
12
|
dispatchCommand: Function;
|
|
13
|
+
editorView?: EditorView;
|
|
14
|
+
hide: Function;
|
|
14
15
|
items: Array<DropdownOptionT<Function>> | FloatingToolbarOverflowDropdownOptions<Function>;
|
|
15
16
|
showSelected?: boolean;
|
|
16
|
-
editorView?: EditorView;
|
|
17
17
|
}
|
|
18
18
|
export type ExtensionProps = {
|
|
19
19
|
extensionApi?: ExtensionAPI;
|
|
20
20
|
extensionProvider?: Promise<ExtensionProvider>;
|
|
21
21
|
};
|
|
22
22
|
export interface DropdownButtonItemProps extends ButtonItemProps {
|
|
23
|
+
onBlur?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
24
|
+
onFocus?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
23
25
|
onMouseEnter?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
24
|
-
onMouseOver?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
25
26
|
onMouseLeave?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
26
27
|
onMouseOut?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
27
|
-
|
|
28
|
-
onBlur?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
28
|
+
onMouseOver?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
29
29
|
}
|
|
30
30
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
31
31
|
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps>;
|
|
@@ -7,14 +7,14 @@ type EmojiPickerButtonReturnType = (props: {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
editorView?: EditorView;
|
|
9
9
|
idx?: number;
|
|
10
|
-
providerFactory?: ProviderFactory;
|
|
11
|
-
title?: string;
|
|
12
|
-
onChange?: (emoji: EmojiId) => void;
|
|
13
10
|
isSelected?: boolean;
|
|
14
11
|
mountPoint?: HTMLElement;
|
|
12
|
+
onChange?: (emoji: EmojiId) => void;
|
|
13
|
+
pluginInjectionApi?: ExtractInjectionAPI<FloatingToolbarPlugin>;
|
|
15
14
|
popupsBoundariesElement?: HTMLElement;
|
|
15
|
+
providerFactory?: ProviderFactory;
|
|
16
16
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
17
|
-
|
|
17
|
+
title?: string;
|
|
18
18
|
}) => JSX.Element;
|
|
19
19
|
export declare const EmojiPickerButton: EmojiPickerButtonReturnType;
|
|
20
20
|
export {};
|
|
@@ -4,20 +4,20 @@ import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
8
|
-
extensionProvider: Promise<ExtensionProvider>;
|
|
9
|
-
editorView: EditorView;
|
|
10
|
-
separator?: 'start' | 'end' | 'both';
|
|
7
|
+
alignDropdownWithToolbar?: boolean;
|
|
11
8
|
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
12
|
-
extensionApi: ExtensionAPI | undefined;
|
|
13
|
-
scrollable?: boolean;
|
|
14
|
-
setDisableScroll?: (disable: boolean) => void;
|
|
15
9
|
dispatchCommand?: (command: Function) => void;
|
|
16
|
-
|
|
10
|
+
editorView: EditorView;
|
|
11
|
+
extensionApi: ExtensionAPI | undefined;
|
|
12
|
+
extensionProvider: Promise<ExtensionProvider>;
|
|
13
|
+
node: PMNode;
|
|
17
14
|
popupsBoundariesElement?: HTMLElement;
|
|
15
|
+
popupsMountPoint?: HTMLElement;
|
|
18
16
|
popupsScrollableElement?: HTMLElement;
|
|
17
|
+
scrollable?: boolean;
|
|
18
|
+
separator?: 'start' | 'end' | 'both';
|
|
19
19
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
20
|
-
|
|
20
|
+
setDisableScroll?: (disable: boolean) => void;
|
|
21
21
|
}
|
|
22
22
|
export declare const ExtensionsPlaceholder: (props: Props) => React.JSX.Element | null;
|
|
23
23
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
export interface Props {
|
|
3
|
-
mountPoint?: HTMLElement;
|
|
4
3
|
boundariesElement?: HTMLElement;
|
|
5
4
|
defaultValue?: string;
|
|
6
|
-
|
|
5
|
+
mountPoint?: HTMLElement;
|
|
7
6
|
onBlur?: (text: string) => void;
|
|
8
7
|
onSubmit?: (text: string) => void;
|
|
8
|
+
placeholder?: string;
|
|
9
9
|
}
|
|
10
10
|
export interface State {
|
|
11
11
|
text: string;
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
type ScrollButtonProps = {
|
|
5
|
+
disabled: boolean;
|
|
5
6
|
intl: IntlShape;
|
|
6
|
-
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
7
7
|
node: Node;
|
|
8
|
-
|
|
8
|
+
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
9
9
|
side: 'left' | 'right';
|
|
10
10
|
};
|
|
11
11
|
export declare const ScrollButton: ({ intl, scrollContainerRef, node, disabled, side, }: ScrollButtonProps) => false | React.JSX.Element;
|
|
@@ -7,10 +7,10 @@ import { jsx } from '@emotion/react';
|
|
|
7
7
|
import type { IntlShape } from 'react-intl-next';
|
|
8
8
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
9
9
|
interface ScrollButtonsProps {
|
|
10
|
+
disabled: boolean;
|
|
10
11
|
intl: IntlShape;
|
|
11
|
-
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
12
12
|
node: Node;
|
|
13
|
-
|
|
13
|
+
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
14
14
|
}
|
|
15
15
|
export declare const ScrollButtons: ({ intl, scrollContainerRef, node, disabled }: ScrollButtonsProps) => jsx.JSX.Element | null;
|
|
16
16
|
export {};
|
|
@@ -2,19 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import type { SelectOption } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { ValueType } from '@atlaskit/select';
|
|
4
4
|
export interface Props {
|
|
5
|
-
|
|
6
|
-
options: SelectOption[];
|
|
7
|
-
dispatchCommand: (command: Function) => void;
|
|
8
|
-
mountPoint?: HTMLElement;
|
|
5
|
+
ariaLabel?: string;
|
|
9
6
|
boundariesElement?: HTMLElement;
|
|
10
|
-
|
|
7
|
+
classNamePrefix?: string;
|
|
11
8
|
defaultValue?: SelectOption | null;
|
|
12
|
-
|
|
13
|
-
onChange?: (change: ValueType<SelectOption>) => void;
|
|
14
|
-
width?: number;
|
|
9
|
+
dispatchCommand: (command: Function) => void;
|
|
15
10
|
filterOption?: ((option: SelectOption, rawInput: string) => boolean) | null;
|
|
11
|
+
hideExpandIcon?: boolean;
|
|
12
|
+
mountPoint?: HTMLElement;
|
|
13
|
+
onChange?: (change: ValueType<SelectOption>) => void;
|
|
14
|
+
options: SelectOption[];
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
scrollableElement?: HTMLElement;
|
|
16
17
|
setDisableParentScroll?: (disable: boolean) => void;
|
|
17
|
-
|
|
18
|
-
classNamePrefix?: string;
|
|
18
|
+
width?: number;
|
|
19
19
|
}
|
|
20
20
|
export default function Search(props: Props): React.JSX.Element;
|
|
@@ -13,30 +13,30 @@ import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
|
13
13
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
14
|
import type { FloatingToolbarPlugin } from '../floatingToolbarPluginType';
|
|
15
15
|
export interface Props {
|
|
16
|
-
|
|
16
|
+
api: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
17
|
+
className?: string;
|
|
18
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
17
19
|
dispatchCommand: (command?: Function) => void;
|
|
18
|
-
|
|
20
|
+
editorView?: EditorView;
|
|
21
|
+
extensionsProvider?: Promise<ExtensionProvider>;
|
|
22
|
+
focusEditor?: () => void;
|
|
23
|
+
groupLabel?: string;
|
|
24
|
+
items: Array<Item>;
|
|
25
|
+
mediaAssistiveMessage?: string;
|
|
26
|
+
node: Node;
|
|
19
27
|
popupsBoundariesElement?: HTMLElement;
|
|
28
|
+
popupsMountPoint?: HTMLElement;
|
|
20
29
|
popupsScrollableElement?: HTMLElement;
|
|
21
30
|
providerFactory?: ProviderFactory;
|
|
22
|
-
className?: string;
|
|
23
|
-
groupLabel?: string;
|
|
24
|
-
focusEditor?: () => void;
|
|
25
|
-
editorView?: EditorView;
|
|
26
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
27
|
-
target?: HTMLElement;
|
|
28
|
-
node: Node;
|
|
29
|
-
extensionsProvider?: Promise<ExtensionProvider>;
|
|
30
31
|
scrollable?: boolean;
|
|
31
|
-
api: ExtractInjectionAPI<FloatingToolbarPlugin> | undefined;
|
|
32
|
-
mediaAssistiveMessage?: string;
|
|
33
32
|
shouldFitContainer?: boolean;
|
|
33
|
+
target?: HTMLElement;
|
|
34
34
|
}
|
|
35
35
|
type GroupedItems = (Item | Item[])[];
|
|
36
36
|
export declare function groupItems(items: Item[]): GroupedItems;
|
|
37
37
|
export interface State {
|
|
38
|
-
scrollDisabled: boolean;
|
|
39
38
|
mounted: boolean;
|
|
39
|
+
scrollDisabled: boolean;
|
|
40
40
|
}
|
|
41
41
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
42
42
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
32
32
|
"@atlaskit/editor-plugin-context-panel": "^5.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-copy-button": "^3.0.0",
|
|
34
|
-
"@atlaskit/editor-plugin-decorations": "^3.
|
|
34
|
+
"@atlaskit/editor-plugin-decorations": "^3.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-editor-disabled": "^3.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-emoji": "^4.3.0",
|
|
38
|
-
"@atlaskit/editor-plugin-extension": "^6.
|
|
38
|
+
"@atlaskit/editor-plugin-extension": "^6.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-interaction": "^5.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-table": "^12.
|
|
40
|
+
"@atlaskit/editor-plugin-table": "^12.3.0",
|
|
41
41
|
"@atlaskit/editor-plugin-user-intent": "^1.1.0",
|
|
42
42
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
43
43
|
"@atlaskit/emoji": "^69.5.0",
|
|
44
|
-
"@atlaskit/icon": "^28.
|
|
44
|
+
"@atlaskit/icon": "^28.1.0",
|
|
45
45
|
"@atlaskit/menu": "^8.3.0",
|
|
46
46
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/primitives": "^14.
|
|
48
|
+
"@atlaskit/primitives": "^14.12.0",
|
|
49
49
|
"@atlaskit/select": "^21.2.0",
|
|
50
|
-
"@atlaskit/theme": "^
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^11.
|
|
52
|
-
"@atlaskit/tokens": "^6.
|
|
50
|
+
"@atlaskit/theme": "^20.0.0",
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^11.8.0",
|
|
52
|
+
"@atlaskit/tokens": "^6.1.0",
|
|
53
53
|
"@atlaskit/tooltip": "^20.4.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1",
|
|
@@ -60,12 +60,11 @@
|
|
|
60
60
|
"react-loadable": "^5.1.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@atlaskit/editor-common": "^107.
|
|
63
|
+
"@atlaskit/editor-common": "^107.31.0",
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@atlaskit/visual-regression": "workspace:^",
|
|
69
68
|
"@testing-library/dom": "^10.1.0",
|
|
70
69
|
"@testing-library/react": "^13.4.0",
|
|
71
70
|
"@testing-library/user-event": "^14.4.3",
|