emoji-picker-react 4.22.3 → 5.0.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 +331 -49
- package/dist/DomUtils/categoryNameFromDom.d.ts +1 -1
- package/dist/DomUtils/classNames.d.ts +23 -23
- package/dist/DomUtils/detectEmojyPartiallyBelowFold.d.ts +2 -2
- package/dist/DomUtils/elementPositionInRow.d.ts +5 -5
- package/dist/DomUtils/eventBelongsToPicker.d.ts +2 -0
- package/dist/DomUtils/focusElement.d.ts +5 -5
- package/dist/DomUtils/getActiveElement.d.ts +2 -2
- package/dist/DomUtils/isJsdom.d.ts +1 -0
- package/dist/DomUtils/isRtl.d.ts +1 -0
- package/dist/DomUtils/keyboardNavigation.d.ts +15 -8
- package/dist/DomUtils/scrollTo.d.ts +4 -5
- package/dist/DomUtils/selectors.d.ts +31 -35
- package/dist/EmojiPickerReact.d.ts +5 -5
- package/dist/Stylesheet/DedupedStyle.d.ts +13 -0
- package/dist/Stylesheet/stylesheet.d.ts +40 -37
- package/dist/components/ErrorBoundary.d.ts +15 -15
- package/dist/components/Layout/Absolute.d.ts +8 -8
- package/dist/components/Layout/Flex.d.ts +13 -13
- package/dist/components/Layout/Relative.d.ts +8 -8
- package/dist/components/Layout/Space.d.ts +7 -7
- package/dist/components/Reactions/BtnPlus.d.ts +2 -2
- package/dist/components/Reactions/DEFAULT_REACTIONS.d.ts +1 -1
- package/dist/components/Reactions/Reactions.d.ts +3 -2
- package/dist/components/atoms/Button.d.ts +11 -6
- package/dist/components/body/EmojiCategory.d.ts +13 -12
- package/dist/components/body/EmojiList.d.ts +7 -4
- package/dist/components/body/EmojiVariationPicker.d.ts +2 -2
- package/dist/components/body/MeasureEmoji.d.ts +2 -2
- package/dist/components/body/listComponents.d.ts +47 -0
- package/dist/components/context/ElementRefContext.d.ts +18 -16
- package/dist/components/context/PickerConfigContext.d.ts +14 -9
- package/dist/components/context/PickerContext.d.ts +57 -25
- package/dist/components/context/PickerDataContext.d.ts +23 -17
- package/dist/components/emoji/BaseEmojiProps.d.ts +14 -13
- package/dist/components/emoji/ClickableEmojiButton.d.ts +23 -15
- package/dist/components/emoji/Emoji.d.ts +18 -15
- package/dist/components/emoji/EmojiImg.d.ts +11 -11
- package/dist/components/emoji/ExportedEmoji.d.ts +11 -11
- package/dist/components/emoji/NativeEmoji.d.ts +6 -6
- package/dist/components/emoji/ViewOnlyEmoji.d.ts +3 -3
- package/dist/components/emoji/emojiStyles.d.ts +6 -1
- package/dist/components/footer/Preview.d.ts +7 -7
- package/dist/components/header/Header.d.ts +2 -2
- package/dist/components/header/Search/BtnClearSearch.d.ts +2 -2
- package/dist/components/header/Search/IcnSearch.d.ts +2 -2
- package/dist/components/header/Search/Search.d.ts +11 -3
- package/dist/components/header/SkinTonePicker/BtnSkinToneVariation.d.ts +12 -12
- package/dist/components/header/SkinTonePicker/SkinTonePicker.d.ts +11 -11
- package/dist/components/icons/svgIcons.d.ts +4 -0
- package/dist/components/main/PickerMainBehaviors.d.ts +4 -0
- package/dist/components/main/defaultAppearance.d.ts +12 -0
- package/dist/components/main/labelHeight.d.ts +1 -0
- package/dist/components/navigation/CategoryButton.d.ts +12 -12
- package/dist/components/navigation/CategoryNavIcon.d.ts +4 -4
- package/dist/components/navigation/CategoryNavigation.d.ts +19 -2
- package/dist/config/categoryConfig.d.ts +34 -34
- package/dist/config/cdnUrls.d.ts +2 -2
- package/dist/config/compareConfig.d.ts +10 -2
- package/dist/config/config.d.ts +166 -64
- package/dist/config/customEmojiConfig.d.ts +14 -14
- package/dist/config/defaultPickerConfiguration.d.ts +10 -0
- package/dist/config/mutableConfig.d.ts +32 -10
- package/dist/config/useConfig.d.ts +48 -36
- package/dist/data/defaultEmojiData.d.ts +9 -0
- package/dist/data/defaultEmojiData.js +40 -0
- package/dist/data/emojis-bn.d.mts +39 -0
- package/dist/data/emojis-bn.d.ts +38 -2
- package/dist/data/emojis-bn.js +25 -2
- package/dist/data/emojis-bn.mjs +2 -0
- package/dist/data/emojis-da.d.mts +39 -0
- package/dist/data/emojis-da.d.ts +38 -2
- package/dist/data/emojis-da.js +25 -2
- package/dist/data/emojis-da.mjs +2 -0
- package/dist/data/emojis-de.d.mts +39 -0
- package/dist/data/emojis-de.d.ts +38 -2
- package/dist/data/emojis-de.js +25 -2
- package/dist/data/emojis-de.mjs +2 -0
- package/dist/data/emojis-en-gb.d.mts +39 -0
- package/dist/data/emojis-en-gb.d.ts +38 -2
- package/dist/data/emojis-en-gb.js +25 -2
- package/dist/data/emojis-en-gb.mjs +2 -0
- package/dist/data/emojis-en.d.mts +39 -0
- package/dist/data/emojis-en.d.ts +38 -2
- package/dist/data/emojis-en.js +25 -2
- package/dist/data/emojis-en.mjs +2 -0
- package/dist/data/emojis-es-mx.d.mts +39 -0
- package/dist/data/emojis-es-mx.d.ts +38 -2
- package/dist/data/emojis-es-mx.js +25 -2
- package/dist/data/emojis-es-mx.mjs +2 -0
- package/dist/data/emojis-es.d.mts +39 -0
- package/dist/data/emojis-es.d.ts +38 -2
- package/dist/data/emojis-es.js +25 -2
- package/dist/data/emojis-es.mjs +2 -0
- package/dist/data/emojis-et.d.mts +39 -0
- package/dist/data/emojis-et.d.ts +38 -2
- package/dist/data/emojis-et.js +25 -2
- package/dist/data/emojis-et.mjs +2 -0
- package/dist/data/emojis-fi.d.mts +39 -0
- package/dist/data/emojis-fi.d.ts +38 -2
- package/dist/data/emojis-fi.js +25 -2
- package/dist/data/emojis-fi.mjs +2 -0
- package/dist/data/emojis-fr.d.mts +39 -0
- package/dist/data/emojis-fr.d.ts +38 -2
- package/dist/data/emojis-fr.js +25 -2
- package/dist/data/emojis-fr.mjs +2 -0
- package/dist/data/emojis-hi.d.mts +39 -0
- package/dist/data/emojis-hi.d.ts +38 -2
- package/dist/data/emojis-hi.js +25 -2
- package/dist/data/emojis-hi.mjs +2 -0
- package/dist/data/emojis-hu.d.mts +39 -0
- package/dist/data/emojis-hu.d.ts +38 -2
- package/dist/data/emojis-hu.js +25 -2
- package/dist/data/emojis-hu.mjs +2 -0
- package/dist/data/emojis-it.d.mts +39 -0
- package/dist/data/emojis-it.d.ts +38 -2
- package/dist/data/emojis-it.js +25 -2
- package/dist/data/emojis-it.mjs +2 -0
- package/dist/data/emojis-ja.d.mts +39 -0
- package/dist/data/emojis-ja.d.ts +38 -2
- package/dist/data/emojis-ja.js +25 -2
- package/dist/data/emojis-ja.mjs +2 -0
- package/dist/data/emojis-ko.d.mts +39 -0
- package/dist/data/emojis-ko.d.ts +38 -2
- package/dist/data/emojis-ko.js +25 -2
- package/dist/data/emojis-ko.mjs +2 -0
- package/dist/data/emojis-lt.d.mts +39 -0
- package/dist/data/emojis-lt.d.ts +38 -2
- package/dist/data/emojis-lt.js +25 -2
- package/dist/data/emojis-lt.mjs +2 -0
- package/dist/data/emojis-ms.d.mts +39 -0
- package/dist/data/emojis-ms.d.ts +38 -2
- package/dist/data/emojis-ms.js +25 -2
- package/dist/data/emojis-ms.mjs +2 -0
- package/dist/data/emojis-nb.d.mts +39 -0
- package/dist/data/emojis-nb.d.ts +38 -2
- package/dist/data/emojis-nb.js +25 -2
- package/dist/data/emojis-nb.mjs +2 -0
- package/dist/data/emojis-nl.d.mts +39 -0
- package/dist/data/emojis-nl.d.ts +38 -2
- package/dist/data/emojis-nl.js +25 -2
- package/dist/data/emojis-nl.mjs +2 -0
- package/dist/data/emojis-pl.d.mts +39 -0
- package/dist/data/emojis-pl.d.ts +38 -2
- package/dist/data/emojis-pl.js +25 -2
- package/dist/data/emojis-pl.mjs +2 -0
- package/dist/data/emojis-pt.d.mts +39 -0
- package/dist/data/emojis-pt.d.ts +38 -2
- package/dist/data/emojis-pt.js +25 -2
- package/dist/data/emojis-pt.mjs +2 -0
- package/dist/data/emojis-ru.d.mts +39 -0
- package/dist/data/emojis-ru.d.ts +38 -2
- package/dist/data/emojis-ru.js +25 -2
- package/dist/data/emojis-ru.mjs +2 -0
- package/dist/data/emojis-sv.d.mts +39 -0
- package/dist/data/emojis-sv.d.ts +38 -2
- package/dist/data/emojis-sv.js +25 -2
- package/dist/data/emojis-sv.mjs +2 -0
- package/dist/data/emojis-th.d.mts +39 -0
- package/dist/data/emojis-th.d.ts +38 -2
- package/dist/data/emojis-th.js +25 -2
- package/dist/data/emojis-th.mjs +2 -0
- package/dist/data/emojis-uk.d.mts +39 -0
- package/dist/data/emojis-uk.d.ts +38 -2
- package/dist/data/emojis-uk.js +25 -2
- package/dist/data/emojis-uk.mjs +2 -0
- package/dist/data/emojis-vi.d.mts +39 -0
- package/dist/data/emojis-vi.d.ts +38 -2
- package/dist/data/emojis-vi.js +25 -2
- package/dist/data/emojis-vi.mjs +2 -0
- package/dist/data/emojis-zh-hant.d.mts +39 -0
- package/dist/data/emojis-zh-hant.d.ts +38 -2
- package/dist/data/emojis-zh-hant.js +25 -2
- package/dist/data/emojis-zh-hant.mjs +2 -0
- package/dist/data/emojis-zh.d.mts +39 -0
- package/dist/data/emojis-zh.d.ts +38 -2
- package/dist/data/emojis-zh.js +25 -2
- package/dist/data/emojis-zh.mjs +2 -0
- package/dist/data/index.js +1 -0
- package/dist/data/registerDefaultEmojiData.d.ts +1 -0
- package/dist/data/registerDefaultEmojiData.js +3 -0
- package/dist/data/skinToneVariations.js +2 -2
- package/dist/data/skinToneVariations.ts +8 -7
- package/dist/data-core/pickerData.d.ts +12 -0
- package/dist/data-core/prepare.d.ts +23 -0
- package/dist/data-core/search.d.ts +13 -0
- package/dist/data-core/types.d.ts +23 -0
- package/dist/data.d.mts +72 -0
- package/dist/data.d.ts +72 -0
- package/dist/dataUtils/DataTypes.d.ts +23 -19
- package/dist/dataUtils/emojiSelectors.d.ts +15 -16
- package/dist/dataUtils/emojiUtils.d.ts +1 -12
- package/dist/dataUtils/nativeEmojiSequenceSupport.d.ts +10 -0
- package/dist/dataUtils/nativeEmojiSupport.d.ts +40 -0
- package/dist/dataUtils/parseNativeEmoji.d.ts +1 -1
- package/dist/dataUtils/suggested.d.ts +11 -11
- package/dist/dataUtils/suggestedEmojis.d.ts +7 -0
- package/dist/esm/chunks/chunk-7ZGTUZFB.mjs +8025 -0
- package/dist/esm/chunks/chunk-ACXAQEKG.mjs +149 -0
- package/dist/esm/chunks/chunk-F2KS7DCA.mjs +6735 -0
- package/dist/esm/chunks/chunk-L5W4PFRJ.mjs +14 -0
- package/dist/esm/chunks/chunk-LO4TPPLH.mjs +33 -0
- package/dist/esm/chunks/emojis-6L3GRBAP.mjs +7 -0
- package/dist/esm/data.mjs +11 -0
- package/dist/esm/index.mjs +279 -0
- package/dist/esm/primitives/index.mjs +8 -0
- package/dist/hooks/preloadEmoji.d.ts +5 -9
- package/dist/hooks/useActiveCategoryScrollDetection.d.ts +11 -11
- package/dist/hooks/useCategoryHeight.d.ts +7 -5
- package/dist/hooks/useCloseAllOpenToggles.d.ts +2 -2
- package/dist/hooks/useDataIdentityStabilityWarning.d.ts +13 -0
- package/dist/hooks/useDebouncedState.d.ts +1 -1
- package/dist/hooks/useDisallowMouseMove.d.ts +4 -4
- package/dist/hooks/useDisallowedEmojis.d.ts +2 -3
- package/dist/hooks/useEmojiPreviewEvents.d.ts +3 -3
- package/dist/hooks/useEmojiVirtualization.d.ts +22 -17
- package/dist/hooks/useFilter.d.ts +10 -16
- package/dist/hooks/useFocus.d.ts +3 -3
- package/dist/hooks/useInitialLoad.d.ts +2 -2
- package/dist/hooks/useIsEmojiHidden.d.ts +8 -8
- package/dist/hooks/useIsMounted.d.ts +1 -1
- package/dist/hooks/useIsSearchMode.d.ts +1 -1
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/hooks/useKeyboardNavigation.d.ts +3 -1
- package/dist/hooks/useMouseDownHandlers.d.ts +8 -4
- package/dist/hooks/useOnFocus.d.ts +1 -1
- package/dist/hooks/useOnScroll.d.ts +2 -2
- package/dist/hooks/useReactionsFocus.d.ts +1 -0
- package/dist/hooks/useRegisterRegion.d.ts +24 -0
- package/dist/hooks/useResolvedEmojiData.d.ts +37 -0
- package/dist/hooks/useScrollCategoryIntoView.d.ts +1 -1
- package/dist/hooks/useSearchController.d.ts +17 -0
- package/dist/hooks/useSearchResults.d.ts +8 -0
- package/dist/hooks/useSetVariationPicker.d.ts +2 -2
- package/dist/hooks/useShouldHideCustomEmojis.d.ts +1 -1
- package/dist/hooks/useShouldShowSkinTonePicker.d.ts +4 -4
- package/dist/index.d.mts +376 -0
- package/dist/index.d.ts +376 -9
- package/dist/index.js +2 -8
- package/dist/primitives/CategoryNav.d.ts +4 -0
- package/dist/primitives/Empty.d.ts +6 -0
- package/dist/primitives/List.d.ts +4 -0
- package/dist/primitives/LoadError.d.ts +8 -0
- package/dist/primitives/Loading.d.ts +4 -0
- package/dist/primitives/Panel.d.ts +3 -0
- package/dist/primitives/Preview.d.ts +3 -0
- package/dist/primitives/Reactions.d.ts +2 -0
- package/dist/primitives/Root.d.ts +26 -0
- package/dist/primitives/Search.d.ts +5 -0
- package/dist/primitives/SearchInput.d.ts +3 -0
- package/dist/primitives/SkinTone.d.ts +4 -0
- package/dist/primitives/Viewport.d.ts +19 -0
- package/dist/primitives/appearance.d.ts +3 -0
- package/dist/primitives/components.d.ts +27 -0
- package/dist/primitives/hooks.d.ts +48 -0
- package/dist/primitives/index.d.mts +561 -0
- package/dist/primitives/index.d.ts +561 -0
- package/dist/primitives/index.js +2 -0
- package/dist/primitives/nativeProps.d.ts +15 -0
- package/dist/primitives/scope.d.ts +13 -0
- package/dist/primitives/structuralStyles.d.ts +16 -0
- package/dist/primitives/tokens.d.ts +18 -0
- package/dist/primitives/types.d.ts +85 -0
- package/dist/state/activeEmojiStore.d.ts +7 -0
- package/dist/state/navigationRegistry.d.ts +61 -0
- package/dist/state/regionTraversal.d.ts +20 -0
- package/dist/typeRefinements/typeRefinements.d.ts +6 -6
- package/dist/types/exposedTypes.d.ts +16 -6
- package/dist/types/exposedTypes.js +5 -0
- package/dist/virtualization/virtualizationHelpers.d.ts +22 -18
- package/llms-full.txt +3683 -0
- package/llms.txt +66 -480
- package/package.json +180 -66
- package/src/DomUtils/categoryNameFromDom.ts +1 -1
- package/src/DomUtils/classNames.ts +1 -4
- package/src/DomUtils/elementPositionInRow.ts +28 -6
- package/src/DomUtils/eventBelongsToPicker.ts +17 -0
- package/src/DomUtils/getActiveElement.ts +7 -1
- package/src/DomUtils/isJsdom.ts +12 -0
- package/src/DomUtils/isRtl.ts +5 -0
- package/src/DomUtils/keyboardNavigation.ts +164 -144
- package/src/DomUtils/scrollTo.ts +20 -18
- package/src/DomUtils/selectors.ts +30 -127
- package/src/EmojiPickerReact.tsx +155 -48
- package/src/Stylesheet/DedupedStyle.tsx +80 -0
- package/src/Stylesheet/stylesheet.tsx +128 -59
- package/src/components/Layout/Flex.tsx +12 -11
- package/src/components/Reactions/BtnPlus.tsx +61 -51
- package/src/components/Reactions/Reactions.tsx +113 -55
- package/src/components/atoms/Button.tsx +18 -15
- package/src/components/body/EmojiCategory.tsx +77 -40
- package/src/components/body/EmojiList.tsx +107 -44
- package/src/components/body/EmojiVariationPicker.tsx +113 -66
- package/src/components/body/MeasureEmoji.tsx +9 -2
- package/src/components/body/listComponents.tsx +79 -0
- package/src/components/context/ElementRefContext.tsx +46 -35
- package/src/components/context/PickerConfigContext.tsx +55 -40
- package/src/components/context/PickerContext.tsx +567 -92
- package/src/components/context/PickerDataContext.tsx +114 -99
- package/src/components/emoji/BaseEmojiProps.ts +5 -4
- package/src/components/emoji/ClickableEmojiButton.tsx +148 -63
- package/src/components/emoji/Emoji.tsx +24 -2
- package/src/components/emoji/EmojiImg.tsx +13 -12
- package/src/components/emoji/ExportedEmoji.tsx +5 -4
- package/src/components/emoji/NativeEmoji.tsx +19 -16
- package/src/components/emoji/ViewOnlyEmoji.tsx +55 -30
- package/src/components/emoji/emojiStyles.ts +12 -11
- package/src/components/footer/Preview.tsx +86 -91
- package/src/components/header/Header.tsx +21 -6
- package/src/components/header/Search/BtnClearSearch.tsx +69 -55
- package/src/components/header/Search/IcnSearch.tsx +21 -21
- package/src/components/header/Search/Search.tsx +79 -137
- package/src/components/header/SkinTonePicker/BtnSkinToneVariation.tsx +99 -62
- package/src/components/header/SkinTonePicker/SkinTonePicker.tsx +84 -46
- package/src/components/icons/svgIcons.ts +17 -0
- package/src/components/main/PickerMainBehaviors.tsx +163 -0
- package/src/components/main/defaultAppearance.tsx +189 -0
- package/src/components/main/labelHeight.ts +5 -0
- package/src/components/navigation/CategoryButton.tsx +83 -57
- package/src/components/navigation/CategoryNavIcon.tsx +73 -194
- package/src/components/navigation/CategoryNavigation.tsx +118 -46
- package/src/config/categoryConfig.ts +7 -3
- package/src/config/cdnUrls.ts +11 -21
- package/src/config/compareConfig.ts +128 -30
- package/src/config/config.ts +228 -24
- package/src/config/defaultPickerConfiguration.ts +7 -0
- package/src/config/mutableConfig.ts +44 -20
- package/src/config/useConfig.ts +130 -37
- package/src/data/defaultEmojiData.ts +49 -0
- package/src/data/registerDefaultEmojiData.ts +8 -0
- package/src/data/skinToneVariations.ts +8 -7
- package/src/data-core/pickerData.ts +171 -0
- package/src/data-core/prepare.ts +163 -0
- package/src/data-core/search.ts +122 -0
- package/src/data-core/types.ts +36 -0
- package/src/data.ts +10 -0
- package/src/dataUtils/DataTypes.ts +4 -0
- package/src/dataUtils/emojiSelectors.ts +59 -63
- package/src/dataUtils/emojiUtils.ts +17 -74
- package/src/dataUtils/nativeEmojiSequenceSupport.ts +116 -0
- package/src/dataUtils/nativeEmojiSupport.ts +160 -0
- package/src/dataUtils/parseNativeEmoji.ts +3 -4
- package/src/dataUtils/suggested.ts +8 -4
- package/src/dataUtils/suggestedEmojis.ts +92 -0
- package/src/env.d.ts +4 -0
- package/src/hooks/preloadEmoji.ts +2 -47
- package/src/hooks/useActiveCategoryScrollDetection.ts +28 -16
- package/src/hooks/useCategoryHeight.ts +116 -10
- package/src/hooks/useDataIdentityStabilityWarning.ts +86 -0
- package/src/hooks/useDebouncedState.ts +13 -1
- package/src/hooks/useDisallowedEmojis.ts +31 -42
- package/src/hooks/useEmojiPreviewEvents.ts +43 -10
- package/src/hooks/useEmojiVirtualization.tsx +112 -52
- package/src/hooks/useFilter.ts +92 -132
- package/src/hooks/useFocus.ts +14 -24
- package/src/hooks/useIsEmojiHidden.ts +22 -14
- package/src/hooks/useKeyboardNavigation.ts +412 -432
- package/src/hooks/useMouseDownHandlers.ts +91 -16
- package/src/hooks/useOnFocus.ts +12 -3
- package/src/hooks/useOnScroll.ts +18 -2
- package/src/hooks/useReactionsFocus.ts +118 -0
- package/src/hooks/useRegisterRegion.ts +92 -0
- package/src/hooks/useResolvedEmojiData.ts +200 -0
- package/src/hooks/useScrollCategoryIntoView.ts +74 -12
- package/src/hooks/useSearchController.ts +369 -0
- package/src/hooks/useSearchResults.ts +51 -0
- package/src/hooks/useSetVariationPicker.ts +4 -1
- package/src/index.tsx +67 -5
- package/src/primitives/CategoryNav.tsx +40 -0
- package/src/primitives/Empty.tsx +68 -0
- package/src/primitives/List.tsx +61 -0
- package/src/primitives/LoadError.tsx +38 -0
- package/src/primitives/Loading.tsx +60 -0
- package/src/primitives/Panel.tsx +47 -0
- package/src/primitives/Preview.tsx +38 -0
- package/src/primitives/Reactions.tsx +2 -0
- package/src/primitives/Root.tsx +398 -0
- package/src/primitives/Search.tsx +41 -0
- package/src/primitives/SearchInput.tsx +110 -0
- package/src/primitives/SkinTone.tsx +76 -0
- package/src/primitives/Viewport.tsx +204 -0
- package/src/primitives/appearance.tsx +7 -0
- package/src/primitives/components.tsx +30 -0
- package/src/primitives/hooks.ts +165 -0
- package/src/primitives/index.ts +94 -0
- package/src/primitives/nativeProps.ts +90 -0
- package/src/primitives/scope.tsx +109 -0
- package/src/primitives/structuralStyles.tsx +136 -0
- package/src/primitives/tokens.ts +150 -0
- package/src/primitives/types.ts +192 -0
- package/src/state/activeEmojiStore.ts +39 -0
- package/src/state/navigationRegistry.ts +209 -0
- package/src/state/regionTraversal.ts +116 -0
- package/src/svg.d.ts +2 -2
- package/src/types/exposedTypes.ts +28 -1
- package/src/virtualization/virtualizationHelpers.ts +29 -8
- package/dist/components/body/Body.d.ts +0 -2
- package/dist/components/main/PickerMain.d.ts +0 -7
- package/dist/dataUtils/alphaNumericEmojiIndex.d.ts +0 -5
- package/dist/emoji-picker-react.cjs.development.js +0 -31413
- package/dist/emoji-picker-react.cjs.development.js.map +0 -1
- package/dist/emoji-picker-react.cjs.production.min.js +0 -2
- package/dist/emoji-picker-react.cjs.production.min.js.map +0 -1
- package/dist/emoji-picker-react.esm.js +0 -31411
- package/dist/emoji-picker-react.esm.js.map +0 -1
- package/dist/hooks/useHideEmojisByUniocode.d.ts +0 -1
- package/src/components/body/Body.tsx +0 -43
- package/src/components/main/PickerMain.tsx +0 -249
- package/src/dataUtils/alphaNumericEmojiIndex.ts +0 -21
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { init_defaultEmojiData, registerDefaultEmojiData } from "./chunk-ACXAQEKG.mjs";
|
|
2
|
+
|
|
3
|
+
import { emojis_default, init_emojis } from "./chunk-7ZGTUZFB.mjs";
|
|
4
|
+
|
|
5
|
+
import { __commonJS } from "./chunk-LO4TPPLH.mjs";
|
|
6
|
+
|
|
7
|
+
// src/data/registerDefaultEmojiData.ts
|
|
8
|
+
var require_registerDefaultEmojiData = __commonJS({
|
|
9
|
+
"src/data/registerDefaultEmojiData.ts"() {
|
|
10
|
+
init_defaultEmojiData(), init_emojis(), registerDefaultEmojiData(emojis_default);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { require_registerDefaultEmojiData };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __esm = (fn, res, err) => function __init() {
|
|
2
|
+
if (err) throw err[0];
|
|
3
|
+
try {
|
|
4
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
5
|
+
} catch (e) {
|
|
6
|
+
throw err = [ e ], e;
|
|
7
|
+
}
|
|
8
|
+
}, __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
try {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = {
|
|
11
|
+
exports: {}
|
|
12
|
+
}).exports, mod), mod.exports;
|
|
13
|
+
} catch (e) {
|
|
14
|
+
throw mod = 0, e;
|
|
15
|
+
}
|
|
16
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && "object" == typeof from || "function" == typeof from) for (let key of __getOwnPropNames(from)) __hasOwnProp.call(to, key) || key === except || __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
return to;
|
|
22
|
+
}, __toESM = (mod, isNodeMode, target) => (target = null != mod ? __create(__getProtoOf(mod)) : {},
|
|
23
|
+
__copyProps(
|
|
24
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
25
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
26
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
28
|
+
!isNodeMode && mod && mod.__esModule ? target : __defProp(target, "default", {
|
|
29
|
+
value: mod,
|
|
30
|
+
enumerable: !0
|
|
31
|
+
}), mod));
|
|
32
|
+
|
|
33
|
+
export { __esm, __commonJS, __toESM };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { require_registerDefaultEmojiData } from "./chunks/chunk-L5W4PFRJ.mjs";
|
|
2
|
+
|
|
3
|
+
import { getEmojiByUnified, searchEmojis } from "./chunks/chunk-ACXAQEKG.mjs";
|
|
4
|
+
|
|
5
|
+
import "./chunks/chunk-7ZGTUZFB.mjs";
|
|
6
|
+
|
|
7
|
+
import { __toESM } from "./chunks/chunk-LO4TPPLH.mjs";
|
|
8
|
+
|
|
9
|
+
__toESM(require_registerDefaultEmojiData());
|
|
10
|
+
|
|
11
|
+
export { getEmojiByUnified, searchEmojis };
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Categories, CategoryNav, DEFAULT_PICKER_HEIGHT, DEFAULT_PICKER_WIDTH, DefaultPickerConfiguration, EmojiStyle, Empty, List, LoadError, Loading, MutableConfigProvider, Panel, Preview, Reactions, Relative, Root, Search, SkinTone, SkinTonePickerLocation, SkinTones, SuggestionMode, Theme, ViewOnlyEmoji, Viewport, commonInteractionStyles, compareConfig, cx, defaultPickerTokens, emojiByUnified, isPickerBehaviorProp, resolveEmojiStyle, resolveSkinTonePickerLocation, stylesheet, useDefaultAppearance, useDefineMutableConfig, usePreviewConfig, useSearchDisabledConfig, useSkinTonePickerLocationConfig, useSkinTonesDisabledConfig, validColumns } from "./chunks/chunk-F2KS7DCA.mjs";
|
|
3
|
+
|
|
4
|
+
import { require_registerDefaultEmojiData } from "./chunks/chunk-L5W4PFRJ.mjs";
|
|
5
|
+
|
|
6
|
+
import "./chunks/chunk-ACXAQEKG.mjs";
|
|
7
|
+
|
|
8
|
+
import "./chunks/chunk-7ZGTUZFB.mjs";
|
|
9
|
+
|
|
10
|
+
import { __toESM } from "./chunks/chunk-LO4TPPLH.mjs";
|
|
11
|
+
|
|
12
|
+
__toESM(require_registerDefaultEmojiData());
|
|
13
|
+
|
|
14
|
+
import * as React6 from "react";
|
|
15
|
+
|
|
16
|
+
// src/EmojiPickerReact.tsx
|
|
17
|
+
import * as React3 from "react";
|
|
18
|
+
|
|
19
|
+
// src/components/header/Header.tsx
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
|
|
22
|
+
// src/hooks/useShouldShowSkinTonePicker.ts
|
|
23
|
+
function useIsSkinToneInSearch() {
|
|
24
|
+
return "SEARCH" /* SEARCH */ === useSkinTonePickerLocationConfig();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function useIsSkinToneInPreview() {
|
|
28
|
+
return "PREVIEW" /* PREVIEW */ === useSkinTonePickerLocationConfig();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/components/header/Header.tsx
|
|
32
|
+
function Header() {
|
|
33
|
+
const appearance = useDefaultAppearance(), searchDisabled = useSearchDisabledConfig(), skinTonesDisabled = useSkinTonesDisabledConfig(), toneInSearch = useIsSkinToneInSearch();
|
|
34
|
+
/* @__PURE__ */
|
|
35
|
+
return React.createElement(Relative, {
|
|
36
|
+
className: cx("epr-header", appearance && commonInteractionStyles.hiddenOnReactions)
|
|
37
|
+
}, !searchDisabled && /* @__PURE__ */ React.createElement(Search, null, !skinTonesDisabled && toneInSearch && /* @__PURE__ */ React.createElement(SkinTone, null)),
|
|
38
|
+
/* @__PURE__ */ React.createElement(CategoryNav, null));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// src/components/main/defaultAppearance.tsx
|
|
42
|
+
import * as React2 from "react";
|
|
43
|
+
|
|
44
|
+
function defaultRootClassName(theme, className, unstyled) {
|
|
45
|
+
return unstyled ? cx(className) : cx(styles.main, styles.baseVariables, "dark" /* DARK */ === theme && styles.darkTheme, "auto" /* AUTO */ === theme && styles.autoThemeDark, className);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function defaultRootStyle({width, height, style, columns}) {
|
|
49
|
+
return {
|
|
50
|
+
// v4-compatible default dimensions; consumer style and explicit
|
|
51
|
+
// width/height props both override them. With `columns`, the width
|
|
52
|
+
// fits the columns instead.
|
|
53
|
+
...void 0 === columns && {
|
|
54
|
+
width: getDimension(DEFAULT_PICKER_WIDTH)
|
|
55
|
+
},
|
|
56
|
+
height: getDimension(DEFAULT_PICKER_HEIGHT),
|
|
57
|
+
...style,
|
|
58
|
+
...void 0 !== width ? {
|
|
59
|
+
width: getDimension(width)
|
|
60
|
+
} : {},
|
|
61
|
+
...void 0 !== height ? {
|
|
62
|
+
height: getDimension(height)
|
|
63
|
+
} : {}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getDimension(dimension) {
|
|
68
|
+
return "number" == typeof dimension ? `${dimension}px` : dimension;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
var darkThemeBaseVariables = {
|
|
72
|
+
"--epr-dark": "#000",
|
|
73
|
+
"--epr-dark-emoji-variation-picker-bg-color": "var(--epr-dark)",
|
|
74
|
+
"--epr-dark-highlight-color": "#c0c0c0",
|
|
75
|
+
"--epr-dark-text-color": "var(--epr-highlight-color)",
|
|
76
|
+
"--epr-dark-hover-bg-color": "#363636f6",
|
|
77
|
+
"--epr-dark-hover-bg-color-reduced-opacity": "#36363680",
|
|
78
|
+
"--epr-dark-focus-bg-color": "#474747",
|
|
79
|
+
"--epr-dark-search-input-bg-color": "#333333",
|
|
80
|
+
"--epr-dark-category-label-bg-color": "#222222e6",
|
|
81
|
+
"--epr-dark-picker-border-color": "#151617",
|
|
82
|
+
"--epr-dark-bg-color": "#222222",
|
|
83
|
+
"--epr-dark-reactions-bg-color": "#22222290",
|
|
84
|
+
"--epr-dark-search-input-bg-color-active": "var(--epr-dark)",
|
|
85
|
+
"--epr-dark-emoji-variation-indicator-color": "#444",
|
|
86
|
+
"--epr-dark-category-icon-active-color": "#6AA9DD",
|
|
87
|
+
"--epr-dark-category-icon-inactive-color": "#C0C0BF",
|
|
88
|
+
"--epr-dark-skin-tone-picker-menu-color": "#22222295",
|
|
89
|
+
"--epr-dark-skin-tone-outer-border-color": "var(--epr-dark-picker-border-color)",
|
|
90
|
+
"--epr-dark-skin-tone-inner-border-color": "#00000000"
|
|
91
|
+
}, DarkTheme = {
|
|
92
|
+
"--epr-emoji-variation-picker-bg-color": "var(--epr-dark-emoji-variation-picker-bg-color)",
|
|
93
|
+
"--epr-hover-bg-color-reduced-opacity": "var(--epr-dark-hover-bg-color-reduced-opacity)",
|
|
94
|
+
"--epr-highlight-color": "var(--epr-dark-highlight-color)",
|
|
95
|
+
"--epr-text-color": "var(--epr-dark-text-color)",
|
|
96
|
+
"--epr-hover-bg-color": "var(--epr-dark-hover-bg-color)",
|
|
97
|
+
"--epr-focus-bg-color": "var(--epr-dark-focus-bg-color)",
|
|
98
|
+
"--epr-search-input-bg-color": "var(--epr-dark-search-input-bg-color)",
|
|
99
|
+
"--epr-category-label-bg-color": "var(--epr-dark-category-label-bg-color)",
|
|
100
|
+
"--epr-picker-border-color": "var(--epr-dark-picker-border-color)",
|
|
101
|
+
"--epr-bg-color": "var(--epr-dark-bg-color)",
|
|
102
|
+
"--epr-reactions-bg-color": "var(--epr-dark-reactions-bg-color)",
|
|
103
|
+
"--epr-search-input-bg-color-active": "var(--epr-dark-search-input-bg-color-active)",
|
|
104
|
+
"--epr-emoji-variation-indicator-color": "var(--epr-dark-emoji-variation-indicator-color)",
|
|
105
|
+
"--epr-category-icon-active-color": "var(--epr-dark-category-icon-active-color)",
|
|
106
|
+
"--epr-category-icon-inactive-color": "var(--epr-dark-category-icon-inactive-color)",
|
|
107
|
+
"--epr-skin-tone-picker-menu-color": "var(--epr-dark-skin-tone-picker-menu-color)",
|
|
108
|
+
"--epr-skin-tone-outer-border-color": "var(--epr-dark-skin-tone-outer-border-color)",
|
|
109
|
+
"--epr-skin-tone-inner-border-color": "var(--epr-dark-skin-tone-inner-border-color)",
|
|
110
|
+
"--epr-dark-text-color": "var(--epr-highlight-color)",
|
|
111
|
+
"--epr-dark-hover-bg-color": "#363636f6",
|
|
112
|
+
"--epr-dark-hover-bg-color-reduced-opacity": "#36363680",
|
|
113
|
+
"--epr-dark-focus-bg-color": "#474747",
|
|
114
|
+
"--epr-dark-search-input-bg-color": "#333333",
|
|
115
|
+
"--epr-dark-category-label-bg-color": "#222222e6",
|
|
116
|
+
"--epr-dark-picker-border-color": "#151617",
|
|
117
|
+
"--epr-dark-bg-color": "#222222",
|
|
118
|
+
"--epr-dark-reactions-bg-color": "#22222290",
|
|
119
|
+
"--epr-dark-search-input-bg-color-active": "var(--epr-dark)",
|
|
120
|
+
"--epr-dark-emoji-variation-indicator-color": "#444",
|
|
121
|
+
"--epr-dark-category-icon-active-color": "#6AA9DD",
|
|
122
|
+
"--epr-dark-category-icon-inactive-color": "#C0C0BF",
|
|
123
|
+
"--epr-dark-skin-tone-picker-menu-color": "#22222295",
|
|
124
|
+
"--epr-dark-skin-tone-outer-border-color": "var(--epr-dark-picker-border-color)",
|
|
125
|
+
"--epr-dark-skin-tone-inner-border-color": "#00000000"
|
|
126
|
+
}, styles = /* @__PURE__ */ (() => stylesheet.create({
|
|
127
|
+
main: {
|
|
128
|
+
".": [ "epr-main", "EmojiPickerReact" /* emojiPicker */ ],
|
|
129
|
+
position: "relative",
|
|
130
|
+
display: "flex",
|
|
131
|
+
flexDirection: "column",
|
|
132
|
+
borderWidth: "1px",
|
|
133
|
+
borderStyle: "solid",
|
|
134
|
+
borderRadius: "var(--epr-picker-border-radius)",
|
|
135
|
+
borderColor: "var(--epr-picker-border-color)",
|
|
136
|
+
backgroundColor: "var(--epr-bg-color)",
|
|
137
|
+
overflow: "hidden",
|
|
138
|
+
transition: "height 0.3s ease-in-out, background-color 0.1s ease-in-out",
|
|
139
|
+
fontFamily: "var(--epr-font-family, inherit)",
|
|
140
|
+
"*": {
|
|
141
|
+
boxSizing: "border-box",
|
|
142
|
+
// Overridable without a specificity fight (v4 hard-coded sans-serif).
|
|
143
|
+
fontFamily: "inherit"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
baseVariables: {
|
|
147
|
+
// Single-sourced from the public token preset: the default tree and
|
|
148
|
+
// bare-Root consumers share the same documented defaults. The private
|
|
149
|
+
// dark-theme values ride along (referenced only by the DarkTheme
|
|
150
|
+
// overrides below); they stay out of the shared preset so the
|
|
151
|
+
// primitives bundle keeps its separation marker scan clean.
|
|
152
|
+
"--": {
|
|
153
|
+
...defaultPickerTokens,
|
|
154
|
+
...darkThemeBaseVariables
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
// color-scheme makes native parts (scrollbars, the search field's
|
|
158
|
+
// controls) render dark too; without it they stay light on a dark picker.
|
|
159
|
+
autoThemeDark: {
|
|
160
|
+
".": "epr-auto-theme" /* autoTheme */ ,
|
|
161
|
+
"@media (prefers-color-scheme: dark)": {
|
|
162
|
+
"--": DarkTheme,
|
|
163
|
+
colorScheme: "dark"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
darkTheme: {
|
|
167
|
+
".": "epr-dark-theme" /* darkTheme */ ,
|
|
168
|
+
"--": DarkTheme,
|
|
169
|
+
colorScheme: "dark"
|
|
170
|
+
}
|
|
171
|
+
}))(), NATIVE_ATTRIBUTES = /* @__PURE__ */ new Set([ "id", "title", "lang", "dir" ]);
|
|
172
|
+
|
|
173
|
+
function isNativeAttribute(key) {
|
|
174
|
+
return NATIVE_ATTRIBUTES.has(key) || key.startsWith("aria-") || key.startsWith("data-");
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function pickBehaviorProps(props) {
|
|
178
|
+
const behaviorProps = {}, unknown = [], values = props;
|
|
179
|
+
for (const key of Object.keys(values)) isPickerBehaviorProp(key) || isNativeAttribute(key) ? behaviorProps[key] = values[key] : unknown.push(key);
|
|
180
|
+
return {
|
|
181
|
+
behaviorProps,
|
|
182
|
+
unknownProps: unknown.join(", ")
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
var useUnknownPropsWarning = "production" === process.env.NODE_ENV ? () => {} : function useDevUnknownPropsWarning(unknownProps) {
|
|
187
|
+
React3.useEffect((() => {
|
|
188
|
+
unknownProps && console.warn(`[emoji-picker-react] Ignoring unknown prop(s): ${unknownProps}. See docs/v5/MIGRATION.md for removed props.`);
|
|
189
|
+
}), [ unknownProps ]);
|
|
190
|
+
}, CONTENT = /* @__PURE__ */ React3.createElement((function ContentControl() {
|
|
191
|
+
const showPreview = usePreviewConfig().showPreview, skinTonesDisabled = useSkinTonesDisabledConfig(), toneInPreview = useIsSkinToneInPreview();
|
|
192
|
+
/* @__PURE__ */
|
|
193
|
+
return React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(Header, null), /* @__PURE__ */ React3.createElement(Viewport, null, /* @__PURE__ */ React3.createElement(List, null), /* @__PURE__ */ React3.createElement(Empty, null), /* @__PURE__ */ React3.createElement(Loading, null), /* @__PURE__ */ React3.createElement(LoadError, null)), showPreview && /* @__PURE__ */ React3.createElement(Preview, null, !skinTonesDisabled && toneInPreview && /* @__PURE__ */ React3.createElement(SkinTone, {
|
|
194
|
+
orientation: "vertical"
|
|
195
|
+
})));
|
|
196
|
+
})), EmojiPickerReact_default = /* @__PURE__ */ React3.memo((
|
|
197
|
+
// src/EmojiPickerReact.tsx
|
|
198
|
+
function EmojiPicker(props) {
|
|
199
|
+
const rootInput = props, {theme: legacyTheme, colorScheme, width, height, className, style, unstyled, components, open, searchDisabled = !1, skinTonesDisabled = !1, skinTonePickerLocation = "SEARCH" /* SEARCH */ , previewConfig, ...rest} = rootInput, theme = colorScheme ?? legacyTheme, defaultConfiguration = {
|
|
200
|
+
searchDisabled,
|
|
201
|
+
skinTonesDisabled,
|
|
202
|
+
skinTonePickerLocation: resolveSkinTonePickerLocation(skinTonePickerLocation, searchDisabled, previewConfig?.showPreview ?? !0),
|
|
203
|
+
previewConfig,
|
|
204
|
+
// Closed, as in v4, keeps the picker's state (skin tone, search,
|
|
205
|
+
// reactions mode) and renders nothing.
|
|
206
|
+
open: !1 !== open
|
|
207
|
+
}, {behaviorProps, unknownProps} = pickBehaviorProps(rest);
|
|
208
|
+
return useUnknownPropsWarning(unknownProps), /* @__PURE__ */ React3.createElement(DefaultPickerConfiguration.Provider, {
|
|
209
|
+
value: defaultConfiguration
|
|
210
|
+
}, /* @__PURE__ */ React3.createElement(Root, {
|
|
211
|
+
appearance: unstyled ? "none" : "default",
|
|
212
|
+
components,
|
|
213
|
+
...behaviorProps,
|
|
214
|
+
className: defaultRootClassName(theme, className, unstyled),
|
|
215
|
+
style: defaultRootStyle({
|
|
216
|
+
width,
|
|
217
|
+
height,
|
|
218
|
+
style,
|
|
219
|
+
columns: validColumns(props.columns)
|
|
220
|
+
})
|
|
221
|
+
},
|
|
222
|
+
/* @__PURE__ */ React3.createElement(Reactions, null),
|
|
223
|
+
/* @__PURE__ */ React3.createElement(Panel, null, CONTENT)));
|
|
224
|
+
}), compareConfig);
|
|
225
|
+
|
|
226
|
+
// src/components/ErrorBoundary.tsx
|
|
227
|
+
import * as React4 from "react";
|
|
228
|
+
|
|
229
|
+
var ErrorBoundary = class extends React4.Component {
|
|
230
|
+
constructor(props) {
|
|
231
|
+
super(props), this.state = {
|
|
232
|
+
hasError: !1
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
static getDerivedStateFromError() {
|
|
236
|
+
return {
|
|
237
|
+
hasError: !0
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
componentDidCatch(error, errorInfo) {
|
|
241
|
+
console.error("Emoji Picker React failed to render:", error, errorInfo);
|
|
242
|
+
}
|
|
243
|
+
render() {
|
|
244
|
+
return this.state.hasError ? null : this.props.children;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// src/components/emoji/ExportedEmoji.tsx
|
|
249
|
+
import * as React5 from "react";
|
|
250
|
+
|
|
251
|
+
function ExportedEmoji({unified, size = 32, emojiStyle, lazyLoad = !1, getEmojiUrl, emojiUrl}) {
|
|
252
|
+
return unified || emojiUrl || getEmojiUrl ? /* @__PURE__ */ React5.createElement(ViewOnlyEmoji, {
|
|
253
|
+
unified,
|
|
254
|
+
size,
|
|
255
|
+
emojiStyle: resolveEmojiStyle(emojiStyle, emojiUrl || getEmojiUrl),
|
|
256
|
+
lazyLoad,
|
|
257
|
+
getEmojiUrl: emojiUrl ? () => emojiUrl : getEmojiUrl
|
|
258
|
+
}) : null;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// src/index.tsx
|
|
262
|
+
function EmojiPicker2(props) {
|
|
263
|
+
const MutableConfigRef = useDefineMutableConfig({
|
|
264
|
+
onEmojiClick: props.onEmojiClick,
|
|
265
|
+
onReactionClick: props.onReactionClick,
|
|
266
|
+
onSkinToneChange: props.onSkinToneChange,
|
|
267
|
+
onSearchChange: props.onSearchChange,
|
|
268
|
+
onReactionsModeChange: props.onReactionsModeChange
|
|
269
|
+
});
|
|
270
|
+
/* @__PURE__ */
|
|
271
|
+
return React6.createElement(ErrorBoundary, null, /* @__PURE__ */ React6.createElement(MutableConfigProvider, {
|
|
272
|
+
value: MutableConfigRef,
|
|
273
|
+
inheritToRoot: !0
|
|
274
|
+
}, /* @__PURE__ */ React6.createElement(EmojiPickerReact_default, {
|
|
275
|
+
...props
|
|
276
|
+
})));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export { Categories, ExportedEmoji as Emoji, EmojiStyle, SkinTonePickerLocation, SkinTones, SuggestionMode, Theme, EmojiPicker2 as default, emojiByUnified };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Categories, CategoryNav, EmojiStyle, Empty, List, LoadError, Loading, Panel, Preview, Reactions, Root, Search, SearchInput, SkinTone, SkinTonePickerLocation, SkinTones, SuggestionMode, Theme, Viewport, darkPickerTokens, defaultPickerTokens, lightPickerTokens, structuralPickerTokens, useActiveEmoji, useCategoryNavigation, useEmojiDataState, usePickerMode, useSearchActions, useSearchState, useSkinTone } from "../chunks/chunk-F2KS7DCA.mjs";
|
|
3
|
+
|
|
4
|
+
import "../chunks/chunk-ACXAQEKG.mjs";
|
|
5
|
+
|
|
6
|
+
import "../chunks/chunk-LO4TPPLH.mjs";
|
|
7
|
+
|
|
8
|
+
export { Categories, CategoryNav, EmojiStyle, Empty, List, LoadError, Loading, Panel, Preview, Reactions, Root, Search, SearchInput, SkinTone, SkinTonePickerLocation, SkinTones, SuggestionMode, Theme, Viewport, darkPickerTokens, defaultPickerTokens, lightPickerTokens, structuralPickerTokens, useActiveEmoji, useCategoryNavigation, useEmojiDataState, usePickerMode, useSearchActions, useSearchState, useSkinTone };
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
|
|
2
|
-
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare
|
|
6
|
-
top: number;
|
|
7
|
-
} | undefined, dimensions: Dimensions, getEmojiUrl: GetEmojiUrl): void;
|
|
8
|
-
export declare function preloadEmoji(getEmojiUrl: GetEmojiUrl, emoji: undefined | DataEmoji, emojiStyle: EmojiStyle): void;
|
|
9
|
-
export declare const preloadedEmojs: Set<string>;
|
|
1
|
+
import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
|
|
2
|
+
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
3
|
+
import { EmojiStyleValue } from '../types/exposedTypes';
|
|
4
|
+
export declare function preloadEmoji(getEmojiUrl: GetEmojiUrl, emoji: undefined | DataEmoji, emojiStyle: EmojiStyleValue): void;
|
|
5
|
+
export declare const preloadedEmojs: Set<string>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CategoriesConfig } from '../config/categoryConfig';
|
|
2
|
-
export declare function useActiveCategoryScrollDetection({ setActiveCategory, setVisibleCategories, categories, }: {
|
|
3
|
-
setActiveCategory: (category: string) => void;
|
|
4
|
-
setVisibleCategories: (categories: string[]) => void;
|
|
5
|
-
/**
|
|
6
|
-
* Effective category list. The merged array reference only changes when
|
|
7
|
-
* the configuration is re-merged, so the observer re-subscribes exactly
|
|
8
|
-
* when sections are added or removed — no serialization involved.
|
|
9
|
-
*/
|
|
10
|
-
categories: CategoriesConfig;
|
|
11
|
-
}): void;
|
|
1
|
+
import { CategoriesConfig } from '../config/categoryConfig';
|
|
2
|
+
export declare function useActiveCategoryScrollDetection({ setActiveCategory, setVisibleCategories, categories, }: {
|
|
3
|
+
setActiveCategory: (category: string) => void;
|
|
4
|
+
setVisibleCategories: (categories: string[]) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Effective category list. The merged array reference only changes when
|
|
7
|
+
* the configuration is re-merged, so the observer re-subscribes exactly
|
|
8
|
+
* when sections are added or removed — no serialization involved.
|
|
9
|
+
*/
|
|
10
|
+
categories: CategoriesConfig;
|
|
11
|
+
}): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export declare function useCategoryHeight(emojiCount: number): {
|
|
2
|
-
categoryHeight: number;
|
|
3
|
-
emojisPerRow: number;
|
|
4
|
-
emojiSize: number;
|
|
5
|
-
|
|
1
|
+
export declare function useCategoryHeight(emojiCount: number, ready?: boolean): {
|
|
2
|
+
categoryHeight: number;
|
|
3
|
+
emojisPerRow: number;
|
|
4
|
+
emojiSize: number;
|
|
5
|
+
rowWidth: number;
|
|
6
|
+
viewportHeight?: number;
|
|
7
|
+
} | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function useCloseAllOpenToggles(): () => void;
|
|
2
|
-
export declare function useHasOpenToggles(): () => boolean;
|
|
1
|
+
export declare function useCloseAllOpenToggles(): () => void;
|
|
2
|
+
export declare function useHasOpenToggles(): () => boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CustomEmoji } from '../config/customEmojiConfig';
|
|
2
|
+
import type { EmojiData } from '../types/exposedTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Dev-only diagnostic.
|
|
5
|
+
*
|
|
6
|
+
* Identity caching only helps when callers keep data props referentially
|
|
7
|
+
* stable. If a non-default `emojiData` (or `customEmojis`) changes identity
|
|
8
|
+
* on three consecutive committed renders, warn once that repeated identity
|
|
9
|
+
* churn defeats prepared-data caching. Behavior stays correct; this is
|
|
10
|
+
* diagnostic only. A single/occasional replacement (e.g. locale change)
|
|
11
|
+
* must not warn. No deep-compare or clone is performed.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useDataIdentityStabilityWarning: (emojiData: EmojiData | undefined, customEmojis: CustomEmoji[] | undefined) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useDebouncedState<T>(initialValue: T, delay?: number): [T, (value: T) => Promise<T>];
|
|
1
|
+
export declare function useDebouncedState<T>(initialValue: T, delay?: number): [T, (value: T) => Promise<T>];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function useDisallowMouseMove(): () => void;
|
|
2
|
-
export declare function useAllowMouseMove(): () => void;
|
|
3
|
-
export declare function useIsMouseDisallowed(): () => boolean;
|
|
4
|
-
export declare function useOnMouseMove(): void;
|
|
1
|
+
export declare function useDisallowMouseMove(): () => void;
|
|
2
|
+
export declare function useAllowMouseMove(): () => void;
|
|
3
|
+
export declare function useIsMouseDisallowed(): () => boolean;
|
|
4
|
+
export declare function useOnMouseMove(): void;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function useIsEmojiDisallowed(): (emoji: DataEmoji) => boolean;
|
|
1
|
+
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
2
|
+
export declare function useIsEmojiDisallowed(): (emoji: DataEmoji, renderedUnified?: string) => boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare function useEmojiPreviewEvents(
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ActiveEmojiState } from '../components/context/PickerContext';
|
|
3
|
+
export declare function useEmojiPreviewEvents(focusOnHover: boolean, setPreviewEmoji: React.Dispatch<React.SetStateAction<ActiveEmojiState>>): void;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { DataEmojis } from '../dataUtils/DataTypes';
|
|
3
|
-
export declare function useEmojiVirtualization({ categoryEmojis, topOffset, onHeightReady, scrollTop, isCategoryVisible, }: {
|
|
4
|
-
categoryEmojis: DataEmojis;
|
|
5
|
-
topOffset: number;
|
|
6
|
-
onHeightReady: (height: number) => void;
|
|
7
|
-
scrollTop: number;
|
|
8
|
-
isCategoryVisible: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataEmojis } from '../dataUtils/DataTypes';
|
|
3
|
+
export declare function useEmojiVirtualization({ categoryEmojis, topOffset, onHeightReady, scrollTop, isCategoryVisible, positioned, }: {
|
|
4
|
+
categoryEmojis: DataEmojis;
|
|
5
|
+
topOffset: number;
|
|
6
|
+
onHeightReady: (height: number) => void;
|
|
7
|
+
scrollTop: number;
|
|
8
|
+
isCategoryVisible: boolean;
|
|
9
|
+
/** Whether topOffset is final; unmeasured sections above shift it. */
|
|
10
|
+
positioned: boolean;
|
|
11
|
+
}): {
|
|
12
|
+
virtualizedCounter: number;
|
|
13
|
+
emojis: ReactNode[];
|
|
14
|
+
dimensions: {
|
|
15
|
+
categoryHeight: number;
|
|
16
|
+
emojisPerRow: number;
|
|
17
|
+
emojiSize: number;
|
|
18
|
+
rowWidth: number;
|
|
19
|
+
viewportHeight?: number;
|
|
20
|
+
} | undefined;
|
|
21
|
+
emojiCount: number;
|
|
22
|
+
};
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { FilterState } from '../components/context/PickerContext';
|
|
2
|
-
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare function filterEmojiObjectByKeyword(emojis: FilterDict, keyword: string): FilterDict;
|
|
12
|
-
export declare function useIsEmojiFiltered(): (unified: string) => boolean;
|
|
13
|
-
export declare function isEmojiFilteredBySearchTerm(unified: string, filter: FilterState, searchTerm: string): boolean;
|
|
14
|
-
export declare type FilterDict = Record<string, DataEmoji>;
|
|
15
|
-
export declare function findLongestMatch(keyword: string, dict: Record<string, FilterDict> | null): FilterDict | null;
|
|
16
|
-
export declare function getNormalizedSearchTerm(str: string): string;
|
|
1
|
+
import { FilterState } from '../components/context/PickerContext';
|
|
2
|
+
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
3
|
+
export declare function useFilter(): {
|
|
4
|
+
onChange: (inputValue: string) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function useIsEmojiFiltered(): (unified: string) => boolean;
|
|
7
|
+
export declare function isEmojiFilteredBySearchTerm(unified: string, filter: FilterState, searchTerm: string): boolean;
|
|
8
|
+
export type FilterDict = Record<string, DataEmoji>;
|
|
9
|
+
export declare function filterEmojiObjectByKeyword(emojis: FilterDict, keyword: string): FilterDict;
|
|
10
|
+
export declare function findLongestMatch(keyword: string, dict: Record<string, FilterDict> | null): FilterDict | null;
|
package/dist/hooks/useFocus.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function useFocusSearchInput(): () => void;
|
|
2
|
-
export declare function useFocusSkinTonePicker(): () => void;
|
|
3
|
-
export declare function useFocusCategoryNavigation(): () => void;
|
|
1
|
+
export declare function useFocusSearchInput(): () => void;
|
|
2
|
+
export declare function useFocusSkinTonePicker(): () => void;
|
|
3
|
+
export declare function useFocusCategoryNavigation(): () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare function useMarkInitialLoad(dispatch: React.Dispatch<React.SetStateAction<boolean>>): void;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function useMarkInitialLoad(dispatch: React.Dispatch<React.SetStateAction<boolean>>): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
2
|
-
export declare function useIsEmojiHidden(): (emoji: DataEmoji) => IsHiddenReturn;
|
|
3
|
-
|
|
4
|
-
failedToLoad: boolean;
|
|
5
|
-
filteredOut: boolean;
|
|
6
|
-
hidden: boolean;
|
|
7
|
-
};
|
|
8
|
-
export {};
|
|
1
|
+
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
2
|
+
export declare function useIsEmojiHidden(): (emoji: DataEmoji) => IsHiddenReturn;
|
|
3
|
+
type IsHiddenReturn = {
|
|
4
|
+
failedToLoad: boolean;
|
|
5
|
+
filteredOut: boolean;
|
|
6
|
+
hidden: boolean;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useIsMounted(): boolean;
|
|
1
|
+
export declare function useIsMounted(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function useIsSearchMode(): boolean;
|
|
1
|
+
export default function useIsSearchMode(): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { NullableElement } from '../DomUtils/selectors';
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NullableElement } from '../DomUtils/selectors';
|
|
3
|
+
import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
|
|
4
|
+
import { MOUSE_EVENT_SOURCE } from '../config/useConfig';
|
|
5
|
+
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
6
|
+
import { EmojiClickData, EmojiStyleValue, SkinTones } from '../types/exposedTypes';
|
|
7
|
+
export declare function useMouseDownHandlers(ContainerRef: React.MutableRefObject<NullableElement>, mouseEventSource: MOUSE_EVENT_SOURCE): void;
|
|
8
|
+
export declare function emojiClickOutput(emoji: DataEmoji, activeSkinTone: SkinTones, activeEmojiStyle: EmojiStyleValue, getEmojiUrl: GetEmojiUrl): EmojiClickData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useOnFocus(): void;
|
|
1
|
+
export declare function useOnFocus(): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ElementRef } from '../components/context/ElementRefContext';
|
|
2
|
-
export declare function useOnScroll(BodyRef: ElementRef): number;
|
|
1
|
+
import { ElementRef } from '../components/context/ElementRefContext';
|
|
2
|
+
export declare function useOnScroll(BodyRef: ElementRef): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useReactionsFocusManager(): void;
|