emoji-picker-react 4.4.1 → 4.4.2

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.
@@ -17014,6 +17014,13 @@ function useDisallowedEmojis() {
17014
17014
  }, DisallowedEmojisRef.current);
17015
17015
  }, [emojiVersionConfig]);
17016
17016
  }
17017
+ function useIsEmojiDisallowed() {
17018
+ var disallowedEmojis = useDisallowedEmojis();
17019
+ return function isEmojiDisallowed(emoji) {
17020
+ var unified = unifiedWithoutSkinTone(emojiUnified(emoji));
17021
+ return Boolean(disallowedEmojis[unified]);
17022
+ };
17023
+ }
17017
17024
 
17018
17025
  function addedInNewerVersion(emoji, supportedLevel) {
17019
17026
  return addedIn(emoji) > supportedLevel;
@@ -17144,12 +17151,6 @@ function useSkinToneFanOpenState() {
17144
17151
 
17145
17152
  return skinToneFanOpenState;
17146
17153
  }
17147
- function useDisallowedEmojisRef() {
17148
- var _React$useContext10 = useContext(PickerContext),
17149
- disallowedEmojisRef = _React$useContext10.disallowedEmojisRef;
17150
-
17151
- return disallowedEmojisRef;
17152
- }
17153
17154
  function useUpdateSuggested() {
17154
17155
  var _React$useContext11 = useContext(PickerContext),
17155
17156
  suggestedUpdateState = _React$useContext11.suggestedUpdateState;
@@ -18429,7 +18430,7 @@ function RenderCategory(_ref) {
18429
18430
  var _useActiveSkinToneSta = useActiveSkinToneState(),
18430
18431
  activeSkinTone = _useActiveSkinToneSta[0];
18431
18432
 
18432
- var disallowedEmojisRef = useDisallowedEmojisRef();
18433
+ var isEmojiDisallowed = useIsEmojiDisallowed();
18433
18434
  var getEmojiUrl = useGetEmojiUrlConfig(); // Small trick to defer the rendering of all emoji categories until the first category is visible
18434
18435
  // This way the user gets to actually see something and not wait for the whole picker to render.
18435
18436
 
@@ -18443,7 +18444,7 @@ function RenderCategory(_ref) {
18443
18444
  filteredOut = _isEmojiHidden.filteredOut,
18444
18445
  hidden = _isEmojiHidden.hidden;
18445
18446
 
18446
- var isDisallowed = !!disallowedEmojisRef.current[unified];
18447
+ var isDisallowed = isEmojiDisallowed(emoji);
18447
18448
 
18448
18449
  if (hidden || isDisallowed) {
18449
18450
  hiddenCounter++;