framer-motion 12.23.26 → 12.23.27

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 (483) hide show
  1. package/dist/cjs/client.js +1 -0
  2. package/dist/cjs/client.js.map +1 -0
  3. package/dist/cjs/debug.js +1 -0
  4. package/dist/cjs/debug.js.map +1 -0
  5. package/dist/cjs/dom-mini.js +1 -0
  6. package/dist/cjs/dom-mini.js.map +1 -0
  7. package/dist/cjs/dom.js +1 -0
  8. package/dist/cjs/dom.js.map +1 -0
  9. package/dist/cjs/feature-bundle-kvRbMDEA.js +1 -0
  10. package/dist/cjs/feature-bundle-kvRbMDEA.js.map +1 -0
  11. package/dist/cjs/index.js +1 -0
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/m.js +1 -0
  14. package/dist/cjs/m.js.map +1 -0
  15. package/dist/cjs/mini.js +1 -0
  16. package/dist/cjs/mini.js.map +1 -0
  17. package/dist/es/animation/animate/index.mjs +1 -0
  18. package/dist/es/animation/animate/index.mjs.map +1 -0
  19. package/dist/es/animation/animate/resolve-subjects.mjs +1 -0
  20. package/dist/es/animation/animate/resolve-subjects.mjs.map +1 -0
  21. package/dist/es/animation/animate/sequence.mjs +1 -0
  22. package/dist/es/animation/animate/sequence.mjs.map +1 -0
  23. package/dist/es/animation/animate/single-value.mjs +1 -0
  24. package/dist/es/animation/animate/single-value.mjs.map +1 -0
  25. package/dist/es/animation/animate/subject.mjs +1 -0
  26. package/dist/es/animation/animate/subject.mjs.map +1 -0
  27. package/dist/es/animation/animators/waapi/animate-elements.mjs +1 -0
  28. package/dist/es/animation/animators/waapi/animate-elements.mjs.map +1 -0
  29. package/dist/es/animation/animators/waapi/animate-sequence.mjs +1 -0
  30. package/dist/es/animation/animators/waapi/animate-sequence.mjs.map +1 -0
  31. package/dist/es/animation/animators/waapi/animate-style.mjs +1 -0
  32. package/dist/es/animation/animators/waapi/animate-style.mjs.map +1 -0
  33. package/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +1 -0
  34. package/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.map +1 -0
  35. package/dist/es/animation/hooks/animation-controls.mjs +1 -0
  36. package/dist/es/animation/hooks/animation-controls.mjs.map +1 -0
  37. package/dist/es/animation/hooks/use-animate-style.mjs +1 -0
  38. package/dist/es/animation/hooks/use-animate-style.mjs.map +1 -0
  39. package/dist/es/animation/hooks/use-animate.mjs +1 -0
  40. package/dist/es/animation/hooks/use-animate.mjs.map +1 -0
  41. package/dist/es/animation/hooks/use-animated-state.mjs +1 -0
  42. package/dist/es/animation/hooks/use-animated-state.mjs.map +1 -0
  43. package/dist/es/animation/hooks/use-animation.mjs +1 -0
  44. package/dist/es/animation/hooks/use-animation.mjs.map +1 -0
  45. package/dist/es/animation/interfaces/motion-value.mjs +1 -0
  46. package/dist/es/animation/interfaces/motion-value.mjs.map +1 -0
  47. package/dist/es/animation/interfaces/visual-element-target.mjs +1 -0
  48. package/dist/es/animation/interfaces/visual-element-target.mjs.map +1 -0
  49. package/dist/es/animation/interfaces/visual-element-variant.mjs +1 -0
  50. package/dist/es/animation/interfaces/visual-element-variant.mjs.map +1 -0
  51. package/dist/es/animation/interfaces/visual-element.mjs +1 -0
  52. package/dist/es/animation/interfaces/visual-element.mjs.map +1 -0
  53. package/dist/es/animation/optimized-appear/data-id.mjs +1 -0
  54. package/dist/es/animation/optimized-appear/data-id.mjs.map +1 -0
  55. package/dist/es/animation/optimized-appear/get-appear-id.mjs +1 -0
  56. package/dist/es/animation/optimized-appear/get-appear-id.mjs.map +1 -0
  57. package/dist/es/animation/optimized-appear/handoff.mjs +1 -0
  58. package/dist/es/animation/optimized-appear/handoff.mjs.map +1 -0
  59. package/dist/es/animation/optimized-appear/start.mjs +1 -0
  60. package/dist/es/animation/optimized-appear/start.mjs.map +1 -0
  61. package/dist/es/animation/optimized-appear/store-id.mjs +1 -0
  62. package/dist/es/animation/optimized-appear/store-id.mjs.map +1 -0
  63. package/dist/es/animation/optimized-appear/store.mjs +1 -0
  64. package/dist/es/animation/optimized-appear/store.mjs.map +1 -0
  65. package/dist/es/animation/sequence/create.mjs +1 -0
  66. package/dist/es/animation/sequence/create.mjs.map +1 -0
  67. package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +1 -0
  68. package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map +1 -0
  69. package/dist/es/animation/sequence/utils/calc-time.mjs +1 -0
  70. package/dist/es/animation/sequence/utils/calc-time.mjs.map +1 -0
  71. package/dist/es/animation/sequence/utils/edit.mjs +1 -0
  72. package/dist/es/animation/sequence/utils/edit.mjs.map +1 -0
  73. package/dist/es/animation/sequence/utils/normalize-times.mjs +1 -0
  74. package/dist/es/animation/sequence/utils/normalize-times.mjs.map +1 -0
  75. package/dist/es/animation/sequence/utils/sort.mjs +1 -0
  76. package/dist/es/animation/sequence/utils/sort.mjs.map +1 -0
  77. package/dist/es/animation/utils/calc-child-stagger.mjs +1 -0
  78. package/dist/es/animation/utils/calc-child-stagger.mjs.map +1 -0
  79. package/dist/es/animation/utils/create-visual-element.mjs +1 -0
  80. package/dist/es/animation/utils/create-visual-element.mjs.map +1 -0
  81. package/dist/es/animation/utils/default-transitions.mjs +1 -0
  82. package/dist/es/animation/utils/default-transitions.mjs.map +1 -0
  83. package/dist/es/animation/utils/is-animation-controls.mjs +1 -0
  84. package/dist/es/animation/utils/is-animation-controls.mjs.map +1 -0
  85. package/dist/es/animation/utils/is-dom-keyframes.mjs +1 -0
  86. package/dist/es/animation/utils/is-dom-keyframes.mjs.map +1 -0
  87. package/dist/es/animation/utils/is-keyframes-target.mjs +1 -0
  88. package/dist/es/animation/utils/is-keyframes-target.mjs.map +1 -0
  89. package/dist/es/animation/utils/is-transition-defined.mjs +1 -0
  90. package/dist/es/animation/utils/is-transition-defined.mjs.map +1 -0
  91. package/dist/es/client.mjs +1 -0
  92. package/dist/es/client.mjs.map +1 -0
  93. package/dist/es/components/AnimatePresence/PopChild.mjs +1 -0
  94. package/dist/es/components/AnimatePresence/PopChild.mjs.map +1 -0
  95. package/dist/es/components/AnimatePresence/PresenceChild.mjs +1 -0
  96. package/dist/es/components/AnimatePresence/PresenceChild.mjs.map +1 -0
  97. package/dist/es/components/AnimatePresence/index.mjs +1 -0
  98. package/dist/es/components/AnimatePresence/index.mjs.map +1 -0
  99. package/dist/es/components/AnimatePresence/use-presence-data.mjs +1 -0
  100. package/dist/es/components/AnimatePresence/use-presence-data.mjs.map +1 -0
  101. package/dist/es/components/AnimatePresence/use-presence.mjs +1 -0
  102. package/dist/es/components/AnimatePresence/use-presence.mjs.map +1 -0
  103. package/dist/es/components/AnimatePresence/utils.mjs +1 -0
  104. package/dist/es/components/AnimatePresence/utils.mjs.map +1 -0
  105. package/dist/es/components/AnimateSharedLayout.mjs +1 -0
  106. package/dist/es/components/AnimateSharedLayout.mjs.map +1 -0
  107. package/dist/es/components/LayoutGroup/index.mjs +1 -0
  108. package/dist/es/components/LayoutGroup/index.mjs.map +1 -0
  109. package/dist/es/components/LazyMotion/index.mjs +1 -0
  110. package/dist/es/components/LazyMotion/index.mjs.map +1 -0
  111. package/dist/es/components/MotionConfig/index.mjs +1 -0
  112. package/dist/es/components/MotionConfig/index.mjs.map +1 -0
  113. package/dist/es/components/Reorder/Group.mjs +1 -0
  114. package/dist/es/components/Reorder/Group.mjs.map +1 -0
  115. package/dist/es/components/Reorder/Item.mjs +1 -0
  116. package/dist/es/components/Reorder/Item.mjs.map +1 -0
  117. package/dist/es/components/Reorder/namespace.mjs +1 -0
  118. package/dist/es/components/Reorder/namespace.mjs.map +1 -0
  119. package/dist/es/components/Reorder/utils/check-reorder.mjs +1 -0
  120. package/dist/es/components/Reorder/utils/check-reorder.mjs.map +1 -0
  121. package/dist/es/context/DeprecatedLayoutGroupContext.mjs +1 -0
  122. package/dist/es/context/DeprecatedLayoutGroupContext.mjs.map +1 -0
  123. package/dist/es/context/LayoutGroupContext.mjs +1 -0
  124. package/dist/es/context/LayoutGroupContext.mjs.map +1 -0
  125. package/dist/es/context/LazyContext.mjs +1 -0
  126. package/dist/es/context/LazyContext.mjs.map +1 -0
  127. package/dist/es/context/MotionConfigContext.mjs +1 -0
  128. package/dist/es/context/MotionConfigContext.mjs.map +1 -0
  129. package/dist/es/context/MotionContext/create.mjs +1 -0
  130. package/dist/es/context/MotionContext/create.mjs.map +1 -0
  131. package/dist/es/context/MotionContext/index.mjs +1 -0
  132. package/dist/es/context/MotionContext/index.mjs.map +1 -0
  133. package/dist/es/context/MotionContext/utils.mjs +1 -0
  134. package/dist/es/context/MotionContext/utils.mjs.map +1 -0
  135. package/dist/es/context/PresenceContext.mjs +1 -0
  136. package/dist/es/context/PresenceContext.mjs.map +1 -0
  137. package/dist/es/context/ReorderContext.mjs +1 -0
  138. package/dist/es/context/ReorderContext.mjs.map +1 -0
  139. package/dist/es/context/SwitchLayoutGroupContext.mjs +1 -0
  140. package/dist/es/context/SwitchLayoutGroupContext.mjs.map +1 -0
  141. package/dist/es/debug.mjs +1 -0
  142. package/dist/es/debug.mjs.map +1 -0
  143. package/dist/es/dom-mini.mjs +1 -0
  144. package/dist/es/dom-mini.mjs.map +1 -0
  145. package/dist/es/dom.mjs +1 -0
  146. package/dist/es/dom.mjs.map +1 -0
  147. package/dist/es/events/add-dom-event.mjs +1 -0
  148. package/dist/es/events/add-dom-event.mjs.map +1 -0
  149. package/dist/es/events/add-pointer-event.mjs +1 -0
  150. package/dist/es/events/add-pointer-event.mjs.map +1 -0
  151. package/dist/es/events/event-info.mjs +1 -0
  152. package/dist/es/events/event-info.mjs.map +1 -0
  153. package/dist/es/events/use-dom-event.mjs +1 -0
  154. package/dist/es/events/use-dom-event.mjs.map +1 -0
  155. package/dist/es/gestures/drag/VisualElementDragControls.mjs +1 -0
  156. package/dist/es/gestures/drag/VisualElementDragControls.mjs.map +1 -0
  157. package/dist/es/gestures/drag/index.mjs +1 -0
  158. package/dist/es/gestures/drag/index.mjs.map +1 -0
  159. package/dist/es/gestures/drag/use-drag-controls.mjs +1 -0
  160. package/dist/es/gestures/drag/use-drag-controls.mjs.map +1 -0
  161. package/dist/es/gestures/drag/utils/constraints.mjs +1 -0
  162. package/dist/es/gestures/drag/utils/constraints.mjs.map +1 -0
  163. package/dist/es/gestures/focus.mjs +1 -0
  164. package/dist/es/gestures/focus.mjs.map +1 -0
  165. package/dist/es/gestures/hover.mjs +1 -0
  166. package/dist/es/gestures/hover.mjs.map +1 -0
  167. package/dist/es/gestures/pan/PanSession.mjs +1 -0
  168. package/dist/es/gestures/pan/PanSession.mjs.map +1 -0
  169. package/dist/es/gestures/pan/index.mjs +1 -0
  170. package/dist/es/gestures/pan/index.mjs.map +1 -0
  171. package/dist/es/gestures/press.mjs +1 -0
  172. package/dist/es/gestures/press.mjs.map +1 -0
  173. package/dist/es/index.mjs +1 -0
  174. package/dist/es/index.mjs.map +1 -0
  175. package/dist/es/m.mjs +1 -0
  176. package/dist/es/m.mjs.map +1 -0
  177. package/dist/es/mini.mjs +1 -0
  178. package/dist/es/mini.mjs.map +1 -0
  179. package/dist/es/motion/features/Feature.mjs +1 -0
  180. package/dist/es/motion/features/Feature.mjs.map +1 -0
  181. package/dist/es/motion/features/animation/exit.mjs +1 -0
  182. package/dist/es/motion/features/animation/exit.mjs.map +1 -0
  183. package/dist/es/motion/features/animation/index.mjs +1 -0
  184. package/dist/es/motion/features/animation/index.mjs.map +1 -0
  185. package/dist/es/motion/features/animations.mjs +1 -0
  186. package/dist/es/motion/features/animations.mjs.map +1 -0
  187. package/dist/es/motion/features/definitions.mjs +1 -0
  188. package/dist/es/motion/features/definitions.mjs.map +1 -0
  189. package/dist/es/motion/features/drag.mjs +1 -0
  190. package/dist/es/motion/features/drag.mjs.map +1 -0
  191. package/dist/es/motion/features/gestures.mjs +1 -0
  192. package/dist/es/motion/features/gestures.mjs.map +1 -0
  193. package/dist/es/motion/features/layout/MeasureLayout.mjs +1 -0
  194. package/dist/es/motion/features/layout/MeasureLayout.mjs.map +1 -0
  195. package/dist/es/motion/features/layout.mjs +1 -0
  196. package/dist/es/motion/features/layout.mjs.map +1 -0
  197. package/dist/es/motion/features/load-features.mjs +1 -0
  198. package/dist/es/motion/features/load-features.mjs.map +1 -0
  199. package/dist/es/motion/features/viewport/index.mjs +1 -0
  200. package/dist/es/motion/features/viewport/index.mjs.map +1 -0
  201. package/dist/es/motion/features/viewport/observers.mjs +1 -0
  202. package/dist/es/motion/features/viewport/observers.mjs.map +1 -0
  203. package/dist/es/motion/index.mjs +1 -0
  204. package/dist/es/motion/index.mjs.map +1 -0
  205. package/dist/es/motion/utils/is-forced-motion-value.mjs +1 -0
  206. package/dist/es/motion/utils/is-forced-motion-value.mjs.map +1 -0
  207. package/dist/es/motion/utils/is-motion-component.mjs +1 -0
  208. package/dist/es/motion/utils/is-motion-component.mjs.map +1 -0
  209. package/dist/es/motion/utils/symbol.mjs +1 -0
  210. package/dist/es/motion/utils/symbol.mjs.map +1 -0
  211. package/dist/es/motion/utils/unwrap-motion-component.mjs +1 -0
  212. package/dist/es/motion/utils/unwrap-motion-component.mjs.map +1 -0
  213. package/dist/es/motion/utils/use-motion-ref.mjs +1 -0
  214. package/dist/es/motion/utils/use-motion-ref.mjs.map +1 -0
  215. package/dist/es/motion/utils/use-visual-element.mjs +1 -0
  216. package/dist/es/motion/utils/use-visual-element.mjs.map +1 -0
  217. package/dist/es/motion/utils/use-visual-state.mjs +1 -0
  218. package/dist/es/motion/utils/use-visual-state.mjs.map +1 -0
  219. package/dist/es/motion/utils/valid-prop.mjs +1 -0
  220. package/dist/es/motion/utils/valid-prop.mjs.map +1 -0
  221. package/dist/es/projection/animation/mix-values.mjs +1 -0
  222. package/dist/es/projection/animation/mix-values.mjs.map +1 -0
  223. package/dist/es/projection/geometry/conversion.mjs +1 -0
  224. package/dist/es/projection/geometry/conversion.mjs.map +1 -0
  225. package/dist/es/projection/geometry/copy.mjs +1 -0
  226. package/dist/es/projection/geometry/copy.mjs.map +1 -0
  227. package/dist/es/projection/geometry/delta-apply.mjs +1 -0
  228. package/dist/es/projection/geometry/delta-apply.mjs.map +1 -0
  229. package/dist/es/projection/geometry/delta-calc.mjs +1 -0
  230. package/dist/es/projection/geometry/delta-calc.mjs.map +1 -0
  231. package/dist/es/projection/geometry/delta-remove.mjs +1 -0
  232. package/dist/es/projection/geometry/delta-remove.mjs.map +1 -0
  233. package/dist/es/projection/geometry/models.mjs +1 -0
  234. package/dist/es/projection/geometry/models.mjs.map +1 -0
  235. package/dist/es/projection/geometry/utils.mjs +1 -0
  236. package/dist/es/projection/geometry/utils.mjs.map +1 -0
  237. package/dist/es/projection/node/DocumentProjectionNode.mjs +1 -0
  238. package/dist/es/projection/node/DocumentProjectionNode.mjs.map +1 -0
  239. package/dist/es/projection/node/HTMLProjectionNode.mjs +1 -0
  240. package/dist/es/projection/node/HTMLProjectionNode.mjs.map +1 -0
  241. package/dist/es/projection/node/create-projection-node.mjs +1 -0
  242. package/dist/es/projection/node/create-projection-node.mjs.map +1 -0
  243. package/dist/es/projection/node/group.mjs +1 -0
  244. package/dist/es/projection/node/group.mjs.map +1 -0
  245. package/dist/es/projection/node/state.mjs +1 -0
  246. package/dist/es/projection/node/state.mjs.map +1 -0
  247. package/dist/es/projection/shared/stack.mjs +1 -0
  248. package/dist/es/projection/shared/stack.mjs.map +1 -0
  249. package/dist/es/projection/styles/scale-border-radius.mjs +1 -0
  250. package/dist/es/projection/styles/scale-border-radius.mjs.map +1 -0
  251. package/dist/es/projection/styles/scale-box-shadow.mjs +1 -0
  252. package/dist/es/projection/styles/scale-box-shadow.mjs.map +1 -0
  253. package/dist/es/projection/styles/scale-correction.mjs +1 -0
  254. package/dist/es/projection/styles/scale-correction.mjs.map +1 -0
  255. package/dist/es/projection/styles/transform.mjs +1 -0
  256. package/dist/es/projection/styles/transform.mjs.map +1 -0
  257. package/dist/es/projection/use-instant-layout-transition.mjs +1 -0
  258. package/dist/es/projection/use-instant-layout-transition.mjs.map +1 -0
  259. package/dist/es/projection/use-reset-projection.mjs +1 -0
  260. package/dist/es/projection/use-reset-projection.mjs.map +1 -0
  261. package/dist/es/projection/utils/each-axis.mjs +1 -0
  262. package/dist/es/projection/utils/each-axis.mjs.map +1 -0
  263. package/dist/es/projection/utils/has-transform.mjs +1 -0
  264. package/dist/es/projection/utils/has-transform.mjs.map +1 -0
  265. package/dist/es/projection/utils/measure.mjs +1 -0
  266. package/dist/es/projection/utils/measure.mjs.map +1 -0
  267. package/dist/es/projection.mjs +1 -0
  268. package/dist/es/projection.mjs.map +1 -0
  269. package/dist/es/render/VisualElement.mjs +1 -0
  270. package/dist/es/render/VisualElement.mjs.map +1 -0
  271. package/dist/es/render/components/create-proxy.mjs +1 -0
  272. package/dist/es/render/components/create-proxy.mjs.map +1 -0
  273. package/dist/es/render/components/m/create.mjs +1 -0
  274. package/dist/es/render/components/m/create.mjs.map +1 -0
  275. package/dist/es/render/components/m/elements.mjs +1 -0
  276. package/dist/es/render/components/m/elements.mjs.map +1 -0
  277. package/dist/es/render/components/m/proxy.mjs +1 -0
  278. package/dist/es/render/components/m/proxy.mjs.map +1 -0
  279. package/dist/es/render/components/motion/create.mjs +1 -0
  280. package/dist/es/render/components/motion/create.mjs.map +1 -0
  281. package/dist/es/render/components/motion/elements.mjs +1 -0
  282. package/dist/es/render/components/motion/elements.mjs.map +1 -0
  283. package/dist/es/render/components/motion/feature-bundle.mjs +1 -0
  284. package/dist/es/render/components/motion/feature-bundle.mjs.map +1 -0
  285. package/dist/es/render/components/motion/proxy.mjs +1 -0
  286. package/dist/es/render/components/motion/proxy.mjs.map +1 -0
  287. package/dist/es/render/dom/DOMVisualElement.mjs +1 -0
  288. package/dist/es/render/dom/DOMVisualElement.mjs.map +1 -0
  289. package/dist/es/render/dom/create-visual-element.mjs +1 -0
  290. package/dist/es/render/dom/create-visual-element.mjs.map +1 -0
  291. package/dist/es/render/dom/features-animation.mjs +1 -0
  292. package/dist/es/render/dom/features-animation.mjs.map +1 -0
  293. package/dist/es/render/dom/features-max.mjs +1 -0
  294. package/dist/es/render/dom/features-max.mjs.map +1 -0
  295. package/dist/es/render/dom/features-min.mjs +1 -0
  296. package/dist/es/render/dom/features-min.mjs.map +1 -0
  297. package/dist/es/render/dom/scroll/attach-animation.mjs +1 -0
  298. package/dist/es/render/dom/scroll/attach-animation.mjs.map +1 -0
  299. package/dist/es/render/dom/scroll/attach-function.mjs +1 -0
  300. package/dist/es/render/dom/scroll/attach-function.mjs.map +1 -0
  301. package/dist/es/render/dom/scroll/index.mjs +1 -0
  302. package/dist/es/render/dom/scroll/index.mjs.map +1 -0
  303. package/dist/es/render/dom/scroll/info.mjs +1 -0
  304. package/dist/es/render/dom/scroll/info.mjs.map +1 -0
  305. package/dist/es/render/dom/scroll/offsets/edge.mjs +1 -0
  306. package/dist/es/render/dom/scroll/offsets/edge.mjs.map +1 -0
  307. package/dist/es/render/dom/scroll/offsets/index.mjs +1 -0
  308. package/dist/es/render/dom/scroll/offsets/index.mjs.map +1 -0
  309. package/dist/es/render/dom/scroll/offsets/inset.mjs +1 -0
  310. package/dist/es/render/dom/scroll/offsets/inset.mjs.map +1 -0
  311. package/dist/es/render/dom/scroll/offsets/offset.mjs +1 -0
  312. package/dist/es/render/dom/scroll/offsets/offset.mjs.map +1 -0
  313. package/dist/es/render/dom/scroll/offsets/presets.mjs +1 -0
  314. package/dist/es/render/dom/scroll/offsets/presets.mjs.map +1 -0
  315. package/dist/es/render/dom/scroll/on-scroll-handler.mjs +1 -0
  316. package/dist/es/render/dom/scroll/on-scroll-handler.mjs.map +1 -0
  317. package/dist/es/render/dom/scroll/track.mjs +1 -0
  318. package/dist/es/render/dom/scroll/track.mjs.map +1 -0
  319. package/dist/es/render/dom/scroll/utils/get-timeline.mjs +1 -0
  320. package/dist/es/render/dom/scroll/utils/get-timeline.mjs.map +1 -0
  321. package/dist/es/render/dom/use-render.mjs +1 -0
  322. package/dist/es/render/dom/use-render.mjs.map +1 -0
  323. package/dist/es/render/dom/utils/camel-to-dash.mjs +1 -0
  324. package/dist/es/render/dom/utils/camel-to-dash.mjs.map +1 -0
  325. package/dist/es/render/dom/utils/filter-props.mjs +1 -0
  326. package/dist/es/render/dom/utils/filter-props.mjs.map +1 -0
  327. package/dist/es/render/dom/utils/is-svg-component.mjs +1 -0
  328. package/dist/es/render/dom/utils/is-svg-component.mjs.map +1 -0
  329. package/dist/es/render/dom/viewport/index.mjs +1 -0
  330. package/dist/es/render/dom/viewport/index.mjs.map +1 -0
  331. package/dist/es/render/html/HTMLVisualElement.mjs +1 -0
  332. package/dist/es/render/html/HTMLVisualElement.mjs.map +1 -0
  333. package/dist/es/render/html/use-html-visual-state.mjs +1 -0
  334. package/dist/es/render/html/use-html-visual-state.mjs.map +1 -0
  335. package/dist/es/render/html/use-props.mjs +1 -0
  336. package/dist/es/render/html/use-props.mjs.map +1 -0
  337. package/dist/es/render/html/utils/build-styles.mjs +1 -0
  338. package/dist/es/render/html/utils/build-styles.mjs.map +1 -0
  339. package/dist/es/render/html/utils/build-transform.mjs +1 -0
  340. package/dist/es/render/html/utils/build-transform.mjs.map +1 -0
  341. package/dist/es/render/html/utils/create-render-state.mjs +1 -0
  342. package/dist/es/render/html/utils/create-render-state.mjs.map +1 -0
  343. package/dist/es/render/html/utils/render.mjs +1 -0
  344. package/dist/es/render/html/utils/render.mjs.map +1 -0
  345. package/dist/es/render/html/utils/scrape-motion-values.mjs +1 -0
  346. package/dist/es/render/html/utils/scrape-motion-values.mjs.map +1 -0
  347. package/dist/es/render/object/ObjectVisualElement.mjs +1 -0
  348. package/dist/es/render/object/ObjectVisualElement.mjs.map +1 -0
  349. package/dist/es/render/store.mjs +1 -0
  350. package/dist/es/render/store.mjs.map +1 -0
  351. package/dist/es/render/svg/SVGVisualElement.mjs +1 -0
  352. package/dist/es/render/svg/SVGVisualElement.mjs.map +1 -0
  353. package/dist/es/render/svg/lowercase-elements.mjs +1 -0
  354. package/dist/es/render/svg/lowercase-elements.mjs.map +1 -0
  355. package/dist/es/render/svg/use-props.mjs +1 -0
  356. package/dist/es/render/svg/use-props.mjs.map +1 -0
  357. package/dist/es/render/svg/use-svg-visual-state.mjs +1 -0
  358. package/dist/es/render/svg/use-svg-visual-state.mjs.map +1 -0
  359. package/dist/es/render/svg/utils/build-attrs.mjs +1 -0
  360. package/dist/es/render/svg/utils/build-attrs.mjs.map +1 -0
  361. package/dist/es/render/svg/utils/camel-case-attrs.mjs +1 -0
  362. package/dist/es/render/svg/utils/camel-case-attrs.mjs.map +1 -0
  363. package/dist/es/render/svg/utils/create-render-state.mjs +1 -0
  364. package/dist/es/render/svg/utils/create-render-state.mjs.map +1 -0
  365. package/dist/es/render/svg/utils/is-svg-tag.mjs +1 -0
  366. package/dist/es/render/svg/utils/is-svg-tag.mjs.map +1 -0
  367. package/dist/es/render/svg/utils/path.mjs +1 -0
  368. package/dist/es/render/svg/utils/path.mjs.map +1 -0
  369. package/dist/es/render/svg/utils/render.mjs +1 -0
  370. package/dist/es/render/svg/utils/render.mjs.map +1 -0
  371. package/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -0
  372. package/dist/es/render/svg/utils/scrape-motion-values.mjs.map +1 -0
  373. package/dist/es/render/utils/animation-state.mjs +1 -0
  374. package/dist/es/render/utils/animation-state.mjs.map +1 -0
  375. package/dist/es/render/utils/compare-by-depth.mjs +1 -0
  376. package/dist/es/render/utils/compare-by-depth.mjs.map +1 -0
  377. package/dist/es/render/utils/flat-tree.mjs +1 -0
  378. package/dist/es/render/utils/flat-tree.mjs.map +1 -0
  379. package/dist/es/render/utils/get-variant-context.mjs +1 -0
  380. package/dist/es/render/utils/get-variant-context.mjs.map +1 -0
  381. package/dist/es/render/utils/is-controlling-variants.mjs +1 -0
  382. package/dist/es/render/utils/is-controlling-variants.mjs.map +1 -0
  383. package/dist/es/render/utils/is-variant-label.mjs +1 -0
  384. package/dist/es/render/utils/is-variant-label.mjs.map +1 -0
  385. package/dist/es/render/utils/motion-values.mjs +1 -0
  386. package/dist/es/render/utils/motion-values.mjs.map +1 -0
  387. package/dist/es/render/utils/resolve-dynamic-variants.mjs +1 -0
  388. package/dist/es/render/utils/resolve-dynamic-variants.mjs.map +1 -0
  389. package/dist/es/render/utils/resolve-variants.mjs +1 -0
  390. package/dist/es/render/utils/resolve-variants.mjs.map +1 -0
  391. package/dist/es/render/utils/setters.mjs +1 -0
  392. package/dist/es/render/utils/setters.mjs.map +1 -0
  393. package/dist/es/render/utils/variant-props.mjs +1 -0
  394. package/dist/es/render/utils/variant-props.mjs.map +1 -0
  395. package/dist/es/utils/delay.mjs +1 -0
  396. package/dist/es/utils/delay.mjs.map +1 -0
  397. package/dist/es/utils/distance.mjs +1 -0
  398. package/dist/es/utils/distance.mjs.map +1 -0
  399. package/dist/es/utils/get-context-window.mjs +1 -0
  400. package/dist/es/utils/get-context-window.mjs.map +1 -0
  401. package/dist/es/utils/is-browser.mjs +1 -0
  402. package/dist/es/utils/is-browser.mjs.map +1 -0
  403. package/dist/es/utils/is-ref-object.mjs +1 -0
  404. package/dist/es/utils/is-ref-object.mjs.map +1 -0
  405. package/dist/es/utils/reduced-motion/index.mjs +1 -0
  406. package/dist/es/utils/reduced-motion/index.mjs.map +1 -0
  407. package/dist/es/utils/reduced-motion/state.mjs +1 -0
  408. package/dist/es/utils/reduced-motion/state.mjs.map +1 -0
  409. package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +1 -0
  410. package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs.map +1 -0
  411. package/dist/es/utils/reduced-motion/use-reduced-motion.mjs +1 -0
  412. package/dist/es/utils/reduced-motion/use-reduced-motion.mjs.map +1 -0
  413. package/dist/es/utils/shallow-compare.mjs +1 -0
  414. package/dist/es/utils/shallow-compare.mjs.map +1 -0
  415. package/dist/es/utils/use-animation-frame.mjs +1 -0
  416. package/dist/es/utils/use-animation-frame.mjs.map +1 -0
  417. package/dist/es/utils/use-composed-ref.mjs +1 -0
  418. package/dist/es/utils/use-composed-ref.mjs.map +1 -0
  419. package/dist/es/utils/use-constant.mjs +1 -0
  420. package/dist/es/utils/use-constant.mjs.map +1 -0
  421. package/dist/es/utils/use-cycle.mjs +1 -0
  422. package/dist/es/utils/use-cycle.mjs.map +1 -0
  423. package/dist/es/utils/use-force-update.mjs +1 -0
  424. package/dist/es/utils/use-force-update.mjs.map +1 -0
  425. package/dist/es/utils/use-in-view.mjs +1 -0
  426. package/dist/es/utils/use-in-view.mjs.map +1 -0
  427. package/dist/es/utils/use-instant-transition.mjs +1 -0
  428. package/dist/es/utils/use-instant-transition.mjs.map +1 -0
  429. package/dist/es/utils/use-is-mounted.mjs +1 -0
  430. package/dist/es/utils/use-is-mounted.mjs.map +1 -0
  431. package/dist/es/utils/use-isomorphic-effect.mjs +1 -0
  432. package/dist/es/utils/use-isomorphic-effect.mjs.map +1 -0
  433. package/dist/es/utils/use-motion-value-event.mjs +1 -0
  434. package/dist/es/utils/use-motion-value-event.mjs.map +1 -0
  435. package/dist/es/utils/use-page-in-view.mjs +1 -0
  436. package/dist/es/utils/use-page-in-view.mjs.map +1 -0
  437. package/dist/es/utils/use-unmount-effect.mjs +1 -0
  438. package/dist/es/utils/use-unmount-effect.mjs.map +1 -0
  439. package/dist/es/value/scroll/use-element-scroll.mjs +1 -0
  440. package/dist/es/value/scroll/use-element-scroll.mjs.map +1 -0
  441. package/dist/es/value/scroll/use-viewport-scroll.mjs +1 -0
  442. package/dist/es/value/scroll/use-viewport-scroll.mjs.map +1 -0
  443. package/dist/es/value/use-combine-values.mjs +1 -0
  444. package/dist/es/value/use-combine-values.mjs.map +1 -0
  445. package/dist/es/value/use-computed.mjs +1 -0
  446. package/dist/es/value/use-computed.mjs.map +1 -0
  447. package/dist/es/value/use-inverted-scale.mjs +1 -0
  448. package/dist/es/value/use-inverted-scale.mjs.map +1 -0
  449. package/dist/es/value/use-motion-template.mjs +1 -0
  450. package/dist/es/value/use-motion-template.mjs.map +1 -0
  451. package/dist/es/value/use-motion-value.mjs +1 -0
  452. package/dist/es/value/use-motion-value.mjs.map +1 -0
  453. package/dist/es/value/use-scroll.mjs +1 -0
  454. package/dist/es/value/use-scroll.mjs.map +1 -0
  455. package/dist/es/value/use-spring.mjs +1 -0
  456. package/dist/es/value/use-spring.mjs.map +1 -0
  457. package/dist/es/value/use-time.mjs +1 -0
  458. package/dist/es/value/use-time.mjs.map +1 -0
  459. package/dist/es/value/use-transform.mjs +1 -0
  460. package/dist/es/value/use-transform.mjs.map +1 -0
  461. package/dist/es/value/use-velocity.mjs +1 -0
  462. package/dist/es/value/use-velocity.mjs.map +1 -0
  463. package/dist/es/value/use-will-change/WillChangeMotionValue.mjs +1 -0
  464. package/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map +1 -0
  465. package/dist/es/value/use-will-change/add-will-change.mjs +1 -0
  466. package/dist/es/value/use-will-change/add-will-change.mjs.map +1 -0
  467. package/dist/es/value/use-will-change/index.mjs +1 -0
  468. package/dist/es/value/use-will-change/index.mjs.map +1 -0
  469. package/dist/es/value/use-will-change/is.mjs +1 -0
  470. package/dist/es/value/use-will-change/is.mjs.map +1 -0
  471. package/dist/es/value/utils/resolve-motion-value.mjs +1 -0
  472. package/dist/es/value/utils/resolve-motion-value.mjs.map +1 -0
  473. package/dist/size-rollup-animate.js +1 -0
  474. package/dist/size-rollup-animate.js.map +1 -0
  475. package/dist/size-rollup-m.js +1 -0
  476. package/dist/size-rollup-m.js.map +1 -0
  477. package/dist/size-rollup-motion.js +1 -0
  478. package/dist/size-rollup-motion.js.map +1 -0
  479. package/dist/size-rollup-scroll.js +1 -0
  480. package/dist/size-rollup-scroll.js.map +1 -0
  481. package/dist/size-rollup-waapi-animate.js +1 -0
  482. package/dist/size-rollup-waapi-animate.js.map +1 -0
  483. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-context-window.mjs","sources":["../../../src/utils/get-context-window.ts"],"sourcesContent":["import { VisualElement } from \"../render/VisualElement\"\n\n// Fixes https://github.com/motiondivision/motion/issues/2270\nexport const getContextWindow = ({ current }: VisualElement<Element>) => {\n return current ? current.ownerDocument.defaultView : null\n}\n"],"names":[],"mappings":"AAEA;MACa,gBAAgB,GAAG,CAAC,EAAE,OAAO,EAA0B,KAAI;AACpE,IAAA,OAAO,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAA;AAC7D;;;;"}
