chore: update nuxt to 3.10.3 (#2610)

This commit is contained in:
Joaquín Sánchez 2024-02-24 17:46:14 +01:00 committed by GitHub
parent 1fefb6e5b6
commit 55037f04cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 3584 additions and 3766 deletions

View file

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { LocaleObject } from '@nuxtjs/i18n'
import type { AriaAnnounceType, AriaLive } from '~/composables/aria'
import type { LocaleObject } from '#i18n'
const router = useRouter()
const { t, locale, locales } = useI18n()

View file

@ -33,7 +33,7 @@ const previewImage = ref('')
const imageSrc = computed<string>(() => previewImage.value || defaultImage.value)
async function pickImage() {
if (process.server)
if (import.meta.server)
return
const image = await fileOpen({
description: 'Image',

View file

@ -22,7 +22,7 @@ const slider = ref()
const slide = ref()
const image = ref()
const reduceMotion = process.server ? ref(false) : useReducedMotion()
const reduceMotion = import.meta.server ? ref(false) : useReducedMotion()
const isInitialScrollDone = useTimeout(350)
const canAnimate = computed(() => isInitialScrollDone.value && !reduceMotion.value)

View file

@ -46,7 +46,7 @@ useCommand({
@click="to ? $scrollToTop() : undefined"
>
<div
w-full flex w-fit px5 py3 md:gap2 gap4 items-center
w-full flex px5 py3 md:gap2 gap4 items-center
transition-250 group-hover:bg-active
group-focus-visible:ring="2 current"
>

View file

@ -1,6 +1,6 @@
<script lang="ts" setup>
import type { ComputedRef } from 'vue'
import type { LocaleObject } from '#i18n'
import type { LocaleObject } from '@nuxtjs/i18n'
const userSettings = useUserSettings()

View file

@ -88,7 +88,7 @@ async function deleteAndRedraft() {
}) !== 'confirm')
return
if (process.dev) {
if (import.meta.dev) {
// eslint-disable-next-line no-alert
const result = confirm('[DEV] Are you sure you want to delete and re-draft this post?')
if (!result)

View file

@ -64,7 +64,7 @@ const meta = computed(() => {
const avatar = `https://github.com/${user}.png?size=256`
const author = props.card.authorName
const info = {
return {
type,
user,
titleUrl: `https://github.com/${user}${repo ? `/${repo}` : ''}`,
@ -78,8 +78,7 @@ const meta = computed(() => {
user: author,
}
: undefined,
}
return info
} satisfies Meta
})
</script>

View file

@ -26,13 +26,12 @@ const meta = computed(() => {
const lines = meta?.[2]
const code = meta?.[3].split('\n').slice(0, maxLines).join('\n')
const project = props.card.title?.replace(' - StackBlitz', '')
const info = {
return {
file,
lines,
code,
project,
}
return info
} satisfies Meta
})
const vnodeCode = computed(() => {

View file

@ -13,7 +13,7 @@ const { items, command } = defineProps<{
}>()
const emojis = computed(() => {
if (process.server)
if (import.meta.server)
return []
return items.map((item: CustomEmoji | Emoji) => {