@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,7 +1,8 @@
1
- import type { FolderDocumentTypes, InexactPartial, FixedInstanceType, Merge } from "fvtt-types/utils";
1
+ import type { AnyObject, FolderDocumentTypes, InexactPartial, Merge, NullishProps } from "#utils";
2
2
  import type { fields } from "../../../common/data/module.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
+ import type DataModel from "#common/abstract/data.mjs";
5
6
 
6
7
  declare global {
7
8
  namespace Adventure {
@@ -102,7 +103,7 @@ declare global {
102
103
  type Collection = never;
103
104
 
104
105
  /**
105
- * An instance of `Adventure` that comes from the database but failed validation meaining that
106
+ * An instance of `Adventure` that comes from the database but failed validation meaning that
106
107
  * its `system` and `_source` could theoretically be anything.
107
108
  */
108
109
  interface Invalid extends Document.Invalid<Adventure.Implementation> {}
@@ -173,13 +174,17 @@ declare global {
173
174
  /**
174
175
  * The human-readable name of the Adventure
175
176
  */
176
- name: fields.StringField<{
177
- required: true;
178
- blank: false;
179
- label: "ADVENTURE.Name";
180
- hint: "ADVENTURE.NameHint";
181
- textSearch: true;
182
- }>;
177
+ // FIXME: required with no initial, assignment type override required
178
+ name: fields.StringField<
179
+ {
180
+ required: true;
181
+ blank: false;
182
+ label: "ADVENTURE.Name";
183
+ hint: "ADVENTURE.NameHint";
184
+ textSearch: true;
185
+ },
186
+ string
187
+ >;
183
188
 
184
189
  /**
185
190
  * The file path for the primary image of the adventure
@@ -408,21 +413,49 @@ declare global {
408
413
  type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
409
414
  }
410
415
 
411
- interface PrepareImportOptions {
416
+ type DocumentDataRecord = {
417
+ [K in ContainedDocumentType]?: Document.CreateDataForName<K>[];
418
+ };
419
+
420
+ type DocumentResult = {
421
+ [K in ContainedDocumentType]?: Document.ImplementationFor<K>[];
422
+ };
423
+
424
+ type ContainedDocumentType = Exclude<FolderDocumentTypes, "Adventure"> | "Folder";
425
+
426
+ interface ImportData {
427
+ toCreate: DocumentDataRecord;
428
+ toUpdate: DocumentDataRecord;
429
+ documentCount: number;
430
+ }
431
+
432
+ interface ImportResult {
433
+ created: DocumentResult;
434
+ updated: DocumentResult;
435
+ }
436
+
437
+ /** @internal */
438
+ type _PrepareImportOptions = InexactPartial<{
412
439
  /**
413
440
  * A subset of adventure fields to import.
441
+ * @defaultValue `[]`
442
+ * @remarks Can't be `null` as it only has a parameter default
414
443
  */
415
- // TODO: This isn't *quite* right as the keyof is including all the nevers.
416
444
  importFields: Array<keyof typeof foundry.documents.BaseAdventure.contentFields | "all">;
417
- }
445
+ }>;
418
446
 
419
- interface ImportOptions extends PrepareImportOptions {
447
+ interface PrepareImportOptions extends _PrepareImportOptions {}
448
+
449
+ /** @internal */
450
+ type _ImportOptions = NullishProps<{
420
451
  /**
421
452
  * Display a warning dialog if existing documents would be overwritten
422
453
  * @defaultValue `true`
423
454
  */
424
455
  dialog: boolean;
425
- }
456
+ }>;
457
+
458
+ interface ImportOptions extends _ImportOptions, PrepareImportOptions {}
426
459
 
427
460
  /**
428
461
  * @deprecated {@link Adventure.Database | `Adventure.DatabaseOperation`}
@@ -444,17 +477,6 @@ declare global {
444
477
  * @deprecated {@link Adventure.Implementation | `Adventure.Implementation`}
445
478
  */
446
479
  type ConfiguredInstance = Implementation;
447
-
448
- interface ImportData {
449
- toCreate?: DocumentDataRecord;
450
- toUpdate?: DocumentDataRecord;
451
- documentCount: number;
452
- }
453
-
454
- interface ImportResult {
455
- created: DocumentResult;
456
- updated: DocumentResult;
457
- }
458
480
  }
459
481
 
460
482
  /**
@@ -467,25 +489,39 @@ declare global {
467
489
  */
468
490
  constructor(...args: Adventure.ConstructorArgs);
469
491
 
492
+ /**
493
+ * @remarks If this creation is happening in a provided `pack`, and that pack is **not** system-specific,
494
+ * strips `Actor`s, `Item`s, and `Actor` and `Item` `Folders` from `source`s
495
+ */
496
+ // options: not null (parameter default only, destructured in super)
497
+ static override fromSource(
498
+ source: Adventure.CreateData,
499
+ context?: DataModel.FromSourceOptions,
500
+ ): Adventure.Implementation;
501
+
470
502
  /**
471
503
  * Perform a full import workflow of this Adventure.
472
504
  * Create new and update existing documents within the World.
473
505
  * @param options - Options which configure and customize the import process
474
506
  * @returns The import result
475
507
  */
476
- import(options?: InexactPartial<Adventure.ImportOptions>): Promise<Adventure.ImportResult>;
508
+ // options: not null (destructured)
509
+ import(options?: Adventure.ImportOptions): Promise<Adventure.ImportResult>;
477
510
 
478
511
  /**
479
512
  * Prepare Adventure data for import into the World.
480
513
  * @param options - Options passed in from the import dialog to configure the import behavior
481
514
  * @returns A subset of adventure fields to import.
482
515
  */
483
- prepareImport(options?: InexactPartial<Adventure.PrepareImportOptions>): Promise<Adventure.ImportData>;
516
+ // options: not null (destructured)
517
+ prepareImport(options?: Adventure.PrepareImportOptions): Promise<Adventure.ImportData>;
484
518
 
485
519
  /**
486
520
  * Execute an Adventure import workflow, creating and updating documents in the World.
521
+ * @remarks Despite having a parameter default, neither `data` nor any of its keys are optional, as the keys themselves have no defaults,
522
+ * and `toCreate` and `toUpdate` get passed to `Object.entries` which throws on nullish values, and `documentCount`is used as a divisor
487
523
  */
488
- importContent(data?: InexactPartial<Adventure.ImportData>): Promise<Adventure.ImportResult>;
524
+ importContent(data: Adventure.ImportData): Promise<Adventure.ImportResult>;
489
525
 
490
526
  /*
491
527
  * After this point these are not really overridden methods.
@@ -501,22 +537,27 @@ declare global {
501
537
 
502
538
  // Descendant Document operations have been left out because Adventure does not have any descendant documents.
503
539
 
504
- static override defaultName(context: Document.DefaultNameContext<"base", Adventure.Parent>): string;
540
+ // context: not null (destructured)
541
+ static override defaultName(context?: Document.DefaultNameContext<"Adventure", Adventure.Parent>): string;
505
542
 
543
+ /** @remarks `context.parent` is required as creation requires one */
506
544
  static override createDialog(
507
- data: Document.CreateDialogData<Adventure.CreateData>,
508
- context: Document.CreateDialogContext<string, Adventure.Parent>,
545
+ data: Document.CreateDialogData<Adventure.CreateData> | undefined,
546
+ context: Document.CreateDialogContext<"Adventure", Adventure.Parent>,
509
547
  ): Promise<Adventure.Stored | null | undefined>;
510
548
 
549
+ // options: not null (parameter default only)
511
550
  static override fromDropData(
512
551
  data: Document.DropData<Adventure.Implementation>,
513
- options?: Document.FromDropDataOptions,
552
+ options?: AnyObject,
514
553
  ): Promise<Adventure.Implementation | undefined>;
515
554
 
516
555
  static override fromImport(
517
556
  source: Adventure.Source,
518
- context?: Document.FromImportContext<Adventure.Parent>,
557
+ context?: Document.FromImportContext<Adventure.Parent> | null,
519
558
  ): Promise<Adventure.Implementation>;
559
+
560
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
520
561
  }
521
562
 
522
563
  /** @deprecated {@link Adventure.ImportData | `Adventure.ImportData`} */
@@ -525,15 +566,3 @@ declare global {
525
566
  /** @deprecated {@link Adventure.ImportResult | `Adventure.ImportResult`} */
526
567
  type AdventureImportResult = Adventure.ImportResult;
527
568
  }
528
-
529
- type DocumentDataRecord = {
530
- [K in AdventureDocumentTypes]?: foundry.data.fields.SchemaField.AssignmentData<
531
- ReturnType<Document.ImplementationClassFor<K>["defineSchema"]>
532
- >[];
533
- };
534
-
535
- type DocumentResult = {
536
- [K in AdventureDocumentTypes]?: FixedInstanceType<Document.ImplementationClassFor<K>>[];
537
- };
538
-
539
- type AdventureDocumentTypes = Exclude<FolderDocumentTypes, "Adventure"> | "Folder";
@@ -1,4 +1,4 @@
1
- import type { InterfaceToObject, Merge } from "../../../../utils/index.d.mts";
1
+ import type { AnyObject, InterfaceToObject, Merge } from "#utils";
2
2
  import type Document from "../../../common/abstract/document.d.mts";
3
3
  import type { DataSchema } from "../../../common/data/fields.d.mts";
4
4
  import type { fields, LightData } from "../../../common/data/module.d.mts";
@@ -101,7 +101,7 @@ declare global {
101
101
  type Collection = never;
102
102
 
103
103
  /**
104
- * An instance of `AmbientLightDocument` that comes from the database but failed validation meaining that
104
+ * An instance of `AmbientLightDocument` that comes from the database but failed validation meaning that
105
105
  * its `system` and `_source` could theoretically be anything.
106
106
  */
107
107
  interface Invalid extends Document.Invalid<AmbientLightDocument.Implementation> {}
@@ -402,9 +402,7 @@ declare global {
402
402
  */
403
403
  constructor(...args: AmbientLightDocument.ConstructorArgs);
404
404
 
405
- /**
406
- * @privateRemarks _onUpdate is overridden but with no signature changes from its implementation in BaseAmbientLight.
407
- */
405
+ // _onUpdate is overridden but with no signature changes from its implementation in BaseAmbientLight.
408
406
 
409
407
  /**
410
408
  * Is this ambient light source global in nature?
@@ -425,23 +423,28 @@ declare global {
425
423
 
426
424
  // Descendant Document operations have been left out because AmbientLight does not have any descendant documents.
427
425
 
426
+ // context: not null (destructured)
428
427
  static override defaultName(
429
- context: Document.DefaultNameContext<"base", NonNullable<AmbientLightDocument.Parent>>,
428
+ context?: Document.DefaultNameContext<"AmbientLight", NonNullable<AmbientLightDocument.Parent>>,
430
429
  ): string;
431
430
 
431
+ /** @remarks `context.parent` is required as creation requires one */
432
432
  static override createDialog(
433
- data: Document.CreateDialogData<AmbientLightDocument.CreateData>,
434
- context: Document.CreateDialogContext<string, NonNullable<AmbientLightDocument.Parent>>,
433
+ data: Document.CreateDialogData<AmbientLightDocument.CreateData> | undefined,
434
+ context: Document.CreateDialogContext<"AmbientLight", NonNullable<AmbientLightDocument.Parent>>,
435
435
  ): Promise<AmbientLightDocument.Stored | null | undefined>;
436
436
 
437
+ // options: not null (parameter default only)
437
438
  static override fromDropData(
438
439
  data: Document.DropData<AmbientLightDocument.Implementation>,
439
- options?: Document.FromDropDataOptions,
440
+ options?: AnyObject,
440
441
  ): Promise<AmbientLightDocument.Implementation | undefined>;
441
442
 
442
443
  static override fromImport(
443
444
  source: AmbientLightDocument.Source,
444
- context?: Document.FromImportContext<AmbientLightDocument.Parent>,
445
+ context?: Document.FromImportContext<AmbientLightDocument.Parent> | null,
445
446
  ): Promise<AmbientLightDocument.Implementation>;
447
+
448
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
446
449
  }
447
450
  }
@@ -1,4 +1,4 @@
1
- import type { Merge } from "../../../../utils/index.d.mts";
1
+ import type { AnyObject, Merge } from "#utils";
2
2
  import type Document from "../../../common/abstract/document.d.mts";
3
3
  import type { DataSchema } from "../../../common/data/fields.d.mts";
4
4
  import type { fields } from "../../../common/data/module.d.mts";
@@ -102,7 +102,7 @@ declare global {
102
102
  type Collection = never;
103
103
 
104
104
  /**
105
- * An instance of `AmbientSoundDocument` that comes from the database but failed validation meaining that
105
+ * An instance of `AmbientSoundDocument` that comes from the database but failed validation meaning that
106
106
  * its `system` and `_source` could theoretically be anything.
107
107
  */
108
108
  interface Invalid extends Document.Invalid<AmbientSoundDocument.Implementation> {}
@@ -467,23 +467,28 @@ declare global {
467
467
 
468
468
  // Descendant Document operations have been left out because Wall does not have any descendant documents.
469
469
 
470
+ // context: not null (destructured)
470
471
  static override defaultName(
471
- context: Document.DefaultNameContext<"base", NonNullable<AmbientSoundDocument.Parent>>,
472
+ context?: Document.DefaultNameContext<"AmbientSound", NonNullable<AmbientSoundDocument.Parent>>,
472
473
  ): string;
473
474
 
475
+ /** @remarks `context.parent` is required as creation requires one */
474
476
  static override createDialog(
475
- data: Document.CreateDialogData<AmbientSoundDocument.CreateData>,
476
- context: Document.CreateDialogContext<string, NonNullable<AmbientSoundDocument.Parent>>,
477
+ data: Document.CreateDialogData<AmbientSoundDocument.CreateData> | undefined,
478
+ context: Document.CreateDialogContext<"AmbientSound", NonNullable<AmbientSoundDocument.Parent>>,
477
479
  ): Promise<AmbientSoundDocument.Stored | null | undefined>;
478
480
 
481
+ // options: not null (parameter default only)
479
482
  static override fromDropData(
480
483
  data: Document.DropData<AmbientSoundDocument.Implementation>,
481
- options?: Document.FromDropDataOptions,
484
+ options?: AnyObject,
482
485
  ): Promise<AmbientSoundDocument.Implementation | undefined>;
483
486
 
484
487
  static override fromImport(
485
488
  source: AmbientSoundDocument.Source,
486
- context?: Document.FromImportContext<AmbientSoundDocument.Parent>,
489
+ context?: Document.FromImportContext<AmbientSoundDocument.Parent> | null,
487
490
  ): Promise<AmbientSoundDocument.Implementation>;
491
+
492
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
488
493
  }
489
494
  }
@@ -1,5 +1,5 @@
1
1
  import type { ConfiguredCard } from "../../../../configuration/index.d.mts";
2
- import type { DeepPartial, Merge } from "fvtt-types/utils";
2
+ import type { AnyObject, DeepPartial, Merge } 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";
@@ -162,7 +162,7 @@ declare global {
162
162
  type Collection = never;
163
163
 
164
164
  /**
165
- * An instance of `Card` that comes from the database but failed validation meaining that
165
+ * An instance of `Card` that comes from the database but failed validation meaning that
166
166
  * its `system` and `_source` could theoretically be anything.
167
167
  */
168
168
  interface Invalid<out SubType extends Card.SubType = Card.SubType> extends Document.Invalid<OfType<SubType>> {}
@@ -231,7 +231,8 @@ declare global {
231
231
  _id: fields.DocumentIdField;
232
232
 
233
233
  /** The text name of this card */
234
- name: fields.StringField<{ required: true; blank: false; label: "CARD.Name" }>;
234
+ // FIXME: This field is `required` with no `initial`, so actually required for construction; Currently an AssignmentType override is required to enforce this
235
+ name: fields.StringField<{ required: true; blank: false; label: "CARD.Name" }, string>;
235
236
 
236
237
  /**
237
238
  * A text description of this card which applies to all faces
@@ -241,14 +242,9 @@ declare global {
241
242
 
242
243
  /**
243
244
  * A category of card (for example, a suit) to which this card belongs
244
- * @defaultValue `BaseCard.TYPES[0]`
245
+ * @defaultValue `"base"`
245
246
  */
246
- type: fields.DocumentTypeField<
247
- typeof BaseCard,
248
- {
249
- initial: typeof foundry.CONST.BASE_DOCUMENT_TYPE;
250
- }
251
- >;
247
+ type: fields.DocumentTypeField<typeof BaseCard, { initial: typeof CONST.BASE_DOCUMENT_TYPE }>;
252
248
 
253
249
  /**
254
250
  * Game system data which is defined by the system template.json model
@@ -258,7 +254,7 @@ declare global {
258
254
 
259
255
  /**
260
256
  * An optional suit designation which is used by default sorting
261
- * @defaultValue `""`
257
+ * @defaultValue `undefined`
262
258
  */
263
259
  suit: fields.StringField<{ label: "CARD.Suit" }>;
264
260
 
@@ -270,12 +266,11 @@ declare global {
270
266
 
271
267
  /**
272
268
  * An object of face data which describes the back of this card
273
- * @defaultValue see properties
274
269
  */
275
270
  back: fields.SchemaField<{
276
271
  /**
277
272
  * A name for this card face
278
- * @defaultValue `""`
273
+ * @defaultValue `undefined`
279
274
  */
280
275
  name: fields.StringField<{ label: "CARD.BackName" }>;
281
276
 
@@ -292,6 +287,10 @@ declare global {
292
287
  img: fields.FilePathField<{ categories: ["IMAGE", "VIDEO"]; label: "CARD.BackImage" }>;
293
288
  }>;
294
289
 
290
+ /**
291
+ * An array of face data which represent displayable faces of this card
292
+ * @defaultValue `[]`
293
+ */
295
294
  faces: fields.ArrayField<fields.SchemaField<Card.FaceSchema>>;
296
295
 
297
296
  /**
@@ -348,7 +347,7 @@ declare global {
348
347
  interface FaceSchema extends DataSchema {
349
348
  /**
350
349
  * A name for this card face
351
- * @defaultValue `""`
350
+ * @defaultValue `undefined`
352
351
  */
353
352
  name: fields.StringField<{ label: "CARD.FaceName" }>;
354
353
 
@@ -493,6 +492,21 @@ declare global {
493
492
  type Get<Scope extends Flags.Scope, Key extends Flags.Key<Scope>> = Document.GetFlag<Name, Scope, Key>;
494
493
  }
495
494
 
495
+ /**
496
+ * @remarks {@link Card.pass | `Card#pass`} calls {@link Cards.pass | `this.parent.pass`} with `action: "pass"` provided
497
+ */
498
+ interface PassOptions extends Omit<Cards.PassOptions, "action"> {}
499
+
500
+ /**
501
+ * @remarks {@link Card.play | `Card#play`} calls {@link Cards.pass | `this.parent.pass`} with `action: "play"` provided
502
+ */
503
+ interface PlayOptions extends PassOptions {}
504
+
505
+ /**
506
+ * @remarks {@link Card.discard | `Card#discard`} calls {@link Cards.pass | `this.parent.pass`} with `action: "discard"` provided
507
+ */
508
+ interface DiscardOptions extends PassOptions {}
509
+
496
510
  /**
497
511
  * @deprecated {@link Card.Database | `Card.DatabaseOperation`}
498
512
  */
@@ -541,13 +555,14 @@ declare global {
541
555
 
542
556
  /**
543
557
  * The image of the currently displayed card face or back
558
+ * @remarks Falls back to {@linkcode Card.DEFAULT_ICON}
544
559
  */
545
560
  get img(): string;
546
561
 
547
562
  /**
548
563
  * A reference to the source Cards document which defines this Card.
549
564
  */
550
- get source(): Cards.Implementation | undefined | null;
565
+ get source(): Cards.Implementation | null;
551
566
 
552
567
  /**
553
568
  * A convenience property for whether or not the Card is within its source Cards stack. Cards in decks are always
@@ -570,6 +585,7 @@ declare global {
570
585
  */
571
586
  get hasPreviousFace(): boolean;
572
587
 
588
+ /** @remarks Provides fallback value for `back.img`, and overrides `name` with the face/back's name if appropriate */
573
589
  override prepareDerivedData(): void;
574
590
 
575
591
  /**
@@ -584,39 +600,41 @@ declare global {
584
600
  /**
585
601
  * Pass this Card to some other Cards document.
586
602
  * @param to - A new Cards document this card should be passed to
587
- * @param options - (default: `{}`)
603
+ * @param options - Options which modify the pass operation (default: `{}`)
588
604
  * @returns A reference to this card after the it has been passed to another parent document
589
605
  */
590
- pass(to: Cards.Implementation, options?: Cards.PassOptions): Promise<Card.Implementation | undefined>;
606
+ // options: not null (destructured)
607
+ pass(to: Cards.Implementation, options?: Card.PassOptions): Promise<Card.Implementation | undefined>;
591
608
 
592
609
  /**
593
610
  * Play a specific card to some other Cards document.
594
- * This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
595
611
  * @see {@link Card.pass | `Card#pass`}
612
+ * @remarks This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
596
613
  */
597
- play(to: Cards.Implementation, options?: Cards.PassOptions): Promise<Card.Implementation | undefined>;
614
+ // options: not null (destructured)
615
+ play(to: Cards.Implementation, options?: Card.PlayOptions): Promise<Card.Implementation | undefined>;
598
616
 
599
617
  /**
600
618
  * Discard a specific card to some other Cards document.
601
- * This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
602
619
  * @see {@link Card.pass | `Card#pass`}
620
+ * @remarks This method is currently a more semantic alias for {@link Card.pass | `Card#pass`}.
603
621
  */
604
- discard(to: Cards.Implementation, options?: Cards.PassOptions): Promise<Card.Implementation | undefined>;
622
+ // options: not null (destructured)
623
+ discard(to: Cards.Implementation, options?: Card.DiscardOptions): Promise<Card.Implementation | undefined>;
605
624
 
606
625
  /**
607
626
  * Recall this Card to its original Cards parent.
608
- * @param options - Options which modify the recall operation
609
- * (default: `{}`)
610
- * @returns A reference to the recallled card belonging to its original parent
627
+ * @param options - Options which modify the recall operation (default: `{}`)
628
+ * @returns A reference to the recalled card belonging to its original parent
629
+ * @remarks Core's implementation doesn't use `options` at all
611
630
  */
612
- recall(options?: Cards.ResetOptions): Promise<Card.Implementation>;
631
+ // options: not null (parameter default only)
632
+ recall(options?: AnyObject): Promise<Card.Implementation | undefined>;
613
633
 
614
634
  /**
615
635
  * Create a chat message which displays this Card.
616
- * @param messageData - Additional data which becomes part of the created ChatMessageData
617
- * (default: `{}`)
618
- * @param options - Options which modify the message creation operation
619
- * (default: `{}`)
636
+ * @param messageData - Additional data which becomes part of the created ChatMessageData (default: `{}`)
637
+ * @param options - Options which modify the message creation operation (default: `{}`)
620
638
  * @returns The created chat message
621
639
  */
622
640
  toMessage<Temporary extends boolean | undefined = false>(
@@ -638,21 +656,26 @@ declare global {
638
656
 
639
657
  // Descendant Document operations have been left out because Card does not have any descendant documents.
640
658
 
641
- static override defaultName(context: Document.DefaultNameContext<Card.SubType, NonNullable<Card.Parent>>): string;
659
+ // context: not null (destructured)
660
+ static override defaultName(context?: Document.DefaultNameContext<"Card", NonNullable<Card.Parent>>): string;
642
661
 
662
+ /** @remarks `context.parent` is required as creation requires one */
643
663
  static override createDialog(
644
- data: Document.CreateDialogData<Card.CreateData>,
645
- context: Document.CreateDialogContext<Card.SubType, NonNullable<Card.Parent>>,
664
+ data: Document.CreateDialogData<Card.CreateData> | undefined,
665
+ context: Document.CreateDialogContext<"Card", NonNullable<Card.Parent>>,
646
666
  ): Promise<Card.Stored | null | undefined>;
647
667
 
668
+ // options: not null (parameter default only)
648
669
  static override fromDropData(
649
670
  data: Document.DropData<Card.Implementation>,
650
- options?: Document.FromDropDataOptions,
671
+ options?: AnyObject,
651
672
  ): Promise<Card.Implementation | undefined>;
652
673
 
653
674
  static override fromImport(
654
675
  source: Card.Source,
655
- context?: Document.FromImportContext<Card.Parent>,
676
+ context?: Document.FromImportContext<Card.Parent> | null,
656
677
  ): Promise<Card.Implementation>;
678
+
679
+ override _onClickDocumentLink(event: MouseEvent): ClientDocument.OnClickDocumentLinkReturn;
657
680
  }
658
681
  }