motion-v 1.0.0-beta.2 → 1.0.0-beta.3
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 +3429 -2928
- 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/motion/use-motion-state.d.ts +706 -706
- 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.9.0}/external/framer-motion/dist/es/animation/animate/index.mjs +2 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +73 -0
- package/dist/es/external/.pnpm/framer-motion@12.9.0/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.9.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +16 -24
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +10 -10
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +48 -25
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +1 -2
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/render/VisualElement.mjs +15 -19
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +6 -7
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +17 -0
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +18 -0
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/index.mjs +9 -0
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +3 -4
- package/dist/es/external/.pnpm/framer-motion@12.9.0/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.9.0}/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.9.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +2 -15
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +9 -8
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +3 -4
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/external/framer-motion/dist/es/render/utils/setters.mjs +5 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/utils/delay.mjs +4 -5
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +15 -0
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +7 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +133 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs → motion-dom@12.9.0/external/motion-dom/dist/es/animation/GroupAnimation.mjs} +8 -15
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +10 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/JSAnimation.mjs +261 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/NativeAnimation.mjs +150 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +44 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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 → motion-dom@12.9.0/external/motion-dom/dist/es/animation}/drivers/driver-frameloop.mjs +2 -3
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion → motion-dom@12.9.0/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.9.0/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.9.0/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.9.0}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/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.9.0/external/motion-dom/dist/es/animation/keyframes}/DOMKeyframesResolver.mjs +9 -9
- package/dist/es/external/.pnpm/{framer-motion@12.5.0/external/framer-motion/dist/es/render/utils → motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes}/KeyframesResolver.mjs +26 -28
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/external/motion-dom/dist/es/animation/keyframes}/offsets/fill.mjs +2 -3
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +11 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/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.9.0/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.9.0/external/motion-dom/dist/es/animation/keyframes}/utils/unit-conversion.mjs +2 -2
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/WithPromise.mjs +29 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/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.9.0/external/motion-dom/dist/es/animation}/utils/css-variables-conversion.mjs +3 -3
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +6 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +18 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +4 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +21 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/supported.mjs +15 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/external/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs} +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +26 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +1 -3
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +40 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +19 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/effects/style-effect.mjs +30 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/frameloop/batcher.mjs +6 -4
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/frameloop/frame.mjs +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/frameloop/index-legacy.mjs +11 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/frameloop/order.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/frameloop/sync-time.mjs +1 -2
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +1 -1
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/gestures/drag/state/set-active.mjs +25 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/gestures/press/index.mjs +53 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/render/dom/is-css-var.mjs +4 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/render/dom/style-computed.mjs +8 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/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.9.0/external/motion-dom/dist/es}/scroll/observe.mjs +2 -3
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/stats/animation-count.mjs +8 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/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.9.0/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.9.0/external/motion-dom}/dist/es/utils/mix/complex.mjs +7 -8
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/utils/resolve-elements.mjs +1 -2
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/utils/supports/flags.mjs +4 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/utils/supports/memo.mjs +9 -0
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/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.9.0/external/motion-dom}/dist/es/utils/transform.mjs +1 -8
- package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/value/index.mjs +12 -10
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/map-value.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/subscribe-value.mjs +13 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/external/motion-dom/dist/es/value/types/utils}/animatable-none.mjs +3 -3
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/types/utils/find.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/index.mjs +65 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/queue.mjs +45 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/start.mjs +115 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/choose-layer-type.mjs +12 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/css.mjs +35 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/get-layer-name.mjs +9 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/get-view-animations.mjs +13 -0
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/has-target.mjs +6 -0
- package/dist/es/external/.pnpm/motion-utils@12.8.3/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.8.3/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.8.3/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.8.3/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.8.3/external/motion-utils}/dist/es/easing/utils/map.mjs +7 -4
- package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/external/motion-utils/dist/es/errors.mjs +4 -3
- package/dist/es/external/.pnpm/motion-utils@12.8.3/external/motion-utils/dist/es/global-config.mjs +4 -0
- package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/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 +4 -7
- package/dist/es/state/style.mjs +2 -1
- package/dist/es/state/utils.d.ts +2 -2
- package/dist/es/types/index.d.ts +0 -1
- package/dist/es/types/transform.d.ts +0 -23
- package/dist/es/utils/index.d.ts +0 -1
- package/dist/es/utils/is.d.ts +1 -0
- package/dist/es/utils/is.mjs +4 -0
- 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 +7 -4
- package/dist/es/value/use-spring.mjs +6 -7
- 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.d.ts +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/state/animate-variants-children.d.ts +0 -15
- package/dist/es/utils/time-conversion.mjs +0 -8
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.5.0 → framer-motion@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0/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.9.0/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.9.0}/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0}/external/motion-dom/dist/es/frameloop/microtask.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/frameloop/render-step.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/external/motion-dom/dist/es/gestures/hover.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0}/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.9.0/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.9.0/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.9.0}/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.9.0/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.9.0/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.9.0/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.9.0/external/motion-dom}/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.5.0 → motion-dom@12.9.0}/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3}/external/motion-utils/dist/es/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/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.8.3/external/motion-utils/dist/es}/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/external/motion-utils/dist/es/progress.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/external/motion-utils/dist/es/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/external/motion-utils/dist/es/time-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.5.0 → motion-utils@12.8.3}/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.8.3/external/motion-utils/dist/es}/wrap.mjs +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useAnimationFrame } from "../utils/use-animation-frame.mjs";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/motion-dom@12.
|
|
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.9.0/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,5 +1,4 @@
|
|
|
1
|
-
import { TransformOptions } from '
|
|
2
|
-
import { MotionValue } from 'framer-motion/dom';
|
|
1
|
+
import { MotionValue, TransformOptions } from 'framer-motion/dom';
|
|
3
2
|
import { MaybeRef } from 'vue';
|
|
4
3
|
type InputRange = number[];
|
|
5
4
|
type SingleTransformer<I, O> = (input: I) => O;
|
|
@@ -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.9.0/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.
|
|
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.9.0/external/motion-dom/dist/es/value/index.mjs";
|
|
3
|
+
import { frame } from "../external/.pnpm/motion-dom@12.9.0/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.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
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.
|
|
71
|
-
"hey-listen": "^1.0.8"
|
|
72
|
-
"motion-dom": "^12.5.0"
|
|
70
|
+
"framer-motion": "12.9.0",
|
|
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
|
-
};
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import { invariant } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
-
import { calcGeneratorDuration } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs";
|
|
4
|
-
import { isGenerator } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
|
-
import { KeyframeResolver } from "../../render/utils/KeyframesResolver.mjs";
|
|
6
|
-
import { clamp } from "../../utils/clamp.mjs";
|
|
7
|
-
import { mix } from "../../utils/mix/index.mjs";
|
|
8
|
-
import { pipe } from "../../utils/pipe.mjs";
|
|
9
|
-
import { inertia } from "../generators/inertia.mjs";
|
|
10
|
-
import { keyframes } from "../generators/keyframes.mjs";
|
|
11
|
-
import { spring } from "../generators/spring/index.mjs";
|
|
12
|
-
import { BaseAnimation } from "./BaseAnimation.mjs";
|
|
13
|
-
import { frameloopDriver } from "./drivers/driver-frameloop.mjs";
|
|
14
|
-
import { getFinalKeyframe } from "./waapi/utils/get-final-keyframe.mjs";
|
|
15
|
-
const generators = {
|
|
16
|
-
decay: inertia,
|
|
17
|
-
inertia,
|
|
18
|
-
tween: keyframes,
|
|
19
|
-
keyframes,
|
|
20
|
-
spring
|
|
21
|
-
};
|
|
22
|
-
const percentToProgress = (percent) => percent / 100;
|
|
23
|
-
class MainThreadAnimation extends BaseAnimation {
|
|
24
|
-
constructor(options) {
|
|
25
|
-
super(options);
|
|
26
|
-
this.holdTime = null;
|
|
27
|
-
this.cancelTime = null;
|
|
28
|
-
this.currentTime = 0;
|
|
29
|
-
this.playbackSpeed = 1;
|
|
30
|
-
this.pendingPlayState = "running";
|
|
31
|
-
this.startTime = null;
|
|
32
|
-
this.state = "idle";
|
|
33
|
-
this.stop = () => {
|
|
34
|
-
this.resolver.cancel();
|
|
35
|
-
this.isStopped = true;
|
|
36
|
-
if (this.state === "idle")
|
|
37
|
-
return;
|
|
38
|
-
this.teardown();
|
|
39
|
-
const { onStop } = this.options;
|
|
40
|
-
onStop && onStop();
|
|
41
|
-
};
|
|
42
|
-
const { name, motionValue, element, keyframes: keyframes2 } = this.options;
|
|
43
|
-
const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
44
|
-
const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);
|
|
45
|
-
this.resolver = new KeyframeResolver$1(keyframes2, onResolved, name, motionValue, element);
|
|
46
|
-
this.resolver.scheduleResolve();
|
|
47
|
-
}
|
|
48
|
-
flatten() {
|
|
49
|
-
super.flatten();
|
|
50
|
-
if (this._resolved) {
|
|
51
|
-
Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
initPlayback(keyframes$1) {
|
|
55
|
-
const { type = "keyframes", repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = this.options;
|
|
56
|
-
const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;
|
|
57
|
-
let mapPercentToKeyframes;
|
|
58
|
-
let mirroredGenerator;
|
|
59
|
-
if (process.env.NODE_ENV !== "production" && generatorFactory !== keyframes) {
|
|
60
|
-
invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);
|
|
61
|
-
}
|
|
62
|
-
if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
|
|
63
|
-
mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
|
|
64
|
-
keyframes$1 = [0, 100];
|
|
65
|
-
}
|
|
66
|
-
const generator = generatorFactory({ ...this.options, keyframes: keyframes$1 });
|
|
67
|
-
if (repeatType === "mirror") {
|
|
68
|
-
mirroredGenerator = generatorFactory({
|
|
69
|
-
...this.options,
|
|
70
|
-
keyframes: [...keyframes$1].reverse(),
|
|
71
|
-
velocity: -velocity
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (generator.calculatedDuration === null) {
|
|
75
|
-
generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
76
|
-
}
|
|
77
|
-
const { calculatedDuration } = generator;
|
|
78
|
-
const resolvedDuration = calculatedDuration + repeatDelay;
|
|
79
|
-
const totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;
|
|
80
|
-
return {
|
|
81
|
-
generator,
|
|
82
|
-
mirroredGenerator,
|
|
83
|
-
mapPercentToKeyframes,
|
|
84
|
-
calculatedDuration,
|
|
85
|
-
resolvedDuration,
|
|
86
|
-
totalDuration
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
onPostResolved() {
|
|
90
|
-
const { autoplay = true } = this.options;
|
|
91
|
-
this.play();
|
|
92
|
-
if (this.pendingPlayState === "paused" || !autoplay) {
|
|
93
|
-
this.pause();
|
|
94
|
-
} else {
|
|
95
|
-
this.state = this.pendingPlayState;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
tick(timestamp, sample = false) {
|
|
99
|
-
const { resolved } = this;
|
|
100
|
-
if (!resolved) {
|
|
101
|
-
const { keyframes: keyframes3 } = this.options;
|
|
102
|
-
return { done: true, value: keyframes3[keyframes3.length - 1] };
|
|
103
|
-
}
|
|
104
|
-
const { finalKeyframe, generator, mirroredGenerator, mapPercentToKeyframes, keyframes: keyframes2, calculatedDuration, totalDuration, resolvedDuration } = resolved;
|
|
105
|
-
if (this.startTime === null)
|
|
106
|
-
return generator.next(0);
|
|
107
|
-
const { delay, repeat, repeatType, repeatDelay, onUpdate } = this.options;
|
|
108
|
-
if (this.speed > 0) {
|
|
109
|
-
this.startTime = Math.min(this.startTime, timestamp);
|
|
110
|
-
} else if (this.speed < 0) {
|
|
111
|
-
this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
|
|
112
|
-
}
|
|
113
|
-
if (sample) {
|
|
114
|
-
this.currentTime = timestamp;
|
|
115
|
-
} else if (this.holdTime !== null) {
|
|
116
|
-
this.currentTime = this.holdTime;
|
|
117
|
-
} else {
|
|
118
|
-
this.currentTime = Math.round(timestamp - this.startTime) * this.speed;
|
|
119
|
-
}
|
|
120
|
-
const timeWithoutDelay = this.currentTime - delay * (this.speed >= 0 ? 1 : -1);
|
|
121
|
-
const isInDelayPhase = this.speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
|
|
122
|
-
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
123
|
-
if (this.state === "finished" && this.holdTime === null) {
|
|
124
|
-
this.currentTime = totalDuration;
|
|
125
|
-
}
|
|
126
|
-
let elapsed = this.currentTime;
|
|
127
|
-
let frameGenerator = generator;
|
|
128
|
-
if (repeat) {
|
|
129
|
-
const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;
|
|
130
|
-
let currentIteration = Math.floor(progress);
|
|
131
|
-
let iterationProgress = progress % 1;
|
|
132
|
-
if (!iterationProgress && progress >= 1) {
|
|
133
|
-
iterationProgress = 1;
|
|
134
|
-
}
|
|
135
|
-
iterationProgress === 1 && currentIteration--;
|
|
136
|
-
currentIteration = Math.min(currentIteration, repeat + 1);
|
|
137
|
-
const isOddIteration = Boolean(currentIteration % 2);
|
|
138
|
-
if (isOddIteration) {
|
|
139
|
-
if (repeatType === "reverse") {
|
|
140
|
-
iterationProgress = 1 - iterationProgress;
|
|
141
|
-
if (repeatDelay) {
|
|
142
|
-
iterationProgress -= repeatDelay / resolvedDuration;
|
|
143
|
-
}
|
|
144
|
-
} else if (repeatType === "mirror") {
|
|
145
|
-
frameGenerator = mirroredGenerator;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
149
|
-
}
|
|
150
|
-
const state = isInDelayPhase ? { done: false, value: keyframes2[0] } : frameGenerator.next(elapsed);
|
|
151
|
-
if (mapPercentToKeyframes) {
|
|
152
|
-
state.value = mapPercentToKeyframes(state.value);
|
|
153
|
-
}
|
|
154
|
-
let { done } = state;
|
|
155
|
-
if (!isInDelayPhase && calculatedDuration !== null) {
|
|
156
|
-
done = this.speed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
|
|
157
|
-
}
|
|
158
|
-
const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
|
|
159
|
-
if (isAnimationFinished && finalKeyframe !== void 0) {
|
|
160
|
-
state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe);
|
|
161
|
-
}
|
|
162
|
-
if (onUpdate) {
|
|
163
|
-
onUpdate(state.value);
|
|
164
|
-
}
|
|
165
|
-
if (isAnimationFinished) {
|
|
166
|
-
this.finish();
|
|
167
|
-
}
|
|
168
|
-
return state;
|
|
169
|
-
}
|
|
170
|
-
get duration() {
|
|
171
|
-
const { resolved } = this;
|
|
172
|
-
return resolved ? millisecondsToSeconds(resolved.calculatedDuration) : 0;
|
|
173
|
-
}
|
|
174
|
-
get time() {
|
|
175
|
-
return millisecondsToSeconds(this.currentTime);
|
|
176
|
-
}
|
|
177
|
-
set time(newTime) {
|
|
178
|
-
newTime = secondsToMilliseconds(newTime);
|
|
179
|
-
this.currentTime = newTime;
|
|
180
|
-
if (this.holdTime !== null || this.speed === 0) {
|
|
181
|
-
this.holdTime = newTime;
|
|
182
|
-
} else if (this.driver) {
|
|
183
|
-
this.startTime = this.driver.now() - newTime / this.speed;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
get speed() {
|
|
187
|
-
return this.playbackSpeed;
|
|
188
|
-
}
|
|
189
|
-
set speed(newSpeed) {
|
|
190
|
-
const hasChanged = this.playbackSpeed !== newSpeed;
|
|
191
|
-
this.playbackSpeed = newSpeed;
|
|
192
|
-
if (hasChanged) {
|
|
193
|
-
this.time = millisecondsToSeconds(this.currentTime);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
play() {
|
|
197
|
-
if (!this.resolver.isScheduled) {
|
|
198
|
-
this.resolver.resume();
|
|
199
|
-
}
|
|
200
|
-
if (!this._resolved) {
|
|
201
|
-
this.pendingPlayState = "running";
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
if (this.isStopped)
|
|
205
|
-
return;
|
|
206
|
-
const { driver = frameloopDriver, onPlay, startTime } = this.options;
|
|
207
|
-
if (!this.driver) {
|
|
208
|
-
this.driver = driver((timestamp) => this.tick(timestamp));
|
|
209
|
-
}
|
|
210
|
-
onPlay && onPlay();
|
|
211
|
-
const now = this.driver.now();
|
|
212
|
-
if (this.holdTime !== null) {
|
|
213
|
-
this.startTime = now - this.holdTime;
|
|
214
|
-
} else if (!this.startTime) {
|
|
215
|
-
this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
|
|
216
|
-
} else if (this.state === "finished") {
|
|
217
|
-
this.startTime = now;
|
|
218
|
-
}
|
|
219
|
-
if (this.state === "finished") {
|
|
220
|
-
this.updateFinishedPromise();
|
|
221
|
-
}
|
|
222
|
-
this.cancelTime = this.startTime;
|
|
223
|
-
this.holdTime = null;
|
|
224
|
-
this.state = "running";
|
|
225
|
-
this.driver.start();
|
|
226
|
-
}
|
|
227
|
-
pause() {
|
|
228
|
-
var _a;
|
|
229
|
-
if (!this._resolved) {
|
|
230
|
-
this.pendingPlayState = "paused";
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
this.state = "paused";
|
|
234
|
-
this.holdTime = (_a = this.currentTime) !== null && _a !== void 0 ? _a : 0;
|
|
235
|
-
}
|
|
236
|
-
complete() {
|
|
237
|
-
if (this.state !== "running") {
|
|
238
|
-
this.play();
|
|
239
|
-
}
|
|
240
|
-
this.pendingPlayState = this.state = "finished";
|
|
241
|
-
this.holdTime = null;
|
|
242
|
-
}
|
|
243
|
-
finish() {
|
|
244
|
-
this.teardown();
|
|
245
|
-
this.state = "finished";
|
|
246
|
-
const { onComplete } = this.options;
|
|
247
|
-
onComplete && onComplete();
|
|
248
|
-
}
|
|
249
|
-
cancel() {
|
|
250
|
-
if (this.cancelTime !== null) {
|
|
251
|
-
this.tick(this.cancelTime);
|
|
252
|
-
}
|
|
253
|
-
this.teardown();
|
|
254
|
-
this.updateFinishedPromise();
|
|
255
|
-
}
|
|
256
|
-
teardown() {
|
|
257
|
-
this.state = "idle";
|
|
258
|
-
this.stopDriver();
|
|
259
|
-
this.resolveFinishedPromise();
|
|
260
|
-
this.updateFinishedPromise();
|
|
261
|
-
this.startTime = this.cancelTime = null;
|
|
262
|
-
this.resolver.cancel();
|
|
263
|
-
}
|
|
264
|
-
stopDriver() {
|
|
265
|
-
if (!this.driver)
|
|
266
|
-
return;
|
|
267
|
-
this.driver.stop();
|
|
268
|
-
this.driver = void 0;
|
|
269
|
-
}
|
|
270
|
-
sample(time) {
|
|
271
|
-
this.startTime = 0;
|
|
272
|
-
return this.tick(time, true);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
function animateValue(options) {
|
|
276
|
-
return new MainThreadAnimation(options);
|
|
277
|
-
}
|
|
278
|
-
export {
|
|
279
|
-
MainThreadAnimation,
|
|
280
|
-
animateValue
|
|
281
|
-
};
|