non-square emoji

This commit is contained in:
Henry Jameson 2026-05-10 17:21:49 +03:00
commit 518e49b561
23 changed files with 69 additions and 2 deletions

View file

@ -112,6 +112,12 @@ export default {
type: Boolean,
default: true,
},
// Allow wide emoji (max 3:1 ratio)
allowNonSquareEmoji: {
required: false,
type: Boolean,
default: false,
},
},
// NEVER EVER TOUCH DATA INSIDE RENDER
render() {
@ -322,7 +328,7 @@ export default {
// slots updated -> rerender -> emit -> update up the tree -> rerender -> ...
// at least until vue3?
const result = (
<span class={['RichContent', this.faint ? '-faint' : '']}>
<span class={['RichContent', this.faint ? '-faint' : '', this.allowNonSquareEmoji ? '-allow-non-square-emoji' : '']}>
{this.collapse
? pass2.map((x) => {
if (!Array.isArray(x)) return x.replace(/\n/g, ' ')