motion 12.6.4-alpha.0 → 12.6.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/debug.js +2 -6
- package/dist/cjs/index.js +24 -14
- package/dist/cjs/mini.js +177 -0
- package/dist/cjs/react-client.js +24 -13
- package/dist/cjs/react-m.js +12 -6
- package/dist/cjs/react-mini.js +177 -0
- package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/generators/spring/index.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/start.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +1 -0
- package/dist/es/framer-motion/dist/es/easing/utils/map.mjs +1 -0
- package/dist/es/framer-motion/dist/es/events/event-info.mjs +1 -0
- package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +1 -0
- package/dist/es/framer-motion/dist/es/gestures/hover.mjs +1 -0
- package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +1 -0
- package/dist/es/framer-motion/dist/es/gestures/pan/index.mjs +1 -0
- package/dist/es/framer-motion/dist/es/gestures/press.mjs +1 -0
- package/dist/es/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +1 -0
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-element.mjs +1 -0
- package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/observe.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/track.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/svg/config-motion.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +2 -1
- package/dist/es/framer-motion/dist/es/render/utils/setters.mjs +1 -0
- package/dist/es/framer-motion/dist/es/utils/delay.mjs +1 -0
- package/dist/es/framer-motion/dist/es/utils/interpolate.mjs +1 -2
- package/dist/es/framer-motion/dist/es/utils/use-animation-frame.mjs +1 -0
- package/dist/es/framer-motion/dist/es/utils/use-force-update.mjs +1 -0
- package/dist/es/framer-motion/dist/es/utils/use-instant-transition.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-combine-values.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-computed.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-motion-value.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-scroll.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-spring.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-velocity.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs +1 -0
- package/dist/es/framer-motion/dist/es/value/use-will-change/add-will-change.mjs +7 -0
- package/dist/es/motion/lib/index.mjs +0 -1
- package/dist/es/motion/lib/react.mjs +1 -1
- package/dist/es/motion-dom/dist/es/frameloop/index-legacy.mjs +12 -0
- package/dist/es/motion-dom/dist/es/value/index.mjs +1 -1
- package/dist/es/motion-utils/dist/es/global-config.mjs +4 -1
- package/dist/motion.dev.js +24 -14
- package/dist/motion.js +1 -1
- package/package.json +3 -3
|
@@ -3,6 +3,7 @@ import { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../mot
|
|
|
3
3
|
import { activeAnimations } from '../../../../../motion-dom/dist/es/stats/animation-count.mjs';
|
|
4
4
|
import { isGenerator } from '../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';
|
|
5
5
|
import { calcGeneratorDuration } from '../../../../../motion-dom/dist/es/animation/generators/utils/calc-duration.mjs';
|
|
6
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
6
7
|
import { KeyframeResolver } from '../../render/utils/KeyframesResolver.mjs';
|
|
7
8
|
import { clamp } from '../../utils/clamp.mjs';
|
|
8
9
|
import { mix } from '../../utils/mix/index.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame, cancelFrame, frameData } from '../../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
3
|
import { time } from '../../../../../../motion-dom/dist/es/frameloop/sync-time.mjs';
|
|
4
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
|
|
5
6
|
const frameloopDriver = (update) => {
|
|
6
7
|
const passTimestamp = ({ timestamp }) => update(timestamp);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { warning } from '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { isGenerator } from '../../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { isAnimatable } from '../../utils/is-animatable.mjs';
|
|
4
5
|
|
|
5
6
|
function hasKeyframesChanged(keyframes) {
|
|
@@ -3,6 +3,7 @@ import { secondsToMilliseconds } from '../../../../../../motion-utils/dist/es/ti
|
|
|
3
3
|
import { NativeAnimation } from '../../../../../../motion-dom/dist/es/animation/NativeAnimation.mjs';
|
|
4
4
|
import { getValueTransition } from '../../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';
|
|
5
5
|
import { resolveElements } from '../../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';
|
|
6
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
6
7
|
|
|
7
8
|
function animateElements(elementOrSelector, keyframes, options, scope) {
|
|
8
9
|
const elements = resolveElements(elementOrSelector, scope);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { GroupAnimationWithThen } from '../../../../../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { createAnimationsFromSequence } from '../../sequence/create.mjs';
|
|
4
5
|
import { animateElements } from './animate-elements.mjs';
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { GroupAnimationWithThen } from '../../../../../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { animateElements } from './animate-elements.mjs';
|
|
4
5
|
|
|
5
6
|
const createScopedWaapiAnimate = (scope) => {
|
|
@@ -4,6 +4,7 @@ import { supportsLinearEasing } from '../../../../../../motion-dom/dist/es/utils
|
|
|
4
4
|
import { generateLinearEasing } from '../../../../../../motion-dom/dist/es/animation/waapi/utils/linear.mjs';
|
|
5
5
|
import { calcGeneratorDuration, maxGeneratorDuration } from '../../../../../../motion-dom/dist/es/animation/generators/utils/calc-duration.mjs';
|
|
6
6
|
import { createGeneratorEasing } from '../../../../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs';
|
|
7
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
7
8
|
import { clamp } from '../../../utils/clamp.mjs';
|
|
8
9
|
import { calcGeneratorVelocity } from '../utils/velocity.mjs';
|
|
9
10
|
import { springDefaults } from './defaults.mjs';
|
|
@@ -4,6 +4,7 @@ import { secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-
|
|
|
4
4
|
import { GroupAnimationWithThen } from '../../../../../motion-dom/dist/es/animation/GroupAnimationWithThen.mjs';
|
|
5
5
|
import { getValueTransition } from '../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';
|
|
6
6
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
7
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
7
8
|
import { instantAnimationState } from '../../utils/use-instant-transition-state.mjs';
|
|
8
9
|
import { AcceleratedAnimation } from '../animators/AcceleratedAnimation.mjs';
|
|
9
10
|
import { MainThreadAnimation } from '../animators/MainThreadAnimation.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { getValueTransition } from '../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';
|
|
3
3
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { positionalKeys } from '../../render/html/utils/keys-position.mjs';
|
|
5
6
|
import { setTarget } from '../../render/utils/setters.mjs';
|
|
6
7
|
import { addValueToWillChange } from '../../value/use-will-change/add-will-change.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { noop } from '../../../../../motion-utils/dist/es/noop.mjs';
|
|
3
3
|
import { startWaapiAnimation } from '../../../../../motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { optimizedAppearDataId } from './data-id.mjs';
|
|
5
6
|
import { getOptimisedAppearId } from './get-appear-id.mjs';
|
|
6
7
|
import { handoffOptimizedAppearAnimation } from './handoff.mjs';
|
|
@@ -3,6 +3,7 @@ import { progress } from '../../../../../motion-utils/dist/es/progress.mjs';
|
|
|
3
3
|
import { secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
4
4
|
import { isGenerator } from '../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';
|
|
5
5
|
import { createGeneratorEasing } from '../../../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs';
|
|
6
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
6
7
|
import { getEasingForSegment } from '../../easing/utils/get-easing-for-segment.mjs';
|
|
7
8
|
import { defaultOffset } from '../../utils/offsets/default.mjs';
|
|
8
9
|
import { fillOffset } from '../../utils/offsets/fill.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { noop } from '../../../../../motion-utils/dist/es/noop.mjs';
|
|
3
3
|
import { isBezierDefinition } from '../../../../../motion-dom/dist/es/utils/is-bezier-definition.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { anticipate } from '../anticipate.mjs';
|
|
5
6
|
import { backIn, backInOut, backOut } from '../back.mjs';
|
|
6
7
|
import { circIn, circInOut, circOut } from '../circ.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { isPrimaryPointer } from '../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
|
|
4
5
|
function extractEventInfo(event) {
|
|
5
6
|
return {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { invariant } from '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
3
|
import { setDragLock } from '../../../../../motion-dom/dist/es/gestures/drag/state/set-active.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { animateMotionValue } from '../../animation/interfaces/motion-value.mjs';
|
|
5
6
|
import { addDomEvent } from '../../events/add-dom-event.mjs';
|
|
6
7
|
import { addPointerEvent } from '../../events/add-pointer-event.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
3
|
import { hover } from '../../../../motion-dom/dist/es/gestures/hover.mjs';
|
|
4
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { extractEventInfo } from '../events/event-info.mjs';
|
|
5
6
|
import { Feature } from '../motion/features/Feature.mjs';
|
|
6
7
|
|
|
@@ -2,6 +2,7 @@ import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
|
2
2
|
import { secondsToMilliseconds, millisecondsToSeconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
3
3
|
import { frame, cancelFrame, frameData } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
4
4
|
import { isPrimaryPointer } from '../../../../../motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs';
|
|
5
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
5
6
|
import { addPointerEvent } from '../../events/add-pointer-event.mjs';
|
|
6
7
|
import { extractEventInfo } from '../../events/event-info.mjs';
|
|
7
8
|
import { distance2D } from '../../utils/distance.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { noop } from '../../../../../motion-utils/dist/es/noop.mjs';
|
|
3
3
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { addPointerEvent } from '../../events/add-pointer-event.mjs';
|
|
5
6
|
import { Feature } from '../../motion/features/Feature.mjs';
|
|
6
7
|
import { getContextWindow } from '../../utils/get-context-window.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
3
|
import { press } from '../../../../motion-dom/dist/es/gestures/press/index.mjs';
|
|
4
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { extractEventInfo } from '../events/event-info.mjs';
|
|
5
6
|
import { Feature } from '../motion/features/Feature.mjs';
|
|
6
7
|
|
|
@@ -3,6 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
4
4
|
import { frame } from '../../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
5
5
|
import { microtask } from '../../../../../../motion-dom/dist/es/frameloop/microtask.mjs';
|
|
6
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
6
7
|
import { useContext, Component } from 'react';
|
|
7
8
|
import { usePresence } from '../../../components/AnimatePresence/use-presence.mjs';
|
|
8
9
|
import { LayoutGroupContext } from '../../../context/LayoutGroupContext.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { microtask } from '../../../../../motion-dom/dist/es/frameloop/microtask.mjs';
|
|
3
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useContext, useRef, useInsertionEffect, useEffect } from 'react';
|
|
4
5
|
import { optimizedAppearDataAttribute } from '../../animation/optimized-appear/data-id.mjs';
|
|
5
6
|
import { LazyContext } from '../../context/LazyContext.mjs';
|
|
@@ -7,6 +7,7 @@ import { getValueTransition } from '../../../../../motion-dom/dist/es/animation/
|
|
|
7
7
|
import { cancelFrame, frameData, frameSteps, frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
8
8
|
import { microtask } from '../../../../../motion-dom/dist/es/frameloop/microtask.mjs';
|
|
9
9
|
import { time } from '../../../../../motion-dom/dist/es/frameloop/sync-time.mjs';
|
|
10
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
10
11
|
import { animateSingleValue } from '../../animation/animate/single-value.mjs';
|
|
11
12
|
import { getOptimisedAppearId } from '../../animation/optimized-appear/get-appear-id.mjs';
|
|
12
13
|
import { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';
|
|
@@ -4,6 +4,7 @@ import { warnOnce } from '../../../../motion-utils/dist/es/warn-once.mjs';
|
|
|
4
4
|
import { frame, cancelFrame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
5
5
|
import { time } from '../../../../motion-dom/dist/es/frameloop/sync-time.mjs';
|
|
6
6
|
import { motionValue } from '../../../../motion-dom/dist/es/value/index.mjs';
|
|
7
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
7
8
|
import { featureDefinitions } from '../motion/features/definitions.mjs';
|
|
8
9
|
import { createBox } from '../projection/geometry/models.mjs';
|
|
9
10
|
import { isNumericalString } from '../utils/is-numerical-string.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { resolveElements } from '../../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
|
|
4
5
|
const resizeHandlers = new WeakMap();
|
|
5
6
|
let observer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { supportsScrollTimeline } from '../../../../../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs';
|
|
2
2
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
3
3
|
import { noop } from '../../../../../../motion-utils/dist/es/noop.mjs';
|
|
4
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { observeTimeline } from './observe.mjs';
|
|
5
6
|
import { scrollInfo } from './track.mjs';
|
|
6
7
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame, cancelFrame } from '../../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
|
|
4
5
|
function observeTimeline(update, timeline) {
|
|
5
6
|
let prevProgress;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame, cancelFrame, frameData } from '../../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { resize } from '../resize/index.mjs';
|
|
4
5
|
import { createScrollInfo } from './info.mjs';
|
|
5
6
|
import { createOnScrollHandler } from './on-scroll-handler.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { resolveElements } from '../../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';
|
|
3
|
+
import '../../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
|
|
4
5
|
const thresholds = {
|
|
5
6
|
some: 0,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { createBox } from '../../projection/geometry/models.mjs';
|
|
4
5
|
import { DOMVisualElement } from '../dom/DOMVisualElement.mjs';
|
|
5
6
|
import { camelToDash } from '../dom/utils/camel-to-dash.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';
|
|
4
5
|
import { transformProps } from '../html/utils/keys-transform.mjs';
|
|
5
6
|
import { buildSVGAttrs } from './utils/build-attrs.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { removeNonTranslationalTransform } from '../dom/utils/unit-conversion.mjs';
|
|
4
5
|
|
|
5
6
|
const toResolve = new Set();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { warnOnce } from '../../../../../motion-utils/dist/es/warn-once.mjs';
|
|
3
3
|
import { motionValue } from '../../../../../motion-dom/dist/es/value/index.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { isMotionValue } from '../../value/utils/is-motion-value.mjs';
|
|
5
6
|
|
|
6
7
|
function updateMotionValuesFromProps(element, next, prev) {
|
|
@@ -18,7 +19,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
18
19
|
* and warn against mismatches.
|
|
19
20
|
*/
|
|
20
21
|
if (process.env.NODE_ENV === "development") {
|
|
21
|
-
warnOnce(nextValue.version === "12.6.4
|
|
22
|
+
warnOnce(nextValue.version === "12.6.4", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4 may not work as expected.`);
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
else if (isMotionValue(prevValue)) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { motionValue } from '../../../../../motion-dom/dist/es/value/index.mjs';
|
|
3
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { resolveFinalValueInKeyframes } from '../../utils/resolve-value.mjs';
|
|
4
5
|
import { resolveVariant } from './resolve-dynamic-variants.mjs';
|
|
5
6
|
|
|
@@ -2,6 +2,7 @@ import '../../../../motion-utils/dist/es/errors.mjs';
|
|
|
2
2
|
import { secondsToMilliseconds } from '../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
3
3
|
import { frame, cancelFrame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
4
4
|
import { time } from '../../../../motion-dom/dist/es/frameloop/sync-time.mjs';
|
|
5
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Timeout defined in ms
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { invariant } from '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
-
import { MotionGlobalConfig } from '../../../../motion-utils/dist/es/global-config.mjs';
|
|
3
2
|
import { noop } from '../../../../motion-utils/dist/es/noop.mjs';
|
|
4
3
|
import { progress } from '../../../../motion-utils/dist/es/progress.mjs';
|
|
5
4
|
import { clamp } from './clamp.mjs';
|
|
@@ -8,7 +7,7 @@ import { pipe } from './pipe.mjs';
|
|
|
8
7
|
|
|
9
8
|
function createMixers(output, ease, customMixer) {
|
|
10
9
|
const mixers = [];
|
|
11
|
-
const mixerFactory = customMixer ||
|
|
10
|
+
const mixerFactory = customMixer || mix;
|
|
12
11
|
const numMixers = output.length - 1;
|
|
13
12
|
for (let i = 0; i < numMixers; i++) {
|
|
14
13
|
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame, cancelFrame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useRef, useContext, useEffect } from 'react';
|
|
4
5
|
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useState, useCallback } from 'react';
|
|
4
5
|
import { useIsMounted } from './use-is-mounted.mjs';
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useRef, useEffect } from 'react';
|
|
4
5
|
import { useInstantLayoutTransition } from '../projection/use-instant-layout-transition.mjs';
|
|
5
6
|
import { useForceUpdate } from './use-force-update.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { cancelFrame, frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
|
|
4
5
|
import { useMotionValue } from './use-motion-value.mjs';
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { collectMotionValues } from '../../../../motion-dom/dist/es/value/index.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useCombineMotionValues } from './use-combine-values.mjs';
|
|
4
5
|
|
|
5
6
|
function useComputed(compute) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { motionValue } from '../../../../motion-dom/dist/es/value/index.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useContext, useState, useEffect } from 'react';
|
|
4
5
|
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
|
|
5
6
|
import { useConstant } from '../utils/use-constant.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { warning } from '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { motionValue } from '../../../../motion-dom/dist/es/value/index.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useEffect } from 'react';
|
|
4
5
|
import { scroll } from '../render/dom/scroll/index.mjs';
|
|
5
6
|
import { useConstant } from '../utils/use-constant.mjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { noop } from '../../../../motion-utils/dist/es/noop.mjs';
|
|
3
3
|
import { frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
4
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { useContext, useRef, useInsertionEffect } from 'react';
|
|
5
6
|
import { animateValue } from '../animation/animators/MainThreadAnimation.mjs';
|
|
6
7
|
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../../../../motion-utils/dist/es/errors.mjs';
|
|
2
2
|
import { frame } from '../../../../motion-dom/dist/es/frameloop/frame.mjs';
|
|
3
|
+
import '../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
3
4
|
import { useMotionValueEvent } from '../utils/use-motion-value-event.mjs';
|
|
4
5
|
import { useMotionValue } from './use-motion-value.mjs';
|
|
5
6
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { addUniqueItem } from '../../../../../motion-utils/dist/es/array.mjs';
|
|
2
2
|
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
3
3
|
import { MotionValue } from '../../../../../motion-dom/dist/es/value/index.mjs';
|
|
4
|
+
import '../../../../../motion-dom/dist/es/frameloop/index-legacy.mjs';
|
|
4
5
|
import { getWillChangeName } from './get-will-change-name.mjs';
|
|
5
6
|
|
|
6
7
|
class WillChangeMotionValue extends MotionValue {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
+
import { MotionGlobalConfig } from '../../../../../motion-utils/dist/es/global-config.mjs';
|
|
1
3
|
import { isWillChangeMotionValue } from './is.mjs';
|
|
2
4
|
|
|
3
5
|
function addValueToWillChange(visualElement, key) {
|
|
@@ -9,6 +11,11 @@ function addValueToWillChange(visualElement, key) {
|
|
|
9
11
|
if (isWillChangeMotionValue(willChange)) {
|
|
10
12
|
return willChange.add(key);
|
|
11
13
|
}
|
|
14
|
+
else if (!willChange && MotionGlobalConfig.WillChange) {
|
|
15
|
+
const newWillChange = new MotionGlobalConfig.WillChange("auto");
|
|
16
|
+
visualElement.addValue("willChange", newWillChange);
|
|
17
|
+
newWillChange.add(key);
|
|
18
|
+
}
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
export { addValueToWillChange };
|
|
@@ -27,7 +27,6 @@ export { stagger } from '../../framer-motion/dist/es/animation/utils/stagger.mjs
|
|
|
27
27
|
export { clamp } from '../../framer-motion/dist/es/utils/clamp.mjs';
|
|
28
28
|
export { delayInSeconds as delay } from '../../framer-motion/dist/es/utils/delay.mjs';
|
|
29
29
|
export { distance, distance2D } from '../../framer-motion/dist/es/utils/distance.mjs';
|
|
30
|
-
export { hslaToRgba } from '../../framer-motion/dist/es/utils/hsla-to-rgba.mjs';
|
|
31
30
|
export { interpolate } from '../../framer-motion/dist/es/utils/interpolate.mjs';
|
|
32
31
|
export { mix } from '../../framer-motion/dist/es/utils/mix/index.mjs';
|
|
33
32
|
export { pipe } from '../../framer-motion/dist/es/utils/pipe.mjs';
|
|
@@ -31,6 +31,7 @@ export { useTime } from '../../framer-motion/dist/es/value/use-time.mjs';
|
|
|
31
31
|
export { useTransform } from '../../framer-motion/dist/es/value/use-transform.mjs';
|
|
32
32
|
export { useVelocity } from '../../framer-motion/dist/es/value/use-velocity.mjs';
|
|
33
33
|
export { useWillChange } from '../../framer-motion/dist/es/value/use-will-change/index.mjs';
|
|
34
|
+
export { WillChangeMotionValue } from '../../framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs';
|
|
34
35
|
export { resolveMotionValue } from '../../framer-motion/dist/es/value/utils/resolve-motion-value.mjs';
|
|
35
36
|
export { useReducedMotion } from '../../framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs';
|
|
36
37
|
export { useReducedMotionConfig } from '../../framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs';
|
|
@@ -96,7 +97,6 @@ export { inertia } from '../../framer-motion/dist/es/animation/generators/inerti
|
|
|
96
97
|
export { keyframes } from '../../framer-motion/dist/es/animation/generators/keyframes.mjs';
|
|
97
98
|
export { stagger } from '../../framer-motion/dist/es/animation/utils/stagger.mjs';
|
|
98
99
|
export { clamp } from '../../framer-motion/dist/es/utils/clamp.mjs';
|
|
99
|
-
export { hslaToRgba } from '../../framer-motion/dist/es/utils/hsla-to-rgba.mjs';
|
|
100
100
|
export { mix } from '../../framer-motion/dist/es/utils/mix/index.mjs';
|
|
101
101
|
export { pipe } from '../../framer-motion/dist/es/utils/pipe.mjs';
|
|
102
102
|
export { transform } from '../../framer-motion/dist/es/utils/transform.mjs';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cancelFrame } from './frame.mjs';
|
|
2
|
+
import { stepsOrder } from './order.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
*
|
|
7
|
+
* Use cancelFrame(callback) instead.
|
|
8
|
+
*/
|
|
9
|
+
stepsOrder.reduce((acc, key) => {
|
|
10
|
+
acc[key] = (process) => cancelFrame(process);
|
|
11
|
+
return acc;
|
|
12
|
+
}, {});
|
|
@@ -33,7 +33,7 @@ class MotionValue {
|
|
|
33
33
|
* This will be replaced by the build step with the latest version number.
|
|
34
34
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
35
35
|
*/
|
|
36
|
-
this.version = "12.6.4
|
|
36
|
+
this.version = "12.6.4";
|
|
37
37
|
/**
|
|
38
38
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
39
39
|
* if the value is numerical, but we might be able to widen the scope here and support
|
package/dist/motion.dev.js
CHANGED
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const MotionGlobalConfig = {
|
|
32
|
+
const MotionGlobalConfig = {
|
|
33
|
+
skipAnimations: false,
|
|
34
|
+
useManualTiming: false,
|
|
35
|
+
};
|
|
33
36
|
|
|
34
37
|
/*#__NO_SIDE_EFFECTS__*/
|
|
35
38
|
function memo(callback) {
|
|
@@ -739,11 +742,9 @@
|
|
|
739
742
|
}, {});
|
|
740
743
|
const { read, resolveKeyframes, update, preRender, render, postRender } = steps;
|
|
741
744
|
const processBatch = () => {
|
|
742
|
-
const timestamp =
|
|
743
|
-
? state.timestamp
|
|
744
|
-
: performance.now();
|
|
745
|
+
const timestamp = performance.now();
|
|
745
746
|
runNextFrame = false;
|
|
746
|
-
|
|
747
|
+
{
|
|
747
748
|
state.delta = useDefaultElapsed
|
|
748
749
|
? 1000 / 60
|
|
749
750
|
: Math.max(Math.min(timestamp - state.timestamp, maxElapsed$1), 1);
|
|
@@ -1066,7 +1067,7 @@
|
|
|
1066
1067
|
* This will be replaced by the build step with the latest version number.
|
|
1067
1068
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
1068
1069
|
*/
|
|
1069
|
-
this.version = "12.6.4
|
|
1070
|
+
this.version = "12.6.4";
|
|
1070
1071
|
/**
|
|
1071
1072
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
1072
1073
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -1341,6 +1342,16 @@
|
|
|
1341
1342
|
return new MotionValue(init, options);
|
|
1342
1343
|
}
|
|
1343
1344
|
|
|
1345
|
+
/**
|
|
1346
|
+
* @deprecated
|
|
1347
|
+
*
|
|
1348
|
+
* Use cancelFrame(callback) instead.
|
|
1349
|
+
*/
|
|
1350
|
+
stepsOrder.reduce((acc, key) => {
|
|
1351
|
+
acc[key] = (process) => cancelFrame(process);
|
|
1352
|
+
return acc;
|
|
1353
|
+
}, {});
|
|
1354
|
+
|
|
1344
1355
|
const clamp = (min, max, v) => {
|
|
1345
1356
|
if (v > max)
|
|
1346
1357
|
return max;
|
|
@@ -2136,6 +2147,11 @@
|
|
|
2136
2147
|
if (isWillChangeMotionValue(willChange)) {
|
|
2137
2148
|
return willChange.add(key);
|
|
2138
2149
|
}
|
|
2150
|
+
else if (!willChange && MotionGlobalConfig.WillChange) {
|
|
2151
|
+
const newWillChange = new MotionGlobalConfig.WillChange("auto");
|
|
2152
|
+
visualElement.addValue("willChange", newWillChange);
|
|
2153
|
+
newWillChange.add(key);
|
|
2154
|
+
}
|
|
2139
2155
|
}
|
|
2140
2156
|
|
|
2141
2157
|
/**
|
|
@@ -3621,7 +3637,7 @@
|
|
|
3621
3637
|
|
|
3622
3638
|
function createMixers(output, ease, customMixer) {
|
|
3623
3639
|
const mixers = [];
|
|
3624
|
-
const mixerFactory = customMixer ||
|
|
3640
|
+
const mixerFactory = customMixer || mix;
|
|
3625
3641
|
const numMixers = output.length - 1;
|
|
3626
3642
|
for (let i = 0; i < numMixers; i++) {
|
|
3627
3643
|
let mixer = mixerFactory(output[i], output[i + 1]);
|
|
@@ -4553,11 +4569,6 @@
|
|
|
4553
4569
|
shouldSkip = true;
|
|
4554
4570
|
}
|
|
4555
4571
|
}
|
|
4556
|
-
if (MotionGlobalConfig.skipAnimations) {
|
|
4557
|
-
shouldSkip = true;
|
|
4558
|
-
options.duration = 0;
|
|
4559
|
-
options.delay = 0;
|
|
4560
|
-
}
|
|
4561
4572
|
/**
|
|
4562
4573
|
* If the transition type or easing has been explicitly set by the user
|
|
4563
4574
|
* then we don't want to allow flattening the animation.
|
|
@@ -4772,7 +4783,7 @@
|
|
|
4772
4783
|
* and warn against mismatches.
|
|
4773
4784
|
*/
|
|
4774
4785
|
{
|
|
4775
|
-
warnOnce(nextValue.version === "12.6.4
|
|
4786
|
+
warnOnce(nextValue.version === "12.6.4", `Attempting to mix Motion versions ${nextValue.version} with 12.6.4 may not work as expected.`);
|
|
4776
4787
|
}
|
|
4777
4788
|
}
|
|
4778
4789
|
else if (isMotionValue(prevValue)) {
|
|
@@ -6627,7 +6638,6 @@
|
|
|
6627
6638
|
exports.frame = frame;
|
|
6628
6639
|
exports.frameData = frameData;
|
|
6629
6640
|
exports.hover = hover;
|
|
6630
|
-
exports.hslaToRgba = hslaToRgba;
|
|
6631
6641
|
exports.inView = inView;
|
|
6632
6642
|
exports.inertia = inertia;
|
|
6633
6643
|
exports.interpolate = interpolate;
|