motion-v 0.2.6 → 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 +1 -1
  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 -4011
  244. package/dist/index.umd.cjs +0 -1
@@ -0,0 +1,39 @@
1
+ import { createRenderStep as E } from "./render-step.mjs";
2
+ const a = [
3
+ "read",
4
+ // Read
5
+ "resolveKeyframes",
6
+ // Write/Read/Write/Read
7
+ "update",
8
+ // Compute
9
+ "preRender",
10
+ // Compute
11
+ "render",
12
+ // Write
13
+ "postRender"
14
+ // Compute
15
+ ], F = 40;
16
+ function B(o, l) {
17
+ let t = !1, c = !0;
18
+ const e = {
19
+ delta: 0,
20
+ timestamp: 0,
21
+ isProcessing: !1
22
+ }, d = () => t = !0, n = a.reduce((s, r) => (s[r] = E(d), s), {}), { read: u, resolveKeyframes: i, update: f, preRender: m, render: R, postRender: g } = n, p = () => {
23
+ const s = performance.now();
24
+ t = !1, e.delta = c ? 1e3 / 60 : Math.max(Math.min(s - e.timestamp, F), 1), e.timestamp = s, e.isProcessing = !0, u.process(e), i.process(e), f.process(e), m.process(e), R.process(e), g.process(e), e.isProcessing = !1, t && l && (c = !1, o(p));
25
+ }, h = () => {
26
+ t = !0, c = !0, e.isProcessing || o(p);
27
+ };
28
+ return { schedule: a.reduce((s, r) => {
29
+ const x = n[r];
30
+ return s[r] = (P, v = !1, w = !1) => (t || h(), x.schedule(P, v, w)), s;
31
+ }, {}), cancel: (s) => {
32
+ for (let r = 0; r < a.length; r++)
33
+ n[a[r]].cancel(s);
34
+ }, state: e, steps: n };
35
+ }
36
+ export {
37
+ B as createRenderBatcher,
38
+ a as stepsOrder
39
+ };
@@ -0,0 +1,9 @@
1
+ import { noop as e } from "../utils/noop.mjs";
2
+ import { createRenderBatcher as r } from "./batcher.mjs";
3
+ const { schedule: m, cancel: n, state: o, steps: c } = r(typeof requestAnimationFrame < "u" ? requestAnimationFrame : e, !0);
4
+ export {
5
+ n as cancelFrame,
6
+ m as frame,
7
+ o as frameData,
8
+ c as frameSteps
9
+ };
@@ -0,0 +1,7 @@
1
+ import { stepsOrder as n } from "./batcher.mjs";
2
+ import { frame as o, cancelFrame as t } from "./frame.mjs";
3
+ const p = o, a = n.reduce((r, e) => (r[e] = (c) => t(c), r), {});
4
+ export {
5
+ a as cancelSync,
6
+ p as sync
7
+ };
@@ -0,0 +1,41 @@
1
+ function p(d) {
2
+ let s = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), r = !1, n = !1;
3
+ const a = /* @__PURE__ */ new WeakSet();
4
+ let i = {
5
+ delta: 0,
6
+ timestamp: 0,
7
+ isProcessing: !1
8
+ };
9
+ function u(e) {
10
+ a.has(e) && (f.schedule(e), d()), e(i);
11
+ }
12
+ const f = {
13
+ /**
14
+ * Schedule a process to run on the next frame.
15
+ */
16
+ schedule: (e, l = !1, h = !1) => {
17
+ const o = h && r ? s : t;
18
+ return l && a.add(e), o.has(e) || o.add(e), e;
19
+ },
20
+ /**
21
+ * Cancel the provided callback from running on the next frame.
22
+ */
23
+ cancel: (e) => {
24
+ t.delete(e), a.delete(e);
25
+ },
26
+ /**
27
+ * Execute all schedule callbacks.
28
+ */
29
+ process: (e) => {
30
+ if (i = e, r) {
31
+ n = !0;
32
+ return;
33
+ }
34
+ r = !0, [s, t] = [t, s], t.clear(), s.forEach(u), r = !1, n && (n = !1, f.process(e));
35
+ }
36
+ };
37
+ return f;
38
+ }
39
+ export {
40
+ p as createRenderStep
41
+ };
@@ -0,0 +1,15 @@
1
+ import { MotionGlobalConfig as i } from "../utils/GlobalConfig.mjs";
2
+ import { frameData as n } from "./frame.mjs";
3
+ let e;
4
+ function t() {
5
+ e = void 0;
6
+ }
7
+ const r = {
8
+ now: () => (e === void 0 && r.set(n.isProcessing || i.useManualTiming ? n.timestamp : performance.now()), e),
9
+ set: (o) => {
10
+ e = o, queueMicrotask(t);
11
+ }
12
+ };
13
+ export {
14
+ r as time
15
+ };
@@ -0,0 +1,27 @@
1
+ const n = {
2
+ animation: [
3
+ "animate",
4
+ "variants",
5
+ "whileHover",
6
+ "whileTap",
7
+ "exit",
8
+ "whileInView",
9
+ "whileFocus",
10
+ "whileDrag"
11
+ ],
12
+ exit: ["exit"],
13
+ drag: ["drag", "dragControls"],
14
+ focus: ["whileFocus"],
15
+ hover: ["whileHover", "onHoverStart", "onHoverEnd"],
16
+ tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
17
+ pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
18
+ inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
19
+ layout: ["layout", "layoutId"]
20
+ }, t = {};
21
+ for (const e in n)
22
+ t[e] = {
23
+ isEnabled: (o) => n[e].some((a) => !!o[a])
24
+ };
25
+ export {
26
+ t as featureDefinitions
27
+ };
@@ -0,0 +1,8 @@
1
+ import { scaleCorrectors as i } from "../../projection/styles/scale-correction.mjs";
2
+ import { transformProps as n } from "../../render/html/utils/transform.mjs";
3
+ function c(r, { layout: o, layoutId: t }) {
4
+ return n.has(r) || r.startsWith("origin") || (o || t !== void 0) && (!!i[r] || r === "opacity");
5
+ }
6
+ export {
7
+ c as isForcedMotionValue
8
+ };
@@ -0,0 +1,21 @@
1
+ function n({ top: t, left: o, right: x, bottom: e }) {
2
+ return {
3
+ x: { min: o, max: x },
4
+ y: { min: t, max: e }
5
+ };
6
+ }
7
+ function r(t, o) {
8
+ if (!o)
9
+ return t;
10
+ const x = o({ x: t.left, y: t.top }), e = o({ x: t.right, y: t.bottom });
11
+ return {
12
+ top: x.y,
13
+ left: x.x,
14
+ bottom: e.y,
15
+ right: e.x
16
+ };
17
+ }
18
+ export {
19
+ n as convertBoundingBoxToBox,
20
+ r as transformBoxPoints
21
+ };
@@ -0,0 +1,8 @@
1
+ const e = () => ({ min: 0, max: 0 }), t = () => ({
2
+ x: e(),
3
+ y: e()
4
+ });
5
+ export {
6
+ e as createAxis,
7
+ t as createBox
8
+ };
@@ -0,0 +1,7 @@
1
+ import { convertBoundingBoxToBox as t, transformBoxPoints as r } from "../geometry/conversion.mjs";
2
+ function i(o, n) {
3
+ return t(r(o.getBoundingClientRect(), n));
4
+ }
5
+ export {
6
+ i as measureViewportBox
7
+ };
@@ -0,0 +1,226 @@
1
+ import { initPrefersReducedMotion as g } from "../utils/reduced-motion/index.mjs";
2
+ import { hasReducedMotionListener as M, prefersReducedMotion as S } from "../utils/reduced-motion/state.mjs";
3
+ import { SubscriptionManager as C } from "../utils/subscription-manager.mjs";
4
+ import { motionValue as b } from "../value/index.mjs";
5
+ import { isMotionValue as h } from "../value/utils/is-motion-value.mjs";
6
+ import { transformProps as P } from "./html/utils/transform.mjs";
7
+ import { isControllingVariants as T, isVariantNode as w } from "./utils/is-controlling-variants.mjs";
8
+ import { updateMotionValuesFromProps as F } from "./utils/motion-values.mjs";
9
+ import { resolveVariantFromProps as R } from "./utils/resolve-variants.mjs";
10
+ import { warnOnce as N } from "../utils/warn-once.mjs";
11
+ import { featureDefinitions as d } from "../motion/features/definitions.mjs";
12
+ import { visualElementStore as c } from "./store.mjs";
13
+ import { KeyframeResolver as E } from "./utils/KeyframesResolver.mjs";
14
+ import { isNumericalString as x } from "../utils/is-numerical-string.mjs";
15
+ import { isZeroValueString as A } from "../utils/is-zero-value-string.mjs";
16
+ import { findValueType as B } from "./dom/value-types/find.mjs";
17
+ import { complex as j } from "../value/types/complex/index.mjs";
18
+ import { getAnimatableNone as y } from "./dom/value-types/animatable-none.mjs";
19
+ import { createBox as I } from "../projection/geometry/models.mjs";
20
+ import { time as U } from "../frameloop/sync-time.mjs";
21
+ import { frame as f, cancelFrame as m } from "../frameloop/frame.mjs";
22
+ const V = [
23
+ "AnimationStart",
24
+ "AnimationComplete",
25
+ "Update",
26
+ "BeforeLayoutMeasure",
27
+ "LayoutMeasure",
28
+ "LayoutAnimationStart",
29
+ "LayoutAnimationComplete"
30
+ ];
31
+ class ot {
32
+ /**
33
+ * This method takes React props and returns found MotionValues. For example, HTML
34
+ * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
35
+ *
36
+ * This isn't an abstract method as it needs calling in the constructor, but it is
37
+ * intended to be one.
38
+ */
39
+ scrapeMotionValuesFromProps(t, e, s) {
40
+ return {};
41
+ }
42
+ constructor({ parent: t, props: e, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: n }, u = {}) {
43
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = E, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
44
+ this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
45
+ }, this.renderScheduledAt = 0, this.scheduleRender = () => {
46
+ const o = U.now();
47
+ this.renderScheduledAt < o && (this.renderScheduledAt = o, f.render(this.render, !1, !0));
48
+ };
49
+ const { latestValues: a, renderState: v } = n;
50
+ this.latestValues = a, this.baseTarget = { ...a }, this.initialValues = e.initial ? { ...a } : {}, this.renderState = v, this.parent = t, this.props = e, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = u, this.blockInitialAnimation = !!r, this.isControllingVariants = T(e), this.isVariantNode = w(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
51
+ const { willChange: D, ...l } = this.scrapeMotionValuesFromProps(e, {}, this);
52
+ for (const o in l) {
53
+ const p = l[o];
54
+ a[o] !== void 0 && h(p) && p.set(a[o], !1);
55
+ }
56
+ }
57
+ mount(t) {
58
+ this.current = t, c.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, s) => this.bindToMotionValue(s, e)), M.current || g(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : S.current, process.env.NODE_ENV !== "production" && N(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
59
+ }
60
+ unmount() {
61
+ c.delete(this.current), this.projection && this.projection.unmount(), m(this.notifyUpdate), m(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
62
+ for (const t in this.events)
63
+ this.events[t].clear();
64
+ for (const t in this.features) {
65
+ const e = this.features[t];
66
+ e && (e.unmount(), e.isMounted = !1);
67
+ }
68
+ this.current = null;
69
+ }
70
+ bindToMotionValue(t, e) {
71
+ this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
72
+ const s = P.has(t), i = e.on("change", (u) => {
73
+ this.latestValues[t] = u, this.props.onUpdate && f.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
74
+ }), r = e.on("renderRequest", this.scheduleRender);
75
+ let n;
76
+ window.MotionCheckAppearSync && (n = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
77
+ i(), r(), n && n(), e.owner && e.stop();
78
+ });
79
+ }
80
+ sortNodePosition(t) {
81
+ return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
82
+ }
83
+ updateFeatures() {
84
+ let t = "animation";
85
+ for (t in d) {
86
+ const e = d[t];
87
+ if (!e)
88
+ continue;
89
+ const { isEnabled: s, Feature: i } = e;
90
+ if (!this.features[t] && i && s(this.props) && (this.features[t] = new i(this)), this.features[t]) {
91
+ const r = this.features[t];
92
+ r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
93
+ }
94
+ }
95
+ }
96
+ triggerBuild() {
97
+ this.build(this.renderState, this.latestValues, this.props);
98
+ }
99
+ /**
100
+ * Measure the current viewport box with or without transforms.
101
+ * Only measures axis-aligned boxes, rotate and skew must be manually
102
+ * removed with a re-render to work.
103
+ */
104
+ measureViewportBox() {
105
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : I();
106
+ }
107
+ getStaticValue(t) {
108
+ return this.latestValues[t];
109
+ }
110
+ setStaticValue(t, e) {
111
+ this.latestValues[t] = e;
112
+ }
113
+ /**
114
+ * Update the provided props. Ensure any newly-added motion values are
115
+ * added to our map, old ones removed, and listeners updated.
116
+ */
117
+ update(t, e) {
118
+ (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
119
+ for (let s = 0; s < V.length; s++) {
120
+ const i = V[s];
121
+ this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
122
+ const r = "on" + i, n = t[r];
123
+ n && (this.propEventSubscriptions[i] = this.on(i, n));
124
+ }
125
+ this.prevMotionValues = F(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
126
+ }
127
+ getProps() {
128
+ return this.props;
129
+ }
130
+ /**
131
+ * Returns the variant definition with a given name.
132
+ */
133
+ getVariant(t) {
134
+ return this.props.variants ? this.props.variants[t] : void 0;
135
+ }
136
+ /**
137
+ * Returns the defined default transition on this component.
138
+ */
139
+ getDefaultTransition() {
140
+ return this.props.transition;
141
+ }
142
+ getTransformPagePoint() {
143
+ return this.props.transformPagePoint;
144
+ }
145
+ getClosestVariantNode() {
146
+ return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
147
+ }
148
+ /**
149
+ * Add a child visual element to our set of children.
150
+ */
151
+ addVariantChild(t) {
152
+ const e = this.getClosestVariantNode();
153
+ if (e)
154
+ return e.variantChildren && e.variantChildren.add(t), () => e.variantChildren.delete(t);
155
+ }
156
+ /**
157
+ * Add a motion value and bind it to this visual element.
158
+ */
159
+ addValue(t, e) {
160
+ const s = this.values.get(t);
161
+ e !== s && (s && this.removeValue(t), this.bindToMotionValue(t, e), this.values.set(t, e), this.latestValues[t] = e.get());
162
+ }
163
+ /**
164
+ * Remove a motion value and unbind any active subscriptions.
165
+ */
166
+ removeValue(t) {
167
+ this.values.delete(t);
168
+ const e = this.valueSubscriptions.get(t);
169
+ e && (e(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
170
+ }
171
+ /**
172
+ * Check whether we have a motion value for this key
173
+ */
174
+ hasValue(t) {
175
+ return this.values.has(t);
176
+ }
177
+ getValue(t, e) {
178
+ if (this.props.values && this.props.values[t])
179
+ return this.props.values[t];
180
+ let s = this.values.get(t);
181
+ return s === void 0 && e !== void 0 && (s = b(e === null ? void 0 : e, { owner: this }), this.addValue(t, s)), s;
182
+ }
183
+ /**
184
+ * If we're trying to animate to a previously unencountered value,
185
+ * we need to check for it in our state and as a last resort read it
186
+ * directly from the instance (which might have performance implications).
187
+ */
188
+ readValue(t, e) {
189
+ var s;
190
+ let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (s = this.getBaseTargetFromProps(this.props, t)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, t, this.options);
191
+ return i != null && (typeof i == "string" && (x(i) || A(i)) ? i = parseFloat(i) : !B(i) && j.test(e) && (i = y(t, e)), this.setBaseTarget(t, h(i) ? i.get() : i)), h(i) ? i.get() : i;
192
+ }
193
+ /**
194
+ * Set the base target to later animate back to. This is currently
195
+ * only hydrated on creation and when we first read a value.
196
+ */
197
+ setBaseTarget(t, e) {
198
+ this.baseTarget[t] = e;
199
+ }
200
+ /**
201
+ * Find the base target for a value thats been removed from all animation
202
+ * props.
203
+ */
204
+ getBaseTarget(t) {
205
+ var e;
206
+ const { initial: s } = this.props;
207
+ let i;
208
+ if (typeof s == "string" || typeof s == "object") {
209
+ const n = R(this.props, s, (e = this.presenceContext) === null || e === void 0 ? void 0 : e.custom);
210
+ n && (i = n[t]);
211
+ }
212
+ if (s && i !== void 0)
213
+ return i;
214
+ const r = this.getBaseTargetFromProps(this.props, t);
215
+ return r !== void 0 && !h(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
216
+ }
217
+ on(t, e) {
218
+ return this.events[t] || (this.events[t] = new C()), this.events[t].add(e);
219
+ }
220
+ notify(t, ...e) {
221
+ this.events[t] && this.events[t].notify(...e);
222
+ }
223
+ }
224
+ export {
225
+ ot as VisualElement
226
+ };
@@ -0,0 +1,65 @@
1
+ import { isNone as h } from "../../animation/utils/is-none.mjs";
2
+ import { getVariableValue as y } from "./utils/css-variables-conversion.mjs";
3
+ import { isCSSVariableToken as p } from "./utils/is-css-variable.mjs";
4
+ import { positionalKeys as g, isNumOrPxType as l, positionalValues as u } from "./utils/unit-conversion.mjs";
5
+ import { findDimensionValueType as d } from "./value-types/dimensions.mjs";
6
+ import { KeyframeResolver as c } from "../utils/KeyframesResolver.mjs";
7
+ import { makeNoneKeyframesAnimatable as K } from "../html/utils/make-none-animatable.mjs";
8
+ class b extends c {
9
+ constructor(e, r, n, t, o) {
10
+ super(e, r, n, t, o, !0);
11
+ }
12
+ readKeyframes() {
13
+ const { unresolvedKeyframes: e, element: r, name: n } = this;
14
+ if (!r || !r.current)
15
+ return;
16
+ super.readKeyframes();
17
+ for (let s = 0; s < e.length; s++) {
18
+ let i = e[s];
19
+ if (typeof i == "string" && (i = i.trim(), p(i))) {
20
+ const m = y(i, r.current);
21
+ m !== void 0 && (e[s] = m), s === e.length - 1 && (this.finalKeyframe = i);
22
+ }
23
+ }
24
+ if (this.resolveNoneKeyframes(), !g.has(n) || e.length !== 2)
25
+ return;
26
+ const [t, o] = e, a = d(t), f = d(o);
27
+ if (a !== f)
28
+ if (l(a) && l(f))
29
+ for (let s = 0; s < e.length; s++) {
30
+ const i = e[s];
31
+ typeof i == "string" && (e[s] = parseFloat(i));
32
+ }
33
+ else
34
+ this.needsMeasurement = !0;
35
+ }
36
+ resolveNoneKeyframes() {
37
+ const { unresolvedKeyframes: e, name: r } = this, n = [];
38
+ for (let t = 0; t < e.length; t++)
39
+ h(e[t]) && n.push(t);
40
+ n.length && K(e, n, r);
41
+ }
42
+ measureInitialState() {
43
+ const { element: e, unresolvedKeyframes: r, name: n } = this;
44
+ if (!e || !e.current)
45
+ return;
46
+ n === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = u[n](e.measureViewportBox(), window.getComputedStyle(e.current)), r[0] = this.measuredOrigin;
47
+ const t = r[r.length - 1];
48
+ t !== void 0 && e.getValue(n, t).jump(t, !1);
49
+ }
50
+ measureEndState() {
51
+ var e;
52
+ const { element: r, name: n, unresolvedKeyframes: t } = this;
53
+ if (!r || !r.current)
54
+ return;
55
+ const o = r.getValue(n);
56
+ o && o.jump(this.measuredOrigin, !1);
57
+ const a = t.length - 1, f = t[a];
58
+ t[a] = u[n](r.measureViewportBox(), window.getComputedStyle(r.current)), f !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = f), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([s, i]) => {
59
+ r.getValue(s).set(i);
60
+ }), this.resolveNoneKeyframes();
61
+ }
62
+ }
63
+ export {
64
+ b as DOMKeyframesResolver
65
+ };
@@ -0,0 +1,19 @@
1
+ import { VisualElement as o } from "../VisualElement.mjs";
2
+ import { DOMKeyframesResolver as s } from "./DOMKeyframesResolver.mjs";
3
+ class l extends o {
4
+ constructor() {
5
+ super(...arguments), this.KeyframeResolver = s;
6
+ }
7
+ sortInstanceNodePosition(e, t) {
8
+ return e.compareDocumentPosition(t) & 2 ? 1 : -1;
9
+ }
10
+ getBaseTargetFromProps(e, t) {
11
+ return e.style ? e.style[t] : void 0;
12
+ }
13
+ removeValueFromRenderState(e, { vars: t, style: r }) {
14
+ delete t[e], delete r[e];
15
+ }
16
+ }
17
+ export {
18
+ l as DOMVisualElement
19
+ };
@@ -0,0 +1,46 @@
1
+ import { resolveElements as l } from "../utils/resolve-element.mjs";
2
+ const s = /* @__PURE__ */ new WeakMap();
3
+ let o;
4
+ function f(e, t) {
5
+ if (t) {
6
+ const { inlineSize: r, blockSize: i } = t[0];
7
+ return { width: r, height: i };
8
+ } else return e instanceof SVGElement && "getBBox" in e ? e.getBBox() : {
9
+ width: e.offsetWidth,
10
+ height: e.offsetHeight
11
+ };
12
+ }
13
+ function d({ target: e, contentRect: t, borderBoxSize: r }) {
14
+ var i;
15
+ (i = s.get(e)) === null || i === void 0 || i.forEach((n) => {
16
+ n({
17
+ target: e,
18
+ contentSize: t,
19
+ get size() {
20
+ return f(e, r);
21
+ }
22
+ });
23
+ });
24
+ }
25
+ function u(e) {
26
+ e.forEach(d);
27
+ }
28
+ function v() {
29
+ typeof ResizeObserver > "u" || (o = new ResizeObserver(u));
30
+ }
31
+ function h(e, t) {
32
+ o || v();
33
+ const r = l(e);
34
+ return r.forEach((i) => {
35
+ let n = s.get(i);
36
+ n || (n = /* @__PURE__ */ new Set(), s.set(i, n)), n.add(t), o == null || o.observe(i);
37
+ }), () => {
38
+ r.forEach((i) => {
39
+ const n = s.get(i);
40
+ n == null || n.delete(t), n != null && n.size || o == null || o.unobserve(i);
41
+ });
42
+ };
43
+ }
44
+ export {
45
+ h as resizeElement
46
+ };
@@ -0,0 +1,23 @@
1
+ const i = /* @__PURE__ */ new Set();
2
+ let n;
3
+ function o() {
4
+ n = () => {
5
+ const e = {
6
+ width: window.innerWidth,
7
+ height: window.innerHeight
8
+ }, t = {
9
+ target: window,
10
+ size: e,
11
+ contentSize: e
12
+ };
13
+ i.forEach((d) => d(t));
14
+ }, window.addEventListener("resize", n);
15
+ }
16
+ function w(e) {
17
+ return i.add(e), n || o(), () => {
18
+ i.delete(e), !i.size && n && (n = void 0);
19
+ };
20
+ }
21
+ export {
22
+ w as resizeWindow
23
+ };
@@ -0,0 +1,8 @@
1
+ import { resizeElement as o } from "./handle-element.mjs";
2
+ import { resizeWindow as i } from "./handle-window.mjs";
3
+ function f(e, r) {
4
+ return typeof e == "function" ? i(e) : o(e, r);
5
+ }
6
+ export {
7
+ f as resize
8
+ };
@@ -0,0 +1,46 @@
1
+ import { scrollInfo as c } from "./track.mjs";
2
+ import { observeTimeline as f } from "./observe.mjs";
3
+ import { supportsScrollTimeline as o } from "./supports.mjs";
4
+ function g({ source: e, container: r, axis: t = "y" }) {
5
+ e && (r = e);
6
+ const u = { value: 0 }, n = c((m) => {
7
+ u.value = m[t].progress * 100;
8
+ }, { container: r, axis: t });
9
+ return { currentTime: u, cancel: n };
10
+ }
11
+ const l = /* @__PURE__ */ new Map();
12
+ function s({ source: e, container: r = document.documentElement, axis: t = "y" } = {}) {
13
+ e && (r = e), l.has(r) || l.set(r, {});
14
+ const u = l.get(r);
15
+ return u[t] || (u[t] = o() ? new ScrollTimeline({ source: r, axis: t }) : g({ source: r, axis: t })), u[t];
16
+ }
17
+ function T(e) {
18
+ return e.length === 2;
19
+ }
20
+ function i(e) {
21
+ return e && (e.target || e.offset);
22
+ }
23
+ function h(e, r) {
24
+ return T(e) || i(r) ? c((t) => {
25
+ e(t[r.axis].progress, t);
26
+ }, r) : f(e, s(r));
27
+ }
28
+ function p(e, r) {
29
+ if (i(r))
30
+ return e.pause(), c((t) => {
31
+ e.time = e.duration * t[r.axis].progress;
32
+ }, r);
33
+ {
34
+ const t = s(r);
35
+ return e.attachTimeline(t, (u) => (u.pause(), f((n) => {
36
+ u.time = u.duration * n;
37
+ }, t)));
38
+ }
39
+ }
40
+ function k(e, { axis: r = "y", ...t } = {}) {
41
+ const u = { axis: r, ...t };
42
+ return typeof e == "function" ? h(e, u) : p(e, u);
43
+ }
44
+ export {
45
+ k as scroll
46
+ };