emoji-picker-react 4.4.1 → 4.4.3

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 CHANGED
@@ -1,4 +1,4 @@
1
- \*\*\*\*# Emoji Picker React (v4) | [Live Demo](https://codesandbox.io/s/emoji-picker-react-4-z2gkzp)
1
+ # Emoji Picker React (v4) | [Live Demo](https://codesandbox.io/s/emoji-picker-react-4-z2gkzp)
2
2
 
3
3
  ![Picker](https://user-images.githubusercontent.com/11255103/192167134-8205eb89-a71d-4463-8f3a-940e844917d5.gif)
4
4
 
@@ -17008,6 +17008,13 @@ function useDisallowedEmojis() {
17008
17008
  }, DisallowedEmojisRef.current);
17009
17009
  }, [emojiVersionConfig]);
17010
17010
  }
17011
+ function useIsEmojiDisallowed() {
17012
+ var disallowedEmojis = useDisallowedEmojis();
17013
+ return function isEmojiDisallowed(emoji) {
17014
+ var unified = unifiedWithoutSkinTone(emojiUnified(emoji));
17015
+ return Boolean(disallowedEmojis[unified]);
17016
+ };
17017
+ }
17011
17018
 
17012
17019
  function addedInNewerVersion(emoji, supportedLevel) {
17013
17020
  return addedIn(emoji) > supportedLevel;
@@ -17138,12 +17145,6 @@ function useSkinToneFanOpenState() {
17138
17145
 
17139
17146
  return skinToneFanOpenState;
17140
17147
  }
17141
- function useDisallowedEmojisRef() {
17142
- var _React$useContext10 = React.useContext(PickerContext),
17143
- disallowedEmojisRef = _React$useContext10.disallowedEmojisRef;
17144
-
17145
- return disallowedEmojisRef;
17146
- }
17147
17148
  function useUpdateSuggested() {
17148
17149
  var _React$useContext11 = React.useContext(PickerContext),
17149
17150
  suggestedUpdateState = _React$useContext11.suggestedUpdateState;
@@ -18387,7 +18388,7 @@ function RenderCategory(_ref) {
18387
18388
  var _useActiveSkinToneSta = useActiveSkinToneState(),
18388
18389
  activeSkinTone = _useActiveSkinToneSta[0];
18389
18390
 
18390
- var disallowedEmojisRef = useDisallowedEmojisRef();
18391
+ var isEmojiDisallowed = useIsEmojiDisallowed();
18391
18392
  var getEmojiUrl = useGetEmojiUrlConfig(); // Small trick to defer the rendering of all emoji categories until the first category is visible
18392
18393
  // This way the user gets to actually see something and not wait for the whole picker to render.
18393
18394
 
@@ -18401,7 +18402,7 @@ function RenderCategory(_ref) {
18401
18402
  filteredOut = _isEmojiHidden.filteredOut,
18402
18403
  hidden = _isEmojiHidden.hidden;
18403
18404
 
18404
- var isDisallowed = !!disallowedEmojisRef.current[unified];
18405
+ var isDisallowed = isEmojiDisallowed(emoji);
18405
18406
 
18406
18407
  if (hidden || isDisallowed) {
18407
18408
  hiddenCounter++;