Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

feat: update framer-motion to motion

Marc Seitz8c47177e4902
diff --git a/components/datarooms/dataroom-items-list.tsx b/components/datarooms/dataroom-items-list.tsx
index 8e071a44..4386863a 100644
--- a/components/datarooms/dataroom-items-list.tsx
+++ b/components/datarooms/dataroom-items-list.tsx
@@ -14,7 +14,6 @@ import {
useSensor,
useSensors,
} from "@dnd-kit/core";
-import { motion } from "framer-motion";
import {
ArchiveXIcon,
FileIcon,
@@ -22,6 +21,7 @@ import {
FolderInputIcon,
XIcon,
} from "lucide-react";
+import { motion } from "motion/react";
import { EmptyDocuments } from "@/components/documents/empty-document";
import FolderCard from "@/components/documents/folder-card";
diff --git a/components/documents/documents-list.tsx b/components/documents/documents-list.tsx
index 17359eab..a899d8f6 100644
--- a/components/documents/documents-list.tsx
+++ b/components/documents/documents-list.tsx
@@ -15,7 +15,6 @@ import {
useSensor,
useSensors,
} from "@dnd-kit/core";
-import { motion } from "framer-motion";
import {
FileIcon,
FolderIcon,
@@ -23,6 +22,7 @@ import {
Trash2Icon,
XIcon,
} from "lucide-react";
+import { motion } from "motion/react";
import { Skeleton } from "@/components/ui/skeleton";
import { UploadNotificationDrawer } from "@/components/upload-notification";
diff --git a/components/domains/domain-card.tsx b/components/domains/domain-card.tsx
index 4fa1f207..ab34fbb4 100644
--- a/components/domains/domain-card.tsx
+++ b/components/domains/domain-card.tsx
@@ -1,7 +1,6 @@
import { useRef, useState } from "react";
import { useTeam } from "@/context/team-context";
-import { motion } from "framer-motion";
import {
ChevronDownIcon,
CircleCheckIcon,
@@ -12,6 +11,7 @@ import {
SettingsIcon,
TrashIcon,
} from "lucide-react";
+import { motion } from "motion/react";
import { mutate } from "swr";
import { Button } from "@/components/ui/button";
diff --git a/components/links/link-sheet/agreement-section.tsx b/components/links/link-sheet/agreement-section.tsx
index 114f5725..3e2059ce 100644
--- a/components/links/link-sheet/agreement-section.tsx
+++ b/components/links/link-sheet/agreement-section.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import {
Select,
diff --git a/components/links/link-sheet/allow-list-section.tsx b/components/links/link-sheet/allow-list-section.tsx
index 13176399..83f9cde3 100644
--- a/components/links/link-sheet/allow-list-section.tsx
+++ b/components/links/link-sheet/allow-list-section.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { Textarea } from "@/components/ui/textarea";
diff --git a/components/links/link-sheet/deny-list-section.tsx b/components/links/link-sheet/deny-list-section.tsx
index 79c2f49d..970e5612 100644
--- a/components/links/link-sheet/deny-list-section.tsx
+++ b/components/links/link-sheet/deny-list-section.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { Textarea } from "@/components/ui/textarea";
diff --git a/components/links/link-sheet/expiration-section.tsx b/components/links/link-sheet/expiration-section.tsx
index e820f80b..3ce56c92 100644
--- a/components/links/link-sheet/expiration-section.tsx
+++ b/components/links/link-sheet/expiration-section.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { Input } from "@/components/ui/input";
diff --git a/components/links/link-sheet/og-section.tsx b/components/links/link-sheet/og-section.tsx
index 854bcc14..d36f74a0 100644
--- a/components/links/link-sheet/og-section.tsx
+++ b/components/links/link-sheet/og-section.tsx
@@ -3,8 +3,8 @@ import { ChangeEvent, useCallback, useEffect, useState } from "react";
import { useTeam } from "@/context/team-context";
import { LinkPreset } from "@prisma/client";
import { Label } from "@radix-ui/react-label";
-import { motion } from "framer-motion";
import { Upload as ArrowUpTrayIcon, PlusIcon } from "lucide-react";
+import { motion } from "motion/react";
import useSWRImmutable from "swr/immutable";
import { Input } from "@/components/ui/input";
diff --git a/components/links/link-sheet/password-section.tsx b/components/links/link-sheet/password-section.tsx
index a826cfd1..1566b652 100644
--- a/components/links/link-sheet/password-section.tsx
+++ b/components/links/link-sheet/password-section.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import Eye from "@/components/shared/icons/eye";
import EyeOff from "@/components/shared/icons/eye-off";
diff --git a/components/links/link-sheet/question-section.tsx b/components/links/link-sheet/question-section.tsx
index d1fc9e51..f885fbc6 100644
--- a/components/links/link-sheet/question-section.tsx
+++ b/components/links/link-sheet/question-section.tsx
@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
diff --git a/components/links/link-sheet/watermark-panel/index.tsx b/components/links/link-sheet/watermark-panel/index.tsx
index 29515880..7f2aa820 100644
--- a/components/links/link-sheet/watermark-panel/index.tsx
+++ b/components/links/link-sheet/watermark-panel/index.tsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { HexColorInput, HexColorPicker } from "react-colorful";
import { z } from "zod";
diff --git a/components/links/link-sheet/watermark-section.tsx b/components/links/link-sheet/watermark-section.tsx
index 790fbaec..d7877f39 100644
--- a/components/links/link-sheet/watermark-section.tsx
+++ b/components/links/link-sheet/watermark-section.tsx
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
-import { motion } from "framer-motion";
import { SettingsIcon, StampIcon } from "lucide-react";
+import { motion } from "motion/react";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
diff --git a/components/ui/tab-select.tsx b/components/ui/tab-select.tsx
index 11d5647c..b78548cf 100644
--- a/components/ui/tab-select.tsx
+++ b/components/ui/tab-select.tsx
@@ -1,6 +1,6 @@
import { Dispatch, SetStateAction, useId } from "react";
-import { LayoutGroup, motion } from "framer-motion";
+import { LayoutGroup, motion } from "motion/react";
import { cn } from "@/lib/utils";
diff --git a/components/view/question.tsx b/components/view/question.tsx
index f7b134b6..045867a6 100644
--- a/components/view/question.tsx
+++ b/components/view/question.tsx
@@ -1,7 +1,7 @@
import { useState } from "react";
-import { motion } from "framer-motion";
import { ThumbsDownIcon, ThumbsUpIcon } from "lucide-react";
+import { motion } from "motion/react";
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
import { cn } from "@/lib/utils";
diff --git a/components/view/visitor-graph.tsx b/components/view/visitor-graph.tsx
index 342f5331..1df9cfea 100644
--- a/components/view/visitor-graph.tsx
+++ b/components/view/visitor-graph.tsx
@@ -3,7 +3,7 @@ import Link from "next/link";
import { useState } from "react";
import { BarChart } from "@tremor/react";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { signIn } from "next-auth/react";
import { useAnalytics } from "@/lib/analytics";
diff --git a/components/welcome/containers/link-option-container.tsx b/components/welcome/containers/link-option-container.tsx
index a5c290a8..b58c4016 100644
--- a/components/welcome/containers/link-option-container.tsx
+++ b/components/welcome/containers/link-option-container.tsx
@@ -4,7 +4,7 @@ import { Dispatch, SetStateAction, useState } from "react";
import { useTeam } from "@/context/team-context";
import { LinkType } from "@prisma/client";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { toast } from "sonner";
import { DEFAULT_LINK_TYPE } from "@/components/links/link-sheet";
diff --git a/components/welcome/containers/upload-container.tsx b/components/welcome/containers/upload-container.tsx
index 9d7c21c6..97d64569 100644
--- a/components/welcome/containers/upload-container.tsx
+++ b/components/welcome/containers/upload-container.tsx
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
import { Dispatch, SetStateAction, useState } from "react";
import { useTeam } from "@/context/team-context";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { toast } from "sonner";
import DocumentUpload from "@/components/document-upload";
diff --git a/components/welcome/dataroom-trial.tsx b/components/welcome/dataroom-trial.tsx
index ebd01296..3938ef71 100644
--- a/components/welcome/dataroom-trial.tsx
+++ b/components/welcome/dataroom-trial.tsx
@@ -1,35 +1,30 @@
import { useRouter } from "next/router";
-
-
import { useState } from "react";
-
-
import { useTeam } from "@/context/team-context";
-import { motion } from "framer-motion";
import { E164Number } from "libphonenumber-js";
+import { motion } from "motion/react";
import { toast } from "sonner";
import { mutate } from "swr";
-
-
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { PhoneInput } from "@/components/ui/phone-input";
-import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
-
-
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
import { useAnalytics } from "@/lib/analytics";
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
-
-
import { UpgradePlanModal } from "../billing/upgrade-plan-modal";
import { Input } from "../ui/input";
-
export default function DataroomTrial() {
const teamInfo = useTeam();
const analytics = useAnalytics();
@@ -262,4 +257,4 @@ export default function DataroomTrial() {
</motion.div>
</motion.div>
);
-}
\ No newline at end of file
+}
diff --git a/components/welcome/dataroom.tsx b/components/welcome/dataroom.tsx
index 8c75a7b9..a50c4ff5 100644
--- a/components/welcome/dataroom.tsx
+++ b/components/welcome/dataroom.tsx
@@ -1,7 +1,7 @@
import { useRouter } from "next/router";
-import { motion } from "framer-motion";
import { File as DocumentIcon, ServerIcon } from "lucide-react";
+import { motion } from "motion/react";
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
diff --git a/components/welcome/intro.tsx b/components/welcome/intro.tsx
index 926c9472..ad5684a6 100644
--- a/components/welcome/intro.tsx
+++ b/components/welcome/intro.tsx
@@ -1,6 +1,6 @@
import { useRouter } from "next/router";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
diff --git a/components/welcome/next.tsx b/components/welcome/next.tsx
index ada9c294..5bacb18b 100644
--- a/components/welcome/next.tsx
+++ b/components/welcome/next.tsx
@@ -1,7 +1,7 @@
import { useRouter } from "next/router";
-import { motion } from "framer-motion";
import { FileIcon, ServerIcon } from "lucide-react";
+import { motion } from "motion/react";
import { STAGGER_CHILD_VARIANTS } from "@/lib/constants";
diff --git a/components/welcome/notion-form.tsx b/components/welcome/notion-form.tsx
index 0ef66141..c6166fa3 100644
--- a/components/welcome/notion-form.tsx
+++ b/components/welcome/notion-form.tsx
@@ -4,7 +4,7 @@ import { type FormEvent, use, useState } from "react";
import { useTeam } from "@/context/team-context";
import { LinkType } from "@prisma/client";
-import { motion } from "framer-motion";
+import { motion } from "motion/react";
import { usePlausible } from "next-plausible";
import { parsePageId } from "notion-utils";
import { toast } from "sonner";
diff --git a/components/welcome/select.tsx b/components/welcome/select.tsx
index 535975eb..d8ab2080 100644
--- a/components/welcome/select.tsx
+++ b/components/welcome/select.tsx
@@ -1,7 +1,7 @@
import { useRouter } from "next/router";
-import { motion } from "framer-motion";
import { FileChartPieIcon, FileIcon, PresentationIcon } from "lucide-react";
+import { motion } from "motion/react";
import NotionIcon from "@/components/shared/icons/files/notion";
diff --git a/components/welcome/special-upload.tsx b/components/welcome/special-upload.tsx
index 37e7e733..0022ac4b 100644
--- a/components/welcome/special-upload.tsx
+++ b/components/welcome/special-upload.tsx
@@ -4,8 +4,8 @@ import { useEffect, useState } from "react";
import { useTeam } from "@/context/team-context";
import { LinkType } from "@prisma/client";
-import { motion } from "framer-motion";
import Cookies from "js-cookie";
+import { motion } from "motion/react";
import { usePlausible } from "next-plausible";
import { toast } from "sonner";
diff --git a/package-lock.json b/package-lock.json
index 1c89f31c..9b43899d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -72,13 +72,13 @@
"cmdk": "^1.0.4",
"eslint": "8.57.0",
"eslint-config-next": "^14.2.20",
- "framer-motion": "^11.13.4",
"handlebars": "^4.7.8",
"input-otp": "^1.4.1",
"js-cookie": "^3.0.5",
"jsonwebtoken": "^9.0.2",
"lucide-react": "^0.468.0",
"mime-types": "^2.1.35",
+ "motion": "^11.13.5",
"ms": "^2.1.3",
"mupdf": "^0.3.0",
"nanoid": "^5.0.9",
@@ -10411,9 +10411,9 @@
}
},
"node_modules/framer-motion": {
- "version": "11.13.4",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.13.4.tgz",
- "integrity": "sha512-dcFMc0Q7rDGdU3wowanEzbSb+ZdpeCcMBVO6EDyXkkD8Y0VoFJkoa70sNpyiLpNH4CwvUdfwc2gdv8Bo7f1BCw==",
+ "version": "11.13.5",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.13.5.tgz",
+ "integrity": "sha512-rArI0zPU9VkpS3Wt0J7dmRxAFUWtzPWoSofNQAP0UO276CmJ+Xlf5xN19GMw3w2QsdrS2sU+0+Q2vtuz4IEZaw==",
"dependencies": {
"motion-dom": "^11.13.0",
"motion-utils": "^11.13.0",
@@ -10421,8 +10421,8 @@
},
"peerDependencies": {
"@emotion/is-prop-valid": "*",
- "react": "^18.0.0",
- "react-dom": "^18.0.0"
+ "react": "^18.0.0 || ^19.0.0",
+ "react-dom": "^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@emotion/is-prop-valid": {
@@ -12466,6 +12466,31 @@
"resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.3.tgz",
"integrity": "sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A=="
},
+ "node_modules/motion": {
+ "version": "11.13.5",
+ "resolved": "https://registry.npmjs.org/motion/-/motion-11.13.5.tgz",
+ "integrity": "sha512-zmX/dz60w1ZtQB5NP9xYkLcCKwX9gc+pnHp4/mFhD9YW8wUe2ZmT8OPOtrTtq26/huxElSDu3hB7BMTSJa5iIQ==",
+ "dependencies": {
+ "framer-motion": "^11.13.5",
+ "tslib": "^2.4.0"
+ },
+ "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
+ }
+ }
+ },
"node_modules/motion-dom": {
"version": "11.13.0",
"resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-11.13.0.tgz",
diff --git a/package.json b/package.json
index c046d3a6..b43d23dd 100644
--- a/package.json
+++ b/package.json
@@ -83,13 +83,13 @@
"cmdk": "^1.0.4",
"eslint": "8.57.0",
"eslint-config-next": "^14.2.20",
- "framer-motion": "^11.13.4",
"handlebars": "^4.7.8",
"input-otp": "^1.4.1",
"js-cookie": "^3.0.5",
"jsonwebtoken": "^9.0.2",
"lucide-react": "^0.468.0",
"mime-types": "^2.1.35",
+ "motion": "^11.13.5",
"ms": "^2.1.3",
"mupdf": "^0.3.0",
"nanoid": "^5.0.9",
diff --git a/pages/documents/new.tsx b/pages/documents/new.tsx
index 6b9594fb..426afbd3 100644
--- a/pages/documents/new.tsx
+++ b/pages/documents/new.tsx
@@ -1,7 +1,7 @@
import { useRouter } from "next/router";
-import { AnimatePresence } from "framer-motion";
import { ArrowLeft as ArrowLeftIcon } from "lucide-react";
+import { AnimatePresence } from "motion/react";
import { Button } from "@/components/ui/button";
import Dataroom from "@/components/welcome/dataroom";
diff --git a/pages/welcome.tsx b/pages/welcome.tsx
index b3370954..27ec11d1 100644
--- a/pages/welcome.tsx
+++ b/pages/welcome.tsx
@@ -3,8 +3,8 @@ import { useRouter } from "next/router";
import { useEffect } from "react";
import { useState } from "react";
-import { AnimatePresence } from "framer-motion";
import { ArrowLeft as ArrowLeftIcon } from "lucide-react";
+import { AnimatePresence } from "motion/react";
import { Button } from "@/components/ui/button";
import Dataroom from "@/components/welcome/dataroom";