@@ -1,3 +1,4 @@
1
1
  const isBrowser = typeof window !== "undefined";
2
2
 
3
3
  export { isBrowser };
4
+ //# sourceMappingURL=is-browser.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-browser.mjs","sources":["../../../src/utils/is-browser.ts"],"sourcesContent":["export const isBrowser = typeof window !== \"undefined\"\n"],"names":[],"mappings":"MAAa,SAAS,GAAG,OAAO,MAAM,KAAK;;;;"}
@@ -5,3 +5,4 @@ function isRefObject(ref) {
5
5
  }
6
6
 
7
7
  export { isRefObject };
8
+ //# sourceMappingURL=is-ref-object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-ref-object.mjs","sources":["../../../src/utils/is-ref-object.ts"],"sourcesContent":["import { MutableRefObject } from \"./safe-react-types\"\n\nexport function isRefObject<E = any>(ref: any): ref is MutableRefObject<E> {\n return (\n ref &&\n typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\")\n )\n}\n"],"names":[],"mappings":"AAEM,SAAU,WAAW,CAAU,GAAQ,EAAA;AACzC,IAAA,QACI,GAAG;QACH,OAAO,GAAG,KAAK,QAAQ;AACvB,QAAA,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,EACvD;AACL;;;;"}
@@ -17,3 +17,4 @@ function initPrefersReducedMotion() {
17
17
  }
