{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "command",
  "title": "Command",
  "description": "A search line and a list that narrows as you type. Groups, shortcuts, and a dialog wrapper.",
  "dependencies": [
    "cmdk",
    "lucide-react"
  ],
  "registryDependencies": [
    "@afterglow/dialog"
  ],
  "files": [
    {
      "path": "registry/terminal/ui/command.tsx",
      "content": "\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogHeader,\n  DialogTitle,\n} from \"@/registry/terminal/ui/dialog\";\n\nfunction Command({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n  return (\n    <CommandPrimitive\n      className={cn(\n        \"flex size-full flex-col overflow-hidden rounded-none bg-popover text-popover-foreground\",\n        className\n      )}\n      data-slot=\"command\"\n      {...props}\n    />\n  );\n}\n\nfunction CommandDialog({\n  title = \"Command Palette\",\n  description = \"Search for a command to run...\",\n  children,\n  className,\n  initialFocus,\n  showCloseButton = false,\n  ...props\n}: Omit<React.ComponentProps<typeof Dialog>, \"children\"> & {\n  title?: string;\n  description?: string;\n  className?: string;\n\n  initialFocus?: React.ComponentProps<typeof DialogContent>[\"initialFocus\"];\n  showCloseButton?: boolean;\n\n  children: React.ReactNode;\n}) {\n  return (\n    <Dialog {...props}>\n      <DialogHeader className=\"sr-only\">\n        <DialogTitle>{title}</DialogTitle>\n        <DialogDescription>{description}</DialogDescription>\n      </DialogHeader>\n      <DialogContent\n        className={cn(\"overflow-hidden p-0 sm:max-w-xl\", className)}\n        initialFocus={initialFocus}\n        showCloseButton={showCloseButton}\n      >\n        {children}\n      </DialogContent>\n    </Dialog>\n  );\n}\n\nfunction CommandInput({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n  return (\n    <div\n      className=\"flex h-11 items-center gap-2.5 border-line border-b px-3 transition duration-150 ease-terminal has-[:focus-visible]:border-line-strong has-[:focus-visible]:shadow-glow\"\n      data-slot=\"command-input-wrapper\"\n    >\n      <SearchIcon className=\"size-4 shrink-0 text-phosphor\" />\n      <CommandPrimitive.Input\n        className={cn(\n          \"flex h-10 w-full rounded-none bg-transparent py-3 font-mono text-base text-phosphor-bright caret-phosphor-bright outline-none placeholder:text-phosphor-dim focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-40 md:text-sm\",\n          className\n        )}\n        data-slot=\"command-input\"\n        {...props}\n      />\n    </div>\n  );\n}\n\nfunction CommandList({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n  return (\n    <CommandPrimitive.List\n      className={cn(\n        \"max-h-80 scroll-py-1 overflow-y-auto overflow-x-hidden p-1\",\n        className\n      )}\n      data-slot=\"command-list\"\n      {...props}\n    />\n  );\n}\n\nfunction CommandEmpty({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n  return (\n    <CommandPrimitive.Empty\n      className={cn(\n        \"py-10 text-center font-mono font-semibold text-1xs text-phosphor-dim uppercase tracking-terminal-lg\",\n        className\n      )}\n      data-slot=\"command-empty\"\n      {...props}\n    />\n  );\n}\n\nfunction CommandGroup({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n  return (\n    <CommandPrimitive.Group\n      className={cn(\n        \"overflow-hidden text-foreground\",\n        \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-bold [&_[cmdk-group-heading]]:font-mono [&_[cmdk-group-heading]]:text-3xs [&_[cmdk-group-heading]]:text-phosphor-dim [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-terminal-xl\",\n\n        \"[[cmdk-group]:not([hidden])~&]:mt-1 [[cmdk-group]:not([hidden])~&]:border-line [[cmdk-group]:not([hidden])~&]:border-t [[cmdk-group]:not([hidden])~&]:pt-1\",\n        className\n      )}\n      data-slot=\"command-group\"\n      {...props}\n    />\n  );\n}\n\nfunction CommandSeparator({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n  return (\n    <CommandPrimitive.Separator\n      className={cn(\"-mx-1 h-px bg-line\", className)}\n      data-slot=\"command-separator\"\n      {...props}\n    />\n  );\n}\n\nfunction CommandItem({\n  className,\n  ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n  return (\n    <CommandPrimitive.Item\n      className={cn(\n        \"relative flex cursor-default select-none items-center gap-2.5 rounded-none px-2 py-2 font-mono text-sm outline-none\",\n        \"data-[selected=true]:bg-phosphor/10 data-[selected=true]:text-phosphor-bright data-[selected=true]:shadow-[inset_2px_0_0_var(--phosphor)]\",\n        \"data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-40\",\n        \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-phosphor-dim\",\n        className\n      )}\n      data-slot=\"command-item\"\n      {...props}\n    />\n  );\n}\n\nfunction CommandShortcut({\n  className,\n  ...props\n}: React.ComponentProps<\"span\">) {\n  return (\n    <span\n      className={cn(\n        \"ml-auto font-mono text-2xs text-phosphor-dim tracking-terminal\",\n        className\n      )}\n      data-slot=\"command-shortcut\"\n      {...props}\n    />\n  );\n}\n\nexport {\n  Command,\n  CommandDialog,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandSeparator,\n  CommandShortcut,\n};\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}