motion-v 0.13.0-beta.1 → 0.13.0-beta.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 (265) hide show
  1. package/dist/cjs/index.js +414 -1153
  2. package/dist/es/animation/hooks/animation-controls.mjs +1 -1
  3. package/dist/es/animation/hooks/use-animate.mjs +1 -1
  4. package/dist/es/components/animate-presence/use-pop-layout.mjs +1 -1
  5. package/dist/es/components/reorder/Group.d.ts +1 -1
  6. package/dist/es/components/reorder/index.d.ts +7088 -7088
  7. package/dist/es/components/reorder/utils.d.ts +1 -1
  8. package/dist/es/components/reorder/utils.mjs +1 -1
  9. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/index.mjs +1 -2
  10. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -2
  11. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +1 -1
  12. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
  13. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +4 -7
  14. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +3 -1
  15. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +5 -4
  16. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +1 -2
  17. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
  18. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +3 -6
  19. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
  20. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +1 -2
  21. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +9 -2
  22. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
  23. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +2 -2
  24. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
  25. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +3 -4
  26. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +2 -1
  27. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -5
  28. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +1 -3
  29. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +4 -5
  30. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +2 -1
  31. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
  32. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
  33. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
  34. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +27 -7
  35. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +2 -1
  36. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/VisualElement.mjs +4 -5
  37. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +1 -2
  38. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
  39. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +3 -3
  40. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +1 -1
  41. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +2 -1
  42. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +1 -1
  43. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
  44. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +3 -18
  45. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -2
  46. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +2 -3
  47. package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/html/utils/parse-transform.mjs +82 -0
  48. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +1 -1
  49. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +1 -1
  50. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +2 -1
  51. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +4 -3
  52. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/setters.mjs +1 -1
  53. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/delay.mjs +3 -4
  54. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
  55. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
  56. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
  57. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
  58. package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +2 -2
  59. package/dist/es/features/gestures/drag/index.mjs +2 -2
  60. package/dist/es/features/gestures/focus/index.mjs +1 -1
  61. package/dist/es/features/gestures/hover/index.mjs +1 -3
  62. package/dist/es/features/gestures/in-view/index.mjs +2 -2
  63. package/dist/es/features/gestures/pan/PanSession.mjs +3 -3
  64. package/dist/es/features/gestures/pan/index.mjs +3 -3
  65. package/dist/es/features/gestures/press/index.mjs +1 -3
  66. package/dist/es/features/layout/config.mjs +2 -2
  67. package/dist/es/features/layout/layout.mjs +2 -2
  68. package/dist/es/features/layout/projection.mjs +2 -2
  69. package/dist/es/index.mjs +30 -39
  70. package/dist/es/state/animate-updates.mjs +4 -4
  71. package/dist/es/state/create-visual-element.mjs +2 -2
  72. package/dist/es/state/motion-state.mjs +2 -2
  73. package/dist/es/state/utils.mjs +0 -1
  74. package/dist/es/types/framer-motion.d.ts +0 -12
  75. package/dist/es/utils/use-animation-frame.mjs +1 -1
  76. package/dist/es/utils/use-in-view.mjs +6 -3
  77. package/dist/es/value/use-combine-values.mjs +1 -2
  78. package/dist/es/value/use-computed.mjs +1 -1
  79. package/dist/es/value/use-motion-value-event.d.ts +1 -2
  80. package/dist/es/value/use-scroll.d.ts +4 -4
  81. package/dist/es/value/use-scroll.mjs +26 -24
  82. package/dist/es/value/use-spring.mjs +2 -3
  83. package/dist/es/value/use-time.d.ts +1 -1
  84. package/dist/es/value/use-time.mjs +1 -1
  85. package/dist/es/value/use-transform.mjs +3 -5
  86. package/dist/es/value/use-velocity.mjs +1 -2
  87. package/package.json +4 -3
  88. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/batcher.mjs +0 -63
  89. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs +0 -10
  90. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/index-legacy.mjs +0 -11
  91. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -6
  92. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/order.mjs +0 -17
  93. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/render-step.mjs +0 -70
  94. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -21
  95. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/stats/buffer.mjs +0 -7
  96. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -7
  97. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs +0 -282
  98. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -79
  99. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -9
  100. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -15
  101. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +0 -17
  102. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -6
  103. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -6
  104. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +0 -81
  105. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -7
  106. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -37
  107. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +0 -13
  108. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -11
  109. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/hover.mjs +0 -30
  110. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/index.mjs +0 -74
  111. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -13
  112. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -32
  113. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -4
  114. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/capture-pointer.mjs +0 -12
  115. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -12
  116. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -10
  117. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -15
  118. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -4
  119. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/resolve-elements.mjs +0 -17
  120. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -6
  121. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -12
  122. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/memo.mjs +0 -13
  123. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +0 -6
  124. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
  125. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
  126. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
  127. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +0 -0
  128. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
  129. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
  130. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
  131. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
  132. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
  133. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
  134. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
  135. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
  136. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
  137. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
  138. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
  139. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
  140. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
  141. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
  142. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
  143. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
  144. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
  145. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
  146. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
  147. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/back.mjs +0 -0
  148. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
  149. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
  150. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
  151. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
  152. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
  153. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
  154. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
  155. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
  156. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
  157. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
  158. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
  159. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
  160. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
  161. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
  162. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
  163. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
  164. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
  165. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
  166. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
  167. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
  168. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
  169. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
  170. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -0
  171. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
  172. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
  173. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
  174. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
  175. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
  176. package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +1 -1
  177. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
  178. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
  179. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
  180. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
  181. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
  182. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
  183. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
  184. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
  185. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
  186. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
  187. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
  188. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
  189. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
  190. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
  191. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
  192. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
  193. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
  194. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
  195. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
  196. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
  197. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
  198. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
  199. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
  200. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
  201. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
  202. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
  203. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
  204. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
  205. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
  206. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
  207. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -0
  208. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
  209. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
  210. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/measure.mjs +0 -0
  211. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
  212. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
  213. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
  214. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
  215. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
  216. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
  217. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
  218. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
  219. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
  220. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
  221. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
  222. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
  223. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
  224. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
  225. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
  226. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
  227. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
  228. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
  229. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
  230. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
  231. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
  232. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
  233. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
  234. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
  235. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
  236. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
  237. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
  238. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
  239. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
  240. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
  241. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
  242. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
  243. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
  244. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
  245. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
  246. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
  247. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
  248. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
  249. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
  250. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
  251. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
  252. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
  253. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
  254. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
  255. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
  256. /package/dist/es/external/.pnpm/{framer-motion@12.4.10 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
  257. /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/array.mjs +0 -0
  258. /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/errors.mjs +0 -0
  259. /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/memo.mjs +0 -0
  260. /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/noop.mjs +0 -0
  261. /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/progress.mjs +0 -0
  262. /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/subscription-manager.mjs +0 -0
  263. /package/dist/es/external/.pnpm/{motion-utils@12.4.10 → motion-utils@12.5.0}/external/motion-utils/dist/es/time-conversion.mjs +0 -0
  264. /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/velocity-per-second.mjs +0 -0
  265. /package/dist/es/external/.pnpm/{framer-motion@12.4.10/external/framer-motion/dist/es/utils → motion-utils@12.5.0/external/motion-utils/dist/es}/warn-once.mjs +0 -0
@@ -5,8 +5,8 @@ export interface UseScrollOptions extends Omit<ScrollInfoOptions, 'container' |
5
5
  target?: Ref<HTMLElement | null>;
6
6
  }