18
18
 
19
19
  export { initPrefersReducedMotion };
20
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../src/utils/reduced-motion/index.ts"],"sourcesContent":["import { isBrowser } from \"../is-browser\"\nimport { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\nexport function initPrefersReducedMotion() {\n hasReducedMotionListener.current = true\n if (!isBrowser) return\n\n if (window.matchMedia) {\n const motionMediaQuery = window.matchMedia(\"(prefers-reduced-motion)\")\n\n const setReducedMotionPreferences = () =>\n (prefersReducedMotion.current = motionMediaQuery.matches)\n\n motionMediaQuery.addEventListener(\"change\", setReducedMotionPreferences)\n\n setReducedMotionPreferences()\n } else {\n prefersReducedMotion.current = false\n }\n}\n"],"names":[],"mappings":";;;SAGgB,wBAAwB,GAAA;AACpC,IAAA,wBAAwB,CAAC,OAAO,GAAG,IAAI,CAAA;AACvC,IAAA,IAAI,CAAC,SAAS;QAAE,OAAM;AAEtB,IAAA,IAAI,MAAM,CAAC,UAAU,EAAE;QACnB,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAA;AAEtE,QAAA,MAAM,2BAA2B,GAAG,OAC/B,oBAAoB,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;AAE7D,QAAA,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAA;AAExE,QAAA,2BAA2B,EAAE,CAAA;KAChC;SAAM;AACH,QAAA,oBAAoB,CAAC,OAAO,GAAG,KAAK,CAAA;KACvC;AACL;;;;"}
@@ -3,3 +3,4 @@ const prefersReducedMotion = { current: null };
3
3
  const hasReducedMotionListener = { current: false };
