@league-of-foundry-developers/foundry-vtt-types 12.331.4-beta → 12.331.5

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 (377) hide show
  1. package/package.json +18 -1
  2. package/src/configuration/configuration.d.mts +1 -1
  3. package/src/foundry/client/apps/app.d.mts +1 -1
  4. package/src/foundry/client/apps/av/av-config.d.mts +1 -1
  5. package/src/foundry/client/apps/av/cameras.d.mts +1 -1
  6. package/src/foundry/client/apps/dice/dice-config.d.mts +1 -1
  7. package/src/foundry/client/apps/form.d.mts +1 -1
  8. package/src/foundry/client/apps/forms/actor.d.mts +1 -1
  9. package/src/foundry/client/apps/forms/adventure-exporter.d.mts +1 -1
  10. package/src/foundry/client/apps/forms/adventure-importer.d.mts +1 -1
  11. package/src/foundry/client/apps/forms/base-sheet.d.mts +1 -1
  12. package/src/foundry/client/apps/forms/card-config.d.mts +1 -1
  13. package/src/foundry/client/apps/forms/cards-config.d.mts +1 -1
  14. package/src/foundry/client/apps/forms/combat-config.d.mts +1 -1
  15. package/src/foundry/client/apps/forms/effect-config.d.mts +1 -1
  16. package/src/foundry/client/apps/forms/folder-config.d.mts +7 -2
  17. package/src/foundry/client/apps/forms/fonts.d.mts +1 -1
  18. package/src/foundry/client/apps/forms/grid-config.d.mts +1 -1
  19. package/src/foundry/client/apps/forms/image-popout.d.mts +1 -1
  20. package/src/foundry/client/apps/forms/item.d.mts +1 -1
  21. package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +1 -1
  22. package/src/foundry/client/apps/forms/journal-sheet.d.mts +1 -1
  23. package/src/foundry/client/apps/forms/macro-config.d.mts +1 -1
  24. package/src/foundry/client/apps/forms/measure-template.d.mts +1 -1
  25. package/src/foundry/client/apps/forms/ownership.d.mts +1 -1
  26. package/src/foundry/client/apps/forms/playlist-config.d.mts +1 -1
  27. package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +1 -1
  28. package/src/foundry/client/apps/forms/roll-table-config.d.mts +1 -1
  29. package/src/foundry/client/apps/forms/scene-config.d.mts +1 -1
  30. package/src/foundry/client/apps/forms/sheet-config.d.mts +1 -1
  31. package/src/foundry/client/apps/forms/user-config.d.mts +1 -1
  32. package/src/foundry/client/apps/hud/chatbubble.d.mts +1 -1
  33. package/src/foundry/client/apps/hud/container.d.mts +1 -1
  34. package/src/foundry/client/apps/hud/controls.d.mts +1 -1
  35. package/src/foundry/client/apps/hud/hotbar.d.mts +1 -1
  36. package/src/foundry/client/apps/hud/hud.d.mts +1 -1
  37. package/src/foundry/client/apps/hud/menu.d.mts +1 -1
  38. package/src/foundry/client/apps/hud/navigation.d.mts +1 -1
  39. package/src/foundry/client/apps/hud/pause.d.mts +1 -1
  40. package/src/foundry/client/apps/hud/players.d.mts +1 -1
  41. package/src/foundry/client/apps/placeables/drawing-config.d.mts +1 -1
  42. package/src/foundry/client/apps/placeables/drawing-hud.d.mts +1 -1
  43. package/src/foundry/client/apps/placeables/note-config.d.mts +1 -1
  44. package/src/foundry/client/apps/placeables/tile-config.d.mts +1 -1
  45. package/src/foundry/client/apps/placeables/tile-hud.d.mts +1 -1
  46. package/src/foundry/client/apps/placeables/token-config.d.mts +1 -1
  47. package/src/foundry/client/apps/placeables/token-hud.d.mts +1 -1
  48. package/src/foundry/client/apps/placeables/wall-config.d.mts +1 -1
  49. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +1 -1
  50. package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +1 -1
  51. package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +1 -1
  52. package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +1 -1
  53. package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +1 -1
  54. package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +1 -1
  55. package/src/foundry/client/apps/sidebar/package-configuration.d.mts +1 -1
  56. package/src/foundry/client/apps/sidebar/sidebar.d.mts +1 -1
  57. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +1 -1
  58. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +1 -1
  59. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +1 -1
  60. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +1 -1
  61. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +1 -1
  62. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +1 -1
  63. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +1 -1
  64. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +1 -1
  65. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +1 -1
  66. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +1 -1
  67. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +1 -1
  68. package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +1 -1
  69. package/src/foundry/client/av/client.d.mts +1 -1
  70. package/src/foundry/client/av/clients/simplepeer.d.mts +1 -1
  71. package/src/foundry/client/av/master.d.mts +1 -1
  72. package/src/foundry/client/av/settings.d.mts +1 -1
  73. package/src/foundry/client/config.d.mts +1 -1
  74. package/src/foundry/client/core/hooks.d.mts +1 -1
  75. package/src/foundry/client/core/image.d.mts +1 -1
  76. package/src/foundry/client/core/keybindings.d.mts +1 -1
  77. package/src/foundry/client/core/packages.d.mts +4 -2
  78. package/src/foundry/client/core/settings.d.mts +1 -1
  79. package/src/foundry/client/core/socket.d.mts +1 -1
  80. package/src/foundry/client/core/tooltip.d.mts +1 -1
  81. package/src/foundry/client/core/tour.d.mts +1 -1
  82. package/src/foundry/client/core/utils.d.mts +1 -1
  83. package/src/foundry/client/core/workers.d.mts +1 -1
  84. package/src/foundry/client/data/abstract/canvas-document.d.mts +9 -20
  85. package/src/foundry/client/data/abstract/client-document.d.mts +133 -71
  86. package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +2 -2
  87. package/src/foundry/client/data/abstract/document-collection.d.mts +1 -1
  88. package/src/foundry/client/data/abstract/world-collection.d.mts +8 -1
  89. package/src/foundry/client/data/collections/actors.d.mts +1 -1
  90. package/src/foundry/client/data/collections/cards.d.mts +1 -1
  91. package/src/foundry/client/data/collections/combats.d.mts +1 -1
  92. package/src/foundry/client/data/collections/compendium-collection.d.mts +5 -4
  93. package/src/foundry/client/data/collections/fog.d.mts +1 -1
  94. package/src/foundry/client/data/collections/folder.d.mts +1 -1
  95. package/src/foundry/client/data/collections/items.d.mts +1 -1
  96. package/src/foundry/client/data/collections/journal.d.mts +1 -1
  97. package/src/foundry/client/data/collections/macros.d.mts +1 -1
  98. package/src/foundry/client/data/collections/messages.d.mts +1 -1
  99. package/src/foundry/client/data/collections/playlists.d.mts +1 -1
  100. package/src/foundry/client/data/collections/scenes.d.mts +1 -1
  101. package/src/foundry/client/data/collections/settings.d.mts +1 -1
  102. package/src/foundry/client/data/collections/tables.d.mts +1 -1
  103. package/src/foundry/client/data/collections/users.d.mts +4 -4
  104. package/src/foundry/client/data/documents/active-effect.d.mts +124 -48
  105. package/src/foundry/client/data/documents/actor-delta.d.mts +53 -22
  106. package/src/foundry/client/data/documents/actor.d.mts +147 -93
  107. package/src/foundry/client/data/documents/adventure.d.mts +74 -45
  108. package/src/foundry/client/data/documents/ambient-light.d.mts +13 -10
  109. package/src/foundry/client/data/documents/ambient-sound.d.mts +12 -7
  110. package/src/foundry/client/data/documents/card.d.mts +57 -34
  111. package/src/foundry/client/data/documents/cards.d.mts +171 -135
  112. package/src/foundry/client/data/documents/chat-message.d.mts +131 -72
  113. package/src/foundry/client/data/documents/combat.d.mts +80 -60
  114. package/src/foundry/client/data/documents/combatant.d.mts +53 -20
  115. package/src/foundry/client/data/documents/drawing.d.mts +12 -7
  116. package/src/foundry/client/data/documents/fog-exploration.d.mts +57 -17
  117. package/src/foundry/client/data/documents/folder.d.mts +114 -31
  118. package/src/foundry/client/data/documents/item.d.mts +31 -21
  119. package/src/foundry/client/data/documents/journal-entry-page.d.mts +90 -57
  120. package/src/foundry/client/data/documents/journal-entry.d.mts +29 -34
  121. package/src/foundry/client/data/documents/macro.d.mts +60 -34
  122. package/src/foundry/client/data/documents/measured-template.d.mts +13 -8
  123. package/src/foundry/client/data/documents/note.d.mts +14 -7
  124. package/src/foundry/client/data/documents/playlist-sound.d.mts +29 -33
  125. package/src/foundry/client/data/documents/playlist.d.mts +74 -54
  126. package/src/foundry/client/data/documents/region-behavior.d.mts +16 -7
  127. package/src/foundry/client/data/documents/region.d.mts +53 -48
  128. package/src/foundry/client/data/documents/scene.d.mts +310 -89
  129. package/src/foundry/client/data/documents/setting.d.mts +24 -23
  130. package/src/foundry/client/data/documents/table-result.d.mts +20 -8
  131. package/src/foundry/client/data/documents/table.d.mts +19 -13
  132. package/src/foundry/client/data/documents/tile.d.mts +13 -7
  133. package/src/foundry/client/data/documents/token.d.mts +148 -117
  134. package/src/foundry/client/data/documents/user.d.mts +141 -53
  135. package/src/foundry/client/data/documents/wall.d.mts +17 -10
  136. package/src/foundry/client/game.d.mts +1 -1
  137. package/src/foundry/client/head.d.mts +1 -1
  138. package/src/foundry/client/hooks.d.mts +9 -18
  139. package/src/foundry/client/pixi/board.d.mts +3 -2
  140. package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +1 -1
  141. package/src/foundry/client/pixi/core/containers/cached-container.d.mts +1 -1
  142. package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +1 -1
  143. package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +1 -1
  144. package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +1 -1
  145. package/src/foundry/client/pixi/core/containers/quadtree.d.mts +1 -1
  146. package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +1 -1
  147. package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +1 -1
  148. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +1 -1
  149. package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +1 -1
  150. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +1 -1
  151. package/src/foundry/client/pixi/core/interaction/ping.d.mts +1 -1
  152. package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +1 -1
  153. package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +1 -8
  154. package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +1 -1
  155. package/src/foundry/client/pixi/core/interaction/targets.d.mts +1 -1
  156. package/src/foundry/client/pixi/core/loader.d.mts +1 -1
  157. package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +1 -1
  158. package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +1 -1
  159. package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +1 -1
  160. package/src/foundry/client/pixi/core/shapes/ray.d.mts +1 -1
  161. package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +1 -1
  162. package/src/foundry/client/pixi/extensions/circle.d.mts +1 -1
  163. package/src/foundry/client/pixi/extensions/observable-transform.d.mts +1 -1
  164. package/src/foundry/client/pixi/extensions/polygon.d.mts +1 -1
  165. package/src/foundry/client/pixi/extensions/rectangle.d.mts +1 -1
  166. package/src/foundry/client/pixi/groups/effects.d.mts +1 -1
  167. package/src/foundry/client/pixi/groups/environment.d.mts +1 -1
  168. package/src/foundry/client/pixi/groups/hidden.d.mts +1 -1
  169. package/src/foundry/client/pixi/groups/interface.d.mts +1 -1
  170. package/src/foundry/client/pixi/groups/overlay.d.mts +1 -1
  171. package/src/foundry/client/pixi/groups/primary.d.mts +1 -1
  172. package/src/foundry/client/pixi/groups/rendered.d.mts +1 -1
  173. package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +1 -1
  174. package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +1 -1
  175. package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +1 -1
  176. package/src/foundry/client/pixi/layers/controls/cursor.d.mts +1 -1
  177. package/src/foundry/client/pixi/layers/controls/door.d.mts +1 -1
  178. package/src/foundry/client/pixi/layers/controls/layer.d.mts +1 -1
  179. package/src/foundry/client/pixi/layers/controls/ruler.d.mts +1 -1
  180. package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +1 -1
  181. package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +1 -1
  182. package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +1 -1
  183. package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +1 -1
  184. package/src/foundry/client/pixi/layers/effects/visibility.d.mts +1 -1
  185. package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +1 -1
  186. package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +1 -1
  187. package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +1 -1
  188. package/src/foundry/client/pixi/layers/grid/highlight.d.mts +1 -1
  189. package/src/foundry/client/pixi/layers/grid/layer.d.mts +1 -1
  190. package/src/foundry/client/pixi/layers/grid/mesh.d.mts +1 -1
  191. package/src/foundry/client/pixi/layers/masks/depth.d.mts +1 -1
  192. package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +1 -1
  193. package/src/foundry/client/pixi/layers/masks/vision.d.mts +1 -1
  194. package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +1 -1
  195. package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +1 -1
  196. package/src/foundry/client/pixi/layers/placeables/notes.d.mts +1 -1
  197. package/src/foundry/client/pixi/layers/placeables/regions.d.mts +1 -1
  198. package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +1 -1
  199. package/src/foundry/client/pixi/layers/placeables/templates.d.mts +1 -1
  200. package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +1 -1
  201. package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +1 -1
  202. package/src/foundry/client/pixi/layers/placeables/walls.d.mts +1 -1
  203. package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +1 -1
  204. package/src/foundry/client/pixi/perception/detection-mode.d.mts +1 -1
  205. package/src/foundry/client/pixi/perception/fog.d.mts +1 -1
  206. package/src/foundry/client/pixi/perception/perception-manager.d.mts +1 -1
  207. package/src/foundry/client/pixi/perception/vision-mode.d.mts +1 -1
  208. package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +1 -1
  209. package/src/foundry/client/pixi/placeable.d.mts +2 -1
  210. package/src/foundry/client/pixi/placeables/drawing.d.mts +1 -1
  211. package/src/foundry/client/pixi/placeables/light.d.mts +1 -7
  212. package/src/foundry/client/pixi/placeables/note.d.mts +1 -1
  213. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +1 -1
  214. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +1 -1
  215. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +1 -1
  216. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +1 -1
  217. package/src/foundry/client/pixi/placeables/region.d.mts +1 -1
  218. package/src/foundry/client/pixi/placeables/sound.d.mts +1 -1
  219. package/src/foundry/client/pixi/placeables/template.d.mts +1 -1
  220. package/src/foundry/client/pixi/placeables/tile.d.mts +1 -1
  221. package/src/foundry/client/pixi/placeables/token.d.mts +1 -1
  222. package/src/foundry/client/pixi/placeables/wall.d.mts +1 -1
  223. package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +1 -1
  224. package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +1 -1
  225. package/src/foundry/client/pixi/webgl/helpers/framebuffer-snapshot.d.mts +1 -1
  226. package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +1 -1
  227. package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +1 -1
  228. package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +1 -1
  229. package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +1 -1
  230. package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +1 -1
  231. package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +1 -1
  232. package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +1 -1
  233. package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +1 -1
  234. package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +1 -1
  235. package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +1 -1
  236. package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +1 -1
  237. package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +1 -1
  238. package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +1 -1
  239. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +1 -1
  240. package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +1 -1
  241. package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +1 -1
  242. package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +1 -1
  243. package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +1 -1
  244. package/src/foundry/client/pixi/workers/texture-worker.d.mts +1 -1
  245. package/src/foundry/client/ui/context.d.mts +1 -1
  246. package/src/foundry/client/ui/dialog.d.mts +1 -1
  247. package/src/foundry/client/ui/dragdrop.d.mts +1 -1
  248. package/src/foundry/client/ui/editor.d.mts +1 -1
  249. package/src/foundry/client/ui/filepicker.d.mts +1 -1
  250. package/src/foundry/client/ui/filter.d.mts +1 -1
  251. package/src/foundry/client-esm/applications/api/application.d.mts +1 -9
  252. package/src/foundry/client-esm/applications/api/dialog.d.mts +1 -1
  253. package/src/foundry/client-esm/applications/api/document-sheet.d.mts +1 -1
  254. package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +1 -1
  255. package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +1 -1
  256. package/src/foundry/client-esm/applications/apps/permission-config.d.mts +1 -1
  257. package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +1 -1
  258. package/src/foundry/client-esm/applications/forms/fields.d.mts +1 -1
  259. package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +1 -1
  260. package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +1 -1
  261. package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +1 -1
  262. package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +1 -1
  263. package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +1 -1
  264. package/src/foundry/client-esm/applications/sheets/region-config.d.mts +1 -1
  265. package/src/foundry/client-esm/applications/sheets/user-config.d.mts +1 -1
  266. package/src/foundry/client-esm/applications/ui/region-legend.d.mts +1 -1
  267. package/src/foundry/client-esm/audio/biquad.d.mts +1 -1
  268. package/src/foundry/client-esm/audio/convolver.d.mts +1 -1
  269. package/src/foundry/client-esm/audio/helper.d.mts +1 -1
  270. package/src/foundry/client-esm/audio/sound.d.mts +2 -2
  271. package/src/foundry/client-esm/canvas/edges/collision.d.mts +1 -1
  272. package/src/foundry/client-esm/canvas/edges/edge.d.mts +1 -1
  273. package/src/foundry/client-esm/canvas/edges/vertex.d.mts +1 -1
  274. package/src/foundry/client-esm/canvas/scene-manager.d.mts +1 -1
  275. package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +1 -1
  276. package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +1 -1
  277. package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +1 -1
  278. package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +1 -1
  279. package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +1 -1
  280. package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +1 -1
  281. package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +1 -1
  282. package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +1 -1
  283. package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +1 -1
  284. package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +1 -1
  285. package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +3 -2
  286. package/src/foundry/client-esm/canvas/tokens/ring.d.mts +1 -1
  287. package/src/foundry/client-esm/data/client-backend.d.mts +1 -1
  288. package/src/foundry/client-esm/data/region-behaviors/adjust-darkness-level.d.mts +4 -5
  289. package/src/foundry/client-esm/data/region-behaviors/base.d.mts +1 -1
  290. package/src/foundry/client-esm/data/region-behaviors/display-scrolling-text.d.mts +1 -1
  291. package/src/foundry/client-esm/data/region-behaviors/toggle-behavior.d.mts +4 -4
  292. package/src/foundry/client-esm/dice/roll.d.mts +5 -8
  293. package/src/foundry/client-esm/dice/terms/coin.d.mts +1 -1
  294. package/src/foundry/client-esm/dice/terms/dice.d.mts +1 -1
  295. package/src/foundry/client-esm/dice/terms/die.d.mts +1 -1
  296. package/src/foundry/client-esm/dice/terms/fate.d.mts +1 -1
  297. package/src/foundry/client-esm/dice/terms/function.d.mts +1 -1
  298. package/src/foundry/client-esm/dice/terms/numeric.d.mts +1 -1
  299. package/src/foundry/client-esm/dice/terms/operator.d.mts +1 -1
  300. package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +1 -1
  301. package/src/foundry/client-esm/dice/terms/pool.d.mts +1 -1
  302. package/src/foundry/client-esm/dice/terms/string.d.mts +1 -1
  303. package/src/foundry/client-esm/dice/terms/term.d.mts +1 -1
  304. package/src/foundry/common/abstract/backend.d.mts +1 -1
  305. package/src/foundry/common/abstract/data.d.mts +197 -146
  306. package/src/foundry/common/abstract/document.d.mts +198 -81
  307. package/src/foundry/common/abstract/embedded-collection-delta.d.mts +1 -1
  308. package/src/foundry/common/abstract/embedded-collection.d.mts +1 -1
  309. package/src/foundry/common/abstract/socket.d.mts +1 -1
  310. package/src/foundry/common/abstract/type-data.d.mts +4 -1
  311. package/src/foundry/common/config.d.mts +7 -1
  312. package/src/foundry/common/constants.d.mts +1 -1
  313. package/src/foundry/common/data/data.d.mts +42 -12
  314. package/src/foundry/common/data/fields.d.mts +656 -252
  315. package/src/foundry/common/documents/_types.d.mts +0 -6
  316. package/src/foundry/common/documents/active-effect.d.mts +116 -53
  317. package/src/foundry/common/documents/actor-delta.d.mts +139 -58
  318. package/src/foundry/common/documents/actor.d.mts +105 -51
  319. package/src/foundry/common/documents/adventure.d.mts +84 -39
  320. package/src/foundry/common/documents/ambient-light.d.mts +66 -38
  321. package/src/foundry/common/documents/ambient-sound.d.mts +66 -38
  322. package/src/foundry/common/documents/card.d.mts +100 -59
  323. package/src/foundry/common/documents/cards.d.mts +97 -42
  324. package/src/foundry/common/documents/chat-message.d.mts +105 -52
  325. package/src/foundry/common/documents/combat.d.mts +101 -48
  326. package/src/foundry/common/documents/combatant.d.mts +94 -50
  327. package/src/foundry/common/documents/drawing.d.mts +87 -46
  328. package/src/foundry/common/documents/fog-exploration.d.mts +87 -41
  329. package/src/foundry/common/documents/folder.d.mts +100 -46
  330. package/src/foundry/common/documents/item.d.mts +116 -45
  331. package/src/foundry/common/documents/journal-entry-page.d.mts +90 -40
  332. package/src/foundry/common/documents/journal-entry.d.mts +90 -39
  333. package/src/foundry/common/documents/macro.d.mts +116 -52
  334. package/src/foundry/common/documents/measured-template.d.mts +80 -44
  335. package/src/foundry/common/documents/note.d.mts +75 -39
  336. package/src/foundry/common/documents/playlist-sound.d.mts +88 -47
  337. package/src/foundry/common/documents/playlist.d.mts +101 -50
  338. package/src/foundry/common/documents/region-behavior.d.mts +71 -40
  339. package/src/foundry/common/documents/region.d.mts +68 -40
  340. package/src/foundry/common/documents/roll-table.d.mts +43 -9
  341. package/src/foundry/common/documents/scene.d.mts +190 -43
  342. package/src/foundry/common/documents/setting.d.mts +98 -42
  343. package/src/foundry/common/documents/table-result.d.mts +98 -48
  344. package/src/foundry/common/documents/tile.d.mts +77 -43
  345. package/src/foundry/common/documents/token.d.mts +95 -52
  346. package/src/foundry/common/documents/user.d.mts +100 -89
  347. package/src/foundry/common/documents/wall.d.mts +47 -17
  348. package/src/foundry/common/grid/base.d.mts +1 -1
  349. package/src/foundry/common/grid/gridless.d.mts +1 -1
  350. package/src/foundry/common/grid/hexagonal.d.mts +1 -1
  351. package/src/foundry/common/grid/square.d.mts +1 -1
  352. package/src/foundry/common/packages/base-package.d.mts +37 -14
  353. package/src/foundry/common/packages/base-system.d.mts +39 -0
  354. package/src/foundry/common/packages/base-world.d.mts +8 -1
  355. package/src/foundry/common/packages/sub-types.d.mts +3 -5
  356. package/src/foundry/common/primitives/array.d.mts +1 -1
  357. package/src/foundry/common/primitives/string.d.mts +1 -1
  358. package/src/foundry/common/prosemirror/dirty-plugin.d.mts +1 -1
  359. package/src/foundry/common/prosemirror/dom-parser.d.mts +1 -1
  360. package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +1 -1
  361. package/src/foundry/common/prosemirror/image-plugin.d.mts +1 -1
  362. package/src/foundry/common/prosemirror/paste-transformer.d.mts +1 -1
  363. package/src/foundry/common/prosemirror/plugin.d.mts +1 -1
  364. package/src/foundry/common/types.d.mts +1 -1
  365. package/src/foundry/common/utils/bitmask.d.mts +1 -1
  366. package/src/foundry/common/utils/collection.d.mts +1 -1
  367. package/src/foundry/common/utils/event-emitter.d.mts +1 -1
  368. package/src/foundry/common/utils/helpers.d.mts +1 -1
  369. package/src/foundry/public/scripts/clipper/clipper.d.mts +1 -1
  370. package/src/types/augments/particles.d.mts +1 -1
  371. package/src/types/augments/pixi.d.mts +1 -1
  372. package/src/types/augments/smooth.d.mts +1 -1
  373. package/src/types/augments/tinyMCE.d.mts +1 -1
  374. package/src/types/config.d.mts +2 -5
  375. package/src/types/documentConfiguration.d.mts +1 -1
  376. package/src/types/lib.d.mts +1 -1
  377. package/src/types/workers/image-compressor.d.mts +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { ConfiguredJournalEntryPage } from "../../../../configuration/index.d.mts";
