mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-26 11:37:40 +02:00
Merge pull request #132 from jiftechnify/upgrade-emojilib
Upgrade emojilib to version 3
This commit is contained in:
5
.changeset/violet-adults-share.md
Normal file
5
.changeset/violet-adults-share.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"nostrudel": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update emojilib
|
@@ -45,7 +45,7 @@
|
|||||||
"codemirror-json-schema": "^0.6.1",
|
"codemirror-json-schema": "^0.6.1",
|
||||||
"dayjs": "^1.11.9",
|
"dayjs": "^1.11.9",
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"emojilib": "2",
|
"emojilib": "^3",
|
||||||
"framer-motion": "^10.16.0",
|
"framer-motion": "^10.16.0",
|
||||||
"hls.js": "^1.4.14",
|
"hls.js": "^1.4.14",
|
||||||
"idb": "^8.0.0",
|
"idb": "^8.0.0",
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { PropsWithChildren, createContext, useContext } from "react";
|
import { PropsWithChildren, createContext, useContext } from "react";
|
||||||
import { lib } from "emojilib";
|
import lib from "emojilib";
|
||||||
|
|
||||||
import useReplaceableEvents from "../../hooks/use-replaceable-events";
|
import useReplaceableEvents from "../../hooks/use-replaceable-events";
|
||||||
import useCurrentAccount from "../../hooks/use-current-account";
|
import useCurrentAccount from "../../hooks/use-current-account";
|
||||||
@@ -7,10 +7,10 @@ import { isEmojiTag } from "../../types/nostr-event";
|
|||||||
import useFavoriteEmojiPacks from "../../hooks/use-favorite-emoji-packs";
|
import useFavoriteEmojiPacks from "../../hooks/use-favorite-emoji-packs";
|
||||||
import { getPackCordsFromFavorites } from "../../helpers/nostr/emoji-packs";
|
import { getPackCordsFromFavorites } from "../../helpers/nostr/emoji-packs";
|
||||||
|
|
||||||
const defaultEmojis = Object.entries(lib).map(([name, emojiObject]) => ({
|
const defaultEmojis = Object.entries(lib).map(([char, [name, ...keywords]]) => ({
|
||||||
...emojiObject,
|
|
||||||
keywords: [name, ...emojiObject.keywords],
|
|
||||||
name,
|
name,
|
||||||
|
keywords: [name, ...keywords],
|
||||||
|
char,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export type Emoji = { name: string; keywords: string[]; char: string; url?: string };
|
export type Emoji = { name: string; keywords: string[]; char: string; url?: string };
|
||||||
|
11
src/types/emojilib.d.ts
vendored
11
src/types/emojilib.d.ts
vendored
@@ -1,11 +1,4 @@
|
|||||||
type EmojiShape = {
|
|
||||||
keywords: string[];
|
|
||||||
char: string;
|
|
||||||
fitzpatrick_scale: boolean;
|
|
||||||
category: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
declare module "emojilib" {
|
declare module "emojilib" {
|
||||||
const lib: { [key: string]: EmojiShape };
|
const lib: { [char: string]: string[] };
|
||||||
export { lib };
|
export default lib;
|
||||||
}
|
}
|
||||||
|
@@ -4025,10 +4025,10 @@ emoji-regex@^8.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
||||||
|
|
||||||
emojilib@2:
|
emojilib@3:
|
||||||
version "2.4.0"
|
version "3.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/emojilib/-/emojilib-2.4.0.tgz#ac518a8bb0d5f76dda57289ccb2fdf9d39ae721e"
|
resolved "https://registry.yarnpkg.com/emojilib/-/emojilib-3.0.11.tgz#10ba04e72e52e91b960d62f80f8463e2405a1b46"
|
||||||
integrity sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==
|
integrity sha512-OuML9z640prB+0Rms1RgzJrBAqNC9mFdqT2HeFcXSGSGNEiZh9adsaPPxWbqRoMyJPzu+zNKPyGKv4/sPmJDyg==
|
||||||
|
|
||||||
enquirer@^2.3.0:
|
enquirer@^2.3.0:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
|
Reference in New Issue
Block a user