diff --git a/app/about/page.tsx b/app/about/page.tsx new file mode 100644 index 0000000..7d2b9e9 --- /dev/null +++ b/app/about/page.tsx @@ -0,0 +1,85 @@ +import Image from "next/image" +import Link from "next/link" + +export default function AboutPage() { + return ( +
+
+ {/* Profile Image Section */} +
+
+
+ Shawn Anderson +
+

CEO @ LONG_TAIL_FINANCIAL

+
+
+
+ + {/* Content Section */} +
+
+

+ Shawn Anderson +

+

Data Shaman, Educator, and Technologist.

+
+ +
+

+ As the Founder of Long Tail Financial, Shawn operates at the + intersection of data science, artificial intelligence, and decentralized finance. His work focuses on + developing systems that enable exposure to the singularity—building the infrastructure for the next + generation of financial technology. +

+ +

+ Beyond the code, Shawn is deeply passionate about{" "} + teaching and self-empowerment. He believes that mastering + your tools—like the terminal and tmux—is the first step towards mastering your craft. By understanding the + systems we work with, we unlock the potential to build things that were previously impossible. +

+ +
+

+ "Coding is not just about writing syntax; it's about structuring your thoughts and empowering + yourself to create change in the digital world." +

+
+ +

+ Whether he's leading workshops on AI in cryptocurrency markets or architecting complex tokenomics + systems, Shawn's mission remains the same: to empower others through knowledge and technology. +

+
+ + {/* Social / Links */} +
+ + Long Tail Financial + + + GitHub + +
+
+
+
+ ) +} diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..6178ebe --- /dev/null +++ b/app/globals.css @@ -0,0 +1,198 @@ +@import "tailwindcss"; +@import "tw-animate-css"; + +@custom-variant dark (&:is(.dark *)); + +:root { + --background: oklch(1 0 0); + --foreground: oklch(0.145 0 0); + --card: oklch(1 0 0); + --card-foreground: oklch(0.145 0 0); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.145 0 0); + --primary: oklch(0.205 0 0); + --primary-foreground: oklch(0.985 0 0); + --secondary: oklch(0.97 0 0); + --secondary-foreground: oklch(0.205 0 0); + --muted: oklch(0.97 0 0); + --muted-foreground: oklch(0.556 0 0); + --accent: oklch(0.97 0 0); + --accent-foreground: oklch(0.205 0 0); + --destructive: oklch(0.577 0.245 27.325); + --destructive-foreground: oklch(0.577 0.245 27.325); + --border: oklch(0.922 0 0); + --input: oklch(0.922 0 0); + --ring: oklch(0.708 0 0); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --radius: 0.625rem; + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --background: oklch(0.145 0 0); + --foreground: oklch(0.985 0 0); + --card: oklch(0.145 0 0); + --card-foreground: oklch(0.985 0 0); + --popover: oklch(0.145 0 0); + --popover-foreground: oklch(0.985 0 0); + --primary: oklch(0.985 0 0); + --primary-foreground: oklch(0.205 0 0); + --secondary: oklch(0.269 0 0); + --secondary-foreground: oklch(0.985 0 0); + --muted: oklch(0.269 0 0); + --muted-foreground: oklch(0.708 0 0); + --accent: oklch(0.269 0 0); + --accent-foreground: oklch(0.985 0 0); + --destructive: oklch(0.396 0.141 25.723); + --destructive-foreground: oklch(0.637 0.237 25.331); + --border: oklch(0.269 0 0); + --input: oklch(0.269 0 0); + --ring: oklch(0.439 0 0); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(0.269 0 0); + --sidebar-ring: oklch(0.439 0 0); +} + +@theme inline { + /* optional: --font-sans, --font-serif, --font-mono if they are applied in the layout.tsx */ + --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace; + --font-sans: "JetBrains Mono", "Fira Code", "Courier New", monospace; + + --color-background: #0a0a0a; + --color-foreground: #00ff00; /* Terminal Green */ + + --color-card: #111111; + --color-card-foreground: #e5e5e5; + + --color-popover: #111111; + --color-popover-foreground: #e5e5e5; + + --color-primary: #00ff00; + --color-primary-foreground: #000000; + + --color-secondary: #333333; + --color-secondary-foreground: #ffffff; + + --color-muted: #222222; + --color-muted-foreground: #888888; + + --color-accent: #00ff00; + --color-accent-foreground: #000000; + + --color-destructive: #ff0000; + --color-destructive-foreground: #ffffff; + + --color-border: #333333; + --color-input: #222222; + --color-ring: #00ff00; + + --radius-sm: 0px; + --radius-md: 0px; + --radius-lg: 0px; + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-destructive-foreground: var(--destructive-foreground); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --color-sidebar: var(--sidebar); + --color-sidebar-foreground: var(--sidebar-foreground); + --color-sidebar-primary: var(--sidebar-primary); + --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); + --color-sidebar-accent: var(--sidebar-accent); + --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); + --color-sidebar-border: var(--sidebar-border); + --color-sidebar-ring: var(--sidebar-ring); +} + +@layer base { + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground font-mono antialiased selection:bg-primary selection:text-primary-foreground; + } + + /* Custom Scrollbar for that retro feel */ + ::-webkit-scrollbar { + width: 10px; + height: 10px; + } + ::-webkit-scrollbar-track { + background: #0a0a0a; + border-left: 1px solid #333; + } + ::-webkit-scrollbar-thumb { + background: #333; + border: 1px solid #0a0a0a; + } + ::-webkit-scrollbar-thumb:hover { + background: #00ff00; + } +} + +.scanline { + background: linear-gradient( + to bottom, + rgba(255, 255, 255, 0), + rgba(255, 255, 255, 0) 50%, + rgba(0, 0, 0, 0.2) 50%, + rgba(0, 0, 0, 0.2) + ); + background-size: 100% 4px; + position: fixed; + pointer-events: none; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 9999; + opacity: 0.15; +} + +.glow-text { + text-shadow: 0 0 5px rgba(0, 255, 0, 0.5); +} diff --git a/app/layout.tsx b/app/layout.tsx new file mode 100644 index 0000000..f018b95 --- /dev/null +++ b/app/layout.tsx @@ -0,0 +1,75 @@ +import type React from "react" +import type { Metadata } from "next" +import { JetBrains_Mono } from "next/font/google" +import "./globals.css" +import Link from "next/link" + +const jetbrainsMono = JetBrains_Mono({ subsets: ["latin"] }) + +export const metadata: Metadata = { + title: "mytmux.life - Terminal Multiplexer Configurator", + description: "Architect your perfect terminal development environment.", + generator: 'v0.app' +} + +export default function RootLayout({ + children, +}: Readonly<{ + children: React.ReactNode +}>) { + return ( + + +
+
+
+
+
+ + mytmux.life + + +
+
+
+
{children}
+ +
+ + + ) +} diff --git a/app/page.tsx b/app/page.tsx new file mode 100644 index 0000000..ab3f33d --- /dev/null +++ b/app/page.tsx @@ -0,0 +1,315 @@ +"use client" + +import { useState, useEffect } from "react" +import TerminalVisualizer from "@/components/terminal-visualizer" + +// Types for the layout tree +type PaneNode = { + type: "pane" + id: number +} + +type SplitNode = { + type: "split-h" | "split-v" + ratio: number + children: [LayoutNode, LayoutNode] +} + +export type LayoutNode = PaneNode | SplitNode + +const ASCII_ART = ` + _________________________________________ + / \\ + | root@mytmux:~ $ tmux new -s dev | + | [0] nvim ---------------- [1] server -- | + | | | | | + | | import { life } | npm run | | + | | from 'tmux'; | dev | | + | | | | | + | | // TODO: Sleep | | | + | |________________________|____________| | + | [2] logs ------------------------------ | + | | > ready in 200ms | | + | | > watching files... | | + | |_____________________________________| | + \\_________________________________________/ +` + +export default function Home() { + const [layout, setLayout] = useState({ type: "pane", id: 0 }) + const [nextId, setNextId] = useState(1) + const [activePaneId, setActivePaneId] = useState(0) + const [generatedConfig, setGeneratedConfig] = useState("") + + // Helper to find and split the active node + function findAndSplitNode( + node: LayoutNode, + activeId: number, + direction: "h" | "v", + nextIdVal: number, + ): { found: boolean; nextId: number; newNode?: LayoutNode } { + if (node.type === "pane") { + if (node.id === activeId) { + const oldId = node.id + const newId = nextIdVal + + // Create new split node + const newNode: SplitNode = { + type: direction === "h" ? "split-h" : "split-v", + ratio: 0.5, + children: [ + { type: "pane", id: oldId }, + { type: "pane", id: newId }, + ], + } + return { found: true, nextId: nextIdVal + 1, newNode } + } + return { found: false, nextId: nextIdVal } + } else { + // Recursively check children + // We need to clone the node to avoid mutating state directly if we were modifying in place, + // but here we are rebuilding the tree structure where needed. + + // Check left/top child + const leftResult = findAndSplitNode(node.children[0], activeId, direction, nextIdVal) + + if (leftResult.found) { + return { + found: true, + nextId: leftResult.nextId, + newNode: { + ...node, + children: [leftResult.newNode as LayoutNode, node.children[1]], + }, + } + } + + // Check right/bottom child + const rightResult = findAndSplitNode(node.children[1], activeId, direction, nextIdVal) + + if (rightResult.found) { + return { + found: true, + nextId: rightResult.nextId, + newNode: { + ...node, + children: [node.children[0], rightResult.newNode as LayoutNode], + }, + } + } + + return { found: false, nextId: nextIdVal } + } + } + + function splitPane(direction: "h" | "v") { + const result = findAndSplitNode(layout, activePaneId, direction, nextId) + + if (result.found && result.newNode) { + setNextId(result.nextId) + setLayout(result.newNode) + } + } + + function resetLayout() { + setLayout({ type: "pane", id: 0 }) + setNextId(1) + setActivePaneId(0) + } + + // Generate config whenever layout changes + useEffect(() => { + let config = `# ~/.tmux.conf setup\n` + config += `# Generated by mytmux.life\n\n` + config += `new-session -s development -n editor\n` + + function traverse(node: LayoutNode) { + if (node.type === "split-h") { + config += `split-window -h\n` + traverse(node.children[1]) // Right child + config += `select-pane -L\n` // Go back left + traverse(node.children[0]) // Left child + } else if (node.type === "split-v") { + config += `split-window -v\n` + traverse(node.children[1]) // Bottom child + config += `select-pane -U\n` // Go back up + traverse(node.children[0]) // Top child + } + } + + traverse(layout) + + config += `\n# Select the initially active pane\n` + config += `select-pane -t ${activePaneId}\n` + + setGeneratedConfig(config) + }, [layout, activePaneId]) + + return ( +
+ {/* Hero Section */} +
+
+
+
+ + SYSTEM ONLINE +
+

