{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "console-window", "title": "Console Window", "description": "Controlled window chrome with title bar, toolbar, content, status bar, and workspace layout patterns", "dependencies": ["daisyui", "lucide-react"], "files": [ { "path": "registry/default/blocks/console-window/console-window.tsx", "content": "import { Maximize2, Minus, X } from 'lucide-react';\nimport type { ComponentPropsWithRef, ReactNode } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type ConsoleWindowProps = ComponentPropsWithRef<'section'> & {\n\tactive?: boolean;\n\ttitleBar?: ReactNode;\n\ttoolbar?: ReactNode;\n\tstatusBar?: ReactNode;\n};\n\nexport function ConsoleWindow({\n\tactive = true,\n\ttitleBar,\n\ttoolbar,\n\tstatusBar,\n\tchildren,\n\tclassName,\n\t...props\n}: ConsoleWindowProps) {\n\treturn (\n\t\t\n\t\t\t{titleBar}\n\t\t\t{toolbar}\n\t\t\t
{children}
\n\t\t\t{statusBar}\n\t\t\n\t);\n}\n\nexport type ConsoleWindowTitleBarProps = Omit, 'title'> & {\n\ticon?: ReactNode;\n\ttitle?: ReactNode;\n\tsubtitle?: ReactNode;\n\tactions?: ReactNode;\n\tcontrols?: ReactNode;\n};\n\nexport function ConsoleWindowTitleBar({\n\ticon,\n\ttitle,\n\tsubtitle,\n\tactions,\n\tcontrols,\n\tchildren,\n\tclassName,\n\t...props\n}: ConsoleWindowTitleBarProps) {\n\treturn (\n\t\t\n\t\t\t{icon ? {icon} : null}\n\t\t\t
\n\t\t\t\t{title ?
{title}
: null}\n\t\t\t\t{subtitle ?
{subtitle}
: null}\n\t\t\t
\n\t\t\t{children}\n\t\t\t{actions ?
{actions}
: null}\n\t\t\t{controls}\n\t\t\n\t);\n}\n\nexport type ConsoleWindowControlsProps = ComponentPropsWithRef<'div'> & {\n\tonMinimize?: () => void;\n\tonMaximize?: () => void;\n\tonClose?: () => void;\n};\n\nexport function ConsoleWindowControls({\n\tonMinimize,\n\tonMaximize,\n\tonClose,\n\tclassName,\n\t...props\n}: ConsoleWindowControlsProps) {\n\treturn (\n\t\t
\n\t\t\t{onMinimize ? (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t) : null}\n\t\t\t{onMaximize ? (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t) : null}\n\t\t\t{onClose ? (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t) : null}\n\t\t
\n\t);\n}\n\nexport type ConsoleWindowToolbarProps = ComponentPropsWithRef<'div'>;\n\nexport function ConsoleWindowToolbar({ className, ...props }: ConsoleWindowToolbarProps) {\n\treturn (\n\t\t\n\t);\n}\n\nexport type ConsoleWindowContentProps = ComponentPropsWithRef<'div'>;\n\nexport function ConsoleWindowContent({ className, ...props }: ConsoleWindowContentProps) {\n\treturn
;\n}\n\nexport type ConsoleWindowStatusBarProps = ComponentPropsWithRef<'footer'>;\n\nexport function ConsoleWindowStatusBar({ className, ...props }: ConsoleWindowStatusBarProps) {\n\treturn (\n\t\t\n\t);\n}\n\nexport type ConsoleWindowWorkspaceProps = ComponentPropsWithRef<'div'>;\n\nexport function ConsoleWindowWorkspace({ className, ...props }: ConsoleWindowWorkspaceProps) {\n\treturn (\n\t\t\n\t);\n}\n", "type": "registry:component" }, { "path": "registry/default/blocks/console-window/index.ts", "content": "export * from './console-window';\n", "type": "registry:component" } ], "type": "registry:block" }