@khal-os/ui 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +94 -0
  2. package/README.md +25 -0
  3. package/dist/index.cjs +2661 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +926 -0
  6. package/dist/index.d.ts +926 -0
  7. package/dist/index.js +2510 -0
  8. package/dist/index.js.map +1 -0
  9. package/package.json +59 -40
  10. package/tokens.css +260 -238
  11. package/src/components/ContextMenu.tsx +0 -130
  12. package/src/components/avatar.tsx +0 -71
  13. package/src/components/badge.tsx +0 -39
  14. package/src/components/button.tsx +0 -102
  15. package/src/components/command.tsx +0 -165
  16. package/src/components/cost-counter.tsx +0 -75
  17. package/src/components/data-row.tsx +0 -97
  18. package/src/components/dropdown-menu.tsx +0 -233
  19. package/src/components/glass-card.tsx +0 -74
  20. package/src/components/input.tsx +0 -48
  21. package/src/components/khal-logo.tsx +0 -73
  22. package/src/components/live-feed.tsx +0 -109
  23. package/src/components/mesh-gradient.tsx +0 -57
  24. package/src/components/metric-display.tsx +0 -93
  25. package/src/components/note.tsx +0 -55
  26. package/src/components/number-flow.tsx +0 -25
  27. package/src/components/pill-badge.tsx +0 -65
  28. package/src/components/progress-bar.tsx +0 -70
  29. package/src/components/section-card.tsx +0 -76
  30. package/src/components/separator.tsx +0 -25
  31. package/src/components/spinner.tsx +0 -42
  32. package/src/components/status-dot.tsx +0 -90
  33. package/src/components/switch.tsx +0 -36
  34. package/src/components/theme-provider.tsx +0 -58
  35. package/src/components/theme-switcher.tsx +0 -59
  36. package/src/components/ticker-bar.tsx +0 -41
  37. package/src/components/tooltip.tsx +0 -62
  38. package/src/components/window-minimized-context.tsx +0 -29
  39. package/src/hooks/useReducedMotion.ts +0 -21
  40. package/src/index.ts +0 -58
  41. package/src/lib/animations.ts +0 -50
  42. package/src/primitives/collapsible-sidebar.tsx +0 -226
  43. package/src/primitives/dialog.tsx +0 -76
  44. package/src/primitives/empty-state.tsx +0 -43
  45. package/src/primitives/index.ts +0 -22
  46. package/src/primitives/list-view.tsx +0 -155
  47. package/src/primitives/property-panel.tsx +0 -108
  48. package/src/primitives/section-header.tsx +0 -19
  49. package/src/primitives/sidebar-nav.tsx +0 -110
  50. package/src/primitives/split-pane.tsx +0 -146
  51. package/src/primitives/status-badge.tsx +0 -10
  52. package/src/primitives/status-bar.tsx +0 -100
  53. package/src/primitives/toolbar.tsx +0 -152
  54. package/src/server.ts +0 -4
  55. package/src/stores/notification-store.ts +0 -271
  56. package/src/stores/theme-store.ts +0 -33
  57. package/src/tokens/lp-tokens.ts +0 -36
  58. package/src/utils.ts +0 -6
  59. package/tsconfig.json +0 -17
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/components/avatar.tsx","../src/utils.ts","../src/components/status-dot.tsx","../src/components/badge.tsx","../src/components/button.tsx","../src/components/spinner.tsx","../src/components/ContextMenu.tsx","../src/components/command.tsx","../src/components/cost-counter.tsx","../src/components/number-flow.tsx","../src/components/data-row.tsx","../src/components/dropdown-menu.tsx","../src/components/glass-card.tsx","../src/components/input.tsx","../src/components/khal-logo.tsx","../src/components/live-feed.tsx","../src/components/mesh-gradient.tsx","../src/hooks/useReducedMotion.ts","../src/components/metric-display.tsx","../src/components/note.tsx","../src/components/pill-badge.tsx","../src/components/progress-bar.tsx","../src/components/section-card.tsx","../src/components/separator.tsx","../src/components/switch.tsx","../src/components/theme-provider.tsx","../src/stores/theme-store.ts","../src/components/theme-switcher.tsx","../src/components/ticker-bar.tsx","../src/components/tooltip.tsx","../src/components/window-minimized-context.tsx","../src/lib/animations.ts","../src/primitives/collapsible-sidebar.tsx","../src/primitives/dialog.tsx","../src/primitives/empty-state.tsx","../src/primitives/list-view.tsx","../src/primitives/property-panel.tsx","../src/primitives/section-header.tsx","../src/primitives/sidebar-nav.tsx","../src/primitives/split-pane.tsx","../src/primitives/status-badge.tsx","../src/primitives/status-bar.tsx","../src/primitives/toolbar.tsx","../src/stores/notification-store.ts","../src/tokens/lp-tokens.ts"],"sourcesContent":["// App component props type\nexport interface AppComponentProps {\n\twindowId: string;\n\tmeta?: Record<string, unknown>;\n}\n\n// Auth — re-export from SDK\nexport { SUBJECTS, useKhalAuth, useKhalAuth as useOSAuth, useNats, useNatsSubscription } from '@khal-os/sdk/app';\n// shadcn/ui components — local implementations\nexport * from './components/avatar';\nexport * from './components/badge';\nexport * from './components/button';\nexport * from './components/ContextMenu';\nexport * from './components/command';\n// Design system components — local implementations\nexport * from './components/cost-counter';\n// Design system components — LP section patterns\nexport * from './components/data-row';\nexport * from './components/dropdown-menu';\nexport * from './components/glass-card';\nexport * from './components/input';\nexport * from './components/khal-logo';\nexport * from './components/live-feed';\nexport * from './components/mesh-gradient';\nexport * from './components/metric-display';\nexport * from './components/note';\nexport * from './components/number-flow';\nexport * from './components/pill-badge';\nexport * from './components/progress-bar';\nexport * from './components/section-card';\nexport * from './components/separator';\nexport * from './components/spinner';\nexport * from './components/status-dot';\nexport * from './components/switch';\nexport * from './components/theme-provider';\nexport * from './components/theme-switcher';\nexport * from './components/ticker-bar';\nexport * from './components/tooltip';\nexport {\n\tuseWindowActive,\n\tuseWindowMinimized,\n\tWindowActiveProvider,\n\tWindowMinimizedProvider,\n} from './components/window-minimized-context';\n// Hooks\nexport { useReducedMotion } from './hooks/useReducedMotion';\n// Animations\nexport { fadeIn, fadeUp, khalEasing, scaleUp, springConfig, staggerChild, staggerContainer } from './lib/animations';\n// OS Primitives — local implementations\nexport * from './primitives';\nexport type { DesktopNotification, DesktopNotifMode, NotificationUrgency, TrayIcon } from './stores/notification-store';\n// Stores (OS-level state)\nexport { useNotificationStore } from './stores/notification-store';\nexport { useThemeStore } from './stores/theme-store';\n// LP Design Tokens\nexport * from './tokens/lp-tokens';\n// Utilities\nexport { cn } from './utils';\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../utils';\nimport { StatusDot } from './status-dot';\n\nconst sizeMap = { sm: 24, md: 32, lg: 40 } as const;\nconst fontSizeMap = { sm: '10px', md: '12px', lg: '14px' } as const;\n\nconst statusColorMap: Record<string, string> = {\n\tonline: 'var(--khal-status-live)',\n\tidle: 'var(--khal-status-warning)',\n\taway: 'var(--khal-status-idle)',\n};\n\ninterface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {\n\tname: string;\n\tsize?: keyof typeof sizeMap;\n\tstatus?: 'online' | 'idle' | 'away' | null;\n\tsrc?: string;\n}\n\nfunction getInitials(name: string): string {\n\tconst parts = name.trim().split(/\\s+/);\n\tif (parts.length >= 2) {\n\t\treturn `${parts[0][0]}${parts[parts.length - 1][0]}`.toUpperCase();\n\t}\n\treturn name.charAt(0).toUpperCase();\n}\n\nconst Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(\n\t({ name, size = 'md', status, src, className, style, ...props }, ref) => {\n\t\tconst px = sizeMap[size];\n\t\tconst [imgError, setImgError] = React.useState(false);\n\t\tconst showImage = src && !imgError;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn('relative inline-flex shrink-0', className)}\n\t\t\t\tstyle={{ width: px, height: px, ...style }}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{showImage ? (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={src}\n\t\t\t\t\t\talt={name}\n\t\t\t\t\t\tclassName=\"h-full w-full rounded-full object-cover\"\n\t\t\t\t\t\tonError={() => setImgError(true)}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"flex h-full w-full select-none items-center justify-center rounded-full border font-medium [background:var(--khal-surface-raised)] [border-color:var(--khal-border-subtle)]\"\n\t\t\t\t\t\tstyle={{ fontSize: fontSizeMap[size] }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{getInitials(name)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t\t{status && (\n\t\t\t\t\t<div className=\"absolute -bottom-px -right-px\">\n\t\t\t\t\t\t<StatusDot color={statusColorMap[status]} size=\"sm\" label={status} pulse={status === 'online'} />\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n);\nAvatar.displayName = 'Avatar';\n\nexport type { AvatarProps };\nexport { Avatar };\n","import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst sizeMap = { sm: 8, md: 10, lg: 12 } as const;\n\n/** All recognized status states */\ntype StatusState = 'live' | 'online' | 'active' | 'working' | 'idle' | 'away' | 'queued' | 'error';\n\nconst stateConfig: Record<StatusState, { color: string; label: string; pulse: boolean }> = {\n\tlive: { color: '#22c55e', label: 'Live', pulse: true },\n\tonline: { color: '#22c55e', label: 'Online', pulse: false },\n\tactive: { color: '#22c55e', label: 'Active', pulse: true },\n\tworking: { color: '#f59e0b', label: 'Working', pulse: true },\n\tidle: { color: '#64748b', label: 'Idle', pulse: false },\n\taway: { color: '#64748b', label: 'Away', pulse: false },\n\tqueued: { color: '#f59e0b', label: 'Queued', pulse: false },\n\terror: { color: '#ef4444', label: 'Error', pulse: true },\n};\n\ninterface StatusDotProps extends React.HTMLAttributes<HTMLSpanElement> {\n\t/** Typed state — determines color, pulse, and label automatically */\n\tstate?: StatusState;\n\t/** Manual color override (legacy support) */\n\tcolor?: string;\n\t/** Manual pulse override */\n\tpulse?: boolean;\n\tsize?: keyof typeof sizeMap;\n\t/** Manual label override */\n\tlabel?: string;\n\t/** Show text label next to dot */\n\tshowLabel?: boolean;\n}\n\nfunction StatusDot({\n\tstate,\n\tcolor: colorProp,\n\tpulse: pulseProp,\n\tsize = 'md',\n\tlabel: labelProp,\n\tshowLabel = false,\n\tclassName,\n\tstyle,\n\t...props\n}: StatusDotProps) {\n\tconst config = state ? stateConfig[state] : null;\n\tconst color = colorProp ?? config?.color ?? '#64748b';\n\tconst pulse = pulseProp ?? config?.pulse ?? false;\n\tconst label = labelProp ?? config?.label;\n\tconst px = sizeMap[size];\n\n\treturn (\n\t\t<span\n\t\t\trole=\"status\"\n\t\t\taria-label={label}\n\t\t\tclassName={cn('relative inline-flex shrink-0 items-center gap-1.5', className)}\n\t\t\tstyle={style}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"relative inline-flex shrink-0\" style={{ width: px, height: px }}>\n\t\t\t\t{pulse && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"absolute -inset-0.5 rounded-full\"\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackgroundColor: color,\n\t\t\t\t\t\t\topacity: 0.35,\n\t\t\t\t\t\t\tanimation: 'khal-pulse 2s ease-in-out infinite',\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"absolute inset-0 rounded-full\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackgroundColor: color,\n\t\t\t\t\t\tboxShadow: pulse ? `0 0 ${px}px ${color}80` : undefined,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</span>\n\t\t\t{showLabel && label && (\n\t\t\t\t<span className=\"text-[11px] leading-none\" style={{ color }}>\n\t\t\t\t\t{label}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</span>\n\t);\n}\n\nexport type { StatusDotProps, StatusState };\nexport { StatusDot, stateConfig };\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst badgeVariants = cva(\n\t'inline-flex items-center rounded-full border font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-blue-700 focus:ring-offset-2',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tgray: 'border-gray-alpha-400 bg-gray-100 text-gray-900',\n\t\t\t\tblue: 'border-blue-300 bg-blue-100 text-blue-900',\n\t\t\t\tgreen: 'border-green-300 bg-green-100 text-green-900',\n\t\t\t\tamber: 'border-amber-300 bg-amber-100 text-amber-900',\n\t\t\t\tred: 'border-red-300 bg-red-100 text-red-900',\n\t\t\t\tpurple: 'border-purple-300 bg-purple-100 text-purple-900',\n\t\t\t\tpink: 'border-pink-300 bg-pink-100 text-pink-900',\n\t\t\t\tteal: 'border-teal-300 bg-teal-100 text-teal-900',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: 'px-2 py-0 text-[11px] leading-[18px]',\n\t\t\t\tmd: 'px-2.5 py-0.5 text-[12px] leading-[18px]',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'gray',\n\t\t\tsize: 'md',\n\t\t},\n\t}\n);\n\ninterface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {\n\tcontrast?: 'low' | 'high';\n}\n\nfunction Badge({ className, variant, size, contrast, ...props }: BadgeProps) {\n\treturn <span className={cn(badgeVariants({ variant, size }), className)} {...props} />;\n}\n\nexport { Badge, badgeVariants };\n","'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\nimport { Spinner } from './spinner';\n\nconst buttonVariants = cva(\n\t'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--khal-radius-button,10px)] text-copy-13 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--khal-accent-primary)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 cursor-pointer',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-gray-1000 text-white [color:white] dark:text-black dark:[color:black] hover:bg-gray-900',\n\t\t\t\tsecondary: 'bg-background-100 text-gray-1000 border border-gray-alpha-400 hover:bg-gray-alpha-100',\n\t\t\t\ttertiary: 'bg-transparent text-gray-1000 hover:bg-gray-alpha-200',\n\t\t\t\terror: 'bg-red-700 text-white [color:white] hover:bg-red-600',\n\t\t\t\twarning: 'bg-amber-700 text-white [color:white] hover:bg-amber-600',\n\t\t\t\tghost: 'hover:bg-gray-alpha-200 text-gray-1000',\n\t\t\t\tlink: 'text-blue-700 underline-offset-4 hover:underline',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsmall: 'h-8 px-3 text-copy-13',\n\t\t\t\tmedium: 'h-9 px-4 text-copy-13',\n\t\t\t\tlarge: 'h-10 px-5 text-copy-14',\n\t\t\t\ticon: 'h-9 w-9',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tsize: 'medium',\n\t\t},\n\t}\n);\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\ninterface ButtonProps\n\textends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'prefix'>,\n\t\tButtonVariantProps {\n\tasChild?: boolean;\n\tloading?: boolean;\n\tprefix?: React.ReactNode;\n\tsuffix?: React.ReactNode;\n\t/** HTML button type attribute (named typeName for compat with geistcn API) */\n\ttypeName?: 'submit' | 'button' | 'reset';\n\t/** Visual type — maps to variant for compat */\n\ttype?: 'shadow' | 'invert' | 'unstyled';\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvariant,\n\t\t\tsize,\n\t\t\tasChild = false,\n\t\t\tloading = false,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\ttypeName,\n\t\t\ttype,\n\t\t\tdisabled,\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\t// Map geistcn \"type\" prop to variant if variant not explicitly set\n\t\tlet resolvedVariant = variant;\n\t\tif (!resolvedVariant && type) {\n\t\t\tif (type === 'invert') resolvedVariant = 'default';\n\t\t\telse if (type === 'shadow') resolvedVariant = 'secondary';\n\t\t\telse if (type === 'unstyled') resolvedVariant = 'ghost';\n\t\t}\n\n\t\tconst Comp = asChild ? Slot : 'button';\n\t\treturn (\n\t\t\t<Comp\n\t\t\t\tclassName={cn(buttonVariants({ variant: resolvedVariant, size, className }))}\n\t\t\t\tref={ref}\n\t\t\t\ttype={typeName ?? 'button'}\n\t\t\t\tdisabled={disabled || loading}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{loading ? (\n\t\t\t\t\t<Spinner size=\"sm\" />\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{prefix && <span className=\"inline-flex shrink-0\">{prefix}</span>}\n\t\t\t\t\t\t{children}\n\t\t\t\t\t\t{suffix && <span className=\"inline-flex shrink-0\">{suffix}</span>}\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</Comp>\n\t\t);\n\t}\n);\nButton.displayName = 'Button';\n\nexport type { ButtonProps };\nexport { Button, buttonVariants };\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst sizeMap = {\n\tsm: 16,\n\tmd: 20,\n\tlg: 24,\n} as const;\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {\n\tsize?: keyof typeof sizeMap;\n}\n\nfunction Spinner({ size = 'md', className, ...props }: SpinnerProps) {\n\tconst px = sizeMap[size];\n\treturn (\n\t\t<div\n\t\t\trole=\"status\"\n\t\t\taria-label=\"Loading\"\n\t\t\tclassName={cn('inline-flex items-center justify-center', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<svg width={px} height={px} viewBox=\"0 0 20 20\" fill=\"none\" className=\"animate-spin\">\n\t\t\t\t<circle cx=\"10\" cy=\"10\" r=\"8\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" opacity=\"0.25\" />\n\t\t\t\t<circle\n\t\t\t\t\tcx=\"10\"\n\t\t\t\t\tcy=\"10\"\n\t\t\t\t\tr=\"8\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeDasharray=\"50.26\"\n\t\t\t\t\tstrokeDashoffset=\"37.7\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</div>\n\t);\n}\n\nexport { Spinner };\n","'use client';\n\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst ContextMenu = ContextMenuPrimitive.Root;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n\tReact.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<ContextMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-copy-13 outline-none select-none',\n\t\t\t'focus:bg-[var(--khal-menu-hover)]',\n\t\t\t'data-[state=open]:bg-[var(--khal-menu-hover)]',\n\t\t\tinset && 'pl-8',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{ color: 'var(--khal-text-primary)' }}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n\tReact.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'z-[9999] min-w-[8rem] overflow-hidden rounded-xl p-1',\n\t\t\t'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n\t\t\t'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{\n\t\t\tbackground: 'var(--khal-menu-bg)',\n\t\t\tborder: '1px solid var(--khal-menu-border)',\n\t\t\tboxShadow: 'var(--khal-menu-shadow)',\n\t\t\tcolor: 'var(--khal-text-primary)',\n\t\t}}\n\t\t{...props}\n\t/>\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n\tReact.ComponentRef<typeof ContextMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.Portal>\n\t\t<ContextMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t'z-[9999] min-w-[8rem] overflow-hidden rounded-xl p-1',\n\t\t\t\t'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\tbackground: 'var(--khal-menu-bg)',\n\t\t\t\tborder: '1px solid var(--khal-menu-border)',\n\t\t\t\tboxShadow: 'var(--khal-menu-shadow)',\n\t\t\t\tcolor: 'var(--khal-text-primary)',\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t</ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n\tReact.ComponentRef<typeof ContextMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<ContextMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-copy-13 outline-none select-none transition-colors',\n\t\t\t'focus:bg-[var(--khal-menu-hover)]',\n\t\t\t'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n\t\t\tinset && 'pl-8',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{ color: 'var(--khal-text-primary)' }}\n\t\t{...props}\n\t/>\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n\tReact.ComponentRef<typeof ContextMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn('-mx-1 my-1 h-px', className)}\n\t\tstyle={{ background: 'var(--khal-border-default)' }}\n\t\t{...props}\n\t/>\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nexport {\n\tContextMenu,\n\tContextMenuContent,\n\tContextMenuGroup,\n\tContextMenuItem,\n\tContextMenuPortal,\n\tContextMenuRadioGroup,\n\tContextMenuSeparator,\n\tContextMenuSub,\n\tContextMenuSubContent,\n\tContextMenuSubTrigger,\n\tContextMenuTrigger,\n};\n","'use client';\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst Command = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive\n\t\tref={ref}\n\t\tclassName={cn('flex h-full w-full flex-col overflow-hidden rounded-xl bg-background-100 text-gray-1000', className)}\n\t\t{...props}\n\t/>\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nfunction CommandDialog({\n\tchildren,\n\topen,\n\tonOpenChange,\n\t...props\n}: React.ComponentProps<typeof DialogPrimitive.Root> & React.ComponentPropsWithoutRef<typeof CommandPrimitive>) {\n\treturn (\n\t\t<DialogPrimitive.Root open={open} onOpenChange={onOpenChange}>\n\t\t\t<DialogPrimitive.Portal>\n\t\t\t\t<DialogPrimitive.Overlay\n\t\t\t\t\tclassName=\"fixed inset-0 z-[9999] bg-black/40 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0\"\n\t\t\t\t\tcmdk-overlay=\"\"\n\t\t\t\t/>\n\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\tclassName=\"fixed left-[50%] top-[20%] z-[9999] w-full max-w-lg translate-x-[-50%] overflow-hidden rounded-xl shadow-lg\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tbackground: 'var(--khal-menu-bg)',\n\t\t\t\t\t\tborder: '1px solid var(--khal-menu-border)',\n\t\t\t\t\t\tboxShadow: 'var(--khal-menu-shadow)',\n\t\t\t\t\t\tbackdropFilter: 'blur(24px)',\n\t\t\t\t\t\tWebkitBackdropFilter: 'blur(24px)',\n\t\t\t\t\t}}\n\t\t\t\t\tcmdk-dialog=\"\"\n\t\t\t\t\taria-describedby={undefined}\n\t\t\t\t>\n\t\t\t\t\t<DialogPrimitive.Title className=\"sr-only\">Command palette</DialogPrimitive.Title>\n\t\t\t\t\t<Command\n\t\t\t\t\t\tclassName=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-700 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3\"\n\t\t\t\t\t\t{...props}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</Command>\n\t\t\t\t</DialogPrimitive.Content>\n\t\t\t</DialogPrimitive.Portal>\n\t\t</DialogPrimitive.Root>\n\t);\n}\n\nconst CommandInput = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive.Input>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tclassName=\"flex items-center px-3\"\n\t\tstyle={{ borderBottom: '1px solid var(--khal-border-default)' }}\n\t\tcmdk-input-wrapper=\"\"\n\t>\n\t\t<Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t<CommandPrimitive.Input\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t'flex h-10 w-full rounded-md bg-transparent py-3 text-copy-13 outline-none',\n\t\t\t\t'placeholder:text-gray-700',\n\t\t\t\t'disabled:cursor-not-allowed disabled:opacity-50',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n\t\t{...props}\n\t/>\n));\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive.Empty>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n\t<CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-copy-13 text-gray-700\" {...props} />\n));\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive.Group>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'overflow-hidden p-1 text-gray-1000',\n\t\t\t'[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-label-12 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-gray-700',\n\t\t\tclassName\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator ref={ref} className={cn('-mx-1 h-px bg-gray-alpha-400', className)} {...props} />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n\tReact.ComponentRef<typeof CommandPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Item> & {\n\t\tprefix?: React.ReactNode;\n\t\tcallback?: () => void;\n\t}\n>(({ className, prefix, callback, onSelect, children, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tonSelect={onSelect ?? callback}\n\t\tclassName={cn(\n\t\t\t'relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-copy-13 outline-none select-none',\n\t\t\t'data-[selected=true]:text-gray-1000',\n\t\t\t'data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n\t\t\tclassName\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{prefix && <span className=\"inline-flex shrink-0\">{prefix}</span>}\n\t\t{children}\n\t</CommandPrimitive.Item>\n));\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn <span className={cn('ml-auto text-label-12 tracking-widest text-gray-700', className)} {...props} />;\n};\n\nexport {\n\tCommand,\n\tCommandDialog,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n\tCommandSeparator,\n\tCommandShortcut,\n};\n","'use client';\n\nimport { motion, useInView } from 'motion/react';\nimport { useCallback, useRef, useState } from 'react';\nimport { cn } from '../utils';\nimport { NumberFlow } from './number-flow';\n\ninterface CostCounterProps {\n\t/** The target numeric value to animate to */\n\tvalue: number;\n\t/** Text suffix after the number (e.g. \"%\", \"pts\", \"k\") */\n\tsuffix?: string;\n\t/** Text prefix before the number (e.g. \"$\", \"+\") */\n\tprefix?: string;\n\t/** Primary label below the number */\n\tlabel: string;\n\t/** Secondary description text */\n\tdescription?: string;\n\t/** Budget bar target percentage (0-100). Omit to hide the bar. */\n\tbudget?: number;\n\t/** Budget bar color — defaults to accent-warm */\n\tbudgetColor?: string;\n\tclassName?: string;\n}\n\nfunction CostCounter({ value, suffix, prefix, label, description, budget, budgetColor, className }: CostCounterProps) {\n\tconst [displayed, setDisplayed] = useState(0);\n\tconst triggered = useRef(false);\n\tconst barRef = useRef<HTMLDivElement>(null);\n\tconst barInView = useInView(barRef, { once: true, amount: 0.6 });\n\n\tconst handleViewport = useCallback(() => {\n\t\tif (!triggered.current) {\n\t\t\ttriggered.current = true;\n\t\t\tsetDisplayed(value);\n\t\t}\n\t}, [value]);\n\n\treturn (\n\t\t<motion.div\n\t\t\tonViewportEnter={handleViewport}\n\t\t\tviewport={{ once: true, amount: 0.5 }}\n\t\t\tclassName={cn('flex flex-col gap-3', className)}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"flex items-baseline tabular-nums font-semibold tracking-tight leading-none\"\n\t\t\t\tstyle={{ fontFamily: 'var(--font-display, var(--font-geist-sans))' }}\n\t\t\t>\n\t\t\t\t{prefix && <span className=\"text-[0.7em]\">{prefix}</span>}\n\t\t\t\t<NumberFlow value={displayed} />\n\t\t\t\t{suffix && <span className=\"text-[0.65em] ml-0.5 opacity-70\">{suffix}</span>}\n\t\t\t</div>\n\n\t\t\t{budget != null && (\n\t\t\t\t<div ref={barRef} className=\"w-full h-2 rounded-full overflow-hidden bg-[var(--ds-gray-alpha-200)]\">\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tinitial={{ width: 0 }}\n\t\t\t\t\t\tanimate={barInView ? { width: `${Math.min(budget, 100)}%` } : { width: 0 }}\n\t\t\t\t\t\ttransition={{ duration: 1, ease: [0.22, 1, 0.36, 1], delay: 0.15 }}\n\t\t\t\t\t\tclassName=\"h-full rounded-full\"\n\t\t\t\t\t\tstyle={{ backgroundColor: budgetColor ?? 'var(--ds-accent-warm)' }}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t<div className=\"flex flex-col gap-0.5\">\n\t\t\t\t<span className=\"text-sm font-medium leading-5\">{label}</span>\n\t\t\t\t{description && <span className=\"text-xs opacity-50 leading-4\">{description}</span>}\n\t\t\t</div>\n\t\t</motion.div>\n\t);\n}\n\nexport type { CostCounterProps };\nexport { CostCounter };\n","'use client';\n\nimport NumberFlowBase from '@number-flow/react';\nimport type { ComponentProps } from 'react';\n\ntype NumberFlowProps = ComponentProps<typeof NumberFlowBase>;\n\n/**\n * NumberFlow — animated number transitions via @number-flow/react.\n * Thin wrapper that sets KhalOS-branded timing defaults.\n */\nfunction NumberFlow({ transformTiming, spinTiming, opacityTiming, ...props }: NumberFlowProps) {\n\treturn (\n\t\t<NumberFlowBase\n\t\t\ttransformTiming={transformTiming ?? { duration: 800, easing: 'cubic-bezier(0.34, 1.56, 0.64, 1)' }}\n\t\t\tspinTiming={spinTiming ?? { duration: 800, easing: 'cubic-bezier(0.34, 1.56, 0.64, 1)' }}\n\t\t\topacityTiming={opacityTiming ?? { duration: 350, easing: 'ease-out' }}\n\t\t\twillChange\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport type { NumberFlowProps };\nexport { NumberFlow };\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\n/**\n * DataRow — LP section-level key-value / data display component.\n *\n * Extracted from khal-landing section components:\n * - Architecture.tsx: font-mono code rules (IF/THEN/ELSE patterns)\n * - Architecture.tsx: connection rows with status dots\n * - Omnichannel-spotlight.tsx: channel count rows (font-mono tabular-nums)\n * - Omnichannel-spotlight.tsx: observability inline data\n *\n * Renders a horizontal key-value pair with monospace font and optional accent.\n */\nconst dataRowVariants = cva('flex items-center gap-3 rounded-lg border border-[#FFFFFF14] font-mono', {\n\tvariants: {\n\t\tvariant: {\n\t\t\t/** Standard data row — subtle bg */\n\t\t\tdefault: 'bg-[#FFFFFF08] py-2.5 px-3',\n\t\t\t/** Inline/compact — for observability-style data */\n\t\t\tinline: 'bg-[#FFFFFF06] py-1.5 px-2.5 text-[11px]',\n\t\t\t/** Nested rule row — for indented rule displays */\n\t\t\trule: 'bg-[#FFFFFF05] py-2.5 px-3',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'default',\n\t},\n});\n\ninterface DataRowProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dataRowVariants> {\n\t/** The label/key portion (left side) */\n\tlabel: string;\n\t/** The value portion (right side, pushed to end) */\n\tvalue?: string;\n\t/** Accent color for the value text */\n\taccentColor?: string;\n\t/** Show a status dot before the label */\n\tstatusDot?: boolean;\n\t/** Custom status dot color */\n\tdotColor?: string;\n\t/** Optional tag/badge to show before the label (e.g. \"IF\", \"THEN\") */\n\ttag?: string;\n\t/** Tag color — defaults to accent */\n\ttagColor?: string;\n}\n\nconst DataRow = React.forwardRef<HTMLDivElement, DataRowProps>(\n\t({ className, variant, label, value, accentColor, statusDot, dotColor, tag, tagColor, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div ref={ref} className={cn(dataRowVariants({ variant }), className)} {...props}>\n\t\t\t\t{/* Status dot */}\n\t\t\t\t{statusDot && (\n\t\t\t\t\t<span className=\"size-[6px] shrink-0 rounded-full\" style={{ backgroundColor: dotColor || '#FFFFFF40' }} />\n\t\t\t\t)}\n\n\t\t\t\t{/* Tag badge (IF/THEN/ELSE style) */}\n\t\t\t\t{tag && (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName=\"shrink-0 rounded py-0.5 px-2 text-[10px] font-bold uppercase tracking-wide leading-3.5\"\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor: tagColor || 'var(--color-accent, #D49355)',\n\t\t\t\t\t\t\tbackgroundColor: tagColor\n\t\t\t\t\t\t\t\t? `color-mix(in srgb, ${tagColor} 10%, transparent)`\n\t\t\t\t\t\t\t\t: 'rgba(var(--color-accent-rgb, 212,147,85), 0.1)',\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{tag}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t{/* Label */}\n\t\t\t\t<span className=\"text-[12px] text-[#FFFFFFCC] leading-4 min-w-0 truncate\">{label}</span>\n\n\t\t\t\t{/* Spacer if value present */}\n\t\t\t\t{(value || children) && <span className=\"grow\" />}\n\n\t\t\t\t{/* Value */}\n\t\t\t\t{value && (\n\t\t\t\t\t<span className=\"text-[12px] leading-4 tabular-nums shrink-0\" style={{ color: accentColor || '#FFFFFF99' }}>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\n\t\t\t\t{/* Custom children (for complex right-side content) */}\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n);\nDataRow.displayName = 'DataRow';\n\nexport type { DataRowProps };\nexport { DataRow, dataRowVariants };\n","'use client';\n\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-copy-13 outline-none select-none',\n\t\t\t'focus:bg-[var(--khal-menu-hover)]',\n\t\t\t'data-[state=open]:bg-[var(--khal-menu-hover)]',\n\t\t\tinset && 'pl-8',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{ color: 'var(--khal-text-primary)' }}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'z-[9999] min-w-[8rem] overflow-hidden rounded-xl p-1',\n\t\t\t'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n\t\t\t'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',\n\t\t\t'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{\n\t\t\tbackground: 'var(--khal-menu-bg)',\n\t\t\tborder: '1px solid var(--khal-menu-border)',\n\t\t\tboxShadow: 'var(--khal-menu-shadow)',\n\t\t\tcolor: 'var(--khal-text-primary)',\n\t\t}}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Portal>\n\t\t<DropdownMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t'z-[9999] min-w-[8rem] overflow-hidden rounded-xl p-1',\n\t\t\t\t'data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',\n\t\t\t\t'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',\n\t\t\t\t'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\tbackground: 'var(--khal-menu-bg)',\n\t\t\t\tborder: '1px solid var(--khal-menu-border)',\n\t\t\t\tboxShadow: 'var(--khal-menu-shadow)',\n\t\t\t\tcolor: 'var(--khal-text-primary)',\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t\tprefix?: React.ReactNode;\n\t\tsuffix?: React.ReactNode;\n\t}\n>(({ className, inset, prefix, suffix, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-copy-13 outline-none select-none transition-colors',\n\t\t\t'focus:bg-[var(--khal-menu-hover)]',\n\t\t\t'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n\t\t\tinset && 'pl-8',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{ color: 'var(--khal-text-primary)' }}\n\t\t{...props}\n\t>\n\t\t{prefix && <span className=\"inline-flex shrink-0\">{prefix}</span>}\n\t\t{children}\n\t\t{suffix && (\n\t\t\t<span className=\"ml-auto inline-flex shrink-0\" style={{ color: 'var(--khal-text-muted)' }}>\n\t\t\t\t{suffix}\n\t\t\t</span>\n\t\t)}\n\t</DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'relative flex cursor-default items-center rounded-lg py-1.5 pl-8 pr-2 text-copy-13 outline-none select-none transition-colors',\n\t\t\t'focus:bg-[var(--khal-menu-hover)]',\n\t\t\t'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{ color: 'var(--khal-text-primary)' }}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3354 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.5553 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\t></path>\n\t\t\t\t</svg>\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t'relative flex cursor-default items-center rounded-lg py-1.5 pl-8 pr-2 text-copy-13 outline-none select-none transition-colors',\n\t\t\t'focus:bg-[var(--khal-menu-hover)]',\n\t\t\t'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n\t\t\tclassName\n\t\t)}\n\t\tstyle={{ color: 'var(--khal-text-primary)' }}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<svg width=\"8\" height=\"8\" viewBox=\"0 0 8 8\" fill=\"none\">\n\t\t\t\t\t<circle cx=\"4\" cy=\"4\" r=\"4\" fill=\"currentColor\" />\n\t\t\t\t</svg>\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn('px-2 py-1.5 text-label-12 font-semibold', inset && 'pl-8', className)}\n\t\tstyle={{ color: 'var(--khal-text-secondary)' }}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n\tReact.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn('-mx-1 my-1 h-px', className)}\n\t\tstyle={{ background: 'var(--khal-border-default)' }}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn('ml-auto text-label-12 tracking-widest', className)}\n\t\t\tstyle={{ color: 'var(--khal-text-muted)' }}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst glassCardVariants = cva(\n\t'relative overflow-hidden border transition-all [background:var(--khal-glass-tint)] [border-color:var(--khal-glass-border)]',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: '[box-shadow:var(--khal-shadow-sm)]',\n\t\t\t\traised: '[box-shadow:var(--khal-shadow-md)]',\n\t\t\t},\n\t\t\tpadding: {\n\t\t\t\tsm: 'p-3',\n\t\t\t\tmd: 'p-4',\n\t\t\t\tlg: 'p-6',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tpadding: 'md',\n\t\t},\n\t}\n);\n\ninterface GlassCardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof glassCardVariants> {\n\thover?: boolean;\n\tglow?: string;\n}\n\nconst GlassCard = React.forwardRef<HTMLDivElement, GlassCardProps>(\n\t({ className, variant, padding, hover = false, glow, style, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\tglassCardVariants({ variant, padding }),\n\t\t\t\t\thover && [\n\t\t\t\t\t\t'cursor-pointer',\n\t\t\t\t\t\t'hover:-translate-y-0.5',\n\t\t\t\t\t\t'hover:[border-color:var(--khal-border-strong)]',\n\t\t\t\t\t\t'hover:[box-shadow:var(--khal-shadow-lg)]',\n\t\t\t\t\t],\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tstyle={{\n\t\t\t\t\tbackdropFilter: 'var(--khal-glass-filter)',\n\t\t\t\t\tWebkitBackdropFilter: 'var(--khal-glass-filter)',\n\t\t\t\t\tborderRadius: 'var(--khal-radius-xl)',\n\t\t\t\t\ttransitionTimingFunction: 'var(--khal-ease-spring)',\n\t\t\t\t\ttransitionDuration: 'var(--khal-duration-normal)',\n\t\t\t\t\t...style,\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{glow && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"pointer-events-none absolute inset-0 rounded-[inherit]\"\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: `radial-gradient(ellipse at 50% 0%, color-mix(in srgb, ${glow} 20%, transparent), transparent 70%)`,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<div className=\"relative\">{children}</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\nGlassCard.displayName = 'GlassCard';\n\nexport type { GlassCardProps };\nexport { GlassCard, glassCardVariants };\n","'use client';\n\nimport * as React from 'react';\nimport { cn } from '../utils';\n\ninterface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {\n\t/** Label above the input (geistcn compat) */\n\tlabel?: string;\n\t/** Size variant (geistcn compat) */\n\tsize?: 'small' | 'medium' | 'large';\n\t/** HTML input type (named typeName for geistcn compat, also accepts type) */\n\ttypeName?: string;\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, label, size, typeName, type, ...props }, ref) => {\n\t\tconst input = (\n\t\t\t<input\n\t\t\t\ttype={typeName ?? type}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'flex w-full rounded-md border border-gray-alpha-400 bg-background-100 px-3 text-copy-13 text-gray-1000 transition-colors',\n\t\t\t\t\t'file:border-0 file:bg-transparent file:text-sm file:font-medium',\n\t\t\t\t\t'placeholder:text-gray-700',\n\t\t\t\t\t'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-1',\n\t\t\t\t\t'disabled:cursor-not-allowed disabled:opacity-50',\n\t\t\t\t\tsize === 'small' ? 'h-8' : size === 'large' ? 'h-11' : 'h-9',\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\n\t\tif (label) {\n\t\t\treturn (\n\t\t\t\t<div className=\"flex flex-col gap-1.5\">\n\t\t\t\t\t<label className=\"text-label-13 text-gray-900\">{label}</label>\n\t\t\t\t\t{input}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn input;\n\t}\n);\nInput.displayName = 'Input';\n\nexport { Input };\n","interface KhalLogoProps {\n\tsize?: number;\n\tvariant?: 'light' | 'dark';\n\tclassName?: string;\n}\n\n/**\n * KhalLogo — SVG wordmark for large sizes (>=20), single \"K\" letterform for small sizes.\n * Uses currentColor so color is inherited from parent.\n */\nexport function KhalLogo({ size = 20, variant = 'light', className }: KhalLogoProps) {\n\tconst color = variant === 'light' ? '#FFFFFF' : '#0A0A0A';\n\tconst showFull = size >= 20;\n\n\tif (!showFull) {\n\t\t// Small sizes: render just the K letterform from the SVG\n\t\treturn (\n\t\t\t<svg\n\t\t\t\tviewBox=\"0 0 156 155\"\n\t\t\t\tfill=\"none\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\twidth={size}\n\t\t\t\theight={size}\n\t\t\t\tclassName={className}\n\t\t\t\taria-label=\"K\"\n\t\t\t\tstyle={{ color }}\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\td=\"M0 0H27.4425V65.9519H71.7054L122.829 0H155.362L95.3869 76.1317L164.657 154.92H128.805L72.5913 92.2878H27.4425V154.92H0V0Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t);\n\t}\n\n\t// Full wordmark SVG\n\treturn (\n\t\t<svg\n\t\t\tviewBox=\"0 0 756 155\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\twidth={size * (756 / 155)}\n\t\t\theight={size}\n\t\t\tclassName={className}\n\t\t\taria-label=\"khal\"\n\t\t\tstyle={{ color }}\n\t\t>\n\t\t\t<g clipPath=\"url(#khal-logo-clip)\">\n\t\t\t\t<path\n\t\t\t\t\td=\"M616.81 0H644.252V128.584H765.533V154.92H638.499C635.4 154.92 632.524 154.33 629.867 153.149C627.211 151.969 624.924 150.42 623.007 148.502C621.088 146.584 619.539 144.371 618.359 141.863C617.326 139.206 616.81 136.403 616.81 133.453V0Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M443.058 21.2467C445.123 14.4594 448.295 9.22105 452.573 5.53287C456.853 1.8447 462.533 0 469.616 0H519.632C527.009 0 532.911 1.91744 537.337 5.75467C541.763 9.44285 545.009 14.6072 547.076 21.2467L589.125 154.92H560.133L546.411 110.657H461.87L468.73 84.3212H538.665L521.181 26.3359H468.951L430 154.92H400.786L443.058 21.2467Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M190.123 0H217.565V62.6322H344.6V0H372.043V154.92H344.6V88.9681H217.565V154.92H190.123V0Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t\t<path\n\t\t\t\t\td=\"M0 0H27.4425V65.9519H71.7054L122.829 0H155.362L95.3869 76.1317L164.657 154.92H128.805L72.5913 92.2878H27.4425V154.92H0V0Z\"\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t/>\n\t\t\t</g>\n\t\t\t<defs>\n\t\t\t\t<clipPath id=\"khal-logo-clip\">\n\t\t\t\t\t<rect width=\"756\" height=\"155\" fill=\"white\" />\n\t\t\t\t</clipPath>\n\t\t\t</defs>\n\t\t</svg>\n\t);\n}\n","'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { cn } from '../utils';\n\ntype FeedEventType = 'info' | 'success' | 'warning' | 'error' | 'agent' | 'system';\n\ninterface FeedEvent {\n\tid: string;\n\ttype: FeedEventType;\n\tmessage: string;\n\ttimestamp?: Date;\n}\n\nconst typeColors: Record<FeedEventType, string> = {\n\tinfo: 'var(--ds-blue-600)',\n\tsuccess: 'var(--ds-green-600)',\n\twarning: 'var(--ds-amber-600)',\n\terror: 'var(--ds-red-600)',\n\tagent: 'var(--ds-purple-600)',\n\tsystem: 'var(--ds-gray-600)',\n};\n\ninterface LiveFeedProps {\n\t/** Initial events to render */\n\tevents?: FeedEvent[];\n\t/** Maximum visible events before oldest are removed */\n\tmaxVisible?: number;\n\t/** Show timestamps next to events */\n\tshowTimestamps?: boolean;\n\t/** Height of the feed container */\n\theight?: number | string;\n\tclassName?: string;\n}\n\nfunction LiveFeed({\n\tevents: externalEvents,\n\tmaxVisible = 50,\n\tshowTimestamps = true,\n\theight = 300,\n\tclassName,\n}: LiveFeedProps) {\n\tconst [events, setEvents] = useState<FeedEvent[]>(externalEvents ?? []);\n\tconst scrollRef = useRef<HTMLDivElement>(null);\n\tconst isAtBottom = useRef(true);\n\n\t// Sync external events\n\tuseEffect(() => {\n\t\tif (externalEvents) {\n\t\t\tsetEvents((prev) => {\n\t\t\t\tconst combined = [...prev, ...externalEvents.filter((e) => !prev.some((p) => p.id === e.id))];\n\t\t\t\treturn combined.slice(-maxVisible);\n\t\t\t});\n\t\t}\n\t}, [externalEvents, maxVisible]);\n\n\t// Auto-scroll to bottom when new events arrive and user is at bottom\n\tuseEffect(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (el && isAtBottom.current) {\n\t\t\tel.scrollTop = el.scrollHeight;\n\t\t}\n\t}, [events]);\n\n\tconst handleScroll = useCallback(() => {\n\t\tconst el = scrollRef.current;\n\t\tif (el) {\n\t\t\tisAtBottom.current = el.scrollHeight - el.scrollTop - el.clientHeight < 24;\n\t\t}\n\t}, []);\n\n\tconst formatTime = (d: Date) =>\n\t\td.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' });\n\n\treturn (\n\t\t<div\n\t\t\tref={scrollRef}\n\t\t\tonScroll={handleScroll}\n\t\t\tclassName={cn('overflow-y-auto overflow-x-hidden font-mono text-xs leading-5 scrollbar-thin', className)}\n\t\t\tstyle={{ height }}\n\t\t>\n\t\t\t<AnimatePresence initial={false}>\n\t\t\t\t{events.map((event) => (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tkey={event.id}\n\t\t\t\t\t\tinitial={{ opacity: 0, height: 0 }}\n\t\t\t\t\t\tanimate={{ opacity: 1, height: 'auto' }}\n\t\t\t\t\t\texit={{ opacity: 0, height: 0 }}\n\t\t\t\t\t\ttransition={{ duration: 0.25, ease: [0.22, 1, 0.36, 1] }}\n\t\t\t\t\t\tclassName=\"flex gap-2 px-2 py-0.5 hover:bg-[var(--ds-gray-alpha-100)]\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"inline-block w-1.5 h-1.5 rounded-full mt-1.5 shrink-0\"\n\t\t\t\t\t\t\tstyle={{ backgroundColor: typeColors[event.type] }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{showTimestamps && event.timestamp && (\n\t\t\t\t\t\t\t<span className=\"shrink-0 opacity-40 tabular-nums\">{formatTime(event.timestamp)}</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<span className=\"opacity-80 break-words min-w-0\">{event.message}</span>\n\t\t\t\t\t</motion.div>\n\t\t\t\t))}\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport type { FeedEvent, FeedEventType, LiveFeedProps };\nexport { LiveFeed };\n","'use client';\n\nimport { lazy, Suspense, useEffect, useRef, useState } from 'react';\nimport { useReducedMotion } from '../hooks/useReducedMotion';\n\nconst MeshGradientShader = lazy(() => import('@paper-design/shaders-react').then((m) => ({ default: m.MeshGradient })));\n\ninterface MeshGradientProps {\n\t/** Array of CSS color strings (typically 4-8) */\n\tcolors: string[];\n\t/** Animation speed multiplier (default 0.02) */\n\tspeed?: number;\n\tclassName?: string;\n\tstyle?: React.CSSProperties;\n}\n\nfunction StaticFallback({ colors }: { colors: string[] }) {\n\tconst bg =\n\t\tcolors.length >= 2\n\t\t\t? `linear-gradient(135deg, ${colors[0]} 0%, ${colors[Math.floor(colors.length / 2)]} 50%, ${colors[colors.length - 1]} 100%)`\n\t\t\t: (colors[0] ?? '#0A0A0A');\n\n\treturn <div style={{ width: '100%', height: '100%', background: bg }} />;\n}\n\nfunction MeshGradientInner({ colors, speed = 0.02, className, style }: MeshGradientProps) {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst [visible, setVisible] = useState(false);\n\tconst reducedMotion = useReducedMotion();\n\n\tuseEffect(() => {\n\t\tconst el = ref.current;\n\t\tif (!el) return;\n\n\t\tconst observer = new IntersectionObserver(([entry]) => setVisible(entry.isIntersecting), {\n\t\t\trootMargin: '100px',\n\t\t});\n\n\t\tobserver.observe(el);\n\t\treturn () => observer.disconnect();\n\t}, []);\n\n\treturn (\n\t\t<div ref={ref} className={className} style={{ position: 'absolute', inset: 0, ...style }}>\n\t\t\t{visible && !reducedMotion ? (\n\t\t\t\t<Suspense fallback={<StaticFallback colors={colors} />}>\n\t\t\t\t\t<MeshGradientShader colors={colors} speed={speed} style={{ width: '100%', height: '100%' }} />\n\t\t\t\t</Suspense>\n\t\t\t) : (\n\t\t\t\t<StaticFallback colors={colors} />\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport type { MeshGradientProps };\nexport { MeshGradientInner as MeshGradient };\n","'use client';\n\nimport { useEffect, useState } from 'react';\n\n/**\n * Returns true when the user prefers reduced motion (OS setting or app toggle).\n */\nexport function useReducedMotion(): boolean {\n\tconst [reduced, setReduced] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst mq = window.matchMedia('(prefers-reduced-motion: reduce)');\n\t\tsetReduced(mq.matches || document.documentElement.dataset.reduceMotion === 'true');\n\n\t\tconst handler = (e: MediaQueryListEvent) => setReduced(e.matches);\n\t\tmq.addEventListener('change', handler);\n\t\treturn () => mq.removeEventListener('change', handler);\n\t}, []);\n\n\treturn reduced;\n}\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\n/**\n * MetricDisplay — LP section-level metric/stat component.\n *\n * Extracted from khal-landing section components:\n * - Stat cards in metrics.tsx (large numbers with suffix/prefix)\n * - Metric tiles in architecture.tsx AppBuilderMockup\n * - ROI projected savings in metrics.tsx\n *\n * Renders a large highlighted value with a label and optional description.\n */\nconst metricDisplayVariants = cva('flex flex-col', {\n\tvariants: {\n\t\tsize: {\n\t\t\t/** Compact — for inline/tile use (architecture mockup metric tiles) */\n\t\t\tsm: 'gap-1',\n\t\t\t/** Standard — for dashboard displays */\n\t\t\tmd: 'gap-1.5',\n\t\t\t/** Large — hero stat cards (metrics.tsx) */\n\t\t\tlg: 'gap-2',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tsize: 'md',\n\t},\n});\n\nconst valueSizeMap = {\n\tsm: 'text-[22px] font-semibold leading-7 tracking-tight',\n\tmd: 'text-[28px] font-semibold leading-8 tracking-[-0.02em]',\n\tlg: 'text-[36px] sm:text-[44px] font-semibold leading-none tracking-[-0.04em]',\n} as const;\n\nconst labelSizeMap = {\n\tsm: 'text-[11px] uppercase tracking-[0.06em] text-[#FFFFFF80] font-medium leading-3.5',\n\tmd: 'text-[13px] text-[#FFFFFFCC] font-medium leading-4',\n\tlg: 'text-[15px] text-[#FFFFFFCC] font-medium leading-5',\n} as const;\n\ninterface MetricDisplayProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof metricDisplayVariants> {\n\t/** The primary value to display */\n\tvalue: string | number;\n\t/** Label describing the metric */\n\tlabel: string;\n\t/** Optional description/subtext below the label */\n\tdescription?: string;\n\t/** Optional prefix before the value (e.g. \"+\", \"$\") */\n\tprefix?: string;\n\t/** Optional suffix after the value (e.g. \"%\", \"pts\", \"ms\") */\n\tsuffix?: string;\n\t/** Accent color for the value. Defaults to current text color. */\n\taccentColor?: string;\n}\n\nconst MetricDisplay = React.forwardRef<HTMLDivElement, MetricDisplayProps>(\n\t({ className, size = 'md', value, label, description, prefix, suffix, accentColor, ...props }, ref) => {\n\t\tconst resolvedSize = (size ?? 'md') as 'sm' | 'md' | 'lg';\n\n\t\treturn (\n\t\t\t<div ref={ref} className={cn(metricDisplayVariants({ size }), className)} {...props}>\n\t\t\t\t{/* Label above value for sm size (matches LP tile pattern) */}\n\t\t\t\t{resolvedSize === 'sm' && <span className={labelSizeMap[resolvedSize]}>{label}</span>}\n\n\t\t\t\t{/* Value */}\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(valueSizeMap[resolvedSize], 'tabular-nums')}\n\t\t\t\t\tstyle={accentColor ? { color: accentColor } : undefined}\n\t\t\t\t>\n\t\t\t\t\t{prefix && <span>{prefix}</span>}\n\t\t\t\t\t<span>{value}</span>\n\t\t\t\t\t{suffix && (\n\t\t\t\t\t\t<span className={resolvedSize === 'lg' ? 'text-[32px] tracking-[-0.02em] ml-0.5' : 'ml-0.5'}>{suffix}</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t{/* Label below value for md/lg sizes */}\n\t\t\t\t{resolvedSize !== 'sm' && <span className={labelSizeMap[resolvedSize]}>{label}</span>}\n\n\t\t\t\t{/* Description */}\n\t\t\t\t{description && <span className=\"text-[13px] text-[#FFFFFF80] leading-4\">{description}</span>}\n\t\t\t</div>\n\t\t);\n\t}\n);\nMetricDisplay.displayName = 'MetricDisplay';\n\nexport type { MetricDisplayProps };\nexport { MetricDisplay, metricDisplayVariants };\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { AlertCircle, AlertTriangle, CheckCircle, Info } from 'lucide-react';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst noteVariants = cva('flex items-start gap-2 rounded-md border p-3 text-copy-13', {\n\tvariants: {\n\t\ttype: {\n\t\t\tdefault: 'border-gray-alpha-400 bg-gray-alpha-100 text-gray-900',\n\t\t\terror: 'border-red-300 bg-red-100 text-red-900',\n\t\t\twarning: 'border-amber-300 bg-amber-100 text-amber-900',\n\t\t\tsuccess: 'border-green-300 bg-green-100 text-green-900',\n\t\t},\n\t\tsize: {\n\t\t\tdefault: 'p-3',\n\t\t\tsmall: 'p-2 text-label-12',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\ttype: 'default',\n\t\tsize: 'default',\n\t},\n});\n\nconst iconMap = {\n\tdefault: Info,\n\terror: AlertCircle,\n\twarning: AlertTriangle,\n\tsuccess: CheckCircle,\n} as const;\n\ninterface NoteProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof noteVariants> {\n\ttype?: 'default' | 'error' | 'warning' | 'success';\n\tlabel?: boolean | string;\n\taction?: React.ReactNode;\n\tdisabled?: boolean;\n\tfill?: boolean;\n}\n\nfunction Note({ className, type = 'default', size, label, action, children, ...props }: NoteProps) {\n\tconst Icon = iconMap[type];\n\tconst showLabel = label !== false;\n\n\treturn (\n\t\t<div className={cn(noteVariants({ type, size }), className)} role=\"alert\" {...props}>\n\t\t\t{showLabel && <Icon className=\"h-4 w-4 shrink-0 mt-0.5\" />}\n\t\t\t<div className=\"flex-1 min-w-0\">{children}</div>\n\t\t\t{action && <div className=\"shrink-0\">{action}</div>}\n\t\t</div>\n\t);\n}\n\nexport { Note };\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\n/**\n * PillBadge — LP section-level badge/tag component.\n *\n * Extracted from khal-landing section components:\n * - Capability tags (omnichannel-spotlight.tsx)\n * - Section label pills (fast-secure.tsx header)\n * - Compliance badges (fast-secure.tsx badge strip)\n * - Accent badges (metrics.tsx ROI calculator)\n *\n * Always uppercase with wide tracking — the LP's signature badge style.\n */\nconst pillBadgeVariants = cva(\n\t'inline-flex items-center gap-1.5 rounded-full font-medium uppercase leading-none whitespace-nowrap',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\t/** Subtle border badge — compliance tags, capability tags */\n\t\t\t\tdefault: 'border border-[#FFFFFF26] bg-[#FFFFFF08] text-[#FFFFFFCC]',\n\t\t\t\t/** Muted badge — less prominent */\n\t\t\t\tmuted: 'border border-[#FFFFFF14] bg-[#FFFFFF05] text-[#FFFFFFCC]',\n\t\t\t\t/** Accent-filled badge — ROI labels, active state badges */\n\t\t\t\taccent: 'text-[var(--color-accent,#D49355)] bg-[rgba(var(--color-accent-rgb,212,147,85),0.12)]',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tsm: 'py-1 px-2.5 text-[10px] tracking-[0.08em]',\n\t\t\t\tmd: 'py-1.5 px-3.5 text-[11px] tracking-widest',\n\t\t\t\tlg: 'py-2 px-4 text-[11px] tracking-widest',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tsize: 'md',\n\t\t},\n\t}\n);\n\ninterface PillBadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof pillBadgeVariants> {\n\t/** Show a small dot indicator before the text */\n\tdot?: boolean;\n\t/** Custom dot color (defaults to current text color at 40% opacity) */\n\tdotColor?: string;\n}\n\nconst PillBadge = React.forwardRef<HTMLSpanElement, PillBadgeProps>(\n\t({ className, variant, size, dot, dotColor, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<span ref={ref} className={cn(pillBadgeVariants({ variant, size }), className)} {...props}>\n\t\t\t\t{dot && (\n\t\t\t\t\t<span className=\"size-1.5 shrink-0 rounded-full\" style={{ backgroundColor: dotColor || '#FFFFFF40' }} />\n\t\t\t\t)}\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t);\n\t}\n);\nPillBadge.displayName = 'PillBadge';\n\nexport type { PillBadgeProps };\nexport { PillBadge, pillBadgeVariants };\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst progressBarVariants = cva(\n\t'relative w-full overflow-hidden rounded-full [background:var(--khal-border-default)]',\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tsm: 'h-1.5',\n\t\t\t\tmd: 'h-2.5',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: 'md',\n\t\t},\n\t}\n);\n\ninterface ProgressBarProps\n\textends Omit<React.HTMLAttributes<HTMLDivElement>, 'color'>,\n\t\tVariantProps<typeof progressBarVariants> {\n\tvalue: number;\n\tmax?: number;\n\tcolor?: string;\n\tshowLabel?: boolean;\n}\n\nfunction ProgressBar({\n\tvalue,\n\tmax = 100,\n\tcolor = 'var(--khal-stage-build)',\n\tsize,\n\tshowLabel = false,\n\tclassName,\n\t...props\n}: ProgressBarProps) {\n\tconst percentage = Math.min(100, Math.max(0, (value / max) * 100));\n\n\treturn (\n\t\t<div className={cn('flex items-center gap-2', className)} {...props}>\n\t\t\t<div\n\t\t\t\trole=\"progressbar\"\n\t\t\t\taria-valuenow={value}\n\t\t\t\taria-valuemin={0}\n\t\t\t\taria-valuemax={max}\n\t\t\t\tclassName={progressBarVariants({ size })}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"h-full rounded-full\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\twidth: `${percentage}%`,\n\t\t\t\t\t\tbackground: `linear-gradient(90deg, color-mix(in srgb, ${color} 85%, black), ${color})`,\n\t\t\t\t\t\ttransition: 'width var(--khal-duration-normal) var(--khal-ease-spring)',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{showLabel && (\n\t\t\t\t<span className=\"shrink-0 text-xs tabular-nums opacity-60\">\n\t\t\t\t\t{value}/{max}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport type { ProgressBarProps };\nexport { ProgressBar, progressBarVariants };\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\n/**\n * SectionCard — LP section-level card component.\n *\n * Extracted from khal-landing section components (architecture.tsx, fast-secure.tsx).\n * Two variants matching the LP's two card styles:\n * - `default`: full-border card (architecture section outer cards)\n * - `inset`: top-left border card (architecture mockup panels)\n */\nconst sectionCardVariants = cva('relative flex flex-col overflow-hidden', {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: 'rounded-2xl border border-[#FFFFFF1A] bg-[#FFFFFF0A]',\n\t\t\tinset: 'rounded-tl-xl border-t border-l border-[#FFFFFF26] bg-[#111111]',\n\t\t\tsolid: 'rounded-2xl border border-[#FFFFFF1A] bg-[#0D0D0D]',\n\t\t},\n\t\tpadding: {\n\t\t\tnone: '',\n\t\t\tsm: 'p-4',\n\t\t\tmd: 'p-5 sm:p-6',\n\t\t\tlg: 'p-5 sm:p-6 md:p-8',\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'default',\n\t\tpadding: 'md',\n\t},\n});\n\ninterface SectionCardProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sectionCardVariants> {\n\t/** Optional gradient overlay color (hex). Renders a subtle top-down gradient. */\n\tglow?: string;\n}\n\nconst SectionCard = React.forwardRef<HTMLDivElement, SectionCardProps>(\n\t({ className, variant, padding, glow, children, ...props }, ref) => {\n\t\treturn (\n\t\t\t<div ref={ref} className={cn(sectionCardVariants({ variant, padding }), className)} {...props}>\n\t\t\t\t{glow && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"pointer-events-none absolute inset-0 z-0\"\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tbackground: `linear-gradient(180deg, ${glow}22 0%, transparent 60%)`,\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<div className=\"relative z-10 flex flex-col h-full\">{children}</div>\n\t\t\t</div>\n\t\t);\n\t}\n);\nSectionCard.displayName = 'SectionCard';\n\n/**\n * SectionCardHeader — optional header row with bottom border separator.\n * Matches the LP mockup panel headers: `py-3 px-4 border-b border-[#FFFFFF1A]`.\n */\nfunction SectionCardHeader({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('flex items-center justify-between py-3 px-4 border-b border-[#FFFFFF1A]', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\nSectionCardHeader.displayName = 'SectionCardHeader';\n\nexport type { SectionCardProps };\nexport { SectionCard, SectionCardHeader, sectionCardVariants };\n","'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst Separator = React.forwardRef<\n\tReact.ComponentRef<typeof SeparatorPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (\n\t<SeparatorPrimitive.Root\n\t\tref={ref}\n\t\tdecorative={decorative}\n\t\torientation={orientation}\n\t\tclassName={cn(\n\t\t\t'shrink-0 bg-gray-alpha-400',\n\t\t\torientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',\n\t\t\tclassName\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n","'use client';\n\nimport * as SwitchPrimitive from '@radix-ui/react-switch';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\ninterface ToggleProps extends Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, 'onChange'> {\n\tonChange?: (checked: boolean) => void;\n}\n\nconst Toggle = React.forwardRef<React.ComponentRef<typeof SwitchPrimitive.Root>, ToggleProps>(\n\t({ className, onChange, onCheckedChange, ...props }, ref) => (\n\t\t<SwitchPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors',\n\t\t\t\t'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2 focus-visible:ring-offset-background-100',\n\t\t\t\t'disabled:cursor-not-allowed disabled:opacity-50',\n\t\t\t\t'data-[state=checked]:bg-gray-1000 data-[state=unchecked]:bg-gray-alpha-400',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tonCheckedChange={onCheckedChange ?? onChange}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t<SwitchPrimitive.Thumb\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform',\n\t\t\t\t\t'data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0'\n\t\t\t\t)}\n\t\t\t/>\n\t\t</SwitchPrimitive.Root>\n\t)\n);\nToggle.displayName = 'Toggle';\n\nexport { Toggle };\n","'use client';\n\nimport { ThemeProvider as NextThemesProvider } from 'next-themes';\nimport { useEffect } from 'react';\nimport { useThemeStore } from '../stores/theme-store';\n\nfunction ReduceMotionSync() {\n\tconst reduceMotion = useThemeStore((s) => s.reduceMotion);\n\n\tuseEffect(() => {\n\t\tdocument.documentElement.setAttribute('data-reduce-motion', String(reduceMotion));\n\t}, [reduceMotion]);\n\n\treturn null;\n}\n\nfunction GlassSync() {\n\tconst glassEnabled = useThemeStore((s) => s.glassEnabled);\n\n\tuseEffect(() => {\n\t\tconst el = document.documentElement;\n\t\tif (glassEnabled) {\n\t\t\tel.setAttribute('data-glass', '');\n\t\t\tel.style.setProperty('--khal-glass-enabled', '1');\n\t\t} else {\n\t\t\tel.removeAttribute('data-glass');\n\t\t\tel.style.setProperty('--khal-glass-enabled', '0');\n\t\t}\n\t}, [glassEnabled]);\n\n\treturn null;\n}\n\nfunction GpuTerminalsSync() {\n\tconst gpuTerminals = useThemeStore((s) => s.gpuTerminals);\n\n\tuseEffect(() => {\n\t\t// Sync to the localStorage key the terminal reads on mount\n\t\tif (gpuTerminals) {\n\t\t\tlocalStorage.setItem('khal-gpu-terminals', 'true');\n\t\t} else {\n\t\t\tlocalStorage.removeItem('khal-gpu-terminals');\n\t\t}\n\t}, [gpuTerminals]);\n\n\treturn null;\n}\n\nexport function ThemeProvider({ children, ...props }: React.ComponentProps<typeof NextThemesProvider>) {\n\treturn (\n\t\t<NextThemesProvider {...props}>\n\t\t\t<ReduceMotionSync />\n\t\t\t<GlassSync />\n\t\t\t<GpuTerminalsSync />\n\t\t\t{children}\n\t\t</NextThemesProvider>\n\t);\n}\n","import { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\n\ntype ThemeMode = 'light' | 'dark' | 'system';\n\ninterface ThemeStore {\n\tmode: ThemeMode;\n\tsetMode: (mode: ThemeMode) => void;\n\treduceMotion: boolean;\n\tsetReduceMotion: (value: boolean) => void;\n\tglassEnabled: boolean;\n\tsetGlassEnabled: (value: boolean) => void;\n\tgpuTerminals: boolean;\n\tsetGpuTerminals: (value: boolean) => void;\n}\n\nexport const useThemeStore = create<ThemeStore>()(\n\tpersist(\n\t\t(set) => ({\n\t\t\tmode: 'dark' as ThemeMode,\n\t\t\tsetMode: (mode) => set({ mode }),\n\t\t\treduceMotion: false,\n\t\t\tsetReduceMotion: (reduceMotion) => set({ reduceMotion }),\n\t\t\tglassEnabled: false,\n\t\t\tsetGlassEnabled: (glassEnabled) => set({ glassEnabled }),\n\t\t\tgpuTerminals: false,\n\t\t\tsetGpuTerminals: (gpuTerminals) => set({ gpuTerminals }),\n\t\t}),\n\t\t{\n\t\t\tname: 'khal-theme',\n\t\t}\n\t)\n);\n","'use client';\n\nimport { Monitor, Moon, Sun } from 'lucide-react';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useState } from 'react';\nimport { cn } from '../utils';\n\nconst themes = [\n\t{ value: 'system', label: 'System', icon: Monitor },\n\t{ value: 'light', label: 'Light', icon: Sun },\n\t{ value: 'dark', label: 'Dark', icon: Moon },\n] as const;\n\ninterface ThemeSwitcherProps {\n\tsmall?: boolean;\n\tclassName?: string;\n\tonThemeSwitch?: (theme: string) => void;\n\tdisabled?: boolean;\n}\n\nfunction ThemeSwitcher({ small, className, onThemeSwitch, disabled }: ThemeSwitcherProps) {\n\tconst { theme, setTheme } = useTheme();\n\tconst [mounted, setMounted] = useState(false);\n\tuseEffect(() => setMounted(true), []);\n\n\t// Avoid hydration mismatch: useTheme() returns different values on server vs client\n\tconst resolvedTheme = mounted ? theme : undefined;\n\n\treturn (\n\t\t<fieldset\n\t\t\tclassName={cn('inline-flex items-center gap-1 rounded-lg bg-gray-alpha-100 p-1', className)}\n\t\t\tdisabled={disabled}\n\t\t>\n\t\t\t{themes.map(({ value, label, icon: Icon }) => (\n\t\t\t\t<button\n\t\t\t\t\tkey={value}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\trole=\"radio\"\n\t\t\t\t\taria-checked={resolvedTheme === value}\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetTheme(value);\n\t\t\t\t\t\tonThemeSwitch?.(value);\n\t\t\t\t\t}}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-label-12 transition-colors cursor-pointer',\n\t\t\t\t\t\tresolvedTheme === value\n\t\t\t\t\t\t\t? 'bg-background-100 text-gray-1000 shadow-sm'\n\t\t\t\t\t\t\t: 'text-gray-700 hover:text-gray-1000'\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Icon className={small ? 'h-3.5 w-3.5' : 'h-4 w-4'} />\n\t\t\t\t\t{!small && label}\n\t\t\t\t</button>\n\t\t\t))}\n\t\t</fieldset>\n\t);\n}\n\nexport { ThemeSwitcher };\n","'use client';\n\nimport type { ReactNode } from 'react';\nimport { cn } from '../utils';\n\ninterface TickerBarProps {\n\t/** Items to scroll — rendered twice for seamless looping */\n\tchildren: ReactNode;\n\t/** Animation duration in seconds (default 30) */\n\tduration?: number;\n\t/** Pause on hover */\n\tpauseOnHover?: boolean;\n\tclassName?: string;\n}\n\nfunction TickerBar({ children, duration = 30, pauseOnHover = true, className }: TickerBarProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn('relative w-full overflow-hidden', className)}\n\t\t\tstyle={{\n\t\t\t\tmaskImage: 'linear-gradient(to right, transparent, black 10%, black 90%, transparent)',\n\t\t\t\tWebkitMaskImage: 'linear-gradient(to right, transparent, black 10%, black 90%, transparent)',\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={cn('flex w-max', pauseOnHover && 'hover:[animation-play-state:paused]')}\n\t\t\t\tstyle={{\n\t\t\t\t\tanimation: `khal-ticker ${duration}s linear infinite`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className=\"flex shrink-0 items-center\">{children}</div>\n\t\t\t\t<div className=\"flex shrink-0 items-center\" aria-hidden>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport type { TickerBarProps };\nexport { TickerBar };\n","'use client';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport * as React from 'react';\nimport { cn } from '../utils';\n\nconst TooltipProvider = TooltipPrimitive.Provider;\nconst TooltipRoot = TooltipPrimitive.Root;\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\nconst TooltipContent = React.forwardRef<\n\tReact.ComponentRef<typeof TooltipPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, style, ...props }, ref) => (\n\t<TooltipPrimitive.Portal>\n\t\t<TooltipPrimitive.Content\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t'z-[9999] overflow-hidden rounded-md px-2.5 py-1 text-label-12',\n\t\t\t\t'animate-in fade-in-0 zoom-in-95',\n\t\t\t\t'data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95',\n\t\t\t\t'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={{\n\t\t\t\tbackground: 'var(--khal-text-primary, var(--ds-gray-1000))',\n\t\t\t\tcolor: 'var(--khal-text-inverse, var(--ds-background-100))',\n\t\t\t\t...style,\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t</TooltipPrimitive.Portal>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\ninterface SimpleTooltipProps {\n\ttext: React.ReactNode;\n\tchildren: React.ReactNode;\n\tposition?: 'top' | 'bottom' | 'left' | 'right';\n\tdelay?: boolean;\n\tdelayTime?: number;\n\tdesktopOnly?: boolean;\n\tclassName?: string;\n}\n\nfunction Tooltip({ text, children, position = 'top', delay, delayTime, desktopOnly, className }: SimpleTooltipProps) {\n\tconst delayDuration = delayTime ?? (delay ? 400 : 200);\n\n\treturn (\n\t\t<TooltipProvider delayDuration={delayDuration}>\n\t\t\t<TooltipRoot>\n\t\t\t\t<TooltipTrigger asChild>{children}</TooltipTrigger>\n\t\t\t\t<TooltipContent side={position} className={cn(desktopOnly && 'max-md:hidden', className)}>\n\t\t\t\t\t{text}\n\t\t\t\t</TooltipContent>\n\t\t\t</TooltipRoot>\n\t\t</TooltipProvider>\n\t);\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger };\n","'use client';\n\nimport { createContext, useContext } from 'react';\n\n/**\n * Exposes the parent window's minimized state to deeply nested child components.\n * Terminal panes use this to dispose WebGL contexts when minimized (GPU savings)\n * and re-attach them on restore.\n */\nconst WindowMinimizedContext = createContext(false);\n\nexport const WindowMinimizedProvider = WindowMinimizedContext.Provider;\n\nexport function useWindowMinimized(): boolean {\n\treturn useContext(WindowMinimizedContext);\n}\n\n/**\n * Exposes the parent window's focused/active state to child components.\n * Apps use this to pause polling, animations, and heavy rendering when\n * their window is behind another (app-nap behavior).\n */\nconst WindowActiveContext = createContext(true);\n\nexport const WindowActiveProvider = WindowActiveContext.Provider;\n\nexport function useWindowActive(): boolean {\n\treturn useContext(WindowActiveContext);\n}\n","/**\n * KhalOS animation presets — motion.js configurations for OS-wide use.\n * Import these in components for consistent, branded animations.\n */\n\n/** Custom easing curve — KhalOS primary */\nexport const khalEasing = [0.22, 1, 0.36, 1] as const;\n\n/** Spring config for interactive elements */\nexport const springConfig = {\n\tstiffness: 300,\n\tdamping: 22,\n} as const;\n\n/** Window open animation — fade up with blur */\nexport const fadeUp = {\n\tinitial: { opacity: 0, y: 12, filter: 'blur(4px)' },\n\tanimate: { opacity: 1, y: 0, filter: 'blur(0px)' },\n\ttransition: { duration: 0.7, ease: khalEasing },\n} as const;\n\n/** App launch animation — scale up with blur */\nexport const scaleUp = {\n\tinitial: { opacity: 0, scale: 0.96, filter: 'blur(6px)' },\n\tanimate: { opacity: 1, scale: 1, filter: 'blur(0px)' },\n\ttransition: { duration: 0.9, ease: khalEasing },\n} as const;\n\n/** Stagger container — children appear with 0.12s delay */\nexport const staggerContainer = {\n\tanimate: {\n\t\ttransition: {\n\t\t\tstaggerChildren: 0.12,\n\t\t},\n\t},\n} as const;\n\n/** Stagger child — each item fades up */\nexport const staggerChild = {\n\tinitial: { opacity: 0, y: 8 },\n\tanimate: { opacity: 1, y: 0 },\n\ttransition: { duration: 0.4, ease: khalEasing },\n} as const;\n\n/** Fade in — simple opacity animation */\nexport const fadeIn = {\n\tinitial: { opacity: 0 },\n\tanimate: { opacity: 1 },\n\ttransition: { duration: 0.5, ease: khalEasing },\n} as const;\n","'use client';\n\nimport { createContext, type ReactNode, useCallback, useContext, useRef, useState } from 'react';\n\n// ---------------------------------------------------------------------------\n// CollapsibleSidebar — resizable sidebar with collapse/expand toggle.\n//\n// Usage:\n// <CollapsibleSidebar defaultSize={220} min={160} max={360}>\n// <CollapsibleSidebar.Header>\n// <span>Explorer</span>\n// <CollapsibleSidebar.CollapseButton />\n// </CollapsibleSidebar.Header>\n// <CollapsibleSidebar.Content>\n// <FileTree />\n// </CollapsibleSidebar.Content>\n// </CollapsibleSidebar>\n// ---------------------------------------------------------------------------\n\ninterface SidebarContextValue {\n\tcollapsed: boolean;\n\ttoggle: () => void;\n\tsize: number;\n}\n\nconst SidebarContext = createContext<SidebarContextValue>({\n\tcollapsed: false,\n\ttoggle: () => {},\n\tsize: 220,\n});\n\nexport function useSidebar() {\n\treturn useContext(SidebarContext);\n}\n\ninterface CollapsibleSidebarProps {\n\tchildren: ReactNode;\n\tdefaultSize?: number;\n\tmin?: number;\n\tmax?: number;\n\tdefaultCollapsed?: boolean;\n\tside?: 'left' | 'right';\n\tclassName?: string;\n}\n\nfunction CollapsibleSidebarRoot({\n\tchildren,\n\tdefaultSize = 220,\n\tmin = 140,\n\tmax = 400,\n\tdefaultCollapsed = false,\n\tside = 'left',\n\tclassName = '',\n}: CollapsibleSidebarProps) {\n\tconst [collapsed, setCollapsed] = useState(defaultCollapsed);\n\tconst [size, setSize] = useState(defaultSize);\n\tconst dragging = useRef(false);\n\tconst startX = useRef(0);\n\tconst startSize = useRef(0);\n\n\tconst toggle = useCallback(() => setCollapsed((v) => !v), []);\n\n\tconst onPointerDown = useCallback(\n\t\t(e: React.PointerEvent) => {\n\t\t\tif (collapsed) return;\n\t\t\te.preventDefault();\n\t\t\tdragging.current = true;\n\t\t\tstartX.current = e.clientX;\n\t\t\tstartSize.current = size;\n\t\t\t(e.target as HTMLElement).setPointerCapture(e.pointerId);\n\t\t},\n\t\t[collapsed, size]\n\t);\n\n\tconst onPointerMove = useCallback(\n\t\t(e: React.PointerEvent) => {\n\t\t\tif (!dragging.current) return;\n\t\t\tconst delta = side === 'left' ? e.clientX - startX.current : startX.current - e.clientX;\n\t\t\tsetSize(Math.min(max, Math.max(min, startSize.current + delta)));\n\t\t},\n\t\t[side, min, max]\n\t);\n\n\tconst onPointerUp = useCallback(() => {\n\t\tdragging.current = false;\n\t}, []);\n\n\tconst resizeHandle = (\n\t\t<div\n\t\t\tclassName={`w-px shrink-0 cursor-col-resize bg-gray-alpha-200 transition-colors hover:w-0.5 hover:bg-blue-700/50 active:w-0.5 active:bg-blue-700 ${\n\t\t\t\tcollapsed ? 'pointer-events-none' : ''\n\t\t\t}`}\n\t\t\tonPointerDown={onPointerDown}\n\t\t\tonPointerMove={onPointerMove}\n\t\t\tonPointerUp={onPointerUp}\n\t\t\trole=\"separator\"\n\t\t\taria-orientation=\"vertical\"\n\t\t/>\n\t);\n\n\treturn (\n\t\t<SidebarContext.Provider value={{ collapsed, toggle, size }}>\n\t\t\t<div className={`flex shrink-0 ${className}`} style={{ width: collapsed ? 0 : size }}>\n\t\t\t\t{side === 'right' && resizeHandle}\n\t\t\t\t<div\n\t\t\t\t\tclassName={`flex h-full flex-col overflow-hidden transition-[width] duration-150 ${\n\t\t\t\t\t\tcollapsed ? 'w-0' : 'w-full'\n\t\t\t\t\t}`}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t\t{side === 'left' && resizeHandle}\n\t\t\t</div>\n\t\t</SidebarContext.Provider>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// CollapsibleSidebar.Header\n// ---------------------------------------------------------------------------\n\nfunction SidebarHeader({ children, className = '' }: { children: ReactNode; className?: string }) {\n\treturn (\n\t\t<div className={`flex h-9 shrink-0 items-center justify-between border-b border-gray-alpha-200 px-3 ${className}`}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// CollapsibleSidebar.CollapseButton\n// ---------------------------------------------------------------------------\n\nfunction CollapseButton({ className = '' }: { className?: string }) {\n\tconst { collapsed, toggle } = useSidebar();\n\treturn (\n\t\t<button\n\t\t\tonClick={toggle}\n\t\t\tclassName={`inline-flex h-5 w-5 items-center justify-center rounded text-gray-800 hover:bg-gray-alpha-200 hover:text-gray-1000 transition-colors ${className}`}\n\t\t\taria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n\t\t>\n\t\t\t<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\">\n\t\t\t\t<path\n\t\t\t\t\td={collapsed ? 'M4.5 2L8.5 6L4.5 10' : 'M8.5 2L4.5 6L8.5 10'}\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</button>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// CollapsibleSidebar.Content\n// ---------------------------------------------------------------------------\n\nfunction SidebarContent({ children, className = '' }: { children: ReactNode; className?: string }) {\n\treturn <div className={`flex-1 overflow-y-auto ${className}`}>{children}</div>;\n}\n\n// ---------------------------------------------------------------------------\n// CollapsibleSidebar.Section\n// ---------------------------------------------------------------------------\n\nfunction SidebarSection({\n\ttitle,\n\tchildren,\n\tclassName = '',\n}: {\n\ttitle?: string;\n\tchildren: ReactNode;\n\tclassName?: string;\n}) {\n\treturn (\n\t\t<div className={`${className}`}>\n\t\t\t{title && (\n\t\t\t\t<div className=\"px-3 pt-2 pb-1\">\n\t\t\t\t\t<span className=\"text-label-13 font-medium text-gray-800\">{title}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// CollapsibleSidebar.Item\n// ---------------------------------------------------------------------------\n\ninterface SidebarItemProps {\n\tchildren: ReactNode;\n\ticon?: ReactNode;\n\tactive?: boolean;\n\tindent?: number;\n\tonClick?: () => void;\n\tclassName?: string;\n}\n\nfunction SidebarItem({ children, icon, active, indent = 0, onClick, className = '' }: SidebarItemProps) {\n\treturn (\n\t\t<button\n\t\t\tonClick={onClick}\n\t\t\tclassName={`flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-label-13 transition-colors\n ${active ? 'bg-gray-alpha-200 text-gray-1000' : 'text-gray-900 hover:bg-gray-alpha-100 hover:text-gray-1000'}\n ${className}`}\n\t\t\tstyle={{ paddingLeft: 8 + indent * 12 }}\n\t\t>\n\t\t\t{icon && <span className=\"shrink-0 text-gray-800 [&>svg]:h-3.5 [&>svg]:w-3.5\">{icon}</span>}\n\t\t\t<span className=\"min-w-0 truncate\">{children}</span>\n\t\t</button>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// Export\n// ---------------------------------------------------------------------------\n\nexport const CollapsibleSidebar = Object.assign(CollapsibleSidebarRoot, {\n\tHeader: SidebarHeader,\n\tCollapseButton,\n\tContent: SidebarContent,\n\tSection: SidebarSection,\n\tItem: SidebarItem,\n});\n","'use client';\n\nimport type { ButtonHTMLAttributes, ReactNode } from 'react';\n\n/* ------------------------------------------------------------------ */\n/* Minimal compound Dialog primitive for OS chrome. */\n/* Enough to satisfy DeleteConfirmDialog; expand as needed. */\n/* ------------------------------------------------------------------ */\n\ninterface DialogRootProps {\n\topen: boolean;\n\tonClose: () => void;\n\tchildren: ReactNode;\n}\n\nfunction DialogRoot({ open, onClose, children }: DialogRootProps) {\n\tif (!open) return null;\n\treturn (\n\t\t<div className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/40\" onClick={onClose}>\n\t\t\t<div\n\t\t\t\tclassName=\"bg-popover text-popover-foreground rounded-lg border p-6 shadow-lg\"\n\t\t\t\tonClick={(e) => e.stopPropagation()}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nfunction Body({ children }: { children: ReactNode }) {\n\treturn <div className=\"flex items-start gap-4\">{children}</div>;\n}\n\nfunction Icon({ children, variant: _variant }: { children: ReactNode; variant?: string }) {\n\treturn <div className=\"shrink-0\">{children}</div>;\n}\n\nfunction Title({ children }: { children: ReactNode }) {\n\treturn <h2 className=\"text-lg font-semibold\">{children}</h2>;\n}\n\nfunction Description({ children }: { children: ReactNode }) {\n\treturn <p className=\"text-muted-foreground text-sm\">{children}</p>;\n}\n\nfunction Actions({ children }: { children: ReactNode }) {\n\treturn <div className=\"mt-4 flex justify-end gap-2\">{children}</div>;\n}\n\ntype BtnProps = ButtonHTMLAttributes<HTMLButtonElement> & { variant?: string };\n\nfunction Cancel({ children, ...props }: BtnProps) {\n\treturn (\n\t\t<button type=\"button\" className=\"rounded px-3 py-1.5 text-sm hover:bg-muted\" {...props}>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\nfunction Confirm({ children, variant: _variant, ...props }: BtnProps) {\n\treturn (\n\t\t<button type=\"button\" className=\"rounded bg-destructive px-3 py-1.5 text-sm text-destructive-foreground\" {...props}>\n\t\t\t{children}\n\t\t</button>\n\t);\n}\n\nexport const Dialog = Object.assign(DialogRoot, {\n\tBody,\n\tIcon,\n\tTitle,\n\tDescription,\n\tActions,\n\tCancel,\n\tConfirm,\n});\n","'use client';\n\nimport { type ReactNode } from 'react';\n\n// ---------------------------------------------------------------------------\n// EmptyState — placeholder for empty views (no files, no results, etc.).\n//\n// Usage:\n// <EmptyState\n// icon={<FolderOpen />}\n// title=\"No files\"\n// description=\"This folder is empty.\"\n// action={<Button onClick={upload}>Upload File</Button>}\n// />\n// ---------------------------------------------------------------------------\n\ninterface EmptyStateProps {\n\ticon?: ReactNode;\n\ttitle: string;\n\tdescription?: string;\n\taction?: ReactNode;\n\tcompact?: boolean;\n\tclassName?: string;\n}\n\nexport function EmptyState({ icon, title, description, action, compact, className = '' }: EmptyStateProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={`flex flex-col items-center justify-center text-center ${\n\t\t\t\tcompact ? 'gap-2 py-6' : 'gap-3 py-12'\n\t\t\t} ${className}`}\n\t\t>\n\t\t\t{icon && (\n\t\t\t\t<div className={`text-gray-700 ${compact ? '[&>svg]:h-5 [&>svg]:w-5' : '[&>svg]:h-8 [&>svg]:w-8'}`}>{icon}</div>\n\t\t\t)}\n\t\t\t<div className=\"space-y-0.5\">\n\t\t\t\t<p className=\"text-label-13 font-medium text-gray-1000\">{title}</p>\n\t\t\t\t{description && <p className={`text-gray-800 ${compact ? 'text-label-13' : 'text-label-13'}`}>{description}</p>}\n\t\t\t</div>\n\t\t\t{action && <div className=\"mt-2 shrink-0\">{action}</div>}\n\t\t</div>\n\t);\n}\n","'use client';\n\nimport { type KeyboardEvent, type ReactNode, useCallback, useEffect, useRef, useState } from 'react';\n\n// ---------------------------------------------------------------------------\n// ListView — selectable list with keyboard navigation.\n//\n// Usage:\n// <ListView\n// items={files}\n// selected={selectedId}\n// onSelect={setSelectedId}\n// onActivate={(item) => openFile(item)}\n// renderItem={(item, { selected, focused }) => (\n// <div className=\"flex items-center gap-2\">\n// <FileIcon name={item.name} />\n// <span>{item.name}</span>\n// </div>\n// )}\n// getKey={(item) => item.id}\n// />\n// ---------------------------------------------------------------------------\n\ninterface ListViewProps<T> {\n\titems: T[];\n\tselected?: string | string[] | null;\n\tonSelect?: (key: string | null) => void;\n\tonActivate?: (item: T) => void;\n\trenderItem: (item: T, state: { selected: boolean; focused: boolean; index: number }) => ReactNode;\n\tgetKey: (item: T) => string;\n\tmultiSelect?: boolean;\n\temptyMessage?: string;\n\tclassName?: string;\n}\n\nexport function ListView<T>({\n\titems,\n\tselected,\n\tonSelect,\n\tonActivate,\n\trenderItem,\n\tgetKey,\n\tmultiSelect = false,\n\temptyMessage = 'No items',\n\tclassName = '',\n}: ListViewProps<T>) {\n\tconst [focusIndex, setFocusIndex] = useState(0);\n\tconst listRef = useRef<HTMLDivElement>(null);\n\n\tconst selectedSet = new Set(selected == null ? [] : Array.isArray(selected) ? selected : [selected]);\n\n\tconst clamp = useCallback((i: number) => Math.max(0, Math.min(items.length - 1, i)), [items.length]);\n\n\tuseEffect(() => {\n\t\tsetFocusIndex((prev) => clamp(prev));\n\t}, [items.length, clamp]);\n\n\tconst scrollToIndex = useCallback((i: number) => {\n\t\tconst el = listRef.current?.children[i] as HTMLElement | undefined;\n\t\tel?.scrollIntoView({ block: 'nearest' });\n\t}, []);\n\n\tconst handleKeyDown = useCallback(\n\t\t(e: KeyboardEvent) => {\n\t\t\tswitch (e.key) {\n\t\t\t\tcase 'ArrowDown': {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst next = clamp(focusIndex + 1);\n\t\t\t\t\tsetFocusIndex(next);\n\t\t\t\t\tscrollToIndex(next);\n\t\t\t\t\tif (!multiSelect) onSelect?.(getKey(items[next]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'ArrowUp': {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst prev = clamp(focusIndex - 1);\n\t\t\t\t\tsetFocusIndex(prev);\n\t\t\t\t\tscrollToIndex(prev);\n\t\t\t\t\tif (!multiSelect) onSelect?.(getKey(items[prev]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'Home': {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tsetFocusIndex(0);\n\t\t\t\t\tscrollToIndex(0);\n\t\t\t\t\tif (!multiSelect && items.length > 0) onSelect?.(getKey(items[0]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'End': {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst last = items.length - 1;\n\t\t\t\t\tsetFocusIndex(last);\n\t\t\t\t\tscrollToIndex(last);\n\t\t\t\t\tif (!multiSelect && items.length > 0) onSelect?.(getKey(items[last]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'Enter':\n\t\t\t\tcase ' ': {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst item = items[focusIndex];\n\t\t\t\t\tif (item) {\n\t\t\t\t\t\tonSelect?.(getKey(item));\n\t\t\t\t\t\tif (e.key === 'Enter') onActivate?.(item);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[focusIndex, items, clamp, scrollToIndex, onSelect, onActivate, getKey, multiSelect]\n\t);\n\n\tif (items.length === 0) {\n\t\treturn (\n\t\t\t<div className={`flex h-full items-center justify-center text-label-13 text-gray-800 ${className}`}>\n\t\t\t\t{emptyMessage}\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tref={listRef}\n\t\t\tclassName={`overflow-y-auto outline-none ${className}`}\n\t\t\trole=\"listbox\"\n\t\t\ttabIndex={0}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\taria-multiselectable={multiSelect}\n\t\t>\n\t\t\t{items.map((item, i) => {\n\t\t\t\tconst key = getKey(item);\n\t\t\t\tconst isSelected = selectedSet.has(key);\n\t\t\t\tconst isFocused = i === focusIndex;\n\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\taria-selected={isSelected}\n\t\t\t\t\t\tclassName={`cursor-default select-none px-2 py-1 transition-colors\n ${isSelected ? 'bg-blue-700/15 text-gray-1000' : 'text-gray-1000'}\n ${isFocused && !isSelected ? 'bg-gray-alpha-100' : ''}\n hover:bg-gray-alpha-200`}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetFocusIndex(i);\n\t\t\t\t\t\t\tonSelect?.(key);\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonDoubleClick={() => onActivate?.(item)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{renderItem(item, { selected: isSelected, focused: isFocused, index: i })}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t})}\n\t\t</div>\n\t);\n}\n","'use client';\n\nimport { type ReactNode } from 'react';\nimport { Separator } from '../components/separator';\n\n// ---------------------------------------------------------------------------\n// PropertyPanel — key-value inspector panel (like Finder's \"Get Info\").\n//\n// Usage:\n// <PropertyPanel title=\"File Info\">\n// <PropertyPanel.Section title=\"General\">\n// <PropertyPanel.Row label=\"Name\" value=\"document.pdf\" />\n// <PropertyPanel.Row label=\"Size\" value=\"2.4 MB\" />\n// <PropertyPanel.Row label=\"Modified\" value=\"Feb 10, 2026\" />\n// </PropertyPanel.Section>\n// <PropertyPanel.Section title=\"Permissions\">\n// <PropertyPanel.Row label=\"Owner\" value=\"vercel-sandbox\" />\n// <PropertyPanel.Row label=\"Group\" value=\"users\" />\n// </PropertyPanel.Section>\n// </PropertyPanel>\n// ---------------------------------------------------------------------------\n\ninterface PropertyPanelProps {\n\ttitle?: string;\n\tchildren: ReactNode;\n\tclassName?: string;\n}\n\nfunction PropertyPanelRoot({ title, children, className = '' }: PropertyPanelProps) {\n\treturn (\n\t\t<div className={`flex flex-col overflow-y-auto ${className}`}>\n\t\t\t{title && (\n\t\t\t\t<div className=\"sticky top-0 z-10 border-b border-gray-alpha-200 bg-background-100 px-3 py-2\">\n\t\t\t\t\t<h3 className=\"text-label-13 font-medium text-gray-1000\">{title}</h3>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div className=\"flex flex-col\">{children}</div>\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// PropertyPanel.Section\n// ---------------------------------------------------------------------------\n\nfunction PropertySection({\n\ttitle,\n\tchildren,\n\tcollapsible: _collapsible = false,\n\tdefaultOpen: _defaultOpen = true,\n}: {\n\ttitle?: string;\n\tchildren: ReactNode;\n\tcollapsible?: boolean;\n\tdefaultOpen?: boolean;\n}) {\n\treturn (\n\t\t<div className=\"border-b border-gray-alpha-200 last:border-b-0\">\n\t\t\t{title && (\n\t\t\t\t<div className=\"px-3 pt-3 pb-1\">\n\t\t\t\t\t<span className=\"text-label-13 font-medium text-gray-800\">{title}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div className={`px-3 pb-2 ${title ? '' : 'pt-2'}`}>{children}</div>\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// PropertyPanel.Row\n// ---------------------------------------------------------------------------\n\ninterface PropertyRowProps {\n\tlabel: string;\n\tvalue?: ReactNode;\n\tchildren?: ReactNode;\n\tmono?: boolean;\n\tcopyable?: boolean;\n}\n\nfunction PropertyRow({ label, value, children, mono }: PropertyRowProps) {\n\treturn (\n\t\t<div className=\"flex items-baseline justify-between gap-4 py-1\">\n\t\t\t<dt className=\"shrink-0 text-label-13 text-gray-800\">{label}</dt>\n\t\t\t<dd className={`min-w-0 truncate text-right text-label-13 text-gray-1000 ${mono ? 'font-mono' : ''}`}>\n\t\t\t\t{children ?? value}\n\t\t\t</dd>\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// PropertyPanel.Separator\n// ---------------------------------------------------------------------------\n\nfunction PropertySeparator() {\n\treturn <Separator className=\"my-1\" />;\n}\n\n// ---------------------------------------------------------------------------\n// Export\n// ---------------------------------------------------------------------------\n\nexport const PropertyPanel = Object.assign(PropertyPanelRoot, {\n\tSection: PropertySection,\n\tRow: PropertyRow,\n\tSeparator: PropertySeparator,\n});\n","export function SectionHeader({\n\ttitle,\n\tdescription,\n\tchildren,\n}: {\n\ttitle: string;\n\tdescription?: string;\n\tchildren?: React.ReactNode;\n}) {\n\treturn (\n\t\t<div className=\"mb-4 flex items-start justify-between\">\n\t\t\t<div>\n\t\t\t\t<h2 className=\"text-copy-13 font-medium text-gray-1000\">{title}</h2>\n\t\t\t\t{description && <p className=\"mt-0.5 text-copy-13 text-gray-900\">{description}</p>}\n\t\t\t</div>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n","'use client';\n\nimport type { ReactNode } from 'react';\n\n// ---------------------------------------------------------------------------\n// SidebarNav — reusable sidebar navigation for app shells.\n//\n// Extracts the repeated sidebar + tab-button pattern used across Settings,\n// AppStore, etc. Designed to sit inside a SplitPane.Panel.\n//\n// Usage:\n// <SidebarNav label=\"Settings\" title=\"Settings\">\n// <SidebarNav.Item active={tab === \"a\"} onClick={() => setTab(\"a\")} icon={<Icon />}>\n// Appearance\n// </SidebarNav.Item>\n// </SidebarNav>\n//\n// // Multiple sections:\n// <SidebarNav label=\"App Store\">\n// <SidebarNav.Group title=\"Packages\">\n// <SidebarNav.Item ...>GUI Apps</SidebarNav.Item>\n// </SidebarNav.Group>\n// <SidebarNav.Group title=\"Repos\">\n// ...\n// </SidebarNav.Group>\n// </SidebarNav>\n// ---------------------------------------------------------------------------\n\ninterface SidebarNavProps {\n\tchildren: ReactNode;\n\t/** Accessible label for the <nav> element */\n\tlabel: string;\n\t/** Optional heading displayed at the top of the sidebar */\n\ttitle?: string;\n\tclassName?: string;\n}\n\nfunction SidebarNavRoot({ children, label, title, className = '' }: SidebarNavProps) {\n\treturn (\n\t\t<nav className={`flex flex-col py-2 ${className}`} aria-label={label}>\n\t\t\t{title && (\n\t\t\t\t<div className=\"px-3 pb-1\">\n\t\t\t\t\t<span className=\"text-copy-13 font-medium text-gray-800\">{title}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{children}\n\t\t</nav>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// SidebarNav.Group — optional section divider with a title\n// ---------------------------------------------------------------------------\n\ninterface SidebarNavGroupProps {\n\tchildren: ReactNode;\n\ttitle?: string;\n\tclassName?: string;\n}\n\nfunction SidebarNavGroup({ children, title, className = '' }: SidebarNavGroupProps) {\n\treturn (\n\t\t<div className={className}>\n\t\t\t{title && (\n\t\t\t\t<div className=\"px-3 pt-4 pb-1\">\n\t\t\t\t\t<span className=\"text-copy-13 font-medium text-gray-800\">{title}</span>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// SidebarNav.Item — a single navigation button\n// ---------------------------------------------------------------------------\n\ninterface SidebarNavItemProps {\n\tchildren: ReactNode;\n\tactive?: boolean;\n\tonClick?: () => void;\n\ticon?: ReactNode;\n\t/** Trailing content (e.g. a count badge) */\n\tsuffix?: ReactNode;\n\tclassName?: string;\n}\n\nfunction SidebarNavItem({ children, active, onClick, icon, suffix, className = '' }: SidebarNavItemProps) {\n\treturn (\n\t\t<button\n\t\t\tonClick={onClick}\n\t\t\tclassName={`mx-1 flex items-center gap-2 rounded-md px-2 py-1 text-copy-13 transition-colors ${\n\t\t\t\tactive ? 'bg-gray-alpha-200 text-gray-1000' : 'text-gray-900 hover:bg-gray-alpha-100 hover:text-gray-1000'\n\t\t\t} ${className}`}\n\t\t>\n\t\t\t{icon && <span className=\"shrink-0 text-gray-800 [&>svg]:h-3.5 [&>svg]:w-3.5\">{icon}</span>}\n\t\t\t<span className=\"min-w-0 truncate\">{children}</span>\n\t\t\t{suffix && <span className=\"ml-auto font-mono text-copy-13 tabular-nums text-gray-700\">{suffix}</span>}\n\t\t</button>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// Export\n// ---------------------------------------------------------------------------\n\nexport const SidebarNav = Object.assign(SidebarNavRoot, {\n\tGroup: SidebarNavGroup,\n\tItem: SidebarNavItem,\n});\n","'use client';\n\nimport { type CSSProperties, type ReactNode, useCallback, useRef, useState, useSyncExternalStore } from 'react';\n\n// ---------------------------------------------------------------------------\n// SplitPane — resizable two-panel layout (horizontal or vertical).\n//\n// Usage:\n// <SplitPane defaultSize={240} min={120} max={400}>\n// <SplitPane.Panel>Sidebar</SplitPane.Panel>\n// <SplitPane.Panel>Main</SplitPane.Panel>\n// </SplitPane>\n//\n// <SplitPane direction=\"vertical\" defaultSize={200} min={100}>\n// <SplitPane.Panel>Top</SplitPane.Panel>\n// <SplitPane.Panel>Bottom</SplitPane.Panel>\n// </SplitPane>\n// ---------------------------------------------------------------------------\n\ninterface SplitPaneProps {\n\tchildren: [ReactNode, ReactNode];\n\tdirection?: 'horizontal' | 'vertical';\n\tdefaultSize?: number;\n\tmin?: number;\n\tmax?: number;\n\t/** On narrow viewports, stack panels vertically and hide the resize handle */\n\tcollapseBelow?: number;\n\tonResize?: (size: number) => void;\n\tclassName?: string;\n}\n\nfunction useMediaQuery(query: string) {\n\tconst subscribe = useCallback(\n\t\t(callback: () => void) => {\n\t\t\tconst mql = window.matchMedia(query);\n\t\t\tmql.addEventListener('change', callback);\n\t\t\treturn () => mql.removeEventListener('change', callback);\n\t\t},\n\t\t[query]\n\t);\n\tconst getSnapshot = useCallback(() => window.matchMedia(query).matches, [query]);\n\tconst getServerSnapshot = useCallback(() => false, []);\n\treturn useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\nfunction SplitPaneRoot({\n\tchildren,\n\tdirection = 'horizontal',\n\tdefaultSize = 240,\n\tmin = 100,\n\tmax = 600,\n\tcollapseBelow = 640,\n\tonResize,\n\tclassName = '',\n}: SplitPaneProps) {\n\tconst [size, setSize] = useState(defaultSize);\n\tconst containerRef = useRef<HTMLDivElement>(null);\n\tconst dragging = useRef(false);\n\tconst startPos = useRef(0);\n\tconst startSize = useRef(0);\n\tconst isMobile = useMediaQuery(`(max-width: ${collapseBelow}px)`);\n\n\tconst isHorizontal = direction === 'horizontal' && !isMobile;\n\tconst [first, second] = children;\n\n\tconst onPointerDown = useCallback(\n\t\t(e: React.PointerEvent) => {\n\t\t\te.preventDefault();\n\t\t\tdragging.current = true;\n\t\t\tstartPos.current = isHorizontal ? e.clientX : e.clientY;\n\t\t\tstartSize.current = size;\n\t\t\t(e.target as HTMLElement).setPointerCapture(e.pointerId);\n\t\t},\n\t\t[isHorizontal, size]\n\t);\n\n\tconst onPointerMove = useCallback(\n\t\t(e: React.PointerEvent) => {\n\t\t\tif (!dragging.current) return;\n\t\t\tconst delta = (isHorizontal ? e.clientX : e.clientY) - startPos.current;\n\t\t\tconst next = Math.min(max, Math.max(min, startSize.current + delta));\n\t\t\tsetSize(next);\n\t\t\tonResize?.(next);\n\t\t},\n\t\t[isHorizontal, min, max, onResize]\n\t);\n\n\tconst onPointerUp = useCallback(() => {\n\t\tdragging.current = false;\n\t}, []);\n\n\t// On mobile, stack vertically with no resize handle\n\tif (isMobile) {\n\t\treturn (\n\t\t\t<div ref={containerRef} className={`flex flex-col h-full w-full overflow-hidden ${className}`}>\n\t\t\t\t<div className=\"shrink-0 overflow-auto border-b border-gray-alpha-200\">{first}</div>\n\t\t\t\t<div className=\"flex-1 overflow-hidden\">{second}</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst firstStyle: CSSProperties = isHorizontal\n\t\t? { width: size, minWidth: min, maxWidth: max, flexShrink: 0 }\n\t\t: { height: size, minHeight: min, maxHeight: max, flexShrink: 0 };\n\n\treturn (\n\t\t<div\n\t\t\tref={containerRef}\n\t\t\tclassName={`flex ${isHorizontal ? 'flex-row' : 'flex-col'} h-full w-full overflow-hidden ${className}`}\n\t\t>\n\t\t\t<div style={firstStyle} className=\"overflow-hidden\">\n\t\t\t\t{first}\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={`shrink-0 ${\n\t\t\t\t\tisHorizontal\n\t\t\t\t\t\t? 'w-px cursor-col-resize hover:w-0.5 hover:bg-blue-700/50 active:w-0.5 active:bg-blue-700'\n\t\t\t\t\t\t: 'h-px cursor-row-resize hover:h-0.5 hover:bg-blue-700/50 active:h-0.5 active:bg-blue-700'\n\t\t\t\t} bg-gray-alpha-200 transition-colors`}\n\t\t\t\tonPointerDown={onPointerDown}\n\t\t\t\tonPointerMove={onPointerMove}\n\t\t\t\tonPointerUp={onPointerUp}\n\t\t\t\trole=\"separator\"\n\t\t\t\taria-orientation={isHorizontal ? 'vertical' : 'horizontal'}\n\t\t\t\ttabIndex={0}\n\t\t\t/>\n\t\t\t<div className=\"flex-1 overflow-hidden\">{second}</div>\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// SplitPane.Panel — thin wrapper for semantic clarity\n// ---------------------------------------------------------------------------\n\nfunction Panel({ children, className = '' }: { children: ReactNode; className?: string }) {\n\treturn <div className={`h-full w-full overflow-auto ${className}`}>{children}</div>;\n}\n\n// ---------------------------------------------------------------------------\n// Export as compound component\n// ---------------------------------------------------------------------------\n\nexport const SplitPane = Object.assign(SplitPaneRoot, {\n\tPanel,\n});\n","import { Badge } from '../components/badge';\n\nexport function StatusBadge({ status }: { status: string }) {\n\tconst variant = status === 'active' ? 'green' : status === 'creating' ? 'amber' : status === 'error' ? 'red' : 'gray';\n\treturn (\n\t\t<Badge variant={variant} size=\"sm\" contrast=\"low\">\n\t\t\t{status}\n\t\t</Badge>\n\t);\n}\n","'use client';\n\nimport { type ReactNode } from 'react';\nimport { Separator } from '../components/separator';\n\n// ---------------------------------------------------------------------------\n// StatusBar — bottom bar for app-level status, breadcrumbs, and indicators.\n//\n// Usage:\n// <StatusBar>\n// <StatusBar.Item>Ln 42, Col 18</StatusBar.Item>\n// <StatusBar.Separator />\n// <StatusBar.Item>UTF-8</StatusBar.Item>\n// <StatusBar.Spacer />\n// <StatusBar.Item icon={<CheckCircle />} variant=\"success\">Saved</StatusBar.Item>\n// </StatusBar>\n// ---------------------------------------------------------------------------\n\ninterface StatusBarProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n}\n\nfunction StatusBarRoot({ children, className = '' }: StatusBarProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={`flex h-6 shrink-0 items-center gap-0 border-t border-gray-alpha-200 bg-background-100 px-2 font-mono text-label-13 text-gray-900 ${className}`}\n\t\t\trole=\"status\"\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// StatusBar.Item\n// ---------------------------------------------------------------------------\n\ninterface StatusBarItemProps {\n\tchildren: ReactNode;\n\ticon?: ReactNode;\n\tvariant?: 'default' | 'success' | 'warning' | 'error';\n\tonClick?: () => void;\n\tclassName?: string;\n}\n\nconst variantColors = {\n\tdefault: 'text-gray-900',\n\tsuccess: 'text-green-900',\n\twarning: 'text-amber-900',\n\terror: 'text-red-900',\n};\n\nfunction StatusBarItem({ children, icon, variant = 'default', onClick, className = '' }: StatusBarItemProps) {\n\tconst classes = `inline-flex items-center gap-1 px-1.5 py-0.5 rounded-sm ${variantColors[variant]} ${\n\t\tonClick ? 'cursor-pointer hover:bg-gray-alpha-200 transition-colors' : ''\n\t} ${className}`;\n\n\tif (onClick) {\n\t\treturn (\n\t\t\t<button className={classes} onClick={onClick}>\n\t\t\t\t{icon}\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t}\n\n\treturn (\n\t\t<span className={classes}>\n\t\t\t{icon}\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// StatusBar.Separator\n// ---------------------------------------------------------------------------\n\nfunction StatusBarSeparator() {\n\treturn <Separator orientation=\"vertical\" className=\"mx-0.5 h-3\" />;\n}\n\n// ---------------------------------------------------------------------------\n// StatusBar.Spacer\n// ---------------------------------------------------------------------------\n\nfunction StatusBarSpacer() {\n\treturn <div className=\"flex-1\" />;\n}\n\n// ---------------------------------------------------------------------------\n// Export\n// ---------------------------------------------------------------------------\n\nexport const StatusBar = Object.assign(StatusBarRoot, {\n\tItem: StatusBarItem,\n\tSeparator: StatusBarSeparator,\n\tSpacer: StatusBarSpacer,\n});\n","'use client';\n\nimport { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react';\nimport { Separator } from '../components/separator';\nimport { Tooltip } from '../components/tooltip';\n\n// ---------------------------------------------------------------------------\n// Toolbar — horizontal bar of icon buttons, groups, and separators.\n//\n// Usage:\n// <Toolbar>\n// <Toolbar.Group>\n// <Toolbar.Button tooltip=\"Back\" onClick={goBack}><ChevronLeft /></Toolbar.Button>\n// <Toolbar.Button tooltip=\"Forward\" onClick={goFwd}><ChevronRight /></Toolbar.Button>\n// </Toolbar.Group>\n// <Toolbar.Separator />\n// <Toolbar.Group>\n// <Toolbar.Button tooltip=\"Refresh\" active={loading}><Refresh /></Toolbar.Button>\n// </Toolbar.Group>\n// <Toolbar.Spacer />\n// <Toolbar.Text>3 items</Toolbar.Text>\n// </Toolbar>\n// ---------------------------------------------------------------------------\n\ninterface ToolbarProps {\n\tchildren: ReactNode;\n\tclassName?: string;\n}\n\nfunction ToolbarRoot({ children, className = '' }: ToolbarProps) {\n\treturn (\n\t\t<div\n\t\t\tclassName={`flex h-9 shrink-0 items-center gap-0.5 border-b border-gray-alpha-200 bg-background-100 px-1.5 ${className}`}\n\t\t\trole=\"toolbar\"\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// Toolbar.Button\n// ---------------------------------------------------------------------------\n\ninterface ToolbarButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {\n\ttooltip?: string;\n\tactive?: boolean;\n\tchildren: ReactNode;\n}\n\nconst ToolbarButton = forwardRef<HTMLButtonElement, ToolbarButtonProps>(function ToolbarButton(\n\t{ tooltip, active, children, className = '', disabled, ...props },\n\tref\n) {\n\tconst btn = (\n\t\t<button\n\t\t\tref={ref}\n\t\t\tdisabled={disabled}\n\t\t\tclassName={`inline-flex h-7 w-7 items-center justify-center rounded-md text-gray-900 transition-colors [&>svg]:h-3.5 [&>svg]:w-3.5\n hover:bg-gray-alpha-200 hover:text-gray-1000\n disabled:pointer-events-none disabled:opacity-40\n ${active ? 'bg-gray-alpha-200 text-gray-1000' : ''}\n ${className}`}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</button>\n\t);\n\n\tif (tooltip) {\n\t\treturn (\n\t\t\t<Tooltip text={tooltip} desktopOnly>\n\t\t\t\t{btn}\n\t\t\t</Tooltip>\n\t\t);\n\t}\n\treturn btn;\n});\n\n// ---------------------------------------------------------------------------\n// Toolbar.Group — groups buttons together with tighter spacing\n// ---------------------------------------------------------------------------\n\nfunction ToolbarGroup({ children, className = '' }: { children: ReactNode; className?: string }) {\n\treturn <div className={`flex items-center gap-px ${className}`}>{children}</div>;\n}\n\n// ---------------------------------------------------------------------------\n// Toolbar.Separator\n// ---------------------------------------------------------------------------\n\nfunction ToolbarSeparator() {\n\treturn <Separator orientation=\"vertical\" className=\"mx-1 h-4\" />;\n}\n\n// ---------------------------------------------------------------------------\n// Toolbar.Spacer — pushes subsequent items to the right\n// ---------------------------------------------------------------------------\n\nfunction ToolbarSpacer() {\n\treturn <div className=\"flex-1\" />;\n}\n\n// ---------------------------------------------------------------------------\n// Toolbar.Text — inline text label\n// ---------------------------------------------------------------------------\n\nfunction ToolbarText({ children, className = '' }: { children: ReactNode; className?: string }) {\n\treturn <span className={`px-1.5 text-label-13 text-gray-900 ${className}`}>{children}</span>;\n}\n\n// ---------------------------------------------------------------------------\n// Toolbar.Input — inline input (e.g. address bar)\n// ---------------------------------------------------------------------------\n\nfunction ToolbarInput({\n\tvalue,\n\tonChange,\n\tplaceholder,\n\tclassName = '',\n\treadOnly,\n}: {\n\tvalue?: string;\n\tonChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n\tplaceholder?: string;\n\tclassName?: string;\n\treadOnly?: boolean;\n}) {\n\treturn (\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\tvalue={value}\n\t\t\tonChange={onChange}\n\t\t\tplaceholder={placeholder}\n\t\t\treadOnly={readOnly}\n\t\t\tclassName={`h-6 flex-1 rounded-md border border-gray-alpha-200 bg-gray-alpha-100 px-2 font-mono text-label-13 text-gray-1000 placeholder:text-gray-700 outline-none transition-colors focus:border-blue-700 ${className}`}\n\t\t/>\n\t);\n}\n\n// ---------------------------------------------------------------------------\n// Export as compound component\n// ---------------------------------------------------------------------------\n\nexport const Toolbar = Object.assign(ToolbarRoot, {\n\tButton: ToolbarButton,\n\tGroup: ToolbarGroup,\n\tSeparator: ToolbarSeparator,\n\tSpacer: ToolbarSpacer,\n\tText: ToolbarText,\n\tInput: ToolbarInput,\n});\n","import { create } from 'zustand';\n\nexport type NotificationUrgency = 'low' | 'normal' | 'critical';\nexport type DesktopNotifMode = 'background' | 'always' | 'off';\n\nexport interface DesktopNotification {\n\tid: number;\n\treplacesId: number;\n\tappName: string;\n\tsummary: string;\n\tbody: string;\n\ticon: string | null;\n\tactions: string[];\n\texpires: number;\n\ttimestamp: number;\n\tread: boolean;\n\turgency: NotificationUrgency;\n\tcategory: string | null;\n\ttransient: boolean;\n\tworkspaceId: string | null;\n}\n\nexport interface TrayIcon {\n\twid: number;\n\ttitle: string;\n\ticon: string | null;\n}\n\ninterface NotificationStore {\n\tnotifications: DesktopNotification[];\n\thistory: DesktopNotification[];\n\ttrayIcons: Map<number, TrayIcon>;\n\tcenterOpen: boolean;\n\tunreadCount: number;\n\n\t// Preferences\n\tdoNotDisturb: boolean;\n\tdesktopNotifMode: DesktopNotifMode;\n\tbrowserPermission: NotificationPermission;\n\n\tsetDoNotDisturb: (value: boolean) => void;\n\tsetDesktopNotifMode: (mode: DesktopNotifMode) => void;\n\trequestBrowserPermission: () => Promise<NotificationPermission>;\n\tsyncBrowserPermission: () => void;\n\n\taddNotification: (\n\t\tnotification: Omit<\n\t\t\tDesktopNotification,\n\t\t\t'timestamp' | 'read' | 'appName' | 'urgency' | 'category' | 'transient' | 'workspaceId'\n\t\t> &\n\t\t\tPartial<Pick<DesktopNotification, 'appName' | 'urgency' | 'category' | 'transient' | 'workspaceId'>>\n\t) => void;\n\tdismissNotification: (id: number) => void;\n\thideNotification: (id: number) => void;\n\tclearHistory: () => void;\n\tmarkAllRead: () => void;\n\ttoggleCenter: () => void;\n\tcloseCenter: () => void;\n\n\taddTrayIcon: (icon: TrayIcon) => void;\n\tremoveTrayIcon: (wid: number) => void;\n\tupdateTrayIcon: (wid: number, updates: Partial<TrayIcon>) => void;\n}\n\nconst MAX_VISIBLE = 5;\nconst MAX_HISTORY = 50;\n\nconst PREFS_KEY = 'khal_os_notification_prefs';\n\nfunction loadPrefs(): {\n\tdoNotDisturb: boolean;\n\tdesktopNotifMode: DesktopNotifMode;\n} {\n\tif (typeof window === 'undefined') return { doNotDisturb: false, desktopNotifMode: 'background' };\n\ttry {\n\t\tconst raw = localStorage.getItem(PREFS_KEY);\n\t\tif (raw) return JSON.parse(raw);\n\t} catch {}\n\treturn { doNotDisturb: false, desktopNotifMode: 'background' };\n}\n\nfunction savePrefs(prefs: { doNotDisturb: boolean; desktopNotifMode: DesktopNotifMode }) {\n\ttry {\n\t\tlocalStorage.setItem(PREFS_KEY, JSON.stringify(prefs));\n\t} catch {}\n}\n\nfunction getBrowserPermission(): NotificationPermission {\n\tif (typeof window === 'undefined' || !('Notification' in window)) return 'denied';\n\treturn Notification.permission;\n}\n\nfunction sendBrowserNotification(notif: DesktopNotification) {\n\tif (typeof window === 'undefined' || !('Notification' in window) || Notification.permission !== 'granted') return;\n\n\tconst n = new Notification(notif.summary, {\n\t\tbody: notif.body || undefined,\n\t\ticon: notif.icon || undefined,\n\t\ttag: String(notif.id),\n\t\tsilent: notif.urgency === 'low',\n\t});\n\n\tn.onclick = () => {\n\t\twindow.focus();\n\t\tn.close();\n\t};\n\n\tif (notif.expires > 0) {\n\t\tsetTimeout(() => n.close(), notif.expires);\n\t} else if (notif.urgency !== 'critical') {\n\t\tsetTimeout(() => n.close(), 6000);\n\t}\n}\n\nconst initialPrefs = loadPrefs();\n\nexport const useNotificationStore = create<NotificationStore>()((set, get) => ({\n\tnotifications: [],\n\thistory: [],\n\ttrayIcons: new Map(),\n\tcenterOpen: false,\n\tunreadCount: 0,\n\n\tdoNotDisturb: initialPrefs.doNotDisturb,\n\tdesktopNotifMode: initialPrefs.desktopNotifMode,\n\tbrowserPermission: getBrowserPermission(),\n\n\tsetDoNotDisturb: (value) => {\n\t\tset({ doNotDisturb: value });\n\t\tsavePrefs({ doNotDisturb: value, desktopNotifMode: get().desktopNotifMode });\n\t},\n\n\tsetDesktopNotifMode: (mode) => {\n\t\tset({ desktopNotifMode: mode });\n\t\tsavePrefs({ doNotDisturb: get().doNotDisturb, desktopNotifMode: mode });\n\t},\n\n\trequestBrowserPermission: async () => {\n\t\tif (typeof window === 'undefined' || !('Notification' in window)) return 'denied';\n\t\tconst result = await Notification.requestPermission();\n\t\tset({ browserPermission: result });\n\t\treturn result;\n\t},\n\n\tsyncBrowserPermission: () => {\n\t\tset({ browserPermission: getBrowserPermission() });\n\t},\n\n\taddNotification: (notification) => {\n\t\tconst full: DesktopNotification = {\n\t\t\t...notification,\n\t\t\tappName: notification.appName ?? '',\n\t\t\turgency: notification.urgency ?? 'normal',\n\t\t\tcategory: notification.category ?? null,\n\t\t\ttransient: notification.transient ?? false,\n\t\t\tworkspaceId: notification.workspaceId ?? null,\n\t\t\ttimestamp: Date.now(),\n\t\t\tread: false,\n\t\t};\n\n\t\tconst { doNotDisturb, desktopNotifMode, browserPermission } = get();\n\n\t\t// Always add to history regardless of DND\n\t\tset((state) => {\n\t\t\tconst history = full.transient ? state.history : [full, ...state.history].slice(0, MAX_HISTORY);\n\n\t\t\t// In DND mode, skip visible toasts (still record in history)\n\t\t\tif (doNotDisturb && full.urgency !== 'critical') {\n\t\t\t\treturn {\n\t\t\t\t\thistory,\n\t\t\t\t\tunreadCount: full.transient ? state.unreadCount : state.unreadCount + 1,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tlet notifications = [...state.notifications];\n\n\t\t\tif (notification.replacesId) {\n\t\t\t\tnotifications = notifications.filter((n) => n.id !== notification.replacesId);\n\t\t\t}\n\n\t\t\tnotifications = [full, ...notifications].slice(0, MAX_VISIBLE);\n\n\t\t\treturn {\n\t\t\t\tnotifications,\n\t\t\t\thistory,\n\t\t\t\tunreadCount: full.transient ? state.unreadCount : state.unreadCount + 1,\n\t\t\t};\n\t\t});\n\n\t\t// Bridge to browser desktop notifications\n\t\tif (browserPermission === 'granted' && desktopNotifMode !== 'off' && !full.transient) {\n\t\t\tconst shouldSend = desktopNotifMode === 'always' || (desktopNotifMode === 'background' && document.hidden);\n\t\t\tif (shouldSend) {\n\t\t\t\tsendBrowserNotification(full);\n\t\t\t}\n\t\t}\n\n\t\tconst isCritical = full.urgency === 'critical';\n\t\tif (full.expires > 0) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tget().hideNotification(full.id);\n\t\t\t}, full.expires);\n\t\t} else if (!isCritical) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tget().hideNotification(full.id);\n\t\t\t}, 6000);\n\t\t}\n\t},\n\n\tdismissNotification: (id) => {\n\t\tset((state) => ({\n\t\t\tnotifications: state.notifications.filter((n) => n.id !== id),\n\t\t}));\n\t},\n\n\thideNotification: (id) => {\n\t\tset((state) => ({\n\t\t\tnotifications: state.notifications.filter((n) => n.id !== id),\n\t\t}));\n\t},\n\n\tclearHistory: () => {\n\t\tset({ history: [], unreadCount: 0 });\n\t},\n\n\tmarkAllRead: () => {\n\t\tset((state) => ({\n\t\t\thistory: state.history.map((n) => ({ ...n, read: true })),\n\t\t\tunreadCount: 0,\n\t\t}));\n\t},\n\n\ttoggleCenter: () => {\n\t\tconst opening = !get().centerOpen;\n\t\tset({ centerOpen: opening });\n\t\tif (opening) {\n\t\t\tget().markAllRead();\n\t\t}\n\t},\n\n\tcloseCenter: () => {\n\t\tset({ centerOpen: false });\n\t},\n\n\taddTrayIcon: (icon) => {\n\t\tset((state) => {\n\t\t\tconst next = new Map(state.trayIcons);\n\t\t\tnext.set(icon.wid, icon);\n\t\t\treturn { trayIcons: next };\n\t\t});\n\t},\n\n\tremoveTrayIcon: (wid) => {\n\t\tset((state) => {\n\t\t\tconst next = new Map(state.trayIcons);\n\t\t\tnext.delete(wid);\n\t\t\treturn { trayIcons: next };\n\t\t});\n\t},\n\n\tupdateTrayIcon: (wid, updates) => {\n\t\tset((state) => {\n\t\t\tconst next = new Map(state.trayIcons);\n\t\t\tconst existing = next.get(wid);\n\t\t\tif (existing) {\n\t\t\t\tnext.set(wid, { ...existing, ...updates });\n\t\t\t}\n\t\t\treturn { trayIcons: next };\n\t\t});\n\t},\n}));\n","/**\n * LP Design Tokens — extracted from khal-landing hero-os-showcase.tsx\n * These are the canonical reference colors from the landing page.\n * The OS theme CSS variables consume these values.\n */\n\n// Surface colors\nexport const WIN_BG = '#111318';\nexport const CHROME_BG = '#0D0F14';\nexport const CELL_BG = '#0D1017';\nexport const WIN_BORDER = '#1E2330';\nexport const WIN_BORDER_FOCUSED = '#333D55';\n\n// Text hierarchy\nexport const TEXT_PRIMARY = '#E8EAF0';\nexport const TEXT_SECONDARY = '#8B92A5';\nexport const TEXT_TERTIARY = '#555D73';\n\n// Accent\nexport const ACCENT_BLUE = '#0A6FE0';\n\n// Mesh gradient palette (8-color navy-to-gold)\nexport const MESH_GRADIENT_PALETTE = [\n\t'#030508',\n\t'#070D15',\n\t'#0C1A2E',\n\t'#1A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,IAC1B,CAAC;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,QAAQ;AACxB,QAAI,CAAC,UAAU;AACd,YAAM,OAAO,IAAI,IAAI,MAAM,SAAS;AACpC,WAAK,OAAO,GAAG;AACf,aAAO,EAAE,WAAW,KAAK;AAAA,IAC1B,CAAC;AAAA,EACF;AAAA,EAEA,gBAAgB,CAAC,KAAK,YAAY;AACjC,QAAI,CAAC,UAAU;AACd,YAAM,OAAO,IAAI,IAAI,MAAM,SAAS;AACpC,YAAM,WAAW,KAAK,IAAI,GAAG;AAC7B,UAAI,UAAU;AACb,aAAK,IAAI,KAAK,EAAE,GAAG,UAAU,GAAG,QAAQ,CAAC;AAAA,MAC1C;AACA,aAAO,EAAE,WAAW,KAAK;AAAA,IAC1B,CAAC;AAAA,EACF;AACD,EAAE;;;ACvQK,IAAM,SAAS;AACf,IAAM,YAAY;AAClB,IAAM,UAAU;AAChB,IAAM,aAAa;AACnB,IAAM,qBAAqB;AAG3B,IAAM,eAAe;AACrB,IAAM,iBAAiB;AACvB,IAAM,gBAAgB;AAGtB,IAAM,cAAc;AAGpB,IAAM,wBAAwB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAGO,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;","names":["useKhalAuth","jsx","jsxs","sizeMap","jsx","cva","React","jsx","jsxs","sizeMap","jsx","jsxs","cva","React","jsx","React","jsx","jsxs","useState","jsx","jsx","jsxs","useState","cva","React","jsx","jsxs","cva","React","jsx","jsxs","cva","React","jsx","jsxs","cva","React","jsx","jsxs","jsx","jsxs","motion","useCallback","useRef","useState","jsx","jsxs","useState","useRef","useCallback","motion","useEffect","useRef","useState","useEffect","useState","jsx","useRef","useState","useEffect","cva","React","jsx","jsxs","cva","cva","jsx","jsxs","cva","Icon","cva","React","jsx","jsxs","cva","cva","jsx","jsxs","cva","cva","React","jsx","jsxs","cva","React","jsx","Separator","React","jsx","useEffect","jsx","jsxs","useEffect","useEffect","useState","jsx","jsxs","useState","useEffect","Icon","jsx","jsxs","React","jsx","jsxs","createContext","useCallback","useContext","useRef","useState","jsx","jsxs","jsx","Title","jsx","jsxs","useCallback","useEffect","useRef","useState","jsx","jsx","jsxs","Separator","jsx","jsxs","jsx","jsxs","useCallback","useRef","useState","jsx","jsxs","jsx","jsx","jsxs","Separator","forwardRef","jsx","forwardRef","ToolbarButton","Separator","create"]}
package/package.json CHANGED
@@ -1,41 +1,60 @@
1
1
  {
2
- "name": "@khal-os/ui",
3
- "version": "1.0.0",
4
- "private": false,
5
- "scripts": {
6
- "build": "echo 'build placeholder'",
7
- "typecheck": "tsc --noEmit",
8
- "lint": "biome check ."
9
- },
10
- "main": "./src/index.ts",
11
- "exports": {
12
- ".": "./src/index.ts",
13
- "./server": "./src/server.ts",
14
- "./tokens.css": "./tokens.css"
15
- },
16
- "peerDependencies": {
17
- "react": ">=19",
18
- "next-themes": ">=0.4",
19
- "zustand": ">=4"
20
- },
21
- "dependencies": {
22
- "@number-flow/react": "^0.6.0",
23
- "@paper-design/shaders-react": "^0.0.72",
24
- "@radix-ui/react-context-menu": "^2.2.16",
25
- "@radix-ui/react-dialog": "^1.1.15",
26
- "@radix-ui/react-dropdown-menu": "^2.1.16",
27
- "@radix-ui/react-separator": "^1.1.8",
28
- "@radix-ui/react-slot": "^1.2.4",
29
- "@radix-ui/react-switch": "^1.2.6",
30
- "@radix-ui/react-tooltip": "^1.2.8",
31
- "class-variance-authority": "^0.7.1",
32
- "clsx": "^2.1.1",
33
- "cmdk": "^1.1.1",
34
- "lucide-react": "^0.563.0",
35
- "motion": "^12.38.0",
36
- "tailwind-merge": "^3.4.0"
37
- },
38
- "publishConfig": {
39
- "access": "public"
40
- }
41
- }
2
+ "name": "@khal-os/ui",
3
+ "version": "1.0.2",
4
+ "type": "module",
5
+ "private": false,
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": {
12
+ "types": "./dist/index.d.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./dist/index.d.cts",
17
+ "default": "./dist/index.cjs"
18
+ }
19
+ },
20
+ "./tokens.css": "./tokens.css"
21
+ },
22
+ "files": [
23
+ "dist",
24
+ "tokens.css",
25
+ "README.md",
26
+ "LICENSE"
27
+ ],
28
+ "peerDependencies": {
29
+ "react": ">=19",
30
+ "next-themes": ">=0.4",
31
+ "zustand": ">=4",
32
+ "@khal-os/sdk": "1.0.2"
33
+ },
34
+ "dependencies": {
35
+ "@number-flow/react": "^0.6.0",
36
+ "@paper-design/shaders-react": "^0.0.72",
37
+ "@radix-ui/react-context-menu": "^2.2.16",
38
+ "@radix-ui/react-dialog": "^1.1.15",
39
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
40
+ "@radix-ui/react-separator": "^1.1.8",
41
+ "@radix-ui/react-slot": "^1.2.4",
42
+ "@radix-ui/react-switch": "^1.2.6",
43
+ "@radix-ui/react-tooltip": "^1.2.8",
44
+ "class-variance-authority": "^0.7.1",
45
+ "clsx": "^2.1.1",
46
+ "cmdk": "^1.1.1",
47
+ "lucide-react": "^0.563.0",
48
+ "motion": "^12.38.0",
49
+ "tailwind-merge": "^3.4.0"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "license": "Elastic-2.0",
55
+ "scripts": {
56
+ "build": "tsup",
57
+ "typecheck": "tsc --noEmit",
58
+ "lint": "biome check ."
59
+ }
60
+ }