@betterinternship/components 3.0.0 → 3.0.1

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 (540) hide show
  1. package/dist/components/animated-count.js +1 -3
  2. package/dist/components/animated-count.js.map +1 -1
  3. package/dist/components/tabs.js +40 -0
  4. package/dist/components/tabs.js.map +1 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +1 -0
  7. package/dist/index.js.map +1 -1
  8. package/package.json +7 -2
  9. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +0 -118
  10. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js.map +0 -1
  11. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +0 -77
  12. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js.map +0 -1
  13. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +0 -190
  14. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js.map +0 -1
  15. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js +0 -46
  16. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js.map +0 -1
  17. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js +0 -15
  18. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.js.map +0 -1
  19. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js +0 -7
  20. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.js.map +0 -1
  21. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js +0 -7
  22. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.js.map +0 -1
  23. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js +0 -14
  24. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.js.map +0 -1
  25. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js +0 -15
  26. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.js.map +0 -1
  27. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js +0 -7
  28. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.js.map +0 -1
  29. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +0 -18
  30. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js.map +0 -1
  31. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js +0 -11
  32. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.js.map +0 -1
  33. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js +0 -10
  34. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.js.map +0 -1
  35. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +0 -9
  36. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js.map +0 -1
  37. package/dist/node_modules/framer-motion/dist/es/events/event-info.js +0 -14
  38. package/dist/node_modules/framer-motion/dist/es/events/event-info.js.map +0 -1
  39. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +0 -586
  40. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js.map +0 -1
  41. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +0 -51
  42. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js.map +0 -1
  43. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +0 -130
  44. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js.map +0 -1
  45. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +0 -42
  46. package/dist/node_modules/framer-motion/dist/es/gestures/focus.js.map +0 -1
  47. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +0 -31
  48. package/dist/node_modules/framer-motion/dist/es/gestures/hover.js.map +0 -1
  49. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +0 -285
  50. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js.map +0 -1
  51. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +0 -51
  52. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js.map +0 -1
  53. package/dist/node_modules/framer-motion/dist/es/gestures/press.js +0 -38
  54. package/dist/node_modules/framer-motion/dist/es/gestures/press.js.map +0 -1
  55. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +0 -71
  56. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js.map +0 -1
  57. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +0 -41
  58. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js.map +0 -1
  59. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js +0 -14
  60. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.js.map +0 -1
  61. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +0 -49
  62. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js.map +0 -1
  63. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +0 -18
  64. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js.map +0 -1
  65. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js +0 -22
  66. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.js.map +0 -1
  67. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +0 -138
  68. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js.map +0 -1
  69. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +0 -12
  70. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js.map +0 -1
  71. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +0 -16
  72. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js.map +0 -1
  73. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +0 -77
  74. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js.map +0 -1
  75. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js +0 -50
  76. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.js.map +0 -1
  77. package/dist/node_modules/framer-motion/dist/es/motion/index.js +0 -113
  78. package/dist/node_modules/framer-motion/dist/es/motion/index.js.map +0 -1
  79. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js +0 -4
  80. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.js.map +0 -1
  81. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +0 -52
  82. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js.map +0 -1
  83. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +0 -166
  84. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js.map +0 -1
  85. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +0 -81
  86. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js.map +0 -1
  87. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js +0 -59
  88. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.js.map +0 -1
  89. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js +0 -46
  90. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.js.map +0 -1
  91. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js +0 -14
  92. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.js.map +0 -1
  93. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js +0 -8
  94. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.js.map +0 -1
  95. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +0 -19
  96. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js.map +0 -1
  97. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +0 -28
  98. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js.map +0 -1
  99. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js +0 -37
  100. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js.map +0 -1
  101. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js +0 -31
  102. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js.map +0 -1
  103. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +0 -12
  104. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js.map +0 -1
  105. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +0 -59
  106. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js.map +0 -1
  107. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js +0 -9
  108. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js.map +0 -1
  109. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js +0 -34
  110. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.js.map +0 -1
  111. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +0 -26
  112. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js.map +0 -1
  113. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +0 -12
  114. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js.map +0 -1
  115. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js +0 -9
  116. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js.map +0 -1
  117. package/dist/node_modules/framer-motion/dist/es/utils/distance.js +0 -10
  118. package/dist/node_modules/framer-motion/dist/es/utils/distance.js.map +0 -1
  119. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js +0 -7
  120. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.js.map +0 -1
  121. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js +0 -4
  122. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.js.map +0 -1
  123. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js +0 -8
  124. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.js.map +0 -1
  125. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js +0 -49
  126. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js.map +0 -1
  127. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +0 -61
  128. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js.map +0 -1
  129. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js +0 -20
  130. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.js.map +0 -1
  131. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js +0 -8
  132. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js.map +0 -1
  133. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +0 -200
  134. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js.map +0 -1
  135. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js +0 -386
  136. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.js.map +0 -1
  137. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +0 -181
  138. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js.map +0 -1
  139. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +0 -88
  140. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js.map +0 -1
  141. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +0 -12
  142. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js.map +0 -1
  143. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js +0 -18
  144. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.js.map +0 -1
  145. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js +0 -88
  146. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.js.map +0 -1
  147. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js +0 -52
  148. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.js.map +0 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js +0 -331
  150. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.js.map +0 -1
  151. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js +0 -18
  152. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.js.map +0 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js +0 -20
  154. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.js.map +0 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js +0 -6
  156. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.js.map +0 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js +0 -10
  158. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.js.map +0 -1
  159. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js +0 -106
  160. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.js.map +0 -1
  161. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js +0 -109
  162. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.js.map +0 -1
  163. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js +0 -60
  164. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.js.map +0 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js +0 -27
  166. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.js.map +0 -1
  167. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +0 -142
  168. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js.map +0 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js +0 -148
  170. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.js.map +0 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js +0 -12
  172. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.js.map +0 -1
  173. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js +0 -10
  174. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.js.map +0 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js +0 -13
  176. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.js.map +0 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js +0 -6
  178. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.js.map +0 -1
  179. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js +0 -8
  180. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.js.map +0 -1
  181. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js +0 -16
  182. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.js.map +0 -1
  183. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js +0 -31
  184. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.js.map +0 -1
  185. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js +0 -47
  186. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.js.map +0 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js +0 -7
  188. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.js.map +0 -1
  189. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js +0 -8
  190. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.js.map +0 -1
  191. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js +0 -27
  192. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.js.map +0 -1
  193. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js +0 -16
  194. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.js.map +0 -1
  195. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js +0 -44
  196. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.js.map +0 -1
  197. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js +0 -43
  198. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.js.map +0 -1
  199. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js +0 -41
  200. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.js.map +0 -1
  201. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js +0 -14
  202. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.js.map +0 -1
  203. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js +0 -31
  204. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.js.map +0 -1
  205. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +0 -27
  206. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js.map +0 -1
  207. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js +0 -27
  208. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.js.map +0 -1
  209. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js +0 -7
  210. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.js.map +0 -1
  211. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js +0 -19
  212. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.js.map +0 -1
  213. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js +0 -15
  214. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.js.map +0 -1
  215. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js +0 -4
  216. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.js.map +0 -1
  217. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js +0 -29
  218. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.js.map +0 -1
  219. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js +0 -16
  220. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.js.map +0 -1
  221. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js +0 -29
  222. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.js.map +0 -1
  223. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js +0 -55
  224. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.js.map +0 -1
  225. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js +0 -13
  226. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.js.map +0 -1
  227. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js +0 -16
  228. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.js.map +0 -1
  229. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js +0 -13
  230. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.js.map +0 -1
  231. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js +0 -13
  232. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.js.map +0 -1
  233. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js +0 -21
  234. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.js.map +0 -1
  235. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js +0 -7
  236. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.js.map +0 -1
  237. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js +0 -73
  238. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.js.map +0 -1
  239. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js +0 -7
  240. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.js.map +0 -1
  241. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js +0 -7
  242. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.js.map +0 -1
  243. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js +0 -13
  244. package/dist/node_modules/motion-dom/dist/es/frameloop/order.js.map +0 -1
  245. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js +0 -84
  246. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.js.map +0 -1
  247. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js +0 -32
  248. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.js.map +0 -1
  249. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js +0 -10
  250. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.js.map +0 -1
  251. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js +0 -29
  252. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.js.map +0 -1
  253. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js +0 -70
  254. package/dist/node_modules/motion-dom/dist/es/gestures/hover.js.map +0 -1
  255. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js +0 -97
  256. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.js.map +0 -1
  257. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +0 -34
  258. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js.map +0 -1
  259. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js +0 -39
  260. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.js.map +0 -1
  261. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js +0 -4
  262. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.js.map +0 -1
  263. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js +0 -21
  264. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.js.map +0 -1
  265. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js +0 -19
  266. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.js.map +0 -1
  267. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js +0 -16
  268. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.js.map +0 -1
  269. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js +0 -69
  270. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.js.map +0 -1
  271. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js +0 -34
  272. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.js.map +0 -1
  273. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js +0 -32
  274. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.js.map +0 -1
  275. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js +0 -125
  276. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.js.map +0 -1
  277. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js +0 -59
  278. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.js.map +0 -1
  279. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js +0 -55
  280. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.js.map +0 -1
  281. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js +0 -18
  282. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.js.map +0 -1
  283. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js +0 -32
  284. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.js.map +0 -1
  285. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js +0 -14
  286. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.js.map +0 -1
  287. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js +0 -28
  288. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.js.map +0 -1
  289. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js +0 -1660
  290. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.js.map +0 -1
  291. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js +0 -20
  292. package/dist/node_modules/motion-dom/dist/es/projection/node/state.js.map +0 -1
  293. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +0 -85
  294. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js.map +0 -1
  295. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js +0 -42
  296. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.js.map +0 -1
  297. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js +0 -36
  298. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.js.map +0 -1
  299. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +0 -18
  300. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js.map +0 -1
  301. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js +0 -53
  302. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.js.map +0 -1
  303. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js +0 -4
  304. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.js.map +0 -1
  305. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js +0 -6
  306. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.js.map +0 -1
  307. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js +0 -25
  308. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.js.map +0 -1
  309. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js +0 -27
  310. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.js.map +0 -1
  311. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js +0 -18
  312. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.js.map +0 -1
  313. package/dist/node_modules/motion-dom/dist/es/render/Feature.js +0 -15
  314. package/dist/node_modules/motion-dom/dist/es/render/Feature.js.map +0 -1
  315. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js +0 -564
  316. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.js.map +0 -1
  317. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js +0 -43
  318. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.js.map +0 -1
  319. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js +0 -4
  320. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.js.map +0 -1
  321. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js +0 -84
  322. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.js.map +0 -1
  323. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js +0 -10
  324. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.js.map +0 -1
  325. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +0 -6
  326. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js.map +0 -1
  327. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +0 -55
  328. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js.map +0 -1
  329. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +0 -66
  330. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js.map +0 -1
  331. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +0 -72
  332. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js.map +0 -1
  333. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js +0 -18
  334. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.js.map +0 -1
  335. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +0 -22
  336. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js.map +0 -1
  337. package/dist/node_modules/motion-dom/dist/es/render/store.js +0 -4
  338. package/dist/node_modules/motion-dom/dist/es/render/store.js.map +0 -1
  339. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +0 -52
  340. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js.map +0 -1
  341. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +0 -64
  342. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js.map +0 -1
  343. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js +0 -31
  344. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.js.map +0 -1
  345. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js +0 -4
  346. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.js.map +0 -1
  347. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +0 -32
  348. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js.map +0 -1
  349. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js +0 -13
  350. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.js.map +0 -1
  351. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +0 -20
  352. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js.map +0 -1
  353. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js +0 -387
  354. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.js.map +0 -1
  355. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js +0 -33
  356. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.js.map +0 -1
  357. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js +0 -8
  358. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.js.map +0 -1
  359. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js +0 -14
  360. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.js.map +0 -1
  361. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +0 -12
  362. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js.map +0 -1
  363. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js +0 -6
  364. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.js.map +0 -1
  365. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js +0 -9
  366. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.js.map +0 -1
  367. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js +0 -14
  368. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.js.map +0 -1
  369. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js +0 -36
  370. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.js.map +0 -1
  371. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js +0 -56
  372. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.js.map +0 -1
  373. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +0 -20
  374. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js.map +0 -1
  375. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js +0 -6
  376. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.js.map +0 -1
  377. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js +0 -9
  378. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.js.map +0 -1
  379. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js +0 -37
  380. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.js.map +0 -1
  381. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js +0 -32
  382. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.js.map +0 -1
  383. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js +0 -15
  384. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.js.map +0 -1
  385. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js +0 -13
  386. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.js.map +0 -1
  387. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js +0 -64
  388. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.js.map +0 -1
  389. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js +0 -32
  390. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.js.map +0 -1
  391. package/dist/node_modules/motion-dom/dist/es/resize/index.js +0 -9
  392. package/dist/node_modules/motion-dom/dist/es/resize/index.js.map +0 -1
  393. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js +0 -15
  394. package/dist/node_modules/motion-dom/dist/es/utils/border-radius.js.map +0 -1
  395. package/dist/node_modules/motion-dom/dist/es/utils/delay.js +0 -21
  396. package/dist/node_modules/motion-dom/dist/es/utils/delay.js.map +0 -1
  397. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js +0 -80
  398. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.js.map +0 -1
  399. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js +0 -14
  400. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.js.map +0 -1
  401. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js +0 -12
  402. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.js.map +0 -1
  403. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js +0 -12
  404. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.js.map +0 -1
  405. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js +0 -48
  406. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.js.map +0 -1
  407. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js +0 -94
  408. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.js.map +0 -1
  409. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js +0 -6
  410. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.js.map +0 -1
  411. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js +0 -15
  412. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.js.map +0 -1
  413. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js +0 -27
  414. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.js.map +0 -1
  415. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js +0 -17
  416. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.js.map +0 -1
  417. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +0 -18
  418. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js.map +0 -1
  419. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js +0 -8
  420. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.js.map +0 -1
  421. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js +0 -16
  422. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.js.map +0 -1
  423. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js +0 -10
  424. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.js.map +0 -1
  425. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js +0 -6
  426. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.js.map +0 -1
  427. package/dist/node_modules/motion-dom/dist/es/value/index.js +0 -320
  428. package/dist/node_modules/motion-dom/dist/es/value/index.js.map +0 -1
  429. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js +0 -10
  430. package/dist/node_modules/motion-dom/dist/es/value/types/auto.js.map +0 -1
  431. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js +0 -41
  432. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.js.map +0 -1
  433. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js +0 -43
  434. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.js.map +0 -1
  435. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js +0 -23
  436. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.js.map +0 -1
  437. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js +0 -33
  438. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.js.map +0 -1
  439. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js +0 -26
  440. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.js.map +0 -1
  441. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js +0 -30
  442. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.js.map +0 -1
  443. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js +0 -31
  444. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.js.map +0 -1
  445. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js +0 -114
  446. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.js.map +0 -1
  447. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js +0 -13
  448. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.js.map +0 -1
  449. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js +0 -16
  450. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.js.map +0 -1
  451. package/dist/node_modules/motion-dom/dist/es/value/types/int.js +0 -9
  452. package/dist/node_modules/motion-dom/dist/es/value/types/int.js.map +0 -1
  453. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js +0 -34
  454. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.js.map +0 -1
  455. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +0 -71
  456. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js.map +0 -1
  457. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js +0 -38
  458. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.js.map +0 -1
  459. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js +0 -18
  460. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.js.map +0 -1
  461. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js +0 -19
  462. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.js.map +0 -1
  463. package/dist/node_modules/motion-dom/dist/es/value/types/test.js +0 -7
  464. package/dist/node_modules/motion-dom/dist/es/value/types/test.js.map +0 -1
  465. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js +0 -18
  466. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.js.map +0 -1
  467. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js +0 -4
  468. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.js.map +0 -1
  469. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js +0 -16
  470. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.js.map +0 -1
  471. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js +0 -4
  472. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.js.map +0 -1
  473. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js +0 -11
  474. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.js.map +0 -1
  475. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js +0 -6
  476. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.js.map +0 -1
  477. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js +0 -6
  478. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.js.map +0 -1
  479. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js +0 -4
  480. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.js.map +0 -1
  481. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js +0 -4
  482. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.js.map +0 -1
  483. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +0 -11
  484. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js.map +0 -1
  485. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js +0 -21
  486. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.js.map +0 -1
  487. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +0 -8
  488. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js.map +0 -1
  489. package/dist/node_modules/motion-utils/dist/es/array.js +0 -12
  490. package/dist/node_modules/motion-utils/dist/es/array.js.map +0 -1
  491. package/dist/node_modules/motion-utils/dist/es/clamp.js +0 -10
  492. package/dist/node_modules/motion-utils/dist/es/clamp.js.map +0 -1
  493. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js +0 -10
  494. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.js.map +0 -1
  495. package/dist/node_modules/motion-utils/dist/es/easing/back.js +0 -10
  496. package/dist/node_modules/motion-utils/dist/es/easing/back.js.map +0 -1
  497. package/dist/node_modules/motion-utils/dist/es/easing/circ.js +0 -9
  498. package/dist/node_modules/motion-utils/dist/es/easing/circ.js.map +0 -1
  499. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js +0 -53
  500. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.js.map +0 -1
  501. package/dist/node_modules/motion-utils/dist/es/easing/ease.js +0 -8
  502. package/dist/node_modules/motion-utils/dist/es/easing/ease.js.map +0 -1
  503. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js +0 -7
  504. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.js.map +0 -1
  505. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js +0 -7
  506. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.js.map +0 -1
  507. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js +0 -5
  508. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.js.map +0 -1
  509. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js +0 -7
  510. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.js.map +0 -1
  511. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js +0 -42
  512. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.js.map +0 -1
  513. package/dist/node_modules/motion-utils/dist/es/errors.js +0 -20
  514. package/dist/node_modules/motion-utils/dist/es/errors.js.map +0 -1
  515. package/dist/node_modules/motion-utils/dist/es/format-error-message.js +0 -8
  516. package/dist/node_modules/motion-utils/dist/es/format-error-message.js.map +0 -1
  517. package/dist/node_modules/motion-utils/dist/es/global-config.js +0 -4
  518. package/dist/node_modules/motion-utils/dist/es/global-config.js.map +0 -1
  519. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js +0 -7
  520. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.js.map +0 -1
  521. package/dist/node_modules/motion-utils/dist/es/is-object.js +0 -4
  522. package/dist/node_modules/motion-utils/dist/es/is-object.js.map +0 -1
  523. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js +0 -7
  524. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.js.map +0 -1
  525. package/dist/node_modules/motion-utils/dist/es/memo.js +0 -12
  526. package/dist/node_modules/motion-utils/dist/es/memo.js.map +0 -1
  527. package/dist/node_modules/motion-utils/dist/es/noop.js +0 -5
  528. package/dist/node_modules/motion-utils/dist/es/noop.js.map +0 -1
  529. package/dist/node_modules/motion-utils/dist/es/pipe.js +0 -11
  530. package/dist/node_modules/motion-utils/dist/es/pipe.js.map +0 -1
  531. package/dist/node_modules/motion-utils/dist/es/progress.js +0 -15
  532. package/dist/node_modules/motion-utils/dist/es/progress.js.map +0 -1
  533. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js +0 -41
  534. package/dist/node_modules/motion-utils/dist/es/subscription-manager.js.map +0 -1
  535. package/dist/node_modules/motion-utils/dist/es/time-conversion.js +0 -13
  536. package/dist/node_modules/motion-utils/dist/es/time-conversion.js.map +0 -1
  537. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js +0 -8
  538. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.js.map +0 -1
  539. package/dist/node_modules/motion-utils/dist/es/warn-once.js +0 -12
  540. package/dist/node_modules/motion-utils/dist/es/warn-once.js.map +0 -1
