{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glass-command",
  "title": "Glass Command",
  "author": "Alex Chih (https://alexchih.com)",
  "description": "Command palette on strong glass — search, groups, shortcuts. Built on cmdk.",
  "dependencies": [
    "cmdk",
    "lucide-react"
  ],
  "registryDependencies": [
    "https://washiveil.alexchih.com/r/theme.json",
    "https://washiveil.alexchih.com/r/glass-dialog.json"
  ],
  "files": [
    {
      "path": "registry/washiveil/ui/glass-command.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\nimport { GlassDialog, GlassDialogContent } from './glass-dialog'\n\nconst GlassCommand = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive\n    ref={ref}\n    className={cn(\n      'flex h-full w-full flex-col overflow-hidden rounded-2xl border border-glass-edge bg-glass-stronger backdrop-blur-2xl backdrop-saturate-150 shadow-[0_16px_48px_rgba(28,25,20,0.12)]',\n      className,\n    )}\n    {...props}\n  />\n))\nGlassCommand.displayName = CommandPrimitive.displayName\n\ninterface GlassCommandDialogProps extends React.ComponentPropsWithoutRef<typeof GlassDialog> {}\n\nfunction GlassCommandDialog({ children, ...props }: GlassCommandDialogProps) {\n  return (\n    <GlassDialog {...props}>\n      <GlassDialogContent className=\"overflow-hidden p-0\">\n        <CommandPrimitive className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-mono [&_[cmdk-group-heading]]:text-[0.6875rem] [&_[cmdk-group-heading]]:tracking-[0.15em] [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3\">\n          {children}\n        </CommandPrimitive>\n      </GlassDialogContent>\n    </GlassDialog>\n  )\n}\n\nconst GlassCommandInput = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive.Input>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n  <div className=\"flex items-center gap-2 border-b border-foreground/10 px-3.5\" cmdk-input-wrapper=\"\">\n    <Search className=\"size-4 shrink-0 text-muted-foreground\" />\n    <CommandPrimitive.Input\n      ref={ref}\n      className={cn(\n        'flex h-11 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n        className,\n      )}\n      {...props}\n    />\n  </div>\n))\nGlassCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst GlassCommandList = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive.List>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.List\n    ref={ref}\n    className={cn('max-h-[300px] overflow-x-hidden overflow-y-auto p-1.5', className)}\n    {...props}\n  />\n))\nGlassCommandList.displayName = CommandPrimitive.List.displayName\n\nconst GlassCommandEmpty = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive.Empty>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Empty ref={ref} className={cn('py-6 text-center text-sm text-muted-foreground', className)} {...props} />\n))\nGlassCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst GlassCommandGroup = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive.Group>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Group\n    ref={ref}\n    className={cn(\n      'overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-mono [&_[cmdk-group-heading]]:text-[0.6875rem] [&_[cmdk-group-heading]]:tracking-[0.15em] [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:text-muted-foreground',\n      className,\n    )}\n    {...props}\n  />\n))\nGlassCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst GlassCommandSeparator = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Separator ref={ref} className={cn('-mx-1.5 my-1 h-px bg-border', className)} {...props} />\n))\nGlassCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst GlassCommandItem = React.forwardRef<\n  React.ComponentRef<typeof CommandPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n  <CommandPrimitive.Item\n    ref={ref}\n    className={cn(\n      'relative flex cursor-default gap-2 select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[selected=true]:ring-2 data-[selected=true]:ring-inset data-[selected=true]:ring-ring data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n      className,\n    )}\n    {...props}\n  />\n))\nGlassCommandItem.displayName = CommandPrimitive.Item.displayName\n\nfunction GlassCommandShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) {\n  return <span className={cn('ml-auto font-mono text-xs tracking-widest text-muted-foreground', className)} {...props} />\n}\nGlassCommandShortcut.displayName = 'GlassCommandShortcut'\n\nexport {\n  GlassCommand,\n  GlassCommandDialog,\n  GlassCommandInput,\n  GlassCommandList,\n  GlassCommandEmpty,\n  GlassCommandGroup,\n  GlassCommandItem,\n  GlassCommandSeparator,\n  GlassCommandShortcut,\n}\n",
      "type": "registry:ui"
    }
  ],
  "docs": "GlassCommandDialog composes the glass dialog for a ⌘K palette; use GlassCommand alone for inline search.",
  "type": "registry:ui"
}