motion-start 0.0.1 → 0.0.3

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 (727) hide show
  1. package/README.md +27 -2
  2. package/{src → dist}/animation/UseAnimatedState.svelte +1 -1
  3. package/dist/animation/UseAnimatedState.svelte.d.ts +34 -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/dist/animation/utils/default-transitions.js +67 -0
  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} +43 -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} +220 -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 +5 -0
  43. package/dist/components/AnimatePresence/AnimatePresence.svelte.d.ts +39 -0
  44. package/dist/components/AnimatePresence/AnimatePresence.svelte.d.ts.map +1 -0
  45. package/{src → dist}/components/AnimatePresence/PresenceChild/PresenceChild.svelte +1 -1
  46. package/dist/components/AnimatePresence/PresenceChild/PresenceChild.svelte.d.ts +29 -0
  47. package/dist/components/AnimatePresence/PresenceChild/PresenceChild.svelte.d.ts.map +1 -0
  48. package/{src/components/AnimatePresence/PresenceChild/index.ts → dist/components/AnimatePresence/PresenceChild/index.d.ts} +7 -7
  49. package/dist/components/AnimatePresence/PresenceChild/index.d.ts.map +1 -0
  50. package/dist/components/AnimatePresence/PresenceChild/index.js +5 -0
  51. package/{src/components/AnimatePresence/PresenceChild/types.ts → dist/components/AnimatePresence/PresenceChild/types.d.ts} +10 -10
  52. package/dist/components/AnimatePresence/PresenceChild/types.d.ts.map +1 -0
  53. package/dist/components/AnimatePresence/PresenceChild/types.js +1 -0
  54. package/{src/components/AnimatePresence/index.ts → dist/components/AnimatePresence/index.d.ts} +51 -46
  55. package/dist/components/AnimatePresence/index.d.ts.map +1 -0
  56. package/dist/components/AnimatePresence/index.js +2 -0
  57. package/dist/components/AnimatePresence/type.spec-d.d.ts +2 -0
  58. package/dist/components/AnimatePresence/type.spec-d.d.ts.map +1 -0
  59. package/dist/components/AnimatePresence/type.spec-d.js +6 -0
  60. package/{src/components/AnimatePresence/types.ts → dist/components/AnimatePresence/types.d.ts} +82 -79
  61. package/dist/components/AnimatePresence/types.d.ts.map +1 -0
  62. package/dist/components/AnimatePresence/types.js +1 -0
  63. package/dist/components/AnimatePresence/use-presence.d.ts +56 -0
  64. package/dist/components/AnimatePresence/use-presence.d.ts.map +1 -0
  65. package/{src/components/AnimatePresence/use-presence.ts → dist/components/AnimatePresence/use-presence.js} +69 -90
  66. package/dist/components/AnimateSharedLayout/AnimateSharedLayout.svelte.d.ts +29 -0
  67. package/dist/components/AnimateSharedLayout/AnimateSharedLayout.svelte.d.ts.map +1 -0
  68. package/{src/components/AnimateSharedLayout/index.ts → dist/components/AnimateSharedLayout/index.d.ts} +11 -11
  69. package/dist/components/AnimateSharedLayout/index.d.ts.map +1 -0
  70. package/dist/components/AnimateSharedLayout/index.js +9 -0
  71. package/dist/components/AnimateSharedLayout/type.spec-d.d.ts +2 -0
  72. package/dist/components/AnimateSharedLayout/type.spec-d.d.ts.map +1 -0
  73. package/dist/components/AnimateSharedLayout/type.spec-d.js +6 -0
  74. package/{src/components/AnimateSharedLayout/types.ts → dist/components/AnimateSharedLayout/types.d.ts} +91 -111
  75. package/dist/components/AnimateSharedLayout/types.d.ts.map +1 -0
  76. package/dist/components/AnimateSharedLayout/types.js +40 -0
  77. package/dist/components/AnimateSharedLayout/utils/batcher.d.ts +11 -0
  78. package/dist/components/AnimateSharedLayout/utils/batcher.d.ts.map +1 -0
  79. package/{src/components/AnimateSharedLayout/utils/batcher.ts → dist/components/AnimateSharedLayout/utils/batcher.js} +87 -96
  80. package/dist/components/AnimateSharedLayout/utils/crossfader.d.ts +27 -0
  81. package/dist/components/AnimateSharedLayout/utils/crossfader.d.ts.map +1 -0
  82. package/{src/components/AnimateSharedLayout/utils/crossfader.ts → dist/components/AnimateSharedLayout/utils/crossfader.js} +234 -260
  83. package/dist/components/AnimateSharedLayout/utils/rotate.d.ts +8 -0
  84. package/dist/components/AnimateSharedLayout/utils/rotate.d.ts.map +1 -0
  85. package/{src/components/AnimateSharedLayout/utils/rotate.ts → dist/components/AnimateSharedLayout/utils/rotate.js} +38 -48
  86. package/dist/components/AnimateSharedLayout/utils/stack.d.ts +21 -0
  87. package/dist/components/AnimateSharedLayout/utils/stack.d.ts.map +1 -0
  88. package/{src/components/AnimateSharedLayout/utils/stack.ts → dist/components/AnimateSharedLayout/utils/stack.js} +138 -160
  89. package/dist/components/LazyMotion/LazyMotion.svelte.d.ts +29 -0
  90. package/dist/components/LazyMotion/LazyMotion.svelte.d.ts.map +1 -0
  91. package/{src/components/LazyMotion/index.ts → dist/components/LazyMotion/index.d.ts} +42 -42
  92. package/dist/components/LazyMotion/index.d.ts.map +1 -0
  93. package/dist/components/LazyMotion/index.js +36 -0
  94. package/{src/components/LazyMotion/types.ts → dist/components/LazyMotion/types.d.ts} +57 -58
  95. package/dist/components/LazyMotion/types.d.ts.map +1 -0
  96. package/dist/components/LazyMotion/types.js +1 -0
  97. package/{src → dist}/components/MotionConfig/MotionConfig.svelte +3 -2
  98. package/dist/components/MotionConfig/MotionConfig.svelte.d.ts +29 -0
  99. package/dist/components/MotionConfig/MotionConfig.svelte.d.ts.map +1 -0
  100. package/dist/components/MotionConfig/MotionConfigScaleCorrection.d.ts +4 -0
  101. package/dist/components/MotionConfig/MotionConfigScaleCorrection.d.ts.map +1 -0
  102. package/{src/components/MotionConfig/MotionConfigScaleCorrection.ts → dist/components/MotionConfig/MotionConfigScaleCorrection.js} +29 -47
  103. package/{src/components/MotionConfig/index.ts → dist/components/MotionConfig/index.d.ts} +21 -20
  104. package/dist/components/MotionConfig/index.d.ts.map +1 -0
  105. package/dist/components/MotionConfig/index.js +14 -0
  106. package/dist/components/MotionConfig/type.spec-d.d.ts +2 -0
  107. package/dist/components/MotionConfig/type.spec-d.d.ts.map +1 -0
  108. package/dist/components/MotionConfig/type.spec-d.js +6 -0
  109. package/dist/components/MotionDiv.svelte.d.ts +31 -0
  110. package/dist/components/MotionDiv.svelte.d.ts.map +1 -0
  111. package/dist/context/DOMcontext.d.ts +5 -0
  112. package/dist/context/DOMcontext.d.ts.map +1 -0
  113. package/dist/context/DOMcontext.js +20 -0
  114. package/dist/context/LayoutGroupContext.d.ts +10 -0
  115. package/dist/context/LayoutGroupContext.d.ts.map +1 -0
  116. package/dist/context/LayoutGroupContext.js +6 -0
  117. package/dist/context/LazyContext.d.ts +13 -0
  118. package/dist/context/LazyContext.d.ts.map +1 -0
  119. package/dist/context/LazyContext.js +4 -0
  120. package/{src/context/MotionConfigContext.ts → dist/context/MotionConfigContext.d.ts} +35 -48
  121. package/dist/context/MotionConfigContext.d.ts.map +1 -0
  122. package/dist/context/MotionConfigContext.js +14 -0
  123. package/{src → dist}/context/MotionContext/MotionContext.svelte +5 -4
  124. package/dist/context/MotionContext/MotionContext.svelte.d.ts +39 -0
  125. package/dist/context/MotionContext/MotionContext.svelte.d.ts.map +1 -0
  126. package/dist/context/MotionContext/MotionContextProvider.svelte.d.ts +31 -0
  127. package/dist/context/MotionContext/MotionContextProvider.svelte.d.ts.map +1 -0
  128. package/dist/context/MotionContext/UseCreateMotionContext.svelte +39 -0
  129. package/dist/context/MotionContext/UseCreateMotionContext.svelte.d.ts +42 -0
  130. package/dist/context/MotionContext/UseCreateMotionContext.svelte.d.ts.map +1 -0
  131. package/dist/context/MotionContext/create.d.ts +2 -0
  132. package/dist/context/MotionContext/create.d.ts.map +1 -0
  133. package/{src/context/MotionContext/create.ts → dist/context/MotionContext/create.js} +1 -1
  134. package/{src/context/MotionContext/index.ts → dist/context/MotionContext/index.d.ts} +12 -14
  135. package/dist/context/MotionContext/index.d.ts.map +1 -0
  136. package/dist/context/MotionContext/index.js +1 -0
  137. package/dist/context/MotionContext/utils.d.ts +9 -0
  138. package/dist/context/MotionContext/utils.d.ts.map +1 -0
  139. package/{src/context/MotionContext/utils.ts → dist/context/MotionContext/utils.js} +18 -29
  140. package/{src/context/PresenceContext.ts → dist/context/PresenceContext.d.ts} +22 -26
  141. package/dist/context/PresenceContext.d.ts.map +1 -0
  142. package/dist/context/PresenceContext.js +6 -0
  143. package/{src → dist}/context/ScaleCorrectionProvider.svelte +1 -2
  144. package/dist/context/ScaleCorrectionProvider.svelte.d.ts +33 -0
  145. package/dist/context/ScaleCorrectionProvider.svelte.d.ts.map +1 -0
  146. package/dist/context/SharedLayoutContext.d.ts +14 -0
  147. package/dist/context/SharedLayoutContext.d.ts.map +1 -0
  148. package/dist/context/SharedLayoutContext.js +16 -0
  149. package/dist/events/UseDomEvent-type.spec-d.d.ts +2 -0
  150. package/dist/events/UseDomEvent-type.spec-d.d.ts.map +1 -0
  151. package/dist/events/UseDomEvent-type.spec-d.js +6 -0
  152. package/{src → dist}/events/UseDomEvent.svelte +2 -2
  153. package/dist/events/UseDomEvent.svelte.d.ts +30 -0
  154. package/dist/events/UseDomEvent.svelte.d.ts.map +1 -0
  155. package/{src → dist}/events/UsePointerEvent.svelte +1 -1
  156. package/dist/events/UsePointerEvent.svelte.d.ts +31 -0
  157. package/dist/events/UsePointerEvent.svelte.d.ts.map +1 -0
  158. package/dist/events/event-info.d.ts +11 -0
  159. package/dist/events/event-info.d.ts.map +1 -0
  160. package/{src/events/event-info.ts → dist/events/event-info.js} +65 -69
  161. package/{src/events/types.ts → dist/events/types.d.ts} +15 -15
  162. package/dist/events/types.d.ts.map +1 -0
  163. package/dist/events/types.js +1 -0
  164. package/{src/events/use-dom-event.ts → dist/events/use-dom-event.d.ts} +50 -48
  165. package/dist/events/use-dom-event.d.ts.map +1 -0
  166. package/dist/events/use-dom-event.js +24 -0
  167. package/{src/events/use-pointer-event.ts → dist/events/use-pointer-event.d.ts} +27 -29
  168. package/dist/events/use-pointer-event.d.ts.map +1 -0
  169. package/dist/events/use-pointer-event.js +1 -0
  170. package/dist/events/utils.d.ts +9 -0
  171. package/dist/events/utils.d.ts.map +1 -0
  172. package/{src/events/utils.ts → dist/events/utils.js} +20 -25
  173. package/dist/gestures/PanSession.d.ts +142 -0
  174. package/dist/gestures/PanSession.d.ts.map +1 -0
  175. package/dist/gestures/PanSession.js +233 -0
  176. package/dist/gestures/UseFocusGesture.svelte.d.ts +31 -0
  177. package/dist/gestures/UseFocusGesture.svelte.d.ts.map +1 -0
  178. package/dist/gestures/UseGestures.svelte.d.ts +31 -0
  179. package/dist/gestures/UseGestures.svelte.d.ts.map +1 -0
  180. package/{src → dist}/gestures/UseHoverGesture.svelte +3 -2
  181. package/dist/gestures/UseHoverGesture.svelte.d.ts +31 -0
  182. package/dist/gestures/UseHoverGesture.svelte.d.ts.map +1 -0
  183. package/dist/gestures/UsePanGesture.svelte.d.ts +32 -0
  184. package/dist/gestures/UsePanGesture.svelte.d.ts.map +1 -0
  185. package/dist/gestures/UseTapGesture.svelte.d.ts +31 -0
  186. package/dist/gestures/UseTapGesture.svelte.d.ts.map +1 -0
  187. package/{src → dist}/gestures/drag/UseDrag.svelte +3 -2
  188. package/dist/gestures/drag/UseDrag.svelte.d.ts +32 -0
  189. package/dist/gestures/drag/UseDrag.svelte.d.ts.map +1 -0
  190. package/{src → dist}/gestures/drag/UseDragControls.svelte +4 -8
  191. package/dist/gestures/drag/UseDragControls.svelte.d.ts +19 -0
  192. package/dist/gestures/drag/UseDragControls.svelte.d.ts.map +1 -0
  193. package/dist/gestures/drag/VisualElementDragControls.d.ts +116 -0
  194. package/dist/gestures/drag/VisualElementDragControls.d.ts.map +1 -0
  195. package/dist/gestures/drag/VisualElementDragControls.js +749 -0
  196. package/{src/gestures/drag/types.ts → dist/gestures/drag/types.d.ts} +308 -307
  197. package/dist/gestures/drag/types.d.ts.map +1 -0
  198. package/dist/gestures/drag/types.js +2 -0
  199. package/dist/gestures/drag/use-drag-controls.d.ts +128 -0
  200. package/dist/gestures/drag/use-drag-controls.d.ts.map +1 -0
  201. package/dist/gestures/drag/use-drag-controls.js +157 -0
  202. package/{src/gestures/drag/use-drag.ts → dist/gestures/drag/use-drag.d.ts} +13 -15
  203. package/dist/gestures/drag/use-drag.d.ts.map +1 -0
  204. package/dist/gestures/drag/use-drag.js +1 -0
  205. package/dist/gestures/drag/utils/constraints.d.ts +78 -0
  206. package/dist/gestures/drag/utils/constraints.d.ts.map +1 -0
  207. package/{src/gestures/drag/utils/constraints.ts → dist/gestures/drag/utils/constraints.js} +135 -157
  208. package/dist/gestures/drag/utils/lock.d.ts +14 -0
  209. package/dist/gestures/drag/utils/lock.d.ts.map +1 -0
  210. package/{src/gestures/drag/utils/lock.ts → dist/gestures/drag/utils/lock.js} +56 -69
  211. package/{src/gestures/types.ts → dist/gestures/types.d.ts} +258 -257
  212. package/dist/gestures/types.d.ts.map +1 -0
  213. package/dist/gestures/types.js +1 -0
  214. package/{src/gestures/use-focus-gesture.ts → dist/gestures/use-focus-gesture.d.ts} +14 -16
  215. package/dist/gestures/use-focus-gesture.d.ts.map +1 -0
  216. package/dist/gestures/use-focus-gesture.js +1 -0
  217. package/dist/gestures/use-gestures.d.ts +2 -0
  218. package/dist/gestures/use-gestures.d.ts.map +1 -0
  219. package/{src/gestures/use-gestures.ts → dist/gestures/use-gestures.js} +1 -2
  220. package/{src/gestures/use-hover-gesture.ts → dist/gestures/use-hover-gesture.d.ts} +8 -10
  221. package/dist/gestures/use-hover-gesture.d.ts.map +1 -0
  222. package/dist/gestures/use-hover-gesture.js +1 -0
  223. package/{src/gestures/use-pan-gesture.ts → dist/gestures/use-pan-gesture.d.ts} +20 -22
  224. package/dist/gestures/use-pan-gesture.d.ts.map +1 -0
  225. package/dist/gestures/use-pan-gesture.js +1 -0
  226. package/{src/gestures/use-tap-gesture.ts → dist/gestures/use-tap-gesture.d.ts} +12 -14
  227. package/dist/gestures/use-tap-gesture.d.ts.map +1 -0
  228. package/dist/gestures/use-tap-gesture.js +1 -0
  229. package/dist/gestures/utils/event-type.d.ts +12 -0
  230. package/dist/gestures/utils/event-type.d.ts.map +1 -0
  231. package/{src/gestures/utils/event-type.ts → dist/gestures/utils/event-type.js} +20 -24
  232. package/dist/gestures/utils/is-node-or-child.d.ts +18 -0
  233. package/dist/gestures/utils/is-node-or-child.d.ts.map +1 -0
  234. package/{src/gestures/utils/is-node-or-child.ts → dist/gestures/utils/is-node-or-child.js} +27 -31
  235. package/{src/index.ts → dist/index.d.ts} +96 -104
  236. package/dist/index.d.ts.map +1 -0
  237. package/dist/index.js +75 -0
  238. package/{src → dist}/motion/Motion.svelte +82 -74
  239. package/dist/motion/Motion.svelte.d.ts +41 -0
  240. package/dist/motion/Motion.svelte.d.ts.map +1 -0
  241. package/{src → dist}/motion/MotionSSR.svelte +76 -55
  242. package/dist/motion/MotionSSR.svelte.d.ts +41 -0
  243. package/dist/motion/MotionSSR.svelte.d.ts.map +1 -0
  244. package/dist/motion/features/AnimationState.svelte.d.ts +22 -0
  245. package/dist/motion/features/AnimationState.svelte.d.ts.map +1 -0
  246. package/{src → dist}/motion/features/Exit.svelte +15 -5
  247. package/dist/motion/features/Exit.svelte.d.ts +32 -0
  248. package/dist/motion/features/Exit.svelte.d.ts.map +1 -0
  249. package/{src → dist}/motion/features/UseFeatures.svelte +2 -2
  250. package/dist/motion/features/UseFeatures.svelte.d.ts +45 -0
  251. package/dist/motion/features/UseFeatures.svelte.d.ts.map +1 -0
  252. package/{src/motion/features/animations.ts → dist/motion/features/animations.js} +14 -22
  253. package/dist/motion/features/definitions.d.ts +37 -0
  254. package/dist/motion/features/definitions.d.ts.map +1 -0
  255. package/{src/motion/features/definitions.ts → dist/motion/features/definitions.js} +42 -49
  256. package/{src/motion/features/drag.ts → dist/motion/features/drag.js} +14 -24
  257. package/{src/motion/features/gestures.ts → dist/motion/features/gestures.js} +16 -24
  258. package/dist/motion/features/layout/Animate.d.ts +2 -0
  259. package/dist/motion/features/layout/Animate.d.ts.map +1 -0
  260. package/dist/motion/features/layout/Animate.js +2 -0
  261. package/{src → dist}/motion/features/layout/Animate.svelte +10 -10
  262. package/dist/motion/features/layout/Animate.svelte.d.ts +23 -0
  263. package/dist/motion/features/layout/Animate.svelte.d.ts.map +1 -0
  264. package/dist/motion/features/layout/AnimateLayoutContextProvider.svelte.d.ts +23 -0
  265. package/dist/motion/features/layout/AnimateLayoutContextProvider.svelte.d.ts.map +1 -0
  266. package/dist/motion/features/layout/Measure.d.ts +2 -0
  267. package/dist/motion/features/layout/Measure.d.ts.map +1 -0
  268. package/dist/motion/features/layout/Measure.js +2 -0
  269. package/dist/motion/features/layout/Measure.svelte.d.ts +24 -0
  270. package/dist/motion/features/layout/Measure.svelte.d.ts.map +1 -0
  271. package/{src → dist}/motion/features/layout/MeasureContextProvider.svelte +7 -4
  272. package/dist/motion/features/layout/MeasureContextProvider.svelte.d.ts +23 -0
  273. package/dist/motion/features/layout/MeasureContextProvider.svelte.d.ts.map +1 -0
  274. package/{src/motion/features/layout/index.ts → dist/motion/features/layout/index.js} +11 -20
  275. package/{src/motion/features/layout/types.ts → dist/motion/features/layout/types.d.ts} +72 -71
  276. package/dist/motion/features/layout/types.d.ts.map +1 -0
  277. package/dist/motion/features/layout/types.js +1 -0
  278. package/dist/motion/features/layout/utils.d.ts +26 -0
  279. package/dist/motion/features/layout/utils.d.ts.map +1 -0
  280. package/{src/motion/features/layout/utils.ts → dist/motion/features/layout/utils.js} +28 -40
  281. package/{src/motion/features/types.ts → dist/motion/features/types.d.ts} +54 -53
  282. package/dist/motion/features/types.d.ts.map +1 -0
  283. package/dist/motion/features/types.js +1 -0
  284. package/{src/motion/features/use-features.ts → dist/motion/features/use-features.d.ts} +12 -16
  285. package/dist/motion/features/use-features.d.ts.map +1 -0
  286. package/dist/motion/features/use-features.js +5 -0
  287. package/dist/motion/index.d.ts +30 -0
  288. package/dist/motion/index.d.ts.map +1 -0
  289. package/dist/motion/index.js +35 -0
  290. package/dist/motion/type.spec-d.d.ts +2 -0
  291. package/dist/motion/type.spec-d.d.ts.map +1 -0
  292. package/dist/motion/type.spec-d.js +6 -0
  293. package/{src/motion/types.ts → dist/motion/types.d.ts} +277 -278
  294. package/dist/motion/types.d.ts.map +1 -0
  295. package/dist/motion/types.js +1 -0
  296. package/{src → dist}/motion/utils/UseLayoutId.svelte +3 -2
  297. package/dist/motion/utils/UseLayoutId.svelte.d.ts +35 -0
  298. package/dist/motion/utils/UseLayoutId.svelte.d.ts.map +1 -0
  299. package/{src → dist}/motion/utils/UseVisualElement.svelte +22 -13
  300. package/dist/motion/utils/UseVisualElement.svelte.d.ts +40 -0
  301. package/dist/motion/utils/UseVisualElement.svelte.d.ts.map +1 -0
  302. package/{src → dist}/motion/utils/UseVisualState.svelte +7 -7
  303. package/dist/motion/utils/UseVisualState.svelte.d.ts +37 -0
  304. package/dist/motion/utils/UseVisualState.svelte.d.ts.map +1 -0
  305. package/dist/motion/utils/is-forced-motion-value.d.ts +11 -0
  306. package/dist/motion/utils/is-forced-motion-value.d.ts.map +1 -0
  307. package/{src/motion/utils/is-forced-motion-value.ts → dist/motion/utils/is-forced-motion-value.js} +13 -23
  308. package/{src/motion/utils/make-renderless-component.ts → dist/motion/utils/make-renderless-component.d.ts} +12 -17
  309. package/dist/motion/utils/make-renderless-component.d.ts.map +1 -0
  310. package/dist/motion/utils/make-renderless-component.js +11 -0
  311. package/{src/motion/utils/should-inhert-variant.ts → dist/motion/utils/should-inhert-variant.d.ts} +7 -6
  312. package/dist/motion/utils/should-inhert-variant.d.ts.map +1 -0
  313. package/dist/motion/utils/should-inhert-variant.js +1 -0
  314. package/dist/motion/utils/use-motion-ref.d.ts +13 -0
  315. package/dist/motion/utils/use-motion-ref.d.ts.map +1 -0
  316. package/{src/motion/utils/use-motion-ref.ts → dist/motion/utils/use-motion-ref.js} +29 -41
  317. package/{src/motion/utils/use-visual-element.ts → dist/motion/utils/use-visual-element.d.ts} +10 -13
  318. package/dist/motion/utils/use-visual-element.d.ts.map +1 -0
  319. package/dist/motion/utils/use-visual-element.js +1 -0
  320. package/{src/motion/utils/use-visual-state.ts → dist/motion/utils/use-visual-state.d.ts} +20 -24
  321. package/dist/motion/utils/use-visual-state.d.ts.map +1 -0
  322. package/dist/motion/utils/use-visual-state.js +1 -0
  323. package/dist/motion/utils/valid-prop.d.ts +15 -0
  324. package/dist/motion/utils/valid-prop.d.ts.map +1 -0
  325. package/{src/motion/utils/valid-prop.ts → dist/motion/utils/valid-prop.js} +77 -80
  326. package/dist/render/dom/M-type.spec-d.d.ts +2 -0
  327. package/dist/render/dom/M-type.spec-d.d.ts.map +1 -0
  328. package/dist/render/dom/M-type.spec-d.js +6 -0
  329. package/dist/render/dom/M.svelte.d.ts +32 -0
  330. package/dist/render/dom/M.svelte.d.ts.map +1 -0
  331. package/dist/render/dom/UseRender.svelte.d.ts +42 -0
  332. package/dist/render/dom/UseRender.svelte.d.ts.map +1 -0
  333. package/{src/render/dom/create-motion-class.ts → dist/render/dom/create-motion-class.js} +10 -12
  334. package/dist/render/dom/create-visual-element.d.ts +8 -0
  335. package/dist/render/dom/create-visual-element.d.ts.map +1 -0
  336. package/{src/render/dom/create-visual-element.ts → dist/render/dom/create-visual-element.js} +12 -22
  337. package/{src/render/dom/featureBundle.ts → dist/render/dom/featureBundle.js} +19 -22
  338. package/dist/render/dom/motion-minimal.d.ts +10 -0
  339. package/dist/render/dom/motion-minimal.d.ts.map +1 -0
  340. package/dist/render/dom/motion-minimal.js +18 -0
  341. package/dist/render/dom/motion-proxy.d.ts +245 -0
  342. package/dist/render/dom/motion-proxy.d.ts.map +1 -0
  343. package/dist/render/dom/motion-proxy.js +55 -0
  344. package/{src/render/dom/motion.ts → dist/render/dom/motion.js} +42 -62
  345. package/dist/render/dom/projection/convert-to-relative.d.ts +12 -0
  346. package/dist/render/dom/projection/convert-to-relative.d.ts.map +1 -0
  347. package/{src/render/dom/projection/convert-to-relative.ts → dist/render/dom/projection/convert-to-relative.js} +32 -40
  348. package/dist/render/dom/projection/default-scale-correctors.d.ts +39 -0
  349. package/dist/render/dom/projection/default-scale-correctors.d.ts.map +1 -0
  350. package/{src/render/dom/projection/default-scale-correctors.ts → dist/render/dom/projection/default-scale-correctors.js} +108 -138
  351. package/dist/render/dom/projection/measure.d.ts +17 -0
  352. package/dist/render/dom/projection/measure.d.ts.map +1 -0
  353. package/{src/render/dom/projection/measure.ts → dist/render/dom/projection/measure.js} +19 -28
  354. package/dist/render/dom/projection/relative-set.d.ts +8 -0
  355. package/dist/render/dom/projection/relative-set.d.ts.map +1 -0
  356. package/{src/render/dom/projection/relative-set.ts → dist/render/dom/projection/relative-set.js} +18 -27
  357. package/{src/render/dom/projection/scale-correction.ts → dist/render/dom/projection/scale-correction.d.ts} +16 -22
  358. package/dist/render/dom/projection/scale-correction.d.ts.map +1 -0
  359. package/dist/render/dom/projection/scale-correction.js +14 -0
  360. package/{src/render/dom/projection/types.ts → dist/render/dom/projection/types.d.ts} +14 -13
  361. package/dist/render/dom/projection/types.d.ts.map +1 -0
  362. package/dist/render/dom/projection/types.js +1 -0
  363. package/dist/render/dom/projection/utils.d.ts +18 -0
  364. package/dist/render/dom/projection/utils.d.ts.map +1 -0
  365. package/{src/render/dom/projection/utils.ts → dist/render/dom/projection/utils.js} +62 -69
  366. package/dist/render/dom/svg-visual-element.d.ts +3 -0
  367. package/dist/render/dom/svg-visual-element.d.ts.map +1 -0
  368. package/{src/render/dom/svg-visual-element.ts → dist/render/dom/svg-visual-element.js} +81 -114
  369. package/{src/render/dom/types.ts → dist/render/dom/types.d.ts} +33 -32
  370. package/dist/render/dom/types.d.ts.map +1 -0
  371. package/dist/render/dom/types.js +1 -0
  372. package/{src/render/dom/use-render.ts → dist/render/dom/use-render.d.ts} +10 -11
  373. package/dist/render/dom/use-render.d.ts.map +1 -0
  374. package/dist/render/dom/use-render.js +1 -0
  375. package/dist/render/dom/utils/UseInitialMotionProps.svelte.d.ts +35 -0
  376. package/dist/render/dom/utils/UseInitialMotionProps.svelte.d.ts.map +1 -0
  377. package/dist/render/dom/utils/batch-layout.d.ts +14 -0
  378. package/dist/render/dom/utils/batch-layout.d.ts.map +1 -0
  379. package/{src/render/dom/utils/batch-layout.ts → dist/render/dom/utils/batch-layout.js} +66 -77
  380. package/dist/render/dom/utils/camel-to-dash.d.ts +10 -0
  381. package/dist/render/dom/utils/camel-to-dash.d.ts.map +1 -0
  382. package/{src/render/dom/utils/camel-to-dash.ts → dist/render/dom/utils/camel-to-dash.js} +17 -20
  383. package/dist/render/dom/utils/create-config.d.ts +13 -0
  384. package/dist/render/dom/utils/create-config.d.ts.map +1 -0
  385. package/dist/render/dom/utils/create-config.js +17 -0
  386. package/dist/render/dom/utils/css-variables-conversion.d.ts +28 -0
  387. package/dist/render/dom/utils/css-variables-conversion.d.ts.map +1 -0
  388. package/{src/render/dom/utils/css-variables-conversion.ts → dist/render/dom/utils/css-variables-conversion.js} +109 -121
  389. package/dist/render/dom/utils/filter-props.d.ts +8 -0
  390. package/dist/render/dom/utils/filter-props.d.ts.map +1 -0
  391. package/{src/render/dom/utils/filter-props.ts → dist/render/dom/utils/filter-props.js} +46 -55
  392. package/dist/render/dom/utils/is-css-variable.d.ts +14 -0
  393. package/dist/render/dom/utils/is-css-variable.d.ts.map +1 -0
  394. package/{src/render/dom/utils/is-css-variable.ts → dist/render/dom/utils/is-css-variable.js} +15 -18
  395. package/dist/render/dom/utils/is-svg-component.d.ts +8 -0
  396. package/dist/render/dom/utils/is-svg-component.d.ts.map +1 -0
  397. package/{src/render/dom/utils/is-svg-component.ts → dist/render/dom/utils/is-svg-component.js} +32 -41
  398. package/dist/render/dom/utils/parse-dom-variant.d.ts +12 -0
  399. package/dist/render/dom/utils/parse-dom-variant.d.ts.map +1 -0
  400. package/{src/render/dom/utils/parse-dom-variant.ts → dist/render/dom/utils/parse-dom-variant.js} +17 -26
  401. package/dist/render/dom/utils/unit-conversion.d.ts +27 -0
  402. package/dist/render/dom/utils/unit-conversion.d.ts.map +1 -0
  403. package/{src/render/dom/utils/unit-conversion.ts → dist/render/dom/utils/unit-conversion.js} +253 -258
  404. package/dist/render/dom/utils/use-html-props.d.ts +2 -0
  405. package/dist/render/dom/utils/use-html-props.d.ts.map +1 -0
  406. package/{src/render/dom/utils/use-html-props.ts → dist/render/dom/utils/use-html-props.js} +2 -2
  407. package/dist/render/dom/utils/use-svg-props.d.ts +2 -0
  408. package/dist/render/dom/utils/use-svg-props.d.ts.map +1 -0
  409. package/dist/render/dom/utils/use-svg-props.js +1 -0
  410. package/dist/render/dom/value-types/animatable-none.d.ts +7 -0
  411. package/dist/render/dom/value-types/animatable-none.d.ts.map +1 -0
  412. package/{src/render/dom/value-types/animatable-none.ts → dist/render/dom/value-types/animatable-none.js} +20 -24
  413. package/dist/render/dom/value-types/defaults.d.ts +15 -0
  414. package/dist/render/dom/value-types/defaults.d.ts.map +1 -0
  415. package/{src/render/dom/value-types/defaults.ts → dist/render/dom/value-types/defaults.js} +22 -30
  416. package/dist/render/dom/value-types/dimensions.d.ts +14 -0
  417. package/dist/render/dom/value-types/dimensions.d.ts.map +1 -0
  418. package/{src/render/dom/value-types/dimensions.ts → dist/render/dom/value-types/dimensions.js} +23 -27
  419. package/dist/render/dom/value-types/find.d.ts +15 -0
  420. package/dist/render/dom/value-types/find.d.ts.map +1 -0
  421. package/{src/render/dom/value-types/find.ts → dist/render/dom/value-types/find.js} +24 -31
  422. package/{src/render/dom/value-types/get-as-type.ts → dist/render/dom/value-types/get-as-type.d.ts} +15 -21
  423. package/dist/render/dom/value-types/get-as-type.d.ts.map +1 -0
  424. package/dist/render/dom/value-types/get-as-type.js +13 -0
  425. package/dist/render/dom/value-types/number.d.ts +8 -0
  426. package/dist/render/dom/value-types/number.d.ts.map +1 -0
  427. package/{src/render/dom/value-types/number.ts → dist/render/dom/value-types/number.js} +74 -83
  428. package/{src/render/dom/value-types/test.ts → dist/render/dom/value-types/test.d.ts} +15 -17
  429. package/dist/render/dom/value-types/test.d.ts.map +1 -0
  430. package/dist/render/dom/value-types/test.js +9 -0
  431. package/{src/render/dom/value-types/type-auto.ts → dist/render/dom/value-types/type-auto.d.ts} +15 -21
  432. package/dist/render/dom/value-types/type-auto.d.ts.map +1 -0
  433. package/dist/render/dom/value-types/type-auto.js +12 -0
  434. package/{src/render/dom/value-types/type-int.ts → dist/render/dom/value-types/type-int.d.ts} +14 -23
  435. package/dist/render/dom/value-types/type-int.d.ts.map +1 -0
  436. package/dist/render/dom/value-types/type-int.js +13 -0
  437. package/{src/render/dom/value-types/types.ts → dist/render/dom/value-types/types.d.ts} +9 -8
  438. package/dist/render/dom/value-types/types.d.ts.map +1 -0
  439. package/dist/render/dom/value-types/types.js +1 -0
  440. package/dist/render/html/UseHTMLProps.svelte.d.ts +36 -0
  441. package/dist/render/html/UseHTMLProps.svelte.d.ts.map +1 -0
  442. package/dist/render/html/UseInitialMotionValues.svelte.d.ts +36 -0
  443. package/dist/render/html/UseInitialMotionValues.svelte.d.ts.map +1 -0
  444. package/{src → dist}/render/html/UseStyle.svelte +2 -2
  445. package/dist/render/html/UseStyle.svelte.d.ts +41 -0
  446. package/dist/render/html/UseStyle.svelte.d.ts.map +1 -0
  447. package/dist/render/html/config-motion.d.ts +13 -0
  448. package/dist/render/html/config-motion.d.ts.map +1 -0
  449. package/dist/render/html/config-motion.js +12 -0
  450. package/dist/render/html/supported-elements.d.ts +12 -0
  451. package/dist/render/html/supported-elements.d.ts.map +1 -0
  452. package/{src/render/html/supported-elements.ts → dist/render/html/supported-elements.js} +4 -10
  453. package/{src/render/html/types.ts → dist/render/html/types.d.ts} +66 -64
  454. package/dist/render/html/types.d.ts.map +1 -0
  455. package/dist/render/html/types.js +1 -0
  456. package/{src/render/html/use-props.ts → dist/render/html/use-props.d.ts} +11 -14
  457. package/dist/render/html/use-props.d.ts.map +1 -0
  458. package/dist/render/html/use-props.js +2 -0
  459. package/dist/render/html/utils/build-projection-transform.d.ts +21 -0
  460. package/dist/render/html/utils/build-projection-transform.d.ts.map +1 -0
  461. package/{src/render/html/utils/build-projection-transform.ts → dist/render/html/utils/build-projection-transform.js} +39 -53
  462. package/dist/render/html/utils/build-styles.d.ts +13 -0
  463. package/dist/render/html/utils/build-styles.d.ts.map +1 -0
  464. package/{src/render/html/utils/build-styles.ts → dist/render/html/utils/build-styles.js} +107 -121
  465. package/dist/render/html/utils/build-transform.d.ts +21 -0
  466. package/dist/render/html/utils/build-transform.d.ts.map +1 -0
  467. package/{src/render/html/utils/build-transform.ts → dist/render/html/utils/build-transform.js} +69 -79
  468. package/dist/render/html/utils/create-render-state.d.ts +17 -0
  469. package/dist/render/html/utils/create-render-state.d.ts.map +1 -0
  470. package/dist/render/html/utils/create-render-state.js +18 -0
  471. package/dist/render/html/utils/render.d.ts +12 -0
  472. package/dist/render/html/utils/render.d.ts.map +1 -0
  473. package/{src/render/html/utils/render.ts → dist/render/html/utils/render.js} +14 -22
  474. package/dist/render/html/utils/scrape-motion-values.d.ts +8 -0
  475. package/dist/render/html/utils/scrape-motion-values.d.ts.map +1 -0
  476. package/{src/render/html/utils/scrape-motion-values.ts → dist/render/html/utils/scrape-motion-values.js} +17 -26
  477. package/dist/render/html/utils/transform.d.ts +25 -0
  478. package/dist/render/html/utils/transform.d.ts.map +1 -0
  479. package/{src/render/html/utils/transform.ts → dist/render/html/utils/transform.js} +48 -51
  480. package/dist/render/html/visual-element.d.ts +12 -0
  481. package/dist/render/html/visual-element.d.ts.map +1 -0
  482. package/{src/render/html/visual-element.ts → dist/render/html/visual-element.js} +119 -129
  483. package/dist/render/index.d.ts +8 -0
  484. package/dist/render/index.d.ts.map +1 -0
  485. package/{src/render/index.ts → dist/render/index.js} +711 -703
  486. package/{src → dist}/render/svg/UseSVGProps.svelte +1 -1
  487. package/dist/render/svg/UseSVGProps.svelte.d.ts +35 -0
  488. package/dist/render/svg/UseSVGProps.svelte.d.ts.map +1 -0
  489. package/dist/render/svg/config-motion.d.ts +8 -0
  490. package/dist/render/svg/config-motion.d.ts.map +1 -0
  491. package/dist/render/svg/config-motion.js +41 -0
  492. package/dist/render/svg/lowercase-elements.d.ts +10 -0
  493. package/dist/render/svg/lowercase-elements.d.ts.map +1 -0
  494. package/{src/render/svg/lowercase-elements.ts → dist/render/svg/lowercase-elements.js} +35 -35
  495. package/dist/render/svg/supported-elements.d.ts +12 -0
  496. package/dist/render/svg/supported-elements.d.ts.map +1 -0
  497. package/{src/render/svg/supported-elements.ts → dist/render/svg/supported-elements.js} +4 -10
  498. package/{src/render/svg/types.ts → dist/render/svg/types.d.ts} +53 -51
  499. package/dist/render/svg/types.d.ts.map +1 -0
  500. package/dist/render/svg/types.js +1 -0
  501. package/{src/render/svg/use-props.ts → dist/render/svg/use-props.d.ts} +13 -14
  502. package/dist/render/svg/use-props.d.ts.map +1 -0
  503. package/dist/render/svg/use-props.js +1 -0
  504. package/dist/render/svg/utils/build-attrs.d.ts +16 -0
  505. package/dist/render/svg/utils/build-attrs.d.ts.map +1 -0
  506. package/{src/render/svg/utils/build-attrs.ts → dist/render/svg/utils/build-attrs.js} +44 -58
  507. package/dist/render/svg/utils/camel-case-attrs.d.ts +9 -0
  508. package/dist/render/svg/utils/camel-case-attrs.d.ts.map +1 -0
  509. package/{src/render/svg/utils/camel-case-attrs.ts → dist/render/svg/utils/camel-case-attrs.js} +27 -27
  510. package/dist/render/svg/utils/create-render-state.d.ts +3 -0
  511. package/dist/render/svg/utils/create-render-state.d.ts.map +1 -0
  512. package/{src/render/svg/utils/create-render-state.ts → dist/render/svg/utils/create-render-state.js} +8 -17
  513. package/dist/render/svg/utils/path.d.ts +15 -0
  514. package/dist/render/svg/utils/path.d.ts.map +1 -0
  515. package/{src/render/svg/utils/path.ts → dist/render/svg/utils/path.js} +46 -49
  516. package/dist/render/svg/utils/render.d.ts +8 -0
  517. package/dist/render/svg/utils/render.d.ts.map +1 -0
  518. package/{src/render/svg/utils/render.ts → dist/render/svg/utils/render.js} +14 -22
  519. package/dist/render/svg/utils/scrape-motion-values.d.ts +8 -0
  520. package/dist/render/svg/utils/scrape-motion-values.d.ts.map +1 -0
  521. package/{src/render/svg/utils/scrape-motion-values.ts → dist/render/svg/utils/scrape-motion-values.js} +17 -26
  522. package/dist/render/svg/utils/transform-origin.d.ts +12 -0
  523. package/dist/render/svg/utils/transform-origin.d.ts.map +1 -0
  524. package/{src/render/svg/utils/transform-origin.ts → dist/render/svg/utils/transform-origin.js} +21 -30
  525. package/dist/render/svg/visual-element.d.ts +7 -0
  526. package/dist/render/svg/visual-element.d.ts.map +1 -0
  527. package/{src/render/svg/visual-element.ts → dist/render/svg/visual-element.js} +41 -44
  528. package/{src/render/types.ts → dist/render/types.d.ts} +148 -148
  529. package/dist/render/types.d.ts.map +1 -0
  530. package/dist/render/types.js +4 -0
  531. package/dist/render/utils/animation-state.d.ts +37 -0
  532. package/dist/render/utils/animation-state.d.ts.map +1 -0
  533. package/{src/render/utils/animation-state.ts → dist/render/utils/animation-state.js} +339 -375
  534. package/dist/render/utils/animation.d.ts +27 -0
  535. package/dist/render/utils/animation.d.ts.map +1 -0
  536. package/{src/render/utils/animation.ts → dist/render/utils/animation.js} +157 -167
  537. package/{src/render/utils/compare-by-depth.ts → dist/render/utils/compare-by-depth.d.ts} +15 -18
  538. package/dist/render/utils/compare-by-depth.d.ts.map +1 -0
  539. package/dist/render/utils/compare-by-depth.js +8 -0
  540. package/dist/render/utils/flat-tree.d.ts +14 -0
  541. package/dist/render/utils/flat-tree.d.ts.map +1 -0
  542. package/dist/render/utils/flat-tree.js +53 -0
  543. package/{src/render/utils/is-draggable.ts → dist/render/utils/is-draggable.d.ts} +12 -17
  544. package/dist/render/utils/is-draggable.d.ts.map +1 -0
  545. package/dist/render/utils/is-draggable.js +9 -0
  546. package/{src/render/utils/lifecycles.ts → dist/render/utils/lifecycles.d.ts} +122 -172
  547. package/dist/render/utils/lifecycles.d.ts.map +1 -0
  548. package/dist/render/utils/lifecycles.js +49 -0
  549. package/dist/render/utils/motion-values.d.ts +9 -0
  550. package/dist/render/utils/motion-values.d.ts.map +1 -0
  551. package/{src/render/utils/motion-values.ts → dist/render/utils/motion-values.js} +49 -59
  552. package/dist/render/utils/projection.d.ts +9 -0
  553. package/dist/render/utils/projection.d.ts.map +1 -0
  554. package/{src/render/utils/projection.ts → dist/render/utils/projection.js} +29 -38
  555. package/dist/render/utils/setters.d.ts +794 -0
  556. package/dist/render/utils/setters.d.ts.map +1 -0
  557. package/dist/render/utils/setters.js +119 -0
  558. package/{src/render/utils/state.ts → dist/render/utils/state.d.ts} +90 -113
  559. package/dist/render/utils/state.d.ts.map +1 -0
  560. package/dist/render/utils/state.js +26 -0
  561. package/{src/render/utils/types.ts → dist/render/utils/types.d.ts} +13 -12
  562. package/dist/render/utils/types.d.ts.map +1 -0
  563. package/dist/render/utils/types.js +13 -0
  564. package/dist/render/utils/variants.d.ts +27 -0
  565. package/dist/render/utils/variants.d.ts.map +1 -0
  566. package/{src/render/utils/variants.ts → dist/render/utils/variants.js} +66 -76
  567. package/{src/types/geometry.ts → dist/types/geometry.d.ts} +92 -91
  568. package/dist/types/geometry.d.ts.map +1 -0
  569. package/dist/types/geometry.js +1 -0
  570. package/{src/types.ts → dist/types.d.ts} +1091 -1088
  571. package/dist/types.d.ts.map +1 -0
  572. package/dist/types.js +1 -0
  573. package/dist/utils/UseUnmountEffect.svelte.d.ts +30 -0
  574. package/dist/utils/UseUnmountEffect.svelte.d.ts.map +1 -0
  575. package/dist/utils/array.d.ts +12 -0
  576. package/dist/utils/array.d.ts.map +1 -0
  577. package/{src/utils/array.ts → dist/utils/array.js} +16 -18
  578. package/dist/utils/each-axis.d.ts +11 -0
  579. package/dist/utils/each-axis.d.ts.map +1 -0
  580. package/{src/utils/each-axis.ts → dist/utils/each-axis.js} +13 -15
  581. package/dist/utils/errors.d.ts +5 -0
  582. package/dist/utils/errors.d.ts.map +1 -0
  583. package/dist/utils/errors.js +16 -0
  584. package/dist/utils/fix-process-env.d.ts +2 -0
  585. package/dist/utils/fix-process-env.d.ts.map +1 -0
  586. package/dist/utils/fix-process-env.js +19 -0
  587. package/dist/utils/geometry/delta-apply.d.ts +71 -0
  588. package/dist/utils/geometry/delta-apply.d.ts.map +1 -0
  589. package/{src/utils/geometry/delta-apply.ts → dist/utils/geometry/delta-apply.js} +161 -162
  590. package/dist/utils/geometry/delta-calc.d.ts +34 -0
  591. package/dist/utils/geometry/delta-calc.d.ts.map +1 -0
  592. package/{src/utils/geometry/delta-calc.ts → dist/utils/geometry/delta-calc.js} +84 -89
  593. package/dist/utils/geometry/index.d.ts +30 -0
  594. package/dist/utils/geometry/index.d.ts.map +1 -0
  595. package/{src/utils/geometry/index.ts → dist/utils/geometry/index.js} +71 -83
  596. package/dist/utils/is-browser.d.ts +11 -0
  597. package/dist/utils/is-browser.d.ts.map +1 -0
  598. package/{src/utils/is-browser.ts → dist/utils/is-browser.js} +10 -12
  599. package/dist/utils/is-numerical-string.d.ts +14 -0
  600. package/dist/utils/is-numerical-string.d.ts.map +1 -0
  601. package/{src/utils/is-numerical-string.ts → dist/utils/is-numerical-string.js} +13 -15
  602. package/dist/utils/is-ref-object.d.ts +12 -0
  603. package/dist/utils/is-ref-object.d.ts.map +1 -0
  604. package/dist/utils/is-ref-object.js +9 -0
  605. package/dist/utils/noop.d.ts +11 -0
  606. package/dist/utils/noop.d.ts.map +1 -0
  607. package/{src/utils/noop.ts → dist/utils/noop.js} +13 -15
  608. package/dist/utils/resolve-value.d.ts +9 -0
  609. package/dist/utils/resolve-value.d.ts.map +1 -0
  610. package/{src/utils/resolve-value.ts → dist/utils/resolve-value.js} +15 -23
  611. package/dist/utils/shallow-compare.d.ts +11 -0
  612. package/dist/utils/shallow-compare.d.ts.map +1 -0
  613. package/{src/utils/shallow-compare.ts → dist/utils/shallow-compare.js} +21 -23
  614. package/dist/utils/subscription-manager.d.ts +14 -0
  615. package/dist/utils/subscription-manager.d.ts.map +1 -0
  616. package/dist/utils/subscription-manager.js +69 -0
  617. package/dist/utils/time-conversion.d.ts +17 -0
  618. package/dist/utils/time-conversion.d.ts.map +1 -0
  619. package/{src/utils/time-conversion.ts → dist/utils/time-conversion.js} +16 -18
  620. package/{src/utils/transform.ts → dist/utils/transform.d.ts} +93 -120
  621. package/dist/utils/transform.d.ts.map +1 -0
  622. package/dist/utils/transform.js +22 -0
  623. package/{src/utils/use-constant.ts → dist/utils/use-constant.d.ts} +22 -23
  624. package/dist/utils/use-constant.d.ts.map +1 -0
  625. package/dist/utils/use-constant.js +9 -0
  626. package/dist/utils/use-cycle.d.ts +2 -0
  627. package/dist/utils/use-cycle.d.ts.map +1 -0
  628. package/{src/utils/use-cycle.ts → dist/utils/use-cycle.js} +65 -78
  629. package/dist/utils/use-force-update.d.ts +6 -0
  630. package/dist/utils/use-force-update.d.ts.map +1 -0
  631. package/dist/utils/use-force-update.js +2 -0
  632. package/dist/utils/use-isomorphic-effect.d.ts +7 -0
  633. package/dist/utils/use-isomorphic-effect.d.ts.map +1 -0
  634. package/{src/utils/use-isomorphic-effect.ts → dist/utils/use-isomorphic-effect.js} +7 -8
  635. package/dist/utils/use-reduced-motion.d.ts +33 -0
  636. package/dist/utils/use-reduced-motion.d.ts.map +1 -0
  637. package/{src/utils/use-reduced-motion.ts → dist/utils/use-reduced-motion.js} +52 -70
  638. package/{src/utils/use-unmount-effect.ts → dist/utils/use-unmount-effect.d.ts} +7 -8
  639. package/dist/utils/use-unmount-effect.d.ts.map +1 -0
  640. package/dist/utils/use-unmount-effect.js +1 -0
  641. package/{src/value/index.ts → dist/value/index.d.ts} +273 -409
  642. package/dist/value/index.d.ts.map +1 -0
  643. package/dist/value/index.js +546 -0
  644. package/dist/value/scroll/use-element-scroll.d.ts +8 -0
  645. package/dist/value/scroll/use-element-scroll.d.ts.map +1 -0
  646. package/dist/value/scroll/use-element-scroll.js +40 -0
  647. package/dist/value/scroll/use-viewport-scroll.d.ts +29 -0
  648. package/dist/value/scroll/use-viewport-scroll.d.ts.map +1 -0
  649. package/{src/value/scroll/use-viewport-scroll.ts → dist/value/scroll/use-viewport-scroll.js} +59 -81
  650. package/dist/value/scroll/utils.d.ts +25 -0
  651. package/dist/value/scroll/utils.d.ts.map +1 -0
  652. package/{src/value/scroll/utils.ts → dist/value/scroll/utils.js} +52 -76
  653. package/dist/value/use-combine-values.d.ts +9 -0
  654. package/dist/value/use-combine-values.d.ts.map +1 -0
  655. package/dist/value/use-combine-values.js +41 -0
  656. package/dist/value/use-motion-template.d.ts +31 -0
  657. package/dist/value/use-motion-template.d.ts.map +1 -0
  658. package/{src/value/use-motion-template.ts → dist/value/use-motion-template.js} +51 -57
  659. package/dist/value/use-motion-value.d.ts +27 -0
  660. package/dist/value/use-motion-value.d.ts.map +1 -0
  661. package/{src/value/use-motion-value.ts → dist/value/use-motion-value.js} +27 -27
  662. package/dist/value/use-spring.d.ts +29 -0
  663. package/dist/value/use-spring.d.ts.map +1 -0
  664. package/{src/value/use-spring.ts → dist/value/use-spring.js} +64 -84
  665. package/dist/value/use-transform.d.ts +87 -0
  666. package/dist/value/use-transform.d.ts.map +1 -0
  667. package/dist/value/use-transform.js +77 -0
  668. package/dist/value/use-velocity.d.ts +20 -0
  669. package/dist/value/use-velocity.d.ts.map +1 -0
  670. package/{src/value/use-velocity.ts → dist/value/use-velocity.js} +39 -44
  671. package/dist/value/utils/is-motion-value.d.ts +12 -0
  672. package/dist/value/utils/is-motion-value.d.ts.map +1 -0
  673. package/dist/value/utils/is-motion-value.js +8 -0
  674. package/dist/value/utils/resolve-motion-value.d.ts +16 -0
  675. package/dist/value/utils/resolve-motion-value.d.ts.map +1 -0
  676. package/{src/value/utils/resolve-motion-value.ts → dist/value/utils/resolve-motion-value.js} +25 -29
  677. package/package.json +39 -18
  678. package/src/animation/use-animated-state.ts +0 -1
  679. package/src/animation/utils/default-transitions.ts +0 -70
  680. package/src/context/DOMcontext.ts +0 -21
  681. package/src/context/LayoutGroupContext.ts +0 -13
  682. package/src/context/LazyContext.ts +0 -18
  683. package/src/context/MotionContext/UseCreateMotionContext.svelte +0 -34
  684. package/src/context/SharedLayoutContext.ts +0 -29
  685. package/src/gestures/PanSession.ts +0 -298
  686. package/src/gestures/drag/VisualElementDragControls.ts +0 -632
  687. package/src/gestures/drag/use-drag-controls.ts +0 -148
  688. package/src/motion/features/layout/Animate.ts +0 -9
  689. package/src/motion/features/layout/Measure.ts +0 -9
  690. package/src/motion/index.ts +0 -64
  691. package/src/render/dom/motion-minimal.ts +0 -22
  692. package/src/render/dom/motion-proxy.ts +0 -107
  693. package/src/render/dom/utils/create-config.ts +0 -33
  694. package/src/render/dom/utils/use-svg-props.ts +0 -1
  695. package/src/render/html/config-motion.ts +0 -23
  696. package/src/render/html/utils/create-render-state.ts +0 -18
  697. package/src/render/svg/config-motion.ts +0 -51
  698. package/src/render/utils/flat-tree.ts +0 -35
  699. package/src/render/utils/setters.ts +0 -910
  700. package/src/utils/errors.ts +0 -22
  701. package/src/utils/fix-process-env.ts +0 -22
  702. package/src/utils/is-ref-object.ts +0 -16
  703. package/src/utils/subscription-manager.ts +0 -49
  704. package/src/utils/use-force-update.ts +0 -7
  705. package/src/value/scroll/use-element-scroll.ts +0 -73
  706. package/src/value/use-combine-values.ts +0 -53
  707. package/src/value/use-transform.ts +0 -216
  708. package/src/value/utils/is-motion-value.ts +0 -15
  709. /package/{src → dist}/animation/UseAnimation.svelte +0 -0
  710. /package/{src → dist}/components/AnimatePresence/AnimatePresence.svelte +0 -0
  711. /package/{src → dist}/components/AnimateSharedLayout/AnimateSharedLayout.svelte +0 -0
  712. /package/{src → dist}/components/LazyMotion/LazyMotion.svelte +0 -0
  713. /package/{src → dist}/components/MotionDiv.svelte +0 -0
  714. /package/{src → dist}/context/MotionContext/MotionContextProvider.svelte +0 -0
  715. /package/{src → dist}/gestures/UseFocusGesture.svelte +0 -0
  716. /package/{src → dist}/gestures/UseGestures.svelte +0 -0
  717. /package/{src → dist}/gestures/UsePanGesture.svelte +0 -0
  718. /package/{src → dist}/gestures/UseTapGesture.svelte +0 -0
  719. /package/{src → dist}/motion/features/AnimationState.svelte +0 -0
  720. /package/{src → dist}/motion/features/layout/AnimateLayoutContextProvider.svelte +0 -0
  721. /package/{src → dist}/motion/features/layout/Measure.svelte +0 -0
  722. /package/{src → dist}/render/dom/M.svelte +0 -0
  723. /package/{src → dist}/render/dom/UseRender.svelte +0 -0
  724. /package/{src → dist}/render/dom/utils/UseInitialMotionProps.svelte +0 -0
  725. /package/{src → dist}/render/html/UseHTMLProps.svelte +0 -0
  726. /package/{src → dist}/render/html/UseInitialMotionValues.svelte +0 -0
  727. /package/{src → dist}/utils/UseUnmountEffect.svelte +0 -0
