Skip to content

@caoergou/windows-xp / index / WindowsXPProps

Interface: WindowsXPProps

Defined in: src/lib/index.tsx:23

Properties

apps?

> optional apps?: AppRegistryEntry<unknown>[]

Defined in: src/lib/index.tsx:57

Custom applications that extend or override the built-in APP_REGISTRY.


autoLogin?

> optional autoLogin?: boolean

Defined in: src/lib/index.tsx:61

Automatically log the user in without showing the login screen.


avatar?

> optional avatar?: string

Defined in: src/lib/index.tsx:49

Login/user avatar: an XPIcon id (e.g. 'user') or an image URL (#77).


boot?

> optional boot?: BootBranding

Defined in: src/lib/index.tsx:147

Boot-screen branding (#139): logo, text, progressColor, startupSound. Opt-in; defaults render pixel-faithful XP. Setting any field suppresses the Microsoft trademarks on the boot screen.


clock?

> optional clock?: ClockConfig

Defined in: src/lib/index.tsx:121

Instance-local virtual system clock; omitted means the real host clock (#275).


contentPacks?

> optional contentPacks?: ContentPack[]

Defined in: src/lib/index.tsx:170

Content packs (#241): the top-level unit of an official game's content repository. Each pack bundles authorized IE sites (a fake webpage the player can "visit"), a customFileSystem fragment, an asset manifest for portable file references, and per-culture string tables. Pack files merge into the filesystem (an explicit customFileSystem wins on collisions) and authorized sites become available to Internet Explorer. See docs/SCENARIO-PATTERNS.md.


cultures?

> optional cultures?: CulturePackage[]

Defined in: src/lib/index.tsx:55

Custom culture packages that extend or override the built-in en/zh cultures.


customFileSystem?

> optional customFileSystem?: Record<string, FileNode>

Defined in: src/lib/index.tsx:40

Custom file system structure combined with the defaults per fileSystemMode. Applied at mount; later changes to this prop are not re-read (the tree is owned by the persistence layer after load). Remount with a different storagePrefix for a fresh tree.


defaultWallpaper?

> optional defaultWallpaper?: string

Defined in: src/lib/index.tsx:53

Initial wallpaper — a wallpaper id or a direct image URL — used until the user picks one (#77).


devtools?

> optional devtools?: boolean

Defined in: src/lib/index.tsx:184

Mount the Scenario / event DevTools overlay (#209): a dev-time panel with the live event stream, current flags, and per-trigger hit/miss showing why a trigger did not fire (the when predicate tree annotated ✓/✗). Opt-in; leave off in production. See docs/SCENARIOS.md.


disableContextMenuBlock?

> optional disableContextMenuBlock?: boolean

Defined in: src/lib/index.tsx:100

Disable the global right-click context menu block.


disableDevToolsBlock?

> optional disableDevToolsBlock?: boolean

Defined in: src/lib/index.tsx:102

Disable blocking of F12 / Ctrl+Shift+I/J/C / Ctrl+U.


disableGlobalShortcuts?

> optional disableGlobalShortcuts?: boolean

Defined in: src/lib/index.tsx:104

Disable global shortcuts like Alt+F4, Alt+Tab and the BSOD easter egg.


disableScreenSaver?

> optional disableScreenSaver?: boolean

Defined in: src/lib/index.tsx:112

Disable the idle screensaver.


fileSystemMode?

> optional fileSystemMode?: "merge" | "replace"

Defined in: src/lib/index.tsx:47

How customFileSystem combines with the built-ins (#77). 'merge' (default) layers your content over the built-in desktop; 'replace' keeps only OS scaffolding (Recycle Bin + an empty My Computer) so your content is the whole desktop — no built-in QQ/360/IE shortcuts.


historyIntegration?

> optional historyIntegration?: boolean

Defined in: src/lib/index.tsx:141

Push/pop browser history as top-level windows open/close so Back closes the last-opened window on content sites (#136). Off by default — games/embeds skip it.


hourlyChime?

> optional hourlyChime?: boolean

Defined in: src/lib/index.tsx:117

Play the classic hourly chime when the 'time:hour' event fires. Off by default; a culture package can also enable it via 'hourlyChime' (#130).


idleThresholdMs?

> optional idleThresholdMs?: number

Defined in: src/lib/index.tsx:119

Inactivity threshold in ms before user:idle fires (default 60000, #130).


keymap?

> optional keymap?: Record<string, string | null>

Defined in: src/lib/index.tsx:110

Remap or disable individual shortcuts by id (#132): { 'window.close': 'Mod+Shift+W' } or { 'startMenu.toggle': null } to disable. Ids are listed in docs/KEYMAP.md. Lets an embedding host reclaim keys without forking.


language?

> optional language?: string

Defined in: src/lib/index.tsx:33

Initial language. 'en' and 'zh' ship built-in; any other code (e.g. 'ja') requires a matching culture package that provides i18n resources - missing keys fall back to English.


lessons?

> optional lessons?: Lesson[]

Defined in: src/lib/index.tsx:177

Guided lessons (#141): data-driven Watch/Try/Do tutorials. Register them here, then start one via the startLesson(id, mode) ref handle. Steps advance on real, event-verified actions; lesson:* events report progress. See docs/LESSONS.md.


location?

> optional location?: string

Defined in: src/lib/index.tsx:136

The host's current location (path[+search]) used for routes matching (#136).


login?

> optional login?: LoginBranding

Defined in: src/lib/index.tsx:153

Login-screen branding (#139): background, title, userTile, userName (the latter two extend avatar/username). Opt-in; setting any field suppresses the "Microsoft Windows XP" wordmark.


markdown?

> optional markdown?: MarkdownOptions

Defined in: src/lib/index.tsx:78

MarkdownViewer behaviour for .md content (#254). linkTarget chooses where document links open — 'ie' (the desktop's Internet Explorer) or 'external' (a real browser tab, the default). components / remarkPlugins are the plugin seam for extras the core doesn't bundle (e.g. a mermaid code renderer). See the "Build a blog on the desktop" guide.


mode?

> optional mode?: "fullscreen" | "embedded"

Defined in: src/lib/index.tsx:86

Integration mode. 'fullscreen' (default) keeps the classic kiosk behavior. 'embedded' makes the component a well-behaved guest inside a host application: the right-click block, devtools block, global shortcuts (Alt+F4 / Alt+Tab / BSOD) and the idle screensaver are all disabled by default. Individual disable* props still override these defaults.


onEvent?

> optional onEvent?: XPEventListener

Defined in: src/lib/index.tsx:193

Subscribe to desktop events (app launches, file opens, session, cmd...).


openOnLoad?

> optional openOnLoad?: string | string[]

Defined in: src/lib/index.tsx:129

Deep link (#136): key path(s) - the '?open=' value(s), e.g. '我的文档/readme.txt' - to open once the desktop is interactive (after 'skipBoot'/'autoLogin'). Invalid paths fail silently to the plain desktop.


os?

> optional os?: OSPackage

Defined in: src/lib/index.tsx:207

Complete operating-system package (#213). Defaults to xpOS; changing it replaces the theme, chrome slots, behavior, conventions and app-role map.


password?

> optional password?: string

Defined in: src/lib/index.tsx:27

Default password for authentication.


persistence?

> optional persistence?: PersistenceMode

Defined in: src/lib/index.tsx:70

Persistence backend (#138). 'local' (default) survives across visits (localStorage + IndexedDB); 'session' is per-tab (sessionStorage, content lost on tab close); 'none' is pure in-memory — every mount starts pristine (campaign pages, blogs, teaching sandboxes) and no IndexedDB is opened.


powerSequence?

> optional powerSequence?: PowerSequence

Defined in: src/lib/index.tsx:123

Optional authored power-off presentation (#279).


providers?

> optional providers?: XPProviders

Defined in: src/lib/index.tsx:191

Host-supplied backend providers (#148/#149). Wire a BFF's chat endpoint, a moderation check, or a web-page generator without shipping any network code or API keys in the engine bundle. Every field is optional — the engine works identically without any provider.


routes?

> optional routes?: DeepLinkRoutes

Defined in: src/lib/index.tsx:134

Pretty URL routes ({ '/blog/:slug': ({ slug }) => ({ open: D:/posts/${slug}.md }) }), matched against location (#136). Host-router-agnostic — no router dependency.


scenario?

> optional scenario?: Scenario

Defined in: src/lib/index.tsx:160

Declarative scenario/story script (#84): flags, triggers, and gated actions authored as plain JSON. The runtime subscribes to the event stream and drives gating (doors & keys), pushes (QQ/tray/file events), and progress — no React. See docs/SCENARIOS.md.


skipBoot?

> optional skipBoot?: boolean

Defined in: src/lib/index.tsx:59

Skip the boot animation on first load.


storagePrefix?

> optional storagePrefix?: string

Defined in: src/lib/index.tsx:63

Namespace prefix for localStorage / IndexedDB keys (default: 'xp_').


theme?

> optional theme?: OSTheme

Defined in: src/lib/index.tsx:202

OS look-and-feel package (#213 B1). Defaults to the built-in Windows XP (Luna) theme (xpTheme, exported from @caoergou/windows-xp/theme). The theme is injected through a styled-components ThemeProvider — read it with useOSTheme() — and provides the sound scheme registered at startup. This is the runtime seam a future non-XP package plugs into; XP stays the default so existing usage is unchanged.


username?

> optional username?: string

Defined in: src/lib/index.tsx:25

Default username for the login screen.


viewportPolicy?

> optional viewportPolicy?: "auto" | "scale" | "native" | "warn"

Defined in: src/lib/index.tsx:98

Small-screen / portrait strategy (#215). Defaults to 'auto' in 'fullscreen' mode and 'native' in 'embedded' mode (the host controls an embedded desktop's size, so it isn't auto-scaled). 'auto' keeps the pixel-identical native layout on any container at least a 1024×768 baseline wide, and scale-to-fits the whole desktop (letterboxed) when it's narrower — so a phone gets a real, drivable desktop instead of just a warning. 'scale' always fits the baseline to the container; 'native' never scales (the pre-#215 fixed layout); 'warn' never scales and shows the mobile hint. See docs/VIEWPORT.md.


wallpapers?

> optional wallpapers?: WallpaperItem[]

Defined in: src/lib/index.tsx:51

Extra wallpapers merged over the built-in list, for the picker + resolution (#77).