Minimal reproduction steps:
drawer component from the current shadcn-vue template.Drawer.vue as-is:<script lang="ts" setup>
import type { DrawerRootEmits, DrawerRootProps } from "vaul-vue"
import { useForwardPropsEmits } from "reka-ui"
import { DrawerRoot } from "vaul-vue"
const props = withDefaults(defineProps<DrawerRootProps>(), {
shouldScaleBackground: true,
})
const emits = defineEmits<DrawerRootEmits>()
const forwarded = useForwardPropsEmits(props, emits)
</script>
<template>
<DrawerRoot
v-slot="slotProps"
data-slot="drawer"
v-bind="forwarded"
>
<slot v-bind="slotProps" />
</DrawerRoot>
</template>
nuxt typecheck (or vue-tsc --noEmit).Current upstream template:
The current Drawer.vue template can fail type-checking in Nuxt 4 consumers with:
error TS2698: Spread types may only be created from object types.
The error is reported at v-bind="forwarded".
In our consumer verification, this happened after updating to a package generated from the current shadcn-vue drawer template. Restoring the older cast fixes the problem:
const forwarded = useForwardPropsEmits(props, emits) as ComputedRef<Record<string, unknown>>
This looks like a type incompatibility around vaul-vue + reka-ui + Vue/Nuxt type-checking, but the generated component currently ships without the cast.
Expected behavior:
Actual behavior:
Drawer.vue manually to avoid TS2698. System:
OS: macOS 26.3.1
CPU: (12) arm64 Apple M4 Pro
Memory: 122.89 MB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.11.0 - /Users/yasuhiro.yamada/.volta/tools/image/node/24.11.0/bin/node
Yarn: 1.22.19 - /Users/yasuhiro.yamada/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 11.6.1 - /Users/yasuhiro.yamada/.volta/tools/image/node/24.11.0/bin/npm
pnpm: 10.30.3 - /Users/yasuhiro.yamada/.volta/tools/image/pnpm/10.30.0/bin/pnpm
Browsers:
Brave Browser: 143.1.85.116
Chrome: 147.0.7727.57
Safari: 26.3.1
npmPackages:
@vueuse/core: ^14.1.0 => 14.2.1
nuxt: ^4.2.0 => 4.3.1
reka-ui: ^2.9.6 => 2.9.6
shadcn-nuxt: ^2.6.2 => 2.6.2
shadcn-vue: ^2.6.2 => 2.6.2