@@ -1,84 +1,64 @@
1
- /**
2
- based on framer-motion@4.1.17,
3
- Copyright (c) 2018 Framer B.V.
4
- */
5
- import type { SpringOptions } from "popmotion";
6
- import { MotionValue } from "../value";
7
-
8
- /**
9
- based on framer-motion@4.1.16,
10
- Copyright (c) 2018 Framer B.V.
11
- */
12
-
13
- import { fixed } from '../utils/fix-process-env';
14
- import { getContext } from "svelte"
15
- import { MotionConfigContext, type MotionConfigContextObject } from "../context/MotionConfigContext"
16
- import { get, type Writable } from 'svelte/store';
17
- import { useMotionValue } from "./use-motion-value";
18
- import { isMotionValue } from "./utils/is-motion-value";
19
- import { animate } from "popmotion"
20
-
21
- /**
22
- * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
23
- *
24
- * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber
25
- * to another `MotionValue`.
26
- *
27
- * @remarks
28
- *
29
- * ```jsx
30
- * const x = useSpring(0, { stiffness: 300 })
31
- * const y = useSpring(x, { damping: 10 })
32
- * ```
33
- *
34
- * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.
35
- * @param springConfig - Configuration options for the spring.
36
- * @returns `MotionValue`
37
- *
38
- * @public
39
- */
40
- export const useSpring = (source: MotionValue | number, config: SpringOptions = {}, isCustom = false) => {
41
-
42
- const mcc: Writable<MotionConfigContextObject> = getContext(MotionConfigContext) || MotionConfigContext(isCustom);
43
-
44
- let activeSpringAnimation: { stop: () => void } | null = null;
45
-
46
- let value = useMotionValue(isMotionValue(source) ? source.get() : source) as MotionValue<any> & { reset: (_: any, config: SpringOptions) => void };
47
-
48
- let cleanup: () => void;
49
- const update = (_source: typeof source, _config: typeof config) => {
50
- value.attach((v, set) => {
51
-
52
-
53
- const { isStatic } = get(mcc);
54
-
55
- if (isStatic) {
56
- return set(v);
57
- }
58
- if (activeSpringAnimation) {
59
- activeSpringAnimation.stop();
60
- }
61
- activeSpringAnimation = animate({
62
- from: value.get(),
63
- to: v,
64
- velocity: value.getVelocity(),
65
- ..._config,
66
- onUpdate: set,
67
- })
68
-
69
- return value.get();
70
- })
71
- cleanup?.()
72
- return isMotionValue(_source) ?
73
- _source.onChange(v => value.set(parseFloat(v))) :
74
- undefined
75
- }
76
-
77
- update(source, config);
78
-
79
- value.reset = update;
80
-
81
- return value;
82
- }
83
-
84
- //export { default as UseSpring } from './UseSpring.svelte';
1
+ import { MotionValue } from ".";
2
+ /**
3
+ based on framer-motion@4.1.16,
4
+ Copyright (c) 2018 Framer B.V.
5
+ */
6
+ import { fixed } from '../utils/fix-process-env';
7
+ import { getContext } from "svelte";
8
+ import { MotionConfigContext } from "../context/MotionConfigContext";
9
+ import { get } from 'svelte/store';
10
+ import { useMotionValue } from "./use-motion-value";
11
+ import { isMotionValue } from "./utils/is-motion-value";
12
+ import { animate } from "popmotion";
13
+ /**
14
+ * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
15
+ *
16
+ * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber
17
+ * to another `MotionValue`.
18
+ *
19
+ * @remarks
20
+ *
21
+ * ```jsx
22
+ * const x = useSpring(0, { stiffness: 300 })
23
+ * const y = useSpring(x, { damping: 10 })
24
+ * ```
25
+ *
26
+ * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.
27
+ * @param springConfig - Configuration options for the spring.
28
+ * @returns `MotionValue`
29
+ *
30
+ * @public
31
+ */
32
+ export const useSpring = (source, config = {}, isCustom = false) => {
33
+ const mcc = getContext(MotionConfigContext) || MotionConfigContext(isCustom);
34
+ let activeSpringAnimation = null;
35
+ let value = useMotionValue(isMotionValue(source) ? source.get() : source);
36
+ let cleanup;
37
+ const update = (_source, _config) => {
38
+ value.attach((v, set) => {
39
+ const { isStatic } = get(mcc);
40
+ if (isStatic) {
41
+ return set(v);
42
+ }
43
+ if (activeSpringAnimation) {
44
+ activeSpringAnimation.stop();
45
+ }
46
+ activeSpringAnimation = animate({
47
+ from: value.get(),
48
+ to: v,
49
+ velocity: value.getVelocity(),
50
+ ..._config,
51
+ onUpdate: set,
52
+ });
53
+ return value.get();
54
+ });
55
+ cleanup?.();
56
+ return isMotionValue(_source) ?
57
+ _source.onChange(v => value.set(parseFloat(v))) :
58
+ undefined;
59
+ };
60
+ update(source, config);
61
+ value.reset = update;
62
+ return value;
63
+ };
64
+ //export { default as UseSpring } from './UseSpring.svelte';
@@ -0,0 +1,87 @@
1
+ import type { TransformOptions } from '../utils/transform';
2
+ /**
3
+ based on framer-motion@4.1.17,
4
+ Copyright (c) 2018 Framer B.V.
5
+ */
6
+ import type { MotionValue } from '.';
7
+ export type InputRange = number[];
8
+ type SingleTransformer<I, O> = (input: I) => O;
9
+ /**
10
+ * Create a `MotionValue` that transforms the output of another `MotionValue` by mapping it from one range of values into another.
11
+ *
12
+ * @remarks
13
+ *
14
+ * Given an input range of `[-200, -100, 100, 200]` and an output range of
15
+ * `[0, 1, 1, 0]`, the returned `MotionValue` will:
16
+ *
17
+ * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.
18
+ * - When provided a value between `-100` and `100`, will return `1`.
19
+ * - When provided a value between `100` and `200`, will return a value between `1` and `0`
20
+ *
21
+ *
22
+ * The input range must be a linear series of numbers. The output range
23
+ * can be any value type supported by Framer Motion: numbers, colors, shadows, etc.
24
+ *
25
+ * Every value in the output range must be of the same type and in the same format.
26
+ *
27
+ * @motion
28
+ *
29
+ * ```jsx
30
+ * <script>
31
+ * const x = useMotionValue(0)
32
+ * const xRange = [-200, -100, 100, 200]
33
+ * const opacityRange = [0, 1, 1, 0]
34
+ * const opacity = useTransform(x, xRange, opacityRange)
35
+ * </script>
36
+ *
37
+ * <Motion let:motion
38
+ * animate={{ x: 200 }}
39
+ * style={{ opacity, x }}
40
+ * >
41
+ * <div use:motion/>
42
+ * </Motion>
43
+ * ```
44
+ *
45
+ * @param inputValue - `MotionValue`
46
+ * @param inputRange - A linear series of numbers (either all increasing or decreasing)
47
+ * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.
48
+ * @param options -
49
+ *
50
+ * - clamp: boolean. Clamp values to within the given range. Defaults to `true`
51
+ * - ease: EasingFunction[]. Easing functions to use on the interpolations between each value in the input and output ranges. If provided as an array, the array must be one item shorter than the input and output ranges, as the easings apply to the transition between each.
52
+ *
53
+ * @returns `MotionValue & { reset: (value: MotionValue<number>, inputRange: InputRange, outputRange: O[], options?: TransformOptions<O>) => void }`
54
+ *
55
+ * @public
56
+ */
57
+ export declare function useTransform<I, O>(value: MotionValue<number>, inputRange: InputRange, outputRange: O[], options?: TransformOptions<O>): MotionValue<O> & {
58
+ reset: (value: MotionValue<number>, inputRange: InputRange, outputRange: O[], options?: TransformOptions<O>) => void;
59
+ };
60
+ /**
61
+ * Create a `MotionValue` that transforms the output of another `MotionValue` through a function.
62
+ * In this example, `y` will always be double `x`.
63
+ *
64
+ * @motion
65
+ *
66
+ * ```jsx
67
+ * <script>
68
+ * const x = useMotionValue(10)
69
+ * const y = useTransform(x, value => value * 2)
70
+ * </script>
71
+ *
72
+ * <Motion let:motion style={{ x, y }}>
73
+ * <div use:motion/>
74
+ * </Motion>
75
+ * ```
76
+ *
77
+ * @param input - A `MotionValue` that will pass its latest value through `transform` to update the returned `MotionValue`.
78
+ * @param transform - A function that accepts the latest value from `input` and returns a new value.
79
+ * @returns `MotionValue`
80
+ *
81
+ * @public
82
+ */
83
+ export declare function useTransform<I, O>(input: MotionValue<I>, transformer: SingleTransformer<I, O>): MotionValue<O> & {
84
+ reset: (input: MotionValue<I>, transformer: SingleTransformer<I, O>) => void;
85
+ };
86
+ export {};
87
+ //# sourceMappingURL=use-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-transform.d.ts","sourceRoot":"","sources":["../../../../src/lib/motion-start/value/use-transform.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D;;;GAGG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAKrC,MAAM,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;AAClC,KAAK,iBAAiB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAU/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,EAC1B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,CAAC,EAAE,EAChB,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC3B,WAAW,CAAC,CAAC,CAAC,GAAG;IACnB,KAAK,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACrH,CAAC;AACF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAChC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EACrB,WAAW,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,GAClC,WAAW,CAAC,CAAC,CAAC,GAAG;IAAE,KAAK,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;CAAE,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { transform } from '../utils/transform';
2
+ import { useCombineMotionValues } from './use-combine-values';
3
+ /**
4
+ * Pass an array of `MotionValue`s and a function to combine them. In this example, `z` will be the `x` multiplied by `y`.
5
+ *
6
+ * @motion
7
+ *
8
+ * ```jsx
9
+ * <script>
10
+ * const x = useMotionValue(0)
11
+ * const y = useMotionValue(0)
12
+ * const z = useTransform([x, y], [latestX, latestY] => latestX * latestY)
13
+ * </script>
14
+ *
15
+ * <Motion let:motion style={{ x, y, z }}>
16
+ * return <div use:motion/>
17
+ * </Motion>
18
+ * ```
19
+ *
20
+ * @param input - An array of `MotionValue`s that will pass their latest values through `transform` to update the returned `MotionValue`.
21
+ * @param transform - A function that accepts the latest values from `input` and returns a new value.
22
+ * @returns `MotionValue`
23
+ *
24
+ * @public
25
+ */
26
+ // export function useTransform<I, O>(input: MotionValue<string | number>[], transformer: MultiTransformer<I, O>):
27
+ // MotionValue<O> & { reset: (input: MotionValue<string | number>[], transformer: MultiTransformer<I, O>) => void };
28
+ // export function useTransform<I, O>(
29
+ // input: MotionValue<string>[] | MotionValue<number>[] | MotionValue<string | number>[],
30
+ // transformer: MultiTransformer<I, O>
31
+ // ): MotionValue<O> & { reset: (input: MotionValue<string>[] | MotionValue<number>[] | MotionValue<string | number>[], transformer: MultiTransformer<I, O>) => void };
32
+ // export function useTransform<I, O>(transformer: () => O): MotionValue<O>;
33
+ /**
34
+ * Pass an array of `MotionValue`s and a function to combine them. In this example, `z` will be the `x` multiplied by `y`.
35
+ *
36
+ * ```jsx
37
+ * export const MyComponent = () => {
38
+ * const x = useMotionValue(0)
39
+ * const y = useMotionValue(0)
40
+ * const z = useTransform([x, y], ([latestX, latestY]) => latestX * latestY)
41
+ *
42
+ * return <motion.div style={{ x, y, z }} />
43
+ * }
44
+ * ```
45
+ *
46
+ * @param input - An array of `MotionValue`s that will pass their latest values through `transform` to update the returned `MotionValue`.
47
+ * @param transform - A function that accepts the latest values from `input` and returns a new value.
48
+ * @returns `MotionValue`
49
+ *
50
+ * @public
51
+ */
52
+ export function useTransform(input, inputRangeOrTransformer, outputRange, options) {
53
+ let latest = [];
54
+ const update = (input, inputRangeOrTransformer, outputRange, options) => {
55
+ const transformer = typeof inputRangeOrTransformer === 'function'
56
+ ? inputRangeOrTransformer
57
+ : transform(inputRangeOrTransformer, outputRange, options);
58
+ const values = Array.isArray(input) ? input : [input];
59
+ const _transformer = Array.isArray(input) ? transformer : ([latest]) => transformer(latest);
60
+ return [
61
+ values,
62
+ () => {
63
+ latest.length = 0;
64
+ const numValues = values.length;
65
+ for (let i = 0; i < numValues; i++) {
66
+ latest[i] = values[i].get();
67
+ }
68
+ return _transformer(latest);
69
+ },
70
+ ];
71
+ };
72
+ const comb = useCombineMotionValues(...update(input, inputRangeOrTransformer, outputRange, options));
73
+ comb.updateInner = comb.reset;
74
+ comb.reset = (input, inputRangeOrTransformer, outputRange, options) => comb.updateInner(...update(input, inputRangeOrTransformer, outputRange, options));
75
+ return comb;
76
+ }
77
+ // export { default as UseTransform } from './UseTransform.svelte';
@@ -0,0 +1,20 @@
1
+ /**
2
+ based on framer-motion@4.1.17,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ import { MotionValue } from "./index.js";
6
+ /**
7
+ * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
8
+ *
9
+ * ```javascript
10
+ * const x = useMotionValue(0)
11
+ * const xVelocity = useVelocity(x)
12
+ * const xAcceleration = useVelocity(xVelocity)
13
+ * ```
14
+ *
15
+ * @public
16
+ */
17
+ export declare const useVelocity: (value: MotionValue<number>) => MotionValue<number> & {
18
+ reset: (value: MotionValue<number>) => void;
19
+ };
20
+ //# sourceMappingURL=use-velocity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-velocity.d.ts","sourceRoot":"","sources":["../../../../src/lib/motion-start/value/use-velocity.ts"],"names":[],"mappings":"AACA;;;EAGE;AACF,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,UAAY,WAAW,CAAC,MAAM,CAAC;mBAI7B,WAAW,CAAC,MAAM,CAAC;CAqB5C,CAAA"}
@@ -1,44 +1,39 @@
1
-
2
- /**
3
- based on framer-motion@4.1.17,
4
- Copyright (c) 2018 Framer B.V.
5
- */
6
- import { MotionValue } from "./index.js";
7
- import { useMotionValue } from "./use-motion-value.js"
8
- /**
9
- * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
10
- *
11
- * ```javascript
12
- * const x = useMotionValue(0)
13
- * const xVelocity = useVelocity(x)
14
- * const xAcceleration = useVelocity(xVelocity)
15
- * ```
16
- *
17
- * @public
18
- */
19
- export const useVelocity = (value : MotionValue<number>) => {
20
- let val = value;
21
- let cleanup: () => void;
22
-
23
- const reset = (value: MotionValue<number>) => {
24
- cleanup?.();
25
- val = value
26
- cleanup = val.velocityUpdateSubscribers.add((newVelocity) => {
27
- velocity.set(newVelocity);
28
- })
29
- }
30
-
31
- const velocity = useMotionValue(value.getVelocity(), () => {
32
- cleanup?.();
33
- cleanup = val.velocityUpdateSubscribers.add((newVelocity) => {
34
- velocity.set(newVelocity);
35
- })
36
- return () => {
37
- cleanup?.()
38
- }
39
- }) as MotionValue<number> & { reset: typeof reset };
40
-
41
- velocity.reset = reset;
42
-
43
- return velocity;
44
- }
1
+ /**
2
+ based on framer-motion@4.1.17,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ import { MotionValue } from "./index.js";
6
+ import { useMotionValue } from "./use-motion-value.js";
7
+ /**
8
+ * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
9
+ *
10
+ * ```javascript
11
+ * const x = useMotionValue(0)
12
+ * const xVelocity = useVelocity(x)
13
+ * const xAcceleration = useVelocity(xVelocity)
14
+ * ```
15
+ *
16
+ * @public
17
+ */
18
+ export const useVelocity = (value) => {
19
+ let val = value;
20
+ let cleanup;
21
+ const reset = (value) => {
22
+ cleanup?.();
23
+ val = value;
24
+ cleanup = val.velocityUpdateSubscribers.add((newVelocity) => {
25
+ velocity.set(newVelocity);
26
+ });
27
+ };
28
+ const velocity = useMotionValue(value.getVelocity(), () => {
29
+ cleanup?.();
30
+ cleanup = val.velocityUpdateSubscribers.add((newVelocity) => {
31
+ velocity.set(newVelocity);
32
+ });
33
+ return () => {
34
+ cleanup?.();
35
+ };
36
+ });
37
+ velocity.reset = reset;
38
+ return velocity;
39
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ based on framer-motion@4.1.17,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ import type { MotionValue } from "..";
6
+ /**
7
+ based on framer-motion@4.0.3,
8
+ Copyright (c) 2018 Framer B.V.
9
+ */
10
+ declare var isMotionValue: (value: any) => value is MotionValue;
11
+ export { isMotionValue };
12
+ //# sourceMappingURL=is-motion-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-motion-value.d.ts","sourceRoot":"","sources":["../../../../../src/lib/motion-start/value/utils/is-motion-value.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAEtC;;;EAGE;AACF,QAAA,IAAI,aAAa,UAAoB,GAAG,KAAG,KAAK,IAAI,WAEnD,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ based on framer-motion@4.0.3,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ var isMotionValue = function (value) {
6
+ return value !== null && typeof value === "object" && value.getVelocity;
7
+ };
8
+ export { isMotionValue };
@@ -0,0 +1,16 @@
1
+ /**
2
+ based on framer-motion@4.1.17,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ import { MotionValue } from "..";
6
+ import type { CustomValueType } from "../../types";
7
+ /**
8
+ * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
9
+ *
10
+ * TODO: Remove and move to library
11
+ *
12
+ * @internal
13
+ */
14
+ declare function resolveMotionValue(value?: string | number | CustomValueType | MotionValue): string | number;
15
+ export { resolveMotionValue };
16
+ //# sourceMappingURL=resolve-motion-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-motion-value.d.ts","sourceRoot":"","sources":["../../../../../src/lib/motion-start/value/utils/resolve-motion-value.ts"],"names":[],"mappings":"AAAA;;;EAGE;AACF,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AASnD;;;;;;GAMG;AACH,iBAAS,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,eAAe,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAKpG;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,29 +1,25 @@
1
- /**
2
- based on framer-motion@4.1.17,
3
- Copyright (c) 2018 Framer B.V.
4
- */
5
- import { MotionValue } from "..";
6
- import type { CustomValueType } from "../../types";
7
-
8
- /**
9
- based on framer-motion@4.0.3,
10
- Copyright (c) 2018 Framer B.V.
11
- */
12
- import { isCustomValue } from '../../utils/resolve-value.js';
13
- import { isMotionValue } from './is-motion-value.js';
14
-
15
- /**
16
- * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
17
- *
18
- * TODO: Remove and move to library
19
- *
20
- * @internal
21
- */
22
- function resolveMotionValue(value?: string | number | CustomValueType | MotionValue): string | number {
23
- var unwrappedValue = isMotionValue(value) ? value.get() : value;
24
- return isCustomValue(unwrappedValue)
25
- ? unwrappedValue.toValue()
26
- : unwrappedValue;
27
- }
28
-
29
- export { resolveMotionValue };
1
+ /**
2
+ based on framer-motion@4.1.17,
3
+ Copyright (c) 2018 Framer B.V.
4
+ */
5
+ import { MotionValue } from "..";
6
+ /**
7
+ based on framer-motion@4.0.3,
8
+ Copyright (c) 2018 Framer B.V.
9
+ */
10
+ import { isCustomValue } from '../../utils/resolve-value.js';
11
+ import { isMotionValue } from './is-motion-value.js';
12
+ /**
13
+ * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
14
+ *
15
+ * TODO: Remove and move to library
16
+ *
17
+ * @internal
18
+ */
19
+ function resolveMotionValue(value) {
20
+ var unwrappedValue = isMotionValue(value) ? value.get() : value;
21
+ return isCustomValue(unwrappedValue)
22
+ ? unwrappedValue.toValue()
23
+ : unwrappedValue;
24
+ }
25
+ export { resolveMotionValue };
package/package.json CHANGED
@@ -1,40 +1,54 @@
1
1
  {
2
2
  "name": "motion-start",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Svelte animation library based on the React library framer-motion.",
5
- "main": "src/index.ts",
5
+ "main": "dist/index.js",
6
6
  "files": [
7
- "./src"
7
+ "./dist"
8
8
  ],
9
9
  "author": "JonathonRP",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@changesets/cli": "^2.27.8",
13
- "@types/react": "^18.3.5",
14
12
  "framesync": "^6.1.2",
15
13
  "popmotion": "^11.0.5",
16
14
  "style-value-types": "5.1.2",
17
- "tslib": "^2.7.0"
15
+ "tslib": "^2.7.0",
16
+ "bits-ui": "^0.21.15",
17
+ "class-variance-authority": "^0.7.0",
18
+ "clsx": "^2.1.1",
19
+ "lucide-svelte": "^0.445.0",
20
+ "mode-watcher": "^0.4.1",
21
+ "tailwind-merge": "^2.5.2",
22
+ "tailwind-variants": "^0.2.1"
18
23
  },
