Update twemoji package, emoji lists, and dependency updates (#957)

<!-- Please read
https://github.com/SableClient/Sable/blob/dev/CONTRIBUTING.md before
submitting your pull request -->

### Description

<!-- Please include a summary of the change. Please also include
relevant motivation and context. List any dependencies that are required
for this change. -->

Title, for details on emoji changes check the sable twemoji repo.
Also updated various dependencies that have new minor versions, tried to
avoid anything that could be breaking so should be pretty safe.
Also also, updates build target to ES2022. So. Uh. Hopefully no one is
still using tech that doesn't support that? Prior to this change Vite by
default aimed to support ES2020, but safari 14 has some problems that
prevented compiling so I bumped it.

#### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings

### AI disclosure:

- [ ] Partially AI assisted (clarify which code was AI assisted and
briefly explain what it does).
- [ ] Fully AI generated (explain what all the generated code does in
moderate detail).
<!-- Write any explanation required here, but do not generate the
explanation using AI!! You must prove you understand what the code in
this PR does. -->
This commit is contained in:
7w1 authored and GitHub committed 2026-06-17 17:08:36 -05:00
commit 8ad92956be
8 files changed
+3163 -3778

No files matched your search

@@ -0,0 +1,5 @@
---
default: patch
---
Fixed broken Twemoji rendering and updated emoji picker, autocomplete, and jumbo detection for new emojis.
+5
View File
@@ -0,0 +1,5 @@
---
default: patch
---
Updated various dependencies.
+56 -50
View File
@@ -26,79 +26,80 @@
"postinstall": "node scripts/install-knope.js"
},
"dependencies": {
"@arborium/arborium": "^2.16.0",
"@atlaskit/pragmatic-drag-and-drop": "^1.7.7",
"@arborium/arborium": "^2.18.0",
"@atlaskit/pragmatic-drag-and-drop": "^1.8.1",
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.4.0",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.2.0",
"@fontsource-variable/nunito": "5.2.7",
"@fontsource/space-mono": "5.2.9",
"@phosphor-icons/react": "^2.1.10",
"@sableclient/twemoji-font": "^1.0.2",
"@sentry/react": "^10.43.0",
"@tanstack/react-query": "^5.90.21",
"@tanstack/react-query-devtools": "^5.91.3",
"@tanstack/react-virtual": "^3.13.19",
"@sableclient/twemoji-font": "^1.0.3",
"@sentry/react": "^10.58.0",
"@tanstack/react-query": "^5.101.0",
"@tanstack/react-query-devtools": "^5.101.0",
"@tanstack/react-virtual": "^3.14.3",
"@use-gesture/react": "10.3.1",
"@vanilla-extract/css": "^1.18.0",
"@vanilla-extract/css": "^1.20.1",
"@vanilla-extract/recipes": "^0.5.7",
"@vanilla-extract/vite-plugin": "^5.1.4",
"@vanilla-extract/vite-plugin": "^5.2.2",
"await-to-js": "^3.0.0",
"badwords-list": "^2.0.1-4",
"badwords-list": "2.0.1-4",
"blurhash": "^2.0.5",
"browser-encrypt-attachment": "^0.3.0",
"chroma-js": "^3.2.0",
"classnames": "^2.5.1",
"dayjs": "^1.11.19",
"dayjs": "^1.11.21",
"domhandler": "^5.0.3",
"dompurify": "^3.3.3",
"emojibase": "^15.3.1",
"emojibase-data": "^15.3.2",
"dompurify": "^3.4.10",
"emoji-regex": "^10.6.0",
"emojibase": "^17.0.0",
"emojibase-data": "^17.0.0",
"eventemitter3": "^5.0.4",
"file-saver": "^2.0.5",
"focus-trap-react": "^10.3.1",
"folds": "^2.6.2",
"framer-motion": "12.34.3",
"framer-motion": "^12.40.0",
"html-dom-parser": "^5.1.8",
"html-react-parser": "^4.2.10",
"i18next": "^25.8.13",
"i18next": "^25.10.10",
"i18next-browser-languagedetector": "^8.2.1",
"i18next-http-backend": "^2.7.3",
"immer": "^9.0.21",
"is-hotkey": "^0.2.0",
"jotai": "^2.18.0",
"katex": "^0.16.45",
"jotai": "^2.20.1",
"katex": "^0.16.47",
"leaflet": "1.9.4",
"linkify-react": "^4.3.2",
"linkifyjs": "^4.3.2",
"marked": "^18.0.2",
"linkify-react": "^4.3.3",
"linkifyjs": "^4.3.3",
"marked": "^18.0.5",
"matrix-js-sdk": "^38.4.0",
"matrix-widget-api": "^1.16.1",
"pdfjs-dist": "^5.4.624",
"matrix-widget-api": "^1.17.0",
"pdfjs-dist": "^5.7.284",
"react": "^18.3.1",
"react-aria": "^3.46.0",
"react-aria": "^3.49.0",
"react-blurhash": "^0.3.0",
"react-colorful": "^5.6.1",
"react-colorful": "^5.7.0",
"react-dom": "^18.3.1",
"react-google-recaptcha": "^2.1.0",
"react-i18next": "^16.5.4",
"react-i18next": "^16.6.6",
"react-leaflet": "^4.2.1",
"react-range": "^1.10.0",
"react-router-dom": "^6.30.3",
"slate": "^0.123.0",
"slate-dom": "^0.123.0",
"react-router-dom": "^6.30.4",
"slate": "^0.124.1",
"slate-dom": "^0.124.1",
"slate-history": "^0.113.1",
"slate-react": "^0.123.0",
"slate-react": "^0.124.2",
"ua-parser-js": "^1.0.41",
"virtua": "^0.48.8",
"workbox-precaching": "^7.4.0"
"virtua": "^0.49.1",
"workbox-precaching": "^7.4.1"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.26.0",
"@cloudflare/vite-plugin": "^1.41.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@rollup/plugin-inject": "^5.0.5",
"@rollup/plugin-wasm": "^6.2.2",
"@sableclient/sable-call-embedded": "v1.1.4",
"@sentry/vite-plugin": "^5.1.1",
"@sableclient/sable-call-embedded": "1.1.4",
"@sentry/vite-plugin": "^5.3.0",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
@@ -107,33 +108,38 @@
"@types/is-hotkey": "^0.1.10",
"@types/leaflet": "^1.9.21",
"@types/node": "24.10.13",
"@types/react": "^18.3.28",
"@types/react": "^18.3.31",
"@types/react-dom": "^18.3.7",
"@types/react-google-recaptcha": "^2.1.9",
"@types/ua-parser-js": "^0.7.39",
"@vitejs/plugin-react": "^5.1.4",
"@vitest/coverage-v8": "^4.1.0",
"@vitest/ui": "^4.1.0",
"@vitejs/plugin-react": "^5.2.0",
"@vitest/coverage-v8": "^4.1.9",
"@vitest/ui": "^4.1.9",
"buffer": "^6.0.3",
"cloudflared": "^0.7.1",
"jsdom": "^29.0.0",
"jsdom": "^29.1.1",
"knip": "5.85.0",
"oxfmt": "^0.45.0",
"oxlint": "^1.70.0",
"oxlint-tsgolint": "^0.21.0",
"oxlint-tsgolint": "^0.23.0",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vite-plugin-compression2": "2.5.0",
"vite-plugin-pwa": "^1.2.0",
"vite-plugin-static-copy": "^3.2.0",
"vite": "^7.3.5",
"vite-plugin-compression2": "^2.5.3",
"vite-plugin-pwa": "^1.3.0",
"vite-plugin-static-copy": "^3.4.0",
"vite-plugin-svgr": "4.5.0",
"vite-plugin-top-level-await": "^1.6.0",
"vitest": "^4.1.0",
"wrangler": "^4.70.0"
"vitest": "^4.1.9",
"wrangler": "^4.101.0"
},
"engines": {
"node": "24.x",
"pnpm": ">=10"
},
"packageManager": "[email protected]+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be"
}
"packageManager": "[email protected]+sha512.a706938f0e89ac1456b6563eab4edf1d1faf3368d1191fc5c59790e96dc918e4456ab2e67d613de1043d2e8c81f87303e6b40d4ffeca9df15ef1ad567348f2be",
"pnpm": {
"overrides": {
"jsdom>undici": "^7.28.0"
}
}
}
+3084 -3724
View File
File diff suppressed because it is too large. Load diff
+4 -1
View File
@@ -1,6 +1,8 @@
import { pluginVersion } from '@arborium/arborium';
export type ArboriumThemeKind = 'light' | 'dark';
export const ARBORIUM_CDN_VERSION = '2.16.0';
export const ARBORIUM_CDN_VERSION = pluginVersion;
const ARBORIUM_THEME_DEFINITIONS = [
{ id: 'alabaster', label: 'Alabaster', kind: 'light' },
@@ -33,6 +35,7 @@ const ARBORIUM_THEME_DEFINITIONS = [
{ id: 'zenburn', label: 'Zenburn', kind: 'dark' },
{ id: 'cobalt2', label: 'Cobalt2', kind: 'dark' },
{ id: 'ef-melissa-dark', label: 'Ef Melissa Dark', kind: 'dark' },
{ id: 'evergarden-fall', label: 'Evergarden Fall', kind: 'dark' },
{ id: 'rustdoc-dark', label: 'Rustdoc Dark', kind: 'dark' },
{ id: 'rustdoc-ayu', label: 'Rustdoc Ayu', kind: 'dark' },
] as const;
+3 -2
View File
@@ -17,6 +17,7 @@ import {
import type { IntermediateRepresentation, OptFn, Opts as LinkifyOpts } from 'linkifyjs';
import Linkify from 'linkify-react';
import type { ChildNode } from 'domhandler';
import emojiRegex from 'emoji-regex';
import * as css from '$styles/CustomHtml.css';
import {
@@ -27,7 +28,7 @@ import {
} from '$utils/matrix';
import { getMemberDisplayName } from '$utils/room';
import type { Nicknames } from '$state/nicknames';
import { EMOJI_PATTERN, sanitizeForRegex, URL_NEG_LB } from '$utils/regex';
import { sanitizeForRegex, URL_NEG_LB } from '$utils/regex';
import { findAndReplace } from '$utils/findAndReplace';
import { onEnterOrSpace } from '$utils/keyboard';
import { copyToClipboard } from '$utils/dom';
@@ -46,7 +47,7 @@ import {
import { isRedundantMatrixUriAnchorText, parseMatrixUri, testMatrixUri } from './matrix-uri';
import { getHexcodeForEmoji, getShortcodeFor } from './emoji';
const EMOJI_REG_G = new RegExp(`${URL_NEG_LB}(${EMOJI_PATTERN})`, 'g');
const EMOJI_REG_G = new RegExp(`${URL_NEG_LB}(${emojiRegex().source})`, 'g');
const shouldLinkifyDomText = (domNode: DOMText): boolean =>
!(domNode.parent && 'name' in domNode.parent && domNode.parent.name === 'code') &&
+3 -1
View File
@@ -1,3 +1,5 @@
import emojiRegex from 'emoji-regex';
/**
* https://www.npmjs.com/package/escape-string-regexp
*/
@@ -22,5 +24,5 @@ export const EMOJI_PATTERN = `[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u
// Thumbs up emoji found to have Variation Selector 16 at the end
// so included variation selector pattern in regex
export const JUMBO_EMOJI_REG = new RegExp(
`^(((${EMOJI_PATTERN})|(:.+?:))(${VARIATION_SELECTOR_PATTERN}|\\s)*){1,10}$`
`^(((${emojiRegex().source})|(:.+?:))(${VARIATION_SELECTOR_PATTERN}|\\s)*){1,10}$`
);
+3
View File
@@ -255,6 +255,9 @@ export default defineConfig(({ command }) => ({
outDir: 'dist',
sourcemap: true,
copyPublicDir: false,
// es2022+ avoids esbuild 0.27.7 failing to downlevel destructuring when
// vite-plugin-top-level-await re-transpiles chunks (see vitejs/vite#22225).
target: 'es2022',
rollupOptions: {
plugins: [inject({ Buffer: ['buffer', 'Buffer'] }) as PluginOption],
},