@league-of-foundry-developers/foundry-vtt-types 0.8.9-8 → 9.242.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 +99 -16
- package/src/foundry/foundry.js/application.d.ts +2 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +5 -8
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- 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/tokenConfig.d.ts +8 -9
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +6 -6
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.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 +2 -2
- 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 +148 -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 +45 -91
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +375 -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 +4 -6
- 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 +11 -9
- 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/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 +484 -907
- package/src/foundry/foundry.js/dragDrop.d.ts +2 -2
- 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 +1 -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 +388 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -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/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/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 +49 -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 +1 -1
- package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
- package/src/foundry/foundry.js/textEditor.d.ts +1 -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
@@ -1,5 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
ConfiguredDocumentClass,
|
3
|
+
ConfiguredDocumentClassForName,
|
3
4
|
ConfiguredObjectClassForName,
|
4
5
|
DocumentConstructor,
|
5
6
|
ToObjectFalseType
|
@@ -95,6 +96,47 @@ declare global {
|
|
95
96
|
...args: Parameters<H>
|
96
97
|
): ReturnType<H> | undefined;
|
97
98
|
|
99
|
+
/**
|
100
|
+
* Notify subscribers that an error has occurred within foundry.
|
101
|
+
* @param location - The method where the error was caught.
|
102
|
+
* @param err - The error.
|
103
|
+
* @param options - Additional options to configure behaviour.
|
104
|
+
*/
|
105
|
+
static onError(
|
106
|
+
location: string,
|
107
|
+
err: Error,
|
108
|
+
{
|
109
|
+
msg,
|
110
|
+
notify,
|
111
|
+
log,
|
112
|
+
...data
|
113
|
+
}?: {
|
114
|
+
/**
|
115
|
+
* Additional data to pass to the hook subscribers.
|
116
|
+
* @defaultValue `{}`
|
117
|
+
*/
|
118
|
+
[key: string]: unknown;
|
119
|
+
|
120
|
+
/**
|
121
|
+
* A message to prefix the caught error with and/or to use in the notification.
|
122
|
+
* @defaultValue `""`
|
123
|
+
*/
|
124
|
+
msg?: string | undefined;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* The level at which to log the error to console (if at all).
|
128
|
+
* @defaultValue `null`
|
129
|
+
*/
|
130
|
+
notify?: keyof NonNullable<typeof ui['notifications']> | null | undefined;
|
131
|
+
|
132
|
+
/**
|
133
|
+
* The level at which to spawn a notification in the UI (if at all).
|
134
|
+
* @defaultValue `null`
|
135
|
+
*/
|
136
|
+
log?: keyof typeof console | null | undefined;
|
137
|
+
}
|
138
|
+
): void;
|
139
|
+
|
98
140
|
/**
|
99
141
|
* @defaultValue `{}`
|
100
142
|
*/
|
@@ -129,21 +171,27 @@ declare global {
|
|
129
171
|
*
|
130
172
|
* @example Using a callback type with a static name
|
131
173
|
* ```typescript
|
132
|
-
* Hooks.on(
|
174
|
+
* Hooks.on("updateWorldTime", (worldTime, dt) => {
|
175
|
+
* worldTime; // number
|
176
|
+
* dt; // number
|
133
177
|
* // [...]
|
134
178
|
* })
|
135
179
|
* ```
|
136
180
|
*
|
137
|
-
* @example Using a callback with a dynamic name
|
181
|
+
* @example Using a callback with a dynamic name and generic parameter
|
138
182
|
* ```typescript
|
139
|
-
* Hooks.on<Hooks.
|
183
|
+
* Hooks.on<Hooks.CloseApplication<FormApplication>>("closeFormApplication", (app, jq) => {
|
184
|
+
* app; // FormApplication
|
185
|
+
* jq; // JQuery
|
140
186
|
* // [...]
|
141
187
|
* })
|
142
188
|
* ```
|
143
189
|
*
|
144
|
-
* @example Using
|
190
|
+
* @example Using the `error` callback type
|
145
191
|
* ```typescript
|
146
|
-
* Hooks.on
|
192
|
+
* Hooks.on("error", (...args) => {
|
193
|
+
* if (args[0] === "Canvas#draw")
|
194
|
+
* args[2].layer // CanvasLayer
|
147
195
|
* // [...]
|
148
196
|
* })
|
149
197
|
* ```
|
@@ -162,13 +210,30 @@ declare global {
|
|
162
210
|
change: EffectChangeData
|
163
211
|
) => boolean | void;
|
164
212
|
|
213
|
+
/**
|
214
|
+
* A hook event that fires immediately prior to PIXI Application construction with the configuration parameters.
|
215
|
+
* @param canvasConfig - Canvas configuration parameters that will be used
|
216
|
+
* @remarks This is called by {@link Hooks.callAll}.
|
217
|
+
*/
|
218
|
+
canvasConfig: (canvasConfig: {
|
219
|
+
view: HTMLCanvasElement;
|
220
|
+
width: number;
|
221
|
+
height: number;
|
222
|
+
transparent: boolean;
|
223
|
+
resolution: number;
|
224
|
+
autoDensity: boolean;
|
225
|
+
backgroundColor: string | null;
|
226
|
+
antialias: boolean;
|
227
|
+
powerPreference: string;
|
228
|
+
}) => void;
|
229
|
+
|
165
230
|
/**
|
166
231
|
* A hook event that fires when the Canvas is initialized.
|
167
232
|
* @param canvas - the Canvas
|
168
233
|
* @remarks This is called by {@link Hooks.callAll}.
|
169
234
|
* @see {@link Canvas#draw}
|
170
235
|
*/
|
171
|
-
canvasInit: (canvas: Canvas) =>
|
236
|
+
canvasInit: (canvas: Canvas) => void;
|
172
237
|
|
173
238
|
/**
|
174
239
|
* A hook event that fires when the Canvas is panned.
|
@@ -179,7 +244,7 @@ declare global {
|
|
179
244
|
* @see {@link Canvas#pan}
|
180
245
|
* @see {@link Canvas#animatePan}
|
181
246
|
*/
|
182
|
-
canvasPan: (canvas: Canvas, view: Canvas.View) =>
|
247
|
+
canvasPan: (canvas: Canvas, view: Canvas.View) => void;
|
183
248
|
|
184
249
|
/**
|
185
250
|
* A hook event that fires when the Canvas is ready.
|
@@ -195,7 +260,7 @@ declare global {
|
|
195
260
|
* @remarks This is called by {@link Hooks.callAll}.
|
196
261
|
* @see {@link Sidebar#_onChangeTab}
|
197
262
|
*/
|
198
|
-
changeSidebarTab: (app: SidebarTab) =>
|
263
|
+
changeSidebarTab: (app: SidebarTab) => void;
|
199
264
|
|
200
265
|
/**
|
201
266
|
* A hook event that fires when a chat bubble is rendered.
|
@@ -247,7 +312,7 @@ declare global {
|
|
247
312
|
* @see {@link SceneNavigation#expand}
|
248
313
|
* @see {@link SceneNavigation#collapse}
|
249
314
|
*/
|
250
|
-
collapseSceneNavigation: (nav: SceneNavigation, collapsed: boolean) =>
|
315
|
+
collapseSceneNavigation: (nav: SceneNavigation, collapsed: boolean) => void;
|
251
316
|
|
252
317
|
/**
|
253
318
|
* A hook event that fires when the Sidebar is collapsed or expanded.
|
@@ -257,7 +322,21 @@ declare global {
|
|
257
322
|
* @see {@link Sidebar#expand}
|
258
323
|
* @see {@link Sidebar#collapse}
|
259
324
|
*/
|
260
|
-
collapseSidebar: (sidebar: Sidebar, collapsed: boolean) =>
|
325
|
+
collapseSidebar: (sidebar: Sidebar, collapsed: boolean) => void;
|
326
|
+
|
327
|
+
/**
|
328
|
+
* A hook event that fires when Cards are dealt from a deck to other hands
|
329
|
+
* @param origin - The origin Cards document
|
330
|
+
* @param destinations - An array of destination Cards documents
|
331
|
+
* @param context - Additional context which describes the operation
|
332
|
+
* @remarks This is called by {@link Hooks.call}.
|
333
|
+
* @remarks An explicit return value of `false` prevents the operation.
|
334
|
+
*/
|
335
|
+
dealCards: (
|
336
|
+
origin: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
337
|
+
destinations: InstanceType<ConfiguredDocumentClassForName<'Cards'>>[],
|
338
|
+
context: Cards.DealContext
|
339
|
+
) => boolean | void;
|
261
340
|
|
262
341
|
/**
|
263
342
|
* A hook event that fires when some useful data is dropped onto an ActorSheet.
|
@@ -302,13 +381,25 @@ declare global {
|
|
302
381
|
data: object
|
303
382
|
) => boolean | void;
|
304
383
|
|
384
|
+
/**
|
385
|
+
* A hook event that fires whenever foundry experiences an error.
|
386
|
+
*
|
387
|
+
* @param location - The method where the error was caught.
|
388
|
+
* @param err - The error.
|
389
|
+
* @param data - Additional data that might be provided, based on the nature of the error.
|
390
|
+
* (default: `{}`)
|
391
|
+
* @remarks This is called by {@link Hooks.callAll}.
|
392
|
+
* @see {@link Hooks.onError}
|
393
|
+
*/
|
394
|
+
error: (...args: ValueOf<ErrorCallbackParameters>) => void;
|
395
|
+
|
305
396
|
/**
|
306
397
|
* A hook event that fires when the Scene controls are initialized.
|
307
398
|
* @param controls - The SceneControl configurations
|
308
399
|
* @remarks This is called by {@link Hooks.callAll}.
|
309
400
|
* @see {@link SceneControls#_getControlButtons}
|
310
401
|
*/
|
311
|
-
getSceneControlButtons: (controls: SceneControl[]) =>
|
402
|
+
getSceneControlButtons: (controls: SceneControl[]) => void;
|
312
403
|
|
313
404
|
/**
|
314
405
|
* A hook event that fires when the context menu for a SceneNavigation entry is constructed.
|
@@ -345,21 +436,27 @@ declare global {
|
|
345
436
|
slot: number
|
346
437
|
) => boolean | void;
|
347
438
|
|
439
|
+
/**
|
440
|
+
* A hook event that fires once Localization translations have been loaded and are ready for use.
|
441
|
+
* @remarks This is called by {@link Hooks.callAll}.
|
442
|
+
* @see {@link Localization#initialize}
|
443
|
+
*/
|
444
|
+
i18nInit: () => void;
|
445
|
+
|
348
446
|
/**
|
349
447
|
* A hook event that fires as Foundry is initializing, right before any initialization tasks have begun.
|
350
448
|
* @remarks This is called by {@link Hooks.callAll}.
|
351
449
|
* @see {@link Game#initialize}
|
352
450
|
*/
|
353
|
-
init: () =>
|
451
|
+
init: () => void;
|
354
452
|
|
355
453
|
/**
|
356
|
-
* A hook event that fires after
|
357
|
-
* @param source
|
358
|
-
* @param animationType - The animation type
|
454
|
+
* A hook event that fires after LightSource shaders have initialized.
|
455
|
+
* @param source - The LightSource being initialized
|
359
456
|
* @remarks This is called by {@link Hooks.callAll}.
|
360
|
-
* @see {@link
|
457
|
+
* @see {@link LightSource#_initializeShaders}
|
361
458
|
*/
|
362
|
-
|
459
|
+
initializeLightSourceShaders: (source: LightSource) => void;
|
363
460
|
|
364
461
|
/**
|
365
462
|
* A hook event that fires when the LightingLayer is refreshed.
|
@@ -367,7 +464,7 @@ declare global {
|
|
367
464
|
* @remarks This is called by {@link Hooks.callAll}.
|
368
465
|
* @see {@link LightingLayer#refresh}
|
369
466
|
*/
|
370
|
-
lightingRefresh: (layer: LightingLayer) =>
|
467
|
+
lightingRefresh: (layer: LightingLayer) => void;
|
371
468
|
|
372
469
|
/**
|
373
470
|
* A hook event that fires when a token's resource bar attribute has been modified.
|
@@ -395,20 +492,34 @@ declare global {
|
|
395
492
|
updates: Record<string, number>
|
396
493
|
) => boolean;
|
397
494
|
|
495
|
+
/**
|
496
|
+
* A hook event that fires when Cards are passed from one stack to another
|
497
|
+
* @param origin - The origin Cards document
|
498
|
+
* @param destination - The destination Cards document
|
499
|
+
* @param context - Additional context which describes the operation
|
500
|
+
* @remarks This is called by {@link Hooks.call}.
|
501
|
+
* @remarks An explicit return value of `false` prevents the operation.
|
502
|
+
*/
|
503
|
+
passCards: (
|
504
|
+
origin: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
505
|
+
destination: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
506
|
+
context: Cards.DealContext
|
507
|
+
) => boolean | void;
|
508
|
+
|
398
509
|
/**
|
399
510
|
* A hook event that fires when the game is paused or un-paused.
|
400
511
|
* @param paused - Is the game now paused (true) or un-paused (false)
|
401
512
|
* @remarks This is called by {@link Hooks.callAll}.
|
402
513
|
* @see {@link Game#togglePause}
|
403
514
|
*/
|
404
|
-
pauseGame: (paused: boolean) =>
|
515
|
+
pauseGame: (paused: boolean) => void;
|
405
516
|
|
406
517
|
/**
|
407
518
|
* A hook event that fires when the game is fully ready.
|
408
519
|
* @remarks This is called by {@link Hooks.callAll}.
|
409
520
|
* @see {@link Game#setupGame}
|
410
521
|
*/
|
411
|
-
ready: () =>
|
522
|
+
ready: () => void;
|
412
523
|
|
413
524
|
/**
|
414
525
|
* A hook event that fires for each ChatMessage which is rendered for addition to the ChatLog.
|
@@ -434,6 +545,18 @@ declare global {
|
|
434
545
|
}
|
435
546
|
) => boolean | void;
|
436
547
|
|
548
|
+
/**
|
549
|
+
* A hook event that fires when a stack of Cards are returned to the decks they originally came from.
|
550
|
+
* @param origin - The origin Cards document.
|
551
|
+
* @param returned - The cards being returned.
|
552
|
+
* @param context - Additional context which describes the operation.
|
553
|
+
*/
|
554
|
+
returnCards: (
|
555
|
+
origin: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
556
|
+
returned: InstanceType<ConfiguredDocumentClassForName<'Card'>>[],
|
557
|
+
context: Cards.ReturnContext
|
558
|
+
) => boolean | void;
|
559
|
+
|
437
560
|
/**
|
438
561
|
* A hook event that fires when the AV settings are changed.
|
439
562
|
* @param settings - The AVSettings manager
|
@@ -441,7 +564,7 @@ declare global {
|
|
441
564
|
* @remarks This is called by {@link Hooks.callAll}.
|
442
565
|
* @see {@link AVSettings#_onSettingsChanged}
|
443
566
|
*/
|
444
|
-
rtcSettingsChanged: (settings: AVSettings, changed: DeepPartial<AVSettings.Settings>) =>
|
567
|
+
rtcSettingsChanged: (settings: AVSettings, changed: DeepPartial<AVSettings.Settings>) => void;
|
445
568
|
|
446
569
|
/**
|
447
570
|
* A hook event that fires when Foundry has finished initializing but
|
@@ -450,7 +573,7 @@ declare global {
|
|
450
573
|
* @remarks This is called by {@link Hooks.callAll}.
|
451
574
|
* @see {@link Game#setupGame}
|
452
575
|
*/
|
453
|
-
setup: () =>
|
576
|
+
setup: () => void;
|
454
577
|
|
455
578
|
/**
|
456
579
|
* A hook event that fires when the SightLayer has been refreshed.
|
@@ -458,7 +581,7 @@ declare global {
|
|
458
581
|
* @remarks This is called by {@link Hooks.callAll}.
|
459
582
|
* @see {@link SightLayer#restrictVisibility}
|
460
583
|
*/
|
461
|
-
sightRefresh: (layer: SightLayer) =>
|
584
|
+
sightRefresh: (layer: SightLayer) => void;
|
462
585
|
|
463
586
|
/**
|
464
587
|
* A hook event that fires when a token is targeted or un-targeted.
|
@@ -472,7 +595,7 @@ declare global {
|
|
472
595
|
user: InstanceType<ConfiguredDocumentClass<typeof User>>,
|
473
596
|
token: ConfiguredObjectClassForName<'Token'>,
|
474
597
|
targeted: boolean
|
475
|
-
) =>
|
598
|
+
) => void;
|
476
599
|
|
477
600
|
/**
|
478
601
|
* A hook event that fires whenever the contents of a Compendium pack were modified.
|
@@ -490,7 +613,7 @@ declare global {
|
|
490
613
|
documents: foundry.abstract.Document<any, any>[],
|
491
614
|
options: DocumentModificationOptions,
|
492
615
|
userId: string
|
493
|
-
) =>
|
616
|
+
) => void;
|
494
617
|
|
495
618
|
/**
|
496
619
|
* A hook event that fires when the World time has been updated.
|
@@ -499,7 +622,7 @@ declare global {
|
|
499
622
|
* @remarks This is called by {@link Hooks.callAll}.
|
500
623
|
* @see {@link GameTime#onUpdateWorldTime}
|
501
624
|
*/
|
502
|
-
updateWorldTime: (worldTime: number, delta: number) =>
|
625
|
+
updateWorldTime: (worldTime: number, delta: number) => void;
|
503
626
|
}
|
504
627
|
|
505
628
|
/**
|
@@ -526,10 +649,7 @@ declare global {
|
|
526
649
|
* @see {@link PlaceableObject#control}
|
527
650
|
* @see {@link PlaceableObject#release}
|
528
651
|
*/
|
529
|
-
type ControlPlaceableObject<P extends PlaceableObject = PlaceableObject> = (
|
530
|
-
object: P,
|
531
|
-
controlled: boolean
|
532
|
-
) => unknown;
|
652
|
+
type ControlPlaceableObject<P extends PlaceableObject = PlaceableObject> = (object: P, controlled: boolean) => void;
|
533
653
|
|
534
654
|
/**
|
535
655
|
* A hook event that fires for every embedded Document type after conclusion of a creation workflow.
|
@@ -549,7 +669,7 @@ declare global {
|
|
549
669
|
document: InstanceType<ConfiguredDocumentClass<D>>,
|
550
670
|
options: DocumentModificationOptions,
|
551
671
|
userId: string
|
552
|
-
) =>
|
672
|
+
) => void;
|
553
673
|
|
554
674
|
/**
|
555
675
|
* A hook event that fires for every Document type after conclusion of an deletion workflow.
|
@@ -569,7 +689,7 @@ declare global {
|
|
569
689
|
document: InstanceType<ConfiguredDocumentClass<D>>,
|
570
690
|
options: DocumentModificationOptions,
|
571
691
|
userId: string
|
572
|
-
) =>
|
692
|
+
) => void;
|
573
693
|
|
574
694
|
/**
|
575
695
|
* A hook event that fires whenever this Application is first rendered to add buttons to its header.
|
@@ -587,40 +707,15 @@ declare global {
|
|
587
707
|
) => boolean | void;
|
588
708
|
|
589
709
|
/**
|
590
|
-
*
|
591
|
-
* the
|
592
|
-
*
|
593
|
-
* @param
|
594
|
-
* @
|
595
|
-
* 'EntryContext'.
|
596
|
-
* @remarks This is called by {@link Hooks.call}.
|
597
|
-
* @see {@link ChatLog#_contextMenu}
|
598
|
-
*/
|
599
|
-
type GetChatLogEntryContext = (jq: JQuery, entryOptions: ContextMenuEntry[]) => boolean | void;
|
600
|
-
|
601
|
-
/**
|
602
|
-
* @remarks This is called after getting the {@link ContextMenu} options for a {@link CombatTracker} entry, but before
|
603
|
-
* creating the ContextMenu.
|
604
|
-
* @param jq - the JQuery of the ContextMenu parent element
|
605
|
-
* @param entryOptions - the already created ContextMenuOptions
|
606
|
-
* @remarks The name for this hook is dynamically created by joining 'get' with the type name of the CombatTracker and
|
607
|
-
* 'EntryContext'.
|
608
|
-
* @remarks This is called by {@link Hooks.call}.
|
609
|
-
* @see {@link CombatTracker#_contextMenu}
|
610
|
-
*/
|
611
|
-
type GetCombatTrackerEntryContext = (jq: JQuery, entryOptions: ContextMenuEntry[]) => boolean | void;
|
612
|
-
|
613
|
-
/**
|
614
|
-
* @remarks This is called after getting the {@link ContextMenu} options for a {@link CompendiumDirectory} entry, but
|
615
|
-
* before creating the ContextMenu.
|
616
|
-
* @param jq - the JQuery of the ContextMenu parent element
|
617
|
-
* @param entryOptions - the already created ContextMenuOptions
|
618
|
-
* @remarks The name for this hook is dynamically created by joining 'get' with the type name of the
|
619
|
-
* CompendiumDirectory and 'EntryContext'.
|
710
|
+
* A hook event that fires when the context menu for entries in an Application is constructed. Substitute the
|
711
|
+
* Application name in the hook event to target a specific Application, for example
|
712
|
+
* "getActorDirectoryEntryContext".
|
713
|
+
* @param html - The HTML element to which the context options are attached
|
714
|
+
* @param entryOptions - The context menu entries
|
620
715
|
* @remarks This is called by {@link Hooks.call}.
|
621
|
-
* @see {@link
|
716
|
+
* @see {@link ContextMenu.create}
|
622
717
|
*/
|
623
|
-
type
|
718
|
+
type GetEntryContext = (html: JQuery, entryOptions: ContextMenuEntry[]) => boolean | void;
|
624
719
|
|
625
720
|
/**
|
626
721
|
* A hook event that fires when the context menu for a Sound in the PlaylistDirectory is constructed.
|
@@ -633,19 +728,6 @@ declare global {
|
|
633
728
|
*/
|
634
729
|
type GetPlaylistDirectorySoundContext = (html: JQuery, entryOptions: ContextMenuEntry[]) => boolean | void;
|
635
730
|
|
636
|
-
/**
|
637
|
-
* A hook event that fires when the context menu for entries in a SidebarTab
|
638
|
-
* is constructed. Substitute the SidebarTab name in the hook event to target
|
639
|
-
* a specific SidebarTab, for example "getActorDirectoryEntryContext".
|
640
|
-
* @param html - The HTML element to which the context options are attached
|
641
|
-
* @param entryOptions - The context menu entries
|
642
|
-
* @remarks The name for this hook is dynamically created by joining 'get' with the type name of the SidebarDirectory
|
643
|
-
* and 'EntryContext'.
|
644
|
-
* @remarks This is called by {@link Hooks.call}.
|
645
|
-
* @see {@link SidebarDirectory#_contextMenu}
|
646
|
-
*/
|
647
|
-
type GetSidebarDirectoryEntryContext = (html: JQuery, entryOptions: ContextMenuEntry[]) => boolean | void;
|
648
|
-
|
649
731
|
/**
|
650
732
|
* A hook event that fires when the context menu for folders in a SidebarTab
|
651
733
|
* is constructed. Substitute the SidebarTab name in the hook event to target
|
@@ -668,7 +750,7 @@ declare global {
|
|
668
750
|
* @remarks This is called by {@link Hooks.callAll}.
|
669
751
|
* @see {@link AudioHelper#_onChangeGlobalVolume}
|
670
752
|
*/
|
671
|
-
type GlobalVolumeChanged = (volume: number) =>
|
753
|
+
type GlobalVolumeChanged = (volume: number) => void;
|
672
754
|
|
673
755
|
/**
|
674
756
|
* A hook event that fires when any PlaceableObject is hovered over or out.
|
@@ -682,7 +764,7 @@ declare global {
|
|
682
764
|
* @see {@link PlaceableObject#_onHoverIn}
|
683
765
|
* @see {@link PlaceableObject#_onHoverOut}
|
684
766
|
*/
|
685
|
-
type HoverPlaceableObject<P extends PlaceableObject = PlaceableObject> = (object: P, hover: boolean) =>
|
767
|
+
type HoverPlaceableObject<P extends PlaceableObject = PlaceableObject> = (object: P, hover: boolean) => void;
|
686
768
|
|
687
769
|
/**
|
688
770
|
* A hook event that fires when any PlaceableObject is pasted onto the
|
@@ -816,7 +898,7 @@ declare global {
|
|
816
898
|
change: DeepPartial<ConstructorParameters<D>[0]>,
|
817
899
|
options: DocumentModificationOptions,
|
818
900
|
userId: string
|
819
|
-
) =>
|
901
|
+
) => void;
|
820
902
|
|
821
903
|
type DynamicCallbacks =
|
822
904
|
| CloseApplication
|
@@ -824,11 +906,8 @@ declare global {
|
|
824
906
|
| CreateDocument
|
825
907
|
| DeleteDocument
|
826
908
|
| GetApplicationHeaderButtons
|
827
|
-
|
|
828
|
-
| GetCombatTrackerEntryContext
|
829
|
-
| GetCompendiumDirectoryEntryContext
|
909
|
+
| GetEntryContext
|
830
910
|
| GetPlaylistDirectorySoundContext
|
831
|
-
| GetSidebarDirectoryEntryContext
|
832
911
|
| GetSidebarDirectoryFolderContext
|
833
912
|
| HoverPlaceableObject
|
834
913
|
| PastePlaceableObject
|
@@ -837,5 +916,52 @@ declare global {
|
|
837
916
|
| PreUpdateDocument
|
838
917
|
| RenderApplication
|
839
918
|
| UpdateDocument;
|
919
|
+
|
920
|
+
interface ErrorCallbackParameters {
|
921
|
+
'Canvas#draw': [location: 'Canvas#draw', err: Error, data: { layer: CanvasLayer }];
|
922
|
+
'Application#render': [location: 'Application#render', err: Error, data: Application.RenderOptions];
|
923
|
+
'Localization#_loadTranslationFile': [
|
924
|
+
location: 'Localization#_loadTranslationFile',
|
925
|
+
err: Error,
|
926
|
+
data: { src: string }
|
927
|
+
];
|
928
|
+
'ClientDatabaseBackend#_preCreateDocumentArray': [
|
929
|
+
location: 'ClientDatabaseBackend#_preCreateDocumentArray',
|
930
|
+
err: Error,
|
931
|
+
data: { id: string }
|
932
|
+
];
|
933
|
+
'ClientDatabaseBackend#_preUpdateDocumentArray': [
|
934
|
+
location: 'ClientDatabaseBackend#_preUpdateDocumentArray',
|
935
|
+
err: Error,
|
936
|
+
data: { id: string }
|
937
|
+
];
|
938
|
+
'WorldCollection#_initialize': [location: 'WorldCollection#_initialize', err: Error, data: { id: string }];
|
939
|
+
'ClientDocumentMixin#_initialize': [
|
940
|
+
location: 'ClientDocumentMixin#_initialize',
|
941
|
+
err: Error,
|
942
|
+
data: { id: string }
|
943
|
+
];
|
944
|
+
'Actor#getTokenImages': [location: 'Actor#getTokenImages', err: Error, data: Record<string, never>];
|
945
|
+
'Macro#executeChat': [location: 'Macro#executeChat', err: Error, data: { command: string }];
|
946
|
+
'ChatMessage#roll': [location: 'ChatMessage#roll', err: Error, data: { command: string }];
|
947
|
+
'DefaultTokenConfig#_updateObject': [
|
948
|
+
location: 'DefaultTokenConfig#_updateObject',
|
949
|
+
err: Error,
|
950
|
+
data: Record<string, never>
|
951
|
+
];
|
952
|
+
'SceneConfig#_updateObject': [location: 'SceneConfig#_updateObject', err: Error, data: { scene: string }];
|
953
|
+
'SidebarDirectory.setupFolders': [
|
954
|
+
location: 'SidebarDirectory.setupFolders',
|
955
|
+
err: Error,
|
956
|
+
data: Record<string, never>
|
957
|
+
];
|
958
|
+
'Sidebar#_render': [location: 'Sidebar#_render', err: Error, data: { name: string }];
|
959
|
+
'Game#initializeCanvas': [location: 'Game#initializeCanvas', err: Error, data: Record<string, never>];
|
960
|
+
'EmbeddedCollection#_initialize': [
|
961
|
+
location: 'EmbeddedCollection#_initialize',
|
962
|
+
err: Error,
|
963
|
+
data: { id: string; documentName: string }
|
964
|
+
];
|
965
|
+
}
|
840
966
|
}
|
841
967
|
}
|
@@ -12,7 +12,7 @@ declare class ImageHelper {
|
|
12
12
|
*/
|
13
13
|
static createThumbnail(
|
14
14
|
src: string | PIXI.DisplayObject,
|
15
|
-
options?: ImageHelper.CompositeOptions
|
15
|
+
options?: ImageHelper.CompositeOptions & ImageHelper.TextureToImageOptions
|
16
16
|
): Promise<ImageHelper.ThumbnailReturn>;
|
17
17
|
|
18
18
|
/* -------------------------------------------- */
|
@@ -31,9 +31,19 @@ declare class ImageHelper {
|
|
31
31
|
/**
|
32
32
|
* Extract a texture to a base64 PNG string
|
33
33
|
* @param texture - The Texture object to extract
|
34
|
+
* @param options - (default: `{}`)
|
34
35
|
* @returns A base64 png string of the texture
|
35
36
|
*/
|
36
|
-
static textureToImage(texture: PIXI.Texture): string;
|
37
|
+
static textureToImage(texture: PIXI.Texture, { format, quality }?: ImageHelper.TextureToImageOptions): string;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Asynchronously convert a DisplayObject container to base64 using Canvas#toBlob and FileReader
|
41
|
+
* @param target - A PIXI display object to convert
|
42
|
+
* @param type - The requested mime type of the output, default is image/png
|
43
|
+
* @param quality - A number between 0 and 1 for image quality if image/jpeg or image/webp
|
44
|
+
* @returns A processed base64 string
|
45
|
+
*/
|
46
|
+
static pixiToBase64(target: PIXI.DisplayObject, type: string, quality: number): Promise<string>;
|
37
47
|
}
|
38
48
|
|
39
49
|
declare namespace ImageHelper {
|
@@ -73,6 +83,20 @@ declare namespace ImageHelper {
|
|
73
83
|
width?: number;
|
74
84
|
}
|
75
85
|
|
86
|
+
interface TextureToImageOptions {
|
87
|
+
/**
|
88
|
+
* Image format, e.g. "image/jpeg" or "image/webp".
|
89
|
+
* @defaultValue `"image/png"`
|
90
|
+
*/
|
91
|
+
format?: string;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* JPEG or WEBP compression from 0 to 1. Default is 0.92.
|
95
|
+
* @defaultValue `0.92`
|
96
|
+
*/
|
97
|
+
quality?: number;
|
98
|
+
}
|
99
|
+
|
76
100
|
/**
|
77
101
|
* An interface for return values of the {@link ImageHelper.createThumbnail} method.
|
78
102
|
*/
|