framer-motion 6.5.0 → 7.0.1
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/README.md +14 -11
- package/dist/cjs/index.js +21 -27
- package/dist/es/components/AnimatePresence/PresenceChild.mjs +1 -2
- package/dist/es/components/AnimatePresence/use-presence.mjs +1 -2
- package/dist/es/context/MotionContext/create.mjs +1 -1
- package/dist/es/gestures/PanSession.mjs +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +2 -1
- package/dist/es/gestures/drag/utils/constraints.mjs +1 -1
- package/dist/es/projection/animation/mix-values.mjs +2 -2
- package/dist/es/projection/node/create-projection-node.mjs +1 -1
- package/dist/es/render/dom/utils/unit-conversion.mjs +1 -1
- package/dist/es/render/html/visual-element.mjs +1 -1
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/utils/use-animation-frame.mjs +5 -7
- package/dist/es/value/index.mjs +1 -1
- package/dist/es/value/scroll/use-element-scroll.mjs +3 -0
- package/dist/es/value/scroll/use-viewport-scroll.mjs +3 -0
- package/dist/es/value/use-on-change.mjs +3 -3
- package/dist/framer-motion.dev.js +330 -182
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +23 -7
- package/dist/projection.dev.js +295 -118
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-webpack-dom-animation.js +1 -1
- package/dist/size-webpack-dom-max.js +1 -2
- package/dist/size-webpack-m.js +1 -2
- package/dist/three-entry.d.ts +2 -2
- package/package.json +13 -18
- package/dist/es/utils/use-id.mjs +0 -15
- package/dist/size-webpack-dom-max.js.LICENSE.txt +0 -14
- package/dist/size-webpack-m.js.LICENSE.txt +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -2566,7 +2566,7 @@ interface VisualElement<Instance = any, RenderState = any> extends LifecycleMana
|
|
|
2566
2566
|
current: Instance | null;
|
|
2567
2567
|
manuallyAnimateOnMount: boolean;
|
|
2568
2568
|
blockInitialAnimation?: boolean;
|
|
2569
|
-
presenceId:
|
|
2569
|
+
presenceId: string | undefined;
|
|
2570
2570
|
isMounted(): boolean;
|
|
2571
2571
|
mount(instance: Instance): void;
|
|
2572
2572
|
unmount(): void;
|
|
@@ -2642,7 +2642,7 @@ declare type VisualElementOptions<Instance, RenderState = any> = {
|
|
|
2642
2642
|
visualState: VisualState<Instance, RenderState>;
|
|
2643
2643
|
parent?: VisualElement<unknown>;
|
|
2644
2644
|
variantParent?: VisualElement<unknown>;
|
|
2645
|
-
presenceId?:
|
|
2645
|
+
presenceId?: string | undefined;
|
|
2646
2646
|
props: MotionProps;
|
|
2647
2647
|
blockInitialAnimation?: boolean;
|
|
2648
2648
|
shouldReduceMotion?: boolean | null;
|
|
@@ -3333,7 +3333,9 @@ declare const Reorder: {
|
|
|
3333
3333
|
unselectable?: "off" | "on" | undefined;
|
|
3334
3334
|
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
3335
3335
|
is?: string | undefined;
|
|
3336
|
-
} & MotionProps &
|
|
3336
|
+
} & MotionProps & {
|
|
3337
|
+
children?: React$1.ReactNode;
|
|
3338
|
+
} & React$1.RefAttributes<any>>;
|
|
3337
3339
|
Item: React$1.ForwardRefExoticComponent<Props$1<unknown> & {
|
|
3338
3340
|
color?: string | undefined;
|
|
3339
3341
|
translate?: "no" | "yes" | undefined;
|
|
@@ -3586,7 +3588,9 @@ declare const Reorder: {
|
|
|
3586
3588
|
unselectable?: "off" | "on" | undefined;
|
|
3587
3589
|
inputMode?: "none" | "text" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
3588
3590
|
is?: string | undefined;
|
|
3589
|
-
} & MotionProps &
|
|
3591
|
+
} & MotionProps & {
|
|
3592
|
+
children?: React$1.ReactNode;
|
|
3593
|
+
} & React$1.RefAttributes<any>>;
|
|
3590
3594
|
};
|
|
3591
3595
|
|
|
3592
3596
|
declare const animations: FeatureComponents;
|
|
@@ -3700,6 +3704,12 @@ interface TransformOptions<T> {
|
|
|
3700
3704
|
* @public
|
|
3701
3705
|
*/
|
|
3702
3706
|
ease?: Easing$1 | Easing$1[];
|
|
3707
|
+
/**
|
|
3708
|
+
* Provide a function that can interpolate between any two values in the provided range.
|
|
3709
|
+
*
|
|
3710
|
+
* @public
|
|
3711
|
+
*/
|
|
3712
|
+
mixer?: (from: T, to: T) => (v: number) => any;
|
|
3703
3713
|
}
|
|
3704
3714
|
/**
|
|
3705
3715
|
* Transforms numbers into other values by mapping them from an input range to an output range.
|
|
@@ -3905,6 +3915,9 @@ declare function useScroll({ container, target, ...options }?: UseScrollOptions)
|
|
|
3905
3915
|
scrollYProgress: MotionValue<number>;
|
|
3906
3916
|
};
|
|
3907
3917
|
|
|
3918
|
+
/**
|
|
3919
|
+
* @deprecated useElementScroll is deprecated. Convert to useScroll({ container: ref })
|
|
3920
|
+
*/
|
|
3908
3921
|
declare function useElementScroll(ref: RefObject<HTMLElement>): {
|
|
3909
3922
|
scrollX: MotionValue<number>;
|
|
3910
3923
|
scrollY: MotionValue<number>;
|
|
@@ -3912,6 +3925,9 @@ declare function useElementScroll(ref: RefObject<HTMLElement>): {
|
|
|
3912
3925
|
scrollYProgress: MotionValue<number>;
|
|
3913
3926
|
};
|
|
3914
3927
|
|
|
3928
|
+
/**
|
|
3929
|
+
* @deprecated useViewportScroll is deprecated. Convert to useScroll()
|
|
3930
|
+
*/
|
|
3915
3931
|
declare function useViewportScroll(): {
|
|
3916
3932
|
scrollX: MotionValue<number>;
|
|
3917
3933
|
scrollY: MotionValue<number>;
|
|
@@ -4034,10 +4050,10 @@ declare function isValidMotionProp(key: string): boolean;
|
|
|
4034
4050
|
* @public
|
|
4035
4051
|
*/
|
|
4036
4052
|
interface PresenceContextProps {
|
|
4037
|
-
id:
|
|
4053
|
+
id: string;
|
|
4038
4054
|
isPresent: boolean;
|
|
4039
|
-
register: (id:
|
|
4040
|
-
onExitComplete?: (id:
|
|
4055
|
+
register: (id: string) => () => void;
|
|
4056
|
+
onExitComplete?: (id: string) => void;
|
|
4041
4057
|
initial?: false | VariantLabels;
|
|
4042
4058
|
custom?: any;
|
|
4043
4059
|
}
|