@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.
Files changed (295) hide show
  1. package/README.md +44 -27
  2. package/index.d.ts +2 -2
  3. package/package.json +34 -15
  4. package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
  5. package/src/foundry/common/config.mjs/index.d.ts +1 -0
  6. package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
  7. package/src/foundry/common/constants.mjs.d.ts +403 -213
  8. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
  9. package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
  10. package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
  11. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
  12. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
  13. package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
  14. package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
  15. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
  16. package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
  17. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
  18. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
  19. package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
  20. package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
  21. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
  22. package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
  23. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
  24. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
  25. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
  26. package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
  27. package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
  28. package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
  29. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +24 -23
  30. package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
  31. package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
  32. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
  33. package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
  34. package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
  35. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
  36. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
  37. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
  38. package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
  39. package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
  40. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
  41. package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
  42. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
  43. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
  44. package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
  45. package/src/foundry/common/data/data.mjs/userData.d.ts +118 -33
  46. package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
  47. package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
  48. package/src/foundry/common/data/fields.mjs.d.ts +180 -83
  49. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
  50. package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
  51. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
  52. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
  53. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
  54. package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
  55. package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
  56. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
  57. package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
  58. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +9 -2
  59. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
  60. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
  61. package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
  62. package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
  63. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
  64. package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
  65. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
  66. package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
  67. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
  68. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
  69. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
  70. package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
  71. package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
  72. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
  73. package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
  74. package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
  75. package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
  76. package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
  77. package/src/foundry/common/documents.mjs/index.d.ts +3 -0
  78. package/src/foundry/common/module.mjs.d.ts +3 -0
  79. package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
  80. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
  81. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
  82. package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
  83. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
  84. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
  85. package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
  86. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
  87. package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
  88. package/src/foundry/common/types.mjs.d.ts +95 -0
  89. package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
  90. package/src/foundry/common/utils/helpers.mjs.d.ts +64 -39
  91. package/src/foundry/common/utils/module.mjs.d.ts +1 -0
  92. package/src/foundry/common/utils/primitives.mjs.d.ts +106 -16
  93. package/src/foundry/foundry.js/application.d.ts +138 -110
  94. package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
  95. package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
  96. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
  97. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
  98. package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
  99. package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
  100. package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
  101. package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
  102. package/src/foundry/foundry.js/applications/filePicker.d.ts +2 -2
  103. package/src/foundry/foundry.js/applications/formApplication.d.ts +46 -15
  104. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
  105. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
  106. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
  107. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
  108. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +3 -3
  109. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +2 -2
  110. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
  111. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +5 -5
  112. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
  113. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +3 -3
  114. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
  115. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
  116. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
  117. package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
  118. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
  119. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +4 -4
  120. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +5 -5
  121. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +7 -7
  122. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +4 -4
  123. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
  124. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +7 -10
  125. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +7 -7
  126. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -3
  127. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
  128. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +2 -2
  129. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
  130. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +2 -2
  131. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +2 -2
  132. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -0
  133. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
  134. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
  135. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
  136. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
  137. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +11 -12
  138. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +9 -9
  139. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
  140. package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
  141. package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
  142. package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
  143. package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
  144. package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
  145. package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
  146. package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
  147. package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
  148. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
  149. package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
  150. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +5 -8
  151. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +8 -7
  152. package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
  153. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +4 -4
  154. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
  155. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  156. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  157. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  158. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -3
  159. package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
  160. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  161. package/src/foundry/foundry.js/canvas.d.ts +153 -46
  162. package/src/foundry/foundry.js/canvasAnimation.d.ts +31 -8
  163. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  164. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +47 -92
  165. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  166. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +11 -11
  167. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  168. package/src/foundry/foundry.js/clientDocuments/card.d.ts +134 -0
  169. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +370 -0
  170. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  171. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -48
  172. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +15 -18
  173. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -11
  174. package/src/foundry/foundry.js/clientDocuments/index.d.ts +2 -0
  175. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  176. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  177. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
  178. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  179. package/src/foundry/foundry.js/clientKeybindings.d.ts +309 -0
  180. package/src/foundry/foundry.js/clientSettings.d.ts +12 -10
  181. package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
  182. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
  183. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  184. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
  185. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  186. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  187. package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
  188. package/src/foundry/foundry.js/config.d.ts +487 -907
  189. package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
  190. package/src/foundry/foundry.js/game.d.ts +171 -50
  191. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  192. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  193. package/src/foundry/foundry.js/hooks.d.ts +210 -84
  194. package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
  195. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  196. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  197. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  198. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  199. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  200. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  201. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  202. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  203. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +3 -3
  204. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  205. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  206. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  207. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  208. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
  209. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -3
  210. package/src/foundry/foundry.js/pixi/index.d.ts +3 -0
  211. package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
  212. package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
  213. package/src/foundry/foundry.js/pixi/points/index.d.ts +1 -0
  214. package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +92 -0
  215. package/src/foundry/foundry.js/pixi/polygons/index.d.ts +2 -1
  216. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +98 -0
  217. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +396 -0
  218. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -0
  219. package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
  220. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +11 -37
  221. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShader.d.ts +114 -0
  222. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveBackgroundShader.d.ts +57 -0
  223. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShader.d.ts +47 -0
  224. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/bewitchingWaveColorationShader.d.ts +6 -0
  225. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/chromaColorationShader.d.ts +6 -0
  226. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/emanationColorationShader.d.ts +6 -0
  227. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/energyFieldColorationShader.d.ts +6 -0
  228. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fairyLightColorationShader.d.ts +6 -0
  229. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fogColorationShader.d.ts +6 -0
  230. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/ghostLightColorationShader.d.ts +1 -1
  231. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/hexaDomeColorationShader.d.ts +6 -0
  232. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/index.d.ts +5 -0
  233. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/lightDomeColorationShader.d.ts +6 -0
  234. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/pulseColorationShader.d.ts +1 -1
  235. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/radialRainbowColorationShader.d.ts +6 -0
  236. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/sunburstColorationShader.d.ts +1 -1
  237. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/swirlingRainbowColorationShader.d.ts +6 -0
  238. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/torchColorationShader.d.ts +3 -2
  239. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/vortexColorationShader.d.ts +6 -0
  240. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/waveColorationShader.d.ts +1 -1
  241. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShader.d.ts +63 -0
  242. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/bewitchingWaveIlluminationShader.d.ts +6 -0
  243. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/blackHoleIlluminationShader.d.ts +1 -1
  244. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/fairyLightIlluminationShader.d.ts +6 -0
  245. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/ghostLightIlluminationShader.d.ts +1 -1
  246. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/index.d.ts +3 -0
  247. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/pulseIlluminationShader.d.ts +1 -1
  248. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/roilingIlluminationShader.d.ts +1 -1
  249. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/sunburstIlluminationShader.d.ts +1 -2
  250. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/torchIlluminationShader.d.ts +1 -1
  251. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/vortexIlluminationShader.d.ts +6 -0
  252. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/waveIlluminationShader.d.ts +1 -1
  253. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/index.d.ts +5 -0
  254. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/baseSamplerShader.d.ts +22 -0
  255. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/index.d.ts +3 -4
  256. package/src/foundry/foundry.js/pixi/texts/preciseText.d.ts +10 -2
  257. package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
  258. package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
  259. package/src/foundry/foundry.js/pointSource.d.ts +59 -328
  260. package/src/foundry/foundry.js/pointSources/index.d.ts +3 -0
  261. package/src/foundry/foundry.js/pointSources/lightSource.d.ts +417 -0
  262. package/src/foundry/foundry.js/pointSources/soundSource.d.ts +46 -0
  263. package/src/foundry/foundry.js/pointSources/visionSource.d.ts +125 -0
  264. package/src/foundry/foundry.js/polygonEdge.d.ts +26 -0
  265. package/src/foundry/foundry.js/polygonVertex.d.ts +89 -0
  266. package/src/foundry/foundry.js/quadtree.d.ts +2 -2
  267. package/src/foundry/foundry.js/quadtreeCulling.d.ts +11 -0
  268. package/src/foundry/foundry.js/ray.d.ts +156 -162
  269. package/src/foundry/foundry.js/rays/index.d.ts +1 -0
  270. package/src/foundry/foundry.js/rays/sightRay.d.ts +34 -0
  271. package/src/foundry/foundry.js/roll.d.ts +51 -65
  272. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  273. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  274. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  275. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  276. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  277. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  278. package/src/foundry/foundry.js/screenCulling.d.ts +19 -0
  279. package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
  280. package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
  281. package/src/foundry/foundry.js/textEditor.d.ts +1 -1
  282. package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
  283. package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
  284. package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
  285. package/src/foundry/index.d.ts +29 -26
  286. package/src/types/utils.d.ts +11 -3
  287. package/src/foundry/foundry.js/pixi/polygons/sourcePolygon.d.ts +0 -25
  288. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShader.d.ts +0 -21
  289. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/chromaColorationShader.d.ts +0 -18
  290. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/emanationColorationShader.d.ts +0 -17
  291. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/energyFieldColorationShader.d.ts +0 -18
  292. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/fogColorationShader.d.ts +0 -17
  293. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/hexaDomeColorationShader.d.ts +0 -17
  294. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/lightDomeColorationShader.d.ts +0 -17
  295. 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('updateWorldTime', (worldTime, dt) => {
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.GetCompendiumDirectoryEntryContext>('getJournalEntryContext', (jq, entryOptions) => {
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 a callback with a dynamic name and generic parameter
190
+ * @example Using the `error` callback type
145
191
  * ```typescript
146
- * Hooks.on<Hooks.CloseApplication<FormApplication>>('closeFormApplication', (app, jq) => {
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) => unknown;
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) => unknown;
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) => unknown;
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) => unknown;
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) => unknown;
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[]) => unknown;
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: () => unknown;
451
+ init: () => void;
354
452
 
355
453
  /**
356
- * A hook event that fires after PointSource shaders have initialized.
357
- * @param source - The PointSource
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 PointSource#_initializeShaders}
457
+ * @see {@link LightSource#_initializeShaders}
361
458
  */
362
- initializePointSourceShaders: (source: PointSource, animationType: string | null) => unknown;
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) => unknown;
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) => unknown;
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: () => unknown;
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>) => unknown;
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: () => unknown;
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) => unknown;
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
- ) => unknown;
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
- ) => unknown;
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) => unknown;
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
- ) => unknown;
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
- ) => unknown;
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
- * @remarks This is called after getting the {@link ContextMenu} options for a {@link ChatLog}, but before creating
591
- * the ContextMenu.
592
- * @param jq - the JQuery of the ContextMenu parent element
593
- * @param entryOptions - the already created ContextMenuOptions
594
- * @remarks The name for this hook is dynamically created by joining 'get' with the type name of the ChatLog and
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 CompendiumDirectory#_contextMenu}
716
+ * @see {@link ContextMenu.create}
622
717
  */
623
- type GetCompendiumDirectoryEntryContext = (jq: JQuery, entryOptions: ContextMenuEntry[]) => boolean | void;
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) => unknown;
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) => unknown;
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
- ) => unknown;
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
- | GetChatLogEntryContext
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
  */