motion-v 1.0.2 → 1.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +3754 -3130
- package/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/animation/hooks/use-animate.mjs +1 -1
- package/dist/es/components/animate-presence/use-pop-layout.mjs +1 -2
- package/dist/es/components/group.mjs +8 -3
- package/dist/es/components/motion/use-motion-state.d.ts +702 -702
- package/dist/es/components/motion/use-motion-state.mjs +10 -2
- package/dist/es/components/reorder/index.d.ts +2808 -2808
- package/dist/es/components/reorder/utils.d.ts +1 -1
- package/dist/es/components/reorder/utils.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/animate/index.mjs +2 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/animate/sequence.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/animate/single-value.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +73 -0
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +13 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +17 -24
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +8 -6
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/sequence/create.mjs +10 -10
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +3 -4
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/stagger.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +8 -14
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +61 -35
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/shared/stack.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/styles/transform.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/VisualElement.mjs +15 -19
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +6 -7
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +17 -0
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +18 -0
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/render/dom/scroll/index.mjs +12 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +6 -6
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs +27 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +3 -16
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +10 -9
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/utils/path.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/motion-values.mjs +1 -6
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/setters.mjs +5 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/utils/delay.mjs +4 -5
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +15 -0
- package/dist/es/external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +7 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +138 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs → motion-dom@12.10.5/external/motion-dom/dist/es/animation/GroupAnimation.mjs} +8 -15
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +10 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/JSAnimation.mjs +267 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/NativeAnimation.mjs +150 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +44 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs +14 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs → motion-dom@12.10.5/external/motion-dom/dist/es/animation/drivers/frame.mjs} +3 -4
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/generators/keyframes.mjs +5 -5
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/generators/spring/find.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/generators/spring/index.mjs +15 -6
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +6 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/generators/utils/velocity.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/DOMKeyframesResolver.mjs +10 -10
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/utils → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/KeyframesResolver.mjs +32 -35
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes/get-final.mjs +10 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/offsets/fill.mjs +2 -3
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +11 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs +8 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/animation → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/utils/is-none.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/html → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/utils/make-none-animatable.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/utils/unit-conversion.mjs +2 -2
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/utils/WithPromise.mjs +29 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/utils/active-animations.mjs +11 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators → motion-dom@12.10.5/external/motion-dom/dist/es/animation}/utils/can-animate.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom → motion-dom@12.10.5/external/motion-dom/dist/es/animation}/utils/css-variables-conversion.mjs +3 -3
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +6 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +18 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +4 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +21 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/easing/supported.mjs +15 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs +36 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs → motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs} +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +26 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +14 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +1 -3
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +40 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +19 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/effects/MotionValueState.mjs +42 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/effects/style/index.mjs +49 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/effects/style/transform.mjs +33 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/frameloop/batcher.mjs +6 -4
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/frameloop/frame.mjs +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/frameloop/index-legacy.mjs +11 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/frameloop/order.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/frameloop/sync-time.mjs +1 -2
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +1 -1
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/gestures/drag/state/set-active.mjs +25 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/gestures/press/index.mjs +55 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/render/dom/is-css-var.mjs +4 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/render/dom/style-computed.mjs +8 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/render/dom/style-set.mjs +7 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/html → motion-dom@12.10.5/external/motion-dom/dist/es/render}/utils/keys-transform.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom → motion-dom@12.10.5/external/motion-dom/dist/es}/scroll/observe.mjs +2 -3
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/stats/animation-count.mjs +8 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/stats/index.mjs +114 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/interpolate.mjs +7 -6
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/mix/color.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/mix/complex.mjs +7 -8
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/utils/resolve-elements.mjs +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/utils/supports/flags.mjs +4 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/utils/supports/memo.mjs +9 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/transform.mjs +1 -8
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/value/index.mjs +33 -10
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/map-value.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/subscribe-value.mjs +13 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/transform-value.mjs +14 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/color/rgba.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/complex/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types → motion-dom@12.10.5/external/motion-dom/dist/es/value/types}/dimensions.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/int.mjs} +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/maps}/defaults.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/maps/number.mjs} +13 -4
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/maps}/transform.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/numbers/index.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/numbers/units.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/utils}/animatable-none.mjs +3 -3
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/types/utils/find.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/index.mjs +65 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/queue.mjs +45 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/start.mjs +115 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/utils/choose-layer-type.mjs +12 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/utils/css.mjs +35 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/utils/get-layer-name.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/utils/get-view-animations.mjs +13 -0
- package/dist/es/external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/view/utils/has-target.mjs +6 -0
- package/dist/es/external/.pnpm/motion-utils@12.9.4/external/motion-utils/dist/es/array.mjs +23 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/cubic-bezier.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/steps.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/utils/get-easing-for-segment.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/utils/map.mjs +7 -4
- package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/errors.mjs +4 -3
- package/dist/es/external/.pnpm/motion-utils@12.9.4/external/motion-utils/dist/es/global-config.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/warn-once.mjs +6 -0
- package/dist/es/features/animation/animation.mjs +3 -4
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +2 -3
- package/dist/es/features/gestures/drag/index.mjs +1 -2
- package/dist/es/features/gestures/focus/index.mjs +1 -1
- package/dist/es/features/gestures/hover/index.mjs +2 -3
- package/dist/es/features/gestures/in-view/index.mjs +2 -3
- package/dist/es/features/gestures/pan/PanSession.mjs +4 -5
- package/dist/es/features/gestures/pan/index.mjs +2 -3
- package/dist/es/features/gestures/press/index.mjs +2 -3
- package/dist/es/features/layout/config.mjs +2 -2
- package/dist/es/features/layout/layout.mjs +2 -2
- package/dist/es/features/layout/projection.mjs +2 -2
- package/dist/es/index.mjs +243 -36
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +5 -9
- package/dist/es/state/style.d.ts +1 -1
- package/dist/es/state/style.mjs +5 -5
- package/dist/es/state/utils.d.ts +1 -2
- package/dist/es/types/transform.d.ts +1 -23
- package/dist/es/utils/index.d.ts +0 -1
- package/dist/es/utils/use-animation-frame.mjs +1 -2
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/use-combine-values.mjs +2 -3
- package/dist/es/value/use-computed.mjs +1 -2
- package/dist/es/value/use-scroll.d.ts +4 -4
- package/dist/es/value/use-scroll.mjs +30 -31
- package/dist/es/value/use-spring.mjs +3 -4
- package/dist/es/value/use-time.d.ts +1 -1
- package/dist/es/value/use-time.mjs +1 -2
- package/dist/es/value/use-transform.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +2 -3
- package/package.json +3 -4
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +0 -247
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +0 -102
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +0 -281
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +0 -108
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +0 -32
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +0 -14
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +0 -22
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +0 -10
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +0 -6
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/scroll/index.mjs +0 -70
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -9
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -18
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/svg/utils/measure.mjs +0 -15
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -12
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/utils/resolve-value.mjs +0 -11
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -10
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/controls/Group.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +0 -81
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +0 -7
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +0 -37
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/gestures/press/index.mjs +0 -74
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/gestures/utils/capture-pointer.mjs +0 -12
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/utils/supports/memo.mjs +0 -13
- package/dist/es/external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/array.mjs +0 -13
- package/dist/es/external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/global-config.mjs +0 -7
- package/dist/es/render/utils/setters.d.ts +0 -3
- package/dist/es/utils/time-conversion.d.ts +0 -8
- package/dist/es/utils/time-conversion.mjs +0 -8
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +2 -2
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.10.5}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/generators/inertia.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/generators/spring/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-dom@12.10.5/external/motion-dom/dist/es/animation/keyframes}/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/animation/utils/is-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom → motion-dom@12.10.5/external/motion-dom/dist/es/animation}/utils/is-css-variable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators → motion-dom@12.10.5/external/motion-dom/dist/es/animation/waapi}/utils/accelerated-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/frameloop/microtask.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/frameloop/render-step.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/hover.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/html/utils → motion-dom@12.10.5/external/motion-dom/dist/es/render/dom}/parse-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/html → motion-dom@12.10.5/external/motion-dom/dist/es/render}/utils/keys-position.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/stats/buffer.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.10.5}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/auto.mjs} +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/color}/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types → motion-dom@12.10.5/external/motion-dom/dist/es/value/types}/test.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types → motion-dom@12.10.5/external/motion-dom/dist/es/value/types/utils}/get-as-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.10.5/external/motion-dom}/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-utils@12.9.4/external/motion-utils/dist/es}/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/anticipate.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/back.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/circ.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/ease.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/modifiers/mirror.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/modifiers/reverse.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0/external/motion-dom/dist/es → motion-utils@12.9.4/external/motion-utils/dist/es/easing}/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-utils@12.9.4/external/motion-utils}/dist/es/easing/utils/is-easing-array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-utils@12.9.4/external/motion-utils/dist/es}/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-utils@12.9.4/external/motion-utils/dist/es}/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/noop.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-utils@12.9.4/external/motion-utils/dist/es}/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/progress.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/time-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.9.4}/external/motion-utils/dist/es/velocity-per-second.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/utils → motion-utils@12.9.4/external/motion-utils/dist/es}/wrap.mjs +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { onMounted, watch } from "vue";
|
|
2
2
|
import { warning } from "hey-listen";
|
|
3
3
|
import { isSSR } from "../utils/is.mjs";
|
|
4
|
-
import { scroll } from "../external/.pnpm/framer-motion@12.5
|
|
5
|
-
import { motionValue } from "../external/.pnpm/motion-dom@12.5
|
|
6
|
-
import "../external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
4
|
+
import { scroll } from "../external/.pnpm/framer-motion@12.10.5/external/framer-motion/dist/es/render/dom/scroll/index.mjs";
|
|
5
|
+
import { motionValue } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/index.mjs";
|
|
7
6
|
function refWarning(name, ref) {
|
|
8
7
|
warning(
|
|
9
8
|
Boolean(!ref || ref.value),
|
|
@@ -27,35 +26,35 @@ function useScroll({
|
|
|
27
26
|
onMounted(() => {
|
|
28
27
|
refWarning("target", target);
|
|
29
28
|
refWarning("container", container);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const cleanup = scroll(
|
|
38
|
-
(_progress, { x, y }) => {
|
|
39
|
-
values.scrollX.set(x.current);
|
|
40
|
-
values.scrollXProgress.set(x.progress);
|
|
41
|
-
values.scrollY.set(y.current);
|
|
42
|
-
values.scrollYProgress.set(y.progress);
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
...options,
|
|
46
|
-
container: (container == null ? void 0 : container.value) ?? void 0,
|
|
47
|
-
target: (target == null ? void 0 : target.value) ?? void 0
|
|
29
|
+
watch(
|
|
30
|
+
[() => container == null ? void 0 : container.value, () => target == null ? void 0 : target.value, () => options.offset],
|
|
31
|
+
(n, o, onCleanup) => {
|
|
32
|
+
if (isSSR) {
|
|
33
|
+
return;
|
|
48
34
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
35
|
+
const cleanup = scroll(
|
|
36
|
+
(_progress, { x, y }) => {
|
|
37
|
+
values.scrollX.set(x.current);
|
|
38
|
+
values.scrollXProgress.set(x.progress);
|
|
39
|
+
values.scrollY.set(y.current);
|
|
40
|
+
values.scrollYProgress.set(y.progress);
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
...options,
|
|
44
|
+
container: (container == null ? void 0 : container.value) ?? void 0,
|
|
45
|
+
target: (target == null ? void 0 : target.value) ?? void 0
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
onCleanup(() => {
|
|
49
|
+
cleanup();
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
immediate: true,
|
|
54
|
+
flush: "post"
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
});
|
|
59
58
|
return values;
|
|
60
59
|
}
|
|
61
60
|
export {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { watch, isRef } from "vue";
|
|
2
|
-
import { animateValue } from "../external/.pnpm/
|
|
3
|
-
import { motionValue } from "../external/.pnpm/motion-dom@12.5
|
|
4
|
-
import "../external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
5
|
-
import { frame, frameData } from "../external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
2
|
+
import { animateValue } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/animation/JSAnimation.mjs";
|
|
3
|
+
import { motionValue } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/index.mjs";
|
|
6
4
|
import { isMotionValue } from "../utils/motion-value.mjs";
|
|
5
|
+
import { frame, frameData } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
7
6
|
function toNumber(v) {
|
|
8
7
|
if (typeof v === "number")
|
|
9
8
|
return v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useTime(): import('motion
|
|
1
|
+
export declare function useTime(): import('framer-motion/dom').MotionValue<number>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useAnimationFrame } from "../utils/use-animation-frame.mjs";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/motion-dom@12.5
|
|
3
|
-
import "../external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { motionValue } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/index.mjs";
|
|
4
3
|
function useTime() {
|
|
5
4
|
const time = motionValue(0);
|
|
6
5
|
useAnimationFrame((t) => time.set(t));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useComputed } from "./use-computed.mjs";
|
|
2
2
|
import { useCombineMotionValues } from "./use-combine-values.mjs";
|
|
3
3
|
import { isRef, computed } from "vue";
|
|
4
|
-
import { transform } from "../external/.pnpm/
|
|
4
|
+
import { transform } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/utils/transform.mjs";
|
|
5
5
|
function useTransform(input, inputRangeOrTransformer, outputRange, options) {
|
|
6
6
|
if (typeof input === "function") {
|
|
7
7
|
return useComputed(input);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useMotionValueEvent } from "./use-motion-value-event.mjs";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/motion-dom@12.5
|
|
3
|
-
import "../external/.pnpm/motion-
|
|
4
|
-
import { frame } from "../external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
2
|
+
import { motionValue } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/value/index.mjs";
|
|
3
|
+
import { frame } from "../external/.pnpm/motion-dom@12.10.5/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
5
4
|
function useVelocity(value) {
|
|
6
5
|
const velocity = motionValue(value.getVelocity());
|
|
7
6
|
const updateVelocity = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-v",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,9 +67,8 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@vueuse/core": "^10.0.0",
|
|
70
|
-
"framer-motion": "12.5
|
|
71
|
-
"hey-listen": "^1.0.8"
|
|
72
|
-
"motion-dom": "^12.5.0"
|
|
70
|
+
"framer-motion": "12.10.5",
|
|
71
|
+
"hey-listen": "^1.0.8"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|
|
75
74
|
"vue": "3.4.38"
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
-
import { noop } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/noop.mjs";
|
|
3
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
4
|
-
import { isGenerator } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
|
-
import { attachTimeline } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs";
|
|
6
|
-
import { isWaapiSupportedEasing } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs";
|
|
7
|
-
import { supportsLinearEasing } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/utils/supports/linear-easing.mjs";
|
|
8
|
-
import { anticipate } from "../../easing/anticipate.mjs";
|
|
9
|
-
import { backInOut } from "../../easing/back.mjs";
|
|
10
|
-
import { circInOut } from "../../easing/circ.mjs";
|
|
11
|
-
import { DOMKeyframesResolver } from "../../render/dom/DOMKeyframesResolver.mjs";
|
|
12
|
-
import { BaseAnimation } from "./BaseAnimation.mjs";
|
|
13
|
-
import { MainThreadAnimation } from "./MainThreadAnimation.mjs";
|
|
14
|
-
import { acceleratedValues } from "./utils/accelerated-values.mjs";
|
|
15
|
-
import { startWaapiAnimation } from "./waapi/index.mjs";
|
|
16
|
-
import { getFinalKeyframe } from "./waapi/utils/get-final-keyframe.mjs";
|
|
17
|
-
import { supportsWaapi } from "./waapi/utils/supports-waapi.mjs";
|
|
18
|
-
const sampleDelta = 10;
|
|
19
|
-
const maxDuration = 2e4;
|
|
20
|
-
function requiresPregeneratedKeyframes(options) {
|
|
21
|
-
return isGenerator(options.type) || options.type === "spring" || !isWaapiSupportedEasing(options.ease);
|
|
22
|
-
}
|
|
23
|
-
function pregenerateKeyframes(keyframes, options) {
|
|
24
|
-
const sampleAnimation = new MainThreadAnimation({
|
|
25
|
-
...options,
|
|
26
|
-
keyframes,
|
|
27
|
-
repeat: 0,
|
|
28
|
-
delay: 0,
|
|
29
|
-
isGenerator: true
|
|
30
|
-
});
|
|
31
|
-
let state = { done: false, value: keyframes[0] };
|
|
32
|
-
const pregeneratedKeyframes = [];
|
|
33
|
-
let t = 0;
|
|
34
|
-
while (!state.done && t < maxDuration) {
|
|
35
|
-
state = sampleAnimation.sample(t);
|
|
36
|
-
pregeneratedKeyframes.push(state.value);
|
|
37
|
-
t += sampleDelta;
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
times: void 0,
|
|
41
|
-
keyframes: pregeneratedKeyframes,
|
|
42
|
-
duration: t - sampleDelta,
|
|
43
|
-
ease: "linear"
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const unsupportedEasingFunctions = {
|
|
47
|
-
anticipate,
|
|
48
|
-
backInOut,
|
|
49
|
-
circInOut
|
|
50
|
-
};
|
|
51
|
-
function isUnsupportedEase(key) {
|
|
52
|
-
return key in unsupportedEasingFunctions;
|
|
53
|
-
}
|
|
54
|
-
class AcceleratedAnimation extends BaseAnimation {
|
|
55
|
-
constructor(options) {
|
|
56
|
-
super(options);
|
|
57
|
-
const { name, motionValue, element, keyframes } = this.options;
|
|
58
|
-
this.resolver = new DOMKeyframesResolver(keyframes, (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe), name, motionValue, element);
|
|
59
|
-
this.resolver.scheduleResolve();
|
|
60
|
-
}
|
|
61
|
-
initPlayback(keyframes, finalKeyframe) {
|
|
62
|
-
let { duration = 300, times, ease, type, motionValue, name, startTime } = this.options;
|
|
63
|
-
if (!motionValue.owner || !motionValue.owner.current) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
if (typeof ease === "string" && supportsLinearEasing() && isUnsupportedEase(ease)) {
|
|
67
|
-
ease = unsupportedEasingFunctions[ease];
|
|
68
|
-
}
|
|
69
|
-
if (requiresPregeneratedKeyframes(this.options)) {
|
|
70
|
-
const { onComplete, onUpdate, motionValue: motionValue2, element, ...options } = this.options;
|
|
71
|
-
const pregeneratedAnimation = pregenerateKeyframes(keyframes, options);
|
|
72
|
-
keyframes = pregeneratedAnimation.keyframes;
|
|
73
|
-
if (keyframes.length === 1) {
|
|
74
|
-
keyframes[1] = keyframes[0];
|
|
75
|
-
}
|
|
76
|
-
duration = pregeneratedAnimation.duration;
|
|
77
|
-
times = pregeneratedAnimation.times;
|
|
78
|
-
ease = pregeneratedAnimation.ease;
|
|
79
|
-
type = "keyframes";
|
|
80
|
-
}
|
|
81
|
-
const animation = startWaapiAnimation(motionValue.owner.current, name, keyframes, { ...this.options, duration, times, ease });
|
|
82
|
-
animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
|
|
83
|
-
if (this.pendingTimeline) {
|
|
84
|
-
attachTimeline(animation, this.pendingTimeline);
|
|
85
|
-
this.pendingTimeline = void 0;
|
|
86
|
-
} else {
|
|
87
|
-
animation.onfinish = () => {
|
|
88
|
-
const { onComplete } = this.options;
|
|
89
|
-
motionValue.set(getFinalKeyframe(keyframes, this.options, finalKeyframe));
|
|
90
|
-
onComplete && onComplete();
|
|
91
|
-
this.cancel();
|
|
92
|
-
this.resolveFinishedPromise();
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
animation,
|
|
97
|
-
duration,
|
|
98
|
-
times,
|
|
99
|
-
type,
|
|
100
|
-
ease,
|
|
101
|
-
keyframes
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
get duration() {
|
|
105
|
-
const { resolved } = this;
|
|
106
|
-
if (!resolved)
|
|
107
|
-
return 0;
|
|
108
|
-
const { duration } = resolved;
|
|
109
|
-
return millisecondsToSeconds(duration);
|
|
110
|
-
}
|
|
111
|
-
get time() {
|
|
112
|
-
const { resolved } = this;
|
|
113
|
-
if (!resolved)
|
|
114
|
-
return 0;
|
|
115
|
-
const { animation } = resolved;
|
|
116
|
-
return millisecondsToSeconds(animation.currentTime || 0);
|
|
117
|
-
}
|
|
118
|
-
set time(newTime) {
|
|
119
|
-
const { resolved } = this;
|
|
120
|
-
if (!resolved)
|
|
121
|
-
return;
|
|
122
|
-
const { animation } = resolved;
|
|
123
|
-
animation.currentTime = secondsToMilliseconds(newTime);
|
|
124
|
-
}
|
|
125
|
-
get speed() {
|
|
126
|
-
const { resolved } = this;
|
|
127
|
-
if (!resolved)
|
|
128
|
-
return 1;
|
|
129
|
-
const { animation } = resolved;
|
|
130
|
-
return animation.playbackRate;
|
|
131
|
-
}
|
|
132
|
-
set speed(newSpeed) {
|
|
133
|
-
const { resolved } = this;
|
|
134
|
-
if (!resolved)
|
|
135
|
-
return;
|
|
136
|
-
const { animation } = resolved;
|
|
137
|
-
animation.playbackRate = newSpeed;
|
|
138
|
-
}
|
|
139
|
-
get state() {
|
|
140
|
-
const { resolved } = this;
|
|
141
|
-
if (!resolved)
|
|
142
|
-
return "idle";
|
|
143
|
-
const { animation } = resolved;
|
|
144
|
-
return animation.playState;
|
|
145
|
-
}
|
|
146
|
-
get startTime() {
|
|
147
|
-
const { resolved } = this;
|
|
148
|
-
if (!resolved)
|
|
149
|
-
return null;
|
|
150
|
-
const { animation } = resolved;
|
|
151
|
-
return animation.startTime;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Replace the default DocumentTimeline with another AnimationTimeline.
|
|
155
|
-
* Currently used for scroll animations.
|
|
156
|
-
*/
|
|
157
|
-
attachTimeline(timeline) {
|
|
158
|
-
if (!this._resolved) {
|
|
159
|
-
this.pendingTimeline = timeline;
|
|
160
|
-
} else {
|
|
161
|
-
const { resolved } = this;
|
|
162
|
-
if (!resolved)
|
|
163
|
-
return noop;
|
|
164
|
-
const { animation } = resolved;
|
|
165
|
-
attachTimeline(animation, timeline);
|
|
166
|
-
}
|
|
167
|
-
return noop;
|
|
168
|
-
}
|
|
169
|
-
play() {
|
|
170
|
-
if (this.isStopped)
|
|
171
|
-
return;
|
|
172
|
-
const { resolved } = this;
|
|
173
|
-
if (!resolved)
|
|
174
|
-
return;
|
|
175
|
-
const { animation } = resolved;
|
|
176
|
-
if (animation.playState === "finished") {
|
|
177
|
-
this.updateFinishedPromise();
|
|
178
|
-
}
|
|
179
|
-
animation.play();
|
|
180
|
-
}
|
|
181
|
-
pause() {
|
|
182
|
-
const { resolved } = this;
|
|
183
|
-
if (!resolved)
|
|
184
|
-
return;
|
|
185
|
-
const { animation } = resolved;
|
|
186
|
-
animation.pause();
|
|
187
|
-
}
|
|
188
|
-
stop() {
|
|
189
|
-
this.resolver.cancel();
|
|
190
|
-
this.isStopped = true;
|
|
191
|
-
if (this.state === "idle")
|
|
192
|
-
return;
|
|
193
|
-
this.resolveFinishedPromise();
|
|
194
|
-
this.updateFinishedPromise();
|
|
195
|
-
const { resolved } = this;
|
|
196
|
-
if (!resolved)
|
|
197
|
-
return;
|
|
198
|
-
const { animation, keyframes, duration, type, ease, times } = resolved;
|
|
199
|
-
if (animation.playState === "idle" || animation.playState === "finished") {
|
|
200
|
-
return;
|
|
201
|
-
}
|
|
202
|
-
if (this.time) {
|
|
203
|
-
const { motionValue, onUpdate, onComplete, element, ...options } = this.options;
|
|
204
|
-
const sampleAnimation = new MainThreadAnimation({
|
|
205
|
-
...options,
|
|
206
|
-
keyframes,
|
|
207
|
-
duration,
|
|
208
|
-
type,
|
|
209
|
-
ease,
|
|
210
|
-
times,
|
|
211
|
-
isGenerator: true
|
|
212
|
-
});
|
|
213
|
-
const sampleTime = secondsToMilliseconds(this.time);
|
|
214
|
-
motionValue.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
|
|
215
|
-
}
|
|
216
|
-
const { onStop } = this.options;
|
|
217
|
-
onStop && onStop();
|
|
218
|
-
this.cancel();
|
|
219
|
-
}
|
|
220
|
-
complete() {
|
|
221
|
-
const { resolved } = this;
|
|
222
|
-
if (!resolved)
|
|
223
|
-
return;
|
|
224
|
-
resolved.animation.finish();
|
|
225
|
-
}
|
|
226
|
-
cancel() {
|
|
227
|
-
const { resolved } = this;
|
|
228
|
-
if (!resolved)
|
|
229
|
-
return;
|
|
230
|
-
resolved.animation.cancel();
|
|
231
|
-
}
|
|
232
|
-
static supports(options) {
|
|
233
|
-
const { motionValue, name, repeatDelay, repeatType, damping, type } = options;
|
|
234
|
-
if (!motionValue || !motionValue.owner || !(motionValue.owner.current instanceof HTMLElement)) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
const { onUpdate, transformTemplate } = motionValue.owner.getProps();
|
|
238
|
-
return supportsWaapi() && name && acceleratedValues.has(name) && /**
|
|
239
|
-
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
240
|
-
* no way to read the value from WAAPI every frame.
|
|
241
|
-
*/
|
|
242
|
-
!onUpdate && !transformTemplate && !repeatDelay && repeatType !== "mirror" && damping !== 0 && type !== "inertia";
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
export {
|
|
246
|
-
AcceleratedAnimation
|
|
247
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
-
import { time } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/sync-time.mjs";
|
|
3
|
-
import { flushKeyframeResolvers } from "../../render/utils/KeyframesResolver.mjs";
|
|
4
|
-
import { canAnimate } from "./utils/can-animate.mjs";
|
|
5
|
-
import { getFinalKeyframe } from "./waapi/utils/get-final-keyframe.mjs";
|
|
6
|
-
const MAX_RESOLVE_DELAY = 40;
|
|
7
|
-
class BaseAnimation {
|
|
8
|
-
constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", ...options }) {
|
|
9
|
-
this.isStopped = false;
|
|
10
|
-
this.hasAttemptedResolve = false;
|
|
11
|
-
this.createdAt = time.now();
|
|
12
|
-
this.options = {
|
|
13
|
-
autoplay,
|
|
14
|
-
delay,
|
|
15
|
-
type,
|
|
16
|
-
repeat,
|
|
17
|
-
repeatDelay,
|
|
18
|
-
repeatType,
|
|
19
|
-
...options
|
|
20
|
-
};
|
|
21
|
-
this.updateFinishedPromise();
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* This method uses the createdAt and resolvedAt to calculate the
|
|
25
|
-
* animation startTime. *Ideally*, we would use the createdAt time as t=0
|
|
26
|
-
* as the following frame would then be the first frame of the animation in
|
|
27
|
-
* progress, which would feel snappier.
|
|
28
|
-
*
|
|
29
|
-
* However, if there's a delay (main thread work) between the creation of
|
|
30
|
-
* the animation and the first commited frame, we prefer to use resolvedAt
|
|
31
|
-
* to avoid a sudden jump into the animation.
|
|
32
|
-
*/
|
|
33
|
-
calcStartTime() {
|
|
34
|
-
if (!this.resolvedAt)
|
|
35
|
-
return this.createdAt;
|
|
36
|
-
return this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* A getter for resolved data. If keyframes are not yet resolved, accessing
|
|
40
|
-
* this.resolved will synchronously flush all pending keyframe resolvers.
|
|
41
|
-
* This is a deoptimisation, but at its worst still batches read/writes.
|
|
42
|
-
*/
|
|
43
|
-
get resolved() {
|
|
44
|
-
if (!this._resolved && !this.hasAttemptedResolve) {
|
|
45
|
-
flushKeyframeResolvers();
|
|
46
|
-
}
|
|
47
|
-
return this._resolved;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* A method to be called when the keyframes resolver completes. This method
|
|
51
|
-
* will check if its possible to run the animation and, if not, skip it.
|
|
52
|
-
* Otherwise, it will call initPlayback on the implementing class.
|
|
53
|
-
*/
|
|
54
|
-
onKeyframesResolved(keyframes, finalKeyframe) {
|
|
55
|
-
this.resolvedAt = time.now();
|
|
56
|
-
this.hasAttemptedResolve = true;
|
|
57
|
-
const { name, type, velocity, delay, onComplete, onUpdate, isGenerator } = this.options;
|
|
58
|
-
if (!isGenerator && !canAnimate(keyframes, name, type, velocity)) {
|
|
59
|
-
if (!delay) {
|
|
60
|
-
onUpdate && onUpdate(getFinalKeyframe(keyframes, this.options, finalKeyframe));
|
|
61
|
-
onComplete && onComplete();
|
|
62
|
-
this.resolveFinishedPromise();
|
|
63
|
-
return;
|
|
64
|
-
} else {
|
|
65
|
-
this.options.duration = 0;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
const resolvedAnimation = this.initPlayback(keyframes, finalKeyframe);
|
|
69
|
-
if (resolvedAnimation === false)
|
|
70
|
-
return;
|
|
71
|
-
this._resolved = {
|
|
72
|
-
keyframes,
|
|
73
|
-
finalKeyframe,
|
|
74
|
-
...resolvedAnimation
|
|
75
|
-
};
|
|
76
|
-
this.onPostResolved();
|
|
77
|
-
}
|
|
78
|
-
onPostResolved() {
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
82
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
83
|
-
* reject if its cancels.
|
|
84
|
-
*/
|
|
85
|
-
then(resolve, reject) {
|
|
86
|
-
return this.currentFinishedPromise.then(resolve, reject);
|
|
87
|
-
}
|
|
88
|
-
flatten() {
|
|
89
|
-
if (!this.options.allowFlatten)
|
|
90
|
-
return;
|
|
91
|
-
this.options.type = "keyframes";
|
|
92
|
-
this.options.ease = "linear";
|
|
93
|
-
}
|
|
94
|
-
updateFinishedPromise() {
|
|
95
|
-
this.currentFinishedPromise = new Promise((resolve) => {
|
|
96
|
-
this.resolveFinishedPromise = resolve;
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
export {
|
|
101
|
-
BaseAnimation
|
|
102
|
-
};
|