motion-v 0.11.0 → 0.11.2

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 (274) hide show
  1. package/dist/cjs/index.js +315 -192
  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/RowValue.d.ts +3 -1
  5. package/dist/es/components/animate-presence/AnimatePresence.d.ts +1 -1
  6. package/dist/es/components/animate-presence/AnimatePresence.vue.mjs +2 -2
  7. package/dist/es/components/animate-presence/use-pop-layout.mjs +1 -1
  8. package/dist/es/components/motion/Motion.d.ts +4 -2
  9. package/dist/es/components/motion/Motion.vue.mjs +3 -2
  10. package/dist/es/components/motion/Primitive.mjs +1 -1
  11. package/dist/es/components/motion-config/MotionConfig.d.ts +2 -2
  12. package/dist/es/components/reorder/Item.d.ts +6 -6
  13. package/dist/es/components/reorder/utils.mjs +1 -1
  14. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/index.mjs +3 -3
  15. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -2
  16. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
  17. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +14 -11
  18. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +2 -2
  19. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +7 -7
  20. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
  21. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +8 -8
  22. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
  23. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -2
  24. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +4 -3
  25. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +1 -1
  26. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -2
  27. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +6 -0
  28. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/spring/find.mjs +2 -2
  29. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/spring/index.mjs +4 -4
  30. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +4 -4
  31. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +2 -2
  32. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/create.mjs +5 -5
  33. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -2
  34. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/utils/map.mjs +3 -3
  35. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/batcher.mjs +6 -18
  36. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/frame.mjs +2 -2
  37. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/index-legacy.mjs +1 -1
  38. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/frameloop/order.mjs +17 -0
  39. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/render-step.mjs +8 -1
  40. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
  41. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +22 -35
  42. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +14 -0
  43. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/VisualElement.mjs +6 -2
  44. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -2
  45. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
  46. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -2
  47. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
  48. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +3 -3
  49. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +12 -0
  50. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/render/svg/utils/measure.mjs +15 -0
  51. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
  52. package/dist/es/external/.pnpm/framer-motion@12.4.10/external/framer-motion/dist/es/stats/buffer.mjs +7 -0
  53. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/delay.mjs +2 -2
  54. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/interpolate.mjs +3 -3
  55. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/color.mjs +1 -1
  56. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
  57. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/offsets/fill.mjs +2 -2
  58. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/index.mjs +1 -1
  59. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +2 -2
  60. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +3 -3
  61. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +2 -2
  62. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/hover.mjs +11 -11
  63. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/press/index.mjs +74 -0
  64. package/dist/es/external/.pnpm/motion-dom@12.4.10/external/motion-dom/dist/es/gestures/utils/capture-pointer.mjs +12 -0
  65. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/resolve-elements.mjs +1 -1
  66. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/memo.mjs +2 -2
  67. package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +2 -2
  68. package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.4.10}/external/motion-utils/dist/es/memo.mjs +1 -0
  69. package/dist/es/external/.pnpm/motion-utils@12.4.10/external/motion-utils/dist/es/noop.mjs +4 -0
  70. package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.4.10}/external/motion-utils/dist/es/progress.mjs +1 -1
  71. package/dist/es/external/.pnpm/motion-utils@12.4.10/external/motion-utils/dist/es/time-conversion.mjs +6 -0
  72. package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +2 -2
  73. package/dist/es/features/gestures/drag/index.mjs +2 -2
  74. package/dist/es/features/gestures/focus/index.mjs +1 -1
  75. package/dist/es/features/gestures/hover/index.mjs +5 -5
  76. package/dist/es/features/gestures/in-view/index.mjs +4 -4
  77. package/dist/es/features/gestures/pan/PanSession.mjs +3 -3
  78. package/dist/es/features/gestures/pan/index.mjs +3 -3
  79. package/dist/es/features/gestures/press/index.mjs +4 -4
  80. package/dist/es/features/layout/config.mjs +2 -2
  81. package/dist/es/features/layout/layout.mjs +2 -2
  82. package/dist/es/features/layout/projection.mjs +2 -2
  83. package/dist/es/features/svg.mjs +1 -1
  84. package/dist/es/index.mjs +38 -34
  85. package/dist/es/state/animate-updates.d.ts +2 -1
  86. package/dist/es/state/animate-updates.mjs +44 -30
  87. package/dist/es/state/create-visual-element.mjs +2 -2
  88. package/dist/es/state/motion-state.d.ts +10 -0
  89. package/dist/es/state/motion-state.mjs +30 -7
  90. package/dist/es/state/utils.mjs +5 -1
  91. package/dist/es/utils/use-animation-frame.mjs +1 -1
  92. package/dist/es/utils/use-in-view.mjs +1 -1
  93. package/dist/es/value/use-combine-values.mjs +2 -2
  94. package/dist/es/value/use-computed.mjs +1 -1
  95. package/dist/es/value/use-scroll.mjs +2 -2
  96. package/dist/es/value/use-spring.d.ts +2 -1
  97. package/dist/es/value/use-spring.mjs +12 -6
  98. package/dist/es/value/use-time.mjs +1 -1
  99. package/dist/es/value/use-transform.mjs +12 -4
  100. package/dist/es/value/use-velocity.mjs +2 -2
  101. package/package.json +5 -16
  102. package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -6
  103. package/dist/es/external/.pnpm/framer-motion@11.16.6/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -8
  104. package/dist/es/external/.pnpm/motion-dom@11.16.4/external/motion-dom/dist/es/gestures/press/index.mjs +0 -51
  105. package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/noop.mjs +0 -4
  106. package/dist/es/external/.pnpm/motion-utils@11.16.0/external/motion-utils/dist/es/time-conversion.mjs +0 -6
  107. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/sequence.mjs +0 -0
  108. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animate/single-value.mjs +0 -0
  109. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -0
  110. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +0 -0
  111. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
  112. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/inertia.mjs +0 -0
  113. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -0
  114. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/spring/defaults.mjs +0 -0
  115. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -0
  116. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
  117. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
  118. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
  119. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -0
  120. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -0
  121. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
  122. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
  123. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
  124. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -0
  125. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -0
  126. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
  127. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
  128. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
  129. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-none.mjs +0 -0
  130. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
  131. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/animation/utils/stagger.mjs +0 -0
  132. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/anticipate.mjs +0 -0
  133. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/back.mjs +0 -0
  134. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/circ.mjs +0 -0
  135. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/ease.mjs +0 -0
  136. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -0
  137. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -0
  138. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/steps.mjs +0 -0
  139. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -0
  140. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -0
  141. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
  142. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/microtask.mjs +0 -0
  143. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/frameloop/sync-time.mjs +0 -0
  144. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
  145. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -0
  146. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
  147. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
  148. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -0
  149. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -0
  150. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -0
  151. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
  152. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
  153. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
  154. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
  155. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
  156. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/shared/stack.mjs +0 -0
  157. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -0
  158. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -0
  159. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/styles/transform.mjs +0 -0
  160. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
  161. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
  162. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
  163. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -0
  164. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -0
  165. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
  166. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
  167. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -0
  168. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
  169. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -0
  170. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
  171. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
  172. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
  173. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -0
  174. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -0
  175. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
  176. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -0
  177. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
  178. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -0
  179. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -0
  180. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -0
  181. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -0
  182. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -0
  183. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -0
  184. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +0 -0
  185. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -0
  186. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -0
  187. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/transform.mjs +0 -0
  188. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -0
  189. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -0
  190. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -0
  191. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -0
  192. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -0
  193. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/keys-position.mjs +0 -0
  194. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/keys-transform.mjs +0 -0
  195. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -0
  196. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
  197. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -0
  198. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
  199. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/store.mjs +0 -0
  200. package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
  201. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
  202. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
  203. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/path.mjs +0 -0
  204. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
  205. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -0
  206. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -0
  207. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -0
  208. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
  209. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -0
  210. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
  211. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
  212. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
  213. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -0
  214. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/setters.mjs +0 -0
  215. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
  216. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -0
  217. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/array.mjs +0 -0
  218. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/clamp.mjs +0 -0
  219. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
  220. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -0
  221. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
  222. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -0
  223. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -0
  224. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/immediate.mjs +0 -0
  225. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/index.mjs +0 -0
  226. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/number.mjs +0 -0
  227. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/mix/visibility.mjs +0 -0
  228. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/offsets/default.mjs +0 -0
  229. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/offsets/time.mjs +0 -0
  230. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/pipe.mjs +0 -0
  231. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
  232. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
  233. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -0
  234. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/subscription-manager.mjs +0 -0
  235. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/transform.mjs +0 -0
  236. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -0
  237. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/warn-once.mjs +0 -0
  238. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/utils/wrap.mjs +0 -0
  239. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/hex.mjs +0 -0
  240. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/hsla.mjs +0 -0
  241. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/index.mjs +0 -0
  242. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/rgba.mjs +0 -0
  243. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/color/utils.mjs +0 -0
  244. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/complex/filter.mjs +0 -0
  245. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/complex/index.mjs +0 -0
  246. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/numbers/index.mjs +0 -0
  247. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/numbers/units.mjs +0 -0
  248. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/color-regex.mjs +0 -0
  249. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/float-regex.mjs +0 -0
  250. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/is-nullish.mjs +0 -0
  251. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/sanitize.mjs +0 -0
  252. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +0 -0
  253. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -0
  254. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
  255. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
  256. /package/dist/es/external/.pnpm/{framer-motion@11.16.6 → framer-motion@12.4.10}/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -0
  257. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs +0 -0
  258. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -0
  259. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
  260. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -0
  261. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -0
  262. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -0
  263. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -0
  264. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +0 -0
  265. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
  266. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
  267. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
  268. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
  269. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
  270. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
  271. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/is-bezier-definition.mjs +0 -0
  272. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -0
  273. /package/dist/es/external/.pnpm/{motion-dom@11.16.4 → motion-dom@12.4.10}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
  274. /package/dist/es/external/.pnpm/{motion-utils@11.16.0 → motion-utils@12.4.10}/external/motion-utils/dist/es/errors.mjs +0 -0
