motion-start 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (751) hide show
  1. package/README.md +42 -9
  2. package/{src → dist}/animation/UseAnimatedState.svelte +27 -25
  3. package/dist/animation/UseAnimatedState.svelte.d.ts +36 -0
  4. package/dist/animation/UseAnimatedState.svelte.d.ts.map +1 -0
  5. package/dist/animation/UseAnimation.svelte.d.ts +29 -0
  6. package/dist/animation/UseAnimation.svelte.d.ts.map +1 -0
  7. package/{src/animation/animate.ts → dist/animation/animate.d.ts} +59 -78
  8. package/dist/animation/animate.d.ts.map +1 -0
  9. package/dist/animation/animate.js +46 -0
  10. package/dist/animation/animation-controls.d.ts +12 -0
  11. package/dist/animation/animation-controls.d.ts.map +1 -0
  12. package/{src/animation/animation-controls.ts → dist/animation/animation-controls.js} +89 -101
  13. package/{src/animation/types.ts → dist/animation/types.d.ts} +84 -83
  14. package/dist/animation/types.d.ts.map +1 -0
  15. package/dist/animation/types.js +1 -0
  16. package/dist/animation/use-animated-state.d.ts +2 -0
  17. package/dist/animation/use-animated-state.d.ts.map +1 -0
  18. package/dist/animation/use-animated-state.js +1 -0
  19. package/dist/animation/use-animation.d.ts +62 -0
  20. package/dist/animation/use-animation.d.ts.map +1 -0
  21. package/{src/animation/use-animation.ts → dist/animation/use-animation.js} +66 -74
  22. package/dist/animation/utils/default-transitions.d.ts +27 -0
  23. package/dist/animation/utils/default-transitions.d.ts.map +1 -0
  24. package/{src/animation/utils/default-transitions.ts → dist/animation/utils/default-transitions.js} +57 -70
  25. package/dist/animation/utils/easing.d.ts +9 -0
  26. package/dist/animation/utils/easing.d.ts.map +1 -0
  27. package/{src/animation/utils/easing.ts → dist/animation/utils/easing.js} +42 -55
  28. package/dist/animation/utils/is-animatable.d.ts +17 -0
  29. package/dist/animation/utils/is-animatable.d.ts.map +1 -0
  30. package/{src/animation/utils/is-animatable.ts → dist/animation/utils/is-animatable.js} +33 -42
  31. package/{src/animation/utils/is-animation-controls.ts → dist/animation/utils/is-animation-controls.d.ts} +12 -17
  32. package/dist/animation/utils/is-animation-controls.d.ts.map +1 -0
  33. package/dist/animation/utils/is-animation-controls.js +8 -0
  34. package/{src/animation/utils/is-keyframes-target.ts → dist/animation/utils/is-keyframes-target.d.ts} +12 -17
  35. package/dist/animation/utils/is-keyframes-target.d.ts.map +1 -0
  36. package/dist/animation/utils/is-keyframes-target.js +8 -0
  37. package/dist/animation/utils/transitions.d.ts +35 -0
  38. package/dist/animation/utils/transitions.d.ts.map +1 -0
  39. package/{src/animation/utils/transitions.ts → dist/animation/utils/transitions.js} +211 -218
  40. package/{src/animation/utils/variant-resolvers.ts → dist/animation/utils/variant-resolvers.d.ts} +17 -15
  41. package/dist/animation/utils/variant-resolvers.d.ts.map +1 -0
  42. package/dist/animation/utils/variant-resolvers.js +1 -0
  43. package/{src → dist}/components/AnimatePresence/AnimatePresence.svelte +16 -8
  44. package/dist/components/AnimatePresence/AnimatePresence.svelte.d.ts +39 -0
  45. package/dist/components/AnimatePresence/AnimatePresence.svelte.d.ts.map +1 -0
  46. package/{src → dist}/components/AnimatePresence/PresenceChild/PresenceChild.svelte +14 -14
  47. package/dist/components/AnimatePresence/PresenceChild/PresenceChild.svelte.d.ts +29 -0
  48. package/dist/components/AnimatePresence/PresenceChild/PresenceChild.svelte.d.ts.map +1 -0
  49. package/{src/components/AnimatePresence/PresenceChild/index.ts → dist/components/AnimatePresence/PresenceChild/index.d.ts} +7 -7
  50. package/dist/components/AnimatePresence/PresenceChild/index.d.ts.map +1 -0
  51. package/dist/components/AnimatePresence/PresenceChild/index.js +5 -0
  52. package/{src/components/AnimatePresence/PresenceChild/types.ts → dist/components/AnimatePresence/PresenceChild/types.d.ts} +10 -10
  53. package/dist/components/AnimatePresence/PresenceChild/types.d.ts.map +1 -0
  54. package/dist/components/AnimatePresence/PresenceChild/types.js +1 -0
  55. package/{src/components/AnimatePresence/index.ts → dist/components/AnimatePresence/index.d.ts} +51 -46
  56. package/dist/components/AnimatePresence/index.d.ts.map +1 -0
  57. package/dist/components/AnimatePresence/index.js +2 -0
  58. package/dist/components/AnimatePresence/type.spec-d.d.ts +2 -0
  59. package/dist/components/AnimatePresence/type.spec-d.d.ts.map +1 -0
  60. package/dist/components/AnimatePresence/type.spec-d.js +6 -0
  61. package/{src/components/AnimatePresence/types.ts → dist/components/AnimatePresence/types.d.ts} +82 -79
  62. package/dist/components/AnimatePresence/types.d.ts.map +1 -0
  63. package/dist/components/AnimatePresence/types.js +1 -0
  64. package/dist/components/AnimatePresence/use-presence.d.ts +56 -0
  65. package/dist/components/AnimatePresence/use-presence.d.ts.map +1 -0
  66. package/{src/components/AnimatePresence/use-presence.ts → dist/components/AnimatePresence/use-presence.js} +69 -90
  67. package/{src → dist}/components/AnimateSharedLayout/AnimateSharedLayout.svelte +22 -15
  68. package/dist/components/AnimateSharedLayout/AnimateSharedLayout.svelte.d.ts +29 -0
  69. package/dist/components/AnimateSharedLayout/AnimateSharedLayout.svelte.d.ts.map +1 -0
  70. package/dist/components/AnimateSharedLayout/index.d.ts +11 -0
  71. package/dist/components/AnimateSharedLayout/index.d.ts.map +1 -0
  72. package/{src/components/AnimateSharedLayout/index.ts → dist/components/AnimateSharedLayout/index.js} +10 -11
  73. package/dist/components/AnimateSharedLayout/type.spec-d.d.ts +2 -0
  74. package/dist/components/AnimateSharedLayout/type.spec-d.d.ts.map +1 -0
  75. package/dist/components/AnimateSharedLayout/type.spec-d.js +6 -0
  76. package/{src/components/AnimateSharedLayout/types.ts → dist/components/AnimateSharedLayout/types.d.ts} +91 -111
  77. package/dist/components/AnimateSharedLayout/types.d.ts.map +1 -0
  78. package/dist/components/AnimateSharedLayout/types.js +39 -0
  79. package/dist/components/AnimateSharedLayout/utils/batcher.d.ts +11 -0
  80. package/dist/components/AnimateSharedLayout/utils/batcher.d.ts.map +1 -0
  81. package/{src/components/AnimateSharedLayout/utils/batcher.ts → dist/components/AnimateSharedLayout/utils/batcher.js} +86 -96
  82. package/dist/components/AnimateSharedLayout/utils/crossfader.d.ts +27 -0
  83. package/dist/components/AnimateSharedLayout/utils/crossfader.d.ts.map +1 -0
  84. package/{src/components/AnimateSharedLayout/utils/crossfader.ts → dist/components/AnimateSharedLayout/utils/crossfader.js} +228 -260
  85. package/dist/components/AnimateSharedLayout/utils/rotate.d.ts +8 -0
  86. package/dist/components/AnimateSharedLayout/utils/rotate.d.ts.map +1 -0
  87. package/{src/components/AnimateSharedLayout/utils/rotate.ts → dist/components/AnimateSharedLayout/utils/rotate.js} +39 -48
  88. package/dist/components/AnimateSharedLayout/utils/stack.d.ts +18 -0
  89. package/dist/components/AnimateSharedLayout/utils/stack.d.ts.map +1 -0
  90. package/{src/components/AnimateSharedLayout/utils/stack.ts → dist/components/AnimateSharedLayout/utils/stack.js} +138 -160
  91. package/{src → dist}/components/LazyMotion/LazyMotion.svelte +9 -3
  92. package/dist/components/LazyMotion/LazyMotion.svelte.d.ts +29 -0
  93. package/dist/components/LazyMotion/LazyMotion.svelte.d.ts.map +1 -0
  94. package/{src/components/LazyMotion/index.ts → dist/components/LazyMotion/index.d.ts} +42 -42
  95. package/dist/components/LazyMotion/index.d.ts.map +1 -0
  96. package/dist/components/LazyMotion/index.js +36 -0
  97. package/{src/components/LazyMotion/types.ts → dist/components/LazyMotion/types.d.ts} +57 -58
  98. package/dist/components/LazyMotion/types.d.ts.map +1 -0
  99. package/dist/components/LazyMotion/types.js +1 -0
  100. package/{src → dist}/components/MotionConfig/MotionConfig.svelte +4 -2
  101. package/dist/components/MotionConfig/MotionConfig.svelte.d.ts +29 -0
  102. package/dist/components/MotionConfig/MotionConfig.svelte.d.ts.map +1 -0
  103. package/dist/components/MotionConfig/MotionConfigScaleCorrection.d.ts +4 -0
  104. package/dist/components/MotionConfig/MotionConfigScaleCorrection.d.ts.map +1 -0
  105. package/dist/components/MotionConfig/MotionConfigScaleCorrection.js +32 -0
  106. package/{src/components/MotionConfig/index.ts → dist/components/MotionConfig/index.d.ts} +21 -20
  107. package/dist/components/MotionConfig/index.d.ts.map +1 -0
  108. package/dist/components/MotionConfig/index.js +14 -0
  109. package/dist/components/MotionConfig/type.spec-d.d.ts +2 -0
  110. package/dist/components/MotionConfig/type.spec-d.d.ts.map +1 -0
  111. package/dist/components/MotionConfig/type.spec-d.js +6 -0
  112. package/dist/components/MotionDiv.svelte.d.ts +31 -0
  113. package/dist/components/MotionDiv.svelte.d.ts.map +1 -0
  114. package/dist/context/DOMcontext.d.ts +6 -0
  115. package/dist/context/DOMcontext.d.ts.map +1 -0
  116. package/dist/context/DOMcontext.js +20 -0
  117. package/dist/context/LayoutGroupContext.d.ts +10 -0
  118. package/dist/context/LayoutGroupContext.d.ts.map +1 -0
  119. package/dist/context/LayoutGroupContext.js +7 -0
  120. package/dist/context/LazyContext.d.ts +13 -0
  121. package/dist/context/LazyContext.d.ts.map +1 -0
  122. package/dist/context/LazyContext.js +5 -0
  123. package/{src/context/MotionConfigContext.ts → dist/context/MotionConfigContext.d.ts} +35 -48
  124. package/dist/context/MotionConfigContext.d.ts.map +1 -0
  125. package/dist/context/MotionConfigContext.js +15 -0
  126. package/dist/context/MotionContext/MotionContext.svelte +13 -0
  127. package/dist/context/MotionContext/MotionContext.svelte.d.ts +5 -0
  128. package/dist/context/MotionContext/MotionContext.svelte.d.ts.map +1 -0
  129. package/dist/context/MotionContext/MotionContextProvider.svelte.d.ts +31 -0
  130. package/dist/context/MotionContext/MotionContextProvider.svelte.d.ts.map +1 -0
  131. package/dist/context/MotionContext/UseCreateMotionContext.svelte +39 -0
  132. package/dist/context/MotionContext/UseCreateMotionContext.svelte.d.ts +42 -0
  133. package/dist/context/MotionContext/UseCreateMotionContext.svelte.d.ts.map +1 -0
  134. package/dist/context/MotionContext/create.d.ts +2 -0
  135. package/dist/context/MotionContext/create.d.ts.map +1 -0
  136. package/{src/context/MotionContext/create.ts → dist/context/MotionContext/create.js} +1 -1
  137. package/dist/context/MotionContext/index.d.ts +15 -0
  138. package/dist/context/MotionContext/index.d.ts.map +1 -0
  139. package/dist/context/MotionContext/index.js +8 -0
  140. package/dist/context/MotionContext/utils.d.ts +9 -0
  141. package/dist/context/MotionContext/utils.d.ts.map +1 -0
  142. package/{src/context/MotionContext/utils.ts → dist/context/MotionContext/utils.js} +18 -29
  143. package/{src/context/PresenceContext.ts → dist/context/PresenceContext.d.ts} +22 -26
  144. package/dist/context/PresenceContext.d.ts.map +1 -0
  145. package/dist/context/PresenceContext.js +7 -0
  146. package/{src → dist}/context/ScaleCorrectionProvider.svelte +2 -3
  147. package/dist/context/ScaleCorrectionProvider.svelte.d.ts +33 -0
  148. package/dist/context/ScaleCorrectionProvider.svelte.d.ts.map +1 -0
  149. package/dist/context/SharedLayoutContext.d.ts +14 -0
  150. package/dist/context/SharedLayoutContext.d.ts.map +1 -0
  151. package/dist/context/SharedLayoutContext.js +18 -0
  152. package/dist/events/UseDomEvent-type.spec-d.d.ts +2 -0
  153. package/dist/events/UseDomEvent-type.spec-d.d.ts.map +1 -0
  154. package/dist/events/UseDomEvent-type.spec-d.js +6 -0
  155. package/{src → dist}/events/UseDomEvent.svelte +2 -17
  156. package/dist/events/UseDomEvent.svelte.d.ts +29 -0
  157. package/dist/events/UseDomEvent.svelte.d.ts.map +1 -0
  158. package/dist/events/UsePointerEvent.svelte +22 -0
  159. package/dist/events/UsePointerEvent.svelte.d.ts +29 -0
  160. package/dist/events/UsePointerEvent.svelte.d.ts.map +1 -0
  161. package/dist/events/event-info.d.ts +11 -0
  162. package/dist/events/event-info.d.ts.map +1 -0
  163. package/{src/events/event-info.ts → dist/events/event-info.js} +65 -69
  164. package/{src/events/types.ts → dist/events/types.d.ts} +16 -15
  165. package/dist/events/types.d.ts.map +1 -0
  166. package/dist/events/types.js +1 -0
  167. package/{src/events/use-dom-event.ts → dist/events/use-dom-event.d.ts} +51 -48
  168. package/dist/events/use-dom-event.d.ts.map +1 -0
  169. package/dist/events/use-dom-event.js +30 -0
  170. package/dist/events/use-pointer-event.d.ts +32 -0
  171. package/dist/events/use-pointer-event.d.ts.map +1 -0
  172. package/dist/events/use-pointer-event.js +35 -0
  173. package/dist/events/utils.d.ts +9 -0
  174. package/dist/events/utils.d.ts.map +1 -0
  175. package/{src/events/utils.ts → dist/events/utils.js} +20 -25
  176. package/dist/gestures/PanSession.d.ts +142 -0
  177. package/dist/gestures/PanSession.d.ts.map +1 -0
  178. package/dist/gestures/PanSession.js +232 -0
  179. package/dist/gestures/UseFocusGesture.svelte.d.ts +31 -0
  180. package/dist/gestures/UseFocusGesture.svelte.d.ts.map +1 -0
  181. package/dist/gestures/UseGestures.svelte.d.ts +31 -0
  182. package/dist/gestures/UseGestures.svelte.d.ts.map +1 -0
  183. package/{src → dist}/gestures/UseHoverGesture.svelte +6 -3
  184. package/dist/gestures/UseHoverGesture.svelte.d.ts +31 -0
  185. package/dist/gestures/UseHoverGesture.svelte.d.ts.map +1 -0
  186. package/{src → dist}/gestures/UsePanGesture.svelte +6 -5
  187. package/dist/gestures/UsePanGesture.svelte.d.ts +32 -0
  188. package/dist/gestures/UsePanGesture.svelte.d.ts.map +1 -0
  189. package/{src → dist}/gestures/UseTapGesture.svelte +6 -5
  190. package/dist/gestures/UseTapGesture.svelte.d.ts +31 -0
  191. package/dist/gestures/UseTapGesture.svelte.d.ts.map +1 -0
  192. package/{src → dist}/gestures/drag/UseDrag.svelte +5 -4
  193. package/dist/gestures/drag/UseDrag.svelte.d.ts +32 -0
  194. package/dist/gestures/drag/UseDrag.svelte.d.ts.map +1 -0
  195. package/dist/gestures/drag/UseDragControls.svelte +59 -0
  196. package/dist/gestures/drag/UseDragControls.svelte.d.ts +24 -0
  197. package/dist/gestures/drag/UseDragControls.svelte.d.ts.map +1 -0
  198. package/dist/gestures/drag/VisualElementDragControls.d.ts +116 -0
  199. package/dist/gestures/drag/VisualElementDragControls.d.ts.map +1 -0
  200. package/dist/gestures/drag/VisualElementDragControls.js +754 -0
  201. package/{src/gestures/drag/types.ts → dist/gestures/drag/types.d.ts} +309 -307
  202. package/dist/gestures/drag/types.d.ts.map +1 -0
  203. package/dist/gestures/drag/types.js +1 -0
  204. package/dist/gestures/drag/use-drag-controls.d.ts +130 -0
  205. package/dist/gestures/drag/use-drag-controls.d.ts.map +1 -0
  206. package/dist/gestures/drag/use-drag-controls.js +157 -0
  207. package/{src/gestures/drag/use-drag.ts → dist/gestures/drag/use-drag.d.ts} +13 -15
  208. package/dist/gestures/drag/use-drag.d.ts.map +1 -0
  209. package/dist/gestures/drag/use-drag.js +1 -0
  210. package/dist/gestures/drag/utils/constraints.d.ts +78 -0
  211. package/dist/gestures/drag/utils/constraints.d.ts.map +1 -0
  212. package/{src/gestures/drag/utils/constraints.ts → dist/gestures/drag/utils/constraints.js} +134 -157
  213. package/dist/gestures/drag/utils/lock.d.ts +14 -0
  214. package/dist/gestures/drag/utils/lock.d.ts.map +1 -0
  215. package/{src/gestures/drag/utils/lock.ts → dist/gestures/drag/utils/lock.js} +56 -69
  216. package/{src/gestures/types.ts → dist/gestures/types.d.ts} +258 -257
  217. package/dist/gestures/types.d.ts.map +1 -0
  218. package/dist/gestures/types.js +1 -0
  219. package/{src/gestures/use-focus-gesture.ts → dist/gestures/use-focus-gesture.d.ts} +14 -16
  220. package/dist/gestures/use-focus-gesture.d.ts.map +1 -0
  221. package/dist/gestures/use-focus-gesture.js +1 -0
  222. package/dist/gestures/use-gestures.d.ts +2 -0
  223. package/dist/gestures/use-gestures.d.ts.map +1 -0
  224. package/{src/gestures/use-gestures.ts → dist/gestures/use-gestures.js} +1 -2
  225. package/{src/gestures/use-hover-gesture.ts → dist/gestures/use-hover-gesture.d.ts} +8 -10
  226. package/dist/gestures/use-hover-gesture.d.ts.map +1 -0
  227. package/dist/gestures/use-hover-gesture.js +1 -0
  228. package/{src/gestures/use-pan-gesture.ts → dist/gestures/use-pan-gesture.d.ts} +20 -22
  229. package/dist/gestures/use-pan-gesture.d.ts.map +1 -0
  230. package/dist/gestures/use-pan-gesture.js +1 -0
  231. package/{src/gestures/use-tap-gesture.ts → dist/gestures/use-tap-gesture.d.ts} +12 -14
  232. package/dist/gestures/use-tap-gesture.d.ts.map +1 -0
  233. package/dist/gestures/use-tap-gesture.js +1 -0
  234. package/dist/gestures/utils/event-type.d.ts +12 -0
  235. package/dist/gestures/utils/event-type.d.ts.map +1 -0
  236. package/{src/gestures/utils/event-type.ts → dist/gestures/utils/event-type.js} +20 -24
  237. package/dist/gestures/utils/is-node-or-child.d.ts +18 -0
  238. package/dist/gestures/utils/is-node-or-child.d.ts.map +1 -0
  239. package/{src/gestures/utils/is-node-or-child.ts → dist/gestures/utils/is-node-or-child.js} +28 -31
  240. package/dist/index.d.ts +95 -0
  241. package/dist/index.d.ts.map +1 -0
  242. package/dist/index.js +77 -0
  243. package/{src → dist}/motion/Motion.svelte +83 -74
  244. package/dist/motion/Motion.svelte.d.ts +41 -0
  245. package/dist/motion/Motion.svelte.d.ts.map +1 -0
  246. package/{src → dist}/motion/MotionSSR.svelte +77 -56
  247. package/dist/motion/MotionSSR.svelte.d.ts +41 -0
  248. package/dist/motion/MotionSSR.svelte.d.ts.map +1 -0
  249. package/dist/motion/features/AnimationState.svelte.d.ts +22 -0
  250. package/dist/motion/features/AnimationState.svelte.d.ts.map +1 -0
  251. package/{src → dist}/motion/features/Exit.svelte +15 -5
  252. package/dist/motion/features/Exit.svelte.d.ts +32 -0
  253. package/dist/motion/features/Exit.svelte.d.ts.map +1 -0
  254. package/{src → dist}/motion/features/UseFeatures.svelte +2 -2
  255. package/dist/motion/features/UseFeatures.svelte.d.ts +45 -0
  256. package/dist/motion/features/UseFeatures.svelte.d.ts.map +1 -0
  257. package/dist/motion/features/animations.d.ts +11 -0
  258. package/dist/motion/features/animations.d.ts.map +1 -0
  259. package/{src/motion/features/animations.ts → dist/motion/features/animations.js} +14 -22
  260. package/dist/motion/features/definitions.d.ts +37 -0
  261. package/dist/motion/features/definitions.d.ts.map +1 -0
  262. package/{src/motion/features/definitions.ts → dist/motion/features/definitions.js} +42 -49
  263. package/dist/motion/features/drag.d.ts +11 -0
  264. package/dist/motion/features/drag.d.ts.map +1 -0
  265. package/{src/motion/features/drag.ts → dist/motion/features/drag.js} +14 -24
  266. package/dist/motion/features/gestures.d.ts +11 -0
  267. package/dist/motion/features/gestures.d.ts.map +1 -0
  268. package/{src/motion/features/gestures.ts → dist/motion/features/gestures.js} +16 -24
  269. package/dist/motion/features/layout/Animate.d.ts +2 -0
  270. package/dist/motion/features/layout/Animate.d.ts.map +1 -0
  271. package/dist/motion/features/layout/Animate.js +2 -0
  272. package/{src → dist}/motion/features/layout/Animate.svelte +25 -24
  273. package/dist/motion/features/layout/Animate.svelte.d.ts +23 -0
  274. package/dist/motion/features/layout/Animate.svelte.d.ts.map +1 -0
  275. package/dist/motion/features/layout/AnimateLayoutContextProvider.svelte.d.ts +23 -0
  276. package/dist/motion/features/layout/AnimateLayoutContextProvider.svelte.d.ts.map +1 -0
  277. package/dist/motion/features/layout/Measure.d.ts +2 -0
  278. package/dist/motion/features/layout/Measure.d.ts.map +1 -0
  279. package/dist/motion/features/layout/Measure.js +2 -0
  280. package/{src → dist}/motion/features/layout/Measure.svelte +8 -6
  281. package/dist/motion/features/layout/Measure.svelte.d.ts +24 -0
  282. package/dist/motion/features/layout/Measure.svelte.d.ts.map +1 -0
  283. package/{src → dist}/motion/features/layout/MeasureContextProvider.svelte +7 -4
  284. package/dist/motion/features/layout/MeasureContextProvider.svelte.d.ts +23 -0
  285. package/dist/motion/features/layout/MeasureContextProvider.svelte.d.ts.map +1 -0
  286. package/dist/motion/features/layout/index.d.ts +8 -0
  287. package/dist/motion/features/layout/index.d.ts.map +1 -0
  288. package/{src/motion/features/layout/index.ts → dist/motion/features/layout/index.js} +11 -20
  289. package/{src/motion/features/layout/types.ts → dist/motion/features/layout/types.d.ts} +72 -71
  290. package/dist/motion/features/layout/types.d.ts.map +1 -0
  291. package/dist/motion/features/layout/types.js +1 -0
  292. package/dist/motion/features/layout/utils.d.ts +26 -0
  293. package/dist/motion/features/layout/utils.d.ts.map +1 -0
  294. package/{src/motion/features/layout/utils.ts → dist/motion/features/layout/utils.js} +28 -40
  295. package/{src/motion/features/types.ts → dist/motion/features/types.d.ts} +55 -53
  296. package/dist/motion/features/types.d.ts.map +1 -0
  297. package/dist/motion/features/types.js +1 -0
  298. package/{src/motion/features/use-features.ts → dist/motion/features/use-features.d.ts} +12 -16
  299. package/dist/motion/features/use-features.d.ts.map +1 -0
  300. package/dist/motion/features/use-features.js +5 -0
  301. package/dist/motion/index.d.ts +30 -0
  302. package/dist/motion/index.d.ts.map +1 -0
  303. package/dist/motion/index.js +35 -0
  304. package/{src/motion/types.ts → dist/motion/types.d.ts} +281 -278
  305. package/dist/motion/types.d.ts.map +1 -0
  306. package/dist/motion/types.js +1 -0
  307. package/{src → dist}/motion/utils/UseLayoutId.svelte +3 -2
  308. package/dist/motion/utils/UseLayoutId.svelte.d.ts +35 -0
  309. package/dist/motion/utils/UseLayoutId.svelte.d.ts.map +1 -0
  310. package/{src → dist}/motion/utils/UseVisualElement.svelte +22 -13
  311. package/dist/motion/utils/UseVisualElement.svelte.d.ts +40 -0
  312. package/dist/motion/utils/UseVisualElement.svelte.d.ts.map +1 -0
  313. package/{src → dist}/motion/utils/UseVisualState.svelte +27 -27
  314. package/dist/motion/utils/UseVisualState.svelte.d.ts +37 -0
  315. package/dist/motion/utils/UseVisualState.svelte.d.ts.map +1 -0
  316. package/dist/motion/utils/is-forced-motion-value.d.ts +11 -0
  317. package/dist/motion/utils/is-forced-motion-value.d.ts.map +1 -0
  318. package/{src/motion/utils/is-forced-motion-value.ts → dist/motion/utils/is-forced-motion-value.js} +13 -23
  319. package/{src/motion/utils/make-renderless-component.ts → dist/motion/utils/make-renderless-component.d.ts} +12 -17
  320. package/dist/motion/utils/make-renderless-component.d.ts.map +1 -0
  321. package/dist/motion/utils/make-renderless-component.js +11 -0
  322. package/{src/motion/utils/should-inhert-variant.ts → dist/motion/utils/should-inhert-variant.d.ts} +7 -6
  323. package/dist/motion/utils/should-inhert-variant.d.ts.map +1 -0
  324. package/dist/motion/utils/should-inhert-variant.js +1 -0
  325. package/dist/motion/utils/use-motion-ref.d.ts +14 -0
  326. package/dist/motion/utils/use-motion-ref.d.ts.map +1 -0
  327. package/dist/motion/utils/use-motion-ref.js +27 -0
  328. package/dist/motion/utils/use-visual-element.d.ts +11 -0
  329. package/dist/motion/utils/use-visual-element.d.ts.map +1 -0
  330. package/dist/motion/utils/use-visual-element.js +1 -0
  331. package/{src/motion/utils/use-visual-state.ts → dist/motion/utils/use-visual-state.d.ts} +21 -24
  332. package/dist/motion/utils/use-visual-state.d.ts.map +1 -0
  333. package/dist/motion/utils/use-visual-state.js +2 -0
  334. package/dist/motion/utils/valid-prop.d.ts +15 -0
  335. package/dist/motion/utils/valid-prop.d.ts.map +1 -0
  336. package/{src/motion/utils/valid-prop.ts → dist/motion/utils/valid-prop.js} +77 -80
  337. package/dist/render/dom/M-type.spec-d.d.ts +2 -0
  338. package/dist/render/dom/M-type.spec-d.d.ts.map +1 -0
  339. package/dist/render/dom/M-type.spec-d.js +6 -0
  340. package/{src/render/dom/M.svelte → dist/render/dom/Motion-Proxy.svelte} +8 -1
  341. package/dist/render/dom/Motion-Proxy.svelte.d.ts +33 -0
  342. package/dist/render/dom/Motion-Proxy.svelte.d.ts.map +1 -0
  343. package/dist/render/dom/Motion-type.spec-d.d.ts +2 -0
  344. package/dist/render/dom/Motion-type.spec-d.d.ts.map +1 -0
  345. package/dist/render/dom/Motion-type.spec-d.js +6 -0
  346. package/{src → dist}/render/dom/UseRender.svelte +2 -2
  347. package/dist/render/dom/UseRender.svelte.d.ts +42 -0
  348. package/dist/render/dom/UseRender.svelte.d.ts.map +1 -0
  349. package/dist/render/dom/create-visual-element.d.ts +8 -0
  350. package/dist/render/dom/create-visual-element.d.ts.map +1 -0
  351. package/{src/render/dom/create-visual-element.ts → dist/render/dom/create-visual-element.js} +12 -22
  352. package/dist/render/dom/featureBundle.d.ts +24 -0
  353. package/dist/render/dom/featureBundle.d.ts.map +1 -0
  354. package/{src/render/dom/featureBundle.ts → dist/render/dom/featureBundle.js} +20 -22
  355. package/dist/render/dom/motion-minimal.d.ts +942 -0
  356. package/dist/render/dom/motion-minimal.d.ts.map +1 -0
  357. package/dist/render/dom/motion-minimal.js +22 -0
  358. package/dist/render/dom/motion-proxy.d.ts +63 -0
  359. package/dist/render/dom/motion-proxy.d.ts.map +1 -0
  360. package/dist/render/dom/motion-proxy.js +57 -0
  361. package/dist/render/dom/motion.d.ts +966 -0
  362. package/dist/render/dom/motion.d.ts.map +1 -0
  363. package/{src/render/dom/motion.ts → dist/render/dom/motion.js} +46 -62
  364. package/dist/render/dom/projection/convert-to-relative.d.ts +12 -0
  365. package/dist/render/dom/projection/convert-to-relative.d.ts.map +1 -0
  366. package/{src/render/dom/projection/convert-to-relative.ts → dist/render/dom/projection/convert-to-relative.js} +32 -40
  367. package/dist/render/dom/projection/default-scale-correctors.d.ts +40 -0
  368. package/dist/render/dom/projection/default-scale-correctors.d.ts.map +1 -0
  369. package/{src/render/dom/projection/default-scale-correctors.ts → dist/render/dom/projection/default-scale-correctors.js} +108 -138
  370. package/dist/render/dom/projection/measure.d.ts +17 -0
  371. package/dist/render/dom/projection/measure.d.ts.map +1 -0
  372. package/{src/render/dom/projection/measure.ts → dist/render/dom/projection/measure.js} +19 -28
  373. package/dist/render/dom/projection/relative-set.d.ts +8 -0
  374. package/dist/render/dom/projection/relative-set.d.ts.map +1 -0
  375. package/{src/render/dom/projection/relative-set.ts → dist/render/dom/projection/relative-set.js} +18 -27
  376. package/dist/render/dom/projection/scale-correction.d.ts +16 -0
  377. package/dist/render/dom/projection/scale-correction.d.ts.map +1 -0
  378. package/dist/render/dom/projection/scale-correction.js +15 -0
  379. package/{src/render/dom/projection/types.ts → dist/render/dom/projection/types.d.ts} +14 -13
  380. package/dist/render/dom/projection/types.d.ts.map +1 -0
  381. package/dist/render/dom/projection/types.js +1 -0
  382. package/dist/render/dom/projection/utils.d.ts +18 -0
  383. package/dist/render/dom/projection/utils.d.ts.map +1 -0
  384. package/{src/render/dom/projection/utils.ts → dist/render/dom/projection/utils.js} +62 -69
  385. package/dist/render/dom/svg-visual-element.d.ts +3 -0
  386. package/dist/render/dom/svg-visual-element.d.ts.map +1 -0
  387. package/{src/render/dom/svg-visual-element.ts → dist/render/dom/svg-visual-element.js} +91 -114
  388. package/{src/render/dom/types.ts → dist/render/dom/types.d.ts} +33 -32
  389. package/dist/render/dom/types.d.ts.map +1 -0
  390. package/dist/render/dom/types.js +1 -0
  391. package/dist/render/dom/use-render.d.ts +6 -0
  392. package/dist/render/dom/use-render.d.ts.map +1 -0
  393. package/dist/render/dom/use-render.js +5 -0
  394. package/{src → dist}/render/dom/utils/UseInitialMotionProps.svelte +14 -3
  395. package/dist/render/dom/utils/UseInitialMotionProps.svelte.d.ts +36 -0
  396. package/dist/render/dom/utils/UseInitialMotionProps.svelte.d.ts.map +1 -0
  397. package/dist/render/dom/utils/batch-layout.d.ts +14 -0
  398. package/dist/render/dom/utils/batch-layout.d.ts.map +1 -0
  399. package/{src/render/dom/utils/batch-layout.ts → dist/render/dom/utils/batch-layout.js} +67 -77
  400. package/dist/render/dom/utils/camel-to-dash.d.ts +10 -0
  401. package/dist/render/dom/utils/camel-to-dash.d.ts.map +1 -0
  402. package/{src/render/dom/utils/camel-to-dash.ts → dist/render/dom/utils/camel-to-dash.js} +17 -20
  403. package/dist/render/dom/utils/create-config.d.ts +7 -0
  404. package/dist/render/dom/utils/create-config.d.ts.map +1 -0
  405. package/dist/render/dom/utils/create-config.js +18 -0
  406. package/dist/render/dom/utils/css-variables-conversion.d.ts +28 -0
  407. package/dist/render/dom/utils/css-variables-conversion.d.ts.map +1 -0
  408. package/{src/render/dom/utils/css-variables-conversion.ts → dist/render/dom/utils/css-variables-conversion.js} +111 -121
  409. package/dist/render/dom/utils/filter-props.d.ts +8 -0
  410. package/dist/render/dom/utils/filter-props.d.ts.map +1 -0
  411. package/{src/render/dom/utils/filter-props.ts → dist/render/dom/utils/filter-props.js} +47 -55
  412. package/dist/render/dom/utils/is-css-variable.d.ts +14 -0
  413. package/dist/render/dom/utils/is-css-variable.d.ts.map +1 -0
  414. package/{src/render/dom/utils/is-css-variable.ts → dist/render/dom/utils/is-css-variable.js} +15 -18
  415. package/dist/render/dom/utils/is-svg-component.d.ts +8 -0
  416. package/dist/render/dom/utils/is-svg-component.d.ts.map +1 -0
  417. package/{src/render/dom/utils/is-svg-component.ts → dist/render/dom/utils/is-svg-component.js} +36 -41
  418. package/dist/render/dom/utils/parse-dom-variant.d.ts +12 -0
  419. package/dist/render/dom/utils/parse-dom-variant.d.ts.map +1 -0
  420. package/{src/render/dom/utils/parse-dom-variant.ts → dist/render/dom/utils/parse-dom-variant.js} +17 -26
  421. package/dist/render/dom/utils/unit-conversion.d.ts +27 -0
  422. package/dist/render/dom/utils/unit-conversion.d.ts.map +1 -0
  423. package/{src/render/dom/utils/unit-conversion.ts → dist/render/dom/utils/unit-conversion.js} +236 -258
  424. package/dist/render/dom/utils/use-html-props.d.ts +2 -0
  425. package/dist/render/dom/utils/use-html-props.d.ts.map +1 -0
  426. package/{src/render/dom/utils/use-html-props.ts → dist/render/dom/utils/use-html-props.js} +2 -2
  427. package/dist/render/dom/utils/use-svg-props.d.ts +2 -0
  428. package/dist/render/dom/utils/use-svg-props.d.ts.map +1 -0
  429. package/dist/render/dom/utils/use-svg-props.js +1 -0
  430. package/dist/render/dom/value-types/animatable-none.d.ts +7 -0
  431. package/dist/render/dom/value-types/animatable-none.d.ts.map +1 -0
  432. package/{src/render/dom/value-types/animatable-none.ts → dist/render/dom/value-types/animatable-none.js} +20 -24
  433. package/dist/render/dom/value-types/defaults.d.ts +15 -0
  434. package/dist/render/dom/value-types/defaults.d.ts.map +1 -0
  435. package/dist/render/dom/value-types/defaults.js +31 -0
  436. package/dist/render/dom/value-types/dimensions.d.ts +15 -0
  437. package/dist/render/dom/value-types/dimensions.d.ts.map +1 -0
  438. package/{src/render/dom/value-types/dimensions.ts → dist/render/dom/value-types/dimensions.js} +23 -27
  439. package/dist/render/dom/value-types/find.d.ts +15 -0
  440. package/dist/render/dom/value-types/find.d.ts.map +1 -0
  441. package/dist/render/dom/value-types/find.js +21 -0
  442. package/{src/render/dom/value-types/get-as-type.ts → dist/render/dom/value-types/get-as-type.d.ts} +15 -21
  443. package/dist/render/dom/value-types/get-as-type.d.ts.map +1 -0
  444. package/dist/render/dom/value-types/get-as-type.js +13 -0
  445. package/dist/render/dom/value-types/number.d.ts +8 -0
  446. package/dist/render/dom/value-types/number.d.ts.map +1 -0
  447. package/{src/render/dom/value-types/number.ts → dist/render/dom/value-types/number.js} +74 -83
  448. package/{src/render/dom/value-types/test.ts → dist/render/dom/value-types/test.d.ts} +15 -17
  449. package/dist/render/dom/value-types/test.d.ts.map +1 -0
  450. package/dist/render/dom/value-types/test.js +9 -0
  451. package/{src/render/dom/value-types/type-auto.ts → dist/render/dom/value-types/type-auto.d.ts} +15 -21
  452. package/dist/render/dom/value-types/type-auto.d.ts.map +1 -0
  453. package/dist/render/dom/value-types/type-auto.js +12 -0
  454. package/{src/render/dom/value-types/type-int.ts → dist/render/dom/value-types/type-int.d.ts} +14 -23
  455. package/dist/render/dom/value-types/type-int.d.ts.map +1 -0
  456. package/dist/render/dom/value-types/type-int.js +12 -0
  457. package/{src/render/dom/value-types/types.ts → dist/render/dom/value-types/types.d.ts} +9 -8
  458. package/dist/render/dom/value-types/types.d.ts.map +1 -0
  459. package/dist/render/dom/value-types/types.js +1 -0
  460. package/{src → dist}/render/html/UseHTMLProps.svelte +19 -2
  461. package/{src → dist}/render/html/UseInitialMotionValues.svelte +1 -1
  462. package/dist/render/html/UseInitialMotionValues.svelte.d.ts +36 -0
  463. package/dist/render/html/UseInitialMotionValues.svelte.d.ts.map +1 -0
  464. package/dist/render/html/UseStyle.svelte +32 -0
  465. package/dist/render/html/UseStyle.svelte.d.ts +36 -0
  466. package/dist/render/html/UseStyle.svelte.d.ts.map +1 -0
  467. package/dist/render/html/config-motion.d.ts +13 -0
  468. package/dist/render/html/config-motion.d.ts.map +1 -0
  469. package/dist/render/html/config-motion.js +13 -0
  470. package/dist/render/html/supported-elements.d.ts +12 -0
  471. package/dist/render/html/supported-elements.d.ts.map +1 -0
  472. package/{src/render/html/supported-elements.ts → dist/render/html/supported-elements.js} +4 -10
  473. package/{src/render/html/types.ts → dist/render/html/types.d.ts} +54 -64
  474. package/dist/render/html/types.d.ts.map +1 -0
  475. package/dist/render/html/types.js +1 -0
  476. package/dist/render/html/use-props.d.ts +11 -0
  477. package/dist/render/html/use-props.d.ts.map +1 -0
  478. package/dist/render/html/use-props.js +15 -0
  479. package/dist/render/html/utils/build-projection-transform.d.ts +21 -0
  480. package/dist/render/html/utils/build-projection-transform.d.ts.map +1 -0
  481. package/{src/render/html/utils/build-projection-transform.ts → dist/render/html/utils/build-projection-transform.js} +39 -53
  482. package/dist/render/html/utils/build-styles.d.ts +13 -0
  483. package/dist/render/html/utils/build-styles.d.ts.map +1 -0
  484. package/{src/render/html/utils/build-styles.ts → dist/render/html/utils/build-styles.js} +108 -121
  485. package/dist/render/html/utils/build-transform.d.ts +21 -0
  486. package/dist/render/html/utils/build-transform.d.ts.map +1 -0
  487. package/{src/render/html/utils/build-transform.ts → dist/render/html/utils/build-transform.js} +70 -79
  488. package/dist/render/html/utils/create-render-state.d.ts +17 -0
  489. package/dist/render/html/utils/create-render-state.d.ts.map +1 -0
  490. package/dist/render/html/utils/create-render-state.js +18 -0
  491. package/dist/render/html/utils/render.d.ts +12 -0
  492. package/dist/render/html/utils/render.d.ts.map +1 -0
  493. package/{src/render/html/utils/render.ts → dist/render/html/utils/render.js} +15 -22
  494. package/dist/render/html/utils/scrape-motion-values.d.ts +8 -0
  495. package/dist/render/html/utils/scrape-motion-values.d.ts.map +1 -0
  496. package/{src/render/html/utils/scrape-motion-values.ts → dist/render/html/utils/scrape-motion-values.js} +19 -26
  497. package/dist/render/html/utils/transform.d.ts +25 -0
  498. package/dist/render/html/utils/transform.d.ts.map +1 -0
  499. package/{src/render/html/utils/transform.ts → dist/render/html/utils/transform.js} +48 -51
  500. package/dist/render/html/visual-element.d.ts +2312 -0
  501. package/dist/render/html/visual-element.d.ts.map +1 -0
  502. package/{src/render/html/visual-element.ts → dist/render/html/visual-element.js} +111 -129
  503. package/dist/render/index.d.ts +8 -0
  504. package/dist/render/index.d.ts.map +1 -0
  505. package/{src/render/index.ts → dist/render/index.js} +771 -703
  506. package/{src → dist}/render/svg/UseSVGProps.svelte +2 -2
  507. package/dist/render/svg/UseSVGProps.svelte.d.ts +39 -0
  508. package/dist/render/svg/UseSVGProps.svelte.d.ts.map +1 -0
  509. package/dist/render/svg/config-motion.d.ts +24 -0
  510. package/dist/render/svg/config-motion.d.ts.map +1 -0
  511. package/dist/render/svg/config-motion.js +44 -0
  512. package/dist/render/svg/lowercase-elements.d.ts +10 -0
  513. package/dist/render/svg/lowercase-elements.d.ts.map +1 -0
  514. package/{src/render/svg/lowercase-elements.ts → dist/render/svg/lowercase-elements.js} +35 -35
  515. package/dist/render/svg/supported-elements.d.ts +12 -0
  516. package/dist/render/svg/supported-elements.d.ts.map +1 -0
  517. package/{src/render/svg/supported-elements.ts → dist/render/svg/supported-elements.js} +4 -10
  518. package/dist/render/svg/types.d.ts +39 -0
  519. package/dist/render/svg/types.d.ts.map +1 -0
  520. package/dist/render/svg/types.js +1 -0
  521. package/{src/render/svg/use-props.ts → dist/render/svg/use-props.d.ts} +13 -14
  522. package/dist/render/svg/use-props.d.ts.map +1 -0
  523. package/dist/render/svg/use-props.js +1 -0
  524. package/dist/render/svg/utils/build-attrs.d.ts +16 -0
  525. package/dist/render/svg/utils/build-attrs.d.ts.map +1 -0
  526. package/dist/render/svg/utils/build-attrs.js +40 -0
  527. package/dist/render/svg/utils/camel-case-attrs.d.ts +9 -0
  528. package/dist/render/svg/utils/camel-case-attrs.d.ts.map +1 -0
  529. package/{src/render/svg/utils/camel-case-attrs.ts → dist/render/svg/utils/camel-case-attrs.js} +27 -27
  530. package/dist/render/svg/utils/create-render-state.d.ts +11 -0
  531. package/dist/render/svg/utils/create-render-state.d.ts.map +1 -0
  532. package/dist/render/svg/utils/create-render-state.js +7 -0
  533. package/dist/render/svg/utils/path.d.ts +15 -0
  534. package/dist/render/svg/utils/path.d.ts.map +1 -0
  535. package/{src/render/svg/utils/path.ts → dist/render/svg/utils/path.js} +46 -49
  536. package/dist/render/svg/utils/render.d.ts +8 -0
  537. package/dist/render/svg/utils/render.d.ts.map +1 -0
  538. package/{src/render/svg/utils/render.ts → dist/render/svg/utils/render.js} +14 -22
  539. package/dist/render/svg/utils/scrape-motion-values.d.ts +8 -0
  540. package/dist/render/svg/utils/scrape-motion-values.d.ts.map +1 -0
  541. package/{src/render/svg/utils/scrape-motion-values.ts → dist/render/svg/utils/scrape-motion-values.js} +19 -26
  542. package/dist/render/svg/utils/transform-origin.d.ts +12 -0
  543. package/dist/render/svg/utils/transform-origin.d.ts.map +1 -0
  544. package/{src/render/svg/utils/transform-origin.ts → dist/render/svg/utils/transform-origin.js} +21 -30
  545. package/dist/render/svg/visual-element.d.ts +7 -0
  546. package/dist/render/svg/visual-element.d.ts.map +1 -0
  547. package/{src/render/svg/visual-element.ts → dist/render/svg/visual-element.js} +38 -44
  548. package/{src/render/types.ts → dist/render/types.d.ts} +149 -148
  549. package/dist/render/types.d.ts.map +1 -0
  550. package/dist/render/types.js +1 -0
  551. package/dist/render/utils/animation-state.d.ts +43 -0
  552. package/dist/render/utils/animation-state.d.ts.map +1 -0
  553. package/{src/render/utils/animation-state.ts → dist/render/utils/animation-state.js} +338 -375
  554. package/dist/render/utils/animation.d.ts +27 -0
  555. package/dist/render/utils/animation.d.ts.map +1 -0
  556. package/{src/render/utils/animation.ts → dist/render/utils/animation.js} +145 -167
  557. package/{src/render/utils/compare-by-depth.ts → dist/render/utils/compare-by-depth.d.ts} +15 -18
  558. package/dist/render/utils/compare-by-depth.d.ts.map +1 -0
  559. package/dist/render/utils/compare-by-depth.js +8 -0
  560. package/dist/render/utils/flat-tree.d.ts +14 -0
  561. package/dist/render/utils/flat-tree.d.ts.map +1 -0
  562. package/dist/render/utils/flat-tree.js +53 -0
  563. package/{src/render/utils/is-draggable.ts → dist/render/utils/is-draggable.d.ts} +12 -17
  564. package/dist/render/utils/is-draggable.d.ts.map +1 -0
  565. package/dist/render/utils/is-draggable.js +9 -0
  566. package/{src/render/utils/lifecycles.ts → dist/render/utils/lifecycles.d.ts} +122 -172
  567. package/dist/render/utils/lifecycles.d.ts.map +1 -0
  568. package/dist/render/utils/lifecycles.js +44 -0
  569. package/dist/render/utils/motion-values.d.ts +9 -0
  570. package/dist/render/utils/motion-values.d.ts.map +1 -0
  571. package/{src/render/utils/motion-values.ts → dist/render/utils/motion-values.js} +50 -59
  572. package/dist/render/utils/projection.d.ts +9 -0
  573. package/dist/render/utils/projection.d.ts.map +1 -0
  574. package/{src/render/utils/projection.ts → dist/render/utils/projection.js} +29 -38
  575. package/dist/render/utils/setters.d.ts +794 -0
  576. package/dist/render/utils/setters.d.ts.map +1 -0
  577. package/dist/render/utils/setters.js +128 -0
  578. package/{src/render/utils/state.ts → dist/render/utils/state.d.ts} +90 -113
  579. package/dist/render/utils/state.d.ts.map +1 -0
  580. package/dist/render/utils/state.js +26 -0
  581. package/{src/render/utils/types.ts → dist/render/utils/types.d.ts} +13 -12
  582. package/dist/render/utils/types.d.ts.map +1 -0
  583. package/dist/render/utils/types.js +13 -0
  584. package/dist/render/utils/variants.d.ts +27 -0
  585. package/dist/render/utils/variants.d.ts.map +1 -0
  586. package/{src/render/utils/variants.ts → dist/render/utils/variants.js} +66 -76
  587. package/{src/types/geometry.ts → dist/types/geometry.d.ts} +93 -91
  588. package/dist/types/geometry.d.ts.map +1 -0
  589. package/dist/types/geometry.js +1 -0
  590. package/{src/types.ts → dist/types.d.ts} +1091 -1088
  591. package/dist/types.d.ts.map +1 -0
  592. package/dist/types.js +1 -0
  593. package/dist/utils/UseUnmountEffect.svelte.d.ts +30 -0
  594. package/dist/utils/UseUnmountEffect.svelte.d.ts.map +1 -0
  595. package/dist/utils/array.d.ts +12 -0
  596. package/dist/utils/array.d.ts.map +1 -0
  597. package/{src/utils/array.ts → dist/utils/array.js} +16 -18
  598. package/dist/utils/each-axis.d.ts +11 -0
  599. package/dist/utils/each-axis.d.ts.map +1 -0
  600. package/{src/utils/each-axis.ts → dist/utils/each-axis.js} +13 -15
  601. package/dist/utils/errors.d.ts +5 -0
  602. package/dist/utils/errors.d.ts.map +1 -0
  603. package/dist/utils/errors.js +16 -0
  604. package/dist/utils/fix-process-env.d.ts +2 -0
  605. package/dist/utils/fix-process-env.d.ts.map +1 -0
  606. package/dist/utils/fix-process-env.js +19 -0
  607. package/dist/utils/geometry/delta-apply.d.ts +71 -0
  608. package/dist/utils/geometry/delta-apply.d.ts.map +1 -0
  609. package/{src/utils/geometry/delta-apply.ts → dist/utils/geometry/delta-apply.js} +162 -162
  610. package/dist/utils/geometry/delta-calc.d.ts +34 -0
  611. package/dist/utils/geometry/delta-calc.d.ts.map +1 -0
  612. package/{src/utils/geometry/delta-calc.ts → dist/utils/geometry/delta-calc.js} +84 -89
  613. package/dist/utils/geometry/index.d.ts +30 -0
  614. package/dist/utils/geometry/index.d.ts.map +1 -0
  615. package/{src/utils/geometry/index.ts → dist/utils/geometry/index.js} +70 -83
  616. package/dist/utils/is-browser.d.ts +11 -0
  617. package/dist/utils/is-browser.d.ts.map +1 -0
  618. package/{src/utils/is-browser.ts → dist/utils/is-browser.js} +10 -12
  619. package/dist/utils/is-numerical-string.d.ts +14 -0
  620. package/dist/utils/is-numerical-string.d.ts.map +1 -0
  621. package/{src/utils/is-numerical-string.ts → dist/utils/is-numerical-string.js} +13 -15
  622. package/dist/utils/is-ref-object.d.ts +13 -0
  623. package/dist/utils/is-ref-object.d.ts.map +1 -0
  624. package/dist/utils/is-ref-object.js +12 -0
  625. package/dist/utils/noop.d.ts +11 -0
  626. package/dist/utils/noop.d.ts.map +1 -0
  627. package/{src/utils/noop.ts → dist/utils/noop.js} +13 -15
  628. package/dist/utils/resolve-value.d.ts +9 -0
  629. package/dist/utils/resolve-value.d.ts.map +1 -0
  630. package/{src/utils/resolve-value.ts → dist/utils/resolve-value.js} +15 -23
  631. package/dist/utils/shallow-compare.d.ts +11 -0
  632. package/dist/utils/shallow-compare.d.ts.map +1 -0
  633. package/{src/utils/shallow-compare.ts → dist/utils/shallow-compare.js} +21 -23
  634. package/dist/utils/subscription-manager.d.ts +14 -0
  635. package/dist/utils/subscription-manager.d.ts.map +1 -0
  636. package/dist/utils/subscription-manager.js +69 -0
  637. package/dist/utils/time-conversion.d.ts +17 -0
  638. package/dist/utils/time-conversion.d.ts.map +1 -0
  639. package/{src/utils/time-conversion.ts → dist/utils/time-conversion.js} +16 -18
  640. package/{src/utils/transform.ts → dist/utils/transform.d.ts} +93 -120
  641. package/dist/utils/transform.d.ts.map +1 -0
  642. package/dist/utils/transform.js +23 -0
  643. package/dist/utils/use-cycle.d.ts +2 -0
  644. package/dist/utils/use-cycle.d.ts.map +1 -0
  645. package/{src/utils/use-cycle.ts → dist/utils/use-cycle.js} +65 -78
  646. package/dist/utils/use-force-update.d.ts +6 -0
  647. package/dist/utils/use-force-update.d.ts.map +1 -0
  648. package/dist/utils/use-force-update.js +2 -0
  649. package/dist/utils/use-reduced-motion.d.ts +33 -0
  650. package/dist/utils/use-reduced-motion.d.ts.map +1 -0
  651. package/{src/utils/use-reduced-motion.ts → dist/utils/use-reduced-motion.js} +52 -70
  652. package/{src/utils/use-unmount-effect.ts → dist/utils/use-unmount-effect.d.ts} +7 -8
  653. package/dist/utils/use-unmount-effect.d.ts.map +1 -0
  654. package/dist/utils/use-unmount-effect.js +1 -0
  655. package/{src/value/index.ts → dist/value/index.d.ts} +273 -409
  656. package/dist/value/index.d.ts.map +1 -0
  657. package/dist/value/index.js +546 -0
  658. package/dist/value/scroll/use-element-scroll.d.ts +9 -0
  659. package/dist/value/scroll/use-element-scroll.d.ts.map +1 -0
  660. package/dist/value/scroll/use-element-scroll.js +39 -0
  661. package/dist/value/scroll/use-viewport-scroll.d.ts +29 -0
  662. package/dist/value/scroll/use-viewport-scroll.d.ts.map +1 -0
  663. package/{src/value/scroll/use-viewport-scroll.ts → dist/value/scroll/use-viewport-scroll.js} +59 -81
  664. package/dist/value/scroll/utils.d.ts +25 -0
  665. package/dist/value/scroll/utils.d.ts.map +1 -0
  666. package/dist/value/scroll/utils.js +48 -0
  667. package/dist/value/use-combine-values.d.ts +9 -0
  668. package/dist/value/use-combine-values.d.ts.map +1 -0
  669. package/dist/value/use-combine-values.js +41 -0
  670. package/dist/value/use-motion-template.d.ts +31 -0
  671. package/dist/value/use-motion-template.d.ts.map +1 -0
  672. package/{src/value/use-motion-template.ts → dist/value/use-motion-template.js} +51 -57
  673. package/dist/value/use-motion-value.d.ts +27 -0
  674. package/dist/value/use-motion-value.d.ts.map +1 -0
  675. package/{src/value/use-motion-value.ts → dist/value/use-motion-value.js} +27 -27
  676. package/dist/value/use-spring.d.ts +29 -0
  677. package/dist/value/use-spring.d.ts.map +1 -0
  678. package/{src/value/use-spring.ts → dist/value/use-spring.js} +64 -84
  679. package/dist/value/use-transform.d.ts +87 -0
  680. package/dist/value/use-transform.d.ts.map +1 -0
  681. package/dist/value/use-transform.js +78 -0
  682. package/dist/value/use-velocity.d.ts +20 -0
  683. package/dist/value/use-velocity.d.ts.map +1 -0
  684. package/{src/value/use-velocity.ts → dist/value/use-velocity.js} +34 -44
  685. package/dist/value/utils/is-motion-value.d.ts +12 -0
  686. package/dist/value/utils/is-motion-value.d.ts.map +1 -0
  687. package/dist/value/utils/is-motion-value.js +8 -0
  688. package/dist/value/utils/resolve-motion-value.d.ts +16 -0
  689. package/dist/value/utils/resolve-motion-value.d.ts.map +1 -0
  690. package/{src/value/utils/resolve-motion-value.ts → dist/value/utils/resolve-motion-value.js} +25 -29
  691. package/package.json +58 -27
  692. package/src/animation/use-animated-state.ts +0 -1
  693. package/src/components/MotionConfig/MotionConfigScaleCorrection.ts +0 -47
  694. package/src/context/DOMcontext.ts +0 -21
  695. package/src/context/LayoutGroupContext.ts +0 -13
  696. package/src/context/LazyContext.ts +0 -18
  697. package/src/context/MotionContext/MotionContext.svelte +0 -27
  698. package/src/context/MotionContext/UseCreateMotionContext.svelte +0 -34
  699. package/src/context/MotionContext/index.ts +0 -14
  700. package/src/context/SharedLayoutContext.ts +0 -29
  701. package/src/events/UsePointerEvent.svelte +0 -76
  702. package/src/events/use-pointer-event.ts +0 -29
  703. package/src/gestures/PanSession.ts +0 -298
  704. package/src/gestures/drag/UseDragControls.svelte +0 -145
  705. package/src/gestures/drag/VisualElementDragControls.ts +0 -632
  706. package/src/gestures/drag/use-drag-controls.ts +0 -148
  707. package/src/index.ts +0 -104
  708. package/src/motion/features/layout/Animate.ts +0 -9
  709. package/src/motion/features/layout/Measure.ts +0 -9
  710. package/src/motion/index.ts +0 -64
  711. package/src/motion/utils/use-motion-ref.ts +0 -41
  712. package/src/motion/utils/use-visual-element.ts +0 -13
  713. package/src/render/dom/create-motion-class.ts +0 -12
  714. package/src/render/dom/motion-minimal.ts +0 -22
  715. package/src/render/dom/motion-proxy.ts +0 -107
  716. package/src/render/dom/projection/scale-correction.ts +0 -22
  717. package/src/render/dom/use-render.ts +0 -11
  718. package/src/render/dom/utils/create-config.ts +0 -33
  719. package/src/render/dom/utils/use-svg-props.ts +0 -1
  720. package/src/render/dom/value-types/defaults.ts +0 -30
  721. package/src/render/dom/value-types/find.ts +0 -31
  722. package/src/render/html/UseStyle.svelte +0 -47
  723. package/src/render/html/config-motion.ts +0 -23
  724. package/src/render/html/use-props.ts +0 -14
  725. package/src/render/html/utils/create-render-state.ts +0 -18
  726. package/src/render/svg/config-motion.ts +0 -51
  727. package/src/render/svg/types.ts +0 -51
  728. package/src/render/svg/utils/build-attrs.ts +0 -58
  729. package/src/render/svg/utils/create-render-state.ts +0 -17
  730. package/src/render/utils/flat-tree.ts +0 -35
  731. package/src/render/utils/setters.ts +0 -910
  732. package/src/utils/errors.ts +0 -22
  733. package/src/utils/fix-process-env.ts +0 -22
  734. package/src/utils/is-ref-object.ts +0 -16
  735. package/src/utils/subscription-manager.ts +0 -49
  736. package/src/utils/use-constant.ts +0 -23
  737. package/src/utils/use-force-update.ts +0 -7
  738. package/src/utils/use-isomorphic-effect.ts +0 -8
  739. package/src/value/scroll/use-element-scroll.ts +0 -73
  740. package/src/value/scroll/utils.ts +0 -76
  741. package/src/value/use-combine-values.ts +0 -53
  742. package/src/value/use-transform.ts +0 -216
  743. package/src/value/utils/is-motion-value.ts +0 -15
  744. /package/{src → dist}/animation/UseAnimation.svelte +0 -0
  745. /package/{src → dist}/components/MotionDiv.svelte +0 -0
  746. /package/{src → dist}/context/MotionContext/MotionContextProvider.svelte +0 -0
  747. /package/{src → dist}/gestures/UseFocusGesture.svelte +0 -0
  748. /package/{src → dist}/gestures/UseGestures.svelte +0 -0
  749. /package/{src → dist}/motion/features/AnimationState.svelte +0 -0
  750. /package/{src → dist}/motion/features/layout/AnimateLayoutContextProvider.svelte +0 -0
  751. /package/{src → dist}/utils/UseUnmountEffect.svelte +0 -0
