Initial commit
This commit is contained in:
10
node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs
generated
vendored
Normal file
10
node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { createContext } from 'react';
|
||||
|
||||
/**
|
||||
* Note: Still used by components generated by old versions of Framer
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
const DeprecatedLayoutGroupContext = createContext(null);
|
||||
|
||||
export { DeprecatedLayoutGroupContext };
|
||||
6
node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
generated
vendored
Normal file
6
node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
const LayoutGroupContext = createContext({});
|
||||
|
||||
export { LayoutGroupContext };
|
||||
6
node_modules/framer-motion/dist/es/context/LazyContext.mjs
generated
vendored
Normal file
6
node_modules/framer-motion/dist/es/context/LazyContext.mjs
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
const LazyContext = createContext({ strict: false });
|
||||
|
||||
export { LazyContext };
|
||||
13
node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs
generated
vendored
Normal file
13
node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
const MotionConfigContext = createContext({
|
||||
transformPagePoint: (p) => p,
|
||||
isStatic: false,
|
||||
reducedMotion: "never",
|
||||
});
|
||||
|
||||
export { MotionConfigContext };
|
||||
13
node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
generated
vendored
Normal file
13
node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import { useContext, useMemo } from 'react';
|
||||
import { MotionContext } from './index.mjs';
|
||||
import { getCurrentTreeVariants } from './utils.mjs';
|
||||
|
||||
function useCreateMotionContext(props) {
|
||||
const { initial, animate } = getCurrentTreeVariants(props, useContext(MotionContext));
|
||||
return useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
|
||||
}
|
||||
function variantLabelsAsDependency(prop) {
|
||||
return Array.isArray(prop) ? prop.join(" ") : prop;
|
||||
}
|
||||
|
||||
export { useCreateMotionContext };
|
||||
6
node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
generated
vendored
Normal file
6
node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
const MotionContext = createContext({});
|
||||
|
||||
export { MotionContext };
|
||||
17
node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs
generated
vendored
Normal file
17
node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { isVariantLabel } from '../../render/utils/is-variant-label.mjs';
|
||||
import { isControllingVariants } from '../../render/utils/is-controlling-variants.mjs';
|
||||
|
||||
function getCurrentTreeVariants(props, context) {
|
||||
if (isControllingVariants(props)) {
|
||||
const { initial, animate } = props;
|
||||
return {
|
||||
initial: initial === false || isVariantLabel(initial)
|
||||
? initial
|
||||
: undefined,
|
||||
animate: isVariantLabel(animate) ? animate : undefined,
|
||||
};
|
||||
}
|
||||
return props.inherit !== false ? context : {};
|
||||
}
|
||||
|
||||
export { getCurrentTreeVariants };
|
||||
9
node_modules/framer-motion/dist/es/context/PresenceContext.mjs
generated
vendored
Normal file
9
node_modules/framer-motion/dist/es/context/PresenceContext.mjs
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
const PresenceContext = createContext(null);
|
||||
|
||||
export { PresenceContext };
|
||||
6
node_modules/framer-motion/dist/es/context/ReorderContext.mjs
generated
vendored
Normal file
6
node_modules/framer-motion/dist/es/context/ReorderContext.mjs
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
const ReorderContext = createContext(null);
|
||||
|
||||
export { ReorderContext };
|
||||
9
node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
generated
vendored
Normal file
9
node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use client";
|
||||
import { createContext } from 'react';
|
||||
|
||||
/**
|
||||
* Internal, exported only for usage in Framer
|
||||
*/
|
||||
const SwitchLayoutGroupContext = createContext({});
|
||||
|
||||
export { SwitchLayoutGroupContext };
|
||||
Reference in New Issue
Block a user