2
- import type { InexactPartial, LazyUnknown, Merge } from "fvtt-types/utils";
2
+ import type { AnyObject, Merge, NullishProps } from "#utils";
3
3
  import type Document from "../../../common/abstract/document.d.mts";
4
4
  import type { DataSchema } from "../../../common/data/fields.d.mts";
5
5
  import type { fields } from "../../../common/data/module.d.mts";
@@ -157,7 +157,7 @@ declare global {
157
157
  type Collection = never;
158
158
 
159
159
  /**
160
- * An instance of `JournalEntryPage` that comes from the database but failed validation meaining that
160
+ * An instance of `JournalEntryPage` that comes from the database but failed validation meaning that
161
161
  * its `system` and `_source` could theoretically be anything.
162
162
  */
163
163
  interface Invalid<out SubType extends JournalEntryPage.SubType = JournalEntryPage.SubType>
@@ -230,18 +230,17 @@ declare global {
230
230
  /**
231
231
  * The text name of this page.
232
232
  */
233
- name: fields.StringField<{ required: true; blank: false; label: "JOURNALENTRYPAGE.PageTitle"; textSearch: true }>;
233
+ // FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
234
+ name: fields.StringField<
235
+ { required: true; blank: false; label: "JOURNALENTRYPAGE.PageTitle"; textSearch: true },
236
+ string
237
+ >;
234
238
 
235
239
  /**
236
240
  * The type of this page, in {@link BaseJournalEntryPage.TYPES | `BaseJournalEntryPage.TYPES`}.
237
241
  * @defaultValue `"text"`
238
242
  */
239
- type: fields.DocumentTypeField<
240
- typeof BaseJournalEntryPage,
241
- {
242
- initial: "text";
243
- }
244
- >;
243
+ type: fields.DocumentTypeField<typeof BaseJournalEntryPage, { initial: "text" }>;
245
244
 
246
245
  /**
247
246
  * System-specific data.
@@ -297,17 +296,26 @@ declare global {
297
296
  * The format of the page's content, in {@link CONST.JOURNAL_ENTRY_PAGE_FORMATS | `CONST.JOURNAL_ENTRY_PAGE_FORMATS`}.
298
297
  * @defaultValue `CONST.JOURNAL_ENTRY_PAGE_FORMATS.HTML`
299
298
  */
300
- format: fields.NumberField<{
301
- label: "JOURNALENTRYPAGE.Format";
302
- initial: typeof CONST.JOURNAL_ENTRY_PAGE_FORMATS.HTML;
303
- choices: foundry.CONST.JOURNAL_ENTRY_PAGE_FORMATS[];
304
- }>;
299
+ format: fields.NumberField<
300
+ {
301
+ label: "JOURNALENTRYPAGE.Format";
302
+ initial: typeof CONST.JOURNAL_ENTRY_PAGE_FORMATS.HTML;
303
+ choices: CONST.JOURNAL_ENTRY_PAGE_FORMATS[];
304
+ },
305
+ // FIXME: overrides required to enforce branded type
306
+ CONST.JOURNAL_ENTRY_PAGE_FORMATS | null | undefined,
307
+ CONST.JOURNAL_ENTRY_PAGE_FORMATS,
308
+ CONST.JOURNAL_ENTRY_PAGE_FORMATS
309
+ >;
305
310
  }>;
306
311
 
307
312
  /**
308
313
  * Data particular to video journal entry pages.
309
314
  */
310
315
  video: fields.SchemaField<{
316
+ /**
317
+ * @defaultValue `true`
318
+ */
311
319
  controls: fields.BooleanField<{ initial: true }>;
312
320
 
313
321
  /**
@@ -539,6 +547,44 @@ declare global {
539
547
  order: number;
540
548
  }
541
549
 
550
+ interface CreateDocumentLinkOptions extends ClientDocument.CreateDocumentLinkOptions {
551
+ /**
552
+ * @remarks If the `eventData` passed with these options has an `anchor.slug`, the default is `eventData.anchor.name`,
553
+ * otherwise uses `super`'s default of `this.name`
554
+ */
555
+ label?: string | null | undefined;
556
+ }
557
+
558
+ /**
559
+ * @internal
560
+ * Slightly editorializing the description with the addition of parentheses to make this scan
561
+ * for both {@linkcode JournalEntryPage.buildTOC} and {@linkcode JournalEntryPage._makeHeadingNode}
562
+ */
563
+ type _IncludeElement = NullishProps<{
564
+ /**
565
+ * Include reference(s) to the heading DOM element(s) in the returned ToC.
566
+ * @defaultValue `true`
567
+ */
568
+ includeElement: boolean;
569
+ }>;
570
+
571
+ interface BuildTOCOptions extends _IncludeElement {}
572
+
573
+ interface MakeHeadingNodeOptions extends _IncludeElement {}
574
+
575
+ interface EmbedTextPageConfig extends TextEditor.EnrichmentOptions, TextEditor.DocumentHTMLEmbedConfig {}
576
+
577
+ /** @internal */
578
+ type _EmbedImagePageConfig = NullishProps<{
579
+ /**
580
+ * Alt text for the image, otherwise the caption will be used.
581
+ * @remarks If both `alt` and `label` are omitted, the returned Element's `alt` will fall back to using `this.image.caption || this.name`
582
+ */
583
+ alt: string;
584
+ }>;
585
+
586
+ interface EmbedImagePageConfig extends _EmbedImagePageConfig, TextEditor.DocumentHTMLEmbedConfig {}
587
+
542
588
  /**
543
589
  * @deprecated {@link JournalEntryPage.Database | `JournalEntryPage.DatabaseOperation`}
544
590
  */
@@ -590,7 +636,7 @@ declare global {
590
636
  */
591
637
  get toc(): Record<string, JournalEntryPage.JournalEntryPageHeading>;
592
638
 
593
- override get permission(): foundry.CONST.DOCUMENT_OWNERSHIP_LEVELS;
639
+ override get permission(): CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
594
640
 
595
641
  /**
596
642
  * Return a reference to the Note instance for this Journal Entry Page in the current Scene, if any.
@@ -609,15 +655,10 @@ declare global {
609
655
  * @param html - The HTML content to generate a ToC outline for.
610
656
  * @param options - Additional options to configure ToC generation.
611
657
  */
658
+ // options: not null (destructured)
612
659
  static buildTOC(
613
660
  html: HTMLElement[],
614
- options: InexactPartial<{
615
- /**
616
- * Include references to the heading DOM elements in the returned ToC.
617
- * @defaultValue `true`
618
- */
619
- includeElement: boolean;
620
- }>,
661
+ options?: JournalEntryPage.BuildTOCOptions,
621
662
  ): Record<string, JournalEntryPage.JournalEntryPageHeading>;
622
663
 
623
664
  /**
@@ -633,36 +674,25 @@ declare global {
633
674
  * @param heading - The heading element.
634
675
  * @param options - Additional options to configure the returned node.
635
676
  */
677
+ // options: not null (destructured)
636
678
  protected static _makeHeadingNode(
637
679
  heading: HTMLHeadingElement,
638
- options: InexactPartial<{
639
- /**
640
- * Whether to include the DOM element in the returned ToC node.
641
- * @defaultValue `true`
642
- */
643
- includeElement: boolean;
644
- }>,
680
+ options?: JournalEntryPage.MakeHeadingNodeOptions,
645
681
  ): JournalEntryPage.JournalEntryPageHeading;
646
682
 
647
- protected override _createDocumentLink(
648
- eventData: unknown,
649
- options?: InexactPartial<{
650
- /**
651
- * A document to generate a link relative to.
652
- */
653
- relativeTo: ClientDocument;
654
- /**
655
- * A custom label to use instead of the document's name.
656
- */
657
- label: string;
658
- }>,
659
- ): string;
660
-
661
- override _onClickDocumentLink(event: MouseEvent): this;
683
+ /** @remarks Uses `eventData`, unlike {@link ClientDocument._createDocumentLink | `ClientDocument#_createDocumentLink`} */
684
+ // options: not null (destructured)
685
+ override _createDocumentLink(eventData: AnyObject, options?: JournalEntryPage.CreateDocumentLinkOptions): string;
662
686
 
663
687
  /**
664
- * @privateRemarks _onUpdate is overridden but with no signature changes from the template in BaseJournalEntryPage
688
+ * @remarks
689
+ * As `super`, but return the parent's sheet's `#render`:
690
+ * - AppV1: returns that sheet
691
+ * - AppV2: returns a Promise of that sheet
665
692
  */
693
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
694
+
695
+ // _onUpdate is overridden but with no signature changes from the template in BaseJournalEntryPage
666
696
 
667
697
  protected override _buildEmbedHTML(
668
698
  config: TextEditor.DocumentHTMLEmbedConfig,
@@ -717,8 +747,9 @@ declare global {
717
747
  * </section>
718
748
  * ```
719
749
  */
750
+ // options: not null (parameter default only)
720
751
  protected _embedTextPage(
721
- config: TextEditor.DocumentHTMLEmbedConfig & TextEditor.EnrichmentOptions,
752
+ config: JournalEntryPage.EmbedTextPageConfig,
722
753
  options?: TextEditor.EnrichmentOptions,
723
754
  ): Promise<HTMLCollection>;
724
755
 
@@ -727,7 +758,6 @@ declare global {
727
758
  * @param config - Configuration for embedding behavior.
728
759
  * @param options - The original enrichment options for cases where the Document embed content
729
760
  * also contains text that must be enriched.
730
- * @returns
731
761
  *
732
762
  * @example Create an embedded image from a sibling journal entry page.
733
763
  * ```
@@ -750,13 +780,13 @@ declare global {
750
780
  * </figcaption>
751
781
  * </figure>
752
782
  * ```
783
+ *
784
+ * @remarks Core's implementation always returns a {@linkcode HTMLImageElement}, and does not use `options`
753
785
  */
786
+ // config: not null (destructured), options: not null (parameter default only)
754
787
  protected _embedImagePage(
755
- config: TextEditor.DocumentHTMLEmbedConfig & {
756
- /** Alt text for the image, otherwise the caption will be used. **/
757
- alt?: string | LazyUnknown;
758
- },
759
- options?: InexactPartial<TextEditor.EnrichmentOptions>,
788
+ config?: JournalEntryPage.EmbedImagePageConfig,
789
+ options?: TextEditor.EnrichmentOptions,
760
790
  ): Promise<HTMLElement | HTMLCollection | null>;
761
791
 
762
792
  /*
@@ -773,23 +803,26 @@ declare global {
773
803
 
774
804
  // Descendant Document operations have been left out because JournalEntryPage does not have any descendant documents.
775
805
 
806
+ // context: not null (destructured)
776
807
  static override defaultName(
777
- context: Document.DefaultNameContext<JournalEntryPage.SubType, NonNullable<JournalEntryPage.Parent>>,
808
+ context?: Document.DefaultNameContext<"JournalEntryPage", NonNullable<JournalEntryPage.Parent>>,
778
809
  ): string;
779
810
 
811
+ /** @remarks `context.parent` is required as creation requires one */
780
812
  static override createDialog(
781
- data: Document.CreateDialogData<JournalEntryPage.CreateData>,
782
- context: Document.CreateDialogContext<JournalEntryPage.SubType, NonNullable<JournalEntryPage.Parent>>,
813
+ data: Document.CreateDialogData<JournalEntryPage.CreateData> | undefined,
814
+ context: Document.CreateDialogContext<"JournalEntryPage", NonNullable<JournalEntryPage.Parent>>,
783
815
  ): Promise<JournalEntryPage.Stored | null | undefined>;
784
816
 
817
+ // options: not null (parameter default only)
785
818
  static override fromDropData(
786
819
  data: Document.DropData<JournalEntryPage.Implementation>,
787
- options?: Document.FromDropDataOptions,
820
+ options?: AnyObject,
788
821
  ): Promise<JournalEntryPage.Implementation | undefined>;
789
822
 
790
823
  static override fromImport(
791
824
  source: JournalEntryPage.Source,
792
- context?: Document.FromImportContext<JournalEntryPage.Parent>,
825
+ context?: Document.FromImportContext<JournalEntryPage.Parent> | null,
793
826
  ): Promise<JournalEntryPage.Implementation>;
794
827
 
795
828
  // Embedded document operations have been left out because JournalEntryPage does not have any embedded documents.
@@ -1,8 +1,8 @@
1
+ import type { AnyObject, InterfaceToObject, Merge, ValueOf } from "#utils";
1
2
  import type Document from "../../../common/abstract/document.d.mts";
2
3
  import type { fields } from "../../../common/data/module.d.mts";
3
4
  import type { documents } from "../../../client-esm/client.d.mts";
4
5
  import type { DataSchema } from "../../../common/data/fields.d.mts";
5
- import type { InterfaceToObject, Merge, ValueOf } from "../../../../utils/index.d.mts";
6
6
 
7
7
  declare global {
8
8
  namespace JournalEntry {
@@ -175,7 +175,7 @@ declare global {
175
175
  type Collection = Journal.Configured;
176
176
 
177
177
  /**
178
- * An instance of `JournalEntry` that comes from the database but failed validation meaining that
178
+ * An instance of `JournalEntry` that comes from the database but failed validation meaning that
179
179
  * its `system` and `_source` could theoretically be anything.
180
180
  */
181
181
  interface Invalid extends Document.Invalid<JournalEntry.Implementation> {}
@@ -246,7 +246,8 @@ declare global {
246
246
  /**
247
247
  * The name of this JournalEntry
248
248
  */
249
- name: fields.StringField<{ required: true; blank: false; textSearch: true }>;
249
+ // FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
250
+ name: fields.StringField<{ required: true; blank: false; textSearch: true }, string>;
250
251
 
251
252
  /**
252
253
  * The pages contained within this JournalEntry document
@@ -497,6 +498,11 @@ declare global {
497
498
  */
498
499
  get visible(): boolean;
499
500
 
501
+ /**
502
+ * @remarks "Upgrade to OBSERVER ownership if the journal entry is in a LIMITED compendium,
503
+ * as LIMITED has no special meaning for journal entries in this context."
504
+ */
505
+ // user: not null (parameter default only where forwarded)
500
506
  override getUserLevel(user?: User.Implementation): foundry.CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
501
507
 
502
508
  /**
@@ -510,11 +516,10 @@ declare global {
510
516
  * By default the entry will only be shown to players who have permission to observe it.
511
517
  * If the parameter force is passed, the entry will be shown to all players regardless of normal permission.
512
518
  *
513
- * @param force - Display the entry to all players regardless of normal permissions
514
- * (default: `false`)
519
+ * @param force - Display the entry to all players regardless of normal permissions (default: `false`)
515
520
  * @returns A Promise that resolves back to the shown entry once the request is processed
516
521
  */
517
- show(force?: boolean): Promise<this>;
522
+ show(force?: boolean | null): Promise<this>;
518
523
 
519
524
  /**
520
525
  * If the JournalEntry has a pinned note on the canvas, this method will animate to that note
@@ -522,11 +527,10 @@ declare global {
522
527
  * @param options - Options which modify the pan operation
523
528
  * @returns A Promise which resolves once the pan animation has concluded
524
529
  */
525
- panToNote(options?: PanToNoteOptions): Promise<void>;
530
+ // options: not null (parameter default only, destructured where forwarded)
531
+ panToNote(options?: NotesLayer.PanToNoteOptions): Promise<void>;
526
532
 
527
- /**
528
- * @privateRemarks _onUpdate and _onDelete are all overridden but with no signature changes from their definition in BaseJournalEntry.
529
- */
533
+ // _onUpdate and _onDelete are overridden but with no signature changes from their definition in BaseJournalEntry.
530
534
 
531
535
  /*
532
536
  * After this point these are not really overridden methods.
@@ -542,7 +546,7 @@ declare global {
542
546
 
543
547
  /**
544
548
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
545
- * this method must be overriden like so:
549
+ * this method must be overridden like so:
546
550
  * ```typescript
547
551
  * class SwadeCards extends Cards {
548
552
  * protected override _preCreateDescendantDocuments(...args: Cards.PreCreateDescendantDocumentsArgs) {
@@ -560,7 +564,7 @@ declare global {
560
564
 
561
565
  /**
562
566
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
563
- * this method must be overriden like so:
567
+ * this method must be overridden like so:
564
568
  * ```typescript
565
569
  * class GurpsCards extends Cards {
566
570
  * protected override _onCreateDescendantDocuments(...args: Cards.OnCreateDescendantDocumentsArgs) {
@@ -578,7 +582,7 @@ declare global {
578
582
 
579
583
  /**
580
584
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
581
- * this method must be overriden like so:
585
+ * this method must be overridden like so:
582
586
  * ```typescript
583
587
  * class LancerCards extends Cards {
584
588
  * protected override _preUpdateDescendantDocuments(...args: Cards.OnUpdateDescendantDocuments) {
@@ -596,7 +600,7 @@ declare global {
596
600
 
597
601
  /**
598
602
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
599
- * this method must be overriden like so:
603
+ * this method must be overridden like so:
600
604
  * ```typescript
601
605
  * class Ptr2eCards extends Cards {
602
606
  * protected override _onUpdateDescendantDocuments(...args: Cards.OnUpdateDescendantDocumentsArgs) {
@@ -614,7 +618,7 @@ declare global {
614
618
 
615
619
  /**
616
620
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
617
- * this method must be overriden like so:
621
+ * this method must be overridden like so:
618
622
  * ```typescript
619
623
  * class KultCards extends Cards {
620
624
  * protected override _preDeleteDescendantDocuments(...args: Cards.PreDeleteDescendantDocumentsArgs) {
@@ -632,7 +636,7 @@ declare global {
632
636
 
633
637
  /**
634
638
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
635
- * this method must be overriden like so:
639
+ * this method must be overridden like so:
636
640
  * ```typescript
637
641
  * class BladesCards extends Cards {
638
642
  * protected override _onDeleteDescendantDocuments(...args: Cards.OnUpdateDescendantDocuments) {
@@ -648,35 +652,26 @@ declare global {
648
652
  */
649
653
  protected override _onDeleteDescendantDocuments(...args: Cards.OnDeleteDescendantDocumentsArgs): void;
650
654
 
651
- static override defaultName(context?: Document.DefaultNameContext<string, JournalEntry.Parent>): string;
655
+ // context: not null (destructured)
656
+ static override defaultName(context?: Document.DefaultNameContext<"JournalEntry", JournalEntry.Parent>): string;
652
657
 
658
+ // data: not null (parameter default only), context: not null (destructured)
653
659
  static override createDialog(
654
660
  data?: Document.CreateDialogData<JournalEntry.CreateData>,
655
- context?: Document.CreateDialogContext<string, JournalEntry.Parent>,
661
+ context?: Document.CreateDialogContext<"JournalEntry", JournalEntry.Parent>,
656
662
  ): Promise<JournalEntry.Stored | null | undefined>;
657
663
 
664
+ // options: not null (parameter default only)
658
665
  static override fromDropData(
659
666
  data: Document.DropData<JournalEntry.Implementation>,
660
- options?: Document.FromDropDataOptions,
667
+ options?: AnyObject,
661
668
  ): Promise<JournalEntry.Implementation | undefined>;
662
669
 
663
670
  static override fromImport(
664
671
  source: JournalEntry.Source,
665
- context?: Document.FromImportContext<JournalEntry.Parent>,
672
+ context?: Document.FromImportContext<JournalEntry.Parent> | null,
666
673
  ): Promise<JournalEntry.Implementation>;
667
- }
668
- }
669
674
 
670
- interface PanToNoteOptions {
671
- /**
672
- * The speed of the pan animation in milliseconds
673
- * @defaultValue `250`
674
- */
675
- duration?: number;
676
-
677
- /**
678
- * The resulting zoom level
679
- * @defaultValue `1.5`
680
- */
681
- scale?: number;
675
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
676
+ }
682
677
  }
@@ -1,5 +1,5 @@
1
1
  import type { ConfiguredMacro } from "../../../../configuration/index.d.mts";
2
- import type { InexactPartial, Merge } from "fvtt-types/utils";
2
+ import type { AnyObject, Merge, NullishProps } from "#utils";
3
3
  import type { documents } from "../../../client-esm/client.d.mts";
4
4
  import type Document from "../../../common/abstract/document.d.mts";
5
5
  import type { DataSchema } from "../../../common/data/fields.d.mts";
@@ -153,7 +153,7 @@ declare global {
153
153
  type Collection = Macros.Configured;
154
154
 
155
155
  /**
156
- * An instance of `Macro` that comes from the database but failed validation meaining that
156
+ * An instance of `Macro` that comes from the database but failed validation meaning that
157
157
  * its `system` and `_source` could theoretically be anything.
158
158
  */
159
159
  interface Invalid<out SubType extends Macro.SubType = Macro.SubType> extends Document.Invalid<OfType<SubType>> {}
@@ -225,24 +225,14 @@ declare global {
225
225
  * The name of this Macro
226
226
  * @defaultValue `""`
227
227
  */
228
- name: fields.StringField<{
229
- required: true;
230
- blank: false;
231
- label: "Name";
232
- textSearch: true;
233
- }>;
228
+ // FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
229
+ name: fields.StringField<{ required: true; blank: false; label: "Name"; textSearch: true }, string>;
234
230
 
235
231
  /**
236
232
  * A Macro subtype from CONST.MACRO_TYPES
237
233
  * @defaultValue `CONST.MACRO_TYPES.CHAT`
238
234
  */
239
- type: fields.DocumentTypeField<
240
- typeof BaseMacro,
241
- {
242
- initial: typeof CONST.MACRO_TYPES.CHAT;
243
- label: "Type";
244
- }
245
- >;
235
+ type: fields.DocumentTypeField<typeof BaseMacro, { initial: typeof CONST.MACRO_TYPES.CHAT; label: "Type" }>;
246
236
 
247
237
  /**
248
238
  * The _id of a User document which created this Macro *
@@ -263,6 +253,8 @@ declare global {
263
253
  /**
264
254
  * The scope of this Macro application from CONST.MACRO_SCOPES
265
255
  * @defaultValue `"global"`
256
+ * @privateRemarks This field (and `CONST.MACRO_SCOPES`) is entirely vestigial, it's never checked anywhere,
257
+ * and its `<select>` in MacroConfig has been unconditionally disabled since at least 11.315
266
258
  */
267
259
  scope: fields.StringField<{
268
260
  required: true;
@@ -437,33 +429,61 @@ declare global {
437
429
 
438
430
  /**
439
431
  * @deprecated This type always required properties for both a `"script"` and a `"chat"` message
440
- * even when necessary. It has been superceded by {@link ScriptScope | `ScriptScope`},
432
+ * even when necessary. It has been superseded by {@link ScriptScope | `ScriptScope`},
441
433
  * {@link ChatScope | `ChatScope`}, and {@link UnknownScope | `UnknownScope`}
442
434
  */
443
435
  type Scope = ScriptScope;
444
436
 
445
437
  /** @internal */
446
- interface _ScriptScope {
438
+ type _ScriptScope = NullishProps<{
447
439
  /** An Actor who is the protagonist of the executed action. */
448
440
  actor: Actor.Implementation;
449
441
 
450
442
  /** A Token which is the protagonist of the executed action. */
451
443
  token: Token.Object;
452
444
 
453
- /** An optional event passed to the executed macro. */
454
- event: Event | RegionDocument.RegionEvent;
445
+ /** The speaker data */
446
+ speaker: ChatMessage.SpeakerData;
455
447
 
456
448
  /**
457
- * @remarks Additional arguments passed as part of the scope
449
+ * @remarks Sometimes provided by core:
450
+ * - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
451
+ * will be a {@linkcode Scene.Implementation} (possibly `null` if somehow called on a `RegionBehavior` whose `RegionDocument` doesn't have a parent `Scene`)
458
452
  */
459
- [arg: string]: unknown;
460
- }
453
+ scene?: unknown;
461
454
 
462
- interface ScriptScope extends InexactPartial<_ScriptScope> {}
455
+ /**
456
+ * @remarks Sometimes provided by core:
457
+ * - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
458
+ * will be a {@linkcode RegionDocument.Implementation} (possibly `null` if somehow called on a `RegionBehavior` without a parent `RegionDocument`)
459
+ */
460
+ region?: unknown;
463
461
 
464
- interface ChatScope {
465
- speaker?: ChatMessage.SpeakerData | undefined;
466
- }
462
+ /**
463
+ * @remarks Sometimes provided by core:
464
+ * - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
465
+ * will be a {@linkcode RegionBehavior.Implementation} (possibly `null` if somehow called on a `RegionBehaviorType` without a parent `RegionBehavior`)
466
+ */
467
+ behavior?: unknown;
468
+
469
+ /**
470
+ * @remarks Sometimes provided by core:
471
+ * - When called in {@link Macro._onClickDocumentLink | `Macro#_onClickDocumentLink`},
472
+ * will be a {@linkcode MouseEvent}
473
+ * - When called in {@link foundry.data.regionBehaviors.ExecuteMacroRegionBehaviorType._handleRegionEvent | `ExecuteMacroRegionBehaviorType#_handleRegionEvent`},
474
+ * will be a {@linkcode RegionDocument.RegionEvent}
475
+ */
476
+ event?: unknown;
477
+
478
+ /**
479
+ * @remarks Additional arguments passed as part of the scope. Numeric keys are disallowed (`##executeScript` throws).
480
+ */
481
+ [arg: string | symbol]: unknown;
482
+ }>;
483
+
484
+ interface ScriptScope extends _ScriptScope {}
485
+
486
+ interface ChatScope extends Pick<ScriptScope, "speaker"> {}
467
487
 
468
488
  interface UnknownScope extends ScriptScope, ChatScope {}
469
489
 
@@ -474,7 +494,7 @@ declare global {
474
494
  // Note: If extra types ever get added this will need to be updated to account for them, even if
475
495
  // just to return `undefined`.
476
496
  type ExecuteReturn<SubType extends Macro.SubType> =
477
- | (SubType extends "chat" ? Promise<ChatMessage.Implementation | void> : never)
497
+ | (SubType extends "chat" ? Promise<ChatMessage.Implementation | undefined | void> : never)
478
498
  | (SubType extends "script" ? Promise<unknown> | void : never);
479
499
 
480
500
  /**
@@ -549,12 +569,13 @@ declare global {
549
569
  * @returns A promising containing a created {@link ChatMessage | `ChatMessage`} (or `undefined`) if a chat
550
570
  * macro or the return value if a script macro. A void return is possible if the user
551
571
  * is not permitted to execute macros or a script macro execution fails.
572
+ * @remarks Forwards to either `#executeChat` or `#executeScript`
552
573
  */
574
+ // scope: not null (parameter default only, destructured where forwarded)
553
575
  execute(scope?: Macro.ExecuteScope<SubType>): Macro.ExecuteReturn<SubType>;
554
576
 
555
- #executeScript();
556
-
557
- _onClickDocumentLink(event: MouseEvent): ReturnType<this["execute"]>;
577
+ /** @remarks Returns `this.execute({event})` */
578
+ override _onClickDocumentLink(event: MouseEvent): Macro.ExecuteReturn<SubType>;
558
579
 
559
580
  /*
560
581
  * After this point these are not really overridden methods.
@@ -570,21 +591,26 @@ declare global {
570
591
 
571
592
  // Descendant Document operations have been left out because Macro does not have any descendant documents.
572
593
 
573
- static override defaultName(context?: Document.DefaultNameContext<Macro.SubType, Macro.Parent>): string;
594
+ // context: not null (destructured)
595
+ static override defaultName(context?: Document.DefaultNameContext<"Macro", Macro.Parent>): string;
574
596
 
597
+ // data: not null (parameter default only), context: not null (destructured)
575
598
  static override createDialog(
576
599
  data?: Macro.CreateData,
577
- context?: Document.CreateDialogContext<Macro.SubType, Macro.Parent>,
600
+ context?: Document.CreateDialogContext<"Macro", Macro.Parent>,
578
601
  ): Promise<Macro.Stored | null | undefined>;
579
602
 
603
+ // options: not null (parameter default only)
580
604
  static override fromDropData(
581
605
  data: Document.DropData<Macro.Implementation>,
582
- options?: Document.FromDropDataOptions,
606
+ options?: AnyObject,
583
607
  ): Promise<Macro.Implementation | undefined>;
584
608
 
585
609
  static override fromImport(
586
610
  source: Macro.Source,
587
- context?: Document.FromImportContext<Macro.Parent>,
611
+ context?: Document.FromImportContext<Macro.Parent> | null,
588
612
  ): Promise<Macro.Implementation>;
613
+
614
+ #Macro: true;
589
615
  }
590
616
  }
@@ -1,4 +1,4 @@
1
- import type { Merge } from "../../../../utils/index.d.mts";
1
+ import type { AnyObject, Merge } from "#utils";
2
2
  import type { documents } from "../../../client-esm/client.d.mts";
3
3
  import type Document from "../../../common/abstract/document.d.mts";
4
4
  import type { DataSchema } from "../../../common/data/fields.d.mts";
@@ -113,7 +113,7 @@ declare global {
113
113
  type Collection = never;
114
114
 
115
115
  /**
116
- * An instance of `MeasuredTemplateDocument` that comes from the database but failed validation meaining that
116
+ * An instance of `MeasuredTemplateDocument` that comes from the database but failed validation meaning that
117
117
  * its `system` and `_source` could theoretically be anything.
118
118
  */
119
119
  interface Invalid extends Document.Invalid<MeasuredTemplateDocument.Implementation> {}
@@ -461,7 +461,7 @@ declare global {
461
461
  /**
462
462
  * Rotation is an alias for direction
463
463
  */
464
- get rotation(): this["direction"];
464
+ get rotation(): number;
465
465
 
466
466
  /**
467
467
  * Is the current User the author of this template?
@@ -482,23 +482,28 @@ declare global {
482
482
 
483
483
  // Descendant Document operations have been left out because MeasuredTemplate does not have any descendant documents.
484
484
 
485
+ // context: not null (destructured)
485
486
  static override defaultName(
486
- context: Document.DefaultNameContext<"base", NonNullable<MeasuredTemplateDocument.Parent>>,
487
+ context?: Document.DefaultNameContext<"MeasuredTemplate", NonNullable<MeasuredTemplateDocument.Parent>>,
487
488
  ): string;
488
489
 
490
+ /** @remarks `context.parent` is required as creation requires one */
489
491
  static override createDialog(
490
- data: Document.CreateDialogData<MeasuredTemplateDocument.CreateData>,
491
- context: Document.CreateDialogContext<string, NonNullable<MeasuredTemplateDocument.Parent>>,
492
+ data: Document.CreateDialogData<MeasuredTemplateDocument.CreateData> | undefined,
493
+ context: Document.CreateDialogContext<"MeasuredTemplate", NonNullable<MeasuredTemplateDocument.Parent>>,
492
494
  ): Promise<MeasuredTemplateDocument.Stored | null | undefined>;
493
495
 
496
+ // options: not null (parameter default only)
494
497
  static override fromDropData(
495
498
  data: Document.DropData<MeasuredTemplateDocument.Implementation>,
496
- options?: Document.FromDropDataOptions,
499
+ options?: AnyObject,
497
500
  ): Promise<MeasuredTemplateDocument.Implementation | undefined>;
498
501
 
499
502
  static override fromImport(
500
503
  source: MeasuredTemplateDocument.Source,
501
- context?: Document.FromImportContext<MeasuredTemplateDocument.Parent>,
504
+ context?: Document.FromImportContext<MeasuredTemplateDocument.Parent> | null,
502
505
  ): Promise<MeasuredTemplateDocument.Implementation>;
506
+
507
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
503
508
  }
504
509
  }