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,27 +1,19 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
-
import { frame } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
3
1
|
import { createBox } from "../../projection/geometry/models.mjs";
|
|
4
2
|
import { DOMVisualElement } from "../dom/DOMVisualElement.mjs";
|
|
5
3
|
import { camelToDash } from "../dom/utils/camel-to-dash.mjs";
|
|
6
|
-
import { getDefaultValueType } from "../dom/value-types/defaults.mjs";
|
|
7
|
-
import { transformProps } from "../html/utils/keys-transform.mjs";
|
|
8
4
|
import { buildSVGAttrs } from "./utils/build-attrs.mjs";
|
|
9
5
|
import { camelCaseAttributes } from "./utils/camel-case-attrs.mjs";
|
|
10
6
|
import { isSVGTag } from "./utils/is-svg-tag.mjs";
|
|
11
|
-
import { updateSVGDimensions } from "./utils/measure.mjs";
|
|
12
7
|
import { renderSVG } from "./utils/render.mjs";
|
|
13
8
|
import { scrapeMotionValuesFromProps } from "./utils/scrape-motion-values.mjs";
|
|
9
|
+
import { transformProps } from "../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/render/utils/keys-transform.mjs";
|
|
10
|
+
import { getDefaultValueType } from "../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/value/types/maps/defaults.mjs";
|
|
14
11
|
class SVGVisualElement extends DOMVisualElement {
|
|
15
12
|
constructor() {
|
|
16
13
|
super(...arguments);
|
|
17
14
|
this.type = "svg";
|
|
18
15
|
this.isSVGTag = false;
|
|
19
16
|
this.measureInstanceViewportBox = createBox;
|
|
20
|
-
this.updateDimensions = () => {
|
|
21
|
-
if (this.current && !this.renderState.dimensions) {
|
|
22
|
-
updateSVGDimensions(this.current, this.renderState);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
17
|
}
|
|
26
18
|
getBaseTargetFromProps(props, key) {
|
|
27
19
|
return props[key];
|
|
@@ -37,11 +29,6 @@ class SVGVisualElement extends DOMVisualElement {
|
|
|
37
29
|
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
38
30
|
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
|
|
39
31
|
}
|
|
40
|
-
onBindTransform() {
|
|
41
|
-
if (this.current && !this.renderState.dimensions) {
|
|
42
|
-
frame.postRender(this.updateDimensions);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
32
|
build(renderState, latestValues, props) {
|
|
46
33
|
buildSVGAttrs(renderState, latestValues, this.isSVGTag, props.transformTemplate);
|
|
47
34
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { buildHTMLStyles } from "../../html/utils/build-styles.mjs";
|
|
2
2
|
import { buildSVGPath } from "./path.mjs";
|
|
3
|
-
import { calcSVGTransformOrigin } from "./transform-origin.mjs";
|
|
4
3
|
function buildSVGAttrs(state, {
|
|
5
4
|
attrX,
|
|
6
5
|
attrY,
|
|
7
6
|
attrScale,
|
|
8
|
-
originX,
|
|
9
|
-
originY,
|
|
10
7
|
pathLength,
|
|
11
8
|
pathSpacing = 1,
|
|
12
9
|
pathOffset = 0,
|
|
@@ -22,14 +19,18 @@ function buildSVGAttrs(state, {
|
|
|
22
19
|
}
|
|
23
20
|
state.attrs = state.style;
|
|
24
21
|
state.style = {};
|
|
25
|
-
const { attrs, style
|
|
22
|
+
const { attrs, style } = state;
|
|
26
23
|
if (attrs.transform) {
|
|
27
|
-
|
|
28
|
-
style.transform = attrs.transform;
|
|
24
|
+
style.transform = attrs.transform;
|
|
29
25
|
delete attrs.transform;
|
|
30
26
|
}
|
|
31
|
-
if (
|
|
32
|
-
style.transformOrigin =
|
|
27
|
+
if (style.transform || attrs.transformOrigin) {
|
|
28
|
+
style.transformOrigin = attrs.transformOrigin ?? "50% 50%";
|
|
29
|
+
delete attrs.transformOrigin;
|
|
30
|
+
}
|
|
31
|
+
if (style.transform) {
|
|
32
|
+
style.transformBox = "fill-box";
|
|
33
|
+
delete attrs.transformBox;
|
|
33
34
|
}
|
|
34
35
|
if (attrX !== void 0)
|
|
35
36
|
attrs.x = attrX;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isMotionValue } from "../../../value/utils/is-motion-value.mjs";
|
|
2
|
-
import { transformPropOrder } from "../../html/utils/keys-transform.mjs";
|
|
3
2
|
import { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from "../../html/utils/scrape-motion-values.mjs";
|
|
3
|
+
import { transformPropOrder } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/render/utils/keys-transform.mjs";
|
|
4
4
|
function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
5
5
|
const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
|
|
6
6
|
for (const key in props) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { addUniqueItem, removeItem } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/array.mjs";
|
|
2
|
-
import "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
3
1
|
import { compareByDepth } from "./compare-by-depth.mjs";
|
|
2
|
+
import { addUniqueItem, removeItem } from "../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/array.mjs";
|
|
4
3
|
class FlatTree {
|
|
5
4
|
constructor() {
|
|
6
5
|
this.children = [];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
-
import { warnOnce } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/warn-once.mjs";
|
|
3
|
-
import { motionValue } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/value/index.mjs";
|
|
4
1
|
import { isMotionValue } from "../../value/utils/is-motion-value.mjs";
|
|
2
|
+
import { warnOnce } from "../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/warn-once.mjs";
|
|
3
|
+
import { motionValue } from "../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/value/index.mjs";
|
|
5
4
|
function updateMotionValuesFromProps(element, next, prev) {
|
|
6
5
|
for (const key in next) {
|
|
7
6
|
const nextValue = next[key];
|
|
@@ -9,7 +8,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
9
8
|
if (isMotionValue(nextValue)) {
|
|
10
9
|
element.addValue(key, nextValue);
|
|
11
10
|
if (process.env.NODE_ENV === "development") {
|
|
12
|
-
warnOnce(nextValue.version === "12.
|
|
11
|
+
warnOnce(nextValue.version === "12.9.0", `Attempting to mix Motion versions ${nextValue.version} with 12.9.0 may not work as expected.`);
|
|
13
12
|
}
|
|
14
13
|
} else if (isMotionValue(prevValue)) {
|
|
15
14
|
element.addValue(key, motionValue(nextValue, { owner: element }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function getValueState(visualElement) {
|
|
2
2
|
const state = [{}, {}];
|
|
3
|
-
visualElement
|
|
3
|
+
visualElement == null ? void 0 : visualElement.values.forEach((value, key) => {
|
|
4
4
|
state[0][key] = value.get();
|
|
5
5
|
state[1][key] = value.getVelocity();
|
|
6
6
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { motionValue } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/value/index.mjs";
|
|
3
|
-
import { resolveFinalValueInKeyframes } from "../../utils/resolve-value.mjs";
|
|
1
|
+
import { isKeyframesTarget } from "../../animation/utils/is-keyframes-target.mjs";
|
|
4
2
|
import { resolveVariant } from "./resolve-dynamic-variants.mjs";
|
|
3
|
+
import { motionValue } from "../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/value/index.mjs";
|
|
5
4
|
function setMotionValue(visualElement, key, value) {
|
|
6
5
|
if (visualElement.hasValue(key)) {
|
|
7
6
|
visualElement.getValue(key).set(value);
|
|
@@ -9,6 +8,9 @@ function setMotionValue(visualElement, key, value) {
|
|
|
9
8
|
visualElement.addValue(key, motionValue(value));
|
|
10
9
|
}
|
|
11
10
|
}
|
|
11
|
+
function resolveFinalValueInKeyframes(v) {
|
|
12
|
+
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
|
|
13
|
+
}
|
|
12
14
|
function setTarget(visualElement, definition) {
|
|
13
15
|
const resolved = resolveVariant(visualElement, definition);
|
|
14
16
|
let { transitionEnd = {}, transition = {}, ...target } = resolved || {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../../../../../../motion-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { time } from "../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/sync-time.mjs";
|
|
1
|
+
import { time } from "../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/frameloop/sync-time.mjs";
|
|
2
|
+
import { frame, cancelFrame } from "../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
3
|
+
import { secondsToMilliseconds } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/time-conversion.mjs";
|
|
5
4
|
function delay(callback, timeout) {
|
|
6
5
|
const start = time.now();
|
|
7
6
|
const checkElapsed = ({ timestamp }) => {
|
|
@@ -11,7 +10,7 @@ function delay(callback, timeout) {
|
|
|
11
10
|
callback(elapsed - timeout);
|
|
12
11
|
}
|
|
13
12
|
};
|
|
14
|
-
frame.
|
|
13
|
+
frame.setup(checkElapsed, true);
|
|
15
14
|
return () => cancelFrame(checkElapsed);
|
|
16
15
|
}
|
|
17
16
|
function delayInSeconds(callback, timeout) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isWillChangeMotionValue } from "./is.mjs";
|
|
2
|
+
import { MotionGlobalConfig } from "../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/global-config.mjs";
|
|
3
|
+
function addValueToWillChange(visualElement, key) {
|
|
4
|
+
const willChange = visualElement.getValue("willChange");
|
|
5
|
+
if (isWillChangeMotionValue(willChange)) {
|
|
6
|
+
return willChange.add(key);
|
|
7
|
+
} else if (!willChange && MotionGlobalConfig.WillChange) {
|
|
8
|
+
const newWillChange = new MotionGlobalConfig.WillChange("auto");
|
|
9
|
+
visualElement.addValue("willChange", newWillChange);
|
|
10
|
+
newWillChange.add(key);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
addValueToWillChange
|
|
15
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { time } from "../frameloop/sync-time.mjs";
|
|
2
|
+
import { JSAnimation } from "./JSAnimation.mjs";
|
|
3
|
+
import { getFinalKeyframe } from "./keyframes/get-final.mjs";
|
|
4
|
+
import { KeyframeResolver, flushKeyframeResolvers } from "./keyframes/KeyframesResolver.mjs";
|
|
5
|
+
import { NativeAnimationExtended } from "./NativeAnimationExtended.mjs";
|
|
6
|
+
import { canAnimate } from "./utils/can-animate.mjs";
|
|
7
|
+
import { WithPromise } from "./utils/WithPromise.mjs";
|
|
8
|
+
import { supportsBrowserAnimation } from "./waapi/supports/waapi.mjs";
|
|
9
|
+
import { MotionGlobalConfig } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/global-config.mjs";
|
|
10
|
+
import { noop } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/noop.mjs";
|
|
11
|
+
const MAX_RESOLVE_DELAY = 40;
|
|
12
|
+
class AsyncMotionValueAnimation extends WithPromise {
|
|
13
|
+
constructor({ autoplay = true, delay = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", keyframes, name, motionValue, element, ...options }) {
|
|
14
|
+
var _a;
|
|
15
|
+
super();
|
|
16
|
+
this.stop = () => {
|
|
17
|
+
var _a2, _b;
|
|
18
|
+
if (this._animation) {
|
|
19
|
+
this._animation.stop();
|
|
20
|
+
(_a2 = this.stopTimeline) == null ? void 0 : _a2.call(this);
|
|
21
|
+
} else {
|
|
22
|
+
(_b = this.keyframeResolver) == null ? void 0 : _b.cancel();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
this.createdAt = time.now();
|
|
26
|
+
const optionsWithDefaults = {
|
|
27
|
+
autoplay,
|
|
28
|
+
delay,
|
|
29
|
+
type,
|
|
30
|
+
repeat,
|
|
31
|
+
repeatDelay,
|
|
32
|
+
repeatType,
|
|
33
|
+
name,
|
|
34
|
+
motionValue,
|
|
35
|
+
element,
|
|
36
|
+
...options
|
|
37
|
+
};
|
|
38
|
+
const KeyframeResolver$1 = (element == null ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
39
|
+
this.keyframeResolver = new KeyframeResolver$1(keyframes, (resolvedKeyframes, finalKeyframe, forced) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe, optionsWithDefaults, !forced), name, motionValue, element);
|
|
40
|
+
(_a = this.keyframeResolver) == null ? void 0 : _a.scheduleResolve();
|
|
41
|
+
}
|
|
42
|
+
onKeyframesResolved(keyframes, finalKeyframe, options, sync) {
|
|
43
|
+
this.keyframeResolver = void 0;
|
|
44
|
+
const { name, type, velocity, delay, isHandoff, onUpdate } = options;
|
|
45
|
+
this.resolvedAt = time.now();
|
|
46
|
+
if (!canAnimate(keyframes, name, type, velocity)) {
|
|
47
|
+
if (MotionGlobalConfig.instantAnimations || !delay) {
|
|
48
|
+
onUpdate == null ? void 0 : onUpdate(getFinalKeyframe(keyframes, options, finalKeyframe));
|
|
49
|
+
}
|
|
50
|
+
keyframes[0] = keyframes[keyframes.length - 1];
|
|
51
|
+
options.duration = 0;
|
|
52
|
+
options.repeat = 0;
|
|
53
|
+
}
|
|
54
|
+
const startTime = sync ? !this.resolvedAt ? this.createdAt : this.resolvedAt - this.createdAt > MAX_RESOLVE_DELAY ? this.resolvedAt : this.createdAt : void 0;
|
|
55
|
+
const resolvedOptions = {
|
|
56
|
+
startTime,
|
|
57
|
+
finalKeyframe,
|
|
58
|
+
...options,
|
|
59
|
+
keyframes
|
|
60
|
+
};
|
|
61
|
+
const animation = !isHandoff && supportsBrowserAnimation(resolvedOptions) ? new NativeAnimationExtended({
|
|
62
|
+
...resolvedOptions,
|
|
63
|
+
element: resolvedOptions.motionValue.owner.current
|
|
64
|
+
}) : new JSAnimation(resolvedOptions);
|
|
65
|
+
animation.finished.then(() => this.notifyFinished()).catch(noop);
|
|
66
|
+
if (this.pendingTimeline) {
|
|
67
|
+
this.stopTimeline = animation.attachTimeline(this.pendingTimeline);
|
|
68
|
+
this.pendingTimeline = void 0;
|
|
69
|
+
}
|
|
70
|
+
this._animation = animation;
|
|
71
|
+
}
|
|
72
|
+
get finished() {
|
|
73
|
+
if (!this._animation) {
|
|
74
|
+
return this._finished;
|
|
75
|
+
} else {
|
|
76
|
+
return this.animation.finished;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
then(onResolve, _onReject) {
|
|
80
|
+
return this.finished.finally(onResolve).then(() => {
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
get animation() {
|
|
84
|
+
if (!this._animation) {
|
|
85
|
+
flushKeyframeResolvers();
|
|
86
|
+
}
|
|
87
|
+
return this._animation;
|
|
88
|
+
}
|
|
89
|
+
get duration() {
|
|
90
|
+
return this.animation.duration;
|
|
91
|
+
}
|
|
92
|
+
get time() {
|
|
93
|
+
return this.animation.time;
|
|
94
|
+
}
|
|
95
|
+
set time(newTime) {
|
|
96
|
+
this.animation.time = newTime;
|
|
97
|
+
}
|
|
98
|
+
get speed() {
|
|
99
|
+
return this.animation.speed;
|
|
100
|
+
}
|
|
101
|
+
get state() {
|
|
102
|
+
return this.animation.state;
|
|
103
|
+
}
|
|
104
|
+
set speed(newSpeed) {
|
|
105
|
+
this.animation.speed = newSpeed;
|
|
106
|
+
}
|
|
107
|
+
get startTime() {
|
|
108
|
+
return this.animation.startTime;
|
|
109
|
+
}
|
|
110
|
+
attachTimeline(timeline) {
|
|
111
|
+
if (this._animation) {
|
|
112
|
+
this.stopTimeline = this.animation.attachTimeline(timeline);
|
|
113
|
+
} else {
|
|
114
|
+
this.pendingTimeline = timeline;
|
|
115
|
+
}
|
|
116
|
+
return () => this.stop();
|
|
117
|
+
}
|
|
118
|
+
play() {
|
|
119
|
+
this.animation.play();
|
|
120
|
+
}
|
|
121
|
+
pause() {
|
|
122
|
+
this.animation.pause();
|
|
123
|
+
}
|
|
124
|
+
complete() {
|
|
125
|
+
this.animation.complete();
|
|
126
|
+
}
|
|
127
|
+
cancel() {
|
|
128
|
+
this.animation.cancel();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export {
|
|
132
|
+
AsyncMotionValueAnimation
|
|
133
|
+
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
class BaseGroupPlaybackControls {
|
|
1
|
+
class GroupAnimation {
|
|
3
2
|
constructor(animations) {
|
|
4
3
|
this.stop = () => this.runAll("stop");
|
|
5
4
|
this.animations = animations.filter(Boolean);
|
|
6
5
|
}
|
|
7
6
|
get finished() {
|
|
8
|
-
return Promise.all(this.animations.map((animation) =>
|
|
7
|
+
return Promise.all(this.animations.map((animation) => animation.finished));
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
10
|
* TODO: Filter out cancelled or stopped animations before returning
|
|
@@ -18,14 +17,8 @@ class BaseGroupPlaybackControls {
|
|
|
18
17
|
this.animations[i][propName] = newValue;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
attachTimeline(timeline
|
|
22
|
-
const subscriptions = this.animations.map((animation) =>
|
|
23
|
-
if (supportsScrollTimeline() && animation.attachTimeline) {
|
|
24
|
-
return animation.attachTimeline(timeline);
|
|
25
|
-
} else if (typeof fallback === "function") {
|
|
26
|
-
return fallback(animation);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
20
|
+
attachTimeline(timeline) {
|
|
21
|
+
const subscriptions = this.animations.map((animation) => animation.attachTimeline(timeline));
|
|
29
22
|
return () => {
|
|
30
23
|
subscriptions.forEach((cancel, i) => {
|
|
31
24
|
cancel && cancel();
|
|
@@ -45,6 +38,9 @@ class BaseGroupPlaybackControls {
|
|
|
45
38
|
set speed(speed) {
|
|
46
39
|
this.setAll("speed", speed);
|
|
47
40
|
}
|
|
41
|
+
get state() {
|
|
42
|
+
return this.getAll("state");
|
|
43
|
+
}
|
|
48
44
|
get startTime() {
|
|
49
45
|
return this.getAll("startTime");
|
|
50
46
|
}
|
|
@@ -58,9 +54,6 @@ class BaseGroupPlaybackControls {
|
|
|
58
54
|
runAll(methodName) {
|
|
59
55
|
this.animations.forEach((controls) => controls[methodName]());
|
|
60
56
|
}
|
|
61
|
-
flatten() {
|
|
62
|
-
this.runAll("flatten");
|
|
63
|
-
}
|
|
64
57
|
play() {
|
|
65
58
|
this.runAll("play");
|
|
66
59
|
}
|
|
@@ -75,5 +68,5 @@ class BaseGroupPlaybackControls {
|
|
|
75
68
|
}
|
|
76
69
|
}
|
|
77
70
|
export {
|
|
78
|
-
|
|
71
|
+
GroupAnimation
|
|
79
72
|
};
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import { time } from "../frameloop/sync-time.mjs";
|
|
2
|
+
import { activeAnimations } from "../stats/animation-count.mjs";
|
|
3
|
+
import { mix } from "../utils/mix/index.mjs";
|
|
4
|
+
import { frameloopDriver } from "./drivers/driver-frameloop.mjs";
|
|
5
|
+
import { inertia } from "./generators/inertia.mjs";
|
|
6
|
+
import { keyframes } from "./generators/keyframes.mjs";
|
|
7
|
+
import { calcGeneratorDuration } from "./generators/utils/calc-duration.mjs";
|
|
8
|
+
import { getFinalKeyframe } from "./keyframes/get-final.mjs";
|
|
9
|
+
import { replaceTransitionType } from "./utils/replace-transition-type.mjs";
|
|
10
|
+
import { WithPromise } from "./utils/WithPromise.mjs";
|
|
11
|
+
import { invariant } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/errors.mjs";
|
|
12
|
+
import { pipe } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/pipe.mjs";
|
|
13
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/time-conversion.mjs";
|
|
14
|
+
import { clamp } from "../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/clamp.mjs";
|
|
15
|
+
const percentToProgress = (percent) => percent / 100;
|
|
16
|
+
class JSAnimation extends WithPromise {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
super();
|
|
19
|
+
this.state = "idle";
|
|
20
|
+
this.startTime = null;
|
|
21
|
+
this.isStopped = false;
|
|
22
|
+
this.currentTime = 0;
|
|
23
|
+
this.holdTime = null;
|
|
24
|
+
this.playbackSpeed = 1;
|
|
25
|
+
this.stop = () => {
|
|
26
|
+
const { motionValue } = this.options;
|
|
27
|
+
if (motionValue && motionValue.updatedAt !== time.now()) {
|
|
28
|
+
this.tick(time.now());
|
|
29
|
+
}
|
|
30
|
+
this.isStopped = true;
|
|
31
|
+
if (this.state === "idle")
|
|
32
|
+
return;
|
|
33
|
+
this.teardown();
|
|
34
|
+
const { onStop } = this.options;
|
|
35
|
+
onStop && onStop();
|
|
36
|
+
};
|
|
37
|
+
activeAnimations.mainThread++;
|
|
38
|
+
this.options = options;
|
|
39
|
+
this.initAnimation();
|
|
40
|
+
this.play();
|
|
41
|
+
if (options.autoplay === false)
|
|
42
|
+
this.pause();
|
|
43
|
+
}
|
|
44
|
+
initAnimation() {
|
|
45
|
+
const { options } = this;
|
|
46
|
+
replaceTransitionType(options);
|
|
47
|
+
const { type = keyframes, repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = options;
|
|
48
|
+
let { keyframes: keyframes$1 } = options;
|
|
49
|
+
const generatorFactory = type || keyframes;
|
|
50
|
+
if (process.env.NODE_ENV !== "production" && generatorFactory !== keyframes) {
|
|
51
|
+
invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);
|
|
52
|
+
}
|
|
53
|
+
if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
|
|
54
|
+
this.mixKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
|
|
55
|
+
keyframes$1 = [0, 100];
|
|
56
|
+
}
|
|
57
|
+
const generator = generatorFactory({ ...options, keyframes: keyframes$1 });
|
|
58
|
+
if (repeatType === "mirror") {
|
|
59
|
+
this.mirroredGenerator = generatorFactory({
|
|
60
|
+
...options,
|
|
61
|
+
keyframes: [...keyframes$1].reverse(),
|
|
62
|
+
velocity: -velocity
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (generator.calculatedDuration === null) {
|
|
66
|
+
generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
67
|
+
}
|
|
68
|
+
const { calculatedDuration } = generator;
|
|
69
|
+
this.calculatedDuration = calculatedDuration;
|
|
70
|
+
this.resolvedDuration = calculatedDuration + repeatDelay;
|
|
71
|
+
this.totalDuration = this.resolvedDuration * (repeat + 1) - repeatDelay;
|
|
72
|
+
this.generator = generator;
|
|
73
|
+
}
|
|
74
|
+
updateTime(timestamp) {
|
|
75
|
+
const animationTime = Math.round(timestamp - this.startTime) * this.playbackSpeed;
|
|
76
|
+
if (this.holdTime !== null) {
|
|
77
|
+
this.currentTime = this.holdTime;
|
|
78
|
+
} else {
|
|
79
|
+
this.currentTime = animationTime;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
tick(timestamp, sample = false) {
|
|
83
|
+
const { generator, totalDuration, mixKeyframes, mirroredGenerator, resolvedDuration, calculatedDuration } = this;
|
|
84
|
+
if (this.startTime === null)
|
|
85
|
+
return generator.next(0);
|
|
86
|
+
const { delay = 0, keyframes: keyframes2, repeat, repeatType, repeatDelay, type, onUpdate, finalKeyframe } = this.options;
|
|
87
|
+
if (this.speed > 0) {
|
|
88
|
+
this.startTime = Math.min(this.startTime, timestamp);
|
|
89
|
+
} else if (this.speed < 0) {
|
|
90
|
+
this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
|
|
91
|
+
}
|
|
92
|
+
if (sample) {
|
|
93
|
+
this.currentTime = timestamp;
|
|
94
|
+
} else {
|
|
95
|
+
this.updateTime(timestamp);
|
|
96
|
+
}
|
|
97
|
+
const timeWithoutDelay = this.currentTime - delay * (this.playbackSpeed >= 0 ? 1 : -1);
|
|
98
|
+
const isInDelayPhase = this.playbackSpeed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
|
|
99
|
+
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
100
|
+
if (this.state === "finished" && this.holdTime === null) {
|
|
101
|
+
this.currentTime = totalDuration;
|
|
102
|
+
}
|
|
103
|
+
let elapsed = this.currentTime;
|
|
104
|
+
let frameGenerator = generator;
|
|
105
|
+
if (repeat) {
|
|
106
|
+
const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;
|
|
107
|
+
let currentIteration = Math.floor(progress);
|
|
108
|
+
let iterationProgress = progress % 1;
|
|
109
|
+
if (!iterationProgress && progress >= 1) {
|
|
110
|
+
iterationProgress = 1;
|
|
111
|
+
}
|
|
112
|
+
iterationProgress === 1 && currentIteration--;
|
|
113
|
+
currentIteration = Math.min(currentIteration, repeat + 1);
|
|
114
|
+
const isOddIteration = Boolean(currentIteration % 2);
|
|
115
|
+
if (isOddIteration) {
|
|
116
|
+
if (repeatType === "reverse") {
|
|
117
|
+
iterationProgress = 1 - iterationProgress;
|
|
118
|
+
if (repeatDelay) {
|
|
119
|
+
iterationProgress -= repeatDelay / resolvedDuration;
|
|
120
|
+
}
|
|
121
|
+
} else if (repeatType === "mirror") {
|
|
122
|
+
frameGenerator = mirroredGenerator;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
126
|
+
}
|
|
127
|
+
const state = isInDelayPhase ? { done: false, value: keyframes2[0] } : frameGenerator.next(elapsed);
|
|
128
|
+
if (mixKeyframes) {
|
|
129
|
+
state.value = mixKeyframes(state.value);
|
|
130
|
+
}
|
|
131
|
+
let { done } = state;
|
|
132
|
+
if (!isInDelayPhase && calculatedDuration !== null) {
|
|
133
|
+
done = this.playbackSpeed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
|
|
134
|
+
}
|
|
135
|
+
const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
|
|
136
|
+
if (isAnimationFinished && type !== inertia) {
|
|
137
|
+
state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe, this.speed);
|
|
138
|
+
}
|
|
139
|
+
if (onUpdate) {
|
|
140
|
+
onUpdate(state.value);
|
|
141
|
+
}
|
|
142
|
+
if (isAnimationFinished) {
|
|
143
|
+
this.finish();
|
|
144
|
+
}
|
|
145
|
+
return state;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
149
|
+
* resolves when the animation finishes at all but in a future update could/should
|
|
150
|
+
* reject if its cancels.
|
|
151
|
+
*/
|
|
152
|
+
then(resolve, reject) {
|
|
153
|
+
return this.finished.then(resolve, reject);
|
|
154
|
+
}
|
|
155
|
+
get duration() {
|
|
156
|
+
return millisecondsToSeconds(this.calculatedDuration);
|
|
157
|
+
}
|
|
158
|
+
get time() {
|
|
159
|
+
return millisecondsToSeconds(this.currentTime);
|
|
160
|
+
}
|
|
161
|
+
set time(newTime) {
|
|
162
|
+
newTime = secondsToMilliseconds(newTime);
|
|
163
|
+
this.currentTime = newTime;
|
|
164
|
+
if (this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0) {
|
|
165
|
+
this.holdTime = newTime;
|
|
166
|
+
} else if (this.driver) {
|
|
167
|
+
this.startTime = this.driver.now() - newTime / this.playbackSpeed;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
get speed() {
|
|
171
|
+
return this.playbackSpeed;
|
|
172
|
+
}
|
|
173
|
+
set speed(newSpeed) {
|
|
174
|
+
this.updateTime(time.now());
|
|
175
|
+
const hasChanged = this.playbackSpeed !== newSpeed;
|
|
176
|
+
this.playbackSpeed = newSpeed;
|
|
177
|
+
if (hasChanged) {
|
|
178
|
+
this.time = millisecondsToSeconds(this.currentTime);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
play() {
|
|
182
|
+
if (this.isStopped)
|
|
183
|
+
return;
|
|
184
|
+
const { driver = frameloopDriver, onPlay, startTime } = this.options;
|
|
185
|
+
if (!this.driver) {
|
|
186
|
+
this.driver = driver((timestamp) => this.tick(timestamp));
|
|
187
|
+
}
|
|
188
|
+
onPlay && onPlay();
|
|
189
|
+
const now = this.driver.now();
|
|
190
|
+
if (this.holdTime !== null) {
|
|
191
|
+
this.startTime = now - this.holdTime;
|
|
192
|
+
} else if (this.state === "finished") {
|
|
193
|
+
this.updateFinished();
|
|
194
|
+
this.startTime = now;
|
|
195
|
+
} else if (!this.startTime) {
|
|
196
|
+
this.startTime = startTime ?? now;
|
|
197
|
+
}
|
|
198
|
+
if (this.state === "finished" && this.speed < 0) {
|
|
199
|
+
this.startTime += this.calculatedDuration;
|
|
200
|
+
}
|
|
201
|
+
this.holdTime = null;
|
|
202
|
+
this.state = "running";
|
|
203
|
+
this.driver.start();
|
|
204
|
+
}
|
|
205
|
+
pause() {
|
|
206
|
+
this.state = "paused";
|
|
207
|
+
this.updateTime(time.now());
|
|
208
|
+
this.holdTime = this.currentTime;
|
|
209
|
+
}
|
|
210
|
+
complete() {
|
|
211
|
+
if (this.state !== "running") {
|
|
212
|
+
this.play();
|
|
213
|
+
}
|
|
214
|
+
this.state = "finished";
|
|
215
|
+
this.holdTime = null;
|
|
216
|
+
}
|
|
217
|
+
finish() {
|
|
218
|
+
this.teardown();
|
|
219
|
+
this.state = "finished";
|
|
220
|
+
const { onComplete } = this.options;
|
|
221
|
+
onComplete && onComplete();
|
|
222
|
+
}
|
|
223
|
+
cancel() {
|
|
224
|
+
this.holdTime = null;
|
|
225
|
+
this.startTime = 0;
|
|
226
|
+
this.tick(0);
|
|
227
|
+
this.teardown();
|
|
228
|
+
}
|
|
229
|
+
teardown() {
|
|
230
|
+
this.notifyFinished();
|
|
231
|
+
this.state = "idle";
|
|
232
|
+
this.stopDriver();
|
|
233
|
+
this.startTime = this.holdTime = null;
|
|
234
|
+
activeAnimations.mainThread--;
|
|
235
|
+
}
|
|
236
|
+
stopDriver() {
|
|
237
|
+
if (!this.driver)
|
|
238
|
+
return;
|
|
239
|
+
this.driver.stop();
|
|
240
|
+
this.driver = void 0;
|
|
241
|
+
}
|
|
242
|
+
sample(sampleTime) {
|
|
243
|
+
this.startTime = 0;
|
|
244
|
+
return this.tick(sampleTime, true);
|
|
245
|
+
}
|
|
246
|
+
attachTimeline(timeline) {
|
|
247
|
+
if (this.options.allowFlatten) {
|
|
248
|
+
this.options.type = "keyframes";
|
|
249
|
+
this.options.ease = "linear";
|
|
250
|
+
this.initAnimation();
|
|
251
|
+
}
|
|
252
|
+
return timeline.observe(this);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function animateValue(options) {
|
|
256
|
+
return new JSAnimation(options);
|
|
257
|
+
}
|
|
258
|
+
export {
|
|
259
|
+
JSAnimation,
|
|
260
|
+
animateValue
|
|
261
|
+
};
|