|
| 1 | +import { microtask } from "motion-dom" |
1 | 2 | import * as React from "react"
|
2 |
| -import { useContext, useRef, useEffect, useInsertionEffect } from "react" |
3 |
| -import { PresenceContext } from "../../context/PresenceContext" |
4 |
| -import { MotionProps } from "../../motion/types" |
5 |
| -import { MotionContext } from "../../context/MotionContext" |
6 |
| -import { CreateVisualElement } from "../../render/types" |
7 |
| -import { useIsomorphicLayoutEffect } from "../../utils/use-isomorphic-effect" |
8 |
| -import { VisualState } from "./use-visual-state" |
| 3 | +import { useContext, useEffect, useInsertionEffect, useRef } from "react" |
| 4 | +import { optimizedAppearDataAttribute } from "../../animation/optimized-appear/data-id" |
9 | 5 | import { LazyContext } from "../../context/LazyContext"
|
10 | 6 | import { MotionConfigContext } from "../../context/MotionConfigContext"
|
11 |
| -import type { VisualElement } from "../../render/VisualElement" |
12 |
| -import { optimizedAppearDataAttribute } from "../../animation/optimized-appear/data-id" |
13 |
| -import { microtask } from "../../frameloop/microtask" |
14 |
| -import { IProjectionNode } from "../../projection/node/types" |
15 |
| -import { isRefObject } from "../../utils/is-ref-object" |
| 7 | +import { MotionContext } from "../../context/MotionContext" |
| 8 | +import { PresenceContext } from "../../context/PresenceContext" |
16 | 9 | import {
|
17 | 10 | InitialPromotionConfig,
|
18 | 11 | SwitchLayoutGroupContext,
|
19 | 12 | } from "../../context/SwitchLayoutGroupContext"
|
| 13 | +import { MotionProps } from "../../motion/types" |
| 14 | +import { IProjectionNode } from "../../projection/node/types" |
| 15 | +import { CreateVisualElement } from "../../render/types" |
| 16 | +import type { VisualElement } from "../../render/VisualElement" |
| 17 | +import { isRefObject } from "../../utils/is-ref-object" |
| 18 | +import { useIsomorphicLayoutEffect } from "../../utils/use-isomorphic-effect" |
| 19 | +import { VisualState } from "./use-visual-state" |
20 | 20 |
|
21 | 21 | export function useVisualElement<Instance, RenderState>(
|
22 | 22 | Component: string | React.ComponentType<React.PropsWithChildren<unknown>>,
|
|
0 commit comments