@league-of-foundry-developers/foundry-vtt-types 13.340.0 → 13.345.1-beta.20250704.94554

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 (1307) hide show
  1. package/README.md +17 -40
  2. package/package.json +64 -48
  3. package/src/configuration/configuration.d.mts +70 -35
  4. package/src/configuration/documents.d.mts +316 -0
  5. package/src/configuration/globals.d.mts +78 -117
  6. package/src/configuration/hooks.d.mts +96 -0
  7. package/src/configuration/index.d.mts +2 -0
  8. package/src/foundry/client/_module.d.mts +112 -0
  9. package/src/foundry/client/_types.d.mts +98 -0
  10. package/src/foundry/client/applications/_module.d.mts +30 -0
  11. package/src/foundry/client/applications/api/application.d.mts +966 -0
  12. package/src/foundry/client/applications/api/category-browser.d.mts +130 -0
  13. package/src/foundry/client/applications/api/dialog.d.mts +641 -0
  14. package/src/foundry/client/applications/api/document-sheet.d.mts +207 -0
  15. package/src/foundry/client/applications/api/handlebars-application.d.mts +240 -0
  16. package/src/foundry/client/applications/apps/av/camera-popout.d.mts +44 -0
  17. package/src/foundry/client/applications/apps/av/cameras.d.mts +118 -0
  18. package/src/foundry/client/applications/apps/combat-tracker-config.d.mts +45 -0
  19. package/src/foundry/client/applications/apps/compendium-art-config.d.mts +73 -0
  20. package/src/foundry/client/applications/apps/document-ownership.d.mts +51 -0
  21. package/src/foundry/client/applications/apps/document-sheet-config.d.mts +109 -0
  22. package/src/foundry/client/applications/apps/file-picker.d.mts +453 -0
  23. package/src/foundry/client/applications/apps/grid-config.d.mts +51 -0
  24. package/src/foundry/client/applications/apps/image-popout.d.mts +111 -0
  25. package/src/foundry/client/applications/apps/permission-config.d.mts +79 -0
  26. package/src/foundry/client/applications/dice/roll-resolver.d.mts +125 -0
  27. package/src/foundry/client/applications/elements/document-tags.d.mts +93 -0
  28. package/src/foundry/client/applications/elements/file-picker.d.mts +63 -0
  29. package/src/foundry/client/applications/elements/form-element.d.mts +108 -0
  30. package/src/foundry/client/applications/elements/multi-select.d.mts +107 -0
  31. package/src/foundry/client/applications/elements/prosemirror-editor.d.mts +54 -0
  32. package/src/foundry/client/applications/forms/fields.d.mts +271 -0
  33. package/src/foundry/client/applications/handlebars.d.mts +475 -0
  34. package/src/foundry/client/applications/hud/container.d.mts +50 -0
  35. package/src/foundry/client/applications/hud/drawing-hud.d.mts +47 -0
  36. package/src/foundry/client/applications/hud/placeable-hud.d.mts +66 -0
  37. package/src/foundry/client/applications/hud/tile-hud.d.mts +43 -0
  38. package/src/foundry/client/applications/hud/token-hud.d.mts +48 -0
  39. package/src/foundry/client/applications/quickstart.d.mts +45 -0
  40. package/src/foundry/client/applications/settings/_module.d.mts +8 -0
  41. package/src/foundry/client/applications/settings/config.d.mts +63 -0
  42. package/src/foundry/client/applications/settings/dependency-resolution.d.mts +40 -0
  43. package/src/foundry/client/applications/settings/menus/av-config.d.mts +50 -0
  44. package/src/foundry/client/applications/settings/menus/default-sheets-config.d.mts +49 -0
  45. package/src/foundry/client/applications/settings/menus/dice-config.d.mts +38 -0
  46. package/src/foundry/client/applications/settings/menus/font-config.d.mts +66 -0
  47. package/src/foundry/client/applications/settings/menus/prototype-overrides.d.mts +47 -0
  48. package/src/foundry/client/applications/settings/menus/ui-config.d.mts +49 -0
  49. package/src/foundry/client/applications/sheets/_module.d.mts +39 -0
  50. package/src/foundry/client/applications/sheets/active-effect-config.d.mts +51 -0
  51. package/src/foundry/client/applications/sheets/actor-sheet.d.mts +56 -0
  52. package/src/foundry/client/applications/sheets/adventure-exporter.d.mts +51 -0
  53. package/src/foundry/client/applications/sheets/adventure-importer.d.mts +49 -0
  54. package/src/foundry/client/applications/sheets/ambient-light-config.d.mts +115 -0
  55. package/src/foundry/client/applications/sheets/ambient-sound-config.d.mts +77 -0
  56. package/src/foundry/client/applications/sheets/base-sheet.d.mts +53 -0
  57. package/src/foundry/client/applications/sheets/card-config.d.mts +51 -0
  58. package/src/foundry/client/applications/sheets/cards-config.d.mts +135 -0
  59. package/src/foundry/client/applications/sheets/combatant-config.d.mts +51 -0
  60. package/src/foundry/client/applications/sheets/drawing-config.d.mts +51 -0
  61. package/src/foundry/client/applications/sheets/folder-config.d.mts +51 -0
  62. package/src/foundry/client/applications/sheets/item-sheet.d.mts +48 -0
  63. package/src/foundry/client/applications/sheets/journal/dialog-show.d.mts +42 -0
  64. package/src/foundry/client/applications/sheets/journal/journal-entry-category-config.d.mts +51 -0
  65. package/src/foundry/client/applications/sheets/journal/journal-entry-page-hbs-sheet.d.mts +41 -0
  66. package/src/foundry/client/applications/sheets/journal/journal-entry-page-image-sheet.d.mts +38 -0
  67. package/src/foundry/client/applications/sheets/journal/journal-entry-page-markdown-sheet.d.mts +38 -0
  68. package/src/foundry/client/applications/sheets/journal/journal-entry-page-pdf-sheet.d.mts +38 -0
  69. package/src/foundry/client/applications/sheets/journal/journal-entry-page-prose-mirror-sheet.d.mts +38 -0
  70. package/src/foundry/client/applications/sheets/journal/journal-entry-page-sheet.d.mts +50 -0
  71. package/src/foundry/client/applications/sheets/journal/journal-entry-page-text-sheet.d.mts +38 -0
  72. package/src/foundry/client/applications/sheets/journal/journal-entry-page-video-sheet.d.mts +40 -0
  73. package/src/foundry/client/applications/sheets/journal/journal-entry-sheet.d.mts +69 -0
  74. package/src/foundry/client/applications/sheets/macro-config.d.mts +51 -0
  75. package/src/foundry/client/applications/sheets/note-config.d.mts +51 -0
  76. package/src/foundry/client/applications/sheets/playlist-config.d.mts +51 -0
  77. package/src/foundry/client/applications/sheets/playlist-sound-config.d.mts +51 -0
  78. package/src/foundry/client/applications/sheets/region-behavior-config.d.mts +68 -0
  79. package/src/foundry/client/applications/sheets/region-config.d.mts +76 -0
  80. package/src/foundry/client/applications/sheets/roll-table-sheet.d.mts +51 -0
  81. package/src/foundry/client/applications/sheets/scene-config.d.mts +51 -0
  82. package/src/foundry/client/applications/sheets/table-result-config.d.mts +51 -0
  83. package/src/foundry/client/applications/sheets/template-config.d.mts +50 -0
  84. package/src/foundry/client/applications/sheets/tile-config.d.mts +51 -0
  85. package/src/foundry/client/applications/sheets/token/mixin.d.mts +47 -0
  86. package/src/foundry/client/applications/sheets/token/prototype-config.d.mts +41 -0
  87. package/src/foundry/client/applications/sheets/token/token-config.d.mts +51 -0
  88. package/src/foundry/client/applications/sheets/user-config.d.mts +65 -0
  89. package/src/foundry/client/applications/sheets/wall-config.d.mts +51 -0
  90. package/src/foundry/client/applications/sidebar/apps/chat-popout.d.mts +44 -0
  91. package/src/foundry/client/applications/sidebar/apps/compendium.d.mts +44 -0
  92. package/src/foundry/client/applications/sidebar/apps/controls-config.d.mts +49 -0
  93. package/src/foundry/client/applications/sidebar/apps/folder-export.d.mts +40 -0
  94. package/src/foundry/client/applications/sidebar/apps/frame-viewer.d.mts +44 -0
  95. package/src/foundry/client/applications/sidebar/apps/invitation-links.d.mts +39 -0
  96. package/src/foundry/client/applications/sidebar/apps/module-management.d.mts +42 -0
  97. package/src/foundry/client/applications/sidebar/apps/support-details.d.mts +39 -0
  98. package/src/foundry/client/applications/sidebar/apps/tours-management.d.mts +61 -0
  99. package/src/foundry/client/applications/sidebar/apps/world-config.d.mts +40 -0
  100. package/src/foundry/client/applications/sidebar/document-directory.d.mts +55 -0
  101. package/src/foundry/client/applications/sidebar/sidebar-tab.d.mts +106 -0
  102. package/src/foundry/client/applications/sidebar/sidebar.d.mts +129 -0
  103. package/src/foundry/client/applications/sidebar/tabs/actor-directory.d.mts +39 -0
  104. package/src/foundry/client/applications/sidebar/tabs/cards-directory.d.mts +39 -0
  105. package/src/foundry/client/applications/sidebar/tabs/chat.d.mts +36 -0
  106. package/src/foundry/client/applications/sidebar/tabs/combat-tracker.d.mts +283 -0
  107. package/src/foundry/client/applications/sidebar/tabs/compendium-directory.d.mts +40 -0
  108. package/src/foundry/client/applications/sidebar/tabs/item-directory.d.mts +39 -0
  109. package/src/foundry/client/applications/sidebar/tabs/journal-directory.d.mts +39 -0
  110. package/src/foundry/client/applications/sidebar/tabs/macro-directory.d.mts +39 -0
  111. package/src/foundry/client/applications/sidebar/tabs/playlist-directory.d.mts +39 -0
  112. package/src/foundry/client/applications/sidebar/tabs/roll-table-directory.d.mts +39 -0
  113. package/src/foundry/client/applications/sidebar/tabs/scene-directory.d.mts +39 -0
  114. package/src/foundry/client/applications/sidebar/tabs/settings.d.mts +39 -0
  115. package/src/foundry/client/applications/ui/game-pause.d.mts +49 -0
  116. package/src/foundry/client/applications/ui/hotbar.d.mts +52 -0
  117. package/src/foundry/client/applications/ui/main-menu.d.mts +50 -0
  118. package/src/foundry/client/applications/ui/players.d.mts +56 -0
  119. package/src/foundry/client/applications/ui/region-legend.d.mts +97 -0
  120. package/src/foundry/client/applications/ui/scene-controls.d.mts +117 -0
  121. package/src/foundry/client/applications/ui/scene-navigation.d.mts +55 -0
  122. package/src/foundry/client/applications/ux/context-menu.d.mts +327 -0
  123. package/src/foundry/client/applications/ux/drag-drop.d.mts +167 -0
  124. package/src/foundry/client/applications/ux/draggable.d.mts +156 -0
  125. package/src/foundry/client/applications/ux/form-data-extended.d.mts +89 -0
  126. package/src/foundry/client/applications/ux/html-secret.d.mts +75 -0
  127. package/src/foundry/client/applications/ux/prosemirror-editor.d.mts +199 -0
  128. package/src/foundry/client/applications/ux/search-filter.d.mts +148 -0
  129. package/src/foundry/client/applications/ux/tabs.d.mts +121 -0
  130. package/src/foundry/client/applications/ux/text-editor.d.mts +478 -0
  131. package/src/foundry/client/appv1/api/application-v1.d.mts +608 -0
  132. package/src/foundry/client/appv1/api/dialog-v1.d.mts +344 -0
  133. package/src/foundry/client/appv1/api/document-sheet-v1.d.mts +166 -0
  134. package/src/foundry/client/appv1/api/form-application-v1.d.mts +361 -0
  135. package/src/foundry/client/appv1/sheets/actor-sheet.d.mts +194 -0
  136. package/src/foundry/client/appv1/sheets/adventure-importer.d.mts +101 -0
  137. package/src/foundry/client/appv1/sheets/item-sheet.d.mts +68 -0
  138. package/src/foundry/client/appv1/sheets/journal-page-sheet.d.mts +179 -0
  139. package/src/foundry/client/appv1/sheets/journal-sheet.d.mts +325 -0
  140. package/src/foundry/client/audio/_types.d.mts +18 -0
  141. package/src/foundry/client/audio/biquad.d.mts +102 -0
  142. package/src/foundry/client/audio/cache.d.mts +79 -0
  143. package/src/foundry/client/audio/convolver.d.mts +94 -0
  144. package/src/foundry/client/audio/helper.d.mts +372 -0
  145. package/src/foundry/client/audio/sound.d.mts +509 -0
  146. package/src/foundry/client/audio/timeout.d.mts +101 -0
  147. package/src/foundry/client/av/client.d.mts +164 -161
  148. package/src/foundry/client/av/clients/simplepeer.d.mts +160 -157
  149. package/src/foundry/client/av/master.d.mts +194 -190
  150. package/src/foundry/client/av/settings.d.mts +321 -228
  151. package/src/foundry/client/canvas/_module.d.mts +23 -0
  152. package/src/foundry/client/canvas/animation/_module.d.mts +8 -0
  153. package/src/foundry/client/canvas/animation/_types.d.mts +20 -0
  154. package/src/foundry/client/canvas/animation/canvas-animation.d.mts +236 -0
  155. package/src/foundry/client/canvas/animation/chat-bubbles.d.mts +31 -0
  156. package/src/foundry/client/canvas/animation/smooth-noise.d.mts +80 -0
  157. package/src/foundry/client/canvas/board.d.mts +878 -0
  158. package/src/foundry/client/canvas/containers/_module.d.mts +25 -0
  159. package/src/foundry/client/canvas/containers/_types.d.mts +14 -0
  160. package/src/foundry/client/canvas/containers/advanced/cached-container.d.mts +138 -0
  161. package/src/foundry/client/canvas/containers/advanced/full-canvas-mixin.d.mts +28 -0
  162. package/src/foundry/client/canvas/containers/advanced/unbound-container.d.mts +21 -0
  163. package/src/foundry/client/canvas/containers/elements/control-icon.d.mts +129 -0
  164. package/src/foundry/client/canvas/containers/elements/cursor.d.mts +42 -0
  165. package/src/foundry/client/canvas/containers/elements/door-control.d.mts +90 -0
  166. package/src/foundry/client/canvas/containers/elements/door-mesh.d.mts +16 -0
  167. package/src/foundry/client/canvas/containers/elements/grid-highlight.d.mts +43 -0
  168. package/src/foundry/client/canvas/containers/elements/grid-mesh.d.mts +103 -0
  169. package/src/foundry/client/canvas/containers/elements/particles/leaves.d.mts +51 -0
  170. package/src/foundry/client/canvas/containers/elements/particles/particle-effect.d.mts +57 -0
  171. package/src/foundry/client/canvas/containers/elements/point-source-mesh.d.mts +73 -0
  172. package/src/foundry/client/canvas/containers/elements/precise-text.d.mts +46 -0
  173. package/src/foundry/client/canvas/containers/elements/quad-mesh.d.mts +54 -0
  174. package/src/foundry/client/canvas/containers/elements/resize-handle.d.mts +83 -0
  175. package/src/foundry/client/canvas/containers/elements/sprite-mesh.d.mts +370 -0
  176. package/src/foundry/client/canvas/extensions/_module.d.mts +9 -0
  177. package/src/foundry/client/canvas/extensions/circle-extension.d.mts +150 -0
  178. package/src/foundry/client/canvas/extensions/graphics-extension.d.mts +45 -0
  179. package/src/foundry/client/canvas/extensions/polygon-extension.d.mts +175 -0
  180. package/src/foundry/client/canvas/extensions/rectangle-extension.d.mts +287 -0
  181. package/src/foundry/client/canvas/framebuffer-snapshot.d.mts +33 -0
  182. package/src/foundry/client/canvas/geometry/_module.d.mts +17 -0
  183. package/src/foundry/client/canvas/geometry/_types.d.mts +34 -0
  184. package/src/foundry/client/canvas/geometry/clockwise-sweep.d.mts +281 -0
  185. package/src/foundry/client/canvas/geometry/edges/collision.d.mts +131 -0
  186. package/src/foundry/client/canvas/geometry/edges/edge.d.mts +258 -0
  187. package/src/foundry/client/canvas/geometry/edges/edges.d.mts +70 -0
  188. package/src/foundry/client/canvas/geometry/edges/vertex.d.mts +198 -0
  189. package/src/foundry/client/canvas/geometry/observable-transform.d.mts +39 -0
  190. package/src/foundry/client/canvas/geometry/quad-tree.d.mts +324 -0
  191. package/src/foundry/client/canvas/geometry/shapes/limited-angle-polygon.d.mts +143 -0
  192. package/src/foundry/client/canvas/geometry/shapes/polygon-mesher.d.mts +141 -0
  193. package/src/foundry/client/canvas/geometry/shapes/ray.d.mts +177 -0
  194. package/src/foundry/client/canvas/geometry/shapes/source-polygon.d.mts +368 -0
  195. package/src/foundry/client/canvas/geometry/unbound-transform.d.mts +22 -0
  196. package/src/foundry/client/canvas/geometry/weiler-atherton-clipping.d.mts +203 -0
  197. package/src/foundry/client/canvas/groups/_module.d.mts +14 -0
  198. package/src/foundry/client/canvas/groups/canvas-group-mixin.d.mts +178 -0
  199. package/src/foundry/client/canvas/groups/effects.d.mts +248 -0
  200. package/src/foundry/client/canvas/groups/environment.d.mts +137 -0
  201. package/src/foundry/client/canvas/groups/hidden.d.mts +65 -0
  202. package/src/foundry/client/canvas/groups/interface.d.mts +110 -0
  203. package/src/foundry/client/canvas/groups/overlay.d.mts +40 -0
  204. package/src/foundry/client/canvas/groups/primary.d.mts +237 -0
  205. package/src/foundry/client/canvas/groups/rendered.d.mts +39 -0
  206. package/src/foundry/client/canvas/groups/visibility.d.mts +263 -0
  207. package/src/foundry/client/canvas/interaction/_module.d.mts +24 -0
  208. package/src/foundry/client/canvas/interaction/_types.d.mts +18 -0
  209. package/src/foundry/client/canvas/interaction/mouse-handler.d.mts +362 -0
  210. package/src/foundry/client/canvas/interaction/ping/alert.d.mts +38 -0
  211. package/src/foundry/client/canvas/interaction/ping/arrow.d.mts +41 -0
  212. package/src/foundry/client/canvas/interaction/ping/chevron.d.mts +98 -0
  213. package/src/foundry/client/canvas/interaction/ping/ping.d.mts +86 -0
  214. package/src/foundry/client/canvas/interaction/ping/pulse.d.mts +104 -0
  215. package/src/foundry/client/canvas/interaction/render-flags.d.mts +182 -0
  216. package/src/foundry/client/canvas/interaction/ruler/base-ruler.d.mts +17 -0
  217. package/src/foundry/client/canvas/interaction/ruler/ruler.d.mts +498 -0
  218. package/src/foundry/client/canvas/layers/_module.d.mts +36 -0
  219. package/src/foundry/client/canvas/layers/_types.d.mts +26 -0
  220. package/src/foundry/client/canvas/layers/base/canvas-layer.d.mts +91 -0
  221. package/src/foundry/client/canvas/layers/base/interaction-layer.d.mts +165 -0
  222. package/src/foundry/client/canvas/layers/base/placeables-layer.d.mts +714 -0
  223. package/src/foundry/client/canvas/layers/controls.d.mts +288 -0
  224. package/src/foundry/client/canvas/layers/drawings.d.mts +123 -0
  225. package/src/foundry/client/canvas/layers/effects/background-effects.d.mts +56 -0
  226. package/src/foundry/client/canvas/layers/effects/coloration-effects.d.mts +51 -0
  227. package/src/foundry/client/canvas/layers/effects/darkness-effects.d.mts +42 -0
  228. package/src/foundry/client/canvas/layers/effects/illumination-effects.d.mts +162 -0
  229. package/src/foundry/client/canvas/layers/effects/weather-effects.d.mts +316 -0
  230. package/src/foundry/client/canvas/layers/grid.d.mts +284 -0
  231. package/src/foundry/client/canvas/layers/lighting.d.mts +92 -0
  232. package/src/foundry/client/canvas/layers/masks/depth.d.mts +68 -0
  233. package/src/foundry/client/canvas/layers/masks/occlusion.d.mts +101 -0
  234. package/src/foundry/client/canvas/layers/masks/vision.d.mts +206 -0
  235. package/src/foundry/client/canvas/layers/notes.d.mts +138 -0
  236. package/src/foundry/client/canvas/layers/regions.d.mts +123 -0
  237. package/src/foundry/client/canvas/layers/sounds.d.mts +345 -0
  238. package/src/foundry/client/canvas/layers/templates.d.mts +79 -0
  239. package/src/foundry/client/canvas/layers/tiles.d.mts +136 -0
  240. package/src/foundry/client/canvas/layers/tokens.d.mts +218 -0
  241. package/src/foundry/client/canvas/layers/walls.d.mts +218 -0
  242. package/src/foundry/client/canvas/loader.d.mts +319 -0
  243. package/src/foundry/client/canvas/perception/_module.d.mts +19 -0
  244. package/src/foundry/client/canvas/perception/_types.d.mts +12 -0
  245. package/src/foundry/client/canvas/perception/detection-mode.d.mts +173 -0
  246. package/src/foundry/client/canvas/perception/detection-modes/darkvision.d.mts +26 -0
  247. package/src/foundry/client/canvas/perception/detection-modes/invisibility-perception.d.mts +29 -0
  248. package/src/foundry/client/canvas/perception/detection-modes/light-perception.d.mts +33 -0
  249. package/src/foundry/client/canvas/perception/detection-modes/super-perception.d.mts +27 -0
  250. package/src/foundry/client/canvas/perception/detection-modes/tremor-perception.d.mts +26 -0
  251. package/src/foundry/client/canvas/perception/fog.d.mts +157 -0
  252. package/src/foundry/client/canvas/perception/perception-manager.d.mts +163 -0
  253. package/src/foundry/client/canvas/perception/vision-mode.d.mts +249 -0
  254. package/src/foundry/client/canvas/placeables/_module.d.mts +20 -0
  255. package/src/foundry/client/canvas/placeables/_types.d.mts +16 -0
  256. package/src/foundry/client/canvas/placeables/drawing.d.mts +412 -0
  257. package/src/foundry/client/canvas/placeables/light.d.mts +266 -0
  258. package/src/foundry/client/canvas/placeables/note.d.mts +203 -0
  259. package/src/foundry/client/canvas/placeables/placeable-object.d.mts +772 -0
  260. package/src/foundry/client/canvas/placeables/region.d.mts +275 -0
  261. package/src/foundry/client/canvas/placeables/regions/_module.d.mts +7 -0
  262. package/src/foundry/client/canvas/placeables/regions/geometry.d.mts +40 -0
  263. package/src/foundry/client/canvas/placeables/regions/mesh.d.mts +75 -0
  264. package/src/foundry/client/canvas/placeables/sound.d.mts +271 -0
  265. package/src/foundry/client/canvas/placeables/template.d.mts +290 -0
  266. package/src/foundry/client/canvas/placeables/tile.d.mts +349 -0
  267. package/src/foundry/client/canvas/placeables/token.d.mts +1295 -0
  268. package/src/foundry/client/canvas/placeables/tokens/_module.d.mts +13 -0
  269. package/src/foundry/client/canvas/placeables/tokens/base-ruler.d.mts +77 -0
  270. package/src/foundry/client/canvas/placeables/tokens/ring-config.d.mts +255 -0
  271. package/src/foundry/client/canvas/placeables/tokens/ring-data.d.mts +149 -0
  272. package/src/foundry/client/canvas/placeables/tokens/ring.d.mts +290 -0
  273. package/src/foundry/client/canvas/placeables/tokens/ruler.d.mts +219 -0
  274. package/src/foundry/client/canvas/placeables/tokens/targets.d.mts +50 -0
  275. package/src/foundry/client/canvas/placeables/tokens/turn-marker-data.d.mts +17 -0
  276. package/src/foundry/client/canvas/placeables/tokens/turn-marker.d.mts +16 -0
  277. package/src/foundry/client/canvas/placeables/wall.d.mts +393 -0
  278. package/src/foundry/client/canvas/primary/_module.d.mts +12 -0
  279. package/src/foundry/client/canvas/primary/primary-canvas-container.d.mts +17 -0
  280. package/src/foundry/client/canvas/primary/primary-canvas-object.d.mts +201 -0
  281. package/src/foundry/client/canvas/primary/primary-graphics.d.mts +62 -0
  282. package/src/foundry/client/canvas/primary/primary-occludable-object.d.mts +205 -0
  283. package/src/foundry/client/canvas/primary/primary-particle-effect.d.mts +17 -0
  284. package/src/foundry/client/canvas/primary/primary-sprite-mesh.d.mts +203 -0
  285. package/src/foundry/client/canvas/rendering/_module.d.mts +10 -0
  286. package/src/foundry/client/canvas/rendering/batching/_module.d.mts +7 -0
  287. package/src/foundry/client/canvas/rendering/batching/batch-renderer.d.mts +136 -0
  288. package/src/foundry/client/canvas/rendering/batching/batch-shader-generator.d.mts +30 -0
  289. package/src/foundry/client/canvas/rendering/blend-modes.d.mts +49 -0
  290. package/src/foundry/client/canvas/rendering/filters/_module.d.mts +23 -0
  291. package/src/foundry/client/canvas/rendering/filters/_types.d.mts +4 -0
  292. package/src/foundry/client/canvas/rendering/filters/base-filter.d.mts +47 -0
  293. package/src/foundry/client/canvas/rendering/filters/base-mask-filter.d.mts +32 -0
  294. package/src/foundry/client/canvas/rendering/filters/blur.d.mts +194 -0
  295. package/src/foundry/client/canvas/rendering/filters/effects-masking.d.mts +144 -0
  296. package/src/foundry/client/canvas/rendering/filters/environment.d.mts +43 -0
  297. package/src/foundry/client/canvas/rendering/filters/glow-overlay.d.mts +78 -0
  298. package/src/foundry/client/canvas/rendering/filters/invisibility.d.mts +32 -0
  299. package/src/foundry/client/canvas/rendering/filters/outline-overlay.d.mts +87 -0
  300. package/src/foundry/client/canvas/rendering/filters/smaa/_types.d.mts +13 -0
  301. package/src/foundry/client/canvas/rendering/filters/smaa/blend.d.mts +19 -0
  302. package/src/foundry/client/canvas/rendering/filters/smaa/edges.d.mts +22 -0
  303. package/src/foundry/client/canvas/rendering/filters/smaa/smaa.d.mts +165 -0
  304. package/src/foundry/client/canvas/rendering/filters/smaa/weights.d.mts +22 -0
  305. package/src/foundry/client/canvas/rendering/filters/transition.d.mts +130 -0
  306. package/src/foundry/client/canvas/rendering/filters/visibility.d.mts +82 -0
  307. package/src/foundry/client/canvas/rendering/filters/vision-mask-filter.d.mts +38 -0
  308. package/src/foundry/client/canvas/rendering/filters/void.d.mts +20 -0
  309. package/src/foundry/client/canvas/rendering/filters/weather-occlusion-mask.d.mts +59 -0
  310. package/src/foundry/client/canvas/rendering/mixins/_module.d.mts +7 -0
  311. package/src/foundry/client/canvas/rendering/mixins/base-shader-mixin.d.mts +134 -0
  312. package/src/foundry/client/canvas/rendering/mixins/fragment-channel-mixin.d.mts +66 -0
  313. package/src/foundry/client/canvas/rendering/shaders/_module.d.mts +93 -0
  314. package/src/foundry/client/canvas/rendering/shaders/_types.d.mts +16 -0
  315. package/src/foundry/client/canvas/rendering/shaders/base-shader.d.mts +109 -0
  316. package/src/foundry/client/canvas/rendering/shaders/graphics/dash-line.d.mts +48 -0
  317. package/src/foundry/client/canvas/rendering/shaders/grid/grid.d.mts +122 -0
  318. package/src/foundry/client/canvas/rendering/shaders/lighting/background-lighting.d.mts +69 -0
  319. package/src/foundry/client/canvas/rendering/shaders/lighting/base-lighting.d.mts +179 -0
  320. package/src/foundry/client/canvas/rendering/shaders/lighting/coloration-lighting.d.mts +76 -0
  321. package/src/foundry/client/canvas/rendering/shaders/lighting/darkness-lighting.d.mts +76 -0
  322. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/bewitching-wave.d.mts +37 -0
  323. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/black-hole.d.mts +20 -0
  324. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/chroma.d.mts +25 -0
  325. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/dense-smoke.d.mts +20 -0
  326. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/emanation.d.mts +25 -0
  327. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/energy-field.d.mts +25 -0
  328. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/fairy-light.d.mts +42 -0
  329. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/flame.d.mts +60 -0
  330. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/fog.d.mts +25 -0
  331. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/force-grid.d.mts +25 -0
  332. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/ghost-light.d.mts +37 -0
  333. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/hexa-dome.d.mts +25 -0
  334. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/light-dome.d.mts +25 -0
  335. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/magical-gloom.d.mts +20 -0
  336. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/pulse.d.mts +49 -0
  337. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/radial-rainbow.d.mts +25 -0
  338. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/revolving-light.d.mts +39 -0
  339. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/roiling-mass.d.mts +20 -0
  340. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/siren-light.d.mts +66 -0
  341. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/smoke-patch.d.mts +37 -0
  342. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/star-light.d.mts +25 -0
  343. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/sunburst.d.mts +37 -0
  344. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/swirling-rainbow.d.mts +25 -0
  345. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/torch.d.mts +50 -0
  346. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/vortex.d.mts +42 -0
  347. package/src/foundry/client/canvas/rendering/shaders/lighting/effects/wave.d.mts +37 -0
  348. package/src/foundry/client/canvas/rendering/shaders/lighting/illumination-lighting.d.mts +79 -0
  349. package/src/foundry/client/canvas/rendering/shaders/region/adjust-darkness-level.d.mts +137 -0
  350. package/src/foundry/client/canvas/rendering/shaders/region/base.d.mts +80 -0
  351. package/src/foundry/client/canvas/rendering/shaders/region/highlight.d.mts +97 -0
  352. package/src/foundry/client/canvas/rendering/shaders/samplers/amplification.d.mts +58 -0
  353. package/src/foundry/client/canvas/rendering/shaders/samplers/base-sampler.d.mts +223 -0
  354. package/src/foundry/client/canvas/rendering/shaders/samplers/baseline-illumination.d.mts +40 -0
  355. package/src/foundry/client/canvas/rendering/shaders/samplers/color-adjustments.d.mts +65 -0
  356. package/src/foundry/client/canvas/rendering/shaders/samplers/colorize-brightness.d.mts +40 -0
  357. package/src/foundry/client/canvas/rendering/shaders/samplers/fog-of-war.d.mts +27 -0
  358. package/src/foundry/client/canvas/rendering/shaders/samplers/primary/depth.d.mts +111 -0
  359. package/src/foundry/client/canvas/rendering/shaders/samplers/primary/occlusion.d.mts +109 -0
  360. package/src/foundry/client/canvas/rendering/shaders/samplers/primary/primary.d.mts +38 -0
  361. package/src/foundry/client/canvas/rendering/shaders/samplers/primary/token-ring.d.mts +79 -0
  362. package/src/foundry/client/canvas/rendering/shaders/vision/background-vision.d.mts +67 -0
  363. package/src/foundry/client/canvas/rendering/shaders/vision/base-vision.d.mts +35 -0
  364. package/src/foundry/client/canvas/rendering/shaders/vision/coloration-vision.d.mts +67 -0
  365. package/src/foundry/client/canvas/rendering/shaders/vision/effects/amplification.d.mts +34 -0
  366. package/src/foundry/client/canvas/rendering/shaders/vision/effects/wave.d.mts +62 -0
  367. package/src/foundry/client/canvas/rendering/shaders/vision/illumination-vision.d.mts +67 -0
  368. package/src/foundry/client/canvas/rendering/shaders/weather/base-weather.d.mts +120 -0
  369. package/src/foundry/client/canvas/rendering/shaders/weather/effect.d.mts +57 -0
  370. package/src/foundry/client/canvas/rendering/shaders/weather/fog.d.mts +52 -0
  371. package/src/foundry/client/canvas/rendering/shaders/weather/rain.d.mts +44 -0
  372. package/src/foundry/client/canvas/rendering/shaders/weather/snow.d.mts +36 -0
  373. package/src/foundry/client/canvas/scene-manager.d.mts +106 -0
  374. package/src/foundry/client/canvas/sources/base-effect-source.d.mts +297 -0
  375. package/src/foundry/client/canvas/sources/base-light-source.d.mts +306 -0
  376. package/src/foundry/client/canvas/sources/global-light-source.d.mts +141 -0
  377. package/src/foundry/client/canvas/sources/point-darkness-source.d.mts +160 -0
  378. package/src/foundry/client/canvas/sources/point-effect-source.d.mts +190 -0
  379. package/src/foundry/client/canvas/sources/point-light-source.d.mts +131 -0
  380. package/src/foundry/client/canvas/sources/point-movement-source.d.mts +65 -0
  381. package/src/foundry/client/canvas/sources/point-sound-source.d.mts +92 -0
  382. package/src/foundry/client/canvas/sources/point-vision-source.d.mts +357 -0
  383. package/src/foundry/client/canvas/sources/rendered-effect-source.d.mts +471 -0
  384. package/src/foundry/client/canvas/texture-extractor.d.mts +171 -0
  385. package/src/foundry/client/canvas/workers/_module.d.mts +6 -0
  386. package/src/foundry/client/canvas/workers/texture-worker.d.mts +147 -0
  387. package/src/foundry/client/client.d.mts +2489 -0
  388. package/src/foundry/client/config.d.mts +2425 -1820
  389. package/src/foundry/client/data/_module.d.mts +13 -0
  390. package/src/foundry/client/data/calendar.d.mts +341 -0
  391. package/src/foundry/client/data/client-backend.d.mts +52 -0
  392. package/src/foundry/client/data/region-behaviors/adjust-darkness-level.d.mts +56 -0
  393. package/src/foundry/client/data/region-behaviors/base.d.mts +60 -0
  394. package/src/foundry/client/data/region-behaviors/display-scrolling-text.d.mts +64 -0
  395. package/src/foundry/client/data/region-behaviors/teleport-token.d.mts +31 -0
  396. package/src/foundry/client/data/region-behaviors/toggle-behavior.d.mts +31 -0
  397. package/src/foundry/client/data/region-shapes/_module.d.mts +7 -0
  398. package/src/foundry/client/data/region-shapes/polygon-tree.d.mts +132 -0
  399. package/src/foundry/client/data/region-shapes/shape.d.mts +129 -0
  400. package/src/foundry/client/data/terrain-data.d.mts +22 -0
  401. package/src/foundry/client/dice/_types.d.mts +65 -0
  402. package/src/foundry/client/dice/parser.d.mts +192 -0
  403. package/src/foundry/client/dice/roll.d.mts +663 -0
  404. package/src/foundry/client/dice/terms/coin.d.mts +71 -0
  405. package/src/foundry/client/dice/terms/dice.d.mts +424 -0
  406. package/src/foundry/client/dice/terms/die.d.mts +248 -0
  407. package/src/foundry/client/dice/terms/fate.d.mts +57 -0
  408. package/src/foundry/client/dice/terms/function.d.mts +106 -0
  409. package/src/foundry/client/dice/terms/numeric.d.mts +54 -0
  410. package/src/foundry/client/dice/terms/operator.d.mts +55 -0
  411. package/src/foundry/client/dice/terms/parenthetical.d.mts +104 -0
  412. package/src/foundry/client/dice/terms/pool.d.mts +272 -0
  413. package/src/foundry/client/dice/terms/string.d.mts +34 -0
  414. package/src/foundry/client/dice/terms/term.d.mts +178 -0
  415. package/src/foundry/client/dice/twister.d.mts +134 -0
  416. package/src/foundry/client/documents/_module.d.mts +51 -0
  417. package/src/foundry/client/documents/_types.d.mts +134 -0
  418. package/src/foundry/client/documents/abstract/_module.d.mts +10 -0
  419. package/src/foundry/client/documents/abstract/canvas-document.d.mts +67 -0
  420. package/src/foundry/client/documents/abstract/client-document.d.mts +659 -0
  421. package/src/foundry/client/documents/abstract/directory-collection-mixin.d.mts +132 -0
  422. package/src/foundry/client/documents/abstract/document-collection.d.mts +243 -0
  423. package/src/foundry/client/documents/abstract/world-collection.d.mts +192 -0
  424. package/src/foundry/client/documents/active-effect.d.mts +977 -0
  425. package/src/foundry/client/documents/actor-delta.d.mts +769 -0
  426. package/src/foundry/client/documents/actor.d.mts +1036 -0
  427. package/src/foundry/client/documents/adventure.d.mts +569 -0
  428. package/src/foundry/client/documents/ambient-light.d.mts +457 -0
  429. package/src/foundry/client/documents/ambient-sound.d.mts +511 -0
  430. package/src/foundry/client/documents/card.d.mts +679 -0
  431. package/src/foundry/client/documents/cards.d.mts +1017 -0
  432. package/src/foundry/client/documents/chat-message.d.mts +831 -0
  433. package/src/foundry/client/documents/collections/_module.d.mts +23 -0
  434. package/src/foundry/client/documents/collections/actors.d.mts +51 -0
  435. package/src/foundry/client/documents/collections/card-stacks.d.mts +25 -0
  436. package/src/foundry/client/documents/collections/chat-messages.d.mts +48 -0
  437. package/src/foundry/client/documents/collections/combat-encounters.d.mts +56 -0
  438. package/src/foundry/client/documents/collections/compendium-collection.d.mts +491 -0
  439. package/src/foundry/client/documents/collections/compendium-folders.d.mts +30 -0
  440. package/src/foundry/client/documents/collections/compendium-packs.d.mts +30 -0
  441. package/src/foundry/client/documents/collections/fog-explorations.d.mts +32 -0
  442. package/src/foundry/client/documents/collections/folders.d.mts +49 -0
  443. package/src/foundry/client/documents/collections/items.d.mts +27 -0
  444. package/src/foundry/client/documents/collections/journal.d.mts +78 -0
  445. package/src/foundry/client/documents/collections/macros.d.mts +34 -0
  446. package/src/foundry/client/documents/collections/playlists.d.mts +45 -0
  447. package/src/foundry/client/documents/collections/roll-tables.d.mts +34 -0
  448. package/src/foundry/client/documents/collections/scenes.d.mts +63 -0
  449. package/src/foundry/client/documents/collections/users.d.mts +72 -0
  450. package/src/foundry/client/documents/collections/world-settings.d.mts +44 -0
  451. package/src/foundry/client/documents/combat.d.mts +1056 -0
  452. package/src/foundry/client/documents/combatant-group.d.mts +509 -0
  453. package/src/foundry/client/documents/combatant.d.mts +609 -0
  454. package/src/foundry/client/documents/drawing.d.mts +580 -0
  455. package/src/foundry/client/documents/fog-exploration.d.mts +495 -0
  456. package/src/foundry/client/documents/folder.d.mts +659 -0
  457. package/src/foundry/client/documents/item.d.mts +736 -0
  458. package/src/foundry/client/documents/journal-entry-category.d.mts +413 -0
  459. package/src/foundry/client/documents/journal-entry-page.d.mts +839 -0
  460. package/src/foundry/client/documents/journal-entry.d.mts +694 -0
  461. package/src/foundry/client/documents/macro.d.mts +610 -0
  462. package/src/foundry/client/documents/measured-template.d.mts +509 -0
  463. package/src/foundry/client/documents/note.d.mts +526 -0
  464. package/src/foundry/client/documents/playlist-sound.d.mts +558 -0
  465. package/src/foundry/client/documents/playlist.d.mts +830 -0
  466. package/src/foundry/client/documents/region-behavior.d.mts +524 -0
  467. package/src/foundry/client/documents/region.d.mts +898 -0
  468. package/src/foundry/client/documents/roll-table.d.mts +916 -0
  469. package/src/foundry/client/documents/scene.d.mts +1441 -0
  470. package/src/foundry/client/documents/setting.d.mts +449 -0
  471. package/src/foundry/client/documents/table-result.d.mts +526 -0
  472. package/src/foundry/client/documents/tile.d.mts +524 -0
  473. package/src/foundry/client/documents/token.d.mts +2168 -0
  474. package/src/foundry/client/documents/user.d.mts +785 -0
  475. package/src/foundry/client/documents/wall.d.mts +599 -0
  476. package/src/foundry/client/game.d.mts +240 -213
  477. package/src/foundry/client/head.d.mts +15 -14
  478. package/src/foundry/client/helpers/_module.d.mts +16 -0
  479. package/src/foundry/client/helpers/_types.d.mts +17 -0
  480. package/src/foundry/client/helpers/client-issues.d.mts +125 -0
  481. package/src/foundry/client/helpers/client-settings.d.mts +480 -0
  482. package/src/foundry/client/helpers/document-index.d.mts +173 -0
  483. package/src/foundry/client/helpers/hooks.d.mts +171 -0
  484. package/src/foundry/client/helpers/interaction/_module.d.mts +11 -0
  485. package/src/foundry/client/helpers/interaction/client-keybindings.d.mts +433 -0
  486. package/src/foundry/client/helpers/interaction/clipboard-helper.d.mts +20 -0
  487. package/src/foundry/client/helpers/interaction/gamepad-manager.d.mts +61 -0
  488. package/src/foundry/client/helpers/interaction/keyboard-manager.d.mts +331 -0
  489. package/src/foundry/client/helpers/interaction/mouse-manager.d.mts +42 -0
  490. package/src/foundry/client/helpers/interaction/tooltip-manager.d.mts +268 -0
  491. package/src/foundry/client/helpers/localization.d.mts +240 -0
  492. package/src/foundry/client/helpers/media/_module.d.mts +8 -0
  493. package/src/foundry/client/helpers/media/compendium-art.d.mts +107 -0
  494. package/src/foundry/client/helpers/media/image-helper.d.mts +235 -0
  495. package/src/foundry/client/helpers/media/video-helper.d.mts +161 -0
  496. package/src/foundry/client/helpers/socket-interface.d.mts +74 -0
  497. package/src/foundry/client/helpers/time.d.mts +87 -0
  498. package/src/foundry/client/helpers/workers.d.mts +145 -0
  499. package/src/foundry/client/hooks.d.mts +1196 -972
  500. package/src/foundry/client/index.d.mts +0 -7
  501. package/src/foundry/client/nue/tour.d.mts +280 -0
  502. package/src/foundry/client/nue/tours/canvas-tour.d.mts +15 -0
  503. package/src/foundry/client/nue/tours/setup-tour.d.mts +31 -0
  504. package/src/foundry/client/nue/tours/sidebar-tour.d.mts +13 -0
  505. package/src/foundry/client/packages/_module.d.mts +22 -0
  506. package/src/foundry/client/packages/_types.d.mts +13 -0
  507. package/src/foundry/client/packages/client-package.d.mts +154 -0
  508. package/src/foundry/client/packages/module.d.mts +87 -0
  509. package/src/foundry/client/packages/system.d.mts +151 -0
  510. package/src/foundry/client/packages/world.d.mts +155 -0
  511. package/src/foundry/client/utils/_module.d.mts +25 -0
  512. package/src/foundry/client/utils/_types.d.mts +3 -0
  513. package/src/foundry/client/utils/helpers.d.mts +213 -0
  514. package/src/foundry/common/_types.d.mts +17 -6
  515. package/src/foundry/common/abstract/_module.d.mts +1 -0
  516. package/src/foundry/common/abstract/_types.d.mts +58 -52
  517. package/src/foundry/common/abstract/backend.d.mts +36 -18
  518. package/src/foundry/common/abstract/data.d.mts +285 -201
  519. package/src/foundry/common/abstract/document.d.mts +1545 -595
  520. package/src/foundry/common/abstract/embedded-collection-delta.d.mts +1 -1
  521. package/src/foundry/common/abstract/embedded-collection.d.mts +10 -5
  522. package/src/foundry/common/abstract/singleton-collection.d.mts +1 -1
  523. package/src/foundry/common/abstract/socket.d.mts +1 -1
  524. package/src/foundry/common/abstract/type-data.d.mts +137 -126
  525. package/src/foundry/common/config.d.mts +9 -3
  526. package/src/foundry/common/constants.d.mts +628 -158
  527. package/src/foundry/common/data/_module.d.mts +1 -0
  528. package/src/foundry/common/data/_types.d.mts +16 -13
  529. package/src/foundry/common/data/data.d.mts +235 -94
  530. package/src/foundry/common/data/fields.d.mts +2351 -1118
  531. package/src/foundry/common/data/validation-failure.d.mts +36 -21
  532. package/src/foundry/common/data/validators.d.mts +2 -2
  533. package/src/foundry/common/documents/_module.d.mts +2 -0
  534. package/src/foundry/common/documents/_types.d.mts +89 -90
  535. package/src/foundry/common/documents/active-effect.d.mts +323 -202
  536. package/src/foundry/common/documents/actor-delta.d.mts +399 -79
  537. package/src/foundry/common/documents/actor.d.mts +358 -111
  538. package/src/foundry/common/documents/adventure.d.mts +292 -140
  539. package/src/foundry/common/documents/ambient-light.d.mts +286 -76
  540. package/src/foundry/common/documents/ambient-sound.d.mts +286 -110
  541. package/src/foundry/common/documents/card.d.mts +303 -190
  542. package/src/foundry/common/documents/cards.d.mts +353 -127
  543. package/src/foundry/common/documents/chat-message.d.mts +320 -171
  544. package/src/foundry/common/documents/combat.d.mts +351 -96
  545. package/src/foundry/common/documents/combatant-group.d.mts +328 -0
  546. package/src/foundry/common/documents/combatant.d.mts +318 -89
  547. package/src/foundry/common/documents/drawing.d.mts +315 -206
  548. package/src/foundry/common/documents/fog-exploration.d.mts +292 -70
  549. package/src/foundry/common/documents/folder.d.mts +291 -85
  550. package/src/foundry/common/documents/item.d.mts +357 -107
  551. package/src/foundry/common/documents/journal-entry-category.d.mts +316 -0
  552. package/src/foundry/common/documents/journal-entry-page.d.mts +309 -188
  553. package/src/foundry/common/documents/journal-entry.d.mts +343 -69
  554. package/src/foundry/common/documents/macro.d.mts +310 -141
  555. package/src/foundry/common/documents/measured-template.d.mts +312 -136
  556. package/src/foundry/common/documents/note.d.mts +297 -153
  557. package/src/foundry/common/documents/playlist-sound.d.mts +297 -104
  558. package/src/foundry/common/documents/playlist.d.mts +339 -132
  559. package/src/foundry/common/documents/region-behavior.d.mts +328 -66
  560. package/src/foundry/common/documents/region.d.mts +326 -89
  561. package/src/foundry/common/documents/roll-table.d.mts +336 -105
  562. package/src/foundry/common/documents/scene.d.mts +440 -357
  563. package/src/foundry/common/documents/setting.d.mts +274 -54
  564. package/src/foundry/common/documents/table-result.d.mts +324 -105
  565. package/src/foundry/common/documents/tile.d.mts +331 -173
  566. package/src/foundry/common/documents/token.d.mts +479 -455
  567. package/src/foundry/common/documents/user.d.mts +286 -174
  568. package/src/foundry/common/documents/wall.d.mts +292 -157
  569. package/src/foundry/common/grid/_types.d.mts +22 -17
  570. package/src/foundry/common/grid/base.d.mts +162 -52
  571. package/src/foundry/common/grid/grid-hex.d.mts +1 -0
  572. package/src/foundry/common/grid/gridless.d.mts +4 -3
  573. package/src/foundry/common/grid/hexagonal.d.mts +50 -24
  574. package/src/foundry/common/grid/square.d.mts +5 -4
  575. package/src/foundry/common/packages/_module.d.mts +5 -5
  576. package/src/foundry/common/packages/_types.d.mts +2 -0
  577. package/src/foundry/common/packages/base-module.d.mts +5 -24
  578. package/src/foundry/common/packages/base-package.d.mts +59 -32
  579. package/src/foundry/common/packages/base-system.d.mts +44 -78
  580. package/src/foundry/common/packages/base-world.d.mts +18 -62
  581. package/src/foundry/common/packages/sub-types.d.mts +7 -9
  582. package/src/foundry/common/primitives/array.d.mts +4 -4
  583. package/src/foundry/common/primitives/math.d.mts +9 -1
  584. package/src/foundry/common/primitives/number.d.mts +2 -2
  585. package/src/foundry/common/primitives/set.d.mts +17 -14
  586. package/src/foundry/common/primitives/string.d.mts +1 -1
  587. package/src/foundry/common/prosemirror/_module.d.mts +44 -28
  588. package/src/foundry/common/prosemirror/_types.d.mts +18 -11
  589. package/src/foundry/common/prosemirror/click-handler.d.mts +8 -5
  590. package/src/foundry/common/prosemirror/content-link-plugin.d.mts +28 -8
  591. package/src/foundry/common/prosemirror/dirty-plugin.d.mts +2 -2
  592. package/src/foundry/common/prosemirror/dom-parser.d.mts +4 -4
  593. package/src/foundry/common/prosemirror/dropdown.d.mts +51 -19
  594. package/src/foundry/common/prosemirror/extensions.d.mts +5 -2
  595. package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +43 -56
  596. package/src/foundry/common/prosemirror/image-plugin.d.mts +23 -18
  597. package/src/foundry/common/prosemirror/input-rules.d.mts +20 -15
  598. package/src/foundry/common/prosemirror/keymaps.d.mts +24 -21
  599. package/src/foundry/common/prosemirror/menu.d.mts +124 -85
  600. package/src/foundry/common/prosemirror/paste-transformer.d.mts +7 -13
  601. package/src/foundry/common/prosemirror/plugin.d.mts +11 -7
  602. package/src/foundry/common/prosemirror/schema/_types.d.mts +16 -0
  603. package/src/foundry/common/prosemirror/schema/attribute-capture.d.mts +20 -19
  604. package/src/foundry/common/prosemirror/schema/core.d.mts +7 -45
  605. package/src/foundry/common/prosemirror/schema/image-link-node.d.mts +15 -9
  606. package/src/foundry/common/prosemirror/schema/image-node.d.mts +11 -7
  607. package/src/foundry/common/prosemirror/schema/link-mark.d.mts +16 -11
  608. package/src/foundry/common/prosemirror/schema/lists.d.mts +5 -27
  609. package/src/foundry/common/prosemirror/schema/marks.d.mts +19 -44
  610. package/src/foundry/common/prosemirror/schema/other.d.mts +43 -149
  611. package/src/foundry/common/prosemirror/schema/schema-definition.d.mts +30 -9
  612. package/src/foundry/common/prosemirror/schema/secret-node.d.mts +8 -8
  613. package/src/foundry/common/prosemirror/schema/tables.d.mts +18 -90
  614. package/src/foundry/common/prosemirror/schema/utils.d.mts +3 -1
  615. package/src/foundry/common/prosemirror/schema.d.mts +51 -16
  616. package/src/foundry/common/prosemirror/string-serializer.d.mts +59 -40
  617. package/src/foundry/common/prosemirror/util.d.mts +38 -18
  618. package/src/foundry/common/utils/_module.d.mts +5 -2
  619. package/src/foundry/common/utils/_types.d.mts +27 -0
  620. package/src/foundry/common/utils/bitmask.d.mts +11 -7
  621. package/src/foundry/common/utils/collection.d.mts +63 -28
  622. package/src/foundry/common/utils/color.d.mts +11 -2
  623. package/src/foundry/common/utils/event-emitter.d.mts +43 -21
  624. package/src/foundry/common/utils/geometry.d.mts +13 -10
  625. package/src/foundry/common/utils/helpers.d.mts +321 -265
  626. package/src/foundry/common/utils/http.d.mts +37 -29
  627. package/src/foundry/common/utils/iterable-weak-map.d.mts +43 -30
  628. package/src/foundry/common/utils/iterable-weak-set.d.mts +21 -8
  629. package/src/foundry/common/utils/logging.d.mts +16 -9
  630. package/src/foundry/common/utils/semaphore.d.mts +19 -29
  631. package/src/foundry/common/utils/string-tree.d.mts +56 -47
  632. package/src/foundry/common/utils/word-tree.d.mts +56 -32
  633. package/src/foundry/index.d.mts +0 -2
  634. package/src/foundry/public/scripts/clipper/clipper.d.mts +3 -2
  635. package/src/foundry/public/scripts/index.d.mts +1 -0
  636. package/src/foundry/public/scripts/ktx2/basis_transcoder.d.mts +5 -0
  637. package/src/foundry/public/scripts/ktx2/index.d.mts +2 -0
  638. package/src/foundry/public/scripts/ktx2/pixi-ktx2.min.d.mts +5 -0
  639. package/src/foundry/public/scripts/workers/image-compressor.d.mts +12 -4
  640. package/src/types/augments/particles.d.mts +1 -1
  641. package/src/types/augments/pixi.d.mts +37 -28
  642. package/src/types/augments/smooth.d.mts +1 -1
  643. package/src/types/augments/socket.io-client.d.mts +0 -1
  644. package/src/types/augments/tinyMCE.d.mts +1 -1
  645. package/src/types/config.d.mts +15 -18
  646. package/src/types/documentConfiguration.d.mts +288 -602
  647. package/src/types/lib.d.mts +4 -4
  648. package/src/types/workers/image-compressor.d.mts +102 -67
  649. package/src/utils/index.d.mts +455 -137
  650. package/tsconfig.base.json +24 -0
  651. package/tsconfig.json +12 -0
  652. package/src/foundry/client/apps/app.d.mts +0 -607
  653. package/src/foundry/client/apps/av/av-config.d.mts +0 -93
  654. package/src/foundry/client/apps/av/camera-popout.d.mts +0 -49
  655. package/src/foundry/client/apps/av/cameras.d.mts +0 -194
  656. package/src/foundry/client/apps/av/index.d.mts +0 -3
  657. package/src/foundry/client/apps/dialogs/folder-export.d.mts +0 -16
  658. package/src/foundry/client/apps/dialogs/index.d.mts +0 -1
  659. package/src/foundry/client/apps/dice/dice-config.d.mts +0 -45
  660. package/src/foundry/client/apps/dice/index.d.mts +0 -1
  661. package/src/foundry/client/apps/form.d.mts +0 -493
  662. package/src/foundry/client/apps/forms/actor.d.mts +0 -176
  663. package/src/foundry/client/apps/forms/adventure-exporter.d.mts +0 -132
  664. package/src/foundry/client/apps/forms/adventure-importer.d.mts +0 -85
  665. package/src/foundry/client/apps/forms/base-sheet.d.mts +0 -46
  666. package/src/foundry/client/apps/forms/card-config.d.mts +0 -48
  667. package/src/foundry/client/apps/forms/cards-config.d.mts +0 -142
  668. package/src/foundry/client/apps/forms/combat-config.d.mts +0 -51
  669. package/src/foundry/client/apps/forms/combatant-config.d.mts +0 -45
  670. package/src/foundry/client/apps/forms/default-sheets-config.d.mts +0 -46
  671. package/src/foundry/client/apps/forms/effect-config.d.mts +0 -77
  672. package/src/foundry/client/apps/forms/folder-config.d.mts +0 -60
  673. package/src/foundry/client/apps/forms/fonts.d.mts +0 -168
  674. package/src/foundry/client/apps/forms/grid-config.d.mts +0 -139
  675. package/src/foundry/client/apps/forms/image-popout.d.mts +0 -179
  676. package/src/foundry/client/apps/forms/index.d.mts +0 -26
  677. package/src/foundry/client/apps/forms/item.d.mts +0 -58
  678. package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +0 -313
  679. package/src/foundry/client/apps/forms/journal-sheet.d.mts +0 -313
  680. package/src/foundry/client/apps/forms/macro-config.d.mts +0 -59
  681. package/src/foundry/client/apps/forms/measure-template.d.mts +0 -57
  682. package/src/foundry/client/apps/forms/ownership.d.mts +0 -66
  683. package/src/foundry/client/apps/forms/playlist-config.d.mts +0 -46
  684. package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +0 -63
  685. package/src/foundry/client/apps/forms/roll-table-config.d.mts +0 -162
  686. package/src/foundry/client/apps/forms/scene-config.d.mts +0 -156
  687. package/src/foundry/client/apps/forms/sheet-config.d.mts +0 -191
  688. package/src/foundry/client/apps/forms/user-config.d.mts +0 -72
  689. package/src/foundry/client/apps/hud/chatbubble.d.mts +0 -120
  690. package/src/foundry/client/apps/hud/container.d.mts +0 -54
  691. package/src/foundry/client/apps/hud/controls.d.mts +0 -171
  692. package/src/foundry/client/apps/hud/hotbar.d.mts +0 -174
  693. package/src/foundry/client/apps/hud/hud.d.mts +0 -87
  694. package/src/foundry/client/apps/hud/index.d.mts +0 -9
  695. package/src/foundry/client/apps/hud/menu.d.mts +0 -84
  696. package/src/foundry/client/apps/hud/navigation.d.mts +0 -121
  697. package/src/foundry/client/apps/hud/pause.d.mts +0 -37
  698. package/src/foundry/client/apps/hud/players.d.mts +0 -87
  699. package/src/foundry/client/apps/i18n.d.mts +0 -221
  700. package/src/foundry/client/apps/index.d.mts +0 -11
  701. package/src/foundry/client/apps/placeables/drawing-config.d.mts +0 -80
  702. package/src/foundry/client/apps/placeables/drawing-hud.d.mts +0 -31
  703. package/src/foundry/client/apps/placeables/index.d.mts +0 -10
  704. package/src/foundry/client/apps/placeables/light-config.d.mts +0 -100
  705. package/src/foundry/client/apps/placeables/note-config.d.mts +0 -65
  706. package/src/foundry/client/apps/placeables/sound-config.d.mts +0 -44
  707. package/src/foundry/client/apps/placeables/tile-config.d.mts +0 -54
  708. package/src/foundry/client/apps/placeables/tile-hud.d.mts +0 -42
  709. package/src/foundry/client/apps/placeables/token-config.d.mts +0 -256
  710. package/src/foundry/client/apps/placeables/token-hud.d.mts +0 -139
  711. package/src/foundry/client/apps/placeables/wall-config.d.mts +0 -64
  712. package/src/foundry/client/apps/sidebar/apps/chat-popout.d.mts +0 -39
  713. package/src/foundry/client/apps/sidebar/apps/client-settings.d.mts +0 -98
  714. package/src/foundry/client/apps/sidebar/apps/compendium.d.mts +0 -92
  715. package/src/foundry/client/apps/sidebar/apps/index.d.mts +0 -10
  716. package/src/foundry/client/apps/sidebar/apps/invitation-links.d.mts +0 -32
  717. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +0 -181
  718. package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +0 -135
  719. package/src/foundry/client/apps/sidebar/apps/permission-config.d.mts +0 -72
  720. package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +0 -121
  721. package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +0 -54
  722. package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +0 -57
  723. package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +0 -283
  724. package/src/foundry/client/apps/sidebar/document-directory.d.mts +0 -170
  725. package/src/foundry/client/apps/sidebar/index.d.mts +0 -7
  726. package/src/foundry/client/apps/sidebar/package-configuration.d.mts +0 -86
  727. package/src/foundry/client/apps/sidebar/sidebar-tab.d.mts +0 -80
  728. package/src/foundry/client/apps/sidebar/sidebar.d.mts +0 -100
  729. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +0 -29
  730. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +0 -21
  731. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +0 -371
  732. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +0 -165
  733. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +0 -111
  734. package/src/foundry/client/apps/sidebar/tabs/index.d.mts +0 -12
  735. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +0 -23
  736. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +0 -22
  737. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +0 -25
  738. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +0 -283
  739. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +0 -22
  740. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +0 -43
  741. package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +0 -90
  742. package/src/foundry/client/apps/templates.d.mts +0 -486
  743. package/src/foundry/client/av/clients/index.d.mts +0 -1
  744. package/src/foundry/client/av/index.d.mts +0 -4
  745. package/src/foundry/client/core/clipboard.d.mts +0 -20
  746. package/src/foundry/client/core/document-index.d.mts +0 -118
  747. package/src/foundry/client/core/gamepad.d.mts +0 -76
  748. package/src/foundry/client/core/hooks.d.mts +0 -132
  749. package/src/foundry/client/core/image.d.mts +0 -238
  750. package/src/foundry/client/core/index.d.mts +0 -21
  751. package/src/foundry/client/core/issues.d.mts +0 -102
  752. package/src/foundry/client/core/keybindings.d.mts +0 -413
  753. package/src/foundry/client/core/keyboard.d.mts +0 -271
  754. package/src/foundry/client/core/mouse.d.mts +0 -28
  755. package/src/foundry/client/core/nue.d.mts +0 -38
  756. package/src/foundry/client/core/packages.d.mts +0 -208
  757. package/src/foundry/client/core/settings.d.mts +0 -364
  758. package/src/foundry/client/core/socket.d.mts +0 -62
  759. package/src/foundry/client/core/sorting.d.mts +0 -76
  760. package/src/foundry/client/core/time.d.mts +0 -73
  761. package/src/foundry/client/core/tooltip.d.mts +0 -198
  762. package/src/foundry/client/core/tour.d.mts +0 -279
  763. package/src/foundry/client/core/tours.d.mts +0 -22
  764. package/src/foundry/client/core/utils.d.mts +0 -94
  765. package/src/foundry/client/core/video.d.mts +0 -161
  766. package/src/foundry/client/core/workers.d.mts +0 -128
  767. package/src/foundry/client/data/abstract/canvas-document.d.mts +0 -80
  768. package/src/foundry/client/data/abstract/client-document.d.mts +0 -726
  769. package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +0 -141
  770. package/src/foundry/client/data/abstract/document-collection.d.mts +0 -218
  771. package/src/foundry/client/data/abstract/index.d.mts +0 -5
  772. package/src/foundry/client/data/abstract/world-collection.d.mts +0 -163
  773. package/src/foundry/client/data/collections/actors.d.mts +0 -58
  774. package/src/foundry/client/data/collections/cards.d.mts +0 -21
  775. package/src/foundry/client/data/collections/combats.d.mts +0 -52
  776. package/src/foundry/client/data/collections/compendium-collection.d.mts +0 -461
  777. package/src/foundry/client/data/collections/compendium-folders.d.mts +0 -27
  778. package/src/foundry/client/data/collections/compendium-packs.d.mts +0 -27
  779. package/src/foundry/client/data/collections/fog.d.mts +0 -26
  780. package/src/foundry/client/data/collections/folder.d.mts +0 -42
  781. package/src/foundry/client/data/collections/index.d.mts +0 -17
  782. package/src/foundry/client/data/collections/items.d.mts +0 -23
  783. package/src/foundry/client/data/collections/journal.d.mts +0 -73
  784. package/src/foundry/client/data/collections/macros.d.mts +0 -41
  785. package/src/foundry/client/data/collections/messages.d.mts +0 -44
  786. package/src/foundry/client/data/collections/playlists.d.mts +0 -41
  787. package/src/foundry/client/data/collections/scenes.d.mts +0 -77
  788. package/src/foundry/client/data/collections/settings.d.mts +0 -38
  789. package/src/foundry/client/data/collections/tables.d.mts +0 -30
  790. package/src/foundry/client/data/collections/users.d.mts +0 -59
  791. package/src/foundry/client/data/documents/active-effect.d.mts +0 -389
  792. package/src/foundry/client/data/documents/actor-delta.d.mts +0 -99
  793. package/src/foundry/client/data/documents/actor.d.mts +0 -318
  794. package/src/foundry/client/data/documents/adventure.d.mts +0 -106
  795. package/src/foundry/client/data/documents/ambient-light.d.mts +0 -44
  796. package/src/foundry/client/data/documents/ambient-sound.d.mts +0 -31
  797. package/src/foundry/client/data/documents/card.d.mts +0 -128
  798. package/src/foundry/client/data/documents/cards.d.mts +0 -349
  799. package/src/foundry/client/data/documents/chat-message.d.mts +0 -231
  800. package/src/foundry/client/data/documents/combat.d.mts +0 -329
  801. package/src/foundry/client/data/documents/combatant.d.mts +0 -115
  802. package/src/foundry/client/data/documents/drawing.d.mts +0 -36
  803. package/src/foundry/client/data/documents/fog-exploration.d.mts +0 -72
  804. package/src/foundry/client/data/documents/folder.d.mts +0 -153
  805. package/src/foundry/client/data/documents/index.d.mts +0 -32
  806. package/src/foundry/client/data/documents/item.d.mts +0 -71
  807. package/src/foundry/client/data/documents/journal-entry-page.d.mts +0 -232
  808. package/src/foundry/client/data/documents/journal-entry.d.mts +0 -82
  809. package/src/foundry/client/data/documents/macro.d.mts +0 -86
  810. package/src/foundry/client/data/documents/measured-template.d.mts +0 -41
  811. package/src/foundry/client/data/documents/note.d.mts +0 -47
  812. package/src/foundry/client/data/documents/playlist-sound.d.mts +0 -128
  813. package/src/foundry/client/data/documents/playlist.d.mts +0 -207
  814. package/src/foundry/client/data/documents/region-behavior.d.mts +0 -78
  815. package/src/foundry/client/data/documents/region.d.mts +0 -160
  816. package/src/foundry/client/data/documents/scene.d.mts +0 -264
  817. package/src/foundry/client/data/documents/setting.d.mts +0 -55
  818. package/src/foundry/client/data/documents/table-result.d.mts +0 -42
  819. package/src/foundry/client/data/documents/table.d.mts +0 -322
  820. package/src/foundry/client/data/documents/tile.d.mts +0 -33
  821. package/src/foundry/client/data/documents/token.d.mts +0 -347
  822. package/src/foundry/client/data/documents/user.d.mts +0 -165
  823. package/src/foundry/client/data/documents/wall.d.mts +0 -31
  824. package/src/foundry/client/data/index.d.mts +0 -3
  825. package/src/foundry/client/pixi/board.d.mts +0 -821
  826. package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +0 -154
  827. package/src/foundry/client/pixi/core/containers/cached-container.d.mts +0 -136
  828. package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +0 -34
  829. package/src/foundry/client/pixi/core/containers/index.d.mts +0 -8
  830. package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +0 -72
  831. package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +0 -53
  832. package/src/foundry/client/pixi/core/containers/quadtree.d.mts +0 -256
  833. package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +0 -369
  834. package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +0 -39
  835. package/src/foundry/client/pixi/core/index.d.mts +0 -4
  836. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +0 -236
  837. package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +0 -128
  838. package/src/foundry/client/pixi/core/interaction/index.d.mts +0 -8
  839. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +0 -358
  840. package/src/foundry/client/pixi/core/interaction/ping.d.mts +0 -81
  841. package/src/foundry/client/pixi/core/interaction/pings/chevron.d.mts +0 -81
  842. package/src/foundry/client/pixi/core/interaction/pings/index.d.mts +0 -2
  843. package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +0 -166
  844. package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +0 -135
  845. package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +0 -82
  846. package/src/foundry/client/pixi/core/interaction/targets.d.mts +0 -48
  847. package/src/foundry/client/pixi/core/loader.d.mts +0 -256
  848. package/src/foundry/client/pixi/core/shapes/index.d.mts +0 -5
  849. package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +0 -139
  850. package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +0 -138
  851. package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +0 -45
  852. package/src/foundry/client/pixi/core/shapes/ray.d.mts +0 -183
  853. package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +0 -339
  854. package/src/foundry/client/pixi/extensions/circle.d.mts +0 -143
  855. package/src/foundry/client/pixi/extensions/graphics.d.mts +0 -45
  856. package/src/foundry/client/pixi/extensions/index.d.mts +0 -5
  857. package/src/foundry/client/pixi/extensions/observable-transform.d.mts +0 -38
  858. package/src/foundry/client/pixi/extensions/polygon.d.mts +0 -163
  859. package/src/foundry/client/pixi/extensions/rectangle.d.mts +0 -274
  860. package/src/foundry/client/pixi/groups/effects.d.mts +0 -237
  861. package/src/foundry/client/pixi/groups/environment.d.mts +0 -129
  862. package/src/foundry/client/pixi/groups/hidden.d.mts +0 -56
  863. package/src/foundry/client/pixi/groups/index.d.mts +0 -7
  864. package/src/foundry/client/pixi/groups/interface.d.mts +0 -98
  865. package/src/foundry/client/pixi/groups/overlay.d.mts +0 -30
  866. package/src/foundry/client/pixi/groups/primary.d.mts +0 -222
  867. package/src/foundry/client/pixi/groups/rendered.d.mts +0 -30
  868. package/src/foundry/client/pixi/index.d.mts +0 -10
  869. package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +0 -91
  870. package/src/foundry/client/pixi/layers/base/index.d.mts +0 -3
  871. package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +0 -163
  872. package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +0 -631
  873. package/src/foundry/client/pixi/layers/controls/cursor.d.mts +0 -33
  874. package/src/foundry/client/pixi/layers/controls/door.d.mts +0 -77
  875. package/src/foundry/client/pixi/layers/controls/index.d.mts +0 -4
  876. package/src/foundry/client/pixi/layers/controls/layer.d.mts +0 -264
  877. package/src/foundry/client/pixi/layers/controls/ruler.d.mts +0 -475
  878. package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +0 -48
  879. package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +0 -39
  880. package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +0 -30
  881. package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +0 -148
  882. package/src/foundry/client/pixi/layers/effects/index.d.mts +0 -7
  883. package/src/foundry/client/pixi/layers/effects/visibility.d.mts +0 -228
  884. package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +0 -47
  885. package/src/foundry/client/pixi/layers/effects/weather/particles/index.d.mts +0 -2
  886. package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +0 -20
  887. package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +0 -224
  888. package/src/foundry/client/pixi/layers/grid/highlight.d.mts +0 -33
  889. package/src/foundry/client/pixi/layers/grid/index.d.mts +0 -3
  890. package/src/foundry/client/pixi/layers/grid/layer.d.mts +0 -267
  891. package/src/foundry/client/pixi/layers/grid/mesh.d.mts +0 -73
  892. package/src/foundry/client/pixi/layers/index.d.mts +0 -6
  893. package/src/foundry/client/pixi/layers/masks/depth.d.mts +0 -67
  894. package/src/foundry/client/pixi/layers/masks/index.d.mts +0 -3
  895. package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +0 -98
  896. package/src/foundry/client/pixi/layers/masks/vision.d.mts +0 -202
  897. package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +0 -108
  898. package/src/foundry/client/pixi/layers/placeables/index.d.mts +0 -9
  899. package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +0 -80
  900. package/src/foundry/client/pixi/layers/placeables/notes.d.mts +0 -108
  901. package/src/foundry/client/pixi/layers/placeables/regions.d.mts +0 -100
  902. package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +0 -316
  903. package/src/foundry/client/pixi/layers/placeables/templates.d.mts +0 -69
  904. package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +0 -114
  905. package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +0 -189
  906. package/src/foundry/client/pixi/layers/placeables/walls.d.mts +0 -207
  907. package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +0 -186
  908. package/src/foundry/client/pixi/perception/detection-mode.d.mts +0 -214
  909. package/src/foundry/client/pixi/perception/fog.d.mts +0 -139
  910. package/src/foundry/client/pixi/perception/index.d.mts +0 -6
  911. package/src/foundry/client/pixi/perception/perception-manager.d.mts +0 -167
  912. package/src/foundry/client/pixi/perception/vision-mode.d.mts +0 -220
  913. package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +0 -190
  914. package/src/foundry/client/pixi/placeable.d.mts +0 -639
  915. package/src/foundry/client/pixi/placeables/drawing.d.mts +0 -293
  916. package/src/foundry/client/pixi/placeables/index.d.mts +0 -10
  917. package/src/foundry/client/pixi/placeables/light.d.mts +0 -142
  918. package/src/foundry/client/pixi/placeables/note.d.mts +0 -115
  919. package/src/foundry/client/pixi/placeables/primary-canvas-objects/index.d.mts +0 -4
  920. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +0 -198
  921. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +0 -60
  922. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +0 -202
  923. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +0 -194
  924. package/src/foundry/client/pixi/placeables/region.d.mts +0 -177
  925. package/src/foundry/client/pixi/placeables/sound.d.mts +0 -135
  926. package/src/foundry/client/pixi/placeables/template.d.mts +0 -212
  927. package/src/foundry/client/pixi/placeables/tile.d.mts +0 -286
  928. package/src/foundry/client/pixi/placeables/token.d.mts +0 -950
  929. package/src/foundry/client/pixi/placeables/wall.d.mts +0 -277
  930. package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +0 -112
  931. package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +0 -31
  932. package/src/foundry/client/pixi/webgl/extensions/blend-modes.d.mts +0 -53
  933. package/src/foundry/client/pixi/webgl/extensions/index.d.mts +0 -3
  934. package/src/foundry/client/pixi/webgl/helpers/framebuffer-snapshot.d.mts +0 -31
  935. package/src/foundry/client/pixi/webgl/helpers/index.d.mts +0 -3
  936. package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +0 -72
  937. package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +0 -119
  938. package/src/foundry/client/pixi/webgl/index.d.mts +0 -3
  939. package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +0 -119
  940. package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +0 -111
  941. package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +0 -48
  942. package/src/foundry/client/pixi/webgl/shaders/filters/base-mask-filter.d.mts +0 -31
  943. package/src/foundry/client/pixi/webgl/shaders/filters/blur.d.mts +0 -187
  944. package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +0 -122
  945. package/src/foundry/client/pixi/webgl/shaders/filters/environment.d.mts +0 -41
  946. package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +0 -76
  947. package/src/foundry/client/pixi/webgl/shaders/filters/index.d.mts +0 -13
  948. package/src/foundry/client/pixi/webgl/shaders/filters/invisibility.d.mts +0 -30
  949. package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +0 -87
  950. package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +0 -126
  951. package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +0 -74
  952. package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +0 -36
  953. package/src/foundry/client/pixi/webgl/shaders/filters/void.d.mts +0 -19
  954. package/src/foundry/client/pixi/webgl/shaders/filters/weather-occlusion-masks.d.mts +0 -57
  955. package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +0 -60
  956. package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +0 -113
  957. package/src/foundry/client/pixi/webgl/shaders/grid/index.d.mts +0 -1
  958. package/src/foundry/client/pixi/webgl/shaders/index.d.mts +0 -10
  959. package/src/foundry/client/pixi/webgl/shaders/lighting/background-lighting.d.mts +0 -66
  960. package/src/foundry/client/pixi/webgl/shaders/lighting/base-lighting.d.mts +0 -178
  961. package/src/foundry/client/pixi/webgl/shaders/lighting/coloration-lighting.d.mts +0 -74
  962. package/src/foundry/client/pixi/webgl/shaders/lighting/darkness-lighting.d.mts +0 -74
  963. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/bewitching-wave.d.mts +0 -35
  964. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/black-hole.d.mts +0 -19
  965. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/chroma.d.mts +0 -24
  966. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/emanation.d.mts +0 -24
  967. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/energy-field.d.mts +0 -24
  968. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +0 -40
  969. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/flame.d.mts +0 -57
  970. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fog.d.mts +0 -24
  971. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/force-grid.d.mts +0 -24
  972. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/ghost-light.d.mts +0 -35
  973. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/hexa-dome.d.mts +0 -24
  974. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/index.d.mts +0 -25
  975. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/light-dome.d.mts +0 -24
  976. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/magical-gloom.d.mts +0 -19
  977. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/pulse.d.mts +0 -46
  978. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/radial-rainbow.d.mts +0 -24
  979. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/revolving-light.d.mts +0 -37
  980. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/roiling-mass.d.mts +0 -19
  981. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/siren-light.d.mts +0 -63
  982. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/smoke-patch.d.mts +0 -34
  983. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/star-light.d.mts +0 -24
  984. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/sunburst.d.mts +0 -35
  985. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/swirling-rainbow.d.mts +0 -23
  986. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/torch.d.mts +0 -47
  987. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/vortex.d.mts +0 -40
  988. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/wave.d.mts +0 -35
  989. package/src/foundry/client/pixi/webgl/shaders/lighting/illumination-lighting.d.mts +0 -80
  990. package/src/foundry/client/pixi/webgl/shaders/lighting/index.d.mts +0 -6
  991. package/src/foundry/client/pixi/webgl/shaders/region/adjust-darkness-level.d.mts +0 -135
  992. package/src/foundry/client/pixi/webgl/shaders/region/base.d.mts +0 -79
  993. package/src/foundry/client/pixi/webgl/shaders/region/highlight.d.mts +0 -95
  994. package/src/foundry/client/pixi/webgl/shaders/region/index.d.mts +0 -3
  995. package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +0 -205
  996. package/src/foundry/client/pixi/webgl/shaders/samplers/baseline-illumination.d.mts +0 -39
  997. package/src/foundry/client/pixi/webgl/shaders/samplers/color-adjustment.d.mts +0 -118
  998. package/src/foundry/client/pixi/webgl/shaders/samplers/depth.d.mts +0 -107
  999. package/src/foundry/client/pixi/webgl/shaders/samplers/fog-of-war.d.mts +0 -25
  1000. package/src/foundry/client/pixi/webgl/shaders/samplers/index.d.mts +0 -8
  1001. package/src/foundry/client/pixi/webgl/shaders/samplers/occlusion.d.mts +0 -106
  1002. package/src/foundry/client/pixi/webgl/shaders/samplers/primary.d.mts +0 -35
  1003. package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +0 -75
  1004. package/src/foundry/client/pixi/webgl/shaders/vision/background-vision.d.mts +0 -43
  1005. package/src/foundry/client/pixi/webgl/shaders/vision/base-vision.d.mts +0 -33
  1006. package/src/foundry/client/pixi/webgl/shaders/vision/coloration-vision.d.mts +0 -42
  1007. package/src/foundry/client/pixi/webgl/shaders/vision/effects/amplification.d.mts +0 -33
  1008. package/src/foundry/client/pixi/webgl/shaders/vision/effects/index.d.mts +0 -2
  1009. package/src/foundry/client/pixi/webgl/shaders/vision/effects/wave.d.mts +0 -61
  1010. package/src/foundry/client/pixi/webgl/shaders/vision/illumination-vision.d.mts +0 -37
  1011. package/src/foundry/client/pixi/webgl/shaders/vision/index.d.mts +0 -5
  1012. package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +0 -111
  1013. package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +0 -63
  1014. package/src/foundry/client/pixi/webgl/shaders/weather/fog.d.mts +0 -51
  1015. package/src/foundry/client/pixi/webgl/shaders/weather/index.d.mts +0 -5
  1016. package/src/foundry/client/pixi/webgl/shaders/weather/rain.d.mts +0 -43
  1017. package/src/foundry/client/pixi/webgl/shaders/weather/snow.d.mts +0 -35
  1018. package/src/foundry/client/pixi/workers/index.d.mts +0 -1
  1019. package/src/foundry/client/pixi/workers/texture-worker.d.mts +0 -105
  1020. package/src/foundry/client/tours/canvas-tour.d.mts +0 -9
  1021. package/src/foundry/client/tours/index.d.mts +0 -3
  1022. package/src/foundry/client/tours/setup-tour.d.mts +0 -26
  1023. package/src/foundry/client/tours/sidebar-tour.d.mts +0 -9
  1024. package/src/foundry/client/ui/dialog.d.mts +0 -337
  1025. package/src/foundry/client/ui/drag.d.mts +0 -128
  1026. package/src/foundry/client/ui/dragdrop.d.mts +0 -124
  1027. package/src/foundry/client/ui/editor.d.mts +0 -546
  1028. package/src/foundry/client/ui/filepicker.d.mts +0 -477
  1029. package/src/foundry/client/ui/filter.d.mts +0 -148
  1030. package/src/foundry/client/ui/forms.d.mts +0 -85
  1031. package/src/foundry/client/ui/index.d.mts +0 -10
  1032. package/src/foundry/client/ui/prosemirror.d.mts +0 -171
  1033. package/src/foundry/client/ui/secrets.d.mts +0 -75
  1034. package/src/foundry/client/ui/tabs.d.mts +0 -117
  1035. package/src/foundry/client-esm/_module.d.mts +0 -112
  1036. package/src/foundry/client-esm/_types.d.mts +0 -8
  1037. package/src/foundry/client-esm/applications/_module.d.mts +0 -30
  1038. package/src/foundry/client-esm/applications/api/application.d.mts +0 -877
  1039. package/src/foundry/client-esm/applications/api/category-browser.d.mts +0 -40
  1040. package/src/foundry/client-esm/applications/api/dialog.d.mts +0 -346
  1041. package/src/foundry/client-esm/applications/api/document-sheet.d.mts +0 -140
  1042. package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +0 -210
  1043. package/src/foundry/client-esm/applications/apps/av/camera-popout.d.mts +0 -23
  1044. package/src/foundry/client-esm/applications/apps/av/cameras.d.mts +0 -95
  1045. package/src/foundry/client-esm/applications/apps/combat-tracker-config.d.mts +0 -21
  1046. package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +0 -54
  1047. package/src/foundry/client-esm/applications/apps/document-ownership.d.mts +0 -21
  1048. package/src/foundry/client-esm/applications/apps/document-sheet-config.d.mts +0 -24
  1049. package/src/foundry/client-esm/applications/apps/file-picker.d.mts +0 -410
  1050. package/src/foundry/client-esm/applications/apps/grid-config.d.mts +0 -25
  1051. package/src/foundry/client-esm/applications/apps/image-popout.d.mts +0 -56
  1052. package/src/foundry/client-esm/applications/apps/permission-config.d.mts +0 -60
  1053. package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +0 -110
  1054. package/src/foundry/client-esm/applications/elements/document-tags.d.mts +0 -92
  1055. package/src/foundry/client-esm/applications/elements/file-picker.d.mts +0 -62
  1056. package/src/foundry/client-esm/applications/elements/form-element.d.mts +0 -106
  1057. package/src/foundry/client-esm/applications/elements/multi-select.d.mts +0 -105
  1058. package/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts +0 -53
  1059. package/src/foundry/client-esm/applications/forms/fields.d.mts +0 -270
  1060. package/src/foundry/client-esm/applications/handlebars.d.mts +0 -3
  1061. package/src/foundry/client-esm/applications/hud/container.d.mts +0 -15
  1062. package/src/foundry/client-esm/applications/hud/drawing-hud.d.mts +0 -19
  1063. package/src/foundry/client-esm/applications/hud/placeable-hud.d.mts +0 -41
  1064. package/src/foundry/client-esm/applications/hud/tile-hud.d.mts +0 -19
  1065. package/src/foundry/client-esm/applications/hud/token-hud.d.mts +0 -20
  1066. package/src/foundry/client-esm/applications/quickstart.d.mts +0 -20
  1067. package/src/foundry/client-esm/applications/settings/_module.d.mts +0 -7
  1068. package/src/foundry/client-esm/applications/settings/config.d.mts +0 -21
  1069. package/src/foundry/client-esm/applications/settings/dependency-resolution.d.mts +0 -19
  1070. package/src/foundry/client-esm/applications/settings/menus/av-config.d.mts +0 -27
  1071. package/src/foundry/client-esm/applications/settings/menus/default-sheets-config.d.mts +0 -19
  1072. package/src/foundry/client-esm/applications/settings/menus/dice-config.d.mts +0 -18
  1073. package/src/foundry/client-esm/applications/settings/menus/font-config.d.mts +0 -43
  1074. package/src/foundry/client-esm/applications/settings/menus/prototype-overrides.d.mts +0 -21
  1075. package/src/foundry/client-esm/applications/settings/menus/ui-config.d.mts +0 -26
  1076. package/src/foundry/client-esm/applications/sheets/_module.d.mts +0 -37
  1077. package/src/foundry/client-esm/applications/sheets/active-effect-config.d.mts +0 -25
  1078. package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +0 -31
  1079. package/src/foundry/client-esm/applications/sheets/adventure-exporter.d.mts +0 -25
  1080. package/src/foundry/client-esm/applications/sheets/adventure-importer.d.mts +0 -25
  1081. package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +0 -80
  1082. package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +0 -52
  1083. package/src/foundry/client-esm/applications/sheets/base-sheet.d.mts +0 -23
  1084. package/src/foundry/client-esm/applications/sheets/card-config.d.mts +0 -25
  1085. package/src/foundry/client-esm/applications/sheets/cards-config.d.mts +0 -49
  1086. package/src/foundry/client-esm/applications/sheets/combatant-config.d.mts +0 -25
  1087. package/src/foundry/client-esm/applications/sheets/drawing-config.d.mts +0 -25
  1088. package/src/foundry/client-esm/applications/sheets/folder-config.d.mts +0 -25
  1089. package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +0 -22
  1090. package/src/foundry/client-esm/applications/sheets/journal/dialog-show.d.mts +0 -19
  1091. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-category-config.d.mts +0 -25
  1092. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-hbs-sheet.d.mts +0 -19
  1093. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-image-sheet.d.mts +0 -18
  1094. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-markdown-sheet.d.mts +0 -18
  1095. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-pdf-sheet.d.mts +0 -18
  1096. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-prose-mirror-sheet.d.mts +0 -18
  1097. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-sheet.d.mts +0 -28
  1098. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-text-sheet.d.mts +0 -18
  1099. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-page-video-sheet.d.mts +0 -18
  1100. package/src/foundry/client-esm/applications/sheets/journal/journal-entry-sheet.d.mts +0 -35
  1101. package/src/foundry/client-esm/applications/sheets/macro-config.d.mts +0 -25
  1102. package/src/foundry/client-esm/applications/sheets/note-config.d.mts +0 -25
  1103. package/src/foundry/client-esm/applications/sheets/playlist-config.d.mts +0 -25
  1104. package/src/foundry/client-esm/applications/sheets/playlist-sound-config.d.mts +0 -25
  1105. package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +0 -37
  1106. package/src/foundry/client-esm/applications/sheets/region-config.d.mts +0 -43
  1107. package/src/foundry/client-esm/applications/sheets/roll-table-config.d.mts +0 -25
  1108. package/src/foundry/client-esm/applications/sheets/roll-table-sheet.d.mts +0 -25
  1109. package/src/foundry/client-esm/applications/sheets/scene-config.d.mts +0 -25
  1110. package/src/foundry/client-esm/applications/sheets/table-result-config.d.mts +0 -25
  1111. package/src/foundry/client-esm/applications/sheets/template-config.d.mts +0 -25
  1112. package/src/foundry/client-esm/applications/sheets/tile-config.d.mts +0 -25
  1113. package/src/foundry/client-esm/applications/sheets/token/mixin.d.mts +0 -27
  1114. package/src/foundry/client-esm/applications/sheets/token/prototype-config.d.mts +0 -18
  1115. package/src/foundry/client-esm/applications/sheets/token/token-config.d.mts +0 -25
  1116. package/src/foundry/client-esm/applications/sheets/user-config.d.mts +0 -44
  1117. package/src/foundry/client-esm/applications/sheets/wall-config.d.mts +0 -25
  1118. package/src/foundry/client-esm/applications/sidebar/apps/chat-popout.d.mts +0 -22
  1119. package/src/foundry/client-esm/applications/sidebar/apps/compendium.d.mts +0 -21
  1120. package/src/foundry/client-esm/applications/sidebar/apps/controls-config.d.mts +0 -20
  1121. package/src/foundry/client-esm/applications/sidebar/apps/folder-export.d.mts +0 -18
  1122. package/src/foundry/client-esm/applications/sidebar/apps/frame-viewer.d.mts +0 -22
  1123. package/src/foundry/client-esm/applications/sidebar/apps/invitation-links.d.mts +0 -17
  1124. package/src/foundry/client-esm/applications/sidebar/apps/module-management.d.mts +0 -21
  1125. package/src/foundry/client-esm/applications/sidebar/apps/support-details.d.mts +0 -17
  1126. package/src/foundry/client-esm/applications/sidebar/apps/tours-management.d.mts +0 -20
  1127. package/src/foundry/client-esm/applications/sidebar/apps/world-config.d.mts +0 -19
  1128. package/src/foundry/client-esm/applications/sidebar/document-directory.d.mts +0 -30
  1129. package/src/foundry/client-esm/applications/sidebar/sidebar-tab.d.mts +0 -86
  1130. package/src/foundry/client-esm/applications/sidebar/sidebar.d.mts +0 -18
  1131. package/src/foundry/client-esm/applications/sidebar/tabs/actor-directory.d.mts +0 -20
  1132. package/src/foundry/client-esm/applications/sidebar/tabs/cards-directory.d.mts +0 -20
  1133. package/src/foundry/client-esm/applications/sidebar/tabs/chat.d.mts +0 -19
  1134. package/src/foundry/client-esm/applications/sidebar/tabs/combat-tracker.d.mts +0 -19
  1135. package/src/foundry/client-esm/applications/sidebar/tabs/compendium-directory.d.mts +0 -19
  1136. package/src/foundry/client-esm/applications/sidebar/tabs/item-directory.d.mts +0 -20
  1137. package/src/foundry/client-esm/applications/sidebar/tabs/journal-directory.d.mts +0 -20
  1138. package/src/foundry/client-esm/applications/sidebar/tabs/macro-directory.d.mts +0 -20
  1139. package/src/foundry/client-esm/applications/sidebar/tabs/playlist-directory.d.mts +0 -20
  1140. package/src/foundry/client-esm/applications/sidebar/tabs/roll-table-directory.d.mts +0 -20
  1141. package/src/foundry/client-esm/applications/sidebar/tabs/scene-directory.d.mts +0 -20
  1142. package/src/foundry/client-esm/applications/sidebar/tabs/settings.d.mts +0 -18
  1143. package/src/foundry/client-esm/applications/ui/game-pause.d.mts +0 -22
  1144. package/src/foundry/client-esm/applications/ui/hotbar.d.mts +0 -29
  1145. package/src/foundry/client-esm/applications/ui/main-menu.d.mts +0 -27
  1146. package/src/foundry/client-esm/applications/ui/players.d.mts +0 -26
  1147. package/src/foundry/client-esm/applications/ui/region-legend.d.mts +0 -57
  1148. package/src/foundry/client-esm/applications/ui/scene-controls.d.mts +0 -20
  1149. package/src/foundry/client-esm/applications/ui/scene-navigation.d.mts +0 -28
  1150. package/src/foundry/client-esm/applications/ux/context-menu.d.mts +0 -359
  1151. package/src/foundry/client-esm/applications/ux/drag-drop.d.mts +0 -21
  1152. package/src/foundry/client-esm/applications/ux/draggable.d.mts +0 -9
  1153. package/src/foundry/client-esm/applications/ux/form-data-extended.d.mts +0 -17
  1154. package/src/foundry/client-esm/applications/ux/html-secret.d.mts +0 -21
  1155. package/src/foundry/client-esm/applications/ux/prosemirror-editor.d.mts +0 -9
  1156. package/src/foundry/client-esm/applications/ux/search-filter.d.mts +0 -9
  1157. package/src/foundry/client-esm/applications/ux/tabs.d.mts +0 -29
  1158. package/src/foundry/client-esm/applications/ux/text-editor.d.mts +0 -9
  1159. package/src/foundry/client-esm/appv1/api/application-v1.d.mts +0 -5
  1160. package/src/foundry/client-esm/appv1/api/dialog-v1.d.mts +0 -5
  1161. package/src/foundry/client-esm/appv1/api/document-sheet-v1.d.mts +0 -5
  1162. package/src/foundry/client-esm/appv1/api/form-application-v1.d.mts +0 -5
  1163. package/src/foundry/client-esm/appv1/sheets/actor-sheet.d.mts +0 -5
  1164. package/src/foundry/client-esm/appv1/sheets/adventure-importer.d.mts +0 -5
  1165. package/src/foundry/client-esm/appv1/sheets/item-sheet.d.mts +0 -5
  1166. package/src/foundry/client-esm/appv1/sheets/journal-page-sheet.d.mts +0 -7
  1167. package/src/foundry/client-esm/appv1/sheets/journal-sheet.d.mts +0 -5
  1168. package/src/foundry/client-esm/audio/_types.d.mts +0 -16
  1169. package/src/foundry/client-esm/audio/biquad.d.mts +0 -51
  1170. package/src/foundry/client-esm/audio/cache.d.mts +0 -68
  1171. package/src/foundry/client-esm/audio/convolver.d.mts +0 -71
  1172. package/src/foundry/client-esm/audio/helper.d.mts +0 -326
  1173. package/src/foundry/client-esm/audio/sound.d.mts +0 -401
  1174. package/src/foundry/client-esm/audio/timeout.d.mts +0 -85
  1175. package/src/foundry/client-esm/av/client.d.mts +0 -18
  1176. package/src/foundry/client-esm/av/clients/simplepeer.d.mts +0 -11
  1177. package/src/foundry/client-esm/av/master.d.mts +0 -12
  1178. package/src/foundry/client-esm/av/settings.d.mts +0 -30
  1179. package/src/foundry/client-esm/canvas/_module.d.mts +0 -11
  1180. package/src/foundry/client-esm/canvas/edges/collision.d.mts +0 -136
  1181. package/src/foundry/client-esm/canvas/edges/edge.d.mts +0 -248
  1182. package/src/foundry/client-esm/canvas/edges/edges.d.mts +0 -32
  1183. package/src/foundry/client-esm/canvas/edges/vertex.d.mts +0 -164
  1184. package/src/foundry/client-esm/canvas/regions/_module.d.mts +0 -9
  1185. package/src/foundry/client-esm/canvas/regions/geometry.d.mts +0 -31
  1186. package/src/foundry/client-esm/canvas/regions/mesh.d.mts +0 -61
  1187. package/src/foundry/client-esm/canvas/regions/polygon-tree.d.mts +0 -101
  1188. package/src/foundry/client-esm/canvas/regions/shape.d.mts +0 -118
  1189. package/src/foundry/client-esm/canvas/scene-manager.d.mts +0 -102
  1190. package/src/foundry/client-esm/canvas/smaa/blend.d.mts +0 -6
  1191. package/src/foundry/client-esm/canvas/smaa/edges.d.mts +0 -6
  1192. package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +0 -55
  1193. package/src/foundry/client-esm/canvas/smaa/weights.d.mts +0 -6
  1194. package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +0 -264
  1195. package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +0 -197
  1196. package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +0 -62
  1197. package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +0 -101
  1198. package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +0 -103
  1199. package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +0 -55
  1200. package/src/foundry/client-esm/canvas/sources/point-movement-source.d.mts +0 -31
  1201. package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +0 -47
  1202. package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +0 -213
  1203. package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +0 -367
  1204. package/src/foundry/client-esm/canvas/tokens/_module.d.mts +0 -8
  1205. package/src/foundry/client-esm/canvas/tokens/ring-config.d.mts +0 -190
  1206. package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +0 -174
  1207. package/src/foundry/client-esm/canvas/tokens/ring.d.mts +0 -192
  1208. package/src/foundry/client-esm/client.d.mts +0 -279
  1209. package/src/foundry/client-esm/config.d.mts +0 -1
  1210. package/src/foundry/client-esm/data/_module.d.mts +0 -13
  1211. package/src/foundry/client-esm/data/calendar.d.mts +0 -213
  1212. package/src/foundry/client-esm/data/client-backend.d.mts +0 -51
  1213. package/src/foundry/client-esm/data/region-behaviors/adjust-darkness-level.d.mts +0 -57
  1214. package/src/foundry/client-esm/data/region-behaviors/base.d.mts +0 -59
  1215. package/src/foundry/client-esm/data/region-behaviors/display-scrolling-text.d.mts +0 -64
  1216. package/src/foundry/client-esm/data/region-behaviors/teleport-token.d.mts +0 -32
  1217. package/src/foundry/client-esm/data/region-behaviors/toggle-behavior.d.mts +0 -31
  1218. package/src/foundry/client-esm/data/terrain-data.d.mts +0 -22
  1219. package/src/foundry/client-esm/dice/_types.d.mts +0 -61
  1220. package/src/foundry/client-esm/dice/parser.d.mts +0 -213
  1221. package/src/foundry/client-esm/dice/roll.d.mts +0 -679
  1222. package/src/foundry/client-esm/dice/terms/coin.d.mts +0 -75
  1223. package/src/foundry/client-esm/dice/terms/dice.d.mts +0 -390
  1224. package/src/foundry/client-esm/dice/terms/die.d.mts +0 -248
  1225. package/src/foundry/client-esm/dice/terms/fate.d.mts +0 -57
  1226. package/src/foundry/client-esm/dice/terms/function.d.mts +0 -106
  1227. package/src/foundry/client-esm/dice/terms/numeric.d.mts +0 -56
  1228. package/src/foundry/client-esm/dice/terms/operator.d.mts +0 -55
  1229. package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +0 -105
  1230. package/src/foundry/client-esm/dice/terms/pool.d.mts +0 -287
  1231. package/src/foundry/client-esm/dice/terms/string.d.mts +0 -34
  1232. package/src/foundry/client-esm/dice/terms/term.d.mts +0 -169
  1233. package/src/foundry/client-esm/dice/twister.d.mts +0 -134
  1234. package/src/foundry/client-esm/documents/_module.d.mts +0 -11
  1235. package/src/foundry/client-esm/documents/_types.d.mts +0 -8
  1236. package/src/foundry/client-esm/documents/abstract/_module.d.mts +0 -6
  1237. package/src/foundry/client-esm/documents/collections/_module.d.mts +0 -6
  1238. package/src/foundry/client-esm/game.d.mts +0 -7
  1239. package/src/foundry/client-esm/helpers/_module.d.mts +0 -8
  1240. package/src/foundry/client-esm/helpers/_types.d.mts +0 -51
  1241. package/src/foundry/client-esm/helpers/compendium-art.d.mts +0 -47
  1242. package/src/foundry/client-esm/hooks.d.mts +0 -1
  1243. package/src/foundry/client-esm/nue/tour.d.mts +0 -9
  1244. package/src/foundry/client-esm/nue/tours/canvas-tour.d.mts +0 -12
  1245. package/src/foundry/client-esm/nue/tours/setup-tour.d.mts +0 -11
  1246. package/src/foundry/client-esm/nue/tours/sidebar-tour.d.mts +0 -11
  1247. package/src/foundry/client-esm/packages/_module.d.mts +0 -22
  1248. package/src/foundry/client-esm/packages/_types.d.mts +0 -11
  1249. package/src/foundry/client-esm/packages/client-package.d.mts +0 -11
  1250. package/src/foundry/client-esm/packages/module.d.mts +0 -8
  1251. package/src/foundry/client-esm/packages/system.d.mts +0 -8
  1252. package/src/foundry/client-esm/packages/world.d.mts +0 -8
  1253. package/src/foundry/client-esm/ui.d.mts +0 -1
  1254. package/src/foundry/client-esm/utils/_module.d.mts +0 -7
  1255. package/src/foundry/client-esm/utils/_types.d.mts +0 -2
  1256. package/src/foundry/client-esm/utils/helpers.d.mts +0 -6
  1257. package/src/foundry/common/documents/module.d.mts +0 -35
  1258. package/src/foundry/common/prosemirror/index.d.mts +0 -22
  1259. package/src/foundry/common/prosemirror/schema/index.d.mts +0 -12
  1260. package/src/tsconfig.json +0 -19
  1261. /package/src/foundry/{client-esm → client}/applications/_types.d.mts +0 -0
  1262. /package/src/foundry/{client-esm → client}/applications/api/_module.d.mts +0 -0
  1263. /package/src/foundry/{client-esm → client}/applications/apps/_module.d.mts +0 -0
  1264. /package/src/foundry/{client-esm → client}/applications/apps/av/_module.d.mts +0 -0
  1265. /package/src/foundry/{client-esm → client}/applications/dice/_module.d.mts +0 -0
  1266. /package/src/foundry/{client-esm → client}/applications/elements/_module.d.mts +0 -0
  1267. /package/src/foundry/{client-esm → client}/applications/elements/codemirror/element.d.mts +0 -0
  1268. /package/src/foundry/{client-esm → client}/applications/elements/codemirror/extensions.d.mts +0 -0
  1269. /package/src/foundry/{client-esm → client}/applications/elements/codemirror/view.d.mts +0 -0
  1270. /package/src/foundry/{client-esm → client}/applications/elements/color-picker.d.mts +0 -0
  1271. /package/src/foundry/{client-esm → client}/applications/elements/document-embed.d.mts +0 -0
  1272. /package/src/foundry/{client-esm → client}/applications/elements/enriched-content.d.mts +0 -0
  1273. /package/src/foundry/{client-esm → client}/applications/elements/hue-slider.d.mts +0 -0
  1274. /package/src/foundry/{client-esm → client}/applications/elements/range-picker.d.mts +0 -0
  1275. /package/src/foundry/{client-esm → client}/applications/elements/secret-block.d.mts +0 -0
  1276. /package/src/foundry/{client-esm → client}/applications/elements/string-tags.d.mts +0 -0
  1277. /package/src/foundry/{client-esm → client}/applications/hud/_module.d.mts +0 -0
  1278. /package/src/foundry/{client-esm → client}/applications/settings/menus/_module.d.mts +0 -0
  1279. /package/src/foundry/{client-esm → client}/applications/sheets/journal/_module.d.mts +0 -0
  1280. /package/src/foundry/{client-esm → client}/applications/sheets/token/_module.d.mts +0 -0
  1281. /package/src/foundry/{client-esm → client}/applications/sidebar/_module.d.mts +0 -0
  1282. /package/src/foundry/{client-esm → client}/applications/sidebar/apps/_module.d.mts +0 -0
  1283. /package/src/foundry/{client-esm → client}/applications/sidebar/tabs/_module.d.mts +0 -0
  1284. /package/src/foundry/{client-esm → client}/applications/ui/_module.d.mts +0 -0
  1285. /package/src/foundry/{client-esm → client}/applications/ui/notifications.d.mts +0 -0
  1286. /package/src/foundry/{client-esm → client}/applications/ux/_module.d.mts +0 -0
  1287. /package/src/foundry/{client-esm → client}/appv1/_module.d.mts +0 -0
  1288. /package/src/foundry/{client-esm → client}/appv1/api/_module.d.mts +0 -0
  1289. /package/src/foundry/{client-esm → client}/appv1/sheets/_module.d.mts +0 -0
  1290. /package/src/foundry/{client-esm → client}/audio/_module.d.mts +0 -0
  1291. /package/src/foundry/{client-esm → client}/av/_module.d.mts +0 -0
  1292. /package/src/foundry/{client-esm → client}/av/clients/_module.d.mts +0 -0
  1293. /package/src/foundry/{client-esm/canvas → client/canvas/geometry}/edges/_module.d.mts +0 -0
  1294. /package/src/foundry/{client-esm → client}/canvas/sources/_module.d.mts +0 -0
  1295. /package/src/foundry/{client-esm → client}/data/_types.d.mts +0 -0
  1296. /package/src/foundry/{client-esm → client}/data/combat-config.d.mts +0 -0
  1297. /package/src/foundry/{client-esm → client}/data/region-behaviors/_module.d.mts +0 -0
  1298. /package/src/foundry/{client-esm → client}/data/region-behaviors/execute-macro.d.mts +0 -0
  1299. /package/src/foundry/{client-esm → client}/data/region-behaviors/execute-script.d.mts +0 -0
  1300. /package/src/foundry/{client-esm → client}/data/region-behaviors/pause-game.d.mts +0 -0
  1301. /package/src/foundry/{client-esm → client}/data/region-behaviors/suppress-weather.d.mts +0 -0
  1302. /package/src/foundry/{client-esm → client}/dice/_module.d.mts +0 -0
  1303. /package/src/foundry/{client-esm → client}/dice/terms/_module.d.mts +0 -0
  1304. /package/src/foundry/{client-esm → client}/nue/_module.d.mts +0 -0
  1305. /package/src/foundry/{client-esm → client}/nue/nue-manager.d.mts +0 -0
  1306. /package/src/foundry/{client-esm → client}/nue/tours/_module.d.mts +0 -0
  1307. /package/src/foundry/{client-esm → client}/nue/tours-collection.d.mts +0 -0