7
7
  export declare function useScroll({ container, target, ...options }?: UseScrollOptions): {
8
- scrollX: import('framer-motion/dom').MotionValue<number>;
9
- scrollY: import('framer-motion/dom').MotionValue<number>;
10
- scrollXProgress: import('framer-motion/dom').MotionValue<number>;
11
- scrollYProgress: import('framer-motion/dom').MotionValue<number>;
8
+ scrollX: import('motion-dom').MotionValue<number>;
9
+ scrollY: import('motion-dom').MotionValue<number>;
10
+ scrollXProgress: import('motion-dom').MotionValue<number>;
11
+ scrollYProgress: import('motion-dom').MotionValue<number>;
12
12
  };
@@ -1,7 +1,7 @@
1
- import { onMounted, onUnmounted, watch } from "vue";
1
+ import { onMounted, watch } from "vue";
2
2
  import { warning } from "hey-listen";
3
- import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
4
- import { scroll } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/dom/scroll/index.mjs";
3
+ import { scroll } from "../external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/scroll/index.mjs";
4
+ import { motionValue } from "motion-dom";
5
5
  function refWarning(name, ref) {
6
6
  warning(
7
7
  Boolean(!ref || ref.value),
@@ -22,32 +22,34 @@ function useScroll({
22
22
  ...options
23
23
  } = {}) {
24
24
  const values = createScrollMotionValues();
25
- let cleanup;
26
- const setupScroll = () => {
27
- cleanup == null ? void 0 : cleanup();
28
- cleanup = scroll(
29
- (_progress, { x, y }) => {
30
- values.scrollX.set(x.current);
31
- values.scrollXProgress.set(x.progress);
32
- values.scrollY.set(y.current);
33
- values.scrollYProgress.set(y.progress);
34
- },
35
- {
36
- ...options,
37
- container: (container == null ? void 0 : container.value) ?? void 0,
38
- target: (target == null ? void 0 : target.value) ?? void 0
39
- }
40
- );
41
- };
42
25
  onMounted(() => {
43
26
  refWarning("target", target);
44
27
  refWarning("container", container);
45
- setupScroll();
46
28
  });
47
- onUnmounted(() => cleanup == null ? void 0 : cleanup());
48
29
  watch(
49
- () => [container == null ? void 0 : container.value, target == null ? void 0 : target.value, options.offset],
50
- setupScroll
30
+ [container, target, () => options.offset],
31
+ (n, o, onCleanup) => {
32
+ const cleanup = scroll(
33
+ (_progress, { x, y }) => {
34
+ values.scrollX.set(x.current);
35
+ values.scrollXProgress.set(x.progress);
36
+ values.scrollY.set(y.current);
37
+ values.scrollYProgress.set(y.progress);
38
+ },
39
+ {
40
+ ...options,
41
+ container: (container == null ? void 0 : container.value) ?? void 0,
42
+ target: (target == null ? void 0 : target.value) ?? void 0
43
+ }
44
+ );
45
+ onCleanup(() => {
46
+ cleanup();
47
+ });
48
+ },
49
+ {
50
+ immediate: true,
51
+ flush: "post"
52
+ }
51
53
  );
52
54
  return values;
53
55
  }
@@ -1,7 +1,6 @@
1
1
  import { watch, isRef } from "vue";
2
- import { animateValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs";
3
- import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
4
- import { frame, frameData } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
2
+ import { animateValue } from "../external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs";
3
+ import { motionValue, frame, frameData } from "motion-dom";
5
4
  import { isMotionValue } from "../utils/motion-value.mjs";
6
5
  function toNumber(v) {
7
6
  if (typeof v === "number")
@@ -1 +1 @@
1
- export declare function useTime(): import('framer-motion/dom').MotionValue<number>;
1
+ export declare function useTime(): import('motion-dom').MotionValue<number>;
@@ -1,5 +1,5 @@
1
1
  import { useAnimationFrame } from "../utils/use-animation-frame.mjs";
2
- import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
2
+ import { motionValue } from "motion-dom";
3
3
  function useTime() {
4
4
  const time = motionValue(0);
5
5
  useAnimationFrame((t) => time.set(t));
@@ -1,14 +1,12 @@
1
1
  import { useComputed } from "./use-computed.mjs";
2
2
  import { useCombineMotionValues } from "./use-combine-values.mjs";
3
- import { computed, isRef } from "vue";
4
- import { transform } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/utils/transform.mjs";
3
+ import { isRef, computed } from "vue";
4
+ import { transform } from "../external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/utils/transform.mjs";
5
5
  function useTransform(input, inputRangeOrTransformer, outputRange, options) {
6
6
  if (typeof input === "function") {
7
7
  return useComputed(input);
8
8
  }
9
- const transformer = computed(() => {
10
- return typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(isRef(inputRangeOrTransformer) ? inputRangeOrTransformer.value : inputRangeOrTransformer, outputRange, options);
11
- });
9
+ const transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : isRef(inputRangeOrTransformer) ? computed(() => transform(inputRangeOrTransformer.value, outputRange, options)) : transform(inputRangeOrTransformer, outputRange, options);
12
10
  return Array.isArray(input) ? useListTransform(
13
11
  input,
14
12
  transformer
@@ -1,6 +1,5 @@
1
1
  import { useMotionValueEvent } from "./use-motion-value-event.mjs";
2
- import { motionValue } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/value/index.mjs";
3
- import { frame } from "../external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/frame.mjs";
2
+ import { motionValue, frame } from "motion-dom";
4
3
  function useVelocity(value) {
5
4
  const velocity = motionValue(value.getVelocity());
6
5
  const updateVelocity = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion-v",
3
- "version": "0.13.0-beta.1",
3
+ "version": "0.13.0-beta.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -67,8 +67,9 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@vueuse/core": "^10.0.0",
70
- "framer-motion": "12.4.10",
71
- "hey-listen": "^1.0.8"
70
+ "framer-motion": "12.5.0",
71
+ "hey-listen": "^1.0.8",
72
+ "motion-dom": "^12.5.0"
72
73
  },
73
74
  "devDependencies": {
74
75
  "vue": "3.4.38"
@@ -1,63 +0,0 @@
1
- import { stepsOrder } from "./order.mjs";
2
- import { createRenderStep } from "./render-step.mjs";
3
- const maxElapsed = 40;
4
- function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
5
- let runNextFrame = false;
6
- let useDefaultElapsed = true;
7
- const state = {
8
- delta: 0,
9
- timestamp: 0,
10
- isProcessing: false
11
- };
12
- const flagRunNextFrame = () => runNextFrame = true;
13
- const steps = stepsOrder.reduce((acc, key) => {
14
- acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : void 0);
15
- return acc;
16
- }, {});
17
- const { read, resolveKeyframes, update, preRender, render, postRender } = steps;
18
- const processBatch = () => {
19
- const timestamp = performance.now();
20
- runNextFrame = false;
21
- {
22
- state.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);
23
- }
24
- state.timestamp = timestamp;
25
- state.isProcessing = true;
26
- read.process(state);
27
- resolveKeyframes.process(state);
28
- update.process(state);
29
- preRender.process(state);
30
- render.process(state);
31
- postRender.process(state);
32
- state.isProcessing = false;
33
- if (runNextFrame && allowKeepAlive) {
34
- useDefaultElapsed = false;
35
- scheduleNextBatch(processBatch);
36
- }
37
- };
38
- const wake = () => {
39
- runNextFrame = true;
40
- useDefaultElapsed = true;
41
- if (!state.isProcessing) {
42
- scheduleNextBatch(processBatch);
43
- }
44
- };
45
- const schedule = stepsOrder.reduce((acc, key) => {
46
- const step = steps[key];
47
- acc[key] = (process, keepAlive = false, immediate = false) => {
48
- if (!runNextFrame)
49
- wake();
50
- return step.schedule(process, keepAlive, immediate);
51
- };
52
- return acc;
53
- }, {});
54
- const cancel = (process) => {
55
- for (let i = 0; i < stepsOrder.length; i++) {
56
- steps[stepsOrder[i]].cancel(process);
57
- }
58
- };
59
- return { schedule, cancel, state, steps };
60
- }
61
- export {
62
- createRenderBatcher
63
- };
@@ -1,10 +0,0 @@
1
- import "../../../../../../motion-utils@12.4.10/external/motion-utils/dist/es/errors.mjs";
2
- import { noop } from "../../../../../../motion-utils@12.4.10/external/motion-utils/dist/es/noop.mjs";
3
- import { createRenderBatcher } from "./batcher.mjs";
4
- const { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps } = createRenderBatcher(typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : noop, true);
5
- export {
6
- cancelFrame,
7
- frame,
8
- frameData,
9
- frameSteps
10
- };
@@ -1,11 +0,0 @@
1
- import { stepsOrder } from "./order.mjs";
2
- import { frame, cancelFrame } from "./frame.mjs";
3
- const sync = frame;
4
- const cancelSync = stepsOrder.reduce((acc, key) => {
5
- acc[key] = (process) => cancelFrame(process);
6
- return acc;
7
- }, {});
8
- export {
9
- cancelSync,
10
- sync
11
- };
@@ -1,6 +0,0 @@
1
- import { createRenderBatcher } from "./batcher.mjs";
2
- const { schedule: microtask, cancel: cancelMicrotask } = createRenderBatcher(queueMicrotask, false);
3
- export {
4
- cancelMicrotask,
5
- microtask
6
- };
@@ -1,17 +0,0 @@
1
- const stepsOrder = [
2
- "read",
3
- // Read
4
- "resolveKeyframes",
5
- // Write/Read/Write/Read
6
- "update",
7
- // Compute
8
- "preRender",
9
- // Compute
10
- "render",
11
- // Write
12
- "postRender"
13
- // Compute
14
- ];
15
- export {
16
- stepsOrder
17
- };
@@ -1,70 +0,0 @@
1
- import { statsBuffer } from "../stats/buffer.mjs";
2
- function createRenderStep(runNextFrame, stepName) {
3
- let thisFrame = /* @__PURE__ */ new Set();
4
- let nextFrame = /* @__PURE__ */ new Set();
5
- let isProcessing = false;
6
- let flushNextFrame = false;
7
- const toKeepAlive = /* @__PURE__ */ new WeakSet();
8
- let latestFrameData = {
9
- delta: 0,
10
- timestamp: 0,
11
- isProcessing: false
12
- };
13
- let numCalls = 0;
14
- function triggerCallback(callback) {
15
- if (toKeepAlive.has(callback)) {
16
- step.schedule(callback);
17
- runNextFrame();
18
- }
19
- numCalls++;
20
- callback(latestFrameData);
21
- }
22
- const step = {
23
- /**
24
- * Schedule a process to run on the next frame.
25
- */
26
- schedule: (callback, keepAlive = false, immediate = false) => {
27
- const addToCurrentFrame = immediate && isProcessing;
28
- const queue = addToCurrentFrame ? thisFrame : nextFrame;
29
- if (keepAlive)
30
- toKeepAlive.add(callback);
31
- if (!queue.has(callback))
32
- queue.add(callback);
33
- return callback;
34
- },
35
- /**
36
- * Cancel the provided callback from running on the next frame.
37
- */
38
- cancel: (callback) => {
39
- nextFrame.delete(callback);
40
- toKeepAlive.delete(callback);
41
- },
42
- /**
43
- * Execute all schedule callbacks.
44
- */
45
- process: (frameData) => {
46
- latestFrameData = frameData;
47
- if (isProcessing) {
48
- flushNextFrame = true;
49
- return;
50
- }
51
- isProcessing = true;
52
- [thisFrame, nextFrame] = [nextFrame, thisFrame];
53
- thisFrame.forEach(triggerCallback);
54
- if (stepName && statsBuffer.value) {
55
- statsBuffer.value.frameloop[stepName].push(numCalls);
56
- }
57
- numCalls = 0;
58
- thisFrame.clear();
59
- isProcessing = false;
60
- if (flushNextFrame) {
61
- flushNextFrame = false;
62
- step.process(frameData);
63
- }
64
- }
65
- };
66
- return step;
67
- }
68
- export {
69
- createRenderStep
70
- };
@@ -1,21 +0,0 @@
1
- import { MotionGlobalConfig } from "../utils/GlobalConfig.mjs";
2
- import { frameData } from "./frame.mjs";
3
- let now;
4
- function clearTime() {
5
- now = void 0;
6
- }
7
- const time = {
8
- now: () => {
9
- if (now === void 0) {
10
- time.set(frameData.isProcessing || MotionGlobalConfig.useManualTiming ? frameData.timestamp : performance.now());
11
- }
12
- return now;
13
- },
14
- set: (newTime) => {
15
- now = newTime;
16
- queueMicrotask(clearTime);
17
- }
18
- };
19
- export {
20
- time
21
- };
@@ -1,7 +0,0 @@
1
- const statsBuffer = {
2
- value: null,
3
- addProjectionMetrics: null
4
- };
5
- export {
6
- statsBuffer
7
- };
@@ -1,7 +0,0 @@
1
- const MotionGlobalConfig = {
2
- skipAnimations: false,
3
- useManualTiming: false
4
- };
5
- export {
6
- MotionGlobalConfig
7
- };
@@ -1,282 +0,0 @@
1
- import { time } from "../frameloop/sync-time.mjs";
2
- import { SubscriptionManager } from "../utils/subscription-manager.mjs";
3
- import { velocityPerSecond } from "../utils/velocity-per-second.mjs";
4
- import { warnOnce } from "../utils/warn-once.mjs";
5
- import { frame } from "../frameloop/frame.mjs";
6
- const MAX_VELOCITY_DELTA = 30;
7
- const isFloat = (value) => {
8
- return !isNaN(parseFloat(value));
9
- };
10
- const collectMotionValues = {
11
- current: void 0
12
- };
13
- class MotionValue {
14
- /**
15
- * @param init - The initiating value
16
- * @param config - Optional configuration options
17
- *
18
- * - `transformer`: A function to transform incoming values with.
19
- *
20
- * @internal
21
- */
22
- constructor(init, options = {}) {
23
- this.version = "12.4.10";
24
- this.canTrackVelocity = null;
25
- this.events = {};
26
- this.updateAndNotify = (v, render = true) => {
27
- const currentTime = time.now();
28
- if (this.updatedAt !== currentTime) {
29
- this.setPrevFrameValue();
30
- }
31
- this.prev = this.current;
32
- this.setCurrent(v);
33
- if (this.current !== this.prev && this.events.change) {
34
- this.events.change.notify(this.current);
35
- }
36
- if (render && this.events.renderRequest) {
37
- this.events.renderRequest.notify(this.current);
38
- }
39
- };
40
- this.hasAnimated = false;
41
- this.setCurrent(init);
42
- this.owner = options.owner;
43
- }
44
- setCurrent(current) {
45
- this.current = current;
46
- this.updatedAt = time.now();
47
- if (this.canTrackVelocity === null && current !== void 0) {
48
- this.canTrackVelocity = isFloat(this.current);
49
- }
50
- }
51
- setPrevFrameValue(prevFrameValue = this.current) {
52
- this.prevFrameValue = prevFrameValue;
53
- this.prevUpdatedAt = this.updatedAt;
54
- }
55
- /**
56
- * Adds a function that will be notified when the `MotionValue` is updated.
57
- *
58
- * It returns a function that, when called, will cancel the subscription.
59
- *
60
- * When calling `onChange` inside a React component, it should be wrapped with the
61
- * `useEffect` hook. As it returns an unsubscribe function, this should be returned
62
- * from the `useEffect` function to ensure you don't add duplicate subscribers..
63
- *
64
- * ```jsx
65
- * export const MyComponent = () => {
66
- * const x = useMotionValue(0)
67
- * const y = useMotionValue(0)
68
- * const opacity = useMotionValue(1)
69
- *
70
- * useEffect(() => {
71
- * function updateOpacity() {
72
- * const maxXY = Math.max(x.get(), y.get())
73
- * const newOpacity = transform(maxXY, [0, 100], [1, 0])
74
- * opacity.set(newOpacity)
75
- * }
76
- *
77
- * const unsubscribeX = x.on("change", updateOpacity)
78
- * const unsubscribeY = y.on("change", updateOpacity)
79
- *
80
- * return () => {
81
- * unsubscribeX()
82
- * unsubscribeY()
83
- * }
84
- * }, [])
85
- *
86
- * return <motion.div style={{ x }} />
87
- * }
88
- * ```
89
- *
90
- * @param subscriber - A function that receives the latest value.
91
- * @returns A function that, when called, will cancel this subscription.
92
- *
93
- * @deprecated
94
- */
95
- onChange(subscription) {
96
- if (process.env.NODE_ENV !== "production") {
97
- warnOnce(false, `value.onChange(callback) is deprecated. Switch to value.on("change", callback).`);
98
- }
99
- return this.on("change", subscription);
100
- }
101
- on(eventName, callback) {
102
- if (!this.events[eventName]) {
103
- this.events[eventName] = new SubscriptionManager();
104
- }
105
- const unsubscribe = this.events[eventName].add(callback);
106
- if (eventName === "change") {
107
- return () => {
108
- unsubscribe();
109
- frame.read(() => {
110
- if (!this.events.change.getSize()) {
111
- this.stop();
112
- }
113
- });
114
- };
115
- }
116
- return unsubscribe;
117
- }
118
- clearListeners() {
119
- for (const eventManagers in this.events) {
120
- this.events[eventManagers].clear();
121
- }
122
- }
123
- /**
124
- * Attaches a passive effect to the `MotionValue`.
125
- *
126
- * @internal
127
- */
128
- attach(passiveEffect, stopPassiveEffect) {
129
- this.passiveEffect = passiveEffect;
130
- this.stopPassiveEffect = stopPassiveEffect;
131
- }
132
- /**
133
- * Sets the state of the `MotionValue`.
134
- *
135
- * @remarks
136
- *
137
- * ```jsx
138
- * const x = useMotionValue(0)
139
- * x.set(10)
140
- * ```
141
- *
142
- * @param latest - Latest value to set.
143
- * @param render - Whether to notify render subscribers. Defaults to `true`
144
- *
145
- * @public
146
- */
147
- set(v, render = true) {
148
- if (!render || !this.passiveEffect) {
149
- this.updateAndNotify(v, render);
150
- } else {
151
- this.passiveEffect(v, this.updateAndNotify);
152
- }
153
- }
154
- setWithVelocity(prev, current, delta) {
155
- this.set(current);
156
- this.prev = void 0;
157
- this.prevFrameValue = prev;
158
- this.prevUpdatedAt = this.updatedAt - delta;
159
- }
160
- /**
161
- * Set the state of the `MotionValue`, stopping any active animations,
162
- * effects, and resets velocity to `0`.
163
- */
164
- jump(v, endAnimation = true) {
165
- this.updateAndNotify(v);
166
- this.prev = v;
167
- this.prevUpdatedAt = this.prevFrameValue = void 0;
168
- endAnimation && this.stop();
169
- if (this.stopPassiveEffect)
170
- this.stopPassiveEffect();
171
- }
172
- /**
173
- * Returns the latest state of `MotionValue`
174
- *
175
- * @returns - The latest state of `MotionValue`
176
- *
177
- * @public
178
- */
179
- get() {
180
- if (collectMotionValues.current) {
181
- collectMotionValues.current.push(this);
182
- }
183
- return this.current;
184
- }
185
- /**
186
- * @public
187
- */
188
- getPrevious() {
189
- return this.prev;
190
- }
191
- /**
192
- * Returns the latest velocity of `MotionValue`
193
- *
194
- * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
195
- *
196
- * @public
197
- */
198
- getVelocity() {
199
- const currentTime = time.now();
200
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {
201
- return 0;
202
- }
203
- const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);
204
- return velocityPerSecond(parseFloat(this.current) - parseFloat(this.prevFrameValue), delta);
205
- }
206
- /**
207
- * Registers a new animation to control this `MotionValue`. Only one
208
- * animation can drive a `MotionValue` at one time.
209
- *
210
- * ```jsx
211
- * value.start()
212
- * ```
213
- *
214
- * @param animation - A function that starts the provided animation
215
- *
216
- * @internal
217
- */
218
- start(startAnimation) {
219
- this.stop();
220
- return new Promise((resolve) => {
221
- this.hasAnimated = true;
222
- this.animation = startAnimation(resolve);
223
- if (this.events.animationStart) {
224
- this.events.animationStart.notify();
225
- }
226
- }).then(() => {
227
- if (this.events.animationComplete) {
228
- this.events.animationComplete.notify();
229
- }
230
- this.clearAnimation();
231
- });
232
- }
233
- /**
234
- * Stop the currently active animation.
235
- *
236
- * @public
237
- */
238
- stop() {
239
- if (this.animation) {
240
- this.animation.stop();
241
- if (this.events.animationCancel) {
242
- this.events.animationCancel.notify();
243
- }
244
- }
245
- this.clearAnimation();
246
- }
247
- /**
248
- * Returns `true` if this value is currently animating.
249
- *
250
- * @public
251
- */
252
- isAnimating() {
253
- return !!this.animation;
254
- }
255
- clearAnimation() {
256
- delete this.animation;
257
- }
258
- /**
259
- * Destroy and clean up subscribers to this `MotionValue`.
260
- *
261
- * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
262
- * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
263
- * created a `MotionValue` via the `motionValue` function.
264
- *
265
- * @public
266
- */
267
- destroy() {
268
- this.clearListeners();
269
- this.stop();
270
- if (this.stopPassiveEffect) {
271
- this.stopPassiveEffect();
272
- }
273
- }
274
- }
275
- function motionValue(init, options) {
276
- return new MotionValue(init, options);
277
- }
278
- export {
279
- MotionValue,
280
- collectMotionValues,
281
- motionValue
282
- };