@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,8 +1,9 @@
1
- import type { InexactPartial, Merge } from "fvtt-types/utils";
1
+ import type { AnyObject, InexactPartial, 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";
5
5
  import type { fields, TextureData } from "../../../common/data/module.d.mts";
6
+ import LightData = foundry.data.LightData;
6
7
 
7
8
  declare global {
8
9
  namespace Scene {
@@ -193,7 +194,7 @@ declare global {
193
194
  type Collection = Scenes.Configured;
194
195
 
195
196
  /**
196
- * An instance of `Scene` that comes from the database but failed validation meaining that
197
+ * An instance of `Scene` that comes from the database but failed validation meaning that
197
198
  * its `system` and `_source` could theoretically be anything.
198
199
  */
199
200
  interface Invalid extends Document.Invalid<Scene.Implementation> {}
@@ -244,6 +245,81 @@ declare global {
244
245
  */
245
246
  interface UpdateData extends fields.SchemaField.UpdateData<Schema> {}
246
247
 
248
+ interface EnvironmentDataSchemaDefaults {
249
+ hue: number;
250
+ intensity: number;
251
+ luminosity: number;
252
+ saturation: number;
253
+ shadows: number;
254
+ }
255
+
256
+ interface EnvironmentDataSchema<Defaults extends EnvironmentDataSchemaDefaults> extends DataSchema {
257
+ /**
258
+ * The normalized hue angle.
259
+ * @defaultValue `0` for `environment.base`, `257/360` for `environment.dark`
260
+ */
261
+ hue: fields.HueField<{
262
+ required: true;
263
+ initial: Defaults["hue"];
264
+ label: "SCENES.ENVIRONMENT.Hue";
265
+ hint: "SCENES.ENVIRONMENT.HueHint";
266
+ }>;
267
+
268
+ /**
269
+ * The intensity of the tinting (0 = no tinting).
270
+ * @defaultValue `0`
271
+ */
272
+ intensity: fields.AlphaField<{
273
+ required: true;
274
+ nullable: false;
275
+ initial: Defaults["intensity"];
276
+ label: "SCENES.ENVIRONMENT.Intensity";
277
+ hint: "SCENES.ENVIRONMENT.IntensityHint";
278
+ }>;
279
+
280
+ /**
281
+ * The luminosity.
282
+ * @defaultValue `0` in `environment.base`, `0.25` in `environment.dark`
283
+ */
284
+ luminosity: fields.NumberField<{
285
+ required: true;
286
+ nullable: false;
287
+ initial: Defaults["luminosity"];
288
+ min: -1;
289
+ max: 1;
290
+ label: "SCENES.ENVIRONMENT.Luminosity";
291
+ hint: "SCENES.ENVIRONMENT.LuminosityHint";
292
+ }>;
293
+
294
+ /**
295
+ * The saturation.
296
+ * @defaultValue `0`
297
+ */
298
+ saturation: fields.NumberField<{
299
+ required: true;
300
+ nullable: false;
301
+ initial: Defaults["saturation"];
302
+ min: -1;
303
+ max: 1;
304
+ label: "SCENES.ENVIRONMENT.Saturation";
305
+ hint: "SCENES.ENVIRONMENT.SaturationHint";
306
+ }>;
307
+
308
+ /**
309
+ * The strength of the shadows.
310
+ * @defaultValue `0`
311
+ */
312
+ shadows: fields.NumberField<{
313
+ required: true;
314
+ nullable: false;
315
+ initial: Defaults["shadows"];
316
+ min: 0;
317
+ max: 1;
318
+ label: "SCENES.ENVIRONMENT.Shadows";
319
+ hint: "SCENES.ENVIRONMENT.ShadowsHint";
320
+ }>;
321
+ }
322
+
247
323
  /**
248
324
  * The schema for {@link Scene | `Scene`}. This is the source of truth for how an Scene document
249
325
  * must be structured.
@@ -263,9 +339,9 @@ declare global {
263
339
 
264
340
  /**
265
341
  * The name of this scene
266
- * @defaultValue `""`
267
342
  */
268
- name: fields.StringField<{ required: true; blank: false; textSearch: true }>;
343
+ // FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
344
+ name: fields.StringField<{ required: true; blank: false; textSearch: true }, string>;
269
345
 
270
346
  /**
271
347
  * Is this scene currently active? Only one scene may be active at a given time
@@ -293,7 +369,7 @@ declare global {
293
369
 
294
370
  /**
295
371
  * An image or video file that provides the background texture for the scene.
296
- * @defaultValue see {@link TextureData | `TextureData`}
372
+ * @defaultValue see {@linkcode TextureData}
297
373
  */
298
374
  background: TextureData;
299
375
 
@@ -306,6 +382,9 @@ declare global {
306
382
  /**
307
383
  * The elevation of the foreground layer where overhead tiles reside
308
384
  * @defaultValue `null`
385
+ * @remarks If falsey, {@link Scene.prepareBaseData | `Scene#prepareBaseData`} initializes this to `this.grid.distance * 4`, with the comment:
386
+ *
387
+ * "A temporary assumption until a more robust long-term solution when we implement Scene Levels."
309
388
  */
310
389
  foregroundElevation: fields.NumberField<{ required: false; positive: true; integer: true }>;
311
390
 
@@ -336,35 +415,46 @@ declare global {
336
415
 
337
416
  /**
338
417
  * The initial view coordinates for the scene
339
- * @defaultValue `undefined`
340
418
  */
341
419
  initial: fields.SchemaField<{
342
- x: fields.NumberField<{ integer: true; nullable: true; initial: undefined }>;
343
- y: fields.NumberField<{ integer: true; nullable: true; initial: undefined }>;
344
- scale: fields.NumberField<{ nullable: true; min: 0.25; max: 3; initial: undefined }>;
420
+ /** @defaultValue `null` */
421
+ x: fields.NumberField<{ integer: true; nullable: true }>;
422
+
423
+ /** @defaultValue `null` */
424
+ y: fields.NumberField<{ integer: true; nullable: true }>;
425
+
426
+ /** @defaultValue `0.5` */
427
+ scale: fields.NumberField<{ nullable: true; min: 0.25; max: 3; initial: 0.5 }>;
345
428
  }>;
346
429
 
347
430
  /**
348
431
  * The color of the canvas displayed behind the scene background
349
432
  * @defaultValue `"#999999"`
350
433
  */
351
- backgroundColor: fields.ColorField<{ initial: "#999999" }>;
434
+ backgroundColor: fields.ColorField<{ nullable: false; initial: "#999999" }>;
352
435
 
353
436
  /**
354
437
  * Grid configuration for the scene
355
438
  * @defaultValue see properties
439
+ * @remarks Initialized in {@link Scene.prepareBaseData | `Scene#prepareBaseData`} to `Scene.#getGrid(this)`, which returns {@linkcode BaseGrid} or a subclass
356
440
  */
357
441
  grid: fields.SchemaField<{
358
442
  /**
359
443
  * The type of grid, a number from CONST.GRID_TYPES.
360
- * @defaultValue `CONST.GRID_TYPES.SQUARE`
444
+ * @defaultValue `game.system.grid.type`
361
445
  */
362
- type: fields.NumberField<{
363
- required: true;
364
- choices: CONST.GRID_TYPES[];
365
- initial: typeof CONST.GRID_TYPES.SQUARE;
366
- validationError: "must be a value in CONST.GRID_TYPES";
367
- }>;
446
+ type: fields.NumberField<
447
+ {
448
+ required: true;
449
+ choices: CONST.GRID_TYPES[];
450
+ initial: () => CONST.GRID_TYPES;
451
+ validationError: "must be a value in CONST.GRID_TYPES";
452
+ },
453
+ // FIXME: overrides required to enforce branded type
454
+ CONST.GRID_TYPES | null | undefined,
455
+ CONST.GRID_TYPES,
456
+ CONST.GRID_TYPES
457
+ >;
368
458
 
369
459
  /**
370
460
  * The grid size which represents the width (or height) of a single grid space.
@@ -379,6 +469,19 @@ declare global {
379
469
  validationError: `must be an integer number of pixels, ${typeof CONST.GRID_MIN_SIZE} or greater`;
380
470
  }>;
381
471
 
472
+ /**
473
+ * @remarks The style of grid line used. This field has no special validation, but provided values
474
+ * should match keys of {@linkcode CONFIG.Canvas.gridStyles}
475
+ * @defaultValue `"solidLines"`
476
+ */
477
+ style: fields.StringField<{ required: true; blank: false; initial: "solidLines" }>;
478
+
479
+ /**
480
+ * @remarks The width of drawn grid lines
481
+ * @defaultValue `1`
482
+ */
483
+ thickness: fields.NumberField<{ required: true; nullable: false; positive: true; integer: true; initial: 1 }>;
484
+
382
485
  /**
383
486
  * A string representing the color used to render the grid lines.
384
487
  * @defaultValue `"#000000"`
@@ -393,15 +496,15 @@ declare global {
393
496
 
394
497
  /**
395
498
  * The number of distance units which are represented by a single grid space.
396
- * @defaultValue `game.system.gridDistance || 1`
499
+ * @defaultValue `game.system.grid.distance`
397
500
  */
398
501
  distance: fields.NumberField<{ required: true; nullable: false; positive: true; initial: () => number }>;
399
502
 
400
503
  /**
401
504
  * A label for the units of measure which are used for grid distance.
402
- * @defaultValue `game.system.gridUnits ?? ""`
505
+ * @defaultValue `game.system.grid.units`
403
506
  */
404
- units: fields.StringField<{ initial: () => string }>;
507
+ units: fields.StringField<{ required: true; initial: () => string }>;
405
508
  }>;
406
509
 
407
510
  /**
@@ -411,55 +514,146 @@ declare global {
411
514
  tokenVision: fields.BooleanField<{ initial: true }>;
412
515
 
413
516
  /**
414
- * Is a global source of illumination present which provides dim light to all
415
- * areas of the Scene?
416
- * @defaultValue `true`
517
+ * @remarks Fog data for this scene
417
518
  */
418
- fogExploration: fields.BooleanField<{ initial: true }>;
519
+ fog: fields.SchemaField<{
520
+ /**
521
+ * Should fog exploration progress be tracked for this Scene?
522
+ * @defaultValue `true`
523
+ */
524
+ exploration: fields.BooleanField<{ initial: true }>;
419
525
 
420
- /**
421
- * The ambient darkness level in this Scene, where 0 represents midday
422
- * (maximum illumination) and 1 represents midnight (maximum darkness)
423
- * @defaultValue `Date.now`
424
- */
425
- fogReset: fields.NumberField<{ nullable: false; initial: number }>;
526
+ /**
527
+ * The timestamp at which fog of war was last reset for this Scene.
528
+ * @defaultValue `undefined`
529
+ */
530
+ reset: fields.NumberField<{ required: false; initial: undefined }>;
426
531
 
427
- /**
428
- * A darkness threshold between 0 and 1. When the Scene darkness level
429
- * exceeds this threshold Global Illumination is automatically disabled
430
- * @defaultValue `false`
431
- */
432
- globalLight: fields.BooleanField;
532
+ /**
533
+ * A special overlay image or video texture which is used for fog of war
534
+ * @defaultValue `null`
535
+ */
536
+ overlay: fields.FilePathField<{ categories: ["IMAGE", "VIDEO"] }>;
537
+
538
+ colors: fields.SchemaField<{
539
+ /**
540
+ * A color tint applied to explored regions of fog of war
541
+ * @defaultValue `null`
542
+ */
543
+ explored: fields.ColorField<{ label: "SCENES.FogExploredColor" }>;
544
+
545
+ /**
546
+ * A color tint applied to unexplored regions of fog of war
547
+ * @defaultValue `null`
548
+ */
549
+ unexplored: fields.ColorField<{ label: "SCENES.FogUnexploredColor" }>;
550
+ }>;
551
+ }>;
433
552
 
434
553
  /**
435
- * Should fog exploration progress be tracked for this Scene?
436
- * @defaultValue `null`
554
+ * The environment data applied to the Scene.
437
555
  */
438
- globalLightThreshold: fields.AlphaField<{ nullable: true; initial: null }>;
556
+ environment: fields.SchemaField<{
557
+ /**
558
+ * The environment darkness level.
559
+ * @defaultValue `0`
560
+ */
561
+ darknessLevel: fields.AlphaField<{ initial: 0 }>;
439
562
 
440
- /**
441
- * The timestamp at which fog of war was last reset for this Scene.
442
- * @defaultValue `0`
443
- */
444
- darkness: fields.AlphaField<{ initial: 0 }>;
563
+ /**
564
+ * The darkness level lock state.
565
+ * @defaultValue `false`
566
+ */
567
+ darknessLock: fields.BooleanField<{ initial: false }>;
445
568
 
446
- /**
447
- * A special overlay image or video texture which is used for fog of war
448
- * @defaultValue `null`
449
- */
450
- fogOverlay: fields.FilePathField<{ categories: ("IMAGE" | "VIDEO")[] }>;
569
+ /**
570
+ * The global light data configuration.
571
+ */
572
+ globalLight: fields.SchemaField<{
573
+ /**
574
+ * Is the global light enabled?
575
+ * @defaultValue `false`
576
+ */
577
+ enabled: fields.BooleanField<{ required: true; initial: false }>;
578
+
579
+ /**
580
+ * @see {@linkcode foundry.data.LightData.Schema.alpha}
581
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
582
+ */
583
+ alpha: LightData.Schema["alpha"];
584
+
585
+ /**
586
+ * Is the global light in bright mode?
587
+ * @defaultValue `false`
588
+ * @remarks This is `boolean` here instead {@linkcode foundry.data.LightData} schema's `number`, because the global light has infinite range
589
+ */
590
+ bright: fields.BooleanField<{ required: true; initial: false }>;
591
+
592
+ /**
593
+ * @see {@linkcode foundry.data.LightData.Schema.color}
594
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
595
+ */
596
+ color: LightData.Schema["color"];
597
+
598
+ /**
599
+ * @see {@linkcode foundry.data.LightData.Schema.coloration}
600
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
601
+ */
602
+ coloration: LightData.Schema["coloration"];
603
+
604
+ /**
605
+ * The luminosity applied in the shader
606
+ * @defaultValue `0`
607
+ * @remarks Doesn't pull from the {@linkcode foundry.data.LightData} schema, unlike its siblings, as it has a different `initial`
608
+ */
609
+ luminosity: fields.NumberField<{ required: true; nullable: false; initial: 0; min: 0; max: 1 }>;
610
+
611
+ /**
612
+ * @see {@linkcode foundry.data.LightData.Schema.saturation}
613
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
614
+ */
615
+ saturation: LightData.Schema["saturation"];
616
+
617
+ /**
618
+ * @see {@linkcode foundry.data.LightData.Schema.contrast}
619
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
620
+ */
621
+ contrast: LightData.Schema["contrast"];
622
+
623
+ /**
624
+ * @see {@linkcode foundry.data.LightData.Schema.shadows}
625
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
626
+ */
627
+ shadows: LightData.Schema["shadows"];
628
+
629
+ /**
630
+ * @see {@linkcode foundry.data.LightData.Schema.darkness}
631
+ * @privateRemarks The field is defined in Foundry by pulling from the {@linkcode foundry.data.LightData} schema
632
+ */
633
+ darkness: LightData.Schema["darkness"];
634
+ }>;
451
635
 
452
- /**
453
- * A color tint applied to explored regions of fog of war
454
- * @defaultValue `null`
455
- */
456
- fogExploredColor: fields.ColorField<{ label: "SCENES.FogExploredColor" }>;
636
+ /**
637
+ * If cycling between Night and Day is activated.
638
+ * @defaultValue `true`
639
+ */
640
+ cycle: fields.BooleanField<{ initial: true }>;
457
641
 
458
- /**
459
- * A color tint applied to unexplored regions of fog of war
460
- * @defaultValue `null`
461
- */
462
- fogUnexploredColor: fields.ColorField<{ label: "SCENES.FogUnexploredColor" }>;
642
+ /**
643
+ * The base (darkness level 0) ambience lighting data.
644
+ */
645
+ base: fields.SchemaField<
646
+ EnvironmentDataSchema<{ hue: 0; intensity: 0; luminosity: 0; saturation: 0; shadows: 0 }>
647
+ >;
648
+
649
+ /**
650
+ * The dark (darkness level 1) ambience lighting data.
651
+ * @privateRemarks The `hue` default is actually `257/360` but you can't do division in types. This precision should be more than sufficient.
652
+ */
653
+ dark: fields.SchemaField<
654
+ EnvironmentDataSchema<{ hue: 0.71388889; intensity: 0; luminosity: -0.25; saturation: 0; shadows: 0 }>
655
+ >;
656
+ }>;
463
657
 
464
658
  /**
465
659
  * A collection of embedded Drawing objects.
@@ -516,8 +710,7 @@ declare global {
516
710
  walls: fields.EmbeddedCollectionField<typeof documents.BaseWall, Scene.Implementation>;
517
711
 
518
712
  /**
519
- * A linked Playlist document which should begin automatically playing when this
520
- * Scene becomes active.
713
+ * A linked Playlist document which should begin automatically playing when this Scene becomes active.
521
714
  * @defaultValue `null`
522
715
  */
523
716
  playlist: fields.ForeignDocumentField<typeof documents.BasePlaylist>;
@@ -526,6 +719,9 @@ declare global {
526
719
  * A linked PlaylistSound document from the selected playlist that will
527
720
  * begin automatically playing when this Scene becomes active
528
721
  * @defaultValue `null`
722
+ * @remarks This is `idOnly` because {@link fields.ForeignDocumentField | `ForeignDocumentField`} doesn't know how to get embedded documents;
723
+ * {@link Scene.prepareBaseData | `Scene#prepareBaseData`} attempts to `get()` this ID from the provided `playlist`, if any, making this
724
+ * `PlaylistSound.Implementation | undefined | null` at runtime
529
725
  */
530
726
  playlistSound: fields.ForeignDocumentField<typeof documents.BasePlaylistSound, { idOnly: true }>;
531
727
 
@@ -545,7 +741,7 @@ declare global {
545
741
  * A named weather effect which should be rendered in this Scene.
546
742
  * @defaultValue `""`
547
743
  */
548
- weather: fields.StringField;
744
+ weather: fields.StringField<{ required: true }>;
549
745
 
550
746
  /**
551
747
  * The _id of a Folder which contains this Actor
@@ -569,7 +765,7 @@ declare global {
569
765
  * An object of optional key/value flags
570
766
  * @defaultValue `{}`
571
767
  */
572
- flags: fields.ObjectField.FlagsField<"Scene">;
768
+ flags: fields.ObjectField.FlagsField<Name>;
573
769
 
574
770
  /**
575
771
  * An object of creation and access information
@@ -869,24 +1065,29 @@ declare global {
869
1065
 
870
1066
  /**
871
1067
  * Track whether the scene is the active view
1068
+ * @defaultValue `this.active`
872
1069
  */
873
- protected _view: this["active"];
1070
+ protected _view: boolean;
874
1071
 
875
1072
  /**
876
1073
  * The grid instance
1074
+ * @remarks Foundry initializes this to `this.grid` in the class body, which before data prep is the data from the `grid` SchemaField.
1075
+ *
1076
+ * This gets set to {@linkcode BaseGrid} or a subclass in {@link Scene.prepareBaseData | `Scene#prepareBaseData`}
877
1077
  */
878
- grid: foundry.grid.BaseGrid;
1078
+ grid: foundry.grid.BaseGrid | foundry.documents.BaseScene["grid"];
879
1079
 
880
1080
  /**
881
1081
  * Determine the canvas dimensions this Scene would occupy, if rendered
882
1082
  * @defaultValue `{}`
1083
+ * @remarks Technically `undefined` prior to the first time {@link Scene.prepareBaseData | `Scene#prepareBaseData`} is called
883
1084
  */
884
- dimensions: ReturnType<this["getDimensions"]>;
1085
+ dimensions: Scene.Dimensions;
885
1086
 
886
1087
  /**
887
1088
  * Provide a thumbnail image path used to represent this document.
888
1089
  */
889
- get thumbnail(): this["thumb"];
1090
+ get thumbnail(): string | null;
890
1091
 
891
1092
  /**
892
1093
  * A convenience accessor for whether the Scene is currently viewed
@@ -901,20 +1102,35 @@ declare global {
901
1102
 
902
1103
  /**
903
1104
  * Set this scene as the current view
1105
+ * @remarks If `canvas.loading`, returns a `ui.notifications.warn`, thence the `| number` in the return type
904
1106
  */
905
- view(): Promise<this | undefined>;
1107
+ view(): Promise<this | number>;
906
1108
 
907
1109
  /**
908
1110
  * @param createData - (default: `{}`)
909
1111
  * @param options - (default: `{}`)
910
1112
  */
911
- override clone<Save extends boolean = false>(
912
- createData?: Scene.CreateData,
913
- context?: Document.CloneContext<Save> & InexactPartial<Document.ConstructionContext<Scene.Parent>>,
1113
+ // data: not null (property access), context: not null (destructured)
1114
+ override clone<Save extends boolean | null | undefined = false>(
1115
+ data?: Scene.CreateData,
1116
+ context?: Document.CloneContext<Save>,
914
1117
  ): Save extends true ? Promise<this> : this;
915
1118
 
916
1119
  override reset(): void;
917
1120
 
1121
+ /**
1122
+ * @remarks If `source` is falsey, and the grid is hexagonal with the `legacyHex` flag set,
1123
+ * does some conversion on `object.grid.size` (leaving it numeric, no type change) before returning
1124
+ */
1125
+ override toObject(source?: boolean | null): fields.SchemaField.SourceData<Scene.Schema>;
1126
+
1127
+ /**
1128
+ * @remarks
1129
+ * - Transforms `this.grid` from source data to a {@linkcode BaseGrid} (or subclass) instance
1130
+ * - Sets `this.dimensions` to `this.getDimensions()`
1131
+ * - If a `playlist` is set, attempts to initialize `this.playlistSound` to a Document reference (it's an `idOnly` field in the schema)
1132
+ * - Sets `this.foregroundElevation` to `this.grid.distance * 4` if its otherwise falsey
1133
+ */
918
1134
  override prepareBaseData(): void;
919
1135
 
920
1136
  /**
@@ -924,27 +1140,27 @@ declare global {
924
1140
  */
925
1141
  getDimensions(): Scene.Dimensions;
926
1142
 
927
- override _onClickDocumentLink(event: MouseEvent): unknown;
1143
+ /** @remarks If the scene has a `journal`, forwards to that journal's `#_onClickDocumentLink` */
1144
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
928
1145
 
929
- /**
930
- * @privateRemarks _onCreate, _preUpdate, _onUpdate, _preDelete, and _onDelete are all overridden but with no signature changes.
931
- * For type simplicity they are left off. These methods historically have been the source of a large amount of computation from tsc.
932
- */
1146
+ // _preCreate, _preCreateOperation, _onCreate, and _preUpdate, _onUpdate, _preDelete, and _onDelete are all overridden but with no signature changes.
1147
+ // For type simplicity they are left off. These methods historically have been the source of a large amount of computation from tsc.
933
1148
 
934
1149
  /**
935
1150
  * Handle repositioning of placed objects when the Scene dimensions change
1151
+ * @private
936
1152
  */
937
- protected _repositionObject(sceneUpdateData: Scene.CreateData): Scene.CreateData;
1153
+ protected _repositionObject(sceneUpdateData: Scene.UpdateData): Scene.UpdateData;
938
1154
 
939
1155
  /**
940
1156
  * Handle Scene activation workflow if the active state is changed to true
941
1157
  * @param active - Is the scene now active?
942
1158
  */
943
- protected _onActivate(active: boolean): ReturnType<this["view"]> | ReturnType<Canvas["draw"]>;
1159
+ protected _onActivate(active: boolean): Promise<this | Canvas>;
944
1160
 
945
1161
  /**
946
1162
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
947
- * this method must be overriden like so:
1163
+ * this method must be overridden like so:
948
1164
  * ```typescript
949
1165
  * class SwadeScene extends Scene {
950
1166
  * protected override _preCreateDescendantDocuments(...args: Scene.PreCreateDescendantDocumentsArgs) {
@@ -962,7 +1178,7 @@ declare global {
962
1178
 
963
1179
  /**
964
1180
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
965
- * this method must be overriden like so:
1181
+ * this method must be overridden like so:
966
1182
  * ```typescript
967
1183
  * class LancerScene extends Scene {
968
1184
  * protected override _preUpdateDescendantDocuments(...args: Scene.OnUpdateDescendantDocuments) {
@@ -980,7 +1196,7 @@ declare global {
980
1196
 
981
1197
  /**
982
1198
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
983
- * this method must be overriden like so:
1199
+ * this method must be overridden like so:
984
1200
  * ```typescript
985
1201
  * class Ptr2eScene extends Scene {
986
1202
  * protected override _onUpdateDescendantDocuments(...args: Scene.OnUpdateDescendantDocumentsArgs) {
@@ -998,7 +1214,7 @@ declare global {
998
1214
 
999
1215
  /**
1000
1216
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
1001
- * this method must be overriden like so:
1217
+ * this method must be overridden like so:
1002
1218
  * ```typescript
1003
1219
  * class KultScene extends Scene {
1004
1220
  * protected override _preDeleteDescendantDocuments(...args: Scene.PreDeleteDescendantDocumentsArgs) {
@@ -1014,7 +1230,8 @@ declare global {
1014
1230
  */
1015
1231
  protected override _preDeleteDescendantDocuments(...args: Scene.PreDeleteDescendantDocumentsArgs): void;
1016
1232
 
1017
- toCompendium<Options extends ClientDocument.ToCompendiumOptions>(
1233
+ // options: not null (parameter default only, destructured in super)
1234
+ override toCompendium<Options extends ClientDocument.ToCompendiumOptions | undefined = undefined>(
1018
1235
  pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
1019
1236
  options?: Options,
1020
1237
  ): ClientDocument.ToCompendiumReturnType<foundry.documents.BaseScene, Options>;
@@ -1024,6 +1241,7 @@ declare global {
1024
1241
  * @param data - (default: `{}`)
1025
1242
  * @returns The created thumbnail data.
1026
1243
  */
1244
+ // data: not null (destructured)
1027
1245
  createThumbnail(data?: Scene.ThumbnailCreationData): Promise<ImageHelper.ThumbnailReturn>;
1028
1246
 
1029
1247
  /*
@@ -1042,7 +1260,7 @@ declare global {
1042
1260
 
1043
1261
  /**
1044
1262
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
1045
- * this method must be overriden like so:
1263
+ * this method must be overridden like so:
1046
1264
  * ```typescript
1047
1265
  * class GurpsScene extends Scene {
1048
1266
  * protected override _onCreateDescendantDocuments(...args: Scene.OnCreateDescendantDocumentsArgs) {
@@ -1060,7 +1278,7 @@ declare global {
1060
1278
 
1061
1279
  /**
1062
1280
  * @remarks To make it possible for narrowing one parameter to jointly narrow other parameters
1063
- * this method must be overriden like so:
1281
+ * this method must be overridden like so:
1064
1282
  * ```typescript
1065
1283
  * class BladesScene extends Scene {
1066
1284
  * protected override _onDeleteDescendantDocuments(...args: Scene.OnUpdateDescendantDocuments) {
@@ -1076,21 +1294,24 @@ declare global {
1076
1294
  */
1077
1295
  protected override _onDeleteDescendantDocuments(...args: Scene.OnDeleteDescendantDocumentsArgs): void;
1078
1296
 
1079
- static override defaultName(context?: Document.DefaultNameContext<string, Scene.Parent>): string;
1297
+ // context: not null (destructured)
1298
+ static override defaultName(context?: Document.DefaultNameContext<"Scene", Scene.Parent>): string;
1080
1299
 
1300
+ // data: not null (parameter default only), context: not null (destructured)
1081
1301
  static override createDialog(
1082
1302
  data?: Document.CreateDialogData<Scene.CreateData>,
1083
- context?: Document.CreateDialogContext<string, Scene.Parent>,
1303
+ context?: Document.CreateDialogContext<"Scene", Scene.Parent>,
1084
1304
  ): Promise<Scene.Stored | null | undefined>;
1085
1305
 
1306
+ // options: not null (parameter default only)
1086
1307
  static override fromDropData(
1087
1308
  data: Document.DropData<Scene.Implementation>,
1088
- options?: Document.FromDropDataOptions,
1309
+ options?: AnyObject,
1089
1310
  ): Promise<Scene.Implementation | undefined>;
1090
1311
 
1091
1312
  static override fromImport(
1092
1313
  source: Scene.Source,
1093
- context?: Document.FromImportContext<Scene.Parent>,
1314
+ context?: Document.FromImportContext<Scene.Parent> | null,
1094
1315
  ): Promise<Scene.Implementation>;
1095
1316
  }
1096
1317