@@ -1,586 +0,0 @@
1
- import { addPointerEvent } from '../../events/add-pointer-event.js';
2
- import { extractEventInfo } from '../../events/event-info.js';
3
- import { getContextWindow } from '../../utils/get-context-window.js';
4
- import { isRefObject } from '../../utils/is-ref-object.js';
5
- import { PanSession } from '../pan/PanSession.js';
6
- import { applyConstraints, calcRelativeConstraints, resolveDragElastic, calcViewportConstraints, defaultElastic, rebaseAxisConstraints, calcOrigin } from './utils/constraints.js';
7
- import { createBox } from '../../../../../motion-dom/dist/es/projection/geometry/models.js';
8
- import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.js';
9
- import { eachAxis } from '../../../../../motion-dom/dist/es/projection/utils/each-axis.js';
10
- import { invariant } from '../../../../../motion-utils/dist/es/errors.js';
11
- import { measurePageBox } from '../../../../../motion-dom/dist/es/projection/utils/measure.js';
12
- import { convertBoxToBoundingBox, convertBoundingBoxToBox } from '../../../../../motion-dom/dist/es/projection/geometry/conversion.js';
13
- import { addValueToWillChange } from '../../../../../motion-dom/dist/es/value/will-change/add-will-change.js';
14
- import { animateMotionValue } from '../../../../../motion-dom/dist/es/animation/interfaces/motion-value.js';
15
- import { addDomEvent } from '../../../../../motion-dom/dist/es/events/add-dom-event.js';
16
- import { setDragLock } from '../../../../../motion-dom/dist/es/gestures/drag/state/set-active.js';
17
- import { percent } from '../../../../../motion-dom/dist/es/value/types/numbers/units.js';
18
- import { calcLength } from '../../../../../motion-dom/dist/es/projection/geometry/delta-calc.js';
19
- import { mixNumber } from '../../../../../motion-dom/dist/es/utils/mix/number.js';
20
- import { resize } from '../../../../../motion-dom/dist/es/resize/index.js';
21
- import { isElementTextInput } from '../../../../../motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js';
22
-
23
- const elementDragControls = new WeakMap();
24
- class VisualElementDragControls {
25
- constructor(visualElement) {
26
- this.openDragLock = null;
27
- this.isDragging = false;
28
- this.currentDirection = null;
29
- this.originPoint = { x: 0, y: 0 };
30
- /**
31
- * The permitted boundaries of travel, in pixels.
32
- */
33
- this.constraints = false;
34
- this.hasMutatedConstraints = false;
35
- /**
36
- * The per-axis resolved elastic values.
37
- */
38
- this.elastic = createBox();
39
- /**
40
- * The latest pointer event. Used as fallback when the `cancel` and `stop` functions are called without arguments.
41
- */
42
- this.latestPointerEvent = null;
43
- /**
44
- * The latest pan info. Used as fallback when the `cancel` and `stop` functions are called without arguments.
45
- */
46
- this.latestPanInfo = null;
47
- this.visualElement = visualElement;
48
- }
49
- start(originEvent, { snapToCursor = false, distanceThreshold } = {}) {
50
- /**
51
- * Don't start dragging if this component is exiting
52
- */
53
- const { presenceContext } = this.visualElement;
54
- if (presenceContext && presenceContext.isPresent === false)
55
- return;
56
- const onSessionStart = (event) => {
57
- if (snapToCursor) {
58
- this.snapToCursor(extractEventInfo(event).point);
59
- }
60
- this.stopAnimation();
61
- };
62
- const onStart = (event, info) => {
63
- // Attempt to grab the global drag gesture lock - maybe make this part of PanSession
64
- const { drag, dragPropagation, onDragStart } = this.getProps();
65
- if (drag && !dragPropagation) {
66
- if (this.openDragLock)
67
- this.openDragLock();
68
- this.openDragLock = setDragLock(drag);
69
- // If we don 't have the lock, don't start dragging
70
- if (!this.openDragLock)
71
- return;
72
- }
73
- this.latestPointerEvent = event;
74
- this.latestPanInfo = info;
75
- this.isDragging = true;
76
- this.currentDirection = null;
77
- this.resolveConstraints();
78
- if (this.visualElement.projection) {
79
- this.visualElement.projection.isAnimationBlocked = true;
80
- this.visualElement.projection.target = undefined;
81
- }
82
- /**
83
- * Record gesture origin and pointer offset
84
- */
85
- eachAxis((axis) => {
86
- let current = this.getAxisMotionValue(axis).get() || 0;
87
- /**
88
- * If the MotionValue is a percentage value convert to px
89
- */
90
- if (percent.test(current)) {
91
- const { projection } = this.visualElement;
92
- if (projection && projection.layout) {
93
- const measuredAxis = projection.layout.layoutBox[axis];
94
- if (measuredAxis) {
95
- const length = calcLength(measuredAxis);
96
- current = length * (parseFloat(current) / 100);
97
- }
98
- }
99
- }
100
- this.originPoint[axis] = current;
101
- });
102
- // Fire onDragStart event
103
- if (onDragStart) {
104
- frame.update(() => onDragStart(event, info), false, true);
105
- }
106
- addValueToWillChange(this.visualElement, "transform");
107
- const { animationState } = this.visualElement;
108
- animationState && animationState.setActive("whileDrag", true);
109
- };
110
- const onMove = (event, info) => {
111
- this.latestPointerEvent = event;
112
- this.latestPanInfo = info;
113
- const { dragPropagation, dragDirectionLock, onDirectionLock, onDrag, } = this.getProps();
114
- // If we didn't successfully receive the gesture lock, early return.
115
- if (!dragPropagation && !this.openDragLock)
116
- return;
117
- const { offset } = info;
118
- // Attempt to detect drag direction if directionLock is true
119
- if (dragDirectionLock && this.currentDirection === null) {
120
- this.currentDirection = getCurrentDirection(offset);
121
- // If we've successfully set a direction, notify listener
122
- if (this.currentDirection !== null) {
123
- onDirectionLock && onDirectionLock(this.currentDirection);
124
- }
125
- return;
126
- }
127
- // Update each point with the latest position
128
- this.updateAxis("x", info.point, offset);
129
- this.updateAxis("y", info.point, offset);
130
- /**
131
- * Ideally we would leave the renderer to fire naturally at the end of
132
- * this frame but if the element is about to change layout as the result
133
- * of a re-render we want to ensure the browser can read the latest
134
- * bounding box to ensure the pointer and element don't fall out of sync.
135
- */
136
- this.visualElement.render();
137
- /**
138
- * This must fire after the render call as it might trigger a state
139
- * change which itself might trigger a layout update.
140
- */
141
- if (onDrag) {
142
- frame.update(() => onDrag(event, info), false, true);
143
- }
144
- };
145
- const onSessionEnd = (event, info) => {
146
- this.latestPointerEvent = event;
147
- this.latestPanInfo = info;
148
- this.stop(event, info);
149
- this.latestPointerEvent = null;
150
- this.latestPanInfo = null;
151
- };
152
- const resumeAnimation = () => {
153
- const { dragSnapToOrigin: snap } = this.getProps();
154
- if (snap || this.constraints) {
155
- this.startAnimation({ x: 0, y: 0 });
156
- }
157
- };
158
- const { dragSnapToOrigin } = this.getProps();
159
- this.panSession = new PanSession(originEvent, {
160
- onSessionStart,
161
- onStart,
162
- onMove,
163
- onSessionEnd,
164
- resumeAnimation,
165
- }, {
166
- transformPagePoint: this.visualElement.getTransformPagePoint(),
167
- dragSnapToOrigin,
168
- distanceThreshold,
169
- contextWindow: getContextWindow(this.visualElement),
170
- element: this.visualElement.current,
171
- });
172
- }
173
- /**
174
- * @internal
175
- */
176
- stop(event, panInfo) {
177
- const finalEvent = event || this.latestPointerEvent;
178
- const finalPanInfo = panInfo || this.latestPanInfo;
179
- const isDragging = this.isDragging;
180
- this.cancel();
181
- if (!isDragging || !finalPanInfo || !finalEvent)
182
- return;
183
- const { velocity } = finalPanInfo;
184
- this.startAnimation(velocity);
185
- const { onDragEnd } = this.getProps();
186
- if (onDragEnd) {
187
- frame.postRender(() => onDragEnd(finalEvent, finalPanInfo));
188
- }
189
- }
190
- /**
191
- * @internal
192
- */
193
- cancel() {
194
- this.isDragging = false;
195
- const { projection, animationState } = this.visualElement;
196
- if (projection) {
197
- projection.isAnimationBlocked = false;
198
- }
199
- this.endPanSession();
200
- const { dragPropagation } = this.getProps();
201
- if (!dragPropagation && this.openDragLock) {
202
- this.openDragLock();
203
- this.openDragLock = null;
204
- }
205
- animationState && animationState.setActive("whileDrag", false);
206
- }
207
- /**
208
- * Clean up the pan session without modifying other drag state.
209
- * This is used during unmount to ensure event listeners are removed
210
- * without affecting projection animations or drag locks.
211
- * @internal
212
- */
213
- endPanSession() {
214
- this.panSession && this.panSession.end();
215
- this.panSession = undefined;
216
- }
217
- updateAxis(axis, _point, offset) {
218
- const { drag } = this.getProps();
219
- // If we're not dragging this axis, do an early return.
220
- if (!offset || !shouldDrag(axis, drag, this.currentDirection))
221
- return;
222
- const axisValue = this.getAxisMotionValue(axis);
223
- let next = this.originPoint[axis] + offset[axis];
224
- // Apply constraints
225
- if (this.constraints && this.constraints[axis]) {
226
- next = applyConstraints(next, this.constraints[axis], this.elastic[axis]);
227
- }
228
- axisValue.set(next);
229
- }
230
- resolveConstraints() {
231
- const { dragConstraints, dragElastic } = this.getProps();
232
- const layout = this.visualElement.projection &&
233
- !this.visualElement.projection.layout
234
- ? this.visualElement.projection.measure(false)
235
- : this.visualElement.projection?.layout;
236
- const prevConstraints = this.constraints;
237
- if (dragConstraints && isRefObject(dragConstraints)) {
238
- if (!this.constraints) {
239
- this.constraints = this.resolveRefConstraints();
240
- }
241
- }
242
- else {
243
- if (dragConstraints && layout) {
244
- this.constraints = calcRelativeConstraints(layout.layoutBox, dragConstraints);
245
- }
246
- else {
247
- this.constraints = false;
248
- }
249
- }
250
- this.elastic = resolveDragElastic(dragElastic);
251
- /**
252
- * If we're outputting to external MotionValues, we want to rebase the measured constraints
253
- * from viewport-relative to component-relative. This only applies to relative (non-ref)
254
- * constraints, as ref-based constraints from calcViewportConstraints are already in the
255
- * correct coordinate space for the motion value transform offset.
256
- */
257
- if (prevConstraints !== this.constraints &&
258
- !isRefObject(dragConstraints) &&
259
- layout &&
260
- this.constraints &&
261
- !this.hasMutatedConstraints) {
262
- eachAxis((axis) => {
263
- if (this.constraints !== false &&
264
- this.getAxisMotionValue(axis)) {
265
- this.constraints[axis] = rebaseAxisConstraints(layout.layoutBox[axis], this.constraints[axis]);
266
- }
267
- });
268
- }
269
- }
270
- resolveRefConstraints() {
271
- const { dragConstraints: constraints, onMeasureDragConstraints } = this.getProps();
272
- if (!constraints || !isRefObject(constraints))
273
- return false;
274
- const constraintsElement = constraints.current;
275
- invariant(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
276
- const { projection } = this.visualElement;
277
- // TODO
278
- if (!projection || !projection.layout)
279
- return false;
280
- /**
281
- * Refresh the root scroll offset so the constraint's viewport box
282
- * translates to correct page coordinates. The scroll captured at
283
- * drag mount can be stale if the document was scrolled afterwards —
284
- * e.g. via the browser restoring scroll on refresh, or an ancestor
285
- * layout effect running after this element's mount (#2829).
286
- *
287
- * Clear the cached scroll first so `updateScroll` bypasses its
288
- * per-animationId cache and re-reads the live value.
289
- */
290
- if (projection.root) {
291
- projection.root.scroll = undefined;
292
- projection.root.updateScroll();
293
- }
294
- const constraintsBox = measurePageBox(constraintsElement, projection.root, this.visualElement.getTransformPagePoint());
295
- let measuredConstraints = calcViewportConstraints(projection.layout.layoutBox, constraintsBox);
296
- /**
297
- * If there's an onMeasureDragConstraints listener we call it and
298
- * if different constraints are returned, set constraints to that
299
- */
300
- if (onMeasureDragConstraints) {
301
- const userConstraints = onMeasureDragConstraints(convertBoxToBoundingBox(measuredConstraints));
302
- this.hasMutatedConstraints = !!userConstraints;
303
- if (userConstraints) {
304
- measuredConstraints = convertBoundingBoxToBox(userConstraints);
305
- }
306
- }
307
- return measuredConstraints;
308
- }
309
- startAnimation(velocity) {
310
- const { drag, dragMomentum, dragElastic, dragTransition, dragSnapToOrigin, onDragTransitionEnd, } = this.getProps();
311
- const constraints = this.constraints || {};
312
- const momentumAnimations = eachAxis((axis) => {
313
- if (!shouldDrag(axis, drag, this.currentDirection)) {
314
- return;
315
- }
316
- let transition = (constraints && constraints[axis]) || {};
317
- if (dragSnapToOrigin === true ||
318
- dragSnapToOrigin === axis)
319
- transition = { min: 0, max: 0 };
320
- /**
321
- * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
322
- * of spring animations so we should look into adding a disable spring option to `inertia`.
323
- * We could do something here where we affect the `bounceStiffness` and `bounceDamping`
324
- * using the value of `dragElastic`.
325
- */
326
- const bounceStiffness = dragElastic ? 200 : 1000000;
327
- const bounceDamping = dragElastic ? 40 : 10000000;
328
- const inertia = {
329
- type: "inertia",
330
- velocity: dragMomentum ? velocity[axis] : 0,
331
- bounceStiffness,
332
- bounceDamping,
333
- timeConstant: 750,
334
- restDelta: 1,
335
- restSpeed: 10,
336
- ...dragTransition,
337
- ...transition,
338
- };
339
- // If we're not animating on an externally-provided `MotionValue` we can use the
340
- // component's animation controls which will handle interactions with whileHover (etc),
341
- // otherwise we just have to animate the `MotionValue` itself.
342
- return this.startAxisValueAnimation(axis, inertia);
343
- });
344
- // Run all animations and then resolve the new drag constraints.
345
- return Promise.all(momentumAnimations).then(onDragTransitionEnd);
346
- }
347
- startAxisValueAnimation(axis, transition) {
348
- const axisValue = this.getAxisMotionValue(axis);
349
- addValueToWillChange(this.visualElement, axis);
350
- return axisValue.start(animateMotionValue(axis, axisValue, 0, transition, this.visualElement, false));
351
- }
352
- stopAnimation() {
353
- eachAxis((axis) => this.getAxisMotionValue(axis).stop());
354
- }
355
- /**
356
- * Drag works differently depending on which props are provided.
357
- *
358
- * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
359
- * - Otherwise, we apply the delta to the x/y motion values.
360
- */
361
- getAxisMotionValue(axis) {
362
- const dragKey = `_drag${axis.toUpperCase()}`;
363
- const props = this.visualElement.getProps();
364
- const externalMotionValue = props[dragKey];
365
- return externalMotionValue
366
- ? externalMotionValue
367
- : this.visualElement.getValue(axis, this.visualElement.latestValues[axis] ?? 0);
368
- }
369
- snapToCursor(point) {
370
- eachAxis((axis) => {
371
- const { drag } = this.getProps();
372
- // If we're not dragging this axis, do an early return.
373
- if (!shouldDrag(axis, drag, this.currentDirection))
374
- return;
375
- const { projection } = this.visualElement;
376
- const axisValue = this.getAxisMotionValue(axis);
377
- if (projection && projection.layout) {
378
- const { min, max } = projection.layout.layoutBox[axis];
379
- /**
380
- * The layout measurement includes the current transform value,
381
- * so we need to add it back to get the correct snap position.
382
- * This fixes an issue where elements with initial coordinates
383
- * would snap to the wrong position on the first drag.
384
- */
385
- const current = axisValue.get() || 0;
386
- axisValue.set(point[axis] - mixNumber(min, max, 0.5) + current);
387
- }
388
- });
389
- }
390
- /**
391
- * When the viewport resizes we want to check if the measured constraints
392
- * have changed and, if so, reposition the element within those new constraints
393
- * relative to where it was before the resize.
394
- */
395
- scalePositionWithinConstraints() {
396
- if (!this.visualElement.current)
397
- return;
398
- const { drag, dragConstraints } = this.getProps();
399
- const { projection } = this.visualElement;
400
- if (!isRefObject(dragConstraints) || !projection || !this.constraints)
401
- return;
402
- /**
403
- * Stop current animations as there can be visual glitching if we try to do
404
- * this mid-animation
405
- */
406
- this.stopAnimation();
407
- /**
408
- * Record the relative position of the dragged element relative to the
409
- * constraints box and save as a progress value.
410
- */
411
- const boxProgress = { x: 0, y: 0 };
412
- eachAxis((axis) => {
413
- const axisValue = this.getAxisMotionValue(axis);
414
- if (axisValue && this.constraints !== false) {
415
- const latest = axisValue.get();
416
- boxProgress[axis] = calcOrigin({ min: latest, max: latest }, this.constraints[axis]);
417
- }
418
- });
419
- /**
420
- * Update the layout of this element and resolve the latest drag constraints
421
- */
422
- const { transformTemplate } = this.visualElement.getProps();
423
- this.visualElement.current.style.transform = transformTemplate
424
- ? transformTemplate({}, "")
425
- : "none";
426
- projection.root && projection.root.updateScroll();
427
- projection.updateLayout();
428
- /**
429
- * Reset constraints so resolveConstraints() will recalculate them
430
- * with the freshly measured layout rather than returning the cached value.
431
- */
432
- this.constraints = false;
433
- this.resolveConstraints();
434
- /**
435
- * For each axis, calculate the current progress of the layout axis
436
- * within the new constraints.
437
- */
438
- eachAxis((axis) => {
439
- if (!shouldDrag(axis, drag, null))
440
- return;
441
- /**
442
- * Calculate a new transform based on the previous box progress
443
- */
444
- const axisValue = this.getAxisMotionValue(axis);
445
- const { min, max } = this.constraints[axis];
446
- axisValue.set(mixNumber(min, max, boxProgress[axis]));
447
- });
448
- /**
449
- * Flush the updated transform to the DOM synchronously to prevent
450
- * a visual flash at the element's CSS layout position (0,0) when
451
- * the transform was stripped for measurement.
452
- */
453
- this.visualElement.render();
454
- }
455
- addListeners() {
456
- if (!this.visualElement.current)
457
- return;
458
- elementDragControls.set(this.visualElement, this);
459
- const element = this.visualElement.current;
460
- /**
461
- * Attach a pointerdown event listener on this DOM element to initiate drag tracking.
462
- */
463
- const stopPointerListener = addPointerEvent(element, "pointerdown", (event) => {
464
- const { drag, dragListener = true } = this.getProps();
465
- const target = event.target;
466
- /**
467
- * Only block drag if clicking on a text input child element
468
- * (input, textarea, select, contenteditable) where users might
469
- * want to select text or interact with the control.
470
- *
471
- * Buttons and links don't block drag since they don't have
472
- * click-and-move actions of their own.
473
- */
474
- const isClickingTextInputChild = target !== element && isElementTextInput(target);
475
- if (drag && dragListener && !isClickingTextInputChild) {
476
- this.start(event);
477
- }
478
- });
479
- /**
480
- * If using ref-based constraints, observe both the draggable element
481
- * and the constraint container for size changes via ResizeObserver.
482
- * Setup is deferred because dragConstraints.current is null when
483
- * addListeners first runs (React hasn't committed the ref yet).
484
- */
485
- let stopResizeObservers;
486
- const measureDragConstraints = () => {
487
- const { dragConstraints } = this.getProps();
488
- if (isRefObject(dragConstraints) && dragConstraints.current) {
489
- this.constraints = this.resolveRefConstraints();
490
- if (!stopResizeObservers) {
491
- stopResizeObservers = startResizeObservers(element, dragConstraints.current, () => this.scalePositionWithinConstraints());
492
- }
493
- }
494
- };
495
- const { projection } = this.visualElement;
496
- const stopMeasureLayoutListener = projection.addEventListener("measure", measureDragConstraints);
497
- if (projection && !projection.layout) {
498
- projection.root && projection.root.updateScroll();
499
- projection.updateLayout();
500
- }
501
- frame.read(measureDragConstraints);
502
- /**
503
- * Attach a window resize listener to scale the draggable target within its defined
504
- * constraints as the window resizes.
505
- */
506
- const stopResizeListener = addDomEvent(window, "resize", () => this.scalePositionWithinConstraints());
507
- /**
508
- * If the element's layout changes, calculate the delta and apply that to
509
- * the drag gesture's origin point.
510
- */
511
- const stopLayoutUpdateListener = projection.addEventListener("didUpdate", (({ delta, hasLayoutChanged }) => {
512
- if (this.isDragging && hasLayoutChanged) {
513
- eachAxis((axis) => {
514
- const motionValue = this.getAxisMotionValue(axis);
515
- if (!motionValue)
516
- return;
517
- this.originPoint[axis] += delta[axis].translate;
518
- motionValue.set(motionValue.get() + delta[axis].translate);
519
- });
520
- this.visualElement.render();
521
- }
522
- }));
523
- return () => {
524
- stopResizeListener();
525
- stopPointerListener();
526
- stopMeasureLayoutListener();
527
- stopLayoutUpdateListener && stopLayoutUpdateListener();
528
- stopResizeObservers && stopResizeObservers();
529
- };
530
- }
531
- getProps() {
532
- const props = this.visualElement.getProps();
533
- const { drag = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true, } = props;
534
- return {
535
- ...props,
536
- drag,
537
- dragDirectionLock,
538
- dragPropagation,
539
- dragConstraints,
540
- dragElastic,
541
- dragMomentum,
542
- };
543
- }
544
- }
545
- function skipFirstCall(callback) {
546
- let isFirst = true;
547
- return () => {
548
- if (isFirst) {
549
- isFirst = false;
550
- return;
551
- }
552
- callback();
553
- };
554
- }
555
- function startResizeObservers(element, constraintsElement, onResize) {
556
- const stopElement = resize(element, skipFirstCall(onResize));
557
- const stopContainer = resize(constraintsElement, skipFirstCall(onResize));
558
- return () => {
559
- stopElement();
560
- stopContainer();
561
- };
562
- }
563
- function shouldDrag(direction, drag, currentDirection) {
564
- return ((drag === true || drag === direction) &&
565
- (currentDirection === null || currentDirection === direction));
566
- }
567
- /**
568
- * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
569
- * than the provided threshold, return `null`.
570
- *
571
- * @param offset - The x/y offset from origin.
572
- * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
573
- */
574
- function getCurrentDirection(offset, lockThreshold = 10) {
575
- let direction = null;
576
- if (Math.abs(offset.y) > lockThreshold) {
577
- direction = "y";
578
- }
579
- else if (Math.abs(offset.x) > lockThreshold) {
580
- direction = "x";
581
- }
582
- return direction;
583
- }
584
-
585
- export { VisualElementDragControls, elementDragControls };
586
- //# sourceMappingURL=VisualElementDragControls.js.map