@atlaskit/editor-plugin-insert-block 4.3.2 → 4.3.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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/insertBlockPlugin.js +8 -2
- package/dist/cjs/ui/toolbar-components/EmojiButton.js +25 -83
- package/dist/cjs/ui/toolbar-components/InsertButton.js +250 -0
- package/dist/cjs/ui/toolbar-components/TableSizePicker.js +25 -48
- package/dist/cjs/ui/toolbar-components/hooks/useEmojiPickerPopup.js +52 -0
- package/dist/cjs/ui/toolbar-components/hooks/useInsertButtonState.js +89 -0
- package/dist/cjs/ui/toolbar-components/hooks/usePopupManager.js +65 -0
- package/dist/cjs/ui/toolbar-components/hooks/useTableSelectorPopup.js +35 -0
- package/dist/cjs/ui/toolbar-components/popups/EmojiPickerPopup.js +53 -0
- package/dist/cjs/ui/toolbar-components/popups/TableSelectorPopupWrapper.js +36 -0
- package/dist/cjs/ui/toolbar-components/shared/constants.js +18 -0
- package/dist/cjs/ui/toolbar-components/shared/types.js +5 -0
- package/dist/cjs/ui/toolbar-components.js +66 -2
- package/dist/es2019/insertBlockPlugin.js +8 -2
- package/dist/es2019/ui/toolbar-components/EmojiButton.js +24 -77
- package/dist/es2019/ui/toolbar-components/InsertButton.js +243 -0
- package/dist/es2019/ui/toolbar-components/TableSizePicker.js +26 -41
- package/dist/es2019/ui/toolbar-components/hooks/useEmojiPickerPopup.js +42 -0
- package/dist/es2019/ui/toolbar-components/hooks/useInsertButtonState.js +81 -0
- package/dist/es2019/ui/toolbar-components/hooks/usePopupManager.js +50 -0
- package/dist/es2019/ui/toolbar-components/hooks/useTableSelectorPopup.js +27 -0
- package/dist/es2019/ui/toolbar-components/popups/EmojiPickerPopup.js +47 -0
- package/dist/es2019/ui/toolbar-components/popups/TableSelectorPopupWrapper.js +30 -0
- package/dist/es2019/ui/toolbar-components/shared/constants.js +12 -0
- package/dist/es2019/ui/toolbar-components/shared/types.js +1 -0
- package/dist/es2019/ui/toolbar-components.js +63 -3
- package/dist/esm/insertBlockPlugin.js +8 -2
- package/dist/esm/ui/toolbar-components/EmojiButton.js +26 -83
- package/dist/esm/ui/toolbar-components/InsertButton.js +242 -0
- package/dist/esm/ui/toolbar-components/TableSizePicker.js +26 -48
- package/dist/esm/ui/toolbar-components/hooks/useEmojiPickerPopup.js +45 -0
- package/dist/esm/ui/toolbar-components/hooks/useInsertButtonState.js +82 -0
- package/dist/esm/ui/toolbar-components/hooks/usePopupManager.js +58 -0
- package/dist/esm/ui/toolbar-components/hooks/useTableSelectorPopup.js +28 -0
- package/dist/esm/ui/toolbar-components/popups/EmojiPickerPopup.js +46 -0
- package/dist/esm/ui/toolbar-components/popups/TableSelectorPopupWrapper.js +29 -0
- package/dist/esm/ui/toolbar-components/shared/constants.js +12 -0
- package/dist/esm/ui/toolbar-components/shared/types.js +1 -0
- package/dist/esm/ui/toolbar-components.js +67 -3
- package/dist/types/insertBlockPluginType.d.ts +2 -2
- package/dist/types/types/index.d.ts +3 -3
- package/dist/types/ui/ElementBrowser/types.d.ts +3 -3
- package/dist/types/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +8 -8
- package/dist/types/ui/ToolbarInsertBlock/block-insert-menu.d.ts +12 -12
- package/dist/types/ui/ToolbarInsertBlock/create-items.d.ts +24 -24
- package/dist/types/ui/ToolbarInsertBlock/dropdown-button.d.ts +4 -4
- package/dist/types/ui/ToolbarInsertBlock/index.d.ts +1 -1
- package/dist/types/ui/ToolbarInsertBlock/item.d.ts +2 -2
- package/dist/types/ui/ToolbarInsertBlock/types.d.ts +36 -36
- package/dist/types/ui/toolbar-components/EmojiButton.d.ts +2 -7
- package/dist/types/ui/toolbar-components/InsertButton.d.ts +18 -0
- package/dist/types/ui/toolbar-components/TableSizePicker.d.ts +3 -5
- package/dist/types/ui/toolbar-components/hooks/useEmojiPickerPopup.d.ts +20 -0
- package/dist/types/ui/toolbar-components/hooks/useInsertButtonState.d.ts +24 -0
- package/dist/types/ui/toolbar-components/hooks/usePopupManager.d.ts +21 -0
- package/dist/types/ui/toolbar-components/hooks/useTableSelectorPopup.d.ts +19 -0
- package/dist/types/ui/toolbar-components/popups/EmojiPickerPopup.d.ts +16 -0
- package/dist/types/ui/toolbar-components/popups/TableSelectorPopupWrapper.d.ts +15 -0
- package/dist/types/ui/toolbar-components/shared/constants.d.ts +12 -0
- package/dist/types/ui/toolbar-components/shared/types.d.ts +8 -0
- package/dist/types/ui/toolbar-components.d.ts +9 -2
- package/dist/types-ts4.5/insertBlockPluginType.d.ts +2 -2
- package/dist/types-ts4.5/types/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +3 -3
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +8 -8
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/block-insert-menu.d.ts +12 -12
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/create-items.d.ts +24 -24
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/dropdown-button.d.ts +4 -4
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/item.d.ts +2 -2
- package/dist/types-ts4.5/ui/ToolbarInsertBlock/types.d.ts +36 -36
- package/dist/types-ts4.5/ui/toolbar-components/EmojiButton.d.ts +2 -7
- package/dist/types-ts4.5/ui/toolbar-components/InsertButton.d.ts +18 -0
- package/dist/types-ts4.5/ui/toolbar-components/TableSizePicker.d.ts +3 -5
- package/dist/types-ts4.5/ui/toolbar-components/hooks/useEmojiPickerPopup.d.ts +20 -0
- package/dist/types-ts4.5/ui/toolbar-components/hooks/useInsertButtonState.d.ts +24 -0
- package/dist/types-ts4.5/ui/toolbar-components/hooks/usePopupManager.d.ts +21 -0
- package/dist/types-ts4.5/ui/toolbar-components/hooks/useTableSelectorPopup.d.ts +19 -0
- package/dist/types-ts4.5/ui/toolbar-components/popups/EmojiPickerPopup.d.ts +16 -0
- package/dist/types-ts4.5/ui/toolbar-components/popups/TableSelectorPopupWrapper.d.ts +15 -0
- package/dist/types-ts4.5/ui/toolbar-components/shared/constants.d.ts +15 -0
- package/dist/types-ts4.5/ui/toolbar-components/shared/types.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +9 -2
- package/package.json +8 -9
|
@@ -9,58 +9,58 @@ import type { EmojiProvider } from '@atlaskit/emoji';
|
|
|
9
9
|
import type { InsertBlockPlugin } from '../../index';
|
|
10
10
|
import type { BlockMenuItem } from './create-items';
|
|
11
11
|
export interface Props {
|
|
12
|
-
buttons: number;
|
|
13
|
-
showElementBrowser: boolean;
|
|
14
|
-
isReducedSpacing: boolean;
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
isTypeAheadAllowed?: boolean;
|
|
17
|
-
editorView: EditorView;
|
|
18
|
-
editorActions?: EditorActions;
|
|
19
|
-
tableSupported?: boolean;
|
|
20
|
-
tableSelectorSupported?: boolean;
|
|
21
12
|
actionSupported?: boolean;
|
|
13
|
+
availableWrapperBlockTypes?: BlockType[];
|
|
14
|
+
buttons: number;
|
|
15
|
+
dateEnabled?: boolean;
|
|
22
16
|
decisionSupported?: boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
18
|
+
editorActions?: EditorActions;
|
|
19
|
+
editorAppearance?: EditorAppearance;
|
|
20
|
+
editorView: EditorView;
|
|
21
|
+
emojiDisabled?: boolean;
|
|
22
|
+
emojiProvider?: Promise<EmojiProvider>;
|
|
23
|
+
expandEnabled?: boolean;
|
|
29
24
|
handleImageUpload?: (event?: ImageUploadPluginReferenceEvent) => Command;
|
|
30
|
-
dateEnabled?: boolean;
|
|
31
25
|
horizontalRuleEnabled?: boolean;
|
|
32
|
-
|
|
26
|
+
imageUploadEnabled?: boolean;
|
|
27
|
+
imageUploadSupported?: boolean;
|
|
28
|
+
insertMenuItems?: MenuItem[];
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
isEditorOffline?: boolean;
|
|
31
|
+
isReducedSpacing: boolean;
|
|
32
|
+
isTypeAheadAllowed?: boolean;
|
|
33
33
|
layoutSectionEnabled?: boolean;
|
|
34
|
-
expandEnabled?: boolean;
|
|
35
|
-
emojiProvider?: Promise<EmojiProvider>;
|
|
36
|
-
availableWrapperBlockTypes?: BlockType[];
|
|
37
|
-
linkSupported?: boolean;
|
|
38
34
|
linkDisabled?: boolean;
|
|
39
|
-
|
|
35
|
+
linkSupported?: boolean;
|
|
36
|
+
mediaSupported?: boolean;
|
|
37
|
+
mediaUploadsEnabled?: boolean;
|
|
38
|
+
mentionsDisabled?: boolean;
|
|
39
|
+
mentionsSupported?: boolean;
|
|
40
40
|
nativeStatusSupported?: boolean;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
popupsScrollableElement?: HTMLElement;
|
|
44
|
-
insertMenuItems?: MenuItem[];
|
|
45
|
-
showElementBrowserLink?: boolean;
|
|
46
|
-
showSeparator?: boolean;
|
|
41
|
+
onInsertBlockType?: (name: string) => Command;
|
|
42
|
+
onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
|
|
47
43
|
onShowMediaPicker?: (mountInfo?: {
|
|
48
|
-
ref: HTMLElement;
|
|
49
44
|
mountPoint: HTMLElement;
|
|
45
|
+
ref: HTMLElement;
|
|
50
46
|
}) => void;
|
|
51
|
-
|
|
52
|
-
onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
|
|
53
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
47
|
+
placeholderTextEnabled?: boolean;
|
|
54
48
|
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
popupsBoundariesElement?: HTMLElement;
|
|
50
|
+
popupsMountPoint?: HTMLElement;
|
|
51
|
+
popupsScrollableElement?: HTMLElement;
|
|
52
|
+
showElementBrowser: boolean;
|
|
53
|
+
showElementBrowserLink?: boolean;
|
|
54
|
+
showSeparator?: boolean;
|
|
55
|
+
tableSelectorSupported?: boolean;
|
|
56
|
+
tableSupported?: boolean;
|
|
57
57
|
}
|
|
58
58
|
export interface State {
|
|
59
|
-
isPlusMenuOpen: boolean;
|
|
60
|
-
emojiPickerOpen: boolean;
|
|
61
59
|
buttons: BlockMenuItem[];
|
|
62
60
|
dropdownItems: BlockMenuItem[];
|
|
61
|
+
emojiPickerOpen: boolean;
|
|
63
62
|
isOpenedByKeyboard: boolean;
|
|
63
|
+
isPlusMenuOpen: boolean;
|
|
64
64
|
isTableSelectorOpen: boolean;
|
|
65
65
|
isTableSelectorOpenedByKeyboard: boolean;
|
|
66
66
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
type EmojiButtonProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare const EmojiButton: ({ api }: EmojiButtonProps) => React.JSX.Element | null;
|
|
8
|
-
export {};
|
|
2
|
+
import type { BaseToolbarButtonProps } from './shared/types';
|
|
3
|
+
export declare const EmojiButton: ({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement }: BaseToolbarButtonProps) => React.JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
4
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
5
|
+
type InsertButtonProps = {
|
|
6
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
7
|
+
expandEnabled?: boolean;
|
|
8
|
+
horizontalRuleEnabled?: boolean;
|
|
9
|
+
insertMenuItems?: MenuItem[];
|
|
10
|
+
isFullPageAppearance?: boolean;
|
|
11
|
+
nativeStatusSupported?: boolean;
|
|
12
|
+
numberOfButtons?: number;
|
|
13
|
+
onInsertBlockType?: (name: string) => Command;
|
|
14
|
+
showElementBrowserLink?: boolean;
|
|
15
|
+
tableSelectorSupported?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare const InsertButton: ({ api, showElementBrowserLink, isFullPageAppearance, tableSelectorSupported, nativeStatusSupported, horizontalRuleEnabled, expandEnabled, insertMenuItems, numberOfButtons, onInsertBlockType, }: InsertButtonProps) => React.JSX.Element | null;
|
|
18
|
+
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
type TableSizePickerProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
2
|
+
import type { BaseToolbarButtonProps } from './shared/types';
|
|
3
|
+
interface TableSizePickerProps extends BaseToolbarButtonProps {
|
|
6
4
|
tableSelectorSupported?: boolean;
|
|
7
|
-
}
|
|
5
|
+
}
|
|
8
6
|
export declare const TableSizePicker: ({ api, tableSelectorSupported }: TableSizePickerProps) => React.JSX.Element | null;
|
|
9
7
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EmojiId } from '@atlaskit/emoji/types';
|
|
4
|
+
import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
|
|
5
|
+
interface UseEmojiPickerPopupProps {
|
|
6
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
7
|
+
buttonRef: React.RefObject<HTMLElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const useEmojiPickerPopup: ({ api, buttonRef }: UseEmojiPickerPopupProps) => {
|
|
10
|
+
handleSelectedEmoji: (emojiId: EmojiId) => true;
|
|
11
|
+
onPopupUnmount: () => void;
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
isOpenedByKeyboard: boolean;
|
|
14
|
+
toggle: (inputMethod?: import("@atlaskit/editor-common/types").TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
|
|
15
|
+
close: () => void;
|
|
16
|
+
handleEscapeKeydown: () => void;
|
|
17
|
+
handleClickOutside: (e: MouseEvent) => void;
|
|
18
|
+
handleKeyboardOpen: (event: React.KeyboardEvent) => void;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/dist/types/view';
|
|
4
|
+
import type { EmojiProvider } from '@atlaskit/emoji';
|
|
5
|
+
import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
|
|
6
|
+
import type { BlockMenuItem } from '../../ToolbarInsertBlock/create-items';
|
|
7
|
+
interface UseInsertButtonStateProps {
|
|
8
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
9
|
+
editorView?: EditorView;
|
|
10
|
+
expandEnabled?: boolean;
|
|
11
|
+
horizontalRuleEnabled?: boolean;
|
|
12
|
+
insertMenuItems?: MenuItem[];
|
|
13
|
+
nativeStatusSupported?: boolean;
|
|
14
|
+
numberOfButtons?: number;
|
|
15
|
+
showElementBrowserLink?: boolean;
|
|
16
|
+
tableSelectorSupported?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface InsertButtonState {
|
|
19
|
+
dropdownItems: BlockMenuItem[];
|
|
20
|
+
emojiProvider?: EmojiProvider;
|
|
21
|
+
isTypeAheadAllowed?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const useInsertButtonState: ({ api, editorView, horizontalRuleEnabled, insertMenuItems, nativeStatusSupported, numberOfButtons, tableSelectorSupported, expandEnabled, showElementBrowserLink }: UseInsertButtonStateProps) => InsertButtonState;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
4
|
+
interface PopupManagerConfig {
|
|
5
|
+
analytics?: {
|
|
6
|
+
onToggle?: (isOpen: boolean, inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
|
|
7
|
+
};
|
|
8
|
+
focusTarget?: RefObject<HTMLElement>;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
onOpen?: (inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const usePopupManager: (config?: PopupManagerConfig) => {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
isOpenedByKeyboard: boolean;
|
|
15
|
+
toggle: (inputMethod?: TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
|
|
16
|
+
close: () => void;
|
|
17
|
+
handleEscapeKeydown: () => void;
|
|
18
|
+
handleClickOutside: (e: MouseEvent) => void;
|
|
19
|
+
handleKeyboardOpen: (event: React.KeyboardEvent) => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
|
|
4
|
+
interface UseTableSelectorPopupProps {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
buttonRef: React.RefObject<HTMLElement>;
|
|
7
|
+
}
|
|
8
|
+
export declare const useTableSelectorPopup: ({ api, buttonRef }: UseTableSelectorPopupProps) => {
|
|
9
|
+
handleSelectedTableSize: (rowsCount: number, colsCount: number) => void;
|
|
10
|
+
onPopupUnmount: () => void;
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
isOpenedByKeyboard: boolean;
|
|
13
|
+
toggle: (inputMethod?: import("@atlaskit/editor-common/types").TOOLBAR_MENU_TYPE | INPUT_METHOD) => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
handleEscapeKeydown: () => void;
|
|
16
|
+
handleClickOutside: (e: MouseEvent) => void;
|
|
17
|
+
handleKeyboardOpen: (event: React.KeyboardEvent) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { EmojiId, EmojiProvider } from '@atlaskit/emoji/types';
|
|
3
|
+
interface EmojiPickerPopupProps {
|
|
4
|
+
emojiProvider?: Promise<EmojiProvider>;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
onClickOutside: (e: MouseEvent) => void;
|
|
7
|
+
onEscapeKeydown: () => void;
|
|
8
|
+
onSelection: (emojiId: EmojiId) => boolean;
|
|
9
|
+
onUnmount: () => void;
|
|
10
|
+
popupsBoundariesElement?: HTMLElement;
|
|
11
|
+
popupsMountPoint?: HTMLElement;
|
|
12
|
+
popupsScrollableElement?: HTMLElement;
|
|
13
|
+
targetRef: React.RefObject<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
export declare const EmojiPickerPopup: ({ isOpen, targetRef, emojiProvider, onSelection, onClickOutside, onEscapeKeydown, onUnmount, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, }: EmojiPickerPopupProps) => React.JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TableSelectorPopupWrapperProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
isOpenedByKeyboard: boolean;
|
|
5
|
+
onClickOutside: (e: MouseEvent) => void;
|
|
6
|
+
onEscapeKeydown: () => void;
|
|
7
|
+
onSelection: (rowsCount: number, colsCount: number) => void;
|
|
8
|
+
onUnmount: () => void;
|
|
9
|
+
popupsBoundariesElement?: HTMLElement;
|
|
10
|
+
popupsMountPoint?: HTMLElement;
|
|
11
|
+
popupsScrollableElement?: HTMLElement;
|
|
12
|
+
targetRef: React.RefObject<HTMLElement>;
|
|
13
|
+
}
|
|
14
|
+
export declare const TableSelectorPopupWrapper: ({ isOpen, targetRef, isOpenedByKeyboard, onSelection, onClickOutside, onEscapeKeydown, onUnmount, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, }: TableSelectorPopupWrapperProps) => React.JSX.Element | null;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const POPUP_Z_INDEX = "akEditorMenuZIndex";
|
|
2
|
+
export declare const POPUP_DIMENSIONS: {
|
|
3
|
+
readonly EMOJI_PICKER: {
|
|
4
|
+
readonly fitHeight: 350;
|
|
5
|
+
readonly fitWidth: 350;
|
|
6
|
+
readonly offset: [number, number];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const FOCUS_DELAY: {
|
|
10
|
+
readonly ANIMATION_FRAME: "requestAnimationFrame";
|
|
11
|
+
readonly MICROTASK: "queueMicrotask";
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { InsertBlockPlugin } from '../../../insertBlockPluginType';
|
|
3
|
+
export interface BaseToolbarButtonProps {
|
|
4
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
5
|
+
popupsBoundariesElement?: HTMLElement;
|
|
6
|
+
popupsMountPoint?: HTMLElement;
|
|
7
|
+
popupsScrollableElement?: HTMLElement;
|
|
8
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
2
3
|
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
4
|
import type { InsertBlockPlugin } from '../insertBlockPluginType';
|
|
4
5
|
type GetToolbarComponentsProps = {
|
|
5
6
|
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
7
|
+
expandEnabled?: boolean;
|
|
8
|
+
horizontalRuleEnabled?: boolean;
|
|
9
|
+
insertMenuItems?: MenuItem[];
|
|
10
|
+
nativeStatusSupported?: boolean;
|
|
11
|
+
onInsertBlockType?: (name: string) => Command;
|
|
12
|
+
showElementBrowserLink?: boolean;
|
|
6
13
|
tableSelectorSupported?: boolean;
|
|
7
14
|
toolbarShowPlusInsertOnly?: boolean;
|
|
8
15
|
};
|
|
9
|
-
export declare const getToolbarComponents: ({ api, tableSelectorSupported, toolbarShowPlusInsertOnly, }: GetToolbarComponentsProps) => RegisterComponent[];
|
|
16
|
+
export declare const getToolbarComponents: ({ api, tableSelectorSupported, toolbarShowPlusInsertOnly, showElementBrowserLink, onInsertBlockType, nativeStatusSupported, horizontalRuleEnabled, expandEnabled, insertMenuItems, }: GetToolbarComponentsProps) => RegisterComponent[];
|
|
10
17
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { InsertBlockPluginOptions, InsertBlockPluginDependencies, InsertBlockPluginState } from './types';
|
|
3
3
|
export type InsertBlockPlugin = NextEditorPlugin<'insertBlock', {
|
|
4
|
-
pluginConfiguration: InsertBlockPluginOptions | undefined;
|
|
5
|
-
dependencies: InsertBlockPluginDependencies;
|
|
6
4
|
actions: {
|
|
7
5
|
toggleAdditionalMenu: () => void;
|
|
8
6
|
};
|
|
7
|
+
dependencies: InsertBlockPluginDependencies;
|
|
8
|
+
pluginConfiguration: InsertBlockPluginOptions | undefined;
|
|
9
9
|
sharedState: InsertBlockPluginState | undefined;
|
|
10
10
|
}>;
|
|
@@ -56,10 +56,11 @@ export type InsertBlockPluginDependencies = [
|
|
|
56
56
|
OptionalPlugin<ToolbarPlugin>
|
|
57
57
|
];
|
|
58
58
|
export interface InsertBlockPluginOptions {
|
|
59
|
-
allowTables?: boolean;
|
|
60
59
|
allowExpand?: boolean;
|
|
61
|
-
|
|
60
|
+
allowTables?: boolean;
|
|
61
|
+
appearance?: EditorAppearance;
|
|
62
62
|
horizontalRuleEnabled?: boolean;
|
|
63
|
+
insertMenuItems?: any;
|
|
63
64
|
nativeStatusSupported?: boolean;
|
|
64
65
|
/**
|
|
65
66
|
* To hide the element browser "view more" button in the
|
|
@@ -68,7 +69,6 @@ export interface InsertBlockPluginOptions {
|
|
|
68
69
|
*/
|
|
69
70
|
showElementBrowserLink?: boolean;
|
|
70
71
|
tableSelectorSupported?: boolean;
|
|
71
|
-
appearance?: EditorAppearance;
|
|
72
72
|
/**
|
|
73
73
|
* To hide the individual insert block buttons in the toolbar
|
|
74
74
|
* and only show the plus button
|
|
@@ -8,11 +8,11 @@ type SimpleEventHandler<T> = (event?: T) => void;
|
|
|
8
8
|
export interface InsertMenuProps {
|
|
9
9
|
dropdownItems: BlockMenuItem[];
|
|
10
10
|
editorView: EditorView;
|
|
11
|
-
|
|
12
|
-
toggleVisiblity: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
11
|
+
isFullPageAppearance?: boolean;
|
|
13
12
|
onInsert: OnInsert;
|
|
14
13
|
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
15
|
-
|
|
14
|
+
showElementBrowserLink: boolean;
|
|
15
|
+
toggleVisiblity: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
16
16
|
}
|
|
17
17
|
export type SvgGetterParams = {
|
|
18
18
|
name: string;
|
|
@@ -8,22 +8,22 @@ type SimpleEventHandler<T> = (event?: T) => void;
|
|
|
8
8
|
export interface BlockInsertElementBrowserProps {
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
editorView: EditorView;
|
|
11
|
+
isFullPageAppearance?: boolean;
|
|
11
12
|
items: BlockMenuItem[];
|
|
12
|
-
spacing: 'none' | 'default';
|
|
13
13
|
label: string;
|
|
14
|
+
onClick: React.MouseEventHandler;
|
|
15
|
+
onInsert: OnInsert;
|
|
16
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
17
|
+
onRef(el: HTMLElement): void;
|
|
14
18
|
open: boolean;
|
|
19
|
+
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
20
|
+
plusButtonRef?: HTMLElement;
|
|
15
21
|
popupsBoundariesElement?: HTMLElement;
|
|
16
22
|
popupsMountPoint?: HTMLElement;
|
|
17
23
|
popupsScrollableElement?: HTMLElement;
|
|
18
|
-
plusButtonRef?: HTMLElement;
|
|
19
24
|
showElementBrowserLink: boolean;
|
|
20
|
-
|
|
21
|
-
onClick: React.MouseEventHandler;
|
|
22
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
23
|
-
onInsert: OnInsert;
|
|
25
|
+
spacing: 'none' | 'default';
|
|
24
26
|
togglePlusMenuVisibility: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
25
|
-
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
26
|
-
isFullPageAppearance?: boolean;
|
|
27
27
|
}
|
|
28
28
|
export declare const BlockInsertElementBrowser: (props: BlockInsertElementBrowserProps) => React.JSX.Element;
|
|
29
29
|
export {};
|
|
@@ -8,26 +8,26 @@ import type { BlockMenuItem } from './create-items';
|
|
|
8
8
|
export interface BlockInsertMenuProps {
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
editorView: EditorView;
|
|
11
|
+
isFullPageAppearance?: boolean;
|
|
11
12
|
items: BlockMenuItem[];
|
|
12
13
|
label: string;
|
|
14
|
+
onClick: React.MouseEventHandler;
|
|
15
|
+
onInsert: OnInsert;
|
|
16
|
+
onItemActivated?: (attrs: {
|
|
17
|
+
item: MenuItem;
|
|
18
|
+
}) => void;
|
|
19
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
20
|
+
onOpenChange?: (attrs: any) => void;
|
|
21
|
+
onPlusButtonRef(el: HTMLElement): void;
|
|
22
|
+
onRef(el: HTMLElement): void;
|
|
13
23
|
open: boolean;
|
|
24
|
+
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
14
25
|
plusButtonRef?: HTMLElement;
|
|
15
26
|
popupsBoundariesElement?: HTMLElement;
|
|
16
27
|
popupsMountPoint?: HTMLElement;
|
|
17
28
|
popupsScrollableElement?: HTMLElement;
|
|
18
|
-
spacing: 'none' | 'default';
|
|
19
29
|
showElementBrowserLink: boolean;
|
|
20
|
-
|
|
21
|
-
onPlusButtonRef(el: HTMLElement): void;
|
|
22
|
-
onClick: React.MouseEventHandler;
|
|
23
|
-
onItemActivated?: (attrs: {
|
|
24
|
-
item: MenuItem;
|
|
25
|
-
}) => void;
|
|
26
|
-
onInsert: OnInsert;
|
|
27
|
-
onOpenChange?: (attrs: any) => void;
|
|
30
|
+
spacing: 'none' | 'default';
|
|
28
31
|
togglePlusMenuVisibility(): void;
|
|
29
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
30
|
-
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
31
|
-
isFullPageAppearance?: boolean;
|
|
32
32
|
}
|
|
33
33
|
export declare const BlockInsertMenu: (props: BlockInsertMenuProps) => React.JSX.Element | null;
|
|
@@ -4,38 +4,38 @@ import type { BlockType } from '@atlaskit/editor-plugin-block-type';
|
|
|
4
4
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EmojiProvider } from '@atlaskit/emoji/resource';
|
|
6
6
|
export interface CreateItemsConfig {
|
|
7
|
-
isTypeAheadAllowed?: boolean;
|
|
8
|
-
tableSupported?: boolean;
|
|
9
|
-
tableSelectorSupported?: boolean;
|
|
10
|
-
mediaUploadsEnabled?: boolean;
|
|
11
|
-
mediaSupported?: boolean;
|
|
12
|
-
imageUploadSupported?: boolean;
|
|
13
|
-
imageUploadEnabled?: boolean;
|
|
14
|
-
mentionsSupported?: boolean;
|
|
15
|
-
mentionsDisabled?: boolean;
|
|
16
|
-
availableWrapperBlockTypes?: BlockType[];
|
|
17
7
|
actionSupported?: boolean;
|
|
8
|
+
availableWrapperBlockTypes?: BlockType[];
|
|
9
|
+
dateEnabled?: boolean;
|
|
18
10
|
decisionSupported?: boolean;
|
|
19
|
-
linkSupported?: boolean;
|
|
20
|
-
linkDisabled?: boolean;
|
|
21
11
|
emojiDisabled?: boolean;
|
|
12
|
+
emojiProvider?: Promise<EmojiProvider> | EmojiProvider;
|
|
13
|
+
expandEnabled?: boolean;
|
|
14
|
+
formatMessage: WrappedComponentProps['intl']['formatMessage'];
|
|
22
15
|
hasEmojiPlugin?: boolean;
|
|
23
|
-
hasMentionsPlugin?: boolean;
|
|
24
16
|
hasMediaPlugin?: boolean;
|
|
25
|
-
|
|
26
|
-
dateEnabled?: boolean;
|
|
27
|
-
placeholderTextEnabled?: boolean;
|
|
17
|
+
hasMentionsPlugin?: boolean;
|
|
28
18
|
horizontalRuleEnabled?: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
expandEnabled?: boolean;
|
|
19
|
+
imageUploadEnabled?: boolean;
|
|
20
|
+
imageUploadSupported?: boolean;
|
|
32
21
|
insertMenuItems?: MenuItem[];
|
|
33
|
-
emojiProvider?: Promise<EmojiProvider> | EmojiProvider;
|
|
34
|
-
schema: Schema;
|
|
35
|
-
numberOfButtons: number;
|
|
36
|
-
formatMessage: WrappedComponentProps['intl']['formatMessage'];
|
|
37
|
-
isNewMenuEnabled?: boolean;
|
|
38
22
|
isEditorOffline?: boolean;
|
|
23
|
+
isNewMenuEnabled?: boolean;
|
|
24
|
+
isTypeAheadAllowed?: boolean;
|
|
25
|
+
layoutSectionEnabled?: boolean;
|
|
26
|
+
linkDisabled?: boolean;
|
|
27
|
+
linkSupported?: boolean;
|
|
28
|
+
mediaSupported?: boolean;
|
|
29
|
+
mediaUploadsEnabled?: boolean;
|
|
30
|
+
mentionsDisabled?: boolean;
|
|
31
|
+
mentionsSupported?: boolean;
|
|
32
|
+
nativeStatusSupported?: boolean;
|
|
33
|
+
numberOfButtons: number;
|
|
34
|
+
placeholderTextEnabled?: boolean;
|
|
35
|
+
schema: Schema;
|
|
36
|
+
showElementBrowserLink?: boolean;
|
|
37
|
+
tableSelectorSupported?: boolean;
|
|
38
|
+
tableSupported?: boolean;
|
|
39
39
|
}
|
|
40
40
|
export interface BlockMenuItem extends MenuItem {
|
|
41
41
|
title: JSX.Element | null;
|
|
@@ -6,15 +6,15 @@ import React from 'react';
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { ToolbarButtonRef } from '@atlaskit/editor-common/ui-menu';
|
|
8
8
|
export interface DropDownButtonProps {
|
|
9
|
-
label: string;
|
|
10
|
-
selected: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
9
|
'aria-expanded': React.AriaAttributes['aria-expanded'];
|
|
13
10
|
'aria-haspopup': React.AriaAttributes['aria-haspopup'];
|
|
14
11
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
handleRef(el: ToolbarButtonRef): void;
|
|
14
|
+
label: string;
|
|
15
15
|
onClick: React.MouseEventHandler;
|
|
16
16
|
onKeyDown?: React.KeyboardEventHandler;
|
|
17
|
+
selected: boolean;
|
|
17
18
|
spacing: 'none' | 'default';
|
|
18
|
-
handleRef(el: ToolbarButtonRef): void;
|
|
19
19
|
}
|
|
20
20
|
export declare const DropDownButton: React.MemoExoticComponent<(props: DropDownButtonProps) => jsx.JSX.Element>;
|
|
@@ -7,8 +7,8 @@ import { jsx } from '@emotion/react';
|
|
|
7
7
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
8
8
|
import type { Props, State } from './types';
|
|
9
9
|
export declare const tableButtonWrapper: ({ isTableSelectorOpen, isButtonDisabled, }: {
|
|
10
|
-
isTableSelectorOpen: boolean;
|
|
11
10
|
isButtonDisabled: boolean | undefined;
|
|
11
|
+
isTableSelectorOpen: boolean;
|
|
12
12
|
}) => import("@emotion/react").SerializedStyles;
|
|
13
13
|
export declare class ToolbarInsertBlock extends React.PureComponent<Props & WrappedComponentProps, State> {
|
|
14
14
|
private dropdownButtonRef?;
|
|
@@ -6,11 +6,11 @@ import React from 'react';
|
|
|
6
6
|
import type { MemoizedFn } from 'memoize-one';
|
|
7
7
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
8
8
|
export interface CreateInit {
|
|
9
|
+
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
10
|
+
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
9
11
|
content: string;
|
|
10
12
|
disabled: boolean;
|
|
11
13
|
tooltipDescription?: string;
|
|
12
|
-
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
13
|
-
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
14
14
|
}
|
|
15
15
|
export declare const action: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
16
16
|
export declare const link: MemoizedFn<(init: CreateInit) => MenuItem>;
|
|
@@ -9,58 +9,58 @@ import type { EmojiProvider } from '@atlaskit/emoji';
|
|
|
9
9
|
import type { InsertBlockPlugin } from '../../index';
|
|
10
10
|
import type { BlockMenuItem } from './create-items';
|
|
11
11
|
export interface Props {
|
|
12
|
-
buttons: number;
|
|
13
|
-
showElementBrowser: boolean;
|
|
14
|
-
isReducedSpacing: boolean;
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
isTypeAheadAllowed?: boolean;
|
|
17
|
-
editorView: EditorView;
|
|
18
|
-
editorActions?: EditorActions;
|
|
19
|
-
tableSupported?: boolean;
|
|
20
|
-
tableSelectorSupported?: boolean;
|
|
21
12
|
actionSupported?: boolean;
|
|
13
|
+
availableWrapperBlockTypes?: BlockType[];
|
|
14
|
+
buttons: number;
|
|
15
|
+
dateEnabled?: boolean;
|
|
22
16
|
decisionSupported?: boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
18
|
+
editorActions?: EditorActions;
|
|
19
|
+
editorAppearance?: EditorAppearance;
|
|
20
|
+
editorView: EditorView;
|
|
21
|
+
emojiDisabled?: boolean;
|
|
22
|
+
emojiProvider?: Promise<EmojiProvider>;
|
|
23
|
+
expandEnabled?: boolean;
|
|
29
24
|
handleImageUpload?: (event?: ImageUploadPluginReferenceEvent) => Command;
|
|
30
|
-
dateEnabled?: boolean;
|
|
31
25
|
horizontalRuleEnabled?: boolean;
|
|
32
|
-
|
|
26
|
+
imageUploadEnabled?: boolean;
|
|
27
|
+
imageUploadSupported?: boolean;
|
|
28
|
+
insertMenuItems?: MenuItem[];
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
isEditorOffline?: boolean;
|
|
31
|
+
isReducedSpacing: boolean;
|
|
32
|
+
isTypeAheadAllowed?: boolean;
|
|
33
33
|
layoutSectionEnabled?: boolean;
|
|
34
|
-
expandEnabled?: boolean;
|
|
35
|
-
emojiProvider?: Promise<EmojiProvider>;
|
|
36
|
-
availableWrapperBlockTypes?: BlockType[];
|
|
37
|
-
linkSupported?: boolean;
|
|
38
34
|
linkDisabled?: boolean;
|
|
39
|
-
|
|
35
|
+
linkSupported?: boolean;
|
|
36
|
+
mediaSupported?: boolean;
|
|
37
|
+
mediaUploadsEnabled?: boolean;
|
|
38
|
+
mentionsDisabled?: boolean;
|
|
39
|
+
mentionsSupported?: boolean;
|
|
40
40
|
nativeStatusSupported?: boolean;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
popupsScrollableElement?: HTMLElement;
|
|
44
|
-
insertMenuItems?: MenuItem[];
|
|
45
|
-
showElementBrowserLink?: boolean;
|
|
46
|
-
showSeparator?: boolean;
|
|
41
|
+
onInsertBlockType?: (name: string) => Command;
|
|
42
|
+
onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
|
|
47
43
|
onShowMediaPicker?: (mountInfo?: {
|
|
48
|
-
ref: HTMLElement;
|
|
49
44
|
mountPoint: HTMLElement;
|
|
45
|
+
ref: HTMLElement;
|
|
50
46
|
}) => void;
|
|
51
|
-
|
|
52
|
-
onInsertMacroFromMacroBrowser?: (macroProvider: MacroProvider, node?: PMNode, isEditing?: boolean) => (view: EditorView) => void;
|
|
53
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
47
|
+
placeholderTextEnabled?: boolean;
|
|
54
48
|
pluginInjectionApi: ExtractInjectionAPI<InsertBlockPlugin> | undefined;
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
popupsBoundariesElement?: HTMLElement;
|
|
50
|
+
popupsMountPoint?: HTMLElement;
|
|
51
|
+
popupsScrollableElement?: HTMLElement;
|
|
52
|
+
showElementBrowser: boolean;
|
|
53
|
+
showElementBrowserLink?: boolean;
|
|
54
|
+
showSeparator?: boolean;
|
|
55
|
+
tableSelectorSupported?: boolean;
|
|
56
|
+
tableSupported?: boolean;
|
|
57
57
|
}
|
|
58
58
|
export interface State {
|
|
59
|
-
isPlusMenuOpen: boolean;
|
|
60
|
-
emojiPickerOpen: boolean;
|
|
61
59
|
buttons: BlockMenuItem[];
|
|
62
60
|
dropdownItems: BlockMenuItem[];
|
|
61
|
+
emojiPickerOpen: boolean;
|
|
63
62
|
isOpenedByKeyboard: boolean;
|
|
63
|
+
isPlusMenuOpen: boolean;
|
|
64
64
|
isTableSelectorOpen: boolean;
|
|
65
65
|
isTableSelectorOpenedByKeyboard: boolean;
|
|
66
66
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
type EmojiButtonProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare const EmojiButton: ({ api }: EmojiButtonProps) => React.JSX.Element | null;
|
|
8
|
-
export {};
|
|
2
|
+
import type { BaseToolbarButtonProps } from './shared/types';
|
|
3
|
+
export declare const EmojiButton: ({ api, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement }: BaseToolbarButtonProps) => React.JSX.Element | null;
|