motion-v 1.0.0-beta.3 → 1.0.0-beta.4
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
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { invariant } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { calcGeneratorDuration } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs";
|
|
4
|
+
import { isGenerator } from "../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
|
+
import { KeyframeResolver } from "../../render/utils/KeyframesResolver.mjs";
|
|
6
|
+
import { clamp } from "../../utils/clamp.mjs";
|
|
7
|
+
import { mix } from "../../utils/mix/index.mjs";
|
|
8
|
+
import { pipe } from "../../utils/pipe.mjs";
|
|
9
|
+
import { inertia } from "../generators/inertia.mjs";
|
|
10
|
+
import { keyframes } from "../generators/keyframes.mjs";
|
|
11
|
+
import { spring } from "../generators/spring/index.mjs";
|
|
12
|
+
import { BaseAnimation } from "./BaseAnimation.mjs";
|
|
13
|
+
import { frameloopDriver } from "./drivers/driver-frameloop.mjs";
|
|
14
|
+
import { getFinalKeyframe } from "./waapi/utils/get-final-keyframe.mjs";
|
|
15
|
+
const generators = {
|
|
16
|
+
decay: inertia,
|
|
17
|
+
inertia,
|
|
18
|
+
tween: keyframes,
|
|
19
|
+
keyframes,
|
|
20
|
+
spring
|
|
21
|
+
};
|
|
22
|
+
const percentToProgress = (percent) => percent / 100;
|
|
23
|
+
class MainThreadAnimation extends BaseAnimation {
|
|
24
|
+
constructor(options) {
|
|
25
|
+
super(options);
|
|
26
|
+
this.holdTime = null;
|
|
27
|
+
this.cancelTime = null;
|
|
28
|
+
this.currentTime = 0;
|
|
29
|
+
this.playbackSpeed = 1;
|
|
30
|
+
this.pendingPlayState = "running";
|
|
31
|
+
this.startTime = null;
|
|
32
|
+
this.state = "idle";
|
|
33
|
+
this.stop = () => {
|
|
34
|
+
this.resolver.cancel();
|
|
35
|
+
this.isStopped = true;
|
|
36
|
+
if (this.state === "idle")
|
|
37
|
+
return;
|
|
38
|
+
this.teardown();
|
|
39
|
+
const { onStop } = this.options;
|
|
40
|
+
onStop && onStop();
|
|
41
|
+
};
|
|
42
|
+
const { name, motionValue, element, keyframes: keyframes2 } = this.options;
|
|
43
|
+
const KeyframeResolver$1 = (element === null || element === void 0 ? void 0 : element.KeyframeResolver) || KeyframeResolver;
|
|
44
|
+
const onResolved = (resolvedKeyframes, finalKeyframe) => this.onKeyframesResolved(resolvedKeyframes, finalKeyframe);
|
|
45
|
+
this.resolver = new KeyframeResolver$1(keyframes2, onResolved, name, motionValue, element);
|
|
46
|
+
this.resolver.scheduleResolve();
|
|
47
|
+
}
|
|
48
|
+
flatten() {
|
|
49
|
+
super.flatten();
|
|
50
|
+
if (this._resolved) {
|
|
51
|
+
Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
initPlayback(keyframes$1) {
|
|
55
|
+
const { type = "keyframes", repeat = 0, repeatDelay = 0, repeatType, velocity = 0 } = this.options;
|
|
56
|
+
const generatorFactory = isGenerator(type) ? type : generators[type] || keyframes;
|
|
57
|
+
let mapPercentToKeyframes;
|
|
58
|
+
let mirroredGenerator;
|
|
59
|
+
if (process.env.NODE_ENV !== "production" && generatorFactory !== keyframes) {
|
|
60
|
+
invariant(keyframes$1.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${keyframes$1}`);
|
|
61
|
+
}
|
|
62
|
+
if (generatorFactory !== keyframes && typeof keyframes$1[0] !== "number") {
|
|
63
|
+
mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
|
|
64
|
+
keyframes$1 = [0, 100];
|
|
65
|
+
}
|
|
66
|
+
const generator = generatorFactory({ ...this.options, keyframes: keyframes$1 });
|
|
67
|
+
if (repeatType === "mirror") {
|
|
68
|
+
mirroredGenerator = generatorFactory({
|
|
69
|
+
...this.options,
|
|
70
|
+
keyframes: [...keyframes$1].reverse(),
|
|
71
|
+
velocity: -velocity
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (generator.calculatedDuration === null) {
|
|
75
|
+
generator.calculatedDuration = calcGeneratorDuration(generator);
|
|
76
|
+
}
|
|
77
|
+
const { calculatedDuration } = generator;
|
|
78
|
+
const resolvedDuration = calculatedDuration + repeatDelay;
|
|
79
|
+
const totalDuration = resolvedDuration * (repeat + 1) - repeatDelay;
|
|
80
|
+
return {
|
|
81
|
+
generator,
|
|
82
|
+
mirroredGenerator,
|
|
83
|
+
mapPercentToKeyframes,
|
|
84
|
+
calculatedDuration,
|
|
85
|
+
resolvedDuration,
|
|
86
|
+
totalDuration
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
onPostResolved() {
|
|
90
|
+
const { autoplay = true } = this.options;
|
|
91
|
+
this.play();
|
|
92
|
+
if (this.pendingPlayState === "paused" || !autoplay) {
|
|
93
|
+
this.pause();
|
|
94
|
+
} else {
|
|
95
|
+
this.state = this.pendingPlayState;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
tick(timestamp, sample = false) {
|
|
99
|
+
const { resolved } = this;
|
|
100
|
+
if (!resolved) {
|
|
101
|
+
const { keyframes: keyframes3 } = this.options;
|
|
102
|
+
return { done: true, value: keyframes3[keyframes3.length - 1] };
|
|
103
|
+
}
|
|
104
|
+
const { finalKeyframe, generator, mirroredGenerator, mapPercentToKeyframes, keyframes: keyframes2, calculatedDuration, totalDuration, resolvedDuration } = resolved;
|
|
105
|
+
if (this.startTime === null)
|
|
106
|
+
return generator.next(0);
|
|
107
|
+
const { delay, repeat, repeatType, repeatDelay, onUpdate } = this.options;
|
|
108
|
+
if (this.speed > 0) {
|
|
109
|
+
this.startTime = Math.min(this.startTime, timestamp);
|
|
110
|
+
} else if (this.speed < 0) {
|
|
111
|
+
this.startTime = Math.min(timestamp - totalDuration / this.speed, this.startTime);
|
|
112
|
+
}
|
|
113
|
+
if (sample) {
|
|
114
|
+
this.currentTime = timestamp;
|
|
115
|
+
} else if (this.holdTime !== null) {
|
|
116
|
+
this.currentTime = this.holdTime;
|
|
117
|
+
} else {
|
|
118
|
+
this.currentTime = Math.round(timestamp - this.startTime) * this.speed;
|
|
119
|
+
}
|
|
120
|
+
const timeWithoutDelay = this.currentTime - delay * (this.speed >= 0 ? 1 : -1);
|
|
121
|
+
const isInDelayPhase = this.speed >= 0 ? timeWithoutDelay < 0 : timeWithoutDelay > totalDuration;
|
|
122
|
+
this.currentTime = Math.max(timeWithoutDelay, 0);
|
|
123
|
+
if (this.state === "finished" && this.holdTime === null) {
|
|
124
|
+
this.currentTime = totalDuration;
|
|
125
|
+
}
|
|
126
|
+
let elapsed = this.currentTime;
|
|
127
|
+
let frameGenerator = generator;
|
|
128
|
+
if (repeat) {
|
|
129
|
+
const progress = Math.min(this.currentTime, totalDuration) / resolvedDuration;
|
|
130
|
+
let currentIteration = Math.floor(progress);
|
|
131
|
+
let iterationProgress = progress % 1;
|
|
132
|
+
if (!iterationProgress && progress >= 1) {
|
|
133
|
+
iterationProgress = 1;
|
|
134
|
+
}
|
|
135
|
+
iterationProgress === 1 && currentIteration--;
|
|
136
|
+
currentIteration = Math.min(currentIteration, repeat + 1);
|
|
137
|
+
const isOddIteration = Boolean(currentIteration % 2);
|
|
138
|
+
if (isOddIteration) {
|
|
139
|
+
if (repeatType === "reverse") {
|
|
140
|
+
iterationProgress = 1 - iterationProgress;
|
|
141
|
+
if (repeatDelay) {
|
|
142
|
+
iterationProgress -= repeatDelay / resolvedDuration;
|
|
143
|
+
}
|
|
144
|
+
} else if (repeatType === "mirror") {
|
|
145
|
+
frameGenerator = mirroredGenerator;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
elapsed = clamp(0, 1, iterationProgress) * resolvedDuration;
|
|
149
|
+
}
|
|
150
|
+
const state = isInDelayPhase ? { done: false, value: keyframes2[0] } : frameGenerator.next(elapsed);
|
|
151
|
+
if (mapPercentToKeyframes) {
|
|
152
|
+
state.value = mapPercentToKeyframes(state.value);
|
|
153
|
+
}
|
|
154
|
+
let { done } = state;
|
|
155
|
+
if (!isInDelayPhase && calculatedDuration !== null) {
|
|
156
|
+
done = this.speed >= 0 ? this.currentTime >= totalDuration : this.currentTime <= 0;
|
|
157
|
+
}
|
|
158
|
+
const isAnimationFinished = this.holdTime === null && (this.state === "finished" || this.state === "running" && done);
|
|
159
|
+
if (isAnimationFinished && finalKeyframe !== void 0) {
|
|
160
|
+
state.value = getFinalKeyframe(keyframes2, this.options, finalKeyframe);
|
|
161
|
+
}
|
|
162
|
+
if (onUpdate) {
|
|
163
|
+
onUpdate(state.value);
|
|
164
|
+
}
|
|
165
|
+
if (isAnimationFinished) {
|
|
166
|
+
this.finish();
|
|
167
|
+
}
|
|
168
|
+
return state;
|
|
169
|
+
}
|
|
170
|
+
get duration() {
|
|
171
|
+
const { resolved } = this;
|
|
172
|
+
return resolved ? millisecondsToSeconds(resolved.calculatedDuration) : 0;
|
|
173
|
+
}
|
|
174
|
+
get time() {
|
|
175
|
+
return millisecondsToSeconds(this.currentTime);
|
|
176
|
+
}
|
|
177
|
+
set time(newTime) {
|
|
178
|
+
newTime = secondsToMilliseconds(newTime);
|
|
179
|
+
this.currentTime = newTime;
|
|
180
|
+
if (this.holdTime !== null || this.speed === 0) {
|
|
181
|
+
this.holdTime = newTime;
|
|
182
|
+
} else if (this.driver) {
|
|
183
|
+
this.startTime = this.driver.now() - newTime / this.speed;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
get speed() {
|
|
187
|
+
return this.playbackSpeed;
|
|
188
|
+
}
|
|
189
|
+
set speed(newSpeed) {
|
|
190
|
+
const hasChanged = this.playbackSpeed !== newSpeed;
|
|
191
|
+
this.playbackSpeed = newSpeed;
|
|
192
|
+
if (hasChanged) {
|
|
193
|
+
this.time = millisecondsToSeconds(this.currentTime);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
play() {
|
|
197
|
+
if (!this.resolver.isScheduled) {
|
|
198
|
+
this.resolver.resume();
|
|
199
|
+
}
|
|
200
|
+
if (!this._resolved) {
|
|
201
|
+
this.pendingPlayState = "running";
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (this.isStopped)
|
|
205
|
+
return;
|
|
206
|
+
const { driver = frameloopDriver, onPlay, startTime } = this.options;
|
|
207
|
+
if (!this.driver) {
|
|
208
|
+
this.driver = driver((timestamp) => this.tick(timestamp));
|
|
209
|
+
}
|
|
210
|
+
onPlay && onPlay();
|
|
211
|
+
const now = this.driver.now();
|
|
212
|
+
if (this.holdTime !== null) {
|
|
213
|
+
this.startTime = now - this.holdTime;
|
|
214
|
+
} else if (!this.startTime) {
|
|
215
|
+
this.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
|
|
216
|
+
} else if (this.state === "finished") {
|
|
217
|
+
this.startTime = now;
|
|
218
|
+
}
|
|
219
|
+
if (this.state === "finished") {
|
|
220
|
+
this.updateFinishedPromise();
|
|
221
|
+
}
|
|
222
|
+
this.cancelTime = this.startTime;
|
|
223
|
+
this.holdTime = null;
|
|
224
|
+
this.state = "running";
|
|
225
|
+
this.driver.start();
|
|
226
|
+
}
|
|
227
|
+
pause() {
|
|
228
|
+
var _a;
|
|
229
|
+
if (!this._resolved) {
|
|
230
|
+
this.pendingPlayState = "paused";
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.state = "paused";
|
|
234
|
+
this.holdTime = (_a = this.currentTime) !== null && _a !== void 0 ? _a : 0;
|
|
235
|
+
}
|
|
236
|
+
complete() {
|
|
237
|
+
if (this.state !== "running") {
|
|
238
|
+
this.play();
|
|
239
|
+
}
|
|
240
|
+
this.pendingPlayState = this.state = "finished";
|
|
241
|
+
this.holdTime = null;
|
|
242
|
+
}
|
|
243
|
+
finish() {
|
|
244
|
+
this.teardown();
|
|
245
|
+
this.state = "finished";
|
|
246
|
+
const { onComplete } = this.options;
|
|
247
|
+
onComplete && onComplete();
|
|
248
|
+
}
|
|
249
|
+
cancel() {
|
|
250
|
+
if (this.cancelTime !== null) {
|
|
251
|
+
this.tick(this.cancelTime);
|
|
252
|
+
}
|
|
253
|
+
this.teardown();
|
|
254
|
+
this.updateFinishedPromise();
|
|
255
|
+
}
|
|
256
|
+
teardown() {
|
|
257
|
+
this.state = "idle";
|
|
258
|
+
this.stopDriver();
|
|
259
|
+
this.resolveFinishedPromise();
|
|
260
|
+
this.updateFinishedPromise();
|
|
261
|
+
this.startTime = this.cancelTime = null;
|
|
262
|
+
this.resolver.cancel();
|
|
263
|
+
}
|
|
264
|
+
stopDriver() {
|
|
265
|
+
if (!this.driver)
|
|
266
|
+
return;
|
|
267
|
+
this.driver.stop();
|
|
268
|
+
this.driver = void 0;
|
|
269
|
+
}
|
|
270
|
+
sample(time) {
|
|
271
|
+
this.startTime = 0;
|
|
272
|
+
return this.tick(time, true);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
function animateValue(options) {
|
|
276
|
+
return new MainThreadAnimation(options);
|
|
277
|
+
}
|
|
278
|
+
export {
|
|
279
|
+
MainThreadAnimation,
|
|
280
|
+
animateValue
|
|
281
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { frame, cancelFrame, frameData } from "
|
|
1
|
+
import "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { frame, cancelFrame, frameData } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/frame.mjs";
|
|
3
|
+
import { time } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/frameloop/sync-time.mjs";
|
|
3
4
|
const frameloopDriver = (update) => {
|
|
4
5
|
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
5
6
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { warning } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { isGenerator } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
3
|
+
import { isAnimatable } from "../../utils/is-animatable.mjs";
|
|
4
4
|
function hasKeyframesChanged(keyframes) {
|
|
5
5
|
const current = keyframes[0];
|
|
6
6
|
if (keyframes.length === 1)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { invariant } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { createGeneratorEasing } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs";
|
|
4
|
+
import { isGenerator } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/is-generator.mjs";
|
|
5
|
+
import { NativeAnimationControls } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs";
|
|
6
|
+
import { supportsLinearEasing } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/utils/supports/linear-easing.mjs";
|
|
7
|
+
import { startWaapiAnimation } from "./index.mjs";
|
|
8
|
+
import { browserNumberValueTypes } from "../../../render/dom/value-types/number-browser.mjs";
|
|
9
|
+
import { getFinalKeyframe } from "./utils/get-final-keyframe.mjs";
|
|
10
|
+
import { setCSSVar, setStyle } from "./utils/style.mjs";
|
|
11
|
+
import { supportsPartialKeyframes } from "./utils/supports-partial-keyframes.mjs";
|
|
12
|
+
import { supportsWaapi } from "./utils/supports-waapi.mjs";
|
|
13
|
+
const state = /* @__PURE__ */ new WeakMap();
|
|
14
|
+
function hydrateKeyframes(valueName, keyframes, read) {
|
|
15
|
+
for (let i = 0; i < keyframes.length; i++) {
|
|
16
|
+
if (keyframes[i] === null) {
|
|
17
|
+
keyframes[i] = i === 0 ? read() : keyframes[i - 1];
|
|
18
|
+
}
|
|
19
|
+
if (typeof keyframes[i] === "number" && browserNumberValueTypes[valueName]) {
|
|
20
|
+
keyframes[i] = browserNumberValueTypes[valueName].transform(keyframes[i]);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (!supportsPartialKeyframes() && keyframes.length < 2) {
|
|
24
|
+
keyframes.unshift(read());
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const defaultEasing = "easeOut";
|
|
28
|
+
function getElementAnimationState(element) {
|
|
29
|
+
const animationState = state.get(element) || /* @__PURE__ */ new Map();
|
|
30
|
+
state.set(element, animationState);
|
|
31
|
+
return state.get(element);
|
|
32
|
+
}
|
|
33
|
+
class NativeAnimation extends NativeAnimationControls {
|
|
34
|
+
constructor(element, valueName, valueKeyframes, options) {
|
|
35
|
+
const isCSSVar = valueName.startsWith("--");
|
|
36
|
+
invariant(typeof options.type !== "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "framer-motion"?`);
|
|
37
|
+
const existingAnimation = getElementAnimationState(element).get(valueName);
|
|
38
|
+
existingAnimation && existingAnimation.stop();
|
|
39
|
+
const readInitialKeyframe = () => {
|
|
40
|
+
return valueName.startsWith("--") ? element.style.getPropertyValue(valueName) : window.getComputedStyle(element)[valueName];
|
|
41
|
+
};
|
|
42
|
+
if (!Array.isArray(valueKeyframes)) {
|
|
43
|
+
valueKeyframes = [valueKeyframes];
|
|
44
|
+
}
|
|
45
|
+
hydrateKeyframes(valueName, valueKeyframes, readInitialKeyframe);
|
|
46
|
+
if (isGenerator(options.type)) {
|
|
47
|
+
const generatorOptions = createGeneratorEasing(options, 100, options.type);
|
|
48
|
+
options.ease = supportsLinearEasing() ? generatorOptions.ease : defaultEasing;
|
|
49
|
+
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
|
50
|
+
options.type = "keyframes";
|
|
51
|
+
} else {
|
|
52
|
+
options.ease = options.ease || defaultEasing;
|
|
53
|
+
}
|
|
54
|
+
const onFinish = () => {
|
|
55
|
+
this.setValue(element, valueName, getFinalKeyframe(valueKeyframes, options));
|
|
56
|
+
this.cancel();
|
|
57
|
+
this.resolveFinishedPromise();
|
|
58
|
+
};
|
|
59
|
+
const init = () => {
|
|
60
|
+
this.setValue = isCSSVar ? setCSSVar : setStyle;
|
|
61
|
+
this.options = options;
|
|
62
|
+
this.updateFinishedPromise();
|
|
63
|
+
this.removeAnimation = () => {
|
|
64
|
+
const elementState = state.get(element);
|
|
65
|
+
elementState && elementState.delete(valueName);
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
if (!supportsWaapi()) {
|
|
69
|
+
super();
|
|
70
|
+
init();
|
|
71
|
+
onFinish();
|
|
72
|
+
} else {
|
|
73
|
+
super(startWaapiAnimation(element, valueName, valueKeyframes, options));
|
|
74
|
+
init();
|
|
75
|
+
if (options.autoplay === false) {
|
|
76
|
+
this.animation.pause();
|
|
77
|
+
}
|
|
78
|
+
this.animation.onfinish = onFinish;
|
|
79
|
+
getElementAnimationState(element).set(valueName, this);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
84
|
+
* resolves when the animation finishes at all but in a future update could/should
|
|
85
|
+
* reject if its cancels.
|
|
86
|
+
*/
|
|
87
|
+
then(resolve, reject) {
|
|
88
|
+
return this.currentFinishedPromise.then(resolve, reject);
|
|
89
|
+
}
|
|
90
|
+
updateFinishedPromise() {
|
|
91
|
+
this.currentFinishedPromise = new Promise((resolve) => {
|
|
92
|
+
this.resolveFinishedPromise = resolve;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
play() {
|
|
96
|
+
if (this.state === "finished") {
|
|
97
|
+
this.updateFinishedPromise();
|
|
98
|
+
}
|
|
99
|
+
super.play();
|
|
100
|
+
}
|
|
101
|
+
cancel() {
|
|
102
|
+
this.removeAnimation();
|
|
103
|
+
super.cancel();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export {
|
|
107
|
+
NativeAnimation
|
|
108
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { invariant } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { secondsToMilliseconds } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { getValueTransition } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/utils/get-value-transition.mjs";
|
|
4
|
+
import { resolveElements } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/utils/resolve-elements.mjs";
|
|
5
|
+
import { NativeAnimation } from "./NativeAnimation.mjs";
|
|
6
|
+
function animateElements(elementOrSelector, keyframes, options, scope) {
|
|
7
|
+
const elements = resolveElements(elementOrSelector, scope);
|
|
8
|
+
const numElements = elements.length;
|
|
9
|
+
invariant(Boolean(numElements), "No valid element provided.");
|
|
10
|
+
const animations = [];
|
|
11
|
+
for (let i = 0; i < numElements; i++) {
|
|
12
|
+
const element = elements[i];
|
|
13
|
+
const elementTransition = { ...options };
|
|
14
|
+
if (typeof elementTransition.delay === "function") {
|
|
15
|
+
elementTransition.delay = elementTransition.delay(i, numElements);
|
|
16
|
+
}
|
|
17
|
+
for (const valueName in keyframes) {
|
|
18
|
+
const valueKeyframes = keyframes[valueName];
|
|
19
|
+
const valueOptions = {
|
|
20
|
+
...getValueTransition(elementTransition, valueName)
|
|
21
|
+
};
|
|
22
|
+
valueOptions.duration = valueOptions.duration ? secondsToMilliseconds(valueOptions.duration) : valueOptions.duration;
|
|
23
|
+
valueOptions.delay = secondsToMilliseconds(valueOptions.delay || 0);
|
|
24
|
+
valueOptions.allowFlatten = !elementTransition.type && !elementTransition.ease;
|
|
25
|
+
animations.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return animations;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
animateElements
|
|
32
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GroupPlaybackControls } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/controls/Group.mjs";
|
|
2
|
+
import "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
3
|
+
import { animateElements } from "./animate-elements.mjs";
|
|
4
|
+
const createScopedWaapiAnimate = (scope) => {
|
|
5
|
+
function scopedAnimate(elementOrSelector, keyframes, options) {
|
|
6
|
+
return new GroupPlaybackControls(animateElements(elementOrSelector, keyframes, options, scope));
|
|
7
|
+
}
|
|
8
|
+
return scopedAnimate;
|
|
9
|
+
};
|
|
10
|
+
const animateMini = /* @__PURE__ */ createScopedWaapiAnimate();
|
|
11
|
+
export {
|
|
12
|
+
animateMini,
|
|
13
|
+
createScopedWaapiAnimate
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { mapEasingToNativeEasing } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/easing.mjs";
|
|
3
|
+
function startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = "loop", ease = "easeInOut", times } = {}) {
|
|
4
|
+
const keyframeOptions = { [valueName]: keyframes };
|
|
5
|
+
if (times)
|
|
6
|
+
keyframeOptions.offset = times;
|
|
7
|
+
const easing = mapEasingToNativeEasing(ease, duration);
|
|
8
|
+
if (Array.isArray(easing))
|
|
9
|
+
keyframeOptions.easing = easing;
|
|
10
|
+
const animation = element.animate(keyframeOptions, {
|
|
11
|
+
delay,
|
|
12
|
+
duration,
|
|
13
|
+
easing: !Array.isArray(easing) ? easing : "linear",
|
|
14
|
+
fill: "both",
|
|
15
|
+
iterations: repeat + 1,
|
|
16
|
+
direction: repeatType === "reverse" ? "alternate" : "normal"
|
|
17
|
+
});
|
|
18
|
+
return animation;
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
startWaapiAnimation
|
|
22
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { memo } from "../../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/memo.mjs";
|
|
2
3
|
const supportsPartialKeyframes = /* @__PURE__ */ memo(() => {
|
|
3
4
|
try {
|
|
4
5
|
document.createElement("div").animate({ opacity: [1] });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "../../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { memo } from "../../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/memo.mjs";
|
|
3
|
+
const supportsWaapi = /* @__PURE__ */ memo(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
4
|
+
export {
|
|
5
|
+
supportsWaapi
|
|
6
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { easeInOut } from "../../easing/ease.mjs";
|
|
2
|
+
import { isEasingArray } from "../../easing/utils/is-easing-array.mjs";
|
|
3
|
+
import { easingDefinitionToFunction } from "../../easing/utils/map.mjs";
|
|
1
4
|
import { interpolate } from "../../utils/interpolate.mjs";
|
|
2
|
-
import { defaultOffset } from "
|
|
3
|
-
import { convertOffsetToTimes } from "
|
|
4
|
-
import { easeInOut } from "../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/easing/ease.mjs";
|
|
5
|
-
import { isEasingArray } from "../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/easing/utils/is-easing-array.mjs";
|
|
6
|
-
import { easingDefinitionToFunction } from "../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/easing/utils/map.mjs";
|
|
5
|
+
import { defaultOffset } from "../../utils/offsets/default.mjs";
|
|
6
|
+
import { convertOffsetToTimes } from "../../utils/offsets/time.mjs";
|
|
7
7
|
function defaultEasing(values, easing) {
|
|
8
8
|
return values.map(() => easing || easeInOut).splice(0, values.length - 1);
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { warning } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { clamp } from "../../../utils/clamp.mjs";
|
|
1
4
|
import { springDefaults } from "./defaults.mjs";
|
|
2
|
-
import { warning } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/errors.mjs";
|
|
3
|
-
import { secondsToMilliseconds, millisecondsToSeconds } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/time-conversion.mjs";
|
|
4
|
-
import { clamp } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/clamp.mjs";
|
|
5
5
|
const safeMin = 1e-3;
|
|
6
6
|
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass }) {
|
|
7
7
|
let envelope;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/time-conversion.mjs";
|
|
3
|
+
import { calcGeneratorDuration, maxGeneratorDuration } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs";
|
|
4
|
+
import { generateLinearEasing } from "../../../../../../../../motion-dom@12.5.0/external/motion-dom/dist/es/animation/waapi/utils/linear.mjs";
|
|
5
|
+
import { clamp } from "../../../utils/clamp.mjs";
|
|
4
6
|
import { calcGeneratorVelocity } from "../utils/velocity.mjs";
|
|
5
7
|
import { springDefaults } from "./defaults.mjs";
|
|
6
8
|
import { findSpring, calcAngularFreq } from "./find.mjs";
|
|
7
|
-
import { millisecondsToSeconds, secondsToMilliseconds } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/time-conversion.mjs";
|
|
8
|
-
import { clamp } from "../../../../../../../../motion-utils@12.8.3/external/motion-utils/dist/es/clamp.mjs";
|
|
9
9
|
const durationKeys = ["duration", "bounce"];
|
|
10
10
|
const physicsKeys = ["stiffness", "damping", "mass"];
|
|
11
11
|
function isSpringType(options, keys) {
|
|
@@ -87,7 +87,7 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
87
87
|
next: (t) => {
|
|
88
88
|
const current = resolveSpring(t);
|
|
89
89
|
if (!isResolvedFromDuration) {
|
|
90
|
-
let currentVelocity =
|
|
90
|
+
let currentVelocity = 0;
|
|
91
91
|
if (dampingRatio < 1) {
|
|
92
92
|
currentVelocity = t === 0 ? secondsToMilliseconds(initialVelocity) : calcGeneratorVelocity(resolveSpring, t, current);
|
|
93
93
|
}
|
|
@@ -104,19 +104,10 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
|
|
|
104
104
|
const calculatedDuration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
105
105
|
const easing = generateLinearEasing((progress) => generator.next(calculatedDuration * progress).value, calculatedDuration, 30);
|
|
106
106
|
return calculatedDuration + "ms " + easing;
|
|
107
|
-
},
|
|
108
|
-
toTransition: () => {
|
|
109
107
|
}
|
|
110
108
|
};
|
|
111
109
|
return generator;
|
|
112
110
|
}
|
|
113
|
-
spring.applyToOptions = (options) => {
|
|
114
|
-
const generatorOptions = createGeneratorEasing(options, 100, spring);
|
|
115
|
-
options.ease = generatorOptions.ease;
|
|
116
|
-
options.duration = secondsToMilliseconds(generatorOptions.duration);
|
|
117
|
-
options.type = "keyframes";
|
|
118
|
-
return options;
|
|
119
|
-
};
|
|
120
111
|
export {
|
|
121
112
|
spring
|
|
122
113
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/errors.mjs";
|
|
2
|
+
import { velocityPerSecond } from "../../../../../../../../motion-utils@12.5.0/external/motion-utils/dist/es/velocity-per-second.mjs";
|
|
2
3
|
const velocitySampleDuration = 5;
|
|
3
4
|
function calcGeneratorVelocity(resolveValue, t, current) {
|
|
4
5
|
const prevT = Math.max(t - velocitySampleDuration, 0);
|