<commit_before><template>
<img v-if="customEmoji" class="fvgwvorwhxigeolkkrcderjzcawqrscl custom" :src="url" :alt="alt" :title="alt"/>
<img v-else-if="char && !useOsDefaultEmojis" class="fvgwvorwhxigeolkkrcderjzcawqrscl" :src="url" :alt="alt" :title="alt"/>
<span v-else-if="char && useOsDefaultEmojis">{{ char }}</span>
<span v-else>:{{ name }}:</span>
</template>

<script lang="ts">
import Vue from 'vue';
import { lib } from 'emojilib';

export default Vue.extend({
	props: {
		name: {
			type: String,
			required: false
		},
		emoji: {
			type: String,
			required: false
		},
		customEmojis: {
			required: false,
			default: []
		}
	},

	data() {
		return {
			url: null,
			char: null,
			customEmoji: null
		}
	},

	computed: {
		alt(): string {
			return this.customEmoji ? `:${this.customEmoji.name}:` : this.char;
		},

		useOsDefaultEmojis(): boolean {
			return this.$store.state.device.useOsDefaultEmojis;
		}
	},

	created() {
		if (this.name) {
			const customEmoji = this.customEmojis.find(x => x.name == this.name);
			if (customEmoji) {
				this.customEmoji = customEmoji;
				this.url = customEmoji.url;
			} else {
				const emoji = lib[this.name];
				if (emoji) {
					this.char = emoji.char;
				}
			}
		} else {
			this.char = this.emoji;
		}

		if (this.char) {
			this.url = `https://twemoji.maxcdn.com/2/svg/${this.char.codePointAt(0).toString(16)}.svg`;
		}
	}
});
</script>

<style lang="stylus" scoped>
.fvgwvorwhxigeolkkrcderjzcawqrscl
	height 1em

	&.custom
		height 2.5em
		vertical-align middle

</style><commit_msg>[Client] カスタム絵文字にホバーしたときに拡大するエフェクトを追加<commit_after><template>
<img v-if="customEmoji" class="fvgwvorwhxigeolkkrcderjzcawqrscl custom" :src="url" :alt="alt" :title="alt"/>
<img v-else-if="char && !useOsDefaultEmojis" class="fvgwvorwhxigeolkkrcderjzcawqrscl" :src="url" :alt="alt" :title="alt"/>
<span v-else-if="char && useOsDefaultEmojis">{{ char }}</span>
<span v-else>:{{ name }}:</span>
</template>

<script lang="ts">
import Vue from 'vue';
import { lib } from 'emojilib';

export default Vue.extend({
	props: {
		name: {
			type: String,
			required: false
		},
		emoji: {
			type: String,
			required: false
		},
		customEmojis: {
			required: false,
			default: []
		}
	},

	data() {
		return {
			url: null,
			char: null,
			customEmoji: null
		}
	},

	computed: {
		alt(): string {
			return this.customEmoji ? `:${this.customEmoji.name}:` : this.char;
		},

		useOsDefaultEmojis(): boolean {
			return this.$store.state.device.useOsDefaultEmojis;
		}
	},

	created() {
		if (this.name) {
			const customEmoji = this.customEmojis.find(x => x.name == this.name);
			if (customEmoji) {
				this.customEmoji = customEmoji;
				this.url = customEmoji.url;
			} else {
				const emoji = lib[this.name];
				if (emoji) {
					this.char = emoji.char;
				}
			}
		} else {
			this.char = this.emoji;
		}

		if (this.char) {
			this.url = `https://twemoji.maxcdn.com/2/svg/${this.char.codePointAt(0).toString(16)}.svg`;
		}
	}
});
</script>

<style lang="stylus" scoped>
.fvgwvorwhxigeolkkrcderjzcawqrscl
	height 1em

	&.custom
		height 2.5em
		vertical-align middle
		transition transform 0.2s ease

		&:hover
			transform scale(1.2)

</style>
{'fraction_non_alphanumeric': 0.17375, 'fraction_numerical': 0.005625, 'mean_word_length': 3.476923076923077, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4932493', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1334, 'n_words': 235}