@league-of-foundry-developers/foundry-vtt-types 0.8.9-9 → 9.245.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -27
- package/index.d.ts +2 -2
- package/package.json +34 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
- package/src/foundry/common/config.mjs/index.d.ts +1 -0
- package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
- package/src/foundry/common/constants.mjs.d.ts +403 -213
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
- package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
- package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
- package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
- package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
- package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
- package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
- package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
- package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
- package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
- package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
- package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
- package/src/foundry/common/data/data.mjs/userData.d.ts +118 -33
- package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
- package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
- package/src/foundry/common/data/fields.mjs.d.ts +180 -83
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
- package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
- package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
- package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +9 -2
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
- package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
- package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
- package/src/foundry/common/documents.mjs/index.d.ts +3 -0
- package/src/foundry/common/module.mjs.d.ts +3 -0
- package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
- package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
- package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
- package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
- package/src/foundry/common/types.mjs.d.ts +95 -0
- package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +64 -39
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +106 -16
- package/src/foundry/foundry.js/application.d.ts +138 -110
- package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
- package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
- package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/filePicker.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplication.d.ts +46 -15
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +7 -10
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +11 -12
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +9 -9
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
- package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
- package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
- package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
- package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
- package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
- package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +5 -8
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +8 -7
- package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +4 -4
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -3
- package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/canvas.d.ts +153 -46
- package/src/foundry/foundry.js/canvasAnimation.d.ts +31 -8
- package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +47 -92
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +11 -11
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +134 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +370 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -48
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +15 -18
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -11
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +2 -0
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
- package/src/foundry/foundry.js/clientKeybindings.d.ts +309 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +12 -10
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
- package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
- package/src/foundry/foundry.js/config.d.ts +487 -907
- package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
- package/src/foundry/foundry.js/game.d.ts +171 -50
- package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
- package/src/foundry/foundry.js/hooks.d.ts +210 -84
- package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
- package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
- package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
- package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
- package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/points/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +92 -0
- package/src/foundry/foundry.js/pixi/polygons/index.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +98 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +396 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +11 -37
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShader.d.ts +114 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveBackgroundShader.d.ts +57 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShader.d.ts +47 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/bewitchingWaveColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/chromaColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/emanationColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/energyFieldColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fairyLightColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fogColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/ghostLightColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/hexaDomeColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/index.d.ts +5 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/lightDomeColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/pulseColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/radialRainbowColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/sunburstColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/swirlingRainbowColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/torchColorationShader.d.ts +3 -2
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/vortexColorationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/waveColorationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShader.d.ts +63 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/bewitchingWaveIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/blackHoleIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/fairyLightIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/ghostLightIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/pulseIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/roilingIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/sunburstIlluminationShader.d.ts +1 -2
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/torchIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/vortexIlluminationShader.d.ts +6 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/waveIlluminationShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/index.d.ts +5 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/baseSamplerShader.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/index.d.ts +3 -4
- package/src/foundry/foundry.js/pixi/texts/preciseText.d.ts +10 -2
- package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
- package/src/foundry/foundry.js/pointSource.d.ts +59 -328
- package/src/foundry/foundry.js/pointSources/index.d.ts +3 -0
- package/src/foundry/foundry.js/pointSources/lightSource.d.ts +417 -0
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +46 -0
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +125 -0
- package/src/foundry/foundry.js/polygonEdge.d.ts +26 -0
- package/src/foundry/foundry.js/polygonVertex.d.ts +89 -0
- package/src/foundry/foundry.js/quadtree.d.ts +2 -2
- package/src/foundry/foundry.js/quadtreeCulling.d.ts +11 -0
- package/src/foundry/foundry.js/ray.d.ts +156 -162
- package/src/foundry/foundry.js/rays/index.d.ts +1 -0
- package/src/foundry/foundry.js/rays/sightRay.d.ts +34 -0
- package/src/foundry/foundry.js/roll.d.ts +51 -65
- package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
- package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
- package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
- package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
- package/src/foundry/foundry.js/screenCulling.d.ts +19 -0
- package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
- package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
- package/src/foundry/foundry.js/textEditor.d.ts +1 -1
- package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
- package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
- package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
- package/src/foundry/index.d.ts +29 -26
- package/src/types/utils.d.ts +11 -3
- package/src/foundry/foundry.js/pixi/polygons/sourcePolygon.d.ts +0 -25
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShader.d.ts +0 -21
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/chromaColorationShader.d.ts +0 -18
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/emanationColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/energyFieldColorationShader.d.ts +0 -18
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/fogColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/hexaDomeColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/lightDomeColorationShader.d.ts +0 -17
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardIlluminationShader.d.ts +0 -22
@@ -13,7 +13,7 @@ import { BaseScene } from '../common/documents.mjs';
|
|
13
13
|
* @example <caption>Example Canvas commands</caption>
|
14
14
|
* ```typescript
|
15
15
|
* canvas.ready; // Is the canvas ready for use?
|
16
|
-
* canvas.scene; // The currently viewed Scene
|
16
|
+
* canvas.scene; // The currently viewed Scene document.
|
17
17
|
* canvas.dimensions; // The dimensions of the current Scene.
|
18
18
|
* canvas.draw(); // Completely re-draw the game canvas (this is usually unnecessary).
|
19
19
|
* canvas.pan(x, y, zoom); // Pan the canvas to new coordinates and scale.
|
@@ -72,6 +72,11 @@ declare global {
|
|
72
72
|
*/
|
73
73
|
initialized: boolean;
|
74
74
|
|
75
|
+
/**
|
76
|
+
* A promise that resolves when the canvas is first initialized and ready.
|
77
|
+
*/
|
78
|
+
initializing: Promise<void> | null;
|
79
|
+
|
75
80
|
/**
|
76
81
|
* Track the timestamp of the last stage zoom operation
|
77
82
|
* @defaultValue `0`
|
@@ -107,16 +112,44 @@ declare global {
|
|
107
112
|
*/
|
108
113
|
blurFilters: PIXI.filters.BlurFilter[];
|
109
114
|
|
115
|
+
/**
|
116
|
+
* A reference to the MouseInteractionManager that is currently controlling pointer-based interaction, or null.
|
117
|
+
*/
|
118
|
+
currentMouseManager: MouseInteractionManager<PIXI.Container> | null;
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Record framerate performance data
|
122
|
+
*/
|
123
|
+
fps: {
|
124
|
+
/** @defaultValue `[]` */
|
125
|
+
values: number[];
|
126
|
+
|
127
|
+
/** @defaultValue `0` */
|
128
|
+
last: number;
|
129
|
+
|
130
|
+
/** @defaultValue `0` */
|
131
|
+
average: number;
|
132
|
+
|
133
|
+
/** @defaultValue `0` */
|
134
|
+
render: number;
|
135
|
+
|
136
|
+
/** @defaultValue `document.getElementById("fps")` */
|
137
|
+
element: HTMLElement;
|
138
|
+
|
139
|
+
/** @defaultValue `undefined` */
|
140
|
+
fn: TickerCallback<void> | undefined;
|
141
|
+
};
|
142
|
+
|
110
143
|
/**
|
111
144
|
* The singleton interaction manager instance which handles mouse interaction on the Canvas.
|
112
145
|
*/
|
113
146
|
mouseInteractionManager: MouseInteractionManager<PIXI.Container> | undefined;
|
114
147
|
|
115
148
|
/**
|
116
|
-
*
|
117
|
-
* @defaultValue `
|
149
|
+
* The renderer screen dimensions.
|
150
|
+
* @defaultValue `[0, 0]`
|
118
151
|
*/
|
119
|
-
|
152
|
+
screenDimensions: [x: number, y: number];
|
120
153
|
|
121
154
|
/**
|
122
155
|
* Initialize the Canvas by creating the HTML element and PIXI application.
|
@@ -125,39 +158,53 @@ declare global {
|
|
125
158
|
*/
|
126
159
|
initialize(): void;
|
127
160
|
|
128
|
-
app
|
161
|
+
app?: PIXI.Application;
|
162
|
+
|
163
|
+
stage?: PIXI.Container;
|
129
164
|
|
130
|
-
|
165
|
+
protected _dragDrop?: DragDrop;
|
131
166
|
|
132
|
-
|
167
|
+
outline?: PIXI.Graphics;
|
133
168
|
|
134
|
-
|
169
|
+
msk?: PIXI.Graphics;
|
135
170
|
|
136
|
-
|
171
|
+
readonly primary?: PrimaryCanvasGroup;
|
137
172
|
|
138
|
-
|
173
|
+
readonly effects?: EffectsCanvasGroup;
|
139
174
|
|
140
|
-
|
175
|
+
readonly interface?: InterfaceCanvasGroup;
|
141
176
|
|
142
|
-
|
177
|
+
readonly background?: BackgroundLayer;
|
143
178
|
|
144
|
-
|
179
|
+
readonly drawings?: DrawingsLayer;
|
145
180
|
|
146
|
-
|
181
|
+
readonly grid?: GridLayer;
|
147
182
|
|
148
|
-
|
183
|
+
readonly walls?: WallsLayer;
|
149
184
|
|
150
|
-
|
185
|
+
readonly templates?: TemplateLayer;
|
151
186
|
|
152
|
-
|
187
|
+
readonly notes?: NotesLayer;
|
153
188
|
|
154
|
-
|
189
|
+
readonly tokens?: TokenLayer;
|
155
190
|
|
156
|
-
|
191
|
+
readonly foreground?: ForegroundLayer;
|
157
192
|
|
158
|
-
|
193
|
+
readonly sounds?: SoundsLayer;
|
159
194
|
|
160
|
-
|
195
|
+
readonly lighting?: LightingLayer;
|
196
|
+
|
197
|
+
readonly sight?: SightLayer;
|
198
|
+
|
199
|
+
readonly weather?: WeatherLayer;
|
200
|
+
|
201
|
+
readonly controls?: ControlsLayer;
|
202
|
+
|
203
|
+
/**
|
204
|
+
* Display warnings for known performance issues which may occur due to the user's hardware or browser configuration
|
205
|
+
* @internal
|
206
|
+
*/
|
207
|
+
protected _displayPerformanceWarnings(): void;
|
161
208
|
|
162
209
|
/**
|
163
210
|
* The id of the currently displayed Scene.
|
@@ -180,10 +227,10 @@ declare global {
|
|
180
227
|
get activeLayer(): CanvasLayer | null;
|
181
228
|
|
182
229
|
/**
|
183
|
-
*
|
184
|
-
* @
|
230
|
+
* Initialize the group containers of the game Canvas.
|
231
|
+
* @internal
|
185
232
|
*/
|
186
|
-
protected
|
233
|
+
protected _createGroups(): void;
|
187
234
|
|
188
235
|
/**
|
189
236
|
* When re-drawing the canvas, first tear down or discontinue some existing processes
|
@@ -197,6 +244,15 @@ declare global {
|
|
197
244
|
*/
|
198
245
|
draw(scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>>): Promise<this>;
|
199
246
|
|
247
|
+
performance?: PerformanceSettings;
|
248
|
+
|
249
|
+
/**
|
250
|
+
* Get the value of a GL parameter
|
251
|
+
* @param parameter - The GL parameter to retrieve
|
252
|
+
* @returns The returned value type depends of the parameter to retrieve
|
253
|
+
*/
|
254
|
+
getGLParameter(parameter: string): unknown;
|
255
|
+
|
200
256
|
/**
|
201
257
|
* Get the canvas active dimensions based on the size of the scene's map.
|
202
258
|
* We expand the image size by a factor of 1.5 and round to the nearest 2x grid size.
|
@@ -206,6 +262,12 @@ declare global {
|
|
206
262
|
*/
|
207
263
|
static getDimensions(data: Canvas.DimensionsData): Canvas.Dimensions;
|
208
264
|
|
265
|
+
/**
|
266
|
+
* Configure performance settings for hte canvas application based on the selected performance mode
|
267
|
+
* @internal
|
268
|
+
*/
|
269
|
+
protected _configurePerformanceMode(): PerformanceSettings;
|
270
|
+
|
209
271
|
/**
|
210
272
|
* Once the canvas is drawn, initialize control, visibility, and audio states
|
211
273
|
*/
|
@@ -229,25 +291,6 @@ declare global {
|
|
229
291
|
*/
|
230
292
|
protected _initializeTokenControl(): void;
|
231
293
|
|
232
|
-
/**
|
233
|
-
* Get a reference to the a specific CanvasLayer by it's name
|
234
|
-
* @param layerName - The name of the canvas layer to get
|
235
|
-
*/
|
236
|
-
getLayer(layerName: 'BackgroundLayer'): BackgroundLayer | null;
|
237
|
-
getLayer(layerName: 'DrawingsLayer'): DrawingsLayer | null;
|
238
|
-
getLayer(layerName: 'GridLayer'): GridLayer | null;
|
239
|
-
getLayer(layerName: 'WallsLayer'): WallsLayer | null;
|
240
|
-
getLayer(layerName: 'TemplateLayer'): TemplateLayer | null;
|
241
|
-
getLayer(layerName: 'NotesLayer'): NotesLayer | null;
|
242
|
-
getLayer(layerName: 'TokenLayer'): TokenLayer | null;
|
243
|
-
getLayer(layerName: 'ForegroundLayer'): ForegroundLayer | null;
|
244
|
-
getLayer(layerName: 'SoundsLayer'): SoundsLayer | null;
|
245
|
-
getLayer(layerName: 'LightingLayer'): LightingLayer | null;
|
246
|
-
getLayer(layerName: 'SightLayer'): SightLayer | null;
|
247
|
-
getLayer(layerName: 'EffectsLayer'): EffectsLayer | null;
|
248
|
-
getLayer(layerName: 'ControlsLayer'): ControlsLayer | null;
|
249
|
-
getLayer(layerName: string): CanvasLayer | null;
|
250
|
-
|
251
294
|
/**
|
252
295
|
* Given an embedded object name, get the canvas layer for that object
|
253
296
|
*/
|
@@ -261,6 +304,22 @@ declare global {
|
|
261
304
|
*/
|
262
305
|
activateLayer(layerName: LayerName): void;
|
263
306
|
|
307
|
+
/**
|
308
|
+
* Activate framerate tracking by adding an HTML element to the display and refreshing it every frame.
|
309
|
+
*/
|
310
|
+
activateFPSMeter(): void;
|
311
|
+
|
312
|
+
/**
|
313
|
+
* Deactivate framerate tracking by canceling ticker updates and removing the HTML element.
|
314
|
+
*/
|
315
|
+
deactivateFPSMeter(): void;
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Measure average framerate per second over the past 30 frames
|
319
|
+
* @internal
|
320
|
+
*/
|
321
|
+
protected _measureFPS(): void;
|
322
|
+
|
264
323
|
/**
|
265
324
|
* Pan the canvas to a certain \{x,y\} coordinate and a certain zoom level
|
266
325
|
* @param options - (default: `{}`)
|
@@ -285,6 +344,11 @@ declare global {
|
|
285
344
|
*/
|
286
345
|
recenter(coordinates?: PanView): ReturnType<this['animatePan']>;
|
287
346
|
|
347
|
+
/**
|
348
|
+
* Highlight objects on any layers which are visible
|
349
|
+
*/
|
350
|
+
highlightObjects(active: boolean): void;
|
351
|
+
|
288
352
|
/**
|
289
353
|
* Get the constrained zoom scale parameter which is allowed by the maxZoom parameter
|
290
354
|
* @param x - The requested x-coordinate
|
@@ -305,6 +369,12 @@ declare global {
|
|
305
369
|
*/
|
306
370
|
protected updateBlur(scale?: number): void;
|
307
371
|
|
372
|
+
/**
|
373
|
+
* Sets the background color.
|
374
|
+
* @param color - The color to set the canvas background to.
|
375
|
+
*/
|
376
|
+
setBackgroundColor(color: string): void;
|
377
|
+
|
308
378
|
/**
|
309
379
|
* Attach event listeners to the game canvas to handle click and interaction events
|
310
380
|
*/
|
@@ -420,9 +490,25 @@ declare global {
|
|
420
490
|
triggerPendingOperations(): void;
|
421
491
|
|
422
492
|
/**
|
423
|
-
*
|
424
|
-
|
425
|
-
|
493
|
+
* Get a reference to the a specific CanvasLayer by it's name
|
494
|
+
* @param layerName - The name of the canvas layer to get
|
495
|
+
* (unused)
|
496
|
+
* @deprecated since v9, will be deleted in v10
|
497
|
+
*/
|
498
|
+
getLayer(layerName: any): {
|
499
|
+
BackgroundLayer: Canvas['background'];
|
500
|
+
DrawingsLayer: Canvas['drawings'];
|
501
|
+
GridLayer: Canvas['grid'];
|
502
|
+
TemplateLayer: Canvas['templates'];
|
503
|
+
TokenLayer: Canvas['tokens'];
|
504
|
+
WallsLayer: Canvas['walls'];
|
505
|
+
LightingLayer: Canvas['lighting'];
|
506
|
+
WeatherLayer: Canvas['weather'];
|
507
|
+
SightLayer: Canvas['sight'];
|
508
|
+
SoundsLayer: Canvas['sounds'];
|
509
|
+
NotesLayer: Canvas['notes'];
|
510
|
+
ControlsLayer: Canvas['controls'];
|
511
|
+
};
|
426
512
|
}
|
427
513
|
|
428
514
|
namespace Canvas {
|
@@ -455,6 +541,27 @@ declare global {
|
|
455
541
|
}
|
456
542
|
}
|
457
543
|
|
544
|
+
type TickerCallback<T> = (this: T, dt: number) => any;
|
545
|
+
|
546
|
+
interface PerformanceSettings {
|
547
|
+
mode: foundry.CONST.CANVAS_PERFORMANCE_MODES;
|
548
|
+
blur: {
|
549
|
+
enabled: boolean;
|
550
|
+
illumination: boolean;
|
551
|
+
};
|
552
|
+
mipmap: 'ON' | 'OFF';
|
553
|
+
msaa: boolean;
|
554
|
+
fps: number;
|
555
|
+
tokenAnimation: boolean;
|
556
|
+
lightAnimation: boolean;
|
557
|
+
textures: {
|
558
|
+
enabled: boolean;
|
559
|
+
maxSize: number;
|
560
|
+
p2Steps: number;
|
561
|
+
p2StepsMax: number;
|
562
|
+
};
|
563
|
+
}
|
564
|
+
|
458
565
|
interface PanView {
|
459
566
|
/**
|
460
567
|
* The x-coordinate of the pan destination
|
@@ -1,3 +1,17 @@
|
|
1
|
+
interface CanvasAnimationData {
|
2
|
+
/** The animation function being executed each frame */
|
3
|
+
fn: (dt: number) => void;
|
4
|
+
|
5
|
+
/** The object context within which animation occurs */
|
6
|
+
context: PIXI.DisplayObject;
|
7
|
+
|
8
|
+
/** A Promise which resolves once the animation is complete */
|
9
|
+
promise: Promise<boolean>;
|
10
|
+
|
11
|
+
/** The resolution function, allowing animation to be ended early */
|
12
|
+
resolve: (value: boolean) => void;
|
13
|
+
}
|
14
|
+
|
1
15
|
/**
|
2
16
|
* A helper class providing utility methods for PIXI Canvas animation
|
3
17
|
*/
|
@@ -8,9 +22,7 @@ declare class CanvasAnimation {
|
|
8
22
|
* Track an object of active animations by name, context, and function
|
9
23
|
* This allows a currently playing animation to be referenced and terminated
|
10
24
|
*/
|
11
|
-
static animations:
|
12
|
-
Record<string, { fn: (dt: number) => void; context: PIXI.Container; resolve: (value: boolean) => void }>
|
13
|
-
>;
|
25
|
+
static animations: Record<string, CanvasAnimationData>;
|
14
26
|
|
15
27
|
/**
|
16
28
|
* Apply a linear animation from the current value of some attribute to a new value
|
@@ -39,9 +51,16 @@ declare class CanvasAnimation {
|
|
39
51
|
*/
|
40
52
|
static animateLinear(
|
41
53
|
attributes: CanvasAnimation.Attribute[],
|
42
|
-
options?:
|
54
|
+
options?: InexactPartial<LinearAnimationOptions>
|
43
55
|
): Promise<boolean>;
|
44
56
|
|
57
|
+
/**
|
58
|
+
* Retrieve an animation currently in progress by its name
|
59
|
+
* @param name - The animation name to retrieve
|
60
|
+
* @returns The animation data, or undefined
|
61
|
+
*/
|
62
|
+
static getAnimation(name: string): CanvasAnimationData | undefined;
|
63
|
+
|
45
64
|
/**
|
46
65
|
* If an animation using a certain name already exists, terminate it
|
47
66
|
* @param name - The animation name to terminate
|
@@ -75,7 +94,7 @@ declare class CanvasAnimation {
|
|
75
94
|
*/
|
76
95
|
protected static _animateFrame(
|
77
96
|
deltaTime: number,
|
78
|
-
resolve:
|
97
|
+
resolve: CanvasAnimationData['resolve'],
|
79
98
|
reject: (reason?: any) => void,
|
80
99
|
attributes: CanvasAnimation.Attribute[],
|
81
100
|
duration: number,
|
@@ -85,8 +104,12 @@ declare class CanvasAnimation {
|
|
85
104
|
|
86
105
|
declare namespace CanvasAnimation {
|
87
106
|
interface Attribute {
|
88
|
-
parent: any;
|
89
107
|
attribute: string;
|
108
|
+
d?: number;
|
109
|
+
delta?: number;
|
110
|
+
done?: number;
|
111
|
+
parent: any;
|
112
|
+
remaining?: number;
|
90
113
|
to: number;
|
91
114
|
}
|
92
115
|
}
|
@@ -95,7 +118,7 @@ interface LinearAnimationOptions {
|
|
95
118
|
/**
|
96
119
|
* An animation context to use which defines scope
|
97
120
|
*/
|
98
|
-
context: PIXI.
|
121
|
+
context: PIXI.DisplayObject;
|
99
122
|
|
100
123
|
/**
|
101
124
|
* Provide a unique animation name which may be referenced later
|
@@ -117,7 +140,7 @@ interface LinearAnimationOptions {
|
|
117
140
|
type TickFunction = (dt: number, attributes: CanvasAnimation.Attribute[]) => void;
|
118
141
|
type TransitionFunction = (
|
119
142
|
dt: number,
|
120
|
-
resolve:
|
143
|
+
resolve: CanvasAnimationData['resolve'],
|
121
144
|
reject: (reason?: any) => void,
|
122
145
|
attributes: CanvasAnimation.Attribute[],
|
123
146
|
duration: number,
|
@@ -27,6 +27,13 @@ declare class CanvasDocumentMixin<T extends foundry.abstract.Document<any, any>>
|
|
27
27
|
*/
|
28
28
|
protected _object: PlaceableObject | null; // TODO: Replace with InstanceType<ObjectClass<T>> | null once the circular reference problem has been solved
|
29
29
|
|
30
|
+
/**
|
31
|
+
* Has this object been deliberately destroyed as part of the deletion workflow?
|
32
|
+
* @internal
|
33
|
+
* @defaultValue `false`
|
34
|
+
*/
|
35
|
+
protected _destroyed: boolean;
|
36
|
+
|
30
37
|
/**
|
31
38
|
* A lazily constructed PlaceableObject instance which can represent this Document on the game canvas.
|
32
39
|
*/
|
@@ -55,7 +55,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
55
55
|
*
|
56
56
|
* @example <caption>A Document may belong to a Folder</caption>
|
57
57
|
* ```typescript
|
58
|
-
* let folder = game.folders.
|
58
|
+
* let folder = game.folders.contents[0];
|
59
59
|
* let actor = await Actor.create({name: "New Actor", folder: folder.id});
|
60
60
|
* console.log(actor.data.folder); // folder.id;
|
61
61
|
* console.log(actor.folder); // folder;
|
@@ -86,7 +86,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
86
86
|
|
87
87
|
/**
|
88
88
|
* Return the permission level that the current game User has over this Document.
|
89
|
-
* See the CONST.
|
89
|
+
* See the CONST.DOCUMENT_PERMISSION_LEVELS object for an enumeration of these levels.
|
90
90
|
*
|
91
91
|
* @example
|
92
92
|
* ```typescript
|
@@ -95,7 +95,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
95
95
|
* actor.permission; // 2
|
96
96
|
* ```
|
97
97
|
*/
|
98
|
-
get permission(): ValueOf<typeof CONST.
|
98
|
+
get permission(): ValueOf<typeof CONST.DOCUMENT_PERMISSION_LEVELS>;
|
99
99
|
|
100
100
|
/**
|
101
101
|
* Lazily obtain a FormApplication instance used to configure this Document, or null if no sheet is available.
|
@@ -133,7 +133,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
133
133
|
/**
|
134
134
|
* Prepare all embedded Document instances which exist within this primary Document.
|
135
135
|
*/
|
136
|
-
|
136
|
+
prepareEmbeddedDocuments(): void;
|
137
137
|
|
138
138
|
/**
|
139
139
|
* Apply transformations or derivations to the values of the source data object.
|
@@ -273,18 +273,21 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
273
273
|
* Choose a name and a type from a select menu of types.
|
274
274
|
* @param data - Initial data with which to populate the creation form
|
275
275
|
* (default: `{}`)
|
276
|
-
* @param
|
276
|
+
* @param context - Additional context options or dialog positioning options
|
277
277
|
* (default: `{}`)
|
278
|
-
* @returns A Promise which resolves to the created Document
|
278
|
+
* @returns A Promise which resolves to the created Document, or null if the dialog was
|
279
|
+
* closed.
|
279
280
|
*/
|
280
281
|
static createDialog<T extends DocumentConstructor>(
|
281
282
|
this: T,
|
282
|
-
data?:
|
283
|
-
|
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
283
|
+
data?:
|
284
|
+
| DeepPartial<
|
285
|
+
| ConstructorDataType<InstanceType<T>['data']>
|
286
|
+
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
287
|
+
>
|
288
|
+
| undefined,
|
289
|
+
context?: (Pick<DocumentModificationContext, 'parent' | 'pack'> & Partial<Dialog.Options>) | undefined
|
290
|
+
): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
|
288
291
|
|
289
292
|
/**
|
290
293
|
* Present a Dialog form to confirm deletion of this Document.
|
@@ -292,18 +295,19 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
292
295
|
* (default: `{}`)
|
293
296
|
* @returns A Promise which resolves to the deleted Document
|
294
297
|
*/
|
295
|
-
deleteDialog(options?: Dialog.Options): Promise<this | undefined>;
|
298
|
+
deleteDialog(options?: Partial<Dialog.Options> | undefined): Promise<this | false | null | undefined>;
|
296
299
|
|
297
300
|
/**
|
298
|
-
* Export
|
301
|
+
* Export document data to a JSON file which can be saved by the client and later imported into a different session.
|
302
|
+
* @param options - Additional options passed to the {@link ClientDocumentMixin#toCompendium} method
|
299
303
|
*/
|
300
|
-
exportToJSON(): void;
|
304
|
+
exportToJSON(options?: CompendiumExportOptions): void;
|
301
305
|
|
302
306
|
/**
|
303
307
|
* A helper function to handle obtaining the relevant Document from dropped data provided via a DataTransfer event.
|
304
308
|
* The dropped data could have:
|
305
309
|
* 1. A compendium pack and entry id
|
306
|
-
* 2. A World
|
310
|
+
* 2. A World Document _id
|
307
311
|
* 3. A data object explicitly provided
|
308
312
|
*
|
309
313
|
* @param data - The data object extracted from a DataTransfer event
|
@@ -332,104 +336,55 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
332
336
|
* Transform the Document data to be stored in a Compendium pack.
|
333
337
|
* Remove any features of the data which are world-specific.
|
334
338
|
* This function is asynchronous in case any complex operations are required prior to exporting.
|
335
|
-
* @param pack
|
339
|
+
* @param pack - A specific pack being exported to
|
340
|
+
* (unused)
|
341
|
+
* @param options - Additional options which modify how the document is converted
|
342
|
+
* (default: `{}`)
|
336
343
|
* @returns A data object of cleaned data suitable for compendium import
|
337
344
|
*/
|
338
|
-
toCompendium(
|
339
|
-
|
340
|
-
|
341
|
-
> & {
|
345
|
+
toCompendium(
|
346
|
+
pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
|
347
|
+
options?: CompendiumExportOptions
|
348
|
+
): Omit<T['data']['_source'], '_id' | 'folder' | 'permission'> & {
|
342
349
|
permission?: T['data']['_source']['permission'];
|
343
350
|
};
|
344
351
|
|
345
352
|
/**
|
346
|
-
* @deprecated since
|
347
|
-
*/
|
348
|
-
get _id(): T['id'];
|
349
|
-
|
350
|
-
/**
|
351
|
-
* @deprecated since 0.8.0
|
352
|
-
*/
|
353
|
-
static get config(): any;
|
354
|
-
|
355
|
-
/**
|
356
|
-
* @deprecated since 0.8.0
|
357
|
-
*/
|
358
|
-
get entity(): T['documentName'];
|
359
|
-
|
360
|
-
/**
|
361
|
-
* @deprecated since 0.8.0
|
362
|
-
*/
|
363
|
-
get owner(): this['isOwner'];
|
364
|
-
|
365
|
-
/**
|
366
|
-
* @deprecated since 0.8.0
|
367
|
-
*/
|
368
|
-
hasPerm(
|
369
|
-
user: foundry.documents.BaseUser,
|
370
|
-
permission: keyof typeof foundry.CONST.ENTITY_PERMISSIONS | foundry.CONST.EntityPermission,
|
371
|
-
exact?: boolean
|
372
|
-
): ReturnType<T['testUserPermission']>;
|
373
|
-
|
374
|
-
/**
|
375
|
-
* @deprecated since 0.8.0
|
353
|
+
* @deprecated since v9 - Use prepareEmbeddedDocuments instead.
|
376
354
|
*/
|
377
|
-
|
378
|
-
|
379
|
-
updates?:
|
380
|
-
| Array<
|
381
|
-
DeepPartial<
|
382
|
-
| ConstructorDataType<InstanceType<T>['data']>
|
383
|
-
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
384
|
-
> & { _id: string }
|
385
|
-
>
|
386
|
-
| (DeepPartial<
|
387
|
-
| ConstructorDataType<InstanceType<T>['data']>
|
388
|
-
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
389
|
-
> & { _id: string }),
|
390
|
-
options?: DocumentModificationContext & foundry.utils.MergeObjectOptions
|
391
|
-
): Promise<InstanceType<ConfiguredDocumentClass<T>>[]>;
|
355
|
+
prepareEmbeddedEntities(): void;
|
356
|
+
}
|
392
357
|
|
358
|
+
interface CompendiumExportOptions {
|
393
359
|
/**
|
394
|
-
*
|
360
|
+
* Clear the flags object
|
361
|
+
* @defaultValue `false`
|
395
362
|
*/
|
396
|
-
|
397
|
-
this: T,
|
398
|
-
ids?: string[],
|
399
|
-
options?: DocumentModificationContext
|
400
|
-
): Promise<InstanceType<ConfiguredDocumentClass<T>>[]>;
|
363
|
+
clearFlags: boolean;
|
401
364
|
|
402
365
|
/**
|
403
|
-
*
|
366
|
+
* Clear the currently assigned folder and sort order
|
367
|
+
* @defaultValue `true`
|
404
368
|
*/
|
405
|
-
|
369
|
+
clearSort: boolean;
|
406
370
|
|
407
371
|
/**
|
408
|
-
*
|
372
|
+
* Clear document permissions
|
373
|
+
* @defaultValue `true`
|
409
374
|
*/
|
410
|
-
|
411
|
-
documentName: string,
|
412
|
-
data?: Record<string, unknown> | Array<Record<string, unknown>>,
|
413
|
-
options?: DocumentModificationContext
|
414
|
-
): ReturnType<T['createEmbeddedDocuments']>;
|
375
|
+
clearPermissions: boolean;
|
415
376
|
|
416
377
|
/**
|
417
|
-
*
|
378
|
+
* Clear fields which store document state
|
379
|
+
* @defaultValue `true`
|
418
380
|
*/
|
419
|
-
|
420
|
-
documentName: string,
|
421
|
-
data?: Array<Record<string, unknown>> | Record<string, unknown>,
|
422
|
-
options?: DocumentModificationContext
|
423
|
-
): ReturnType<T['updateEmbeddedDocuments']>;
|
381
|
+
clearState: boolean;
|
424
382
|
|
425
383
|
/**
|
426
|
-
*
|
384
|
+
* Retain the current Document id
|
385
|
+
* @defaultValue `false`
|
427
386
|
*/
|
428
|
-
|
429
|
-
documentName: string,
|
430
|
-
ids: string[] | string,
|
431
|
-
options: DocumentModificationContext
|
432
|
-
): ReturnType<T['deleteEmbeddedDocuments']>;
|
387
|
+
keepId: boolean;
|
433
388
|
}
|
434
389
|
|
435
390
|
interface SortOptions<T> {
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
2
|
-
import {
|
3
|
+
import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData.js';
|
3
4
|
import { EffectChangeData } from '../../common/data/data.mjs/effectChangeData';
|
4
5
|
|
5
6
|
declare global {
|
@@ -133,7 +134,7 @@ declare global {
|
|
133
134
|
protected _getSourceName(): Promise<string>;
|
134
135
|
|
135
136
|
protected _preCreate(
|
136
|
-
data:
|
137
|
+
data: ActiveEffectDataConstructorData,
|
137
138
|
options: DocumentModificationOptions,
|
138
139
|
user: foundry.documents.BaseUser
|
139
140
|
): Promise<void>;
|