19
24
  "devDependencies": {
20
- "@emotion/is-prop-valid": "^1.3.0",
25
+ "@changesets/cli": "^2.27.8",
26
+ "@biomejs/biome": "1.9.2",
27
+ "@emotion/is-prop-valid": "^1.3.1",
21
28
  "@sveltejs/package": "^2.3.5",
22
29
  "@sveltejs/vite-plugin-svelte": "4.0.0-next.7",
23
30
  "@tsconfig/svelte": "^5.0.4",
24
- "@types/node": "^20.16.5",
31
+ "@types/node": "^20.16.9",
25
32
  "@vitest/ui": "latest",
26
33
  "csstype": "^3.1.3",
27
- "publint": "^0.2.10",
28
- "svelte": "5.0.0-next.252",
34
+ "publint": "^0.2.11",
35
+ "svelte": "^5.0.0-next.259",
29
36
  "typescript": "^5.6.2",
30
- "vite": "^5.4.5",
31
- "vitest": "latest"
37
+ "vite": "^5.4.8",
38
+ "vitest": "latest",
39
+ "@sveltejs/adapter-auto": "^3.2.5",
40
+ "@sveltejs/kit": "^2.5.28",
41
+ "@tailwindcss/typography": "^0.5.15",
42
+ "@tailwindcss/vite": "^4.0.0-alpha.25",
43
+ "@types/react": "^18.3.9",
44
+ "tailwindcss": "^4.0.0-alpha.25"
32
45
  },
