emoji-picker-react 4.22.2 → 5.0.0
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 +335 -49
- package/dist/DomUtils/categoryNameFromDom.d.ts +1 -1
- package/dist/DomUtils/classNames.d.ts +24 -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 +7 -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-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-46BUDQLE.mjs +228 -0
- package/dist/esm/chunks/chunk-7ZGTUZFB.mjs +16 -0
- package/dist/esm/chunks/chunk-FQIJ4HBW.mjs +25 -0
- package/dist/esm/chunks/chunk-KQPOIRSC.mjs +9305 -0
- package/dist/esm/chunks/chunk-LO4TPPLH.mjs +43 -0
- package/dist/esm/chunks/emojis-6L3GRBAP.mjs +9 -0
- package/dist/esm/data.mjs +18 -0
- package/dist/esm/index.mjs +389 -0
- package/dist/esm/primitives/index.mjs +67 -0
- package/dist/hooks/preloadEmoji.d.ts +9 -9
- package/dist/hooks/useActiveCategoryScrollDetection.d.ts +11 -11
- package/dist/hooks/useCategoryHeight.d.ts +6 -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 +21 -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 +20 -18
- package/llms-full.txt +3680 -0
- package/llms.txt +66 -476
- package/package.json +204 -66
- package/src/DomUtils/categoryNameFromDom.ts +1 -1
- package/src/DomUtils/classNames.ts +1 -0
- package/src/DomUtils/elementPositionInRow.ts +26 -4
- 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 +105 -149
- package/src/DomUtils/scrollTo.ts +18 -16
- package/src/DomUtils/selectors.ts +20 -111
- 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 +55 -23
- 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 +110 -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 +77 -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 +188 -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-core/pickerData.ts +173 -0
- package/src/data-core/prepare.ts +178 -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 +58 -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/suggested.ts +8 -4
- package/src/dataUtils/suggestedEmojis.ts +92 -0
- package/src/env.d.ts +4 -0
- package/src/hooks/preloadEmoji.ts +3 -3
- package/src/hooks/useActiveCategoryScrollDetection.ts +10 -1
- package/src/hooks/useCategoryHeight.ts +82 -8
- package/src/hooks/useDataIdentityStabilityWarning.ts +86 -0
- package/src/hooks/useDebouncedState.ts +13 -1
- package/src/hooks/useDisallowedEmojis.ts +26 -42
- package/src/hooks/useEmojiPreviewEvents.ts +43 -10
- package/src/hooks/useEmojiVirtualization.tsx +38 -4
- package/src/hooks/useFilter.ts +85 -127
- package/src/hooks/useFocus.ts +14 -24
- package/src/hooks/useIsEmojiHidden.ts +10 -6
- package/src/hooks/useKeyboardNavigation.ts +322 -429
- 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 +133 -0
- package/src/primitives/tokens.ts +149 -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 +20 -6
- 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
package/dist/config/config.d.ts
CHANGED
|
@@ -1,64 +1,166 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare
|
|
13
|
-
export declare
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
export declare
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GetEmojiUrl } from '../components/emoji/BaseEmojiProps';
|
|
3
|
+
import type { EmojiDataInput } from '../hooks/useResolvedEmojiData';
|
|
4
|
+
import { CategoryIcons, EmojiClickData, EmojiData, EmojiStyleValue, SkinTonePickerLocation, SkinTones, SkinTonesValue, SuggestionModeValue, ThemeValue } from '../types/exposedTypes';
|
|
5
|
+
import { CategoriesConfig, UserCategoryConfig } from './categoryConfig';
|
|
6
|
+
import { CustomEmoji } from './customEmojiConfig';
|
|
7
|
+
export declare const DEFAULT_SEARCH_PLACEHOLDER = "Search";
|
|
8
|
+
export declare const DEFAULT_PICKER_WIDTH = 350;
|
|
9
|
+
export declare const DEFAULT_PICKER_HEIGHT = 450;
|
|
10
|
+
export declare const DEFAULT_SEARCH_INPUT_LABEL = "Type to search for an emoji";
|
|
11
|
+
export declare const DEFAULT_SEARCH_CLEAR_BUTTON_LABEL = "Clear";
|
|
12
|
+
export declare const SEARCH_RESULTS_NO_RESULTS_FOUND = "No results found";
|
|
13
|
+
export declare const SEARCH_RESULTS_SUFFIX = " found. Use up and down arrow keys to navigate.";
|
|
14
|
+
export declare const SEARCH_RESULTS_ONE_RESULT_FOUND: string;
|
|
15
|
+
export declare const SEARCH_RESULTS_MULTIPLE_RESULTS_FOUND: string;
|
|
16
|
+
/**
|
|
17
|
+
* Every user-facing string the picker renders or announces. All keys are
|
|
18
|
+
* optional on the `labels` prop; anything omitted keeps its English
|
|
19
|
+
* default. Category names come from `categories` / localized `emojiData`,
|
|
20
|
+
* and the preview caption from `previewConfig.defaultCaption`.
|
|
21
|
+
*/
|
|
22
|
+
export type PickerLabels = {
|
|
23
|
+
searchPlaceholder: string;
|
|
24
|
+
/** Accessible name of the search input. */
|
|
25
|
+
searchLabel: string;
|
|
26
|
+
searchClear: string;
|
|
27
|
+
/** Live-region announcement and visible empty state. */
|
|
28
|
+
searchResultsNone: string;
|
|
29
|
+
searchResultsOne: string;
|
|
30
|
+
/** `%n` is replaced with the result count. */
|
|
31
|
+
searchResultsMany: string;
|
|
32
|
+
categoryNavigation: string;
|
|
33
|
+
reactions: string;
|
|
34
|
+
expandReactions: string;
|
|
35
|
+
/** Shown by the Loading part while the dataset loads. */
|
|
36
|
+
loading: string;
|
|
37
|
+
loadingError: string;
|
|
38
|
+
retryLoading: string;
|
|
39
|
+
skinToneNeutral: string;
|
|
40
|
+
skinToneLight: string;
|
|
41
|
+
skinToneMediumLight: string;
|
|
42
|
+
skinToneMedium: string;
|
|
43
|
+
skinToneMediumDark: string;
|
|
44
|
+
skinToneDark: string;
|
|
45
|
+
};
|
|
46
|
+
export declare const DEFAULT_LABELS: PickerLabels;
|
|
47
|
+
/**
|
|
48
|
+
* The default style is native, but a caller-supplied image URL resolver is
|
|
49
|
+
* an explicit request for images: without an explicit `emojiStyle` it keeps
|
|
50
|
+
* v4's image default (Apple), so the resolver is actually used.
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveEmojiStyle(emojiStyle: EmojiStyleValue | undefined, customImageSource: unknown): EmojiStyleValue;
|
|
53
|
+
export declare function mergeConfig(rawUserConfig?: PickerConfig): PickerConfigInternal;
|
|
54
|
+
export declare function resolveSkinTonePickerLocation(location: SkinTonePickerLocation, searchDisabled: boolean, showPreview: boolean): SkinTonePickerLocation;
|
|
55
|
+
export declare function basePickerConfig(): PickerConfigInternal;
|
|
56
|
+
export type PickerConfigInternal = {
|
|
57
|
+
emojiVersion: string | null;
|
|
58
|
+
searchPlaceHolder: string;
|
|
59
|
+
searchPlaceholder: string;
|
|
60
|
+
searchClearButtonLabel: string;
|
|
61
|
+
defaultSkinTone: SkinTonesValue;
|
|
62
|
+
skinTonesDisabled: boolean;
|
|
63
|
+
autoFocusSearch: boolean;
|
|
64
|
+
emojiStyle: EmojiStyleValue;
|
|
65
|
+
categories: CategoriesConfig;
|
|
66
|
+
theme: ThemeValue;
|
|
67
|
+
suggestedEmojisMode: SuggestionModeValue;
|
|
68
|
+
lazyLoadEmojis: boolean;
|
|
69
|
+
previewConfig: PreviewConfig;
|
|
70
|
+
className: string;
|
|
71
|
+
height: PickerDimensions;
|
|
72
|
+
width: PickerDimensions;
|
|
73
|
+
style: React.CSSProperties;
|
|
74
|
+
getEmojiUrl: GetEmojiUrl;
|
|
75
|
+
searchDisabled: boolean;
|
|
76
|
+
skinTonePickerLocation: SkinTonePickerLocation;
|
|
77
|
+
unicodeToHide: Set<string>;
|
|
78
|
+
customEmojis: CustomEmoji[];
|
|
79
|
+
reactionsDefaultOpen: boolean;
|
|
80
|
+
reactions: string[];
|
|
81
|
+
open: boolean;
|
|
82
|
+
allowExpandReactions: boolean;
|
|
83
|
+
hiddenEmojis: string[];
|
|
84
|
+
emojiData?: EmojiData;
|
|
85
|
+
categoryIcons: CategoryIcons;
|
|
86
|
+
nonce?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Controlled search value (raw user text). When present, it is the
|
|
89
|
+
* accepted visible source of truth; user edits emit `onSearchChange`
|
|
90
|
+
* proposals instead of committing locally.
|
|
91
|
+
*/
|
|
92
|
+
searchValue?: string;
|
|
93
|
+
/** Uncontrolled initial search value, read once per mounted lifetime. */
|
|
94
|
+
defaultSearchValue?: string;
|
|
95
|
+
/** Emitted synchronously with each committed (uncontrolled) or proposed (controlled) user edit. */
|
|
96
|
+
onSearchChange?: (value: string) => void;
|
|
97
|
+
/** Accessible label for the search input. Defaults to English. */
|
|
98
|
+
searchLabel?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Caller-defined Suggested category contents/order (unified or custom
|
|
101
|
+
* IDs). While present, `suggestedEmojisMode` is ignored for contents.
|
|
102
|
+
*/
|
|
103
|
+
suggestedEmojis?: string[];
|
|
104
|
+
/** Observes compact-reactions vs full-picker transitions. */
|
|
105
|
+
onReactionsModeChange?: (reactionsOpen: boolean) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Localized user-facing strings. Takes precedence over the individual
|
|
108
|
+
* `searchPlaceholder` / `searchLabel` / `searchClearButtonLabel` props.
|
|
109
|
+
*/
|
|
110
|
+
labels?: Partial<PickerLabels>;
|
|
111
|
+
/**
|
|
112
|
+
* Controlled active skin tone. Pair with `onSkinToneChange`; while
|
|
113
|
+
* present, `defaultSkinTone` is ignored.
|
|
114
|
+
*/
|
|
115
|
+
skinTone?: SkinTonesValue;
|
|
116
|
+
/**
|
|
117
|
+
* Emit the picker's CSS inside this cascade layer (e.g. "epr"), for
|
|
118
|
+
* layered CSS frameworks such as Tailwind v4 whose utilities cannot
|
|
119
|
+
* beat unlayered CSS. Declare the layer first in your CSS:
|
|
120
|
+
* `@layer epr, theme, base, components, utilities;`. Default: unlayered.
|
|
121
|
+
*/
|
|
122
|
+
cssLayer?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Emojis per row. The picker then sizes its width to fit those columns
|
|
125
|
+
* unless you set a width; a narrower container shows fewer columns.
|
|
126
|
+
* Default: as many as the width fits.
|
|
127
|
+
*/
|
|
128
|
+
columns?: number;
|
|
129
|
+
};
|
|
130
|
+
export type PreviewConfig = {
|
|
131
|
+
defaultEmoji: string;
|
|
132
|
+
defaultCaption: string;
|
|
133
|
+
showPreview: boolean;
|
|
134
|
+
};
|
|
135
|
+
type ConfigExternal = {
|
|
136
|
+
previewConfig: Partial<PreviewConfig>;
|
|
137
|
+
onEmojiClick: MouseDownEvent;
|
|
138
|
+
onReactionClick: MouseDownEvent;
|
|
139
|
+
onSkinToneChange: OnSkinToneChange;
|
|
140
|
+
/**
|
|
141
|
+
* User-supplied allowlist/order/merge input. Bare `Categories` members
|
|
142
|
+
* are accepted alongside full configs (as in v4 usage and this repo's
|
|
143
|
+
* own tests); the merged internal representation stays `CategoriesConfig`.
|
|
144
|
+
*/
|
|
145
|
+
categories: UserCategoryConfig;
|
|
146
|
+
/**
|
|
147
|
+
* Dataset: an object (synchronous, SSR-safe), or a loader such as
|
|
148
|
+
* `() => import('emoji-picker-react/data/emojis-fr')` to code-split it.
|
|
149
|
+
* Omitted: the bundled English dataset.
|
|
150
|
+
*/
|
|
151
|
+
emojiData: EmojiDataInput;
|
|
152
|
+
} & Omit<PickerConfigInternal, 'previewConfig' | 'unicodeToHide' | 'categories' | 'emojiData'>;
|
|
153
|
+
export type PickerConfig = Partial<ConfigExternal>;
|
|
154
|
+
export type PickerDimensions = string | number;
|
|
155
|
+
export type MouseDownEvent = (emoji: EmojiClickData, event: MouseEvent, api?: OnEmojiClickApi) => void;
|
|
156
|
+
export type OnSkinToneChange = (skinTone: SkinTones) => void;
|
|
157
|
+
/** The `onEmojiClick` / `onReactionClick` callback signature. */
|
|
158
|
+
export type EmojiClickHandler = MouseDownEvent;
|
|
159
|
+
/** The `onSkinToneChange` callback signature. */
|
|
160
|
+
export type SkinToneChangeHandler = OnSkinToneChange;
|
|
161
|
+
/** Third argument of `onEmojiClick` / `onReactionClick`. */
|
|
162
|
+
export type OnEmojiClickApi = {
|
|
163
|
+
/** Return to the compact reactions bar (no-op when reactions are off). */
|
|
164
|
+
collapseToReactions: () => void;
|
|
165
|
+
};
|
|
166
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EmojiProperties } from '../dataUtils/DataTypes';
|
|
2
|
-
export
|
|
3
|
-
names: string[];
|
|
4
|
-
[EmojiProperties.imgUrl]: string;
|
|
5
|
-
id: string;
|
|
6
|
-
/**
|
|
7
|
-
* Optional group name. Customs sharing a group render as their own
|
|
8
|
-
* category section; ungrouped customs keep the single shared bucket.
|
|
9
|
-
* Reference the group from a `{ category: Categories.CUSTOM, group }`
|
|
10
|
-
* entry in the `categories` prop to place and name the section.
|
|
11
|
-
* https://github.com/ealush/emoji-picker-react/issues/510
|
|
12
|
-
*/
|
|
13
|
-
group?: string;
|
|
14
|
-
};
|
|
1
|
+
import { EmojiProperties } from '../dataUtils/DataTypes';
|
|
2
|
+
export type CustomEmoji = {
|
|
3
|
+
names: string[];
|
|
4
|
+
[EmojiProperties.imgUrl]: string;
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Optional group name. Customs sharing a group render as their own
|
|
8
|
+
* category section; ungrouped customs keep the single shared bucket.
|
|
9
|
+
* Reference the group from a `{ category: Categories.CUSTOM, group }`
|
|
10
|
+
* entry in the `categories` prop to place and name the section.
|
|
11
|
+
* https://github.com/ealush/emoji-picker-react/issues/510
|
|
12
|
+
*/
|
|
13
|
+
group?: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** Private bridge: only the assembled picker translates legacy switches. */
|
|
3
|
+
export declare const DefaultPickerConfiguration: React.Context<Partial<{
|
|
4
|
+
previewConfig: Partial<import("./config").PreviewConfig>;
|
|
5
|
+
onEmojiClick: import("./config").MouseDownEvent;
|
|
6
|
+
onReactionClick: import("./config").MouseDownEvent;
|
|
7
|
+
onSkinToneChange: import("./config").OnSkinToneChange;
|
|
8
|
+
categories: import("./categoryConfig").UserCategoryConfig;
|
|
9
|
+
emojiData: import("..").EmojiDataInput;
|
|
10
|
+
} & Omit<import("./config").PickerConfigInternal, "categories" | "previewConfig" | "unicodeToHide" | "emojiData">> | null>;
|
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MouseDownEvent, OnSkinToneChange } from './config';
|
|
3
|
-
export
|
|
4
|
-
onEmojiClick?: MouseDownEvent;
|
|
5
|
-
onReactionClick?: MouseDownEvent;
|
|
6
|
-
onSkinToneChange?: OnSkinToneChange;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MouseDownEvent, OnSkinToneChange } from './config';
|
|
3
|
+
export type MutableConfig = {
|
|
4
|
+
onEmojiClick?: MouseDownEvent;
|
|
5
|
+
onReactionClick?: MouseDownEvent;
|
|
6
|
+
onSkinToneChange?: OnSkinToneChange;
|
|
7
|
+
onSearchChange?: (value: string) => void;
|
|
8
|
+
onReactionsModeChange?: (reactionsOpen: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Sentinel default: marks the absence of a provider. Root adopts the
|
|
12
|
+
* wrapper-provided ref across the default picker memo boundary and
|
|
13
|
+
* owns one otherwise (including nested bare Roots). Callbacks stay fresh
|
|
14
|
+
* without depending on the memoized default tree rerendering.
|
|
15
|
+
*/
|
|
16
|
+
export declare const NO_MUTABLE_PROVIDER: React.MutableRefObject<MutableConfig>;
|
|
17
|
+
export declare const MutableConfigContext: React.Context<{
|
|
18
|
+
ref: React.MutableRefObject<MutableConfig>;
|
|
19
|
+
inheritToRoot: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export declare function MutableConfigProvider({ value, inheritToRoot, children, }: {
|
|
22
|
+
value: React.MutableRefObject<MutableConfig>;
|
|
23
|
+
inheritToRoot?: boolean;
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}): React.FunctionComponentElement<React.ProviderProps<{
|
|
26
|
+
ref: React.MutableRefObject<MutableConfig>;
|
|
27
|
+
inheritToRoot: boolean;
|
|
28
|
+
}>>;
|
|
29
|
+
export declare function useMutableConfig(): React.MutableRefObject<MutableConfig>;
|
|
30
|
+
/** Only the default wrapper crosses its own memo boundary into Root. */
|
|
31
|
+
export declare function useInheritedMutableConfig(): React.MutableRefObject<MutableConfig>;
|
|
32
|
+
export declare function useDefineMutableConfig(config: MutableConfig): React.MutableRefObject<MutableConfig>;
|
|
@@ -1,36 +1,48 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { EmojiClickData,
|
|
3
|
-
import { CategoriesConfig } from './categoryConfig';
|
|
4
|
-
import { PreviewConfig } from './config';
|
|
5
|
-
import { CustomEmoji } from './customEmojiConfig';
|
|
6
|
-
export declare enum MOUSE_EVENT_SOURCE {
|
|
7
|
-
REACTIONS = "reactions",
|
|
8
|
-
PICKER = "picker"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function
|
|
20
|
-
export declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
26
|
-
export declare function
|
|
27
|
-
export declare function
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function
|
|
34
|
-
export declare function
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { EmojiClickData, EmojiStyleValue, SkinTonePickerLocation, SkinTones, SuggestionModeValue, ThemeValue } from '../types/exposedTypes';
|
|
3
|
+
import { CategoriesConfig } from './categoryConfig';
|
|
4
|
+
import { PickerLabels, PreviewConfig } from './config';
|
|
5
|
+
import { CustomEmoji } from './customEmojiConfig';
|
|
6
|
+
export declare enum MOUSE_EVENT_SOURCE {
|
|
7
|
+
REACTIONS = "reactions",
|
|
8
|
+
PICKER = "picker"
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolved user-facing strings: English defaults, then the legacy
|
|
12
|
+
* individual props, then `labels` (highest precedence).
|
|
13
|
+
*/
|
|
14
|
+
export declare function useLabels(): PickerLabels;
|
|
15
|
+
export declare function useSearchPlaceHolderConfig(): string;
|
|
16
|
+
export declare function useSearchClearButtonLabelConfig(): string;
|
|
17
|
+
export declare function useDefaultSkinToneConfig(): SkinTones;
|
|
18
|
+
export declare function useSkinToneConfig(): SkinTones | undefined;
|
|
19
|
+
export declare function useAllowExpandReactions(): boolean;
|
|
20
|
+
export declare function useSkinTonesDisabledConfig(): boolean;
|
|
21
|
+
export declare function useEmojiStyleConfig(): EmojiStyleValue;
|
|
22
|
+
export declare function useAutoFocusSearchConfig(): boolean;
|
|
23
|
+
export declare function useCategoriesConfig(): CategoriesConfig;
|
|
24
|
+
export declare function useCategoryIconsConfig(): Partial<Record<import("./categoryConfig").Categories, React.ReactNode>>;
|
|
25
|
+
export declare function useCustomEmojisConfig(): CustomEmoji[];
|
|
26
|
+
export declare function useOpenConfig(): boolean;
|
|
27
|
+
export declare function useOnEmojiClickConfig(mouseEventSource: MOUSE_EVENT_SOURCE): (emoji: EmojiClickData, event: MouseEvent) => void;
|
|
28
|
+
export declare function useOnSkinToneChangeConfig(): (skinTone: SkinTones) => void;
|
|
29
|
+
export declare function usePreviewConfig(): PreviewConfig;
|
|
30
|
+
export declare function useThemeConfig(): ThemeValue;
|
|
31
|
+
export declare function useSuggestedEmojisModeConfig(): SuggestionModeValue;
|
|
32
|
+
export declare function useLazyLoadEmojisConfig(): boolean;
|
|
33
|
+
export declare function useClassNameConfig(): string;
|
|
34
|
+
export declare function useStyleConfig(): React.CSSProperties;
|
|
35
|
+
export declare function useReactionsOpenConfig(): boolean;
|
|
36
|
+
export declare function useColumnsConfig(): number | undefined;
|
|
37
|
+
export declare function validColumns(columns: unknown): number | undefined;
|
|
38
|
+
export declare function useEmojiVersionConfig(): string | null;
|
|
39
|
+
export declare function useSearchDisabledConfig(): boolean;
|
|
40
|
+
export declare function useSkinTonePickerLocationConfig(): SkinTonePickerLocation;
|
|
41
|
+
export declare function useUnicodeToHide(): Set<string>;
|
|
42
|
+
export declare function useReactionsConfig(): string[];
|
|
43
|
+
export declare function useGetEmojiUrlConfig(): (unified: string, style: EmojiStyleValue) => string;
|
|
44
|
+
export declare function useSearchValueConfig(): string | undefined;
|
|
45
|
+
export declare function useDefaultSearchValueConfig(): string | undefined;
|
|
46
|
+
export declare function useSearchLabelConfig(): string;
|
|
47
|
+
export declare function useSuggestedEmojisConfig(): string[] | undefined;
|
|
48
|
+
export declare function formatSearchResultsLabel(labels: PickerLabels, searchResultsCount: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmojiData } from '../types/exposedTypes';
|
|
2
|
+
export declare function registerDefaultEmojiData(data: EmojiData): void;
|
|
3
|
+
export declare function getRegisteredDefaultEmojiData(): EmojiData | null;
|
|
4
|
+
/** Stable empty dataset used while data is loading. */
|
|
5
|
+
export declare const EMPTY_EMOJI_DATA: EmojiData;
|
|
6
|
+
/** The registered dataset, or the empty placeholder before registration. */
|
|
7
|
+
export declare function defaultEmojiDataOrEmpty(): EmojiData;
|
|
8
|
+
/** Load (once) and register the bundled English dataset. */
|
|
9
|
+
export declare function loadDefaultEmojiData(): Promise<EmojiData>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// The bundled English dataset is no longer a static dependency of the
|
|
2
|
+
// picker core. Entry points that promise synchronous data (the default
|
|
3
|
+
// `emoji-picker-react` entry and `emoji-picker-react/data`) register it on
|
|
4
|
+
// import; `emoji-picker-react/primitives` does not, so a lean composition
|
|
5
|
+
// ships without it and loads it on demand (a separate chunk in ESM builds)
|
|
6
|
+
// unless `emojiData` is supplied.
|
|
7
|
+
let registered = null;
|
|
8
|
+
export function registerDefaultEmojiData(data) {
|
|
9
|
+
registered = data;
|
|
10
|
+
}
|
|
11
|
+
export function getRegisteredDefaultEmojiData() {
|
|
12
|
+
return registered;
|
|
13
|
+
}
|
|
14
|
+
/** Stable empty dataset used while data is loading. */
|
|
15
|
+
export const EMPTY_EMOJI_DATA = Object.freeze({
|
|
16
|
+
categories: {},
|
|
17
|
+
emojis: {},
|
|
18
|
+
});
|
|
19
|
+
/** The registered dataset, or the empty placeholder before registration. */
|
|
20
|
+
export function defaultEmojiDataOrEmpty() {
|
|
21
|
+
return registered ?? EMPTY_EMOJI_DATA;
|
|
22
|
+
}
|
|
23
|
+
let pending = null;
|
|
24
|
+
/** Load (once) and register the bundled English dataset. */
|
|
25
|
+
export function loadDefaultEmojiData() {
|
|
26
|
+
if (registered) {
|
|
27
|
+
return Promise.resolve(registered);
|
|
28
|
+
}
|
|
29
|
+
if (!pending) {
|
|
30
|
+
pending = import('./emojis').then((module) => {
|
|
31
|
+
const data = (module.default ?? module);
|
|
32
|
+
registered = registered ?? data;
|
|
33
|
+
return registered;
|
|
34
|
+
}).catch((error) => {
|
|
35
|
+
pending = null;
|
|
36
|
+
throw error;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return pending;
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type CategoryConfig = {
|
|
4
|
+
category: Categories;
|
|
5
|
+
name: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Selects a `CustomEmoji` group for `Categories.CUSTOM` entries. Each
|
|
9
|
+
* grouped entry renders its own section and nav tab; ungrouped entries
|
|
10
|
+
* share the classic customs bucket.
|
|
11
|
+
*/
|
|
12
|
+
group?: string;
|
|
13
|
+
};
|
|
14
|
+
type EmojiData = {
|
|
15
|
+
categories: Partial<Record<Categories, CategoryConfig>>;
|
|
16
|
+
emojis: Record<string, DataEmoji[]>;
|
|
17
|
+
};
|
|
18
|
+
interface DataEmoji {
|
|
19
|
+
n: string[];
|
|
20
|
+
u: string;
|
|
21
|
+
v?: string[];
|
|
22
|
+
a: string;
|
|
23
|
+
}
|
|
24
|
+
declare enum Categories {
|
|
25
|
+
SUGGESTED = "suggested",
|
|
26
|
+
CUSTOM = "custom",
|
|
27
|
+
SMILEYS_PEOPLE = "smileys_people",
|
|
28
|
+
ANIMALS_NATURE = "animals_nature",
|
|
29
|
+
FOOD_DRINK = "food_drink",
|
|
30
|
+
TRAVEL_PLACES = "travel_places",
|
|
31
|
+
ACTIVITIES = "activities",
|
|
32
|
+
OBJECTS = "objects",
|
|
33
|
+
SYMBOLS = "symbols",
|
|
34
|
+
FLAGS = "flags"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const data: EmojiData;
|
|
38
|
+
|
|
39
|
+
export { data as default };
|
package/dist/data/emojis-bn.d.ts
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type CategoryConfig = {
|
|
4
|
+
category: Categories;
|
|
5
|
+
name: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Selects a `CustomEmoji` group for `Categories.CUSTOM` entries. Each
|
|
9
|
+
* grouped entry renders its own section and nav tab; ungrouped entries
|
|
10
|
+
* share the classic customs bucket.
|
|
11
|
+
*/
|
|
12
|
+
group?: string;
|
|
13
|
+
};
|
|
14
|
+
type EmojiData = {
|
|
15
|
+
categories: Partial<Record<Categories, CategoryConfig>>;
|
|
16
|
+
emojis: Record<string, DataEmoji[]>;
|
|
17
|
+
};
|
|
18
|
+
interface DataEmoji {
|
|
19
|
+
n: string[];
|
|
20
|
+
u: string;
|
|
21
|
+
v?: string[];
|
|
22
|
+
a: string;
|
|
23
|
+
}
|
|
24
|
+
declare enum Categories {
|
|
25
|
+
SUGGESTED = "suggested",
|
|
26
|
+
CUSTOM = "custom",
|
|
27
|
+
SMILEYS_PEOPLE = "smileys_people",
|
|
28
|
+
ANIMALS_NATURE = "animals_nature",
|
|
29
|
+
FOOD_DRINK = "food_drink",
|
|
30
|
+
TRAVEL_PLACES = "travel_places",
|
|
31
|
+
ACTIVITIES = "activities",
|
|
32
|
+
OBJECTS = "objects",
|
|
33
|
+
SYMBOLS = "symbols",
|
|
34
|
+
FLAGS = "flags"
|
|
35
|
+
}
|
|
36
|
+
|
|
2
37
|
declare const data: EmojiData;
|
|
3
|
-
|
|
38
|
+
|
|
39
|
+
export { data as default };
|