diff --git a/index.html b/index.html index c4f5e7c..0da6413 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,8 @@ - Mycelium - Unleash the Power of Decentralized Networks - + Project Mycelium - Unleash the Power of Decentralized Networks + diff --git a/src/components/Texts.tsx b/src/components/Texts.tsx index 2b15ad6..a442771 100644 --- a/src/components/Texts.tsx +++ b/src/components/Texts.tsx @@ -23,6 +23,7 @@ type TextOwnProps = { font?: keyof typeof fontVariants color?: keyof typeof colorVariants className?: string + children?: React.ReactNode } // Polymorphic helpers diff --git a/src/components/features-section-demo-1.tsx b/src/components/features-section-demo-1.tsx index e1746e0..f56cb75 100644 --- a/src/components/features-section-demo-1.tsx +++ b/src/components/features-section-demo-1.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { useId } from "react"; export default function FeaturesSectionDemo() { diff --git a/src/components/ui/HalfGlobe.tsx b/src/components/ui/HalfGlobe.tsx index 6cb0654..e4a40ee 100644 --- a/src/components/ui/HalfGlobe.tsx +++ b/src/components/ui/HalfGlobe.tsx @@ -1,12 +1,15 @@ "use client"; -import * as THREE from "three"; import { Canvas, useFrame } from "@react-three/fiber"; -import { OrbitControls, useTexture } from "@react-three/drei"; -import { useRef } from "react"; +import { Line, OrbitControls, useTexture } from "@react-three/drei"; +import { useMemo, useRef } from "react"; + +type RotatableGroup = { + rotation: { y: number }; +}; function Globe() { - const groupRef = useRef(null); + const groupRef = useRef(null); const cloudTexture = useTexture("/images/cloud1.png"); // Rotate the globe slowly @@ -17,7 +20,7 @@ function Globe() { }); // Coordinates for markers (half-globe) - const points = [ + const markers = [ [0, 1, 0], [0.7, 0.5, 0.2], [-0.5, 0.4, 0.5], @@ -25,42 +28,47 @@ function Globe() { [-0.6, -0.1, 0.3], [0.3, -0.2, 0.8], ]; + const arcPoints = useMemo(() => { + const radius = 2.5; + const verticalRadius = radius / 2; + const segments = 120; + + return Array.from({ length: 8 }, () => { + const points: number[] = []; + for (let i = 0; i < segments; i++) { + const t = (i / (segments - 1)) * Math.PI; + const x = Math.cos(t) * radius; + const z = Math.sin(t) * verticalRadius; + const y = Math.sin(x / radius) * 0.5; + points.push(x, y, z); + } + return points; + }); + }, []); return ( {/* Cyan arcs */} - {Array.from({ length: 8 }).map((_, i) => { - const radius = 2.5; - const curve = new THREE.EllipseCurve( - 0, - 0, - radius, - radius / 2, - 0, - Math.PI, - false, - 0 - ); - const points = curve.getPoints(100); - const geometry = new THREE.BufferGeometry().setFromPoints( - points.map((p) => new THREE.Vector3(p.x, Math.sin(p.x / radius) * 0.5, p.y)) - ); - return ( - - - - ); - })} + {arcPoints.map((points, i) => ( + + ))} {/* Cloud markers */} - {points.map(([x, y, z], i) => ( + {markers.map(([x, y, z], i) => ( ))} diff --git a/src/components/ui/aurora-background.tsx b/src/components/ui/aurora-background.tsx index d2af6a1..bec6bc4 100644 --- a/src/components/ui/aurora-background.tsx +++ b/src/components/ui/aurora-background.tsx @@ -1,8 +1,8 @@ "use client"; import { cn } from "@/lib/utils"; -import React, { ReactNode } from "react"; +import type { CSSProperties, HTMLProps, ReactNode } from "react"; -interface AuroraBackgroundProps extends React.HTMLProps { +interface AuroraBackgroundProps extends HTMLProps { children: ReactNode; showRadialGradient?: boolean; } @@ -44,7 +44,7 @@ export const AuroraBackground = ({ "--black": "#000", "--white": "#fff", "--transparent": "transparent", - } as React.CSSProperties + } as CSSProperties } >
{ if (stopped) return; - const dt = (now - last) / 1000; // seconds - last = now; const { width, height } = container.getBoundingClientRect(); ctx.clearRect(0, 0, el.width, el.height); diff --git a/src/pages/agents/Companies.tsx b/src/pages/agents/Companies.tsx index d71fbc1..f056ac9 100644 --- a/src/pages/agents/Companies.tsx +++ b/src/pages/agents/Companies.tsx @@ -1,6 +1,5 @@ "use client"; -import React from "react"; import { motion } from "framer-motion"; import { P, Eyebrow } from "@/components/Texts"; import { InfiniteMovingCards } from "@/components/magicui/infinite-moving-cards"; diff --git a/src/pages/agents/DeploySection.tsx b/src/pages/agents/DeploySection.tsx index 8e9abbb..145e477 100644 --- a/src/pages/agents/DeploySection.tsx +++ b/src/pages/agents/DeploySection.tsx @@ -2,25 +2,45 @@ import { motion } from "framer-motion"; import { SectionHeader, P, Eyebrow, CT, CP } from "@/components/Texts"; -import { TbCircleNumber1Filled, TbCircleNumber2Filled, TbCircleNumber3Filled } from "react-icons/tb"; +import type { ComponentPropsWithoutRef } from "react"; + +type CircleIconProps = ComponentPropsWithoutRef<"svg">; + +const CircleNumber1Icon = (props: CircleIconProps) => ( + + + +); + +const CircleNumber2Icon = (props: CircleIconProps) => ( + + + +); + +const CircleNumber3Icon = (props: CircleIconProps) => ( + + + +); const features = [ { name: 'Choose Your Intelligence', description: 'Explore a library of leading LLMs and agentic functions. Pick the ones that fit your use case, from general assistants to specialized reasoning models.', - icon: TbCircleNumber1Filled, + icon: CircleNumber1Icon, }, { name: 'Add Your Knowledge', description: 'Connect your data or knowledge base to enable personalized, context-aware results while keeping your information private.', - icon: TbCircleNumber2Filled, + icon: CircleNumber2Icon, }, { name: 'Define Your Network', description: 'Set up and manage your nodes with ease. Scale compute and storage as you grow, while staying fully sovereign and decentralized.', - icon: TbCircleNumber3Filled, + icon: CircleNumber3Icon, }, ]; diff --git a/src/pages/home/HomeAurora.tsx b/src/pages/home/HomeAurora.tsx index 3985f83..4e1c5ba 100644 --- a/src/pages/home/HomeAurora.tsx +++ b/src/pages/home/HomeAurora.tsx @@ -18,7 +18,7 @@ export function HomeAurora() { Project Mycelium.
- Full Sovereignty for Cloud, Network & AI. + Full Sovereignty for
Cloud, Network & AI.
diff --git a/src/pages/home/HomeBenefits.tsx b/src/pages/home/HomeBenefits.tsx index 0c79196..b4eb602 100644 --- a/src/pages/home/HomeBenefits.tsx +++ b/src/pages/home/HomeBenefits.tsx @@ -1,7 +1,6 @@ -import React from "react"; import { cn } from "@/lib/utils"; import createGlobe from "cobe"; -import { useEffect, useRef } from "react"; +import { useEffect, useRef, type ReactNode } from "react"; import { motion } from "motion/react"; import { IconBrandYoutubeFilled } from "@tabler/icons-react"; import { LockClosedIcon, CogIcon, BoltIcon, CurrencyDollarIcon } from '@heroicons/react/24/solid' @@ -67,7 +66,7 @@ const FeatureCard = ({ children, className, }: { - children?: React.ReactNode; + children?: ReactNode; className?: string; }) => { return ( @@ -77,7 +76,7 @@ const FeatureCard = ({ ); }; -const FeatureTitle = ({ children, icon }: { children?: React.ReactNode, icon?: React.ReactNode }) => { +const FeatureTitle = ({ children, icon }: { children?: ReactNode; icon?: ReactNode }) => { return (
{icon} @@ -88,7 +87,7 @@ const FeatureTitle = ({ children, icon }: { children?: React.ReactNode, icon?: R ); }; -const FeatureDescription = ({ children }: { children?: React.ReactNode }) => { +const FeatureDescription = ({ children }: { children?: ReactNode }) => { return (

) { ) } -const headerAnimation: Variants = { - initial: { opacity: 0, transition: { duration: 0.3 } }, - animate: { opacity: 1, transition: { duration: 0.3, delay: 0.3 } }, - exit: { opacity: 0, transition: { duration: 0.3 } }, -} - const maxZIndex = 2147483647 const bodyVariantBackwards: Variant = { diff --git a/src/pages/network/animations/ContentDistribution.tsx b/src/pages/network/animations/ContentDistribution.tsx index 0db0b4f..c55e457 100644 --- a/src/pages/network/animations/ContentDistribution.tsx +++ b/src/pages/network/animations/ContentDistribution.tsx @@ -7,7 +7,6 @@ type Props = { const ACCENT = '#00b8db'; const STROKE = '#111827'; -const GRAY = '#9CA3AF'; const GRAY_LT = '#E5E7EB'; const IconSquare = () => ( diff --git a/vite.config.ts b/vite.config.ts index d9b7e7d..3c5c58e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,4 +10,22 @@ export default defineConfig({ '@': path.resolve(__dirname, './src'), }, }, + build: { + rollupOptions: { + output: { + manualChunks: { + react: ['react', 'react-dom', 'react-router', 'react-router-dom'], + framer: ['framer-motion'], + motion: ['motion/react'], + antd: [ + 'antd', + 'rc-field-form', + 'rc-motion', + '@ant-design/cssinjs', + '@rc-component/async-validator', + ], + }, + }, + }, + }, })