mirror of
https://github.com/docmost/docmost.git
synced 2026-05-15 13:14:11 +08:00
refactor(emoji): switch to @slidoapp/emoji-mart fork for accessibility
This commit is contained in:
@@ -19,8 +19,6 @@
|
||||
"@atlaskit/pragmatic-drag-and-drop-live-region": "^1.3.4",
|
||||
"@casl/react": "^5.0.1",
|
||||
"@docmost/editor-ext": "workspace:*",
|
||||
"@emoji-mart/data": "^1.2.1",
|
||||
"@emoji-mart/react": "^1.1.1",
|
||||
"@excalidraw/excalidraw": "0.18.0-3a5ef40",
|
||||
"@mantine/core": "^8.3.18",
|
||||
"@mantine/dates": "^8.3.18",
|
||||
@@ -29,6 +27,9 @@
|
||||
"@mantine/modals": "^8.3.18",
|
||||
"@mantine/notifications": "^8.3.18",
|
||||
"@mantine/spotlight": "^8.3.18",
|
||||
"@slidoapp/emoji-mart": "^5.8.7",
|
||||
"@slidoapp/emoji-mart-data": "^1.2.4",
|
||||
"@slidoapp/emoji-mart-react": "^1.1.5",
|
||||
"@tabler/icons-react": "^3.40.0",
|
||||
"@tanstack/react-query": "5.90.17",
|
||||
"@tanstack/react-virtual": "3.13.24",
|
||||
@@ -36,7 +37,6 @@
|
||||
"axios": "1.16.0",
|
||||
"blueimp-load-image": "^5.16.0",
|
||||
"clsx": "^2.1.1",
|
||||
"emoji-mart": "^5.6.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"highlightjs-sap-abap": "^0.3.0",
|
||||
"i18next": "25.10.1",
|
||||
|
||||
@@ -21,7 +21,7 @@ let _emojiIndex: EmojiIndexEntry[] | null = null;
|
||||
|
||||
export const buildEmojiIndex = async (): Promise<EmojiIndexEntry[]> => {
|
||||
if (_emojiIndex) return _emojiIndex;
|
||||
const { default: data } = await import("@emoji-mart/data");
|
||||
const { default: data } = await import('@slidoapp/emoji-mart-data');
|
||||
_emojiIndex = (Object.values((data as any).emojis) as any[])
|
||||
.filter((e) => e.id && e.name && e.skins?.[0]?.native)
|
||||
.map((e) => ({
|
||||
@@ -74,7 +74,7 @@ let _cats: EmojiCategory[] | null = null;
|
||||
export const getEmojiCategories = async (): Promise<EmojiCategory[]> => {
|
||||
if (_cats) return _cats;
|
||||
const [{ default: data }, index] = await Promise.all([
|
||||
import("@emoji-mart/data"),
|
||||
import("@slidoapp/emoji-mart-data"),
|
||||
buildEmojiIndex(),
|
||||
]);
|
||||
const byId = new Map(index.map((e) => [e.id, e]));
|
||||
|
||||
Reference in New Issue
Block a user