@@ -1,22 +1,987 @@
1
1
  import type { EditorState, Plugin } from "prosemirror-state";
2
- import type { DeepPartial, EmptyObject, FixedInstanceType, ValueOf } from "fvtt-types/utils";
3
- import type Document from "../common/abstract/document.d.mts";
4
- import type { EffectChangeData } from "../common/documents/_types.d.mts";
5
- import type { ProseMirrorDropDown } from "../common/prosemirror/menu.d.mts";
6
- import type ProseMirrorMenu from "../common/prosemirror/menu.d.mts";
7
- import type PointVisionSource from "../client-esm/canvas/sources/point-vision-source.d.mts";
8
- import type RenderedEffectSource from "../client-esm/canvas/sources/rendered-effect-source.d.mts";
9
- import type { CompendiumArtInfo } from "../client-esm/helpers/_types.d.mts";
2
+ import type { DeepPartial, EmptyObject, ValueOf } from "#utils";
3
+ import type Document from "#common/abstract/document.d.mts";
4
+ import type { ProseMirrorDropDown } from "#common/prosemirror/_module.d.mts";
5
+ import type ProseMirrorMenu from "#common/prosemirror/menu.d.mts";
6
+ import type PointVisionSource from "#client/canvas/sources/point-vision-source.d.mts";
7
+ import type RenderedEffectSource from "#client/canvas/sources/rendered-effect-source.d.mts";
8
+ import type {
9
+ DatabaseCreateOperation,
10
+ DatabaseDeleteOperation,
11
+ DatabaseUpdateOperation,
12
+ } from "#common/abstract/_types.d.mts";
13
+ import type CompendiumArt from "#client/helpers/media/compendium-art.d.mts";
14
+ import type { Hooks as HookConfigs } from "#configuration";
15
+ import type Hooks from "./helpers/hooks.d.mts";
16
+ import type { Canvas } from "#client/canvas/_module.d.mts";
17
+ import type { CanvasGroupMixin, CanvasVisibility, EffectsCanvasGroup } from "#client/canvas/groups/_module.d.mts";
18
+ import type * as layers from "#client/canvas/layers/_module.d.mts";
19
+
20
+ import type { Note, PlaceableObject, Token } from "#client/canvas/placeables/_module.d.mts";
21
+ import type { TokenRingConfig } from "#client/canvas/placeables/tokens/_module.d.mts";
22
+
23
+ import AVSettings = foundry.av.AVSettings;
24
+ import Application = foundry.appv1.api.Application;
25
+ import ApplicationV2 = foundry.applications.api.ApplicationV2;
26
+ import ContextMenu = foundry.applications.ux.ContextMenu;
27
+
28
+ type ApplicationConfig = HookConfigs.ApplicationConfig;
29
+ type ApplicationV2Config = HookConfigs.ApplicationV2Config;
30
+ type PlaceableObjectConfig = HookConfigs.PlaceableObjectConfig;
31
+ type CanvasGroupConfig = HookConfigs.CanvasGroupConfig;
32
+ type CanvasLayerConfig = HookConfigs.CanvasLayerConfig;
33
+ type InteractionLayerConfig = HookConfigs.InteractionLayerConfig;
34
+ type PlaceablesLayerConfig = HookConfigs.PlaceablesLayerConfig;
35
+
36
+ // TODO(LukeAbby): Add warning for invalid configuration.
37
+ // Grabs only valid items.
38
+ type ApplicationName = {
39
+ [K in keyof ApplicationConfig]: K extends string ? (ApplicationConfig[K] extends Application.Any ? K : never) : never;
40
+ }[keyof ApplicationConfig];
41
+
42
+ type RenderApplicationHooks = {
43
+ [K in ApplicationName as `render${K}`]: Hooks.RenderApplication<ApplicationConfig[K]>;
44
+ };
45
+
46
+ type GetApplicationHeaderButtonsHooks = {
47
+ [K in ApplicationName as `get${K}HeaderButtons`]: Hooks.RenderApplication<ApplicationConfig[K]>;
48
+ };
49
+
50
+ type CloseApplicationHooks = {
51
+ [K in ApplicationName as `close${K}`]: Hooks.RenderApplication<ApplicationConfig[K]>;
52
+ };
53
+
54
+ type GetApplicationEntryContextHooks = {
55
+ [K in ApplicationName as `get${K}EntryContext`]: Hooks.GetEntryContext<ApplicationConfig[K]>;
56
+ };
57
+
58
+ interface ApplicationHooks
59
+ extends RenderApplicationHooks,
60
+ GetApplicationHeaderButtonsHooks,
61
+ CloseApplicationHooks,
62
+ GetApplicationEntryContextHooks {}
63
+
64
+ // TODO(LukeAbby): Add warning for invalid configuration.
65
+ // Grabs only valid items.
66
+ type ApplicationV2Name = {
67
+ [K in keyof ApplicationV2Config]: K extends string
68
+ ? ApplicationV2Config[K] extends ApplicationV2.Any
69
+ ? K
70
+ : never
71
+ : never;
72
+ }[keyof ApplicationV2Config];
73
+
74
+ type RenderApplicationV2Hooks = {
75
+ [K in ApplicationV2Name as `render${K}`]: Hooks.RenderApplicationV2<ApplicationV2Config[K]>;
76
+ };
77
+
78
+ type GetHeaderControlsApplicationV2Hooks = {
79
+ [K in ApplicationV2Name as `getHeaderControls${K}`]: Hooks.GetHeaderControlsApplicationV2<ApplicationV2Config[K]>;
80
+ };
81
+
82
+ type GetApplicationV2ContextOptionsHooks = {
83
+ [K in ApplicationV2Name as `get${K}ContextOptions`]: Hooks.GetApplicationV2ContextOptions<ApplicationV2Config[K]>;
84
+ };
85
+
86
+ type CloseApplicationV2Hooks = {
87
+ [K in ApplicationV2Name as `close${K}`]: Hooks.CloseApplicationV2<ApplicationV2Config[K]>;
88
+ };
89
+
90
+ interface ApplicationV2Hooks
91
+ extends RenderApplicationV2Hooks,
92
+ GetHeaderControlsApplicationV2Hooks,
93
+ GetApplicationV2ContextOptionsHooks,
94
+ CloseApplicationV2Hooks {}
95
+
96
+ type PreCreateDocumentHooks = {
97
+ [K in Document.Type as `preCreate${K}`]: Hooks.PreCreateDocument<Document.ImplementationFor<K>>;
98
+ };
99
+
100
+ type CreateDocumentHooks = {
101
+ [K in Document.Type as `create${K}`]: Hooks.CreateDocument<Document.ImplementationFor<K>>;
102
+ };
103
+
104
+ type PreUpdateDocumentHooks = {
105
+ [K in Document.Type as `preUpdate${K}`]: Hooks.PreCreateDocument<Document.ImplementationFor<K>>;
106
+ };
107
+
108
+ type UpdateDocumentHooks = {
109
+ [K in Document.Type as `update${K}`]: Hooks.UpdateDocument<Document.ImplementationFor<K>>;
110
+ };
111
+
112
+ type PreDeleteDocumentHooks = {
113
+ [K in Document.Type as `preDelete${K}`]: Hooks.PreDeleteDocument<Document.ImplementationFor<K>>;
114
+ };
115
+
116
+ type DeleteDocumentHooks = {
117
+ [K in Document.Type as `delete${K}`]: Hooks.DeleteDocument<Document.ImplementationFor<K>>;
118
+ };
119
+
120
+ interface DocumentHooks
121
+ extends PreCreateDocumentHooks,
122
+ CreateDocumentHooks,
123
+ PreUpdateDocumentHooks,
124
+ UpdateDocumentHooks,
125
+ PreDeleteDocumentHooks,
126
+ DeleteDocumentHooks {}
127
+
128
+ // TODO(LukeAbby): Add warning for invalid configuration.
129
+ // Grabs only valid items.
130
+ type PlaceableObjectName = {
131
+ [K in keyof PlaceableObjectConfig]: K extends string
132
+ ? PlaceableObjectConfig[K] extends PlaceableObject.Any
133
+ ? K
134
+ : never
135
+ : never;
136
+ }[keyof PlaceableObjectConfig];
137
+
138
+ type DrawObjectHooks = {
139
+ [K in PlaceableObjectName as `draw${K}`]: Hooks.DrawObject<PlaceableObjectConfig[K]>;
140
+ };
141
+
142
+ type RefreshObjectHooks = {
143
+ [K in PlaceableObjectName as `refresh${K}`]: Hooks.RefreshObject<PlaceableObjectConfig[K]>;
144
+ };
145
+
146
+ type DestroyObjectHooks = {
147
+ [K in PlaceableObjectName as `destroy${K}`]: Hooks.DestroyObject<PlaceableObjectConfig[K]>;
148
+ };
149
+
150
+ type ControlObjectHooks = {
151
+ [K in PlaceableObjectName as `control${K}`]: Hooks.ControlObject<PlaceableObjectConfig[K]>;
152
+ };
153
+
154
+ type HoverObjectHooks = {
155
+ [K in PlaceableObjectName as `hover${K}`]: Hooks.HoverObject<PlaceableObjectConfig[K]>;
156
+ };
157
+
158
+ interface PlaceableObjectHooks
159
+ extends DrawObjectHooks,
160
+ RefreshObjectHooks,
161
+ DestroyObjectHooks,
162
+ ControlObjectHooks,
163
+ HoverObjectHooks {}
164
+
165
+ // TODO(LukeAbby): Add warning for invalid configuration.
166
+ // Grabs only valid items.
167
+ type CanvasGroupName = {
168
+ [K in keyof CanvasGroupConfig]: K extends string
169
+ ? CanvasGroupConfig[K] extends CanvasGroupMixin.AnyMixed
170
+ ? K
171
+ : never
172
+ : never;
173
+ }[keyof CanvasGroupConfig];
174
+
175
+ type DrawCanvasGroupHooks = {
176
+ [K in CanvasGroupName as `draw${K}`]: Hooks.DrawGroup<CanvasGroupConfig[K]>;
177
+ };
178
+
179
+ type TearDownCanvasGroupHooks = {
180
+ [K in CanvasGroupName as `tearDown${K}`]: Hooks.TearDownGroup<CanvasGroupConfig[K]>;
181
+ };
182
+
183
+ interface CanvasGroupHooks extends DrawCanvasGroupHooks, TearDownCanvasGroupHooks {}
184
+
185
+ // These configs are separate for convenience but they're all `CanvasLayer`s.
186
+ interface AllCanvasLayers extends CanvasLayerConfig, InteractionLayerConfig, PlaceablesLayerConfig {}
187
+
188
+ // TODO(LukeAbby): Add warning for invalid configuration.
189
+ // Grabs only valid items.
190
+ type CanvasLayerName = {
191
+ [K in keyof AllCanvasLayers]: K extends string
192
+ ? AllCanvasLayers[K] extends layers.CanvasLayer.Any
193
+ ? K
194
+ : never
195
+ : never;
196
+ }[keyof AllCanvasLayers];
197
+
198
+ type DrawCanvasLayerHooks = {
199
+ [K in CanvasLayerName as `draw${K}`]: Hooks.DrawLayer<AllCanvasLayers[K]>;
200
+ };
201
+
202
+ type TearDownCanvasLayerHooks = {
203
+ [K in CanvasLayerName as `tearDown${K}`]: Hooks.TearDownLayer<AllCanvasLayers[K]>;
204
+ };
205
+
206
+ interface CanvasLayerHooks extends DrawCanvasLayerHooks, TearDownCanvasLayerHooks {}
207
+
208
+ // These configs are separate for convenience but they're both `CanvasLayer`s.
209
+ interface AllInteractionLayers extends InteractionLayerConfig, PlaceablesLayerConfig {}
210
+
211
+ // TODO(LukeAbby): Add warning for invalid configuration.
212
+ // Grabs only valid items.
213
+ type InteractionLayerName = {
214
+ [K in keyof AllInteractionLayers]: K extends string
215
+ ? AllInteractionLayers[K] extends layers.InteractionLayer.Any
216
+ ? K
217
+ : never
218
+ : never;
219
+ }[keyof AllInteractionLayers];
220
+
221
+ type ActivateInteractionLayerHooks = {
222
+ [K in InteractionLayerName as `activate${K}`]: Hooks.ActivateLayer<AllInteractionLayers[K]>;
223
+ };
224
+
225
+ type DeactivateInteractionLayerHooks = {
226
+ [K in InteractionLayerName as `deactivate${K}`]: Hooks.DeactivateLayer<AllInteractionLayers[K]>;
227
+ };
228
+
229
+ interface ActivateCanvasLayerHook {
230
+ // Foundry does not document.
231
+ activateCanvasLayer: (layer: AllInteractionLayers[InteractionLayerName]) => void;
232
+ }
233
+
234
+ interface InteractionLayerHooks
235
+ extends ActivateInteractionLayerHooks,
236
+ DeactivateInteractionLayerHooks,
237
+ ActivateCanvasLayerHook {}
238
+
239
+ // TODO(LukeAbby): Add warning for invalid configuration.
240
+ // Grabs only valid items.
241
+ type PlaceableLayerName = {
242
+ [K in keyof PlaceablesLayerConfig]: K extends string
243
+ ? PlaceablesLayerConfig[K] extends layers.PlaceablesLayer.Any
244
+ ? K
245
+ : never
246
+ : never;
247
+ }[keyof PlaceablesLayerConfig];
248
+
249
+ type PastePlaceableLayerHooks = {
250
+ [K in PlaceableLayerName as `paste${layers.PlaceablesLayer.DocumentNameOf<PlaceablesLayerConfig[K]>}`]: Hooks.PastePlaceableObject<
251
+ layers.PlaceablesLayer.ObjectOf<PlaceablesLayerConfig[K]>
252
+ >;
253
+ };
254
+
255
+ interface PlaceableLayerHooks extends PastePlaceableLayerHooks {}
256
+
257
+ interface DynamicHooks
258
+ extends ApplicationHooks,
259
+ ApplicationV2Hooks,
260
+ DocumentHooks,
261
+ PlaceableObjectHooks,
262
+ CanvasGroupHooks,
263
+ CanvasLayerHooks,
264
+ InteractionLayerHooks,
265
+ PlaceableLayerHooks {}
266
+
267
+ export interface AllHooks extends DynamicHooks {
268
+ /** Core lifecycle */
269
+
270
+ /**
271
+ * A hook event that fires as Foundry is initializing, right before any initialization tasks have begun.
272
+ * @remarks This is called by {@linkcode Hooks.callAll}.
273
+ * @see {@link Game.initialize | `Game#initialize`}
274
+ */
275
+ init: () => void;
276
+
277
+ /**
278
+ * A hook event that fires once Localization translations have been loaded and are ready for use.
279
+ * @remarks This is called by {@linkcode Hooks.callAll}.
280
+ * @see {@link Localization.initialize | `Localization#initialize`}
281
+ */
282
+ i18nInit: () => void;
283
+
284
+ /**
285
+ * A hook event that fires when Foundry has finished initializing but
286
+ * before the game state has been set up. Fires before any Documents, UI
287
+ * applications, or the Canvas have been initialized.
288
+ * @remarks This is called by {@linkcode Hooks.callAll}.
289
+ * @see {@link Game.setupGame | `Game#setupGame`}
290
+ */
291
+ setup: () => void;
292
+
293
+ /**
294
+ * A hook event that fires when the game is fully ready.
295
+ * @remarks This is called by {@linkcode Hooks.callAll}.
296
+ * @see {@link Game.setupGame | `Game#setupGame`}
297
+ */
298
+ ready: () => void;
299
+
300
+ /**
301
+ * A hook event that fires whenever foundry experiences an error.
302
+ *
303
+ * @param location - The method where the error was caught.
304
+ * @param err - The error.
305
+ * @param data - Additional data that might be provided, based on the nature of the error.
306
+ * (default: `{}`)
307
+ * @remarks This is called by {@linkcode Hooks.callAll}.
308
+ * @see {@linkcode Hooks.onError}
309
+ */
310
+ error: (...args: ValueOf<Hooks.ErrorCallbackParameters>) => void;
311
+
312
+ /** Game */
313
+
314
+ /**
315
+ * A hook event that fires when the game is paused or un-paused.
316
+ * @param paused - Is the game now paused (true) or un-paused (false)
317
+ * @param options - Options which modified the pause game request
318
+ * @remarks
319
+ * @see {@link Game.togglePause | `Game#togglePause`}
320
+ */
321
+ pauseGame: (paused: boolean, pauseOptions: foundry.Game.TogglePauseOptions) => void;
322
+
323
+ /**
324
+ * A hook event that fires when the World time has been updated.
325
+ * @param worldTime - The new canonical World time
326
+ * @param delta - The time delta
327
+ * @param options - Options passed from the requesting client where the change was made
328
+ * @param userId - The ID of the User who advanced the time
329
+ * @remarks This is called by {@linkcode Hooks.callAll}.
330
+ * @see {@link GameTime.onUpdateWorldTime | `GameTime#onUpdateWorldTime`}
331
+ */
332
+ updateWorldTime: (
333
+ worldTime: number,
334
+ delta: number,
335
+ options: Setting.Database.UpdateOperation,
336
+ userId: string,
337
+ ) => void;
338
+
339
+ /** CanvasLifecycle */
340
+
341
+ /**
342
+ * A hook event that fires immediately prior to PIXI Application construction with the configuration parameters.
343
+ * @param canvasConfig - Canvas configuration parameters that will be used to initialize the PIXI.Application
344
+ * @remarks This is called by {@linkcode Hooks.callAll}.
345
+ */
346
+ canvasConfig: (canvasConfig: ConstructorParameters<typeof PIXI.Application>[0]) => void;
347
+
348
+ /**
349
+ * A hook event that fires when the Canvas is initialized.
350
+ * @param canvas - the Canvas instance being initialized
351
+ * @remarks This is called by {@linkcode Hooks.callAll}.
352
+ * @see {@link Canvas.draw | `Canvas#draw`}
353
+ */
354
+ canvasInit: (canvas: Canvas) => void;
355
+
356
+ /**
357
+ * A hook event that fires when the Canvas is panned.
358
+ * @param canvas - The Canvas instance
359
+ * @param view - The applied camera position
360
+ * @remarks When called during animated panning, the callback is called on every tick.
361
+ * @remarks This is called by {@linkcode Hooks.callAll}.
362
+ * @see {@link Canvas.pan | `Canvas#pan`}
363
+ * @see {@link Canvas.animatePan | `Canvas#animatePan`}
364
+ */
365
+ canvasPan: (canvas: Canvas, view: Canvas.ViewPosition) => void;
366
+
367
+ /**
368
+ * A hook event that fires when the Canvas is ready.
369
+ * @param canvas - The Canvas which is now ready for use
370
+ * @remarks This is called by {@linkcode Hooks.call}.
371
+ * @see {@link Canvas.draw | `Canvas#draw`}
372
+ */
373
+ canvasReady: (canvas: Canvas) => boolean | void;
374
+
375
+ /**
376
+ * A hook event that fires when the Canvas is deactivated.
377
+ * @param canvas - The Canvas instance being deactivated
378
+ * @remarks This is called by {@linkcode Hooks.callAll}.
379
+ */
380
+ canvasTearDown: (canvas: Canvas) => void;
381
+
382
+ /**
383
+ * A hook event that fires when the Canvas is beginning to draw the canvas groups.
384
+ * @param canvas - The Canvas instance being drawn
385
+ * @remarks This is called by {@linkcode Hooks.callAll}.
386
+ */
387
+ canvasDraw: (canvas: Canvas) => void;
388
+
389
+ /**
390
+ * A hook event that fires when some useful data is dropped onto the Canvas.
391
+ * @param canvas - The Canvas
392
+ * @param data - The data that has been dropped onto the Canvas
393
+ * @remarks This is called by {@linkcode Hooks.call}.
394
+ * @remarks An explicit return value of `false` prevents the Document being created.
395
+ * @see `Canvas.#_onDrop`
396
+ */
397
+ dropCanvasData: (canvas: Canvas, data: Hooks.DropData, event: DragEvent) => boolean | void;
398
+
399
+ /**
400
+ * A hook event that fires when objects are highlighted on the canvas.
401
+ * Callers may use this hook to apply their own modifications or enhancements to highlighted objects.
402
+ * @param active - Is the highlight state now active
403
+ * @see {@link Canvas.highlightObjects | `Canvas#highlightObjects``}
404
+ */
405
+ highlightObjects: (active: boolean) => void;
406
+
407
+ /** Application */
408
+
409
+ /**
410
+ * A hook event that fires when the Scene controls are initialized.
411
+ * @param controls - The SceneControl configurations
412
+ * @remarks This is called by {@linkcode Hooks.callAll}.
413
+ * @see {@link SceneControls._getControlButtons | `SceneControls#_getControlButtons`}
414
+ * TODO: This saw a major rework in v13 and needs individual attention
415
+ */
416
+ // getSceneControlButtons: (controls: foundry.applications.ui.SceneControls.Control[]) => void;
417
+
418
+ /**
419
+ * A hook event that fires whenever data is dropped into a Hotbar slot.
420
+ * The hook provides a reference to the Hotbar application, the dropped data, and the target slot.
421
+ * Default handling of the drop event can be prevented by returning false within the hooked function.
422
+ * @param hotbar - The Hotbar application instance
423
+ * @param data - The dropped data object
424
+ * @param slot - The target hotbar slot
425
+ * @remarks This is called by {@linkcode Hooks.call}.
426
+ * @remarks An explicit return value of `false` prevents the Document being created.
427
+ * @see {@link Hotbar._onDrop | `Hotbar#_onDrop`}
428
+ */
429
+ hotbarDrop: (hotbar: foundry.applications.ui.Hotbar, data: Macro.DropData, slot: number) => boolean | void;
430
+
431
+ /**
432
+ * A hook event that fires when the SceneNavigation menu is expanded or collapsed.
433
+ * @param nav - The SceneNavigation application
434
+ * @param collapsed - Whether the navigation is now collapsed or not
435
+ * @remarks This is called by {@linkcode Hooks.callAll}.
436
+ * @see {@link SceneNavigation.expand | `SceneNavigation#expand`}
437
+ * @see {@link SceneNavigation.collapse | `SceneNavigation#collapse`}
438
+ */
439
+ collapseSceneNavigation: (nav: foundry.applications.ui.SceneNavigation, collapsed: boolean) => void;
440
+
441
+ /**
442
+ * A hook event that fires when the Sidebar is collapsed or expanded.
443
+ * @param sidebar - The Sidebar application
444
+ * @param collapsed - Whether the Sidebar is now collapsed or not
445
+ * @remarks This is called by {@linkcode Hooks.callAll}.
446
+ * @see {@link Sidebar.expand | `Sidebar#expand`}
447
+ * @see {@link Sidebar.collapse | `Sidebar#collapse`}
448
+ */
449
+ collapseSidebar: (sidebar: foundry.applications.sidebar.Sidebar, collapsed: boolean) => void;
450
+
451
+ /**
452
+ * A hook event that fires when the Sidebar tab is changed.
453
+ * @param app - The SidebarTab application which is now active
454
+ * @remarks This is called by {@linkcode Hooks.callAll}.
455
+ * @see {@link Sidebar._onChangeTab | `Sidebar#_onChangeTab`}
456
+ */
457
+ changeSidebarTab: (app: foundry.applications.sidebar.AbstractSidebarTab) => void;
458
+
459
+ /** Active Effects */
460
+
461
+ /**
462
+ * A hook event that fires when a custom active effect is applied.
463
+ * @param actor - The actor the active effect is being applied to
464
+ * @param change - The change data being applied
465
+ * @remarks This is called by {@linkcode Hooks.call}.
466
+ * @see {@link ActiveEffect._applyCustom | `ActiveEffect#_applyCustom`}
467
+ */
468
+ applyActiveEffect: (actor: Actor.Implementation, change: ActiveEffect.ChangeData) => boolean | void;
469
+
470
+ /** Compendium */
471
+
472
+ /**
473
+ * A hook event that fires whenever the contents of a Compendium pack were modified.
474
+ * This hook fires for all connected clients after the update has been processed.
475
+ *
476
+ * @param pack - The Compendium pack being modified
477
+ * @param documents - The locally-cached Documents which were modified in the operation
478
+ * @param options - Additional options which modified the modification request
479
+ * @param userId - The ID of the User who triggered the modification workflow
480
+ * @remarks This is called by {@linkcode Hooks.callAll}.
481
+ * @see {@link foundry.documents.collections.CompendiumCollection._onModifyContents | `foundry.documents.collections.CompendiumCollection#_onModifyContents`}
482
+ */
483
+ updateCompendium: (
484
+ pack: foundry.documents.collections.CompendiumCollection.Any,
485
+ documents: Document.Any[],
486
+ options: Document.Database.UpdateOptions<DatabaseUpdateOperation>,
487
+ userId: string,
488
+ ) => void;
489
+
490
+ /** Token */
491
+
492
+ /**
493
+ * A hook event that fires when a token {@linkcode Token} should apply a specific status effect.
494
+ * @param token - The token affected
495
+ * @param statusId - The status effect ID being applied, from CONFIG.specialStatusEffects.
496
+ * @param active - Is the special status effect now active?
497
+ */
498
+ applyTokenStatusEffect: (token: Token.Implementation, statusId: string, active: boolean) => void;
499
+
500
+ /**
501
+ * A hook event that fires when a chat bubble is initially configured.
502
+ * @param token - The speaking token
503
+ * @param html - The HTML of the chat bubble
504
+ * @param message - The spoken message text
505
+ * @param options - Provided options which affect bubble appearance
506
+ * @returns May return false to prevent the calling workflow
507
+ */
508
+ chatBubbleHTML: (
509
+ token: Token.Implementation,
510
+ html: HTMLElement,
511
+ message: string,
512
+ options: foundry.canvas.animation.ChatBubbles.Options,
513
+ ) => boolean | void;
514
+
515
+ /**
516
+ * A hook event that fires when a token's resource bar attribute has been modified.
517
+ * @param data - A object describing the modification
518
+ * @param updates - The update delta that will be applied to the Token's actor
519
+ * @returns whether the Actor should be updated
520
+ * @remarks This is called by {@linkcode Hooks.call}.
521
+ * @see {@link Actor.modifyTokenAttribute | `Actor#modifyTokenAttribute`}
522
+ * @see {@link Actor.update | `Actor#update`}
523
+ */
524
+ modifyTokenAttribute: (data: Actor.ModifyTokenAttributeData, updates: Record<string, number>) => boolean;
525
+
526
+ /**
527
+ * A hook event that fires when a token is targeted or un-targeted.
528
+ * @param user - The User doing the targeting
529
+ * @param token - The targeted Token
530
+ * @param targeted - Whether the Token has been targeted or untargeted
531
+ * @remarks This is called by {@linkcode Hooks.callAll}.
532
+ * @see {@link UserTargets._hook | `UserTargets#_hook`}
533
+ */
534
+ targetToken: (user: User.Implementation, token: Token.Implementation, targeted: boolean) => void;
535
+
536
+ /** Note */
537
+
538
+ /**
539
+ * A hook event that fires whenever a map note is double-clicked.
540
+ * The hook provides the note placeable and the arguments passed to the associated {@linkcode JournalSheet} render call.
541
+ * Hooked functions may modify the render arguments or cancel the render by returning false.
542
+ * @param note - The note that was activated
543
+ * @param options - Options for rendering the associated {@linkcode JournalSheet}
544
+ * @remarks This is called by {@linkcode Hooks.call}.
545
+ */
546
+ activateNote: (
547
+ note: Note.Implementation,
548
+ options:
549
+ | foundry.appv1.sheets.JournalSheet.Options
550
+ | foundry.applications.sheets.journal.JournalEntrySheet.RenderOptions,
551
+ ) => true | false;
552
+
553
+ /** Cards */
554
+
555
+ /**
556
+ * A hook event that fires when Cards are dealt from a deck to other hands
557
+ * @param origin - The origin Cards document
558
+ * @param destinations - An array of destination Cards documents
559
+ * @param context - Additional context which describes the operation
560
+ * @remarks This is called by {@linkcode Hooks.call}.
561
+ * @remarks An explicit return value of `false` prevents the operation.
562
+ */
563
+ dealCards: (
564
+ origin: Cards.Implementation,
565
+ destinations: Cards.Implementation[],
566
+ context: Cards.DealContext,
567
+ ) => boolean | void;
568
+
569
+ /**
570
+ * A hook event that fires when Cards are passed from one stack to another
571
+ * @param origin - The origin Cards document
572
+ * @param destination - The destination Cards document
573
+ * @param context - Additional context which describes the operation
574
+ * @remarks This is called by {@linkcode Hooks.call}.
575
+ * @remarks An explicit return value of `false` prevents the operation.
576
+ */
577
+ passCards: (
578
+ origin: Cards.Implementation,
579
+ destination: Cards.Implementation,
580
+ context: Cards.PassContext,
581
+ ) => boolean | void;
582
+
583
+ /**
584
+ * A hook event that fires when a stack of Cards are returned to the decks they originally came from.
585
+ * @param origin - The origin Cards document.
586
+ * @param returned - The cards being returned.
587
+ * @param context - Additional context which describes the operation.
588
+ */
589
+ returnCards: (
590
+ origin: Cards.Implementation,
591
+ returned: Card.Implementation[],
592
+ context: Cards.ReturnContext,
593
+ ) => boolean | void;
594
+
595
+ /** Actor */
596
+
597
+ /**
598
+ * A hook even that fires when package-provided art is applied to a compendium Document.
599
+ * @param documentClass - The Document class.
600
+ * @param source - The Document's source data.
601
+ * @param pack - The Document's compendium.
602
+ * @param art - The art being applied.
603
+ * @remarks Called as part of _initializeSource, after data migration, cleaning, and shims
604
+ * @remarks Currently only called by Actor but comments are more generic
605
+ * @remarks This is called by {@linkcode Hooks.callAll}.
606
+ */
607
+ applyCompendiumArt: (
608
+ documentClass: Actor.ImplementationClass,
609
+ source: foundry.documents.BaseActor.CreateData,
610
+ pack: foundry.documents.collections.CompendiumCollection.Any,
611
+ art: CompendiumArt.Info,
612
+ ) => void;
613
+
614
+ /** ActorSheet */
615
+
616
+ /**
617
+ * A hook event that fires when some useful data is dropped onto an ActorSheet.
618
+ * @param actor - The Actor
619
+ * @param sheet - The ActorSheet application
620
+ * @param data - The data that has been dropped onto the sheet
621
+ * @remarks This is called by {@linkcode Hooks.call}.
622
+ * @remarks An explicit return value of `false` prevents the Document being created.
623
+ * @see {@link ActorSheet._onDrop | `ActorSheet#_onDrop`}
624
+ */
625
+ dropActorSheetData: (
626
+ actor: Actor.Implementation,
627
+ sheet: foundry.appv1.sheets.ActorSheet.Any | foundry.applications.sheets.ActorSheetV2.Any,
628
+ data: foundry.appv1.sheets.ActorSheet.DropData,
629
+ ) => boolean | void;
630
+
631
+ /** CanvasVisibility */
632
+
633
+ /**
634
+ * A hook event that fires when the set of vision sources are initialized.
635
+ * @param sources - The collection of current vision sources
636
+ * @remarks This is called by {@linkcode Hooks.call}.
637
+ */
638
+ initializeVisionSources: (sources: Collection<PointVisionSource.Any>) => void;
639
+
640
+ /**
641
+ * A hook event that fires when the LightingLayer is refreshed.
642
+ * @param layer - the LightingLayer
643
+ * @remarks This is called by {@linkcode Hooks.callAll}.
644
+ * @see {@link LightingLayer.refresh | `LightingLayer#refresh`}
645
+ */
646
+ lightingRefresh: (layer: layers.LightingLayer) => void;
647
+
648
+ /**
649
+ * A hook event that fires when visibility is refreshed.
650
+ * @param visibility - The CanvasVisibility instance
651
+ * @remarks This is called by {@linkcode Hooks.callAll}.
652
+ */
653
+ visibilityRefresh: (visibility: CanvasVisibility) => void;
654
+
655
+ /**
656
+ * A hook event that fires during light source initialization.
657
+ * This hook can be used to add programmatic light sources to the Scene.
658
+ * @param source - The EffectsCanvasGroup where light sources are initialized
659
+ * @remarks This is called by {@linkcode Hooks.callAll}.
660
+ * @see {@link EffectsCanvasGroup.initializeLightSources | `EffectsCanvasGroup#initializeLightSources`}
661
+ */
662
+ initializeLightSources: (group: EffectsCanvasGroup) => void;
663
+
664
+ /**
665
+ * A hook event that fires during darkness source initialization.
666
+ * This hook can be used to add programmatic darkness sources to the Scene.
667
+ * @param group - The EffectsCanvasGroup where darkness sources are initialized
668
+ * @remarks This is called by {@linkcode Hooks.callAll}.
669
+ */
670
+ initializeDarknessSources: (group: EffectsCanvasGroup) => void;
671
+
672
+ /**
673
+ * A hook event that fires when the CanvasVisibility layer has been refreshed.
674
+ * @param visibility - The CanvasVisibility layer
675
+ * @remarks This is called by {@linkcode Hooks.callAll}.
676
+ * @see {@link CanvasVisibility.restrictVisibility | `CanvasVisibility#restrictVisibility`}
677
+ */
678
+ sightRefresh: (visibility: CanvasVisibility) => void;
679
+
680
+ /** Weather */
681
+
682
+ /**
683
+ * Initialize the weather container from a weather config object.
684
+ * @param weatherEffect - The weather effects canvas layer
685
+ * @param weatherEffectsConfig - The weather effects config object
686
+ * @remarks This is called by {@linkcode Hooks.callAll}.
687
+ */
688
+ initializeWeatherEffects: (
689
+ weatherEffect: layers.WeatherEffects,
690
+ weatherEffectsConfig?: layers.WeatherEffects.EffectConfiguration | null,
691
+ ) => void;
692
+
693
+ /** Adventure */
694
+
695
+ /**
696
+ * A hook event that fires when Adventure data is being prepared for import.
697
+ * Modules may return false from this hook to take over handling of the import workflow.
698
+ * @param adventure - The Adventure document from which content is being imported
699
+ * @param formData - Processed data from the importer form
700
+ * @param toCreate - Adventure data which needs to be created in the World
701
+ * @param toUpdate - Adventure data which needs to be updated in the World
702
+ * @returns False to prevent the core software from handling the import
703
+ * @remarks This is called by {@linkcode Hooks.call}.
704
+ */
705
+ preImportAdventure: (
706
+ adventure: Adventure.Implementation,
707
+ formData: Adventure.ImportOptions,
708
+ toCreate: Adventure.ImportData["toCreate"],
709
+ toUpdate: Adventure.ImportData["toUpdate"],
710
+ ) => boolean | void;
711
+
712
+ /**
713
+ * A hook event that fires after an Adventure has been imported into the World.
714
+ * @param adventure - The Adventure document from which content is being imported
715
+ * @param formData - Processed data from the importer form
716
+ * @param toCreate - Adventure data which needs to be created in the World
717
+ * @param toUpdate - Adventure data which needs to be updated in the World
718
+ * @returns False to prevent the core software from handling the import
719
+ * @remarks This is called by {@linkcode Hooks.callAll}.
720
+ */
721
+ importAdventure: (
722
+ adventure: Adventure.Implementation,
723
+ formData: Adventure.ImportOptions,
724
+ created: Adventure.ImportResult["created"],
725
+ updated: Adventure.ImportResult["updated"],
726
+ ) => void;
727
+
728
+ /** Socket */
729
+
730
+ /**
731
+ * A hook event that fires whenever some other User joins or leaves the game session.
732
+ * @param user - The User who connected or disconnected
733
+ * @param connected - Is the user now connected (true) or disconnected (false)
734
+ * @remarks This is called by {@linkcode Hooks.callAll}.
735
+ */
736
+ userConnected: (user: User.Implementation, connected: boolean) => void;
737
+
738
+ /** Combat */
739
+
740
+ /**
741
+ * A hook event which fires when the turn order of a Combat encounter is progressed.
742
+ * This event fires on all clients after the database update has occurred for the Combat.
743
+ * @param combat - The Combat encounter for which the turn order has changed
744
+ * @param prior - The prior turn state
745
+ * @param current - The new turn state
746
+ * @remarks This is called by {@linkcode Hooks.callAll}.
747
+ */
748
+ combatTurnChange: (combat: Combat.Implementation, prior: Combat.HistoryData, current: Combat.HistoryData) => void;
749
+
750
+ /**
751
+ * A hook event that fires when a Combat encounter is started.
752
+ * This event fires on the initiating client before any database update occurs.
753
+ * @param combat - The Combat encounter which is starting
754
+ * @param updateData - An object which contains Combat properties that will be updated. Can be mutated.
755
+ */
756
+ combatStart: (
757
+ combat: Combat.Implementation,
758
+ updateData: {
759
+ /** The initial round */
760
+ round: number;
761
+
762
+ /** The initial turn */
763
+ turn: number;
764
+ },
765
+ ) => void;
766
+
767
+ /**
768
+ * A hook event that fires when the turn of the Combat encounter changes.
769
+ * This event fires on the initiating client before any database update occurs.
770
+ * @param combat - The Combat encounter which is advancing or rewinding its turn
771
+ * @param updateData - An object which contains Combat properties that will be updated. Can be mutated.
772
+ * @param updateOptions - An object which contains options provided to the update method. Can be mutated.
773
+ */
774
+ combatTurn: (
775
+ combat: Combat.Implementation,
776
+ updateData: {
777
+ /** The current round of combat */
778
+ round: number;
779
+
780
+ /** The new turn number */
781
+ turn: number;
782
+ },
783
+ updateOptions: {
784
+ /** The amount of time in seconds that time is being advanced */
785
+ advanceTime: number;
786
+
787
+ /** A signed integer for whether the turn order is advancing or rewinding */
788
+ direction: number;
789
+ },
790
+ ) => void;
791
+
792
+ /**
793
+ * A hook event that fires when the round of the Combat encounter changes.
794
+ * @param combat - The Combat encounter which is advancing or rewinding its round
795
+ * @param updateData - An object which contains Combat properties that will be updated. Can be mutated.
796
+ * @param updateOptions - An object which contains options provided to the update method. Can be mutated.
797
+ */
798
+ combatRound: (
799
+ combat: Combat.Implementation,
800
+ updateData: {
801
+ /** The new round of combat */
802
+ round: number;
803
+
804
+ /** The new turn number */
805
+ turn: number;
806
+ },
807
+ updateOptions: {
808
+ /** The amount of time in seconds that time is being advanced */
809
+ advanceTime: number;
810
+
811
+ /** A signed integer for whether the turn order is advancing or rewinding */
812
+ direction: number;
813
+ },
814
+ ) => void;
815
+
816
+ /**
817
+ * A hook even that fires when a ProseMirrorMenu's drop-downs are initialized.
818
+ * The hook provides the ProseMirrorMenu instance and an object of drop-down configuration data.
819
+ * Hooked functions may append their own drop-downs or append entries to existing drop-downs.
820
+ * @param menu - The ProseMirrorMenu instance.
821
+ * @param config - The drop-down config.
822
+ * @remarks This is called by {@linkcode Hooks.callAll}.
823
+ */
824
+ getProseMirrorMenuDropdowns: (
825
+ menu: ProseMirrorMenu,
826
+ config: {
827
+ format: ProseMirrorDropDown.Config;
828
+ fonts: ProseMirrorDropDown.Config;
829
+ },
830
+ ) => void;
831
+
832
+ /**
833
+ * A hook even that fires when a ProseMirrorMenu's buttons are initialized.
834
+ * The hook provides the ProseMirrorMenu instance and an array of button configuration data.
835
+ * Hooked functions may append their own buttons to the list.
836
+ * @param menu - The ProseMirrorMenu instance
837
+ * @param config - The button configuration objects
838
+ * @remarks This is called by {@linkcode Hooks.callAll}.
839
+ */
840
+ // TODO: Having trouble finding the appropriate typing for the menu items? Also, where is this even called?
841
+ getProseMirrorMenuItems: (menu: ProseMirrorMenu, config: unknown[]) => void;
842
+
843
+ /**
844
+ * A hook event that fires whenever a ProseMirror editor is created.
845
+ * The hook provides the ProseMirror instance UUID, a list of plugins, and an object containing the provisional
846
+ * editor state, and a reference to the menu plugin.
847
+ * Hooked functions may append their own plugins or replace the state or menu plugin by replacing their references
848
+ * in the final argument.
849
+ *
850
+ * @param uuid - A UUID that uniquely identifies this ProseMirror instance.
851
+ * @param plugins - A list of plugins that will be loaded.
852
+ * @param options - The provisional EditorState and ProseMirrorMenuPlugin.
853
+ * @remarks This is called by {@linkcode Hooks.callAll}.
854
+ * @see {@linkcode ProseMirrorEditor.create}
855
+ */
856
+ createProseMirrorEditor: (uuid: string, plugins: Record<string, Plugin>, options: { state: EditorState }) => void;
857
+
858
+ streamReady: () => void;
859
+
860
+ /**
861
+ * A hook event that fires when a package that is being watched by the hot reload system has a file changed.
862
+ * The hook provides the hot reload data related to the file change.
863
+ * Hooked functions may intercept the hot reload and prevent the core software from handling it by returning false.
864
+ * @param data - The hot reload data
865
+ * @remarks This is called by {@linkcode Hooks.call}.
866
+ */
867
+ hotReload: (data: Hooks.HotReloadData) => boolean | void;
868
+
869
+ /**
870
+ * A hook event that fires when a user sends a message through the ChatLog.
871
+ * @param chatLog - The ChatLog instance
872
+ * @param message - The trimmed message content
873
+ * @param chatData - The basic chat data
874
+ * @remarks This is called by {@linkcode Hooks.call}.
875
+ * @remarks An explicit return value of `false` prevents the chat message from being created.
876
+ * @see {@link ChatLog.processMessage | `ChatLog#processMessage`}
877
+ */
878
+ chatMessage: (
879
+ chatLog: foundry.applications.sidebar.tabs.ChatLog,
880
+ message: string,
881
+ chatData: {
882
+ /** The id of the User sending the message */
883
+ user: string;
884
+
885
+ /** The identified speaker data, see {@linkcode ChatMessage.getSpeaker} */
886
+ speaker: ReturnType<ChatMessage.ImplementationClass["getSpeaker"]>;
887
+ },
888
+ ) => boolean | void;
889
+
890
+ /**
891
+ * A hook event that fires for each ChatMessage which is rendered for addition to the ChatLog.
892
+ * This hook allows for final customization of the message HTML before it is added to the log.
893
+ * @param message - The ChatMessage document being rendered.
894
+ * @param html - The pending HTML.
895
+ * @param context - The rendering context.
896
+ */
897
+ renderChatMessageHTML: (
898
+ message: ChatMessage.Implementation,
899
+ html: HTMLElement,
900
+ context: ChatMessage.MessageData,
901
+ ) => void;
902
+
903
+ /** Audio-Video */
904
+
905
+ // Individually implemented all three options for globalVolumeChanged
906
+
907
+ /**
908
+ * A hook event that fires when the user modifies a global volume slider.
909
+ * @param volume - The new volume level
910
+ * @remarks This is called by {@linkcode Hooks.callAll}.
911
+ * @see {@link AudioHelper._onChangeGlobalVolume | `AudioHelper#_onChangeGlobalVolume`}
912
+ */
913
+ globalAmbientVolumeChanged: (volume: number) => void;
914
+
915
+ /**
916
+ * A hook event that fires when the user modifies a global volume slider.
917
+ * @param volume - The new volume level
918
+ * @remarks This is called by {@linkcode Hooks.callAll}.
919
+ * @see {@link AudioHelper._onChangeGlobalVolume | `AudioHelper#_onChangeGlobalVolume`}
920
+ */
921
+ globalInterfaceVolumeChanged: (volume: number) => void;
922
+
923
+ /**
924
+ * A hook event that fires when the user modifies a global volume slider.
925
+ * @param volume - The new volume level
926
+ * @remarks This is called by {@linkcode Hooks.callAll}.
927
+ * @see {@link AudioHelper._onChangeGlobalVolume | `AudioHelper#_onChangeGlobalVolume`}
928
+ */
929
+ globalPlaylistVolumeChanged: (volume: number) => void;
930
+
931
+ /**
932
+ * A hook event that fires when the AV settings are changed.
933
+ * @param settings - The AVSettings manager
934
+ * @param changed - The delta of the settings that have been changed
935
+ * @remarks This is called by {@linkcode Hooks.callAll}.
936
+ * @see {@link AVSettings._onSettingsChanged | `AVSettings#_onSettingsChanged`}
937
+ */
938
+ rtcSettingsChanged: (settings: AVSettings, changed: DeepPartial<AVSettings.Settings>) => void;
939
+
940
+ /** RollTableConfig */
941
+
942
+ /**
943
+ * A hook event that fires when some useful data is dropped onto a RollTableConfig.
944
+ * @param table - The RollTable
945
+ * @param config - The RollTableConfig application
946
+ * @param data - The data dropped onto the RollTableConfig
947
+ * @remarks This is called by {@linkcode Hooks.call}.
948
+ * @remarks An explicit return value of `false` prevents the Document being created.
949
+ * @see {@link RollTableConfig._onDrop | `RollTableConfig#_onDrop`}
950
+ */
951
+ dropRollTableSheetData: (
952
+ table: RollTable.Implementation,
953
+ config: foundry.applications.sheets.RollTableSheet.Any,
954
+ data: object,
955
+ ) => boolean | void;
956
+
957
+ /**
958
+ * A hook event that allows to pass custom dynamic ring configurations.
959
+ * @param ringConfig - The ring configuration instance
960
+ * @remarks This is called by {@linkcode Hooks.callAll}.
961
+ */
962
+ initializeDynamicTokenRingConfig: (ringConfig: TokenRingConfig) => void;
963
+
964
+ /**
965
+ * A hook event that fires when the context menu for a PlayersList entry is constructed.
966
+ * @param app - The Application instance that the context menu is constructed in
967
+ * @param contextOptions - The context menu entries
968
+ * @remarks This is called by {@linkcode Hooks.call}.
969
+ * @see {@link PlayerList.activateListeners | `PlayerList#activateListeners`}
970
+ */
971
+ getUserContextOptions: (
972
+ app: foundry.applications.ui.Players,
973
+ contextOptions: ContextMenu.Entry<HTMLElement>[],
974
+ ) => boolean | void;
975
+ }
10
976
 
