motion-v 1.0.0-beta.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +3089 -3584
- 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 +2 -1
- 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 +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/index.mjs +3 -2
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/sequence.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/single-value.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +247 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +102 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +281 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation → framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators}/drivers/driver-frameloop.mjs +3 -2
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation → framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators}/utils/can-animate.mjs +3 -3
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +108 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +32 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +14 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/index.mjs +22 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs +10 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/supports/partial-keyframes.mjs → framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs} +2 -1
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +6 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/generators/keyframes.mjs +5 -5
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/generators/spring/find.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/generators/spring/index.mjs +6 -15
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/generators/utils/velocity.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/interfaces/motion-value.mjs +24 -16
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +6 -8
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/create.mjs +10 -10
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/edit.mjs +4 -3
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/default-transitions.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/animation}/utils/is-none.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/stagger.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/cubic-bezier.mjs +2 -1
- package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/steps.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/utils/get-easing-for-segment.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/utils/map.mjs +4 -7
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/animation/mix-values.mjs +14 -8
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-apply.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-calc.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/delta-remove.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/create-projection-node.mjs +25 -48
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/shared/stack.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +2 -2
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/scale-correction.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/styles/transform.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/VisualElement.mjs +19 -15
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom}/DOMKeyframesResolver.mjs +9 -9
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/handle-element.mjs +7 -6
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/scroll/index.mjs +70 -0
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/info.mjs +3 -2
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom}/scroll/observe.mjs +3 -2
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/track.mjs +4 -3
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom}/utils/css-variables-conversion.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom}/utils/unit-conversion.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/utils → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types}/animatable-none.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/maps → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types}/defaults.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/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/find.mjs +9 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/maps/number.mjs → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/number-browser.mjs} +4 -13
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/number.mjs +18 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/maps → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types}/transform.mjs +2 -2
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/int.mjs → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/type-int.mjs} +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/viewport/index.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +3 -3
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/build-styles.mjs +4 -4
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/build-transform.mjs +3 -3
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/render → framer-motion@12.5.0/external/framer-motion/dist/es/render/html}/utils/keys-transform.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/render/html}/utils/make-none-animatable.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +15 -2
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +8 -9
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/render/svg/utils/measure.mjs +15 -0
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/path.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.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/external/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +12 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/render/utils}/KeyframesResolver.mjs +28 -26
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/flat-tree.mjs +2 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/motion-values.mjs +4 -3
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/resolve-variants.mjs +1 -1
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/setters.mjs +3 -5
- package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/delay.mjs +5 -4
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/interpolate.mjs +6 -7
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/mix/color.mjs +4 -4
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/mix/complex.mjs +8 -7
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/offsets/fill.mjs +3 -2
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/utils/resolve-value.mjs +11 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/transform.mjs +8 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/color/rgba.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/complex/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/numbers/index.mjs +1 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/numbers/units.mjs +3 -3
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +10 -0
- package/dist/es/external/.pnpm/framer-motion@12.5.0/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +9 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/GroupAnimation.mjs → motion-dom@12.5.0/external/motion-dom/dist/es/animation/controls/BaseGroup.mjs} +15 -8
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/controls/Group.mjs +9 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs +2 -1
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +6 -0
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +6 -0
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +81 -0
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs +7 -0
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs +37 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs +3 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/frameloop/batcher.mjs +4 -6
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/frameloop/frame.mjs +2 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/frameloop/order.mjs +0 -4
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/frameloop/sync-time.mjs +2 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/drag/state/is-active.mjs +1 -1
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/gestures/press/index.mjs +74 -0
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/gestures/utils/capture-pointer.mjs +12 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/utils/resolve-elements.mjs +2 -1
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/utils/supports/flags.mjs +6 -0
- package/dist/es/external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/utils/supports/memo.mjs +13 -0
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +2 -1
- package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/value/index.mjs +10 -12
- package/dist/es/external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/array.mjs +13 -0
- package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/errors.mjs +3 -4
- package/dist/es/external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/global-config.mjs +7 -0
- package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/warn-once.mjs +0 -6
- package/dist/es/features/animation/animation.mjs +4 -3
- package/dist/es/features/gestures/drag/VisualElementDragControls.mjs +3 -2
- package/dist/es/features/gestures/drag/index.mjs +2 -1
- package/dist/es/features/gestures/focus/index.mjs +1 -1
- package/dist/es/features/gestures/hover/index.mjs +3 -2
- package/dist/es/features/gestures/in-view/index.mjs +3 -2
- package/dist/es/features/gestures/pan/PanSession.mjs +5 -4
- package/dist/es/features/gestures/pan/index.mjs +3 -2
- package/dist/es/features/gestures/press/index.mjs +3 -2
- 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 +36 -243
- package/dist/es/state/animate-variants-children.d.ts +15 -0
- package/dist/es/state/create-visual-element.mjs +2 -2
- package/dist/es/state/motion-state.mjs +6 -2
- package/dist/es/state/utils.d.ts +2 -2
- package/dist/es/types/index.d.ts +1 -0
- package/dist/es/types/transform.d.ts +23 -0
- package/dist/es/utils/index.d.ts +1 -0
- package/dist/es/utils/time-conversion.mjs +8 -0
- package/dist/es/utils/use-animation-frame.mjs +2 -1
- package/dist/es/utils/use-in-view.mjs +1 -1
- package/dist/es/value/use-combine-values.mjs +3 -2
- package/dist/es/value/use-computed.mjs +2 -1
- package/dist/es/value/use-scroll.d.ts +4 -4
- package/dist/es/value/use-scroll.mjs +3 -2
- package/dist/es/value/use-spring.mjs +7 -6
- package/dist/es/value/use-time.d.ts +1 -1
- package/dist/es/value/use-time.mjs +2 -1
- package/dist/es/value/use-transform.d.ts +2 -1
- package/dist/es/value/use-transform.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +3 -2
- package/package.json +4 -3
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +0 -73
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +0 -13
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/attach-animation.mjs +0 -17
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/attach-function.mjs +0 -18
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/index.mjs +0 -9
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/render/dom/scroll/utils/get-timeline.mjs +0 -27
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +0 -15
- package/dist/es/external/.pnpm/framer-motion@12.9.0/external/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -7
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs +0 -133
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs +0 -10
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/JSAnimation.mjs +0 -261
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/NativeAnimation.mjs +0 -150
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/NativeAnimationExtended.mjs +0 -44
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/NativeAnimationWrapper.mjs +0 -14
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes/get-final.mjs +0 -10
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs +0 -11
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs +0 -8
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/WithPromise.mjs +0 -29
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/active-animations.mjs +0 -11
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs +0 -6
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/replace-transition-type.mjs +0 -18
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs +0 -4
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/is-supported.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs +0 -21
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/easing/supported.mjs +0 -15
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs +0 -36
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/supports/waapi.mjs +0 -26
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs +0 -14
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/utils/px-values.mjs +0 -40
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs +0 -19
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/effects/style-effect.mjs +0 -30
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/frameloop/index-legacy.mjs +0 -11
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/gestures/drag/state/set-active.mjs +0 -25
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/gestures/press/index.mjs +0 -53
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/render/dom/is-css-var.mjs +0 -4
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/render/dom/style-computed.mjs +0 -8
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/render/dom/style-set.mjs +0 -7
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/stats/animation-count.mjs +0 -8
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/stats/index.mjs +0 -114
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/utils/supports/flags.mjs +0 -4
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/utils/supports/memo.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/map-value.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/subscribe-value.mjs +0 -13
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/transform-value.mjs +0 -14
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/value/types/utils/find.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/index.mjs +0 -65
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/queue.mjs +0 -45
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/start.mjs +0 -115
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/choose-layer-type.mjs +0 -12
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/css.mjs +0 -35
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/get-layer-name.mjs +0 -9
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/get-view-animations.mjs +0 -13
- package/dist/es/external/.pnpm/motion-dom@12.9.0/external/motion-dom/dist/es/view/utils/has-target.mjs +0 -6
- package/dist/es/external/.pnpm/motion-utils@12.8.3/external/motion-utils/dist/es/array.mjs +0 -23
- package/dist/es/external/.pnpm/motion-utils@12.8.3/external/motion-utils/dist/es/global-config.mjs +0 -4
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/waapi → framer-motion@12.5.0/external/framer-motion/dist/es/animation/animators}/utils/accelerated-values.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/generators/inertia.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/generators/spring/defaults.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/animation/utils/is-animatable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/animation/utils/is-transition-defined.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/anticipate.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/back.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/circ.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/ease.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/modifiers/mirror.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/modifiers/reverse.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils → framer-motion@12.5.0/external/framer-motion}/dist/es/easing/utils/is-easing-array.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/events/add-dom-event.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/motion/features/definitions.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/copy.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/models.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/geometry/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/node/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/projection/utils/measure.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/resize/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom}/utils/is-css-variable.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/utils → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types}/get-as-type.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types}/test.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/auto.mjs → framer-motion@12.5.0/external/framer-motion/dist/es/render/dom/value-types/type-auto.mjs} +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/render → framer-motion@12.5.0/external/framer-motion/dist/es/render/html}/utils/keys-position.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/render/dom → framer-motion@12.5.0/external/framer-motion/dist/es/render/html/utils}/parse-transform.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/html/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/object/ObjectVisualElement.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/store.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/svg/utils/render.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/render/utils/variant-props.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils/dist/es → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/clamp.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/distance.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/value/types/color → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/hsla-to-rgba.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/is-browser.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils/dist/es → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/is-numerical-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils/dist/es → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/is-zero-value-string.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/mix/immediate.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/mix/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/mix/number.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/utils/mix/visibility.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/offsets/default.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/offsets/time.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils/dist/es → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/pipe.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils/dist/es → framer-motion@12.5.0/external/framer-motion/dist/es/utils}/wrap.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/color/hex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/color/hsla.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/color/index.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/color/utils.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/complex/filter.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/utils/color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/utils/float-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/utils/is-nullish.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/utils/sanitize.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0/external/motion-dom → framer-motion@12.5.0/external/framer-motion}/dist/es/value/types/utils/single-color-regex.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/use-will-change/is.mjs +0 -0
- /package/dist/es/external/.pnpm/{framer-motion@12.9.0 → framer-motion@12.5.0}/external/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/frameloop/microtask.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/frameloop/render-step.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/hover.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/press/utils/state.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/gestures/utils/setup.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/stats/buffer.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3/external/motion-utils/dist/es/easing → motion-dom@12.5.0/external/motion-dom/dist/es}/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-dom@12.9.0 → motion-dom@12.5.0}/external/motion-dom/dist/es/utils/supports/linear-easing.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/memo.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/noop.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/progress.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/subscription-manager.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/time-conversion.mjs +0 -0
- /package/dist/es/external/.pnpm/{motion-utils@12.8.3 → motion-utils@12.5.0}/external/motion-utils/dist/es/velocity-per-second.mjs +0 -0
|
@@ -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/motion
|
|
4
|
+
import { transform } from "../external/.pnpm/framer-motion@12.5.0/external/framer-motion/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,6 +1,7 @@
|
|
|
1
1
|
import { useMotionValueEvent } from "./use-motion-value-event.mjs";
|
|
2
|
-
import { motionValue } from "../external/.pnpm/motion-dom@12.
|
|
3
|
-
import
|
|
2
|
+
import { motionValue } from "../external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/value/index.mjs";
|
|
3
|
+
import "../external/.pnpm/motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
4
|
+
import { frame } from "../external/.pnpm/motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
4
5
|
function useVelocity(value) {
|
|
5
6
|
const velocity = motionValue(value.getVelocity());
|
|
6
7
|
const updateVelocity = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-v",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,8 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@vueuse/core": "^10.0.0",
|
|
70
|
-
"framer-motion": "12.
|
|
71
|
-
"hey-listen": "^1.0.8"
|
|
70
|
+
"framer-motion": "12.5.0",
|
|
71
|
+
"hey-listen": "^1.0.8",
|
|
72
|
+
"motion-dom": "^12.5.0"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
75
|
"vue": "3.4.38"
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { resolveElements } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/utils/resolve-elements.mjs";
|
|
2
|
-
import { invariant } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/errors.mjs";
|
|
3
|
-
import { getValueTransition } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs";
|
|
4
|
-
import { getAnimationMap, animationMapKey } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/animation/utils/active-animations.mjs";
|
|
5
|
-
import { getComputedStyle } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/render/dom/style-computed.mjs";
|
|
6
|
-
import { fillWildcards } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs";
|
|
7
|
-
import { applyPxDefaults } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs";
|
|
8
|
-
import { NativeAnimation } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/animation/NativeAnimation.mjs";
|
|
9
|
-
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/time-conversion.mjs";
|
|
10
|
-
function animateElements(elementOrSelector, keyframes, options, scope) {
|
|
11
|
-
const elements = resolveElements(elementOrSelector, scope);
|
|
12
|
-
const numElements = elements.length;
|
|
13
|
-
invariant(Boolean(numElements), "No valid element provided.");
|
|
14
|
-
const animationDefinitions = [];
|
|
15
|
-
for (let i = 0; i < numElements; i++) {
|
|
16
|
-
const element = elements[i];
|
|
17
|
-
const elementTransition = { ...options };
|
|
18
|
-
if (typeof elementTransition.delay === "function") {
|
|
19
|
-
elementTransition.delay = elementTransition.delay(i, numElements);
|
|
20
|
-
}
|
|
21
|
-
for (const valueName in keyframes) {
|
|
22
|
-
let valueKeyframes = keyframes[valueName];
|
|
23
|
-
if (!Array.isArray(valueKeyframes)) {
|
|
24
|
-
valueKeyframes = [valueKeyframes];
|
|
25
|
-
}
|
|
26
|
-
const valueOptions = {
|
|
27
|
-
...getValueTransition(elementTransition, valueName)
|
|
28
|
-
};
|
|
29
|
-
valueOptions.duration && (valueOptions.duration = secondsToMilliseconds(valueOptions.duration));
|
|
30
|
-
valueOptions.delay && (valueOptions.delay = secondsToMilliseconds(valueOptions.delay));
|
|
31
|
-
const map = getAnimationMap(element);
|
|
32
|
-
const key = animationMapKey(valueName, valueOptions.pseudoElement || "");
|
|
33
|
-
const currentAnimation = map.get(key);
|
|
34
|
-
currentAnimation && currentAnimation.stop();
|
|
35
|
-
animationDefinitions.push({
|
|
36
|
-
map,
|
|
37
|
-
key,
|
|
38
|
-
unresolvedKeyframes: valueKeyframes,
|
|
39
|
-
options: {
|
|
40
|
-
...valueOptions,
|
|
41
|
-
element,
|
|
42
|
-
name: valueName,
|
|
43
|
-
allowFlatten: !elementTransition.type && !elementTransition.ease
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
for (let i = 0; i < animationDefinitions.length; i++) {
|
|
49
|
-
const { unresolvedKeyframes, options: animationOptions } = animationDefinitions[i];
|
|
50
|
-
const { element, name, pseudoElement } = animationOptions;
|
|
51
|
-
if (!pseudoElement && unresolvedKeyframes[0] === null) {
|
|
52
|
-
unresolvedKeyframes[0] = getComputedStyle(element, name);
|
|
53
|
-
}
|
|
54
|
-
fillWildcards(unresolvedKeyframes);
|
|
55
|
-
applyPxDefaults(unresolvedKeyframes, name);
|
|
56
|
-
if (!pseudoElement && unresolvedKeyframes.length < 2) {
|
|
57
|
-
unresolvedKeyframes.unshift(getComputedStyle(element, name));
|
|
58
|
-
}
|
|
59
|
-
animationOptions.keyframes = unresolvedKeyframes;
|
|
60
|
-
}
|
|
61
|
-
const animations = [];
|
|
62
|
-
for (let i = 0; i < animationDefinitions.length; i++) {
|
|
63
|
-
const { map, key, options: animationOptions } = animationDefinitions[i];
|
|
64
|
-
const animation = new NativeAnimation(animationOptions);
|
|
65
|
-
map.set(key, animation);
|
|
66
|
-
animation.finished.finally(() => map.delete(key));
|
|
67
|
-
animations.push(animation);
|
|
68
|
-
}
|
|
69
|
-
return animations;
|
|
70
|
-
}
|
|
71
|
-
export {
|
|
72
|
-
animateElements
|
|
73
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { animateElements } from "./animate-elements.mjs";
|
|
2
|
-
import { GroupAnimationWithThen } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs";
|
|
3
|
-
const createScopedWaapiAnimate = (scope) => {
|
|
4
|
-
function scopedAnimate(elementOrSelector, keyframes, options) {
|
|
5
|
-
return new GroupAnimationWithThen(animateElements(elementOrSelector, keyframes, options, scope));
|
|
6
|
-
}
|
|
7
|
-
return scopedAnimate;
|
|
8
|
-
};
|
|
9
|
-
const animateMini = /* @__PURE__ */ createScopedWaapiAnimate();
|
|
10
|
-
export {
|
|
11
|
-
animateMini,
|
|
12
|
-
createScopedWaapiAnimate
|
|
13
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getTimeline } from "./utils/get-timeline.mjs";
|
|
2
|
-
import { observeTimeline } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/scroll/observe.mjs";
|
|
3
|
-
function attachToAnimation(animation, options) {
|
|
4
|
-
const timeline = getTimeline(options);
|
|
5
|
-
return animation.attachTimeline({
|
|
6
|
-
timeline: options.target ? void 0 : timeline,
|
|
7
|
-
observe: (valueAnimation) => {
|
|
8
|
-
valueAnimation.pause();
|
|
9
|
-
return observeTimeline((progress) => {
|
|
10
|
-
valueAnimation.time = valueAnimation.duration * progress;
|
|
11
|
-
}, timeline);
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
attachToAnimation
|
|
17
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { scrollInfo } from "./track.mjs";
|
|
2
|
-
import { getTimeline } from "./utils/get-timeline.mjs";
|
|
3
|
-
import { observeTimeline } from "../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/scroll/observe.mjs";
|
|
4
|
-
function isOnScrollWithInfo(onScroll) {
|
|
5
|
-
return onScroll.length === 2;
|
|
6
|
-
}
|
|
7
|
-
function attachToFunction(onScroll, options) {
|
|
8
|
-
if (isOnScrollWithInfo(onScroll)) {
|
|
9
|
-
return scrollInfo((info) => {
|
|
10
|
-
onScroll(info[options.axis].progress, info);
|
|
11
|
-
}, options);
|
|
12
|
-
} else {
|
|
13
|
-
return observeTimeline(onScroll, getTimeline(options));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
attachToFunction
|
|
18
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { attachToAnimation } from "./attach-animation.mjs";
|
|
2
|
-
import { attachToFunction } from "./attach-function.mjs";
|
|
3
|
-
function scroll(onScroll, { axis = "y", container = document.documentElement, ...options } = {}) {
|
|
4
|
-
const optionsWithDefaults = { axis, container, ...options };
|
|
5
|
-
return typeof onScroll === "function" ? attachToFunction(onScroll, optionsWithDefaults) : attachToAnimation(onScroll, optionsWithDefaults);
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
scroll
|
|
9
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { scrollInfo } from "../track.mjs";
|
|
2
|
-
import { supportsScrollTimeline } from "../../../../../../../../../motion-dom@12.9.0/external/motion-dom/dist/es/utils/supports/scroll-timeline.mjs";
|
|
3
|
-
const timelineCache = /* @__PURE__ */ new Map();
|
|
4
|
-
function scrollTimelineFallback(options) {
|
|
5
|
-
const currentTime = { value: 0 };
|
|
6
|
-
const cancel = scrollInfo((info) => {
|
|
7
|
-
currentTime.value = info[options.axis].progress * 100;
|
|
8
|
-
}, options);
|
|
9
|
-
return { currentTime, cancel };
|
|
10
|
-
}
|
|
11
|
-
function getTimeline({ source, container, ...options }) {
|
|
12
|
-
const { axis } = options;
|
|
13
|
-
if (source)
|
|
14
|
-
container = source;
|
|
15
|
-
const containerCache = timelineCache.get(container) ?? /* @__PURE__ */ new Map();
|
|
16
|
-
timelineCache.set(container, containerCache);
|
|
17
|
-
const targetKey = options.target ?? "self";
|
|
18
|
-
const targetCache = containerCache.get(targetKey) ?? {};
|
|
19
|
-
const axisKey = axis + (options.offset ?? []).join(",");
|
|
20
|
-
if (!targetCache[axisKey]) {
|
|
21
|
-
targetCache[axisKey] = !options.target && supportsScrollTimeline() ? new ScrollTimeline({ source: container, axis }) : scrollTimelineFallback({ container, ...options });
|
|
22
|
-
}
|
|
23
|
-
return targetCache[axis];
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
getTimeline
|
|
27
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
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,261 +0,0 @@
|
|
|
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
|
-
};
|