4
4
 
5
5
  export { hasReducedMotionListener, prefersReducedMotion };
6
+ //# sourceMappingURL=state.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.mjs","sources":["../../../../src/utils/reduced-motion/state.ts"],"sourcesContent":["interface ReducedMotionState {\n current: boolean | null\n}\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nexport const prefersReducedMotion: ReducedMotionState = { current: null }\n\nexport const hasReducedMotionListener = { current: false }\n"],"names":[],"mappings":"AAIA;MACa,oBAAoB,GAAuB,EAAE,OAAO,EAAE,IAAI,GAAE;MAE5D,wBAAwB,GAAG,EAAE,OAAO,EAAE,KAAK;;;;"}
@@ -18,3 +18,4 @@ function useReducedMotionConfig() {
18
18
  }
19
19
 
20
20
  export { useReducedMotionConfig };
21
+ //# sourceMappingURL=use-reduced-motion-config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-reduced-motion-config.mjs","sources":["../../../../src/utils/reduced-motion/use-reduced-motion-config.ts"],"sourcesContent":["\"use client\"\n\nimport { useContext } from \"react\"\nimport { MotionConfigContext } from \"../../context/MotionConfigContext\"\nimport { useReducedMotion } from \"./use-reduced-motion\"\n\nexport function useReducedMotionConfig() {\n const reducedMotionPreference = useReducedMotion()\n const { reducedMotion } = useContext(MotionConfigContext)\n\n if (reducedMotion === \"never\") {\n return false\n } else if (reducedMotion === \"always\") {\n return true\n } else {\n return reducedMotionPreference\n }\n}\n"],"names":[],"mappings":";;;;;;AAOI;;AAGA;AACI;;AACG;AACH;;;AAEA;;AAER;;"}
@@ -46,3 +46,4 @@ function useReducedMotion() {
46
46
  }
47
47
 
48
48
  export { useReducedMotion };
49
+ //# sourceMappingURL=use-reduced-motion.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-reduced-motion.mjs","sources":["../../../../src/utils/reduced-motion/use-reduced-motion.ts"],"sourcesContent":["\"use client\"\n\nimport { warnOnce } from \"motion-utils\"\nimport { useState } from \"react\"\nimport { initPrefersReducedMotion } from \".\"\nimport { hasReducedMotionListener, prefersReducedMotion } from \"./state\"\n\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n * <motion.div animate={{\n * opacity: isOpen ? 1 : 0,\n * x: isOpen ? 0 : closedX\n * }} />\n * )\n * }\n * ```\n *\n * @return boolean\n *\n * @public\n */\nexport function useReducedMotion() {\n /**\n * Lazy initialisation of prefersReducedMotion\n */\n !hasReducedMotionListener.current && initPrefersReducedMotion()\n\n const [shouldReduceMotion] = useState(prefersReducedMotion.current)\n\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n shouldReduceMotion !== true,\n \"You have Reduced Motion enabled on your device. Animations may not appear as expected.\",\n \"reduced-motion-disabled\"\n )\n }\n\n /**\n * TODO See if people miss automatically updating shouldReduceMotion setting\n */\n\n return shouldReduceMotion\n}\n"],"names":[],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;;AAEC;;AAEG;AACH;;;;;AAYA;;AAEG;AAEH;AACJ;;"}
@@ -12,3 +12,4 @@ function shallowCompare(next, prev) {
12
12
  }
13
13
 
14
14
  export { shallowCompare };
15
+ //# sourceMappingURL=shallow-compare.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shallow-compare.mjs","sources":["../../../src/utils/shallow-compare.ts"],"sourcesContent":["export function shallowCompare(next: any[], prev: any[] | null) {\n if (!Array.isArray(prev)) return false\n\n const prevLength = prev.length\n\n if (prevLength !== next.length) return false\n\n for (let i = 0; i < prevLength; i++) {\n if (prev[i] !== next[i]) return false\n }\n\n return true\n}\n"],"names":[],"mappings":"AAAgB,SAAA,cAAc,CAAC,IAAW,EAAE,IAAkB,EAAA;AAC1D,IAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AAAE,QAAA,OAAO,KAAK,CAAA;AAEtC,IAAA,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAA;AAE9B,IAAA,IAAI,UAAU,KAAK,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK,CAAA;AAE5C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE;QACjC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;AAAE,YAAA,OAAO,KAAK,CAAA;KACxC;AAED,IAAA,OAAO,IAAI,CAAA;AACf;;;;"}
@@ -20,3 +20,4 @@ function useAnimationFrame(callback) {
20
20
  }
21
21
 
22
22
  export { useAnimationFrame };
