From ae0d39ccdb6970a5d361d653e989bb9450fcc6d8 Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 13 Nov 2024 12:25:06 +0800 Subject: [PATCH] chore: upgrade to motion Signed-off-by: Innei --- package.json | 4 +-- pnpm-lock.yaml | 34 +++++++++++++++---- .../(home)/components/ActivityPostList.tsx | 4 +-- .../(home)/components/ActivityRecent.tsx | 2 +- src/app/(app)/(home)/page.tsx | 4 +-- src/app/(app)/friends/page.tsx | 2 +- src/app/(app)/thinking/page.tsx | 2 +- src/app/(app)/timeline/page.tsx | 4 +-- src/app/global-error.tsx | 2 +- src/components/layout/dashboard/Header.tsx | 2 +- .../layout/header/internal/AnimatedLogo.tsx | 2 +- .../layout/header/internal/HeaderContent.tsx | 5 +-- .../header/internal/HeaderDrawerContent.tsx | 2 +- .../layout/header/internal/HeaderMeta.tsx | 2 +- .../layout/header/internal/UserAuth.tsx | 2 +- src/components/modules/comment/Comment.tsx | 2 +- .../modules/comment/CommentBox/ActionBar.tsx | 2 +- .../modules/note/NoteActionAside.tsx | 2 +- .../modules/note/NoteLeftSidebar.tsx | 2 +- src/components/modules/note/NoteTimeline.tsx | 4 +-- .../modules/note/NoteTimelineItem.tsx | 4 +-- src/components/modules/peek/PeekModal.tsx | 2 +- .../modules/post/PostActionAside.tsx | 2 +- .../modules/post/PostItemHoverOverlay.tsx | 2 +- src/components/modules/say/SayMasonry.tsx | 2 +- .../modules/shared/AsideDonateButton.tsx | 8 ++--- .../modules/shared/AutoResizeHeight.tsx | 4 +-- .../modules/shared/BanCopyWrapper.tsx | 4 +-- src/components/modules/shared/SearchFAB.tsx | 2 +- src/components/modules/shared/ToastCard.tsx | 2 +- .../shared/WithArticleSelectionAction.tsx | 2 +- src/components/modules/toc/TocTree.tsx | 5 +-- .../ui/auto-completion/AutoCompletion.tsx | 2 +- src/components/ui/button/MotionButton.tsx | 4 +-- .../code-highlighter/shiki/ShikiWrapper.tsx | 4 +-- src/components/ui/collapse/Collapse.tsx | 4 +-- src/components/ui/collapse/index.demo.tsx | 4 +-- src/components/ui/dialog/DialogOverlay.tsx | 2 +- src/components/ui/fab/FABContainer.tsx | 6 ++-- src/components/ui/float-panel/FloatPanel.tsx | 2 +- .../ui/float-popover/FloatPopover.tsx | 5 +-- src/components/ui/input/TextArea.tsx | 2 +- src/components/ui/link-card/LinkCard.tsx | 4 +-- src/components/ui/markdown/renderers/tabs.tsx | 5 +-- src/components/ui/modal/stacked/constants.ts | 2 +- .../ui/modal/stacked/declarative-modal.tsx | 5 +-- src/components/ui/modal/stacked/modal.tsx | 2 +- src/components/ui/modal/stacked/overlay.tsx | 2 +- src/components/ui/modal/stacked/provider.tsx | 2 +- .../ui/number-transition/CountUp.tsx | 2 +- .../NumberSmoothTransition.tsx | 2 +- .../ComponentRender.tsx | 2 +- src/components/ui/tabs/Tabs.tsx | 6 ++-- .../ui/transition/IconTransition.tsx | 5 +-- .../ui/transition/TextUpTransitionView.tsx | 4 +-- src/components/ui/transition/factor.tsx | 4 +-- src/components/ui/transition/typings.ts | 2 +- src/constants/spring.ts | 2 +- src/lib/scroller.ts | 4 +-- src/providers/root/framer-lazy-feature.ts | 2 +- src/providers/root/index.tsx | 2 +- src/queries/hooks/authjs.tsx | 2 +- storybook/src/main.tsx | 4 +-- 63 files changed, 126 insertions(+), 98 deletions(-) diff --git a/package.json b/package.json index a10f0e8428..e957c3afaa 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "emoji-mart": "5.6.0", "emoji-picker-react": "4.12.0", "foxact": "0.2.40", - "framer-motion": "11.11.1", "fuse.js": "7.0.0", "idb-keyval": "6.2.1", "immer": "^10.1.1", @@ -85,6 +84,7 @@ "marked": "14.1.3", "medium-zoom": "1.1.0", "mermaid": "11.4.0", + "motion": "11.11.14", "nanoid": "^5.0.7", "next": "14.2.8", "next-auth": "4.24.7", @@ -210,4 +210,4 @@ "browserslist": [ "defaults and fully supports es6-module" ] -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c55e514268..f8e1c0f5df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -166,9 +166,6 @@ importers: foxact: specifier: 0.2.40 version: 0.2.40(react@18.3.1) - framer-motion: - specifier: 11.11.1 - version: 11.11.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) fuse.js: specifier: 7.0.0 version: 7.0.0 @@ -217,6 +214,9 @@ importers: mermaid: specifier: 11.4.0 version: 11.4.0 + motion: + specifier: 11.11.14 + version: 11.11.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nanoid: specifier: ^5.0.7 version: 5.0.7 @@ -3887,8 +3887,8 @@ packages: fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} - framer-motion@11.11.1: - resolution: {integrity: sha512-Ucr9eHSrk0d+l6vyl9fvq6omh/PAWHjS+PlczpsoUdhJo1TuF3ULWJNuAMnpWQ1dGyPOyoUVuYlUKjE/s8dyCA==} + framer-motion@11.11.13: + resolution: {integrity: sha512-aoEA83gsqRRsnh4TN7S9YNcKVLrg+GtPNnxNMd9bGn23+pLmuKGQeccPnqffEKzlkgmy2MkMo0jRkK41S2LzWw==} peerDependencies: '@emotion/is-prop-valid': '*' react: ^18.0.0 @@ -4715,6 +4715,20 @@ packages: mnemonist@0.39.8: resolution: {integrity: sha512-vyWo2K3fjrUw8YeeZ1zF0fy6Mu59RHokURlld8ymdUPjMlD9EC9ov1/YPqTgqRvUN9nTr3Gqfz29LYAmu0PHPQ==} + motion@11.11.14: + resolution: {integrity: sha512-WABtM4t3+SQ4jQ/5TDkRsH9VD6jakGeOrnzra4tnDma0JUT21/n113yCyn889yJSq0bEJnfFphFXo0gOVRICXg==} + peerDependencies: + '@emotion/is-prop-valid': '*' + react: ^18.0.0 + react-dom: ^18.0.0 + peerDependenciesMeta: + '@emotion/is-prop-valid': + optional: true + react: + optional: true + react-dom: + optional: true + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -10672,7 +10686,7 @@ snapshots: fraction.js@4.3.7: {} - framer-motion@11.11.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + framer-motion@11.11.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: tslib: 2.7.0 optionalDependencies: @@ -11773,6 +11787,14 @@ snapshots: dependencies: obliterator: 2.0.4 + motion@11.11.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + framer-motion: 11.11.13(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tslib: 2.7.0 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + mri@1.2.0: {} mrmime@2.0.0: {} diff --git a/src/app/(app)/(home)/components/ActivityPostList.tsx b/src/app/(app)/(home)/components/ActivityPostList.tsx index 79b9139959..bf4e31aae7 100644 --- a/src/app/(app)/(home)/components/ActivityPostList.tsx +++ b/src/app/(app)/(home)/components/ActivityPostList.tsx @@ -1,8 +1,8 @@ 'use client' -import { m } from 'framer-motion' +import { m } from 'motion/react' import Link from 'next/link' -import React from 'react' +import * as React from 'react' import { Divider } from '~/components/ui/divider' import { RelativeTime } from '~/components/ui/relative-time' diff --git a/src/app/(app)/(home)/components/ActivityRecent.tsx b/src/app/(app)/(home)/components/ActivityRecent.tsx index 15b0014f20..07142125e1 100644 --- a/src/app/(app)/(home)/components/ActivityRecent.tsx +++ b/src/app/(app)/(home)/components/ActivityRecent.tsx @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query' import clsx from 'clsx' -import { m } from 'framer-motion' +import { m } from 'motion/react' import { useMemo } from 'react' import { ScrollArea } from '~/components/ui/scroll-area' diff --git a/src/app/(app)/(home)/page.tsx b/src/app/(app)/(home)/page.tsx index 7c7f524b89..c512d729d9 100644 --- a/src/app/(app)/(home)/page.tsx +++ b/src/app/(app)/(home)/page.tsx @@ -2,9 +2,9 @@ import { useQuery, useQueryClient } from '@tanstack/react-query' import clsx from 'clsx' -import { m } from 'framer-motion' +import { m } from 'motion/react' import Image from 'next/image' -import type React from 'react' +import type * as React from 'react' import { createElement } from 'react' import { ErrorBoundary } from '~/components/common/ErrorBoundary' diff --git a/src/app/(app)/friends/page.tsx b/src/app/(app)/friends/page.tsx index 8900a19753..0f92cb963a 100644 --- a/src/app/(app)/friends/page.tsx +++ b/src/app/(app)/friends/page.tsx @@ -3,8 +3,8 @@ import type { LinkModel } from '@mx-space/api-client' import { LinkState, LinkType, RequestError } from '@mx-space/api-client' import { useQuery } from '@tanstack/react-query' -import { m } from 'framer-motion' import Markdown from 'markdown-to-jsx' +import { m } from 'motion/react' import type { FC } from 'react' import { memo, useCallback, useRef, useState } from 'react' diff --git a/src/app/(app)/thinking/page.tsx b/src/app/(app)/thinking/page.tsx index f8ce9e870f..225f15a340 100644 --- a/src/app/(app)/thinking/page.tsx +++ b/src/app/(app)/thinking/page.tsx @@ -12,8 +12,8 @@ import { useQueryClient, } from '@tanstack/react-query' import clsx from 'clsx' -import { stagger, useAnimate } from 'framer-motion' import { produce } from 'immer' +import { stagger, useAnimate } from 'motion/react' import type { FC } from 'react' import { useEffect, useMemo, useState } from 'react' diff --git a/src/app/(app)/timeline/page.tsx b/src/app/(app)/timeline/page.tsx index 6d9aa26662..5340e53a18 100644 --- a/src/app/(app)/timeline/page.tsx +++ b/src/app/(app)/timeline/page.tsx @@ -4,7 +4,7 @@ import type { TimelineData } from '@mx-space/api-client' import { TimelineType } from '@mx-space/api-client' import { useQuery } from '@tanstack/react-query' import clsx from 'clsx' -import { m } from 'framer-motion' +import { m } from 'motion/react' import { useRouter, useSearchParams } from 'next/navigation' import { memo, useEffect } from 'react' @@ -197,7 +197,7 @@ export default function TimelinePage() { {year} diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx index bf1b32cabd..bd00e372a2 100644 --- a/src/app/global-error.tsx +++ b/src/app/global-error.tsx @@ -1,6 +1,6 @@ 'use client' -import { domAnimation, LazyMotion } from 'framer-motion' +import { domAnimation, LazyMotion } from 'motion/react' import { useEffect } from 'react' // import { captureException } from '@sentry/nextjs' diff --git a/src/components/layout/dashboard/Header.tsx b/src/components/layout/dashboard/Header.tsx index 6b266db195..ee222297ed 100644 --- a/src/components/layout/dashboard/Header.tsx +++ b/src/components/layout/dashboard/Header.tsx @@ -1,7 +1,7 @@ 'use client' -import { m } from 'framer-motion' import { atom, useAtom, useSetAtom } from 'jotai' +import { m } from 'motion/react' import Image from 'next/image' import NextLink from 'next/link' import { usePathname, useRouter } from 'next/navigation' diff --git a/src/components/layout/header/internal/AnimatedLogo.tsx b/src/components/layout/header/internal/AnimatedLogo.tsx index 17667e39ea..da0b4d3064 100644 --- a/src/components/layout/header/internal/AnimatedLogo.tsx +++ b/src/components/layout/header/internal/AnimatedLogo.tsx @@ -1,7 +1,7 @@ 'use client' import { useQuery } from '@tanstack/react-query' -import { AnimatePresence, m } from 'framer-motion' +import { AnimatePresence, m } from 'motion/react' import { useRouter } from 'next/navigation' import { useCallback } from 'react' diff --git a/src/components/layout/header/internal/HeaderContent.tsx b/src/components/layout/header/internal/HeaderContent.tsx index 4e81c1cb3d..400dee5f52 100644 --- a/src/components/layout/header/internal/HeaderContent.tsx +++ b/src/components/layout/header/internal/HeaderContent.tsx @@ -7,10 +7,11 @@ import { m, useMotionTemplate, useMotionValue, -} from 'framer-motion' +} from 'motion/react' import Link from 'next/link' import { usePathname } from 'next/navigation' -import React, { memo } from 'react' +import * as React from 'react' +import { memo } from 'react' import { RootPortal } from '~/components/ui/portal' import useDebounceValue from '~/hooks/common/use-debounce-value' diff --git a/src/components/layout/header/internal/HeaderDrawerContent.tsx b/src/components/layout/header/internal/HeaderDrawerContent.tsx index 20bcadf1c1..752d1772eb 100644 --- a/src/components/layout/header/internal/HeaderDrawerContent.tsx +++ b/src/components/layout/header/internal/HeaderDrawerContent.tsx @@ -1,6 +1,6 @@ 'use client' -import { m } from 'framer-motion' +import { m } from 'motion/react' import Link from 'next/link' import { memo } from 'react' diff --git a/src/components/layout/header/internal/HeaderMeta.tsx b/src/components/layout/header/internal/HeaderMeta.tsx index 2f6afc70e1..714362e770 100644 --- a/src/components/layout/header/internal/HeaderMeta.tsx +++ b/src/components/layout/header/internal/HeaderMeta.tsx @@ -1,6 +1,6 @@ 'use client' -import { AnimatePresence, m } from 'framer-motion' +import { AnimatePresence, m } from 'motion/react' import { microReboundPreset } from '~/constants/spring' import { useAggregationSelector } from '~/providers/root/aggregation-data-provider' diff --git a/src/components/layout/header/internal/UserAuth.tsx b/src/components/layout/header/internal/UserAuth.tsx index bdcb619f58..269ec4781e 100644 --- a/src/components/layout/header/internal/UserAuth.tsx +++ b/src/components/layout/header/internal/UserAuth.tsx @@ -1,6 +1,6 @@ 'use client' -import { AnimatePresence } from 'framer-motion' +import { AnimatePresence } from 'motion/react' import Image from 'next/image' import { Fragment } from 'react' diff --git a/src/components/modules/comment/Comment.tsx b/src/components/modules/comment/Comment.tsx index 4654beec93..b811d19131 100644 --- a/src/components/modules/comment/Comment.tsx +++ b/src/components/modules/comment/Comment.tsx @@ -1,7 +1,7 @@ import type { CommentModel } from '@mx-space/api-client' import clsx from 'clsx' -import { m } from 'framer-motion' import { atom, useAtomValue } from 'jotai' +import { m } from 'motion/react' import type { BuiltInProviderType } from 'next-auth/providers/index' import type { PropsWithChildren } from 'react' import { diff --git a/src/components/modules/comment/CommentBox/ActionBar.tsx b/src/components/modules/comment/CommentBox/ActionBar.tsx index 63bd9984b8..0e78a2b2d7 100644 --- a/src/components/modules/comment/CommentBox/ActionBar.tsx +++ b/src/components/modules/comment/CommentBox/ActionBar.tsx @@ -1,8 +1,8 @@ 'use client' import clsx from 'clsx' -import { AnimatePresence, m } from 'framer-motion' import { useAtomValue } from 'jotai' +import { AnimatePresence, m } from 'motion/react' import { useIsLogged } from '~/atoms/hooks' import { TiltedSendIcon } from '~/components/icons/TiltedSendIcon' diff --git a/src/components/modules/note/NoteActionAside.tsx b/src/components/modules/note/NoteActionAside.tsx index a45017770b..6eeeb91731 100644 --- a/src/components/modules/note/NoteActionAside.tsx +++ b/src/components/modules/note/NoteActionAside.tsx @@ -1,6 +1,6 @@ 'use client' -import { m, useAnimationControls } from 'framer-motion' +import { m, useAnimationControls } from 'motion/react' import { useIsMobile } from '~/atoms/hooks' import { MotionButtonBase } from '~/components/ui/button' diff --git a/src/components/modules/note/NoteLeftSidebar.tsx b/src/components/modules/note/NoteLeftSidebar.tsx index 85608bf21f..5ea1645c37 100644 --- a/src/components/modules/note/NoteLeftSidebar.tsx +++ b/src/components/modules/note/NoteLeftSidebar.tsx @@ -1,6 +1,6 @@ 'use client' -import { m } from 'framer-motion' +import { m } from 'motion/react' import { OnlyDesktop } from '~/components/ui/viewport' diff --git a/src/components/modules/note/NoteTimeline.tsx b/src/components/modules/note/NoteTimeline.tsx index 9656fb15f9..eb1af212d7 100644 --- a/src/components/modules/note/NoteTimeline.tsx +++ b/src/components/modules/note/NoteTimeline.tsx @@ -1,8 +1,8 @@ 'use client' import { keepPreviousData, useQuery } from '@tanstack/react-query' -import type { TargetAndTransition } from 'framer-motion' -import { AnimatePresence, m } from 'framer-motion' +import type { TargetAndTransition } from 'motion/react' +import { AnimatePresence, m } from 'motion/react' import { memo } from 'react' import { apiClient } from '~/lib/request' diff --git a/src/components/modules/note/NoteTimelineItem.tsx b/src/components/modules/note/NoteTimelineItem.tsx index 15c1942a63..d6ed4aacad 100644 --- a/src/components/modules/note/NoteTimelineItem.tsx +++ b/src/components/modules/note/NoteTimelineItem.tsx @@ -1,7 +1,7 @@ 'use client' -import type { Target, TargetAndTransition } from 'framer-motion' -import { m } from 'framer-motion' +import type { Target, TargetAndTransition } from 'motion/react' +import { m } from 'motion/react' import Link from 'next/link' import { memo } from 'react' import { tv } from 'tailwind-variants' diff --git a/src/components/modules/peek/PeekModal.tsx b/src/components/modules/peek/PeekModal.tsx index 768b8f264e..5731aac476 100644 --- a/src/components/modules/peek/PeekModal.tsx +++ b/src/components/modules/peek/PeekModal.tsx @@ -1,4 +1,4 @@ -import { m } from 'framer-motion' +import { m } from 'motion/react' import Link from 'next/link' import type { PropsWithChildren } from 'react' diff --git a/src/components/modules/post/PostActionAside.tsx b/src/components/modules/post/PostActionAside.tsx index 9272ff10f7..d5b9527d1e 100644 --- a/src/components/modules/post/PostActionAside.tsx +++ b/src/components/modules/post/PostActionAside.tsx @@ -1,6 +1,6 @@ 'use client' -import { m, useAnimationControls } from 'framer-motion' +import { m, useAnimationControls } from 'motion/react' import { useIsMobile } from '~/atoms/hooks' import { ThumbsupIcon } from '~/components/icons/thumbs-up' diff --git a/src/components/modules/post/PostItemHoverOverlay.tsx b/src/components/modules/post/PostItemHoverOverlay.tsx index cbbd9ba9fa..4b22bb7fad 100644 --- a/src/components/modules/post/PostItemHoverOverlay.tsx +++ b/src/components/modules/post/PostItemHoverOverlay.tsx @@ -1,7 +1,7 @@ 'use client' import clsx from 'clsx' -import { AnimatePresence, m } from 'framer-motion' +import { AnimatePresence, m } from 'motion/react' import { useEffect, useRef, useState } from 'react' export const PostItemHoverOverlay = () => { diff --git a/src/components/modules/say/SayMasonry.tsx b/src/components/modules/say/SayMasonry.tsx index 696457933a..7bacc23b00 100644 --- a/src/components/modules/say/SayMasonry.tsx +++ b/src/components/modules/say/SayMasonry.tsx @@ -1,9 +1,9 @@ 'use client' import type { SayModel } from '@mx-space/api-client' -import { m } from 'framer-motion' import type { MarkdownToJSX } from 'markdown-to-jsx' import Markdown from 'markdown-to-jsx' +import { m } from 'motion/react' import { memo, useMemo } from 'react' import Masonry from 'react-responsive-masonry' diff --git a/src/components/modules/shared/AsideDonateButton.tsx b/src/components/modules/shared/AsideDonateButton.tsx index 3c78d4f848..cd7b14ab06 100644 --- a/src/components/modules/shared/AsideDonateButton.tsx +++ b/src/components/modules/shared/AsideDonateButton.tsx @@ -1,7 +1,7 @@ import { DialogContent, DialogPortal, Root } from '@radix-ui/react-dialog' -import type { HTMLMotionProps } from 'framer-motion' -import { AnimatePresence, m } from 'framer-motion' import { atom, useAtomValue, useSetAtom } from 'jotai' +import type { HTMLMotionProps } from 'motion/react' +import { AnimatePresence, m } from 'motion/react' import { useState } from 'react' import { useIsMobile } from '~/atoms/hooks' @@ -43,7 +43,7 @@ export const AsideDonateButton = () => { {overlayOpen && ( <> - + @@ -154,7 +154,7 @@ const DonateContent = () => { 感谢您的支持,助力梦想继续前行。 -
+
{donate?.qrcode?.map((src) => ( = (props) => { { duration?: number diff --git a/src/constants/spring.ts b/src/constants/spring.ts index bb7ef08f79..a549c294dd 100644 --- a/src/constants/spring.ts +++ b/src/constants/spring.ts @@ -1,4 +1,4 @@ -import type { Spring } from 'framer-motion' +import type { Spring } from 'motion/react' export const reboundPreset: Spring = { type: 'spring', diff --git a/src/lib/scroller.ts b/src/lib/scroller.ts index 386c1ad7bd..47e733b02d 100644 --- a/src/lib/scroller.ts +++ b/src/lib/scroller.ts @@ -1,7 +1,7 @@ 'use client' -import type { Spring } from 'framer-motion' -import { animateValue } from 'framer-motion' +import type { Spring } from 'motion/react' +import { animateValue } from 'motion/react' const spring: Spring = { type: 'spring', diff --git a/src/providers/root/framer-lazy-feature.ts b/src/providers/root/framer-lazy-feature.ts index 8457bb3e99..7f7246c5f6 100644 --- a/src/providers/root/framer-lazy-feature.ts +++ b/src/providers/root/framer-lazy-feature.ts @@ -1 +1 @@ -export { domMax as default } from 'framer-motion' +export { domMax as default } from 'motion/react' diff --git a/src/providers/root/index.tsx b/src/providers/root/index.tsx index 53818e4dc9..1f2856166c 100644 --- a/src/providers/root/index.tsx +++ b/src/providers/root/index.tsx @@ -1,6 +1,6 @@ 'use client' -import { LazyMotion } from 'framer-motion' +import { LazyMotion } from 'motion/react' import { SessionProvider } from 'next-auth/react' import { ThemeProvider } from 'next-themes' import type { JSX, PropsWithChildren } from 'react' diff --git a/src/queries/hooks/authjs.tsx b/src/queries/hooks/authjs.tsx index 61445d78c7..1041c4d388 100644 --- a/src/queries/hooks/authjs.tsx +++ b/src/queries/hooks/authjs.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query' -import { m } from 'framer-motion' +import { m } from 'motion/react' import Image from 'next/image' import { getProviders } from 'next-auth/react' import type { FC } from 'react' diff --git a/storybook/src/main.tsx b/storybook/src/main.tsx index f4b2eda646..3b39c595d1 100644 --- a/storybook/src/main.tsx +++ b/storybook/src/main.tsx @@ -2,13 +2,13 @@ import './index.css' import './markdown.css' import '../../src/styles/index.css' -import { LazyMotion } from 'framer-motion' +import { LazyMotion } from 'motion/react' import ReactDOM from 'react-dom/client' import { RouterProvider } from 'react-router-dom' import { routes } from './router' -const load = () => import('framer-motion').then((res) => res.domMax) +const load = () => import('motion/react').then((res) => res.domMax) ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(