motion-v 0.2.5 → 0.3.0

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 (244) hide show
  1. package/dist/cjs/index.js +1 -0
  2. package/dist/es/animation/use-animate.mjs +21 -0
  3. package/dist/es/components/AnimatePresence.vue.mjs +53 -0
  4. package/dist/es/components/AnimatePresence.vue2.mjs +4 -0
  5. package/dist/es/components/Motion.vue.mjs +98 -0
  6. package/dist/es/components/Motion.vue2.mjs +4 -0
  7. package/dist/es/components/Primitive.mjs +23 -0
  8. package/dist/es/components/Slot.mjs +27 -0
  9. package/dist/es/components/context.mjs +6 -0
  10. package/dist/es/components/presence.mjs +13 -0
  11. package/dist/es/components/renderSlotFragments.mjs +7 -0
  12. package/dist/es/constants/index.mjs +19 -0
  13. package/dist/es/features/events.mjs +53 -0
  14. package/dist/es/features/feature-manager.mjs +28 -0
  15. package/dist/es/features/feature.mjs +10 -0
  16. package/dist/es/features/gestures/base.mjs +14 -0
  17. package/dist/es/features/gestures/hover.mjs +33 -0
  18. package/dist/es/features/gestures/in-view.mjs +29 -0
  19. package/dist/es/features/gestures/press.mjs +28 -0
  20. package/dist/es/features/svg.mjs +30 -0
  21. package/dist/es/index.mjs +104 -0
  22. package/dist/es/node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.4.38_typescript@5.5.4_/node_modules/@vueuse/shared/index.mjs +6 -0
  23. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +66 -0
  24. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animate/index.mjs +20 -0
  25. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +8 -0
  26. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animate/sequence.mjs +12 -0
  27. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs +10 -0
  28. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animate/subject.mjs +30 -0
  29. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +202 -0
  30. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +79 -0
  31. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +148 -0
  32. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +17 -0
  33. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/utils/accelerated-values.mjs +12 -0
  34. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +23 -0
  35. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +106 -0
  36. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +24 -0
  37. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +12 -0
  38. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs +27 -0
  39. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs +17 -0
  40. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/attach-timeline.mjs +6 -0
  41. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +8 -0
  42. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/linear.mjs +11 -0
  43. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs +12 -0
  44. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +10 -0
  45. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs +6 -0
  46. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs +12 -0
  47. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +12 -0
  48. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +5 -0
  49. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs +37 -0
  50. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs +30 -0
  51. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs +55 -0
  52. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs +67 -0
  53. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +13 -0
  54. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/utils/is-generator.mjs +6 -0
  55. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs +9 -0
  56. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs +46 -0
  57. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +45 -0
  58. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +6 -0
  59. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +7 -0
  60. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/sequence/create.mjs +106 -0
  61. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +7 -0
  62. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs +22 -0
  63. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs +6 -0
  64. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs +39 -0
  65. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs +22 -0
  66. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/get-value-transition.mjs +6 -0
  67. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs +7 -0
  68. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +6 -0
  69. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +6 -0
  70. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +4 -0
  71. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs +7 -0
  72. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +6 -0
  73. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/stagger.mjs +24 -0
  74. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/anticipate.mjs +5 -0
  75. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/back.mjs +9 -0
  76. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/circ.mjs +8 -0
  77. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs +18 -0
  78. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/ease.mjs +7 -0
  79. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs +4 -0
  80. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs +4 -0
  81. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/steps.mjs +11 -0
  82. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +13 -0
  83. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +8 -0
  84. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +4 -0
  85. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs +4 -0
  86. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/utils/map.mjs +32 -0
  87. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/batcher.mjs +39 -0
  88. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/frame.mjs +9 -0
  89. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs +7 -0
  90. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/render-step.mjs +41 -0
  91. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs +15 -0
  92. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/motion/features/definitions.mjs +27 -0
  93. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +8 -0
  94. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs +21 -0
  95. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/projection/geometry/models.mjs +8 -0
  96. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs +4 -0
  97. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/projection/utils/measure.mjs +7 -0
  98. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/VisualElement.mjs +226 -0
  99. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +65 -0
  100. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +19 -0
  101. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/resize/handle-element.mjs +46 -0
  102. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/resize/handle-window.mjs +23 -0
  103. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/resize/index.mjs +8 -0
  104. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs +46 -0
  105. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs +38 -0
  106. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs +12 -0
  107. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +17 -0
  108. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +26 -0
  109. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +25 -0
  110. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +9 -0
  111. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +21 -0
  112. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +23 -0
  113. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs +5 -0
  114. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs +40 -0
  115. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +4 -0
  116. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +31 -0
  117. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +5 -0
  118. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +6 -0
  119. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +12 -0
  120. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +52 -0
  121. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +10 -0
  122. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs +24 -0
  123. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +9 -0
  124. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs +8 -0
  125. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +4 -0
  126. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/number-browser.mjs +41 -0
  127. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs +18 -0
  128. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs +4 -0
  129. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/transform.mjs +31 -0
  130. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +7 -0
  131. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs +8 -0
  132. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs +25 -0
  133. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +46 -0
  134. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs +29 -0
  135. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs +31 -0
  136. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +16 -0
  137. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/utils/render.mjs +8 -0
  138. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +12 -0
  139. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs +23 -0
  140. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +37 -0
  141. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/store.mjs +4 -0
  142. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +40 -0
  143. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +26 -0
  144. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +28 -0
  145. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +4 -0
  146. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs +18 -0
  147. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs +11 -0
  148. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +15 -0
  149. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +11 -0
  150. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +76 -0
  151. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +13 -0
  152. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs +6 -0
  153. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +26 -0
  154. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +8 -0
  155. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs +20 -0
  156. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/setters.mjs +18 -0
  157. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs +13 -0
  158. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs +7 -0
  159. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/array.mjs +11 -0
  160. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/clamp.mjs +4 -0
  161. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/delay.mjs +17 -0
  162. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/distance.mjs +9 -0
  163. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/errors.mjs +12 -0
  164. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs +22 -0
  165. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/interpolate.mjs +38 -0
  166. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/is-browser.mjs +4 -0
  167. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs +4 -0
  168. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs +4 -0
  169. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/memo.mjs +7 -0
  170. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/color.mjs +29 -0
  171. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +52 -0
  172. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/immediate.mjs +6 -0
  173. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/index.mjs +8 -0
  174. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/number.mjs +4 -0
  175. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/visibility.mjs +8 -0
  176. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/noop.mjs +4 -0
  177. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/offsets/default.mjs +8 -0
  178. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs +12 -0
  179. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/offsets/time.mjs +6 -0
  180. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/pipe.mjs +4 -0
  181. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/progress.mjs +7 -0
  182. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs +13 -0
  183. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs +5 -0
  184. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/resolve-value.mjs +5 -0
  185. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs +29 -0
  186. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/time-conversion.mjs +5 -0
  187. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/transform.mjs +12 -0
  188. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs +6 -0
  189. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/warn-once.mjs +7 -0
  190. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/wrap.mjs +7 -0
  191. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/index.mjs +210 -0
  192. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/color/hex.mjs +19 -0
  193. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs +12 -0
  194. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/color/index.mjs +11 -0
  195. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +16 -0
  196. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/color/utils.mjs +18 -0
  197. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs +24 -0
  198. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/complex/index.mjs +49 -0
  199. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs +17 -0
  200. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs +17 -0
  201. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/utils/color-regex.mjs +4 -0
  202. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/utils/float-regex.mjs +4 -0
  203. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/utils/is-nullish.mjs +6 -0
  204. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/utils/sanitize.mjs +4 -0
  205. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/types/utils/single-color-regex.mjs +4 -0
  206. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +9 -0
  207. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs +7 -0
  208. package/dist/es/node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs +4 -0
  209. package/dist/es/node_modules/.pnpm/hey-listen@1.0.8/node_modules/hey-listen/dist/hey-listen.es.mjs +13 -0
  210. package/dist/es/state/event.mjs +6 -0
  211. package/dist/es/state/motion-state.mjs +134 -0
  212. package/dist/es/state/schedule.mjs +22 -0
  213. package/dist/es/state/style.mjs +93 -0
  214. package/dist/es/state/transform.mjs +59 -0
  215. package/dist/es/state/utils.mjs +113 -0
  216. package/dist/es/utils/createContext.mjs +17 -0
  217. package/dist/es/utils/events.mjs +8 -0
  218. package/dist/es/utils/motion-value.mjs +6 -0
  219. package/dist/es/utils/use-animation-frame.mjs +14 -0
  220. package/dist/es/utils/use-in-view.mjs +19 -0
  221. package/dist/es/value/use-combine-values.mjs +22 -0
  222. package/dist/es/value/use-computed.mjs +13 -0
  223. package/dist/es/value/use-motion-template.mjs +19 -0
  224. package/dist/es/value/use-scroll.mjs +47 -0
  225. package/dist/es/value/use-spring.mjs +39 -0
  226. package/dist/es/value/use-time.mjs +9 -0
  227. package/dist/es/value/use-transform.mjs +25 -0
  228. package/dist/src/animation/index.d.ts +1 -0
  229. package/dist/src/animation/use-animate.d.ts +8 -0
  230. package/dist/src/components/Motion.d.ts +3 -3
  231. package/dist/src/features/events.d.ts +1 -1
  232. package/dist/src/features/feature-manager.d.ts +9 -0
  233. package/dist/src/features/feature.d.ts +0 -7
  234. package/dist/src/features/index.d.ts +2 -1
  235. package/dist/src/index.d.ts +3 -0
  236. package/dist/src/state/motion-state.d.ts +4 -4
  237. package/dist/src/state/utils.d.ts +1 -1
  238. package/dist/src/types/state.d.ts +3 -2
  239. package/dist/src/utils/index.d.ts +2 -0
  240. package/dist/src/utils/use-dom-ref.d.ts +1 -0
  241. package/dist/src/utils/use-in-view.d.ts +3 -0
  242. package/package.json +7 -7
  243. package/dist/index.js +0 -4002
  244. package/dist/index.umd.cjs +0 -1
