react-input-emoji 5.7.0 → 5.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,15 +4,17 @@
4
4
  * @property {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef
5
5
  * @property {(value: string) => void} setValue
6
6
  * @property {() => void} emitChange
7
+ * @property {boolean=} shouldConvertEmojiToImage
7
8
  */
8
9
  /**
9
10
  *
10
11
  * @param {Props} props
11
12
  */
12
- export function useExpose({ ref, textInputRef, setValue, emitChange }: Props): void;
13
+ export function useExpose({ ref, textInputRef, setValue, emitChange, shouldConvertEmojiToImage }: Props): void;
13
14
  export type Props = {
14
15
  ref: React.Ref<any>;
15
16
  textInputRef: React.MutableRefObject<import('../text-input').Ref | null>;
16
17
  setValue: (value: string) => void;
17
18
  emitChange: () => void;
19
+ shouldConvertEmojiToImage?: boolean | undefined;
18
20
  };
@@ -3,8 +3,9 @@
3
3
  */
4
4
  /**
5
5
  * @param {boolean} shouldReturn
6
+ * @param {boolean} shouldConvertEmojiToImage
6
7
  */
7
- export function useSanitize(shouldReturn: boolean): {
8
+ export function useSanitize(shouldReturn: boolean, shouldConvertEmojiToImage: boolean): {
8
9
  addSanitizeFn: (fn: SanitizeFn) => void;
9
10
  sanitize: (html: string) => string;
10
11
  sanitizedTextRef: import("react").MutableRefObject<string>;
@@ -9,6 +9,7 @@ export type Props = {
9
9
  onEnter?: (text: string) => void;
10
10
  placeholder?: string | undefined;
11
11
  placeholderColor?: string | undefined;
12
+ color?: string | undefined;
12
13
  onResize?: (size: {
13
14
  width: number;
14
15
  height: number;
@@ -16,7 +17,7 @@ export type Props = {
16
17
  onClick?: (() => void) | undefined;
17
18
  onFocus?: (() => void) | undefined;
18
19
  onBlur?: (() => void) | undefined;
19
- shouldReturn?: boolean | undefined;
20
+ shouldReturn: boolean;
20
21
  maxLength?: number | undefined;
21
22
  keepOpened?: boolean | undefined;
22
23
  onKeyDown?: (event: KeyboardEvent) => void;
@@ -45,6 +46,7 @@ export type Props = {
45
46
  searchMention?: (text: string) => Promise<MetionUser[]>;
46
47
  buttonElement?: HTMLDivElement | undefined;
47
48
  buttonRef?: React.MutableRefObject<any> | undefined;
49
+ shouldConvertEmojiToImage: boolean;
48
50
  };
49
51
  declare const InputEmojiWithRef: React.ForwardRefExoticComponent<Props & React.RefAttributes<any>>;
50
52
  import React from "react";
@@ -14,6 +14,7 @@ export type Props = {
14
14
  placeholder: string;
15
15
  style: {
16
16
  borderRadius?: number;
17
+ color?: string;
17
18
  borderColor?: string;
18
19
  fontSize?: number;
19
20
  fontFamily?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-input-emoji",
3
- "version": "5.7.0",
3
+ "version": "5.8.0",
4
4
  "description": "A React input with an option to add an emoji with language support.",
5
5
  "homepage": "https://cesarwbr.github.io/react-input-emoji/",
6
6
  "author": "cesarwbr",
@@ -78,6 +78,7 @@
78
78
  "dependencies": {
79
79
  "@emoji-mart/data": "1.1.2",
80
80
  "@emoji-mart/react": "1.1.1",
81
- "emoji-mart": "5.5.2"
81
+ "emoji-mart": "5.5.2",
82
+ "react-easy-emoji": "^1.8.1"
82
83
  }
83
84
  }