Skip to content

Commit

Permalink
Latest (#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry authored Feb 3, 2025
1 parent eed2070 commit 90f083e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as React from "react"
import { useCallback, useId, useMemo } from "react"
import {
PresenceContext,
PresenceContextProps,
type PresenceContextProps,
} from "../../context/PresenceContext"
import { VariantLabels } from "../../motion/types"
import { useConstant } from "../../utils/use-constant"
Expand Down
2 changes: 1 addition & 1 deletion packages/framer-motion/src/context/MotionContext/create.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext, useMemo } from "react"
import { MotionContext, MotionContextProps } from "."
import { MotionContext, type MotionContextProps } from "."
import { MotionProps } from "../../motion/types"
import { getCurrentTreeVariants } from "./utils"

Expand Down
4 changes: 3 additions & 1 deletion packages/framer-motion/src/context/MotionContext/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export interface MotionContextProps<Instance = unknown> {
animate?: string | string[]
}

export const MotionContext = createContext<MotionContextProps>({})
export const MotionContext = /* @__PURE__ */ createContext<MotionContextProps>(
{}
)
4 changes: 2 additions & 2 deletions packages/framer-motion/src/context/MotionContext/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MotionContextProps } from "."
import type { MotionContextProps } from "."
import { MotionProps } from "../../motion/types"
import { isVariantLabel } from "../../render/utils/is-variant-label"
import { isControllingVariants } from "../../render/utils/is-controlling-variants"
import { isVariantLabel } from "../../render/utils/is-variant-label"

export function getCurrentTreeVariants(
props: MotionProps,
Expand Down
3 changes: 2 additions & 1 deletion packages/framer-motion/src/context/PresenceContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export interface PresenceContextProps {
/**
* @public
*/
export const PresenceContext = createContext<PresenceContextProps | null>(null)
export const PresenceContext =
/* @__PURE__ */ createContext<PresenceContextProps | null>(null)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { isAnimationControls } from "../../animation/utils/is-animation-controls
import { MotionContext, MotionContextProps } from "../../context/MotionContext"
import {
PresenceContext,
PresenceContextProps,
type PresenceContextProps,
} from "../../context/PresenceContext"
import { ResolvedValues, ScrapeMotionValuesFromProps } from "../../render/types"
import {
Expand Down
10 changes: 5 additions & 5 deletions packages/framer-motion/src/render/types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { VisualState } from "../motion/utils/use-visual-state"
import { MotionValue } from "../value"
import { AnimationDefinition } from "../animation/types"
import { ReducedMotionConfig } from "../context/MotionConfigContext"
import type { PresenceContextProps } from "../context/PresenceContext"
import { MotionProps } from "../motion/types"
import { VisualState } from "../motion/utils/use-visual-state"
import type { Axis, Box } from "../projection/geometry/types"
import { MotionValue } from "../value"
import type { VisualElement } from "./VisualElement"
import { PresenceContextProps } from "../context/PresenceContext"
import { MotionProps } from "../motion/types"
import { AnimationDefinition } from "../animation/types"

export type GenericValues = {
[key: string]: string | number
Expand Down

0 comments on commit 90f083e

Please sign in to comment.