{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "portfolio-v2",
  "title": "Portfolio v2",
  "description": "Static personal portfolio for a fullstack developer — notes, fictional projects, and experience. Typed TypeScript content — no CMS, no markdown. New projects only (shadcn init --template next).",
  "dependencies": [
    "class-variance-authority",
    "radix-ui",
    "lucide-react",
    "geist",
    "next-themes"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/new-york/templates/portfolio-v2/components/ui/badge.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n  \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n        secondary:\n          \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n        destructive:\n          \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n        outline:\n          \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction Badge({\n  className,\n  variant = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n  const Comp = asChild ? Slot.Root : \"span\"\n\n  return (\n    <Comp\n      data-slot=\"badge\"\n      data-variant={variant}\n      className={cn(badgeVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\n\nexport { Badge, badgeVariants }\n",
      "type": "registry:ui",
      "target": "components/ui/badge.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/ui/button.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n  \"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n        outline:\n          \"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n        destructive:\n          \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default:\n          \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n        sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n        lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3\",\n        icon: \"size-8\",\n        \"icon-xs\":\n          \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n        \"icon-sm\":\n          \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n        \"icon-lg\": \"size-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot.Root : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      data-variant={variant}\n      data-size={size}\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n",
      "type": "registry:ui",
      "target": "components/ui/button.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/app/layout.tsx",
      "content": "import type { Metadata } from \"next\"\nimport { GeistSans } from \"geist/font/sans\"\nimport type { ReactNode } from \"react\"\n\nimport { LiquidShell } from \"../components/liquid-shell\"\nimport { ThemeProvider } from \"../components/theme-provider\"\n\nimport \"./globals.css\"\n\nexport const metadata: Metadata = {\n  title: \"Jon Doe\",\n  description:\n    \"Fullstack developer. Building clear systems and shipping software that stays easy to maintain.\",\n}\n\n// Same pattern as canvasui.dev — Origin Trial meta (no chrome://flags needed).\n// One token from https://developer.chrome.com/origintrials for your site origin.\nconst ORIGIN_TRIAL_TOKEN =\n  process.env.NEXT_PUBLIC_HTML_IN_CANVAS_OT_TOKEN ?? \"\"\n\nexport default function RootLayout({ children }: { children: ReactNode }) {\n  return (\n    <html\n      lang=\"en\"\n      className={`h-full ${GeistSans.variable} antialiased`}\n      suppressHydrationWarning\n    >\n      {ORIGIN_TRIAL_TOKEN ? (\n        <head>\n          <meta httpEquiv=\"origin-trial\" content={ORIGIN_TRIAL_TOKEN} />\n        </head>\n      ) : null}\n      <body\n        className={`${GeistSans.className} flex min-h-svh flex-col bg-background font-sans text-foreground`}\n      >\n        <ThemeProvider>\n          <LiquidShell>\n            <div className=\"mx-auto flex min-h-svh w-full max-w-6xl flex-1 flex-col px-6 py-12 md:px-12 md:py-16 lg:px-16\">\n              <main className=\"flex flex-1 flex-col\">{children}</main>\n            </div>\n          </LiquidShell>\n        </ThemeProvider>\n      </body>\n    </html>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/layout.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/app/page.tsx",
      "content": "import Link from \"next/link\"\nimport { ArrowUpRightIcon } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nimport { ThemeToggle } from \"../components/theme-toggle\"\nimport { CopyEmail } from \"../components/copy-email\"\nimport { Avatar } from \"../components/avatar\"\nimport { getNotes } from \"../lib/notes\"\n\nconst projects = [\n  {\n    number: \"01\",\n    name: \"Panfry\",\n    href: \"https://github.com/\",\n    description: \"A small recipe box for the meals I actually cook on repeat\",\n  },\n  {\n    number: \"02\",\n    name: \"Longmile\",\n    href: \"https://github.com/\",\n    description: \"Tracks my slow, patient return to running after a bad knee\",\n  },\n  {\n    number: \"03\",\n    name: \"Spinebox\",\n    href: \"https://github.com/\",\n    description: \"A shelf for the books I have actually finished this year\",\n  },\n  {\n    number: \"04\",\n    name: \"Coinwell\",\n    href: \"https://github.com/\",\n    description: \"A simple, honest look at where my money actually goes\",\n  },\n] as const\n\nconst experience = [\n  {\n    role: \"Senior Full Stack Engineer\",\n    company: \"Cortexa Labs\",\n    dates: \"2024 to Present\",\n  },\n  {\n    role: \"Full Stack Engineer\",\n    company: \"Latentworks\",\n    dates: \"2021 to 2024\",\n  },\n  {\n    role: \"Software Engineer\",\n    company: \"Synapse Foundry\",\n    dates: \"2018 to 2021\",\n  },\n  {\n    role: \"Junior Developer\",\n    company: \"NeuralArc\",\n    dates: \"2015 to 2018\",\n  },\n] as const\n\nexport default function HomePage() {\n  const notes = getNotes()\n\n  return (\n    <div className=\"flex flex-1 flex-col\">\n      {/* Top — 2 columns */}\n      <header className=\"grid grid-cols-1 gap-10 md:grid-cols-2 md:items-start md:gap-16 lg:gap-20\">\n        <div className=\"flex items-center gap-4\">\n          <Avatar />\n          <div className=\"min-w-0\">\n            <h1 className=\"text-lg font-semibold tracking-tight text-foreground\">\n              Jon Doe\n            </h1>\n            <p className=\"text-sm text-muted-foreground\">Fullstack Developer</p>\n          </div>\n        </div>\n\n        <div className=\"flex flex-col gap-5 text-[0.9375rem] leading-relaxed text-muted-foreground\">\n          <p className=\"font-medium text-foreground\">Hey, I&apos;m Jon.</p>\n          <p>\n            I work as a fullstack developer, building for AI infrastructure\n            startups and teams shipping real tools with real users. I keep my\n            stack simple, I ship in pieces I can trust, and I leave software\n            that stays easy to maintain.\n          </p>\n          <p>\n            Find me on{\" \"}\n            <Button\n              variant=\"link\"\n              asChild\n              className=\"h-auto p-0 text-[0.9375rem]\"\n            >\n              <a href=\"https://x.com/\" target=\"_blank\" rel=\"noreferrer\">\n                X\n              </a>\n            </Button>\n            ,{\" \"}\n            <Button\n              variant=\"link\"\n              asChild\n              className=\"h-auto p-0 text-[0.9375rem]\"\n            >\n              <a\n                href=\"https://www.linkedin.com/\"\n                target=\"_blank\"\n                rel=\"noreferrer\"\n              >\n                LinkedIn\n              </a>\n            </Button>\n            , or{\" \"}\n            <Button\n              variant=\"link\"\n              asChild\n              className=\"h-auto p-0 text-[0.9375rem]\"\n            >\n              <a href=\"https://github.com/\" target=\"_blank\" rel=\"noreferrer\">\n                GitHub\n              </a>\n            </Button>\n            . Or shoot me an <CopyEmail />.\n          </p>\n        </div>\n      </header>\n\n      <div className=\"min-h-12 flex-1 md:min-h-16\" aria-hidden />\n\n      <div className=\"grid grid-cols-1 gap-12 sm:grid-cols-2 md:grid-cols-3 md:gap-12 lg:gap-16\">\n        <section className=\"flex flex-col gap-5\">\n          <h2 className=\"text-xs font-medium tracking-tight text-muted-foreground\">\n            Notes\n          </h2>\n          <ul className=\"flex flex-col\">\n            {notes.map((note) => (\n              <li\n                key={note.slug}\n                className=\"border-b border-dotted border-border/60 py-3 first:pt-0 last:border-b-0\"\n              >\n                <Link\n                  href={`/notes/${note.slug}`}\n                  className=\"group flex flex-col gap-1\"\n                >\n                  <span className=\"text-[0.9375rem] font-medium text-foreground transition-opacity group-hover:opacity-70\">\n                    {note.title}\n                  </span>\n                  <span className=\"font-mono text-xs text-muted-foreground tabular-nums\">\n                    {note.date.slice(0, 4)}\n                  </span>\n                </Link>\n              </li>\n            ))}\n          </ul>\n          <div className=\"pt-2\">\n            <Link\n              href=\"/notes\"\n              className=\"group inline-flex items-center gap-1.5 text-[0.9375rem] font-medium text-foreground\"\n            >\n              More\n              <ArrowUpRightIcon\n                aria-hidden\n                className=\"size-3.5 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground\"\n              />\n            </Link>\n          </div>\n        </section>\n\n        <section className=\"flex flex-col gap-5\">\n          <h2 className=\"text-xs font-medium tracking-tight text-muted-foreground\">\n            Projects\n          </h2>\n          <ul className=\"flex flex-col\">\n            {projects.map((project) => (\n              <li\n                key={project.name}\n                className=\"border-b border-dotted border-border/60 py-3 first:pt-0 last:border-b-0\"\n              >\n                <a\n                  href={project.href}\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                  className=\"group grid grid-cols-[auto_1fr] items-baseline gap-x-3 gap-y-1\"\n                >\n                  <span className=\"font-mono text-xs text-muted-foreground tabular-nums\">\n                    {project.number}\n                  </span>\n                  <span className=\"inline-flex items-center gap-1.5 text-[0.9375rem] font-medium text-foreground\">\n                    {project.name}\n                    <ArrowUpRightIcon\n                      aria-hidden\n                      className=\"size-3.5 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground\"\n                    />\n                  </span>\n                  <span className=\"col-start-2 text-xs text-muted-foreground\">\n                    {project.description}\n                  </span>\n                </a>\n              </li>\n            ))}\n          </ul>\n        </section>\n\n        <section className=\"flex flex-col gap-5 sm:col-span-2 md:col-span-1\">\n          <h2 className=\"text-xs font-medium tracking-tight text-muted-foreground\">\n            Experience\n          </h2>\n          <ul className=\"flex flex-col\">\n            {experience.map((job) => (\n              <li\n                key={`${job.company}-${job.dates}`}\n                className=\"border-b border-dotted border-border/60 py-3 first:pt-0 last:border-b-0\"\n              >\n                <a\n                  href=\"https://www.linkedin.com/\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                  className=\"group flex flex-col gap-1\"\n                >\n                  <span className=\"text-[0.9375rem] font-medium text-foreground transition-opacity group-hover:opacity-70\">\n                    {job.role}, {job.company}\n                  </span>\n                  <span className=\"font-mono text-xs text-muted-foreground tabular-nums\">\n                    {job.dates}\n                  </span>\n                </a>\n              </li>\n            ))}\n          </ul>\n          <div className=\"pt-2\">\n            <a\n              href=\"https://www.linkedin.com/\"\n              target=\"_blank\"\n              rel=\"noreferrer\"\n              className=\"group inline-flex items-center gap-1.5 text-[0.9375rem] font-medium text-foreground\"\n            >\n              LinkedIn\n              <ArrowUpRightIcon\n                aria-hidden\n                className=\"size-3.5 shrink-0 text-muted-foreground transition-colors group-hover:text-foreground\"\n              />\n            </a>\n          </div>\n        </section>\n      </div>\n\n      <div className=\"flex justify-end pt-12 md:pt-16\">\n        <ThemeToggle />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/page.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/app/notes/page.tsx",
      "content": "import Link from \"next/link\"\n\nimport { Avatar } from \"../../components/avatar\"\nimport { ThemeToggle } from \"../../components/theme-toggle\"\nimport { formatNoteDate, getNotes } from \"../../lib/notes\"\n\nexport default function NotesIndexPage() {\n  const notes = getNotes()\n\n  return (\n    <div className=\"flex flex-1 flex-col\">\n      <div className=\"grid grid-cols-1 items-start gap-10 md:grid-cols-2 md:gap-16 lg:gap-20\">\n        <Link href=\"/\" className=\"flex items-center gap-4\">\n          <Avatar />\n          <div className=\"min-w-0\">\n            <p className=\"text-lg font-semibold tracking-tight text-foreground\">\n              Jon Doe\n            </p>\n            <p className=\"text-sm text-muted-foreground\">\n              Fullstack Developer\n            </p>\n          </div>\n        </Link>\n\n        <div className=\"flex flex-col\">\n          <h1 className=\"text-lg font-semibold tracking-tight text-foreground\">\n            Notes\n          </h1>\n          <p className=\"mt-2 text-sm text-muted-foreground\">\n            Short writing on fullstack development, shipping, and systems.\n          </p>\n          <ul className=\"mt-8 flex flex-col\">\n            {notes.map((note) => (\n              <li\n                key={note.slug}\n                className=\"border-b border-dotted border-border/60 py-4 first:pt-0 last:border-b-0\"\n              >\n                <Link\n                  href={`/notes/${note.slug}`}\n                  className=\"group flex flex-col gap-1\"\n                >\n                  <span className=\"text-[0.9375rem] font-medium text-foreground transition-opacity group-hover:opacity-70\">\n                    {note.title}\n                  </span>\n                  <span className=\"text-sm text-muted-foreground\">\n                    {formatNoteDate(note.date)}\n                    {note.description ? ` — ${note.description}` : null}\n                  </span>\n                </Link>\n              </li>\n            ))}\n          </ul>\n        </div>\n      </div>\n\n      <div className=\"mt-auto flex justify-end pt-12 md:pt-16\">\n        <ThemeToggle />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/notes/page.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/app/notes/[slug]/page.tsx",
      "content": "import Link from \"next/link\"\nimport { notFound } from \"next/navigation\"\n\nimport { Avatar } from \"../../../components/avatar\"\nimport { ThemeToggle } from \"../../../components/theme-toggle\"\nimport { formatNoteDate, getNote, getNotes } from \"../../../lib/notes\"\n\ntype PageProps = {\n  params: Promise<{ slug: string }>\n}\n\nexport function generateStaticParams() {\n  return getNotes().map((note) => ({ slug: note.slug }))\n}\n\nexport default async function NotePage({ params }: PageProps) {\n  const { slug } = await params\n  const note = getNote(slug)\n\n  if (!note) {\n    notFound()\n  }\n\n  return (\n    <div className=\"flex flex-1 flex-col\">\n      <div className=\"grid grid-cols-1 items-start gap-10 md:grid-cols-2 md:gap-16 lg:gap-20\">\n        <Link href=\"/\" className=\"flex items-center gap-4\">\n          <Avatar />\n          <div className=\"min-w-0\">\n            <p className=\"text-lg font-semibold tracking-tight text-foreground\">\n              Jon Doe\n            </p>\n            <p className=\"text-sm text-muted-foreground\">\n              Fullstack Developer\n            </p>\n          </div>\n        </Link>\n\n        <article className=\"flex flex-col\">\n          <h1 className=\"text-2xl font-semibold tracking-tight text-foreground md:text-3xl\">\n            {note.title}\n          </h1>\n          <p className=\"mt-3 font-mono text-xs uppercase tabular-nums tracking-wide text-muted-foreground\">\n            {formatNoteDate(note.date)}\n          </p>\n          <div className=\"mt-8 flex flex-col gap-5 text-[0.9375rem] leading-relaxed text-muted-foreground\">\n            <note.body />\n          </div>\n        </article>\n      </div>\n\n      <div className=\"mt-auto flex justify-end pt-12 md:pt-16\">\n        <ThemeToggle />\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/notes/[slug]/page.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/theme-provider.tsx",
      "content": "\"use client\"\n\nimport { ThemeProvider as NextThemesProvider } from \"next-themes\"\nimport type { ReactNode } from \"react\"\n\nimport { ThemeKeyboardShortcut } from \"./theme-toggle\"\n\nexport function ThemeProvider({ children }: { children: ReactNode }) {\n  return (\n    <NextThemesProvider\n      attribute=\"class\"\n      defaultTheme=\"system\"\n      enableSystem\n      disableTransitionOnChange\n    >\n      <ThemeKeyboardShortcut />\n      {children}\n    </NextThemesProvider>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/theme-provider.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/theme-toggle.tsx",
      "content": "\"use client\"\n\nimport { useCallback, useEffect, useRef, useSyncExternalStore } from \"react\"\nimport { flushSync } from \"react-dom\"\nimport { MonitorIcon, MoonIcon, SunIcon } from \"lucide-react\"\nimport { useTheme } from \"next-themes\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst themes = [\n  { value: \"system\", label: \"System theme\", icon: MonitorIcon },\n  { value: \"light\", label: \"Light theme\", icon: SunIcon },\n  { value: \"dark\", label: \"Dark theme\", icon: MoonIcon },\n] as const\n\ntype ThemeValue = (typeof themes)[number][\"value\"]\n\nconst emptySubscribe = () => () => {}\n\nconst TOGGLE_COOLDOWN_MS = 650\n\n/** Pure so it can be unit tested without a DOM. */\nexport function shouldAllowToggle(lastToggleAt: number, now: number): boolean {\n  return now - lastToggleAt >= TOGGLE_COOLDOWN_MS\n}\n\n/** Returns true when the OS/browser has requested reduced motion. */\nfunction prefersReducedMotion() {\n  return (\n    typeof window !== \"undefined\" &&\n    window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n  )\n}\n\ntype VtDocument = Document & {\n  startViewTransition?: (cb: () => void | Promise<void>) => {\n    finished: Promise<void>\n  }\n}\n\nfunction useIsClient() {\n  return useSyncExternalStore(emptySubscribe, () => true, () => false)\n}\n\nfunction isEditableTarget(target: EventTarget | null) {\n  return (\n    (target instanceof HTMLElement && target.isContentEditable) ||\n    target instanceof HTMLInputElement ||\n    target instanceof HTMLTextAreaElement ||\n    target instanceof HTMLSelectElement\n  )\n}\n\n/** Canvas UI pattern: set theme inside flushSync (± view transition). */\nfunction applyTheme(setTheme: (theme: string) => void, next: string) {\n  const doc = document as VtDocument\n  if (doc.startViewTransition && !prefersReducedMotion()) {\n    doc.startViewTransition(() => {\n      flushSync(() => setTheme(next))\n    })\n    return\n  }\n  setTheme(next)\n}\n\nexport function ThemeToggle() {\n  const { theme, setTheme } = useTheme()\n  const mounted = useIsClient()\n\n  const activeTheme = (mounted ? theme : \"system\") as ThemeValue | undefined\n\n  return (\n    <div\n      role=\"group\"\n      aria-label=\"Theme\"\n      className=\"inline-flex items-center rounded-full border border-border bg-muted/60 p-0.5\"\n    >\n      {themes.map(({ value, label, icon: Icon }) => {\n        const isActive = activeTheme === value\n\n        return (\n          <button\n            key={value}\n            type=\"button\"\n            aria-label={label}\n            aria-pressed={isActive}\n            onClick={() => applyTheme(setTheme, value)}\n            className={cn(\n              \"flex size-7 items-center justify-center rounded-full transition-colors\",\n              isActive\n                ? \"bg-background text-foreground shadow-sm\"\n                : \"text-muted-foreground hover:text-foreground\"\n            )}\n          >\n            <Icon className=\"size-3.5\" strokeWidth={1.75} aria-hidden />\n          </button>\n        )\n      })}\n    </div>\n  )\n}\n\nexport function ThemeKeyboardShortcut() {\n  const { resolvedTheme, setTheme } = useTheme()\n  const lastToggleAt = useRef<number>(0)\n\n  const toggleTheme = useCallback(() => {\n    const now = Date.now()\n    if (!shouldAllowToggle(lastToggleAt.current, now)) return\n    lastToggleAt.current = now\n    applyTheme(setTheme, resolvedTheme === \"dark\" ? \"light\" : \"dark\")\n  }, [resolvedTheme, setTheme])\n\n  useEffect(() => {\n    const onKeyDown = (event: KeyboardEvent) => {\n      if (event.metaKey || event.ctrlKey || event.altKey) return\n      if (event.key !== \"d\" && event.key !== \"D\") return\n      if (isEditableTarget(event.target)) return\n\n      event.preventDefault()\n      toggleTheme()\n    }\n\n    document.addEventListener(\"keydown\", onKeyDown)\n    return () => document.removeEventListener(\"keydown\", onKeyDown)\n  }, [toggleTheme])\n\n  return null\n}\n",
      "type": "registry:component",
      "target": "components/theme-toggle.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/copy-email.tsx",
      "content": "\"use client\"\n\nimport { useEffect, useRef, useState } from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nconst EMAIL = \"jefferyspippitt@gmail.com\"\n\nexport function CopyEmail() {\n  const [copied, setCopied] = useState(false)\n  const resetRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n\n  useEffect(() => {\n    return () => {\n      if (resetRef.current) clearTimeout(resetRef.current)\n    }\n  }, [])\n\n  async function handleCopy() {\n    try {\n      await navigator.clipboard.writeText(EMAIL)\n      setCopied(true)\n      if (resetRef.current) clearTimeout(resetRef.current)\n      resetRef.current = setTimeout(() => setCopied(false), 1500)\n    } catch {\n      setCopied(false)\n    }\n  }\n\n  return (\n    <Button\n      type=\"button\"\n      variant=\"link\"\n      onClick={handleCopy}\n      className=\"h-auto cursor-pointer p-0 text-[0.9375rem]\"\n      aria-label={copied ? \"Email copied\" : `Copy email ${EMAIL}`}\n    >\n      {copied ? \"Copied\" : \"email\"}\n    </Button>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/copy-email.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/avatar.tsx",
      "content": "import { existsSync } from \"node:fs\"\nimport { join } from \"node:path\"\nimport Image from \"next/image\"\n\nconst AVATAR_EXTENSIONS = [\".jpg\", \".jpeg\", \".png\", \".webp\", \".avif\", \".gif\"] as const\n\nfunction resolveAvatarSrc(): string | null {\n  // After install: drop public/avatar.png (any supported extension).\n  const installDir = join(process.cwd(), \"public\")\n  for (const ext of AVATAR_EXTENSIONS) {\n    const filename = `avatar${ext}`\n    if (existsSync(join(installDir, filename))) {\n      return `/${filename}`\n    }\n  }\n\n  // Monorepo preview / site demo (Next only serves root public/).\n  // Same idea as public/images/blocks/<block-id>/.\n  const demoDir = join(\n    process.cwd(),\n    \"public\",\n    \"images\",\n    \"templates\",\n    \"portfolio-v2\"\n  )\n  for (const ext of AVATAR_EXTENSIONS) {\n    const filename = `avatar${ext}`\n    if (existsSync(join(demoDir, filename))) {\n      return `/images/templates/portfolio-v2/${filename}`\n    }\n  }\n\n  return null\n}\n\nexport function Avatar() {\n  const src = resolveAvatarSrc()\n\n  if (src) {\n    return (\n      <Image\n        src={src}\n        alt=\"\"\n        width={48}\n        height={48}\n        unoptimized\n        className=\"size-12 shrink-0 rounded-full object-cover\"\n      />\n    )\n  }\n\n  return (\n    <span\n      aria-hidden\n      className=\"flex size-12 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-medium tracking-tight text-foreground\"\n    >\n      JD\n    </span>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/avatar.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/liquid-shell.tsx",
      "content": "\"use client\"\n\nimport { useTheme } from \"next-themes\"\nimport {\n  useSyncExternalStore,\n  type ReactNode,\n} from \"react\"\n\nimport { Liquid } from \"@/components/canvasui/liquid\"\n\n/**\n * Trail colors as sRGB in the 0–1 range (Liquid converts to linear).\n * Light mode uses a richer blue so the overlay reads on white;\n * dark mode keeps a lighter cobalt that pops on near-black.\n */\nconst LIGHT_COLOR: [number, number, number] = [0.18, 0.32, 0.98]\nconst DARK_COLOR: [number, number, number] = [0.32, 0.45, 1]\n\nconst emptySubscribe = () => () => {}\n\nfunction useIsClient() {\n  return useSyncExternalStore(emptySubscribe, () => true, () => false)\n}\n\ntype LiquidShellProps = {\n  children: ReactNode\n  className?: string\n}\n\n/**\n * Full-page Canvas UI Liquid wrapper.\n *\n * Text distortion only runs in Chromium when the html-in-canvas API is\n * available (chrome://flags/#canvas-draw-element, or a Chrome origin\n * trial token for production). Without it Liquid still paints pointer\n * trails over live HTML — matching the official package fallback.\n */\nexport function LiquidShell({ children, className }: LiquidShellProps) {\n  const { resolvedTheme } = useTheme()\n  const mounted = useIsClient()\n  const isDark = !mounted || resolvedTheme !== \"light\"\n\n  return (\n    <Liquid\n      force={0.4}\n      radius={0.2}\n      curl={1.5}\n      pressureIterations={2}\n      pressure={0.5}\n      intensity={isDark ? 2 : 2.5}\n      distortion={0.35}\n      blend={isDark ? 5 : 7}\n      densityDissipation={0.9}\n      velocityDissipation={1}\n      color={isDark ? DARK_COLOR : LIGHT_COLOR}\n      rainbow={false}\n      className={\n        className ??\n        \"relative flex min-h-svh w-full flex-1 flex-col\"\n      }\n      style={{ minHeight: \"100svh\" }}\n    >\n      {/*\n        Solid page surface: the sim captures this subtree when html-in-canvas\n        is available. Without a real background, light mode text sits on\n        transparent pixels and warping looks incomplete.\n      */}\n      <div className=\"relative flex min-h-svh w-full flex-1 flex-col bg-background text-foreground\">\n        {children}\n      </div>\n    </Liquid>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/liquid-shell.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/components/canvasui/liquid.tsx",
      "content": "\"use client\";\n\nimport {\n  useEffect,\n  useRef,\n  useState,\n  useSyncExternalStore,\n  type ReactNode,\n} from \"react\";\n\nexport interface LiquidOptions {\n  /** Resolution of the simulation grid. */\n  simResolution?: number;\n  /** Resolution of the fluid trail texture. */\n  dyeResolution?: number;\n  /** How much the trail persists each frame (closer to 1 lasts longer). */\n  densityDissipation?: number;\n  /** How much motion persists each frame (closer to 1 lasts longer). */\n  velocityDissipation?: number;\n  /** How much pressure carries over between frames. */\n  pressure?: number;\n  /** Pressure solver iterations. */\n  pressureIterations?: number;\n  /** Rotational force added back into the flow. */\n  curl?: number;\n  /** Radius of the pointer splat. */\n  radius?: number;\n  /** Force multiplier applied on pointer movement. */\n  force?: number;\n  /** Strength of the color tint left by the flow. */\n  intensity?: number;\n  /** How strongly the flow warps the content. */\n  distortion?: number;\n  /** How much of the fluid color blends over the content. */\n  blend?: number;\n  /** Trail color as [r, g, b] in 0-1 range. Ignored when rainbow is on. */\n  color?: [number, number, number];\n  /** Color the trail from the flow direction instead of a fixed color. */\n  rainbow?: boolean;\n}\n\nexport interface LiquidElements {\n  /** Canvas with layoutsubtree that hosts the HTML content. */\n  source: HTMLCanvasElement;\n  /** The element inside the source canvas that gets captured. */\n  content: HTMLElement;\n  /** Canvas the WebGL effect renders to. */\n  output: HTMLCanvasElement;\n}\n\nexport interface LiquidInstance {\n  /** Inject a splat at (x, y) in [0,1] space with velocity (dx, dy). */\n  splat: (x: number, y: number, dx: number, dy: number) => void;\n  /** Update simulation options live. Resolution changes are ignored. */\n  setOptions: (options: LiquidOptions) => void;\n  /** Re-read canvas size. Call when the element is resized. */\n  resize: () => void;\n  /** Stop the loop and release all GPU resources. */\n  destroy: () => void;\n}\n\nconst DEFAULTS: Required<LiquidOptions> = {\n  simResolution: 128,\n  dyeResolution: 512,\n  densityDissipation: 0.96,\n  velocityDissipation: 1,\n  pressure: 0.8,\n  pressureIterations: 4,\n  curl: 1.9,\n  radius: 0.3,\n  force: 1.1,\n  intensity: 2,\n  distortion: 0.4,\n  blend: 5,\n  color: [0.145, 0.239, 0.867],\n  rainbow: false,\n};\n\nconst DT = 1 / 60;\n\nfunction srgbToLinear(value: number): number {\n  return value <= 0.04045\n    ? value / 12.92\n    : Math.pow((value + 0.055) / 1.055, 2.4);\n}\n\ntype PaintableCanvas = HTMLCanvasElement & {\n  onpaint?: (() => void) | null;\n  requestPaint?: () => void;\n  // Chrome 156+: children are only hit-testable once their geometry is registered.\n  updateElementGeometry?: (element: Element) => void;\n};\n\ntype ElementImageContext = CanvasRenderingContext2D & {\n  drawElementImage?: (element: Element, x: number, y: number) => void;\n};\n\nconst VERT = `#version 300 es\nprecision highp float;\nlayout(location = 0) in vec2 aPos;\nout vec2 vUv;\nout vec2 vL;\nout vec2 vR;\nout vec2 vT;\nout vec2 vB;\nuniform vec2 texelSize;\nvoid main () {\n  vUv = aPos * 0.5 + 0.5;\n  vL = vUv - vec2(texelSize.x, 0.0);\n  vR = vUv + vec2(texelSize.x, 0.0);\n  vT = vUv + vec2(0.0, texelSize.y);\n  vB = vUv - vec2(0.0, texelSize.y);\n  gl_Position = vec4(aPos, 0.0, 1.0);\n}`;\n\nconst FRAG_DISPLAY = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 outColor;\nuniform sampler2D uContent;\nuniform sampler2D uFluid;\nuniform vec3 uColor;\nuniform float uDistortion;\nuniform float uIntensity;\nuniform float uBlend;\nuniform float uRainbow;\nuniform float uHasContent;\nvec3 toLinear (vec3 c) {\n  return mix(c / 12.92, pow((c + 0.055) / 1.055, vec3(2.4)), step(0.04045, c));\n}\nvec3 toSrgb (vec3 c) {\n  return mix(c * 12.92, 1.055 * pow(c, vec3(1.0 / 2.4)) - 0.055, step(0.0031308, c));\n}\nvoid main () {\n  vec3 fluid = texture(uFluid, vUv).rgb;\n  if (uHasContent < 0.5) {\n    float mag = length(fluid);\n    vec3 tint = uRainbow == 1.0\n      ? clamp(fluid / max(mag, 1e-3), 0.0, 1.0)\n      : uColor;\n    float overlay = (1.0 - exp(-mag * uIntensity * 0.5)) * 0.82;\n    outColor = vec4(toSrgb(clamp(tint, 0.0, 1.0)) * overlay, overlay);\n    return;\n  }\n  vec2 uv = vUv - fluid.rg * uDistortion * 0.001;\n  vec4 content = texture(uContent, vec2(uv.x, 1.0 - uv.y));\n  content.rgb = toLinear(content.rgb);\n  vec3 tint = uRainbow == 1.0 ? fluid : uColor * length(fluid);\n  vec4 fluidColor = vec4(tint, 1.0);\n  vec4 blended = mix(content, fluidColor, uBlend * 0.01 * clamp(length(fluid), 0.0, 1.0));\n  vec4 final = mix(blended, vec4(0.0), 1.0 - content.a);\n  outColor = vec4(toSrgb(clamp(final.rgb, 0.0, 1.0)), final.a);\n}`;\n\nconst FRAG_SPLAT = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 outColor;\nuniform sampler2D uTarget;\nuniform float uAspect;\nuniform vec3 uColor;\nuniform vec2 uPoint;\nuniform float uRadius;\nvoid main () {\n  vec2 p = vUv - uPoint;\n  p.x *= uAspect;\n  vec3 splat = exp(-dot(p, p) / uRadius) * uColor;\n  vec3 base = texture(uTarget, vUv).xyz;\n  outColor = vec4(base + splat, 1.0);\n}`;\n\nconst FRAG_ADVECT = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 outColor;\nuniform sampler2D uVelocity;\nuniform sampler2D uSource;\nuniform vec2 texelSize;\nuniform float uDt;\nuniform float uDissipation;\nvoid main () {\n  vec2 coord = vUv - uDt * texture(uVelocity, vUv).xy * texelSize;\n  outColor = uDissipation * texture(uSource, coord);\n  outColor.a = 1.0;\n}`;\n\nconst FRAG_CLEAR = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nout vec4 outColor;\nuniform sampler2D uTexture;\nuniform float uValue;\nvoid main () {\n  outColor = uValue * texture(uTexture, vUv);\n}`;\n\nconst FRAG_DIVERGENCE = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nin vec2 vL;\nin vec2 vR;\nin vec2 vT;\nin vec2 vB;\nout vec4 outColor;\nuniform sampler2D uVelocity;\nvoid main () {\n  float L = texture(uVelocity, vL).x;\n  float R = texture(uVelocity, vR).x;\n  float T = texture(uVelocity, vT).y;\n  float B = texture(uVelocity, vB).y;\n  vec2 C = texture(uVelocity, vUv).xy;\n  if (vL.x < 0.0) { L = -C.x; }\n  if (vR.x > 1.0) { R = -C.x; }\n  if (vT.y > 1.0) { T = -C.y; }\n  if (vB.y < 0.0) { B = -C.y; }\n  float div = 0.5 * (R - L + T - B);\n  outColor = vec4(div, 0.0, 0.0, 1.0);\n}`;\n\nconst FRAG_CURL = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nin vec2 vL;\nin vec2 vR;\nin vec2 vT;\nin vec2 vB;\nout vec4 outColor;\nuniform sampler2D uVelocity;\nvoid main () {\n  float L = texture(uVelocity, vL).y;\n  float R = texture(uVelocity, vR).y;\n  float T = texture(uVelocity, vT).x;\n  float B = texture(uVelocity, vB).x;\n  float vorticity = R - L - T + B;\n  outColor = vec4(vorticity, 0.0, 0.0, 1.0);\n}`;\n\nconst FRAG_VORTICITY = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nin vec2 vL;\nin vec2 vR;\nin vec2 vT;\nin vec2 vB;\nout vec4 outColor;\nuniform sampler2D uVelocity;\nuniform sampler2D uCurl;\nuniform float uCurlStrength;\nuniform float uDt;\nvoid main () {\n  float L = texture(uCurl, vL).x;\n  float R = texture(uCurl, vR).x;\n  float T = texture(uCurl, vT).x;\n  float B = texture(uCurl, vB).x;\n  float C = texture(uCurl, vUv).x;\n  vec2 force = vec2(abs(T) - abs(B), abs(R) - abs(L)) * 0.5;\n  force /= length(force) + 1.0;\n  force *= uCurlStrength * C;\n  force.y *= -1.0;\n  vec2 velocity = texture(uVelocity, vUv).xy;\n  outColor = vec4(velocity + force * uDt, 0.0, 1.0);\n}`;\n\nconst FRAG_PRESSURE = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nin vec2 vL;\nin vec2 vR;\nin vec2 vT;\nin vec2 vB;\nout vec4 outColor;\nuniform sampler2D uPressure;\nuniform sampler2D uDivergence;\nvoid main () {\n  float L = texture(uPressure, vL).x;\n  float R = texture(uPressure, vR).x;\n  float T = texture(uPressure, vT).x;\n  float B = texture(uPressure, vB).x;\n  float divergence = texture(uDivergence, vUv).x;\n  float pressure = (L + R + B + T - divergence) * 0.25;\n  outColor = vec4(pressure, 0.0, 0.0, 1.0);\n}`;\n\nconst FRAG_GRADIENT = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nin vec2 vL;\nin vec2 vR;\nin vec2 vT;\nin vec2 vB;\nout vec4 outColor;\nuniform sampler2D uPressure;\nuniform sampler2D uVelocity;\nvoid main () {\n  float L = texture(uPressure, vL).x;\n  float R = texture(uPressure, vR).x;\n  float T = texture(uPressure, vT).x;\n  float B = texture(uPressure, vB).x;\n  vec2 velocity = texture(uVelocity, vUv).xy;\n  velocity.xy -= vec2(R - L, T - B);\n  outColor = vec4(velocity, 0.0, 1.0);\n}`;\n\ninterface Target {\n  fbo: WebGLFramebuffer;\n  texture: WebGLTexture;\n  width: number;\n  height: number;\n}\n\ninterface DoubleTarget {\n  read: Target;\n  write: Target;\n  swap: () => void;\n}\n\nexport function supportsHtmlInCanvas(): boolean {\n  if (typeof document === \"undefined\") return false;\n  const probe = document.createElement(\"canvas\") as PaintableCanvas;\n  const ctx = probe.getContext(\"2d\") as ElementImageContext | null;\n  return Boolean(\n    ctx &&\n    typeof ctx.drawElementImage === \"function\" &&\n    typeof probe.requestPaint === \"function\",\n  );\n}\n\nexport function createLiquid(\n  elements: LiquidElements,\n  options: LiquidOptions = {},\n): LiquidInstance | null {\n  const config = { ...DEFAULTS, ...options };\n  const { source, content, output } = elements;\n\n  const gl = output.getContext(\"webgl2\", {\n    alpha: true,\n    depth: false,\n    stencil: false,\n    antialias: false,\n    premultipliedAlpha: true,\n  });\n  if (!gl || gl.isContextLost()) return null;\n\n  const sourceCtx = source.getContext(\"2d\") as ElementImageContext | null;\n  const paintable = source as PaintableCanvas;\n  const htmlInCanvas = Boolean(\n    sourceCtx &&\n    typeof sourceCtx.drawElementImage === \"function\" &&\n    typeof paintable.requestPaint === \"function\",\n  );\n\n  let contentDirty = false;\n  let wake = () => {};\n\n  if (htmlInCanvas) {\n    paintable.onpaint = () => {\n      try {\n        sourceCtx!.reset();\n        sourceCtx!.drawElementImage!(content, 0, 0);\n        // Register hit-test geometry so links/buttons under the canvas get clicks.\n        paintable.updateElementGeometry?.(content);\n        contentDirty = true;\n        wake();\n      } catch {}\n    };\n  }\n\n  gl.getExtension(\"EXT_color_buffer_float\");\n  const supportsLinear = Boolean(gl.getExtension(\"OES_texture_float_linear\"));\n  const filtering = supportsLinear ? gl.LINEAR : gl.NEAREST;\n\n  const shaders: WebGLShader[] = [];\n\n  function compile(type: number, source: string): WebGLShader {\n    const shader = gl!.createShader(type)!;\n    gl!.shaderSource(shader, source);\n    gl!.compileShader(shader);\n    if (!gl!.getShaderParameter(shader, gl!.COMPILE_STATUS)) {\n      console.error(\"Liquid shader error:\", gl!.getShaderInfoLog(shader));\n    }\n    shaders.push(shader);\n    return shader;\n  }\n\n  const vertexShader = compile(gl.VERTEX_SHADER, VERT);\n\n  interface Program {\n    program: WebGLProgram;\n    uniforms: Record<string, WebGLUniformLocation>;\n  }\n\n  const programs: WebGLProgram[] = [];\n\n  function createProgram(fragSource: string): Program {\n    const program = gl!.createProgram()!;\n    gl!.attachShader(program, vertexShader);\n    gl!.attachShader(program, compile(gl!.FRAGMENT_SHADER, fragSource));\n    gl!.linkProgram(program);\n    programs.push(program);\n    const uniforms: Record<string, WebGLUniformLocation> = {};\n    const count = gl!.getProgramParameter(program, gl!.ACTIVE_UNIFORMS);\n    for (let i = 0; i < count; i++) {\n      const info = gl!.getActiveUniform(program, i)!;\n      uniforms[info.name] = gl!.getUniformLocation(program, info.name)!;\n    }\n    return { program, uniforms };\n  }\n\n  const displayProgram = createProgram(FRAG_DISPLAY);\n  const splatProgram = createProgram(FRAG_SPLAT);\n  const advectProgram = createProgram(FRAG_ADVECT);\n  const clearProgram = createProgram(FRAG_CLEAR);\n  const divergenceProgram = createProgram(FRAG_DIVERGENCE);\n  const curlProgram = createProgram(FRAG_CURL);\n  const vorticityProgram = createProgram(FRAG_VORTICITY);\n  const pressureProgram = createProgram(FRAG_PRESSURE);\n  const gradientProgram = createProgram(FRAG_GRADIENT);\n\n  const quad = gl.createBuffer();\n  gl.bindBuffer(gl.ARRAY_BUFFER, quad);\n  gl.bufferData(\n    gl.ARRAY_BUFFER,\n    new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]),\n    gl.STATIC_DRAW,\n  );\n  gl.enableVertexAttribArray(0);\n  gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);\n\n  function createTarget(\n    size: number,\n    internalFormat: number,\n    format: number,\n    filter: number,\n  ): Target {\n    const texture = gl!.createTexture()!;\n    gl!.bindTexture(gl!.TEXTURE_2D, texture);\n    gl!.texParameteri(gl!.TEXTURE_2D, gl!.TEXTURE_MIN_FILTER, filter);\n    gl!.texParameteri(gl!.TEXTURE_2D, gl!.TEXTURE_MAG_FILTER, filter);\n    gl!.texParameteri(gl!.TEXTURE_2D, gl!.TEXTURE_WRAP_S, gl!.CLAMP_TO_EDGE);\n    gl!.texParameteri(gl!.TEXTURE_2D, gl!.TEXTURE_WRAP_T, gl!.CLAMP_TO_EDGE);\n    gl!.texImage2D(\n      gl!.TEXTURE_2D,\n      0,\n      internalFormat,\n      size,\n      size,\n      0,\n      format,\n      gl!.HALF_FLOAT,\n      null,\n    );\n    const fbo = gl!.createFramebuffer()!;\n    gl!.bindFramebuffer(gl!.FRAMEBUFFER, fbo);\n    gl!.framebufferTexture2D(\n      gl!.FRAMEBUFFER,\n      gl!.COLOR_ATTACHMENT0,\n      gl!.TEXTURE_2D,\n      texture,\n      0,\n    );\n    gl!.viewport(0, 0, size, size);\n    gl!.clearColor(0, 0, 0, 1);\n    gl!.clear(gl!.COLOR_BUFFER_BIT);\n    return { fbo, texture, width: size, height: size };\n  }\n\n  function createDoubleTarget(\n    size: number,\n    internalFormat: number,\n    format: number,\n    filter: number,\n  ): DoubleTarget {\n    let read = createTarget(size, internalFormat, format, filter);\n    let write = createTarget(size, internalFormat, format, filter);\n    return {\n      get read() {\n        return read;\n      },\n      get write() {\n        return write;\n      },\n      swap() {\n        const t = read;\n        read = write;\n        write = t;\n      },\n    };\n  }\n\n  const velocity = createDoubleTarget(\n    config.simResolution,\n    gl.RG16F,\n    gl.RG,\n    filtering,\n  );\n  const dye = createDoubleTarget(\n    config.dyeResolution,\n    gl.RGBA16F,\n    gl.RGBA,\n    filtering,\n  );\n  const divergence = createTarget(\n    config.simResolution,\n    gl.R16F,\n    gl.RED,\n    gl.NEAREST,\n  );\n  const curl = createTarget(config.simResolution, gl.R16F, gl.RED, gl.NEAREST);\n  const pressure = createDoubleTarget(\n    config.simResolution,\n    gl.R16F,\n    gl.RED,\n    gl.NEAREST,\n  );\n\n  function releaseAll() {\n    [\n      velocity.read,\n      velocity.write,\n      dye.read,\n      dye.write,\n      pressure.read,\n      pressure.write,\n      divergence,\n      curl,\n    ].forEach((t) => {\n      gl!.deleteFramebuffer(t.fbo);\n      gl!.deleteTexture(t.texture);\n    });\n  }\n\n  let texelX = 0;\n  let texelY = 0;\n\n  function updateTexelSize() {\n    const width = Math.max(output.clientWidth, 1);\n    const height = Math.max(output.clientHeight, 1);\n    texelX = 1 / (config.simResolution * (width / (height + 400)));\n    texelY = 1 / config.simResolution;\n  }\n\n  function syncCanvasSize() {\n    const dpr = Math.min(window.devicePixelRatio || 1, 2);\n    const width = Math.max(1, Math.round(output.clientWidth * dpr));\n    const height = Math.max(1, Math.round(output.clientHeight * dpr));\n    if (output.width !== width || output.height !== height) {\n      output.width = width;\n      output.height = height;\n    }\n    if (htmlInCanvas) {\n      const cssWidth = Math.max(1, Math.round(source.clientWidth));\n      const cssHeight = Math.max(1, Math.round(source.clientHeight));\n      if (source.width !== cssWidth * dpr || source.height !== cssHeight * dpr) {\n        source.width = cssWidth * dpr;\n        source.height = cssHeight * dpr;\n      }\n      paintable.requestPaint!();\n    }\n    updateTexelSize();\n  }\n\n  syncCanvasSize();\n\n  const contentTexture = gl.createTexture()!;\n  gl.bindTexture(gl.TEXTURE_2D, contentTexture);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n  gl.texImage2D(\n    gl.TEXTURE_2D,\n    0,\n    gl.RGBA,\n    1,\n    1,\n    0,\n    gl.RGBA,\n    gl.UNSIGNED_BYTE,\n    new Uint8Array([0, 0, 0, 0]),\n  );\n\n  function uploadContent() {\n    if (!htmlInCanvas || !contentDirty) return;\n    contentDirty = false;\n    gl!.bindTexture(gl!.TEXTURE_2D, contentTexture);\n    gl!.texImage2D(\n      gl!.TEXTURE_2D,\n      0,\n      gl!.RGBA,\n      gl!.RGBA,\n      gl!.UNSIGNED_BYTE,\n      source,\n    );\n  }\n\n  function blit(target: Target | null) {\n    if (target) {\n      gl!.bindFramebuffer(gl!.FRAMEBUFFER, target.fbo);\n      gl!.viewport(0, 0, target.width, target.height);\n    } else {\n      gl!.bindFramebuffer(gl!.FRAMEBUFFER, null);\n      gl!.viewport(0, 0, output.width, output.height);\n    }\n    gl!.drawArrays(gl!.TRIANGLE_STRIP, 0, 4);\n  }\n\n  function bindTexture(texture: WebGLTexture, unit: number): number {\n    gl!.activeTexture(gl!.TEXTURE0 + unit);\n    gl!.bindTexture(gl!.TEXTURE_2D, texture);\n    return unit;\n  }\n\n  function applySplat(x: number, y: number, dx: number, dy: number) {\n    const aspect = output.clientWidth / Math.max(output.clientHeight, 1);\n    const radius = config.radius / 100;\n\n    gl!.useProgram(splatProgram.program);\n    gl!.uniform1i(\n      splatProgram.uniforms.uTarget,\n      bindTexture(velocity.read.texture, 0),\n    );\n    gl!.uniform1f(splatProgram.uniforms.uAspect, aspect);\n    gl!.uniform2f(splatProgram.uniforms.uPoint, x, y);\n    gl!.uniform3f(splatProgram.uniforms.uColor, dx, dy, 10);\n    gl!.uniform1f(splatProgram.uniforms.uRadius, radius);\n    blit(velocity.write);\n    velocity.swap();\n\n    gl!.uniform1i(\n      splatProgram.uniforms.uTarget,\n      bindTexture(dye.read.texture, 0),\n    );\n    blit(dye.write);\n    dye.swap();\n  }\n\n  function step(delta: number) {\n    gl!.disable(gl!.BLEND);\n\n    gl!.useProgram(curlProgram.program);\n    gl!.uniform2f(curlProgram.uniforms.texelSize, texelX, texelY);\n    gl!.uniform1i(\n      curlProgram.uniforms.uVelocity,\n      bindTexture(velocity.read.texture, 0),\n    );\n    blit(curl);\n\n    gl!.useProgram(vorticityProgram.program);\n    gl!.uniform2f(vorticityProgram.uniforms.texelSize, texelX, texelY);\n    gl!.uniform1i(\n      vorticityProgram.uniforms.uVelocity,\n      bindTexture(velocity.read.texture, 0),\n    );\n    gl!.uniform1i(\n      vorticityProgram.uniforms.uCurl,\n      bindTexture(curl.texture, 1),\n    );\n    gl!.uniform1f(vorticityProgram.uniforms.uCurlStrength, config.curl);\n    gl!.uniform1f(vorticityProgram.uniforms.uDt, DT);\n    blit(velocity.write);\n    velocity.swap();\n\n    gl!.useProgram(divergenceProgram.program);\n    gl!.uniform2f(divergenceProgram.uniforms.texelSize, texelX, texelY);\n    gl!.uniform1i(\n      divergenceProgram.uniforms.uVelocity,\n      bindTexture(velocity.read.texture, 0),\n    );\n    blit(divergence);\n\n    gl!.useProgram(clearProgram.program);\n    gl!.uniform1i(\n      clearProgram.uniforms.uTexture,\n      bindTexture(pressure.read.texture, 0),\n    );\n    gl!.uniform1f(\n      clearProgram.uniforms.uValue,\n      Math.pow(config.pressure, delta * 60),\n    );\n    blit(pressure.write);\n    pressure.swap();\n\n    gl!.useProgram(pressureProgram.program);\n    gl!.uniform2f(pressureProgram.uniforms.texelSize, texelX, texelY);\n    gl!.uniform1i(\n      pressureProgram.uniforms.uDivergence,\n      bindTexture(divergence.texture, 0),\n    );\n    for (let i = 0; i < config.pressureIterations; i++) {\n      gl!.uniform1i(\n        pressureProgram.uniforms.uPressure,\n        bindTexture(pressure.read.texture, 1),\n      );\n      blit(pressure.write);\n      pressure.swap();\n    }\n\n    gl!.useProgram(gradientProgram.program);\n    gl!.uniform2f(gradientProgram.uniforms.texelSize, texelX, texelY);\n    gl!.uniform1i(\n      gradientProgram.uniforms.uPressure,\n      bindTexture(pressure.read.texture, 0),\n    );\n    gl!.uniform1i(\n      gradientProgram.uniforms.uVelocity,\n      bindTexture(velocity.read.texture, 1),\n    );\n    blit(velocity.write);\n    velocity.swap();\n\n    gl!.useProgram(advectProgram.program);\n    gl!.uniform2f(advectProgram.uniforms.texelSize, texelX, texelY);\n    gl!.uniform1i(\n      advectProgram.uniforms.uVelocity,\n      bindTexture(velocity.read.texture, 0),\n    );\n    gl!.uniform1i(\n      advectProgram.uniforms.uSource,\n      bindTexture(velocity.read.texture, 0),\n    );\n    gl!.uniform1f(advectProgram.uniforms.uDt, DT);\n    gl!.uniform1f(\n      advectProgram.uniforms.uDissipation,\n      Math.pow(config.velocityDissipation, delta * 60),\n    );\n    blit(velocity.write);\n    velocity.swap();\n\n    gl!.uniform1i(\n      advectProgram.uniforms.uVelocity,\n      bindTexture(velocity.read.texture, 0),\n    );\n    gl!.uniform1i(\n      advectProgram.uniforms.uSource,\n      bindTexture(dye.read.texture, 1),\n    );\n    gl!.uniform1f(\n      advectProgram.uniforms.uDissipation,\n      Math.pow(config.densityDissipation, delta * 60),\n    );\n    blit(dye.write);\n    dye.swap();\n  }\n\n  function render() {\n    uploadContent();\n    gl!.useProgram(displayProgram.program);\n    gl!.uniform1i(\n      displayProgram.uniforms.uContent,\n      bindTexture(contentTexture, 0),\n    );\n    gl!.uniform1i(\n      displayProgram.uniforms.uFluid,\n      bindTexture(dye.read.texture, 1),\n    );\n    gl!.uniform3f(\n      displayProgram.uniforms.uColor,\n      srgbToLinear(config.color[0]),\n      srgbToLinear(config.color[1]),\n      srgbToLinear(config.color[2]),\n    );\n    gl!.uniform1f(displayProgram.uniforms.uDistortion, config.distortion);\n    gl!.uniform1f(displayProgram.uniforms.uIntensity, config.intensity);\n    gl!.uniform1f(displayProgram.uniforms.uBlend, config.blend);\n    gl!.uniform1f(displayProgram.uniforms.uRainbow, config.rainbow ? 1 : 0);\n    gl!.uniform1f(displayProgram.uniforms.uHasContent, htmlInCanvas ? 1 : 0);\n    blit(null);\n  }\n\n  const queued: Array<[number, number, number, number]> = [];\n\n  let raf = 0;\n  let lastTime = performance.now();\n  let destroyed = false;\n  let running = false;\n  let visible = true;\n  let idleAt = 0;\n\n  function idleDelayMs() {\n    const dissipation = Math.min(config.densityDissipation, 0.999);\n    const frames = Math.log(1e-7) / Math.log(dissipation);\n    return (frames / 60) * 1000;\n  }\n\n  function frame(now: number) {\n    if (destroyed) return;\n    if (!visible) {\n      running = false;\n      return;\n    }\n    const delta = Math.min((now - lastTime) / 1000, 1 / 30);\n    lastTime = now;\n    if (queued.length > 0) {\n      idleAt = now + idleDelayMs();\n      while (queued.length > 0) {\n        const [x, y, dx, dy] = queued.pop()!;\n        applySplat(x, y, dx, dy);\n      }\n    }\n    step(delta);\n    render();\n    if (now >= idleAt && !contentDirty) {\n      running = false;\n      return;\n    }\n    raf = requestAnimationFrame(frame);\n  }\n\n  function start() {\n    if (destroyed || running || !visible) return;\n    running = true;\n    lastTime = performance.now();\n    raf = requestAnimationFrame(frame);\n  }\n\n  wake = start;\n  start();\n\n  const motionQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n  let reducedMotion = motionQuery.matches;\n\n  function onMotionChange() {\n    reducedMotion = motionQuery.matches;\n    if (!reducedMotion) start();\n  }\n  motionQuery.addEventListener(\"change\", onMotionChange);\n\n  const pointers = new Map<number, { x: number; y: number }>();\n\n  function onPointerMove(event: PointerEvent) {\n    if (reducedMotion) return;\n    const rect = output.getBoundingClientRect();\n    const px = event.clientX - rect.left;\n    const py = event.clientY - rect.top;\n    const previous = pointers.get(event.pointerId);\n    pointers.set(event.pointerId, { x: px, y: py });\n    if (!previous) return;\n    const dx = (px - previous.x) * config.force;\n    const dy = -(py - previous.y) * config.force;\n    queued.push([px / rect.width, 1 - py / rect.height, dx, dy]);\n    start();\n  }\n\n  function onPointerLeave(event: PointerEvent) {\n    pointers.delete(event.pointerId);\n  }\n\n  const listenTarget = output.parentElement ?? output;\n  listenTarget.addEventListener(\"pointermove\", onPointerMove as EventListener);\n  listenTarget.addEventListener(\n    \"pointerleave\",\n    onPointerLeave as EventListener,\n  );\n  listenTarget.addEventListener(\n    \"pointercancel\",\n    onPointerLeave as EventListener,\n  );\n\n  const observer = new ResizeObserver(() => {\n    syncCanvasSize();\n    start();\n  });\n  observer.observe(output);\n\n  const intersection = new IntersectionObserver((entries) => {\n    visible = entries[entries.length - 1]?.isIntersecting ?? true;\n    if (visible) start();\n  });\n  intersection.observe(output);\n\n  return {\n    splat(x, y, dx, dy) {\n      if (reducedMotion) return;\n      queued.push([x, y, dx, dy]);\n      start();\n    },\n    setOptions(next) {\n      const { simResolution, dyeResolution, ...rest } = next;\n      void simResolution;\n      void dyeResolution;\n      Object.assign(config, rest);\n      start();\n    },\n    resize() {\n      syncCanvasSize();\n      start();\n    },\n    destroy() {\n      destroyed = true;\n      cancelAnimationFrame(raf);\n      observer.disconnect();\n      intersection.disconnect();\n      motionQuery.removeEventListener(\"change\", onMotionChange);\n      releaseAll();\n      gl!.deleteTexture(contentTexture);\n      programs.forEach((program) => gl!.deleteProgram(program));\n      shaders.forEach((shader) => gl!.deleteShader(shader));\n      gl!.deleteBuffer(quad);\n      if (htmlInCanvas) paintable.onpaint = null;\n      listenTarget.removeEventListener(\n        \"pointermove\",\n        onPointerMove as EventListener,\n      );\n      listenTarget.removeEventListener(\n        \"pointerleave\",\n        onPointerLeave as EventListener,\n      );\n      listenTarget.removeEventListener(\n        \"pointercancel\",\n        onPointerLeave as EventListener,\n      );\n    },\n  };\n}\n\nexport interface LiquidProps extends LiquidOptions {\n  children: ReactNode;\n  className?: string;\n  style?: React.CSSProperties;\n}\n\nconst emptySubscribe = () => () => {};\n\nexport function Liquid({\n  children,\n  className,\n  style,\n  ...options\n}: LiquidProps) {\n  const sourceRef = useRef<HTMLCanvasElement>(null);\n  const contentRef = useRef<HTMLDivElement>(null);\n  const outputRef = useRef<HTMLCanvasElement>(null);\n  const instanceRef = useRef<LiquidInstance | null>(null);\n  const [initialOptions] = useState(options);\n  const [failed, setFailed] = useState(false);\n\n  const supported = useSyncExternalStore(\n    emptySubscribe,\n    supportsHtmlInCanvas,\n    () => false,\n  );\n  const native = supported && !failed;\n\n  useEffect(() => {\n    const source = sourceRef.current;\n    const content = contentRef.current;\n    const output = outputRef.current;\n    if (!source || !content || !output) return;\n    instanceRef.current = createLiquid(\n      { source, content, output },\n      initialOptions,\n    );\n    // WebGL init can fail even when html-in-canvas is advertised — remount children\n    // on the non-canvas fallback path (createLiquid returned null).\n    // eslint-disable-next-line react-hooks/set-state-in-effect -- recover from GPU init failure\n    if (native && !instanceRef.current) setFailed(true);\n    return () => {\n      instanceRef.current?.destroy();\n      instanceRef.current = null;\n    };\n  }, [initialOptions, native]);\n\n  useEffect(() => {\n    instanceRef.current?.setOptions(options);\n  });\n\n  return (\n    <div className={className} style={{ position: \"relative\", ...style }}>\n      <canvas\n        ref={sourceRef}\n        // @ts-expect-error experimental html-in-canvas attribute\n        layoutsubtree=\"true\"\n        // Newer html-in-canvas builds (Chrome 156+) replace `layoutsubtree`\n        // with `content=\"drawable\"`. Without it, children are painted but\n        // never hit-tested, so every link/button under the canvas is dead.\n        content=\"drawable\"\n        suppressHydrationWarning\n        style={\n          native\n            ? {\n                position: \"absolute\",\n                inset: 0,\n                width: \"100%\",\n                height: \"100%\",\n                // Keep painted for first frames; WebGL covers fully once\n                // content has an opaque bg-background capture.\n              }\n            : { display: \"none\" }\n        }\n      >\n        {native ? (\n          <div\n            ref={contentRef}\n            data-liquid-content\n            // Chrome 157+ rejects drawElementImage() on any descendant\n            // without `drawable` (InvalidStateError), which left the page\n            // blank: the WebGL output painted with no captured content.\n            // @ts-expect-error experimental html-in-canvas attribute\n            drawable=\"\"\n            style={{\n              position: \"relative\",\n              width: \"100%\",\n              minHeight: \"100%\",\n              height: \"100%\",\n              overflow: \"auto\",\n              scrollbarWidth: \"none\",\n              msOverflowStyle: \"none\",\n            }}\n          >\n            {children}\n          </div>\n        ) : null}\n      </canvas>\n      {/* html-in-canvas keeps this subtree in the real layout tree so it can\n          be captured — its scrollbar would otherwise render on top of the\n          WebGL output. Hidden here since it ships to consumer repos without\n          our host-only preview CSS. */}\n      <style>{`[data-liquid-content]::-webkit-scrollbar{display:none}`}</style>\n      {!native ? (\n        <div\n          ref={contentRef}\n          style={{\n            position: \"relative\",\n            width: \"100%\",\n            minHeight: \"100%\",\n            height: \"100%\",\n          }}\n        >\n          {children}\n        </div>\n      ) : null}\n      <canvas\n        ref={outputRef}\n        aria-hidden\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          width: \"100%\",\n          height: \"100%\",\n          pointerEvents: \"none\",\n        }}\n      />\n    </div>\n  );\n}\n\n\nexport default Liquid;\n",
      "type": "registry:component",
      "target": "components/canvasui/liquid.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/public/avatar.png.gitkeep",
      "content": "Place your avatar here as avatar.png (or avatar.jpg / avatar.webp). Delete this .gitkeep file after adding your photo.",
      "type": "registry:file",
      "target": "public/avatar.png.gitkeep"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/lib/notes.tsx",
      "content": "import type { ReactNode } from \"react\"\n\nexport type Note = {\n  slug: string\n  title: string\n  date: string\n  description?: string\n  body: () => ReactNode\n}\n\nconst notes: Note[] = [\n  {\n    slug: \"agents-that-survive-a-restart\",\n    title: \"Agents that survive a restart\",\n    date: \"2025-11-12\",\n    description: \"Why I stopped treating an agent like a function that either works or vanishes.\",\n    body: () => (\n      <>\n        <p>\n          I used to think of an agent as one long function call. You send a\n          message, something happens, you get an answer back. That mental\n          model works fine in a demo and falls apart the moment a real task\n          takes longer than a few seconds, a server restarts, or a person\n          steps away and comes back an hour later expecting the conversation\n          to still make sense.\n        </p>\n        <p>\n          What actually holds up is treating every step the agent takes as\n          something worth saving. Not just the final answer, but where it\n          was in the middle of a task, what it had already decided, what it\n          was still waiting on. When it can pick up from that saved point\n          instead of starting over, a crash stops being a disaster and\n          becomes something closer to a hiccup.\n        </p>\n        <p>\n          The word for this took me a while to appreciate. Durable. It\n          sounds like a small engineering detail until the day your agent\n          survives a deploy in the middle of a task and nobody even notices.\n        </p>\n      </>\n    ),\n  },\n  {\n    slug: \"a-chatbot-is-a-codebase\",\n    title: \"A chatbot is a codebase\",\n    date: \"2025-09-03\",\n    description: \"The day I stopped writing one giant prompt and started building an actual app.\",\n    body: () => (\n      <>\n        <p>\n          For a long time my agents were one enormous prompt with everything\n          crammed into it. The personality, the rules, the tool\n          descriptions, the edge cases somebody hit three weeks ago that I\n          patched with one more sentence. It worked, in the way a single\n          file with four thousand lines of code works. Which is to say,\n          barely, and only for me.\n        </p>\n        <p>\n          The shift that actually helped was treating the agent like a real\n          project instead of a clever paragraph. A short file that says who\n          it is. A folder of skills it can read when a task calls for them.\n          Small tools it can reach for instead of pretending it can do\n          everything from memory. Once I gave it that shape, I could open\n          the project six months later and still understand why it behaves\n          the way it does.\n        </p>\n        <p>\n          A chatbot people trust is rarely one clever prompt. It is a small,\n          honest codebase that happens to talk.\n        </p>\n      </>\n    ),\n  },\n  {\n    slug: \"the-human-in-the-loop-is-not-optional\",\n    title: \"The human in the loop is not optional\",\n    date: \"2025-06-18\",\n    description: \"Some actions deserve a person's eyes before they happen, not after.\",\n    body: () => (\n      <>\n        <p>\n          Early on I let an agent send an email on its own, and it was fine,\n          right up until it was not. Nothing catastrophic, just a message\n          that went out a little too early with a tone nobody had approved.\n          A small mistake, but it taught me something about where autonomy\n          earns trust and where it has not yet.\n        </p>\n        <p>\n          Now anything that touches money, sends something a person cannot\n          unsend, or changes a record we cannot easily reverse gets a pause\n          built in. The agent still does the thinking. It drafts the plan,\n          it explains what it wants to do and why. A person just has to\n          actually look at it before it becomes real.\n        </p>\n        <p>\n          That pause is not a lack of confidence in the model. It is respect\n          for the fact that some moments deserve a witness.\n        </p>\n      </>\n    ),\n  },\n  {\n    slug: \"one-agent-many-rooms\",\n    title: \"One agent, many rooms\",\n    date: \"2025-03-01\",\n    description: \"The same agent shows up in Slack, on the web, and in a terminal, and has to feel like itself everywhere.\",\n    body: () => (\n      <>\n        <p>\n          I built an agent for our team and the first version only lived in\n          one place, a chat window on a webpage. Then someone asked if it\n          could live in Slack too. Then someone else wanted it in a script\n          that ran from the terminal at two in the morning. Suddenly the\n          same brain needed to show up in three very different rooms and\n          behave like it belonged in each one.\n        </p>\n        <p>\n          The trick was keeping the thinking in one place and letting only\n          the surface change. The part that decides what to do stayed the\n          same no matter where the message came from. What changed was how\n          a response got formatted, how long a message could be, whether a\n          button made sense or a plain line of text was all the room could\n          offer.\n        </p>\n        <p>\n          It is a strangely fullstack problem. The model barely changes.\n          Everything else, the delivery, the formatting, the little manners\n          of each platform, is where most of the real work quietly lives.\n        </p>\n      </>\n    ),\n  },\n]\n\nexport function getNotes() {\n  return [...notes].sort((a, b) => b.date.localeCompare(a.date))\n}\n\nexport function getNote(slug: string) {\n  return notes.find((note) => note.slug === slug)\n}\n\nexport function formatNoteDate(dateStr: string) {\n  const [year, month, day] = dateStr.split(\"-\").map(Number)\n  const date = new Date(Date.UTC(year, (month ?? 1) - 1, day ?? 1))\n  return date.toLocaleDateString(\"en-US\", {\n    month: \"long\",\n    day: \"numeric\",\n    year: \"numeric\",\n    timeZone: \"UTC\",\n  })\n}\n",
      "type": "registry:lib",
      "target": "lib/notes.tsx"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/.env.example",
      "content": "# Optional: Chrome Origin Trial so Liquid warps HTML without chrome://flags.\n# Register once for your production origin (check \"match all subdomains\" if needed):\n# https://developer.chrome.com/origintrials → html-in-canvas\n# Example: Web Origin = https://yoursite.com\nNEXT_PUBLIC_HTML_IN_CANVAS_OT_TOKEN=",
      "type": "registry:file",
      "target": ".env.example"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/AGENTS.md",
      "content": "# Personalizing this portfolio\n\nThis site ships with filler content for a fictional fullstack developer\n(\"Jon Doe\"). It's a demo persona, not a template you fill in\nfield-by-field — your job is to fully re-skin the site as the real person\nwho owns this project.\n\n**Trigger:** the user attaches their resume (a PDF) directly to you and\nasks you to personalize the site — e.g. by mentioning `@AGENTS.md`. When\nthat happens, follow the steps below.\n\nThe resume is personal data and has no reason to live in this repo. Work\nfrom the attachment. Do **not** copy it into the project directory at any\npoint — not to read it, not to run the extraction in Step 1, not\n\"just temporarily while I work.\" As a safety net in case someone saves it\nhere by hand, add a line to `.gitignore` before you start (skip if it's\nalready listed):\n\n```\ngrep -qxF 'resume.pdf' .gitignore || echo 'resume.pdf' >> .gitignore\n```\n\n## Step 1 — Read the resume\n\nRead the attached resume. Pull out:\n\n- Full name\n- Real profession / field / title (e.g. \"Full-Stack Developer\", \"Product\n  Designer\", \"Marine Biologist\") — this drives the tone of everything below\n- A narrative bio: one first-person paragraph synthesized from their\n  summary, experience, and notable work, in a voice that matches their\n  actual field. Do not reuse the demo's \"AI infrastructure startups /\n  ship in pieces\" framing with the name swapped in — the whole voice\n  changes.\n- Contact email, if present\n- Social / portfolio links actually present in the resume (LinkedIn, GitHub,\n  personal site, X, Dribbble, etc.)\n- Notable projects, work, or focus areas worth listing under Projects and\n  writing about under Notes (Step 4)\n- Employment history — role, company, dates — for the Experience list\n  (Step 4)\n\n### Recovering the real URL behind a link\n\nReading the PDF only gives you visible text — \"GitHub\" as a clickable\nlabel doesn't tell you what it links to. Before treating any link as\nunresolved, try recovering the actual target from the raw bytes of the\nfile.\n\nThis needs a real filesystem path, and the resume is an attachment, not a\nfile in the repo. Copy it to a scratch location **outside the project** —\nyour OS temp directory — run the search there, and delete it when done:\n\n```\n# adjust the source to wherever the attachment actually is on disk\ncp <attached-resume-path> \"${TMPDIR:-/tmp}/resume.pdf\"\ngrep -a -o \"/URI[^)]*)\" \"${TMPDIR:-/tmp}/resume.pdf\"\nrm \"${TMPDIR:-/tmp}/resume.pdf\"\n```\n\nOn Windows use the temp dir (`\"$TEMP/resume.pdf\"` in Git Bash,\n`$env:TEMP` in PowerShell). Never copy it under the project directory,\neven for a moment. If you can't get a filesystem path to the attachment at\nall, ask the user for the path to the file on their machine and grep it in\nplace — still don't bring it into the repo.\n\nMost resumes (exported from Google Docs, Word, or a resume builder) store\ntheir hyperlink targets as plain-text `/URI (...)` entries even when the\nrest of the PDF is compressed, so this works more often than not. Match\neach URL back to the label near it in the resume text — a `mailto:` is the\nemail, a `github.com/...` URL is GitHub, `linkedin.com/in/...` is LinkedIn,\nand so on. Do this for every link-looking label in the resume, not just\nthe obvious ones — it's what makes Step 3 actually work instead of falling\nback to asking every time.\n\nOnly fall back to asking the user for the real link if this comes up empty\nand the resume text still shows an unresolved label — some PDFs compress\nthe annotation objects too, which a plain-text search can't see through.\n\n## Step 2 — Identity & tone\n\nRewrite, in the new voice from Step 1:\n\n- `app/page.tsx`:\n  - the `<h1>` name (\"Jon Doe\")\n  - the role line directly under it (`Fullstack Developer`) — their real\n    title from Step 1\n  - the greeting line (\"Hey, I'm Jon.\") — \"Hey, I'm &lt;first name&gt;.\"\n  - the single bio `<p>` below the greeting. One paragraph, two or three\n    sentences: role → what they work on and who for → a concrete stance on\n    how they work. The original is \"I work as a fullstack developer,\n    building for AI infrastructure startups and teams shipping real tools\n    with real users. I keep my stack simple, I ship in pieces I can trust,\n    and I leave software that stays easy to maintain.\" Keep that length —\n    one paragraph, not three. A nurse or an accountant doesn't get the\n    \"ship in pieces\" developer framing; match the stance to their field.\n- `app/layout.tsx` — `metadata.title` (the name) and `metadata.description`\n- `app/notes/page.tsx` — the name and role in the top-left home link, the\n  `<h1>` (\"Notes\" — usually fine, see \"Section labels\"), and the one-line\n  intro under it (\"Short writing on fullstack development, shipping, and\n  systems.\")\n- `app/notes/[slug]/page.tsx` — the name and role in the same top-left link\n- `components/avatar.tsx` — the `JD` fallback initials (their initials).\n  The photo path and resolution logic stay, see \"Do not touch\".\n- `components/copy-email.tsx` — the `EMAIL` constant (currently a real\n  address) → their contact email from the resume. If the resume has no\n  email, keep the component but ask the user which address to use.\n\n**Length budget:** the demo bio is one short paragraph on purpose. Count\nits words before you rewrite and stay within about 20%. One paragraph, not\ntwo or three. The one-line intro under the Notes heading stays one line.\n\n### Section labels\n\n\"Notes\", \"Projects\", and \"Experience\" fit most people as-is. If one reads\nwrong for the field, relabel it — this doesn't touch routing, `/notes`\nstays `/notes`, only the visible text changes: the `<h2>` in `app/page.tsx`\nand, for Notes, also the `<h1>` and intro in `app/notes/page.tsx`. Keep\neach label to a single word.\n\n## Step 3 — Links\n\nThe bio paragraph in `app/page.tsx` ends with a fixed set of social slots —\n**X, LinkedIn, GitHub** — followed by a copy-email button. Keep all three\nlabels and the sentence shape. This is a redirect slot set, not a list you\nedit down to what the resume happens to mention. (\"X\" is the platform\nformerly called Twitter — a resume may still label it either way.)\n\nFor each of the three, the rule is the same every time:\n\n- Resume has a real link/handle for it → replace that one `href` with the\n  real URL. Keep `target=\"_blank\" rel=\"noreferrer\"` as-is.\n- Resume doesn't mention it, **or you can't recover a real URL for it**\n  (see the PDF caveat in Step 1) → set `href=\"#\"`. Don't leave the\n  original bare-domain placeholder (`https://x.com/`, `https://github.com/`,\n  `https://www.linkedin.com/`) — that's a working link to the wrong page,\n  which is worse than an obvious placeholder. `href=\"#\"` reads\n  unambiguously as \"not filled in yet.\"\n\nA link's visible text alone (\"Portfolio\", \"GitHub\") doesn't tell you the\n`href` — use the extraction command from Step 1 to recover it before\nconcluding it's unresolved. Only after that comes up empty do you treat it\nlike \"not on the resume\": don't guess a URL, don't leave a URL that looks\nreal but isn't. Set it to `href=\"#\"` and ask the user for the actual link.\n\n**Never add a \"Portfolio\" link found on the resume.** This site *is* their\nportfolio — that resume link points at wherever their portfolio currently\nlives, and once they've personalized this template, this is that site.\nSkip it entirely, no matter what domain it resolves to.\n\nBeyond the fixed three, if the resume links somewhere else worth keeping\n(Dribbble, a Mastodon handle, a personal site that isn't their portfolio),\nadd it as one more `<Button variant=\"link\" asChild>` slot in the same\nsentence, in the order you found it. Never remove one of the three to make\nroom.\n\nThe **Experience** section links — both the per-role list items and the\n\"LinkedIn\" link under the list in `app/page.tsx` — all point at\n`https://www.linkedin.com/`. Point them at the person's real LinkedIn if\nthe resume has it, or `#` if not. Same rule.\n\n## Step 4 — Notes, projects, and experience\n\n### Notes — `lib/notes.tsx`\n\nFour demo notes about building AI agents. Replace them with entries that\nfit the person's real field from Step 1.\n\n- Keep the same shape per entry: `slug`, `title`, `date` (`YYYY-MM-DD`),\n  `description`, and a `body` that returns JSX — **plain `<p>` paragraphs\n  only**, the way the demo entries are built. No images, no headings, no\n  tables: this template renders a note body as a simple prose column and\n  has no styling for anything else.\n- Keep four entries. If the resume genuinely doesn't support four distinct\n  topics, say so and ask before shipping fewer.\n- Length budget per note: count the words in the entry you're replacing\n  (two or three short paragraphs) and stay within about 20%.\n- Keep `description` to one sentence, like the originals.\n- Titles and topics should read as genuinely written by this person about\n  their real work — use specifics from the resume, not a generic reskin.\n\n### Projects — the `projects` array in `app/page.tsx`\n\nFour demo side-projects. Replace with the person's real projects, portfolio\npieces, or notable work from the resume.\n\n- Keep the shape: `number` (`\"01\"`–`\"04\"`), `name`, `href`, `description`\n  (one line, roughly the length of the originals).\n- Keep four. Same \"ask before shipping fewer\" rule.\n- `href`: a real repo or live URL if the resume has one, otherwise `\"#\"` —\n  not the bare `https://github.com/` placeholder.\n\n### Experience — the `experience` array in `app/page.tsx`\n\nA demo career ladder with invented companies. Replace with the person's\nreal roles from the resume.\n\n- Keep the shape: `role`, `company`, `dates` (match the `\"2024 to Present\"`\n  format).\n- Use their actual roles, most recent first. Three to five entries is the\n  right range — use what the resume actually has rather than padding to a\n  fixed count.\n\n## Step 5 — Unslop pass\n\nBefore you're done, read `UNSLOP.md` and check everything you drafted in\nSteps 2 and 4 against it. AI-generated bios and blog posts have a\nrecognizable smell — stacked em dashes, fortune-cookie closing lines,\n\"not just X but Y,\" decorative jargon — and this is exactly the content\nmost likely to have it. Rewrite what trips those patterns before finishing.\n\n## Do not touch\n\n- `components/liquid-shell.tsx`, `components/canvasui/liquid.tsx`, and the\n  `NEXT_PUBLIC_HTML_IN_CANVAS_OT_TOKEN` / Origin Trial wiring in\n  `app/layout.tsx` and `.env.example` — the Liquid background is separate\n  manual setup, not derived from the resume. Leave it on by default; the\n  owner removes it themselves if they don't want it.\n- `components/avatar.tsx` beyond the fallback initials — the\n  photo-resolution logic and the `public/avatar.png` path stay. The owner\n  drops their own `public/avatar.png` after install.\n- `components/theme-provider.tsx`, `components/theme-toggle.tsx`, and the\n  logic in `components/copy-email.tsx` (only the `EMAIL` value changes,\n  never the component).\n- Theme, CSS, and routing — `/notes` stays `/notes` as a URL; only the\n  visible labels change, per \"Section labels\", never the folder names or\n  routes themselves.\n\n## When you're done\n\nThe resume was never copied into the repo, so there's nothing to clean up\nthere. If you made a scratch copy in a temp directory for the Step 1\nextraction, confirm it's deleted. If the user has a `resume.pdf` sitting in\nthe project root anyway (a manual drop, or a previous run), point it out\nand offer to remove it — `.gitignore` now keeps it from being committed\neither way.\n",
      "type": "registry:file",
      "target": "AGENTS.md"
    },
    {
      "path": "registry/new-york/templates/portfolio-v2/UNSLOP.md",
      "content": "# Unslop\n\nA pass to run against everything written during personalization — the\nbio in `app/page.tsx`, the project descriptions, and every note body in\n`lib/notes.tsx`. This applies whenever `AGENTS.md` has you drafting prose\nfor this site, not just once.\n\n## Process\n\n1. Draft the content per `AGENTS.md`.\n2. Before you're done, read it back against every pattern below.\n3. Rewrite what trips a pattern. Preserve the meaning and the person's real\n   voice — don't flatten it, just strip the tells.\n4. Self-audit once more: \"would this specific sentence survive if a human\n   who does this work for real wrote it?\" If not, cut or rewrite it.\n\n## Patterns to detect and fix\n\n### Style\n\n1. **Em dash overuse.** One sentence with two em dashes is the single most\n   common tell in generated bios. Use a period or comma instead.\n   - Bad: \"I build products end to end — frontend, backend, and\n     infrastructure — and I'd rather have something live than perfect.\"\n   - Better: \"I build products end to end: frontend, backend,\n     infrastructure. I'd rather have something live than perfect.\"\n2. **Colon as a mid-sentence connector.** \"The mechanism is simple once you\n   see it:\" or \"The honest version:\" add nothing — they're a wind-up\n   before the actual sentence. Cut the wind-up, state the point.\n3. **Manufactured profundity.** A closing line that sounds like a fortune\n   cookie is a tell, not a flourish.\n   - Bad: \"The best infrastructure is the kind you stop noticing. Nobody\n     should think about the deck. They should think about the talk.\"\n   - Just say what happened: \"I built it because I got tired of tethering\n     a laptop to a projector just to glance at my own notes.\"\n4. **Decorative technical notation.** Don't dress a plain idea up as a\n   formula or fake diagram to look rigorous. Only use real numbers or\n   tables for content that's actually quantitative.\n5. **Rhetorical essay openers.** \"X reads like Y until you realize Z\" and\n   similar setup-then-reveal openings are a generated-essay pattern. Open\n   with the actual fact or event instead.\n6. **Title case headings, curly quotes, decorative emphasis.** Sentence\n   case, straight quotes, and don't bold every proper noun.\n\n### Language\n\n7. **AI vocabulary.** Additionally, crucial, delve, enduring, fostering,\n   garner, interplay, intricate, landscape (abstract), pivotal, showcase,\n   tapestry, testament, underscore, vibrant, \"at the intersection of.\"\n   Replace with the plain word or cut.\n8. **Fancy ways to say \"is.\"** \"serves as\", \"stands as\", \"boasts\". Just say\n   \"is\" or \"has.\"\n9. **\"Not just X, but Y.\"** State the point directly.\n10. **Rule of three.** Don't force two real examples into three by padding\n    a filler item. Use the number that's actually true.\n11. **Vague attribution.** \"People say\", \"it's widely known\" — if there's\n    no source, cut the claim or make it a fact you can stand behind.\n\n### Voice\n\n12. **Say what happened, not how it felt.** \"made the workflow seamless\"\n    names a feeling. \"cut the review step from three tools to one\" names a\n    fact. If a sentence could sit unchanged in anyone else's portfolio,\n    it says nothing about this one — cut it or make it specific.\n13. **Active voice, real actor.** \"the score was improved by streaming the\n    response\" becomes \"streaming the response improved the score.\"\n14. **Cut adverbs propping up a weak verb.** \"runs significantly faster\"\n    becomes the actual number, or a stronger verb.\n15. **Plain word over the fancier synonym.** \"utilize\" → \"use\", \"leverage\"\n    → \"use\", \"facilitate\" → \"help\", \"numerous\" → \"many.\"\n16. **Chatbot artifacts.** No \"I hope this helps,\" no apologizing, no\n    address to a reader who isn't there — this is a bio and a blog post,\n    not a chat reply.\n\n### Length\n\n17. **Padding past the point.** AI drafts tend to run long — an extra\n    sentence restating what the previous one said, a closing paragraph that\n    summarizes instead of ending, an implication spelled out that the\n    reader already got. `AGENTS.md` gives you a word-count budget for the\n    bio and each note, measured against what you're replacing — if you're\n    over it, the fix is almost always to cut a sentence, not to tighten\n    the wording of all of them.\n18. **One idea per note, not three angles on it.** If two paragraphs are\n    making the same point from different sides, keep the sharper one and\n    delete the other.\n\n## Sound test\n\nRead the final paragraph out loud. If it sounds like something written\n*about* the person rather than *by* them, it's still slopped.\n",
      "type": "registry:file",
      "target": "UNSLOP.md"
    }
  ],
  "docs": "New Next.js project only (same flow as https://ui.shadcn.com/create):\n  npx shadcn@latest init --template next -y \"https://uiception.com/r/portfolio-v2.json\"\n\nThis scaffolds Next.js + shadcn, then installs the full site.\n\nTo personalize: attach your resume and point your coding agent at AGENTS.md — it re-skins the whole site (name, bio, links, notes, projects, experience) and runs the UNSLOP.md pass on the prose it writes. Or edit app/page.tsx directly. Drop a photo at public/avatar.png to replace the JD initials. The email link copies jefferyspippitt@gmail.com (edit components/copy-email.tsx). Notes live in lib/notes.tsx as typed React bodies — no markdown or CMS. Preview at /view/portfolio-v2. Press D to toggle theme.\n\nCanvas UI Liquid: trails work everywhere. Text distortion needs Chromium html-in-canvas. Register one Origin Trial token for your production origin at https://developer.chrome.com/origintrials (html-in-canvas), then set NEXT_PUBLIC_HTML_IN_CANVAS_OT_TOKEN in .env.local. Local-only warp without a token: chrome://flags/#canvas-draw-element.",
  "categories": [
    "template",
    "portfolio"
  ],
  "type": "registry:block"
}