react-input-emoji 5.6.4 → 5.6.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +117 -43
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +117 -43
- package/dist/index.js.map +1 -1
- package/dist/src/types/types.d.ts +32 -0
- package/dist/src/utils/input-event-utils.d.ts +19 -1
- package/package.json +1 -1
@@ -0,0 +1,32 @@
|
|
1
|
+
export interface EmojiMartItem {
|
2
|
+
id: string;
|
3
|
+
name: string;
|
4
|
+
native: string;
|
5
|
+
unified: string;
|
6
|
+
keywords: string[];
|
7
|
+
shortcodes: string;
|
8
|
+
emoticons: string[];
|
9
|
+
}
|
10
|
+
export interface MentionUser {
|
11
|
+
id: string;
|
12
|
+
name: string;
|
13
|
+
image: string;
|
14
|
+
}
|
15
|
+
export type Listerner<T> = (event: T) => void;
|
16
|
+
export type ListenerObj<T> = {
|
17
|
+
subscribe: (listerner: Listerner<T>) => () => void;
|
18
|
+
publish: (event?: T) => void;
|
19
|
+
currentListerners: Listerner<T>[];
|
20
|
+
};
|
21
|
+
export type TextInputListeners = {
|
22
|
+
keyDown: ListenerObj<any>;
|
23
|
+
keyUp: ListenerObj<any>;
|
24
|
+
arrowUp: ListenerObj<any>;
|
25
|
+
arrowDown: ListenerObj<any>;
|
26
|
+
enter: ListenerObj<any>;
|
27
|
+
focus: ListenerObj<any>;
|
28
|
+
blur: ListenerObj<any>;
|
29
|
+
};
|
30
|
+
export type SanitizeFn = (html: string) => string;
|
31
|
+
export type PolluteFn = (text: string) => string;
|
32
|
+
export type Languages = "ar" | "be" | "cs" | "de" | "en" | "es" | "fa" | "fi" | "fr" | "hi" | "it" | "ja" | "kr" | "pl" | "pt" | "ru" | "sa" | "tr" | "uk" | "vi" | "zh";
|
@@ -38,7 +38,7 @@ export function handlePaste(event: React.ClipboardEvent): void;
|
|
38
38
|
*
|
39
39
|
* @param {HandleSelectEmojiProps} props
|
40
40
|
*/
|
41
|
-
export function handleSelectEmoji({ emoji, textInputRef, keepOpened, toggleShowPicker, maxLength }: HandleSelectEmojiProps): void;
|
41
|
+
export function handleSelectEmoji({ emoji, textInputRef, keepOpened, toggleShowPicker, maxLength, }: HandleSelectEmojiProps): void;
|
42
42
|
/**
|
43
43
|
*
|
44
44
|
* @param {{text: string, html: string}} props
|
@@ -74,6 +74,24 @@ export function moveCaretToEnd(input: React.MutableRefObject<HTMLDivElement | nu
|
|
74
74
|
* @return {string}
|
75
75
|
*/
|
76
76
|
export function removeHtmlExceptBr(inputDiv: HTMLDivElement): string;
|
77
|
+
/**
|
78
|
+
*
|
79
|
+
* @param {*} range
|
80
|
+
* @returns
|
81
|
+
*/
|
82
|
+
export function getSelectionStart(range: any): {
|
83
|
+
node: any;
|
84
|
+
offset: any;
|
85
|
+
};
|
86
|
+
/**
|
87
|
+
*
|
88
|
+
* @returns {Object} cursor
|
89
|
+
*/
|
90
|
+
export function getCursor(): any;
|
91
|
+
/**
|
92
|
+
*
|
93
|
+
*/
|
94
|
+
export function addLineBreak(): void;
|
77
95
|
export type HandleKeyDownOptions = {
|
78
96
|
placeholderEl: HTMLDivElement;
|
79
97
|
maxLength: number;
|
package/package.json
CHANGED