import { default as React } from 'react'; import { FileNode, AppRegistryEntry } from '../types'; import { CulturePackage } from '../data/culture'; import { DeepLinkRoutes } from '../utils/deepLink'; import { PersistenceMode } from '../utils/storage'; import { BootBranding, LoginBranding } from '../branding'; import { WallpaperItem } from '../data/wallpapers'; import { XPEventListener } from '../events'; import { XPHandle } from '../components/XPBridge'; import { OSTheme } from '../themes/contract'; import { OSPackage } from '../os/contract'; import { Scenario } from '../scenario/types'; import { ContentPack } from '../content/types'; import { Lesson } from '../lesson/types'; import { MarkdownOptions } from '../apps/MarkdownViewer/config'; import { ClockConfig } from '../context/ClockContext'; import { PowerSequence } from '../context/PowerTransitionContext'; import { XPProviders } from '../providers/types'; export interface WindowsXPProps { /** Default username for the login screen. */ username?: string; /** Default password for authentication. */ password?: string; /** * 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. */ language?: string; /** * 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. */ customFileSystem?: Record; /** * 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. */ fileSystemMode?: 'merge' | 'replace'; /** Login/user avatar: an XPIcon id (e.g. `'user'`) or an image URL (#77). */ avatar?: string; /** Extra wallpapers merged over the built-in list, for the picker + resolution (#77). */ wallpapers?: WallpaperItem[]; /** Initial wallpaper — a wallpaper id or a direct image URL — used until the user picks one (#77). */ defaultWallpaper?: string; /** Custom culture packages that extend or override the built-in en/zh cultures. */ cultures?: CulturePackage[]; /** Custom applications that extend or override the built-in APP_REGISTRY. */ apps?: AppRegistryEntry[]; /** Skip the boot animation on first load. */ skipBoot?: boolean; /** Automatically log the user in without showing the login screen. */ autoLogin?: boolean; /** Namespace prefix for localStorage / IndexedDB keys (default: `'xp_'`). */ storagePrefix?: string; /** * 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. */ persistence?: PersistenceMode; /** * 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. */ markdown?: MarkdownOptions; /** * 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. */ mode?: 'fullscreen' | 'embedded'; /** * 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`. */ viewportPolicy?: 'auto' | 'scale' | 'native' | 'warn'; /** Disable the global right-click context menu block. */ disableContextMenuBlock?: boolean; /** Disable blocking of F12 / Ctrl+Shift+I/J/C / Ctrl+U. */ disableDevToolsBlock?: boolean; /** Disable global shortcuts like Alt+F4, Alt+Tab and the BSOD easter egg. */ disableGlobalShortcuts?: boolean; /** * 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. */ keymap?: Record; /** Disable the idle screensaver. */ disableScreenSaver?: boolean; /** * Play the classic hourly chime when the 'time:hour' event fires. * Off by default; a culture package can also enable it via 'hourlyChime' (#130). */ hourlyChime?: boolean; /** Inactivity threshold in ms before `user:idle` fires (default 60000, #130). */ idleThresholdMs?: number; /** Instance-local virtual system clock; omitted means the real host clock (#275). */ clock?: ClockConfig; /** Optional authored power-off presentation (#279). */ powerSequence?: PowerSequence; /** * 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. */ openOnLoad?: string | string[]; /** * Pretty URL routes (`{ '/blog/:slug': ({ slug }) => ({ open: `D:/posts/${slug}.md` }) }`), * matched against `location` (#136). Host-router-agnostic — no router dependency. */ routes?: DeepLinkRoutes; /** The host's current location (path[+search]) used for `routes` matching (#136). */ location?: string; /** * 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. */ historyIntegration?: boolean; /** * 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. */ boot?: BootBranding; /** * 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. */ login?: LoginBranding; /** * 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`. */ scenario?: Scenario; /** * 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`. */ contentPacks?: ContentPack[]; /** * 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`. */ lessons?: Lesson[]; /** * 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`. */ devtools?: boolean; /** * 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. */ providers?: XPProviders; /** Subscribe to desktop events (app launches, file opens, session, cmd...). */ onEvent?: XPEventListener; /** * 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. */ theme?: OSTheme; /** * Complete operating-system package (#213). Defaults to `xpOS`; changing it * replaces the theme, chrome slots, behavior, conventions and app-role map. */ os?: OSPackage; } /** * WindowsXP Component * * A complete Windows XP desktop simulator component. * * @example * ```jsx * import { WindowsXP } from '@caoergou/windows-xp'; * import '@caoergou/windows-xp/style.css'; * * function App() { * return ; * } * ``` */ export declare const WindowsXP: React.ForwardRefExoticComponent>; export { AppProviders } from '../components/AppProviders'; export { AppRegistryProvider } from '../context/AppRegistryContext'; export { CultureProvider } from '../context/CultureContext'; export { defineCulture } from '../data/culture'; export { buildContentFs, buildRssFeed, buildSitemap, buildPostMirrorHtml, postPermalink, postPath, parseFrontmatter, postFromMarkdown, } from '../content/blog'; export { FileSystemProvider } from '../context/FileSystemContext'; export { WindowManagerProvider } from '../context/WindowManagerContext'; export { UserSessionProvider } from '../context/UserSessionContext'; export { ModalProvider } from '../context/ModalContext'; export { TrayProvider } from '../context/TrayContext'; export { SchedulerProvider } from '../context/SchedulerContext'; export { ClockProvider } from '../context/ClockContext'; export { useAppRegistry } from '../context/AppRegistryContext'; export { useCulture } from '../context/CultureContext'; export { useFileSystem } from '../context/FileSystemContext'; export { useWindowManager } from '../context/WindowManagerContext'; export { useUserSession } from '../context/UserSessionContext'; export { useModal } from '../context/ModalContext'; export { useTray } from '../context/TrayContext'; export { useScheduler } from '../context/SchedulerContext'; export { useClock } from '../context/ClockContext'; export { useRecentDocuments } from '../context/RecentDocumentsContext'; export { usePrintSpooler } from '../context/PrintSpoolerContext'; export { useApp } from '../hooks/useApp'; export { xpTheme } from '../themes/xp'; export { xpOS } from '../themes/xp/os'; export { paperOS, paperTheme } from '../themes/paper'; export { defineOS } from '../os/defineOS'; export { useOSPackage, useOptionalOSPackage, OSPackageProvider } from '../os/OSPackageContext'; export { appRoleRef, resolveAppRole } from '../os/appRoles'; export { useOSTheme } from '../themes/useOSTheme'; export { mountThemeCss } from '../themes/mountThemeCss'; export type { OSTheme } from '../themes/contract'; export type { OSPackage, BehaviorProfile, ChromeSlots, OSConventions, AppRole, AppRoleMap, AppMenu, AppMenuItem, } from '../os/contract'; export type { FileNode, BaseFileNode, FileProvenance, RootNode, FolderNode, DriveNode, FileContentNode, AppShortcutNode, FileProperties, SearchResult, WindowState, WindowProps, AppRegistryEntry, AppAssociation, AppLifecycle, UserSession, ClipboardItem, MenuItem, JsonValue, ExifData, } from '../types'; export type { CulturePackage, CulturalItem, DesktopShortcut, StickyNoteContent, StartMenuApp, StartMenuProfile, BrowserCultureProfile, StartupNotification, CultureKey, } from '../data/culture'; export type { WallpaperItem } from '../data/wallpapers'; export type { DeepLinkRoute, DeepLinkRoutes } from '../utils/deepLink'; export type { BlogPost, ContentManifest, SiteMeta, Frontmatter } from '../content/blog'; export type { XPProviders, ChatProvider, ChatContext, ChatTurn, ModerationProvider, ModerationResult, WebContentProvider, WebContentContext, GeneratedPage, ContextSelector, ProviderReplyConfig, WorldContextItem, } from '../providers/types'; export { ProviderProvider, useProviders } from '../providers/ProviderContext'; export { sanitizeHtml } from '../content/sanitizer'; export type { SanitizeTier, SanitizeOptions } from '../content/sanitizer'; export { createGeneratedPageCache, normalizeCacheUrl } from '../content/generatedPageCache'; export type { GeneratedPageCache, GeneratedPageCacheOptions } from '../content/generatedPageCache'; export type { ContentRef, ContentPack, SiteDef, PackStrings } from '../content/types'; export { isInlineRef, isUrlRef, isAssetRef, isContentRef } from '../content/types'; export { createContentResolver, memoryContentCache, storageContentCache, ContentResolveError, } from '../content/resolver'; export type { ContentResolver, ContentCache, ResolverOptions } from '../content/resolver'; export { normalizeSiteUrl, buildSiteRegistry, lookupSite, mergeContentPacks, mergeFsFragments, } from '../content/pack'; export type { MountedContent } from '../content/pack'; export { ContentPackProvider, useContentPacks } from '../context/ContentPackContext'; export type { ContentPackContextValue } from '../context/ContentPackContext'; export { referenceContentPack } from '../data/referencePack'; export type { MarkdownOptions } from '../apps/MarkdownViewer/config'; export type { FileSystemMode } from '../context/FileSystemContext'; export type { PersistenceMode } from '../utils/storage'; export type { RecycleBinItem } from '../utils/storage'; export type { RecentDocumentEntry } from '../context/RecentDocumentsContext'; export type { PrintJob, PrintJobStatus, PrinterDefinition, PrintSpoolerApi, } from '../context/PrintSpoolerContext'; export type { BootBranding, LoginBranding } from '../branding'; export type { ModalContextType } from '../context/ModalContext'; export type { TrayItem, TrayContextType, NotifyOptions } from '../context/TrayContext'; export type { ScheduleOptions, SchedulerApi } from '../context/SchedulerContext'; export type { ClockConfig, ClockMode, ClockCatchUp, ClockSnapshot, XPClockApi, } from '../context/ClockContext'; export { usePowerTransition, useOptionalPowerTransition } from '../context/PowerTransitionContext'; export type { PowerMode, PowerSequence, PowerSequenceItem, PowerTransitionApi, } from '../context/PowerTransitionContext'; export type { XPEvent, XPEventType, XPEventListener } from '../events'; export type { XPHandle, XPFsApi, XPSessionApi, XPAppearanceApi, XPWindowsApi, XPWindowInfo, } from '../components/XPBridge'; export { useXPEvents, useXPEventBus } from '../context/EventBusContext'; export { EventBusProvider } from '../context/EventBusContext'; export { XPEventBus, createXPEventBus } from '../events'; export type { Scenario, Trigger, Condition, Action, FlagValue, ScenarioNote, NoteColor, } from '../scenario/types'; export { resolveText, pickText, type ScenarioStrings } from '../scenario/strings'; export { prologueScenario } from '../data/scenarios/prologue'; export { defineScenario, ScenarioBuilder } from '../scenario/builder'; export * as scenarioHelpers from '../scenario/builder'; export { solveScenario, ranAction } from '../scenario/solver'; export type { SolveOptions, SolveResult, SolveFsNode } from '../scenario/solver'; export { validateScenario, assertValidScenario, ScenarioValidationError, SCENARIO_MAX_BYTES, } from '../scenario/validate'; export type { ScenarioValidation } from '../scenario/validate'; export { compilePuzzleGraph, lintPuzzleGraph, solvedFlag, ladder, ladderKeys, } from '../scenario/puzzleGraph'; export type { PuzzleGraph, PuzzleNode, PuzzleHint, GraphLintIssue, PuzzleGraphReport, } from '../scenario/puzzleGraph'; export { prologueGraph, prologueGraphScenario } from '../data/scenarios/prologueGraph'; export { buildTape, beatIndex, seekResult, fsTreeToSolveNodes } from '../scenario/rehearsal'; export type { RehearsalTape, SeekResult } from '../scenario/rehearsal'; export type { RehearsalPlan, RehearsalStep } from '../scenario/types'; export type { XPScenarioApi } from '../components/XPBridge'; export type { ScenarioDebugState, ScenarioTriggerState } from '../devtools/rehearsalChannel'; export { subscribeRehearsalState, getRehearsalController } from '../devtools/rehearsalChannel'; export type { RehearsalState, RehearsalBeat, RehearsalController, } from '../devtools/rehearsalChannel'; export { default as DevToolsPanel } from '../devtools/DevToolsPanel'; export { traceCondition, type ConditionTrace } from '../scenario/trace'; export { subscribeTrace, publishTrace, hasTraceListeners } from '../devtools/traceChannel'; export type { EvalReport, TriggerReport, FlagChange, SkipReason } from '../devtools/traceChannel'; export type { DeductionSheetProps } from '../apps/DeductionSheet'; export { demoDeduction } from '../data/scenarios/deductionDemo'; export type { EvidenceBoardProps, EvidenceItem } from '../apps/EvidenceBoard'; export { demoEvidence } from '../data/scenarios/evidenceDemo'; export type { EvidenceReportProps } from '../apps/EvidenceReport'; export { searchQQArchive } from '../apps/QQ/QQArchive'; export type { QQArchive, QQArchiveAttachment, QQArchiveConversation, QQArchiveMessage, } from '../data/qq/types'; export type { Confidence, ClaimResult, ReportClaim, ClaimSubmission, ReportSubmission, } from '../apps/EvidenceReport/logic'; export { judgeClaim, judgeReport } from '../apps/EvidenceReport/logic'; export type { WindowsMediaPlayerProps, MediaPlaylist, MediaTrack, MediaControlsPolicy, } from '../apps/WindowsMediaPlayer'; export type { SearchResultPage } from '../apps/InternetExplorer/types'; export { normalizeSearchTerm, searchCorpus, } from '../apps/InternetExplorer/components/SearchEnginePage'; export { renderEraPage } from '../content/eraPage'; export type { EraPage, EraPageLink, EraPageSection, EraPageTemplate } from '../content/eraPage'; export { demoSearchCorpus } from '../data/scenarios/searchDemo'; export type { Lesson, LessonStep, LessonHint, LessonMode, LessonScore, ExpectPattern, WrongActionPolicy, WatchAction, } from '../lesson/types'; export { defineLesson } from '../lesson/types'; export { lintLesson, isLessonValid, type LintIssue } from '../lesson/lint'; export { notepadBasicsLesson } from '../data/lessons/notepadBasics'; export type { XPSnapshot } from '../snapshot'; export { XP_SNAPSHOT_VERSION, XPSnapshotError, XPSnapshotVersionError, assertLoadableSnapshot, SNAPSHOT_MAX_BYTES, } from '../snapshot'; export { createScopedHandle, AgentDeniedError, AgentRateLimitError } from '../agent'; export type { ScopedXPHandle, ScopedHandleConfig, ScopedDescription, Capability, DeniedPolicy, } from '../agent'; export { expandCaps, DANGEROUS_CAPS, CAP_GROUPS } from '../agent'; export { useAppSettings, readAppSetting } from '../hooks/useAppSettings'; export type { SettingsDescriptor, SettingValue, AppSettingsApi } from '../hooks/useAppSettings'; export type { SetupWizardSpec, SetupWizardProduct, SetupWizardPageType, SetupWizardPage, SetupWizardInstalls, SetupWizardOption, } from '../apps/SetupWizard'; export type { InstalledProduct } from '../context/InstalledAppsContext'; export { useInstalledApps } from '../context/InstalledAppsContext';