emoji-picker-react 4.16.1 → 4.17.1
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/README.md +166 -314
- package/dist/components/body/EmojiCategory.d.ts +1 -1
- package/dist/components/context/PickerDataContext.d.ts +16 -0
- package/dist/components/navigation/CategoryButton.d.ts +1 -1
- package/dist/config/categoryConfig.d.ts +2 -6
- package/dist/config/config.d.ts +2 -1
- package/dist/data/emojis-bn.d.ts +3 -0
- package/dist/data/emojis-bn.js +2 -0
- package/dist/data/emojis-bn.json +1 -0
- package/dist/data/emojis-bn.ts +3 -0
- package/dist/data/emojis-da.d.ts +3 -0
- package/dist/data/emojis-da.js +2 -0
- package/dist/data/emojis-da.json +1 -0
- package/dist/data/emojis-da.ts +3 -0
- package/dist/data/emojis-de.d.ts +3 -0
- package/dist/data/emojis-de.js +2 -0
- package/dist/data/emojis-de.json +1 -0
- package/dist/data/emojis-de.ts +3 -0
- package/dist/data/emojis-en-gb.d.ts +3 -0
- package/dist/data/emojis-en-gb.js +2 -0
- package/dist/data/emojis-en-gb.json +1 -0
- package/dist/data/emojis-en-gb.ts +3 -0
- package/dist/data/emojis-en.d.ts +3 -0
- package/dist/data/emojis-en.js +2 -0
- package/dist/data/emojis-en.json +1 -0
- package/dist/data/emojis-en.ts +3 -0
- package/dist/data/emojis-es-mx.d.ts +3 -0
- package/dist/data/emojis-es-mx.js +2 -0
- package/dist/data/emojis-es-mx.json +1 -0
- package/dist/data/emojis-es-mx.ts +3 -0
- package/dist/data/emojis-es.d.ts +3 -0
- package/dist/data/emojis-es.js +2 -0
- package/dist/data/emojis-es.json +1 -0
- package/dist/data/emojis-es.ts +3 -0
- package/dist/data/emojis-et.d.ts +3 -0
- package/dist/data/emojis-et.js +2 -0
- package/dist/data/emojis-et.json +1 -0
- package/dist/data/emojis-et.ts +3 -0
- package/dist/data/emojis-fi.d.ts +3 -0
- package/dist/data/emojis-fi.js +2 -0
- package/dist/data/emojis-fi.json +1 -0
- package/dist/data/emojis-fi.ts +3 -0
- package/dist/data/emojis-fr.d.ts +3 -0
- package/dist/data/emojis-fr.js +2 -0
- package/dist/data/emojis-fr.json +1 -0
- package/dist/data/emojis-fr.ts +3 -0
- package/dist/data/emojis-hi.d.ts +3 -0
- package/dist/data/emojis-hi.js +2 -0
- package/dist/data/emojis-hi.json +1 -0
- package/dist/data/emojis-hi.ts +3 -0
- package/dist/data/emojis-hu.d.ts +3 -0
- package/dist/data/emojis-hu.js +2 -0
- package/dist/data/emojis-hu.json +1 -0
- package/dist/data/emojis-hu.ts +3 -0
- package/dist/data/emojis-it.d.ts +3 -0
- package/dist/data/emojis-it.js +2 -0
- package/dist/data/emojis-it.json +1 -0
- package/dist/data/emojis-it.ts +3 -0
- package/dist/data/emojis-ja.d.ts +3 -0
- package/dist/data/emojis-ja.js +2 -0
- package/dist/data/emojis-ja.json +1 -0
- package/dist/data/emojis-ja.ts +3 -0
- package/dist/data/emojis-ko.d.ts +3 -0
- package/dist/data/emojis-ko.js +2 -0
- package/dist/data/emojis-ko.json +1 -0
- package/dist/data/emojis-ko.ts +3 -0
- package/dist/data/emojis-lt.d.ts +3 -0
- package/dist/data/emojis-lt.js +2 -0
- package/dist/data/emojis-lt.json +1 -0
- package/dist/data/emojis-lt.ts +3 -0
- package/dist/data/emojis-ms.d.ts +3 -0
- package/dist/data/emojis-ms.js +2 -0
- package/dist/data/emojis-ms.json +1 -0
- package/dist/data/emojis-ms.ts +3 -0
- package/dist/data/emojis-nb.d.ts +3 -0
- package/dist/data/emojis-nb.js +2 -0
- package/dist/data/emojis-nb.json +1 -0
- package/dist/data/emojis-nb.ts +3 -0
- package/dist/data/emojis-nl.d.ts +3 -0
- package/dist/data/emojis-nl.js +2 -0
- package/dist/data/emojis-nl.json +1 -0
- package/dist/data/emojis-nl.ts +3 -0
- package/dist/data/emojis-pl.d.ts +3 -0
- package/dist/data/emojis-pl.js +2 -0
- package/dist/data/emojis-pl.json +1 -0
- package/dist/data/emojis-pl.ts +3 -0
- package/dist/data/emojis-pt.d.ts +3 -0
- package/dist/data/emojis-pt.js +2 -0
- package/dist/data/emojis-pt.json +1 -0
- package/dist/data/emojis-pt.ts +3 -0
- package/dist/data/emojis-ru.d.ts +3 -0
- package/dist/data/emojis-ru.js +2 -0
- package/dist/data/emojis-ru.json +1 -0
- package/dist/data/emojis-ru.ts +3 -0
- package/dist/data/emojis-sv.d.ts +3 -0
- package/dist/data/emojis-sv.js +2 -0
- package/dist/data/emojis-sv.json +1 -0
- package/dist/data/emojis-sv.ts +3 -0
- package/dist/data/emojis-th.d.ts +3 -0
- package/dist/data/emojis-th.js +2 -0
- package/dist/data/emojis-th.json +1 -0
- package/dist/data/emojis-th.ts +3 -0
- package/dist/data/emojis-uk.d.ts +3 -0
- package/dist/data/emojis-uk.js +2 -0
- package/dist/data/emojis-uk.json +1 -0
- package/dist/data/emojis-uk.ts +3 -0
- package/dist/data/emojis-zh-hant.d.ts +3 -0
- package/dist/data/emojis-zh-hant.js +2 -0
- package/dist/data/emojis-zh-hant.json +1 -0
- package/dist/data/emojis-zh-hant.ts +3 -0
- package/dist/data/emojis-zh.d.ts +3 -0
- package/dist/data/emojis-zh.js +2 -0
- package/dist/data/emojis-zh.json +1 -0
- package/dist/data/emojis-zh.ts +3 -0
- package/dist/data/emojis.d.ts +102 -50
- package/dist/data/emojis.js +1 -0
- package/dist/data/emojis.json +1 -0
- package/dist/data/emojis.ts +1 -0
- package/dist/data/groups.d.ts +2 -2
- package/dist/data/groups.js +11 -0
- package/dist/data/groups.ts +12 -0
- package/dist/data/skinToneVariations.d.ts +5 -5
- package/dist/data/skinToneVariations.js +17 -0
- package/dist/data/skinToneVariations.ts +31 -0
- package/dist/dataUtils/DataTypes.d.ts +2 -2
- package/dist/dataUtils/emojiUtils.d.ts +12 -0
- package/dist/emoji-picker-react.cjs.development.js +20120 -17359
- package/dist/emoji-picker-react.cjs.development.js.map +1 -1
- package/dist/emoji-picker-react.cjs.production.min.js +1 -1
- package/dist/emoji-picker-react.cjs.production.min.js.map +1 -1
- package/dist/emoji-picker-react.esm.js +20121 -17360
- package/dist/emoji-picker-react.esm.js.map +1 -1
- package/dist/typeRefinements/typeRefinements.d.ts +2 -1
- package/dist/types/exposedTypes.d.ts +64 -50
- package/dist/types/exposedTypes.js +46 -0
- package/package.json +9 -5
- package/src/EmojiPickerReact.tsx +4 -1
- package/src/components/Reactions/Reactions.tsx +28 -20
- package/src/components/body/EmojiCategory.tsx +1 -1
- package/src/components/body/EmojiList.tsx +3 -5
- package/src/components/context/PickerConfigContext.tsx +2 -1
- package/src/components/context/PickerContext.tsx +7 -2
- package/src/components/context/PickerDataContext.tsx +157 -0
- package/src/components/emoji/ClickableEmojiButton.tsx +1 -3
- package/src/components/emoji/ViewOnlyEmoji.tsx +4 -5
- package/src/components/footer/Preview.tsx +6 -6
- package/src/components/navigation/CategoryButton.tsx +2 -4
- package/src/config/categoryConfig.ts +47 -30
- package/src/config/compareConfig.ts +3 -2
- package/src/config/config.ts +31 -15
- package/src/data/emojis-bn.json +1 -0
- package/src/data/emojis-bn.ts +3 -0
- package/src/data/emojis-da.json +1 -0
- package/src/data/emojis-da.ts +3 -0
- package/src/data/emojis-de.json +1 -0
- package/src/data/emojis-de.ts +3 -0
- package/src/data/emojis-en-gb.json +1 -0
- package/src/data/emojis-en-gb.ts +3 -0
- package/src/data/emojis-en.json +1 -0
- package/src/data/emojis-en.ts +3 -0
- package/src/data/emojis-es-mx.json +1 -0
- package/src/data/emojis-es-mx.ts +3 -0
- package/src/data/emojis-es.json +1 -0
- package/src/data/emojis-es.ts +3 -0
- package/src/data/emojis-et.json +1 -0
- package/src/data/emojis-et.ts +3 -0
- package/src/data/emojis-fi.json +1 -0
- package/src/data/emojis-fi.ts +3 -0
- package/src/data/emojis-fr.json +1 -0
- package/src/data/emojis-fr.ts +3 -0
- package/src/data/emojis-hi.json +1 -0
- package/src/data/emojis-hi.ts +3 -0
- package/src/data/emojis-hu.json +1 -0
- package/src/data/emojis-hu.ts +3 -0
- package/src/data/emojis-it.json +1 -0
- package/src/data/emojis-it.ts +3 -0
- package/src/data/emojis-ja.json +1 -0
- package/src/data/emojis-ja.ts +3 -0
- package/src/data/emojis-ko.json +1 -0
- package/src/data/emojis-ko.ts +3 -0
- package/src/data/emojis-lt.json +1 -0
- package/src/data/emojis-lt.ts +3 -0
- package/src/data/emojis-ms.json +1 -0
- package/src/data/emojis-ms.ts +3 -0
- package/src/data/emojis-nb.json +1 -0
- package/src/data/emojis-nb.ts +3 -0
- package/src/data/emojis-nl.json +1 -0
- package/src/data/emojis-nl.ts +3 -0
- package/src/data/emojis-pl.json +1 -0
- package/src/data/emojis-pl.ts +3 -0
- package/src/data/emojis-pt.json +1 -0
- package/src/data/emojis-pt.ts +3 -0
- package/src/data/emojis-ru.json +1 -0
- package/src/data/emojis-ru.ts +3 -0
- package/src/data/emojis-sv.json +1 -0
- package/src/data/emojis-sv.ts +3 -0
- package/src/data/emojis-th.json +1 -0
- package/src/data/emojis-th.ts +3 -0
- package/src/data/emojis-uk.json +1 -0
- package/src/data/emojis-uk.ts +3 -0
- package/src/data/emojis-zh-hant.json +1 -0
- package/src/data/emojis-zh-hant.ts +3 -0
- package/src/data/emojis-zh.json +1 -0
- package/src/data/emojis-zh.ts +3 -0
- package/src/data/emojis.json +1 -1
- package/src/data/emojis.ts +1 -1
- package/src/dataUtils/DataTypes.ts +2 -2
- package/src/dataUtils/alphaNumericEmojiIndex.ts +1 -8
- package/src/dataUtils/emojiSelectors.ts +24 -25
- package/src/dataUtils/emojiUtils.ts +74 -0
- package/src/hooks/preloadEmoji.ts +1 -1
- package/src/hooks/useDisallowedEmojis.ts +4 -3
- package/src/hooks/useEmojiVirtualization.tsx +2 -3
- package/src/hooks/useFilter.ts +1 -1
- package/src/hooks/useIsEmojiHidden.ts +1 -1
- package/src/typeRefinements/typeRefinements.ts +2 -5
- package/src/types/exposedTypes.ts +17 -0
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Categories,
|
|
3
|
+
CategoryConfig,
|
|
4
|
+
EmojiData,
|
|
5
|
+
SuggestionMode,
|
|
6
|
+
} from '../types/exposedTypes';
|
|
2
7
|
|
|
3
8
|
export { Categories };
|
|
4
9
|
|
|
@@ -12,12 +17,12 @@ const categoriesOrdered: Categories[] = [
|
|
|
12
17
|
Categories.ACTIVITIES,
|
|
13
18
|
Categories.OBJECTS,
|
|
14
19
|
Categories.SYMBOLS,
|
|
15
|
-
Categories.FLAGS
|
|
20
|
+
Categories.FLAGS,
|
|
16
21
|
];
|
|
17
22
|
|
|
18
23
|
export const SuggestedRecent: CategoryConfig = {
|
|
19
24
|
name: 'Recently Used',
|
|
20
|
-
category: Categories.SUGGESTED
|
|
25
|
+
category: Categories.SUGGESTED,
|
|
21
26
|
};
|
|
22
27
|
|
|
23
28
|
export type CustomCategoryConfig = {
|
|
@@ -28,53 +33,53 @@ export type CustomCategoryConfig = {
|
|
|
28
33
|
const configByCategory: Record<Categories, CategoryConfig> = {
|
|
29
34
|
[Categories.SUGGESTED]: {
|
|
30
35
|
category: Categories.SUGGESTED,
|
|
31
|
-
name: 'Frequently Used'
|
|
36
|
+
name: 'Frequently Used',
|
|
32
37
|
},
|
|
33
38
|
[Categories.CUSTOM]: {
|
|
34
39
|
category: Categories.CUSTOM,
|
|
35
|
-
name: 'Custom Emojis'
|
|
40
|
+
name: 'Custom Emojis',
|
|
36
41
|
},
|
|
37
42
|
[Categories.SMILEYS_PEOPLE]: {
|
|
38
43
|
category: Categories.SMILEYS_PEOPLE,
|
|
39
|
-
name: 'Smileys & People'
|
|
44
|
+
name: 'Smileys & People',
|
|
40
45
|
},
|
|
41
46
|
[Categories.ANIMALS_NATURE]: {
|
|
42
47
|
category: Categories.ANIMALS_NATURE,
|
|
43
|
-
name: 'Animals & Nature'
|
|
48
|
+
name: 'Animals & Nature',
|
|
44
49
|
},
|
|
45
50
|
[Categories.FOOD_DRINK]: {
|
|
46
51
|
category: Categories.FOOD_DRINK,
|
|
47
|
-
name: 'Food & Drink'
|
|
52
|
+
name: 'Food & Drink',
|
|
48
53
|
},
|
|
49
54
|
[Categories.TRAVEL_PLACES]: {
|
|
50
55
|
category: Categories.TRAVEL_PLACES,
|
|
51
|
-
name: 'Travel & Places'
|
|
56
|
+
name: 'Travel & Places',
|
|
52
57
|
},
|
|
53
58
|
[Categories.ACTIVITIES]: {
|
|
54
59
|
category: Categories.ACTIVITIES,
|
|
55
|
-
name: 'Activities'
|
|
60
|
+
name: 'Activities',
|
|
56
61
|
},
|
|
57
62
|
[Categories.OBJECTS]: {
|
|
58
63
|
category: Categories.OBJECTS,
|
|
59
|
-
name: 'Objects'
|
|
64
|
+
name: 'Objects',
|
|
60
65
|
},
|
|
61
66
|
[Categories.SYMBOLS]: {
|
|
62
67
|
category: Categories.SYMBOLS,
|
|
63
|
-
name: 'Symbols'
|
|
68
|
+
name: 'Symbols',
|
|
64
69
|
},
|
|
65
70
|
[Categories.FLAGS]: {
|
|
66
71
|
category: Categories.FLAGS,
|
|
67
|
-
name: 'Flags'
|
|
68
|
-
}
|
|
72
|
+
name: 'Flags',
|
|
73
|
+
},
|
|
69
74
|
};
|
|
70
75
|
|
|
71
76
|
export function baseCategoriesConfig(
|
|
72
|
-
modifiers?: Record<Categories, CategoryConfig
|
|
77
|
+
modifiers?: Record<Categories, CategoryConfig>,
|
|
73
78
|
): CategoriesConfig {
|
|
74
|
-
return categoriesOrdered.map(category => {
|
|
79
|
+
return categoriesOrdered.map((category) => {
|
|
75
80
|
return {
|
|
76
81
|
...configByCategory[category],
|
|
77
|
-
...(modifiers && modifiers[category] && modifiers[category])
|
|
82
|
+
...(modifiers && modifiers[category] && modifiers[category]),
|
|
78
83
|
};
|
|
79
84
|
});
|
|
80
85
|
}
|
|
@@ -89,43 +94,55 @@ export function categoryNameFromCategoryConfig(category: CategoryConfig) {
|
|
|
89
94
|
|
|
90
95
|
export type CategoriesConfig = CategoryConfig[];
|
|
91
96
|
|
|
92
|
-
export type CategoryConfig = {
|
|
93
|
-
category: Categories;
|
|
94
|
-
name: string;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
97
|
export type UserCategoryConfig = Array<Categories | CategoryConfig>;
|
|
98
98
|
|
|
99
99
|
export function mergeCategoriesConfig(
|
|
100
100
|
userCategoriesConfig: UserCategoryConfig = [],
|
|
101
|
-
modifiers: CategoryConfigModifiers = {}
|
|
101
|
+
modifiers: CategoryConfigModifiers = {},
|
|
102
|
+
emojiData?: EmojiData,
|
|
102
103
|
): CategoriesConfig {
|
|
103
|
-
const extra =
|
|
104
|
+
const extra = ((): Record<Categories, CategoryConfig> => {
|
|
105
|
+
// 1. Start with localized categories from emojiData
|
|
106
|
+
const fromData = emojiData?.categories
|
|
107
|
+
? (Object.fromEntries(
|
|
108
|
+
Object.entries(emojiData.categories).filter(([, config]) => !!config),
|
|
109
|
+
) as Record<Categories, CategoryConfig>)
|
|
110
|
+
: ({} as Record<Categories, CategoryConfig>);
|
|
111
|
+
|
|
112
|
+
// 2. Handle "Recently Used" override for explicit 'recent' mode
|
|
113
|
+
if (modifiers.suggestionMode === SuggestionMode.RECENT) {
|
|
114
|
+
const recentConfig = (
|
|
115
|
+
emojiData?.categories as Record<string, CategoryConfig | undefined>
|
|
116
|
+
)?.['suggested_recent'];
|
|
117
|
+
fromData[Categories.SUGGESTED] = recentConfig
|
|
118
|
+
? { category: Categories.SUGGESTED, name: recentConfig.name }
|
|
119
|
+
: SuggestedRecent;
|
|
120
|
+
}
|
|
104
121
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
122
|
+
return fromData;
|
|
123
|
+
})();
|
|
108
124
|
|
|
109
125
|
const base = baseCategoriesConfig(extra);
|
|
126
|
+
|
|
110
127
|
if (!userCategoriesConfig?.length) {
|
|
111
128
|
return base;
|
|
112
129
|
}
|
|
113
130
|
|
|
114
|
-
return userCategoriesConfig.map(category => {
|
|
131
|
+
return userCategoriesConfig.map((category) => {
|
|
115
132
|
if (typeof category === 'string') {
|
|
116
133
|
return getBaseConfigByCategory(category, extra[category]);
|
|
117
134
|
}
|
|
118
135
|
|
|
119
136
|
return {
|
|
120
137
|
...getBaseConfigByCategory(category.category, extra[category.category]),
|
|
121
|
-
...category
|
|
138
|
+
...category,
|
|
122
139
|
};
|
|
123
140
|
});
|
|
124
141
|
}
|
|
125
142
|
|
|
126
143
|
function getBaseConfigByCategory(
|
|
127
144
|
category: Categories,
|
|
128
|
-
modifier: CategoryConfig = {} as CategoryConfig
|
|
145
|
+
modifier: CategoryConfig = {} as CategoryConfig,
|
|
129
146
|
) {
|
|
130
147
|
return Object.assign(configByCategory[category], modifier);
|
|
131
148
|
}
|
|
@@ -24,6 +24,7 @@ export function compareConfig(prev: PickerConfig, next: PickerConfig) {
|
|
|
24
24
|
prev.style === next.style &&
|
|
25
25
|
prev.searchDisabled === next.searchDisabled &&
|
|
26
26
|
prev.skinTonePickerLocation === next.skinTonePickerLocation &&
|
|
27
|
-
prevCustomEmojis.length === nextCustomEmojis.length
|
|
27
|
+
prevCustomEmojis.length === nextCustomEmojis.length &&
|
|
28
|
+
prev.emojiData === next.emojiData
|
|
28
29
|
);
|
|
29
|
-
}
|
|
30
|
+
}
|
package/src/config/config.ts
CHANGED
|
@@ -2,12 +2,10 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import { DEFAULT_REACTIONS } from '../components/Reactions/DEFAULT_REACTIONS';
|
|
4
4
|
import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
|
|
5
|
-
import {
|
|
6
|
-
setCustomEmojis,
|
|
7
|
-
emojiUrlByUnified,
|
|
8
|
-
} from '../dataUtils/emojiSelectors';
|
|
5
|
+
import { emojiUrlByUnified } from '../dataUtils/emojiUtils';
|
|
9
6
|
import {
|
|
10
7
|
EmojiClickData,
|
|
8
|
+
EmojiData,
|
|
11
9
|
EmojiStyle,
|
|
12
10
|
SkinTonePickerLocation,
|
|
13
11
|
SkinTones,
|
|
@@ -35,26 +33,42 @@ export const SEARCH_RESULTS_MULTIPLE_RESULTS_FOUND =
|
|
|
35
33
|
'%n results' + SEARCH_RESULTS_SUFFIX;
|
|
36
34
|
|
|
37
35
|
export function mergeConfig(
|
|
38
|
-
userConfig: PickerConfig = {}
|
|
36
|
+
userConfig: PickerConfig = {},
|
|
39
37
|
): PickerConfigInternal {
|
|
40
38
|
const base = basePickerConfig();
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
// Get localized mood from emojiData, fallback to base default
|
|
41
|
+
// Get localized mood from emojiData, fallback to base default
|
|
42
|
+
const localizedMood = (
|
|
43
|
+
userConfig.emojiData?.categories as Record<
|
|
44
|
+
string,
|
|
45
|
+
{ name: string } | undefined
|
|
46
|
+
>
|
|
47
|
+
)?.preview_mood?.name;
|
|
48
|
+
|
|
49
|
+
const previewConfig = {
|
|
50
|
+
...base.previewConfig,
|
|
51
|
+
// Localized mood is default, but user can override
|
|
52
|
+
...(localizedMood && !userConfig.previewConfig?.defaultCaption
|
|
53
|
+
? { defaultCaption: localizedMood }
|
|
54
|
+
: {}),
|
|
55
|
+
...(userConfig.previewConfig ?? {}),
|
|
56
|
+
};
|
|
57
|
+
|
|
46
58
|
const config = Object.assign(base, userConfig);
|
|
47
59
|
|
|
48
|
-
const categories = mergeCategoriesConfig(
|
|
49
|
-
|
|
50
|
-
|
|
60
|
+
const categories = mergeCategoriesConfig(
|
|
61
|
+
userConfig.categories,
|
|
62
|
+
{
|
|
63
|
+
suggestionMode: config.suggestedEmojisMode,
|
|
64
|
+
},
|
|
65
|
+
userConfig.emojiData,
|
|
66
|
+
);
|
|
51
67
|
|
|
52
68
|
config.hiddenEmojis.forEach((emoji) => {
|
|
53
69
|
config.unicodeToHide.add(emoji);
|
|
54
70
|
});
|
|
55
71
|
|
|
56
|
-
setCustomEmojis(config.customEmojis ?? []);
|
|
57
|
-
|
|
58
72
|
const skinTonePickerLocation = config.searchDisabled
|
|
59
73
|
? SkinTonePickerLocation.PREVIEW
|
|
60
74
|
: config.skinTonePickerLocation;
|
|
@@ -98,6 +112,7 @@ export function basePickerConfig(): PickerConfigInternal {
|
|
|
98
112
|
open: true,
|
|
99
113
|
allowExpandReactions: true,
|
|
100
114
|
hiddenEmojis: [],
|
|
115
|
+
emojiData: undefined,
|
|
101
116
|
};
|
|
102
117
|
}
|
|
103
118
|
|
|
@@ -129,6 +144,7 @@ export type PickerConfigInternal = {
|
|
|
129
144
|
open: boolean;
|
|
130
145
|
allowExpandReactions: boolean;
|
|
131
146
|
hiddenEmojis: string[];
|
|
147
|
+
emojiData?: EmojiData;
|
|
132
148
|
};
|
|
133
149
|
|
|
134
150
|
export type PreviewConfig = {
|
|
@@ -157,7 +173,7 @@ export type PickerDimensions = string | number;
|
|
|
157
173
|
export type MouseDownEvent = (
|
|
158
174
|
emoji: EmojiClickData,
|
|
159
175
|
event: MouseEvent,
|
|
160
|
-
api?: OnEmojiClickApi
|
|
176
|
+
api?: OnEmojiClickApi,
|
|
161
177
|
) => void;
|
|
162
178
|
export type OnSkinToneChange = (emoji: SkinTones) => void;
|
|
163
179
|
|