23
+ //# sourceMappingURL=use-animation-frame.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-animation-frame.mjs","sources":["../../../src/utils/use-animation-frame.ts"],"sourcesContent":["\"use client\"\n\nimport { cancelFrame, frame, FrameData } from \"motion-dom\"\nimport { useContext, useEffect, useRef } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\n\nexport type FrameCallback = (timestamp: number, delta: number) => void\n\nexport function useAnimationFrame(callback: FrameCallback) {\n const initialTimestamp = useRef(0)\n const { isStatic } = useContext(MotionConfigContext)\n\n useEffect(() => {\n if (isStatic) return\n\n const provideTimeSinceStart = ({ timestamp, delta }: FrameData) => {\n if (!initialTimestamp.current) initialTimestamp.current = timestamp\n\n callback(timestamp - initialTimestamp.current, delta)\n }\n\n frame.update(provideTimeSinceStart, true)\n return () => cancelFrame(provideTimeSinceStart)\n }, [callback])\n}\n"],"names":[],"mappings":";;;;;AAQM;AACF;;;AAII;;;;AAGmC;;AAGnC;AAEA;AACA;AACJ;AACJ;;"}
@@ -58,3 +58,4 @@ function useComposedRefs(...refs) {
58
58
  }
59
59
 
60
60
  export { useComposedRefs };
61
+ //# sourceMappingURL=use-composed-ref.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-composed-ref.mjs","sources":["../../../src/utils/use-composed-ref.ts"],"sourcesContent":["/**\n * Taken from https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/compose-refs.tsx\n */\nimport * as React from \"react\"\n\ntype PossibleRef<T> = React.Ref<T> | undefined\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */\nfunction setRef<T>(ref: PossibleRef<T>, value: T): void | (() => void) {\n if (typeof ref === \"function\") {\n return ref(value)\n } else if (ref !== null && ref !== undefined) {\n ;(ref as React.MutableRefObject<T>).current = value\n }\n}\n\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */\nfunction composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n return (node) => {\n let hasCleanup = false\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node)\n if (!hasCleanup && typeof cleanup === \"function\") {\n hasCleanup = true\n }\n return cleanup\n })\n // React <19 will log an error to the console if a callback ref returns a\n // value. We don't use ref cleanups internally so this will only happen if a\n // user's ref callback returns a value, which we only expect if they are\n // using the cleanup functionality added in React 19.\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i]\n if (typeof cleanup === \"function\") {\n cleanup()\n } else {\n setRef(refs[i], null)\n }\n }\n }\n }\n }\n}\n\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */\nfunction useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T> {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs)\n}\n\nexport { useComposedRefs }\n"],"names":[],"mappings":";;AAAA;;AAEG;AAKH;;;AAGG;AACH,SAAS,MAAM,CAAI,GAAmB,EAAE,KAAQ,EAAA;AAC5C,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AAC3B,QAAA,OAAO,GAAG,CAAC,KAAK,CAAC,CAAA;KACpB;SAAM,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;AACxC,QAAA,GAAiC,CAAC,OAAO,GAAG,KAAK,CAAA;KACtD;AACL,CAAC;AAED;;;AAGG;AACH,SAAS,WAAW,CAAI,GAAG,IAAsB,EAAA;IAC7C,OAAO,CAAC,IAAI,KAAI;QACZ,IAAI,UAAU,GAAG,KAAK,CAAA;QACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAI;YAC9B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YACjC,IAAI,CAAC,UAAU,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;gBAC9C,UAAU,GAAG,IAAI,CAAA;aACpB;AACD,YAAA,OAAO,OAAO,CAAA;AAClB,SAAC,CAAC,CAAA;;;;;QAKF,IAAI,UAAU,EAAE;AACZ,YAAA,OAAO,MAAK;AACR,gBAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACtC,oBAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;AAC3B,oBAAA,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AAC/B,wBAAA,OAAO,EAAE,CAAA;qBACZ;yBAAM;wBACH,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;qBACxB;iBACJ;AACL,aAAC,CAAA;SACJ;AACL,KAAC,CAAA;AACL,CAAC;AAED;;;AAGG;AACH,SAAS,eAAe,CAAI,GAAG,IAAsB,EAAA;;AAEjD,IAAA,OAAO,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,EAAE,IAAI,CAAC,CAAA;AACxD;;;;"}
@@ -17,3 +17,4 @@ function useConstant(init) {
17
17
  }
18
18
 
19
19
  export { useConstant };
20
+ //# sourceMappingURL=use-constant.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-constant.mjs","sources":["../../../src/utils/use-constant.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\n\ntype Init<T> = () => T\n\n/**\n * Creates a constant value over the lifecycle of a component.\n *\n * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer\n * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`\n * you can ensure that initialisers don't execute twice or more.\n */\nexport function useConstant<T>(init: Init<T>) {\n const ref = useRef<T | null>(null)\n\n if (ref.current === null) {\n ref.current = init()\n }\n\n return ref.current\n}\n"],"names":[],"mappings":";;;AAMA;;;;;;AAMG;AACG;AACF;AAEA;AACI;;;AAIR;;"}
@@ -46,3 +46,4 @@ function useCycle(...items) {
46
46
  }
47
47
 
48
48
  export { useCycle };
49
+ //# sourceMappingURL=use-cycle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-cycle.mjs","sources":["../../../src/utils/use-cycle.ts"],"sourcesContent":["\"use client\"\n\nimport { wrap } from \"motion-utils\"\nimport { useCallback, useRef, useState } from \"react\"\n\nexport type Cycle = (i?: number) => void\n\nexport type CycleState<T> = [T, Cycle]\n\n/**\n * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.\n *\n * An index value can be passed to the returned `cycle` function to cycle to a specific index.\n *\n * ```jsx\n * import * as React from \"react\"\n * import { motion, useCycle } from \"framer-motion\"\n *\n * export const MyComponent = () => {\n * const [x, cycleX] = useCycle(0, 50, 100)\n *\n * return (\n * <motion.div\n * animate={{ x: x }}\n * onTap={() => cycleX()}\n * />\n * )\n * }\n * ```\n *\n * @param items - items to cycle through\n * @returns [currentState, cycleState]\n *\n * @public\n */\nexport function useCycle<T>(...items: T[]): CycleState<T> {\n const index = useRef(0)\n const [item, setItem] = useState(items[index.current])\n\n const runCycle = useCallback(\n (next?: number) => {\n index.current =\n typeof next !== \"number\"\n ? wrap(0, items.length, index.current + 1)\n : next\n\n setItem(items[index.current])\n },\n // The array will change on each call, but by putting items.length at\n // the front of this array, we guarantee the dependency comparison will match up\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [items.length, ...items]\n )\n return [item, runCycle]\n}\n"],"names":[],"mappings":";;;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACa;AACZ;AACA;AAEA;AAEQ;;AAEQ;;;;;;;;AAUhB;AACJ;;"}
@@ -18,3 +18,4 @@ function useForceUpdate() {
18
18
  }
19
19
 
20
20
  export { useForceUpdate };
21
+ //# sourceMappingURL=use-force-update.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-force-update.mjs","sources":["../../../src/utils/use-force-update.ts"],"sourcesContent":["\"use client\"\n\nimport { frame } from \"motion-dom\"\nimport { useCallback, useState } from \"react\"\nimport { useIsMounted } from \"./use-is-mounted\"\n\nexport function useForceUpdate(): [VoidFunction, number] {\n const isMounted = useIsMounted()\n const [forcedRenderCount, setForcedRenderCount] = useState(0)\n\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1)\n }, [forcedRenderCount])\n\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(\n () => frame.postRender(forceRender),\n [forceRender]\n )\n\n return [deferredForceRender, forcedRenderCount]\n}\n"],"names":[],"mappings":";;;;;;AAOI;;AAGA;;AAEA;AAEA;;;AAGG;AACH;AAKA;AACJ;;"}
@@ -22,3 +22,4 @@ function useInView(ref, { root, margin, amount, once = false, initial = false, }
22
22
  }
23
23
 
24
24
  export { useInView };
25
+ //# sourceMappingURL=use-in-view.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-in-view.mjs","sources":["../../../src/utils/use-in-view.ts"],"sourcesContent":["\"use client\"\n\nimport { RefObject, useEffect, useState } from \"react\"\nimport { inView, InViewOptions } from \"../render/dom/viewport\"\n\nexport interface UseInViewOptions\n extends Omit<InViewOptions, \"root\" | \"amount\"> {\n root?: RefObject<Element | null>\n once?: boolean\n amount?: \"some\" | \"all\" | number\n initial?: boolean\n}\n\nexport function useInView(\n ref: RefObject<Element | null>,\n {\n root,\n margin,\n amount,\n once = false,\n initial = false,\n }: UseInViewOptions = {}\n) {\n const [isInView, setInView] = useState(initial)\n\n useEffect(() => {\n if (!ref.current || (once && isInView)) return\n\n const onEnter = () => {\n setInView(true)\n\n return once ? undefined : () => setInView(false)\n }\n\n const options: InViewOptions = {\n root: (root && root.current) || undefined,\n margin,\n amount,\n }\n\n return inView(ref.current, onEnter, options)\n }, [root, ref, margin, once, amount])\n\n return isInView\n}\n"],"names":[],"mappings":";;;;AAaM;;;;;;;AAkBM;AACJ;AAEA;;;;;;AAOJ;AAEA;AACJ;;"}
@@ -40,3 +40,4 @@ function disableInstantTransitions() {
40
40
  }
41
41
 
42
42
  export { disableInstantTransitions, useInstantTransition };
43
+ //# sourceMappingURL=use-instant-transition.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-instant-transition.mjs","sources":["../../../src/utils/use-instant-transition.ts"],"sourcesContent":["\"use client\"\n\nimport { frame } from \"motion-dom\"\nimport { MotionGlobalConfig } from \"motion-utils\"\nimport { useEffect, useRef } from \"react\"\nimport { useInstantLayoutTransition } from \"../projection/use-instant-layout-transition\"\nimport { useForceUpdate } from \"./use-force-update\"\n\nexport function useInstantTransition() {\n const [forceUpdate, forcedRenderCount] = useForceUpdate()\n const startInstantLayoutTransition = useInstantLayoutTransition()\n const unlockOnFrameRef = useRef<number>(-1)\n\n useEffect(() => {\n /**\n * Unblock after two animation frames, otherwise this will unblock too soon.\n */\n frame.postRender(() =>\n frame.postRender(() => {\n /**\n * If the callback has been called again after the effect\n * triggered this 2 frame delay, don't unblock animations. This\n * prevents the previous effect from unblocking the current\n * instant transition too soon. This becomes more likely when\n * used in conjunction with React.startTransition().\n */\n if (forcedRenderCount !== unlockOnFrameRef.current) return\n MotionGlobalConfig.instantAnimations = false\n })\n )\n }, [forcedRenderCount])\n\n return (callback: () => void) => {\n startInstantLayoutTransition(() => {\n MotionGlobalConfig.instantAnimations = true\n forceUpdate()\n callback()\n unlockOnFrameRef.current = forcedRenderCount + 1\n })\n }\n}\n\nexport function disableInstantTransitions() {\n MotionGlobalConfig.instantAnimations = false\n}\n"],"names":[],"mappings":";;;;;;;;;AAUI;AACA;;AAGI;;AAEG;;AAGK;;;;;;AAMG;AACH;;AACA;;AAGZ;;;AAIQ;AACA;AACA;AACA;AACJ;AACJ;AACJ;;AAGI;AACJ;;"}
@@ -14,3 +14,4 @@ function useIsMounted() {
14
14
  }
