@tiptap/extension-emoji 3.4.4 → 3.4.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/extension-emoji",
3
3
  "description": "emoji extension for tiptap",
4
- "version": "3.4.4",
4
+ "version": "3.4.6",
5
5
  "homepage": "https://tiptap.dev/api/nodes/emoji",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -36,9 +36,9 @@
36
36
  "dist"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@tiptap/core": "^3.4.4",
40
- "@tiptap/suggestion": "^3.4.4",
41
- "@tiptap/pm": "^3.4.4"
39
+ "@tiptap/pm": "^3.4.6",
40
+ "@tiptap/core": "^3.4.6",
41
+ "@tiptap/suggestion": "^3.4.6"
42
42
  },
43
43
  "dependencies": {
44
44
  "emoji-regex": "^10.4.0",
@@ -49,9 +49,9 @@
49
49
  "emoji-datasource": "^7.0.2",
50
50
  "json5": "^2.2.3",
51
51
  "tsm": "^2.3.0",
52
- "@tiptap/core": "^3.4.4",
53
- "@tiptap/suggestion": "^3.4.4",
54
- "@tiptap/pm": "^3.4.4"
52
+ "@tiptap/pm": "^3.4.6",
53
+ "@tiptap/suggestion": "^3.4.6",
54
+ "@tiptap/core": "^3.4.6"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup",
package/src/emoji.ts CHANGED
@@ -295,10 +295,7 @@ export const Emoji = Node.create<EmojiOptions, EmojiStorage>({
295
295
 
296
296
  if (this.options.enableEmoticons) {
297
297
  // get the list of supported emoticons
298
- const emoticons = this.options.emojis
299
- .map(item => item.emoticons)
300
- .flat()
301
- .filter(item => item) as string[]
298
+ const emoticons = this.options.emojis.flatMap(item => item.emoticons).filter(item => item) as string[]
302
299
 
303
300
  const emoticonRegex = new RegExp(`(?:^|\\s)(${emoticons.map(item => escapeForRegEx(item)).join('|')}) $`)
304
301