@@ -1,1088 +1,1091 @@
1
- /**
2
- based on framer-motion@4.1.17,
3
- Copyright (c) 2018 Framer B.V.
4
- */
5
- import type { CSSProperties, SVGAttributes } from "react";
6
- import type { SVGPathProperties, TransformProperties } from "./motion/types.js";
7
- /**
8
- * @public
9
- */
10
- export type ResolvedKeyframesTarget = [null, ...number[]] | number[] | [null, ...string[]] | string[];
11
- /**
12
- * @public
13
- */
14
- export type KeyframesTarget = ResolvedKeyframesTarget | [null, ...CustomValueType[]] | CustomValueType[];
15
- /**
16
- * @public
17
- */
18
- export type ResolvedSingleTarget = string | number;
19
- /**
20
- * @public
21
- */
22
- export type SingleTarget = ResolvedSingleTarget | CustomValueType;
23
- /**
24
- * @public
25
- */
26
- export type ResolvedValueTarget = ResolvedSingleTarget | ResolvedKeyframesTarget;
27
- /**
28
- * @public
29
- */
30
- export type ValueTarget = SingleTarget | KeyframesTarget;
31
- /**
32
- * @public
33
- */
34
- export type Props = {
35
- [key: string]: any;
36
- };
37
- /**
38
- * A function that accepts a progress value between `0` and `1` and returns a
39
- * new one.
40
- *
41
- * @library
42
- *
43
- * ```jsx
44
- * const transition = {
45
- * ease: progress => progress * progress
46
- * }
47
- *
48
- * <Frame
49
- * animate={{ opacity: 0 }}
50
- * transition={transition}
51
- * />
52
- * ```
53
- *
54
- * @motion
55
- *
56
- * ```jsx
57
- * <MotionDiv
58
- * animate={{ opacity: 0 }}
59
- * transition={{
60
- * duration: 1,
61
- * ease: progress => progress * progress
62
- * }}
63
- * />
64
- * ```
65
- *
66
- * @public
67
- */
68
- export type EasingFunction = (v: number) => number;
69
- /**
70
- * The easing function to use. Set as one of:
71
- *
72
- * - The name of an in-built easing function.
73
- * - An array of four numbers to define a cubic bezier curve.
74
- * - An easing function, that accepts and returns a progress value between `0` and `1`.
75
- *
76
- * @public
77
- */
78
- export type Easing = [number, number, number, number] | "linear" | "easeIn" | "easeOut" | "easeInOut" | "circIn" | "circOut" | "circInOut" | "backIn" | "backOut" | "backInOut" | "anticipate" | EasingFunction;
79
- /**
80
- * Options for orchestrating the timing of animations.
81
- *
82
- * @public
83
- */
84
- export interface Orchestration {
85
- /**
86
- * Delay the animation by this duration (in seconds). Defaults to `0`.
87
- *
88
- * @remarks
89
- * ```javascript
90
- * const transition = {
91
- * delay: 0.2
92
- * }
93
- * ```
94
- *
95
- * @public
96
- */
97
- delay?: number;
98
- /**
99
- * Describes the relationship between the transition and its children. Set
100
- * to `false` by default.
101
- *
102
- * @remarks
103
- * When using variants, the transition can be scheduled in relation to its
104
- * children with either `"beforeChildren"` to finish this transition before
105
- * starting children transitions, `"afterChildren"` to finish children
106
- * transitions before starting this transition.
107
- *
108
- * @motion
109
- *
110
- * ```jsx
111
- * const list = {
112
- * hidden: {
113
- * opacity: 0,
114
- * transition: { when: "afterChildren" }
115
- * }
116
- * }
117
- *
118
- * const item = {
119
- * hidden: {
120
- * opacity: 0,
121
- * transition: { duration: 2 }
122
- * }
123
- * }
124
- *
125
- * <Motion let:motion={ul} variants={list} animate="hidden">
126
- * <ul use:ul>
127
- * <Motion let:motion variants={item}>
128
- * <li use:motion />
129
- * </Motion>
130
- * <Motion let:motion variants={item}>
131
- * <li use:motion />
132
- * </Motion>
133
- * </ul>
134
- * </Motion>
135
- * )
136
- * ```
137
- *
138
- * @public
139
- */
140
- when?: false | "beforeChildren" | "afterChildren" | string;
141
- /**
142
- * When using variants, children animations will start after this duration
143
- * (in seconds). You can add the `transition` property to both the `Frame` and the `variant` directly. Adding it to the `variant` generally offers more flexibility, as it allows you to customize the delay per visual state.
144
- *
145
- * @motion
146
- *
147
- * ```jsx
148
- * const container = {
149
- * hidden: { opacity: 0 },
150
- * show: {
151
- * opacity: 1,
152
- * transition: {
153
- * delayChildren: 0.5
154
- * }
155
- * }
156
- * }
157
- *
158
- * const item = {
159
- * hidden: { opacity: 0 },
160
- * show: { opacity: 1 }
161
- * }
162
- *
163
- * <Motion let:motion={ul}
164
- * variants={container}
165
- * initial="hidden"
166
- * animate="show">
167
- * <ul use:ul>
168
- * <Motion let:motion variants={item}>
169
- * <li use:motion />
170
- * </Motion>
171
- * <Motion let:motion variants={item}>
172
- * <li use:motion />
173
- * </Motion>
174
- * </ul>
175
- * </Motion>
176
- * ```
177
- *
178
- * @public
179
- */
180
- delayChildren?: number;
181
- /**
182
- * When using variants, animations of child components can be staggered by this
183
- * duration (in seconds).
184
- *
185
- * For instance, if `staggerChildren` is `0.01`, the first child will be
186
- * delayed by `0` seconds, the second by `0.01`, the third by `0.02` and so
187
- * on.
188
- *
189
- * The calculated stagger delay will be added to `delayChildren`.
190
- *
191
- * @motion
192
- *
193
- * ```jsx
194
- * const container = {
195
- * hidden: { opacity: 0 },
196
- * show: {
197
- * opacity: 1,
198
- * transition: {
199
- * staggerChildren: 0.5
200
- * }
201
- * }
202
- * }
203
- *
204
- * const item = {
205
- * hidden: { opacity: 0 },
206
- * show: { opacity: 1 }
207
- * }
208
- *
209
- * return (
210
- * <Motion let:motion={ul}
211
- * variants={container}
212
- * initial="hidden"
213
- * animate="show">
214
- * <ol use:ul>
215
- * <Motion let:motion variants={item}>
216
- * <li use:motion />
217
- * </Motion>
218
- * <Motion let:motion variants={item}>
219
- * <li use:motion />
220
- * </Motion>
221
- * </ol>
222
- * </Motion>
223
- * )
224
- * ```
225
- *
226
- * @public
227
- */
228
- staggerChildren?: number;
229
- /**
230
- * The direction in which to stagger children.
231
- *
232
- * A value of `1` staggers from the first to the last while `-1`
233
- * staggers from the last to the first.
234
- *
235
- * @motion
236
- *
237
- * ```jsx
238
- * const container = {
239
- * hidden: { opacity: 0 },
240
- * show: {
241
- * opacity: 1,
242
- * transition: {
243
- * delayChildren: 0.5,
244
- * staggerDirection: -1
245
- * }
246
- * }
247
- * }
248
- *
249
- * const item = {
250
- * hidden: { opacity: 0 },
251
- * show: { opacity: 1 }
252
- * }
253
- *
254
- * <Motion let:motion={ul}
255
- * variants={container}
256
- * initial="hidden"
257
- * animate="show">
258
- * <ul use:ul>
259
- * <Motion let:motion
260
- * variants={item}
261
- * size={50}/>
262
- * <li use:motion/>
263
- * </Motion>
264
- * <Motion let:motion
265
- * variants={item}
266
- * size={50}/>
267
- * <li use:motion/>
268
- * </Motion>*
269
- * </ul>
270
- * </Motion>
271
- * ```
272
- *
273
- * @public
274
- */
275
- staggerDirection?: number;
276
- }
277
- export interface Repeat {
278
- /**
279
- * The number of times to repeat the transition. Set to `Infinity` for perpetual repeating.
280
- *
281
- * Without setting `repeatType`, this will loop the animation.
282
- *
283
- * @motion
284
- *
285
- * ```jsx
286
- * <MotionDiv
287
- * animate={{ rotate: 180 }}
288
- * transition={{ repeat: Infinity, duration: 2 }}
289
- * />
290
- * ```
291
- *
292
- * @public
293
- */
294
- repeat?: number;
295
- /**
296
- * How to repeat the animation. This can be either:
297
- *
298
- * "loop": Repeats the animation from the start
299
- *
300
- * "reverse": Alternates between forward and backwards playback
301
- *
302
- * "mirror": Switches `from` and `to` alternately
303
- *
304
- * @motion
305
- *
306
- * ```jsx
307
- * <MotionDiv
308
- * animate={{ rotate: 180 }}
309
- * transition={{
310
- * repeat: 1,
311
- * repeatType: "reverse",
312
- * duration: 2
313
- * }}
314
- * />
315
- * ```
316
- *
317
- * @public
318
- */
319
- repeatType?: "loop" | "reverse" | "mirror";
320
- /**
321
- * When repeating an animation, `repeatDelay` will set the
322
- * duration of the time to wait, in seconds, between each repetition.
323
- *
324
- * @motion
325
- *
326
- * ```jsx
327
- * <MotionDiv
328
- * animate={{ rotate: 180 }}
329
- * transition={{ repeat: Infinity, repeatDelay: 1 }}
330
- * />
331
- * ```
332
- *
333
- * @public
334
- */
335
- repeatDelay?: number;
336
- }
337
- /**
338
- * An animation that animates between two or more values over a specific duration of time.
339
- * This is the default animation for non-physical values like `color` and `opacity`.
340
- *
341
- * @public
342
- */
343
- export interface Tween extends Repeat {
344
- /**
345
- * Set `type` to `"tween"` to use a duration-based tween animation.
346
- * If any non-orchestration `transition` values are set without a `type` property,
347
- * this is used as the default animation.
348
- *
349
- * @motion
350
- *
351
- * ```jsx
352
- * <Motion let:motion isSVG={true}
353
- * animate={{ pathLength: 1 }}
354
- * transition={{ duration: 2, type: "tween" }}>
355
- * <path use:motion/>
356
- * </Motion> *
357
- * />
358
- * ```
359
- *
360
- * @public
361
- */
362
- type?: "tween";
363
- /**
364
- * The duration of the tween animation. Set to `0.3` by default, 0r `0.8` if animating a series of keyframes.
365
- *
366
- * @motion
367
- *
368
- * ```jsx
369
- * const variants = {
370
- * visible: {
371
- * opacity: 1,
372
- * transition: { duration: 2 }
373
- * }
374
- * }
375
- * ```
376
- *
377
- * @public
378
- */
379
- duration?: number;
380
- /**
381
- * The easing function to use. Set as one of the below.
382
- *
383
- * - The name of an existing easing function.
384
- *
385
- * - An array of four numbers to define a cubic bezier curve.
386
- *
387
- * - An easing function, that accepts and returns a value `0-1`.
388
- *
389
- * If the animating value is set as an array of multiple values for a keyframes
390
- * animation, `ease` can be set as an array of easing functions to set different easings between
391
- * each of those values.
392
- *
393
- * @motion
394
- *
395
- * ```jsx
396
- * <MotionDiv
397
- * animate={{ opacity: 0 }}
398
- * transition={{ ease: [0.17, 0.67, 0.83, 0.67] }}
399
- * />
400
- * ```
401
- *
402
- * @public
403
- */
404
- ease?: Easing | Easing[];
405
- /**
406
- * The duration of time already elapsed in the animation. Set to `0` by
407
- * default.
408
- *
409
- * @internal
410
- */
411
- elapsed?: number;
412
- /**
413
- * When animating keyframes, `times` can be used to determine where in the animation each keyframe is reached.
414
- * Each value in `times` is a value between `0` and `1`, representing `duration`.
415
- *
416
- * There must be the same number of `times` as there are keyframes.
417
- * Defaults to an array of evenly-spread durations.
418
- *
419
- * @motion
420
- *
421
- * ```jsx
422
- * <MotionDiv
423
- * animate={{ scale: [0, 1, 0.5, 1] }}
424
- * transition={{ times: [0, 0.1, 0.9, 1] }}
425
- * />
426
- * ```
427
- *
428
- * @public
429
- */
430
- times?: number[];
431
- /**
432
- * When animating keyframes, `easings` can be used to define easing functions between each keyframe. This array should be one item fewer than the number of keyframes, as these easings apply to the transitions between the keyframes.
433
- *
434
- * @motion
435
- *
436
- * ```jsx
437
- * <MotionDiv
438
- * animate={{ backgroundColor: ["#0f0", "#00f", "#f00"] }}
439
- * transition={{ easings: ["easeIn", "easeOut"] }}
440
- * />
441
- * ```
442
- *
443
- * @public
444
- */
445
- easings?: Easing[];
446
- /**
447
- * The value to animate from.
448
- * By default, this is the current state of the animating value.
449
- *
450
- * @motion
451
- *
452
- * ```jsx
453
- * <MotionDiv
454
- * animate={{ rotate: 180 }}
455
- * transition={{ from: 90, duration: 2 }}
456
- * />
457
- * ```
458
- *
459
- * @public
460
- */
461
- from?: number | string;
462
- /**
463
- * @internal
464
- */
465
- to?: number | string | ValueTarget;
466
- /**
467
- * @internal
468
- */
469
- velocity?: number;
470
- /**
471
- * @internal
472
- */
473
- delay?: number;
474
- }
475
- /**
476
- * An animation that simulates spring physics for realistic motion.
477
- * This is the default animation for physical values like `x`, `y`, `scale` and `rotate`.
478
- *
479
- * @public
480
- */
481
- export interface Spring extends Repeat {
482
- /**
483
- * Set `type` to `"spring"` to animate using spring physics for natural
484
- * movement. Type is set to `"spring"` by default.
485
- *
486
- * @motion
487
- *
488
- * ```jsx
489
- * <MotionDiv
490
- * animate={{ rotate: 180 }}
491
- * transition={{ type: 'spring' }}
492
- * />
493
- * ```
494
- *
495
- * @public
496
- */
497
- type: "spring";
498
- /**
499
- * Stiffness of the spring. Higher values will create more sudden movement.
500
- * Set to `100` by default.
501
- *
502
- * @motion
503
- *
504
- * ```jsx
505
- * <MotionDiv
506
- * animate={{ rotate: 180 }}
507
- * transition={{ type: 'spring', stiffness: 50 }}
508
- * />
509
- * ```
510
- *
511
- * @public
512
- */
513
- stiffness?: number;
514
- /**
515
- * Strength of opposing force. If set to 0, spring will oscillate
516
- * indefinitely. Set to `10` by default.
517
- *
518
- * @motion
519
- *
520
- * ```jsx
521
- * <MotionDiv
522
- * animate={{ rotate: 180 }}
523
- * transition={{ type: 'spring', damping: 300 }}
524
- * />
525
- * ```
526
- *
527
- * @public
528
- */
529
- damping?: number;
530
- /**
531
- * Mass of the moving object. Higher values will result in more lethargic
532
- * movement. Set to `1` by default.
533
- *
534
- * @motion
535
- *
536
- * ```jsx
537
- * <motion.feTurbulence
538
- * animate={{ baseFrequency: 0.5 } as any}
539
- * transition={{ type: "spring", mass: 0.5 }}
540
- * />
541
- * ```
542
- *
543
- * @public
544
- */
545
- mass?: number;
546
- /**
547
- * The duration of the animation, defined in seconds. Spring animations can be a maximum of 10 seconds.
548
- *
549
- * If `bounce` is set, this defaults to `0.8`.
550
- *
551
- * Note: `duration` and `bounce` will be overridden if `stiffness`, `damping` or `mass` are set.
552
- *
553
- * @motion
554
- *
555
- * ```jsx
556
- * <MotionDiv
557
- * animate={{ x: 100 }}
558
- * transition={{ type: "spring", duration: 0.8 }}
559
- * />
560
- * ```
561
- *
562
- * @public
563
- */
564
- duration?: number;
565
- /**
566
- * `bounce` determines the "bounciness" of a spring animation.
567
- *
568
- * `0` is no bounce, and `1` is extremely bouncy.
569
- *
570
- * If `duration` is set, this defaults to `0.25`.
571
- *
572
- * Note: `bounce` and `duration` will be overridden if `stiffness`, `damping` or `mass` are set.
573
- *
574
- * @motion
575
- *
576
- * ```jsx
577
- * <MotionDiv
578
- * animate={{ x: 100 }}
579
- * transition={{ type: "spring", bounce: 0.25 }}
580
- * />
581
- * ```
582
- *
583
- * @public
584
- */
585
- bounce?: number;
586
- /**
587
- * End animation if absolute speed (in units per second) drops below this
588
- * value and delta is smaller than `restDelta`. Set to `0.01` by default.
589
- *
590
- * @motion
591
- *
592
- * ```jsx
593
- * <MotionDiv
594
- * animate={{ rotate: 180 }}
595
- * transition={{ type: 'spring', restSpeed: 0.5 }}
596
- * />
597
- * ```
598
- *
599
- * @public
600
- */
601
- restSpeed?: number;
602
- /**
603
- * End animation if distance is below this value and speed is below
604
- * `restSpeed`. When animation ends, spring gets “snapped” to. Set to
605
- * `0.01` by default.
606
- *
607
- * @motion
608
- *
609
- * ```jsx
610
- * <MotionDiv
611
- * animate={{ rotate: 180 }}
612
- * transition={{ type: 'spring', restDelta: 0.5 }}
613
- * />
614
- * ```
615
- *
616
- * @public
617
- */
618
- restDelta?: number;
619
- /**
620
- * The value to animate from.
621
- * By default, this is the initial state of the animating value.
622
- *
623
- * @motion
624
- *
625
- * ```jsx
626
- * <MotionDiv
627
- * animate={{ rotate: 180 }}
628
- * transition={{ type: 'spring', from: 90 }}
629
- * />
630
- * ```
631
- *
632
- * @public
633
- */
634
- from?: number | string;
635
- /**
636
- * @internal
637
- */
638
- to?: number | string | ValueTarget;
639
- /**
640
- * The initial velocity of the spring. By default this is the current velocity of the component.
641
- *
642
- * @motion
643
- *
644
- * ```jsx
645
- * <MotionDiv
646
- * animate={{ rotate: 180 }}
647
- * transition={{ type: 'spring', velocity: 2 }}
648
- * />
649
- * ```
650
- *
651
- * @public
652
- */
653
- velocity?: number;
654
- /**
655
- * @internal
656
- */
657
- delay?: number;
658
- }
659
- /**
660
- * An animation that decelerates a value based on its initial velocity,
661
- * usually used to implement inertial scrolling.
662
- *
663
- * Optionally, `min` and `max` boundaries can be defined, and inertia
664
- * will snap to these with a spring animation.
665
- *
666
- * This animation will automatically precalculate a target value,
667
- * which can be modified with the `modifyTarget` property.
668
- *
669
- * This allows you to add snap-to-grid or similar functionality.
670
- *
671
- * Inertia is also the animation used for `dragTransition`, and can be configured via that prop.
672
- *
673
- * @public
674
- */
675
- export interface Inertia {
676
- /**
677
- * Set `type` to animate using the inertia animation. Set to `"tween"` by
678
- * default. This can be used for natural deceleration, like momentum scrolling.
679
- *
680
- * @motion
681
- *
682
- * ```jsx
683
- * <MotionDiv
684
- * animate={{ rotate: 180 }}
685
- * transition={{ type: "inertia", velocity: 50 }}
686
- * />
687
- * ```
688
- *
689
- * @public
690
- */
691
- type: "inertia";
692
- /**
693
- * A function that receives the automatically-calculated target and returns a new one. Useful for snapping the target to a grid.
694
- *
695
- * @motion
696
- *
697
- * ```jsx
698
- * <MotionDiv
699
- * drag
700
- * dragTransition={{
701
- * power: 0,
702
- * // Snap calculated target to nearest 50 pixels
703
- * modifyTarget: target => Math.round(target / 50) * 50
704
- * }}
705
- * />
706
- * ```
707
- *
708
- * @public
709
- */
710
- modifyTarget?(v: number): number;
711
- /**
712
- * If `min` or `max` is set, this affects the stiffness of the bounce
713
- * spring. Higher values will create more sudden movement. Set to `500` by
714
- * default.
715
- *
716
- * @motion
717
- *
718
- * ```jsx
719
- * <MotionDiv
720
- * drag
721
- * dragTransition={{
722
- * min: 0,
723
- * max: 100,
724
- * bounceStiffness: 100
725
- * }}
726
- * />
727
- * ```
728
- *
729
- * @public
730
- */
731
- bounceStiffness?: number;
732
- /**
733
- * If `min` or `max` is set, this affects the damping of the bounce spring.
734
- * If set to `0`, spring will oscillate indefinitely. Set to `10` by
735
- * default.
736
- *
737
- * @motion
738
- *
739
- * ```jsx
740
- * <MotionDiv
741
- * drag
742
- * dragTransition={{
743
- * min: 0,
744
- * max: 100,
745
- * bounceDamping: 8
746
- * }}
747
- * />
748
- * ```
749
- *
750
- * @public
751
- */
752
- bounceDamping?: number;
753
- /**
754
- * A higher power value equals a further target. Set to `0.8` by default.
755
- *
756
- * @motion
757
- *
758
- * ```jsx
759
- * <MotionDiv
760
- * drag
761
- * dragTransition={{ power: 0.2 }}
762
- * />
763
- * ```
764
- *
765
- * @public
766
- */
767
- power?: number;
768
- /**
769
- * Adjusting the time constant will change the duration of the
770
- * deceleration, thereby affecting its feel. Set to `700` by default.
771
- *
772
- * @motion
773
- *
774
- * ```jsx
775
- * <MotionDiv
776
- * drag
777
- * dragTransition={{ timeConstant: 200 }}
778
- * />
779
- * ```
780
- *
781
- * @public
782
- */
783
- timeConstant?: number;
784
- /**
785
- * End the animation if the distance to the animation target is below this value, and the absolute speed is below `restSpeed`.
786
- * When the animation ends, the value gets snapped to the animation target. Set to `0.01` by default.
787
- * Generally the default values provide smooth animation endings, only in rare cases should you need to customize these.
788
- *
789
- * @motion
790
- *
791
- * ```jsx
792
- * <MotionDiv
793
- * drag
794
- * dragTransition={{ restDelta: 10 }}
795
- * />
796
- * ```
797
- *
798
- * @public
799
- */
800
- restDelta?: number;
801
- /**
802
- * Minimum constraint. If set, the value will "bump" against this value (or immediately spring to it if the animation starts as less than this value).
803
- *
804
- * @motion
805
- *
806
- * ```jsx
807
- * <MotionDiv
808
- * drag
809
- * dragTransition={{ min: 0, max: 100 }}
810
- * />
811
- * ```
812
- *
813
- * @public
814
- */
815
- min?: number;
816
- /**
817
- * Maximum constraint. If set, the value will "bump" against this value (or immediately snap to it, if the initial animation value exceeds this value).
818
- *
819
- * @motion
820
- *
821
- * ```jsx
822
- * <MotionDiv
823
- * drag
824
- * dragTransition={{ min: 0, max: 100 }}
825
- * />
826
- * ```
827
- *
828
- * @public
829
- */
830
- max?: number;
831
- /**
832
- * The value to animate from. By default, this is the current state of the animating value.
833
- *
834
- * @motion
835
- *
836
- * ```jsx
837
- * <MotionDiv
838
- * drag
839
- * dragTransition={{ from: 50 }}
840
- * />
841
- * ```
842
- *
843
- * @public
844
- */
845
- from?: number | string;
846
- /**
847
- * The initial velocity of the animation.
848
- * By default this is the current velocity of the component.
849
- *
850
- * @motion
851
- *
852
- * ```jsx
853
- * <MotionDiv
854
- * animate={{ rotate: 180 }}
855
- * transition={{ type: 'inertia', velocity: 200 }}
856
- * />
857
- * ```
858
- *
859
- * @public
860
- */
861
- velocity?: number;
862
- /**
863
- * @internal
864
- */
865
- delay?: number;
866
- }
867
- /**
868
- * Keyframes tweens between multiple `values`.
869
- *
870
- * These tweens can be arranged using the `duration`, `easings`, and `times` properties.
871
- *
872
- * @internalremarks
873
- * We could possibly make the `type` property redundant, if not for all animations
874
- * then for this one quite easily.
875
- *
876
- * @internal
877
- */
878
- export interface Keyframes {
879
- /**
880
- * Set `type` to `"keyframes"` to animate using the keyframes animation.
881
- * Set to `"tween"` by default. This can be used to animate between a series of values.
882
- *
883
- * @public
884
- */
885
- type: "keyframes";
886
- /**
887
- * An array of values to animate between.
888
- *
889
- * @internal
890
- */
891
- values: KeyframesTarget;
892
- /**
893
- * An array of numbers between 0 and 1, where `1` represents the `total` duration.
894
- *
895
- * Each value represents at which point during the animation each item in the animation target should be hit, so the array should be the same length as `values`.
896
- *
897
- * Defaults to an array of evenly-spread durations.
898
- *
899
- * @public
900
- */
901
- times?: number[];
902
- /**
903
- * An array of easing functions for each generated tween, or a single easing function applied to all tweens.
904
- *
905
- * This array should be one item less than `values`, as these easings apply to the transitions *between* the `values`.
906
- *
907
- * ```jsx
908
- * const transition = {
909
- * backgroundColor: {
910
- * type: 'keyframes',
911
- * easings: ['circIn', 'circOut']
912
- * }
913
- * }
914
- * ```
915
- *
916
- * @public
917
- */
918
- ease?: Easing | Easing[];
919
- /**
920
- * Popmotion's easing prop to define individual easings. `ease` will be mapped to this prop in keyframes animations.
921
- *
922
- * @internal
923
- */
924
- easings?: Easing | Easing[];
925
- /**
926
- * @internal
927
- */
928
- elapsed?: number;
929
- /**
930
- * The total duration of the animation. Set to `0.3` by default.
931
- *
932
- * ```jsx
933
- * const transition = {
934
- * type: "keyframes",
935
- * duration: 2
936
- * }
937
- *
938
- * <MotionDiv
939
- * animate={{ opacity: 0 }}
940
- * transition={transition}
941
- * />
942
- * ```
943
- *
944
- * @public
945
- */
946
- duration?: number;
947
- /**
948
- * @public
949
- */
950
- repeatDelay?: number;
951
- /**
952
- * @internal
953
- */
954
- from?: number | string;
955
- /**
956
- * @internal
957
- */
958
- to?: number | string | ValueTarget;
959
- /**
960
- * @internal
961
- */
962
- velocity?: number;
963
- /**
964
- * @internal
965
- */
966
- delay?: number;
967
- }
968
- /**
969
- * @internal
970
- */
971
- export interface Just {
972
- type: "just";
973
- to?: number | string | ValueTarget;
974
- from?: number | string;
975
- delay?: number;
976
- velocity?: number;
977
- }
978
- /**
979
- * @public
980
- */
981
- export interface None {
982
- /**
983
- * Set `type` to `false` for an instant transition.
984
- *
985
- * @public
986
- */
987
- type: false;
988
- /**
989
- * @internal
990
- */
991
- from?: number | string;
992
- /**
993
- * @internal
994
- */
995
- delay?: number;
996
- /**
997
- * @internal
998
- */
999
- velocity?: number;
1000
- }
1001
- /**
1002
- * @public
1003
- */
1004
- export type PopmotionTransitionProps = Tween | Spring | Keyframes | Inertia | Just;
1005
- /**
1006
- * @public
1007
- */
1008
- export type PermissiveTransitionDefinition = {
1009
- [key: string]: any;
1010
- };
1011
- /**
1012
- * @public
1013
- */
1014
- export type TransitionDefinition = Tween | Spring | Keyframes | Inertia | Just | None | PermissiveTransitionDefinition;
1015
- export type TransitionMap = Orchestration & {
1016
- [key: string]: TransitionDefinition;
1017
- };
1018
- /**
1019
- * Transition props
1020
- *
1021
- * @public
1022
- */
1023
- export type Transition = (Orchestration & Repeat & TransitionDefinition) | (Orchestration & Repeat & TransitionMap);
1024
- export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
1025
- type CSSPropertiesWithoutTransitionOrSingleTransforms = Omit<CSSProperties, "transition" | "rotate" | "scale" | "perspective">;
1026
- type TargetProperties = CSSPropertiesWithoutTransitionOrSingleTransforms & SVGAttributes<SVGElement> & TransformProperties /*& CustomStyles*/ & SVGPathProperties;
1027
- /**
1028
- * @public
1029
- */
1030
- export type MakeCustomValueType<T> = {
1031
- [K in keyof T]: T[K] | CustomValueType;
1032
- };
1033
- /**
1034
- * @public
1035
- */
1036
- export type Target = MakeCustomValueType<TargetProperties>;
1037
- /**
1038
- * @public
1039
- */
1040
- export type MakeKeyframes<T> = {
1041
- [K in keyof T]: T[K] | T[K][] | [null, ...T[K][]];
1042
- };
1043
- /**
1044
- * @public
1045
- */
1046
- export type TargetWithKeyframes = MakeKeyframes<Target>;
1047
- /**
1048
- * An object that specifies values to animate to. Each value may be set either as
1049
- * a single value, or an array of values.
1050
- *
1051
- * It may also option contain these properties:
1052
- *
1053
- * - `transition`: Specifies transitions for all or individual values.
1054
- * - `transitionEnd`: Specifies values to set when the animation finishes.
1055
- *
1056
- * ```jsx
1057
- * const target = {
1058
- * x: "0%",
1059
- * opacity: 0,
1060
- * transition: { duration: 1 },
1061
- * transitionEnd: { display: "none" }
1062
- * }
1063
- * ```
1064
- *
1065
- * @public
1066
- */
1067
- export type TargetAndTransition = TargetWithKeyframes & {
1068
- transition?: Transition;
1069
- transitionEnd?: Target;
1070
- };
1071
- export type TargetResolver = (custom: any, current: Target, velocity: Target) => TargetAndTransition;
1072
- /**
1073
- * @public
1074
- */
1075
- export type Variant = TargetAndTransition | TargetResolver;
1076
- /**
1077
- * @public
1078
- */
1079
- export type Variants = {
1080
- [key: string]: Variant;
1081
- };
1082
- /**
1083
- * @public
1084
- */
1085
- export interface CustomValueType {
1086
- mix: (from: any, to: any) => (p: number) => number | string;
1087
- toValue: () => number | string;
1088
- }
1
+ /**
2
+ based on framer-motion@4.1.17,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ import type { SVGAttributes } from 'svelte/elements';
6
+ import type { SVGPathProperties, TransformProperties } from './motion/types.js';
7
+ import type { Properties } from 'csstype';
8
+ /**
9
+ * @public
10
+ */
11
+ export type ResolvedKeyframesTarget = [null, ...number[]] | number[] | [null, ...string[]] | string[];
12
+ /**
13
+ * @public
14
+ */
15
+ export type KeyframesTarget = ResolvedKeyframesTarget | [null, ...CustomValueType[]] | CustomValueType[];
16
+ /**
17
+ * @public
18
+ */
19
+ export type ResolvedSingleTarget = string | number;
20
+ /**
21
+ * @public
22
+ */
23
+ export type SingleTarget = ResolvedSingleTarget | CustomValueType;
24
+ /**
25
+ * @public
26
+ */
27
+ export type ResolvedValueTarget = ResolvedSingleTarget | ResolvedKeyframesTarget;
28
+ /**
29
+ * @public
30
+ */
31
+ export type ValueTarget = SingleTarget | KeyframesTarget;
32
+ /**
33
+ * @public
34
+ */
35
+ export type Props = {
36
+ [key: string]: any;
37
+ };
38
+ /**
39
+ * A function that accepts a progress value between `0` and `1` and returns a
40
+ * new one.
41
+ *
42
+ * @library
43
+ *
44
+ * ```jsx
45
+ * const transition = {
46
+ * ease: progress => progress * progress
47
+ * }
48
+ *
49
+ * <Frame
50
+ * animate={{ opacity: 0 }}
51
+ * transition={transition}
52
+ * />
53
+ * ```
54
+ *
55
+ * @motion
56
+ *
57
+ * ```jsx
58
+ * <MotionDiv
59
+ * animate={{ opacity: 0 }}
60
+ * transition={{
61
+ * duration: 1,
62
+ * ease: progress => progress * progress
63
+ * }}
64
+ * />
65
+ * ```
66
+ *
67
+ * @public
68
+ */
69
+ export type EasingFunction = (v: number) => number;
70
+ /**
71
+ * The easing function to use. Set as one of:
72
+ *
73
+ * - The name of an in-built easing function.
74
+ * - An array of four numbers to define a cubic bezier curve.
75
+ * - An easing function, that accepts and returns a progress value between `0` and `1`.
76
+ *
77
+ * @public
78
+ */
79
+ export type Easing = [number, number, number, number] | 'linear' | 'easeIn' | 'easeOut' | 'easeInOut' | 'circIn' | 'circOut' | 'circInOut' | 'backIn' | 'backOut' | 'backInOut' | 'anticipate' | EasingFunction;
80
+ /**
81
+ * Options for orchestrating the timing of animations.
82
+ *
83
+ * @public
84
+ */
85
+ export interface Orchestration {
86
+ /**
87
+ * Delay the animation by this duration (in seconds). Defaults to `0`.
88
+ *
89
+ * @remarks
90
+ * ```javascript
91
+ * const transition = {
92
+ * delay: 0.2
93
+ * }
94
+ * ```
95
+ *
96
+ * @public
97
+ */
98
+ delay?: number;
99
+ /**
100
+ * Describes the relationship between the transition and its children. Set
101
+ * to `false` by default.
102
+ *
103
+ * @remarks
104
+ * When using variants, the transition can be scheduled in relation to its
105
+ * children with either `"beforeChildren"` to finish this transition before
106
+ * starting children transitions, `"afterChildren"` to finish children
107
+ * transitions before starting this transition.
108
+ *
109
+ * @motion
110
+ *
111
+ * ```jsx
112
+ * const list = {
113
+ * hidden: {
114
+ * opacity: 0,
115
+ * transition: { when: "afterChildren" }
116
+ * }
117
+ * }
118
+ *
119
+ * const item = {
120
+ * hidden: {
121
+ * opacity: 0,
122
+ * transition: { duration: 2 }
123
+ * }
124
+ * }
125
+ *
126
+ * <Motion let:motion={ul} variants={list} animate="hidden">
127
+ * <ul use:ul>
128
+ * <Motion let:motion variants={item}>
129
+ * <li use:motion />
130
+ * </Motion>
131
+ * <Motion let:motion variants={item}>
132
+ * <li use:motion />
133
+ * </Motion>
134
+ * </ul>
135
+ * </Motion>
136
+ * )
137
+ * ```
138
+ *
139
+ * @public
140
+ */
141
+ when?: false | 'beforeChildren' | 'afterChildren' | string;
142
+ /**
143
+ * When using variants, children animations will start after this duration
144
+ * (in seconds). You can add the `transition` property to both the `Frame` and the `variant` directly. Adding it to the `variant` generally offers more flexibility, as it allows you to customize the delay per visual state.
145
+ *
146
+ * @motion
147
+ *
148
+ * ```jsx
149
+ * const container = {
150
+ * hidden: { opacity: 0 },
151
+ * show: {
152
+ * opacity: 1,
153
+ * transition: {
154
+ * delayChildren: 0.5
155
+ * }
156
+ * }
157
+ * }
158
+ *
159
+ * const item = {
160
+ * hidden: { opacity: 0 },
161
+ * show: { opacity: 1 }
162
+ * }
163
+ *
164
+ * <Motion let:motion={ul}
165
+ * variants={container}
166
+ * initial="hidden"
167
+ * animate="show">
168
+ * <ul use:ul>
169
+ * <Motion let:motion variants={item}>
170
+ * <li use:motion />
171
+ * </Motion>
172
+ * <Motion let:motion variants={item}>
173
+ * <li use:motion />
174
+ * </Motion>
175
+ * </ul>
176
+ * </Motion>
177
+ * ```
178
+ *
179
+ * @public
180
+ */
181
+ delayChildren?: number;
182
+ /**
183
+ * When using variants, animations of child components can be staggered by this
184
+ * duration (in seconds).
185
+ *
186
+ * For instance, if `staggerChildren` is `0.01`, the first child will be
187
+ * delayed by `0` seconds, the second by `0.01`, the third by `0.02` and so
188
+ * on.
189
+ *
190
+ * The calculated stagger delay will be added to `delayChildren`.
191
+ *
192
+ * @motion
193
+ *
194
+ * ```jsx
195
+ * const container = {
196
+ * hidden: { opacity: 0 },
197
+ * show: {
198
+ * opacity: 1,
199
+ * transition: {
200
+ * staggerChildren: 0.5
201
+ * }
202
+ * }
203
+ * }
204
+ *
205
+ * const item = {
206
+ * hidden: { opacity: 0 },
207
+ * show: { opacity: 1 }
208
+ * }
209
+ *
210
+ * return (
211
+ * <Motion let:motion={ul}
212
+ * variants={container}
213
+ * initial="hidden"
214
+ * animate="show">
215
+ * <ol use:ul>
216
+ * <Motion let:motion variants={item}>
217
+ * <li use:motion />
218
+ * </Motion>
219
+ * <Motion let:motion variants={item}>
220
+ * <li use:motion />
221
+ * </Motion>
222
+ * </ol>
223
+ * </Motion>
224
+ * )
225
+ * ```
226
+ *
227
+ * @public
228
+ */
229
+ staggerChildren?: number;
230
+ /**
231
+ * The direction in which to stagger children.
232
+ *
233
+ * A value of `1` staggers from the first to the last while `-1`
234
+ * staggers from the last to the first.
235
+ *
236
+ * @motion
237
+ *
238
+ * ```jsx
239
+ * const container = {
240
+ * hidden: { opacity: 0 },
241
+ * show: {
242
+ * opacity: 1,
243
+ * transition: {
244
+ * delayChildren: 0.5,
245
+ * staggerDirection: -1
246
+ * }
247
+ * }
248
+ * }
249
+ *
250
+ * const item = {
251
+ * hidden: { opacity: 0 },
252
+ * show: { opacity: 1 }
253
+ * }
254
+ *
255
+ * <Motion let:motion={ul}
256
+ * variants={container}
257
+ * initial="hidden"
258
+ * animate="show">
259
+ * <ul use:ul>
260
+ * <Motion let:motion
261
+ * variants={item}
262
+ * size={50}/>
263
+ * <li use:motion/>
264
+ * </Motion>
265
+ * <Motion let:motion
266
+ * variants={item}
267
+ * size={50}/>
268
+ * <li use:motion/>
269
+ * </Motion>*
270
+ * </ul>
271
+ * </Motion>
272
+ * ```
273
+ *
274
+ * @public
275
+ */
276
+ staggerDirection?: number;
277
+ }
278
+ export interface Repeat {
279
+ /**
280
+ * The number of times to repeat the transition. Set to `Infinity` for perpetual repeating.
281
+ *
282
+ * Without setting `repeatType`, this will loop the animation.
283
+ *
284
+ * @motion
285
+ *
286
+ * ```jsx
287
+ * <MotionDiv
288
+ * animate={{ rotate: 180 }}
289
+ * transition={{ repeat: Infinity, duration: 2 }}
290
+ * />
291
+ * ```
292
+ *
293
+ * @public
294
+ */
295
+ repeat?: number;
296
+ /**
297
+ * How to repeat the animation. This can be either:
298
+ *
299
+ * "loop": Repeats the animation from the start
300
+ *
301
+ * "reverse": Alternates between forward and backwards playback
302
+ *
303
+ * "mirror": Switches `from` and `to` alternately
304
+ *
305
+ * @motion
306
+ *
307
+ * ```jsx
308
+ * <MotionDiv
309
+ * animate={{ rotate: 180 }}
310
+ * transition={{
311
+ * repeat: 1,
312
+ * repeatType: "reverse",
313
+ * duration: 2
314
+ * }}
315
+ * />
316
+ * ```
317
+ *
318
+ * @public
319
+ */
320
+ repeatType?: 'loop' | 'reverse' | 'mirror';
321
+ /**
322
+ * When repeating an animation, `repeatDelay` will set the
323
+ * duration of the time to wait, in seconds, between each repetition.
324
+ *
325
+ * @motion
326
+ *
327
+ * ```jsx
328
+ * <MotionDiv
329
+ * animate={{ rotate: 180 }}
330
+ * transition={{ repeat: Infinity, repeatDelay: 1 }}
331
+ * />
332
+ * ```
333
+ *
334
+ * @public
335
+ */
336
+ repeatDelay?: number;
337
+ }
338
+ /**
339
+ * An animation that animates between two or more values over a specific duration of time.
340
+ * This is the default animation for non-physical values like `color` and `opacity`.
341
+ *
342
+ * @public
343
+ */
344
+ export interface Tween extends Repeat {
345
+ /**
346
+ * Set `type` to `"tween"` to use a duration-based tween animation.
347
+ * If any non-orchestration `transition` values are set without a `type` property,
348
+ * this is used as the default animation.
349
+ *
350
+ * @motion
351
+ *
352
+ * ```jsx
353
+ * <Motion let:motion isSVG={true}
354
+ * animate={{ pathLength: 1 }}
355
+ * transition={{ duration: 2, type: "tween" }}>
356
+ * <path use:motion/>
357
+ * </Motion> *
358
+ * />
359
+ * ```
360
+ *
361
+ * @public
362
+ */
363
+ type?: 'tween';
364
+ /**
365
+ * The duration of the tween animation. Set to `0.3` by default, 0r `0.8` if animating a series of keyframes.
366
+ *
367
+ * @motion
368
+ *
369
+ * ```jsx
370
+ * const variants = {
371
+ * visible: {
372
+ * opacity: 1,
373
+ * transition: { duration: 2 }
374
+ * }
375
+ * }
376
+ * ```
377
+ *
378
+ * @public
379
+ */
380
+ duration?: number;
381
+ /**
382
+ * The easing function to use. Set as one of the below.
383
+ *
384
+ * - The name of an existing easing function.
385
+ *
386
+ * - An array of four numbers to define a cubic bezier curve.
387
+ *
388
+ * - An easing function, that accepts and returns a value `0-1`.
389
+ *
390
+ * If the animating value is set as an array of multiple values for a keyframes
391
+ * animation, `ease` can be set as an array of easing functions to set different easings between
392
+ * each of those values.
393
+ *
394
+ * @motion
395
+ *
396
+ * ```jsx
397
+ * <MotionDiv
398
+ * animate={{ opacity: 0 }}
399
+ * transition={{ ease: [0.17, 0.67, 0.83, 0.67] }}
400
+ * />
401
+ * ```
402
+ *
403
+ * @public
404
+ */
405
+ ease?: Easing | Easing[];
406
+ /**
407
+ * The duration of time already elapsed in the animation. Set to `0` by
408
+ * default.
409
+ *
410
+ * @internal
411
+ */
412
+ elapsed?: number;
413
+ /**
414
+ * When animating keyframes, `times` can be used to determine where in the animation each keyframe is reached.
415
+ * Each value in `times` is a value between `0` and `1`, representing `duration`.
416
+ *
417
+ * There must be the same number of `times` as there are keyframes.
418
+ * Defaults to an array of evenly-spread durations.
419
+ *
420
+ * @motion
421
+ *
422
+ * ```jsx
423
+ * <MotionDiv
424
+ * animate={{ scale: [0, 1, 0.5, 1] }}
425
+ * transition={{ times: [0, 0.1, 0.9, 1] }}
426
+ * />
427
+ * ```
428
+ *
429
+ * @public
430
+ */
431
+ times?: number[];
432
+ /**
433
+ * When animating keyframes, `easings` can be used to define easing functions between each keyframe. This array should be one item fewer than the number of keyframes, as these easings apply to the transitions between the keyframes.
434
+ *
435
+ * @motion
436
+ *
437
+ * ```jsx
438
+ * <MotionDiv
439
+ * animate={{ backgroundColor: ["#0f0", "#00f", "#f00"] }}
440
+ * transition={{ easings: ["easeIn", "easeOut"] }}
441
+ * />
442
+ * ```
443
+ *
444
+ * @public
445
+ */
446
+ easings?: Easing[];
447
+ /**
448
+ * The value to animate from.
449
+ * By default, this is the current state of the animating value.
450
+ *
451
+ * @motion
452
+ *
453
+ * ```jsx
454
+ * <MotionDiv
455
+ * animate={{ rotate: 180 }}
456
+ * transition={{ from: 90, duration: 2 }}
457
+ * />
458
+ * ```
459
+ *
460
+ * @public
461
+ */
462
+ from?: number | string;
463
+ /**
464
+ * @internal
465
+ */
466
+ to?: number | string | ValueTarget;
467
+ /**
468
+ * @internal
469
+ */
470
+ velocity?: number;
471
+ /**
472
+ * @internal
473
+ */
474
+ delay?: number;
475
+ }
476
+ /**
477
+ * An animation that simulates spring physics for realistic motion.
478
+ * This is the default animation for physical values like `x`, `y`, `scale` and `rotate`.
479
+ *
480
+ * @public
481
+ */
482
+ export interface Spring extends Repeat {
483
+ /**
484
+ * Set `type` to `"spring"` to animate using spring physics for natural
485
+ * movement. Type is set to `"spring"` by default.
486
+ *
487
+ * @motion
488
+ *
489
+ * ```jsx
490
+ * <MotionDiv
491
+ * animate={{ rotate: 180 }}
492
+ * transition={{ type: 'spring' }}
493
+ * />
494
+ * ```
495
+ *
496
+ * @public
497
+ */
498
+ type: 'spring';
499
+ /**
500
+ * Stiffness of the spring. Higher values will create more sudden movement.
501
+ * Set to `100` by default.
502
+ *
503
+ * @motion
504
+ *
505
+ * ```jsx
506
+ * <MotionDiv
507
+ * animate={{ rotate: 180 }}
508
+ * transition={{ type: 'spring', stiffness: 50 }}
509
+ * />
510
+ * ```
511
+ *
512
+ * @public
513
+ */
514
+ stiffness?: number;
515
+ /**
516
+ * Strength of opposing force. If set to 0, spring will oscillate
517
+ * indefinitely. Set to `10` by default.
518
+ *
519
+ * @motion
520
+ *
521
+ * ```jsx
522
+ * <MotionDiv
523
+ * animate={{ rotate: 180 }}
524
+ * transition={{ type: 'spring', damping: 300 }}
525
+ * />
526
+ * ```
527
+ *
528
+ * @public
529
+ */
530
+ damping?: number;
531
+ /**
532
+ * Mass of the moving object. Higher values will result in more lethargic
533
+ * movement. Set to `1` by default.
534
+ *
535
+ * @motion
536
+ *
537
+ * ```jsx
538
+ * <motion.feTurbulence
539
+ * animate={{ baseFrequency: 0.5 } as any}
540
+ * transition={{ type: "spring", mass: 0.5 }}
541
+ * />
542
+ * ```
543
+ *
544
+ * @public
545
+ */
546
+ mass?: number;
547
+ /**
548
+ * The duration of the animation, defined in seconds. Spring animations can be a maximum of 10 seconds.
549
+ *
550
+ * If `bounce` is set, this defaults to `0.8`.
551
+ *
552
+ * Note: `duration` and `bounce` will be overridden if `stiffness`, `damping` or `mass` are set.
553
+ *
554
+ * @motion
555
+ *
556
+ * ```jsx
557
+ * <MotionDiv
558
+ * animate={{ x: 100 }}
559
+ * transition={{ type: "spring", duration: 0.8 }}
560
+ * />
561
+ * ```
562
+ *
563
+ * @public
564
+ */
565
+ duration?: number;
566
+ /**
567
+ * `bounce` determines the "bounciness" of a spring animation.
568
+ *
569
+ * `0` is no bounce, and `1` is extremely bouncy.
570
+ *
571
+ * If `duration` is set, this defaults to `0.25`.
572
+ *
573
+ * Note: `bounce` and `duration` will be overridden if `stiffness`, `damping` or `mass` are set.
574
+ *
575
+ * @motion
576
+ *
577
+ * ```jsx
578
+ * <MotionDiv
579
+ * animate={{ x: 100 }}
580
+ * transition={{ type: "spring", bounce: 0.25 }}
581
+ * />
582
+ * ```
583
+ *
584
+ * @public
585
+ */
586
+ bounce?: number;
587
+ /**
588
+ * End animation if absolute speed (in units per second) drops below this
589
+ * value and delta is smaller than `restDelta`. Set to `0.01` by default.
590
+ *
591
+ * @motion
592
+ *
593
+ * ```jsx
594
+ * <MotionDiv
595
+ * animate={{ rotate: 180 }}
596
+ * transition={{ type: 'spring', restSpeed: 0.5 }}
597
+ * />
598
+ * ```
599
+ *
600
+ * @public
601
+ */
602
+ restSpeed?: number;
603
+ /**
604
+ * End animation if distance is below this value and speed is below
605
+ * `restSpeed`. When animation ends, spring gets “snapped” to. Set to
606
+ * `0.01` by default.
607
+ *
608
+ * @motion
609
+ *
610
+ * ```jsx
611
+ * <MotionDiv
612
+ * animate={{ rotate: 180 }}
613
+ * transition={{ type: 'spring', restDelta: 0.5 }}
614
+ * />
615
+ * ```
616
+ *
617
+ * @public
618
+ */
619
+ restDelta?: number;
620
+ /**
621
+ * The value to animate from.
622
+ * By default, this is the initial state of the animating value.
623
+ *
624
+ * @motion
625
+ *
626
+ * ```jsx
627
+ * <MotionDiv
628
+ * animate={{ rotate: 180 }}
629
+ * transition={{ type: 'spring', from: 90 }}
630
+ * />
631
+ * ```
632
+ *
633
+ * @public
634
+ */
635
+ from?: number | string;
636
+ /**
637
+ * @internal
638
+ */
639
+ to?: number | string | ValueTarget;
640
+ /**
641
+ * The initial velocity of the spring. By default this is the current velocity of the component.
642
+ *
643
+ * @motion
644
+ *
645
+ * ```jsx
646
+ * <MotionDiv
647
+ * animate={{ rotate: 180 }}
648
+ * transition={{ type: 'spring', velocity: 2 }}
649
+ * />
650
+ * ```
651
+ *
652
+ * @public
653
+ */
654
+ velocity?: number;
655
+ /**
656
+ * @internal
657
+ */
658
+ delay?: number;
659
+ }
660
+ /**
661
+ * An animation that decelerates a value based on its initial velocity,
662
+ * usually used to implement inertial scrolling.
663
+ *
664
+ * Optionally, `min` and `max` boundaries can be defined, and inertia
665
+ * will snap to these with a spring animation.
666
+ *
667
+ * This animation will automatically precalculate a target value,
668
+ * which can be modified with the `modifyTarget` property.
669
+ *
670
+ * This allows you to add snap-to-grid or similar functionality.
671
+ *
672
+ * Inertia is also the animation used for `dragTransition`, and can be configured via that prop.
673
+ *
674
+ * @public
675
+ */
676
+ export interface Inertia {
677
+ /**
678
+ * Set `type` to animate using the inertia animation. Set to `"tween"` by
679
+ * default. This can be used for natural deceleration, like momentum scrolling.
680
+ *
681
+ * @motion
682
+ *
683
+ * ```jsx
684
+ * <MotionDiv
685
+ * animate={{ rotate: 180 }}
686
+ * transition={{ type: "inertia", velocity: 50 }}
687
+ * />
688
+ * ```
689
+ *
690
+ * @public
691
+ */
692
+ type: 'inertia';
693
+ /**
694
+ * A function that receives the automatically-calculated target and returns a new one. Useful for snapping the target to a grid.
695
+ *
696
+ * @motion
697
+ *
698
+ * ```jsx
699
+ * <MotionDiv
700
+ * drag
701
+ * dragTransition={{
702
+ * power: 0,
703
+ * // Snap calculated target to nearest 50 pixels
704
+ * modifyTarget: target => Math.round(target / 50) * 50
705
+ * }}
706
+ * />
707
+ * ```
708
+ *
709
+ * @public
710
+ */
711
+ modifyTarget?(v: number): number;
712
+ /**
713
+ * If `min` or `max` is set, this affects the stiffness of the bounce
714
+ * spring. Higher values will create more sudden movement. Set to `500` by
715
+ * default.
716
+ *
717
+ * @motion
718
+ *
719
+ * ```jsx
720
+ * <MotionDiv
721
+ * drag
722
+ * dragTransition={{
723
+ * min: 0,
724
+ * max: 100,
725
+ * bounceStiffness: 100
726
+ * }}
727
+ * />
728
+ * ```
729
+ *
730
+ * @public
731
+ */
732
+ bounceStiffness?: number;
733
+ /**
734
+ * If `min` or `max` is set, this affects the damping of the bounce spring.
735
+ * If set to `0`, spring will oscillate indefinitely. Set to `10` by
736
+ * default.
737
+ *
738
+ * @motion
739
+ *
740
+ * ```jsx
741
+ * <MotionDiv
742
+ * drag
743
+ * dragTransition={{
744
+ * min: 0,
745
+ * max: 100,
746
+ * bounceDamping: 8
747
+ * }}
748
+ * />
749
+ * ```
750
+ *
751
+ * @public
752
+ */
753
+ bounceDamping?: number;
754
+ /**
755
+ * A higher power value equals a further target. Set to `0.8` by default.
756
+ *
757
+ * @motion
758
+ *
759
+ * ```jsx
760
+ * <MotionDiv
761
+ * drag
762
+ * dragTransition={{ power: 0.2 }}
763
+ * />
764
+ * ```
765
+ *
766
+ * @public
767
+ */
768
+ power?: number;
769
+ /**
770
+ * Adjusting the time constant will change the duration of the
771
+ * deceleration, thereby affecting its feel. Set to `700` by default.
772
+ *
773
+ * @motion
774
+ *
775
+ * ```jsx
776
+ * <MotionDiv
777
+ * drag
778
+ * dragTransition={{ timeConstant: 200 }}
779
+ * />
780
+ * ```
781
+ *
782
+ * @public
783
+ */
784
+ timeConstant?: number;
785
+ /**
786
+ * End the animation if the distance to the animation target is below this value, and the absolute speed is below `restSpeed`.
787
+ * When the animation ends, the value gets snapped to the animation target. Set to `0.01` by default.
788
+ * Generally the default values provide smooth animation endings, only in rare cases should you need to customize these.
789
+ *
790
+ * @motion
791
+ *
792
+ * ```jsx
793
+ * <MotionDiv
794
+ * drag
795
+ * dragTransition={{ restDelta: 10 }}
796
+ * />
797
+ * ```
798
+ *
799
+ * @public
800
+ */
801
+ restDelta?: number;
802
+ /**
803
+ * Minimum constraint. If set, the value will "bump" against this value (or immediately spring to it if the animation starts as less than this value).
804
+ *
805
+ * @motion
806
+ *
807
+ * ```jsx
808
+ * <MotionDiv
809
+ * drag
810
+ * dragTransition={{ min: 0, max: 100 }}
811
+ * />
812
+ * ```
813
+ *
814
+ * @public
815
+ */
816
+ min?: number;
817
+ /**
818
+ * Maximum constraint. If set, the value will "bump" against this value (or immediately snap to it, if the initial animation value exceeds this value).
819
+ *
820
+ * @motion
821
+ *
822
+ * ```jsx
823
+ * <MotionDiv
824
+ * drag
825
+ * dragTransition={{ min: 0, max: 100 }}
826
+ * />
827
+ * ```
828
+ *
829
+ * @public
830
+ */
831
+ max?: number;
832
+ /**
833
+ * The value to animate from. By default, this is the current state of the animating value.
834
+ *
835
+ * @motion
836
+ *
837
+ * ```jsx
838
+ * <MotionDiv
839
+ * drag
840
+ * dragTransition={{ from: 50 }}
841
+ * />
842
+ * ```
843
+ *
844
+ * @public
845
+ */
846
+ from?: number | string;
847
+ /**
848
+ * The initial velocity of the animation.
849
+ * By default this is the current velocity of the component.
850
+ *
851
+ * @motion
852
+ *
853
+ * ```jsx
854
+ * <MotionDiv
855
+ * animate={{ rotate: 180 }}
856
+ * transition={{ type: 'inertia', velocity: 200 }}
857
+ * />
858
+ * ```
859
+ *
860
+ * @public
861
+ */
862
+ velocity?: number;
863
+ /**
864
+ * @internal
865
+ */
866
+ delay?: number;
867
+ }
868
+ /**
869
+ * Keyframes tweens between multiple `values`.
870
+ *
871
+ * These tweens can be arranged using the `duration`, `easings`, and `times` properties.
872
+ *
873
+ * @internalremarks
874
+ * We could possibly make the `type` property redundant, if not for all animations
875
+ * then for this one quite easily.
876
+ *
877
+ * @internal
878
+ */
879
+ export interface Keyframes {
880
+ /**
881
+ * Set `type` to `"keyframes"` to animate using the keyframes animation.
882
+ * Set to `"tween"` by default. This can be used to animate between a series of values.
883
+ *
884
+ * @public
885
+ */
886
+ type: 'keyframes';
887
+ /**
888
+ * An array of values to animate between.
889
+ *
890
+ * @internal
891
+ */
892
+ values: KeyframesTarget;
893
+ /**
894
+ * An array of numbers between 0 and 1, where `1` represents the `total` duration.
895
+ *
896
+ * Each value represents at which point during the animation each item in the animation target should be hit, so the array should be the same length as `values`.
897
+ *
898
+ * Defaults to an array of evenly-spread durations.
899
+ *
900
+ * @public
901
+ */
902
+ times?: number[];
903
+ /**
904
+ * An array of easing functions for each generated tween, or a single easing function applied to all tweens.
905
+ *
906
+ * This array should be one item less than `values`, as these easings apply to the transitions *between* the `values`.
907
+ *
908
+ * ```jsx
909
+ * const transition = {
910
+ * backgroundColor: {
911
+ * type: 'keyframes',
912
+ * easings: ['circIn', 'circOut']
913
+ * }
914
+ * }
915
+ * ```
916
+ *
917
+ * @public
918
+ */
919
+ ease?: Easing | Easing[];
920
+ /**
921
+ * Popmotion's easing prop to define individual easings. `ease` will be mapped to this prop in keyframes animations.
922
+ *
923
+ * @internal
924
+ */
925
+ easings?: Easing | Easing[];
926
+ /**
927
+ * @internal
928
+ */
929
+ elapsed?: number;
930
+ /**
931
+ * The total duration of the animation. Set to `0.3` by default.
932
+ *
933
+ * ```jsx
934
+ * const transition = {
935
+ * type: "keyframes",
936
+ * duration: 2
937
+ * }
938
+ *
939
+ * <MotionDiv
940
+ * animate={{ opacity: 0 }}
941
+ * transition={transition}
942
+ * />
943
+ * ```
944
+ *
945
+ * @public
946
+ */
947
+ duration?: number;
948
+ /**
949
+ * @public
950
+ */
951
+ repeatDelay?: number;
952
+ /**
953
+ * @internal
954
+ */
955
+ from?: number | string;
956
+ /**
957
+ * @internal
958
+ */
959
+ to?: number | string | ValueTarget;
960
+ /**
961
+ * @internal
962
+ */
963
+ velocity?: number;
964
+ /**
965
+ * @internal
966
+ */
967
+ delay?: number;
968
+ }
969
+ /**
970
+ * @internal
971
+ */
972
+ export interface Just {
973
+ type: 'just';
974
+ to?: number | string | ValueTarget;
975
+ from?: number | string;
976
+ delay?: number;
977
+ velocity?: number;
978
+ }
979
+ /**
980
+ * @public
981
+ */
982
+ export interface None {
983
+ /**
984
+ * Set `type` to `false` for an instant transition.
985
+ *
986
+ * @public
987
+ */
988
+ type: false;
989
+ /**
990
+ * @internal
991
+ */
992
+ from?: number | string;
993
+ /**
994
+ * @internal
995
+ */
996
+ delay?: number;
997
+ /**
998
+ * @internal
999
+ */
1000
+ velocity?: number;
1001
+ }
1002
+ /**
1003
+ * @public
1004
+ */
1005
+ export type PopmotionTransitionProps = Tween | Spring | Keyframes | Inertia | Just;
1006
+ /**
1007
+ * @public
1008
+ */
1009
+ export type PermissiveTransitionDefinition = {
1010
+ [key: string]: any;
1011
+ };
1012
+ /**
1013
+ * @public
1014
+ */
1015
+ export type TransitionDefinition = Tween | Spring | Keyframes | Inertia | Just | None | PermissiveTransitionDefinition;
1016
+ export type TransitionMap = Orchestration & {
1017
+ [key: string]: TransitionDefinition;
1018
+ };
1019
+ /**
1020
+ * Transition props
1021
+ *
1022
+ * @public
1023
+ */
1024
+ export type Transition = (Orchestration & Repeat & TransitionDefinition) | (Orchestration & Repeat & TransitionMap);
1025
+ export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
1026
+ type CSSPropertiesWithoutTransitionOrSingleTransforms = Omit<Properties, 'transition' | 'rotate' | 'scale' | 'perspective'>;
1027
+ type TargetProperties = CSSPropertiesWithoutTransitionOrSingleTransforms & SVGAttributes<SVGElement> & TransformProperties & SVGPathProperties;
1028
+ /**
1029
+ * @public
1030
+ */
1031
+ export type MakeCustomValueType<T> = {
1032
+ [K in keyof T]: T[K] | CustomValueType;
1033
+ };
1034
+ /**
1035
+ * @public
1036
+ */
1037
+ export type Target = MakeCustomValueType<TargetProperties>;
1038
+ /**
1039
+ * @public
1040
+ */
1041
+ export type MakeKeyframes<T> = {
1042
+ [K in keyof T]: T[K] | T[K][] | [null, ...T[K][]];
1043
+ };
1044
+ /**
1045
+ * @public
1046
+ */
1047
+ export type TargetWithKeyframes = MakeKeyframes<Target>;
1048
+ /**
1049
+ * An object that specifies values to animate to. Each value may be set either as
1050
+ * a single value, or an array of values.
1051
+ *
1052
+ * It may also option contain these properties:
1053
+ *
1054
+ * - `transition`: Specifies transitions for all or individual values.
1055
+ * - `transitionEnd`: Specifies values to set when the animation finishes.
1056
+ *
1057
+ * ```jsx
1058
+ * const target = {
1059
+ * x: "0%",
1060
+ * opacity: 0,
1061
+ * transition: { duration: 1 },
1062
+ * transitionEnd: { display: "none" }
1063
+ * }
1064
+ * ```
1065
+ *
1066
+ * @public
1067
+ */
1068
+ export type TargetAndTransition = TargetWithKeyframes & {
1069
+ transition?: Transition;
1070
+ transitionEnd?: Target;
1071
+ };
1072
+ export type TargetResolver = (custom: any, current: Target, velocity: Target) => TargetAndTransition;
1073
+ /**
1074
+ * @public
1075
+ */
1076
+ export type Variant = TargetAndTransition | TargetResolver;
1077
+ /**
1078
+ * @public
1079
+ */
1080
+ export type Variants = {
1081
+ [key: string]: Variant;
1082
+ };
1083
+ /**
1084
+ * @public
1085
+ */
1086
+ export interface CustomValueType {
1087
+ mix: (from: any, to: any) => (p: number) => number | string;
1088
+ toValue: () => number | string;
1089
+ }
1090
+ export {};
1091
+ //# sourceMappingURL=types.d.ts.map