diff --git a/bun.lockb b/bun.lockb index 6abed29..d43ef12 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index eb291d8..3bed1a7 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "type": "module", "scripts": { - "dev": "next dev", + "dev": "next dev --turbopack", "build": "next build", "start": "next start", "lint": "next lint", @@ -31,17 +31,17 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cmdk": "^1.0.0", - "framer-motion": "^11.1.7", + "framer-motion": "^11.11.10", "fuse.js": "^7.0.0", "lucide-react": "^0.453.0", "mini-svg-data-uri": "^1.4.4", - "next": "14.2.15", + "next": "15.0.2", "next-themes": "^0.3.0", "pocketbase": "^0.21.4", "prettier-plugin-organize-imports": "^4.1.0", - "react": "^18", + "react": "19.0.0-rc-02c0e824-20241028", "react-code-blocks": "^0.1.6", - "react-dom": "^18", + "react-dom": "19.0.0-rc-02c0e824-20241028", "react-icons": "^5.1.0", "react-simple-typewriter": "^5.0.1", "sharp": "^0.33.5", @@ -51,11 +51,11 @@ }, "devDependencies": { "@types/node": "^22", - "@types/react": "^18", - "@types/react-dom": "^18", + "@types/react": "npm:types-react@19.0.0-rc.1", + "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "@typescript-eslint/eslint-plugin": "^8.8.1", "@typescript-eslint/parser": "^8.8.1", - "eslint-config-next": "^14.2.15", + "eslint-config-next": "15.0.2", "postcss": "^8", "eslint": "^9.13.0", "prettier": "^3.2.5", @@ -64,5 +64,9 @@ "tailwindcss-animate": "^1.0.7", "tailwindcss-animated": "^1.1.2", "typescript": "^5" + }, + "overrides": { + "@types/react": "npm:types-react@19.0.0-rc.1", + "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1" } -} \ No newline at end of file +} diff --git a/src/app/page.tsx b/src/app/page.tsx index ec9317c..7bb5132 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,6 @@ "use client"; import AnimatedGradientText from "@/components/magicui/animated-gradient-text"; -import Particles from "@/components/magicui/particles"; +import Particles from "@/components/ui/particles"; import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import { cn } from "@/lib/utils"; diff --git a/src/app/scripts/page.tsx b/src/app/scripts/page.tsx index 7662644..1614779 100644 --- a/src/app/scripts/page.tsx +++ b/src/app/scripts/page.tsx @@ -2,12 +2,11 @@ import { Metadata } from "next"; import ScriptPage from "./_components/ScriptPage"; type Props = { - searchParams: { [key: string]: string | string[] | undefined }; + searchParams: Promise<{ [key: string]: string | string[] | undefined }>; }; -export async function generateMetadata({ - searchParams, -}: Props): Promise { +export async function generateMetadata(props: Props): Promise { + const searchParams = await props.searchParams; const scriptName = searchParams.id; if (!scriptName || typeof scriptName !== "string") { diff --git a/src/components/magicui/number-ticker.tsx b/src/components/magicui/number-ticker.tsx index ad6e569..d9c3879 100644 --- a/src/components/magicui/number-ticker.tsx +++ b/src/components/magicui/number-ticker.tsx @@ -10,11 +10,13 @@ export default function NumberTicker({ direction = "up", delay = 0, className, + decimalPlaces = 0, }: { value: number; direction?: "up" | "down"; className?: string; delay?: number; // delay in s + decimalPlaces?: number; }) { const ref = useRef(null); const motionValue = useMotionValue(direction === "down" ? value : 0); @@ -22,7 +24,10 @@ export default function NumberTicker({ damping: 60, stiffness: 100, }); - const isInView = useInView(ref, { once: true, margin: "0px" }); + const isInView = useInView(ref as React.RefObject, { + once: true, + margin: "0px", + }); useEffect(() => { isInView && @@ -35,18 +40,19 @@ export default function NumberTicker({ () => springValue.on("change", (latest) => { if (ref.current) { - ref.current.textContent = Intl.NumberFormat("en-US").format( - Number(latest.toFixed(0)), - ); + ref.current.textContent = Intl.NumberFormat("en-US", { + minimumFractionDigits: decimalPlaces, + maximumFractionDigits: decimalPlaces, + }).format(Number(latest.toFixed(decimalPlaces))); } }), - [springValue], + [springValue, decimalPlaces], ); return ( = ({ const canvasRef = useRef(null); const canvasContainerRef = useRef(null); const context = useRef(null); - const circles = useRef([]); + const circles = useRef([]); const mousePosition = MousePosition(); const mouse = useRef<{ x: number; y: number }>({ x: 0, y: 0 }); const canvasSize = useRef<{ w: number; h: number }>({ w: 0, h: 0 }); @@ -269,7 +270,11 @@ const Particles: React.FC = ({ }; return ( -