@@ -2,7 +2,7 @@ import type * as motionone from "@motionone/dom"
2
2
import type { PropertiesHyphen } from "csstype"
3
3
import type { JSX , ParentProps } from "solid-js"
4
4
5
- export type VariantDefinition = motionone . VariantDefinition
5
+ export type { VariantDefinition , Options } from "@ motionone/dom"
6
6
7
7
export interface MotionEventHandlers {
8
8
onMotionStart ?: ( event : motionone . MotionEvent ) => void
@@ -15,19 +15,25 @@ export interface MotionEventHandlers {
15
15
onViewLeave ?: ( event : motionone . ViewEvent ) => void
16
16
}
17
17
18
- /*
19
- Solid style attribute supports only kebab-case properties.
20
- While @motionone/dom supports both camelCase and kebab-case,
21
- but provides only camelCase properties in the types.
22
- */
23
18
declare module "@motionone/dom" {
19
+ /*
20
+ Solid style attribute supports only kebab-case properties.
21
+ While @motionone/dom supports both camelCase and kebab-case,
22
+ but provides only camelCase properties in the types.
23
+ */
24
24
interface CSSStyleDeclarationWithTransform
25
25
extends Omit < PropertiesHyphen , "direction" | "transition" > { }
26
+
27
+ /*
28
+ exit is missing in types in motionone core
29
+ because it is only used in the Presence implementations
30
+ */
31
+ interface Options {
32
+ exit ?: motionone . VariantDefinition
33
+ }
26
34
}
27
35
28
- export type Options = motionone . Options & { exit ?: VariantDefinition }
29
-
30
- export type MotionComponentProps = ParentProps < MotionEventHandlers & Options >
36
+ export type MotionComponentProps = ParentProps < MotionEventHandlers & motionone . Options >
31
37
32
38
export type MotionComponent = {
33
39
// <Motion />
@@ -48,7 +54,7 @@ export type MotionProxy = MotionComponent & {
48
54
declare module "solid-js" {
49
55
namespace JSX {
50
56
interface Directives {
51
- motion : Options
57
+ motion : motionone . Options
52
58
}
53
59
}
54
60
}
0 commit comments