@league-of-foundry-developers/foundry-vtt-types 13.340.1 → 13.345.1

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