@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,88 +0,0 @@
1
- import { time } from '../frameloop/sync-time.js';
2
- import { setStyle } from '../render/dom/style-set.js';
3
- import { JSAnimation } from './JSAnimation.js';
4
- import { NativeAnimation } from './NativeAnimation.js';
5
- import { replaceTransitionType } from './utils/replace-transition-type.js';
6
- import { replaceStringEasing } from './waapi/utils/unsupported-easing.js';
7
- import { clamp } from '../../../../motion-utils/dist/es/clamp.js';
8
-
9
- /**
10
- * 10ms is chosen here as it strikes a balance between smooth
11
- * results (more than one keyframe per frame at 60fps) and
12
- * keyframe quantity.
13
- */
14
- const sampleDelta = 10; //ms
15
- class NativeAnimationExtended extends NativeAnimation {
16
- constructor(options) {
17
- /**
18
- * The base NativeAnimation function only supports a subset
19
- * of Motion easings, and WAAPI also only supports some
20
- * easing functions via string/cubic-bezier definitions.
21
- *
22
- * This function replaces those unsupported easing functions
23
- * with a JS easing function. This will later get compiled
24
- * to a linear() easing function.
25
- */
26
- replaceStringEasing(options);
27
- /**
28
- * Ensure we replace the transition type with a generator function
29
- * before passing to WAAPI.
30
- *
31
- * TODO: Does this have a better home? It could be shared with
32
- * JSAnimation.
33
- */
34
- replaceTransitionType(options);
35
- super(options);
36
- /**
37
- * Only set startTime when the animation should autoplay.
38
- * Setting startTime on a paused WAAPI animation unpauses it
39
- * (per the WAAPI spec), which breaks autoplay: false.
40
- */
41
- if (options.startTime !== undefined && options.autoplay !== false) {
42
- this.startTime = options.startTime;
43
- }
44
- this.options = options;
45
- }
46
- /**
47
- * WAAPI doesn't natively have any interruption capabilities.
48
- *
49
- * Rather than read committed styles back out of the DOM, we can
50
- * create a renderless JS animation and sample it twice to calculate
51
- * its current value, "previous" value, and therefore allow
52
- * Motion to calculate velocity for any subsequent animation.
53
- */
54
- updateMotionValue(value) {
55
- const { motionValue, onUpdate, onComplete, element, ...options } = this.options;
56
- if (!motionValue)
57
- return;
58
- if (value !== undefined) {
59
- motionValue.set(value);
60
- return;
61
- }
62
- const sampleAnimation = new JSAnimation({
63
- ...options,
64
- autoplay: false,
65
- });
66
- /**
67
- * Use wall-clock elapsed time for sampling.
68
- * Under CPU load, WAAPI's currentTime may not reflect actual
69
- * elapsed time, causing incorrect sampling and visual jumps.
70
- */
71
- const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);
72
- const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);
73
- const current = sampleAnimation.sample(sampleTime).value;
74
- /**
75
- * Write the estimated value to inline style so it persists
76
- * after cancel(), covering the async gap before the next
77
- * animation starts.
78
- */
79
- const { name } = this.options;
80
- if (element && name)
81
- setStyle(element, name, current);
82
- motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);
83
- sampleAnimation.stop();
84
- }
85
- }
86
-
87
- export { NativeAnimationExtended };
88
- //# sourceMappingURL=NativeAnimationExtended.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeAnimationExtended.js","sources":["../../../../../../node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs"],"sourcesContent":["import { clamp } from 'motion-utils';\nimport { time } from '../frameloop/sync-time.mjs';\nimport { setStyle } from '../render/dom/style-set.mjs';\nimport { JSAnimation } from './JSAnimation.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\nimport { replaceTransitionType } from './utils/replace-transition-type.mjs';\nimport { replaceStringEasing } from './waapi/utils/unsupported-easing.mjs';\n\n/**\n * 10ms is chosen here as it strikes a balance between smooth\n * results (more than one keyframe per frame at 60fps) and\n * keyframe quantity.\n */\nconst sampleDelta = 10; //ms\nclass NativeAnimationExtended extends NativeAnimation {\n constructor(options) {\n /**\n * The base NativeAnimation function only supports a subset\n * of Motion easings, and WAAPI also only supports some\n * easing functions via string/cubic-bezier definitions.\n *\n * This function replaces those unsupported easing functions\n * with a JS easing function. This will later get compiled\n * to a linear() easing function.\n */\n replaceStringEasing(options);\n /**\n * Ensure we replace the transition type with a generator function\n * before passing to WAAPI.\n *\n * TODO: Does this have a better home? It could be shared with\n * JSAnimation.\n */\n replaceTransitionType(options);\n super(options);\n /**\n * Only set startTime when the animation should autoplay.\n * Setting startTime on a paused WAAPI animation unpauses it\n * (per the WAAPI spec), which breaks autoplay: false.\n */\n if (options.startTime !== undefined && options.autoplay !== false) {\n this.startTime = options.startTime;\n }\n this.options = options;\n }\n /**\n * WAAPI doesn't natively have any interruption capabilities.\n *\n * Rather than read committed styles back out of the DOM, we can\n * create a renderless JS animation and sample it twice to calculate\n * its current value, \"previous\" value, and therefore allow\n * Motion to calculate velocity for any subsequent animation.\n */\n updateMotionValue(value) {\n const { motionValue, onUpdate, onComplete, element, ...options } = this.options;\n if (!motionValue)\n return;\n if (value !== undefined) {\n motionValue.set(value);\n return;\n }\n const sampleAnimation = new JSAnimation({\n ...options,\n autoplay: false,\n });\n /**\n * Use wall-clock elapsed time for sampling.\n * Under CPU load, WAAPI's currentTime may not reflect actual\n * elapsed time, causing incorrect sampling and visual jumps.\n */\n const sampleTime = Math.max(sampleDelta, time.now() - this.startTime);\n const delta = clamp(0, sampleDelta, sampleTime - sampleDelta);\n const current = sampleAnimation.sample(sampleTime).value;\n /**\n * Write the estimated value to inline style so it persists\n * after cancel(), covering the async gap before the next\n * animation starts.\n */\n const { name } = this.options;\n if (element && name)\n setStyle(element, name, current);\n motionValue.setWithVelocity(sampleAnimation.sample(Math.max(0, sampleTime - delta)).value, current, delta);\n sampleAnimation.stop();\n }\n}\n\nexport { NativeAnimationExtended };\n//# sourceMappingURL=NativeAnimationExtended.mjs.map\n"],"names":[],"mappings":";;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,uBAAuB,SAAS,eAAe,CAAC;AACtD,IAAI,WAAW,CAAC,OAAO,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAmB,CAAC,OAAO,CAAC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB,CAAC,OAAO,CAAC;AACtC,QAAQ,KAAK,CAAC,OAAO,CAAC;AACtB;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,EAAE;AAC3E,YAAY,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS;AAC9C,QAAQ;AACR,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO;AAC9B,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAiB,CAAC,KAAK,EAAE;AAC7B,QAAQ,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO;AACvF,QAAQ,IAAI,CAAC,WAAW;AACxB,YAAY;AACZ,QAAQ,IAAI,KAAK,KAAK,SAAS,EAAE;AACjC,YAAY,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;AAClC,YAAY;AACZ,QAAQ;AACR,QAAQ,MAAM,eAAe,GAAG,IAAI,WAAW,CAAC;AAChD,YAAY,GAAG,OAAO;AACtB,YAAY,QAAQ,EAAE,KAAK;AAC3B,SAAS,CAAC;AACV;AACA;AACA;AACA;AACA;AACA,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;AAC7E,QAAQ,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,EAAE,WAAW,EAAE,UAAU,GAAG,WAAW,CAAC;AACrE,QAAQ,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK;AAChE;AACA;AACA;AACA;AACA;AACA,QAAQ,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO;AACrC,QAAQ,IAAI,OAAO,IAAI,IAAI;AAC3B,YAAY,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;AAC5C,QAAQ,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC;AAClH,QAAQ,eAAe,CAAC,IAAI,EAAE;AAC9B,IAAI;AACJ;;;;","x_google_ignoreList":[0]}
@@ -1,12 +0,0 @@
1
- import { animateMotionValue } from '../interfaces/motion-value.js';
2
- import { motionValue } from '../../value/index.js';
3
- import { isMotionValue } from '../../value/utils/is-motion-value.js';
4
-
5
- function animateSingleValue(value, keyframes, options) {
6
- const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
7
- motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options));
8
- return motionValue$1.animation;
9
- }
10
-
11
- export { animateSingleValue };
12
- //# sourceMappingURL=single-value.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"single-value.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/animate/single-value.mjs"],"sourcesContent":["import { animateMotionValue } from '../interfaces/motion-value.mjs';\nimport { motionValue } from '../../value/index.mjs';\nimport { isMotionValue } from '../../value/utils/is-motion-value.mjs';\n\nfunction animateSingleValue(value, keyframes, options) {\n const motionValue$1 = isMotionValue(value) ? value : motionValue(value);\n motionValue$1.start(animateMotionValue(\"\", motionValue$1, keyframes, options));\n return motionValue$1.animation;\n}\n\nexport { animateSingleValue };\n//# sourceMappingURL=single-value.mjs.map\n"],"names":[],"mappings":";;;;AAIA,SAAS,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE;AACvD,IAAI,MAAM,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;AAC3E,IAAI,aAAa,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAClF,IAAI,OAAO,aAAa,CAAC,SAAS;AAClC;;;;","x_google_ignoreList":[0]}
@@ -1,18 +0,0 @@
1
- import { time } from '../../frameloop/sync-time.js';
2
- import { frameData, cancelFrame, frame } from '../../frameloop/frame.js';
3
-
4
- const frameloopDriver = (update) => {
5
- const passTimestamp = ({ timestamp }) => update(timestamp);
6
- return {
7
- start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),
8
- stop: () => cancelFrame(passTimestamp),
9
- /**
10
- * If we're processing this frame we can use the
11
- * framelocked timestamp to keep things in sync.
12
- */
13
- now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),
14
- };
15
- };
16
-
17
- export { frameloopDriver };
18
- //# sourceMappingURL=frame.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frame.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/drivers/frame.mjs"],"sourcesContent":["import { time } from '../../frameloop/sync-time.mjs';\nimport { frameData, cancelFrame, frame } from '../../frameloop/frame.mjs';\n\nconst frameloopDriver = (update) => {\n const passTimestamp = ({ timestamp }) => update(timestamp);\n return {\n start: (keepAlive = true) => frame.update(passTimestamp, keepAlive),\n stop: () => cancelFrame(passTimestamp),\n /**\n * If we're processing this frame we can use the\n * framelocked timestamp to keep things in sync.\n */\n now: () => (frameData.isProcessing ? frameData.timestamp : time.now()),\n };\n};\n\nexport { frameloopDriver };\n//# sourceMappingURL=frame.mjs.map\n"],"names":[],"mappings":";;;AAGK,MAAC,eAAe,GAAG,CAAC,MAAM,KAAK;AACpC,IAAI,MAAM,aAAa,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,MAAM,CAAC,SAAS,CAAC;AAC9D,IAAI,OAAO;AACX,QAAQ,KAAK,EAAE,CAAC,SAAS,GAAG,IAAI,KAAK,KAAK,CAAC,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC;AAC3E,QAAQ,IAAI,EAAE,MAAM,WAAW,CAAC,aAAa,CAAC;AAC9C;AACA;AACA;AACA;AACA,QAAQ,GAAG,EAAE,OAAO,SAAS,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAC9E,KAAK;AACL;;;;","x_google_ignoreList":[0]}
@@ -1,88 +0,0 @@
1
- import { spring } from './spring.js';
2
- import { getGeneratorVelocity } from './utils/velocity.js';
3
-
4
- function inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {
5
- const origin = keyframes[0];
6
- const state = {
7
- done: false,
8
- value: origin,
9
- };
10
- const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);
11
- const nearestBoundary = (v) => {
12
- if (min === undefined)
13
- return max;
14
- if (max === undefined)
15
- return min;
16
- return Math.abs(min - v) < Math.abs(max - v) ? min : max;
17
- };
18
- let amplitude = power * velocity;
19
- const ideal = origin + amplitude;
20
- const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);
21
- /**
22
- * If the target has changed we need to re-calculate the amplitude, otherwise
23
- * the animation will start from the wrong position.
24
- */
25
- if (target !== ideal)
26
- amplitude = target - origin;
27
- const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);
28
- const calcLatest = (t) => target + calcDelta(t);
29
- const applyFriction = (t) => {
30
- const delta = calcDelta(t);
31
- const latest = calcLatest(t);
32
- state.done = Math.abs(delta) <= restDelta;
33
- state.value = state.done ? target : latest;
34
- };
35
- /**
36
- * Ideally this would resolve for t in a stateless way, we could
37
- * do that by always precalculating the animation but as we know
38
- * this will be done anyway we can assume that spring will
39
- * be discovered during that.
40
- */
41
- let timeReachedBoundary;
42
- let spring$1;
43
- const checkCatchBoundary = (t) => {
44
- if (!isOutOfBounds(state.value))
45
- return;
46
- timeReachedBoundary = t;
47
- spring$1 = spring({
48
- keyframes: [state.value, nearestBoundary(state.value)],
49
- velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000
50
- damping: bounceDamping,
51
- stiffness: bounceStiffness,
52
- restDelta,
53
- restSpeed,
54
- });
55
- };
56
- checkCatchBoundary(0);
57
- return {
58
- calculatedDuration: null,
59
- next: (t) => {
60
- /**
61
- * We need to resolve the friction to figure out if we need a
62
- * spring but we don't want to do this twice per frame. So here
63
- * we flag if we updated for this frame and later if we did
64
- * we can skip doing it again.
65
- */
66
- let hasUpdatedFrame = false;
67
- if (!spring$1 && timeReachedBoundary === undefined) {
68
- hasUpdatedFrame = true;
69
- applyFriction(t);
70
- checkCatchBoundary(t);
71
- }
72
- /**
73
- * If we have a spring and the provided t is beyond the moment the friction
74
- * animation crossed the min/max boundary, use the spring.
75
- */
76
- if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {
77
- return spring$1.next(t - timeReachedBoundary);
78
- }
79
- else {
80
- !hasUpdatedFrame && applyFriction(t);
81
- return state;
82
- }
83
- },
84
- };
85
- }
86
-
87
- export { inertia };
88
- //# sourceMappingURL=inertia.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inertia.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/inertia.mjs"],"sourcesContent":["import { spring } from './spring.mjs';\nimport { getGeneratorVelocity } from './utils/velocity.mjs';\n\nfunction inertia({ keyframes, velocity = 0.0, power = 0.8, timeConstant = 325, bounceDamping = 10, bounceStiffness = 500, modifyTarget, min, max, restDelta = 0.5, restSpeed, }) {\n const origin = keyframes[0];\n const state = {\n done: false,\n value: origin,\n };\n const isOutOfBounds = (v) => (min !== undefined && v < min) || (max !== undefined && v > max);\n const nearestBoundary = (v) => {\n if (min === undefined)\n return max;\n if (max === undefined)\n return min;\n return Math.abs(min - v) < Math.abs(max - v) ? min : max;\n };\n let amplitude = power * velocity;\n const ideal = origin + amplitude;\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal);\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal)\n amplitude = target - origin;\n const calcDelta = (t) => -amplitude * Math.exp(-t / timeConstant);\n const calcLatest = (t) => target + calcDelta(t);\n const applyFriction = (t) => {\n const delta = calcDelta(t);\n const latest = calcLatest(t);\n state.done = Math.abs(delta) <= restDelta;\n state.value = state.done ? target : latest;\n };\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary;\n let spring$1;\n const checkCatchBoundary = (t) => {\n if (!isOutOfBounds(state.value))\n return;\n timeReachedBoundary = t;\n spring$1 = spring({\n keyframes: [state.value, nearestBoundary(state.value)],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n });\n };\n checkCatchBoundary(0);\n return {\n calculatedDuration: null,\n next: (t) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false;\n if (!spring$1 && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true;\n applyFriction(t);\n checkCatchBoundary(t);\n }\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring$1.next(t - timeReachedBoundary);\n }\n else {\n !hasUpdatedFrame && applyFriction(t);\n return state;\n }\n },\n };\n}\n\nexport { inertia };\n//# sourceMappingURL=inertia.mjs.map\n"],"names":[],"mappings":";;;AAGA,SAAS,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,GAAG,EAAE,KAAK,GAAG,GAAG,EAAE,YAAY,GAAG,GAAG,EAAE,aAAa,GAAG,EAAE,EAAE,eAAe,GAAG,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,GAAG,GAAG,EAAE,SAAS,GAAG,EAAE;AACjL,IAAI,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAC/B,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,EAAE,KAAK;AACnB,QAAQ,KAAK,EAAE,MAAM;AACrB,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,KAAK,SAAS,IAAI,CAAC,GAAG,GAAG,CAAC;AACjG,IAAI,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK;AACnC,QAAQ,IAAI,GAAG,KAAK,SAAS;AAC7B,YAAY,OAAO,GAAG;AACtB,QAAQ,IAAI,GAAG,KAAK,SAAS;AAC7B,YAAY,OAAO,GAAG;AACtB,QAAQ,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG;AAChE,IAAI,CAAC;AACL,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,QAAQ;AACpC,IAAI,MAAM,KAAK,GAAG,MAAM,GAAG,SAAS;AACpC,IAAI,MAAM,MAAM,GAAG,YAAY,KAAK,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;AAC3E;AACA;AACA;AACA;AACA,IAAI,IAAI,MAAM,KAAK,KAAK;AACxB,QAAQ,SAAS,GAAG,MAAM,GAAG,MAAM;AACnC,IAAI,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC;AACrE,IAAI,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AACnD,IAAI,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK;AACjC,QAAQ,MAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC;AAClC,QAAQ,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC;AACpC,QAAQ,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,SAAS;AACjD,QAAQ,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,GAAG,MAAM,GAAG,MAAM;AAClD,IAAI,CAAC;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI,mBAAmB;AAC3B,IAAI,IAAI,QAAQ;AAChB,IAAI,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK;AACtC,QAAQ,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC;AACvC,YAAY;AACZ,QAAQ,mBAAmB,GAAG,CAAC;AAC/B,QAAQ,QAAQ,GAAG,MAAM,CAAC;AAC1B,YAAY,SAAS,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClE,YAAY,QAAQ,EAAE,oBAAoB,CAAC,UAAU,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC;AACtE,YAAY,OAAO,EAAE,aAAa;AAClC,YAAY,SAAS,EAAE,eAAe;AACtC,YAAY,SAAS;AACrB,YAAY,SAAS;AACrB,SAAS,CAAC;AACV,IAAI,CAAC;AACL,IAAI,kBAAkB,CAAC,CAAC,CAAC;AACzB,IAAI,OAAO;AACX,QAAQ,kBAAkB,EAAE,IAAI;AAChC,QAAQ,IAAI,EAAE,CAAC,CAAC,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,IAAI,eAAe,GAAG,KAAK;AACvC,YAAY,IAAI,CAAC,QAAQ,IAAI,mBAAmB,KAAK,SAAS,EAAE;AAChE,gBAAgB,eAAe,GAAG,IAAI;AACtC,gBAAgB,aAAa,CAAC,CAAC,CAAC;AAChC,gBAAgB,kBAAkB,CAAC,CAAC,CAAC;AACrC,YAAY;AACZ;AACA;AACA;AACA;AACA,YAAY,IAAI,mBAAmB,KAAK,SAAS,IAAI,CAAC,IAAI,mBAAmB,EAAE;AAC/E,gBAAgB,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,mBAAmB,CAAC;AAC7D,YAAY;AACZ,iBAAiB;AACjB,gBAAgB,CAAC,eAAe,IAAI,aAAa,CAAC,CAAC,CAAC;AACpD,gBAAgB,OAAO,KAAK;AAC5B,YAAY;AACZ,QAAQ,CAAC;AACT,KAAK;AACL;;;;","x_google_ignoreList":[0]}
@@ -1,52 +0,0 @@
1
- import { interpolate } from '../../utils/interpolate.js';
2
- import { defaultOffset } from '../keyframes/offsets/default.js';
3
- import { convertOffsetToTimes } from '../keyframes/offsets/time.js';
4
- import { isEasingArray } from '../../../../../motion-utils/dist/es/easing/utils/is-easing-array.js';
5
- import { easingDefinitionToFunction } from '../../../../../motion-utils/dist/es/easing/utils/map.js';
6
- import { easeInOut } from '../../../../../motion-utils/dist/es/easing/ease.js';
7
-
8
- function defaultEasing(values, easing) {
9
- return values.map(() => easing || easeInOut).splice(0, values.length - 1);
10
- }
11
- function keyframes({ duration = 300, keyframes: keyframeValues, times, ease = "easeInOut", }) {
12
- /**
13
- * Easing functions can be externally defined as strings. Here we convert them
14
- * into actual functions.
15
- */
16
- const easingFunctions = isEasingArray(ease)
17
- ? ease.map(easingDefinitionToFunction)
18
- : easingDefinitionToFunction(ease);
19
- /**
20
- * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
21
- * to reduce GC during animation.
22
- */
23
- const state = {
24
- done: false,
25
- value: keyframeValues[0],
26
- };
27
- /**
28
- * Create a times array based on the provided 0-1 offsets
29
- */
30
- const absoluteTimes = convertOffsetToTimes(
31
- // Only use the provided offsets if they're the correct length
32
- // TODO Maybe we should warn here if there's a length mismatch
33
- times && times.length === keyframeValues.length
34
- ? times
35
- : defaultOffset(keyframeValues), duration);
36
- const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {
37
- ease: Array.isArray(easingFunctions)
38
- ? easingFunctions
39
- : defaultEasing(keyframeValues, easingFunctions),
40
- });
41
- return {
42
- calculatedDuration: duration,
43
- next: (t) => {
44
- state.value = mapTimeToKeyframe(t);
45
- state.done = t >= duration;
46
- return state;
47
- },
48
- };
49
- }
50
-
51
- export { defaultEasing, keyframes };
52
- //# sourceMappingURL=keyframes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyframes.js","sources":["../../../../../../../node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs"],"sourcesContent":["import { easeInOut, isEasingArray, easingDefinitionToFunction } from 'motion-utils';\nimport { interpolate } from '../../utils/interpolate.mjs';\nimport { defaultOffset } from '../keyframes/offsets/default.mjs';\nimport { convertOffsetToTimes } from '../keyframes/offsets/time.mjs';\n\nfunction defaultEasing(values, easing) {\n return values.map(() => easing || easeInOut).splice(0, values.length - 1);\n}\nfunction keyframes({ duration = 300, keyframes: keyframeValues, times, ease = \"easeInOut\", }) {\n /**\n * Easing functions can be externally defined as strings. Here we convert them\n * into actual functions.\n */\n const easingFunctions = isEasingArray(ease)\n ? ease.map(easingDefinitionToFunction)\n : easingDefinitionToFunction(ease);\n /**\n * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator\n * to reduce GC during animation.\n */\n const state = {\n done: false,\n value: keyframeValues[0],\n };\n /**\n * Create a times array based on the provided 0-1 offsets\n */\n const absoluteTimes = convertOffsetToTimes(\n // Only use the provided offsets if they're the correct length\n // TODO Maybe we should warn here if there's a length mismatch\n times && times.length === keyframeValues.length\n ? times\n : defaultOffset(keyframeValues), duration);\n const mapTimeToKeyframe = interpolate(absoluteTimes, keyframeValues, {\n ease: Array.isArray(easingFunctions)\n ? easingFunctions\n : defaultEasing(keyframeValues, easingFunctions),\n });\n return {\n calculatedDuration: duration,\n next: (t) => {\n state.value = mapTimeToKeyframe(t);\n state.done = t >= duration;\n return state;\n },\n };\n}\n\nexport { defaultEasing, keyframes };\n//# sourceMappingURL=keyframes.mjs.map\n"],"names":[],"mappings":";;;;;;;AAKA,SAAS,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE;AACvC,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AAC7E;AACA,SAAS,SAAS,CAAC,EAAE,QAAQ,GAAG,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,GAAG,WAAW,GAAG,EAAE;AAC9F;AACA;AACA;AACA;AACA,IAAI,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI;AAC9C,UAAU,IAAI,CAAC,GAAG,CAAC,0BAA0B;AAC7C,UAAU,0BAA0B,CAAC,IAAI,CAAC;AAC1C;AACA;AACA;AACA;AACA,IAAI,MAAM,KAAK,GAAG;AAClB,QAAQ,IAAI,EAAE,KAAK;AACnB,QAAQ,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC;AAChC,KAAK;AACL;AACA;AACA;AACA,IAAI,MAAM,aAAa,GAAG,oBAAoB;AAC9C;AACA;AACA,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,cAAc,CAAC;AAC7C,UAAU;AACV,UAAU,aAAa,CAAC,cAAc,CAAC,EAAE,QAAQ,CAAC;AAClD,IAAI,MAAM,iBAAiB,GAAG,WAAW,CAAC,aAAa,EAAE,cAAc,EAAE;AACzE,QAAQ,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,eAAe;AAC3C,cAAc;AACd,cAAc,aAAa,CAAC,cAAc,EAAE,eAAe,CAAC;AAC5D,KAAK,CAAC;AACN,IAAI,OAAO;AACX,QAAQ,kBAAkB,EAAE,QAAQ;AACpC,QAAQ,IAAI,EAAE,CAAC,CAAC,KAAK;AACrB,YAAY,KAAK,CAAC,KAAK,GAAG,iBAAiB,CAAC,CAAC,CAAC;AAC9C,YAAY,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,QAAQ;AACtC,YAAY,OAAO,KAAK;AACxB,QAAQ,CAAC;AACT,KAAK;AACL;;;;","x_google_ignoreList":[0]}
@@ -1,331 +0,0 @@
1
- import { generateLinearEasing } from '../waapi/utils/linear.js';
2
- import { calcGeneratorDuration, maxGeneratorDuration } from './utils/calc-duration.js';
3
- import { createGeneratorEasing } from './utils/create-generator-easing.js';
4
- import { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.js';
5
- import { clamp } from '../../../../../motion-utils/dist/es/clamp.js';
6
- import { warning } from '../../../../../motion-utils/dist/es/errors.js';
7
-
8
- const springDefaults = {
9
- // Default spring physics
10
- stiffness: 100,
11
- damping: 10,
12
- mass: 1.0,
13
- velocity: 0.0,
14
- // Default duration/bounce-based options
15
- duration: 800, // in ms
16
- bounce: 0.3,
17
- visualDuration: 0.3, // in seconds
18
- // Rest thresholds
19
- restSpeed: {
20
- granular: 0.01,
21
- default: 2,
22
- },
23
- restDelta: {
24
- granular: 0.005,
25
- default: 0.5,
26
- },
27
- // Limits
28
- minDuration: 0.01, // in seconds
29
- maxDuration: 10.0, // in seconds
30
- minDamping: 0.05,
31
- maxDamping: 1,
32
- };
33
- function calcAngularFreq(undampedFreq, dampingRatio) {
34
- return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
35
- }
36
- const rootIterations = 12;
37
- function approximateRoot(envelope, derivative, initialGuess) {
38
- let result = initialGuess;
39
- for (let i = 1; i < rootIterations; i++) {
40
- result = result - envelope(result) / derivative(result);
41
- }
42
- return result;
43
- }
44
- /**
45
- * This is ported from the Framer implementation of duration-based spring resolution.
46
- */
47
- const safeMin = 0.001;
48
- function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {
49
- let envelope;
50
- let derivative;
51
- warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
52
- let dampingRatio = 1 - bounce;
53
- /**
54
- * Restrict dampingRatio and duration to within acceptable ranges.
55
- */
56
- dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
57
- duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
58
- if (dampingRatio < 1) {
59
- /**
60
- * Underdamped spring
61
- */
62
- envelope = (undampedFreq) => {
63
- const exponentialDecay = undampedFreq * dampingRatio;
64
- const delta = exponentialDecay * duration;
65
- const a = exponentialDecay - velocity;
66
- const b = calcAngularFreq(undampedFreq, dampingRatio);
67
- const c = Math.exp(-delta);
68
- return safeMin - (a / b) * c;
69
- };
70
- derivative = (undampedFreq) => {
71
- const exponentialDecay = undampedFreq * dampingRatio;
72
- const delta = exponentialDecay * duration;
73
- const d = delta * velocity + velocity;
74
- const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
75
- const f = Math.exp(-delta);
76
- const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
77
- const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
78
- return (factor * ((d - e) * f)) / g;
79
- };
80
- }
81
- else {
82
- /**
83
- * Critically-damped spring
84
- */
85
- envelope = (undampedFreq) => {
86
- const a = Math.exp(-undampedFreq * duration);
87
- const b = (undampedFreq - velocity) * duration + 1;
88
- return -safeMin + a * b;
89
- };
90
- derivative = (undampedFreq) => {
91
- const a = Math.exp(-undampedFreq * duration);
92
- const b = (velocity - undampedFreq) * (duration * duration);
93
- return a * b;
94
- };
95
- }
96
- const initialGuess = 5 / duration;
97
- const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
98
- duration = secondsToMilliseconds(duration);
99
- if (isNaN(undampedFreq)) {
100
- return {
101
- stiffness: springDefaults.stiffness,
102
- damping: springDefaults.damping,
103
- duration,
104
- };
105
- }
106
- else {
107
- const stiffness = Math.pow(undampedFreq, 2) * mass;
108
- return {
109
- stiffness,
110
- damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
111
- duration,
112
- };
113
- }
114
- }
115
- const durationKeys = ["duration", "bounce"];
116
- const physicsKeys = ["stiffness", "damping", "mass"];
117
- function isSpringType(options, keys) {
118
- return keys.some((key) => options[key] !== undefined);
119
- }
120
- function getSpringOptions(options) {
121
- let springOptions = {
122
- velocity: springDefaults.velocity,
123
- stiffness: springDefaults.stiffness,
124
- damping: springDefaults.damping,
125
- mass: springDefaults.mass,
126
- isResolvedFromDuration: false,
127
- ...options,
128
- };
129
- // stiffness/damping/mass overrides duration/bounce
130
- if (!isSpringType(options, physicsKeys) &&
131
- isSpringType(options, durationKeys)) {
132
- // Time-defined springs should ignore inherited velocity.
133
- // Velocity from interrupted animations can cause findSpring()
134
- // to compute wildly different spring parameters, leading to
135
- // massive oscillation on small-range animations.
136
- springOptions.velocity = 0;
137
- if (options.visualDuration) {
138
- const visualDuration = options.visualDuration;
139
- const root = (2 * Math.PI) / (visualDuration * 1.2);
140
- const stiffness = root * root;
141
- const damping = 2 *
142
- clamp(0.05, 1, 1 - (options.bounce || 0)) *
143
- Math.sqrt(stiffness);
144
- springOptions = {
145
- ...springOptions,
146
- mass: springDefaults.mass,
147
- stiffness,
148
- damping,
149
- };
150
- }
151
- else {
152
- const derived = findSpring({ ...options, velocity: 0 });
153
- springOptions = {
154
- ...springOptions,
155
- ...derived,
156
- mass: springDefaults.mass,
157
- };
158
- springOptions.isResolvedFromDuration = true;
159
- }
160
- }
161
- return springOptions;
162
- }
163
- function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce = springDefaults.bounce) {
164
- const options = typeof optionsOrVisualDuration !== "object"
165
- ? {
166
- visualDuration: optionsOrVisualDuration,
167
- keyframes: [0, 1],
168
- bounce,
169
- }
170
- : optionsOrVisualDuration;
171
- let { restSpeed, restDelta } = options;
172
- const origin = options.keyframes[0];
173
- const target = options.keyframes[options.keyframes.length - 1];
174
- /**
175
- * This is the Iterator-spec return value. We ensure it's mutable rather than using a generator
176
- * to reduce GC during animation.
177
- */
178
- const state = { done: false, value: origin };
179
- const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration, } = getSpringOptions({
180
- ...options,
181
- velocity: -millisecondsToSeconds(options.velocity || 0),
182
- });
183
- const initialVelocity = velocity || 0.0;
184
- const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
185
- const initialDelta = target - origin;
186
- const undampedAngularFreq = millisecondsToSeconds(Math.sqrt(stiffness / mass));
187
- /**
188
- * If we're working on a granular scale, use smaller defaults for determining
189
- * when the spring is finished.
190
- *
191
- * These defaults have been selected emprically based on what strikes a good
192
- * ratio between feeling good and finishing as soon as changes are imperceptible.
193
- */
194
- const isGranularScale = Math.abs(initialDelta) < 5;
195
- restSpeed || (restSpeed = isGranularScale
196
- ? springDefaults.restSpeed.granular
197
- : springDefaults.restSpeed.default);
198
- restDelta || (restDelta = isGranularScale
199
- ? springDefaults.restDelta.granular
200
- : springDefaults.restDelta.default);
201
- let resolveSpring;
202
- let resolveVelocity;
203
- // Underdamped coefficients, hoisted for use in the inlined next() hot path
204
- let angularFreq;
205
- let A;
206
- let sinCoeff;
207
- let cosCoeff;
208
- if (dampingRatio < 1) {
209
- angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio);
210
- A =
211
- (initialVelocity +
212
- dampingRatio * undampedAngularFreq * initialDelta) /
213
- angularFreq;
214
- // Underdamped spring
215
- resolveSpring = (t) => {
216
- const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
217
- return (target -
218
- envelope *
219
- (A * Math.sin(angularFreq * t) +
220
- initialDelta * Math.cos(angularFreq * t)));
221
- };
222
- // Analytical derivative of underdamped spring (px/ms)
223
- sinCoeff =
224
- dampingRatio * undampedAngularFreq * A + initialDelta * angularFreq;
225
- cosCoeff =
226
- dampingRatio * undampedAngularFreq * initialDelta - A * angularFreq;
227
- resolveVelocity = (t) => {
228
- const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
229
- return envelope *
230
- (sinCoeff * Math.sin(angularFreq * t) +
231
- cosCoeff * Math.cos(angularFreq * t));
232
- };
233
- }
234
- else if (dampingRatio === 1) {
235
- // Critically damped spring
236
- resolveSpring = (t) => target -
237
- Math.exp(-undampedAngularFreq * t) *
238
- (initialDelta +
239
- (initialVelocity + undampedAngularFreq * initialDelta) * t);
240
- // Analytical derivative of critically damped spring (px/ms)
241
- const C = initialVelocity + undampedAngularFreq * initialDelta;
242
- resolveVelocity = (t) => Math.exp(-undampedAngularFreq * t) *
243
- (undampedAngularFreq * C * t - initialVelocity);
244
- }
245
- else {
246
- // Overdamped spring
247
- const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
248
- resolveSpring = (t) => {
249
- const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
250
- // When performing sinh or cosh values can hit Infinity so we cap them here
251
- const freqForT = Math.min(dampedAngularFreq * t, 300);
252
- return (target -
253
- (envelope *
254
- ((initialVelocity +
255
- dampingRatio * undampedAngularFreq * initialDelta) *
256
- Math.sinh(freqForT) +
257
- dampedAngularFreq *
258
- initialDelta *
259
- Math.cosh(freqForT))) /
260
- dampedAngularFreq);
261
- };
262
- // Analytical derivative of overdamped spring (px/ms)
263
- const P = (initialVelocity +
264
- dampingRatio * undampedAngularFreq * initialDelta) /
265
- dampedAngularFreq;
266
- const sinhCoeff = dampingRatio * undampedAngularFreq * P - initialDelta * dampedAngularFreq;
267
- const coshCoeff = dampingRatio * undampedAngularFreq * initialDelta - P * dampedAngularFreq;
268
- resolveVelocity = (t) => {
269
- const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
270
- const freqForT = Math.min(dampedAngularFreq * t, 300);
271
- return envelope *
272
- (sinhCoeff * Math.sinh(freqForT) +
273
- coshCoeff * Math.cosh(freqForT));
274
- };
275
- }
276
- const generator = {
277
- calculatedDuration: isResolvedFromDuration ? duration || null : null,
278
- velocity: (t) => secondsToMilliseconds(resolveVelocity(t)),
279
- next: (t) => {
280
- /**
281
- * For underdamped physics springs we need both position and
282
- * velocity each tick. Compute shared trig values once to avoid
283
- * duplicate Math.exp/sin/cos calls on the hot path.
284
- */
285
- if (!isResolvedFromDuration && dampingRatio < 1) {
286
- const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
287
- const sin = Math.sin(angularFreq * t);
288
- const cos = Math.cos(angularFreq * t);
289
- const current = target -
290
- envelope *
291
- (A * sin + initialDelta * cos);
292
- const currentVelocity = secondsToMilliseconds(envelope *
293
- (sinCoeff * sin + cosCoeff * cos));
294
- state.done =
295
- Math.abs(currentVelocity) <= restSpeed &&
296
- Math.abs(target - current) <= restDelta;
297
- state.value = state.done ? target : current;
298
- return state;
299
- }
300
- const current = resolveSpring(t);
301
- if (!isResolvedFromDuration) {
302
- const currentVelocity = secondsToMilliseconds(resolveVelocity(t));
303
- state.done =
304
- Math.abs(currentVelocity) <= restSpeed &&
305
- Math.abs(target - current) <= restDelta;
306
- }
307
- else {
308
- state.done = t >= duration;
309
- }
310
- state.value = state.done ? target : current;
311
- return state;
312
- },
313
- toString: () => {
314
- const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
315
- const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);
316
- return calculatedDuration + "ms " + easing;
317
- },
318
- toTransition: () => { },
319
- };
320
- return generator;
321
- }
322
- spring.applyToOptions = (options) => {
323
- const generatorOptions = createGeneratorEasing(options, 100, spring);
324
- options.ease = generatorOptions.ease;
325
- options.duration = secondsToMilliseconds(generatorOptions.duration);
326
- options.type = "keyframes";
327
- return options;
328
- };
329
-
330
- export { spring };
331
- //# sourceMappingURL=spring.js.map