11
977
  declare global {
12
978
  /**
13
- * This namespace contains typescript specific type definitions for the {@link Hooks} callback functions. It contains an
14
- * interface ({@link Hooks.StaticCallbacks}) for callbacks with static names. There are more function types in the
15
- * namespace for the dynamic hooks, whose names are generated at runtime. There is also a union of all of the dynamic
16
- * hooks ({@link Hooks.DynamicCallbacks}).
979
+ * This namespace contains typescript specific type definitions for the {@linkcode Hooks} callback functions. It contains an
980
+ * interface ({@linkcode Hooks.StaticCallbacks}) for callbacks with static names. There are more function types in the
981
+ * namespace for the dynamic hooks, whose names are generated at runtime.
17
982
  *
18
- * Callback types remarked to be called with {@link Hooks.callAll} do not care about the return value of the callback.
19
- * Callback types remarked to be called with {@link Hooks.call} do care about the return value and will stop executing
983
+ * Callback types remarked to be called with {@linkcode Hooks.callAll} do not care about the return value of the callback.
984
+ * Callback types remarked to be called with {@linkcode Hooks.call} do care about the return value and will stop executing
20
985
  * remaining callbacks if `false` is returned. If a callback type does not have such a remark, pay attention to the
21
986
  * return value documentation.
22
987
  *
@@ -48,789 +1013,104 @@ declare global {
48
1013
  * ```
49
1014
  */
50
1015
  namespace Hooks {
51
- interface OnOptions {
52
- /** Only trigger the hooked function once */
53
- once?: boolean;
54
- }
1016
+ interface HotReloadData {
1017
+ /** The type of package which was modified */
1018
+ packageType: string;
1019
+
1020
+ /** The id of the package which was modified */
1021
+ packageId: string;
1022
+
1023
+ /** The updated stringified file content */
1024
+ content: string;
55
1025
 
56
- interface StaticCallbacks {
57
- /** Core lifecycle */
58
-
59
- /**
60
- * A hook event that fires as Foundry is initializing, right before any initialization tasks have begun.
61
- * @remarks This is called by {@link Hooks.callAll}.
62
- * @see {@link Game#initialize}
63
- */
64
- init: () => void;
65
-
66
- /**
67
- * A hook event that fires once Localization translations have been loaded and are ready for use.
68
- * @remarks This is called by {@link Hooks.callAll}.
69
- * @see {@link Localization#initialize}
70
- */
71
- i18nInit: () => void;
72
-
73
- /**
74
- * A hook event that fires when Foundry has finished initializing but
75
- * before the game state has been set up. Fires before any Documents, UI
76
- * applications, or the Canvas have been initialized.
77
- * @remarks This is called by {@link Hooks.callAll}.
78
- * @see {@link Game#setupGame}
79
- */
80
- setup: () => void;
81
-
82
- /**
83
- * A hook event that fires when the game is fully ready.
84
- * @remarks This is called by {@link Hooks.callAll}.
85
- * @see {@link Game#setupGame}
86
- */
87
- ready: () => void;
88
-
89
- /**
90
- * A hook event that fires whenever foundry experiences an error.
91
- *
92
- * @param location - The method where the error was caught.
93
- * @param err - The error.
94
- * @param data - Additional data that might be provided, based on the nature of the error.
95
- * (default: `{}`)
96
- * @remarks This is called by {@link Hooks.callAll}.
97
- * @see {@link Hooks.onError}
98
- */
99
- error: (...args: ValueOf<ErrorCallbackParameters>) => void;
100
-
101
- /** Game */
102
-
103
- /**
104
- * A hook event that fires when the game is paused or un-paused.
105
- * @param paused - Is the game now paused (true) or un-paused (false)
106
- * @remarks This is called by {@link Hooks.callAll}.
107
- * @see {@link Game#togglePause}
108
- */
109
- pauseGame: (paused: boolean) => void;
110
-
111
- /**
112
- * A hook event that fires when the World time has been updated.
113
- * @param worldTime - The new canonical World time
114
- * @param delta - The time delta
115
- * @remarks This is called by {@link Hooks.callAll}.
116
- * @see {@link GameTime#onUpdateWorldTime}
117
- */
118
- updateWorldTime: (worldTime: number, delta: number) => void;
119
-
120
- /** CanvasLifecycle */
121
-
122
- /**
123
- * A hook event that fires immediately prior to PIXI Application construction with the configuration parameters.
124
- * @param canvasConfig - Canvas configuration parameters that will be used to initialize the PIXI.Application
125
- * @remarks This is called by {@link Hooks.callAll}.
126
- */
127
- canvasConfig: (canvasConfig: ConstructorParameters<typeof PIXI.Application>[0]) => void;
128
-
129
- /**
130
- * A hook event that fires when the Canvas is initialized.
131
- * @param canvas - the Canvas instance being initialized
132
- * @remarks This is called by {@link Hooks.callAll}.
133
- * @see {@link Canvas#draw}
134
- */
135
- canvasInit: (canvas: Canvas) => void;
136
-
137
- /**
138
- * A hook event that fires when the Canvas is panned.
139
- * @param canvas - The Canvas instance
140
- * @param view - The applied camera position
141
- * @remarks When called during animated panning, the callback is called on every tick.
142
- * @remarks This is called by {@link Hooks.callAll}.
143
- * @see {@link Canvas#pan}
144
- * @see {@link Canvas#animatePan}
145
- */
146
- canvasPan: (canvas: Canvas, view: Canvas.ViewPosition) => void;
147
-
148
- /**
149
- * A hook event that fires when the Canvas is ready.
150
- * @param canvas - The Canvas which is now ready for use
151
- * @remarks This is called by {@link Hooks.call}.
152
- * @see {@link Canvas#draw}
153
- */
154
- canvasReady: (canvas: Canvas) => boolean | void;
155
-
156
- /**
157
- * A hook event that fires when the Canvas is deactivated.
158
- * @param canvas - The Canvas instance being deactivated
159
- * @remarks This is called by {@link Hooks.callAll}.
160
- */
161
- canvasTearDown: (canvas: Canvas) => void;
162
-
163
- /**
164
- * A hook event that fires when the Canvas is beginning to draw the canvas groups.
165
- * @param canvas - The Canvas instance being drawn
166
- * @remarks This is called by {@link Hooks.callAll}.
167
- */
168
- canvasDraw: (canvas: Canvas) => void;
169
-
170
- /**
171
- * A hook event that fires when some useful data is dropped onto the Canvas.
172
- * @param canvas - The Canvas
173
- * @param data - The data that has been dropped onto the Canvas
174
- * @remarks This is called by {@link Hooks.call}.
175
- * @remarks An explicit return value of `false` prevents the Document being created.
176
- * @see {@link Canvas#_onDrop}
177
- */
178
- dropCanvasData: (canvas: Canvas, data: TokenLayer.DropData | NotesLayer.DropData) => boolean | void;
179
-
180
- /**
181
- * A hook event that fires when objects are highlighted on the canvas.
182
- * Callers may use this hook to apply their own modifications or enhancements to highlighted objects.
183
- * @param active - Is the highlight state now active
184
- * @see {@link Canvas#highlightObjects}
185
- */
186
- highlightObjects: (active: boolean) => void;
187
-
188
- /** Application */
189
-
190
- /**
191
- * A hook event that fires when the Scene controls are initialized.
192
- * @param controls - The SceneControl configurations
193
- * @remarks This is called by {@link Hooks.callAll}.
194
- * @see {@link SceneControls#_getControlButtons}
195
- */
196
- getSceneControlButtons: (controls: SceneControl[]) => void;
197
-
198
- /**
199
- * A hook event that fires whenever data is dropped into a Hotbar slot.
200
- * The hook provides a reference to the Hotbar application, the dropped data, and the target slot.
201
- * Default handling of the drop event can be prevented by returning false within the hooked function.
202
- * @param hotbar - The Hotbar application instance
203
- * @param data - The dropped data object
204
- * @param slot - The target hotbar slot
205
- * @remarks This is called by {@link Hooks.call}.
206
- * @remarks An explicit return value of `false` prevents the Document being created.
207
- * @see {@link Hotbar#_onDrop}
208
- */
209
- hotbarDrop: (hotbar: Hotbar, data: Document.DropData<Macro.ConfiguredInstance>, slot: number) => boolean | void;
210
-
211
- /**
212
- * A hook event that fires when the SceneNavigation menu is expanded or collapsed.
213
- * @param nav - The SceneNavigation application
214
- * @param collapsed - Whether the navigation is now collapsed or not
215
- * @remarks This is called by {@link Hooks.callAll}.
216
- * @see {@link SceneNavigation#expand}
217
- * @see {@link SceneNavigation#collapse}
218
- */
219
- collapseSceneNavigation: (nav: SceneNavigation, collapsed: boolean) => void;
220
-
221
- /**
222
- * A hook event that fires when the Sidebar is collapsed or expanded.
223
- * @param sidebar - The Sidebar application
224
- * @param collapsed - Whether the Sidebar is now collapsed or not
225
- * @remarks This is called by {@link Hooks.callAll}.
226
- * @see {@link Sidebar#expand}
227
- * @see {@link Sidebar#collapse}
228
- */
229
- collapseSidebar: (sidebar: Sidebar, collapsed: boolean) => void;
230
-
231
- /**
232
- * A hook event that fires when the Sidebar tab is changed.
233
- * @param app - The SidebarTab application which is now active
234
- * @remarks This is called by {@link Hooks.callAll}.
235
- * @see {@link Sidebar#_onChangeTab}
236
- */
237
- changeSidebarTab: (app: SidebarTab) => void;
238
-
239
- /** Active Effects */
240
-
241
- /**
242
- * A hook event that fires when a custom active effect is applied.
243
- * @param actor - The actor the active effect is being applied to
244
- * @param change - The change data being applied
245
- * @remarks This is called by {@link Hooks.call}.
246
- * @see {@link ActiveEffect#_applyCustom}
247
- */
248
- applyActiveEffect: (actor: Actor.ConfiguredInstance, change: ActiveEffect.EffectChangeData) => boolean | void;
249
-
250
- /** Compendium */
251
-
252
- /**
253
- * A hook event that fires whenever the contents of a Compendium pack were modified.
254
- * This hook fires for all connected clients after the update has been processed.
255
- *
256
- * @param pack - The Compendium pack being modified
257
- * @param documents - The locally-cached Documents which were modified in the operation
258
- * @param options - Additional options which modified the modification request
259
- * @param userId - The ID of the User who triggered the modification workflow
260
- * @remarks This is called by {@link Hooks.callAll}.
261
- * @see {@link CompendiumCollection#_onModifyContents}
262
- */
263
- updateCompendium: (
264
- pack: CompendiumCollection.Any,
265
- documents: Document.Any[],
266
- options: Document.OnUpdateOptions<Document.Any["documentName"]>,
267
- userId: string,
268
- ) => void;
269
-
270
- /** Token */
271
-
272
- /**
273
- * A hook event that fires when a token {@link Token} should apply a specific status effect.
274
- * @param token - The token affected
275
- * @param statusId - The status effect ID being applied, from CONFIG.specialStatusEffects.
276
- * @param active - Is the special status effect now active?
277
- */
278
- applyTokenStatusEffect: (token: Token.ConfiguredInstance, statusId: string, active: boolean) => void;
279
-
280
- /**
281
- * A hook event that fires when a chat bubble is initially configured.
282
- * @param token - The speaking token
283
- * @param html - The HTML for the chat bubble
284
- * @param message - The spoken message text
285
- * @param options - additional options
286
- * @remarks This is called when creating a {@link ChatBubble}, but before displaying it.
287
- * @remarks This is called by {@link Hooks.call}.
288
- * @remarks An explicit return value of `false` prevents the chat bubble being shown.
289
- * @see {@link ChatBubbles#say}
290
- */
291
- chatBubble: (
292
- token: Token,
293
- html: JQuery,
294
- message: string,
295
- options: {
296
- /** Whether to style the speech bubble as an emote */
297
- emote: boolean;
298
- },
299
- ) => boolean | void;
300
-
301
- /**
302
- * A hook event that fires when a token's resource bar attribute has been modified.
303
- * @param data - A object describing the modification
304
- * @param updates - The update delta that will be applied to the Token's actor
305
- * @returns whether the Actor should be updated
306
- * @remarks This is called by {@link Hooks.call}.
307
- * @see {@link Actor#modifyTokenAttribute}
308
- * @see {@link Actor#update}
309
- */
310
- modifyTokenAttribute: (
311
- data: {
312
- /** The attribute path */
313
- attribute: string;
314
-
315
- /** The target attribute value */
316
- value: number;
317
-
318
- /** Whether the number represents a relative change (true) or an absolute change (false) */
319
- isDelta: boolean;
320
-
321
- /** Whether the new value is part of an attribute bar, or just a direct value */
322
- isBar: boolean;
323
- },
324
- updates: Record<string, number>,
325
- ) => boolean;
326
-
327
- /**
328
- * A hook event that fires when a token is targeted or un-targeted.
329
- * @param user - The User doing the targeting
330
- * @param token - The targeted Token
331
- * @param targeted - Whether the Token has been targeted or untargeted
332
- * @remarks This is called by {@link Hooks.callAll}.
333
- * @see {@link UserTargets#_hook}
334
- */
335
- targetToken: (
336
- user: User.ConfiguredInstance,
337
- token: Document.ConfiguredObjectClassForName<"Token">,
338
- targeted: boolean,
339
- ) => void;
340
-
341
- /** Note */
342
-
343
- /**
344
- * A hook event that fires whenever a map note is double-clicked.
345
- * The hook provides the note placeable and the arguments passed to the associated {@link JournalSheet} render call.
346
- * Hooked functions may modify the render arguments or cancel the render by returning false.
347
- * @param note - The note that was activated
348
- * @param options - Options for rendering the associated {@link JournalSheet}
349
- * @remarks This is called by {@link Hooks.call}.
350
- */
351
- activateNote: (note: Note.ConfiguredInstance, options: JournalSheet.RenderOptions) => true | false;
352
-
353
- /** Cards */
354
-
355
- /**
356
- * A hook event that fires when Cards are dealt from a deck to other hands
357
- * @param origin - The origin Cards document
358
- * @param destinations - An array of destination Cards documents
359
- * @param context - Additional context which describes the operation
360
- * @remarks This is called by {@link Hooks.call}.
361
- * @remarks An explicit return value of `false` prevents the operation.
362
- */
363
- dealCards: (
364
- origin: Cards.ConfiguredInstance,
365
- destinations: Cards.ConfiguredInstance[],
366
- context: Cards.DealContext,
367
- ) => boolean | void;
368
-
369
- /**
370
- * A hook event that fires when Cards are passed from one stack to another
371
- * @param origin - The origin Cards document
372
- * @param destination - The destination Cards document
373
- * @param context - Additional context which describes the operation
374
- * @remarks This is called by {@link Hooks.call}.
375
- * @remarks An explicit return value of `false` prevents the operation.
376
- */
377
- passCards: (
378
- origin: Cards.ConfiguredInstance,
379
- destination: Cards.ConfiguredInstance,
380
- context: Cards.DealContext,
381
- ) => boolean | void;
382
-
383
- /**
384
- * A hook event that fires when a stack of Cards are returned to the decks they originally came from.
385
- * @param origin - The origin Cards document.
386
- * @param returned - The cards being returned.
387
- * @param context - Additional context which describes the operation.
388
- */
389
- returnCards: (
390
- origin: Cards.ConfiguredInstance,
391
- returned: Card.ConfiguredInstance[],
392
- context: Cards.ReturnContext,
393
- ) => boolean | void;
394
-
395
- /** Actor */
396
-
397
- /**
398
- * A hook even that fires when package-provided art is applied to a compendium Document.
399
- * @param documentClass - The Document class.
400
- * @param source - The Document's source data.
401
- * @param pack - The Document's compendium.
402
- * @param art - The art being applied.
403
- * @remarks Called as part of _initializeSource, after data migration, cleaning, and shims
404
- * @remarks Currently only called by Actor but comments are more generic
405
- * @remarks This is called by {@link Hooks.callAll}.
406
- */
407
- applyCompendiumArt: (
408
- documentClass: Actor.ConfiguredClass,
409
- source: foundry.documents.BaseActor.ConstructorData,
410
- pack: CompendiumCollection.Any,
411
- art: CompendiumArtInfo,
412
- ) => void;
413
-
414
- /** ActorSheet */
415
-
416
- /**
417
- * A hook event that fires when some useful data is dropped onto an ActorSheet.
418
- * @param actor - The Actor
419
- * @param sheet - The ActorSheet application
420
- * @param data - The data that has been dropped onto the sheet
421
- * @remarks This is called by {@link Hooks.call}.
422
- * @remarks An explicit return value of `false` prevents the Document being created.
423
- * @see {@link ActorSheet#_onDrop}
424
- */
425
- dropActorSheetData: (
426
- actor: Actor.ConfiguredInstance,
427
- sheet: ActorSheet,
428
- data: ActorSheet.DropData,
429
- ) => boolean | void;
430
-
431
- /** CanvasVisibility */
432
-
433
- /**
434
- * A hook event that fires when the set of vision sources are initialized.
435
- * @param sources - The collection of current vision sources
436
- * @remarks This is called by {@link Hooks.call}.
437
- */
438
- initializeVisionSources: (sources: Collection<PointVisionSource.Any>) => void;
439
-
440
- /**
441
- * A hook event that fires when the LightingLayer is refreshed.
442
- * @param layer - the LightingLayer
443
- * @remarks This is called by {@link Hooks.callAll}.
444
- * @see {@link LightingLayer#refresh}
445
- */
446
- lightingRefresh: (layer: LightingLayer) => void;
447
-
448
- /**
449
- * A hook event that fires when visibility is refreshed.
450
- * @param visibility - The CanvasVisibility instance
451
- * @remarks This is called by {@link Hooks.callAll}.
452
- */
453
- visibilityRefresh: (visibility: CanvasVisibility) => void;
454
-
455
- /**
456
- * A hook event that fires during light source initialization.
457
- * This hook can be used to add programmatic light sources to the Scene.
458
- * @param source - The EffectsCanvasGroup where light sources are initialized
459
- * @remarks This is called by {@link Hooks.callAll}.
460
- * @see {@link EffectsCanvasGroup#initializeLightSources}
461
- */
462
- initializeLightSources: (group: EffectsCanvasGroup) => void;
463
-
464
- /**
465
- * A hook event that fires during darkness source initialization.
466
- * This hook can be used to add programmatic darkness sources to the Scene.
467
- * @param group - The EffectsCanvasGroup where darkness sources are initialized
468
- * @remarks This is called by {@link Hooks.callAll}.
469
- */
470
- initializeDarknessSources: (group: EffectsCanvasGroup) => void;
471
-
472
- /**
473
- * A hook event that fires when the CanvasVisibility layer has been refreshed.
474
- * @param visibility - The CanvasVisibility layer
475
- * @remarks This is called by {@link Hooks.callAll}.
476
- * @see {@link CanvasVisibility#restrictVisibility}
477
- */
478
- sightRefresh: (visibility: CanvasVisibility) => void;
479
-
480
- /** Weather */
481
-
482
- /**
483
- * Initialize the weather container from a weather config object.
484
- * @param weatherEffect - The weather effects canvas layer
485
- * @param weatherEffectsConfig - The weather effects config object
486
- * @remarks This is called by {@link Hooks.callAll}.
487
- */
488
- initializeWeatherEffects: (
489
- weatherEffect: WeatherEffects,
490
- weatherEffectsConfig?: WeatherEffects.WeatherEffectsConfig | null,
491
- ) => void;
492
-
493
- /** Adventure */
494
-
495
- /**
496
- * A hook event that fires when Adventure data is being prepared for import.
497
- * Modules may return false from this hook to take over handling of the import workflow.
498
- * @param adventure - The Adventure document from which content is being imported
499
- * @param formData - Processed data from the importer form
500
- * @param toCreate - Adventure data which needs to be created in the World
501
- * @param toUpdate - Adventure data which needs to be updated in the World
502
- * @returns False to prevent the core software from handling the import
503
- * @remarks This is called by {@link Hooks.call}.
504
- */
505
- preImportAdventure: (
506
- adventure: Adventure.ConfiguredInstance,
507
- formData: object, // TODO: Improve this. Also relevant to `AdventureImporter#_updateObject`
508
- toCreate: AdventureImportData["toCreate"],
509
- toUpdate: AdventureImportData["toUpdate"],
510
- ) => boolean | void;
511
-
512
- /**
513
- * A hook event that fires after an Adventure has been imported into the World.
514
- * @param adventure - The Adventure document from which content is being imported
515
- * @param formData - Processed data from the importer form
516
- * @param toCreate - Adventure data which needs to be created in the World
517
- * @param toUpdate - Adventure data which needs to be updated in the World
518
- * @returns False to prevent the core software from handling the import
519
- * @remarks This is called by {@link Hooks.callAll}.
520
- */
521
- importAdventure: (
522
- adventure: Adventure.ConfiguredInstance,
523
- formData: object, // TODO: Improve this. Also relevant to `AdventureImporter#_updateObject`
524
- toCreate: AdventureImportData["toCreate"],
525
- toUpdate: AdventureImportData["toUpdate"],
526
- ) => void;
527
-
528
- /** Socket */
529
-
530
- /**
531
- * A hook event that fires whenever some other User joins or leaves the game session.
532
- * @param user - The User who connected or disconnected
533
- * @param connected - Is the user now connected (true) or disconnected (false)
534
- * @remarks This is called by {@link Hooks.callAll}.
535
- */
536
- userConnected: (user: User.ConfiguredInstance, connected: boolean) => void;
537
-
538
- /** Combat */
539
-
540
- /**
541
- * A hook event which fires when the turn order of a Combat encounter is progressed.
542
- * This event fires on all clients after the database update has occurred for the Combat.
543
- * @param combat - The Combat encounter for which the turn order has changed
544
- * @param prior - The prior turn state
545
- * @param current - The new turn state
546
- * @remarks This is called by {@link Hooks.callAll}.
547
- */
548
- combatTurnChange: (
549
- combat: Combat.ConfiguredInstance,
550
- prior: Combat.HistoryData,
551
- current: Combat.HistoryData,
552
- ) => void;
553
-
554
- /**
555
- * A hook event that fires when a Combat encounter is started.
556
- * This event fires on the initiating client before any database update occurs.
557
- * @param combat - The Combat encounter which is starting
558
- * @param updateData - An object which contains Combat properties that will be updated. Can be mutated.
559
- */
560
- combatStart: (
561
- combat: Combat.ConfiguredInstance,
562
- updateData: {
563
- /** The initial round */
564
- round: number;
565
- /** The initial turn */
566
- turn: number;
567
- },
568
- ) => void;
569
-
570
- /**
571
- * A hook event that fires when the turn of the Combat encounter changes.
572
- * This event fires on the initiating client before any database update occurs.
573
- * @param combat - The Combat encounter which is advancing or rewinding its turn
574
- * @param updateData - An object which contains Combat properties that will be updated. Can be mutated.
575
- * @param updateOptions - An object which contains options provided to the update method. Can be mutated.
576
- */
577
- combatTurn: (
578
- combat: Combat.ConfiguredInstance,
579
- updateData: {
580
- /** The current round of combat */
581
- round: number;
582
- /** The new turn number */
583
- turn: number;
584
- },
585
- updateOptions: {
586
- /** The amount of time in seconds that time is being advanced */
587
- advanceTime: number;
588
- /** A signed integer for whether the turn order is advancing or rewinding */
589
- direction: number;
590
- },
591
- ) => void;
592
-
593
- /**
594
- * A hook event that fires when the round of the Combat encounter changes.
595
- * @param combat - The Combat encounter which is advancing or rewinding its round
596
- * @param updateData - An object which contains Combat properties that will be updated. Can be mutated.
597
- * @param updateOptions - An object which contains options provided to the update method. Can be mutated.
598
- */
599
- combatRound: (
600
- combat: Combat.ConfiguredInstance,
601
- updateData: {
602
- /** The new round of combat */
603
- round: number;
604
- /** The new turn number */
605
- turn: number;
606
- },
607
- updateOptions: {
608
- /** The amount of time in seconds that time is being advanced */
609
- advanceTime: number;
610
- /** A signed integer for whether the turn order is advancing or rewinding */
611
- direction: number;
612
- },
613
- ) => void;
614
-
615
- /** ProseMirror */
616
-
617
- /**
618
- * A hook even that fires when a ProseMirrorMenu's drop-downs are initialized.
619
- * The hook provides the ProseMirrorMenu instance and an object of drop-down configuration data.
620
- * Hooked functions may append their own drop-downs or append entries to existing drop-downs.
621
- * @param menu - The ProseMirrorMenu instance.
622
- * @param config - The drop-down config.
623
- * @remarks This is called by {@link Hooks.callAll}.
624
- */
625
- getProseMirrorMenuDropdowns: (
626
- menu: ProseMirrorMenu,
627
- config: {
628
- format: ProseMirrorDropDown.Config;
629
- fonts: ProseMirrorDropDown.Config;
630
- },
631
- ) => void;
632
-
633
- /**
634
- * A hook even that fires when a ProseMirrorMenu's buttons are initialized.
635
- * The hook provides the ProseMirrorMenu instance and an array of button configuration data.
636
- * Hooked functions may append their own buttons to the list.
637
- * @param menu - The ProseMirrorMenu instance
638
- * @param config - The button configuration objects
639
- * @remarks This is called by {@link Hooks.callAll}.
640
- */
641
- // TODO: Having trouble finding the appropriate typing for the menu items? Also, where is this even called?
642
- getProseMirrorMenuItems: (menu: ProseMirrorMenu, config: unknown[]) => void;
643
-
644
- /**
645
- * A hook event that fires whenever a ProseMirror editor is created.
646
- * The hook provides the ProseMirror instance UUID, a list of plugins, and an object containing the provisional
647
- * editor state, and a reference to the menu plugin.
648
- * Hooked functions may append their own plugins or replace the state or menu plugin by replacing their references
649
- * in the final argument.
650
- *
651
- * @param uuid - A UUID that uniquely identifies this ProseMirror instance.
652
- * @param plugins - A list of plugins that will be loaded.
653
- * @param options - The provisional EditorState and ProseMirrorMenuPlugin.
654
- * @remarks This is called by {@link Hooks.callAll}.
655
- * @see {@link ProseMirrorEditor.create}
656
- */
657
- createProseMirrorEditor: (uuid: string, plugins: Record<string, Plugin>, options: { state: EditorState }) => void;
658
-
659
- /** HotReload */
660
-
661
- /**
662
- * A hook event that fires when a package that is being watched by the hot reload system has a file changed.
663
- * The hook provides the hot reload data related to the file change.
664
- * Hooked functions may intercept the hot reload and prevent the core software from handling it by returning false.
665
- * @param data - The hot reload data
666
- * @remarks This is called by {@link Hooks.call}.
667
- */
668
- hotReload: (data: HotReloadData) => boolean | void;
669
-
670
- /** Chat */
671
-
672
- /**
673
- * A hook event that fires when a user sends a message through the ChatLog.
674
- * @param chatLog - The ChatLog instance
675
- * @param message - The trimmed message content
676
- * @param chatData - The basic chat data
677
- * @remarks This is called by {@link Hooks.call}.
678
- * @remarks An explicit return value of `false` prevents the chat message from being created.
679
- * @see {@link ChatLog#processMessage}
680
- */
681
- chatMessage: (
682
- chatLog: ChatLog,
683
- message: string,
684
- chatData: {
685
- /** The id of the User sending the message */
686
- user: string;
687
-
688
- /** The identified speaker data, see {@link ChatMessage.getSpeaker} */
689
- speaker: ReturnType<ChatMessage.ConfiguredClass["getSpeaker"]>;
690
- },
691
- ) => boolean | void;
692
-
693
- /**
694
- * A hook event that fires for each ChatMessage which is rendered for addition to the ChatLog.
695
- * This hook allows for final customization of the message HTML before it is added to the log.
696
- * @param message - The ChatMessage document being rendered
697
- * @param html - The pending HTML as a jQuery object
698
- * @param messageData - The input data provided for template rendering
699
- * @remarks This is called by {@link Hooks.call}.
700
- * @see {@link ChatMessage#render}
701
- */
702
- renderChatMessage: (
703
- message: ChatMessage,
704
- html: JQuery,
705
- messageData: {
706
- message: Document.ToObjectFalseType<ChatMessage.ConfiguredInstance>;
707
- user: Game["user"];
708
- author: User.ConfiguredInstance | null;
709
- alias: string;
710
- cssClass: string;
711
- isWhisper: boolean;
712
- canDelete: boolean;
713
- whisperTo: string;
714
- borderColor?: string;
715
- },
716
- ) => boolean | void;
717
-
718
- /** Audio-Video */
719
-
720
- // Individually implemented all three options for globalVolumeChanged
721
-
722
- /**
723
- * A hook event that fires when the user modifies a global volume slider.
724
- * @param volume - The new volume level
725
- * @remarks This is called by {@link Hooks.callAll}.
726
- * @see {@link AudioHelper#_onChangeGlobalVolume}
727
- */
728
- globalAmbientVolumeChanged: (volume: number) => void;
729
- /**
730
- * A hook event that fires when the user modifies a global volume slider.
731
- * @param volume - The new volume level
732
- * @remarks This is called by {@link Hooks.callAll}.
733
- * @see {@link AudioHelper#_onChangeGlobalVolume}
734
- */
735
- globalInterfaceVolumeChanged: (volume: number) => void;
736
- /**
737
- * A hook event that fires when the user modifies a global volume slider.
738
- * @param volume - The new volume level
739
- * @remarks This is called by {@link Hooks.callAll}.
740
- * @see {@link AudioHelper#_onChangeGlobalVolume}
741
- */
742
- globalPlaylistVolumeChanged: (volume: number) => void;
743
-
744
- /**
745
- * A hook event that fires when the AV settings are changed.
746
- * @param settings - The AVSettings manager
747
- * @param changed - The delta of the settings that have been changed
748
- * @remarks This is called by {@link Hooks.callAll}.
749
- * @see {@link AVSettings#_onSettingsChanged}
750
- */
751
- rtcSettingsChanged: (settings: AVSettings, changed: DeepPartial<AVSettings.Settings>) => void;
752
-
753
- /** RollTableConfig */
754
-
755
- /**
756
- * A hook event that fires when some useful data is dropped onto a RollTableConfig.
757
- * @param table - The RollTable
758
- * @param config - The RollTableConfig application
759
- * @param data - The data dropped onto the RollTableConfig
760
- * @remarks This is called by {@link Hooks.call}.
761
- * @remarks An explicit return value of `false` prevents the Document being created.
762
- * @see {@link RollTableConfig#_onDrop}
763
- */
764
- dropRollTableSheetData: (
765
- table: RollTable.ConfiguredInstance,
766
- config: RollTableConfig,
767
- data: object,
768
- ) => boolean | void;
769
-
770
- /**
771
- * A hook event that allows to pass custom dynamic ring configurations.
772
- * @param ringConfig - The ring configuration instance
773
- * @remarks This is called by {@link Hooks.callAll}.
774
- */
775
- initializeDynamicTokenRingConfig: (ringConfig: foundry.canvas.tokens.TokenRingConfig) => void;
776
-
777
- /** Specific implementations of GetEntryContext */
778
-
779
- /**
780
- * A hook event that fires when the context menu for a SceneNavigation entry is constructed.
781
- * @param app - The Application instance that the context menu is constructed in
782
- * @param entryOptions - The context menu entries
783
- * @remarks This is called by {@link Hooks.call}.
784
- * @see {@link SceneNavigation#activateListeners}
785
- */
786
- getSceneNavigationContext: (
787
- app: foundry.applications.ui.SceneNavigation,
788
- contextOptions: foundry.applications.ux.ContextMenu.Entry<HTMLElement>[],
789
- ) => boolean | void;
790
-
791
- /**
792
- * A hook event that fires when the context menu for a PlayersList entry is constructed.
793
- * @param app - The Application instance that the context menu is constructed in
794
- * @param contextOptions - The context menu entries
795
- * @remarks This is called by {@link Hooks.call}.
796
- * @see {@link PlayerList#activateListeners}
797
- */
798
- getUserContextOptions: (
799
- app: foundry.applications.ui.Players,
800
- contextOptions: foundry.applications.ux.ContextMenu.Entry<HTMLElement>[],
801
- ) => boolean | void;
1026
+ /** The relative file path which was modified */
1027
+ path: string;
1028
+
1029
+ /** The file extension which was modified, e.g. "js", "css", "html" */
1030
+ extension: "js" | "css" | "html" | "hbs" | (string & {});
802
1031
  }
803
1032
 
1033
+ /**
1034
+ * @deprecated Configuration is now in {@linkcode HookConfigs.HookConfig | fvtt-types/configuration/HookConfig}.
1035
+ */
1036
+ type StaticCallbacks = HookConfigs.HookConfig;
1037
+
804
1038
  /** Application */
805
1039
 
1040
+ /**
1041
+ * A hook event that fires whenever an ApplicationV2 is rendered. Substitute the "ApplicationV2" in the hook event to
1042
+ * target a specific ApplicationV2 type, for example "renderMyApplication". Each ApplicationV2 class in the inheritance
1043
+ * chain will also fire this hook, i.e. "renderApplicationV2" will also fire.
1044
+ * The hook provides the pending application HTML which will be added to the DOM.
1045
+ * Hooked functions may modify that HTML or attach interactive listeners to it.
1046
+ * @param application - The Application instance being rendered
1047
+ * @param element - The inner HTML of the document that will be displayed and may be modified
1048
+ * @param context - The application rendering context data
1049
+ * @param options - The application rendering options
1050
+ */
1051
+ type RenderApplicationV2<Application extends ApplicationV2.Any = ApplicationV2.Any> = (
1052
+ application: Application,
1053
+ // Note(LukeAbby): At some point it may be helpful to be more specific than HTMLElement.
1054
+ // particular the default implementation the element associates with `options.tag`.
1055
+ element: HTMLElement,
1056
+ context: ApplicationV2.RenderContextOf<Application>,
1057
+ options: ApplicationV2.RenderOptionsOf<Application>,
1058
+ ) => void;
1059
+
1060
+ /**
1061
+ * A hook event that fires whenever this ApplicationV2 is rendered to add controls to its header. Substitute the
1062
+ * "ApplicationV2" in the hook event to target a specific ApplicationV2 type, for example "renderMyApplication".
1063
+ * Each Application class in the inheritance chain will also fire this hook, i.e. "getHeaderControlsApplicationV2"
1064
+ * will also fire.
1065
+ * @param application - The Application instance being rendered
1066
+ * @param controls - The array of header control menu options
1067
+ */
1068
+ type GetHeaderControlsApplicationV2<Application extends ApplicationV2.Any = ApplicationV2.Any> = (
1069
+ application: Application,
1070
+ controls: ApplicationV2.HeaderControlsEntry,
1071
+ ) => void;
1072
+
1073
+ type GetApplicationV2ContextOptions<Application extends ApplicationV2.Any = ApplicationV2.Any> = (
1074
+ application: Application,
1075
+ controls: ContextMenu.Entry<JQuery | HTMLElement>[],
1076
+ ) => void;
1077
+
1078
+ /**
1079
+ * A hook event that fires whenever this ApplicationV2 is closed. Substitute the "ApplicationV2" in the hook event to
1080
+ * target a specific ApplicationV2 type, for example "closeMyApplication". Each ApplicationV2 class in the inheritance
1081
+ * chain will also fire this hook, i.e. "closeApplicationV2" will also fire.
1082
+ * @param application - The Application instance being closed
1083
+ */
1084
+ type CloseApplicationV2<Application extends ApplicationV2.Any = ApplicationV2.Any> = (app: Application) => void;
1085
+
806
1086
  /**
807
1087
  * A hook event that fires whenever this Application is rendered.
808
1088
  * The hook provides the pending application HTML which will be added to the DOM.
809
1089
  * Hooked functions may modify that HTML or attach interactive listeners to it.
810
1090
  *
811
- * @param app - The Application instance being rendered
812
- * @param html - The inner HTML of the document that will be displayed and may be modified
813
- * @param data - The object of data used when rendering the application
814
- * @typeParam A - the type of the Application
1091
+ * @param app - The Application instance being rendered
1092
+ * @param html - The inner HTML of the document that will be displayed and may be modified
1093
+ * @param data - The object of data used when rendering the application
1094
+ * @template A - the type of the Application
815
1095
  * @remarks The name for this hook is dynamically created by joining "render" with the type name of the Application.
816
- * @remarks This is called by {@link Hooks.callAll}.
817
- * @see {@link Application#_render}
1096
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1097
+ * @see {@link Application._render | `Application#_render`}
818
1098
  */
819
1099
  type RenderApplication<A extends Application.Any = Application.Any> = (
820
1100
  app: A,
821
1101
  html: JQuery,
822
- data: ReturnType<A["getData"]> extends Promise<infer T> ? T : ReturnType<A["getData"]>,
1102
+ data: Awaited<ReturnType<A["getData"]>>,
823
1103
  ) => void;
824
1104
 
825
1105
  /**
826
1106
  * A hook event that fires whenever this Application is first rendered to add buttons to its header.
827
1107
  * @param app - The Application instance being rendered
828
1108
  * @param buttons - The array of header buttons which will be displayed
829
- * @typeParam A - the type of the Application
1109
+ * @template A - the type of the Application
830
1110
  * @remarks The name for this hook is dynamically created by joining "get" with the type name of the Application and
831
1111
  * "HeaderButtons".
832
- * @remarks This is called by {@link Hooks.call}.
833
- * @see {@link Application#_getHeaderButtons}
1112
+ * @remarks This is called by {@linkcode Hooks.call}.
1113
+ * @see {@link Application._getHeaderButtons | `Application#_getHeaderButtons`}
834
1114
  */
835
1115
  type GetApplicationHeaderButtons<A extends Application.Any = Application.Any> = (
836
1116
  app: A,
@@ -841,36 +1121,24 @@ declare global {
841
1121
  * A hook event that fires whenever this Application is closed.
842
1122
  * @param app - The Application instance being closed
843
1123
  * @param html - The application HTML when it is closed
844
- * @typeParam A - the type of the Application
1124
+ * @template A - the type of the Application
845
1125
  * @remarks The name for this hook is dynamically created by joining "close" with the type name of the Application.
846
- * @remarks This is called by {@link Hooks.callAll}.
847
- * @see {@link Application#close}
1126
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1127
+ * @see {@link Application.close | `Application#close`}
848
1128
  */
849
1129
  type CloseApplication<A extends Application.Any = Application.Any> = (app: A, html: JQuery) => void;
850
1130
 
851
- /** ApplicationV2 */
852
-
853
- // Not explicitly typed in Foundry v12 but still fires
854
- type RenderApplicationV2<
855
- A extends foundry.applications.api.ApplicationV2.Any = foundry.applications.api.ApplicationV2.Any,
856
- > = (app: A, element: HTMLElement) => void;
857
-
858
- // Not explicitly typed in Foundry v12 but still fires
859
- type CloseApplicationV2<
860
- A extends foundry.applications.api.ApplicationV2.Any = foundry.applications.api.ApplicationV2.Any,
861
- > = (app: A) => void;
862
-
863
1131
  /** EffectsCanvasGroup */
864
1132
 
865
1133
  /**
866
- * A hook event that fires when a {@link CanvasGroup} is drawn.
1134
+ * A hook event that fires when a {@linkcode CanvasGroup} is drawn.
867
1135
  * The dispatched event name replaces "Group" with the named CanvasGroup subclass, i.e. "drawPrimaryCanvasGroup".
868
1136
  * @param group - The group being drawn
869
1137
  */
870
1138
  type DrawGroup<G extends CanvasGroupMixin.AnyMixed = CanvasGroupMixin.AnyMixed> = (group: G) => void;
871
1139
 
872
1140
  /**
873
- * A hook event that fires when a {@link CanvasGroup} is deconstructed.
1141
+ * A hook event that fires when a {@linkcode CanvasGroup} is deconstructed.
874
1142
  * The dispatched event name replaces "Group" with the named CanvasGroup subclass, i.e. "tearDownPrimaryCanvasGroup".
875
1143
  * @param group - The group being deconstructed
876
1144
  */
@@ -879,67 +1147,72 @@ declare global {
879
1147
  /** CanvasLayer */
880
1148
 
881
1149
  /**
882
- * A hook event that fires when a {@link CanvasLayer} is initially drawn.
1150
+ * A hook event that fires when a {@linkcode CanvasLayer} is initially drawn.
883
1151
  * The dispatched event name replaces "Layer" with the named CanvasLayer subclass, i.e. "drawTokensLayer".
884
1152
  * @param layer - The layer being drawn
885
- * @typeParam L - the type of the CanvasLayer
1153
+ * @template L - the type of the CanvasLayer
886
1154
  */
887
- type DrawLayer<L extends CanvasLayer = CanvasLayer> = (layer: L) => void;
1155
+ type DrawLayer<L extends layers.CanvasLayer.Any = layers.CanvasLayer.Any> = (layer: L) => void;
888
1156
 
889
1157
  /**
890
- * A hook event that fires when a {@link CanvasLayer} is deconstructed.
1158
+ * A hook event that fires when a {@linkcode CanvasLayer} is deconstructed.
891
1159
  * The dispatched event name replaces "Layer" with the named CanvasLayer subclass, i.e. "tearDownTokensLayer".
892
1160
  * @param layer - The layer being deconstructed
893
- * @typeParam L - the type of the CanvasLayer
1161
+ * @template L - the type of the CanvasLayer
894
1162
  */
895
- type TearDownLayer<L extends CanvasLayer = CanvasLayer> = (layer: L) => void;
1163
+ type TearDownLayer<L extends layers.CanvasLayer.Any = layers.CanvasLayer.Any> = (layer: L) => void;
896
1164
 
897
1165
  /**
898
- * A hook event that fires when any PlaceableObject is pasted onto the
899
- * Scene. Substitute the PlaceableObject name in the hook event to target a
1166
+ * A hook event that fires when any PlaceableObject is pasted onto the Scene.
1167
+ * Substitute the "PlaceableObject" in the hook event to target a
900
1168
  * specific PlaceableObject type, for example "pasteToken".
901
- * @param copied - The PlaceableObjects that were copied
902
- * @param createData - The new objects that will be added to the Scene
903
- * @typeParam P - the type of the PlaceableObject
1169
+ * @param objects - The objects that were copied or cut
1170
+ * @param data - The create data if copied, or the update data if cut
1171
+ * @param options - Additional options
904
1172
  * @remarks The name for this hook is dynamically created by joining "paste" with the type name of the
905
1173
  * PlaceableObject.
906
- * @remarks This is called by {@link Hooks.call}.
907
- * @see {@link PlaceablesLayer#pasteObjects}
1174
+ * @remarks This is called by {@linkcode Hooks.call}.
1175
+ * @see {@link PlaceablesLayer.pasteObjects | `PlaceablesLayer#pasteObjects`}
908
1176
  */
909
- type PastePlaceableObject<P extends PlaceableObject = PlaceableObject> = (
910
- copied: P[],
911
- createData: Array<P["document"]["_source"]>,
1177
+ type PastePlaceableObject<P extends PlaceableObject.Any = PlaceableObject.Any> = (
1178
+ objects: P[],
1179
+ data: PlaceableObject.PasteObjectReturn<P["document"]>,
1180
+ options: Hooks.PastePlaceableObjectOptions,
912
1181
  ) => boolean | void;
913
- /** */
1182
+
1183
+ interface PastePlaceableObjectOptions {
1184
+ /** Were the objects cut instead of copied? */
1185
+ cut: boolean;
1186
+ }
914
1187
 
915
1188
  /** PlaceableObject */
916
1189
 
917
1190
  /**
918
- * A hook event that fires when a {@link PlaceableObject} is initially drawn.
1191
+ * A hook event that fires when a {@linkcode PlaceableObject} is initially drawn.
919
1192
  * The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "drawToken".
920
1193
  * @param object - The object instance being drawn
921
- * @typeParam P - the type of the PlaceableObject
922
- * @remarks This is called by {@link Hooks.callAll}
1194
+ * @template P - the type of the PlaceableObject
1195
+ * @remarks This is called by {@linkcode Hooks.callAll}
923
1196
  */
924
- type DrawObject<P extends PlaceableObject = PlaceableObject> = (object: P) => void;
1197
+ type DrawObject<P extends PlaceableObject.Any = PlaceableObject.Any> = (object: P) => void;
925
1198
 
926
1199
  /**
927
- * A hook event that fires when a {@link PlaceableObject} is incrementally refreshed.
1200
+ * A hook event that fires when a {@linkcode PlaceableObject} is incrementally refreshed.
928
1201
  * The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "refreshToken".
929
1202
  * @param object - The object instance being refreshed
930
- * @typeParam P - the type of the PlaceableObject
931
- * @remarks This is called by {@link Hooks.callAll}
1203
+ * @template P - the type of the PlaceableObject
1204
+ * @remarks This is called by {@linkcode Hooks.callAll}
932
1205
  */
933
- type RefreshObject<P extends PlaceableObject = PlaceableObject> = (object: P) => void;
1206
+ type RefreshObject<P extends PlaceableObject.Any = PlaceableObject.Any> = (object: P) => void;
934
1207
 
935
1208
  /**
936
- * A hook event that fires when a {@link PlaceableObject} is destroyed.
1209
+ * A hook event that fires when a {@linkcode PlaceableObject} is destroyed.
937
1210
  * The dispatched event name replaces "Object" with the named PlaceableObject subclass, i.e. "destroyToken".
938
1211
  * @param object - The object instance being destroyed
939
- * @typeParam P - the type of the PlaceableObject
940
- * @remarks This is called by {@link Hooks.callAll}
1212
+ * @template P - the type of the PlaceableObject
1213
+ * @remarks This is called by {@linkcode Hooks.callAll}
941
1214
  */
942
- type DestroyObject<P extends PlaceableObject = PlaceableObject> = (object: P) => void;
1215
+ type DestroyObject<P extends PlaceableObject.Any = PlaceableObject.Any> = (object: P) => void;
943
1216
 
944
1217
  /**
945
1218
  * A hook event that fires when any PlaceableObject is selected or
@@ -947,14 +1220,14 @@ declare global {
947
1220
  * target a specific PlaceableObject type, for example "controlToken".
948
1221
  * @param object - The PlaceableObject
949
1222
  * @param controlled - Whether the PlaceableObject is selected or not
950
- * @typeParam P - the type of the PlaceableObject
1223
+ * @template P - the type of the PlaceableObject
951
1224
  * @remarks The name for this hook is dynamically created by joining "control" and the type name of the
952
1225
  * PlaceableObject.
953
- * @remarks This is called by {@link Hooks.callAll}.
954
- * @see {@link PlaceableObject#control}
955
- * @see {@link PlaceableObject#release}
1226
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1227
+ * @see {@link PlaceableObject.control | `PlaceableObject#control`}
1228
+ * @see {@link PlaceableObject.release | `PlaceableObject#release`}
956
1229
  */
957
- type ControlObject<P extends PlaceableObject = PlaceableObject> = (object: P, controlled: boolean) => void;
1230
+ type ControlObject<P extends PlaceableObject.Any = PlaceableObject.Any> = (object: P, controlled: boolean) => void;
958
1231
 
959
1232
  /**
960
1233
  * A hook event that fires when any PlaceableObject is hovered over or out.
@@ -962,13 +1235,13 @@ declare global {
962
1235
  * PlaceableObject type, for example "hoverToken".
963
1236
  * @param object - The PlaceableObject
964
1237
  * @param hover - Whether the PlaceableObject is hovered over or not
965
- * @typeParam P - the type of the PlaceableObject
1238
+ * @template P - the type of the PlaceableObject
966
1239
  * @remarks The name for this hook is dynamically created by joining "hover" and the type name of the PlaceableObject.
967
- * @remarks This is called by {@link Hooks.callAll}.
968
- * @see {@link PlaceableObject#_onHoverIn}
969
- * @see {@link PlaceableObject#_onHoverOut}
1240
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1241
+ * @see {@link PlaceableObject._onHoverIn | `PlaceableObject#_onHoverIn`}
1242
+ * @see {@link PlaceableObject._onHoverOut | `PlaceableObject#_onHoverOut`}
970
1243
  */
971
- type HoverObject<P extends PlaceableObject = PlaceableObject> = (object: P, hover: boolean) => void;
1244
+ type HoverObject<P extends PlaceableObject.Any = PlaceableObject.Any> = (object: P, hover: boolean) => void;
972
1245
 
973
1246
  /** Document */
974
1247
 
@@ -984,20 +1257,41 @@ declare global {
984
1257
  * @param data - The initial data object provided to the document creation request
985
1258
  * @param options - Additional options which modify the creation request
986
1259
  * @param userId - The ID of the requesting user, always game.user.id
987
- * @typeParam D - the type of the Document constructor
1260
+ * @template D - the type of the Document constructor
988
1261
  * @returns Explicitly return false to prevent creation of this Document
989
1262
  * @remarks The name for this hook is dynamically created by joining "preCreate" with the name of the Document.
990
- * @remarks This is called by {@link Hooks.call}.
991
- * @see {@link ClientDatabaseBackend#_preCreateDocumentArray}
992
- * @see {@link TokenDocument#_preUpdateTokenActor}
1263
+ * @remarks This is called by {@linkcode Hooks.call}.
1264
+ * @see {@link ClientDatabaseBackend._preCreateDocumentArray | `ClientDatabaseBackend#_preCreateDocumentArray`}
1265
+ * @see {@link TokenDocument._preUpdateTokenActor | `TokenDocument#_preUpdateTokenActor`}
993
1266
  */
994
- type PreCreateDocument<D extends Document.AnyConstructor = Document.AnyConstructor> = (
995
- document: Document.ToConfiguredInstance<D>,
996
- data: ConstructorParameters<D>[0],
997
- options: Document.PreCreateOptions<FixedInstanceType<D>["documentName"]>,
1267
+ type PreCreateDocument<D extends Document.Any = Document.Any> = (
1268
+ document: D,
1269
+ data: Document.CreateDataForName<D["documentName"]>,
1270
+ // TODO
1271
+ options: Document.Database.PreCreateOptions<DatabaseCreateOperation>,
998
1272
  userId: string,
999
1273
  ) => boolean | void;
1000
1274
 
1275
+ /**
1276
+ * A hook event that fires for every embedded Document type after conclusion of a creation workflow.
1277
+ * Substitute the Document name in the hook event to target a specific type, for example "createToken".
1278
+ * This hook fires for all connected clients after the creation has been processed.
1279
+ *
1280
+ * @param document - The new Document instance which has been created
1281
+ * @param options - Additional options which modified the creation request
1282
+ * @param userId - The ID of the User who triggered the creation workflow
1283
+ * @template D - the type of the Document constructor
1284
+ * @remarks The name for this hook is dynamically created by joining "create" and the type name of the Document.
1285
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1286
+ * @see {@link ClientDatabaseBackend._postCreateDocumentCallbacks | `ClientDatabaseBackend#_postCreateDocumentCallbacks`}
1287
+ * @see {@link TokenDocument._onUpdateTokenActor | `TokenDocument#_onUpdateTokenActor`}
1288
+ */
1289
+ type CreateDocument<D extends Document.Any = Document.Any> = (
1290
+ document: D,
1291
+ options: Document.Database.CreateOptionsFor<D["documentName"]>,
1292
+ userId: string,
1293
+ ) => void;
1294
+
1001
1295
  /**
1002
1296
  * A hook event that fires for every Document type before execution of an update workflow. Substitute the Document
1003
1297
  * name in the hook event to target a specific Document type, for example "preUpdateActor". This hook only fires
@@ -1010,20 +1304,42 @@ declare global {
1010
1304
  * @param changed - Differential data that will be used to update the document
1011
1305
  * @param options - Additional options which modify the update request
1012
1306
  * @param userId - The ID of the requesting user, always game.user.id
1013
- * @typeParam D - the type of the Document constructor
1307
+ * @template D - the type of the Document constructor
1014
1308
  * @returns Explicitly return false to prevent update of this Document
1015
1309
  * @remarks The name for this hook is dynamically created by joining "preUpdate" with the type name of the Document.
1016
- * @remarks This is called {@link Hooks.call}.
1017
- * @see {@link ClientDatabaseBackend#_preUpdateDocumentArray}
1018
- * @see {@link TokenDocument#_preUpdateTokenActor}
1310
+ * @remarks This is called {@linkcode Hooks.call}.
1311
+ * @see {@link ClientDatabaseBackend._preUpdateDocumentArray | `ClientDatabaseBackend#_preUpdateDocumentArray`}
1312
+ * @see {@link TokenDocument._preUpdateTokenActor | `TokenDocument#_preUpdateTokenActor`}
1019
1313
  */
1020
- type PreUpdateDocument<D extends Document.AnyConstructor = Document.AnyConstructor> = (
1021
- document: Document.ToConfiguredInstance<D>,
1022
- changed: DeepPartial<ConstructorParameters<D>[0]>,
1023
- options: Document.PreUpdateOptions<FixedInstanceType<D>["documentName"]>,
1314
+ type PreUpdateDocument<D extends Document.Any = Document.Any> = (
1315
+ document: D,
1316
+ changed: Document.UpdateDataForName<D["documentName"]>,
1317
+ options: Document.Database.PreUpdateOptions<DatabaseUpdateOperation>,
1024
1318
  userId: string,
1025
1319
  ) => boolean | void;
1026
1320
 
1321
+ /**
1322
+ * A hook event that fires for every Document type after conclusion of an update workflow.
1323
+ * Substitute the Document name in the hook event to target a specific Document type, for example "updateActor".
1324
+ * This hook fires for all connected clients after the update has been processed.
1325
+ *
1326
+ * @param document - The existing Document which was updated
1327
+ * @param change - Differential data that was used used to update the document
1328
+ * @param options - Additional options which modified the update request
1329
+ * @param userId - The ID of the User who triggered the update workflow
1330
+ * @template D - the type of the Document constructor
1331
+ * @remarks The name for this hook is dynamically created by joining "update" with the type name of the Document.
1332
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1333
+ * @see {@link ClientDatabaseBackend._postUpdateDocumentCallbacks | `ClientDatabaseBackend#_postUpdateDocumentCallbacks`}
1334
+ * @see {@link TokenDocument._onUpdateTokenActor | `TokenDocument#_onUpdateTokenActor`}
1335
+ */
1336
+ type UpdateDocument<D extends Document.Any = Document.Any> = (
1337
+ document: D,
1338
+ change: Document.UpdateDataForName<D["documentName"]>,
1339
+ options: Document.Database.UpdateOptionsFor<D["documentName"]>,
1340
+ userId: string,
1341
+ ) => void;
1342
+
1027
1343
  /**
1028
1344
  * A hook event that fires for every Document type before execution of a deletion workflow. Substitute the
1029
1345
  * Document name in the hook event to target a specific Document type, for example "preDeleteActor". This hook
@@ -1035,61 +1351,19 @@ declare global {
1035
1351
  * @param document - The Document instance being deleted
1036
1352
  * @param options - Additional options which modify the deletion request
1037
1353
  * @param userId - The ID of the requesting user, always game.user.id
1038
- * @typeParam D - the type of the Document constructor
1354
+ * @template D - the type of the Document constructor
1039
1355
  * @returns Explicitly return false to prevent deletion of this Document
1040
1356
  * @remarks The name for this hook is dynamically created by joining "preDelete" with the type name of the Document.
1041
- * @remarks This is called by {@link Hooks.call}.
1042
- * @see {@link ClientDatabaseBackend#_preDeleteDocumentArray}.
1043
- * @see {@link TokenDocument#_preUpdateTokenActor}
1357
+ * @remarks This is called by {@linkcode Hooks.call}.
1358
+ * @see {@link ClientDatabaseBackend._preDeleteDocumentArray | `ClientDatabaseBackend#_preDeleteDocumentArray`}.
1359
+ * @see {@link TokenDocument._preUpdateTokenActor | `TokenDocument#_preUpdateTokenActor`}
1044
1360
  */
1045
- type PreDeleteDocument<D extends Document.AnyConstructor = Document.AnyConstructor> = (
1046
- document: Document.ToConfiguredInstance<D>,
1047
- options: Document.PreDeleteOptions<FixedInstanceType<D>["documentName"]>,
1361
+ type PreDeleteDocument<D extends Document.Any = Document.Any> = (
1362
+ document: D,
1363
+ options: Document.Database.PreDeleteOperationInstance<DatabaseDeleteOperation>,
1048
1364
  userId: string,
1049
1365
  ) => boolean | void;
1050
1366
 
1051
- /**
1052
- * A hook event that fires for every embedded Document type after conclusion of a creation workflow.
1053
- * Substitute the Document name in the hook event to target a specific type, for example "createToken".
1054
- * This hook fires for all connected clients after the creation has been processed.
1055
- *
1056
- * @param document - The new Document instance which has been created
1057
- * @param options - Additional options which modified the creation request
1058
- * @param userId - The ID of the User who triggered the creation workflow
1059
- * @typeParam D - the type of the Document constructor
1060
- * @remarks The name for this hook is dynamically created by joining "create" and the type name of the Document.
1061
- * @remarks This is called by {@link Hooks.callAll}.
1062
- * @see {@link ClientDatabaseBackend#_postCreateDocumentCallbacks}
1063
- * @see {@link TokenDocument#_onUpdateTokenActor}
1064
- */
1065
- type CreateDocument<D extends Document.AnyConstructor = Document.AnyConstructor> = (
1066
- document: Document.ToConfiguredInstance<D>,
1067
- options: Document.OnCreateOptions<FixedInstanceType<D>["documentName"]>,
1068
- userId: string,
1069
- ) => void;
1070
-
1071
- /**
1072
- * A hook event that fires for every Document type after conclusion of an update workflow.
1073
- * Substitute the Document name in the hook event to target a specific Document type, for example "updateActor".
1074
- * This hook fires for all connected clients after the update has been processed.
1075
- *
1076
- * @param document - The existing Document which was updated
1077
- * @param change - Differential data that was used used to update the document
1078
- * @param options - Additional options which modified the update request
1079
- * @param userId - The ID of the User who triggered the update workflow
1080
- * @typeParam D - the type of the Document constructor
1081
- * @remarks The name for this hook is dynamically created by joining "update" with the type name of the Document.
1082
- * @remarks This is called by {@link Hooks.callAll}.
1083
- * @see {@link ClientDatabaseBackend#_postUpdateDocumentCallbacks}
1084
- * @see {@link TokenDocument#_onUpdateTokenActor}
1085
- */
1086
- type UpdateDocument<D extends Document.AnyConstructor = Document.AnyConstructor> = (
1087
- document: Document.ToConfiguredInstance<D>,
1088
- change: DeepPartial<ConstructorParameters<D>[0]>,
1089
- options: Document.OnUpdateOptions<FixedInstanceType<D>["documentName"]>,
1090
- userId: string,
1091
- ) => void;
1092
-
1093
1367
  /**
1094
1368
  * A hook event that fires for every Document type after conclusion of an deletion workflow.
1095
1369
  * Substitute the Document name in the hook event to target a specific Document type, for example "deleteActor".
@@ -1098,15 +1372,15 @@ declare global {
1098
1372
  * @param document - The existing Document which was deleted
1099
1373
  * @param options - Additional options which modified the deletion request
1100
1374
  * @param userId - The ID of the User who triggered the deletion workflow
1101
- * @typeParam D - the type of the Document constructor
1375
+ * @template D - the type of the Document constructor
1102
1376
  * @remarks The name for this hook is dynamically created by joining "delete" with the type name of the Document.
1103
- * @remarks This is called by {@link Hooks.callAll}.
1104
- * @see {@link ClientDatabaseBackend#_postDeleteDocumentCallbacks}
1105
- * @see {@link TokenDocument#_onUpdateTokenActor}
1377
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1378
+ * @see {@link ClientDatabaseBackend._postDeleteDocumentCallbacks | `ClientDatabaseBackend#_postDeleteDocumentCallbacks`}
1379
+ * @see {@link TokenDocument._onUpdateTokenActor | `TokenDocument#_onUpdateTokenActor`}
1106
1380
  */
1107
- type DeleteDocument<D extends Document.AnyConstructor = Document.AnyConstructor> = (
1108
- document: Document.ToConfiguredInstance<D>,
1109
- options: Document.OnDeleteOptions<FixedInstanceType<D>["documentName"]>,
1381
+ type DeleteDocument<D extends Document.Any = Document.Any> = (
1382
+ document: D,
1383
+ options: Document.Database.DeleteOptionsFor<D["documentName"]>,
1110
1384
  userId: string,
1111
1385
  ) => void;
1112
1386
 
@@ -1115,9 +1389,9 @@ declare global {
1115
1389
  /**
1116
1390
  * A hook event that fires after RenderedPointSource shaders have initialized.
1117
1391
  * @param source - The RenderedEffectSource instance being initialized
1118
- * @typeParam RPS - the type of the RenderedPointSource
1392
+ * @template RPS - the type of the RenderedPointSource
1119
1393
  * @remarks The name for this hook is dynamically created by wrapping the type name of the shader in `initialize` and `Shaders`.
1120
- * @remarks This is called by {@link Hooks.callAll}.
1394
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1121
1395
  */
1122
1396
  type InitializeRenderedEffectSourceShaders<RPS extends RenderedEffectSource.Any = RenderedEffectSource.Any> = (
1123
1397
  source: RPS,
@@ -1126,20 +1400,20 @@ declare global {
1126
1400
  /** InteractionLayer */
1127
1401
 
1128
1402
  /**
1129
- * A hook event that fires with a {@link InteractionLayer} becomes active.
1403
+ * A hook event that fires with a {@linkcode InteractionLayer} becomes active.
1130
1404
  * The dispatched event name replaces "Layer" with the named InteractionLayer subclass, i.e. "activateTokensLayer".
1131
1405
  * @param layer - The layer becoming active
1132
- * @remarks This is called by {@link Hooks.callAll}.
1406
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1133
1407
  */
1134
- type ActivateLayer<L extends InteractionLayer = InteractionLayer> = (layer: L) => void;
1408
+ type ActivateLayer<L extends layers.InteractionLayer = layers.InteractionLayer> = (layer: L) => void;
1135
1409
 
1136
1410
  /**
1137
- * A hook event that fires with a {@link InteractionLayer} becomes inactive.
1411
+ * A hook event that fires with a {@linkcode InteractionLayer} becomes inactive.
1138
1412
  * The dispatched event name replaces "Layer" with the named InteractionLayer subclass, i.e. "deactivateTokensLayer".
1139
1413
  * @param layer - The layer becoming inactive
1140
- * @remarks This is called by {@link Hooks.callAll}.
1414
+ * @remarks This is called by {@linkcode Hooks.callAll}.
1141
1415
  */
1142
- type DeactivateLayer<L extends InteractionLayer = InteractionLayer> = (layer: L) => void;
1416
+ type DeactivateLayer<L extends layers.InteractionLayer = layers.InteractionLayer> = (layer: L) => void;
1143
1417
 
1144
1418
  /**
1145
1419
  * A hook event that fires when the context menu for entries in an Application is constructed. Substitute the
@@ -1147,72 +1421,16 @@ declare global {
1147
1421
  * "getActorDirectoryEntryContext".
1148
1422
  * @param app - The Application instance that the context menu is constructed in
1149
1423
  * @param entryOptions - The context menu entries
1150
- * @remarks This is called by {@link Hooks.call}.
1151
- * @see {@link ContextMenu.create}
1152
- */
1153
- type GetEntryContext = (
1154
- app: Application.Any | foundry.applications.api.ApplicationV2.Any,
1155
- entryOptions: foundry.applications.ux.ContextMenu.Entry<HTMLElement | JQuery>[],
1156
- ) => boolean | void;
1157
-
1158
- /**
1159
- * A hook event that fires when the context menu for a Sound in the PlaylistDirectory is constructed.
1160
- * @param app - The Application instance that the context menu is constructed in
1161
- * @param entryOptions - The context menu entries
1162
- * @remarks The name for this hook is dynamically created by joining "get" with the type name of the PlaylistDirectory
1163
- * and "SoundContext".
1164
- * @remarks This is called by {@link Hooks.call}.
1165
- * @see {@link PlaylistDirectory#_contextMenu}
1424
+ * @remarks This is called by {@linkcode Hooks.call}.
1425
+ * @see {@linkcode ContextMenu.create}
1166
1426
  */
1167
- type GetSoundContextPlaylistDirectory = (
1168
- app: foundry.applications.sidebar.tabs.PlaylistDirectory,
1169
- entryOptions: foundry.applications.ux.ContextMenu.Entry<HTMLElement>[],
1427
+ type GetEntryContext<Application extends Application.Any = Application.Any> = (
1428
+ app: Application,
1429
+ entryOptions: ContextMenu.Entry<HTMLElement | JQuery>[],
1170
1430
  ) => boolean | void;
1171
1431
 
1172
- /**
1173
- * A hook event that fires when the context menu for folders in a SidebarTab
1174
- * is constructed. Substitute the SidebarTab name in the hook event to target
1175
- * a specific SidebarTab, for example "getActorDirectoryFolderContext".
1176
- * @param app - The Application instance that the context menu is constructed in
1177
- * @param entryOptions - The context menu entries
1178
- * @remarks The name for this hook is dynamically created by joining "get" with the type name of the SidebarDirectory
1179
- * and "FolderContext".
1180
- * @remarks This is called by {@link Hooks.call}.
1181
- * @see {@link SidebarDirectory#_contextMenu}
1182
- */
1183
- type GetSidebarDirectoryFolderContext = (
1184
- app: foundry.applications.sidebar.DocumentDirectory,
1185
- entryOptions: foundry.applications.ux.ContextMenu.Entry<HTMLElement>[],
1186
- ) => boolean | void;
1187
-
1188
- type DynamicCallbacks =
1189
- | RenderApplication
1190
- | GetApplicationHeaderButtons
1191
- | CloseApplication
1192
- | DrawGroup
1193
- | TearDownGroup
1194
- | DrawLayer
1195
- | TearDownLayer
1196
- | PastePlaceableObject
1197
- | DrawObject
1198
- | ControlObject
1199
- | DestroyObject
1200
- | HoverObject
1201
- | PreCreateDocument
1202
- | PreUpdateDocument
1203
- | PreDeleteDocument
1204
- | CreateDocument
1205
- | UpdateDocument
1206
- | DeleteDocument
1207
- | InitializeRenderedEffectSourceShaders
1208
- | ActivateLayer
1209
- | DeactivateLayer
1210
- | GetEntryContext
1211
- | GetSoundContextPlaylistDirectory
1212
- | GetSidebarDirectoryFolderContext;
1213
-
1214
1432
  interface ErrorCallbackParameters {
1215
- "Canvas#draw": [location: "Canvas#draw", err: Error, data: { layer: CanvasLayer }];
1433
+ "Canvas#draw": [location: "Canvas#draw", err: Error, data: { layer: layers.CanvasLayer }];
1216
1434
  "Application#render": [location: "Application#render", err: Error, data: Application.RenderOptions];
1217
1435
  "Localization#_loadTranslationFile": [
1218
1436
  location: "Localization#_loadTranslationFile",
@@ -1249,5 +1467,11 @@ declare global {
1249
1467
  data: { id: string; documentName: string },
1250
1468
  ];
1251
1469
  }
1470
+
1471
+ type DropData =
1472
+ | layers.TokenLayer.DropData
1473
+ | layers.NotesLayer.DropData
1474
+ | layers.SoundsLayer.DropData
1475
+ | layers.TilesLayer.DropData;
1252
1476
  }
1253
1477
  }