@atlaskit/emoji 71.17.1 → 72.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/CHANGELOG.md +46 -0
- package/dist/cjs/api/EmojiLoader.js +4 -3
- package/dist/cjs/api/EmojiRepository.js +25 -24
- package/dist/cjs/api/EmojiResource.js +31 -30
- package/dist/cjs/api/EmojiUtils.js +72 -167
- package/dist/cjs/api/calculateScale.js +34 -0
- package/dist/cjs/api/denormaliseEmojiServiceResponse.js +43 -0
- package/dist/cjs/api/denormaliseServiceAltRepresentation.js +11 -0
- package/dist/cjs/api/denormaliseServiceRepresentation.js +50 -0
- package/dist/cjs/api/denormaliseSkinEmoji.js +31 -0
- package/dist/cjs/api/denormaliseStandardRepresentation.js +17 -0
- package/dist/cjs/api/emojiRequest.js +32 -0
- package/dist/cjs/api/getAltRepresentation.js +12 -0
- package/dist/cjs/api/getEmojiVariation.js +19 -0
- package/dist/cjs/api/getPixelRatio.js +12 -0
- package/dist/cjs/api/internal/AlphabeticalShortnameComparator.js +25 -0
- package/dist/cjs/api/internal/AsciiMatchComparator.js +32 -0
- package/dist/cjs/api/internal/ChainedEmojiComparator.js +37 -0
- package/dist/cjs/api/internal/Comparators.js +1 -275
- package/dist/cjs/api/internal/EmojiTypeComparator.js +40 -0
- package/dist/cjs/api/internal/ExactShortNameMatchComparator.js +34 -0
- package/dist/cjs/api/internal/Gateway.js +52 -0
- package/dist/cjs/api/internal/OrderComparator.js +28 -0
- package/dist/cjs/api/internal/QueryStringPositionMatchComparator.js +43 -0
- package/dist/cjs/api/internal/UsageFrequencyComparator.js +59 -0
- package/dist/cjs/api/internal/UsageFrequencyTracker.js +7 -49
- package/dist/cjs/api/internal/createSearchEmojiComparator.js +46 -0
- package/dist/cjs/api/internal/createUsageOnlyEmojiComparator.js +15 -0
- package/dist/cjs/api/isMediaApiUrl.js +9 -0
- package/dist/cjs/api/media/BrowserCacheStrategy.js +87 -0
- package/dist/cjs/api/media/MediaEmojiCache.js +24 -148
- package/dist/cjs/api/media/MemoryCacheStrategy.js +67 -0
- package/dist/cjs/api/media/SiteEmojiResource.js +21 -15
- package/dist/cjs/api/media/getRequiredRepresentation.js +9 -0
- package/dist/cjs/api/shouldUseAltRepresentation.js +13 -0
- package/dist/cjs/api/supportsUploadFeature.js +17 -0
- package/dist/cjs/components/common/AddOwnEmoji.compiled.css +6 -0
- package/dist/cjs/components/common/AddOwnEmoji.js +62 -0
- package/dist/cjs/components/common/CachingEmoji.js +15 -93
- package/dist/cjs/components/common/CachingMediaEmoji.js +95 -0
- package/dist/cjs/components/common/CreateEmojiWithRovo.js +6 -4
- package/dist/cjs/components/common/DeletableEmojiTooltipContent.js +2 -14
- package/dist/cjs/components/common/DeletableEmojiTooltipContentForScreenReader.js +22 -0
- package/dist/cjs/components/common/Emoji.js +32 -373
- package/dist/cjs/components/common/EmojiActions.compiled.css +0 -6
- package/dist/cjs/components/common/EmojiActions.js +15 -69
- package/dist/cjs/components/common/EmojiPlaceholder.js +14 -6
- package/dist/cjs/components/common/ImageEmoji.js +198 -0
- package/dist/cjs/components/common/RecordSelectionDefault.js +10 -8
- package/dist/cjs/components/common/ResourcedEmoji.js +7 -6
- package/dist/cjs/components/common/ResourcedEmojiComponent.js +21 -19
- package/dist/cjs/components/common/SpriteEmoji.js +66 -0
- package/dist/cjs/components/common/ToneSelector.js +8 -134
- package/dist/cjs/components/common/ToneSelectorInternal.js +142 -0
- package/dist/cjs/components/common/ToolTipContentWithKeymap.js +2 -2
- package/dist/cjs/components/common/UnicodeEmoji.js +137 -0
- package/dist/cjs/components/common/UploadEmoji.js +9 -8
- package/dist/cjs/components/common/emojiPlaceholderTestId.js +14 -0
- package/dist/cjs/components/common/handleDelete.js +19 -0
- package/dist/cjs/components/common/isRefreshEmojiPickerEnabled.js +22 -0
- package/dist/cjs/components/picker/AbstractItem.js +14 -0
- package/dist/cjs/components/picker/CategoryHeadingItem.js +36 -0
- package/dist/cjs/components/picker/CategorySelector.js +10 -16
- package/dist/cjs/components/picker/EmojiPicker.js +48 -110
- package/dist/cjs/components/picker/EmojiPickerCategoryHeading.js +3 -3
- package/dist/cjs/components/picker/EmojiPickerComponent.js +58 -42
- package/dist/cjs/components/picker/EmojiPickerInternal.js +99 -0
- package/dist/cjs/components/picker/EmojiPickerList.js +35 -30
- package/dist/cjs/components/picker/EmojiPickerVirtualItems.js +1 -95
- package/dist/cjs/components/picker/EmojisRowItem.js +39 -0
- package/dist/cjs/components/picker/LoadingItem.js +42 -0
- package/dist/cjs/components/picker/NoResultsItem.js +36 -0
- package/dist/cjs/components/picker/categorySelectorCategoryTestId.js +14 -0
- package/dist/cjs/components/picker/{utils.js → emojiPickerHeightOffset.js} +1 -7
- package/dist/cjs/components/picker/emojiPickerLoader.js +17 -0
- package/dist/cjs/components/picker/emojiPickerModuleLoader.js +19 -0
- package/dist/cjs/components/picker/preloadEmojiPicker.js +18 -0
- package/dist/cjs/components/picker/scrollToRow.js +11 -0
- package/dist/cjs/components/picker/sortCategories.js +15 -0
- package/dist/cjs/components/picker/sortCategoriesNew.js +15 -0
- package/dist/cjs/components/picker/virtualItemRenderer.js +19 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadComponent.js +11 -8
- package/dist/cjs/components/typeahead/EmojiTypeAheadItem.js +17 -53
- package/dist/cjs/components/typeahead/EmojiTypeAheadItemInternal.js +58 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadList.js +7 -6
- package/dist/cjs/components/uploader/EmojiUploadComponent.js +11 -8
- package/dist/cjs/components/uploader/EmojiUploader.js +16 -63
- package/dist/cjs/components/uploader/EmojiUploaderInternal.js +66 -0
- package/dist/cjs/index.js +21 -18
- package/dist/cjs/util/actual-mouse-move.js +14 -0
- package/dist/cjs/util/analytics/Attributes.js +1 -0
- package/dist/cjs/util/analytics/CommonAttributes.js +1 -0
- package/dist/cjs/util/analytics/Duration.js +1 -0
- package/dist/cjs/util/analytics/aiGenerationCompletedEvent.js +12 -0
- package/dist/cjs/util/analytics/aiGenerationFailedEvent.js +12 -0
- package/dist/cjs/util/analytics/aiGenerationStartedEvent.js +15 -0
- package/dist/cjs/util/analytics/analytics.js +422 -228
- package/dist/cjs/util/analytics/categoryClickedEvent.js +12 -0
- package/dist/cjs/util/analytics/clearSampled.js +24 -0
- package/dist/cjs/util/analytics/closedPickerEvent.js +12 -0
- package/dist/cjs/util/analytics/createEvent.js +25 -0
- package/dist/cjs/util/analytics/deleteBeginEvent.js +12 -0
- package/dist/cjs/util/analytics/deleteCancelEvent.js +12 -0
- package/dist/cjs/util/analytics/deleteConfirmEvent.js +12 -0
- package/dist/cjs/util/analytics/emojiPickerEvent.js +12 -0
- package/dist/cjs/util/analytics/emojiUploaderEvent.js +10 -0
- package/dist/cjs/util/analytics/extractCommonAttributes.js +15 -0
- package/dist/cjs/util/analytics/extractErrorInfo.js +20 -0
- package/dist/cjs/util/analytics/getSkinTone.js +35 -0
- package/dist/cjs/util/analytics/hasUfoMarked.js +11 -0
- package/dist/cjs/util/analytics/isExperienceSampled.js +23 -0
- package/dist/cjs/util/analytics/openedPickerEvent.js +12 -0
- package/dist/cjs/util/analytics/pickerClickedEvent.js +15 -0
- package/dist/cjs/util/analytics/pickerSearchedEvent.js +12 -0
- package/dist/cjs/util/analytics/recordFailed.js +12 -0
- package/dist/cjs/util/analytics/recordFailedEmoji.js +19 -0
- package/dist/cjs/util/analytics/recordSelectionFailedSli.js +20 -0
- package/dist/cjs/util/analytics/recordSelectionSucceededSli.js +19 -0
- package/dist/cjs/util/analytics/recordSucceeded.js +12 -0
- package/dist/cjs/util/analytics/recordSucceededEmoji.js +19 -0
- package/dist/cjs/util/analytics/sampledUfoEmojiResourceFetched.js +11 -0
- package/dist/cjs/util/analytics/sampledUfoRenderedEmoji.js +11 -0
- package/dist/cjs/util/analytics/samplingUfo.js +30 -204
- package/dist/cjs/util/analytics/selectedFileEvent.js +12 -0
- package/dist/cjs/util/analytics/skinTones.js +22 -0
- package/dist/cjs/util/analytics/skintoneSelectorEvent.js +11 -0
- package/dist/cjs/util/analytics/toneSelectedEvent.js +12 -0
- package/dist/cjs/util/analytics/toneSelectorClosedEvent.js +12 -0
- package/dist/cjs/util/analytics/toneSelectorOpenedEvent.js +12 -0
- package/dist/cjs/util/analytics/typeaheadCancelledEvent.js +17 -0
- package/dist/cjs/util/analytics/typeaheadRenderedEvent.js +17 -0
- package/dist/cjs/util/analytics/typeaheadSelectedEvent.js +31 -0
- package/dist/cjs/util/analytics/ufoExperiences.js +37 -14
- package/dist/cjs/util/analytics/uploadBeginButton.js +12 -0
- package/dist/cjs/util/analytics/uploadCancelButton.js +12 -0
- package/dist/cjs/util/analytics/uploadConfirmButton.js +12 -0
- package/dist/cjs/util/analytics/uploadFailedEvent.js +12 -0
- package/dist/cjs/util/analytics/uploadSucceededEvent.js +12 -0
- package/dist/cjs/util/analytics/useSampledUFOComponentExperience.js +3 -3
- package/dist/cjs/util/analytics/withSampling.js +182 -0
- package/dist/cjs/util/build-emoji-description-with-alt-representation.js +19 -0
- package/dist/cjs/util/contains-emoji-id.js +18 -0
- package/dist/cjs/util/convert-image-to-media-representation.js +13 -0
- package/dist/cjs/util/convert-media-to-image-emoji.js +28 -0
- package/dist/cjs/util/convert-media-to-image-representation.js +13 -0
- package/dist/cjs/util/filter-hidden-emojis.js +12 -0
- package/dist/cjs/util/filters.js +2 -5
- package/dist/cjs/util/format-shortcut.js +30 -0
- package/dist/cjs/util/get-category-id.js +9 -0
- package/dist/cjs/util/get-tone-emoji.js +10 -0
- package/dist/cjs/util/has-data-url-image.js +11 -0
- package/dist/cjs/util/is-emoji-description-with-variations.js +9 -0
- package/dist/cjs/util/is-emoji-description.js +9 -0
- package/dist/cjs/util/is-emoji-id-equal.js +9 -0
- package/dist/cjs/util/is-emoji-variation-description.js +9 -0
- package/dist/cjs/util/{hidden-emojis.js → is-hidden-emoji.js} +1 -6
- package/dist/cjs/util/is-image-representation.js +9 -0
- package/dist/cjs/util/is-loaded-media-emoji.js +11 -0
- package/dist/cjs/util/is-media-emoji.js +10 -0
- package/dist/cjs/util/is-media-representation.js +9 -0
- package/dist/cjs/util/is-messages-key.js +10 -0
- package/dist/cjs/util/is-promise.js +9 -0
- package/dist/cjs/util/is-sprite-representation.js +9 -0
- package/dist/cjs/util/is-sprite-service-representation.js +9 -0
- package/dist/cjs/util/is-unicode-representation.js +9 -0
- package/dist/cjs/util/keymaps.js +3 -37
- package/dist/cjs/util/left-click.js +9 -0
- package/dist/cjs/util/make-key-map-with-common.js +16 -0
- package/dist/cjs/util/make-keymap.js +18 -0
- package/dist/cjs/util/mouse-location.js +12 -0
- package/dist/cjs/util/mouse.js +1 -26
- package/dist/cjs/util/to-emoji-id.js +13 -0
- package/dist/cjs/util/to-optional-emoji-id.js +13 -0
- package/dist/cjs/util/type-helpers.js +154 -115
- package/dist/cjs/utils.js +6 -5
- package/dist/es2019/admin.js +4 -0
- package/dist/es2019/api/EmojiLoader.js +2 -1
- package/dist/es2019/api/EmojiRepository.js +14 -18
- package/dist/es2019/api/EmojiResource.js +15 -17
- package/dist/es2019/api/EmojiUtils.js +43 -166
- package/dist/es2019/api/calculateScale.js +28 -0
- package/dist/es2019/api/denormaliseEmojiServiceResponse.js +35 -0
- package/dist/es2019/api/denormaliseServiceAltRepresentation.js +5 -0
- package/dist/es2019/api/denormaliseServiceRepresentation.js +46 -0
- package/dist/es2019/api/denormaliseSkinEmoji.js +22 -0
- package/dist/es2019/api/denormaliseStandardRepresentation.js +11 -0
- package/dist/es2019/api/emojiRequest.js +23 -0
- package/dist/es2019/api/getAltRepresentation.js +6 -0
- package/dist/es2019/api/getEmojiVariation.js +13 -0
- package/dist/es2019/api/getPixelRatio.js +6 -0
- package/dist/es2019/api/internal/AlphabeticalShortnameComparator.js +9 -0
- package/dist/es2019/api/internal/AsciiMatchComparator.js +19 -0
- package/dist/es2019/api/internal/ChainedEmojiComparator.js +21 -0
- package/dist/es2019/api/internal/Comparators.js +1 -222
- package/dist/es2019/api/internal/EmojiTypeComparator.js +25 -0
- package/dist/es2019/api/internal/ExactShortNameMatchComparator.js +22 -0
- package/dist/es2019/api/internal/Gateway.js +36 -0
- package/dist/es2019/api/internal/OrderComparator.js +12 -0
- package/dist/es2019/api/internal/QueryStringPositionMatchComparator.js +28 -0
- package/dist/es2019/api/internal/UsageFrequencyComparator.js +41 -0
- package/dist/es2019/api/internal/UsageFrequencyTracker.js +4 -39
- package/dist/es2019/api/internal/createSearchEmojiComparator.js +39 -0
- package/dist/es2019/api/internal/createUsageOnlyEmojiComparator.js +9 -0
- package/dist/es2019/api/isMediaApiUrl.js +1 -0
- package/dist/es2019/api/media/BrowserCacheStrategy.js +66 -0
- package/dist/es2019/api/media/MediaEmojiCache.js +8 -114
- package/dist/es2019/api/media/MemoryCacheStrategy.js +54 -0
- package/dist/es2019/api/media/SiteEmojiResource.js +10 -4
- package/dist/es2019/api/media/getRequiredRepresentation.js +1 -0
- package/dist/es2019/api/shouldUseAltRepresentation.js +3 -0
- package/dist/es2019/api/supportsUploadFeature.js +11 -0
- package/dist/es2019/components/common/AddOwnEmoji.compiled.css +6 -0
- package/dist/es2019/components/common/AddOwnEmoji.js +53 -0
- package/dist/es2019/components/common/CachingEmoji.js +7 -84
- package/dist/es2019/components/common/CachingMediaEmoji.js +84 -0
- package/dist/es2019/components/common/CreateEmojiWithRovo.js +3 -1
- package/dist/es2019/components/common/DeletableEmojiTooltipContent.js +2 -15
- package/dist/es2019/components/common/DeletableEmojiTooltipContentForScreenReader.js +16 -0
- package/dist/es2019/components/common/Emoji.js +16 -352
- package/dist/es2019/components/common/EmojiActions.compiled.css +0 -6
- package/dist/es2019/components/common/EmojiActions.js +9 -63
- package/dist/es2019/components/common/EmojiPlaceholder.js +8 -2
- package/dist/es2019/components/common/ImageEmoji.js +181 -0
- package/dist/es2019/components/common/RecordSelectionDefault.js +4 -2
- package/dist/es2019/components/common/ResourcedEmoji.js +3 -2
- package/dist/es2019/components/common/ResourcedEmojiComponent.js +10 -8
- package/dist/es2019/components/common/SpriteEmoji.js +58 -0
- package/dist/es2019/components/common/ToneSelector.js +8 -127
- package/dist/es2019/components/common/ToneSelectorInternal.js +129 -0
- package/dist/es2019/components/common/ToolTipContentWithKeymap.js +1 -1
- package/dist/es2019/components/common/UnicodeEmoji.js +125 -0
- package/dist/es2019/components/common/UploadEmoji.js +5 -4
- package/dist/es2019/components/common/emojiPlaceholderTestId.js +6 -0
- package/dist/es2019/components/common/handleDelete.js +15 -0
- package/dist/es2019/components/common/isRefreshEmojiPickerEnabled.js +15 -0
- package/dist/es2019/components/picker/AbstractItem.js +6 -0
- package/dist/es2019/components/picker/CategoryHeadingItem.js +13 -0
- package/dist/es2019/components/picker/CategorySelector.js +6 -6
- package/dist/es2019/components/picker/EmojiPicker.js +25 -78
- package/dist/es2019/components/picker/EmojiPickerCategoryHeading.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerComponent.js +33 -17
- package/dist/es2019/components/picker/EmojiPickerInternal.js +71 -0
- package/dist/es2019/components/picker/EmojiPickerList.js +13 -8
- package/dist/es2019/components/picker/EmojiPickerVirtualItems.js +1 -58
- package/dist/es2019/components/picker/EmojisRowItem.js +16 -0
- package/dist/es2019/components/picker/LoadingItem.js +19 -0
- package/dist/es2019/components/picker/NoResultsItem.js +13 -0
- package/dist/es2019/components/picker/categorySelectorCategoryTestId.js +6 -0
- package/dist/es2019/components/picker/emojiPickerHeightOffset.js +9 -0
- package/dist/es2019/components/picker/emojiPickerLoader.js +7 -0
- package/dist/es2019/components/picker/emojiPickerModuleLoader.js +6 -0
- package/dist/es2019/components/picker/preloadEmojiPicker.js +12 -0
- package/dist/es2019/components/picker/{utils.js → scrollToRow.js} +0 -10
- package/dist/es2019/components/picker/sortCategories.js +7 -0
- package/dist/es2019/components/picker/sortCategoriesNew.js +7 -0
- package/dist/es2019/components/picker/virtualItemRenderer.js +13 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadComponent.js +5 -2
- package/dist/es2019/components/typeahead/EmojiTypeAheadItem.js +11 -49
- package/dist/es2019/components/typeahead/EmojiTypeAheadItemInternal.js +50 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadList.js +4 -3
- package/dist/es2019/components/uploader/EmojiUploadComponent.js +6 -3
- package/dist/es2019/components/uploader/EmojiUploader.js +10 -33
- package/dist/es2019/components/uploader/EmojiUploaderInternal.js +31 -0
- package/dist/es2019/element.js +10 -0
- package/dist/es2019/index.js +12 -8
- package/dist/es2019/picker.js +4 -0
- package/dist/es2019/resource.js +18 -0
- package/dist/es2019/typeahead.js +7 -0
- package/dist/es2019/util/actual-mouse-move.js +8 -0
- package/dist/es2019/util/analytics/Attributes.js +0 -0
- package/dist/es2019/util/analytics/CommonAttributes.js +0 -0
- package/dist/es2019/util/analytics/Duration.js +0 -0
- package/dist/es2019/util/analytics/aiGenerationCompletedEvent.js +4 -0
- package/dist/es2019/util/analytics/aiGenerationFailedEvent.js +4 -0
- package/dist/es2019/util/analytics/aiGenerationStartedEvent.js +5 -0
- package/dist/es2019/util/analytics/analytics.js +157 -155
- package/dist/es2019/util/analytics/categoryClickedEvent.js +4 -0
- package/dist/es2019/util/analytics/clearSampled.js +6 -0
- package/dist/es2019/util/analytics/closedPickerEvent.js +4 -0
- package/dist/es2019/util/analytics/createEvent.js +13 -0
- package/dist/es2019/util/analytics/deleteBeginEvent.js +4 -0
- package/dist/es2019/util/analytics/deleteCancelEvent.js +4 -0
- package/dist/es2019/util/analytics/deleteConfirmEvent.js +4 -0
- package/dist/es2019/util/analytics/emojiPickerEvent.js +2 -0
- package/dist/es2019/util/analytics/emojiUploaderEvent.js +2 -0
- package/dist/es2019/util/analytics/extractCommonAttributes.js +7 -0
- package/dist/es2019/util/analytics/extractErrorInfo.js +14 -0
- package/dist/es2019/util/analytics/getSkinTone.js +18 -0
- package/dist/es2019/util/analytics/hasUfoMarked.js +3 -0
- package/dist/es2019/util/analytics/isExperienceSampled.js +17 -0
- package/dist/es2019/util/analytics/openedPickerEvent.js +4 -0
- package/dist/es2019/util/analytics/pickerClickedEvent.js +8 -0
- package/dist/es2019/util/analytics/pickerSearchedEvent.js +4 -0
- package/dist/es2019/util/analytics/recordFailed.js +6 -0
- package/dist/es2019/util/analytics/recordFailedEmoji.js +11 -0
- package/dist/es2019/util/analytics/recordSelectionFailedSli.js +12 -0
- package/dist/es2019/util/analytics/recordSelectionSucceededSli.js +11 -0
- package/dist/es2019/util/analytics/recordSucceeded.js +6 -0
- package/dist/es2019/util/analytics/recordSucceededEmoji.js +11 -0
- package/dist/es2019/util/analytics/sampledUfoEmojiResourceFetched.js +5 -0
- package/dist/es2019/util/analytics/sampledUfoRenderedEmoji.js +5 -0
- package/dist/es2019/util/analytics/samplingUfo.js +10 -121
- package/dist/es2019/util/analytics/selectedFileEvent.js +4 -0
- package/dist/es2019/util/analytics/skinTones.js +16 -0
- package/dist/es2019/util/analytics/skintoneSelectorEvent.js +2 -0
- package/dist/es2019/util/analytics/toneSelectedEvent.js +4 -0
- package/dist/es2019/util/analytics/toneSelectorClosedEvent.js +4 -0
- package/dist/es2019/util/analytics/toneSelectorOpenedEvent.js +4 -0
- package/dist/es2019/util/analytics/typeaheadCancelledEvent.js +8 -0
- package/dist/es2019/util/analytics/typeaheadRenderedEvent.js +8 -0
- package/dist/es2019/util/analytics/typeaheadSelectedEvent.js +20 -0
- package/dist/es2019/util/analytics/ufoExperiences.js +15 -11
- package/dist/es2019/util/analytics/uploadBeginButton.js +4 -0
- package/dist/es2019/util/analytics/uploadCancelButton.js +4 -0
- package/dist/es2019/util/analytics/uploadConfirmButton.js +4 -0
- package/dist/es2019/util/analytics/uploadFailedEvent.js +4 -0
- package/dist/es2019/util/analytics/uploadSucceededEvent.js +4 -0
- package/dist/es2019/util/analytics/useSampledUFOComponentExperience.js +1 -1
- package/dist/es2019/util/analytics/withSampling.js +104 -0
- package/dist/es2019/util/build-emoji-description-with-alt-representation.js +10 -0
- package/dist/es2019/util/contains-emoji-id.js +12 -0
- package/dist/es2019/util/convert-image-to-media-representation.js +5 -0
- package/dist/es2019/util/convert-media-to-image-emoji.js +19 -0
- package/dist/es2019/util/convert-media-to-image-representation.js +5 -0
- package/dist/es2019/util/filter-hidden-emojis.js +2 -0
- package/dist/es2019/util/filters.js +1 -2
- package/dist/es2019/util/format-shortcut.js +23 -0
- package/dist/es2019/util/get-category-id.js +1 -0
- package/dist/es2019/util/get-tone-emoji.js +2 -0
- package/dist/es2019/util/has-data-url-image.js +3 -0
- package/dist/es2019/util/is-emoji-description-with-variations.js +1 -0
- package/dist/es2019/util/is-emoji-description.js +1 -0
- package/dist/es2019/util/is-emoji-id-equal.js +1 -0
- package/dist/es2019/util/is-emoji-variation-description.js +3 -0
- package/dist/es2019/util/{hidden-emojis.js → is-hidden-emoji.js} +1 -2
- package/dist/es2019/util/is-image-representation.js +1 -0
- package/dist/es2019/util/is-loaded-media-emoji.js +3 -0
- package/dist/es2019/util/is-media-emoji.js +2 -0
- package/dist/es2019/util/is-media-representation.js +1 -0
- package/dist/es2019/util/is-messages-key.js +2 -0
- package/dist/es2019/util/is-promise.js +1 -0
- package/dist/es2019/util/is-sprite-representation.js +1 -0
- package/dist/es2019/util/is-sprite-service-representation.js +1 -0
- package/dist/es2019/util/is-unicode-representation.js +1 -0
- package/dist/es2019/util/keymaps.js +2 -32
- package/dist/es2019/util/left-click.js +3 -0
- package/dist/es2019/util/make-key-map-with-common.js +10 -0
- package/dist/es2019/util/make-keymap.js +12 -0
- package/dist/es2019/util/mouse-location.js +6 -0
- package/dist/es2019/util/mouse.js +0 -18
- package/dist/es2019/util/to-emoji-id.js +5 -0
- package/dist/es2019/util/to-optional-emoji-id.js +7 -0
- package/dist/es2019/util/type-helpers.js +89 -78
- package/dist/es2019/utils.js +16 -2
- package/dist/esm/admin.js +4 -0
- package/dist/esm/api/EmojiLoader.js +2 -1
- package/dist/esm/api/EmojiRepository.js +14 -18
- package/dist/esm/api/EmojiResource.js +14 -17
- package/dist/esm/api/EmojiUtils.js +43 -167
- package/dist/esm/api/calculateScale.js +28 -0
- package/dist/esm/api/denormaliseEmojiServiceResponse.js +37 -0
- package/dist/esm/api/denormaliseServiceAltRepresentation.js +5 -0
- package/dist/esm/api/denormaliseServiceRepresentation.js +43 -0
- package/dist/esm/api/denormaliseSkinEmoji.js +24 -0
- package/dist/esm/api/denormaliseStandardRepresentation.js +11 -0
- package/dist/esm/api/emojiRequest.js +25 -0
- package/dist/esm/api/getAltRepresentation.js +6 -0
- package/dist/esm/api/getEmojiVariation.js +13 -0
- package/dist/esm/api/getPixelRatio.js +6 -0
- package/dist/esm/api/internal/AlphabeticalShortnameComparator.js +18 -0
- package/dist/esm/api/internal/AsciiMatchComparator.js +25 -0
- package/dist/esm/api/internal/ChainedEmojiComparator.js +30 -0
- package/dist/esm/api/internal/Comparators.js +1 -275
- package/dist/esm/api/internal/EmojiTypeComparator.js +33 -0
- package/dist/esm/api/internal/ExactShortNameMatchComparator.js +28 -0
- package/dist/esm/api/internal/Gateway.js +45 -0
- package/dist/esm/api/internal/OrderComparator.js +21 -0
- package/dist/esm/api/internal/QueryStringPositionMatchComparator.js +36 -0
- package/dist/esm/api/internal/UsageFrequencyComparator.js +52 -0
- package/dist/esm/api/internal/UsageFrequencyTracker.js +4 -46
- package/dist/esm/api/internal/createSearchEmojiComparator.js +40 -0
- package/dist/esm/api/internal/createUsageOnlyEmojiComparator.js +9 -0
- package/dist/esm/api/isMediaApiUrl.js +3 -0
- package/dist/esm/api/media/BrowserCacheStrategy.js +80 -0
- package/dist/esm/api/media/MediaEmojiCache.js +18 -143
- package/dist/esm/api/media/MemoryCacheStrategy.js +61 -0
- package/dist/esm/api/media/SiteEmojiResource.js +10 -4
- package/dist/esm/api/media/getRequiredRepresentation.js +3 -0
- package/dist/esm/api/shouldUseAltRepresentation.js +7 -0
- package/dist/esm/api/supportsUploadFeature.js +11 -0
- package/dist/esm/components/common/AddOwnEmoji.compiled.css +6 -0
- package/dist/esm/components/common/AddOwnEmoji.js +53 -0
- package/dist/esm/components/common/CachingEmoji.js +8 -87
- package/dist/esm/components/common/CachingMediaEmoji.js +88 -0
- package/dist/esm/components/common/CreateEmojiWithRovo.js +3 -1
- package/dist/esm/components/common/DeletableEmojiTooltipContent.js +2 -14
- package/dist/esm/components/common/DeletableEmojiTooltipContentForScreenReader.js +15 -0
- package/dist/esm/components/common/Emoji.js +17 -358
- package/dist/esm/components/common/EmojiActions.compiled.css +0 -6
- package/dist/esm/components/common/EmojiActions.js +9 -63
- package/dist/esm/components/common/EmojiPlaceholder.js +8 -4
- package/dist/esm/components/common/ImageEmoji.js +189 -0
- package/dist/esm/components/common/RecordSelectionDefault.js +4 -2
- package/dist/esm/components/common/ResourcedEmoji.js +3 -2
- package/dist/esm/components/common/ResourcedEmojiComponent.js +10 -8
- package/dist/esm/components/common/SpriteEmoji.js +58 -0
- package/dist/esm/components/common/ToneSelector.js +8 -131
- package/dist/esm/components/common/ToneSelectorInternal.js +133 -0
- package/dist/esm/components/common/ToolTipContentWithKeymap.js +1 -1
- package/dist/esm/components/common/UnicodeEmoji.js +128 -0
- package/dist/esm/components/common/UploadEmoji.js +5 -4
- package/dist/esm/components/common/emojiPlaceholderTestId.js +8 -0
- package/dist/esm/components/common/handleDelete.js +13 -0
- package/dist/esm/components/common/isRefreshEmojiPickerEnabled.js +15 -0
- package/dist/esm/components/picker/AbstractItem.js +7 -0
- package/dist/esm/components/picker/CategoryHeadingItem.js +27 -0
- package/dist/esm/components/picker/CategorySelector.js +6 -12
- package/dist/esm/components/picker/EmojiPicker.js +25 -105
- package/dist/esm/components/picker/EmojiPickerCategoryHeading.js +2 -2
- package/dist/esm/components/picker/EmojiPickerComponent.js +33 -17
- package/dist/esm/components/picker/EmojiPickerInternal.js +92 -0
- package/dist/esm/components/picker/EmojiPickerList.js +13 -8
- package/dist/esm/components/picker/EmojiPickerVirtualItems.js +1 -90
- package/dist/esm/components/picker/EmojisRowItem.js +30 -0
- package/dist/esm/components/picker/LoadingItem.js +33 -0
- package/dist/esm/components/picker/NoResultsItem.js +27 -0
- package/dist/esm/components/picker/categorySelectorCategoryTestId.js +8 -0
- package/dist/esm/components/picker/emojiPickerHeightOffset.js +9 -0
- package/dist/esm/components/picker/emojiPickerLoader.js +11 -0
- package/dist/esm/components/picker/emojiPickerModuleLoader.js +8 -0
- package/dist/esm/components/picker/preloadEmojiPicker.js +12 -0
- package/dist/esm/components/picker/{utils.js → scrollToRow.js} +0 -10
- package/dist/esm/components/picker/sortCategories.js +9 -0
- package/dist/esm/components/picker/sortCategoriesNew.js +9 -0
- package/dist/esm/components/picker/virtualItemRenderer.js +11 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadComponent.js +5 -2
- package/dist/esm/components/typeahead/EmojiTypeAheadItem.js +11 -50
- package/dist/esm/components/typeahead/EmojiTypeAheadItemInternal.js +51 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadList.js +4 -3
- package/dist/esm/components/uploader/EmojiUploadComponent.js +6 -3
- package/dist/esm/components/uploader/EmojiUploader.js +10 -57
- package/dist/esm/components/uploader/EmojiUploaderInternal.js +55 -0
- package/dist/esm/element.js +10 -0
- package/dist/esm/index.js +12 -8
- package/dist/esm/picker.js +4 -0
- package/dist/esm/resource.js +18 -0
- package/dist/esm/typeahead.js +7 -0
- package/dist/esm/util/actual-mouse-move.js +8 -0
- package/dist/esm/util/analytics/Attributes.js +0 -0
- package/dist/esm/util/analytics/CommonAttributes.js +0 -0
- package/dist/esm/util/analytics/Duration.js +0 -0
- package/dist/esm/util/analytics/aiGenerationCompletedEvent.js +6 -0
- package/dist/esm/util/analytics/aiGenerationFailedEvent.js +6 -0
- package/dist/esm/util/analytics/aiGenerationStartedEvent.js +9 -0
- package/dist/esm/util/analytics/analytics.js +157 -223
- package/dist/esm/util/analytics/categoryClickedEvent.js +6 -0
- package/dist/esm/util/analytics/clearSampled.js +18 -0
- package/dist/esm/util/analytics/closedPickerEvent.js +6 -0
- package/dist/esm/util/analytics/createEvent.js +18 -0
- package/dist/esm/util/analytics/deleteBeginEvent.js +6 -0
- package/dist/esm/util/analytics/deleteCancelEvent.js +6 -0
- package/dist/esm/util/analytics/deleteConfirmEvent.js +6 -0
- package/dist/esm/util/analytics/emojiPickerEvent.js +6 -0
- package/dist/esm/util/analytics/emojiUploaderEvent.js +4 -0
- package/dist/esm/util/analytics/extractCommonAttributes.js +9 -0
- package/dist/esm/util/analytics/extractErrorInfo.js +14 -0
- package/dist/esm/util/analytics/getSkinTone.js +29 -0
- package/dist/esm/util/analytics/hasUfoMarked.js +5 -0
- package/dist/esm/util/analytics/isExperienceSampled.js +17 -0
- package/dist/esm/util/analytics/openedPickerEvent.js +6 -0
- package/dist/esm/util/analytics/pickerClickedEvent.js +10 -0
- package/dist/esm/util/analytics/pickerSearchedEvent.js +6 -0
- package/dist/esm/util/analytics/recordFailed.js +6 -0
- package/dist/esm/util/analytics/recordFailedEmoji.js +13 -0
- package/dist/esm/util/analytics/recordSelectionFailedSli.js +14 -0
- package/dist/esm/util/analytics/recordSelectionSucceededSli.js +13 -0
- package/dist/esm/util/analytics/recordSucceeded.js +6 -0
- package/dist/esm/util/analytics/recordSucceededEmoji.js +13 -0
- package/dist/esm/util/analytics/sampledUfoEmojiResourceFetched.js +5 -0
- package/dist/esm/util/analytics/sampledUfoRenderedEmoji.js +5 -0
- package/dist/esm/util/analytics/samplingUfo.js +10 -204
- package/dist/esm/util/analytics/selectedFileEvent.js +6 -0
- package/dist/esm/util/analytics/skinTones.js +16 -0
- package/dist/esm/util/analytics/skintoneSelectorEvent.js +5 -0
- package/dist/esm/util/analytics/toneSelectedEvent.js +6 -0
- package/dist/esm/util/analytics/toneSelectorClosedEvent.js +6 -0
- package/dist/esm/util/analytics/toneSelectorOpenedEvent.js +6 -0
- package/dist/esm/util/analytics/typeaheadCancelledEvent.js +12 -0
- package/dist/esm/util/analytics/typeaheadRenderedEvent.js +12 -0
- package/dist/esm/util/analytics/typeaheadSelectedEvent.js +26 -0
- package/dist/esm/util/analytics/ufoExperiences.js +15 -13
- package/dist/esm/util/analytics/uploadBeginButton.js +6 -0
- package/dist/esm/util/analytics/uploadCancelButton.js +6 -0
- package/dist/esm/util/analytics/uploadConfirmButton.js +6 -0
- package/dist/esm/util/analytics/uploadFailedEvent.js +6 -0
- package/dist/esm/util/analytics/uploadSucceededEvent.js +6 -0
- package/dist/esm/util/analytics/useSampledUFOComponentExperience.js +1 -1
- package/dist/esm/util/analytics/withSampling.js +175 -0
- package/dist/esm/util/build-emoji-description-with-alt-representation.js +12 -0
- package/dist/esm/util/contains-emoji-id.js +12 -0
- package/dist/esm/util/convert-image-to-media-representation.js +7 -0
- package/dist/esm/util/convert-media-to-image-emoji.js +21 -0
- package/dist/esm/util/convert-media-to-image-representation.js +7 -0
- package/dist/esm/util/filter-hidden-emojis.js +6 -0
- package/dist/esm/util/filters.js +1 -4
- package/dist/esm/util/format-shortcut.js +23 -0
- package/dist/esm/util/get-category-id.js +3 -0
- package/dist/esm/util/get-tone-emoji.js +4 -0
- package/dist/esm/util/has-data-url-image.js +5 -0
- package/dist/esm/util/is-emoji-description-with-variations.js +3 -0
- package/dist/esm/util/is-emoji-description.js +3 -0
- package/dist/esm/util/is-emoji-id-equal.js +3 -0
- package/dist/esm/util/is-emoji-variation-description.js +3 -0
- package/dist/esm/util/{hidden-emojis.js → is-hidden-emoji.js} +0 -5
- package/dist/esm/util/is-image-representation.js +3 -0
- package/dist/esm/util/is-loaded-media-emoji.js +5 -0
- package/dist/esm/util/is-media-emoji.js +4 -0
- package/dist/esm/util/is-media-representation.js +3 -0
- package/dist/esm/util/is-messages-key.js +4 -0
- package/dist/esm/util/is-promise.js +3 -0
- package/dist/esm/util/is-sprite-representation.js +3 -0
- package/dist/esm/util/is-sprite-service-representation.js +3 -0
- package/dist/esm/util/is-unicode-representation.js +3 -0
- package/dist/esm/util/keymaps.js +2 -32
- package/dist/esm/util/left-click.js +3 -0
- package/dist/esm/util/make-key-map-with-common.js +10 -0
- package/dist/esm/util/make-keymap.js +12 -0
- package/dist/esm/util/mouse-location.js +6 -0
- package/dist/esm/util/mouse.js +0 -18
- package/dist/esm/util/to-emoji-id.js +7 -0
- package/dist/esm/util/to-optional-emoji-id.js +7 -0
- package/dist/esm/util/type-helpers.js +89 -113
- package/dist/esm/utils.js +16 -2
- package/dist/types/admin.d.ts +3 -0
- package/dist/types/api/EmojiLoader.d.ts +1 -1
- package/dist/types/api/EmojiRepository.d.ts +4 -1
- package/dist/types/api/EmojiResource.d.ts +5 -9
- package/dist/types/api/EmojiUtils.d.ts +46 -15
- package/dist/types/api/calculateScale.d.ts +2 -0
- package/dist/types/api/denormaliseEmojiServiceResponse.d.ts +6 -0
- package/dist/types/api/denormaliseServiceAltRepresentation.d.ts +2 -0
- package/dist/types/api/denormaliseServiceRepresentation.d.ts +2 -0
- package/dist/types/api/denormaliseSkinEmoji.d.ts +2 -0
- package/dist/types/api/denormaliseStandardRepresentation.d.ts +2 -0
- package/dist/types/api/emojiRequest.d.ts +4 -0
- package/dist/types/api/getAltRepresentation.d.ts +2 -0
- package/dist/types/api/getEmojiVariation.d.ts +2 -0
- package/dist/types/api/getPixelRatio.d.ts +1 -0
- package/dist/types/api/internal/AlphabeticalShortnameComparator.d.ts +8 -0
- package/dist/types/api/internal/AsciiMatchComparator.d.ts +11 -0
- package/dist/types/api/internal/ChainedEmojiComparator.d.ts +14 -0
- package/dist/types/api/internal/Comparators.d.ts +0 -98
- package/dist/types/api/internal/EmojiTypeComparator.d.ts +14 -0
- package/dist/types/api/internal/ExactShortNameMatchComparator.d.ts +12 -0
- package/dist/types/api/internal/Gateway.d.ts +13 -0
- package/dist/types/api/internal/OrderComparator.d.ts +8 -0
- package/dist/types/api/internal/QueryStringPositionMatchComparator.d.ts +21 -0
- package/dist/types/api/internal/UsageFrequencyComparator.d.ts +17 -0
- package/dist/types/api/internal/UsageFrequencyTracker.d.ts +0 -13
- package/dist/types/api/internal/createSearchEmojiComparator.d.ts +9 -0
- package/dist/types/api/internal/createUsageOnlyEmojiComparator.d.ts +2 -0
- package/dist/types/api/isMediaApiUrl.d.ts +2 -0
- package/dist/types/api/media/BrowserCacheStrategy.d.ts +15 -0
- package/dist/types/api/media/MediaEmojiCache.d.ts +2 -29
- package/dist/types/api/media/MemoryCacheStrategy.d.ts +19 -0
- package/dist/types/api/media/getRequiredRepresentation.d.ts +2 -0
- package/dist/types/api/shouldUseAltRepresentation.d.ts +2 -0
- package/dist/types/api/supportsUploadFeature.d.ts +9 -0
- package/dist/types/components/common/AddOwnEmoji.d.ts +9 -0
- package/dist/types/components/common/CachingEmoji.d.ts +0 -5
- package/dist/types/components/common/CachingMediaEmoji.d.ts +7 -0
- package/dist/types/components/common/DeletableEmojiTooltipContent.d.ts +0 -4
- package/dist/types/components/common/DeletableEmojiTooltipContentForScreenReader.d.ts +1 -0
- package/dist/types/components/common/Emoji.d.ts +1 -3
- package/dist/types/components/common/EmojiActions.d.ts +4 -6
- package/dist/types/components/common/EmojiPlaceholder.d.ts +8 -1
- package/dist/types/components/common/ImageEmoji.d.ts +6 -0
- package/dist/types/components/common/RecordSelectionDefault.d.ts +2 -2
- package/dist/types/components/common/SpriteEmoji.d.ts +6 -0
- package/dist/types/components/common/ToneSelector.d.ts +6 -3
- package/dist/types/components/common/ToneSelectorInternal.d.ts +9 -0
- package/dist/types/components/common/ToolTipContentWithKeymap.d.ts +1 -1
- package/dist/types/components/common/UnicodeEmoji.d.ts +6 -0
- package/dist/types/components/common/UploadEmoji.d.ts +2 -2
- package/dist/types/components/common/emojiPlaceholderTestId.d.ts +5 -0
- package/dist/types/components/common/handleDelete.d.ts +5 -0
- package/dist/types/components/common/isRefreshEmojiPickerEnabled.d.ts +5 -0
- package/dist/types/components/picker/AbstractItem.d.ts +7 -0
- package/dist/types/components/picker/CategoryHeadingItem.d.ts +10 -0
- package/dist/types/components/picker/CategorySelector.d.ts +5 -4
- package/dist/types/components/picker/EmojiPicker.d.ts +19 -19
- package/dist/types/components/picker/EmojiPickerCategoryHeading.d.ts +4 -0
- package/dist/types/components/picker/EmojiPickerComponent.d.ts +6 -2
- package/dist/types/components/picker/EmojiPickerInternal.d.ts +24 -0
- package/dist/types/components/picker/EmojiPickerList.d.ts +5 -5
- package/dist/types/components/picker/EmojiPickerVirtualItems.d.ts +0 -26
- package/dist/types/components/picker/EmojisRowItem.d.ts +11 -0
- package/dist/types/components/picker/LoadingItem.d.ts +9 -0
- package/dist/types/components/picker/NoResultsItem.d.ts +10 -0
- package/dist/types/components/picker/categorySelectorCategoryTestId.d.ts +5 -0
- package/dist/types/components/picker/{utils.d.ts → emojiPickerHeightOffset.d.ts} +0 -1
- package/dist/types/components/picker/emojiPickerLoader.d.ts +7 -0
- package/dist/types/components/picker/emojiPickerModuleLoader.d.ts +5 -0
- package/dist/types/components/picker/preloadEmojiPicker.d.ts +5 -0
- package/dist/types/components/picker/scrollToRow.d.ts +1 -0
- package/dist/types/components/picker/sortCategories.d.ts +6 -0
- package/dist/types/components/picker/sortCategoriesNew.d.ts +6 -0
- package/dist/types/components/picker/virtualItemRenderer.d.ts +10 -0
- package/dist/types/components/typeahead/EmojiTypeAheadComponent.d.ts +3 -3
- package/dist/types/components/typeahead/EmojiTypeAheadItem.d.ts +7 -2
- package/dist/types/components/typeahead/EmojiTypeAheadItemInternal.d.ts +6 -0
- package/dist/types/components/uploader/EmojiUploadComponent.d.ts +3 -3
- package/dist/types/components/uploader/EmojiUploader.d.ts +8 -14
- package/dist/types/components/uploader/EmojiUploaderInternal.d.ts +14 -0
- package/dist/types/element.d.ts +9 -0
- package/dist/types/index.d.ts +13 -8
- package/dist/types/picker.d.ts +3 -0
- package/dist/types/resource.d.ts +15 -0
- package/dist/types/typeahead.d.ts +6 -0
- package/dist/types/util/actual-mouse-move.d.ts +2 -0
- package/dist/types/util/analytics/Attributes.d.ts +3 -0
- package/dist/types/util/analytics/CommonAttributes.d.ts +5 -0
- package/dist/types/util/analytics/Duration.d.ts +3 -0
- package/dist/types/util/analytics/aiGenerationCompletedEvent.d.ts +3 -0
- package/dist/types/util/analytics/aiGenerationFailedEvent.d.ts +4 -0
- package/dist/types/util/analytics/aiGenerationStartedEvent.d.ts +4 -0
- package/dist/types/util/analytics/analytics.d.ts +162 -74
- package/dist/types/util/analytics/categoryClickedEvent.d.ts +4 -0
- package/dist/types/util/analytics/clearSampled.d.ts +1 -0
- package/dist/types/util/analytics/closedPickerEvent.d.ts +3 -0
- package/dist/types/util/analytics/createEvent.d.ts +2 -0
- package/dist/types/util/analytics/deleteBeginEvent.d.ts +3 -0
- package/dist/types/util/analytics/deleteCancelEvent.d.ts +3 -0
- package/dist/types/util/analytics/deleteConfirmEvent.d.ts +3 -0
- package/dist/types/util/analytics/emojiPickerEvent.d.ts +1 -0
- package/dist/types/util/analytics/emojiUploaderEvent.d.ts +1 -0
- package/dist/types/util/analytics/extractCommonAttributes.d.ts +3 -0
- package/dist/types/util/analytics/extractErrorInfo.d.ts +6 -0
- package/dist/types/util/analytics/getSkinTone.d.ts +1 -0
- package/dist/types/util/analytics/hasUfoMarked.d.ts +3 -0
- package/dist/types/util/analytics/isExperienceSampled.d.ts +8 -0
- package/dist/types/util/analytics/openedPickerEvent.d.ts +2 -0
- package/dist/types/util/analytics/pickerClickedEvent.d.ts +13 -0
- package/dist/types/util/analytics/pickerSearchedEvent.d.ts +5 -0
- package/dist/types/util/analytics/recordFailed.d.ts +2 -0
- package/dist/types/util/analytics/recordFailedEmoji.d.ts +1 -0
- package/dist/types/util/analytics/recordSelectionFailedSli.d.ts +1 -0
- package/dist/types/util/analytics/recordSelectionSucceededSli.d.ts +1 -0
- package/dist/types/util/analytics/recordSucceeded.d.ts +2 -0
- package/dist/types/util/analytics/recordSucceededEmoji.d.ts +1 -0
- package/dist/types/util/analytics/sampledUfoEmojiResourceFetched.d.ts +3 -0
- package/dist/types/util/analytics/sampledUfoRenderedEmoji.d.ts +3 -0
- package/dist/types/util/analytics/samplingUfo.d.ts +9 -15
- package/dist/types/util/analytics/selectedFileEvent.d.ts +2 -0
- package/dist/types/util/analytics/skinTones.d.ts +1 -0
- package/dist/types/util/analytics/skintoneSelectorEvent.d.ts +1 -0
- package/dist/types/util/analytics/toneSelectedEvent.d.ts +4 -0
- package/dist/types/util/analytics/toneSelectorClosedEvent.d.ts +2 -0
- package/dist/types/util/analytics/toneSelectorOpenedEvent.d.ts +4 -0
- package/dist/types/util/analytics/typeaheadCancelledEvent.d.ts +3 -0
- package/dist/types/util/analytics/typeaheadRenderedEvent.d.ts +3 -0
- package/dist/types/util/analytics/typeaheadSelectedEvent.d.ts +3 -0
- package/dist/types/util/analytics/ufoExperiences.d.ts +14 -7
- package/dist/types/util/analytics/uploadBeginButton.d.ts +2 -0
- package/dist/types/util/analytics/uploadCancelButton.d.ts +2 -0
- package/dist/types/util/analytics/uploadConfirmButton.d.ts +4 -0
- package/dist/types/util/analytics/uploadFailedEvent.d.ts +5 -0
- package/dist/types/util/analytics/uploadSucceededEvent.d.ts +3 -0
- package/dist/types/util/analytics/withSampling.d.ts +8 -0
- package/dist/types/util/build-emoji-description-with-alt-representation.d.ts +2 -0
- package/dist/types/util/contains-emoji-id.d.ts +2 -0
- package/dist/types/util/convert-image-to-media-representation.d.ts +2 -0
- package/dist/types/util/convert-media-to-image-emoji.d.ts +2 -0
- package/dist/types/util/convert-media-to-image-representation.d.ts +2 -0
- package/dist/types/util/{hidden-emojis.d.ts → filter-hidden-emojis.d.ts} +0 -1
- package/dist/types/util/filters.d.ts +2 -3
- package/dist/types/util/format-shortcut.d.ts +5 -0
- package/dist/types/util/get-category-id.d.ts +3 -0
- package/dist/types/util/get-tone-emoji.d.ts +3 -0
- package/dist/types/util/has-data-url-image.d.ts +2 -0
- package/dist/types/util/is-emoji-description-with-variations.d.ts +2 -0
- package/dist/types/util/is-emoji-description.d.ts +2 -0
- package/dist/types/util/is-emoji-id-equal.d.ts +2 -0
- package/dist/types/util/is-emoji-variation-description.d.ts +2 -0
- package/dist/types/util/is-hidden-emoji.d.ts +2 -0
- package/dist/types/util/is-image-representation.d.ts +2 -0
- package/dist/types/util/is-loaded-media-emoji.d.ts +2 -0
- package/dist/types/util/is-media-emoji.d.ts +2 -0
- package/dist/types/util/is-media-representation.d.ts +2 -0
- package/dist/types/util/is-messages-key.d.ts +2 -0
- package/dist/types/util/is-promise.d.ts +1 -0
- package/dist/types/util/is-sprite-representation.d.ts +2 -0
- package/dist/types/util/is-sprite-service-representation.d.ts +2 -0
- package/dist/types/util/is-unicode-representation.d.ts +2 -0
- package/dist/types/util/keymaps.d.ts +0 -3
- package/dist/types/util/left-click.d.ts +2 -0
- package/dist/types/util/make-key-map-with-common.d.ts +5 -0
- package/dist/types/util/make-keymap.d.ts +5 -0
- package/dist/types/util/mouse-location.d.ts +3 -0
- package/dist/types/util/mouse.d.ts +0 -4
- package/dist/types/util/to-emoji-id.d.ts +2 -0
- package/dist/types/util/to-optional-emoji-id.d.ts +2 -0
- package/dist/types/util/type-helpers.d.ts +88 -25
- package/dist/types/utils.d.ts +15 -2
- package/package.json +1 -1
- package/dist/cjs/i18n/index.js +0 -216
- package/dist/cjs/util/analytics/index.js +0 -231
- package/dist/es2019/i18n/index.js +0 -37
- package/dist/es2019/util/analytics/index.js +0 -4
- package/dist/esm/i18n/index.js +0 -37
- package/dist/esm/util/analytics/index.js +0 -4
- package/dist/types/i18n/index.d.ts +0 -37
- package/dist/types/util/analytics/index.d.ts +0 -6
- /package/dist/cjs/components/common/{ToneSelector.compiled.css → ToneSelectorInternal.compiled.css} +0 -0
- /package/dist/cjs/components/picker/{EmojiPicker.compiled.css → EmojiPickerInternal.compiled.css} +0 -0
- /package/dist/cjs/components/picker/{EmojiPickerVirtualItems.compiled.css → LoadingItem.compiled.css} +0 -0
- /package/dist/cjs/components/typeahead/{EmojiTypeAheadItem.compiled.css → EmojiTypeAheadItemInternal.compiled.css} +0 -0
- /package/dist/es2019/components/common/{ToneSelector.compiled.css → ToneSelectorInternal.compiled.css} +0 -0
- /package/dist/es2019/components/picker/{EmojiPicker.compiled.css → EmojiPickerInternal.compiled.css} +0 -0
- /package/dist/es2019/components/picker/{EmojiPickerVirtualItems.compiled.css → LoadingItem.compiled.css} +0 -0
- /package/dist/es2019/components/typeahead/{EmojiTypeAheadItem.compiled.css → EmojiTypeAheadItemInternal.compiled.css} +0 -0
- /package/dist/esm/components/common/{ToneSelector.compiled.css → ToneSelectorInternal.compiled.css} +0 -0
- /package/dist/esm/components/picker/{EmojiPicker.compiled.css → EmojiPickerInternal.compiled.css} +0 -0
- /package/dist/esm/components/picker/{EmojiPickerVirtualItems.compiled.css → LoadingItem.compiled.css} +0 -0
- /package/dist/esm/components/typeahead/{EmojiTypeAheadItem.compiled.css → EmojiTypeAheadItemInternal.compiled.css} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copied from editor-common: https://bitbucket.org/atlassian/atlassian-frontend/src/d01430a20500d720791d0667fd7cfe25d254f2e3/packages/editor/editor-common/src/keymaps/index.tsx
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export function makeKeymap(description, windows, mac, common) {
|
|
6
|
+
return {
|
|
7
|
+
description: description,
|
|
8
|
+
windows: windows.replace(/Mod/i, 'Ctrl'),
|
|
9
|
+
mac: mac.replace(/Mod/i, 'Cmd'),
|
|
10
|
+
common: common
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export function mouseLocation(event) {
|
|
2
|
-
return {
|
|
3
|
-
x: event.clientX,
|
|
4
|
-
y: event.clientY
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// Used to prevent invalid mouse move detection on scroll
|
|
9
|
-
// lastPosition is object (x, y)
|
|
10
|
-
export function actualMouseMove(oldPosition, newPosition) {
|
|
11
|
-
if (!oldPosition || oldPosition.x !== newPosition.x || oldPosition.y !== newPosition.y) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
export function leftClick(reactEvent) {
|
|
17
|
-
return reactEvent.button === 0 && !reactEvent.altKey && !reactEvent.ctrlKey && !reactEvent.metaKey && !reactEvent.shiftKey;
|
|
18
|
-
}
|
|
@@ -1,78 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
};
|
|
78
|
-
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `import { isSpriteServiceRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
4
|
+
*/
|
|
5
|
+
export { isSpriteServiceRepresentation } from './is-sprite-service-representation';
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `import { isSpriteRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
8
|
+
*/
|
|
9
|
+
export { isSpriteRepresentation } from './is-sprite-representation';
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `import { isImageRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
12
|
+
*/
|
|
13
|
+
export { isImageRepresentation } from './is-image-representation';
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `import { isMediaRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
16
|
+
*/
|
|
17
|
+
export { isMediaRepresentation } from './is-media-representation';
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `import { isUnicodeRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
20
|
+
*/
|
|
21
|
+
export { isUnicodeRepresentation } from './is-unicode-representation';
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `import { isPromise } from '@atlaskit/emoji/type-helpers'` instead.
|
|
24
|
+
*/
|
|
25
|
+
export { isPromise } from './is-promise';
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `import { isEmojiDescription } from '@atlaskit/emoji/type-helpers'` instead.
|
|
28
|
+
*/
|
|
29
|
+
export { isEmojiDescription } from './is-emoji-description';
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `import { isMediaEmoji } from '@atlaskit/emoji/type-helpers'` instead.
|
|
32
|
+
*/
|
|
33
|
+
export { isMediaEmoji } from './is-media-emoji';
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use `import { hasDataURLImage } from '@atlaskit/emoji/type-helpers'` instead.
|
|
36
|
+
*/
|
|
37
|
+
export { hasDataURLImage } from './has-data-url-image';
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `import { isLoadedMediaEmoji } from '@atlaskit/emoji/type-helpers'` instead.
|
|
40
|
+
*/
|
|
41
|
+
export { isLoadedMediaEmoji } from './is-loaded-media-emoji';
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated Use `import { isEmojiDescriptionWithVariations } from '@atlaskit/emoji/type-helpers'` instead.
|
|
44
|
+
*/
|
|
45
|
+
export { isEmojiDescriptionWithVariations } from './is-emoji-description-with-variations';
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Use `import { isEmojiVariationDescription } from '@atlaskit/emoji/type-helpers'` instead.
|
|
48
|
+
*/
|
|
49
|
+
export { isEmojiVariationDescription } from './is-emoji-variation-description';
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use `import { isMessagesKey } from '@atlaskit/emoji/type-helpers'` instead.
|
|
52
|
+
*/
|
|
53
|
+
export { isMessagesKey } from './is-messages-key';
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Use `import { toEmojiId } from '@atlaskit/emoji/type-helpers'` instead.
|
|
56
|
+
*/
|
|
57
|
+
export { toEmojiId } from './to-emoji-id';
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Use `import { toOptionalEmojiId } from '@atlaskit/emoji/type-helpers'` instead.
|
|
60
|
+
*/
|
|
61
|
+
export { toOptionalEmojiId } from './to-optional-emoji-id';
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use `import { isEmojiIdEqual } from '@atlaskit/emoji/type-helpers'` instead.
|
|
64
|
+
*/
|
|
65
|
+
export { isEmojiIdEqual } from './is-emoji-id-equal';
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Use `import { containsEmojiId } from '@atlaskit/emoji/type-helpers'` instead.
|
|
68
|
+
*/
|
|
69
|
+
export { containsEmojiId } from './contains-emoji-id';
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated Use `import { convertImageToMediaRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
72
|
+
*/
|
|
73
|
+
export { convertImageToMediaRepresentation } from './convert-image-to-media-representation';
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated Use `import { convertMediaToImageRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
76
|
+
*/
|
|
77
|
+
export { convertMediaToImageRepresentation } from './convert-media-to-image-representation';
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated Use `import { convertMediaToImageEmoji } from '@atlaskit/emoji/type-helpers'` instead.
|
|
80
|
+
*/
|
|
81
|
+
export { convertMediaToImageEmoji } from './convert-media-to-image-emoji';
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use `import { buildEmojiDescriptionWithAltRepresentation } from '@atlaskit/emoji/type-helpers'` instead.
|
|
84
|
+
*/
|
|
85
|
+
export { buildEmojiDescriptionWithAltRepresentation } from './build-emoji-description-with-alt-representation';
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Use `import { getCategoryId } from '@atlaskit/emoji/type-helpers'` instead.
|
|
88
|
+
*/
|
|
89
|
+
export { getCategoryId } from './get-category-id';
|
package/dist/es2019/utils.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `import { defaultInlineEmojiHeight } from '@atlaskit/emoji/constants'` instead.
|
|
4
|
+
*/
|
|
1
5
|
export { defaultInlineEmojiHeight } from './util/constants';
|
|
2
|
-
|
|
3
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `import { toEmojiId, toOptionalEmojiId } from '@atlaskit/emoji/type-helpers'` instead.
|
|
8
|
+
*/
|
|
9
|
+
export { toEmojiId } from './util/to-emoji-id';
|
|
10
|
+
export { toOptionalEmojiId } from './util/to-optional-emoji-id';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `import { denormaliseEmojiServiceResponse } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
13
|
+
*/
|
|
14
|
+
export { denormaliseEmojiServiceResponse } from './api/denormaliseEmojiServiceResponse';
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `import { UsageFrequencyTracker } from '@atlaskit/emoji/usage-frequency-tracker'` instead.
|
|
17
|
+
*/
|
|
4
18
|
export { UsageFrequencyTracker } from './api/internal/UsageFrequencyTracker';
|
package/dist/esm/admin.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `import { EmojiUploader } from '@atlaskit/emoji/emoji-uploader'` instead.
|
|
4
|
+
*/
|
|
1
5
|
export { default as EmojiUploader } from './components/uploader/EmojiUploader';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import { isTestEnvironment } from '../util/is-test-environment';
|
|
4
|
-
import { denormaliseEmojiServiceResponse
|
|
4
|
+
import { denormaliseEmojiServiceResponse } from './denormaliseEmojiServiceResponse';
|
|
5
|
+
import { emojiRequest } from './emojiRequest';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Shared cache of in-flight/resolved emoji load promises, keyed by the request URL so that
|
|
@@ -2,15 +2,19 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
5
6
|
import { Search, UnorderedSearchIndex } from 'js-search';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
7
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { SearchSort } from '../types';
|
|
10
|
+
import { defaultCategories, frequentCategory } from '../util/constants';
|
|
11
|
+
import { getCategoryId } from '../util/get-category-id';
|
|
12
|
+
import { isEmojiDescriptionWithVariations } from '../util/is-emoji-description-with-variations';
|
|
9
13
|
import { tokenizerRegex } from './EmojiRepositoryRegex';
|
|
10
|
-
import {
|
|
14
|
+
import { getEmojiVariation } from './getEmojiVariation';
|
|
11
15
|
import { UsageFrequencyTracker } from './internal/UsageFrequencyTracker';
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
16
|
+
import { createSearchEmojiComparator } from './internal/createSearchEmojiComparator';
|
|
17
|
+
import { createUsageOnlyEmojiComparator } from './internal/createUsageOnlyEmojiComparator';
|
|
14
18
|
// FS-1097 - duplicated in mentions - extract at some point into a shared library
|
|
15
19
|
var Tokenizer = /*#__PURE__*/function () {
|
|
16
20
|
function Tokenizer() {
|
|
@@ -83,18 +87,6 @@ var splitQuery = function splitQuery() {
|
|
|
83
87
|
asciiQuery: ''
|
|
84
88
|
};
|
|
85
89
|
};
|
|
86
|
-
export var getEmojiVariation = function getEmojiVariation(emoji, options) {
|
|
87
|
-
if (isEmojiDescriptionWithVariations(emoji) && options) {
|
|
88
|
-
var skinTone = options.skinTone;
|
|
89
|
-
if (skinTone && emoji.skinVariations && emoji.skinVariations.length) {
|
|
90
|
-
var skinToneEmoji = emoji.skinVariations[skinTone - 1]; // skinTone start at 1
|
|
91
|
-
if (skinToneEmoji) {
|
|
92
|
-
return skinToneEmoji;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return emoji;
|
|
97
|
-
};
|
|
98
90
|
var findEmojiIndex = function findEmojiIndex(emojis, toFind) {
|
|
99
91
|
var findId = toFind.id;
|
|
100
92
|
var match = -1;
|
|
@@ -442,4 +434,8 @@ var EmojiRepository = /*#__PURE__*/function () {
|
|
|
442
434
|
}]);
|
|
443
435
|
}();
|
|
444
436
|
_defineProperty(EmojiRepository, "defaultEmojiWeight", 1000000);
|
|
445
|
-
export { EmojiRepository as default };
|
|
437
|
+
export { EmojiRepository as default };
|
|
438
|
+
/**
|
|
439
|
+
* @deprecated Use `import { getEmojiVariation } from '@atlaskit/emoji/emoji-repository'` instead.
|
|
440
|
+
*/
|
|
441
|
+
export { getEmojiVariation } from './getEmojiVariation';
|
|
@@ -12,19 +12,23 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
15
|
-
|
|
15
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
16
16
|
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { AbstractResource, utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
19
|
+
import { ProviderTypes } from '../types';
|
|
20
|
+
import { sampledUfoEmojiResourceFetched } from '../util/analytics/sampledUfoEmojiResourceFetched';
|
|
21
|
+
import { ufoExperiences } from '../util/analytics/ufoExperiences';
|
|
18
22
|
import { SAMPLING_RATE_EMOJI_RESOURCE_FETCHED_EXP, selectedToneStorageKey } from '../util/constants';
|
|
23
|
+
import { isMediaEmoji } from '../util/is-media-emoji';
|
|
24
|
+
import { isPromise } from '../util/is-promise';
|
|
19
25
|
import debug from '../util/logger';
|
|
20
|
-
import { isMediaEmoji, isPromise, toEmojiId } from '../util/type-helpers';
|
|
21
26
|
import storageAvailable from '../util/storage-available';
|
|
22
|
-
import {
|
|
27
|
+
import { promiseWithTimeout } from '../util/timed-promise';
|
|
28
|
+
import { toEmojiId } from '../util/to-emoji-id';
|
|
23
29
|
import EmojiLoader from './EmojiLoader';
|
|
24
30
|
import EmojiRepository from './EmojiRepository';
|
|
25
31
|
import SiteEmojiResource from './media/SiteEmojiResource';
|
|
26
|
-
import { sampledUfoEmojiResourceFetched, ufoExperiences } from '../util/analytics/ufoExperiences';
|
|
27
|
-
import { promiseWithTimeout } from '../util/timed-promise';
|
|
28
32
|
var teamoji26RefreshEmojiPickerExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
29
33
|
var teamoji26QueryParam = 'useTeamoji26=true';
|
|
30
34
|
var isTeamoji26RefreshEmojiPickerEnabled = function isTeamoji26RefreshEmojiPickerEnabled() {
|
|
@@ -49,17 +53,6 @@ var addTeamoji26QueryParam = function addTeamoji26QueryParam(url) {
|
|
|
49
53
|
// Re-exporting to not cause a breaking change
|
|
50
54
|
// Re-exporting to not cause a breaking change
|
|
51
55
|
|
|
52
|
-
/**
|
|
53
|
-
* Checks if the emojiProvider can support uploading at a feature level.
|
|
54
|
-
*
|
|
55
|
-
* Follow this up with an isUploadSupported() check to see if the provider is actually
|
|
56
|
-
* configured to support uploads.
|
|
57
|
-
* https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates
|
|
58
|
-
*/
|
|
59
|
-
export var supportsUploadFeature = function supportsUploadFeature(emojiProvider) {
|
|
60
|
-
var emojiUploadProvider = emojiProvider;
|
|
61
|
-
return !!emojiUploadProvider.isUploadSupported && !!emojiUploadProvider.uploadCustomEmoji && !!emojiUploadProvider.prepareForUpload;
|
|
62
|
-
};
|
|
63
56
|
export var EmojiResource = /*#__PURE__*/function (_AbstractResource) {
|
|
64
57
|
function EmojiResource(config) {
|
|
65
58
|
var _this;
|
|
@@ -838,4 +831,8 @@ var UploadingEmojiResource = /*#__PURE__*/function (_EmojiResource2) {
|
|
|
838
831
|
}
|
|
839
832
|
}]);
|
|
840
833
|
}(EmojiResource);
|
|
841
|
-
|
|
834
|
+
/**
|
|
835
|
+
* @deprecated Use `import { supportsUploadFeature } from '@atlaskit/emoji/emoji-resource'` instead.
|
|
836
|
+
*/
|
|
837
|
+
export { UploadingEmojiResource as default };
|
|
838
|
+
export { supportsUploadFeature } from './supportsUploadFeature';
|
|
@@ -1,170 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["getRatio"],
|
|
4
|
-
_excluded2 = ["queryParams"],
|
|
5
|
-
_excluded3 = ["representation", "altRepresentations"],
|
|
6
|
-
_excluded4 = ["representation", "skinVariations", "altRepresentations"];
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
12
|
-
import { ProviderTypes } from '../types';
|
|
13
|
-
import { isImageRepresentation, isSpriteServiceRepresentation, convertImageToMediaRepresentation, buildEmojiDescriptionWithAltRepresentation } from '../util/type-helpers';
|
|
14
|
-
import debug from '../util/logger';
|
|
15
|
-
import { emojiIdToEmoji } from '../util/emojiIdToEmoji';
|
|
16
|
-
export var emojiRequest = function emojiRequest(provider, options) {
|
|
17
|
-
var _provider$getRatio = provider.getRatio,
|
|
18
|
-
getRatio = _provider$getRatio === void 0 ? getPixelRatio : _provider$getRatio,
|
|
19
|
-
serviceConfig = _objectWithoutProperties(provider, _excluded);
|
|
20
|
-
var scaleQueryParams = calculateScale(getRatio);
|
|
21
|
-
var _ref = options || {},
|
|
22
|
-
_ref$queryParams = _ref.queryParams,
|
|
23
|
-
queryParams = _ref$queryParams === void 0 ? {} : _ref$queryParams,
|
|
24
|
-
otherOptions = _objectWithoutProperties(_ref, _excluded2);
|
|
25
|
-
var requestOptions = _objectSpread(_objectSpread({}, otherOptions), {}, {
|
|
26
|
-
queryParams: _objectSpread(_objectSpread(_objectSpread({}, scaleQueryParams), queryParams), {}, {
|
|
27
|
-
preferredRepresentation: 'IMAGE'
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
return serviceUtils.requestService(serviceConfig, requestOptions);
|
|
31
|
-
};
|
|
32
|
-
var calculateScale = function calculateScale(getRatio) {
|
|
33
|
-
if (expValEquals('platform_editor_emoji_default_scale', 'isEnabled', true)) {
|
|
34
|
-
// retina display
|
|
35
|
-
if (getRatio() > 1) {
|
|
36
|
-
return {
|
|
37
|
-
scale: 'XXXHDPI',
|
|
38
|
-
altScale: 'XXXHDPI'
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
// default set used for desktop
|
|
42
|
-
return {
|
|
43
|
-
altScale: 'XXXHDPI'
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Retina display
|
|
48
|
-
if (getRatio() > 1) {
|
|
49
|
-
return {
|
|
50
|
-
scale: 'XHDPI',
|
|
51
|
-
altScale: 'XXXHDPI'
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
// Default set used for desktop
|
|
55
|
-
return {
|
|
56
|
-
altScale: 'XHDPI'
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
export var getPixelRatio = function getPixelRatio() {
|
|
60
|
-
if (typeof window === 'undefined') {
|
|
61
|
-
return 0;
|
|
62
|
-
}
|
|
63
|
-
return window.devicePixelRatio;
|
|
64
|
-
};
|
|
65
|
-
export var getAltRepresentation = function getAltRepresentation(reps) {
|
|
66
|
-
// Invalid reps handled outside function - logic may change depending what the service returns
|
|
67
|
-
return reps[calculateScale(getPixelRatio).altScale];
|
|
68
|
-
};
|
|
69
|
-
export var isMediaApiUrl = function isMediaApiUrl(url, meta) {
|
|
70
|
-
return !!(meta && meta.mediaApiToken && url.indexOf(meta.mediaApiToken.url) === 0);
|
|
71
|
-
};
|
|
72
|
-
export var denormaliseServiceRepresentation = function denormaliseServiceRepresentation(representation, meta) {
|
|
73
|
-
if (isSpriteServiceRepresentation(representation) && meta && meta.spriteSheets) {
|
|
74
|
-
var _ref2 = representation,
|
|
75
|
-
height = _ref2.height,
|
|
76
|
-
width = _ref2.width,
|
|
77
|
-
x = _ref2.x,
|
|
78
|
-
y = _ref2.y,
|
|
79
|
-
xIndex = _ref2.xIndex,
|
|
80
|
-
yIndex = _ref2.yIndex,
|
|
81
|
-
spriteRef = _ref2.spriteRef;
|
|
82
|
-
var spriteSheet = meta.spriteSheets[spriteRef];
|
|
83
|
-
if (spriteSheet) {
|
|
84
|
-
return {
|
|
85
|
-
sprite: spriteSheet,
|
|
86
|
-
height: height,
|
|
87
|
-
width: width,
|
|
88
|
-
x: x,
|
|
89
|
-
y: y,
|
|
90
|
-
xIndex: xIndex,
|
|
91
|
-
yIndex: yIndex
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
} else if (isImageRepresentation(representation)) {
|
|
95
|
-
var _height = representation.height,
|
|
96
|
-
_width = representation.width,
|
|
97
|
-
imagePath = representation.imagePath;
|
|
98
|
-
if (isMediaApiUrl(imagePath, meta)) {
|
|
99
|
-
return convertImageToMediaRepresentation(representation);
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
height: _height,
|
|
103
|
-
width: _width,
|
|
104
|
-
imagePath: imagePath
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
debug('failed conversion for representation', representation, meta);
|
|
108
|
-
return undefined;
|
|
109
|
-
};
|
|
110
|
-
export var denormaliseServiceAltRepresentation = function denormaliseServiceAltRepresentation(altReps, meta) {
|
|
111
|
-
return !altReps || Object.keys(altReps).length === 0 ? undefined : denormaliseServiceRepresentation(getAltRepresentation(altReps), meta);
|
|
112
|
-
};
|
|
113
|
-
var denormaliseStandardRepresentation = function denormaliseStandardRepresentation(emoji, meta) {
|
|
114
|
-
var unicodeEmoji = emojiIdToEmoji(emoji.id);
|
|
115
|
-
var useUnicodeRepresentation = !!(emoji.id && emoji.type === ProviderTypes.STANDARD && unicodeEmoji && expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true));
|
|
116
|
-
return useUnicodeRepresentation ? {
|
|
117
|
-
unicodeEmoji: unicodeEmoji
|
|
118
|
-
} : denormaliseServiceRepresentation(emoji.representation, meta);
|
|
119
|
-
};
|
|
120
|
-
export var denormaliseSkinEmoji = function denormaliseSkinEmoji(emoji, meta) {
|
|
121
|
-
if (!emoji.skinVariations) {
|
|
122
|
-
return [];
|
|
123
|
-
}
|
|
124
|
-
var skinEmoji = emoji.skinVariations;
|
|
125
|
-
var baseId = emoji.id;
|
|
126
|
-
return skinEmoji.map(function (skin) {
|
|
127
|
-
var _representation = skin.representation,
|
|
128
|
-
altRepresentations = skin.altRepresentations,
|
|
129
|
-
other = _objectWithoutProperties(skin, _excluded3);
|
|
130
|
-
return _objectSpread({
|
|
131
|
-
baseId: baseId,
|
|
132
|
-
representation: denormaliseStandardRepresentation(skin, meta),
|
|
133
|
-
altRepresentation: denormaliseServiceAltRepresentation(altRepresentations, meta)
|
|
134
|
-
}, other);
|
|
135
|
-
});
|
|
136
|
-
};
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
137
2
|
|
|
138
3
|
/**
|
|
139
|
-
*
|
|
140
|
-
* emoji with local sprite definitions.
|
|
4
|
+
* @deprecated Use `import { emojiRequest } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
141
5
|
*/
|
|
142
|
-
export
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
};
|
|
6
|
+
export { emojiRequest } from './emojiRequest';
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use `import { getPixelRatio } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
9
|
+
*/
|
|
10
|
+
export { getPixelRatio } from './getPixelRatio';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `import { getAltRepresentation } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
13
|
+
*/
|
|
14
|
+
export { getAltRepresentation } from './getAltRepresentation';
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `import { isMediaApiUrl } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
17
|
+
*/
|
|
18
|
+
export { isMediaApiUrl } from './isMediaApiUrl';
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use `import { denormaliseServiceRepresentation } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
21
|
+
*/
|
|
22
|
+
export { denormaliseServiceRepresentation } from './denormaliseServiceRepresentation';
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use `import { denormaliseServiceAltRepresentation } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
25
|
+
*/
|
|
26
|
+
export { denormaliseServiceAltRepresentation } from './denormaliseServiceAltRepresentation';
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `import { denormaliseSkinEmoji } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
29
|
+
*/
|
|
30
|
+
export { denormaliseSkinEmoji } from './denormaliseSkinEmoji';
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use `import { denormaliseEmojiServiceResponse } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
33
|
+
*/
|
|
34
|
+
export { denormaliseEmojiServiceResponse } from './denormaliseEmojiServiceResponse';
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use `import { shouldUseAltRepresentation } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
37
|
+
*/
|
|
38
|
+
export { shouldUseAltRepresentation } from './shouldUseAltRepresentation';
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `import { calculateScale } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
41
|
+
*/
|
|
42
|
+
export { calculateScale } from './calculateScale';
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `import { denormaliseStandardRepresentation } from '@atlaskit/emoji/emoji-utils'` instead.
|
|
45
|
+
*/
|
|
46
|
+
export { denormaliseStandardRepresentation } from './denormaliseStandardRepresentation';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
|
+
export var calculateScale = function calculateScale(getRatio) {
|
|
3
|
+
if (expValEquals('platform_editor_emoji_default_scale', 'isEnabled', true)) {
|
|
4
|
+
// retina display
|
|
5
|
+
if (getRatio() > 1) {
|
|
6
|
+
return {
|
|
7
|
+
scale: 'XXXHDPI',
|
|
8
|
+
altScale: 'XXXHDPI'
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
// default set used for desktop
|
|
12
|
+
return {
|
|
13
|
+
altScale: 'XXXHDPI'
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Retina display
|
|
18
|
+
if (getRatio() > 1) {
|
|
19
|
+
return {
|
|
20
|
+
scale: 'XHDPI',
|
|
21
|
+
altScale: 'XXXHDPI'
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
// Default set used for desktop
|
|
25
|
+
return {
|
|
26
|
+
altScale: 'XHDPI'
|
|
27
|
+
};
|
|
28
|
+
};
|