import { FoundryPage } from "../types/index.js"; /** * Aggressively removes properties known to trigger deprecation warnings on * access, before returning document data out of a page.evaluate. Shared * between BaseGameAdapter (in-browser, via page.evaluate) and FoundryState * (both in-browser and, for createEmbeddedDocuments, applied Node-side to * already-serialized data) - defined here rather than in state.ts to avoid * a state.ts -> setup/index.ts -> setup/base.ts -> state.ts import cycle. */ export declare const DOCUMENT_SANITIZER_SCRIPT = "(obj) => {\n if (!obj || typeof obj !== 'object') return obj;\n const deprecatedDnD5e = ['darkvision', 'blindsight', 'tremorsense', 'truesight', 'special'];\n const cleanSenses = (o) => {\n if (!o || typeof o !== 'object') return o;\n const result = Array.isArray(o) ? [] : {};\n for (let key in o) {\n if (key === 'senses') {\n const senses = o[key];\n const cleanS = Array.isArray(senses) ? [] : {};\n for (let skey in senses) {\n if (deprecatedDnD5e.includes(skey)) continue;\n cleanS[skey] = senses[skey];\n }\n result[key] = cleanS;\n } else {\n result[key] = cleanSenses(o[key]);\n }\n }\n return result;\n };\n return cleanSenses(obj);\n}"; /** * Interface for version-specific Foundry VTT setup logic. */ export interface SetupAdapter { /** The major Foundry VTT version this adapter is for (e.g., 13, 14). */ version: number; /** * Switches between tabs on the setup screen. * @param page The Foundry VTT Page object. * @param tabName The logical name of the tab (e.g., "Worlds", "Systems"). */ switchTab(page: FoundryPage, tabName: string): Promise; /** * Handles the End User License Agreement screen if it appears. * @param page The Foundry VTT Page object. */ handleEULA(page: FoundryPage): Promise; /** * Handles the License Key Activation screen if it appears. * @param page The Foundry VTT Page object. * @param licenseKey The license key to activate (optional). */ handleLicenseActivation(page: FoundryPage, licenseKey?: string): Promise; /** * Installs a game system from the manifest list. * @param page The Foundry VTT Page object. * @param systemId The ID of the system to install. * @param systemLabel The human-readable label of the system. */ installSystem(page: FoundryPage, systemId: string, systemLabel: string): Promise; /** * Installs one or more add-on modules from the manifest list. * @param page The Foundry VTT Page object. * @param moduleIds The ID(s) of the module(s) to install. */ installModules(page: FoundryPage, moduleIds: string[]): Promise; /** * Installs a game system from a direct manifest URL. * @param page The Foundry VTT Page object. * @param manifestUrl The URL to the system.json manifest. */ installSystemFromManifest(page: FoundryPage, manifestUrl: string): Promise; /** * Installs a module from a direct manifest URL. * @param page The Foundry VTT Page object. * @param manifestUrl The URL to the module.json manifest. */ installModuleFromManifest(page: FoundryPage, manifestUrl: string): Promise; /** * Opens the system installation dialog. * @param page The Foundry VTT Page object. */ openSystemInstallDialog(page: FoundryPage): Promise; /** * Opens the module installation dialog. * @param page The Foundry VTT Page object. */ openModuleInstallDialog(page: FoundryPage): Promise; /** * Creates a new game world. * @param page The Foundry VTT Page object. * @param worldId The ID for the new world. * @param systemLabel The human-readable label of the system to use. * @param systemId The unique ID of the game system to use. */ createWorld(page: FoundryPage, worldId: string, systemLabel: string, systemId: string): Promise; /** * Deletes a game world if it exists. * @param page The Foundry VTT Page object. * @param worldId The ID of the world to delete. */ deleteWorldIfExists(page: FoundryPage, worldId: string): Promise; /** * Launches an existing world from the Setup screen. * @param page The Foundry VTT Page object. * @param worldId The ID of the world to launch. */ launchWorld(page: FoundryPage, worldId: string): Promise; /** * Creates a named backup of a world. V14+ only. * @param page The Foundry VTT Page object. * @param worldId The ID of the world to back up. * @param backupName A label to identify this backup. */ createWorldBackup(page: FoundryPage, worldId: string, backupName: string): Promise; /** * Restores a world from a named backup. V14+ only. * The world data is overwritten; call launchWorld afterwards. * @param page The Foundry VTT Page object. * @param worldId The ID of the world to restore. * @param backupName The label of the backup to restore. */ restoreWorldBackup(page: FoundryPage, worldId: string, backupName: string): Promise; /** * Returns the labels of all backups for a given world. V14+ only. * @param page The Foundry VTT Page object. * @param worldId The ID of the world. */ listWorldBackups(page: FoundryPage, worldId: string): Promise; /** * Deletes a named backup for a world. V14+ only. * @param page The Foundry VTT Page object. * @param worldId The ID of the world. * @param backupName The label of the backup to delete. */ deleteWorldBackup(page: FoundryPage, worldId: string, backupName: string): Promise; /** * Fills in and submits the join-screen login form. * @param page The Foundry VTT Page object. * @param userName The display name of the user to log in as. * @param password The user's password, if one is set. */ login(page: FoundryPage, userName: string, password?: string): Promise; } /** * Fills in and submits the join-screen login form's `