15
15
 
16
16
  export { useIsMounted };
17
+ //# sourceMappingURL=use-is-mounted.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-is-mounted.mjs","sources":["../../../src/utils/use-is-mounted.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\nimport { useIsomorphicLayoutEffect } from \"./use-isomorphic-effect\"\n\nexport function useIsMounted() {\n const isMounted = useRef(false)\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n"],"names":[],"mappings":";;;;;AAMI;;AAEI;AAEA;AACI;AACJ;;AAGJ;AACJ;;"}
@@ -5,3 +5,4 @@ import { isBrowser } from './is-browser.mjs';
5
5
  const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;
6
6
 
7
7
  export { useIsomorphicLayoutEffect };
8
+ //# sourceMappingURL=use-isomorphic-effect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-isomorphic-effect.mjs","sources":["../../../src/utils/use-isomorphic-effect.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useLayoutEffect } from \"react\"\nimport { isBrowser } from \"./is-browser\"\n\nexport const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect\n"],"names":[],"mappings":";;;;AAKO;;"}
@@ -12,3 +12,4 @@ function useMotionValueEvent(value, event, callback) {
12
12
  }
13
13
 
14
14
  export { useMotionValueEvent };
15
+ //# sourceMappingURL=use-motion-value-event.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-motion-value-event.mjs","sources":["../../../src/utils/use-motion-value-event.ts"],"sourcesContent":["\"use client\"\n\nimport { MotionValue, MotionValueEventCallbacks } from \"motion-dom\"\nimport { useInsertionEffect } from \"react\"\n\nexport function useMotionValueEvent<\n V,\n EventName extends keyof MotionValueEventCallbacks<V>\n>(\n value: MotionValue<V>,\n event: EventName,\n callback: MotionValueEventCallbacks<V>[EventName]\n) {\n /**\n * useInsertionEffect will create subscriptions before any other\n * effects will run. Effects run upwards through the tree so it\n * can be that binding a useLayoutEffect higher up the tree can\n * miss changes from lower down the tree.\n */\n useInsertionEffect(\n () => value.on(event, callback),\n [value, event, callback]\n )\n}\n"],"names":[],"mappings":";;;;AAaI;;;;;AAKG;;AAKP;;"}
@@ -17,3 +17,4 @@ function usePageInView() {
17
17
  }
18
18
 
19
19
  export { usePageInView };
20
+ //# sourceMappingURL=use-page-in-view.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-page-in-view.mjs","sources":["../../../src/utils/use-page-in-view.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useState } from \"react\"\n\nexport function usePageInView() {\n const [isInView, setIsInView] = useState(true)\n\n useEffect(() => {\n const handleVisibilityChange = () => setIsInView(!document.hidden)\n\n if (document.hidden) {\n handleVisibilityChange()\n }\n\n document.addEventListener(\"visibilitychange\", handleVisibilityChange)\n\n return () => {\n document.removeEventListener(\n \"visibilitychange\",\n handleVisibilityChange\n )\n }\n }, [])\n\n return isInView\n}\n"],"names":[],"mappings":";;;;;;AAQQ;AAEA;AACI;;AAGJ;AAEA;AACI;AAIJ;;AAGJ;AACJ;;"}
@@ -6,3 +6,4 @@ function useUnmountEffect(callback) {
6
6
  }
7
7
 
8
8
  export { useUnmountEffect };
9
+ //# sourceMappingURL=use-unmount-effect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-unmount-effect.mjs","sources":["../../../src/utils/use-unmount-effect.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect } from \"react\"\n\nexport function useUnmountEffect(callback: () => void) {\n return useEffect(() => () => callback(), [])\n}\n"],"names":[],"mappings":";;;AAIM;AACF;AACJ;;"}
@@ -12,3 +12,4 @@ function useElementScroll(ref) {
12
12
  }
13
13
 
14
14
  export { useElementScroll };
15
+ //# sourceMappingURL=use-element-scroll.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-element-scroll.mjs","sources":["../../../../src/value/scroll/use-element-scroll.ts"],"sourcesContent":["import { warnOnce } from \"motion-utils\"\nimport { RefObject } from \"react\"\nimport { useScroll } from \"../use-scroll\"\n\n/**\n * @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref })\n */\nexport function useElementScroll(ref: RefObject<HTMLElement | null>) {\n if (process.env.NODE_ENV === \"development\") {\n warnOnce(\n false,\n \"useElementScroll is deprecated. Convert to useScroll({ container: ref }).\"\n )\n }\n\n return useScroll({ container: ref })\n}\n"],"names":[],"mappings":";;;AAIA;;AAEG;AACG,SAAU,gBAAgB,CAAC,GAAkC,EAAA;IAC/D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;AACxC,QAAA,QAAQ,CACJ,KAAK,EACL,2EAA2E,CAC9E,CAAA;KACJ;IAED,OAAO,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAA;AACxC;;;;"}
@@ -12,3 +12,4 @@ function useViewportScroll() {
12
12
  }
13
13
 
14
14
  export { useViewportScroll };
15
+ //# sourceMappingURL=use-viewport-scroll.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-viewport-scroll.mjs","sources":["../../../../src/value/scroll/use-viewport-scroll.ts"],"sourcesContent":["import { warnOnce } from \"motion-utils\"\nimport { useScroll } from \"../use-scroll\"\n\n/**\n * @deprecated useViewportScroll is deprecated. Convert to useScroll()\n */\nexport function useViewportScroll() {\n if (process.env.NODE_ENV !== \"production\") {\n warnOnce(\n false,\n \"useViewportScroll is deprecated. Convert to useScroll().\"\n )\n }\n return useScroll()\n}\n"],"names":[],"mappings":";;;AAGA;;AAEG;SACa,iBAAiB,GAAA;IAC7B,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AACvC,QAAA,QAAQ,CACJ,KAAK,EACL,0DAA0D,CAC7D,CAAA;KACJ;IACD,OAAO,SAAS,EAAE,CAAA;AACtB;;;;"}
@@ -36,3 +36,4 @@ function useCombineMotionValues(values, combineValues) {
36
36
  }
37
37
 
38
38
  export { useCombineMotionValues };
39
+ //# sourceMappingURL=use-combine-values.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-combine-values.mjs","sources":["../../../src/value/use-combine-values.ts"],"sourcesContent":["\"use client\"\n\nimport { cancelFrame, frame, MotionValue } from \"motion-dom\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useCombineMotionValues<R>(\n values: MotionValue[],\n combineValues: () => R\n) {\n /**\n * Initialise the returned motion value. This remains the same between renders.\n */\n const value = useMotionValue(combineValues())\n\n /**\n * Create a function that will update the template motion value with the latest values.\n * This is pre-bound so whenever a motion value updates it can schedule its\n * execution in Framesync. If it's already been scheduled it won't be fired twice\n * in a single frame.\n */\n const updateValue = () => value.set(combineValues())\n\n /**\n * Synchronously update the motion value with the latest values during the render.\n * This ensures that within a React render, the styles applied to the DOM are up-to-date.\n */\n updateValue()\n\n /**\n * Subscribe to all motion values found within the template. Whenever any of them change,\n * schedule an update.\n */\n useIsomorphicLayoutEffect(() => {\n const scheduleUpdate = () => frame.preRender(updateValue, false, true)\n const subscriptions = values.map((v) => v.on(\"change\", scheduleUpdate))\n\n return () => {\n subscriptions.forEach((unsubscribe) => unsubscribe())\n cancelFrame(updateValue)\n }\n })\n\n return value\n}\n"],"names":[],"mappings":";;;;;AAMgB;AAIZ;;AAEG;AACH;AAEA;;;;;AAKG;AACH;AAEA;;;AAGG;AACH;AAEA;;;AAGG;;AAEC;;AAGA;;;AAGA;AACJ;AAEA;AACJ;;"}
@@ -18,3 +18,4 @@ function useComputed(compute) {
18
18
  }
19
19
 
20
20
  export { useComputed };
21
+ //# sourceMappingURL=use-computed.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-computed.mjs","sources":["../../../src/value/use-computed.ts"],"sourcesContent":["\"use client\"\n\nimport { collectMotionValues, type MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\nexport function useComputed<O>(compute: () => O): MotionValue<O> {\n /**\n * Open session of collectMotionValues. Any MotionValue that calls get()\n * will be saved into this array.\n */\n collectMotionValues.current = []\n\n compute()\n\n const value = useCombineMotionValues(collectMotionValues.current, compute)\n\n /**\n * Synchronously close session of collectMotionValues.\n */\n collectMotionValues.current = undefined\n\n return value\n}\n"],"names":[],"mappings":";;;;AAKM;AACF;;;AAGG;AACH;AAEA;;AAIA;;AAEG;AACH;AAEA;AACJ;;"}
@@ -51,3 +51,4 @@ function useInvertedScale(scale) {
51
51
  }
52
52
 
53
53
  export { invertScale, useInvertedScale };
54
+ //# sourceMappingURL=use-inverted-scale.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-inverted-scale.mjs","sources":["../../../src/value/use-inverted-scale.ts"],"sourcesContent":["\"use client\"\n\nimport { MotionValue } from \"motion-dom\"\nimport { invariant, warning } from \"motion-utils\"\nimport { useContext } from \"react\"\nimport { MotionContext } from \"../context/MotionContext\"\nimport { useMotionValue } from \"./use-motion-value\"\nimport { useTransform } from \"./use-transform\"\n\ninterface ScaleMotionValues {\n scaleX: MotionValue<number>\n scaleY: MotionValue<number>\n}\n\n// Keep things reasonable and avoid scale: Infinity. In practise we might need\n// to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]\n// to simply hide content at unreasonable scales.\nconst maxScale = 100000\nexport const invertScale = (scale: number) =>\n scale > 0.001 ? 1 / scale : maxScale\n\nlet hasWarned = false\n\n/**\n * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse\n * of their respective parent scales.\n *\n * This is useful for undoing the distortion of content when scaling a parent component.\n *\n * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.\n * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output\n * of those instead.\n *\n * ```jsx\n * const MyComponent = () => {\n * const { scaleX, scaleY } = useInvertedScale()\n * return <motion.div style={{ scaleX, scaleY }} />\n * }\n * ```\n *\n * @deprecated\n */\nexport function useInvertedScale(\n scale?: Partial<ScaleMotionValues>\n): ScaleMotionValues {\n let parentScaleX = useMotionValue(1)\n let parentScaleY = useMotionValue(1)\n const { visualElement } = useContext(MotionContext)\n\n invariant(\n !!(scale || visualElement),\n \"If no scale values are provided, useInvertedScale must be used within a child of another motion component.\"\n )\n\n warning(\n hasWarned,\n \"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.\"\n )\n\n hasWarned = true\n\n if (scale) {\n parentScaleX = scale.scaleX || parentScaleX\n parentScaleY = scale.scaleY || parentScaleY\n } else if (visualElement) {\n parentScaleX = visualElement.getValue(\"scaleX\", 1)\n parentScaleY = visualElement.getValue(\"scaleY\", 1)\n }\n\n const scaleX = useTransform(parentScaleX, invertScale)\n const scaleY = useTransform(parentScaleY, invertScale)\n\n return { scaleX, scaleY }\n}\n"],"names":[],"mappings":";;;;;;;AAcA;AACA;AACA;AACA;;AAIA;AAEA;;;;;;;;;;;;;;;;;;AAkBG;AACG;AAGF;AACA;;;AAQA;;;AAQI;AACA;;;;;;;;AASJ;AACJ;;"}
@@ -44,3 +44,4 @@ function useMotionTemplate(fragments, ...values) {
44
44
  }
