chore(deps): bump dependencies

This commit is contained in:
Neko Ayaka
2025-08-29 01:38:04 +08:00
parent cf61c06381
commit dc6dff5a6d
32 changed files with 5862 additions and 3715 deletions
+4 -4
View File
@@ -99,8 +99,8 @@ function createPRNG(seed: number) {
return min + nextFloat() * (max - min)
}
function choice<T>(arr: T[]) {
return arr[Math.floor(next(0, arr.length))]
function choice<T>(arr: T[]): T {
return arr[Math.floor(next(0, arr.length))]!
}
return {
@@ -135,7 +135,7 @@ async function createTileGenerator(title: string) {
pathData += ` L ${x} ${yOffset + Math.sin(x * frequency) * amplitude}`
}
paths += `<path d="${pathData}" fill="none" stroke="${stroke.toHex()}" stroke-width="${strokeWidth}" />`
paths += `<path d="${pathData}" fill="none" stroke="${stroke?.toHex() || '#000'}" stroke-width="${strokeWidth}" />`
}
return paths
@@ -215,7 +215,7 @@ const svgArts = computedAsync(async () => {
<div class="rounded-t-xl">
<ClientOnly>
<div v-if="!post.frontmatter?.['preview-cover']?.[isDark ? 'dark' : 'light']" class="mb-6 h-20 md:h-60">
<div class="blur-lg" h="full" w-full v-html="isDark ? svgArts?.[index].dark : svgArts?.[index].light" />
<div class="blur-lg" h="full" w-full v-html="isDark ? svgArts?.[index]?.dark : svgArts?.[index]?.light" />
</div>
<div v-else class="relative mb-0 h-44 w-full md:h-68">
<div class="preview-card-art-image-overlay" />
@@ -8,7 +8,7 @@ defineProps<{
function onClick({ target: el }: Event) {
const id = (el as HTMLAnchorElement).href!.split('#')[1]
const heading = document.getElementById(decodeURIComponent(id))
const heading = document.getElementById(decodeURIComponent(id || ''))
heading?.focus({ preventScroll: true })
}
</script>
+3 -3
View File
@@ -26,9 +26,9 @@ const heroAnimatable = shallowRef<AnimatableObject>()
function animateHero(xOffsetRatio: number, yOffsetRatio: number) {
const referenceSize = innerWidth.value
heroAnimatable.value?.x(-xOffsetRatio * 0.03 * referenceSize)
heroAnimatable.value?.y(-yOffsetRatio * 0.03 * referenceSize)
heroAnimatable.value?.z(0)
heroAnimatable.value?.x?.(-xOffsetRatio * 0.03 * referenceSize)
heroAnimatable.value?.y?.(-yOffsetRatio * 0.03 * referenceSize)
heroAnimatable.value?.z?.(0)
}
function onMouseMove(event: MouseEvent) {
+9 -9
View File
@@ -23,17 +23,17 @@ const silhouettePurpleAnimatable = shallowRef<AnimatableObject>()
function animateCover(xOffsetRatio: number, yOffsetRatio: number) {
const referenceWidth = window.innerWidth
surfaceAnimatable.value?.x(-xOffsetRatio * 0.02 * referenceWidth)
surfaceAnimatable.value?.y(-yOffsetRatio * 0.02 * referenceWidth)
surfaceAnimatable.value?.z(0)
surfaceAnimatable.value?.x?.(-xOffsetRatio * 0.02 * referenceWidth)
surfaceAnimatable.value?.y?.(-yOffsetRatio * 0.02 * referenceWidth)
surfaceAnimatable.value?.z?.(0)
silhouettePinkAnimatable.value?.x(0.01 * referenceWidth - yOffsetRatio * 0.015 * referenceWidth)
silhouettePinkAnimatable.value?.y(0.02 * referenceWidth + xOffsetRatio * 0.015 * referenceWidth)
silhouettePinkAnimatable.value?.z(0)
silhouettePinkAnimatable.value?.x?.(0.01 * referenceWidth - yOffsetRatio * 0.015 * referenceWidth)
silhouettePinkAnimatable.value?.y?.(0.02 * referenceWidth + xOffsetRatio * 0.015 * referenceWidth)
silhouettePinkAnimatable.value?.z?.(0)
silhouettePurpleAnimatable.value?.x(0.01 * referenceWidth + yOffsetRatio * 0.01 * referenceWidth)
silhouettePurpleAnimatable.value?.y(-0.01 * referenceWidth - yOffsetRatio * 0.01 * referenceWidth)
silhouettePurpleAnimatable.value?.z(0)
silhouettePurpleAnimatable.value?.x?.(0.01 * referenceWidth + yOffsetRatio * 0.01 * referenceWidth)
silhouettePurpleAnimatable.value?.y?.(-0.01 * referenceWidth - yOffsetRatio * 0.01 * referenceWidth)
silhouettePurpleAnimatable.value?.z?.(0)
}
function onMouseMove(event: MouseEvent) {
+1 -1
View File
@@ -12,7 +12,7 @@ const open = ref(false)
const { meta_k } = useMagicKeys()
const { t } = useI18n()
whenever(meta_k, (n) => {
whenever(meta_k!, (n) => {
if (n)
open.value = true
})
+3 -3
View File
@@ -124,13 +124,13 @@ export function resolveHeaders(
const ret: MenuItem[] = []
// eslint-disable-next-line no-labels
outer: for (let i = 0; i < headers.length; i++) {
const cur = headers[i]
const cur = headers[i]!
if (i === 0) {
ret.push(cur)
}
else {
for (let j = i - 1; j >= 0; j--) {
const prev = headers[j]
const prev = headers[j]!
if (prev.level < cur.level) {
;(prev.children || (prev.children = [])).push(cur)
// eslint-disable-next-line no-labels
@@ -192,7 +192,7 @@ export function useActiveAnchor(
// page bottom - highlight last link
if (isBottom) {
activateLink(headers[headers.length - 1].link)
activateLink(headers[headers.length - 1]!.link)
return
}
+2 -2
View File
@@ -260,7 +260,7 @@ export function getSidebar(
return path.startsWith(ensureStartingSlash(dir))
})
const sidebar = dir ? _sidebar[dir] : []
const sidebar = dir ? _sidebar[dir]! : []
return Array.isArray(sidebar)
? addBase(sidebar)
: addBase(sidebar.items, sidebar.base)
@@ -275,7 +275,7 @@ export function getSidebarGroups(sidebar: SidebarItem[]): SidebarItem[] {
let lastGroupIndex: number = 0
for (const index in sidebar) {
const item = sidebar[index]
const item = sidebar[index]!
if (item.items) {
lastGroupIndex = groups.push(item)
+1 -1
View File
@@ -292,7 +292,7 @@ export default defineConfig({
return id && slug === id[1]
})
// Get the actual heading content
const title = state.tokens[idx + 1].content
const title = state.tokens[idx + 1]!.content
return {
'aria-label': `Permalink to "${title}"`,
}
@@ -15,7 +15,7 @@ function interpolate(characters: string[], initial?: Character[]) {
return [
...chars,
[
...chars.length > 0 ? chars[chars.length - 1] : [],
...chars.length > 0 ? chars[chars.length - 1]! : [],
{ value: c, variant: 'dotted' },
],
]
+14 -14
View File
@@ -21,18 +21,18 @@
"@moeru/std": "catalog:",
"@proj-airi/chromatic": "^1.0.0",
"@proj-airi/i18n": "workspace:^",
"@vueuse/core": "^13.6.0",
"@vueuse/core": "^13.8.0",
"colorjs.io": "^0.5.2",
"mark.js": "^8.11.1",
"motion-v": "^1.6.1",
"motion-v": "^1.7.0",
"pathe": "^2.0.3",
"reka-ui": "^2.4.1",
"vue": "^3.5.18",
"reka-ui": "^2.5.0",
"vue": "^3.5.20",
"vue-i18n": "^11.1.11",
"vue-sonner": "^2.0.2"
"vue-sonner": "^2.0.8"
},
"devDependencies": {
"@iconify-json/lucide": "^1.2.59",
"@iconify-json/lucide": "^1.2.65",
"@iconify/vue": "^5.0.0",
"@intlify/unplugin-vue-i18n": "^6.0.8",
"@mdit/plugin-footnote": "^0.22.2",
@@ -42,9 +42,9 @@
"@types/hast": "^3.0.4",
"@types/markdown-it": "^14.1.2",
"@types/markdown-it-anchor": "^7.0.0",
"@unocss/reset": "^66.3.3",
"@vue/tsconfig": "^0.7.0",
"animejs": "^4.1.2",
"@unocss/reset": "^66.4.2",
"@vue/tsconfig": "^0.8.1",
"animejs": "^4.1.3",
"fast-glob": "^3.3.3",
"gray-matter": "^4.0.3",
"markdown-it": "^14.1.0",
@@ -52,12 +52,12 @@
"minisearch": "^7.1.2",
"postcss": "^8.5.6",
"sharp": "^0.34.3",
"shiki": "^3.9.1",
"shiki": "^3.12.0",
"tinyglobby": "^0.2.14",
"tsx": "^4.20.3",
"tsx": "^4.20.5",
"uncrypto": "^0.1.3",
"unplugin-yaml": "^3.0.2",
"vitepress": "^2.0.0-alpha.9",
"vue-tsc": "^3.0.5"
"unplugin-yaml": "^3.0.4",
"vitepress": "^2.0.0-alpha.12",
"vue-tsc": "^3.0.6"
}
}
+2 -2
View File
@@ -6,12 +6,12 @@ export function transformJSDocLinks(md: MarkdownIt) {
state.tokens.forEach((token) => {
if (token.type === 'inline' && token.children?.length) {
for (let i = 0; i < token.children.length; i++) {
const child = token.children[i]
const child = token.children[i]!
if (child.type === 'text' && child.content.startsWith('{@link')) {
// eslint-disable-next-line regexp/no-super-linear-backtracking
const matches = child.content.match(/\{@link\s+(.*?)\}/)
if (matches) {
const linkText = matches[1]
const linkText = matches[1]!
const linkNode = new state.Token('link_open', 'a', 1)
linkNode.attrSet('href', linkText)
linkNode.attrSet('target', '_blank')