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
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
3
|
-
export declare const
|
|
4
|
-
export declare
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function emojiTrueOffsetTop(element: NullableElement): number;
|
|
13
|
-
export declare function categoryLabelHeight(category: NullableElement): number;
|
|
14
|
-
export declare function isEmojiBehindLabel(emoji: NullableElement): boolean;
|
|
15
|
-
export declare function queryScrollBody(root: NullableElement): NullableElement;
|
|
16
|
-
export declare function emojiDistanceFromScrollTop(emoji: NullableElement): number;
|
|
17
|
-
export declare function closestScrollBody(element: NullableElement): NullableElement;
|
|
18
|
-
export declare function emojiTruOffsetLeft(element: NullableElement): number;
|
|
19
|
-
export declare function unifiedFromEmojiElement(emoji: NullableElement): string | null;
|
|
20
|
-
export declare function originalUnifiedFromEmojiElement(emoji: NullableElement): string | null;
|
|
21
|
-
export declare function allUnifiedFromEmojiElement(emoji: NullableElement): {
|
|
22
|
-
unified: string | null;
|
|
23
|
-
originalUnified: string | null;
|
|
24
|
-
};
|
|
25
|
-
export declare function isVisibleEmoji(element: HTMLElement): boolean;
|
|
26
|
-
export declare function isHidden(element: NullableElement): boolean;
|
|
27
|
-
export declare function allVisibleEmojis(parent: NullableElement): HTMLElement[];
|
|
28
|
-
export declare function
|
|
29
|
-
export declare function
|
|
30
|
-
export declare function
|
|
31
|
-
export declare function
|
|
32
|
-
export declare function prevCategory(element: NullableElement): NullableElement;
|
|
33
|
-
export declare function nextCategory(element: NullableElement): NullableElement;
|
|
34
|
-
export declare function closestCategory(element: NullableElement): NullableElement;
|
|
35
|
-
export declare function closestCategoryContent(element: NullableElement): NullableElement;
|
|
1
|
+
export type NullableElement = HTMLElement | null;
|
|
2
|
+
export declare const EmojiButtonSelector = "button.epr-emoji";
|
|
3
|
+
export declare const VisibleEmojiSelector = "button.epr-emoji.epr-visible:not(.epr-hidden)";
|
|
4
|
+
export declare function buttonFromTarget(emojiElement: NullableElement): HTMLButtonElement | null;
|
|
5
|
+
export declare function isEmojiButton(element: NullableElement): boolean;
|
|
6
|
+
export declare function isEmojiElement(element: NullableElement): boolean;
|
|
7
|
+
export declare function categoryLabelFromCategory(category: NullableElement): NullableElement;
|
|
8
|
+
export declare function closestCategoryLabel(element: NullableElement): NullableElement;
|
|
9
|
+
export declare function elementHeight(element: NullableElement): number;
|
|
10
|
+
/** Layout size including host button borders (unaffected by transforms). */
|
|
11
|
+
export declare function elementBorderBoxHeight(element: NullableElement): number;
|
|
12
|
+
export declare function emojiTrueOffsetTop(element: NullableElement): number;
|
|
13
|
+
export declare function categoryLabelHeight(category: NullableElement): number;
|
|
14
|
+
export declare function isEmojiBehindLabel(emoji: NullableElement): boolean;
|
|
15
|
+
export declare function queryScrollBody(root: NullableElement): NullableElement;
|
|
16
|
+
export declare function emojiDistanceFromScrollTop(emoji: NullableElement): number;
|
|
17
|
+
export declare function closestScrollBody(element: NullableElement): NullableElement;
|
|
18
|
+
export declare function emojiTruOffsetLeft(element: NullableElement): number;
|
|
19
|
+
export declare function unifiedFromEmojiElement(emoji: NullableElement): string | null;
|
|
20
|
+
export declare function originalUnifiedFromEmojiElement(emoji: NullableElement): string | null;
|
|
21
|
+
export declare function allUnifiedFromEmojiElement(emoji: NullableElement): {
|
|
22
|
+
unified: string | null;
|
|
23
|
+
originalUnified: string | null;
|
|
24
|
+
};
|
|
25
|
+
export declare function isVisibleEmoji(element: HTMLElement): boolean;
|
|
26
|
+
export declare function isHidden(element: NullableElement): boolean;
|
|
27
|
+
export declare function allVisibleEmojis(parent: NullableElement): HTMLElement[];
|
|
28
|
+
export declare function firstVisibleEmoji(parent: NullableElement): NullableElement;
|
|
29
|
+
export declare function adjacentCategory(element: NullableElement, direction: number): NullableElement;
|
|
30
|
+
export declare function closestCategory(element: NullableElement): HTMLElement | null;
|
|
31
|
+
export declare function closestCategoryContent(element: NullableElement): HTMLElement | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PickerProps } from './index';
|
|
3
|
-
declare function EmojiPicker(props: PickerProps): JSX.Element;
|
|
4
|
-
declare const _default: React.MemoExoticComponent<typeof EmojiPicker>;
|
|
5
|
-
export default _default;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PickerProps } from './index';
|
|
3
|
+
declare function EmojiPicker(props: PickerProps): React.JSX.Element;
|
|
4
|
+
declare const _default: React.MemoExoticComponent<typeof EmojiPicker>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Renders `css` once per document or shadow root. Every instance renders
|
|
4
|
+
* the element during SSR and its first client render, so hydration matches
|
|
5
|
+
* the server markup; duplicates drop right after the first paint.
|
|
6
|
+
* When the owner unmounts, the next instance renders the element in the
|
|
7
|
+
* same commit. A different nonce or layer gets its own element: a style
|
|
8
|
+
* allowed by one nonce must not stand in for another under CSP.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DedupedStyle({ css, nonce }: {
|
|
11
|
+
css: string;
|
|
12
|
+
nonce?: string;
|
|
13
|
+
}): React.JSX.Element | null;
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Styles } from 'shipstyles';
|
|
3
|
-
export declare const stylesheet: {
|
|
4
|
-
create: <K extends string>(styles:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Styles } from 'shipstyles';
|
|
3
|
+
export declare const stylesheet: {
|
|
4
|
+
create: <K extends string>(styles: import("shipstyles").CreateSheetInput<K>) => { [P in Exclude<Exclude<K, keyof CSSStyleDeclaration | `@media ${string}` | "--" | `:${string}` | `*${string}` | `+${string}` | `.${string}` | `~${string}` | `>${string}` | `&.${string}` | `&:${string}`>, keyof CSSStyleDeclaration | `@media ${string}` | "--" | `:${string}` | `*${string}` | `+${string}` | `.${string}` | `~${string}` | `>${string}` | `&.${string}` | `&:${string}`>]: Set<string>; } & {
|
|
5
|
+
[x: string]: Set<string>;
|
|
6
|
+
};
|
|
7
|
+
keyframes: <KF extends string>(keyframesInput: { [P in KF]: {
|
|
8
|
+
[stage: string]: Partial<CSSStyleDeclaration>;
|
|
9
|
+
}; }) => Record<KF, string>;
|
|
10
|
+
getStyle: () => string;
|
|
11
|
+
isApplied: () => boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function finalizeCss(css: string, cssLayer?: string): string;
|
|
14
|
+
export declare const commonStyles: {
|
|
15
|
+
hidden: Set<string>;
|
|
16
|
+
} & {
|
|
17
|
+
[x: string]: Set<string>;
|
|
18
|
+
};
|
|
19
|
+
export declare const PickerStyleTag: React.NamedExoticComponent<{
|
|
20
|
+
nonce?: string;
|
|
21
|
+
cssLayer?: string;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const commonInteractionStyles: {
|
|
24
|
+
categoryBtn: Set<string>;
|
|
25
|
+
hiddenOnSearch: Set<string>;
|
|
26
|
+
visibleOnSearchOnly: Set<string>;
|
|
27
|
+
hiddenOnReactions: Set<string>;
|
|
28
|
+
} & {
|
|
29
|
+
[x: string]: Set<string>;
|
|
30
|
+
};
|
|
31
|
+
export declare function darkMode(key: string, value: Styles): {
|
|
32
|
+
'.epr-dark-theme': {
|
|
33
|
+
[styleKey: string]: Styles;
|
|
34
|
+
};
|
|
35
|
+
'.epr-auto-theme': {
|
|
36
|
+
[styleKey: string]: {
|
|
37
|
+
'@media (prefers-color-scheme: dark)': Styles;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export default class ErrorBoundary extends React.Component<{
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}, {
|
|
5
|
-
hasError: boolean;
|
|
6
|
-
}> {
|
|
7
|
-
constructor(props: {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
});
|
|
10
|
-
static getDerivedStateFromError(): {
|
|
11
|
-
hasError: boolean;
|
|
12
|
-
};
|
|
13
|
-
componentDidCatch(error: Error, errorInfo: any): void;
|
|
14
|
-
render():
|
|
15
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default class ErrorBoundary extends React.Component<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}, {
|
|
5
|
+
hasError: boolean;
|
|
6
|
+
}> {
|
|
7
|
+
constructor(props: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
});
|
|
10
|
+
static getDerivedStateFromError(): {
|
|
11
|
+
hasError: boolean;
|
|
12
|
+
};
|
|
13
|
+
componentDidCatch(error: Error, errorInfo: any): void;
|
|
14
|
+
render(): React.ReactNode;
|
|
15
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
}>;
|
|
7
|
-
export default function Absolute({ children, className, style }: Props): JSX.Element;
|
|
8
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type Props = Readonly<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
}>;
|
|
7
|
+
export default function Absolute({ children, className, style }: Props): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare enum FlexDirection {
|
|
3
|
-
ROW = "FlexRow",
|
|
4
|
-
COLUMN = "FlexColumn"
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
direction?: FlexDirection;
|
|
11
|
-
}>;
|
|
12
|
-
export default function Flex({ children, className, style, direction, }: Props): JSX.Element;
|
|
13
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare enum FlexDirection {
|
|
3
|
+
ROW = "FlexRow",
|
|
4
|
+
COLUMN = "FlexColumn"
|
|
5
|
+
}
|
|
6
|
+
type Props = Readonly<{
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
direction?: FlexDirection;
|
|
11
|
+
}>;
|
|
12
|
+
export default function Flex({ children, className, style, direction, }: Props): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
}>;
|
|
7
|
-
export default function Relative({ children, className, style }: Props): JSX.Element;
|
|
8
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type Props = Readonly<{
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
}>;
|
|
7
|
+
export default function Relative({ children, className, style }: Props): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
className?: string;
|
|
4
|
-
style?: React.CSSProperties;
|
|
5
|
-
}>;
|
|
6
|
-
export default function Space({ className, style }: Props): JSX.Element;
|
|
7
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type Props = Readonly<{
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
}>;
|
|
6
|
+
export default function Space({ className, style }: Props): React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function BtnPlus(): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function BtnPlus(): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const DEFAULT_REACTIONS: string[];
|
|
1
|
+
export declare const DEFAULT_REACTIONS: string[];
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type ReactionsProps = Omit<React.HTMLAttributes<HTMLUListElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'>;
|
|
3
|
+
export declare const Reactions: React.NamedExoticComponent<ReactionsProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface Props extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
3
|
-
className?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function Button(props: Props): JSX.Element;
|
|
6
|
-
export {
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface Props extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Button(props: Props): React.JSX.Element;
|
|
6
|
+
export declare const buttonStyles: {
|
|
7
|
+
button: Set<string>;
|
|
8
|
+
} & {
|
|
9
|
+
[x: string]: Set<string>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CategoryConfig } from '../../types/exposedTypes';
|
|
3
|
-
|
|
4
|
-
categoryConfig: CategoryConfig;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
hidden?: boolean;
|
|
7
|
-
hiddenOnSearch?: boolean;
|
|
8
|
-
height?: number;
|
|
9
|
-
emojisPerRow?: number;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CategoryConfig } from '../../types/exposedTypes';
|
|
3
|
+
type Props = Readonly<{
|
|
4
|
+
categoryConfig: CategoryConfig;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
hidden?: boolean;
|
|
7
|
+
hiddenOnSearch?: boolean;
|
|
8
|
+
height?: number;
|
|
9
|
+
emojisPerRow?: number;
|
|
10
|
+
emojiCount?: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function EmojiCategory({ categoryConfig, children, hidden, hiddenOnSearch, height, emojisPerRow, emojiCount, }: Props): React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function EmojiList({ scrollTop }: {
|
|
3
|
-
scrollTop: number;
|
|
4
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function EmojiList({ scrollTop, outerRef, className, nativeProps, }: {
|
|
3
|
+
scrollTop: number;
|
|
4
|
+
outerRef?: React.Ref<HTMLUListElement>;
|
|
5
|
+
className?: string;
|
|
6
|
+
nativeProps?: Omit<React.HTMLAttributes<HTMLUListElement>, 'role' | 'children' | 'className' | 'ref'>;
|
|
7
|
+
}): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function EmojiVariationPicker(): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function EmojiVariationPicker(): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function MeasureEmoji(): JSX.Element | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function MeasureEmoji(): React.JSX.Element | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DataEmoji } from '../../dataUtils/DataTypes';
|
|
3
|
+
import { EmojiStyleValue } from '../../types/exposedTypes';
|
|
4
|
+
/** The emoji a custom `Emoji` cell renders. */
|
|
5
|
+
export type ListEmoji = {
|
|
6
|
+
/** True while hovered or keyboard-focused. */
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
/** Unified code including the active skin tone, e.g. `1f44d-1f3fd`. */
|
|
9
|
+
unified: string;
|
|
10
|
+
names: string[];
|
|
11
|
+
/** Native emoji text (custom emojis: their id). */
|
|
12
|
+
emoji: string;
|
|
13
|
+
isCustom: boolean;
|
|
14
|
+
/** Active image style URL, or undefined for standard native emojis. */
|
|
15
|
+
imageUrl?: string;
|
|
16
|
+
/** Whether a long press opens skin tone variations. */
|
|
17
|
+
hasVariations: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Props for a custom emoji cell. Spread everything except `emoji` onto a
|
|
21
|
+
* `<button>`: the library-owned attributes (type, class, position style,
|
|
22
|
+
* tabIndex, aria-label, data-epr-*) carry selection, keyboard navigation,
|
|
23
|
+
* virtualization and accessibility. `children` is the default glyph/image;
|
|
24
|
+
* render it or your own content.
|
|
25
|
+
*/
|
|
26
|
+
export type EmojiRenderProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
27
|
+
emoji: ListEmoji;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Props for a custom category header. Spread everything except `category`
|
|
32
|
+
* onto the header element; it stays sticky and measured.
|
|
33
|
+
*/
|
|
34
|
+
export type CategoryHeaderRenderProps = React.HTMLAttributes<HTMLElement> & {
|
|
35
|
+
category: {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
};
|
|
41
|
+
export type ListComponents = {
|
|
42
|
+
Emoji?: React.ComponentType<EmojiRenderProps>;
|
|
43
|
+
CategoryHeader?: React.ComponentType<CategoryHeaderRenderProps>;
|
|
44
|
+
};
|
|
45
|
+
export declare const ListComponentsContext: React.Context<ListComponents>;
|
|
46
|
+
export declare function useListComponents(): ListComponents;
|
|
47
|
+
export declare function emojiRenderInfo(emoji: DataEmoji, unified: string, emojiStyle: EmojiStyleValue, getEmojiUrl: (unified: string, style: EmojiStyleValue) => string): Omit<ListEmoji, 'isActive'>;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { NullableElement } from '../../DomUtils/selectors';
|
|
3
|
-
export declare function ElementRefContextProvider({ children, }: {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}): JSX.Element;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { NullableElement } from '../../DomUtils/selectors';
|
|
3
|
+
export declare function ElementRefContextProvider({ children, }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
export type ElementRef<E extends HTMLElement = HTMLElement> = React.MutableRefObject<E | null> & {
|
|
7
|
+
subscribe?: (listener: () => void) => () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function useEmojiListRef(): ElementRef<HTMLUListElement>;
|
|
10
|
+
export declare function usePickerMainRef(): ElementRef<HTMLElement>;
|
|
11
|
+
export declare function useAnchoredEmojiRef(): ElementRef<HTMLElement>;
|
|
12
|
+
export declare function useSetAnchoredEmojiRef(): (target: NullableElement) => void;
|
|
13
|
+
export declare function useBodyRef(): ElementRef<HTMLDivElement>;
|
|
14
|
+
export declare function useReactionsRef(): ElementRef<HTMLUListElement>;
|
|
15
|
+
export declare function useSearchInputRef(): ElementRef<HTMLInputElement>;
|
|
16
|
+
export declare function useSkinTonePickerRef(): ElementRef<HTMLDivElement>;
|
|
17
|
+
export declare function useCategoryNavigationRef(): ElementRef<HTMLDivElement>;
|
|
18
|
+
export declare function useVariationPickerRef(): ElementRef<HTMLDivElement>;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PickerConfig, PickerConfigInternal } from '../../config/config';
|
|
3
|
-
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PickerConfig, PickerConfigInternal } from '../../config/config';
|
|
3
|
+
type Props = PickerConfig & Readonly<{
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
type SearchSlice = {
|
|
7
|
+
searchValue: string | undefined;
|
|
8
|
+
defaultSearchValue: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function PickerConfigProvider({ children, ...config }: Props): React.JSX.Element;
|
|
11
|
+
export declare function useSearchSliceConfig(): SearchSlice;
|
|
12
|
+
export declare function useSetConfig(config: PickerConfig): PickerConfigInternal;
|
|
13
|
+
export declare function usePickerConfig(): PickerConfigInternal;
|
|
14
|
+
export {};
|
|
@@ -1,25 +1,57 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DataEmoji } from '../../dataUtils/DataTypes';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DataEmoji } from '../../dataUtils/DataTypes';
|
|
3
|
+
import { NativeEmojiSupport } from '../../dataUtils/nativeEmojiSupport';
|
|
4
|
+
import { FilterDict } from '../../hooks/useFilter';
|
|
5
|
+
import { createActiveEmojiStore } from '../../state/activeEmojiStore';
|
|
6
|
+
import { NavigationRegistry } from '../../state/navigationRegistry';
|
|
7
|
+
import { SkinTones } from '../../types/exposedTypes';
|
|
8
|
+
type ReactState<T> = [T, React.Dispatch<React.SetStateAction<T>>];
|
|
9
|
+
export interface PickerServices {
|
|
10
|
+
activeEmojiStore: ReturnType<typeof createActiveEmojiStore>;
|
|
11
|
+
filterRef: React.MutableRefObject<FilterState>;
|
|
12
|
+
filterQueryOrderRef: React.MutableRefObject<string[]>;
|
|
13
|
+
disallowClickRef: React.MutableRefObject<boolean>;
|
|
14
|
+
disallowMouseRef: React.MutableRefObject<boolean>;
|
|
15
|
+
navigationRegistry: NavigationRegistry;
|
|
16
|
+
requestNativeProbe: RequestNativeProbe;
|
|
17
|
+
}
|
|
18
|
+
export type ActiveEmojiState = null | {
|
|
19
|
+
unified: string;
|
|
20
|
+
originalUnified: string;
|
|
21
|
+
};
|
|
22
|
+
type RequestNativeProbe = (unifieds: string[]) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Asks for exact checks of identities about to be shown: grid cells in
|
|
25
|
+
* and near the viewport, their skin tone variants, and reaction choices.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useRequestNativeProbe(): RequestNativeProbe;
|
|
28
|
+
export declare function useNativeEmojiSupport(): NativeEmojiSupport | null;
|
|
29
|
+
export declare function PickerContextProvider({ children }: Props): React.JSX.Element;
|
|
30
|
+
type Props = Readonly<{
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function useFilterRef(): React.MutableRefObject<FilterState>;
|
|
34
|
+
export declare function useFilterQueryOrderRef(): React.MutableRefObject<string[]>;
|
|
35
|
+
export declare function useDisallowClickRef(): React.MutableRefObject<boolean>;
|
|
36
|
+
export declare function useDisallowMouseRef(): React.MutableRefObject<boolean>;
|
|
37
|
+
export declare function useNavigationRegistry(): NavigationRegistry;
|
|
38
|
+
export declare function useActiveEmojiState(): ReactState<ActiveEmojiState>;
|
|
39
|
+
export declare function useIsActiveEmoji(unified?: string): boolean;
|
|
40
|
+
export declare function useReactionsModeState(): ReactState<boolean>;
|
|
41
|
+
export declare function useSearchTermState(): [string, (term: string) => Promise<string>];
|
|
42
|
+
export declare function useSearchDisplayState(): ReactState<string>;
|
|
43
|
+
export declare function useSearchCommittedState(): ReactState<string>;
|
|
44
|
+
export declare function useSearchComposingState(): ReactState<boolean>;
|
|
45
|
+
export declare function useActiveSkinToneState(): [
|
|
46
|
+
SkinTones,
|
|
47
|
+
(skinTone: SkinTones) => void
|
|
48
|
+
];
|
|
49
|
+
export declare function useEmojisThatFailedToLoadState(): [Set<string>, (unified: string) => void];
|
|
50
|
+
export declare function useIsPastInitialLoad(): boolean;
|
|
51
|
+
export declare function useEmojiVariationPickerState(): ReactState<DataEmoji | null>;
|
|
52
|
+
export declare function useSkinToneFanOpenState(): ReactState<boolean>;
|
|
53
|
+
export declare function useVisibleCategoriesState(): ReactState<string[]>;
|
|
54
|
+
export declare function useEmojiSizeState(): ReactState<number | null>;
|
|
55
|
+
export declare function useUpdateSuggested(): [number, () => void];
|
|
56
|
+
export type FilterState = Record<string, FilterDict>;
|
|
57
|
+
export {};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DataEmoji, DataEmojis } from '../../dataUtils/DataTypes';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
customGroups: Record<string, DataEmojis>;
|
|
10
|
-
emojiByUnified: (unified?: string) => DataEmoji | undefined;
|
|
11
|
-
activeVariationFromUnified: (unified: string) => SkinTones | null;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataEmoji, DataEmojis } from '../../dataUtils/DataTypes';
|
|
3
|
+
import type { FilterDict } from '../../hooks/useFilter';
|
|
4
|
+
import { Categories, EmojiData, SkinTones } from '../../types/exposedTypes';
|
|
5
|
+
export interface PickerDataContextValue {
|
|
6
|
+
emojiData: EmojiData;
|
|
7
|
+
allEmojis: DataEmojis;
|
|
8
|
+
allEmojisByUnified: Record<string, DataEmoji>;
|
|
9
|
+
customGroups: Record<string, DataEmojis>;
|
|
10
|
+
emojiByUnified: (unified?: string) => DataEmoji | undefined;
|
|
11
|
+
activeVariationFromUnified: (unified: string) => SkinTones | null;
|
|
12
|
+
/**
|
|
13
|
+
* Query-to-filter-dict through the single shared prepared core: core
|
|
14
|
+
* dataset matches mapped back to source records, unioned with the
|
|
15
|
+
* Root-local custom emojis the core never sees.
|
|
16
|
+
*/
|
|
17
|
+
queryFilterDict: (query: string) => FilterDict;
|
|
18
|
+
}
|
|
19
|
+
export declare function PickerDataProvider({ children, }: {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
export declare function usePickerDataContext(): PickerDataContextValue;
|
|
23
|
+
export declare function useGetEmojisByCategory(): (category: Categories, group?: string) => DataEmojis;
|