motiondivision/motion

[FEATURE] Export types from motion/react to be imported in vanilla motion

Opened this issue · 1 comments

Now that Motion has a vanilla API, most of the types are only available under motion/react. Is it possible to export them under motion?

For example, you want to create your own wrapper in Svelte, you will have to import all of the ff. props in motion/react

<script lang="ts">
import type {
  DOMKeyframesDefinition,
  DynamicAnimationOptions,
  AnimationPlaybackControls,
  MotionProps // this can be used in other frameworks
} from 'motion/react' // nice if can be imported in `motion`!

const props: MotionProps = $props()
</script>

Also have the same issue, happy to raise a PR for the first two types as that's what I'm after to start working with this in Vue. Should be a simple matter.