45
45
 
46
46
  export { useMotionTemplate };
47
+ //# sourceMappingURL=use-motion-template.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-motion-template.mjs","sources":["../../../src/value/use-motion-template.ts"],"sourcesContent":["\"use client\"\n\nimport { isMotionValue, MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\n/**\n * Combine multiple motion values into a new one using a string template literal.\n *\n * ```jsx\n * import {\n * motion,\n * useSpring,\n * useMotionValue,\n * useMotionTemplate\n * } from \"framer-motion\"\n *\n * function Component() {\n * const shadowX = useSpring(0)\n * const shadowY = useMotionValue(0)\n * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`\n *\n * return <motion.div style={{ filter: shadow }} />\n * }\n * ```\n *\n * @public\n */\nexport function useMotionTemplate(\n fragments: TemplateStringsArray,\n ...values: Array<MotionValue | number | string>\n) {\n /**\n * Create a function that will build a string from the latest motion values.\n */\n const numFragments = fragments.length\n\n function buildValue() {\n let output = ``\n\n for (let i = 0; i < numFragments; i++) {\n output += fragments[i]\n const value = values[i]\n if (value) {\n output += isMotionValue(value) ? value.get() : value\n }\n }\n\n return output\n }\n\n return useCombineMotionValues(values.filter(isMotionValue), buildValue)\n}\n"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;;AAqBG;;AAKC;;AAEG;AACH;AAEA;;AAGI;AACI;AACA;;AAEI;;;AAIR;;;AAIR;;"}
@@ -37,3 +37,4 @@ function useMotionValue(initial) {
37
37
  }
38
38
 
39
39
  export { useMotionValue };
40
+ //# sourceMappingURL=use-motion-value.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-motion-value.mjs","sources":["../../../src/value/use-motion-value.ts"],"sourcesContent":["\"use client\"\n\nimport { motionValue, MotionValue } from \"motion-dom\"\nimport { useContext, useEffect, useState } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { useConstant } from \"../utils/use-constant\"\n\n/**\n * Creates a `MotionValue` to track the state and velocity of a value.\n *\n * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const scale = useMotionValue(1)\n *\n * return <motion.div style={{ scale }} />\n * }\n * ```\n *\n * @param initial - The initial state.\n *\n * @public\n */\nexport function useMotionValue<T>(initial: T): MotionValue<T> {\n const value = useConstant(() => motionValue(initial))\n\n /**\n * If this motion value is being used in static mode, like on\n * the Framer canvas, force components to rerender when the motion\n * value is updated.\n */\n const { isStatic } = useContext(MotionConfigContext)\n if (isStatic) {\n const [, setLatest] = useState(initial)\n useEffect(() => value.on(\"change\", setLatest), [])\n }\n\n return value\n}\n"],"names":[],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;AACG;AACF;AAEA;;;;AAIG;;;;AAIC;;AAGJ;AACJ;;"}
@@ -60,3 +60,4 @@ function useScroll({ container, target, ...options } = {}) {
60
60
  }
61
61
 
62
62
  export { useScroll };
63
+ //# sourceMappingURL=use-scroll.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-scroll.mjs","sources":["../../../src/value/use-scroll.ts"],"sourcesContent":["\"use client\"\n\nimport { motionValue } from \"motion-dom\"\nimport { invariant } from \"motion-utils\"\nimport { RefObject, useCallback, useEffect, useRef } from \"react\"\nimport { scroll } from \"../render/dom/scroll\"\nimport { ScrollInfoOptions } from \"../render/dom/scroll/types\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { useIsomorphicLayoutEffect } from \"../utils/use-isomorphic-effect\"\n\nexport interface UseScrollOptions\n extends Omit<ScrollInfoOptions, \"container\" | \"target\"> {\n container?: RefObject<HTMLElement | null>\n target?: RefObject<HTMLElement | null>\n}\n\nconst createScrollMotionValues = () => ({\n scrollX: motionValue(0),\n scrollY: motionValue(0),\n scrollXProgress: motionValue(0),\n scrollYProgress: motionValue(0),\n})\n\nconst isRefPending = (ref?: RefObject<HTMLElement | null>) => {\n if (!ref) return false\n return !ref.current\n}\n\nexport function useScroll({\n container,\n target,\n ...options\n}: UseScrollOptions = {}) {\n const values = useConstant(createScrollMotionValues)\n const scrollAnimation = useRef<VoidFunction | null>(null)\n const needsStart = useRef(false)\n\n const start = useCallback(() => {\n scrollAnimation.current = scroll(\n (\n _progress: number,\n {\n x,\n y,\n }: {\n x: { current: number; progress: number }\n y: { current: number; progress: number }\n }\n ) => {\n values.scrollX.set(x.current)\n values.scrollXProgress.set(x.progress)\n values.scrollY.set(y.current)\n values.scrollYProgress.set(y.progress)\n },\n {\n ...options,\n container: container?.current || undefined,\n target: target?.current || undefined,\n }\n )\n\n return () => {\n scrollAnimation.current?.()\n }\n }, [container, target, JSON.stringify(options.offset)])\n\n useIsomorphicLayoutEffect(() => {\n needsStart.current = false\n\n if (isRefPending(container) || isRefPending(target)) {\n needsStart.current = true\n return\n } else {\n return start()\n }\n }, [start])\n\n useEffect(() => {\n if (needsStart.current) {\n invariant(\n !isRefPending(container),\n \"Container ref is defined but not hydrated\",\n \"use-scroll-ref\"\n )\n invariant(\n !isRefPending(target),\n \"Target ref is defined but not hydrated\",\n \"use-scroll-ref\"\n )\n return start()\n } else {\n return\n }\n }, [start])\n\n return values\n}\n"],"names":[],"mappings":";;;;;;;;AAgBA;AACI;AACA;AACA;AACA;AACH;AAED;AACI;AAAU;AACV;AACJ;AAEM;AAKF;AACA;AACA;AAEA;AACI;;;;;AAeI;AAEI;AACA;AACA;AACH;AAGL;AACI;AACJ;AACJ;;AAGI;;AAGI;;;;;;AAKR;;AAGI;;;;;;;;AAeJ;AAEA;AACJ;;"}
@@ -20,3 +20,4 @@ function useSpring(source, options = {}) {
20
20
  }
21
21
 
22
22
  export { useSpring };
23
+ //# sourceMappingURL=use-spring.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-spring.mjs","sources":["../../../src/value/use-spring.ts"],"sourcesContent":["\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n attachSpring,\n isMotionValue,\n MotionValue,\n SpringOptions,\n} from \"motion-dom\"\nimport { useContext, useInsertionEffect } from \"react\"\nimport { MotionConfigContext } from \"../context/MotionConfigContext\"\nimport { useMotionValue } from \"./use-motion-value\"\nimport { useTransform } from \"./use-transform\"\n\n/**\n * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.\n *\n * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber\n * to another `MotionValue`.\n *\n * @remarks\n *\n * ```jsx\n * const x = useSpring(0, { stiffness: 300 })\n * const y = useSpring(x, { damping: 10 })\n * ```\n *\n * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.\n * @param springConfig - Configuration options for the spring.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useSpring(\n source: MotionValue<string>,\n options?: SpringOptions\n): MotionValue<string>\nexport function useSpring(\n source: string,\n options?: SpringOptions\n): MotionValue<string>\nexport function useSpring(\n source: MotionValue<number>,\n options?: SpringOptions\n): MotionValue<number>\nexport function useSpring(\n source: number,\n options?: SpringOptions\n): MotionValue<number>\nexport function useSpring(\n source: MotionValue<string> | MotionValue<number> | AnyResolvedKeyframe,\n options: SpringOptions = {}\n) {\n const { isStatic } = useContext(MotionConfigContext)\n const getFromSource = () => (isMotionValue(source) ? source.get() : source)\n\n // isStatic will never change, allowing early hooks return\n if (isStatic) {\n return useTransform(getFromSource)\n }\n\n const value = useMotionValue(getFromSource())\n\n useInsertionEffect(() => {\n return attachSpring(value, source, options)\n }, [value, JSON.stringify(options)])\n\n return value\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AA0DQ;;AAGJ;;;AAIA;AAEA;AACJ;;"}
@@ -9,3 +9,4 @@ function useTime() {
9
9
  }
10
10
 
11
11
  export { useTime };
12
+ //# sourceMappingURL=use-time.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-time.mjs","sources":["../../../src/value/use-time.ts"],"sourcesContent":["\"use client\"\n\nimport { useAnimationFrame } from \"../utils/use-animation-frame\"\nimport { useMotionValue } from \"./use-motion-value\"\n\nexport function useTime() {\n const time = useMotionValue(0)\n useAnimationFrame((t) => time.set(t))\n return time\n}\n"],"names":[],"mappings":";;;;;AAMI;AACA;AACA;AACJ;;"}
@@ -28,3 +28,4 @@ function useListTransform(values, transformer) {
28
28
  }
29
29
 
30
30
  export { useTransform };
