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,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** Keys never forwarded to the DOM (in addition to `data-epr-*`). */
|
|
3
|
+
export declare function filterPrimitiveProps(props: object, reserved: readonly string[]): Record<string, unknown>;
|
|
4
|
+
/**
|
|
5
|
+
* Handler composition: the library behavioral handler
|
|
6
|
+
* runs first, the consumer handler second with the same event. Consumer
|
|
7
|
+
* `preventDefault()` is not a supported way to disable required behavior.
|
|
8
|
+
* Event-handler exceptions propagate per normal React/browser behavior;
|
|
9
|
+
* primitives never catch them and no ErrorBoundary is installed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function composeHandlers<E>(libraryHandler: ((event: E) => void) | undefined, consumerHandler: ((event: E) => void) | undefined): ((event: E) => void) | undefined;
|
|
12
|
+
/** Merge any number of refs (context ref + forwarded ref) onto one node. */
|
|
13
|
+
export declare function mergeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
|
|
14
|
+
/** Keep callback refs attached while the refs themselves are unchanged. */
|
|
15
|
+
export declare function useMergedRefs<T>(first: React.Ref<T> | undefined, second: React.Ref<T> | undefined): React.RefCallback<T>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function RootScopeProvider({ children }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}): React.JSX.Element;
|
|
5
|
+
export declare function useRootScope(primitive: string): boolean;
|
|
6
|
+
export declare const ViewportScrollContext: React.Context<number>;
|
|
7
|
+
export declare function useViewportScrollTop(): number;
|
|
8
|
+
export declare function ViewportScopeProvider({ children, }: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
export declare function useViewportScope(primitive: string): boolean;
|
|
12
|
+
/** Test-only: reset warn-once sets between cases. */
|
|
13
|
+
export declare function __resetPrimitiveWarningsForTest(): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const structuralStyles: {
|
|
3
|
+
root: Set<string>;
|
|
4
|
+
themeLight: Set<string>;
|
|
5
|
+
themeDark: Set<string>;
|
|
6
|
+
themeAuto: Set<string>;
|
|
7
|
+
panel: Set<string>;
|
|
8
|
+
collapsed: Set<string>;
|
|
9
|
+
collapsedAppearance: Set<string>;
|
|
10
|
+
} & {
|
|
11
|
+
[x: string]: Set<string>;
|
|
12
|
+
};
|
|
13
|
+
export declare const StructuralStyleTag: React.NamedExoticComponent<{
|
|
14
|
+
nonce?: string;
|
|
15
|
+
cssLayer?: string;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Geometry tokens: sizes, spacing and stacking that measurement,
|
|
3
|
+
* virtualization and layout depend on. Every Root applies these
|
|
4
|
+
* (structural stylesheet), so a bare composition is functional without
|
|
5
|
+
* any appearance tokens. Consumers may override them; measurement reads
|
|
6
|
+
* the resulting DOM.
|
|
7
|
+
*/
|
|
8
|
+
export declare const structuralPickerTokens: Record<string, string>;
|
|
9
|
+
/** Light color tokens (the v4 default palette). */
|
|
10
|
+
export declare const lightPickerTokens: Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Dark color overrides layered on top of the light tokens. Direct values:
|
|
13
|
+
* the default picker keeps its private `--epr-dark-*` indirection for v4
|
|
14
|
+
* compatibility, primitives do not need it.
|
|
15
|
+
*/
|
|
16
|
+
export declare const darkPickerTokens: Record<string, string>;
|
|
17
|
+
/** Full light preset: geometry plus light colors (v4 defaults). */
|
|
18
|
+
export declare const defaultPickerTokens: Record<string, string>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ListComponents } from '../components/body/listComponents';
|
|
3
|
+
import type { PickerConfig } from '../config/config';
|
|
4
|
+
import type { ThemeValue } from '../types/exposedTypes';
|
|
5
|
+
import type { PickerComponents } from './components';
|
|
6
|
+
/**
|
|
7
|
+
* Appearance props owned by the default <EmojiPicker /> wrapper, plus the
|
|
8
|
+
* two that Root already accepts as native `aside` attributes. This list is
|
|
9
|
+
* short and stable; the behavior set is long and grows.
|
|
10
|
+
*/
|
|
11
|
+
export type PickerAppearanceProps = 'theme' | 'colorScheme' | 'width' | 'height' | 'className' | 'style' | 'unstyled';
|
|
12
|
+
/** Presence and placement belong to the caller's JSX, not Root switches. */
|
|
13
|
+
export type PickerCompositionProps = 'open' | 'searchDisabled' | 'skinTonesDisabled' | 'skinTonePickerLocation';
|
|
14
|
+
export type RootBehaviorProps = Omit<PickerConfig, PickerAppearanceProps | PickerCompositionProps | 'previewConfig'> & {
|
|
15
|
+
previewConfig?: Omit<NonNullable<PickerConfig['previewConfig']>, 'showPreview'>;
|
|
16
|
+
};
|
|
17
|
+
export type RootProps = Omit<React.HTMLAttributes<HTMLElement>, keyof RootBehaviorProps | 'children' | 'role' | 'dangerouslySetInnerHTML'> & RootBehaviorProps & {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
/** Built-in leaf appearance. Bare compositions default to 'none'. */
|
|
20
|
+
appearance?: 'none' | 'default';
|
|
21
|
+
/** Shared replacements for grid, variation, reaction and navigation controls. */
|
|
22
|
+
components?: PickerComponents;
|
|
23
|
+
/**
|
|
24
|
+
* Opt-in color scheme: applies the default light/dark color tokens as
|
|
25
|
+
* CSS variables on Root (no border, background or typography).
|
|
26
|
+
* Omit it to style a fully unbranded picker yourself. (Not `theme`:
|
|
27
|
+
* CSS-in-JS libraries reserve that prop on components they wrap.)
|
|
28
|
+
*/
|
|
29
|
+
colorScheme?: ThemeValue;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Children are trailing controls, e.g. <SkinTone />; nothing is inserted
|
|
33
|
+
* automatically.
|
|
34
|
+
*/
|
|
35
|
+
export type SearchProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'dangerouslySetInnerHTML'> & {
|
|
36
|
+
/** Native attributes for the managed input; Root owns its value. */
|
|
37
|
+
inputProps?: Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'onChange' | 'autoFocus' | 'placeholder' | 'aria-controls' | 'role' | 'children' | 'dangerouslySetInnerHTML'>;
|
|
38
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
39
|
+
};
|
|
40
|
+
export type SearchInputElement = 'input' | React.ComponentType<any>;
|
|
41
|
+
type ManagedInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'defaultValue' | 'role' | 'aria-controls' | 'children' | 'dangerouslySetInnerHTML'>;
|
|
42
|
+
type ReservedInputProps = 'type' | 'value' | 'defaultValue' | 'role' | 'aria-controls' | 'children' | 'dangerouslySetInnerHTML' | 'as';
|
|
43
|
+
type InputBehaviorHandlers = 'onChange' | 'onFocus' | 'onCompositionStart' | 'onCompositionEnd';
|
|
44
|
+
/** Native input props plus the selected design-system input's own props. */
|
|
45
|
+
export type SearchInputProps<T extends SearchInputElement = 'input'> = Omit<ManagedInputProps, keyof React.ComponentPropsWithoutRef<T>> & Pick<ManagedInputProps, InputBehaviorHandlers> & Omit<React.ComponentPropsWithoutRef<T>, ReservedInputProps | InputBehaviorHandlers> & {
|
|
46
|
+
/** Must forward its ref and supplied props to an actual input element. */
|
|
47
|
+
as?: T;
|
|
48
|
+
};
|
|
49
|
+
export type SearchInputComponent = <T extends SearchInputElement = 'input'>(props: SearchInputProps<T> & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null;
|
|
50
|
+
export type CategoryNavProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'> & {
|
|
51
|
+
/**
|
|
52
|
+
* Tab axis. `vertical` stacks the tabs (e.g. a side rail) and switches
|
|
53
|
+
* keyboard navigation to Up/Down between tabs and Left/Right to leave,
|
|
54
|
+
* announced through aria-orientation. Default: 'horizontal'.
|
|
55
|
+
*/
|
|
56
|
+
orientation?: 'horizontal' | 'vertical';
|
|
57
|
+
};
|
|
58
|
+
export type PreviewProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'dangerouslySetInnerHTML'>;
|
|
59
|
+
export type ListProps = Omit<React.HTMLAttributes<HTMLUListElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'> & {
|
|
60
|
+
/**
|
|
61
|
+
* Custom markup for emoji cells and category headers. Each receives the
|
|
62
|
+
* library-owned props to spread onto its element (see EmojiRenderProps /
|
|
63
|
+
* CategoryHeaderRenderProps).
|
|
64
|
+
*/
|
|
65
|
+
components?: ListComponents;
|
|
66
|
+
};
|
|
67
|
+
export type EmptyProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'> & {
|
|
68
|
+
children?: React.ReactNode | ((state: {
|
|
69
|
+
search: string;
|
|
70
|
+
}) => React.ReactNode);
|
|
71
|
+
};
|
|
72
|
+
export type SkinToneProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'> & {
|
|
73
|
+
/** Axis the tones fan out along. Default: 'horizontal'. */
|
|
74
|
+
orientation?: 'horizontal' | 'vertical';
|
|
75
|
+
};
|
|
76
|
+
export type LoadingProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'> & {
|
|
77
|
+
children?: React.ReactNode;
|
|
78
|
+
};
|
|
79
|
+
export type LoadErrorProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'role' | 'children' | 'dangerouslySetInnerHTML'> & {
|
|
80
|
+
children?: React.ReactNode | ((state: {
|
|
81
|
+
error: Error;
|
|
82
|
+
retry: () => void;
|
|
83
|
+
}) => React.ReactNode);
|
|
84
|
+
};
|
|
85
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ActiveEmojiState } from '../components/context/PickerContext';
|
|
2
|
+
/** Instance-local subscriptions: changing hover updates only affected cells. */
|
|
3
|
+
export declare function createActiveEmojiStore(): {
|
|
4
|
+
get: () => ActiveEmojiState;
|
|
5
|
+
set(next: ActiveEmojiState | ((previous: ActiveEmojiState) => ActiveEmojiState)): void;
|
|
6
|
+
subscribe(read: () => void, unified?: string): () => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Semantic focus regions. The managed panel and Viewport are structural containers, not regions. */
|
|
2
|
+
export type NavigationRegionKind = 'search' | 'categories' | 'grid' | 'preview-skin-tone' | 'reactions';
|
|
3
|
+
export interface RegisteredRegion {
|
|
4
|
+
readonly id: number;
|
|
5
|
+
readonly kind: NavigationRegionKind;
|
|
6
|
+
readonly element: Element;
|
|
7
|
+
}
|
|
8
|
+
export declare class NavigationRegistry {
|
|
9
|
+
private nextId;
|
|
10
|
+
private regions;
|
|
11
|
+
private singletons;
|
|
12
|
+
private generation;
|
|
13
|
+
private disposed;
|
|
14
|
+
/**
|
|
15
|
+
* Register a region root. Returns an unregister function for unmount.
|
|
16
|
+
* Duplicate singleton validation lives in the primitive layer;
|
|
17
|
+
* the registry keeps every registration so that layer can adjudicate.
|
|
18
|
+
*/
|
|
19
|
+
register(kind: NavigationRegionKind, element: Element): () => void;
|
|
20
|
+
/** Registrations in mount order; traversal follows DOM document order instead. */
|
|
21
|
+
getRegions(): readonly RegisteredRegion[];
|
|
22
|
+
getRegionsByKind(kind: NavigationRegionKind): readonly RegisteredRegion[];
|
|
23
|
+
/**
|
|
24
|
+
* First registration wins. Later
|
|
25
|
+
* duplicates are ignored by picker behavior.
|
|
26
|
+
*/
|
|
27
|
+
getAuthoritativeRegion(kind: NavigationRegionKind): RegisteredRegion | undefined;
|
|
28
|
+
/** Current navigation generation. Pending async focus work captures this value. */
|
|
29
|
+
currentGeneration(): number;
|
|
30
|
+
/**
|
|
31
|
+
* Invalidate pending materialize/scroll/focus work. Called on accepted
|
|
32
|
+
* search change, data/category change, geometry change, reactions
|
|
33
|
+
* transition and Root unmount. Completions holding a stale token MUST NOT
|
|
34
|
+
* move focus or scroll.
|
|
35
|
+
*/
|
|
36
|
+
invalidate(): void;
|
|
37
|
+
isCurrent(token: number): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Revive a disposed registry when its Root remounts. The registry object
|
|
40
|
+
* persists across remounts (held in a ref), but the unmount cleanup
|
|
41
|
+
* disposes it — without a revive, every generation-guarded focus stays
|
|
42
|
+
* dead after any remount (StrictMode double-mount included). Bumps the
|
|
43
|
+
* generation so pre-unmount completions cannot fire post-remount.
|
|
44
|
+
*/
|
|
45
|
+
revive(): void;
|
|
46
|
+
dispose(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Claim a singleton primitive slot.
|
|
49
|
+
* Returns true for the first claimant; later claimants are ignored by
|
|
50
|
+
* picker behavior (dev throws, production warns once via
|
|
51
|
+
* reportDuplicateRegion).
|
|
52
|
+
*/
|
|
53
|
+
claimSingleton(kind: string): boolean;
|
|
54
|
+
releaseSingleton(kind: string): void;
|
|
55
|
+
}
|
|
56
|
+
export type DuplicateRegionPolicy = 'throw' | 'warn-once';
|
|
57
|
+
export declare function duplicateRegionPolicy(): DuplicateRegionPolicy;
|
|
58
|
+
export declare function reportDuplicateRegion(kind: string): void;
|
|
59
|
+
export declare function reportPortalRegion(kind: NavigationRegionKind): void;
|
|
60
|
+
/** Test-only: reset warn-once sets between cases. */
|
|
61
|
+
export declare function __resetNavigationWarningsForTest(): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NavigationRegionKind, NavigationRegistry, RegisteredRegion } from './navigationRegistry';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a registered root is currently a valid focus destination.
|
|
4
|
+
* Hidden, inert, disabled, aria-hidden, or disconnected regions are
|
|
5
|
+
* filtered out before traversal. In compact reactions mode the managed
|
|
6
|
+
* panel carries hidden/inert state, so its regions drop out of the active
|
|
7
|
+
* list while staying registered.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isRegionFocusable(element: Element): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Active regions in DOM document order. Portal roots (outside the Root
|
|
12
|
+
* element) are unsupported and excluded. Only the authoritative (first)
|
|
13
|
+
* registration per singleton kind participates.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getActiveRegionsInDomOrder(registry: NavigationRegistry, rootElement: Element | null): RegisteredRegion[];
|
|
16
|
+
export declare function findRegion(regions: readonly RegisteredRegion[], kind: NavigationRegionKind): RegisteredRegion | undefined;
|
|
17
|
+
/** Next focusable region after `from` in DOM order, if any. */
|
|
18
|
+
export declare function getNextRegion(registry: NavigationRegistry, rootElement: Element | null, from: NavigationRegionKind): RegisteredRegion | undefined;
|
|
19
|
+
/** Previous focusable region before `from` in DOM order, if any. */
|
|
20
|
+
export declare function getPrevRegion(registry: NavigationRegistry, rootElement: Element | null, from: NavigationRegionKind): RegisteredRegion | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CustomCategoryConfig } from '../config/categoryConfig';
|
|
2
|
-
import { CustomEmoji } from '../config/customEmojiConfig';
|
|
3
|
-
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
4
|
-
import { CategoryConfig } from '../types/exposedTypes';
|
|
5
|
-
export declare function isCustomCategory(category: CategoryConfig | CustomCategoryConfig): category is CustomCategoryConfig;
|
|
6
|
-
export declare function isCustomEmoji(emoji: Partial<DataEmoji>): emoji is CustomEmoji;
|
|
1
|
+
import { CustomCategoryConfig } from '../config/categoryConfig';
|
|
2
|
+
import { CustomEmoji } from '../config/customEmojiConfig';
|
|
3
|
+
import { DataEmoji } from '../dataUtils/DataTypes';
|
|
4
|
+
import { CategoryConfig } from '../types/exposedTypes';
|
|
5
|
+
export declare function isCustomCategory(category: CategoryConfig | CustomCategoryConfig): category is CustomCategoryConfig;
|
|
6
|
+
export declare function isCustomEmoji(emoji: Partial<DataEmoji>): emoji is CustomEmoji;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type EmojiClickData = {
|
|
3
3
|
activeSkinTone: SkinTones;
|
|
4
4
|
unified: string;
|
|
5
5
|
unifiedWithoutSkinTone: string;
|
|
6
6
|
emoji: string;
|
|
7
7
|
names: string[];
|
|
8
8
|
imageUrl: string;
|
|
9
|
-
getImageUrl: (emojiStyle?:
|
|
9
|
+
getImageUrl: (emojiStyle?: EmojiStyleValue) => string;
|
|
10
10
|
isCustom: boolean;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type CategoryConfig = {
|
|
13
13
|
category: Categories;
|
|
14
14
|
name: string;
|
|
15
15
|
icon?: React.ReactNode;
|
|
@@ -20,8 +20,8 @@ export declare type CategoryConfig = {
|
|
|
20
20
|
*/
|
|
21
21
|
group?: string;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type CategoryIcons = Partial<Record<Categories, React.ReactNode>>;
|
|
24
|
+
export type EmojiData = {
|
|
25
25
|
categories: Partial<Record<Categories, CategoryConfig>>;
|
|
26
26
|
emojis: Record<string, DataEmoji[]>;
|
|
27
27
|
};
|
|
@@ -35,6 +35,7 @@ export declare enum SuggestionMode {
|
|
|
35
35
|
RECENT = "recent",
|
|
36
36
|
FREQUENT = "frequent"
|
|
37
37
|
}
|
|
38
|
+
export type SuggestionModeValue = SuggestionMode | 'recent' | 'frequent';
|
|
38
39
|
export declare enum EmojiStyle {
|
|
39
40
|
NATIVE = "native",
|
|
40
41
|
APPLE = "apple",
|
|
@@ -42,11 +43,13 @@ export declare enum EmojiStyle {
|
|
|
42
43
|
GOOGLE = "google",
|
|
43
44
|
FACEBOOK = "facebook"
|
|
44
45
|
}
|
|
46
|
+
export type EmojiStyleValue = EmojiStyle | 'native' | 'apple' | 'twitter' | 'google' | 'facebook';
|
|
45
47
|
export declare enum Theme {
|
|
46
48
|
DARK = "dark",
|
|
47
49
|
LIGHT = "light",
|
|
48
50
|
AUTO = "auto"
|
|
49
51
|
}
|
|
52
|
+
export type ThemeValue = Theme | 'dark' | 'light' | 'auto';
|
|
50
53
|
export declare enum SkinTones {
|
|
51
54
|
NEUTRAL = "neutral",
|
|
52
55
|
LIGHT = "1f3fb",
|
|
@@ -55,6 +58,8 @@ export declare enum SkinTones {
|
|
|
55
58
|
MEDIUM_DARK = "1f3fe",
|
|
56
59
|
DARK = "1f3ff"
|
|
57
60
|
}
|
|
61
|
+
/** A skin tone as the enum or its literal value (`'neutral'`, `'1f3fb'`, …). */
|
|
62
|
+
export type SkinTonesValue = SkinTones | 'neutral' | '1f3fb' | '1f3fc' | '1f3fd' | '1f3fe' | '1f3ff';
|
|
58
63
|
export declare enum Categories {
|
|
59
64
|
SUGGESTED = "suggested",
|
|
60
65
|
CUSTOM = "custom",
|
|
@@ -69,5 +74,10 @@ export declare enum Categories {
|
|
|
69
74
|
}
|
|
70
75
|
export declare enum SkinTonePickerLocation {
|
|
71
76
|
SEARCH = "SEARCH",
|
|
72
|
-
PREVIEW = "PREVIEW"
|
|
77
|
+
PREVIEW = "PREVIEW",
|
|
78
|
+
/**
|
|
79
|
+
* No built-in placement: render the `SkinTone` primitive wherever you
|
|
80
|
+
* want it, or drive the tone through `skinTone` / `useSkinTone()`.
|
|
81
|
+
*/
|
|
82
|
+
NONE = "NONE"
|
|
73
83
|
}
|
|
@@ -43,4 +43,9 @@ export var SkinTonePickerLocation;
|
|
|
43
43
|
(function (SkinTonePickerLocation) {
|
|
44
44
|
SkinTonePickerLocation["SEARCH"] = "SEARCH";
|
|
45
45
|
SkinTonePickerLocation["PREVIEW"] = "PREVIEW";
|
|
46
|
+
/**
|
|
47
|
+
* No built-in placement: render the `SkinTone` primitive wherever you
|
|
48
|
+
* want it, or drive the tone through `skinTone` / `useSkinTone()`.
|
|
49
|
+
*/
|
|
50
|
+
SkinTonePickerLocation["NONE"] = "NONE";
|
|
46
51
|
})(SkinTonePickerLocation || (SkinTonePickerLocation = {}));
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
export declare const OVERSCAN_ROWS = 2;
|
|
2
|
+
export declare function isJustBelowViewport(top: number, bottom: number, size: number): boolean;
|
|
3
|
+
export declare function shouldVirtualize({ scrollTop, clientHeight, topOffset, style, dimensions, }: {
|
|
4
|
+
scrollTop: number;
|
|
5
|
+
clientHeight: number;
|
|
6
|
+
topOffset: number;
|
|
7
|
+
style: {
|
|
8
|
+
top: number;
|
|
9
|
+
} | undefined;
|
|
10
|
+
dimensions: Dimensions;
|
|
11
|
+
}): boolean;
|
|
12
|
+
export declare function getEmojiPositionStyle(dimensions: Dimensions, index: number): {
|
|
13
|
+
top: number;
|
|
14
|
+
insetInlineStart: number;
|
|
15
|
+
} | undefined;
|
|
16
|
+
export type Dimensions = {
|
|
17
|
+
emojiSize: number;
|
|
18
|
+
emojisPerRow: number;
|
|
19
|
+
categoryHeight: number;
|
|
20
|
+
/** Usable row width the columns are distributed across. */
|
|
21
|
+
rowWidth?: number;
|
|
22
|
+
} | undefined;
|