diff --git a/apps/www/app/(home)/layout.tsx b/apps/www/app/(home)/layout.tsx index f6116a729..f5d7b4ce5 100644 --- a/apps/www/app/(home)/layout.tsx +++ b/apps/www/app/(home)/layout.tsx @@ -1,3 +1,4 @@ +import { SiGithub } from "@icons-pack/react-simple-icons"; import { HomeLayout } from "fumadocs-ui/layouts/home"; import type { ReactNode } from "react"; import { baseOptions } from "~/app/layout.config"; @@ -12,6 +13,13 @@ export default function Layout({ children }: { children: ReactNode }) { url: "/docs/arkenv", active: "none", }, + { + text: "GitHub", + url: "https://github.com/yamcodes/arkenv", + active: "none", + type: "icon", + icon: , + }, ]} > {children} diff --git a/apps/www/app/(home)/page.tsx b/apps/www/app/(home)/page.tsx index 81eb14a25..31886de50 100644 --- a/apps/www/app/(home)/page.tsx +++ b/apps/www/app/(home)/page.tsx @@ -1,6 +1,6 @@ import type { Metadata } from "next"; import { Bricolage_Grotesque } from "next/font/google"; -import { HeroVideo } from "~/components/hero-video"; +import { HeroVisual } from "~/components/hero-visual"; import { SailButton, StarUsButton, VideoDemo } from "~/components/page"; const bricolageGrotesque = Bricolage_Grotesque({ @@ -21,7 +21,7 @@ export default function HomePage() { viewBox="0 0 1440 181" fill="none" xmlns="http://www.w3.org/2000/svg" - className="pointer-events-none absolute w-full top-0 left-0 h-[160px] z-10 opacity-100 text-blue-50 dark:text-[#011537]" + className="pointer-events-none absolute w-full top-0 left-0 h-40 z-10 opacity-100 text-blue-50 dark:text-[#011537]" preserveAspectRatio="none" aria-hidden="true" role="presentation" @@ -96,11 +96,11 @@ export default function HomePage() {
- +
-
+
diff --git a/apps/www/app/docs/layout.tsx b/apps/www/app/docs/layout.tsx index 9a836243a..62dd6025a 100644 --- a/apps/www/app/docs/layout.tsx +++ b/apps/www/app/docs/layout.tsx @@ -1,3 +1,4 @@ +import { SiGithub } from "@icons-pack/react-simple-icons"; import { DocsLayout } from "fumadocs-ui/layouts/docs"; import type { ReactNode } from "react"; import { baseOptions } from "~/app/layout.config"; @@ -12,6 +13,15 @@ export default function Layout({ children }: { children: ReactNode }) { banner: , }} {...baseOptions} + links={[ + { + text: "GitHub", + url: "https://github.com/yamcodes/arkenv", + active: "none", + type: "icon", + icon: , + }, + ]} > {children} diff --git a/apps/www/app/globals.css b/apps/www/app/globals.css index c1b9ae84e..a0921e594 100644 --- a/apps/www/app/globals.css +++ b/apps/www/app/globals.css @@ -27,3 +27,16 @@ button[data-search-full] { background-color: var(--background); background-image: none !important; } + +@keyframes spin-slow { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +.animate-spin-slow { + animation: spin-slow 60s linear infinite; +} diff --git a/apps/www/app/layout.config.tsx b/apps/www/app/layout.config.tsx index 55eebb8a1..d220c6e0f 100644 --- a/apps/www/app/layout.config.tsx +++ b/apps/www/app/layout.config.tsx @@ -12,5 +12,4 @@ export const baseOptions: BaseLayoutProps = { nav: { title: , }, - githubUrl: process.env.NEXT_PUBLIC_GITHUB_URL, }; diff --git a/apps/www/components/hero-video.tsx b/apps/www/components/hero-video.tsx deleted file mode 100644 index 3f4cc129b..000000000 --- a/apps/www/components/hero-video.tsx +++ /dev/null @@ -1,46 +0,0 @@ -"use client"; - -import { useTheme } from "next-themes"; -import { useEffect, useState } from "react"; - -export function HeroVideo() { - const { resolvedTheme } = useTheme(); - const [mounted, setMounted] = useState(false); - - useEffect(() => { - setMounted(true); - }, []); - - if (!mounted) { - return
; - } - - return ( -
-
- ); -} diff --git a/apps/www/components/hero-visual.tsx b/apps/www/components/hero-visual.tsx new file mode 100644 index 000000000..4c28676d0 --- /dev/null +++ b/apps/www/components/hero-visual.tsx @@ -0,0 +1,178 @@ +"use client"; + +import { useTheme } from "next-themes"; +import { useEffect, useRef, useState } from "react"; + +/** + * HeroVisual component creates an interactive 2.5D visual using CSS transforms. + * It features a mouse-following tilt effect and theme-aware code highlights. + */ +export function HeroVisual() { + const { resolvedTheme } = useTheme(); + const [mounted, setMounted] = useState(false); + const containerRef = useRef(null); + const [mousePos, setMousePos] = useState({ x: 0, y: 0 }); + + useEffect(() => { + setMounted(true); + }, []); + + const handleMouseMove = (e: React.MouseEvent) => { + if (!containerRef.current) return; + const rect = containerRef.current.getBoundingClientRect(); + const x = (e.clientX - rect.left) / rect.width - 0.5; + const y = (e.clientY - rect.top) / rect.height - 0.5; + setMousePos({ x, y }); + }; + + const handleMouseLeave = () => { + setMousePos({ x: 0, y: 0 }); + }; + + if (!mounted) { + return
; + } + + const syntaxColors = { + primary: resolvedTheme === "dark" ? "text-white" : "text-blue-950", + secondary: resolvedTheme === "dark" ? "text-white" : "text-blue-800", + punctuation: + resolvedTheme === "dark" ? "text-yellow-200" : "text-yellow-900", + }; + + return ( +
+ {/* Ambient Glow Background */} +
+ + {/* The 2.5D Platform / Card */} +
+ {/* Glass Base Layer */} +
+ + {/* Floating SVG Icon */} +
+ + ArkEnv Icon + + + +
+ + {/* Floating Accents (Code Samples / Particles) */} +
+
+ const{" "} + env{" "} + ={" "} + + arkenv + + ( + {"{"} +
+    + PORT:{" "} + " + number + " +
+ {"}"} + ) +
+
+ +
+ {/* The 'Code' line */} +
+ env + . + PORT +
+ + {/* The Tooltip popover */} +
+
+
+ + (property) + {" "} + PORT + :{" "} + number +
+
+ {/* Small arrow */} +
+
+
+
+ + {/* Ground Reflection / Shadow */} +
+
+ ); +} diff --git a/apps/www/components/page/video-demo.tsx b/apps/www/components/page/video-demo.tsx index 8333cec71..9c81df05f 100644 --- a/apps/www/components/page/video-demo.tsx +++ b/apps/www/components/page/video-demo.tsx @@ -1,5 +1,6 @@ "use client"; +import { ArrowUpRight } from "lucide-react"; import Image from "next/image"; import BackgroundVideo from "next-video/background-video"; import { useState } from "react"; @@ -12,6 +13,10 @@ const HEIGHT = 1672; const getAspectRatio = (width: number, height: number) => `${width} / ${height}`; +/** + * VideoDemo component displays an interactive video demonstration with a browser-style frame. + * Clicking the video opens the demo in StackBlitz. Falls back to a GIF if video fails to load. + */ export function VideoDemo() { const [videoError, setVideoError] = useState(false); @@ -26,36 +31,57 @@ export function VideoDemo() { }; return ( -
- {/* Main video container with aspect ratio */} +
); diff --git a/apps/www/public/assets/3d-dark.mp4 b/apps/www/public/assets/3d-dark.mp4 deleted file mode 100644 index 348fe396c..000000000 Binary files a/apps/www/public/assets/3d-dark.mp4 and /dev/null differ diff --git a/apps/www/public/assets/3d-light.mp4 b/apps/www/public/assets/3d-light.mp4 deleted file mode 100644 index 46b6402b0..000000000 Binary files a/apps/www/public/assets/3d-light.mp4 and /dev/null differ diff --git a/examples/with-bun-react/bun.lock b/examples/with-bun-react/bun.lock index 9d956549f..47047dc64 100644 --- a/examples/with-bun-react/bun.lock +++ b/examples/with-bun-react/bun.lock @@ -6,7 +6,7 @@ "name": "bun-react-template", "dependencies": { "@arkenv/bun-plugin": "^0.0.5", - "arkenv": "^0.7.8", + "arkenv": "^0.8.0", "arktype": "^2.1.29", "react": "^19.2.3", "react-dom": "^19.2.3", @@ -60,7 +60,7 @@ "@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="], - "arkenv": ["arkenv@0.7.8", "", { "peerDependencies": { "arktype": "^2.1.22" } }, "sha512-Scb3jaoUSUEcLYk3pR5Hy2G4fLXGzzTwCUPZcRbbGl5Yu60gDRRpOBPPPF+uG4WdeixTNUDIpxQp+QPpQdWuAQ=="], + "arkenv": ["arkenv@0.8.0", "", { "peerDependencies": { "arktype": "^2.1.22" } }, "sha512-bfbM0euGgoJW4SbuzfB3wCHZr6tsZXl89tECwlEk9S7qyniob6xr/Eic8PGgsT/RqWuXCmpZI6Z+iNqOhNM7RQ=="], "arkregex": ["arkregex@0.0.5", "", { "dependencies": { "@ark/util": "0.56.0" } }, "sha512-ncYjBdLlh5/QnVsAA8De16Tc9EqmYM7y/WU9j+236KcyYNUXogpz3sC4ATIZYzzLxwI+0sEOaQLEmLmRleaEXw=="], diff --git a/examples/with-bun/bun.lock b/examples/with-bun/bun.lock index 1d2f8f27d..c2c29b269 100644 --- a/examples/with-bun/bun.lock +++ b/examples/with-bun/bun.lock @@ -5,7 +5,7 @@ "": { "name": "arkenv-example-with-bun", "dependencies": { - "arkenv": "^0.7.8", + "arkenv": "^0.8.0", "arktype": "^2.1.29", }, "devDependencies": { @@ -28,7 +28,7 @@ "@types/node": ["@types/node@24.10.1", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ=="], - "arkenv": ["arkenv@0.7.8", "", { "peerDependencies": { "arktype": "^2.1.22" } }, "sha512-Scb3jaoUSUEcLYk3pR5Hy2G4fLXGzzTwCUPZcRbbGl5Yu60gDRRpOBPPPF+uG4WdeixTNUDIpxQp+QPpQdWuAQ=="], + "arkenv": ["arkenv@0.8.0", "", { "peerDependencies": { "arktype": "^2.1.22" } }, "sha512-bfbM0euGgoJW4SbuzfB3wCHZr6tsZXl89tECwlEk9S7qyniob6xr/Eic8PGgsT/RqWuXCmpZI6Z+iNqOhNM7RQ=="], "arkregex": ["arkregex@0.0.5", "", { "dependencies": { "@ark/util": "0.56.0" } }, "sha512-ncYjBdLlh5/QnVsAA8De16Tc9EqmYM7y/WU9j+236KcyYNUXogpz3sC4ATIZYzzLxwI+0sEOaQLEmLmRleaEXw=="],