@@ -0,0 +1,33 @@
1
+ import { dispatchPointerEvent as i } from "../../utils/events.mjs";
2
+ import { BaseGesture as u } from "./base.mjs";
3
+ function o(s, r, e) {
4
+ return (t) => {
5
+ t.pointerType && t.pointerType !== "mouse" || (e(), i(s, r, t));
6
+ };
7
+ }
8
+ class a extends u {
9
+ isActive() {
10
+ return !!this.state.getOptions().hover;
11
+ }
12
+ constructor(r) {
13
+ super(r), this.subscribeEvents = () => {
14
+ const e = this.state.getElement(), t = o(e, "hoverstart", () => {
15
+ this.state.setActive("hover", !0);
16
+ }), n = o(e, "hoverend", () => {
17
+ this.state.setActive("hover", !1);
18
+ });
19
+ return e.addEventListener("pointerenter", t), e.addEventListener("pointerleave", n), () => {
20
+ e.removeEventListener("pointerenter", t), e.removeEventListener("pointerleave", n);
21
+ };
22
+ };
23
+ }
24
+ mount() {
25
+ this.updateGestureSubscriptions();
26
+ }
27
+ update() {
28
+ this.updateGestureSubscriptions();
29
+ }
30
+ }
31
+ export {
32
+ a as HoverGesture
33
+ };
@@ -0,0 +1,29 @@
1
+ import { dispatchPointerEvent as i } from "../../utils/events.mjs";
2
+ import { inView as p } from "../../node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs";
3
+ import { BaseGesture as a } from "./base.mjs";
4
+ class w extends a {
5
+ isActive() {
6
+ return !!this.state.getOptions().inView;
7
+ }
8
+ constructor(s) {
9
+ super(s), this.subscribeEvents = () => {
10
+ var e;
11
+ const t = this.state.getElement(), { once: n, ...r } = ((e = this.state.getOptions()) == null ? void 0 : e.inViewOptions) || {};
12
+ return p(t, (o) => {
13
+ if (this.state.setActive("inView", !0), i(t, "viewenter", o), !n)
14
+ return (u) => {
15
+ this.state.setActive("inView", !1), i(t, "viewleave", u);
16
+ };
17
+ }, r);
18
+ };
19
+ }
20
+ mount() {
21
+ this.updateGestureSubscriptions();
22
+ }
23
+ update() {
24
+ this.updateGestureSubscriptions();
25
+ }
26
+ }
27
+ export {
28
+ w as InViewGesture
29
+ };
@@ -0,0 +1,28 @@
1
+ import { dispatchPointerEvent as r } from "../../utils/events.mjs";
2
+ import { BaseGesture as o } from "./base.mjs";
3
+ class d extends o {
4
+ isActive() {
5
+ return !!this.state.getOptions().press;
6
+ }
7
+ constructor(i) {
8
+ super(i), this.subscribeEvents = () => {
9
+ const e = this.state.getElement(), t = (s) => {
10
+ this.state.setActive("press", !1), r(e, "pressend", s), window.removeEventListener("pointerup", t);
11
+ }, n = (s) => {
12
+ this.state.setActive("press", !0), r(e, "pressstart", s), window.addEventListener("pointerup", t);
13
+ };
14
+ return e.addEventListener("pointerdown", n), () => {
15
+ e.removeEventListener("pointerdown", n), window.removeEventListener("pointerup", t);
16
+ };
17
+ };
18
+ }
19
+ mount() {
20
+ this.updateGestureSubscriptions();
21
+ }
22
+ update() {
23
+ this.updateGestureSubscriptions();
24
+ }
25
+ }
26
+ export {
27
+ d as PressGesture
28
+ };
@@ -0,0 +1,30 @@
1
+ import { Feature as i } from "./feature.mjs";
2
+ import { frame as s } from "../node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/frame.mjs";
3
+ function o(e) {
4
+ return e instanceof SVGElement && e.tagName !== "svg";
5
+ }
6
+ class u extends i {
7
+ mount() {
8
+ const t = this.state.getElement();
9
+ if (!o(t))
10
+ return;
11
+ const n = this.state.visualElement;
12
+ s.read(() => {
13
+ try {
14
+ n.renderState.dimensions = typeof t.getBBox == "function" ? t.getBBox() : t.getBoundingClientRect();
15
+ } catch {
16
+ n.renderState.dimensions = {
17
+ x: 0,
18
+ y: 0,
19
+ width: 0,
20
+ height: 0
21
+ };
22
+ }
23
+ });
24
+ }
25
+ unmount() {
26
+ }
27
+ }
28
+ export {
29
+ u as SVGFeature
30
+ };
@@ -0,0 +1,104 @@
1
+ import { default as e } from "./components/Motion.vue.mjs";
2
+ import { default as m } from "./components/AnimatePresence.vue.mjs";
3
+ import { components as a, utilities as f } from "./constants/index.mjs";
4
+ import { MotionValue as i, motionValue as x, motionValue as s } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/value/index.mjs";
5
+ import { animate as u, createScopedAnimate as l } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animate/index.mjs";
6
+ import { animateMini as d } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs";
7
+ import { scroll as V } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs";
8
+ import { scrollInfo as O } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs";
9
+ import { inView as y } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs";
10
+ import { anticipate as k } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/anticipate.mjs";
11
+ import { backIn as A, backInOut as T, backOut as v } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/back.mjs";
12
+ import { circIn as E, circInOut as F, circOut as z } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/circ.mjs";
13
+ import { easeIn as C, easeInOut as P, easeOut as h } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/ease.mjs";
14
+ import { cubicBezier as q } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs";
15
+ import { steps as H } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/steps.mjs";
16
+ import { mirrorEasing as K } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs";
17
+ import { reverseEasing as N } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs";
18
+ import { spring as R } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs";
19
+ import { inertia as W } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs";
20
+ import { keyframes as Y } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs";
21
+ import { stagger as _ } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/animation/utils/stagger.mjs";
22
+ import { transform as rr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/transform.mjs";
23
+ import { clamp as er } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/clamp.mjs";
24
+ import { delayInSeconds as mr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/delay.mjs";
25
+ import { distance as ar, distance2D as fr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/distance.mjs";
26
+ import { invariant as ir, warning as xr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/errors.mjs";
27
+ import { interpolate as cr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/interpolate.mjs";
28
+ import { mix as lr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/mix/index.mjs";
29
+ import { pipe as dr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/pipe.mjs";
30
+ import { progress as Vr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/progress.mjs";
31
+ import { wrap as Or } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/utils/wrap.mjs";
32
+ import { cancelSync as yr, sync as br } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs";
33
+ import { cancelFrame as wr, frame as Ar, frameData as Tr, frameSteps as vr } from "./node_modules/.pnpm/framer-motion@11.11.11/node_modules/framer-motion/dist/es/frameloop/frame.mjs";
34
+ import { useTransform as Er } from "./value/use-transform.mjs";
35
+ import { useTime as zr } from "./value/use-time.mjs";
36
+ import { useMotionTemplate as Cr } from "./value/use-motion-template.mjs";
37
+ import { useSpring as hr } from "./value/use-spring.mjs";
38
+ import { useScroll as qr } from "./value/use-scroll.mjs";
39
+ import { useAnimate as Hr } from "./animation/use-animate.mjs";
40
+ import { createContext as Kr } from "./utils/createContext.mjs";
41
+ import { isMotionValue as Nr } from "./utils/motion-value.mjs";
42
+ import { useInView as Rr } from "./utils/use-in-view.mjs";
43
+ import { useAnimationFrame as Wr } from "./utils/use-animation-frame.mjs";
44
+ export {
45
+ m as AnimatePresence,
46
+ e as Motion,
47
+ i as MotionValue,
48
+ u as animate,
49
+ d as animateMini,
50
+ k as anticipate,
51
+ A as backIn,
52
+ T as backInOut,
53
+ v as backOut,
54
+ wr as cancelFrame,
55
+ yr as cancelSync,
56
+ E as circIn,
57
+ F as circInOut,
58
+ z as circOut,
59
+ er as clamp,
60
+ a as components,
61
+ Kr as createContext,
62
+ l as createScopedAnimate,
63
+ q as cubicBezier,
64
+ mr as delay,
65
+ ar as distance,
66
+ fr as distance2D,
67
+ C as easeIn,
68
+ P as easeInOut,
69
+ h as easeOut,
70
+ Ar as frame,
71
+ Tr as frameData,
72
+ vr as frameSteps,
73
+ y as inView,
74
+ W as inertia,
75
+ cr as interpolate,
76
+ ir as invariant,
77
+ Nr as isMotionValue,
78
+ Y as keyframes,
79
+ K as mirrorEasing,
80
+ lr as mix,
81
+ x as motionValue,
82
+ dr as pipe,
83
+ Vr as progress,
84
+ N as reverseEasing,
85
+ V as scroll,
86
+ O as scrollInfo,
87
+ R as spring,
88
+ _ as stagger,
89
+ H as steps,
90
+ br as sync,
91
+ rr as transform,
92
+ Hr as useAnimate,
93
+ Wr as useAnimationFrame,
94
+ Rr as useInView,
95
+ Cr as useMotionTemplate,
96
+ s as useMotionValue,
97
+ qr as useScroll,
98
+ hr as useSpring,
99
+ zr as useTime,
100
+ Er as useTransform,
101
+ f as utilities,
102
+ xr as warning,
103
+ Or as wrap
104
+ };
@@ -0,0 +1,6 @@
1
+ import "vue";
2
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
3
+ const n = (e) => typeof e < "u";
4
+ export {
5
+ n as isDef
6
+ };
@@ -0,0 +1,66 @@
1
+ import { supportsScrollTimeline as n } from "../render/dom/scroll/supports.mjs";
2
+ class o {
3
+ constructor(t) {
4
+ this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
5
+ }
6
+ then(t, e) {
7
+ return Promise.all(this.animations).then(t).catch(e);
8
+ }
9
+ /**
10
+ * TODO: Filter out cancelled or stopped animations before returning
11
+ */
12
+ getAll(t) {
13
+ return this.animations[0][t];
14
+ }
15
+ setAll(t, e) {
16
+ for (let s = 0; s < this.animations.length; s++)
17
+ this.animations[s][t] = e;
18
+ }
19
+ attachTimeline(t, e) {
20
+ const s = this.animations.map((i) => n() && i.attachTimeline ? i.attachTimeline(t) : e(i));
21
+ return () => {
22
+ s.forEach((i, l) => {
23
+ i && i(), this.animations[l].stop();
24
+ });
25
+ };
26
+ }
27
+ get time() {
28
+ return this.getAll("time");
29
+ }
30
+ set time(t) {
31
+ this.setAll("time", t);
32
+ }
33
+ get speed() {
34
+ return this.getAll("speed");
35
+ }
36
+ set speed(t) {
37
+ this.setAll("speed", t);
38
+ }
39
+ get startTime() {
40
+ return this.getAll("startTime");
41
+ }
42
+ get duration() {
43
+ let t = 0;
44
+ for (let e = 0; e < this.animations.length; e++)
45
+ t = Math.max(t, this.animations[e].duration);
46
+ return t;
47
+ }
48
+ runAll(t) {
49
+ this.animations.forEach((e) => e[t]());
50
+ }
51
+ play() {
52
+ this.runAll("play");
53
+ }
54
+ pause() {
55
+ this.runAll("pause");
56
+ }
57
+ cancel() {
58
+ this.runAll("cancel");
59
+ }
60
+ complete() {
61
+ this.runAll("complete");
62
+ }
63
+ }
64
+ export {
65
+ o as GroupPlaybackControls
66
+ };
@@ -0,0 +1,20 @@
1
+ import { GroupPlaybackControls as e } from "../GroupPlaybackControls.mjs";
2
+ import { animateSequence as f } from "./sequence.mjs";
3
+ import { animateSubject as u } from "./subject.mjs";
4
+ function A(n) {
5
+ return Array.isArray(n) && Array.isArray(n[0]);
6
+ }
7
+ function c(n) {
8
+ function o(i, r, m) {
9
+ let t = [];
10
+ A(i) ? t = f(i, r, n) : t = u(i, r, m, n);
11
+ const a = new e(t);
12
+ return n && n.animations.push(a), a;
13
+ }
14
+ return o;
15
+ }
16
+ const l = c();
17
+ export {
18
+ l as animate,
19
+ c as createScopedAnimate
20
+ };
@@ -0,0 +1,8 @@
1
+ import { resolveElements as f } from "../../render/dom/utils/resolve-element.mjs";
2
+ import { isDOMKeyframes as n } from "../utils/is-dom-keyframes.mjs";
3
+ function s(r, e, o, i) {
4
+ return typeof r == "string" && n(e) ? f(r, o, i) : r instanceof NodeList ? Array.from(r) : Array.isArray(r) ? r : [r];
5
+ }
6
+ export {
7
+ s as resolveSubjects
8
+ };
@@ -0,0 +1,12 @@
1
+ import { spring as r } from "../generators/spring/index.mjs";
2
+ import { createAnimationsFromSequence as c } from "../sequence/create.mjs";
3
+ import { animateSubject as s } from "./subject.mjs";
4
+ function h(i, o, t) {
5
+ const n = [];
6
+ return c(i, o, t, { spring: r }).forEach(({ keyframes: e, transition: a }, m) => {
7
+ n.push(...s(m, e, a));
8
+ }), n;
9
+ }
10
+ export {
11
+ h as animateSequence
12
+ };
@@ -0,0 +1,10 @@
1
+ import { animateMotionValue as m } from "../interfaces/motion-value.mjs";
2
+ import { motionValue as a } from "../../value/index.mjs";
3
+ import { isMotionValue as r } from "../../value/utils/is-motion-value.mjs";
4
+ function f(o, i, n) {
5
+ const t = r(o) ? o : a(o);
6
+ return t.start(m("", t, i, n)), t.animation;
7
+ }
8
+ export {
9
+ f as animateSingleValue
10
+ };
@@ -0,0 +1,30 @@
1
+ import { visualElementStore as u } from "../../render/store.mjs";
2
+ import { invariant as d } from "../../utils/errors.mjs";
3
+ import { isMotionValue as S } from "../../value/utils/is-motion-value.mjs";
4
+ import { animateTarget as g } from "../interfaces/visual-element-target.mjs";
5
+ import { createDOMVisualElement as v, createObjectVisualElement as E } from "../utils/create-visual-element.mjs";
6
+ import { isDOMKeyframes as s } from "../utils/is-dom-keyframes.mjs";
7
+ import { resolveSubjects as V } from "./resolve-subjects.mjs";
8
+ import { animateSingleValue as h } from "./single-value.mjs";
9
+ function b(e, t) {
10
+ return S(e) || typeof e == "number" || typeof e == "string" && !s(t);
11
+ }
12
+ function N(e, t, n, c) {
13
+ const a = [];
14
+ if (b(e, t))
15
+ a.push(h(e, s(t) && t.default || t, n && (n.default || n)));
16
+ else {
17
+ const m = V(e, t, c), r = m.length;
18
+ d(!!r, "No valid elements provided.");
19
+ for (let o = 0; o < r; o++) {
20
+ const l = m[o], f = l instanceof Element ? v : E;
21
+ u.has(l) || f(l);
22
+ const p = u.get(l), i = { ...n };
23
+ "delay" in i && typeof i.delay == "function" && (i.delay = i.delay(o, r)), a.push(...g(p, { ...t, transition: i }, {}));
24
+ }
25
+ }
26
+ return a;
27
+ }
28
+ export {
29
+ N as animateSubject
30
+ };
@@ -0,0 +1,202 @@
1
+ import { anticipate as F } from "../../easing/anticipate.mjs";
2
+ import { backInOut as K } from "../../easing/back.mjs";
3
+ import { circInOut as E } from "../../easing/circ.mjs";
4
+ import { DOMKeyframesResolver as R } from "../../render/dom/DOMKeyframesResolver.mjs";
5
+ import { noop as g } from "../../utils/noop.mjs";
6
+ import { millisecondsToSeconds as T, secondsToMilliseconds as S } from "../../utils/time-conversion.mjs";
7
+ import { isGenerator as b } from "../generators/utils/is-generator.mjs";
8
+ import { BaseAnimation as D } from "./BaseAnimation.mjs";
9
+ import { MainThreadAnimation as A } from "./MainThreadAnimation.mjs";
10
+ import { acceleratedValues as M } from "./utils/accelerated-values.mjs";
11
+ import { startWaapiAnimation as U } from "./waapi/index.mjs";
12
+ import { isWaapiSupportedEasing as W } from "./waapi/easing.mjs";
13
+ import { attachTimeline as w } from "./waapi/utils/attach-timeline.mjs";
14
+ import { getFinalKeyframe as x } from "./waapi/utils/get-final-keyframe.mjs";
15
+ import { supportsLinearEasing as C } from "./waapi/utils/supports-linear-easing.mjs";
16
+ import { supportsWaapi as G } from "./waapi/utils/supports-waapi.mjs";
17
+ const d = 10, O = 2e4;
18
+ function k(r) {
19
+ return b(r.type) || r.type === "spring" || !W(r.ease);
20
+ }
21
+ function I(r, e) {
22
+ const t = new A({
23
+ ...e,
24
+ keyframes: r,
25
+ repeat: 0,
26
+ delay: 0,
27
+ isGenerator: !0
28
+ });
29
+ let i = { done: !1, value: r[0] };
30
+ const s = [];
31
+ let n = 0;
32
+ for (; !i.done && n < O; )
33
+ i = t.sample(n), s.push(i.value), n += d;
34
+ return {
35
+ times: void 0,
36
+ keyframes: s,
37
+ duration: n - d,
38
+ ease: "linear"
39
+ };
40
+ }
41
+ const P = {
42
+ anticipate: F,
43
+ backInOut: K,
44
+ circInOut: E
45
+ };
46
+ function L(r) {
47
+ return r in P;
48
+ }
49
+ class ne extends D {
50
+ constructor(e) {
51
+ super(e);
52
+ const { name: t, motionValue: i, element: s, keyframes: n } = this.options;
53
+ this.resolver = new R(n, (o, a) => this.onKeyframesResolved(o, a), t, i, s), this.resolver.scheduleResolve();
54
+ }
55
+ initPlayback(e, t) {
56
+ var i;
57
+ let { duration: s = 300, times: n, ease: o, type: a, motionValue: m, name: h, startTime: p } = this.options;
58
+ if (!(!((i = m.owner) === null || i === void 0) && i.current))
59
+ return !1;
60
+ if (typeof o == "string" && C() && L(o) && (o = P[o]), k(this.options)) {
61
+ const { onComplete: c, onUpdate: y, motionValue: f, element: v, ...V } = this.options, u = I(e, V);
62
+ e = u.keyframes, e.length === 1 && (e[1] = e[0]), s = u.duration, n = u.times, o = u.ease, a = "keyframes";
63
+ }
64
+ const l = U(m.owner.current, h, e, { ...this.options, duration: s, times: n, ease: o });
65
+ return l.startTime = p ?? this.calcStartTime(), this.pendingTimeline ? (w(l, this.pendingTimeline), this.pendingTimeline = void 0) : l.onfinish = () => {
66
+ const { onComplete: c } = this.options;
67
+ m.set(x(e, this.options, t)), c && c(), this.cancel(), this.resolveFinishedPromise();
68
+ }, {
69
+ animation: l,
70
+ duration: s,
71
+ times: n,
72
+ type: a,
73
+ ease: o,
74
+ keyframes: e
75
+ };
76
+ }
77
+ get duration() {
78
+ const { resolved: e } = this;
79
+ if (!e)
80
+ return 0;
81
+ const { duration: t } = e;
82
+ return T(t);
83
+ }
84
+ get time() {
85
+ const { resolved: e } = this;
86
+ if (!e)
87
+ return 0;
88
+ const { animation: t } = e;
89
+ return T(t.currentTime || 0);
90
+ }
91
+ set time(e) {
92
+ const { resolved: t } = this;
93
+ if (!t)
94
+ return;
95
+ const { animation: i } = t;
96
+ i.currentTime = S(e);
97
+ }
98
+ get speed() {
99
+ const { resolved: e } = this;
100
+ if (!e)
101
+ return 1;
102
+ const { animation: t } = e;
103
+ return t.playbackRate;
104
+ }
105
+ set speed(e) {
106
+ const { resolved: t } = this;
107
+ if (!t)
108
+ return;
109
+ const { animation: i } = t;
110
+ i.playbackRate = e;
111
+ }
112
+ get state() {
113
+ const { resolved: e } = this;
114
+ if (!e)
115
+ return "idle";
116
+ const { animation: t } = e;
117
+ return t.playState;
118
+ }
119
+ get startTime() {
120
+ const { resolved: e } = this;
121
+ if (!e)
122
+ return null;
123
+ const { animation: t } = e;
124
+ return t.startTime;
125
+ }
126
+ /**
127
+ * Replace the default DocumentTimeline with another AnimationTimeline.
128
+ * Currently used for scroll animations.
129
+ */
130
+ attachTimeline(e) {
131
+ if (!this._resolved)
132
+ this.pendingTimeline = e;
133
+ else {
134
+ const { resolved: t } = this;
135
+ if (!t)
136
+ return g;
137
+ const { animation: i } = t;
138
+ w(i, e);
139
+ }
140
+ return g;
141
+ }
142
+ play() {
143
+ if (this.isStopped)
144
+ return;
145
+ const { resolved: e } = this;
146
+ if (!e)
147
+ return;
148
+ const { animation: t } = e;
149
+ t.playState === "finished" && this.updateFinishedPromise(), t.play();
150
+ }
151
+ pause() {
152
+ const { resolved: e } = this;
153
+ if (!e)
154
+ return;
155
+ const { animation: t } = e;
156
+ t.pause();
157
+ }
158
+ stop() {
159
+ if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
160
+ return;
161
+ this.resolveFinishedPromise(), this.updateFinishedPromise();
162
+ const { resolved: e } = this;
163
+ if (!e)
164
+ return;
165
+ const { animation: t, keyframes: i, duration: s, type: n, ease: o, times: a } = e;
166
+ if (t.playState === "idle" || t.playState === "finished")
167
+ return;
168
+ if (this.time) {
169
+ const { motionValue: h, onUpdate: p, onComplete: l, element: c, ...y } = this.options, f = new A({
170
+ ...y,
171
+ keyframes: i,
172
+ duration: s,
173
+ type: n,
174
+ ease: o,
175
+ times: a,
176
+ isGenerator: !0
177
+ }), v = S(this.time);
178
+ h.setWithVelocity(f.sample(v - d).value, f.sample(v).value, d);
179
+ }
180
+ const { onStop: m } = this.options;
181
+ m && m(), this.cancel();
182
+ }
183
+ complete() {
184
+ const { resolved: e } = this;
185
+ e && e.animation.finish();
186
+ }
187
+ cancel() {
188
+ const { resolved: e } = this;
189
+ e && e.animation.cancel();
190
+ }
191
+ static supports(e) {
192
+ const { motionValue: t, name: i, repeatDelay: s, repeatType: n, damping: o, type: a } = e;
193
+ return G() && i && M.has(i) && t && t.owner && t.owner.current instanceof HTMLElement && /**
194
+ * If we're outputting values to onUpdate then we can't use WAAPI as there's
195
+ * no way to read the value from WAAPI every frame.
196
+ */
197
+ !t.owner.getProps().onUpdate && !s && n !== "mirror" && o !== 0 && a !== "inertia";
198
+ }
199
+ }
200
+ export {
201
+ ne as AcceleratedAnimation
202
+ };
@@ -0,0 +1,79 @@
1
+ import { time as l } from "../../frameloop/sync-time.mjs";
2
+ import { flushKeyframeResolvers as m } from "../../render/utils/KeyframesResolver.mjs";
3
+ import { canAnimate as v } from "./utils/can-animate.mjs";
4
+ import { getFinalKeyframe as p } from "./waapi/utils/get-final-keyframe.mjs";
5
+ const c = 40;
6
+ class F {
7
+ constructor({ autoplay: e = !0, delay: t = 0, type: i = "keyframes", repeat: o = 0, repeatDelay: r = 0, repeatType: n = "loop", ...s }) {
8
+ this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = l.now(), this.options = {
9
+ autoplay: e,
10
+ delay: t,
11
+ type: i,
12
+ repeat: o,
13
+ repeatDelay: r,
14
+ repeatType: n,
15
+ ...s
16
+ }, this.updateFinishedPromise();
17
+ }
18
+ /**
19
+ * This method uses the createdAt and resolvedAt to calculate the
20
+ * animation startTime. *Ideally*, we would use the createdAt time as t=0
21
+ * as the following frame would then be the first frame of the animation in
22
+ * progress, which would feel snappier.
23
+ *
24
+ * However, if there's a delay (main thread work) between the creation of
25
+ * the animation and the first commited frame, we prefer to use resolvedAt
26
+ * to avoid a sudden jump into the animation.
27
+ */
28
+ calcStartTime() {
29
+ return this.resolvedAt ? this.resolvedAt - this.createdAt > c ? this.resolvedAt : this.createdAt : this.createdAt;
30
+ }
31
+ /**
32
+ * A getter for resolved data. If keyframes are not yet resolved, accessing
33
+ * this.resolved will synchronously flush all pending keyframe resolvers.
34
+ * This is a deoptimisation, but at its worst still batches read/writes.
35
+ */
36
+ get resolved() {
37
+ return !this._resolved && !this.hasAttemptedResolve && m(), this._resolved;
38
+ }
39
+ /**
40
+ * A method to be called when the keyframes resolver completes. This method
41
+ * will check if its possible to run the animation and, if not, skip it.
42
+ * Otherwise, it will call initPlayback on the implementing class.
43
+ */
44
+ onKeyframesResolved(e, t) {
45
+ this.resolvedAt = l.now(), this.hasAttemptedResolve = !0;
46
+ const { name: i, type: o, velocity: r, delay: n, onComplete: s, onUpdate: h, isGenerator: a } = this.options;
47
+ if (!a && !v(e, i, o, r))
48
+ if (n)
49
+ this.options.duration = 0;
50
+ else {
51
+ h == null || h(p(e, this.options, t)), s == null || s(), this.resolveFinishedPromise();
52
+ return;
53
+ }
54
+ const d = this.initPlayback(e, t);
55
+ d !== !1 && (this._resolved = {
56
+ keyframes: e,
57
+ finalKeyframe: t,
58
+ ...d
59
+ }, this.onPostResolved());
60
+ }
61
+ onPostResolved() {
62
+ }
63
+ /**
64
+ * Allows the returned animation to be awaited or promise-chained. Currently
65
+ * resolves when the animation finishes at all but in a future update could/should
66
+ * reject if its cancels.
67
+ */
68
+ then(e, t) {
69
+ return this.currentFinishedPromise.then(e, t);
70
+ }
71
+ updateFinishedPromise() {
72
+ this.currentFinishedPromise = new Promise((e) => {
73
+ this.resolveFinishedPromise = e;
74
+ });
75
+ }
76
+ }
77
+ export {
78
+ F as BaseAnimation
79
+ };