31
+ //# sourceMappingURL=use-transform.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-transform.mjs","sources":["../../../src/value/use-transform.ts"],"sourcesContent":["\"use client\"\n\nimport {\n AnyResolvedKeyframe,\n MotionValue,\n transform,\n TransformOptions,\n} from \"motion-dom\"\nimport { useConstant } from \"../utils/use-constant\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\nimport { useComputed } from \"./use-computed\"\n\nexport type InputRange = number[]\ntype SingleTransformer<I, O> = (input: I) => O\ntype MultiTransformer<I, O> = (input: I[]) => O\ntype Transformer<I, O> =\n | SingleTransformer<I, O>\n /**\n * Ideally, this would be typed <I, O> in all instances, but to type this\n * more accurately requires the tuple support in TypeScript 4:\n * https://gist.github.com/InventingWithMonster/c4d23752a0fae7888596c4ff6d92733a\n */\n | MultiTransformer<AnyResolvedKeyframe, O>\n\n/**\n * Create a `MotionValue` that transforms the output of another `MotionValue` by mapping it from one range of values into another.\n *\n * @remarks\n *\n * Given an input range of `[-200, -100, 100, 200]` and an output range of\n * `[0, 1, 1, 0]`, the returned `MotionValue` will:\n *\n * - When provided a value between `-200` and `-100`, will return a value between `0` and `1`.\n * - When provided a value between `-100` and `100`, will return `1`.\n * - When provided a value between `100` and `200`, will return a value between `1` and `0`\n *\n *\n * The input range must be a linear series of numbers. The output range\n * can be any value type supported by Motion: numbers, colors, shadows, etc.\n *\n * Every value in the output range must be of the same type and in the same format.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const xRange = [-200, -100, 100, 200]\n * const opacityRange = [0, 1, 1, 0]\n * const opacity = useTransform(x, xRange, opacityRange)\n *\n * return (\n * <motion.div\n * animate={{ x: 200 }}\n * style={{ opacity, x }}\n * />\n * )\n * }\n * ```\n *\n * @param inputValue - `MotionValue`\n * @param inputRange - A linear series of numbers (either all increasing or decreasing)\n * @param outputRange - A series of numbers, colors or strings. Must be the same length as `inputRange`.\n * @param options -\n *\n * - clamp: boolean. Clamp values to within the given range. Defaults to `true`\n * - 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.\n *\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform<I, O>(\n value: MotionValue<number>,\n inputRange: InputRange,\n outputRange: O[],\n options?: TransformOptions<O>\n): MotionValue<O>\n\n/**\n * Create a `MotionValue` that transforms the output of another `MotionValue` through a function.\n * In this example, `y` will always be double `x`.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(10)\n * const y = useTransform(x, value => value * 2)\n *\n * return <motion.div style={{ x, y }} />\n * }\n * ```\n *\n * @param input - A `MotionValue` that will pass its latest value through `transform` to update the returned `MotionValue`.\n * @param transform - A function that accepts the latest value from `input` and returns a new value.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform<I, O>(\n input: MotionValue<I>,\n transformer: SingleTransformer<I, O>\n): MotionValue<O>\n\n/**\n * Pass an array of `MotionValue`s and a function to combine them. In this example, `z` will be the `x` multiplied by `y`.\n *\n * ```jsx\n * export const MyComponent = () => {\n * const x = useMotionValue(0)\n * const y = useMotionValue(0)\n * const z = useTransform([x, y], ([latestX, latestY]) => latestX * latestY)\n *\n * return <motion.div style={{ x, y, z }} />\n * }\n * ```\n *\n * @param input - An array of `MotionValue`s that will pass their latest values through `transform` to update the returned `MotionValue`.\n * @param transform - A function that accepts the latest values from `input` and returns a new value.\n * @returns `MotionValue`\n *\n * @public\n */\nexport function useTransform<I, O>(\n input:\n | MotionValue<string>[]\n | MotionValue<number>[]\n | MotionValue<AnyResolvedKeyframe>[],\n transformer: MultiTransformer<I, O>\n): MotionValue<O>\nexport function useTransform<I, O>(transformer: () => O): MotionValue<O>\nexport function useTransform<I, O>(\n input:\n | MotionValue<I>\n | MotionValue<string>[]\n | MotionValue<number>[]\n | MotionValue<AnyResolvedKeyframe>[]\n | (() => O),\n inputRangeOrTransformer?: InputRange | Transformer<I, O>,\n outputRange?: O[],\n options?: TransformOptions<O>\n): MotionValue<O> {\n if (typeof input === \"function\") {\n return useComputed(input)\n }\n\n const transformer =\n typeof inputRangeOrTransformer === \"function\"\n ? inputRangeOrTransformer\n : transform(inputRangeOrTransformer!, outputRange!, options)\n\n return Array.isArray(input)\n ? useListTransform(\n input,\n transformer as MultiTransformer<AnyResolvedKeyframe, O>\n )\n : useListTransform([input], ([latest]) =>\n (transformer as SingleTransformer<I, O>)(latest)\n )\n}\n\nfunction useListTransform<I, O>(\n values: MotionValue<I>[],\n transformer: MultiTransformer<I, O>\n): MotionValue<O> {\n const latest = useConstant<I[]>(() => [])\n\n return useCombineMotionValues(values, () => {\n latest.length = 0\n const numValues = values.length\n for (let i = 0; i < numValues; i++) {\n latest[i] = values[i].get()\n }\n\n return transformer(latest)\n })\n}\n"],"names":[],"mappings":";;;;;;AAgIM;AAWF;AACI;;AAGJ;AAEQ;;AAGR;AACI;AAIA;AAGR;AAEA;;AAMI;AACI;AACA;AACA;;;AAIA;AACJ;AACJ;;"}
@@ -34,3 +34,4 @@ function useVelocity(value) {
34
34
  }
35
35
 
36
36
  export { useVelocity };
37
+ //# sourceMappingURL=use-velocity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-velocity.mjs","sources":["../../../src/value/use-velocity.ts"],"sourcesContent":["\"use client\"\n\nimport { frame, MotionValue } from \"motion-dom\"\nimport { useMotionValueEvent } from \"../utils/use-motion-value-event\"\nimport { useMotionValue } from \"./use-motion-value\"\n/**\n * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.\n *\n * ```javascript\n * const x = useMotionValue(0)\n * const xVelocity = useVelocity(x)\n * const xAcceleration = useVelocity(xVelocity)\n * ```\n *\n * @public\n */\nexport function useVelocity(value: MotionValue<number>): MotionValue<number> {\n const velocity = useMotionValue(value.getVelocity())\n\n const updateVelocity = () => {\n const latest = value.getVelocity()\n velocity.set(latest)\n\n /**\n * If we still have velocity, schedule an update for the next frame\n * to keep checking until it is zero.\n */\n if (latest) frame.update(updateVelocity)\n }\n\n useMotionValueEvent(value, \"change\", () => {\n // Schedule an update to this value at the end of the current frame.\n frame.update(updateVelocity, false, true)\n })\n\n return velocity\n}\n"],"names":[],"mappings":";;;;;AAKA;;;;;;;;;;AAUG;AACG;;;AAIE;AACA;AAEA;;;AAGG;AACH;AAAY;AAChB;AAEA;;;AAGA;AAEA;AACJ;;"}
@@ -17,3 +17,4 @@ class WillChangeMotionValue extends MotionValue {
17
17
  }
18
18
 
19
19
  export { WillChangeMotionValue };
20
+ //# sourceMappingURL=WillChangeMotionValue.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WillChangeMotionValue.mjs","sources":["../../../../src/value/use-will-change/WillChangeMotionValue.ts"],"sourcesContent":["import { acceleratedValues, MotionValue, transformProps } from \"motion-dom\"\nimport { WillChange } from \"./types\"\n\nexport class WillChangeMotionValue\n extends MotionValue<string>\n implements WillChange\n{\n private isEnabled = false\n\n add(name: string) {\n if (transformProps.has(name) || acceleratedValues.has(name)) {\n this.isEnabled = true\n this.update()\n }\n }\n\n private update() {\n this.set(this.isEnabled ? \"transform\" : \"auto\")\n }\n}\n"],"names":[],"mappings":";;AAGM,MAAO,qBACT,SAAQ,WAAmB,CAAA;AAD/B,IAAA,WAAA,GAAA;;QAIY,IAAS,CAAA,SAAA,GAAG,KAAK,CAAA;KAY5B;AAVG,IAAA,GAAG,CAAC,IAAY,EAAA;AACZ,QAAA,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AACzD,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;YACrB,IAAI,CAAC,MAAM,EAAE,CAAA;SAChB;KACJ;IAEO,MAAM,GAAA;AACV,QAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC,CAAA;KAClD;AACJ;;;;"}
@@ -18,3 +18,4 @@ function addValueToWillChange(visualElement, key) {
18
18
  }
19
19
 
20
20
  export { addValueToWillChange };
21
+ //# sourceMappingURL=add-will-change.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-will-change.mjs","sources":["../../../../src/value/use-will-change/add-will-change.ts"],"sourcesContent":["import { MotionGlobalConfig } from \"motion-utils\"\nimport type { VisualElement } from \"../../render/VisualElement\"\nimport { isWillChangeMotionValue } from \"./is\"\n\nexport function addValueToWillChange(\n visualElement: VisualElement,\n key: string\n) {\n const willChange = visualElement.getValue(\"willChange\")\n\n /**\n * It could be that a user has set willChange to a regular MotionValue,\n * in which case we can't add the value to it.\n */\n if (isWillChangeMotionValue(willChange)) {\n return willChange.add(key)\n } else if (!willChange && MotionGlobalConfig.WillChange) {\n const newWillChange = new MotionGlobalConfig.WillChange(\"auto\")\n\n visualElement.addValue(\"willChange\", newWillChange)\n newWillChange.add(key)\n }\n}\n"],"names":[],"mappings":";;;AAIgB,SAAA,oBAAoB,CAChC,aAA4B,EAC5B,GAAW,EAAA;IAEX,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AAEvD;;;AAGG;AACH,IAAA,IAAI,uBAAuB,CAAC,UAAU,CAAC,EAAE;AACrC,QAAA,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;KAC7B;AAAM,SAAA,IAAI,CAAC,UAAU,IAAI,kBAAkB,CAAC,UAAU,EAAE;QACrD,MAAM,aAAa,GAAG,IAAI,kBAAkB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;AAE/D,QAAA,aAAa,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;AACnD,QAAA,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;KACzB;AACL;;;;"}
@@ -7,3 +7,4 @@ function useWillChange() {
7
7
  }
8
8
 
9
9
  export { useWillChange };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../src/value/use-will-change/index.ts"],"sourcesContent":["\"use client\"\n\nimport { useConstant } from \"../../utils/use-constant\"\nimport { WillChangeMotionValue } from \"./WillChangeMotionValue\"\nimport { WillChange } from \"./types\"\n\nexport function useWillChange(): WillChange {\n return useConstant(() => new WillChangeMotionValue(\"auto\"))\n}\n"],"names":[],"mappings":";;;;;;AAQA;;"}
@@ -5,3 +5,4 @@ function isWillChangeMotionValue(value) {
5
5
  }
6
6
 
7
7
  export { isWillChangeMotionValue };
8
+ //# sourceMappingURL=is.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is.mjs","sources":["../../../../src/value/use-will-change/is.ts"],"sourcesContent":["import { isMotionValue } from \"motion-dom\"\nimport { WillChange } from \"./types\"\n\nexport function isWillChangeMotionValue(value: any): value is WillChange {\n return Boolean(isMotionValue(value) && (value as WillChange).add)\n}\n"],"names":[],"mappings":";;AAGM,SAAU,uBAAuB,CAAC,KAAU,EAAA;IAC9C,OAAO,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,IAAK,KAAoB,CAAC,GAAG,CAAC,CAAA;AACrE;;;;"}
@@ -10,3 +10,4 @@ function resolveMotionValue(value) {
10
10
  }
11
11
 
12
12
  export { resolveMotionValue };
13
+ //# sourceMappingURL=resolve-motion-value.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-motion-value.mjs","sources":["../../../../src/value/utils/resolve-motion-value.ts"],"sourcesContent":["import { AnyResolvedKeyframe, isMotionValue, MotionValue } from \"motion-dom\"\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n */\nexport function resolveMotionValue(\n value?: AnyResolvedKeyframe | MotionValue\n): AnyResolvedKeyframe {\n return isMotionValue(value) ? value.get() : value\n}\n"],"names":[],"mappings":";;AAEA;;;;AAIG;AACG,SAAU,kBAAkB,CAC9B,KAAyC,EAAA;AAEzC,IAAA,OAAO,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,GAAG,KAAK,CAAA;AACrD;;;;"}