+ Master Your
+ <Terminal /> +

+

+ Stop wasting time switching windows. mytmux.life helps + you architect the perfect terminal development environment. +

+ +
+ + {/* ASCII Art / Decorative Element */} +
+
{ASCII_ART}
+
+
+
+ + {/* Configurator Section */} +
+
+

ENVIRONMENT_CONFIGURATOR

+

+ Visually design your session layout. Click actions to split the active pane. +

+
+ +
+ {/* Controls & Output */} +
+
+

+ > ACTIONS +

+
+ + +
+ +
+
+ ACTIVE_PANE_ID: + {activePaneId} +
+
+ +
+
+
+ +
+

+ > GENERATED_CONFIG +

+
+
{generatedConfig}
+
+
+
+ + {/* Visualizer Canvas */} +
+
+ CANVAS_RENDER_TARGET +
+ +
+
+
+ + {/* Documentation / Info Section */} +
+
+
+

01. MULTIPLEXING

+

+ Run multiple terminal sessions inside one single window. Detach them and leave them running in the + background, then reattach later. +

+
+
+

02. WINDOWS & PANES

+

+ Organize your workspace into windows (tabs) and panes (splits). Keep your editor, server logs, and git + commands visible at once. +

+
+
+

03. CONFIGURATION

+

+ Tmux is highly scriptable. Bind keys, change status bar colors, and create custom layouts to fit your + specific workflow needs. +

