"use client"; import { useState } from "react"; import { Copy, Package, Clock, Check, Terminal } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import HudCorners from "@/components/hud-corners"; import { cn } from "@/lib/utils"; type PackageManager = "npm" | "yarn" | "pnpm" | "bun"; interface PackageInstallerProps { packageName: string; disabled?: boolean; } function PackageInstaller({ packageName, disabled = false, }: PackageInstallerProps) { const [selectedPM, setSelectedPM] = useState("pnpm"); const [copied, setCopied] = useState(false); const packageManagers: { value: PackageManager; label: string; command: string; }[] = [ { value: "pnpm", label: "pnpm", command: `pnpm add ${packageName}` }, { value: "npm", label: "npm", command: `npm i ${packageName}` }, { value: "yarn", label: "yarn", command: `yarn add ${packageName}` }, ]; const copyToClipboard = async (text: string) => { try { await navigator.clipboard.writeText(text); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch (err) { console.error("Failed to copy:", err); } }; const currentCommand = packageManagers.find((pm) => pm.value === selectedPM)?.command || ""; return (
{packageManagers.map((pm) => ( ))}
{currentCommand}
); } export function SetupCards() { return (
{/* Web Installation Card */} {/* HudCorners creates 4 absolutely positioned corner elements with primary color borders */} {/* This div contains the card content and sits above the corner elements due to relative positioning */}

web

run LeRobot.js in the browser

{/* Node.js Card - Coming Soon */} {/* Disabled overlay effect */}

node

run LeRobot.js on the server

coming soon
{/* Cyberpunk scan lines effect */}
); }