{"_id":"@caoergou/windows-xp","_rev":"3-b0720783026bfa53e5ca7ded33b96fd3","name":"@caoergou/windows-xp","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@caoergou/windows-xp","version":"0.1.0","keywords":["windows-xp","react","nostalgia","retro","y2k","millennium","desktop-simulator","ui-recreation","xp-theme","vintage","component"],"author":{"name":"caoergou"},"license":"MIT","_id":"@caoergou/windows-xp@0.1.0","maintainers":[{"name":"caoergou","email":"itsericsmail@gmail.com"}],"homepage":"http://eric.run.place/windows-xp/","bugs":{"url":"https://github.com/caoergou/windows-xp/issues"},"dist":{"shasum":"e30101a17fbcef5e98a37d2a6f735c2ebb500795","tarball":"https://registry.npmjs.org/@caoergou/windows-xp/-/windows-xp-0.1.0.tgz","fileCount":9,"integrity":"sha512-Q4oevjxGZrebQ6pe1YOz2ak/0zLKPhszZn41KlWaun45PYlUdu4SeYbCJ/nP8dlIF6nZL10D4mt13plA6F5/uw==","signatures":[{"sig":"MEYCIQD8Opl7F2bjXK1ZPdWGS7+Lty9aJfhFDtKu7LOwuQVzcgIhANjkqxy5CAovueGv4XTTCSwVl7mw+xXEEZlsVJGDR5fY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4880514},"main":"dist/windows-xp.umd.js","types":"dist/index.d.ts","module":"dist/windows-xp.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"import":"./dist/windows-xp.es.js","require":"./dist/windows-xp.umd.js"},"./style.css":"./dist/style.css"},"gitHead":"dd34e5502b6bfae44867af5b6feb5a0ece53ae5e","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","build:lib":"vite build --config vite.config.lib.ts"},"_npmUser":{"name":"caoergou","email":"itsericsmail@gmail.com"},"repository":{"url":"git+https://github.com/caoergou/windows-xp.git","type":"git"},"_npmVersion":"10.8.2","description":"A faithful recreation of Windows XP desktop in React - Relive the millennium era with authentic Y2K aesthetics","directories":{},"_nodeVersion":"20.20.0","dependencies":{"xp.css":"^0.2.5","i18next":"^25.8.13","lucide-react":"^0.556.0","framer-motion":"^10.16.4","react-i18next":"^16.5.4","react-draggable":"^4.4.6","react-old-icons":"^1.0.2","react-resizable":"^3.0.5","styled-components":"^6.1.1","i18next-browser-languagedetector":"^8.2.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.21","happy":"^1.0.2","jsdom":"^27.3.0","react":"^18.2.0","vitest":"^1.6.1","react-dom":"^18.2.0","typescript":"^5.9.3","@types/react":"^19.2.14","@playwright/test":"^1.57.0","@types/react-dom":"^19.2.3","@vitejs/plugin-react":"^4.2.0","@testing-library/react":"^16.3.0","@types/styled-components":"^5.1.36","@testing-library/jest-dom":"^6.9.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/windows-xp_0.1.0_1772536459872_0.11523938020421332","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@caoergou/windows-xp","version":"0.2.0","keywords":["windows-xp","react","nostalgia","retro","y2k","millennium","desktop-simulator","ui-recreation","xp-theme","vintage","component"],"author":{"name":"caoergou"},"license":"MIT","_id":"@caoergou/windows-xp@0.2.0","maintainers":[{"name":"caoergou","email":"itsericsmail@gmail.com"}],"homepage":"http://eric.run.place/windows-xp/","bugs":{"url":"https://github.com/caoergou/windows-xp/issues"},"dist":{"shasum":"c20c2f2fa12add15fb4d81af6767d4dc7879dc3f","tarball":"https://registry.npmjs.org/@caoergou/windows-xp/-/windows-xp-0.2.0.tgz","fileCount":177,"integrity":"sha512-Cer3opOZpNoe8wFHoeLk1lnDXmTiULe9mZqKty3W5CH94DmUpv+oxMFywbJ6fB2dCRUpkSsfBJWgLQfvlc+1NA==","signatures":[{"sig":"MEYCIQCOjLCFy4ykPxNnYXIYAYFx1daDq+V7Tvxy5Wbi3UIY3gIhAJW+EsKsvBL8J16XEwEM7Ykpdmmaew5ieOzWzXtL4tT/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24771146},"main":"dist/index.cjs.js","types":"dist/index.d.ts","module":"dist/index.es.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./apps":{"types":"./dist/apps.d.ts","import":"./dist/apps.es.js","require":"./dist/apps.cjs.js"},"./hooks":{"types":"./dist/hooks.d.ts","import":"./dist/hooks.es.js","require":"./dist/hooks.cjs.js"},"./theme":{"types":"./dist/theme.d.ts","import":"./dist/theme.es.js","require":"./dist/theme.cjs.js"},"./registry":{"types":"./dist/registry.d.ts","import":"./dist/registry.es.js","require":"./dist/registry.cjs.js"},"./style.css":"./dist/style.css","./components":{"types":"./dist/components.d.ts","import":"./dist/components.es.js","require":"./dist/components.cjs.js"},"./package.json":"./package.json"},"gitHead":"92193032af3f77f2b08249ae6023ed95150bb1a5","scripts":{"dev":"vite","lint":"eslint . --ext ts,tsx --report-unused-disable-directives","test":"vitest","build":"vite build","format":"prettier --write \"src/**/*.{ts,tsx,css,json}\" \"e2e/**/*.{ts,tsx,css,json}\" \"test/**/*.{ts,tsx,css,json}\" \"*.{ts,tsx,cjs,mjs,js,json}\"","preview":"vite preview","lint:fix":"eslint . --ext ts,tsx --fix","test:e2e":"playwright test","build:lib":"rm -rf dist && vite build --config vite.config.lib.ts","typecheck":"tsc --noEmit","test:smoke":"vitest run test/basic.test.tsx test/lib-exports.test.tsx test/WindowsXPProps.test.tsx","test:e2e:ui":"playwright test --ui","format:check":"prettier --check \"src/**/*.{ts,tsx,css,json}\" \"e2e/**/*.{ts,tsx,css,json}\" \"test/**/*.{ts,tsx,css,json}\" \"*.{ts,tsx,cjs,mjs,js,json}\"","prepublishOnly":"npm run lint && npm run typecheck && npm run test -- --run && npm run build:lib","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"caoergou","email":"itsericsmail@gmail.com"},"overrides":{"@types/react":"$@types/react","@types/react-dom":"$@types/react-dom"},"repository":{"url":"git+https://github.com/caoergou/windows-xp.git","type":"git"},"_npmVersion":"10.8.2","description":"A faithful recreation of Windows XP desktop in React - Relive the millennium era with authentic Y2K aesthetics","directories":{},"sideEffects":["*.css","src/lib/index.tsx","src/i18n/index.ts"],"_nodeVersion":"20.20.2","dependencies":{"immer":"^11.1.11"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.21","happy":"^1.0.2","jsdom":"^27.3.0","react":"^18.2.0","eslint":"^8.0.0","vitest":"^1.6.1","xp.css":"^0.2.5","i18next":"^25.8.13","prettier":"^3.0.0","react-dom":"^18.2.0","typescript":"^5.9.3","@types/react":"^19.2.14","react-i18next":"^16.5.4","react-draggable":"^4.4.6","react-resizable":"^3.0.5","vite-plugin-dts":"^4.5.3","@playwright/test":"^1.57.0","@types/react-dom":"^19.2.3","styled-components":"^6.1.1","eslint-plugin-react":"^7.33.0","@vitejs/plugin-react":"^4.2.0","@testing-library/react":"^16.3.0","@types/styled-components":"^5.1.36","@testing-library/jest-dom":"^6.9.1","@typescript-eslint/parser":"^5.0.0","eslint-plugin-react-hooks":"^4.6.0","@typescript-eslint/eslint-plugin":"^5.0.0"},"peerDependencies":{"react":"^18.0.0","xp.css":"^0.2.0","i18next":"^25.0.0","react-dom":"^18.0.0","react-i18next":"^16.0.0","react-draggable":"^4.4.0","react-resizable":"^3.0.0","styled-components":"^5.0.0 || ^6.0.0"},"peerDependenciesMeta":{"xp.css":{"optional":true},"i18next":{"optional":false},"react-i18next":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/windows-xp_0.2.0_1783690847183_0.03383899668782786","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@caoergou/windows-xp","version":"0.4.0","description":"An embeddable, customizable, and scriptable Windows XP desktop engine for React","main":"dist/index.cjs.js","module":"dist/index.es.js","types":"dist/index.d.ts","sideEffects":["**/*.css"],"workspaces":["tools/scenario-tools"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.es.js","require":"./dist/index.cjs.js"},"./style.css":"./dist/style.css","./dist/style.css":"./dist/style.css","./components":{"types":"./dist/components.d.ts","import":"./dist/components.es.js","require":"./dist/components.cjs.js"},"./apps":{"types":"./dist/apps.d.ts","import":"./dist/apps.es.js","require":"./dist/apps.cjs.js"},"./hooks":{"types":"./dist/hooks.d.ts","import":"./dist/hooks.es.js","require":"./dist/hooks.cjs.js"},"./theme":{"types":"./dist/theme.d.ts","import":"./dist/theme.es.js","require":"./dist/theme.cjs.js"},"./registry":{"types":"./dist/registry.d.ts","import":"./dist/registry.es.js","require":"./dist/registry.cjs.js"},"./os":{"types":"./dist/os.d.ts","import":"./dist/os.es.js","require":"./dist/os.cjs.js"},"./content-pack-loader":{"types":"./dist/content-pack-loader.d.ts","import":"./dist/content-pack-loader.es.js","require":"./dist/content-pack-loader.cjs.js"},"./schema/scenario.json":"./schema/scenario.json","./schema/content-pack.json":"./schema/content-pack.json","./schema/xpspack-manifest.json":"./schema/xpspack-manifest.json","./package.json":"./package.json"},"scripts":{"prepare":"husky","dev":"vite","build":"vite build","build:lib":"rm -rf dist && vite build --config vite.config.lib.ts","preview":"vite preview","typecheck":"tsc --noEmit","typecheck:strict":"npm run typecheck && npm run guard:nocheck && npm run guard:purity","guard:purity":"node scripts/guard-purity.mjs","guard:nocheck":"node scripts/guard-nocheck.mjs","knip":"knip","knip:all":"knip --include files,dependencies,unlisted,unresolved,exports,types,duplicates","test":"vitest","test:smoke":"vitest run test/basic.test.tsx test/lib-exports.test.tsx test/WindowsXPProps.test.tsx","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","test:e2e:debug":"playwright test --debug","test:visual":"playwright test --config playwright.visual.config.ts","test:visual:update":"playwright test --config playwright.visual.config.ts --update-snapshots","lint":"eslint . --report-unused-disable-directives","lint:fix":"eslint . --fix","format":"prettier --write \"src/**/*.{ts,tsx,css,json}\" \"tools/**/*.{ts,tsx,css,json}\" \"examples/**/*.{ts,tsx,css,json,html,md}\" \"e2e/**/*.{ts,tsx,css,json}\" \"test/**/*.{ts,tsx,css,json}\" \"*.{ts,tsx,cjs,mjs,js,json}\"","format:check":"prettier --check \"src/**/*.{ts,tsx,css,json}\" \"tools/**/*.{ts,tsx,css,json}\" \"examples/**/*.{ts,tsx,css,json,html,md}\" \"e2e/**/*.{ts,tsx,css,json}\" \"test/**/*.{ts,tsx,css,json}\" \"*.{ts,tsx,cjs,mjs,js,json}\"","size:check":"node scripts/check-size.mjs","size:check:app":"node scripts/check-app-bundle.mjs","consumer:smoke":"node scripts/consumer-smoke.mjs","scenario:consumer-smoke":"node scripts/scenario-tools-consumer-smoke.mjs","release:preflight":"node scripts/release-preflight.mjs","docs:events":"node scripts/gen-events-doc.mjs","docs:events:check":"node scripts/gen-events-doc.mjs --check","schema:generate":"node scripts/gen-scenario-schema.mjs","schema:check":"node scripts/gen-scenario-schema.mjs --check","scenario:build":"npm run build --workspace @caoergou/xp-scenario-tools","scenario:lint":"npm run dev --workspace @caoergou/xp-scenario-tools -- lint ../../src/data/scenarios/prologueGraph.ts","scenario:solve":"npm run dev --workspace @caoergou/xp-scenario-tools -- solve ../../src/data/scenarios/prologueGraph.ts","scenario:pack":"npm run dev --workspace @caoergou/xp-scenario-tools -- pack ../../examples/reference-content-pack --check","scenario:solve:example":"npm run dev --workspace @caoergou/xp-scenario-tools -- solve ../../examples/midsummer-pack --expect album_open","scenario:solve:example:fuzz":"npm run dev --workspace @caoergou/xp-scenario-tools -- solve ../../examples/midsummer-pack --events ../../examples/midsummer-pack/seqbreak.events.json --expect album_open","scenario:pack:example":"npm run dev --workspace @caoergou/xp-scenario-tools -- pack ../../examples/midsummer-pack --check","patterns:check":"node scripts/check-patterns.mjs","scenario:ci":"npm run scenario:lint && npm run scenario:solve && npm run scenario:pack && npm run scenario:solve:example && npm run scenario:solve:example:fuzz && npm run scenario:pack:example && npm run patterns:check","prepublishOnly":"npm run lint && npm run typecheck && npm run guard:nocheck && npm run guard:purity && npm run test -- --run && npm run build:lib && npm run scenario:build && npm run size:check"},"lint-staged":{"*.{ts,tsx,css,json,cjs,mjs,js}":"prettier --write"},"keywords":["windows-xp","react","nostalgia","retro","y2k","millennium","desktop-simulator","ui-recreation","xp-theme","vintage","component","desktop-engine","embeddable","scriptable","content-pack","scenario-engine"],"author":{"name":"caoergou"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/caoergou/windows-xp.git"},"homepage":"https://eric.run.place/windows-xp/","bugs":{"url":"https://github.com/caoergou/windows-xp/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"@floating-ui/react":"^0.27.20","ajv":"^8.20.0","i18next":"^25.8.13","immer":"^11.1.11","react-draggable":"^4.4.6","react-i18next":"^16.5.4","react-markdown":"^9.1.0","react-resizable":"^3.0.5","remark-gfm":"^4.0.1"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","styled-components":"^6.0.0"},"overrides":{"@types/react":"$@types/react","@types/react-dom":"$@types/react-dom"},"devDependencies":{"@eslint/js":"^9.15.0","@laynezh/vite-plugin-lib-assets":"^2.1.3","@playwright/test":"^1.57.0","@testing-library/jest-dom":"^6.9.1","@testing-library/react":"^16.3.0","@types/react":"^18.3.0","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.2.0","eslint":"^9.15.0","eslint-plugin-react":"^7.37.2","eslint-plugin-react-hooks":"^5.0.0","fake-indexeddb":"^6.2.5","globals":"^15.12.0","husky":"^9.1.7","jiti":"^2.6.1","jsdom":"^27.3.0","knip":"^5.88.1","lint-staged":"^17.0.8","postcss-prefix-selector":"^2.1.1","prettier":"^3.0.0","react":"^18.2.0","react-dom":"^18.2.0","styled-components":"^6.1.1","typescript":"^5.9.3","typescript-eslint":"^8.15.0","vite":"^5.4.21","vite-plugin-dts":"^4.5.3","vitest":"^1.6.1","xp.css":"^0.2.5"},"_id":"@caoergou/windows-xp@0.4.0","_integrity":"sha512-bFdUdnP4oy+nPf/ha12ZUA7UHrXbpoUs7r8nPk/WKh58liyYhylejzDjSpIO5s7MiHaAJSgXG43cp8DHP3w2GA==","_resolved":"/home/runner/work/windows-xp/windows-xp/release-artifacts/caoergou-windows-xp-0.4.0.tgz","_from":"file:release-artifacts/caoergou-windows-xp-0.4.0.tgz","_nodeVersion":"22.22.0","_npmVersion":"11.11.1","dist":{"integrity":"sha512-bFdUdnP4oy+nPf/ha12ZUA7UHrXbpoUs7r8nPk/WKh58liyYhylejzDjSpIO5s7MiHaAJSgXG43cp8DHP3w2GA==","shasum":"74f6cb131bf7c99562703cf79380ddd1fa08fca7","tarball":"https://registry.npmjs.org/@caoergou/windows-xp/-/windows-xp-0.4.0.tgz","fileCount":982,"unpackedSize":8311958,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@caoergou%2fwindows-xp@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBCVDD11GFsqYl+8bhMIVx0meQjTegAXLbAsbCSXk9UkAiEA8JYFSKP8DAKZBoCCoJRQR6+Ts13oHBu/BpH3RVnou7E="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a2f314b1-8dc5-4798-98b6-aaecc5e4546e"}},"directories":{},"maintainers":[{"name":"caoergou","email":"itsericsmail@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/windows-xp_0.4.0_1785301853277_0.15229388747624628"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-03T11:14:19.790Z","modified":"2026-07-29T05:10:53.981Z","0.1.0":"2026-03-03T11:14:20.229Z","0.2.0":"2026-07-10T13:40:47.504Z","0.4.0":"2026-07-29T05:10:53.570Z"},"bugs":{"url":"https://github.com/caoergou/windows-xp/issues"},"author":{"name":"caoergou"},"license":"MIT","homepage":"https://eric.run.place/windows-xp/","keywords":["windows-xp","react","nostalgia","retro","y2k","millennium","desktop-simulator","ui-recreation","xp-theme","vintage","component","desktop-engine","embeddable","scriptable","content-pack","scenario-engine"],"repository":{"type":"git","url":"git+https://github.com/caoergou/windows-xp.git"},"description":"An embeddable, customizable, and scriptable Windows XP desktop engine for React","maintainers":[{"name":"caoergou","email":"itsericsmail@gmail.com"}],"readme":"# Windows XP 桌面引擎 🖥️\n\n<div align=\"center\">\n\n**可嵌入、可用代码驱动的 React 版 Windows XP 桌面——一个可以装入你自己的内容、监听用户操作事件、并用代码控制的怀旧世界。**\n\n[![npm version](https://img.shields.io/npm/v/@caoergou/windows-xp.svg)](https://www.npmjs.com/package/@caoergou/windows-xp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![React](https://img.shields.io/badge/React-18%20%7C%2019-blue.svg)](https://reactjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)\n\n[在线演示](https://eric.run.place/windows-xp/) · [English desktop](https://eric.run.place/windows-xp/demo/en/) · [中文桌面](https://eric.run.place/windows-xp/demo/zh/) · [文档站](https://eric.run.place/windows-xp/docs/) · [路线图](https://github.com/caoergou/windows-xp/issues/86) · [报告问题](https://github.com/caoergou/windows-xp/issues)\n\n> 在线演示是一个真实运行、可以拖动的桌面——无需登录（演示页自动登录）。上面两个桌面链接可直接进入英文 / 中文世界。\n\n[English](README.md) | 简体中文\n\n</div>\n\n---\n\n还记得 Luna 蓝的任务栏、开机音，和消磨在扫雷上的下午吗？这个项目把那个世界搬回浏览器——**但不是一个固定的演示页，而是一个属于你的 React 组件**：桌面上的每个文件都可以换成你的内容，你都能收到对应的事件通知，接下来发生什么由你的代码决定。\n\n> **免责声明：** 本项目是独立的爱好者复刻作品，仅供怀旧与学习交流之用，与微软公司及 Windows 操作系统无任何关联，亦未获其授权或认可。所有相关商标归各自所有者所有。\n\n## 快速开始\n\n在一个已有的 React 18/19 项目里（Vite、Next.js、Create React App 等）：\n\n```bash\nnpm install @caoergou/windows-xp react react-dom styled-components\n```\n\n```jsx\nimport { WindowsXP } from '@caoergou/windows-xp';\nimport '@caoergou/windows-xp/style.css';\n\nfunction App() {\n  // autoLogin 和 skipBoot 开发时直接跳到桌面；去掉它们可看到开机和登录。\n  return <WindowsXP autoLogin skipBoot language=\"zh\" />;\n}\n```\n\n`react`、`react-dom`、`styled-components` v6 是 peer dependencies；其余一切（包括 XP 主题 CSS）都已打包在内。\n\n## 为什么选这个？\n\n长得像 Windows XP 的项目很多，这一个是为了**在你的产品里使用**而设计的：\n\n- 🧩 **嵌入零副作用** —— 样式作用域经过处理，通常不会影响宿主页面的其他元素；`mode=\"embedded\"` 关闭可能干扰宿主页面的全局行为；`storagePrefix` 让每个实例的存储完全隔离，同页两个桌面互不干扰。\n- 📡 **每个操作都有事件** —— `onEvent` 为每个用户动作送出类型化事件：`file:open`、`app:launch`、`cmd:exec`、`session:login`、窗口生命周期……埋点分析、引导演示、解谜逻辑都可以通过这一个属性实现。\n- 🎮 **用代码驱动** —— 通过 React ref（`XPHandle`）可以打开应用和文件、读写文件系统、控制会话与壁纸，还能把整台机器快照成可分享的 JSON 存档：\n\n  ```jsx\n  import { useRef } from 'react';\n  import type { XPHandle } from '@caoergou/windows-xp';\n\n  const xp = useRef<XPHandle>(null);\n  xp.current?.openApp('Notepad');\n  // 路径是分段数组，例如 ['folder', 'file.txt']\n  xp.current?.fs.writeFile(['diary.txt'], 'hello');\n  ```\n\n- 📦 **内容完全由你定义** —— `customFileSystem` + `fileSystemMode=\"replace\"` 把整个桌面换成你的内容；壁纸、头像、自定义应用、整个文化包都以 props 注入。新增普通内容不需要写 React（只有自定义应用需要 `component`）。\n- 🧱 **同时是一套组件库** —— `XPButton`、`XPDialog`、`XPTabs`、`XPProgressBar` 等可零 Provider 独立使用：\n  ```jsx\n  import { XPButton } from '@caoergou/windows-xp/components';\n  ```\n  与 xp.css 逐值对齐，见[组件画廊](https://eric.run.place/windows-xp/gallery/)。\n- 🔍 **严格对照真实 XP** —— 每个视觉与行为细节都在 [FIDELITY.md](FIDELITY.md) 中对照真实 Windows XP SP3 逐项打分，design token 全部标注出处，CI 挂视觉回归基线。这里没有\"现代化改良\"的圆角。\n\n## 大家用它做什么\n\n| 场景                                                                                           | 用到的能力                                                                                                                                               |\n| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **个人主页 / 作品集** —— 项目变成桌面文件夹，About.txt 用记事本打开                            | `fileSystemMode=\"replace\"`、自定义应用、内置 Internet Explorer 可打开你部署的项目                                                                        |\n| **Markdown 博客** —— 文章作为 `.md` 文件在 Markdown 查看器中打开，永久链接，RSS/sitemap 做 SEO | `buildContentFs`/`postFromMarkdown`、深链接、`buildRssFeed`/`buildSitemap` —— 见[在桌面上搭建博客](https://eric.run.place/windows-xp/docs/zh/guide/blog) |\n| **解谜游戏 / ARG** —— 加密文件夹、聊天记录线索、会回应玩家的桌面                               | 文件的 `locked`/`password`/`broken` 属性、`onEvent`、[场景系统](https://eric.run.place/windows-xp/docs/zh/guide/scenarios)                               |\n| **品牌营销 / 创意页** —— 一个品牌化的千禧年世界（同类标杆：A24 电影《Y2K》官方桌面站）         | 嵌入模式、内容替换、壁纸/头像注入                                                                                                                        |\n| **怀旧内容站** —— 2000 年代中文互联网，或英文语境 Y2K，全部数据化                              | 文化包（`cultures` prop）                                                                                                                                |\n| **教学沙盒** —— 一台可以随便折腾、随时重置的演示机器                                           | `skipBoot`/`autoLogin`、React ref 句柄、隔离存储                                                                                                         |\n\n逐场景的完整设计推导见 [`docs/USE-CASES.md`](docs/USE-CASES.md)、[`docs/PUZZLE-DESIGN.md`](docs/PUZZLE-DESIGN.md) 与 [`docs/OS-PLATFORM-VISION.md`](docs/OS-PLATFORM-VISION.md)。\n\n## 配置速览\n\n```jsx\n// myFs、myWallpaper、myApp、xpRef 的定义见下方或文档。\n<WindowsXP\n  // 身份与流程\n  username=\"Admin\"\n  password=\"hunter2\"\n  autoLogin\n  skipBoot\n  // 内容\n  language=\"zh\"\n  customFileSystem={myFs}\n  fileSystemMode=\"replace\"\n  wallpapers={[myWallpaper]}\n  defaultWallpaper=\"my-wallpaper\"\n  avatar=\"/me.png\"\n  apps={[myApp]}\n  // 宿主集成\n  mode=\"embedded\"\n  storagePrefix=\"myapp_xp_\"\n  // 可观察性\n  ref={xpRef}\n  onEvent={e => console.log(e.type, e)}\n/>\n```\n\n一个可运行的完整版本：\n\n```jsx\nimport { useRef } from 'react';\nimport { WindowsXP } from '@caoergou/windows-xp';\nimport { defineApp } from '@caoergou/windows-xp/registry';\nimport '@caoergou/windows-xp/style.css';\nimport type { XPHandle } from '@caoergou/windows-xp';\n\nconst myFs = {\n  // 应用 ID 是注册表键名，保持英文，如 'Notepad'、'InternetExplorer'\n  '自述.txt': { type: 'file', name: '自述.txt', app: 'Notepad', content: '你好！' },\n  '我的项目': {\n    type: 'folder',\n    name: '我的项目',\n    children: {\n      '项目 A.txt': { type: 'file', name: '项目 A.txt', app: 'Notepad', content: '…' },\n    },\n  },\n};\n\nconst myWallpaper = { id: 'brand', name: 'Brand', src: '/brand-wallpaper.jpg' };\n\nconst myApp = defineApp({\n  id: 'Hello',\n  name: 'Hello',\n  component: () => <div style={{ padding: 16 }}>Hello from Windows XP!</div>,\n});\n\nexport default function App() {\n  const xpRef = useRef<XPHandle>(null);\n  return (\n    <WindowsXP\n      autoLogin\n      skipBoot\n      language=\"zh\"\n      customFileSystem={myFs}\n      fileSystemMode=\"replace\"\n      wallpapers={[myWallpaper]}\n      defaultWallpaper=\"brand\"\n      apps={[myApp]}\n      mode=\"embedded\"\n      storagePrefix=\"myapp_xp_\"\n      ref={xpRef}\n      onEvent={(e) => console.log(e.type, e)}\n    />\n  );\n}\n```\n\n顶层键会合并进桌面根目录——所以直接把文件和文件夹放在顶层即可（**不要**再套一层 `\"Desktop\"` 文件夹）。\n\n全部 props、事件目录、`XPHandle` 方法、文化包编写、子路径导入（`/components`、`/apps`、`/hooks`、`/theme`、`/registry`）见 **[文档站](https://eric.run.place/windows-xp/docs/)**。\n\n## 内置应用\n\n**完整应用：** 资源管理器（含键盘操作——F2/F5/Del、Backspace 上一级）、记事本（撤销/查找替换/自动换行/保存）、画图（可绘制并保存进虚拟文件系统）、Internet Explorer（历史/收藏/时代门户）、计算器、扫雷（XP 原版贴图、最短用时）、纸牌（完整规则与胜利判定）、命令提示符（真实命令集 + 彩蛋）、图片查看器、运行对话框、音量控制、帮助和支持、任务管理器。\n\n**中文怀旧应用（来自中文文化包）：** QQ 登录、360 安全卫士（带可玩的\"查杀木马\"剧情）、迅雷、酷狗音乐、暴风影音、WPS Office。\n\n**仅提供界面外壳：** Windows Media Player（可播放内置示例音频）、控制面板（显示/声音/鼠标面板）、网络连接。\n\n系统本身也在：开机画面 → 登录 → 桌面、开始菜单、任务栏与托盘、右键菜单、回收站、屏保、蓝屏（是的，可以触发——在命令提示符里输入 `format c:`）。\n\n## 项目方向\n\n路线图见 [issue #86](https://github.com/caoergou/windows-xp/issues/86)：近期——补齐引擎 API（事件、ref 控制、存档读档）并落地数据驱动的**场景/剧情脚本系统**，让解谜故事用 JSON 编写而不是 React 代码；长期——[OS 包](docs/OS-PLATFORM-VISION.md)：引擎不再只针对 XP 设计，未来 Win98、Win7、类似 macOS Aqua 风格乃至**用户自定义的虚构系统**都可作为主题包安装。\n\n## 贡献与文档\n\n| 文档                                                                | 内容                                           |\n| ------------------------------------------------------------------- | ---------------------------------------------- |\n| [文档站](https://eric.run.place/windows-xp/docs/)（`docs-site/`）   | 使用方 API：props、事件、ref、子路径、内容编写 |\n| [USAGE.md](USAGE.md)                                                | 指向文档站的薄跳转索引                         |\n| [FIDELITY.md](FIDELITY.md)                                          | XP 保真基线：逐行为打分 + design token 权威值  |\n| [AGENTS.md](AGENTS.md) / [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) | 贡献者原则与代码规则                           |\n| [CONTRIBUTING.md](CONTRIBUTING.md)                                  | 工作流、检查项、PR 要求                        |\n| [docs/](docs/)                                                      | 设计与分析：使用场景、解谜设计、平台远景       |\n\n## 技术栈与支持\n\nReact 18/19 · TypeScript 5 · styled-components 6 · xp.css（构建期做作用域处理）· react-draggable 与 react-resizable · i18next（使用独立实例）。浏览器：Chrome/Edge 90+、Firefox 88+、Safari 14+。\n\n## 许可与致谢\n\nMIT —— 见 [LICENSE](LICENSE)。站在 [xp.css](https://botoxparty.github.io/XP.css/) 的肩膀上，灵感来自 [winXP](https://github.com/ShizukuIchi/winXP)。\n\n**素材声明：** 系统图标（[XPIcons](https://github.com/iconicX/XPIcons)、[react-xp](https://github.com/zyishai/react-xp)）、官方 XP 壁纸、真实 `.cur` 光标、原版 XP 事件音效、xp.css 字体、扫雷贴图、参考 [PlymouthXP](https://github.com/nulln/PlymouthXP) 的开机动画时序——均**仅用于教育与怀旧目的**，归各自所有者所有，不在本项目 MIT 许可范围内。\n\n<div align=\"center\">\n用 ❤️ 和对千禧年代的怀念制作\n</div>\n","readmeFilename":"README.zh-CN.md"}