mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
Replace emojibase-data with emoji-picker-element-data (#1293)
* Add Twemoji 13.1 * Use emoji-picker-element instead of emojibase Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
015c618c56
commit
c867673072
5 changed files with 10 additions and 10 deletions
|
@ -16,7 +16,7 @@ module.exports = {
|
|||
patterns: [
|
||||
{ from: 'node_modules/@hpcc-js/wasm/dist/graphvizlib.wasm', to: 'static/js' },
|
||||
{ from: 'node_modules/@hpcc-js/wasm/dist/expatlib.wasm', to: 'static/js' },
|
||||
{ from: 'node_modules/emojibase-data/en/data.json', to: 'static/js/emoji-data.json' }
|
||||
{ from: 'node_modules/emoji-picker-element-data/en/emojibase/data.json', to: 'static/js/emoji-data.json' }
|
||||
],
|
||||
}),
|
||||
...when(Boolean(process.env.ANALYZE), () => [
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
"d3-graphviz": "3.2.0",
|
||||
"diff": "5.0.0",
|
||||
"emoji-picker-element": "1.5.0",
|
||||
"emojibase-data": "5.1.1",
|
||||
"emoji-picker-element-data": "1.2.0",
|
||||
"eslint-config-react-app": "6.0.0",
|
||||
"eslint-plugin-flowtype": "5.7.2",
|
||||
"eslint-plugin-import": "2.23.4",
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import emojiData from 'emojibase-data/en/compact.json'
|
||||
import emojiData from 'emoji-picker-element-data/en/emojibase/data.json'
|
||||
import { ForkAwesomeIcons } from '../../../editor-page/editor-pane/tool-bar/emoji-picker/icon-names'
|
||||
|
||||
interface EmojiEntry {
|
||||
shortcodes: string[]
|
||||
unicode: string
|
||||
emoji: string
|
||||
}
|
||||
|
||||
type ShortCodeMap = { [key: string]: string }
|
||||
|
@ -17,7 +17,7 @@ type ShortCodeMap = { [key: string]: string }
|
|||
const shortCodeMap = (emojiData as unknown as EmojiEntry[])
|
||||
.reduce((reduceObject, emoji) => {
|
||||
emoji.shortcodes.forEach(shortcode => {
|
||||
reduceObject[shortcode] = emoji.unicode
|
||||
reduceObject[shortcode] = emoji.emoji
|
||||
})
|
||||
return reduceObject
|
||||
}, {} as ShortCodeMap)
|
||||
|
|
Binary file not shown.
10
yarn.lock
10
yarn.lock
|
@ -6096,6 +6096,11 @@ emittery@^0.7.1:
|
|||
resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82"
|
||||
integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==
|
||||
|
||||
emoji-picker-element-data@1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-picker-element-data/-/emoji-picker-element-data-1.2.0.tgz#755790b7e3ff5f62ae51220692b0359b704f4fd1"
|
||||
integrity sha512-ziHcTY/7SFbk4KI0rQ6cb/KZo9A5ow0N3QT9bPTGGRxYAJd5gFQjShaM0OkW12rpLlKekOSOMT2hOlJB5QGqWQ==
|
||||
|
||||
emoji-picker-element@1.5.0:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/emoji-picker-element/-/emoji-picker-element-1.5.0.tgz#eb5aa5b3a33118292a52970152f63221c890b308"
|
||||
|
@ -6116,11 +6121,6 @@ emoji-regex@^9.0.0:
|
|||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
||||
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
||||
|
||||
emojibase-data@5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/emojibase-data/-/emojibase-data-5.1.1.tgz#0a0d63dd07ce1376b3d27642f28cafa46f651de6"
|
||||
integrity sha512-za/ma5SfogHjwUmGFnDbTvSfm8GGFvFaPS27GPti16YZSp5EPgz+UDsZCATXvJGit+oRNBbG/FtybXHKi2UQgQ==
|
||||
|
||||
emojis-list@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
|
||||
|
|
Loading…
Reference in a new issue