33
46
  "peerDependencies": {
34
- "svelte": ">=3.35.0 || ^4.0.0 || ^5.0.0 || ^5.0.0-next.0"
47
+ "svelte": "^5.0.0 || ^5.0.0-next.0"
35
48
  },
36
49
  "type": "module",
37
50
  "engines": {
51
+ "bun": ">=1.0.0",
38
52
  "pnpm": ">=8.7.0",
39
53
  "node": ">=20"
40
54
  },
@@ -53,12 +67,19 @@
53
67
  "popmotion",
54
68
  "framer-motion"
55
69
  ],
70
+ "trustedDependencies": [
71
+ "@biomejs/biome"
72
+ ],
56
73
  "scripts": {
57
- "test": "vitest --ui",
58
- "test:types": "vitest --typecheck.only --ui",
59
- "build": "svelte-package --input ./src && publint --strict",
60
- "check": "pnpm build && svelte-check --tsconfig ./tsconfig.json",
61
- "ci:version": "changeset version && pnpm -r generate:version && git add --all",
74
+ "dev": "vite dev",
75
+ "build": "vite build && bun --bun package",
76
+ "package": "svelte-kit sync && svelte-package --input ./src/lib/motion-start && publint --strict",
77
+ "preview": "vite preview",
78
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
79
+ "test": "vitest",
80
+ "test:types": "vitest --typecheck.only",
81
+ "test:ui": "vitest --ui",
82
+ "test:types:ui": "vitest --ui",
62
83
  "ci:publish": "pnpm build && changeset publish"
63
84
  }
64
85
  }
@@ -1 +0,0 @@
1
- export {default as UseAnimatedState} from './UseAnimatedState.svelte';