+
+
+
+ + {/* Cheat Sheet */} +
+

QUICK_REFERENCE_CARD

+
+ {[ + { cmd: "Ctrl+b %", desc: "Split pane vertically" }, + { cmd: 'Ctrl+b "', desc: "Split pane horizontally" }, + { cmd: "Ctrl+b o", desc: "Swap to next pane" }, + { cmd: "Ctrl+b c", desc: "Create new window" }, + { cmd: "Ctrl+b n", desc: "Next window" }, + { cmd: "Ctrl+b d", desc: "Detach session" }, + ].map((item, i) => ( +
+ {item.desc} + {item.cmd} +
+ ))} +
+
+
+ ) +} diff --git a/components.json b/components.json new file mode 100644 index 0000000..4ee62ee --- /dev/null +++ b/components.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": true, + "tsx": true, + "tailwind": { + "config": "", + "css": "app/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/components/terminal-visualizer.tsx b/components/terminal-visualizer.tsx new file mode 100644 index 0000000..a240874 --- /dev/null +++ b/components/terminal-visualizer.tsx @@ -0,0 +1,166 @@ +"use client" + +import { useEffect, useRef, useState } from "react" +import type { LayoutNode } from "@/app/page" + +interface TerminalVisualizerProps { + layout: LayoutNode + activePaneId: number +} + +export default function TerminalVisualizer({ layout, activePaneId }: TerminalVisualizerProps) { + const canvasRef = useRef(null) + const [containerSize, setContainerSize] = useState({ width: 0, height: 0 }) + const animationRef = useRef(0) + const lastTimeRef = useRef(0) + const cursorBlinkRef = useRef(true) + + // Colors + const BG_COLOR = "#0a0a0a" + const BORDER_COLOR = "#333333" + const ACTIVE_BORDER_COLOR = "#00ff00" + const TEXT_COLOR = "#00ff00" + const MUTED_TEXT = "#444444" + + // Handle resize + useEffect(() => { + const handleResize = () => { + if (canvasRef.current && canvasRef.current.parentElement) { + const parent = canvasRef.current.parentElement + const rect = parent.getBoundingClientRect() + const dpr = window.devicePixelRatio || 1 + + canvasRef.current.width = rect.width * dpr + canvasRef.current.height = rect.height * dpr + + setContainerSize({ width: rect.width, height: rect.height }) + } + } + + window.addEventListener("resize", handleResize) + handleResize() + + return () => window.removeEventListener("resize", handleResize) + }, []) + + // Animation Loop + useEffect(() => { + const animate = (time: number) => { + if (time - lastTimeRef.current > 500) { + cursorBlinkRef.current = !cursorBlinkRef.current + lastTimeRef.current = time + } + + // Trigger a redraw + draw() + + animationRef.current = requestAnimationFrame(animate) + } + + animationRef.current = requestAnimationFrame(animate) + + return () => cancelAnimationFrame(animationRef.current) + }) // No dependency array to ensure it always has access to latest props via closure if needed, + // but actually we should probably use refs for props if we want to avoid re-binding the loop. + // However, since we call draw() which uses the props, we need to make sure draw() sees the latest props. + // The best way in React for a canvas loop is often to use refs for the mutable state or just let the effect re-run. + // Let's optimize: + + // Drawing Logic + const draw = () => { + const canvas = canvasRef.current + if (!canvas) return + + const ctx = canvas.getContext("2d") + if (!ctx) return + + const dpr = window.devicePixelRatio || 1 + const width = containerSize.width + const height = containerSize.height + + // Reset transform to handle DPR correctly on every frame + ctx.setTransform(dpr, 0, 0, dpr, 0, 0) + + // Clear + ctx.fillStyle = BG_COLOR + ctx.fillRect(0, 0, width, height) + + // Draw Layout + drawNode(ctx, layout, 0, 0, width, height) + } + + function drawNode(ctx: CanvasRenderingContext2D, node: LayoutNode, x: number, y: number, w: number, h: number) { + // Add a small gap for the border + const gap = 2 + + if (node.type === "pane") { + // Draw Pane Background + ctx.fillStyle = "#050505" + ctx.fillRect(x + gap, y + gap, w - gap * 2, h - gap * 2) + + // Draw Border + ctx.lineWidth = 1 + ctx.strokeStyle = node.id === activePaneId ? ACTIVE_BORDER_COLOR : BORDER_COLOR + + // If active, make border slightly thicker/glowy + if (node.id === activePaneId) { + ctx.shadowColor = ACTIVE_BORDER_COLOR + ctx.shadowBlur = 4 + } else { + ctx.shadowBlur = 0 + } + + ctx.strokeRect(x + gap, y + gap, w - gap * 2, h - gap * 2) + ctx.shadowBlur = 0 // Reset + + // Draw Pane ID/Status + ctx.font = '12px "JetBrains Mono", monospace' + ctx.fillStyle = node.id === activePaneId ? TEXT_COLOR : MUTED_TEXT + ctx.fillText(`[${node.id}] zsh`, x + 15, y + 25) + + // Draw "Content" simulation + if (h > 60) { + ctx.fillStyle = MUTED_TEXT + const lines = Math.floor((h - 50) / 16) + for (let i = 0; i < Math.min(lines, 8); i++) { + // Randomize line length to look like code + // Use a pseudo-random based on ID and index to keep it stable + const width = (Math.sin(i * 132 + node.id) * 0.5 + 0.5) * (w - 60) + 20 + ctx.fillRect(x + 15, y + 45 + i * 16, width, 6) + } + + // Cursor + if (node.id === activePaneId && cursorBlinkRef.current) { + ctx.fillStyle = TEXT_COLOR + const lastLineY = y + 45 + Math.min(lines, 8) * 16 + ctx.fillRect(x + 15, lastLineY, 8, 14) + } + } + } else if (node.type === "split-v") { + // Vertical Split (Top/Bottom) + const h1 = h * (node.ratio || 0.5) + const h2 = h - h1 + drawNode(ctx, node.children[0], x, y, w, h1) + drawNode(ctx, node.children[1], x, y + h1, w, h2) + } else if (node.type === "split-h") { + // Horizontal Split (Left/Right) + const w1 = w * (node.ratio || 0.5) + const w2 = w - w1 + drawNode(ctx, node.children[0], x, y, w1, h) + drawNode(ctx, node.children[1], x + w1, y, w2, h) + } + } + + return ( +
+ + + {/* Scanline overlay for the canvas specifically */} +
+ +
+ RENDERER: CANVAS_2D // {Math.round(containerSize.width)}x{Math.round(containerSize.height)} +
+
+ ) +} diff --git a/components/theme-provider.tsx b/components/theme-provider.tsx new file mode 100644 index 0000000..55c2f6e --- /dev/null +++ b/components/theme-provider.tsx @@ -0,0 +1,11 @@ +'use client' + +import * as React from 'react' +import { + ThemeProvider as NextThemesProvider, + type ThemeProviderProps, +} from 'next-themes' + +export function ThemeProvider({ children, ...props }: ThemeProviderProps) { + return {children} +} diff --git a/components/ui/accordion.tsx b/components/ui/accordion.tsx new file mode 100644 index 0000000..e538a33 --- /dev/null +++ b/components/ui/accordion.tsx @@ -0,0 +1,66 @@ +'use client' + +import * as React from 'react' +import * as AccordionPrimitive from '@radix-ui/react-accordion' +import { ChevronDownIcon } from 'lucide-react' + +import { cn } from '@/lib/utils' + +function Accordion({ + ...props +}: React.ComponentProps) { + return +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + svg]:rotate-180', + className, + )} + {...props} + > + {children} + + + + ) +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
{children}
+
+ ) +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } diff --git a/components/ui/alert-dialog.tsx b/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..9704452 --- /dev/null +++ b/components/ui/alert-dialog.tsx @@ -0,0 +1,157 @@ +'use client' + +import * as React from 'react' +import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog' + +import { cn } from '@/lib/utils' +import { buttonVariants } from '@/components/ui/button' + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ) +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogAction({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AlertDialogCancel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +} diff --git a/components/ui/alert.tsx b/components/ui/alert.tsx new file mode 100644 index 0000000..e6751ab --- /dev/null +++ b/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from 'react' +import { cva, type VariantProps } from 'class-variance-authority' + +import { cn } from '@/lib/utils' + +const alertVariants = cva( + 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current', + { + variants: { + variant: { + default: 'bg-card text-card-foreground', + destructive: + 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<'div'> & VariantProps) { + return ( +
+ ) +} + +function AlertTitle({ className, ...props }: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<'div'>) { + return ( +
+ ) +} + +export { Alert, AlertTitle, AlertDescription } diff --git a/components/ui/aspect-ratio.tsx b/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..40bb120 --- /dev/null +++ b/components/ui/aspect-ratio.tsx @@ -0,0 +1,11 @@ +'use client' + +import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio' + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return +} + +export { AspectRatio } diff --git a/components/ui/avatar.tsx b/components/ui/avatar.tsx new file mode 100644 index 0000000..aa98465 --- /dev/null +++ b/components/ui/avatar.tsx @@ -0,0 +1,53 @@ +'use client' + +import * as React from 'react' +import * as AvatarPrimitive from '@radix-ui/react-avatar' + +import { cn } from '@/lib/utils' + +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { Avatar, AvatarImage, AvatarFallback } diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx new file mode 100644 index 0000000..fc4126b --- /dev/null +++ b/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from 'react' +import { Slot } from '@radix-ui/react-slot' +import { cva, type VariantProps } from 'class-variance-authority' + +import { cn } from '@/lib/utils' + +const badgeVariants = cva( + 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden', + { + variants: { + variant: { + default: + 'border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90', + secondary: + 'border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90', + destructive: + 'border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', + outline: + 'text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<'span'> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : 'span' + + return ( + + ) +} + +export { Badge, badgeVariants } diff --git a/components/ui/breadcrumb.tsx b/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..1750ff2 --- /dev/null +++ b/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import * as React from 'react' +import { Slot } from '@radix-ui/react-slot' +import { ChevronRight, MoreHorizontal } from 'lucide-react' + +import { cn } from '@/lib/utils' + +function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) { + return