import { Desktop, useDesktopSettings, useKeyboardShortcuts, useOverlayManager, useWindowManager } from '@hanzo/ui'
A full-viewport surface with an app window laid over it.
export function Default() {return (<Desktop height={320} background="linear-gradient(135deg, #1d4ed8, #7c3aed)"><YStack position="absolute" t={24} l={24} width={220} rounded="$3" bg="$background" borderWidth={1} borderColor="$borderColor" overflow="hidden" ><XStack px="$3" py="$2" bg="$color3" items="center"><SizableText size="$2" fontWeight="600">Finder</SizableText></XStack><YStack p="$3"><SizableText size="$2" color="$color11">Two windows, one dock, no document scroll.</SizableText></YStack></YStack></Desktop>)}
A plain color instead of a gradient, for a flatter wallpaper.
export function SolidBackground() {return (<Desktop height={200} background="#111318"><SizableText position="absolute" b={16} l={16} size="$2" color="white">macOS Sonoma</SizableText></Desktop>)}
The surface alone, left to inherit the page's own color.
export function NoBackground() {return (<Desktop height={160}><YStack width="100%" height="100%" items="center" justify="center"><SizableText size="$2" color="$color11">An empty desktop</SizableText></YStack></Desktop>)}
export type WindowId = string
export interface WindowState {[key: string]: boolean}
export interface WindowManager {windows: WindowStateactiveWindow: WindowId | nullopenWindows: WindowId[]openWindow: (id: WindowId) => voidcloseWindow: (id: WindowId) => voidtoggleWindow: (id: WindowId) => voidfocusWindow: (id: WindowId) => voidcloseAllWindows: () => voidisOpen: (id: WindowId) => boolean}
export type ColorScheme = 'dark' | 'light' | 'auto'
export type DockPosition = 'bottom' | 'left' | 'right'
export interface DesktopSettings {theme: stringcolorScheme: ColorSchemebackgroundImage?: stringbackgroundColor?: stringdockPosition: DockPositiondockSize: numberdockMagnification: booleandockAutoHide: booleanwindowTransparency: numberfontSize: 'small' | 'medium' | 'large'reducedMotion: boolean}
export interface DesktopSettingsActions {setTheme: (theme: string) => voidsetColorScheme: (scheme: ColorScheme) => voidsetBackgroundImage: (url?: string) => voidsetBackgroundColor: (color?: string) => voidsetDockPosition: (position: DockPosition) => voidsetDockSize: (size: number) => voidsetDockMagnification: (enabled: boolean) => voidsetDockAutoHide: (enabled: boolean) => voidsetWindowTransparency: (value: number) => voidsetFontSize: (size: 'small' | 'medium' | 'large') => voidsetReducedMotion: (enabled: boolean) => voidtoggleDarkMode: () => voidresetToDefaults: () => void}
export interface OverlayState {spotlight: booleancontextMenu: booleanmodal: booleandrawer: boolean[key: string]: boolean}
export interface OverlayManager {overlays: OverlayStateisOpen: (id: string) => booleanopen: (id: string) => voidclose: (id: string) => voidtoggle: (id: string) => voidcloseAll: () => void}
export interface KeyboardShortcut {key: stringmeta?: booleanctrl?: booleanalt?: booleanshift?: booleanaction: () => voiddescription?: stringpreventDefault?: boolean}
export interface DesktopProps extends React.ComponentProps<typeof Frame> {/** A CSS `background` value (a gradient, a color, an image) behind the content. */background?: stringchildren?: React.ReactNode}