package/dist/cjs/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const core = require("@vueuse/core");
5
5
  const heyListen = require("hey-listen");
6
- const noop = (any) => any;
6
+ const noop = /* @__NO_SIDE_EFFECTS__ */ (any) => any;
7
7
  let warning = noop;
8
8
  exports.invariant = noop;
9
9
  if (process.env.NODE_ENV !== "production") {
@@ -18,6 +18,7 @@ if (process.env.NODE_ENV !== "production") {
18
18
  }
19
19
  };
20
20
  }
21
+ // @__NO_SIDE_EFFECTS__
21
22
  function memo(callback) {
22
23
  let result;
23
24
  return () => {
@@ -26,13 +27,13 @@ function memo(callback) {
26
27
  return result;
27
28
  };
28
29
  }
29
- const progress$1 = (from, to, value) => {
30
+ const progress$1 = /* @__NO_SIDE_EFFECTS__ */ (from, to, value) => {
30
31
  const toFromDifference = to - from;
31
32
  return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
32
33
  };
33
- const secondsToMilliseconds$1 = (seconds) => seconds * 1e3;
34
- const millisecondsToSeconds$1 = (milliseconds) => milliseconds / 1e3;
35
- const supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
34
+ const secondsToMilliseconds$1 = /* @__NO_SIDE_EFFECTS__ */ (seconds) => seconds * 1e3;
35
+ const millisecondsToSeconds$1 = /* @__NO_SIDE_EFFECTS__ */ (milliseconds) => milliseconds / 1e3;
36
+ const supportsScrollTimeline = /* @__PURE__ */ memo(() => window.ScrollTimeline !== void 0);
36
37
  class BaseGroupPlaybackControls {
37
38
  constructor(animations) {
38
39
  this.stop = () => this.runAll("stop");
@@ -135,7 +136,7 @@ function createGeneratorEasing(options, scale2 = 100, createGenerator) {
135
136
  ease: (progress2) => {
136
137
  return generator.next(duration * progress2).value / scale2;
137
138
  },
138
- duration: millisecondsToSeconds$1(duration)
139
+ duration: /* @__PURE__ */ millisecondsToSeconds$1(duration)
139
140
  };
140
141
  }
141
142
  function isGenerator(type) {
@@ -152,18 +153,18 @@ class NativeAnimationControls {
152
153
  get duration() {
153
154
  var _a, _b, _c;
154
155
  const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) || ((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) || 300;
155
- return millisecondsToSeconds$1(Number(durationInMs));
156
+ return /* @__PURE__ */ millisecondsToSeconds$1(Number(durationInMs));
156
157
  }
157
158
  get time() {
158
159
  var _a;
159
160
  if (this.animation) {
160
- return millisecondsToSeconds$1(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
161
+ return /* @__PURE__ */ millisecondsToSeconds$1(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
161
162
  }
162
163
  return 0;
163
164
  }
164
165
  set time(newTime) {
165
166
  if (this.animation) {
166
- this.animation.currentTime = secondsToMilliseconds$1(newTime);
167
+ this.animation.currentTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
167
168
  }
168
169
  }
169
170
  get speed() {
@@ -224,7 +225,7 @@ const supportsFlags = {
224
225
  linearEasing: void 0
225
226
  };
226
227
  function memoSupports(callback, supportsFlag) {
227
- const memoized = memo(callback);
228
+ const memoized = /* @__PURE__ */ memo(callback);
228
229
  return () => {
229
230
  var _a;
230
231
  return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized();
@@ -242,7 +243,7 @@ const generateLinearEasing = (easing, duration, resolution = 10) => {
242
243
  let points = "";
243
244
  const numPoints = Math.max(Math.round(duration / resolution), 2);
244
245
  for (let i = 0; i < numPoints; i++) {
245
- points += easing(progress$1(0, numPoints - 1, i)) + ", ";
246
+ points += easing(/* @__PURE__ */ progress$1(0, numPoints - 1, i)) + ", ";
246
247
  }
247
248
  return `linear(${points.substring(0, points.length - 2)})`;
248
249
  };
@@ -283,7 +284,7 @@ function isDragActive() {
283
284
  }
284
285
  function resolveElements(elementOrSelector, scope, selectorCache) {
285
286
  var _a;
286
- if (elementOrSelector instanceof Element) {
287
+ if (elementOrSelector instanceof EventTarget) {
287
288
  return [elementOrSelector];
288
289
  } else if (typeof elementOrSelector === "string") {
289
290
  let root = document;
@@ -306,31 +307,40 @@ function setupGesture(elementOrSelector, options) {
306
307
  const cancel = () => gestureAbortController.abort();
307
308
  return [elements, eventOptions, cancel];
308
309
  }
309
- function filterEvents$1(callback) {
310
- return (event) => {
311
- if (event.pointerType === "touch" || isDragActive())
312
- return;
313
- callback(event);
314
- };
310
+ function isValidHover(event) {
311
+ return !(event.pointerType === "touch" || isDragActive());
315
312
  }
316
313
  function hover(elementOrSelector, onHoverStart, options = {}) {
317
314
  const [elements, eventOptions, cancel] = setupGesture(elementOrSelector, options);
318
- const onPointerEnter = filterEvents$1((enterEvent) => {
315
+ const onPointerEnter = (enterEvent) => {
316
+ if (!isValidHover(enterEvent))
317
+ return;
319
318
  const { target } = enterEvent;
320
- const onHoverEnd = onHoverStart(enterEvent);
319
+ const onHoverEnd = onHoverStart(target, enterEvent);
321
320
  if (typeof onHoverEnd !== "function" || !target)
322
321
  return;
323
- const onPointerLeave = filterEvents$1((leaveEvent) => {
322
+ const onPointerLeave = (leaveEvent) => {
323
+ if (!isValidHover(leaveEvent))
324
+ return;
324
325
  onHoverEnd(leaveEvent);
325
326
  target.removeEventListener("pointerleave", onPointerLeave);
326
- });
327
+ };
327
328
  target.addEventListener("pointerleave", onPointerLeave, eventOptions);
328
- });
329
+ };
329
330
  elements.forEach((element) => {
330
331
  element.addEventListener("pointerenter", onPointerEnter, eventOptions);
331
332
  });
332
333
  return cancel;
333
334
  }
335
+ function capturePointer(event, action) {
336
+ const actionName = `${action}PointerCapture`;
337
+ if (event.target instanceof Element && actionName in event.target && event.pointerId !== void 0) {
338
+ try {
339
+ event.target[actionName](event.pointerId);
340
+ } catch (e) {
341
+ }
342
+ }
343
+ }
334
344
  const isNodeOrChild = (parent, child) => {
335
345
  if (!child) {
336
346
  return false;
@@ -389,44 +399,66 @@ const enableKeyboardPress = (focusEvent, eventOptions) => {
389
399
  function isValidPressEvent(event) {
390
400
  return isPrimaryPointer$1(event) && !isDragActive();
391
401
  }
392
- function press(elementOrSelector, onPressStart, options = {}) {
393
- const [elements, eventOptions, cancelEvents] = setupGesture(elementOrSelector, options);
402
+ function press(targetOrSelector, onPressStart, options = {}) {
403
+ const [targets, eventOptions, cancelEvents] = setupGesture(targetOrSelector, options);
394
404
  const startPress = (startEvent) => {
395
- const element = startEvent.currentTarget;
396
- if (!isValidPressEvent(startEvent) || isPressing.has(element))
405
+ const target = startEvent.currentTarget;
406
+ if (!target || !isValidPressEvent(startEvent) || isPressing.has(target))
397
407
  return;
398
- isPressing.add(element);
399
- const onPressEnd = onPressStart(startEvent);
408
+ isPressing.add(target);
409
+ capturePointer(startEvent, "set");
410
+ const onPressEnd = onPressStart(target, startEvent);
400
411
  const onPointerEnd = (endEvent, success) => {
401
- window.removeEventListener("pointerup", onPointerUp);
402
- window.removeEventListener("pointercancel", onPointerCancel);
403
- if (!isValidPressEvent(endEvent) || !isPressing.has(element)) {
412
+ target.removeEventListener("pointerup", onPointerUp);
413
+ target.removeEventListener("pointercancel", onPointerCancel);
414
+ capturePointer(endEvent, "release");
415
+ if (!isValidPressEvent(endEvent) || !isPressing.has(target)) {
404
416
  return;
405
417
  }
406
- isPressing.delete(element);
418
+ isPressing.delete(target);
407
419
  if (typeof onPressEnd === "function") {
408
420
  onPressEnd(endEvent, { success });
409
421
  }
410
422
  };
411
423
  const onPointerUp = (upEvent) => {
412
- onPointerEnd(upEvent, options.useGlobalTarget || isNodeOrChild(element, upEvent.target));
424
+ const isOutside = !upEvent.isTrusted ? false : checkOutside(upEvent, target instanceof Element ? target.getBoundingClientRect() : {
425
+ left: 0,
426
+ top: 0,
427
+ right: window.innerWidth,
428
+ bottom: window.innerHeight
429
+ });
430
+ if (isOutside) {
431
+ onPointerEnd(upEvent, false);
432
+ } else {
433
+ onPointerEnd(upEvent, !(target instanceof Element) || isNodeOrChild(target, upEvent.target));
434
+ }
413
435
  };
414
436
  const onPointerCancel = (cancelEvent) => {
415
437
  onPointerEnd(cancelEvent, false);
416
438
  };
417
- window.addEventListener("pointerup", onPointerUp, eventOptions);
418
- window.addEventListener("pointercancel", onPointerCancel, eventOptions);
439
+ target.addEventListener("pointerup", onPointerUp, eventOptions);
440
+ target.addEventListener("pointercancel", onPointerCancel, eventOptions);
441
+ target.addEventListener("lostpointercapture", onPointerCancel, eventOptions);
419
442
  };
420
- elements.forEach((element) => {
421
- if (!isElementKeyboardAccessible(element) && element.getAttribute("tabindex") === null) {
422
- element.tabIndex = 0;
443
+ targets.forEach((target) => {
444
+ target = options.useGlobalTarget ? window : target;
445
+ let canAddKeyboardAccessibility = false;
446
+ if (target instanceof HTMLElement) {
447
+ canAddKeyboardAccessibility = true;
448
+ if (!isElementKeyboardAccessible(target) && target.getAttribute("tabindex") === null) {
449
+ target.tabIndex = 0;
450
+ }
423
451
  }
424
- const target = options.useGlobalTarget ? window : element;
425
452
  target.addEventListener("pointerdown", startPress, eventOptions);
426
- element.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions), eventOptions);
453
+ if (canAddKeyboardAccessibility) {
454
+ target.addEventListener("focus", (event) => enableKeyboardPress(event, eventOptions), eventOptions);
455
+ }
427
456
  });
428
457
  return cancelEvents;
429
458
  }
459
+ function checkOutside(event, rect) {
460
+ return event.clientX < rect.left || event.clientX > rect.right || event.clientY < rect.top || event.clientY > rect.bottom;
461
+ }
430
462
  const clamp$1 = (min, max, v) => {
431
463
  if (v > max)
432
464
  return max;
@@ -475,10 +507,10 @@ const safeMin = 1e-3;
475
507
  function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
476
508
  let envelope;
477
509
  let derivative;
478
- warning(duration <= secondsToMilliseconds$1(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
510
+ warning(duration <= /* @__PURE__ */ secondsToMilliseconds$1(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
479
511
  let dampingRatio = 1 - bounce;
480
512
  dampingRatio = clamp$1(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
481
- duration = clamp$1(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds$1(duration));
513
+ duration = clamp$1(springDefaults.minDuration, springDefaults.maxDuration, /* @__PURE__ */ millisecondsToSeconds$1(duration));
482
514
  if (dampingRatio < 1) {
483
515
  envelope = (undampedFreq2) => {
484
516
  const exponentialDecay = undampedFreq2 * dampingRatio;
@@ -512,7 +544,7 @@ function findSpring({ duration = springDefaults.duration, bounce = springDefault
512
544
  }
513
545
  const initialGuess = 5 / duration;
514
546
  const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
515
- duration = secondsToMilliseconds$1(duration);
547
+ duration = /* @__PURE__ */ secondsToMilliseconds$1(duration);
516
548
  if (isNaN(undampedFreq)) {
517
549
  return {
518
550
  stiffness: springDefaults.stiffness,
@@ -589,12 +621,12 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
589
621
  const state2 = { done: false, value: origin };
590
622
  const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
591
623
  ...options,
592
- velocity: -millisecondsToSeconds$1(options.velocity || 0)
624
+ velocity: -/* @__PURE__ */ millisecondsToSeconds$1(options.velocity || 0)
593
625
  });
594
626
  const initialVelocity = velocity || 0;
595
627
  const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
596
628
  const initialDelta = target - origin;
597
- const undampedAngularFreq = millisecondsToSeconds$1(Math.sqrt(stiffness / mass));
629
+ const undampedAngularFreq = /* @__PURE__ */ millisecondsToSeconds$1(Math.sqrt(stiffness / mass));
598
630
  const isGranularScale = Math.abs(initialDelta) < 5;
599
631
  restSpeed || (restSpeed = isGranularScale ? springDefaults.restSpeed.granular : springDefaults.restSpeed.default);
600
632
  restDelta || (restDelta = isGranularScale ? springDefaults.restDelta.granular : springDefaults.restDelta.default);
@@ -622,7 +654,7 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
622
654
  if (!isResolvedFromDuration) {
623
655
  let currentVelocity = 0;
624
656
  if (dampingRatio < 1) {
625
- currentVelocity = t === 0 ? secondsToMilliseconds$1(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);
657
+ currentVelocity = t === 0 ? /* @__PURE__ */ secondsToMilliseconds$1(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);
626
658
  }
627
659
  const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
628
660
  const isBelowDisplacementThreshold = Math.abs(target - current) <= restDelta;
@@ -657,7 +689,7 @@ const mixNumber$2 = (from, to, progress2) => {
657
689
  function fillOffset(offset, remaining) {
658
690
  const min = offset[offset.length - 1];
659
691
  for (let i = 1; i <= remaining; i++) {
660
- const offsetProgress = progress$1(0, remaining, i);
692
+ const offsetProgress = /* @__PURE__ */ progress$1(0, remaining, i);
661
693
  offset.push(mixNumber$2(min, 1, offsetProgress));
662
694
  }
663
695
  }
@@ -780,7 +812,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
780
812
  }
781
813
  const springTransition = { ...remainingTransition };
782
814
  if (duration !== void 0) {
783
- springTransition.duration = secondsToMilliseconds$1(duration);
815
+ springTransition.duration = /* @__PURE__ */ secondsToMilliseconds$1(duration);
784
816
  }
785
817
  const springEasing = createGeneratorEasing(springTransition, absoluteDelta, createGenerator);
786
818
  ease2 = springEasing.ease;
@@ -844,7 +876,7 @@ function createAnimationsFromSequence(sequence, { defaultTransition = {}, ...seq
844
876
  for (let i = 0; i < valueSequence.length; i++) {
845
877
  const { at, value, easing } = valueSequence[i];
846
878
  keyframes2.push(value);
847
- valueOffset.push(progress$1(0, totalDuration, at));
879
+ valueOffset.push(/* @__PURE__ */ progress$1(0, totalDuration, at));
848
880
  valueEasing.push(easing || "easeOut");
849
881
  }
850
882
  if (valueOffset[0] !== 0) {
@@ -938,7 +970,25 @@ const MotionGlobalConfig = {
938
970
  skipAnimations: false,
939
971
  useManualTiming: false
940
972
  };
941
- function createRenderStep(runNextFrame) {
973
+ const stepsOrder = [
974
+ "read",
975
+ // Read
976
+ "resolveKeyframes",
977
+ // Write/Read/Write/Read
978
+ "update",
979
+ // Compute
980
+ "preRender",
981
+ // Compute
982
+ "render",
983
+ // Write
984
+ "postRender"
985
+ // Compute
986
+ ];
987
+ const statsBuffer = {
988
+ value: null,
989
+ addProjectionMetrics: null
990
+ };
991
+ function createRenderStep(runNextFrame, stepName) {
942
992
  let thisFrame = /* @__PURE__ */ new Set();
943
993
  let nextFrame = /* @__PURE__ */ new Set();
944
994
  let isProcessing = false;
@@ -949,11 +999,13 @@ function createRenderStep(runNextFrame) {
949
999
  timestamp: 0,
950
1000
  isProcessing: false
951
1001
  };
1002
+ let numCalls = 0;
952
1003
  function triggerCallback(callback) {
953
1004
  if (toKeepAlive.has(callback)) {
954
1005
  step.schedule(callback);
955
1006
  runNextFrame();
956
1007
  }
1008
+ numCalls++;
957
1009
  callback(latestFrameData);
958
1010
  }
959
1011
  const step = {
@@ -988,6 +1040,10 @@ function createRenderStep(runNextFrame) {
988
1040
  isProcessing = true;
989
1041
  [thisFrame, nextFrame] = [nextFrame, thisFrame];
990
1042
  thisFrame.forEach(triggerCallback);
1043
+ if (stepName && statsBuffer.value) {
1044
+ statsBuffer.value.frameloop[stepName].push(numCalls);
1045
+ }
1046
+ numCalls = 0;
991
1047
  thisFrame.clear();
992
1048
  isProcessing = false;
993
1049
  if (flushNextFrame) {
@@ -998,20 +1054,6 @@ function createRenderStep(runNextFrame) {
998
1054
  };
999
1055
  return step;
1000
1056
  }
1001
- const stepsOrder = [
1002
- "read",
1003
- // Read
1004
- "resolveKeyframes",
1005
- // Write/Read/Write/Read
1006
- "update",
1007
- // Compute
1008
- "preRender",
1009
- // Compute
1010
- "render",
1011
- // Write
1012
- "postRender"
1013
- // Compute
1014
- ];
1015
1057
  const maxElapsed$1 = 40;
1016
1058
  function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
1017
1059
  let runNextFrame = false;
@@ -1023,14 +1065,16 @@ function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
1023
1065
  };
1024
1066
  const flagRunNextFrame = () => runNextFrame = true;
1025
1067
  const steps2 = stepsOrder.reduce((acc, key) => {
1026
- acc[key] = createRenderStep(flagRunNextFrame);
1068
+ acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : void 0);
1027
1069
  return acc;
1028
1070
  }, {});
1029
1071
  const { read, resolveKeyframes, update, preRender, render, postRender } = steps2;
1030
1072
  const processBatch = () => {
1031
1073
  const timestamp = performance.now();
1032
1074
  runNextFrame = false;
1033
- state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed$1), 1);
1075
+ {
1076
+ state2.delta = useDefaultElapsed ? 1e3 / 60 : Math.max(Math.min(timestamp - state2.timestamp, maxElapsed$1), 1);
1077
+ }
1034
1078
  state2.timestamp = timestamp;
1035
1079
  state2.isProcessing = true;
1036
1080
  read.process(state2);
@@ -1137,7 +1181,7 @@ class MotionValue {
1137
1181
  * @internal
1138
1182
  */
1139
1183
  constructor(init, options = {}) {
1140
- this.version = "11.16.6";
1184
+ this.version = "12.4.10";
1141
1185
  this.canTrackVelocity = null;
1142
1186
  this.events = {};
1143
1187
  this.updateAndNotify = (v, render = true) => {
@@ -2222,8 +2266,8 @@ class BaseAnimation {
2222
2266
  const { name, type, velocity, delay: delay2, onComplete, onUpdate, isGenerator: isGenerator2 } = this.options;
2223
2267
  if (!isGenerator2 && !canAnimate(keyframes2, name, type, velocity)) {
2224
2268
  if (!delay2) {
2225
- onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(getFinalKeyframe(keyframes2, this.options, finalKeyframe));
2226
- onComplete === null || onComplete === void 0 ? void 0 : onComplete();
2269
+ onUpdate && onUpdate(getFinalKeyframe(keyframes2, this.options, finalKeyframe));
2270
+ onComplete && onComplete();
2227
2271
  this.resolveFinishedPromise();
2228
2272
  return;
2229
2273
  } else {
@@ -2545,7 +2589,7 @@ function interpolate(input, output, { clamp: isClamp = true, ease: ease2, mixer
2545
2589
  break;
2546
2590
  }
2547
2591
  }
2548
- const progressInRange = progress$1(input[i], input[i + 1], v);
2592
+ const progressInRange = /* @__PURE__ */ progress$1(input[i], input[i + 1], v);
2549
2593
  return mixers[i](progressInRange);
2550
2594
  };
2551
2595
  return isClamp ? (v) => interpolator(clamp$1(input[0], input[inputLength - 1], v)) : interpolator;
@@ -2636,10 +2680,10 @@ class MainThreadAnimation extends BaseAnimation {
2636
2680
  const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;
2637
2681
  let mapPercentToKeyframes;
2638
2682
  let mirroredGenerator;
2683
+ if (process.env.NODE_ENV !== "production" && generatorFactory !== keyframes) {
2684
+ exports.invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);
2685
+ }
2639
2686
  if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
2640
- if (process.env.NODE_ENV !== "production") {
2641
- exports.invariant(keyframes$1.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);
2642
- }
2643
2687
  mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
2644
2688
  keyframes$1 = [0, 100];
2645
2689
  }
@@ -2749,13 +2793,13 @@ class MainThreadAnimation extends BaseAnimation {
2749
2793
  }
2750
2794
  get duration() {
2751
2795
  const { resolved } = this;
2752
- return resolved ? millisecondsToSeconds$1(resolved.calculatedDuration) : 0;
2796
+ return resolved ? /* @__PURE__ */ millisecondsToSeconds$1(resolved.calculatedDuration) : 0;
2753
2797
  }
2754
2798
  get time() {
2755
- return millisecondsToSeconds$1(this.currentTime);
2799
+ return /* @__PURE__ */ millisecondsToSeconds$1(this.currentTime);
2756
2800
  }
2757
2801
  set time(newTime) {
2758
- newTime = secondsToMilliseconds$1(newTime);
2802
+ newTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
2759
2803
  this.currentTime = newTime;
2760
2804
  if (this.holdTime !== null || this.speed === 0) {
2761
2805
  this.holdTime = newTime;
@@ -2770,7 +2814,7 @@ class MainThreadAnimation extends BaseAnimation {
2770
2814
  const hasChanged2 = this.playbackSpeed !== newSpeed;
2771
2815
  this.playbackSpeed = newSpeed;
2772
2816
  if (hasChanged2) {
2773
- this.time = millisecondsToSeconds$1(this.currentTime);
2817
+ this.time = /* @__PURE__ */ millisecondsToSeconds$1(this.currentTime);
2774
2818
  }
2775
2819
  }
2776
2820
  play() {
@@ -2871,7 +2915,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
2871
2915
  const easing = mapEasingToNativeEasing(ease2, duration);
2872
2916
  if (Array.isArray(easing))
2873
2917
  keyframeOptions.easing = easing;
2874
- return element.animate(keyframeOptions, {
2918
+ const animation = element.animate(keyframeOptions, {
2875
2919
  delay: delay2,
2876
2920
  duration,
2877
2921
  easing: !Array.isArray(easing) ? easing : "linear",
@@ -2879,6 +2923,7 @@ function startWaapiAnimation(element, valueName, keyframes2, { delay: delay2 = 0
2879
2923
  iterations: repeat + 1,
2880
2924
  direction: repeatType === "reverse" ? "alternate" : "normal"
2881
2925
  });
2926
+ return animation;
2882
2927
  }
2883
2928
  const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
2884
2929
  const sampleDelta = 10;
@@ -2925,9 +2970,8 @@ class AcceleratedAnimation extends BaseAnimation {
2925
2970
  this.resolver.scheduleResolve();
2926
2971
  }
2927
2972
  initPlayback(keyframes2, finalKeyframe) {
2928
- var _a;
2929
2973
  let { duration = 300, times, ease: ease2, type, motionValue: motionValue2, name, startTime } = this.options;
2930
- if (!((_a = motionValue2.owner) === null || _a === void 0 ? void 0 : _a.current)) {
2974
+ if (!motionValue2.owner || !motionValue2.owner.current) {
2931
2975
  return false;
2932
2976
  }
2933
2977
  if (typeof ease2 === "string" && supportsLinearEasing() && isUnsupportedEase(ease2)) {
@@ -2973,21 +3017,21 @@ class AcceleratedAnimation extends BaseAnimation {
2973
3017
  if (!resolved)
2974
3018
  return 0;
2975
3019
  const { duration } = resolved;
2976
- return millisecondsToSeconds$1(duration);
3020
+ return /* @__PURE__ */ millisecondsToSeconds$1(duration);
2977
3021
  }
2978
3022
  get time() {
2979
3023
  const { resolved } = this;
2980
3024
  if (!resolved)
2981
3025
  return 0;
2982
3026
  const { animation } = resolved;
2983
- return millisecondsToSeconds$1(animation.currentTime || 0);
3027
+ return /* @__PURE__ */ millisecondsToSeconds$1(animation.currentTime || 0);
2984
3028
  }
2985
3029
  set time(newTime) {
2986
3030
  const { resolved } = this;
2987
3031
  if (!resolved)
2988
3032
  return;
2989
3033
  const { animation } = resolved;
2990
- animation.currentTime = secondsToMilliseconds$1(newTime);
3034
+ animation.currentTime = /* @__PURE__ */ secondsToMilliseconds$1(newTime);
2991
3035
  }
2992
3036
  get speed() {
2993
3037
  const { resolved } = this;
@@ -3077,7 +3121,7 @@ class AcceleratedAnimation extends BaseAnimation {
3077
3121
  times,
3078
3122
  isGenerator: true
3079
3123
  });
3080
- const sampleTime = secondsToMilliseconds$1(this.time);
3124
+ const sampleTime = /* @__PURE__ */ secondsToMilliseconds$1(this.time);
3081
3125
  motionValue2.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
3082
3126
  }
3083
3127
  const { onStop } = this.options;
@@ -3098,11 +3142,15 @@ class AcceleratedAnimation extends BaseAnimation {
3098
3142
  }
3099
3143
  static supports(options) {
3100
3144
  const { motionValue: motionValue2, name, repeatDelay, repeatType, damping, type } = options;
3101
- return supportsWaapi() && name && acceleratedValues.has(name) && motionValue2 && motionValue2.owner && motionValue2.owner.current instanceof HTMLElement && /**
3145
+ if (!motionValue2 || !motionValue2.owner || !(motionValue2.owner.current instanceof HTMLElement)) {
3146
+ return false;
3147
+ }
3148
+ const { onUpdate, transformTemplate } = motionValue2.owner.getProps();
3149
+ return supportsWaapi() && name && acceleratedValues.has(name) && /**
3102
3150
  * If we're outputting values to onUpdate then we can't use WAAPI as there's
3103
3151
  * no way to read the value from WAAPI every frame.
3104
3152
  */
3105
- !motionValue2.owner.getProps().onUpdate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
3153
+ !onUpdate && !transformTemplate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
3106
3154
  }
3107
3155
  }
3108
3156
  const underDampedSpring = {
@@ -3141,7 +3189,7 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
3141
3189
  const valueTransition = getValueTransition$1(transition, name) || {};
3142
3190
  const delay2 = valueTransition.delay || transition.delay || 0;
3143
3191
  let { elapsed = 0 } = transition;
3144
- elapsed = elapsed - secondsToMilliseconds$1(delay2);
3192
+ elapsed = elapsed - /* @__PURE__ */ secondsToMilliseconds$1(delay2);
3145
3193
  let options = {
3146
3194
  keyframes: Array.isArray(target) ? target : [null, target],
3147
3195
  ease: "easeOut",
@@ -3167,10 +3215,10 @@ const animateMotionValue = (name, value, target, transition = {}, element, isHan
3167
3215
  };
3168
3216
  }
3169
3217
  if (options.duration) {
3170
- options.duration = secondsToMilliseconds$1(options.duration);
3218
+ options.duration = /* @__PURE__ */ secondsToMilliseconds$1(options.duration);
3171
3219
  }
3172
3220
  if (options.repeatDelay) {
3173
- options.repeatDelay = secondsToMilliseconds$1(options.repeatDelay);
3221
+ options.repeatDelay = /* @__PURE__ */ secondsToMilliseconds$1(options.repeatDelay);
3174
3222
  }
3175
3223
  if (options.from !== void 0) {
3176
3224
  options.keyframes[0] = options.from;
@@ -3338,7 +3386,7 @@ function updateMotionValuesFromProps(element, next, prev) {
3338
3386
  if (isMotionValue$1(nextValue)) {
3339
3387
  element.addValue(key, nextValue);
3340
3388
  if (process.env.NODE_ENV === "development") {
3341
- warnOnce(nextValue.version === "11.16.6", `Attempting to mix Motion versions ${nextValue.version} with 11.16.6 may not work as expected.`);
3389
+ warnOnce(nextValue.version === "12.4.10", `Attempting to mix Motion versions ${nextValue.version} with 12.4.10 may not work as expected.`);
3342
3390
  }
3343
3391
  } else if (isMotionValue$1(prevValue)) {
3344
3392
  element.addValue(key, motionValue(nextValue, { owner: element }));
@@ -3410,7 +3458,8 @@ class VisualElement {
3410
3458
  frame.render(this.render, false, true);
3411
3459
  }
3412
3460
  };
3413
- const { latestValues, renderState } = visualState;
3461
+ const { latestValues, renderState, onUpdate } = visualState;
3462
+ this.onUpdate = onUpdate;
3414
3463
  this.latestValues = latestValues;
3415
3464
  this.baseTarget = { ...latestValues };
3416
3465
  this.initialValues = props.initial ? { ...latestValues } : {};
@@ -3458,7 +3507,6 @@ class VisualElement {
3458
3507
  this.update(this.props, this.presenceContext);
3459
3508
  }
3460
3509
  unmount() {
3461
- visualElementStore.delete(this.current);
3462
3510
  this.projection && this.projection.unmount();
3463
3511
  cancelFrame(this.notifyUpdate);
3464
3512
  cancelFrame(this.render);
@@ -3483,6 +3531,9 @@ class VisualElement {
3483
3531
  this.valueSubscriptions.get(key)();
3484
3532
  }
3485
3533
  const valueIsTransform = transformProps.has(key);
3534
+ if (valueIsTransform && this.onBindTransform) {
3535
+ this.onBindTransform();
3536
+ }
3486
3537
  const removeOnChange = value.on("change", (latestValue) => {
3487
3538
  this.latestValues[key] = latestValue;
3488
3539
  this.props.onUpdate && frame.preRender(this.notifyUpdate);
@@ -3576,6 +3627,7 @@ class VisualElement {
3576
3627
  if (this.handleChildMotionValue) {
3577
3628
  this.handleChildMotionValue();
3578
3629
  }
3630
+ this.onUpdate && this.onUpdate(this);
3579
3631
  }
3580
3632
  getProps() {
3581
3633
  return this.props;
@@ -3818,14 +3870,6 @@ function buildHTMLStyles(state2, latestValues, transformTemplate) {
3818
3870
  style2.transformOrigin = `${originX} ${originY} ${originZ}`;
3819
3871
  }
3820
3872
  }
3821
- function calcOrigin$1(origin, offset, size) {
3822
- return typeof origin === "string" ? origin : px.transform(offset + size * origin);
3823
- }
3824
- function calcSVGTransformOrigin(dimensions, originX, originY) {
3825
- const pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
3826
- const pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
3827
- return `${pxOriginX} ${pxOriginY}`;
3828
- }
3829
3873
  const dashKeys = {
3830
3874
  offset: "stroke-dashoffset",
3831
3875
  array: "stroke-dasharray"
@@ -3842,6 +3886,14 @@ function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true
3842
3886
  const pathSpacing = px.transform(spacing);
3843
3887
  attrs[keys2.array] = `${pathLength} ${pathSpacing}`;
3844
3888
  }
3889
+ function calcOrigin$1(origin, offset, size) {
3890
+ return typeof origin === "string" ? origin : px.transform(offset + size * origin);
3891
+ }
3892
+ function calcSVGTransformOrigin(dimensions, originX, originY) {
3893
+ const pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
3894
+ const pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
3895
+ return `${pxOriginX} ${pxOriginY}`;
3896
+ }
3845
3897
  function buildSVGAttrs(state2, {
3846
3898
  attrX,
3847
3899
  attrY,
@@ -3908,6 +3960,18 @@ const camelCaseAttributes = /* @__PURE__ */ new Set([
3908
3960
  "lengthAdjust"
3909
3961
  ]);
3910
3962
  const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg";
3963
+ function updateSVGDimensions(instance, renderState) {
3964
+ try {
3965
+ renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect();
3966
+ } catch (e) {
3967
+ renderState.dimensions = {
3968
+ x: 0,
3969
+ y: 0,
3970
+ width: 0,
3971
+ height: 0
3972
+ };
3973
+ }
3974
+ }
3911
3975
  function renderHTML(element, { style: style2, vars }, styleProp, projection) {
3912
3976
  Object.assign(element.style, style2, projection && projection.getProjectionStyles(styleProp));
3913
3977
  for (const key in vars) {
@@ -3922,7 +3986,12 @@ function renderSVG(element, renderState, _styleProp, projection) {
3922
3986
  }
3923
3987
  const scaleCorrectors = {};
3924
3988
  function addScaleCorrector(correctors) {
3925
- Object.assign(scaleCorrectors, correctors);
3989
+ for (const key in correctors) {
3990
+ scaleCorrectors[key] = correctors[key];
3991
+ if (isCSSVariableName(key)) {
3992
+ scaleCorrectors[key].isCSSVariable = true;
3993
+ }
3994
+ }
3926
3995
  }
3927
3996
  function isForcedMotionValue(key, { layout, layoutId }) {
3928
3997
  return transformProps.has(key) || key.startsWith("origin") || (layout || layoutId !== void 0) && (!!scaleCorrectors[key] || key === "opacity");
@@ -3954,6 +4023,11 @@ class SVGVisualElement extends DOMVisualElement {
3954
4023
  this.type = "svg";
3955
4024
  this.isSVGTag = false;
3956
4025
  this.measureInstanceViewportBox = createBox$1;
4026
+ this.updateDimensions = () => {
4027
+ if (this.current && !this.renderState.dimensions) {
4028
+ updateSVGDimensions(this.current, this.renderState);
4029
+ }
4030
+ };
3957
4031
  }
3958
4032
  getBaseTargetFromProps(props, key) {
3959
4033
  return props[key];
@@ -3969,6 +4043,11 @@ class SVGVisualElement extends DOMVisualElement {
3969
4043
  scrapeMotionValuesFromProps(props, prevProps, visualElement) {
3970
4044
  return scrapeMotionValuesFromProps(props, prevProps, visualElement);
3971
4045
  }
4046
+ onBindTransform() {
4047
+ if (this.current && !this.renderState.dimensions) {
4048
+ frame.postRender(this.updateDimensions);
4049
+ }
4050
+ }
3972
4051
  build(renderState, latestValues, props) {
3973
4052
  buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);
3974
4053
  }
@@ -4225,7 +4304,7 @@ function animateSequence(sequence, options, scope) {
4225
4304
  return animations;
4226
4305
  }
4227
4306
  function isSequence(value) {
4228
- return Array.isArray(value) && Array.isArray(value[0]);
4307
+ return Array.isArray(value) && value.some(Array.isArray);
4229
4308
  }
4230
4309
  function createScopedAnimate(scope) {
4231
4310
  function scopedAnimate(subjectOrSequence, optionsOrKeyframes, options) {
@@ -4245,7 +4324,7 @@ function createScopedAnimate(scope) {
4245
4324
  }
4246
4325
  const animate = createScopedAnimate();
4247
4326
  function setCSSVar(element, name, value) {
4248
- element.style.setProperty(`--${name}`, value);
4327
+ element.style.setProperty(name, value);
4249
4328
  }
4250
4329
  function setStyle(element, name, value) {
4251
4330
  element.style[name] = value;
@@ -4294,7 +4373,7 @@ class NativeAnimation extends NativeAnimationControls {
4294
4373
  if (isGenerator(options.type)) {
4295
4374
  const generatorOptions = createGeneratorEasing(options, 100, options.type);
4296
4375
  options.ease = supportsLinearEasing() ? generatorOptions.ease : defaultEasing;
4297
- options.duration = secondsToMilliseconds$1(generatorOptions.duration);
4376
+ options.duration = /* @__PURE__ */ secondsToMilliseconds$1(generatorOptions.duration);
4298
4377
  options.type = "keyframes";
4299
4378
  } else {
4300
4379
  options.ease = options.ease || defaultEasing;
@@ -4309,8 +4388,8 @@ class NativeAnimation extends NativeAnimationControls {
4309
4388
  this.options = options;
4310
4389
  this.updateFinishedPromise();
4311
4390
  this.removeAnimation = () => {
4312
- var _a;
4313
- return (_a = state.get(element)) === null || _a === void 0 ? void 0 : _a.delete(valueName);
4391
+ const elementState = state.get(element);
4392
+ elementState && elementState.delete(valueName);
4314
4393
  };
4315
4394
  };
4316
4395
  if (!supportsWaapi()) {
@@ -4367,8 +4446,8 @@ function animateElements(elementOrSelector, keyframes2, options, scope) {
4367
4446
  const valueOptions = {
4368
4447
  ...getValueTransition$1(elementTransition, valueName)
4369
4448
  };
4370
- valueOptions.duration = valueOptions.duration ? secondsToMilliseconds$1(valueOptions.duration) : valueOptions.duration;
4371
- valueOptions.delay = secondsToMilliseconds$1(valueOptions.delay || 0);
4449
+ valueOptions.duration = valueOptions.duration ? /* @__PURE__ */ secondsToMilliseconds$1(valueOptions.duration) : valueOptions.duration;
4450
+ valueOptions.delay = /* @__PURE__ */ secondsToMilliseconds$1(valueOptions.delay || 0);
4372
4451
  animations.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));
4373
4452
  }
4374
4453
  }
@@ -4520,7 +4599,7 @@ function updateAxisInfo(element, axisName, info, time2) {
4520
4599
  axis.offset.length = 0;
4521
4600
  axis.offset[0] = 0;
4522
4601
  axis.offset[1] = axis.scrollLength;
4523
- axis.progress = progress$1(0, axis.scrollLength, axis.current);
4602
+ axis.progress = /* @__PURE__ */ progress$1(0, axis.scrollLength, axis.current);
4524
4603
  const elapsed = time2 - prevTime;
4525
4604
  axis.velocity = elapsed > maxElapsed ? 0 : velocityPerSecond(axis.current - prev, elapsed);
4526
4605
  }
@@ -4826,7 +4905,7 @@ function inView(elementOrSelector, onStart, { root, margin: rootMargin, amount =
4826
4905
  if (entry.isIntersecting === Boolean(onEnd))
4827
4906
  return;
4828
4907
  if (entry.isIntersecting) {
4829
- const newOnEnd = onStart(entry);
4908
+ const newOnEnd = onStart(entry.target, entry);
4830
4909
  if (typeof newOnEnd === "function") {
4831
4910
  activeIntersections.set(entry.target, newOnEnd);
4832
4911
  } else {
@@ -4888,7 +4967,7 @@ function delay$1(callback, timeout) {
4888
4967
  return () => cancelFrame(checkElapsed);
4889
4968
  }
4890
4969
  function delayInSeconds(callback, timeout) {
4891
- return delay$1(callback, secondsToMilliseconds$1(timeout));
4970
+ return delay$1(callback, /* @__PURE__ */ secondsToMilliseconds$1(timeout));
4892
4971
  }
4893
4972
  const distance = (a, b) => Math.abs(a - b);
4894
4973
  function distance2D(a, b) {
@@ -5114,19 +5193,23 @@ function isAnimateChanged(oldOptions, newOptions) {
5114
5193
  const newAnimate = newOptions.animate;
5115
5194
  if (oldAnimate === newAnimate)
5116
5195
  return false;
5117
- if (!oldAnimate || !newAnimate)
5196
+ if (!oldAnimate || !newAnimate) {
5118
5197
  return true;
5198
+ }
5119
5199
  if (typeof oldAnimate === "object" || typeof newAnimate === "object") {
5120
5200
  const oldKeys = Object.keys(oldAnimate);
5121
5201
  const newKeys = Object.keys(newAnimate);
5122
5202
  if (oldKeys.length !== newKeys.length)
5123
5203
  return true;
5124
5204
  return oldKeys.some((key) => {
5205
+ if (key === "transition")
5206
+ return false;
5125
5207
  const oldVal = oldAnimate[key];
5126
5208
  const newVal = newAnimate[key];
5127
5209
  return oldVal !== newVal;
5128
5210
  });
5129
5211
  }
5212
+ console.log(2344);
5130
5213
  return oldAnimate !== newAnimate;
5131
5214
  }
5132
5215
  const rotation = {
@@ -5357,7 +5440,7 @@ const Primitive = vue.defineComponent({
5357
5440
  const SELF_CLOSING_TAGS = ["area", "img", "input"];
5358
5441
  return () => {
5359
5442
  const motionProps = props.getProps();
5360
- const allAttrs = { ...attrs, ...motionProps };
5443
+ const allAttrs = { ...motionProps, ...attrs };
5361
5444
  if (typeof asTag === "string" && SELF_CLOSING_TAGS.includes(asTag))
5362
5445
  return vue.h(asTag, allAttrs);
5363
5446
  if (asTag !== "template") {
@@ -5397,7 +5480,7 @@ function handleHoverEvent$1(state2, event, lifecycle) {
5397
5480
  }
5398
5481
  class HoverGesture extends Feature {
5399
5482
  isActive() {
5400
- return Boolean(this.state.getOptions().hover);
5483
+ return Boolean(this.state.getOptions().whileHover);
5401
5484
  }
5402
5485
  constructor(state2) {
5403
5486
  super(state2);
@@ -5408,7 +5491,7 @@ class HoverGesture extends Feature {
5408
5491
  return;
5409
5492
  this.unmount = hover(
5410
5493
  element,
5411
- (startEvent) => {
5494
+ (el, startEvent) => {
5412
5495
  handleHoverEvent$1(this.state, startEvent, "Start");
5413
5496
  return (endEvent) => {
5414
5497
  handleHoverEvent$1(this.state, endEvent, "End");
@@ -5449,7 +5532,7 @@ class PressGesture extends Feature {
5449
5532
  return;
5450
5533
  this.unmount = press(
5451
5534
  element,
5452
- (startEvent) => {
5535
+ (el, startEvent) => {
5453
5536
  handlePressEvent(this.state, startEvent, "Start");
5454
5537
  return (endEvent, { success }) => handlePressEvent(
5455
5538
  this.state,
@@ -5474,7 +5557,7 @@ function handleHoverEvent(state2, entry, lifecycle) {
5474
5557
  }
5475
5558
  class InViewGesture extends Feature {
5476
5559
  isActive() {
5477
- return Boolean(this.state.getOptions().inView);
5560
+ return Boolean(this.state.getOptions().whileInView);
5478
5561
  }
5479
5562
  constructor(state2) {
5480
5563
  super(state2);
@@ -5487,7 +5570,7 @@ class InViewGesture extends Feature {
5487
5570
  const { once, ...viewOptions } = this.state.getOptions().inViewOptions || {};
5488
5571
  this.unmount = inView(
5489
5572
  element,
5490
- (entry) => {
5573
+ (_, entry) => {
5491
5574
  handleHoverEvent(this.state, entry, "Enter");
5492
5575
  if (!once) {
5493
5576
  return (endEvent) => {
@@ -6626,7 +6709,7 @@ function compress(min, max, easing) {
6626
6709
  return 0;
6627
6710
  if (p > max)
6628
6711
  return 1;
6629
- return easing(progress$1(min, max, p));
6712
+ return easing(/* @__PURE__ */ progress$1(min, max, p));
6630
6713
  };
6631
6714
  }
6632
6715
  function copyAxisInto(axis, originAxis) {
@@ -6868,13 +6951,6 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
6868
6951
  function eachAxis(callback) {
6869
6952
  return [callback("x"), callback("y")];
6870
6953
  }
6871
- const metrics = {
6872
- type: "projectionFrame",
6873
- totalNodes: 0,
6874
- resolvedTargetDeltas: 0,
6875
- recalculatedProjection: 0
6876
- };
6877
- const isDebug = typeof window !== "undefined" && window.MotionDebug !== void 0;
6878
6954
  const transformAxes = ["", "X", "Y", "Z"];
6879
6955
  const hiddenVisibility = { visibility: "hidden" };
6880
6956
  const animationTarget = 1e3;
@@ -6940,16 +7016,10 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
6940
7016
  };
6941
7017
  this.updateProjection = () => {
6942
7018
  this.projectionUpdateScheduled = false;
6943
- if (isDebug) {
6944
- metrics.totalNodes = metrics.resolvedTargetDeltas = metrics.recalculatedProjection = 0;
6945
- }
6946
7019
  this.nodes.forEach(propagateDirtyNodes);
6947
7020
  this.nodes.forEach(resolveTargetDelta);
6948
7021
  this.nodes.forEach(calcProjection);
6949
7022
  this.nodes.forEach(cleanDirtyNodes);
6950
- if (isDebug) {
6951
- window.MotionDebug.record(metrics);
6952
- }
6953
7023
  };
6954
7024
  this.resolvedRelativeTargetAt = 0;
6955
7025
  this.hasProjected = false;
@@ -7014,7 +7084,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7014
7084
  this.root.registerSharedNode(layoutId, this);
7015
7085
  }
7016
7086
  if (this.options.animate !== false && visualElement && (layoutId || layout)) {
7017
- this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeTargetChanged, layout: newLayout }) => {
7087
+ this.addEventListener("didUpdate", ({ delta, hasLayoutChanged, hasRelativeLayoutChanged, layout: newLayout }) => {
7018
7088
  if (this.isTreeAnimationBlocked()) {
7019
7089
  this.target = void 0;
7020
7090
  this.relativeTarget = void 0;
@@ -7022,9 +7092,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7022
7092
  }
7023
7093
  const layoutTransition = this.options.transition || visualElement.getDefaultTransition() || defaultLayoutTransition;
7024
7094
  const { onLayoutAnimationStart, onLayoutAnimationComplete } = visualElement.getProps();
7025
- const targetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout) || hasRelativeTargetChanged;
7026
- const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged;
7027
- if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || hasOnlyRelativeTargetChanged || hasLayoutChanged && (targetChanged || !this.currentAnimation)) {
7095
+ const hasTargetChanged = !this.targetLayout || !boxEqualsRounded(this.targetLayout, newLayout);
7096
+ const hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeLayoutChanged;
7097
+ if (this.options.layoutRoot || this.resumeFrom || hasOnlyRelativeTargetChanged || hasLayoutChanged && (hasTargetChanged || !this.currentAnimation)) {
7028
7098
  if (this.resumeFrom) {
7029
7099
  this.resumingFrom = this.resumeFrom;
7030
7100
  this.resumingFrom.resumingFrom = void 0;
@@ -7173,6 +7243,9 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7173
7243
  if (this.snapshot || !this.instance)
7174
7244
  return;
7175
7245
  this.snapshot = this.measure();
7246
+ if (this.snapshot && !calcLength(this.snapshot.measuredBox.x) && !calcLength(this.snapshot.measuredBox.y)) {
7247
+ this.snapshot = void 0;
7248
+ }
7176
7249
  }
7177
7250
  updateLayout() {
7178
7251
  if (!this.instance)
@@ -7405,9 +7478,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7405
7478
  this.relativeParent = this.relativeTarget = void 0;
7406
7479
  }
7407
7480
  }
7408
- if (isDebug) {
7409
- metrics.resolvedTargetDeltas++;
7410
- }
7411
7481
  }
7412
7482
  getClosestProjectingParent() {
7413
7483
  if (!this.parent || hasScale(this.parent.latestValues) || has2DTranslate(this.parent.latestValues)) {
@@ -7473,9 +7543,6 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7473
7543
  this.scheduleRender();
7474
7544
  this.notifyListeners("projectionUpdate", target);
7475
7545
  }
7476
- if (isDebug) {
7477
- metrics.recalculatedProjection++;
7478
- }
7479
7546
  }
7480
7547
  hide() {
7481
7548
  this.isVisible = false;
@@ -7560,6 +7627,8 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7560
7627
  this.mixTargetDelta(latest);
7561
7628
  options.onUpdate && options.onUpdate(latest);
7562
7629
  },
7630
+ onStop: () => {
7631
+ },
7563
7632
  onComplete: () => {
7564
7633
  options.onComplete && options.onComplete();
7565
7634
  this.completeAnimation();
@@ -7731,7 +7800,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7731
7800
  for (const key in scaleCorrectors) {
7732
7801
  if (valuesToRender[key] === void 0)
7733
7802
  continue;
7734
- const { correct, applyTo } = scaleCorrectors[key];
7803
+ const { correct, applyTo, isCSSVariable } = scaleCorrectors[key];
7735
7804
  const corrected = styles.transform === "none" ? valuesToRender[key] : correct(valuesToRender[key], lead);
7736
7805
  if (applyTo) {
7737
7806
  const num = applyTo.length;
@@ -7739,7 +7808,11 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
7739
7808
  styles[applyTo[i]] = corrected;
7740
7809
  }
7741
7810
  } else {
7742
- styles[key] = corrected;
7811
+ if (isCSSVariable) {
7812
+ this.options.visualElement.renderState.vars[key] = corrected;
7813
+ } else {
7814
+ styles[key] = corrected;
7815
+ }
7743
7816
  }
7744
7817
  }
7745
7818
  if (this.options.layoutId) {
@@ -7798,7 +7871,7 @@ function notifyLayoutUpdate(node) {
7798
7871
  calcBoxDelta(visualDelta, layout, snapshot.layoutBox);
7799
7872
  }
7800
7873
  const hasLayoutChanged = !isDeltaZero(layoutDelta);
7801
- let hasRelativeTargetChanged = false;
7874
+ let hasRelativeLayoutChanged = false;
7802
7875
  if (!node.resumeFrom) {
7803
7876
  const relativeParent = node.getClosestProjectingParent();
7804
7877
  if (relativeParent && !relativeParent.resumeFrom) {
@@ -7809,7 +7882,7 @@ function notifyLayoutUpdate(node) {
7809
7882
  const relativeLayout = createBox$1();
7810
7883
  calcRelativePosition(relativeLayout, layout, parentLayout.layoutBox);
7811
7884
  if (!boxEqualsRounded(relativeSnapshot, relativeLayout)) {
7812
- hasRelativeTargetChanged = true;
7885
+ hasRelativeLayoutChanged = true;
7813
7886
  }
7814
7887
  if (relativeParent.options.layoutRoot) {
7815
7888
  node.relativeTarget = relativeLayout;
@@ -7825,7 +7898,7 @@ function notifyLayoutUpdate(node) {
7825
7898
  delta: visualDelta,
7826
7899
  layoutDelta,
7827
7900
  hasLayoutChanged,
7828
- hasRelativeTargetChanged
7901
+ hasRelativeLayoutChanged
7829
7902
  });
7830
7903
  } else if (node.isLead()) {
7831
7904
  const { onExitComplete } = node.options;
@@ -7834,9 +7907,6 @@ function notifyLayoutUpdate(node) {
7834
7907
  node.options.transition = void 0;
7835
7908
  }
7836
7909
  function propagateDirtyNodes(node) {
7837
- if (isDebug) {
7838
- metrics.totalNodes++;
7839
- }
7840
7910
  if (!node.parent)
7841
7911
  return;
7842
7912
  if (!node.isProjecting()) {
@@ -8125,7 +8195,8 @@ function animateUpdates({
8125
8195
  controlDelay = 0,
8126
8196
  directAnimate,
8127
8197
  directTransition,
8128
- isFallback = false
8198
+ isFallback = false,
8199
+ isExit = false
8129
8200
  } = {}) {
8130
8201
  const prevTarget = this.target;
8131
8202
  this.target = { ...this.baseTarget };
@@ -8137,7 +8208,14 @@ function animateUpdates({
8137
8208
  animationOptions = resolveStateAnimation.call(this, controlActiveState, transition);
8138
8209
  const factories = createAnimationFactories.call(this, prevTarget, animationOptions, controlDelay);
8139
8210
  const { getChildAnimations, childAnimations } = setupChildAnimations.call(this, transition, this.activeStates, isFallback);
8140
- return executeAnimations.call(this, factories, getChildAnimations, childAnimations, transition, controlActiveState);
8211
+ return executeAnimations.call(this, {
8212
+ factories,
8213
+ getChildAnimations,
8214
+ childAnimations,
8215
+ transition,
8216
+ controlActiveState,
8217
+ isExit
8218
+ });
8141
8219
  }
8142
8220
  function resolveDirectAnimation(directAnimate, directTransition) {
8143
8221
  const variant = resolveVariant(directAnimate, this.options.variants, this.options.custom);
@@ -8157,20 +8235,29 @@ function resolveStateAnimation(controlActiveState, transition) {
8157
8235
  if (controlActiveState)
8158
8236
  this.activeStates = { ...this.activeStates, ...controlActiveState };
8159
8237
  const transitionOptions = {};
8238
+ let variantTransition = {};
8239
+ let variant = {};
8160
8240
  STATE_TYPES.forEach((name) => {
8161
8241
  if (!this.activeStates[name] || isAnimationControls(this.options[name]))
8162
8242
  return;
8163
- const definition = core.isDef(this.options[name]) ? this.options[name] : this.context[name];
8164
- const variant = resolveVariant(definition, this.options.variants, this.options.custom);
8165
- if (!variant)
8243
+ const definition = this.options[name];
8244
+ let resolvedVariant = core.isDef(definition) ? resolveVariant(definition, this.options.variants, this.options.custom) : void 0;
8245
+ if (this.visualElement.isVariantNode) {
8246
+ const controlVariant = resolveVariant(this.context[name], this.options.variants, this.options.custom);
8247
+ resolvedVariant = controlVariant ? Object.assign(controlVariant || {}, variant) : variant;
8248
+ }
8249
+ if (!resolvedVariant)
8166
8250
  return;
8167
- Object.assign(transition, variant.transition);
8168
- Object.entries(variant).forEach(([key, value]) => {
8169
- if (key === "transition")
8170
- return;
8171
- this.target[key] = value;
8172
- transitionOptions[key] = getOptions(transition, key);
8173
- });
8251
+ if (name !== "initial")
8252
+ variantTransition = resolvedVariant.transition || this.options.transition;
8253
+ variant = Object.assign(variant, resolvedVariant);
8254
+ });
8255
+ Object.assign(transition, variantTransition);
8256
+ Object.entries(variant).forEach(([key, value]) => {
8257
+ if (key === "transition")
8258
+ return;
8259
+ this.target[key] = value;
8260
+ transitionOptions[key] = getOptions(transition, key);
8174
8261
  });
8175
8262
  return transitionOptions;
8176
8263
  }
@@ -8215,25 +8302,22 @@ function setupChildAnimations(transition, controlActiveState, isFallback) {
8215
8302
  childAnimations
8216
8303
  };
8217
8304
  }
8218
- function executeAnimations(factories, getChildAnimations, childAnimations, transition, controlActiveState) {
8219
- let animations;
8220
- const getAnimation = () => {
8221
- animations = factories.map((factory) => factory()).filter(Boolean);
8222
- return Promise.all(animations);
8223
- };
8224
- const isExit = this.activeStates.exit;
8305
+ function executeAnimations({
8306
+ factories,
8307
+ getChildAnimations,
8308
+ childAnimations,
8309
+ transition,
8310
+ controlActiveState,
8311
+ isExit = false
8312
+ }) {
8313
+ const getAnimation = () => Promise.all(factories.map((factory) => factory()).filter(Boolean));
8225
8314
  const animationTarget2 = { ...this.target };
8226
8315
  const element = this.element;
8227
8316
  const finishAnimation2 = (animationPromise) => {
8228
- if (!(animations == null ? void 0 : animations.length) && !childAnimations.length) {
8229
- if (isExit) {
8230
- element.dispatchEvent(motionEvent("motionstart", animationTarget2));
8231
- element.dispatchEvent(motionEvent("motioncomplete", animationTarget2, isExit));
8232
- }
8233
- return;
8234
- }
8235
8317
  element.dispatchEvent(motionEvent("motionstart", animationTarget2));
8236
- animationPromise.then(() => element.dispatchEvent(motionEvent("motioncomplete", animationTarget2, isExit))).catch(noop);
8318
+ animationPromise.then(() => {
8319
+ element.dispatchEvent(motionEvent("motioncomplete", animationTarget2, isExit));
8320
+ }).catch(noop);
8237
8321
  };
8238
8322
  const getAnimationPromise = () => {
8239
8323
  const animationPromise = (transition == null ? void 0 : transition.when) ? (transition.when === "beforeChildren" ? getAnimation() : getChildAnimations()).then(() => transition.when === "beforeChildren" ? getChildAnimations() : getAnimation()) : Promise.all([getAnimation(), getChildAnimations()]);
@@ -8259,6 +8343,7 @@ class MotionState {
8259
8343
  initial: true,
8260
8344
  animate: true
8261
8345
  };
8346
+ this.currentProcess = null;
8262
8347
  this._context = null;
8263
8348
  this.animateUpdates = animateUpdates;
8264
8349
  this.id = `motion-state-${id++}`;
@@ -8266,7 +8351,7 @@ class MotionState {
8266
8351
  this.parent = parent;
8267
8352
  (_a = parent == null ? void 0 : parent.children) == null ? void 0 : _a.add(this);
8268
8353
  this.depth = (parent == null ? void 0 : parent.depth) + 1 || 0;
8269
- const initialVariantSource = this.context.initial === false ? "animate" : "initial";
8354
+ const initialVariantSource = this.context.initial === false ? ["initial", "animate"] : ["initial"];
8270
8355
  this.initTarget(initialVariantSource);
8271
8356
  this.visualElement = createVisualElement(this.options.as, {
8272
8357
  presenceContext: null,
@@ -8308,7 +8393,12 @@ class MotionState {
8308
8393
  }
8309
8394
  // Initialize animation target values
8310
8395
  initTarget(initialVariantSource) {
8311
- this.baseTarget = resolveVariant(this.options[initialVariantSource] || this.context[initialVariantSource], this.options.variants) || {};
8396
+ this.baseTarget = initialVariantSource.reduce((acc, variant) => {
8397
+ return {
8398
+ ...acc,
8399
+ ...resolveVariant(this.options[variant] || this.context[variant], this.options.variants)
8400
+ };
8401
+ }, {});
8312
8402
  this.target = {};
8313
8403
  }
8314
8404
  // Update visual element with new options
@@ -8344,7 +8434,7 @@ class MotionState {
8344
8434
  this.updateOptions();
8345
8435
  this.featureManager.mount();
8346
8436
  if (!notAnimate && this.options.animate) {
8347
- this.animateUpdates();
8437
+ this.startAnimation();
8348
8438
  }
8349
8439
  if (this.options.layoutId) {
8350
8440
  mountedLayoutIds.add(this.options.layoutId);
@@ -8353,6 +8443,22 @@ class MotionState {
8353
8443
  });
8354
8444
  }
8355
8445
  }
8446
+ clearAnimation() {
8447
+ var _a;
8448
+ this.currentProcess && cancelFrame(this.currentProcess);
8449
+ this.currentProcess = null;
8450
+ (_a = this.visualElement.variantChildren) == null ? void 0 : _a.forEach((child) => {
8451
+ child.state.clearAnimation();
8452
+ });
8453
+ }
8454
+ // update trigger animation
8455
+ startAnimation() {
8456
+ this.clearAnimation();
8457
+ this.currentProcess = frame.render(() => {
8458
+ this.currentProcess = null;
8459
+ this.animateUpdates();
8460
+ });
8461
+ }
8356
8462
  // Called before unmounting, executes in child-to-parent order
8357
8463
  beforeUnmount() {
8358
8464
  this.featureManager.beforeUnmount();
@@ -8394,7 +8500,7 @@ class MotionState {
8394
8500
  this.updateOptions();
8395
8501
  this.featureManager.update();
8396
8502
  if (hasAnimateChange) {
8397
- this.animateUpdates();
8503
+ this.startAnimation();
8398
8504
  }
8399
8505
  }
8400
8506
  // Set animation state active status and propagate to children
@@ -8408,7 +8514,8 @@ class MotionState {
8408
8514
  });
8409
8515
  if (isAnimate) {
8410
8516
  this.animateUpdates({
8411
- isFallback: !isActive && name !== "exit" && this.visualElement.isControllingVariants
8517
+ isFallback: !isActive && name !== "exit" && this.visualElement.isControllingVariants,
8518
+ isExit: this.activeStates.exit
8412
8519
  });
8413
8520
  }
8414
8521
  }
@@ -8634,11 +8741,12 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
8634
8741
  return attrsProps;
8635
8742
  }
8636
8743
  const PrimitiveRef = vue.ref();
8637
- function onMotionComplete() {
8638
- var _a;
8744
+ function onMotionComplete(e) {
8745
+ var _a, _b;
8639
8746
  if (props.asChild) {
8640
8747
  (_a = PrimitiveRef.value) == null ? void 0 : _a.$forceUpdate();
8641
8748
  }
8749
+ (_b = attrs.onMotioncomplete) == null ? void 0 : _b.call(attrs, e);
8642
8750
  }
8643
8751
  return (_ctx, _cache) => {
8644
8752
  var _a;
@@ -8834,10 +8942,10 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
8834
8942
  }
8835
8943
  }
8836
8944
  }
8837
- doneCallbacks.set(el, doneCallback);
8838
- el.addEventListener("motioncomplete", doneCallback);
8839
8945
  delay(() => {
8840
8946
  state2.setActive("exit", true);
8947
+ doneCallbacks.set(el, doneCallback);
8948
+ el.addEventListener("motioncomplete", doneCallback);
8841
8949
  });
8842
8950
  }
8843
8951
  const transitionProps = vue.computed(() => {
@@ -9095,11 +9203,18 @@ function useTransform(input, inputRangeOrTransformer, outputRange, options) {
9095
9203
  if (typeof input === "function") {
9096
9204
  return useComputed(input);
9097
9205
  }
9098
- const transformer = typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(inputRangeOrTransformer, outputRange, options);
9206
+ const transformer = vue.computed(() => {
9207
+ return typeof inputRangeOrTransformer === "function" ? inputRangeOrTransformer : transform(vue.isRef(inputRangeOrTransformer) ? inputRangeOrTransformer.value : inputRangeOrTransformer, outputRange, options);
9208
+ });
9099
9209
  return Array.isArray(input) ? useListTransform(
9100
9210
  input,
9101
9211
  transformer
9102
- ) : useListTransform([input], ([latest]) => transformer(latest));
9212
+ ) : useListTransform([input], ([latest]) => {
9213
+ if (vue.isRef(transformer)) {
9214
+ return transformer.value(latest);
9215
+ }
9216
+ return transformer(latest);
9217
+ });
9103
9218
  }
9104
9219
  function useListTransform(values, transformer) {
9105
9220
  const latest = [];
@@ -9109,7 +9224,7 @@ function useListTransform(values, transformer) {
9109
9224
  for (let i = 0; i < numValues; i++) {
9110
9225
  latest[i] = values[i].get();
9111
9226
  }
9112
- return transformer(latest);
9227
+ return vue.isRef(transformer) ? transformer.value(latest) : transformer(latest);
9113
9228
  });
9114
9229
  subscribe(values);
9115
9230
  return value;
@@ -9168,17 +9283,23 @@ function useSpring(source, config = {}) {
9168
9283
  animation.sample(frameData.delta);
9169
9284
  }
9170
9285
  stopAnimation2();
9286
+ const springConfig = vue.isRef(config) ? config.value : config;
9171
9287
  activeSpringAnimation = animateValue({
9172
9288
  keyframes: [value.get(), latestValue],
9173
9289
  velocity: value.getVelocity(),
9174
9290
  type: "spring",
9175
9291
  restDelta: 1e-3,
9176
9292
  restSpeed: 0.01,
9177
- ...config,
9293
+ ...springConfig,
9178
9294
  onUpdate: latestSetter
9179
9295
  });
9180
9296
  };
9181
- vue.watch(() => JSON.stringify(config), () => {
9297
+ vue.watch(() => {
9298
+ if (vue.isRef(config)) {
9299
+ return config.value;
9300
+ }
9301
+ return config;
9302
+ }, () => {
9182
9303
  value.attach((v, set) => {
9183
9304
  latestValue = v;
9184
9305
  latestSetter = set;
@@ -9711,6 +9832,7 @@ exports.frame = frame;
9711
9832
  exports.frameData = frameData;
9712
9833
  exports.frameSteps = frameSteps;
9713
9834
  exports.getContextWindow = getContextWindow;
9835
+ exports.hover = hover;
9714
9836
  exports.inView = inView;
9715
9837
  exports.inertia = inertia;
9716
9838
  exports.injectLayoutGroup = injectLayoutGroup;
@@ -9727,6 +9849,7 @@ exports.motionValue = motionValue;
9727
9849
  exports.mountedStates = mountedStates;
9728
9850
  exports.noop = noop;
9729
9851
  exports.pipe = pipe;
9852
+ exports.press = press;
9730
9853
  exports.progress = progress$1;
9731
9854
  exports.provideLayoutGroup = provideLayoutGroup;
9732
9855
  exports.provideMotion = provideMotion;