diff --git a/packages/applet/src/modules/custom-inspector/components/timeline/Index.vue b/packages/applet/src/modules/custom-inspector/components/timeline/Index.vue index 901f2c9d1..4b3514dd8 100644 --- a/packages/applet/src/modules/custom-inspector/components/timeline/Index.vue +++ b/packages/applet/src/modules/custom-inspector/components/timeline/Index.vue @@ -6,5 +6,5 @@ const state = useCustomInspectorState() diff --git a/packages/ui/src/components/DarkToggle.vue b/packages/ui/src/components/DarkToggle.vue index efb473d25..4ac85188a 100644 --- a/packages/ui/src/components/DarkToggle.vue +++ b/packages/ui/src/components/DarkToggle.vue @@ -27,8 +27,7 @@ const isDark = computed({ set: v => mode.value = v ? 'dark' : 'light', }) -// @ts-expect-error: Transition API -const isAppearanceTransition = document.startViewTransition +const isAppearanceTransition = !!document.startViewTransition && !window.matchMedia('(prefers-reduced-motion: reduce)').matches /** * Credit to [@hooray](https://github.com/hooray) @@ -45,7 +44,6 @@ function toggle(event?: MouseEvent) { Math.max(x, innerWidth - x), Math.max(y, innerHeight - y), ) - // @ts-expect-error: Transition API const transition = document.startViewTransition(async () => { isDark.value = !isDark.value await nextTick() diff --git a/packages/ui/src/components/Select.vue b/packages/ui/src/components/Select.vue index dc7f12dcd..999afce0c 100644 --- a/packages/ui/src/components/Select.vue +++ b/packages/ui/src/components/Select.vue @@ -1,6 +1,6 @@