@league-of-foundry-developers/foundry-vtt-types 9.280.1 → 12.331.2-beta

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 (1000) hide show
  1. package/README.md +37 -20
  2. package/index-lenient.d.mts +7 -0
  3. package/index.d.mts +5 -0
  4. package/package.json +67 -39
  5. package/src/foundry/client/apps/app.d.mts +602 -0
  6. package/src/foundry/client/apps/av/av-config.d.mts +93 -0
  7. package/src/foundry/client/apps/av/cameras.d.mts +189 -0
  8. package/src/foundry/client/apps/av/index.d.mts +3 -0
  9. package/src/foundry/client/apps/dialogs/folder-export.d.mts +16 -0
  10. package/src/foundry/client/apps/dialogs/index.d.mts +1 -0
  11. package/src/foundry/client/apps/form.d.mts +484 -0
  12. package/src/foundry/client/apps/forms/actor.d.mts +176 -0
  13. package/src/foundry/client/apps/forms/adventure-exporter.d.mts +132 -0
  14. package/src/foundry/client/apps/forms/adventure-importer.d.mts +85 -0
  15. package/src/foundry/client/apps/forms/base-sheet.d.mts +45 -0
  16. package/src/foundry/client/apps/forms/card-config.d.mts +48 -0
  17. package/src/foundry/client/apps/forms/cards-config.d.mts +141 -0
  18. package/src/foundry/client/apps/forms/combat-config.d.mts +51 -0
  19. package/src/foundry/client/apps/forms/combatant-config.d.mts +45 -0
  20. package/src/foundry/client/apps/forms/default-sheets-config.d.mts +46 -0
  21. package/src/foundry/client/apps/forms/effect-config.d.mts +77 -0
  22. package/src/foundry/client/apps/forms/folder-config.d.mts +60 -0
  23. package/src/foundry/client/apps/forms/fonts.d.mts +168 -0
  24. package/src/foundry/client/apps/forms/grid-config.d.mts +144 -0
  25. package/src/foundry/client/apps/forms/image-popout.d.mts +179 -0
  26. package/src/foundry/client/apps/forms/index.d.mts +26 -0
  27. package/src/foundry/client/apps/forms/item.d.mts +58 -0
  28. package/src/foundry/client/apps/forms/journal-page-sheet.d.mts +313 -0
  29. package/src/foundry/client/apps/forms/journal-sheet.d.mts +312 -0
  30. package/src/foundry/client/apps/forms/macro-config.d.mts +59 -0
  31. package/src/foundry/client/apps/forms/measure-template.d.mts +59 -0
  32. package/src/foundry/client/apps/forms/ownership.d.mts +66 -0
  33. package/src/foundry/client/apps/forms/playlist-config.d.mts +46 -0
  34. package/src/foundry/client/apps/forms/playlist-sound-config.d.mts +63 -0
  35. package/src/foundry/client/apps/forms/roll-table-config.d.mts +160 -0
  36. package/src/foundry/client/apps/forms/scene-config.d.mts +157 -0
  37. package/src/foundry/client/apps/forms/sheet-config.d.mts +203 -0
  38. package/src/foundry/client/apps/forms/user-config.d.mts +71 -0
  39. package/src/foundry/client/apps/hud/chatbubble.d.mts +113 -0
  40. package/src/foundry/client/apps/hud/container.d.mts +54 -0
  41. package/src/foundry/client/apps/hud/controls.d.mts +166 -0
  42. package/src/foundry/client/apps/hud/hotbar.d.mts +169 -0
  43. package/src/foundry/client/apps/hud/hud.d.mts +87 -0
  44. package/src/foundry/client/apps/hud/index.d.mts +9 -0
  45. package/src/foundry/client/apps/hud/menu.d.mts +77 -0
  46. package/src/foundry/client/apps/hud/navigation.d.mts +116 -0
  47. package/src/foundry/client/apps/hud/pause.d.mts +32 -0
  48. package/src/foundry/client/apps/hud/players.d.mts +82 -0
  49. package/src/foundry/client/apps/i18n.d.mts +218 -0
  50. package/src/foundry/client/apps/index.d.mts +10 -0
  51. package/src/foundry/client/apps/placeables/drawing-config.d.mts +80 -0
  52. package/src/foundry/client/apps/placeables/drawing-hud.d.mts +31 -0
  53. package/src/foundry/client/apps/placeables/index.d.mts +10 -0
  54. package/src/foundry/client/apps/placeables/light-config.d.mts +100 -0
  55. package/src/foundry/client/apps/placeables/note-config.d.mts +65 -0
  56. package/src/foundry/client/apps/placeables/sound-config.d.mts +43 -0
  57. package/src/foundry/client/apps/placeables/tile-config.d.mts +54 -0
  58. package/src/foundry/client/apps/placeables/tile-hud.d.mts +37 -0
  59. package/src/foundry/client/apps/placeables/token-config.d.mts +244 -0
  60. package/src/foundry/client/apps/placeables/token-hud.d.mts +134 -0
  61. package/src/foundry/client/apps/placeables/wall-config.d.mts +63 -0
  62. package/src/foundry/client/apps/sidebar/apps/chat-popout.d.mts +39 -0
  63. package/src/foundry/client/apps/sidebar/apps/client-settings.d.mts +98 -0
  64. package/src/foundry/client/apps/sidebar/apps/compendium.d.mts +93 -0
  65. package/src/foundry/client/apps/sidebar/apps/index.d.mts +10 -0
  66. package/src/foundry/client/apps/sidebar/apps/invitation-links.d.mts +32 -0
  67. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.mts +180 -0
  68. package/src/foundry/client/apps/sidebar/apps/module-management.d.mts +135 -0
  69. package/src/foundry/client/apps/sidebar/apps/permission-config.d.mts +72 -0
  70. package/src/foundry/client/apps/sidebar/apps/support-details.d.mts +121 -0
  71. package/src/foundry/client/apps/sidebar/apps/tours-management.d.mts +54 -0
  72. package/src/foundry/client/apps/sidebar/apps/world-config.d.mts +57 -0
  73. package/src/foundry/client/apps/sidebar/directory-tab-mixin.d.mts +276 -0
  74. package/src/foundry/client/apps/sidebar/document-directory.d.mts +163 -0
  75. package/src/foundry/client/apps/sidebar/index.d.mts +7 -0
  76. package/src/foundry/client/apps/sidebar/package-configuration.d.mts +86 -0
  77. package/src/foundry/client/apps/sidebar/sidebar-tab.d.mts +80 -0
  78. package/src/foundry/client/apps/sidebar/sidebar.d.mts +95 -0
  79. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.mts +20 -0
  80. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.mts +12 -0
  81. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.mts +364 -0
  82. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.mts +156 -0
  83. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.mts +105 -0
  84. package/src/foundry/client/apps/sidebar/tabs/index.d.mts +12 -0
  85. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.mts +14 -0
  86. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.mts +13 -0
  87. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.mts +16 -0
  88. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.mts +275 -0
  89. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.mts +13 -0
  90. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.mts +34 -0
  91. package/src/foundry/client/apps/sidebar/tabs/settings.d.mts +72 -0
  92. package/src/foundry/client/apps/templates.d.mts +482 -0
  93. package/src/foundry/client/av/client.d.mts +162 -0
  94. package/src/foundry/client/av/clients/index.d.mts +1 -0
  95. package/src/foundry/client/av/clients/simplepeer.d.mts +155 -0
  96. package/src/foundry/client/av/index.d.mts +4 -0
  97. package/src/foundry/client/av/master.d.mts +191 -0
  98. package/src/foundry/client/av/settings.d.mts +315 -0
  99. package/src/foundry/client/config.d.mts +3164 -0
  100. package/src/foundry/client/core/clipboard.d.mts +20 -0
  101. package/src/foundry/client/core/document-index.d.mts +118 -0
  102. package/src/foundry/client/core/gamepad.d.mts +76 -0
  103. package/src/foundry/client/core/hooks.d.mts +132 -0
  104. package/src/foundry/client/core/image.d.mts +190 -0
  105. package/src/foundry/client/core/index.d.mts +21 -0
  106. package/src/foundry/client/core/issues.d.mts +102 -0
  107. package/src/foundry/client/core/keybindings.d.mts +413 -0
  108. package/src/foundry/client/core/keyboard.d.mts +271 -0
  109. package/src/foundry/client/core/mouse.d.mts +28 -0
  110. package/src/foundry/client/core/nue.d.mts +38 -0
  111. package/src/foundry/client/core/packages.d.mts +201 -0
  112. package/src/foundry/client/core/settings.d.mts +361 -0
  113. package/src/foundry/client/core/socket.d.mts +62 -0
  114. package/src/foundry/client/core/sorting.d.mts +76 -0
  115. package/src/foundry/client/core/time.d.mts +73 -0
  116. package/src/foundry/client/core/tooltip.d.mts +198 -0
  117. package/src/foundry/client/core/tour.d.mts +279 -0
  118. package/src/foundry/client/core/tours.d.mts +22 -0
  119. package/src/foundry/client/core/utils.d.mts +71 -0
  120. package/src/foundry/client/core/video.d.mts +161 -0
  121. package/src/foundry/client/core/workers.d.mts +128 -0
  122. package/src/foundry/client/data/abstract/canvas-document.d.mts +70 -0
  123. package/src/foundry/client/data/abstract/client-document.d.mts +717 -0
  124. package/src/foundry/client/data/abstract/directory-collection-mixin.d.mts +135 -0
  125. package/src/foundry/client/data/abstract/document-collection.d.mts +218 -0
  126. package/src/foundry/client/data/abstract/index.d.mts +5 -0
  127. package/src/foundry/client/data/abstract/world-collection.d.mts +165 -0
  128. package/src/foundry/client/data/collections/actors.d.mts +49 -0
  129. package/src/foundry/client/data/collections/cards.d.mts +12 -0
  130. package/src/foundry/client/data/collections/combats.d.mts +43 -0
  131. package/src/foundry/client/data/collections/compendium-collection.d.mts +490 -0
  132. package/src/foundry/client/data/collections/compendium-folders.d.mts +27 -0
  133. package/src/foundry/client/data/collections/compendium-packs.d.mts +27 -0
  134. package/src/foundry/client/data/collections/fog.d.mts +17 -0
  135. package/src/foundry/client/data/collections/folder.d.mts +33 -0
  136. package/src/foundry/client/data/collections/index.d.mts +17 -0
  137. package/src/foundry/client/data/collections/items.d.mts +14 -0
  138. package/src/foundry/client/data/collections/journal.d.mts +64 -0
  139. package/src/foundry/client/data/collections/macros.d.mts +32 -0
  140. package/src/foundry/client/data/collections/messages.d.mts +35 -0
  141. package/src/foundry/client/data/collections/playlists.d.mts +32 -0
  142. package/src/foundry/client/data/collections/scenes.d.mts +68 -0
  143. package/src/foundry/client/data/collections/settings.d.mts +29 -0
  144. package/src/foundry/client/data/collections/tables.d.mts +21 -0
  145. package/src/foundry/client/data/collections/users.d.mts +50 -0
  146. package/src/foundry/client/data/documents/active-effect.d.mts +360 -0
  147. package/src/foundry/client/data/documents/actor-delta.d.mts +99 -0
  148. package/src/foundry/client/data/documents/actor.d.mts +315 -0
  149. package/src/foundry/client/data/documents/adventure.d.mts +105 -0
  150. package/src/foundry/client/data/documents/ambient-light.d.mts +43 -0
  151. package/src/foundry/client/data/documents/ambient-sound.d.mts +30 -0
  152. package/src/foundry/client/data/documents/card.d.mts +127 -0
  153. package/src/foundry/client/data/documents/cards.d.mts +354 -0
  154. package/src/foundry/client/data/documents/chat-message.d.mts +230 -0
  155. package/src/foundry/client/data/documents/combat.d.mts +328 -0
  156. package/src/foundry/client/data/documents/combatant.d.mts +114 -0
  157. package/src/foundry/client/data/documents/drawing.d.mts +35 -0
  158. package/src/foundry/client/data/documents/fog-exploration.d.mts +62 -0
  159. package/src/foundry/client/data/documents/folder.d.mts +135 -0
  160. package/src/foundry/client/data/documents/index.d.mts +30 -0
  161. package/src/foundry/client/data/documents/item.d.mts +67 -0
  162. package/src/foundry/client/data/documents/journal-entry-page.d.mts +231 -0
  163. package/src/foundry/client/data/documents/journal-entry.d.mts +81 -0
  164. package/src/foundry/client/data/documents/macro.d.mts +87 -0
  165. package/src/foundry/client/data/documents/measured-template.d.mts +40 -0
  166. package/src/foundry/client/data/documents/note.d.mts +46 -0
  167. package/src/foundry/client/data/documents/playlist-sound.d.mts +127 -0
  168. package/src/foundry/client/data/documents/playlist.d.mts +207 -0
  169. package/src/foundry/client/data/documents/scene.d.mts +256 -0
  170. package/src/foundry/client/data/documents/setting.d.mts +54 -0
  171. package/src/foundry/client/data/documents/table-result.d.mts +41 -0
  172. package/src/foundry/client/data/documents/table.d.mts +321 -0
  173. package/src/foundry/client/data/documents/tile.d.mts +32 -0
  174. package/src/foundry/client/data/documents/token.d.mts +356 -0
  175. package/src/foundry/client/data/documents/user.d.mts +164 -0
  176. package/src/foundry/client/data/documents/wall.d.mts +30 -0
  177. package/src/foundry/client/data/index.d.mts +3 -0
  178. package/src/foundry/client/game.d.mts +783 -0
  179. package/src/foundry/client/head.d.mts +86 -0
  180. package/src/foundry/client/hooks.d.mts +1234 -0
  181. package/src/foundry/client/index.d.mts +12 -0
  182. package/src/foundry/client/pixi/board.d.mts +820 -0
  183. package/src/foundry/client/pixi/core/containers/base-canvas-group.d.mts +83 -0
  184. package/src/foundry/client/pixi/core/containers/cached-container.d.mts +118 -0
  185. package/src/foundry/client/pixi/core/containers/full-canvas-container.d.mts +37 -0
  186. package/src/foundry/client/pixi/core/containers/index.d.mts +8 -0
  187. package/src/foundry/client/pixi/core/containers/point-source-mesh.d.mts +62 -0
  188. package/src/foundry/client/pixi/core/containers/quad-mesh.d.mts +43 -0
  189. package/src/foundry/client/pixi/core/containers/quadtree.d.mts +199 -0
  190. package/src/foundry/client/pixi/core/containers/sprite-mesh.d.mts +326 -0
  191. package/src/foundry/client/pixi/core/containers/unbound-container.d.mts +21 -0
  192. package/src/foundry/client/pixi/core/index.d.mts +4 -0
  193. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.mts +177 -0
  194. package/src/foundry/client/pixi/core/interaction/control-icon.d.mts +89 -0
  195. package/src/foundry/client/pixi/core/interaction/index.d.mts +8 -0
  196. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.mts +291 -0
  197. package/src/foundry/client/pixi/core/interaction/ping.d.mts +58 -0
  198. package/src/foundry/client/pixi/core/interaction/pings/chevron.d.mts +73 -0
  199. package/src/foundry/client/pixi/core/interaction/pings/index.d.mts +2 -0
  200. package/src/foundry/client/pixi/core/interaction/pings/pulse.d.mts +115 -0
  201. package/src/foundry/client/pixi/core/interaction/render-flags.d.mts +126 -0
  202. package/src/foundry/client/pixi/core/interaction/resize-handle.d.mts +52 -0
  203. package/src/foundry/client/pixi/core/interaction/targets.d.mts +45 -0
  204. package/src/foundry/client/pixi/core/loader.d.mts +246 -0
  205. package/src/foundry/client/pixi/core/shapes/index.d.mts +5 -0
  206. package/src/foundry/client/pixi/core/shapes/limited-angle-polygon.d.mts +119 -0
  207. package/src/foundry/client/pixi/core/shapes/polygon-mesher.d.mts +110 -0
  208. package/src/foundry/client/pixi/core/shapes/precise-text.d.mts +27 -0
  209. package/src/foundry/client/pixi/core/shapes/ray.d.mts +165 -0
  210. package/src/foundry/client/pixi/core/shapes/source-polygon.d.mts +249 -0
  211. package/src/foundry/client/pixi/extensions/circle.d.mts +132 -0
  212. package/src/foundry/client/pixi/extensions/graphics.d.mts +43 -0
  213. package/src/foundry/client/pixi/extensions/index.d.mts +5 -0
  214. package/src/foundry/client/pixi/extensions/observable-transform.d.mts +30 -0
  215. package/src/foundry/client/pixi/extensions/polygon.d.mts +142 -0
  216. package/src/foundry/client/pixi/extensions/rectangle.d.mts +248 -0
  217. package/src/foundry/client/pixi/groups/effects.d.mts +186 -0
  218. package/src/foundry/client/pixi/groups/environment.d.mts +80 -0
  219. package/src/foundry/client/pixi/groups/hidden.d.mts +40 -0
  220. package/src/foundry/client/pixi/groups/index.d.mts +7 -0
  221. package/src/foundry/client/pixi/groups/interface.d.mts +74 -0
  222. package/src/foundry/client/pixi/groups/overlay.d.mts +18 -0
  223. package/src/foundry/client/pixi/groups/primary.d.mts +200 -0
  224. package/src/foundry/client/pixi/groups/rendered.d.mts +18 -0
  225. package/src/foundry/client/pixi/index.d.mts +10 -0
  226. package/src/foundry/client/pixi/layers/base/canvas-layer.d.mts +95 -0
  227. package/src/foundry/client/pixi/layers/base/index.d.mts +3 -0
  228. package/src/foundry/client/pixi/layers/base/interaction-layer.d.mts +162 -0
  229. package/src/foundry/client/pixi/layers/base/placeables-layer.d.mts +643 -0
  230. package/src/foundry/client/pixi/layers/controls/cursor.d.mts +33 -0
  231. package/src/foundry/client/pixi/layers/controls/door.d.mts +68 -0
  232. package/src/foundry/client/pixi/layers/controls/index.d.mts +4 -0
  233. package/src/foundry/client/pixi/layers/controls/layer.d.mts +262 -0
  234. package/src/foundry/client/pixi/layers/controls/ruler.d.mts +475 -0
  235. package/src/foundry/client/pixi/layers/effects/background-effects.d.mts +50 -0
  236. package/src/foundry/client/pixi/layers/effects/coloration-effects.d.mts +42 -0
  237. package/src/foundry/client/pixi/layers/effects/darkness-effects.d.mts +33 -0
  238. package/src/foundry/client/pixi/layers/effects/illumination-effects.d.mts +151 -0
  239. package/src/foundry/client/pixi/layers/effects/index.d.mts +7 -0
  240. package/src/foundry/client/pixi/layers/effects/visibility.d.mts +225 -0
  241. package/src/foundry/client/pixi/layers/effects/weather/particles/effect.d.mts +47 -0
  242. package/src/foundry/client/pixi/layers/effects/weather/particles/index.d.mts +2 -0
  243. package/src/foundry/client/pixi/layers/effects/weather/particles/leaves.d.mts +20 -0
  244. package/src/foundry/client/pixi/layers/effects/weather-effects.d.mts +227 -0
  245. package/src/foundry/client/pixi/layers/grid/highlight.d.mts +33 -0
  246. package/src/foundry/client/pixi/layers/grid/index.d.mts +3 -0
  247. package/src/foundry/client/pixi/layers/grid/layer.d.mts +269 -0
  248. package/src/foundry/client/pixi/layers/grid/mesh.d.mts +73 -0
  249. package/src/foundry/client/pixi/layers/index.d.mts +6 -0
  250. package/src/foundry/client/pixi/layers/masks/depth.d.mts +62 -0
  251. package/src/foundry/client/pixi/layers/masks/index.d.mts +3 -0
  252. package/src/foundry/client/pixi/layers/masks/occlusion.d.mts +91 -0
  253. package/src/foundry/client/pixi/layers/masks/vision.d.mts +116 -0
  254. package/src/foundry/client/pixi/layers/placeables/drawings.d.mts +111 -0
  255. package/src/foundry/client/pixi/layers/placeables/index.d.mts +8 -0
  256. package/src/foundry/client/pixi/layers/placeables/lighting.d.mts +83 -0
  257. package/src/foundry/client/pixi/layers/placeables/notes.d.mts +110 -0
  258. package/src/foundry/client/pixi/layers/placeables/sounds.d.mts +320 -0
  259. package/src/foundry/client/pixi/layers/placeables/templates.d.mts +72 -0
  260. package/src/foundry/client/pixi/layers/placeables/tiles.d.mts +116 -0
  261. package/src/foundry/client/pixi/layers/placeables/tokens.d.mts +193 -0
  262. package/src/foundry/client/pixi/layers/placeables/walls.d.mts +209 -0
  263. package/src/foundry/client/pixi/perception/clockwise-sweep.d.mts +157 -0
  264. package/src/foundry/client/pixi/perception/detection-mode.d.mts +212 -0
  265. package/src/foundry/client/pixi/perception/fog.d.mts +130 -0
  266. package/src/foundry/client/pixi/perception/index.d.mts +6 -0
  267. package/src/foundry/client/pixi/perception/perception-manager.d.mts +167 -0
  268. package/src/foundry/client/pixi/perception/vision-mode.d.mts +202 -0
  269. package/src/foundry/client/pixi/perception/weiler-atherton-clipping.d.mts +152 -0
  270. package/src/foundry/client/pixi/placeable.d.mts +631 -0
  271. package/src/foundry/client/pixi/placeables/drawing.d.mts +292 -0
  272. package/src/foundry/client/pixi/placeables/index.d.mts +9 -0
  273. package/src/foundry/client/pixi/placeables/light.d.mts +140 -0
  274. package/src/foundry/client/pixi/placeables/note.d.mts +114 -0
  275. package/src/foundry/client/pixi/placeables/primary-canvas-objects/index.d.mts +4 -0
  276. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-canvas-object.d.mts +177 -0
  277. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-graphics.d.mts +30 -0
  278. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-occludable-object.d.mts +161 -0
  279. package/src/foundry/client/pixi/placeables/primary-canvas-objects/primary-sprite-mesh.d.mts +111 -0
  280. package/src/foundry/client/pixi/placeables/sound.d.mts +134 -0
  281. package/src/foundry/client/pixi/placeables/template.d.mts +211 -0
  282. package/src/foundry/client/pixi/placeables/tile.d.mts +284 -0
  283. package/src/foundry/client/pixi/placeables/token.d.mts +820 -0
  284. package/src/foundry/client/pixi/placeables/wall.d.mts +275 -0
  285. package/src/foundry/client/pixi/webgl/extensions/batch-renderer.d.mts +95 -0
  286. package/src/foundry/client/pixi/webgl/extensions/batch-shader-generator.d.mts +30 -0
  287. package/src/foundry/client/pixi/webgl/extensions/blend-modes.d.mts +53 -0
  288. package/src/foundry/client/pixi/webgl/extensions/index.d.mts +3 -0
  289. package/src/foundry/client/pixi/webgl/helpers/framebugger-snapshot.d.mts +30 -0
  290. package/src/foundry/client/pixi/webgl/helpers/index.d.mts +3 -0
  291. package/src/foundry/client/pixi/webgl/helpers/smooth-noise.d.mts +65 -0
  292. package/src/foundry/client/pixi/webgl/helpers/texture-extractor.d.mts +90 -0
  293. package/src/foundry/client/pixi/webgl/index.d.mts +3 -0
  294. package/src/foundry/client/pixi/webgl/shaders/base-shader-mixin.d.mts +119 -0
  295. package/src/foundry/client/pixi/webgl/shaders/base-shader.d.mts +94 -0
  296. package/src/foundry/client/pixi/webgl/shaders/filters/base-filter.d.mts +47 -0
  297. package/src/foundry/client/pixi/webgl/shaders/filters/base-mask-filter.d.mts +29 -0
  298. package/src/foundry/client/pixi/webgl/shaders/filters/blur.d.mts +185 -0
  299. package/src/foundry/client/pixi/webgl/shaders/filters/effects-masking.d.mts +121 -0
  300. package/src/foundry/client/pixi/webgl/shaders/filters/environment.d.mts +40 -0
  301. package/src/foundry/client/pixi/webgl/shaders/filters/glow-overlay.d.mts +75 -0
  302. package/src/foundry/client/pixi/webgl/shaders/filters/index.d.mts +13 -0
  303. package/src/foundry/client/pixi/webgl/shaders/filters/invisibility.d.mts +29 -0
  304. package/src/foundry/client/pixi/webgl/shaders/filters/outline-overlay.d.mts +86 -0
  305. package/src/foundry/client/pixi/webgl/shaders/filters/transition.d.mts +119 -0
  306. package/src/foundry/client/pixi/webgl/shaders/filters/visibility.d.mts +70 -0
  307. package/src/foundry/client/pixi/webgl/shaders/filters/vision-mask-filter.d.mts +33 -0
  308. package/src/foundry/client/pixi/webgl/shaders/filters/void.d.mts +18 -0
  309. package/src/foundry/client/pixi/webgl/shaders/filters/weather-occlusion-masks.d.mts +56 -0
  310. package/src/foundry/client/pixi/webgl/shaders/fragment-channel-mixin.d.mts +54 -0
  311. package/src/foundry/client/pixi/webgl/shaders/grid/grid.d.mts +112 -0
  312. package/src/foundry/client/pixi/webgl/shaders/grid/index.d.mts +1 -0
  313. package/src/foundry/client/pixi/webgl/shaders/index.d.mts +10 -0
  314. package/src/foundry/client/pixi/webgl/shaders/lighting/background-lighting.d.mts +65 -0
  315. package/src/foundry/client/pixi/webgl/shaders/lighting/base-lighting.d.mts +178 -0
  316. package/src/foundry/client/pixi/webgl/shaders/lighting/coloration-lighting.d.mts +73 -0
  317. package/src/foundry/client/pixi/webgl/shaders/lighting/darkness-lighting.d.mts +73 -0
  318. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/bewitching-wave.d.mts +33 -0
  319. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/black-hole.d.mts +18 -0
  320. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/chroma.d.mts +23 -0
  321. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/emanation.d.mts +23 -0
  322. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/energy-field.d.mts +23 -0
  323. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fairy-light.d.mts +38 -0
  324. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/flame.d.mts +55 -0
  325. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/fog.d.mts +23 -0
  326. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/force-grid.d.mts +22 -0
  327. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/ghost-light.d.mts +33 -0
  328. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/hexa-dome.d.mts +23 -0
  329. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/index.d.mts +25 -0
  330. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/light-dome.d.mts +23 -0
  331. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/magical-gloom.d.mts +18 -0
  332. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/pulse.d.mts +44 -0
  333. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/radial-rainbow.d.mts +23 -0
  334. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/revolving-light.d.mts +36 -0
  335. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/roiling-mass.d.mts +18 -0
  336. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/siren-light.d.mts +61 -0
  337. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/smoke-patch.d.mts +32 -0
  338. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/star-light.d.mts +23 -0
  339. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/sunburst.d.mts +33 -0
  340. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/swirling-rainbow.d.mts +23 -0
  341. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/torch.d.mts +45 -0
  342. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/vortex.d.mts +38 -0
  343. package/src/foundry/client/pixi/webgl/shaders/lighting/effects/wave.d.mts +33 -0
  344. package/src/foundry/client/pixi/webgl/shaders/lighting/illumination-lighting.d.mts +79 -0
  345. package/src/foundry/client/pixi/webgl/shaders/lighting/index.d.mts +6 -0
  346. package/src/foundry/client/pixi/webgl/shaders/region/adjust-darkness-level.d.mts +93 -0
  347. package/src/foundry/client/pixi/webgl/shaders/region/base.d.mts +35 -0
  348. package/src/foundry/client/pixi/webgl/shaders/region/highlight.d.mts +35 -0
  349. package/src/foundry/client/pixi/webgl/shaders/region/index.d.mts +3 -0
  350. package/src/foundry/client/pixi/webgl/shaders/samplers/base-sampler.d.mts +206 -0
  351. package/src/foundry/client/pixi/webgl/shaders/samplers/baseline-illumination.d.mts +38 -0
  352. package/src/foundry/client/pixi/webgl/shaders/samplers/color-adjustment.d.mts +109 -0
  353. package/src/foundry/client/pixi/webgl/shaders/samplers/depth.d.mts +103 -0
  354. package/src/foundry/client/pixi/webgl/shaders/samplers/fog-of-war.d.mts +24 -0
  355. package/src/foundry/client/pixi/webgl/shaders/samplers/index.d.mts +8 -0
  356. package/src/foundry/client/pixi/webgl/shaders/samplers/occlusion.d.mts +104 -0
  357. package/src/foundry/client/pixi/webgl/shaders/samplers/primary.d.mts +26 -0
  358. package/src/foundry/client/pixi/webgl/shaders/samplers/token-ring.d.mts +47 -0
  359. package/src/foundry/client/pixi/webgl/shaders/vision/background-vision.d.mts +42 -0
  360. package/src/foundry/client/pixi/webgl/shaders/vision/base-vision.d.mts +31 -0
  361. package/src/foundry/client/pixi/webgl/shaders/vision/coloration-vision.d.mts +41 -0
  362. package/src/foundry/client/pixi/webgl/shaders/vision/effects/amplification.d.mts +32 -0
  363. package/src/foundry/client/pixi/webgl/shaders/vision/effects/index.d.mts +2 -0
  364. package/src/foundry/client/pixi/webgl/shaders/vision/effects/wave.d.mts +59 -0
  365. package/src/foundry/client/pixi/webgl/shaders/vision/illumination-vision.d.mts +36 -0
  366. package/src/foundry/client/pixi/webgl/shaders/vision/index.d.mts +5 -0
  367. package/src/foundry/client/pixi/webgl/shaders/weather/base-weather.d.mts +106 -0
  368. package/src/foundry/client/pixi/webgl/shaders/weather/effect.d.mts +62 -0
  369. package/src/foundry/client/pixi/webgl/shaders/weather/fog.d.mts +50 -0
  370. package/src/foundry/client/pixi/webgl/shaders/weather/index.d.mts +5 -0
  371. package/src/foundry/client/pixi/webgl/shaders/weather/rain.d.mts +42 -0
  372. package/src/foundry/client/pixi/webgl/shaders/weather/snow.d.mts +34 -0
  373. package/src/foundry/client/pixi/workers/index.d.mts +1 -0
  374. package/src/foundry/client/pixi/workers/texture-worker.d.mts +125 -0
  375. package/src/foundry/client/tours/canvas-tour.d.mts +9 -0
  376. package/src/foundry/client/tours/index.d.mts +3 -0
  377. package/src/foundry/client/tours/setup-tour.d.mts +26 -0
  378. package/src/foundry/client/tours/sidebar-tour.d.mts +9 -0
  379. package/src/foundry/client/ui/context.d.mts +213 -0
  380. package/src/foundry/client/ui/dialog.d.mts +326 -0
  381. package/src/foundry/client/ui/drag.d.mts +128 -0
  382. package/src/foundry/client/ui/dragdrop.d.mts +124 -0
  383. package/src/foundry/client/ui/editor.d.mts +546 -0
  384. package/src/foundry/client/ui/filepicker.d.mts +477 -0
  385. package/src/foundry/client/ui/filter.d.mts +148 -0
  386. package/src/foundry/client/ui/forms.d.mts +85 -0
  387. package/src/foundry/client/ui/index.d.mts +12 -0
  388. package/src/foundry/client/ui/notifications.d.mts +136 -0
  389. package/src/foundry/client/ui/prosemirror.d.mts +171 -0
  390. package/src/foundry/client/ui/secrets.d.mts +75 -0
  391. package/src/foundry/client/ui/tabs.d.mts +117 -0
  392. package/src/foundry/client-esm/applications/_module.d.mts +25 -0
  393. package/src/foundry/client-esm/applications/_types.d.mts +36 -0
  394. package/src/foundry/client-esm/applications/api/_module.d.mts +9 -0
  395. package/src/foundry/client-esm/applications/api/application.d.mts +711 -0
  396. package/src/foundry/client-esm/applications/api/dialog.d.mts +268 -0
  397. package/src/foundry/client-esm/applications/api/document-sheet.d.mts +127 -0
  398. package/src/foundry/client-esm/applications/api/handlebars-application.d.mts +180 -0
  399. package/src/foundry/client-esm/applications/apps/_module.d.mts +7 -0
  400. package/src/foundry/client-esm/applications/apps/compendium-art-config.d.mts +53 -0
  401. package/src/foundry/client-esm/applications/apps/permission-config.d.mts +60 -0
  402. package/src/foundry/client-esm/applications/dice/_module.d.mts +6 -0
  403. package/src/foundry/client-esm/applications/dice/roll-resolver.d.mts +98 -0
  404. package/src/foundry/client-esm/applications/elements/_module.d.mts +16 -0
  405. package/src/foundry/client-esm/applications/elements/color-picker.d.mts +26 -0
  406. package/src/foundry/client-esm/applications/elements/document-tags.d.mts +90 -0
  407. package/src/foundry/client-esm/applications/elements/file-picker.d.mts +62 -0
  408. package/src/foundry/client-esm/applications/elements/form-element.d.mts +106 -0
  409. package/src/foundry/client-esm/applications/elements/hue-slider.d.mts +20 -0
  410. package/src/foundry/client-esm/applications/elements/multi-select.d.mts +95 -0
  411. package/src/foundry/client-esm/applications/elements/prosemirror-editor.d.mts +53 -0
  412. package/src/foundry/client-esm/applications/elements/range-picker.d.mts +41 -0
  413. package/src/foundry/client-esm/applications/elements/string-tags.d.mts +73 -0
  414. package/src/foundry/client-esm/applications/forms/fields.d.mts +265 -0
  415. package/src/foundry/client-esm/applications/sheets/_module.d.mts +12 -0
  416. package/src/foundry/client-esm/applications/sheets/actor-sheet.d.mts +31 -0
  417. package/src/foundry/client-esm/applications/sheets/ambient-light-config.d.mts +77 -0
  418. package/src/foundry/client-esm/applications/sheets/ambient-sound-config.d.mts +52 -0
  419. package/src/foundry/client-esm/applications/sheets/item-sheet.d.mts +22 -0
  420. package/src/foundry/client-esm/applications/sheets/region-behavior-config.d.mts +13 -0
  421. package/src/foundry/client-esm/applications/sheets/region-config.d.mts +13 -0
  422. package/src/foundry/client-esm/applications/sheets/user-config.d.mts +44 -0
  423. package/src/foundry/client-esm/applications/ui/_module.d.mts +6 -0
  424. package/src/foundry/client-esm/applications/ui/region-legend.d.mts +12 -0
  425. package/src/foundry/client-esm/audio/_module.d.mts +13 -0
  426. package/src/foundry/client-esm/audio/_types.d.mts +16 -0
  427. package/src/foundry/client-esm/audio/biquad.d.mts +51 -0
  428. package/src/foundry/client-esm/audio/cache.d.mts +68 -0
  429. package/src/foundry/client-esm/audio/convolver.d.mts +71 -0
  430. package/src/foundry/client-esm/audio/helper.d.mts +325 -0
  431. package/src/foundry/client-esm/audio/sound.d.mts +401 -0
  432. package/src/foundry/client-esm/audio/timeout.d.mts +82 -0
  433. package/src/foundry/client-esm/canvas/_module.d.mts +11 -0
  434. package/src/foundry/client-esm/canvas/edges/_module.d.mts +9 -0
  435. package/src/foundry/client-esm/canvas/edges/collision.d.mts +93 -0
  436. package/src/foundry/client-esm/canvas/edges/edge.d.mts +184 -0
  437. package/src/foundry/client-esm/canvas/edges/edges.d.mts +23 -0
  438. package/src/foundry/client-esm/canvas/edges/vertex.d.mts +136 -0
  439. package/src/foundry/client-esm/canvas/regions/_module.d.mts +10 -0
  440. package/src/foundry/client-esm/canvas/scene-manager.d.mts +93 -0
  441. package/src/foundry/client-esm/canvas/smaa/blend.d.mts +6 -0
  442. package/src/foundry/client-esm/canvas/smaa/edges.d.mts +6 -0
  443. package/src/foundry/client-esm/canvas/smaa/smaa.d.mts +56 -0
  444. package/src/foundry/client-esm/canvas/smaa/weights.d.mts +6 -0
  445. package/src/foundry/client-esm/canvas/sources/_module.d.mts +15 -0
  446. package/src/foundry/client-esm/canvas/sources/base-effect-source.d.mts +250 -0
  447. package/src/foundry/client-esm/canvas/sources/base-light-source.d.mts +159 -0
  448. package/src/foundry/client-esm/canvas/sources/global-light-source.d.mts +47 -0
  449. package/src/foundry/client-esm/canvas/sources/point-darkness-source.d.mts +77 -0
  450. package/src/foundry/client-esm/canvas/sources/point-effect-source.d.mts +93 -0
  451. package/src/foundry/client-esm/canvas/sources/point-light-source.d.mts +43 -0
  452. package/src/foundry/client-esm/canvas/sources/point-movement-source.d.mts +15 -0
  453. package/src/foundry/client-esm/canvas/sources/point-sound-source.d.mts +29 -0
  454. package/src/foundry/client-esm/canvas/sources/point-vision-source.d.mts +212 -0
  455. package/src/foundry/client-esm/canvas/sources/rendered-effect-source.d.mts +330 -0
  456. package/src/foundry/client-esm/canvas/tokens/_module.d.mts +9 -0
  457. package/src/foundry/client-esm/canvas/tokens/ring-config.d.mts +80 -0
  458. package/src/foundry/client-esm/canvas/tokens/ring-data.d.mts +7 -0
  459. package/src/foundry/client-esm/canvas/tokens/ring.d.mts +5 -0
  460. package/src/foundry/client-esm/client.d.mts +286 -0
  461. package/src/foundry/client-esm/data/_module.d.mts +8 -0
  462. package/src/foundry/client-esm/data/client-backend.d.mts +52 -0
  463. package/src/foundry/client-esm/data/region-behaviors/_module.d.mts +14 -0
  464. package/src/foundry/client-esm/dice/_module.d.mts +13 -0
  465. package/src/foundry/client-esm/dice/_types.d.mts +61 -0
  466. package/src/foundry/client-esm/dice/parser.d.mts +205 -0
  467. package/src/foundry/client-esm/dice/roll.d.mts +645 -0
  468. package/src/foundry/client-esm/dice/terms/_module.d.mts +17 -0
  469. package/src/foundry/client-esm/dice/terms/coin.d.mts +68 -0
  470. package/src/foundry/client-esm/dice/terms/dice.d.mts +381 -0
  471. package/src/foundry/client-esm/dice/terms/die.d.mts +241 -0
  472. package/src/foundry/client-esm/dice/terms/fate.d.mts +50 -0
  473. package/src/foundry/client-esm/dice/terms/function.d.mts +103 -0
  474. package/src/foundry/client-esm/dice/terms/numeric.d.mts +56 -0
  475. package/src/foundry/client-esm/dice/terms/operator.d.mts +55 -0
  476. package/src/foundry/client-esm/dice/terms/parenthetical.d.mts +105 -0
  477. package/src/foundry/client-esm/dice/terms/pool.d.mts +278 -0
  478. package/src/foundry/client-esm/dice/terms/string.d.mts +34 -0
  479. package/src/foundry/client-esm/dice/terms/term.d.mts +160 -0
  480. package/src/foundry/client-esm/dice/twister.d.mts +134 -0
  481. package/src/foundry/client-esm/helpers/_module.d.mts +8 -0
  482. package/src/foundry/client-esm/helpers/_types.d.mts +51 -0
  483. package/src/foundry/client-esm/helpers/compendium-art.d.mts +47 -0
  484. package/src/foundry/clipper/clipper.d.mts +927 -0
  485. package/src/foundry/clipper/index.d.mts +1 -0
  486. package/src/foundry/common/abstract/_types.d.mts +274 -0
  487. package/src/foundry/common/abstract/backend.d.mts +190 -0
  488. package/src/foundry/common/abstract/data.d.mts +461 -0
  489. package/src/foundry/common/abstract/document.d.mts +1409 -0
  490. package/src/foundry/common/abstract/embedded-collection-delta.d.mts +96 -0
  491. package/src/foundry/common/abstract/embedded-collection.d.mts +252 -0
  492. package/src/foundry/common/abstract/module.d.mts +13 -0
  493. package/src/foundry/common/abstract/singleton-collection.d.mts +19 -0
  494. package/src/foundry/common/abstract/socket.d.mts +36 -0
  495. package/src/foundry/common/abstract/type-data.d.mts +343 -0
  496. package/src/foundry/common/config.d.mts +302 -0
  497. package/src/foundry/common/constants.d.mts +2054 -0
  498. package/src/foundry/common/data/data.d.mts +667 -0
  499. package/src/foundry/common/data/fields.d.mts +4207 -0
  500. package/src/foundry/common/data/module.d.mts +9 -0
  501. package/src/foundry/common/data/validation-failure.d.mts +174 -0
  502. package/src/foundry/common/data/validators.d.mts +30 -0
  503. package/src/foundry/common/documents/_module.d.mts +35 -0
  504. package/src/foundry/common/documents/_types.d.mts +175 -0
  505. package/src/foundry/common/documents/active-effect.d.mts +238 -0
  506. package/src/foundry/common/documents/actor-delta.d.mts +120 -0
  507. package/src/foundry/common/documents/actor.d.mts +168 -0
  508. package/src/foundry/common/documents/adventure.d.mts +184 -0
  509. package/src/foundry/common/documents/ambient-light.d.mts +98 -0
  510. package/src/foundry/common/documents/ambient-sound.d.mts +132 -0
  511. package/src/foundry/common/documents/card.d.mts +224 -0
  512. package/src/foundry/common/documents/cards.d.mts +156 -0
  513. package/src/foundry/common/documents/chat-message.d.mts +207 -0
  514. package/src/foundry/common/documents/combat.d.mts +130 -0
  515. package/src/foundry/common/documents/combatant.d.mts +123 -0
  516. package/src/foundry/common/documents/drawing.d.mts +240 -0
  517. package/src/foundry/common/documents/fog-exploration.d.mts +95 -0
  518. package/src/foundry/common/documents/folder.d.mts +113 -0
  519. package/src/foundry/common/documents/item.d.mts +142 -0
  520. package/src/foundry/common/documents/journal-entry-page.d.mts +211 -0
  521. package/src/foundry/common/documents/journal-entry.d.mts +91 -0
  522. package/src/foundry/common/documents/macro.d.mts +174 -0
  523. package/src/foundry/common/documents/measured-template.d.mts +168 -0
  524. package/src/foundry/common/documents/module.d.mts +35 -0
  525. package/src/foundry/common/documents/note.d.mts +183 -0
  526. package/src/foundry/common/documents/playlist-sound.d.mts +127 -0
  527. package/src/foundry/common/documents/playlist.d.mts +154 -0
  528. package/src/foundry/common/documents/roll-table.d.mts +130 -0
  529. package/src/foundry/common/documents/scene.d.mts +373 -0
  530. package/src/foundry/common/documents/setting.d.mts +77 -0
  531. package/src/foundry/common/documents/table-result.d.mts +131 -0
  532. package/src/foundry/common/documents/tile.d.mts +195 -0
  533. package/src/foundry/common/documents/token.d.mts +497 -0
  534. package/src/foundry/common/documents/user.d.mts +238 -0
  535. package/src/foundry/common/documents/wall.d.mts +184 -0
  536. package/src/foundry/common/grid/_module.d.mts +10 -0
  537. package/src/foundry/common/grid/base.d.mts +640 -0
  538. package/src/foundry/common/grid/grid-hex.d.mts +55 -0
  539. package/src/foundry/common/grid/gridless.d.mts +71 -0
  540. package/src/foundry/common/grid/hexagonal.d.mts +391 -0
  541. package/src/foundry/common/grid/square.d.mts +100 -0
  542. package/src/foundry/common/packages/base-module.d.mts +46 -0
  543. package/src/foundry/common/packages/base-package.d.mts +677 -0
  544. package/src/foundry/common/packages/base-system.d.mts +90 -0
  545. package/src/foundry/common/packages/base-world.d.mts +116 -0
  546. package/src/foundry/common/packages/module.d.mts +28 -0
  547. package/src/foundry/common/packages/sub-types.d.mts +42 -0
  548. package/src/foundry/common/primitives/array.d.mts +56 -0
  549. package/src/foundry/common/primitives/date.d.mts +24 -0
  550. package/src/foundry/common/primitives/math.d.mts +103 -0
  551. package/src/foundry/common/primitives/module.d.mts +8 -0
  552. package/src/foundry/common/primitives/number.d.mts +91 -0
  553. package/src/foundry/common/primitives/regex.d.mts +12 -0
  554. package/src/foundry/common/primitives/regexp.d.mts +12 -0
  555. package/src/foundry/common/primitives/set.d.mts +105 -0
  556. package/src/foundry/common/primitives/string.d.mts +58 -0
  557. package/src/foundry/common/primitives/url.d.mts +18 -0
  558. package/src/foundry/common/prosemirror/_module.d.mts +82 -0
  559. package/src/foundry/common/prosemirror/click-handler.d.mts +34 -0
  560. package/src/foundry/common/prosemirror/content-link-plugin.d.mts +47 -0
  561. package/src/foundry/common/prosemirror/dirty-plugin.d.mts +13 -0
  562. package/src/foundry/common/prosemirror/dom-parser.d.mts +9 -0
  563. package/src/foundry/common/prosemirror/dropdown.d.mts +65 -0
  564. package/src/foundry/common/prosemirror/extensions.d.mts +12 -0
  565. package/src/foundry/common/prosemirror/highlight-matches-plugin.d.mts +82 -0
  566. package/src/foundry/common/prosemirror/image-plugin.d.mts +82 -0
  567. package/src/foundry/common/prosemirror/index.d.mts +22 -0
  568. package/src/foundry/common/prosemirror/input-rules.d.mts +34 -0
  569. package/src/foundry/common/prosemirror/keymaps.d.mts +47 -0
  570. package/src/foundry/common/prosemirror/menu.d.mts +255 -0
  571. package/src/foundry/common/prosemirror/paste-transformer.d.mts +22 -0
  572. package/src/foundry/common/prosemirror/plugin.d.mts +24 -0
  573. package/src/foundry/common/prosemirror/schema/attribute-capture.d.mts +39 -0
  574. package/src/foundry/common/prosemirror/schema/core.d.mts +51 -0
  575. package/src/foundry/common/prosemirror/schema/image-link-node.d.mts +29 -0
  576. package/src/foundry/common/prosemirror/schema/image-node.d.mts +19 -0
  577. package/src/foundry/common/prosemirror/schema/index.d.mts +12 -0
  578. package/src/foundry/common/prosemirror/schema/link-mark.d.mts +30 -0
  579. package/src/foundry/common/prosemirror/schema/lists.d.mts +55 -0
  580. package/src/foundry/common/prosemirror/schema/marks.d.mts +44 -0
  581. package/src/foundry/common/prosemirror/schema/other.d.mts +149 -0
  582. package/src/foundry/common/prosemirror/schema/schema-definition.d.mts +39 -0
  583. package/src/foundry/common/prosemirror/schema/secret-node.d.mts +27 -0
  584. package/src/foundry/common/prosemirror/schema/tables.d.mts +106 -0
  585. package/src/foundry/common/prosemirror/schema/utils.d.mts +37 -0
  586. package/src/foundry/common/prosemirror/schema.d.mts +138 -0
  587. package/src/foundry/common/prosemirror/string-serializer.d.mts +120 -0
  588. package/src/foundry/common/prosemirror/util.d.mts +43 -0
  589. package/src/foundry/common/types.d.mts +74 -0
  590. package/src/foundry/common/utils/bitmask.d.mts +110 -0
  591. package/src/foundry/common/utils/collection.d.mts +176 -0
  592. package/src/foundry/common/utils/color.d.mts +299 -0
  593. package/src/foundry/common/utils/event-emitter.d.mts +62 -0
  594. package/src/foundry/common/utils/geometry.d.mts +198 -0
  595. package/src/foundry/common/utils/helpers.d.mts +752 -0
  596. package/src/foundry/common/utils/http.d.mts +52 -0
  597. package/src/foundry/common/utils/iterable-weak-map.d.mts +80 -0
  598. package/src/foundry/common/utils/iterable-weak-set.d.mts +47 -0
  599. package/src/foundry/common/utils/logging.d.mts +42 -0
  600. package/src/foundry/common/utils/module.d.mts +18 -0
  601. package/src/foundry/common/utils/semaphore.d.mts +82 -0
  602. package/src/foundry/common/utils/string-tree.d.mts +95 -0
  603. package/src/foundry/common/utils/word-tree.d.mts +66 -0
  604. package/src/foundry/index.d.mts +5 -0
  605. package/src/foundry/public/index.d.mts +1 -0
  606. package/src/foundry/public/scripts/earcut-edges/earcut-edges.d.mts +11 -0
  607. package/src/foundry/public/scripts/earcut-edges/index.d.mts +1 -0
  608. package/src/foundry/public/scripts/index.d.mts +1 -0
  609. package/src/index.d.mts +2 -0
  610. package/src/types/augments/index.d.mts +4 -0
  611. package/src/types/augments/pixi.d.mts +99 -0
  612. package/src/types/augments/simple-peer.d.mts +13 -0
  613. package/src/types/augments/socket.io-client.d.mts +12 -0
  614. package/src/types/augments/tinyMCE.d.mts +72 -0
  615. package/src/types/config.d.mts +331 -0
  616. package/src/types/documentConfiguration.d.mts +606 -0
  617. package/src/types/helperTypes.d.mts +389 -0
  618. package/src/types/index.d.mts +4 -0
  619. package/src/types/utils.d.mts +520 -0
  620. package/index-lenient.d.ts +0 -10
  621. package/index.d.ts +0 -4
  622. package/src/foundry/client/apps/app.d.ts +0 -560
  623. package/src/foundry/client/apps/av/av-config.d.ts +0 -85
  624. package/src/foundry/client/apps/av/cameras.d.ts +0 -174
  625. package/src/foundry/client/apps/av/index.d.ts +0 -3
  626. package/src/foundry/client/apps/form.d.ts +0 -384
  627. package/src/foundry/client/apps/forms/actor.d.ts +0 -192
  628. package/src/foundry/client/apps/forms/card-config.d.ts +0 -51
  629. package/src/foundry/client/apps/forms/cards-config.d.ts +0 -128
  630. package/src/foundry/client/apps/forms/combat-config.d.ts +0 -41
  631. package/src/foundry/client/apps/forms/combatant-config.d.ts +0 -49
  632. package/src/foundry/client/apps/forms/effect-config.d.ts +0 -65
  633. package/src/foundry/client/apps/forms/folder-config.d.ts +0 -63
  634. package/src/foundry/client/apps/forms/grid-config.d.ts +0 -151
  635. package/src/foundry/client/apps/forms/image-popout.d.ts +0 -166
  636. package/src/foundry/client/apps/forms/index.d.ts +0 -20
  637. package/src/foundry/client/apps/forms/item.d.ts +0 -71
  638. package/src/foundry/client/apps/forms/journal-sheet.d.ts +0 -107
  639. package/src/foundry/client/apps/forms/macro-config.d.ts +0 -71
  640. package/src/foundry/client/apps/forms/measure-template.d.ts +0 -53
  641. package/src/foundry/client/apps/forms/permission.d.ts +0 -58
  642. package/src/foundry/client/apps/forms/playlist-config.d.ts +0 -43
  643. package/src/foundry/client/apps/forms/playlist-sound-config.d.ts +0 -61
  644. package/src/foundry/client/apps/forms/roll-table-config.d.ts +0 -175
  645. package/src/foundry/client/apps/forms/scene-config.d.ts +0 -148
  646. package/src/foundry/client/apps/forms/sheet-config.d.ts +0 -184
  647. package/src/foundry/client/apps/forms/user-config.d.ts +0 -74
  648. package/src/foundry/client/apps/hud/chatbubble.d.ts +0 -89
  649. package/src/foundry/client/apps/hud/container.d.ts +0 -46
  650. package/src/foundry/client/apps/hud/controls.d.ts +0 -156
  651. package/src/foundry/client/apps/hud/hotbar.d.ts +0 -143
  652. package/src/foundry/client/apps/hud/hud.d.ts +0 -84
  653. package/src/foundry/client/apps/hud/index.d.ts +0 -9
  654. package/src/foundry/client/apps/hud/menu.d.ts +0 -71
  655. package/src/foundry/client/apps/hud/navigation.d.ts +0 -110
  656. package/src/foundry/client/apps/hud/pause.d.ts +0 -20
  657. package/src/foundry/client/apps/hud/players.d.ts +0 -55
  658. package/src/foundry/client/apps/i18n.d.ts +0 -136
  659. package/src/foundry/client/apps/index.d.ts +0 -9
  660. package/src/foundry/client/apps/placeables/drawing-config.d.ts +0 -99
  661. package/src/foundry/client/apps/placeables/drawing-hud.d.ts +0 -32
  662. package/src/foundry/client/apps/placeables/index.d.ts +0 -10
  663. package/src/foundry/client/apps/placeables/light-config.d.ts +0 -95
  664. package/src/foundry/client/apps/placeables/note-config.d.ts +0 -57
  665. package/src/foundry/client/apps/placeables/sound-config.d.ts +0 -47
  666. package/src/foundry/client/apps/placeables/tile-config.d.ts +0 -55
  667. package/src/foundry/client/apps/placeables/tile-hud.d.ts +0 -37
  668. package/src/foundry/client/apps/placeables/token-config.d.ts +0 -226
  669. package/src/foundry/client/apps/placeables/token-hud.d.ts +0 -140
  670. package/src/foundry/client/apps/placeables/wall-config.d.ts +0 -75
  671. package/src/foundry/client/apps/sidebar/apps/chat-popout.d.ts +0 -34
  672. package/src/foundry/client/apps/sidebar/apps/client-settings.d.ts +0 -116
  673. package/src/foundry/client/apps/sidebar/apps/compendium.d.ts +0 -86
  674. package/src/foundry/client/apps/sidebar/apps/controls-reference.d.ts +0 -30
  675. package/src/foundry/client/apps/sidebar/apps/index.d.ts +0 -10
  676. package/src/foundry/client/apps/sidebar/apps/invitation-links.d.ts +0 -37
  677. package/src/foundry/client/apps/sidebar/apps/keybindings-config.d.ts +0 -247
  678. package/src/foundry/client/apps/sidebar/apps/module-management.d.ts +0 -120
  679. package/src/foundry/client/apps/sidebar/apps/permission-config.d.ts +0 -64
  680. package/src/foundry/client/apps/sidebar/apps/support-details.d.ts +0 -76
  681. package/src/foundry/client/apps/sidebar/apps/world-config.d.ts +0 -77
  682. package/src/foundry/client/apps/sidebar/index.d.ts +0 -5
  683. package/src/foundry/client/apps/sidebar/sidebar.d.ts +0 -102
  684. package/src/foundry/client/apps/sidebar/tab-base.d.ts +0 -68
  685. package/src/foundry/client/apps/sidebar/tab-directory.d.ts +0 -236
  686. package/src/foundry/client/apps/sidebar/tabs/actors-directory.d.ts +0 -16
  687. package/src/foundry/client/apps/sidebar/tabs/cards-directory.d.ts +0 -6
  688. package/src/foundry/client/apps/sidebar/tabs/chat-log.d.ts +0 -351
  689. package/src/foundry/client/apps/sidebar/tabs/combat-tracker.d.ts +0 -205
  690. package/src/foundry/client/apps/sidebar/tabs/compendium-directory.d.ts +0 -77
  691. package/src/foundry/client/apps/sidebar/tabs/index.d.ts +0 -12
  692. package/src/foundry/client/apps/sidebar/tabs/items-directory.d.ts +0 -10
  693. package/src/foundry/client/apps/sidebar/tabs/journal-directory.d.ts +0 -11
  694. package/src/foundry/client/apps/sidebar/tabs/macros-directory.d.ts +0 -12
  695. package/src/foundry/client/apps/sidebar/tabs/playlists-directory.d.ts +0 -306
  696. package/src/foundry/client/apps/sidebar/tabs/roll-table-directory.d.ts +0 -9
  697. package/src/foundry/client/apps/sidebar/tabs/scenes-directory.d.ts +0 -18
  698. package/src/foundry/client/apps/sidebar/tabs/settings.d.ts +0 -88
  699. package/src/foundry/client/apps/templates.d.ts +0 -425
  700. package/src/foundry/client/audio/audio.d.ts +0 -343
  701. package/src/foundry/client/audio/container.d.ts +0 -175
  702. package/src/foundry/client/audio/index.d.ts +0 -3
  703. package/src/foundry/client/audio/sound.d.ts +0 -303
  704. package/src/foundry/client/av/client.d.ts +0 -158
  705. package/src/foundry/client/av/clients/index.d.ts +0 -1
  706. package/src/foundry/client/av/clients/simplepeer.d.ts +0 -151
  707. package/src/foundry/client/av/index.d.ts +0 -4
  708. package/src/foundry/client/av/master.d.ts +0 -187
  709. package/src/foundry/client/av/settings.d.ts +0 -236
  710. package/src/foundry/client/config.d.ts +0 -1425
  711. package/src/foundry/client/core/gamepad.d.ts +0 -53
  712. package/src/foundry/client/core/hooks.d.ts +0 -967
  713. package/src/foundry/client/core/image.d.ts +0 -129
  714. package/src/foundry/client/core/index.d.ts +0 -13
  715. package/src/foundry/client/core/keybindings.d.ts +0 -298
  716. package/src/foundry/client/core/keyboard.d.ts +0 -247
  717. package/src/foundry/client/core/mouse.d.ts +0 -18
  718. package/src/foundry/client/core/nue.d.ts +0 -34
  719. package/src/foundry/client/core/settings.d.ts +0 -222
  720. package/src/foundry/client/core/socket.d.ts +0 -46
  721. package/src/foundry/client/core/sorting.d.ts +0 -78
  722. package/src/foundry/client/core/time.d.ts +0 -67
  723. package/src/foundry/client/core/utils.d.ts +0 -33
  724. package/src/foundry/client/core/video.d.ts +0 -65
  725. package/src/foundry/client/data/abstract/canvas-document.d.ts +0 -70
  726. package/src/foundry/client/data/abstract/client-backend.d.ts +0 -206
  727. package/src/foundry/client/data/abstract/client-document.d.ts +0 -439
  728. package/src/foundry/client/data/abstract/document-collection.d.ts +0 -192
  729. package/src/foundry/client/data/abstract/index.d.ts +0 -5
  730. package/src/foundry/client/data/abstract/world-collection.d.ts +0 -167
  731. package/src/foundry/client/data/collections/actors.d.ts +0 -35
  732. package/src/foundry/client/data/collections/cards.d.ts +0 -8
  733. package/src/foundry/client/data/collections/combats.d.ts +0 -43
  734. package/src/foundry/client/data/collections/compendium.d.ts +0 -321
  735. package/src/foundry/client/data/collections/fog.d.ts +0 -7
  736. package/src/foundry/client/data/collections/folder.d.ts +0 -27
  737. package/src/foundry/client/data/collections/index.d.ts +0 -15
  738. package/src/foundry/client/data/collections/items.d.ts +0 -10
  739. package/src/foundry/client/data/collections/journal.d.ts +0 -26
  740. package/src/foundry/client/data/collections/macros.d.ts +0 -26
  741. package/src/foundry/client/data/collections/messages.d.ts +0 -39
  742. package/src/foundry/client/data/collections/playlists.d.ts +0 -41
  743. package/src/foundry/client/data/collections/scenes.d.ts +0 -62
  744. package/src/foundry/client/data/collections/settings.d.ts +0 -25
  745. package/src/foundry/client/data/collections/tables.d.ts +0 -17
  746. package/src/foundry/client/data/collections/users.d.ts +0 -43
  747. package/src/foundry/client/data/documents/active-effect.d.ts +0 -172
  748. package/src/foundry/client/data/documents/actor.d.ts +0 -231
  749. package/src/foundry/client/data/documents/ambient-light.d.ts +0 -18
  750. package/src/foundry/client/data/documents/ambient-sound.d.ts +0 -9
  751. package/src/foundry/client/data/documents/card.d.ts +0 -133
  752. package/src/foundry/client/data/documents/cards.d.ts +0 -376
  753. package/src/foundry/client/data/documents/chat-message.d.ts +0 -267
  754. package/src/foundry/client/data/documents/combat.d.ts +0 -227
  755. package/src/foundry/client/data/documents/combatant.d.ts +0 -104
  756. package/src/foundry/client/data/documents/drawing.d.ts +0 -19
  757. package/src/foundry/client/data/documents/fog-exploration.d.ts +0 -64
  758. package/src/foundry/client/data/documents/folder.d.ts +0 -115
  759. package/src/foundry/client/data/documents/index.d.ts +0 -27
  760. package/src/foundry/client/data/documents/item.d.ts +0 -59
  761. package/src/foundry/client/data/documents/journal-entry.d.ts +0 -71
  762. package/src/foundry/client/data/documents/macro.d.ts +0 -60
  763. package/src/foundry/client/data/documents/measured-template.d.ts +0 -21
  764. package/src/foundry/client/data/documents/note.d.ts +0 -19
  765. package/src/foundry/client/data/documents/playlist-sound.d.ts +0 -117
  766. package/src/foundry/client/data/documents/playlist.d.ts +0 -192
  767. package/src/foundry/client/data/documents/scene.d.ts +0 -465
  768. package/src/foundry/client/data/documents/setting.d.ts +0 -35
  769. package/src/foundry/client/data/documents/table-result.d.ts +0 -30
  770. package/src/foundry/client/data/documents/table.d.ts +0 -220
  771. package/src/foundry/client/data/documents/tile.d.ts +0 -13
  772. package/src/foundry/client/data/documents/token.d.ts +0 -281
  773. package/src/foundry/client/data/documents/user.d.ts +0 -155
  774. package/src/foundry/client/data/documents/wall.d.ts +0 -9
  775. package/src/foundry/client/data/index.d.ts +0 -3
  776. package/src/foundry/client/dice/dice/coin.d.ts +0 -49
  777. package/src/foundry/client/dice/dice/die.d.ts +0 -230
  778. package/src/foundry/client/dice/dice/fate.d.ts +0 -37
  779. package/src/foundry/client/dice/dice/index.d.ts +0 -3
  780. package/src/foundry/client/dice/index.d.ts +0 -5
  781. package/src/foundry/client/dice/roll.d.ts +0 -495
  782. package/src/foundry/client/dice/term.d.ts +0 -123
  783. package/src/foundry/client/dice/terms/dice.d.ts +0 -277
  784. package/src/foundry/client/dice/terms/index.d.ts +0 -7
  785. package/src/foundry/client/dice/terms/math.d.ts +0 -69
  786. package/src/foundry/client/dice/terms/numeric.d.ts +0 -53
  787. package/src/foundry/client/dice/terms/operator.d.ts +0 -18
  788. package/src/foundry/client/dice/terms/parenthetical.d.ts +0 -51
  789. package/src/foundry/client/dice/terms/pool.d.ts +0 -235
  790. package/src/foundry/client/dice/terms/string.d.ts +0 -31
  791. package/src/foundry/client/dice/twister.d.ts +0 -134
  792. package/src/foundry/client/game.d.ts +0 -682
  793. package/src/foundry/client/head.d.ts +0 -44
  794. package/src/foundry/client/index.d.ts +0 -12
  795. package/src/foundry/client/pixi/board.d.ts +0 -632
  796. package/src/foundry/client/pixi/core/containers/cached-container.d.ts +0 -64
  797. package/src/foundry/client/pixi/core/containers/index.d.ts +0 -3
  798. package/src/foundry/client/pixi/core/containers/quadtree.d.ts +0 -166
  799. package/src/foundry/client/pixi/core/containers/sampler-mesh.d.ts +0 -22
  800. package/src/foundry/client/pixi/core/culling.d.ts +0 -37
  801. package/src/foundry/client/pixi/core/index.d.ts +0 -5
  802. package/src/foundry/client/pixi/core/interaction/canvas-animation.d.ts +0 -148
  803. package/src/foundry/client/pixi/core/interaction/control-icon.d.ts +0 -58
  804. package/src/foundry/client/pixi/core/interaction/index.d.ts +0 -5
  805. package/src/foundry/client/pixi/core/interaction/mouse-handler.d.ts +0 -323
  806. package/src/foundry/client/pixi/core/interaction/resize-handle.d.ts +0 -48
  807. package/src/foundry/client/pixi/core/interaction/targets.d.ts +0 -51
  808. package/src/foundry/client/pixi/core/loader.d.ts +0 -157
  809. package/src/foundry/client/pixi/core/shapes/index.d.ts +0 -5
  810. package/src/foundry/client/pixi/core/shapes/normalized-rectangle.d.ts +0 -31
  811. package/src/foundry/client/pixi/core/shapes/polygon-helpers.d.ts +0 -263
  812. package/src/foundry/client/pixi/core/shapes/precise-text.d.ts +0 -18
  813. package/src/foundry/client/pixi/core/shapes/ray.d.ts +0 -200
  814. package/src/foundry/client/pixi/core/shapes/source-polygon.d.ts +0 -110
  815. package/src/foundry/client/pixi/groups/effects.d.ts +0 -29
  816. package/src/foundry/client/pixi/groups/index.d.ts +0 -3
  817. package/src/foundry/client/pixi/groups/interface.d.ts +0 -27
  818. package/src/foundry/client/pixi/groups/primary.d.ts +0 -40
  819. package/src/foundry/client/pixi/index.d.ts +0 -10
  820. package/src/foundry/client/pixi/layer.d.ts +0 -105
  821. package/src/foundry/client/pixi/layers/controls/cursor.d.ts +0 -27
  822. package/src/foundry/client/pixi/layers/controls/door.d.ts +0 -67
  823. package/src/foundry/client/pixi/layers/controls/hud.d.ts +0 -117
  824. package/src/foundry/client/pixi/layers/controls/index.d.ts +0 -4
  825. package/src/foundry/client/pixi/layers/controls/ruler.d.ts +0 -207
  826. package/src/foundry/client/pixi/layers/controls.d.ts +0 -144
  827. package/src/foundry/client/pixi/layers/drawings.d.ts +0 -116
  828. package/src/foundry/client/pixi/layers/effects/effect.d.ts +0 -133
  829. package/src/foundry/client/pixi/layers/effects/index.d.ts +0 -4
  830. package/src/foundry/client/pixi/layers/effects/leaves.d.ts +0 -79
  831. package/src/foundry/client/pixi/layers/effects/rain.d.ts +0 -107
  832. package/src/foundry/client/pixi/layers/effects/snow.d.ts +0 -62
  833. package/src/foundry/client/pixi/layers/effects.d.ts +0 -61
  834. package/src/foundry/client/pixi/layers/grid/grid.d.ts +0 -171
  835. package/src/foundry/client/pixi/layers/grid/hex.d.ts +0 -118
  836. package/src/foundry/client/pixi/layers/grid/highlight.d.ts +0 -28
  837. package/src/foundry/client/pixi/layers/grid/index.d.ts +0 -4
  838. package/src/foundry/client/pixi/layers/grid/square.d.ts +0 -48
  839. package/src/foundry/client/pixi/layers/grid.d.ts +0 -204
  840. package/src/foundry/client/pixi/layers/index.d.ts +0 -15
  841. package/src/foundry/client/pixi/layers/lighting.d.ts +0 -229
  842. package/src/foundry/client/pixi/layers/map.d.ts +0 -263
  843. package/src/foundry/client/pixi/layers/notes.d.ts +0 -64
  844. package/src/foundry/client/pixi/layers/sight.d.ts +0 -313
  845. package/src/foundry/client/pixi/layers/sounds.d.ts +0 -112
  846. package/src/foundry/client/pixi/layers/templates.d.ts +0 -51
  847. package/src/foundry/client/pixi/layers/tokens.d.ts +0 -169
  848. package/src/foundry/client/pixi/layers/walls.d.ts +0 -321
  849. package/src/foundry/client/pixi/perception/clockwise-sweep.d.ts +0 -406
  850. package/src/foundry/client/pixi/perception/index.d.ts +0 -2
  851. package/src/foundry/client/pixi/perception/perception-manager.d.ts +0 -107
  852. package/src/foundry/client/pixi/placeable.d.ts +0 -414
  853. package/src/foundry/client/pixi/placeables/drawing.d.ts +0 -289
  854. package/src/foundry/client/pixi/placeables/index.d.ts +0 -8
  855. package/src/foundry/client/pixi/placeables/light.d.ts +0 -126
  856. package/src/foundry/client/pixi/placeables/note.d.ts +0 -67
  857. package/src/foundry/client/pixi/placeables/sound.d.ts +0 -131
  858. package/src/foundry/client/pixi/placeables/template.d.ts +0 -153
  859. package/src/foundry/client/pixi/placeables/tile.d.ts +0 -315
  860. package/src/foundry/client/pixi/placeables/token.d.ts +0 -722
  861. package/src/foundry/client/pixi/placeables/wall.d.ts +0 -268
  862. package/src/foundry/client/pixi/placeables.d.ts +0 -520
  863. package/src/foundry/client/pixi/sources/base-source.d.ts +0 -145
  864. package/src/foundry/client/pixi/sources/index.d.ts +0 -4
  865. package/src/foundry/client/pixi/sources/light-source.d.ts +0 -413
  866. package/src/foundry/client/pixi/sources/sound-source.d.ts +0 -45
  867. package/src/foundry/client/pixi/sources/vision-source.d.ts +0 -123
  868. package/src/foundry/client/pixi/webgl/base.d.ts +0 -69
  869. package/src/foundry/client/pixi/webgl/blend_modes.d.ts +0 -33
  870. package/src/foundry/client/pixi/webgl/filters.d.ts +0 -182
  871. package/src/foundry/client/pixi/webgl/index.d.ts +0 -5
  872. package/src/foundry/client/pixi/webgl/lighting.d.ts +0 -480
  873. package/src/foundry/client/pixi/webgl/sampler.d.ts +0 -19
  874. package/src/foundry/client/ui/context.d.ts +0 -136
  875. package/src/foundry/client/ui/dialog.d.ts +0 -286
  876. package/src/foundry/client/ui/drag.d.ts +0 -105
  877. package/src/foundry/client/ui/dragdrop.d.ts +0 -118
  878. package/src/foundry/client/ui/editor.d.ts +0 -321
  879. package/src/foundry/client/ui/filepicker.d.ts +0 -510
  880. package/src/foundry/client/ui/filter.d.ts +0 -106
  881. package/src/foundry/client/ui/forms.d.ts +0 -47
  882. package/src/foundry/client/ui/index.d.ts +0 -10
  883. package/src/foundry/client/ui/notifications.d.ts +0 -110
  884. package/src/foundry/client/ui/tabs.d.ts +0 -103
  885. package/src/foundry/common/abstract/backend.mjs.d.ts +0 -253
  886. package/src/foundry/common/abstract/data.mjs.d.ts +0 -316
  887. package/src/foundry/common/abstract/document.mjs.d.ts +0 -838
  888. package/src/foundry/common/abstract/embedded-collection.mjs.d.ts +0 -79
  889. package/src/foundry/common/abstract/module.mjs.d.ts +0 -6
  890. package/src/foundry/common/config.mjs/index.d.ts +0 -1
  891. package/src/foundry/common/config.mjs/releaseData.d.ts +0 -100
  892. package/src/foundry/common/constants.mjs.d.ts +0 -940
  893. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +0 -168
  894. package/src/foundry/common/data/data.mjs/actorData.d.ts +0 -219
  895. package/src/foundry/common/data/data.mjs/adventureData.d.ts +0 -166
  896. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +0 -154
  897. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +0 -195
  898. package/src/foundry/common/data/data.mjs/animationData.d.ts +0 -91
  899. package/src/foundry/common/data/data.mjs/cardData.d.ts +0 -264
  900. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +0 -67
  901. package/src/foundry/common/data/data.mjs/cardsData.d.ts +0 -237
  902. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +0 -220
  903. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +0 -80
  904. package/src/foundry/common/data/data.mjs/combatData.d.ts +0 -149
  905. package/src/foundry/common/data/data.mjs/combatantData.d.ts +0 -136
  906. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +0 -55
  907. package/src/foundry/common/data/data.mjs/drawingData.d.ts +0 -407
  908. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +0 -80
  909. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +0 -109
  910. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +0 -115
  911. package/src/foundry/common/data/data.mjs/folderData.d.ts +0 -155
  912. package/src/foundry/common/data/data.mjs/index.d.ts +0 -31
  913. package/src/foundry/common/data/data.mjs/itemData.d.ts +0 -184
  914. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +0 -132
  915. package/src/foundry/common/data/data.mjs/lightData.d.ts +0 -227
  916. package/src/foundry/common/data/data.mjs/macroData.d.ts +0 -199
  917. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +0 -212
  918. package/src/foundry/common/data/data.mjs/noteData.d.ts +0 -233
  919. package/src/foundry/common/data/data.mjs/playlistData.d.ts +0 -201
  920. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +0 -159
  921. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +0 -75
  922. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +0 -189
  923. package/src/foundry/common/data/data.mjs/sceneData.d.ts +0 -665
  924. package/src/foundry/common/data/data.mjs/settingData.d.ts +0 -86
  925. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +0 -167
  926. package/src/foundry/common/data/data.mjs/tileData.d.ts +0 -246
  927. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +0 -62
  928. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +0 -47
  929. package/src/foundry/common/data/data.mjs/tokenData.d.ts +0 -505
  930. package/src/foundry/common/data/data.mjs/userData.d.ts +0 -177
  931. package/src/foundry/common/data/data.mjs/videoData.d.ts +0 -70
  932. package/src/foundry/common/data/data.mjs/wallData.d.ts +0 -222
  933. package/src/foundry/common/data/fields.mjs.d.ts +0 -526
  934. package/src/foundry/common/data/module.mjs.d.ts +0 -3
  935. package/src/foundry/common/data/validators.mjs.d.ts +0 -56
  936. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +0 -44
  937. package/src/foundry/common/documents.mjs/baseActor.d.ts +0 -68
  938. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +0 -38
  939. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +0 -31
  940. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +0 -29
  941. package/src/foundry/common/documents.mjs/baseCard.d.ts +0 -58
  942. package/src/foundry/common/documents.mjs/baseCards.d.ts +0 -39
  943. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +0 -49
  944. package/src/foundry/common/documents.mjs/baseCombat.d.ts +0 -40
  945. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +0 -48
  946. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +0 -54
  947. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +0 -41
  948. package/src/foundry/common/documents.mjs/baseFolder.d.ts +0 -30
  949. package/src/foundry/common/documents.mjs/baseItem.d.ts +0 -57
  950. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +0 -26
  951. package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -42
  952. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +0 -66
  953. package/src/foundry/common/documents.mjs/baseNote.d.ts +0 -39
  954. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +0 -32
  955. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +0 -37
  956. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +0 -31
  957. package/src/foundry/common/documents.mjs/baseScene.d.ts +0 -120
  958. package/src/foundry/common/documents.mjs/baseSetting.d.ts +0 -38
  959. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +0 -52
  960. package/src/foundry/common/documents.mjs/baseTile.d.ts +0 -29
  961. package/src/foundry/common/documents.mjs/baseToken.d.ts +0 -44
  962. package/src/foundry/common/documents.mjs/baseUser.d.ts +0 -102
  963. package/src/foundry/common/documents.mjs/baseWall.d.ts +0 -43
  964. package/src/foundry/common/documents.mjs/index.d.ts +0 -28
  965. package/src/foundry/common/module.mjs.d.ts +0 -114
  966. package/src/foundry/common/packages.mjs/index.d.ts +0 -8
  967. package/src/foundry/common/packages.mjs/moduleData.d.ts +0 -55
  968. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +0 -58
  969. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +0 -88
  970. package/src/foundry/common/packages.mjs/packageData.d.ts +0 -319
  971. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +0 -69
  972. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +0 -75
  973. package/src/foundry/common/packages.mjs/systemData.d.ts +0 -58
  974. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +0 -9
  975. package/src/foundry/common/packages.mjs/worldData.d.ts +0 -76
  976. package/src/foundry/common/types.mjs.d.ts +0 -299
  977. package/src/foundry/common/utils/collection.mjs.d.ts +0 -151
  978. package/src/foundry/common/utils/geometry.mjs.d.ts +0 -148
  979. package/src/foundry/common/utils/helpers.mjs.d.ts +0 -498
  980. package/src/foundry/common/utils/http.mjs.d.ts +0 -52
  981. package/src/foundry/common/utils/module.mjs.d.ts +0 -5
  982. package/src/foundry/common/utils/primitives.mjs.d.ts +0 -287
  983. package/src/foundry/common/utils/semaphore.mjs.d.ts +0 -83
  984. package/src/foundry/index.d.ts +0 -3
  985. package/src/foundry/templates/index.d.ts +0 -1
  986. package/src/foundry/templates/views/layouts/main.hbs.d.ts +0 -11
  987. package/src/index.d.ts +0 -2
  988. package/src/types/augments/index.d.ts +0 -6
  989. package/src/types/augments/pixiGraphicsSmooth.d.ts +0 -7
  990. package/src/types/augments/pixiLegacyGraphics.d.ts +0 -7
  991. package/src/types/augments/pixiParticles.d.ts +0 -7
  992. package/src/types/augments/simple-peer.d.ts +0 -13
  993. package/src/types/augments/socket.io-client.d.ts +0 -12
  994. package/src/types/augments/tinyMCE.d.ts +0 -82
  995. package/src/types/config.d.ts +0 -183
  996. package/src/types/helperTypes.d.ts +0 -151
  997. package/src/types/index.d.ts +0 -3
  998. package/src/types/utils.d.ts +0 -143
  999. /package/src/foundry/client/apps/av/{camera-popout.d.ts → camera-popout.d.mts} +0 -0
  1000. /package/src/foundry/client/{tail.d.ts → tail.d.mts} +0 -0
@@ -0,0 +1,1409 @@
1
+ import type {
2
+ ConfiguredDocuments,
3
+ ConfiguredMetadata,
4
+ DefaultDocuments,
5
+ ConstructorData,
6
+ } from "../../../types/documentConfiguration.d.mts";
7
+ import type {
8
+ DatabaseOperationsFor,
9
+ GetKey,
10
+ InterfaceToObject,
11
+ MakeConform,
12
+ MustConform,
13
+ ToMethod,
14
+ } from "../../../types/helperTypes.mts";
15
+ import type {
16
+ AnyObject,
17
+ DeepPartial,
18
+ EmptyObject,
19
+ InexactPartial,
20
+ RemoveIndexSignatures,
21
+ } from "../../../types/utils.mts";
22
+ import type { documents } from "../../client-esm/client.d.mts";
23
+ import type * as CONST from "../constants.mts";
24
+ import type { DataField, EmbeddedCollectionField, EmbeddedDocumentField } from "../data/fields.d.mts";
25
+ import type { fields } from "../data/module.mts";
26
+ import type { LogCompatibilityWarningOptions } from "../utils/logging.mts";
27
+ import type {
28
+ DatabaseCreateOperation,
29
+ DatabaseDeleteOperation,
30
+ DatabaseGetOperation,
31
+ DatabaseUpdateOperation,
32
+ } from "./_types.d.mts";
33
+ import type DataModel from "./data.mts";
34
+
35
+ export default Document;
36
+
37
+ declare const __DocumentBrand: unique symbol;
38
+
39
+ declare const __Schema: unique symbol;
40
+ declare const __Parent: unique symbol;
41
+
42
+ type _ClassMustBeAssignableToInternal = MustConform<typeof Document, Document.Internal.Constructor>;
43
+ type _InstanceMustBeAssignableToInternal = MustConform<Document.Any, Document.Internal.Instance.Any>;
44
+
45
+ /**
46
+ * An extension of the base DataModel which defines a Document.
47
+ * Documents are special in that they are persisted to the database and referenced by _id.
48
+ */
49
+ declare abstract class Document<
50
+ DocumentName extends Document.Type,
51
+ Schema extends DataSchema,
52
+ Parent extends Document.Any | null = null,
53
+ > extends DataModel<Schema, Parent, InterfaceToObject<Document.ConstructionContext<Parent>>> {
54
+ static [__DocumentBrand]: never;
55
+
56
+ [__Schema]: Schema;
57
+ [__Parent]: Parent;
58
+
59
+ /**
60
+ * @param data - Initial data provided to construct the Document
61
+ * @param context - Construction context options
62
+ */
63
+ constructor(data?: fields.SchemaField.InnerConstructorType<Schema>, context?: Document.ConstructionContext<Parent>);
64
+
65
+ override parent: Parent;
66
+
67
+ protected override _configure(options?: {
68
+ pack?: string | null | undefined;
69
+ parentCollection?: string | null | undefined;
70
+ }): void;
71
+
72
+ /**
73
+ * An immutable reverse-reference to the name of the collection that this Document exists in on its parent, if any.
74
+ */
75
+ readonly parentCollection: string | null;
76
+
77
+ /**
78
+ * An immutable reference to a containing Compendium collection to which this Document belongs.
79
+ */
80
+ readonly pack: string | null;
81
+
82
+ /**
83
+ * A mapping of embedded Document collections which exist in this model.
84
+ */
85
+ readonly collections: Document.CollectionRecord<Schema>;
86
+
87
+ /**
88
+ * Ensure that all Document classes share the same schema of their base declaration.
89
+ */
90
+ static get schema(): foundry.data.fields.SchemaField.Any;
91
+
92
+ protected _initialize(options?: any): void;
93
+
94
+ /**
95
+ * A mapping of singleton embedded Documents which exist in this model.
96
+ */
97
+ readonly singletons: Record<string, Document.AnyChild<this>>;
98
+
99
+ protected static override _initializationOrder(): Generator<[string, DataField.Any]>;
100
+
101
+ /**
102
+ * Default metadata which applies to each instance of this Document type.
103
+ * @defaultValue
104
+ * ```typescript
105
+ * {
106
+ * name: "Document",
107
+ * collection: "documents",
108
+ * indexed: false,
109
+ * compendiumIndexFields: [],
110
+ * label: "DOCUMENT.Document",
111
+ * coreTypes: [],
112
+ * embedded: {},
113
+ * permissions: {
114
+ * create: "ASSISTANT",
115
+ * update: "ASSISTANT",
116
+ * delete: "ASSISTANT"
117
+ * },
118
+ * preserveOnImport: ["_id", "sort", "ownership"],
119
+ * schemaVersion: undefined
120
+ * }
121
+ * ```
122
+ */
123
+ static metadata: Readonly<Document.Metadata.Any>;
124
+
125
+ /**
126
+ * The database backend used to execute operations and handle results
127
+ */
128
+ static get database(): CONFIG["DatabaseBackend"];
129
+
130
+ /**
131
+ * Return a reference to the implemented subclass of this base document type.
132
+ */
133
+ // Referencing the concrete class the config is not possible because accessors cannot be generic and there is not
134
+ // static polymorphic this type
135
+ static get implementation(): Document.AnyConstructor;
136
+
137
+ /**
138
+ * The base document definition that this document class extends from.
139
+ */
140
+ static get baseDocument(): Document.AnyConstructor;
141
+
142
+ /**
143
+ * The named collection to which this Document belongs.
144
+ */
145
+ static get collectionName(): string;
146
+
147
+ /**
148
+ * The named collection to which this Document belongs.
149
+ */
150
+ get collectionName(): Document.Internal.SimpleMetadata<DocumentName>["collection"];
151
+
152
+ /**
153
+ * The canonical name of this Document type, for example "Actor".
154
+ */
155
+ static get documentName(): string;
156
+
157
+ /**
158
+ * The canonical name of this Document type, for example "Actor".
159
+ */
160
+ get documentName(): Document.Internal.SimpleMetadata<DocumentName>["name"];
161
+
162
+ /**
163
+ * The allowed types which may exist for this Document class
164
+ * @remarks Document.TYPES is overly generic so subclasses don't cause problems
165
+ */
166
+ static get TYPES(): string[];
167
+
168
+ /**
169
+ * Does this Document support additional subtypes?
170
+ */
171
+ static get hasTypeData(): boolean;
172
+
173
+ /**
174
+ * The Embedded Document hierarchy for this Document.
175
+ */
176
+ static get hierarchy(): Record<string, EmbeddedCollectionField<any, any> | EmbeddedDocumentField<any>>;
177
+
178
+ /**
179
+ * Identify the collection in a parent Document that this Document exists belongs to, if any.
180
+ * @param parentCollection - An explicitly provided parent collection name.
181
+ */
182
+ _getParentCollection(parentCollection?: string): string | null;
183
+
184
+ /**
185
+ * The canonical identifier for this Document
186
+ */
187
+ get id(): string | null;
188
+
189
+ /**
190
+ * Test whether this Document is embedded within a parent Document
191
+ */
192
+ get isEmbedded(): boolean;
193
+
194
+ /**
195
+ * A Universally Unique Identifier (uuid) for this Document instance.
196
+ */
197
+ get uuid(): string;
198
+
199
+ /**
200
+ * Test whether a given User has a sufficient role in order to create Documents of this type in general.
201
+ * @param user - The User being tested
202
+ * @returns Does the User have a sufficient role to create?
203
+ */
204
+ static canUserCreate(user: foundry.documents.BaseUser): boolean;
205
+
206
+ /**
207
+ * Get the explicit permission level that a specific User has over this Document, a value in CONST.DOCUMENT_OWNERSHIP_LEVELS.
208
+ * This method returns the value recorded in Document ownership, regardless of the User's role.
209
+ * To test whether a user has a certain capability over the document, testUserPermission should be used.
210
+ * @param user - The User being tested
211
+ * (default: `game.user`)
212
+ * @returns A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS or null
213
+ */
214
+ getUserLevel(user?: foundry.documents.BaseUser): CONST.DOCUMENT_OWNERSHIP_LEVELS | null;
215
+
216
+ /**
217
+ * Test whether a certain User has a requested permission level (or greater) over the Document
218
+ * @param user - The User being tested
219
+ * @param permission - The permission level from DOCUMENT_PERMISSION_LEVELS to test
220
+ * @param options - Additional options involved in the permission test
221
+ * @returns Does the user have this permission level over the Document?
222
+ */
223
+ testUserPermission(
224
+ user: foundry.documents.BaseUser,
225
+ permission: keyof typeof CONST.DOCUMENT_OWNERSHIP_LEVELS | CONST.DOCUMENT_OWNERSHIP_LEVELS,
226
+ options?: InexactPartial<{
227
+ /**
228
+ * Require the exact permission level requested?
229
+ * @defaultValue `false`
230
+ */
231
+ exact: boolean;
232
+ }>,
233
+ ): boolean;
234
+
235
+ /**
236
+ * Test whether a given User has permission to perform some action on this Document
237
+ * @param user - The User attempting modification
238
+ * @param action - The attempted action
239
+ * @param data - Data involved in the attempted action
240
+ * (default: `{}`)
241
+ * @returns Does the User have permission?
242
+ */
243
+ canUserModify(user: foundry.documents.BaseUser, action: "create" | "update" | "delete", data?: object): boolean;
244
+
245
+ /**
246
+ * Clone a document, creating a new document by combining current data with provided overrides.
247
+ * The cloned document is ephemeral and not yet saved to the database.
248
+ * @param data - Additional data which overrides current document data at the time of creation
249
+ * @param context - Additional context options passed to the create method
250
+ * @returns The cloned Document instance
251
+ */
252
+ override clone<Save extends boolean = false>(
253
+ data?: fields.SchemaField.AssignmentType<Schema, EmptyObject>,
254
+ context?: InexactPartial<
255
+ {
256
+ /**
257
+ * Save the clone to the World database?
258
+ * @defaultValue `false`
259
+ */
260
+ save: Save;
261
+
262
+ /**
263
+ * Keep the same ID of the original document
264
+ * @defaultValue `false`
265
+ */
266
+ keepId: boolean;
267
+
268
+ /**
269
+ * Track the clone source
270
+ * @defaultValue `false`
271
+ */
272
+ addSource: boolean;
273
+ } & Document.ConstructionContext<this["parent"]>
274
+ >, // FIXME(LukeAbby): Adding Document.Stored to the return causes a recursive type error in Scene
275
+ ): Save extends true ? Promise<this> : this;
276
+
277
+ /**
278
+ * For Documents which include game system data, migrate the system data object to conform to its latest data model.
279
+ * The data model is defined by the template.json specification included by the game system.
280
+ * @returns The migrated system data object
281
+ */
282
+ migrateSystemData(): object;
283
+
284
+ override toObject(source: true): this["_source"];
285
+ override toObject(source?: boolean): ReturnType<this["schema"]["toObject"]>;
286
+
287
+ /**
288
+ * Create multiple Documents using provided input data.
289
+ * Data is provided as an array of objects where each individual object becomes one new Document.
290
+ *
291
+ * @param data - An array of data objects or existing Documents to persist.
292
+ * (default: `[]`)
293
+ * @param operation - Parameters of the requested creation operation
294
+ * (default: `{}`)
295
+ * @returns An array of created Document instances
296
+ *
297
+ * @example Create a single Document
298
+ * ```typescript
299
+ * const data = [{name: "New Actor", type: "character", img: "path/to/profile.jpg"}];
300
+ * const created = await Actor.createDocuments(data);
301
+ * ```
302
+ *
303
+ * @example Create multiple Documents
304
+ * ```typescript
305
+ * const data = [{name: "Tim", type: "npc"], [{name: "Tom", type: "npc"}];
306
+ * const created = await Actor.createDocuments(data);
307
+ * ```
308
+ *
309
+ * @example Create multiple embedded Documents within a parent
310
+ * ```typescript
311
+ * const actor = game.actors.getName("Tim");
312
+ * const data = [{name: "Sword", type: "weapon"}, {name: "Breastplate", type: "equipment"}];
313
+ * const created = await Item.createDocuments(data, {parent: actor});
314
+ * ```
315
+ *
316
+ * @example Create a Document within a Compendium pack
317
+ * ```typescript
318
+ * const data = [{name: "Compendium Actor", type: "character", img: "path/to/profile.jpg"}];
319
+ * const created = await Actor.createDocuments(data, {pack: "mymodule.mypack"});
320
+ * ```
321
+ */
322
+ static createDocuments<T extends Document.AnyConstructor, Temporary extends boolean | undefined>(
323
+ this: T,
324
+ data: Array<Document.ConstructorDataFor<T>>,
325
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<T["metadata"]["name"], "create">, "data">> & {
326
+ temporary?: Temporary;
327
+ },
328
+ ): Promise<Document.ToStoredIf<T, Temporary>[] | undefined>;
329
+
330
+ /**
331
+ * Update multiple Document instances using provided differential data.
332
+ * Data is provided as an array of objects where each individual object updates one existing Document.
333
+ *
334
+ * @param updates - An array of differential data objects, each used to update a single Document
335
+ * (default: `[]`)
336
+ * @param operation - Parameters of the database update operation
337
+ * (default: `{}`)
338
+ * @returns An array of updated Document instances
339
+ *
340
+ * @example Update a single Document
341
+ * ```typescript
342
+ * const updates = [{_id: "12ekjf43kj2312ds", name: "Timothy"}];
343
+ * const updated = await Actor.updateDocuments(updates);
344
+ * ```
345
+ *
346
+ * @example Update multiple Documents
347
+ * ```typescript
348
+ * const updates = [{_id: "12ekjf43kj2312ds", name: "Timothy"}, {_id: "kj549dk48k34jk34", name: "Thomas"}]};
349
+ * const updated = await Actor.updateDocuments(updates);
350
+ * ```
351
+ *
352
+ * @example Update multiple embedded Documents within a parent
353
+ * ```typescript
354
+ * const actor = game.actors.getName("Timothy");
355
+ * const updates = [{_id: sword.id, name: "Magic Sword"}, {_id: shield.id, name: "Magic Shield"}];
356
+ * const updated = await Item.updateDocuments(updates, {parent: actor});
357
+ * ```
358
+ *
359
+ * @example Update Documents within a Compendium pack
360
+ * ```typescript
361
+ * const actor = await pack.getDocument(documentId);
362
+ * const updated = await Actor.updateDocuments([{_id: actor.id, name: "New Name"}], {pack: "mymodule.mypack"});
363
+ * ```
364
+ */
365
+ static updateDocuments<T extends Document.AnyConstructor>(
366
+ this: T,
367
+ updates?: Array<DeepPartial<Document.UpdateDataFor<T>>>,
368
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<InstanceType<T>["documentName"], "update">, "updates">>,
369
+ ): Promise<Document.ToConfiguredInstance<T>[]>;
370
+
371
+ /**
372
+ * Delete one or multiple existing Documents using an array of provided ids.
373
+ * Data is provided as an array of string ids for the documents to delete.
374
+ *
375
+ * @param ids - An array of string ids for the documents to be deleted
376
+ * (default: `[]`)
377
+ * @param operation - Parameters of the database deletion operation
378
+ * (default: `{}`)
379
+ * @returns An array of deleted Document instances
380
+ *
381
+ * @example Delete a single Document
382
+ * ```typescript
383
+ * const tim = game.actors.getName("Tim");
384
+ * const deleted = await Actor.deleteDocuments([tim.id]);
385
+ * ```
386
+ *
387
+ * @example Delete multiple Documents
388
+ * ```typescript
389
+ * const tim = game.actors.getName("Tim");
390
+ * const tom = game.actors.getName("Tom");
391
+ * const deleted = await Actor.deleteDocuments([tim.id, tom.id]);
392
+ * ```
393
+ *
394
+ * @example Delete multiple embedded Documents within a parent
395
+ * ```typescript
396
+ * const tim = game.actors.getName("Tim");
397
+ * const sword = tim.items.getName("Sword");
398
+ * const shield = tim.items.getName("Shield");
399
+ * const deleted = await Item.deleteDocuments([sword.id, shield.id], parent: actor});
400
+ * ```
401
+ *
402
+ * @example Delete Documents within a Compendium pack
403
+ * ```typescript
404
+ * const actor = await pack.getDocument(documentId);
405
+ * const deleted = await Actor.deleteDocuments([actor.id], {pack: "mymodule.mypack"});
406
+ * ```
407
+ */
408
+ static deleteDocuments<T extends Document.AnyConstructor>(
409
+ this: T,
410
+ ids?: string[],
411
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<InstanceType<T>["documentName"], "delete">, "ids">>,
412
+ ): Promise<Document.ToConfiguredInstance<T>[]>;
413
+
414
+ /**
415
+ * Create a new Document using provided input data, saving it to the database.
416
+ * @see {@link Document.createDocuments}
417
+ * @param data - Initial data used to create this Document, or a Document instance to persist.
418
+ * @param operation - Parameters of the creation operation
419
+ * (default: `{}`)
420
+ * @returns The created Document instance
421
+ *
422
+ * @example Create a World-level Item
423
+ * ```typescript
424
+ * const data = [{name: "Special Sword", type: "weapon"}];
425
+ * const created = await Item.create(data);
426
+ * ```
427
+ *
428
+ * @example Create an Actor-owned Item
429
+ * ```typescript
430
+ * const data = [{name: "Special Sword", type: "weapon"}];
431
+ * const actor = game.actors.getName("My Hero");
432
+ * const created = await Item.create(data, {parent: actor});
433
+ * ```
434
+ *
435
+ * @example Create an Item in a Compendium pack
436
+ * ```typescript
437
+ * const data = [{name: "Special Sword", type: "weapon"}];
438
+ * const created = await Item.create(data, {pack: "mymodule.mypack"});
439
+ * ```
440
+ *
441
+ * @remarks If no document has actually been created, the returned {@link Promise} resolves to `undefined`.
442
+ */
443
+ static create<T extends Document.AnyConstructor, Temporary extends boolean | undefined>(
444
+ this: T,
445
+ data: Document.ConstructorDataFor<T> | Document.ConstructorDataFor<T>[],
446
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<T["metadata"]["name"], "create">, "data">> & {
447
+ temporary?: Temporary;
448
+ },
449
+ ): Promise<Document.ToStoredIf<T, Temporary> | undefined>;
450
+
451
+ /**
452
+ * Update this Document using incremental data, saving it to the database.
453
+ * @see {@link Document.updateDocuments}
454
+ * @param data - Differential update data which modifies the existing values of this document data
455
+ * (default: `{}`)
456
+ * @param operation - Parameters of the update operation
457
+ * (default: `{}`)
458
+ * @returns The updated Document instance
459
+ *
460
+ * @remarks If no document has actually been updated, the returned {@link Promise} resolves to `undefined`.
461
+ */
462
+ update(
463
+ // TODO: Determine if this is Partial, DeepPartial, or InexactPartial.
464
+ data?: Partial<Document.ConstructorDataForSchema<Schema>>,
465
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<DocumentName, "update">, "updates">>,
466
+ ): Promise<this | undefined>;
467
+
468
+ /**
469
+ * Delete this Document, removing it from the database.
470
+ * @see {@link Document.deleteDocuments}
471
+ * @param operation - Parameters of the deletion operation
472
+ * (default: `{}`)
473
+ * @returns The deleted Document instance
474
+ *
475
+ * @remarks If no document has actually been deleted, the returned {@link Promise} resolves to `undefined`.
476
+ */
477
+ delete(
478
+ operation?: InexactPartial<Omit<DatabaseOperationsFor<DocumentName, "delete">, "ids">>,
479
+ ): Promise<this | undefined>;
480
+
481
+ /**
482
+ * Get a World-level Document of this type by its id.
483
+ * @param documentId - The Document ID
484
+ * @param options - Additional options which customize the request
485
+ * @returns The retrieved Document, or null
486
+ */
487
+ static get(documentId: string, options?: InexactPartial<DatabaseGetOperation>): Document.Any | null;
488
+
489
+ /**
490
+ * A compatibility method that returns the appropriate name of an embedded collection within this Document.
491
+ * @param name - An existing collection name or a document name.
492
+ * @returns The provided collection name if it exists, the first available collection for the
493
+ * document name provided, or null if no appropriate embedded collection could be found.
494
+ * @example Passing an existing collection name.
495
+ * ```js
496
+ * Actor.getCollectionName("items");
497
+ * // returns "items"
498
+ * ```
499
+ *
500
+ * @example Passing a document name.
501
+ * ```js
502
+ * Actor.getCollectionName("Item");
503
+ * // returns "items"
504
+ * ```
505
+ */
506
+ static getCollectionName(name: string): string | null;
507
+
508
+ /**
509
+ * Obtain a reference to the Array of source data within the data object for a certain embedded Document name
510
+ * @param embeddedName - The name of the embedded Document type
511
+ * @returns The Collection instance of embedded Documents of the requested type
512
+ * @remarks Usually returns some form of DocumentCollection, but not always (e.g. Token["actors"])
513
+ */
514
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
515
+ getEmbeddedCollection<
516
+ EmbeddedName extends Exclude<foundry.CONST.EMBEDDED_DOCUMENT_TYPES, "Region" | "RegionBehavior">,
517
+ >(embeddedName: EmbeddedName): Collection<Document.ConfiguredInstanceForName<EmbeddedName>>;
518
+
519
+ /**
520
+ * Get an embedded document by its id from a named collection in the parent document.
521
+ * @param embeddedName - The name of the embedded Document type
522
+ * @param id - The id of the child document to retrieve
523
+ * @param options - Additional options which modify how embedded documents are retrieved
524
+ * @returns The retrieved embedded Document instance, or undefined
525
+ * @throws If the embedded collection does not exist, or if strict is true and the Embedded Document could not be found.
526
+ */
527
+ getEmbeddedDocument(
528
+ embeddedName: string,
529
+ id: string,
530
+ options: InexactPartial<{
531
+ /**
532
+ * Throw an Error if the requested id does not exist. See Collection#get
533
+ * @defaultValue `false`
534
+ */
535
+ strict: boolean;
536
+ /**
537
+ * Allow retrieving an invalid Embedded Document.
538
+ * @defaultValue `false`
539
+ */
540
+ invalid: boolean;
541
+ }>,
542
+ ): Document.AnyChild<this> | undefined;
543
+
544
+ /**
545
+ * Create multiple embedded Document instances within this parent Document using provided input data.
546
+ * @see {@link Document.createDocuments}
547
+ * @param embeddedName - The name of the embedded Document type
548
+ * @param data - An array of data objects used to create multiple documents
549
+ * (default: `[]`)
550
+ * @param operation - Parameters of the database creation workflow
551
+ * (default: `{}`)
552
+ * @returns An array of created Document instances
553
+ */
554
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
555
+ // TODO: I think we could do a better job on all the embedded methods of limiting the types here based on the
556
+ // allowed embedded types of the parent (vs. allowing any document to create embedded
557
+ // documents of any type)
558
+ createEmbeddedDocuments<
559
+ EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES,
560
+ Temporary extends boolean | undefined,
561
+ >(
562
+ embeddedName: EmbeddedName,
563
+ data?: Array<Document.ConstructorDataForName<Extract<EmbeddedName, Document.Type>>>,
564
+ operation?: InexactPartial<DatabaseOperationsFor<Extract<EmbeddedName, Document.Type>, "create">> & {
565
+ temporary?: Temporary;
566
+ },
567
+ ): Promise<Array<Document.ConfiguredInstanceForName<Extract<EmbeddedName, Document.Type>>> | undefined>;
568
+
569
+ /**
570
+ * Update multiple embedded Document instances within a parent Document using provided differential data.
571
+ * @see {@link Document.updateDocuments}
572
+ * @param embeddedName - The name of the embedded Document type
573
+ * @param updates - An array of differential data objects, each used to update a single Document
574
+ * (default: `[]`)
575
+ * @param operation - Parameters of the database update workflow
576
+ * (default: `{}`)
577
+ * @returns An array of updated Document instances
578
+ */
579
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
580
+ updateEmbeddedDocuments<EmbeddedName extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES>(
581
+ embeddedName: EmbeddedName,
582
+ updates?: Array<AnyObject>,
583
+ context?: Document.ModificationContext<this["parent"]>,
584
+ ): Promise<Array<Document.Stored<Document.ConfiguredInstanceForName<Extract<EmbeddedName, Document.Type>>>>>;
585
+
586
+ /**
587
+ * Delete multiple embedded Document instances within a parent Document using provided string ids.
588
+ * @see {@link Document.deleteDocuments}
589
+ * @param embeddedName - The name of the embedded Document type
590
+ * @param ids - An array of string ids for each Document to be deleted
591
+ * @param operation - Parameters of the database deletion workflow
592
+ * (default: `{}`)
593
+ * @returns An array of deleted Document instances
594
+ */
595
+ // TODO: After regions are defined, change first parameter to `extends foundry.CONST.EMBEDDED_DOCUMENT_TYPES`
596
+ deleteEmbeddedDocuments<
597
+ EmbeddedName extends Exclude<foundry.CONST.EMBEDDED_DOCUMENT_TYPES, "Region" | "RegionBehavior">,
598
+ >(
599
+ embeddedName: EmbeddedName,
600
+ ids: Array<string>,
601
+ operation?: DatabaseOperationsFor<DocumentName, "delete">,
602
+ ): Promise<Array<Document.Stored<Document.ConfiguredInstanceForName<EmbeddedName>>>>;
603
+
604
+ /**
605
+ * Iterate over all embedded Documents that are hierarchical children of this Document.
606
+ * @param _parentPath - A parent field path already traversed
607
+ * @remarks Not called within Foundry's client-side code, likely exists for server documents
608
+ */
609
+ traverseEmbeddedDocuments(_parentPath?: string): Generator<[string, Document.Any]>;
610
+
611
+ /**
612
+ * Get the value of a "flag" for this document
613
+ * See the setFlag method for more details on flags
614
+ *
615
+ * @param scope - The flag scope which namespaces the key
616
+ * @param key - The flag key
617
+ * @returns The flag value
618
+ */
619
+ getFlag<
620
+ S extends Document.FlagKeyOf<Document.ConfiguredFlagsForName<DocumentName>>,
621
+ K extends Document.FlagKeyOf<Document.FlagGetKey<Document.ConfiguredFlagsForName<DocumentName>, S>>,
622
+ >(scope: S, key: K): Document.GetFlag<DocumentName, S, K>;
623
+
624
+ /**
625
+ * Assign a "flag" to this document.
626
+ * Flags represent key-value type data which can be used to store flexible or arbitrary data required by either
627
+ * the core software, game systems, or user-created modules.
628
+ *
629
+ * Each flag should be set using a scope which provides a namespace for the flag to help prevent collisions.
630
+ *
631
+ * Flags set by the core software use the "core" scope.
632
+ * Flags set by game systems or modules should use the canonical name attribute for the module
633
+ * Flags set by an individual world should "world" as the scope.
634
+ *
635
+ * Flag values can assume almost any data type. Setting a flag value to null will delete that flag.
636
+ *
637
+ * @param scope - The flag scope which namespaces the key
638
+ * @param key - The flag key
639
+ * @param value - The flag value
640
+ * @returns A Promise resolving to the updated document
641
+ */
642
+ setFlag<
643
+ S extends Document.FlagKeyOf<Document.ConfiguredFlagsForName<DocumentName>>,
644
+ K extends Document.FlagKeyOf<Document.FlagGetKey<Document.ConfiguredFlagsForName<DocumentName>, S>>,
645
+ V extends Document.GetFlag<DocumentName, S, K>,
646
+ >(scope: S, key: K, value: V): Promise<this>;
647
+
648
+ /**
649
+ * Remove a flag assigned to the document
650
+ * @param scope - The flag scope which namespaces the key
651
+ * @param key - The flag key
652
+ * @returns The updated document instance
653
+ */
654
+ unsetFlag(scope: string, key: string): Promise<this>;
655
+
656
+ /**
657
+ * Pre-process a creation operation for a single Document instance.
658
+ * Pre-operation events only occur for the client which requested the operation.
659
+ * Modifications to the pending Document instance must be performed using {@link Document#updateSource}.
660
+ * @param data - The initial data object provided to the document creation request
661
+ * @param options - Additional options which modify the creation request
662
+ * @param user - The User requesting the document creation
663
+ * @returns Return false to exclude this Document from the creation operation
664
+ */
665
+ protected _preCreate(
666
+ data: fields.SchemaField.AssignmentType<Schema>,
667
+ options: Document.PreCreateOptions<DocumentName>,
668
+ user: foundry.documents.BaseUser,
669
+ ): Promise<boolean | void>;
670
+
671
+ /**
672
+ * Post-process a creation operation for a single Document instance.
673
+ * Post-operation events occur for all connected clients.
674
+ * @param data - The initial data object provided to the document creation request
675
+ * @param options - Additional options which modify the creation request
676
+ * @param userId - The id of the User requesting the document update
677
+ */
678
+ protected _onCreate(
679
+ data: fields.SchemaField.InnerAssignmentType<Schema>,
680
+ options: Document.OnCreateOptions<DocumentName>,
681
+ userId: string,
682
+ ): void;
683
+
684
+ /**
685
+ * Pre-process a creation operation, potentially altering its instructions or input data. Pre-operation events only
686
+ * occur for the client which requested the operation.
687
+ *
688
+ * This batch-wise workflow occurs after individual {@link Document#_preCreate} workflows and provides a final
689
+ * pre-flight check before a database operation occurs.
690
+ *
691
+ * Modifications to pending documents must mutate the documents array or alter individual document instances using
692
+ * {@link Document#updateSource}.
693
+ * @param documents - Pending document instances ot be created
694
+ * @param operation - Parameters of the database creation operation
695
+ * @param user - The User requesting the creation operation
696
+ * @returns Return false to cancel the creation operation entirely
697
+ */
698
+ protected static _preCreateOperation<T extends Document.AnyConstructor>(
699
+ this: T,
700
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
701
+ operation: DatabaseOperationsFor<T["metadata"]["name"], "create">,
702
+ user: foundry.documents.BaseUser,
703
+ ): Promise<boolean | void>;
704
+
705
+ /**
706
+ * Post-process a creation operation, reacting to database changes which have occurred. Post-operation events occur
707
+ * for all connected clients.
708
+ *
709
+ * This batch-wise workflow occurs after individual {@link Document#_onCreate} workflows.
710
+ *
711
+ * @param documents - The Document instances which were created
712
+ * @param operation - Parameters of the database creation operation
713
+ * @param user - The User who performed the creation operation
714
+ */
715
+ protected static _onCreateOperation<T extends Document.AnyConstructor>(
716
+ this: T,
717
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
718
+ operation: DatabaseOperationsFor<T["metadata"]["name"], "create">,
719
+ user: foundry.documents.BaseUser,
720
+ ): Promise<void>;
721
+
722
+ /**
723
+ * Perform preliminary operations before a Document of this type is updated.
724
+ * Pre-update operations only occur for the client which requested the operation.
725
+ * @param changed - The differential data that is changed relative to the documents prior values
726
+ * @param options - Additional options which modify the update request
727
+ * @param user - The User requesting the document update
728
+ * @returns A return value of false indicates the update operation should be cancelled
729
+ */
730
+ protected _preUpdate(
731
+ changed: fields.SchemaField.AssignmentType<Schema>,
732
+ options: Document.PreUpdateOptions<DocumentName>,
733
+ user: foundry.documents.BaseUser,
734
+ ): Promise<boolean | void>;
735
+
736
+ /**
737
+ * Perform follow-up operations after a Document of this type is updated.
738
+ * Post-update operations occur for all clients after the update is broadcast.
739
+ * @param changed - The differential data that was changed relative to the documents prior values
740
+ * @param options - Additional options which modify the update request
741
+ * @param userId - The id of the User requesting the document update
742
+ */
743
+ protected _onUpdate(
744
+ changed: fields.SchemaField.InnerAssignmentType<Schema>,
745
+ options: Document.OnUpdateOptions<DocumentName>,
746
+ userId: string,
747
+ ): void;
748
+
749
+ /**
750
+ * Pre-process an update operation, potentially altering its instructions or input data. Pre-operation events only
751
+ * occur for the client which requested the operation.
752
+ *
753
+ * This batch-wise workflow occurs after individual {@link Document#_preUpdate} workflows and provides a final
754
+ * pre-flight check before a database operation occurs.
755
+ *
756
+ * Modifications to the requested updates are performed by mutating the data array of the operation.
757
+ * {@link Document#updateSource}.
758
+ *
759
+ * @param documents - Document instances to be updated
760
+ * @param operation - Parameters of the database update operation
761
+ * @param user - The User requesting the update operation
762
+ * @returns Return false to cancel the update operation entirely
763
+ */
764
+ protected static _preUpdateOperation<T extends Document.AnyConstructor>(
765
+ this: T,
766
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
767
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "update">,
768
+ user: foundry.documents.BaseUser,
769
+ ): Promise<boolean | void>;
770
+
771
+ /**
772
+ * Post-process an update operation, reacting to database changes which have occurred. Post-operation events occur
773
+ * for all connected clients.
774
+ *
775
+ * This batch-wise workflow occurs after individual {@link Document#_onUpdate} workflows.
776
+ *
777
+ * @param documents - The Document instances which were updated
778
+ * @param operation - Parameters of the database update operation
779
+ * @param user - The User who performed the update operation
780
+ */
781
+ protected static _onUpdateOperation<T extends Document.AnyConstructor>(
782
+ this: T,
783
+ documents: InstanceType<Document.ConfiguredClass<T>>[],
784
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "update">,
785
+ user: foundry.documents.BaseUser,
786
+ ): Promise<void>;
787
+
788
+ /**
789
+ * Perform preliminary operations before a Document of this type is deleted.
790
+ * Pre-delete operations only occur for the client which requested the operation.
791
+ * @param options - Additional options which modify the deletion request
792
+ * @param user - The User requesting the document deletion
793
+ * @returns A return value of false indicates the delete operation should be cancelled
794
+ */
795
+ protected _preDelete(
796
+ options: Document.PreDeleteOptions<DocumentName>,
797
+ user: foundry.documents.BaseUser,
798
+ ): Promise<boolean | void>;
799
+
800
+ /**
801
+ * Perform follow-up operations after a Document of this type is deleted.
802
+ * Post-deletion operations occur for all clients after the deletion is broadcast.
803
+ * @param options - Additional options which modify the deletion request
804
+ * @param userId - The id of the User requesting the document update
805
+ */
806
+ protected _onDelete(options: Document.OnDeleteOptions<DocumentName>, userId: string): void;
807
+
808
+ /**
809
+ * Pre-process a deletion operation, potentially altering its instructions or input data. Pre-operation events only
810
+ * occur for the client which requested the operation.
811
+ *
812
+ * This batch-wise workflow occurs after individual {@link Document#_preDelete} workflows and provides a final
813
+ * pre-flight check before a database operation occurs.
814
+ *
815
+ * Modifications to the requested deletions are performed by mutating the operation object.
816
+ * {@link Document#updateSource}.
817
+ *
818
+ * @param documents - Document instances to be deleted
819
+ * @param operation - Parameters of the database update operation
820
+ * @param user - The User requesting the deletion operation
821
+ * @returns Return false to cancel the deletion operation entirely
822
+ * @internal
823
+ */
824
+ protected static _preDeleteOperation<T extends Document.AnyConstructor>(
825
+ this: T,
826
+ documents: Array<Document.ToConfiguredInstance<T>>,
827
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "delete">,
828
+ user: foundry.documents.BaseUser,
829
+ ): Promise<unknown>;
830
+
831
+ /**
832
+ * Post-process a deletion operation, reacting to database changes which have occurred. Post-operation events occur
833
+ * for all connected clients.
834
+ *
835
+ * This batch-wise workflow occurs after individual {@link Document#_onDelete} workflows.
836
+ *
837
+ * @param documents - The Document instances which were deleted
838
+ * @param operation - Parameters of the database deletion operation
839
+ * @param user - The User who performed the deletion operation
840
+ */
841
+ protected static _onDeleteOperation<T extends Document.AnyConstructor>(
842
+ this: T,
843
+ documents: Array<Document.ToConfiguredInstance<T>>,
844
+ operation: DatabaseOperationsFor<InstanceType<T>["documentName"], "delete">,
845
+ user: foundry.documents.BaseUser,
846
+ ): Promise<unknown>;
847
+
848
+ /**
849
+ * Configure whether V10 Document Model migration warnings should be logged for this class.
850
+ */
851
+ static LOG_V10_COMPATIBILITY_WARNINGS: boolean;
852
+
853
+ /**
854
+ * @deprecated since v11, will be removed in v13
855
+ * @remarks "You are accessing `Document.hasSystemData` which is deprecated. Please use `Document.hasTypeData` instead."
856
+ */
857
+ static get hasSystemData(): boolean;
858
+
859
+ /**
860
+ * A reusable helper for adding migration shims.
861
+ */
862
+ protected static _addDataFieldShims(data: object, shims: object, options: object): unknown;
863
+
864
+ /**
865
+ * A reusable helper for adding a migration shim
866
+ */
867
+ protected static _addDataFieldShim(data: object, oldKey: string, newKey: string, options?: object): unknown;
868
+
869
+ /**
870
+ * Define a simple migration from one field name to another.
871
+ * The value of the data can be transformed during the migration by an optional application function.
872
+ * @param data - The data object being migrated
873
+ * @param oldKey - The old field name
874
+ * @param newKey - The new field name
875
+ * @param apply - An application function, otherwise the old value is applied
876
+ * @internal
877
+ */
878
+ protected static _addDataFieldMigration(
879
+ data: object,
880
+ oldKey: string,
881
+ newKey: string,
882
+ apply?: (data: object) => any,
883
+ ): unknown;
884
+
885
+ protected static _logDataFieldMigration(
886
+ oldKey: string,
887
+ newKey: string,
888
+ options?: LogCompatibilityWarningOptions,
889
+ ): void;
890
+
891
+ /**
892
+ * @deprecated since v12, will be removed in v14
893
+ * @remarks `"The Document._onCreateDocuments static method is deprecated in favor of Document._onCreateOperation"`
894
+ */
895
+ protected static _onCreateDocuments<T extends Document.AnyConstructor>(
896
+ this: T,
897
+ documents: Array<Document.ToConfiguredInstance<T>>,
898
+ context: Document.ModificationContext<Document.Any | null>,
899
+ ): Promise<void>;
900
+
901
+ /**
902
+ * @deprecated since v12, will be removed in v14
903
+ * @remarks `"The Document._onUpdateDocuments static method is deprecated in favor of Document._onUpdateOperation"`
904
+ */
905
+ protected static _onUpdateDocuments<T extends Document.AnyConstructor>(
906
+ this: T,
907
+ documents: Array<Document.ToConfiguredInstance<T>>,
908
+ context: Document.ModificationContext<Document.Any | null>,
909
+ ): Promise<unknown>;
910
+
911
+ /**
912
+ * @deprecated since v12, will be removed in v14
913
+ * @remarks `"The Document._onDeleteDocuments static method is deprecated in favor of Document._onDeleteOperation"`
914
+ */
915
+ protected static _onDeleteDocuments<T extends Document.AnyConstructor>(
916
+ this: T,
917
+ documents: Array<Document.ToConfiguredInstance<T>>,
918
+ context: Document.ModificationContext<Document.Any | null>,
919
+ ): Promise<unknown>;
920
+ }
921
+
922
+ declare abstract class AnyDocument extends Document<any, any, any> {
923
+ constructor(arg0: never, ...args: never[]);
924
+
925
+ // Note(LukeAbby): Specifically adding the `__DocumentBrand` should be redundant but in practice it seems to help tsc more efficiently deduce that it's actually inheriting from `Document`.
926
+ // This is odd but probably is because it bails from looking up the parent class properties at times or something.
927
+ static [__DocumentBrand]: never;
928
+
929
+ flags?: unknown;
930
+
931
+ getFlag(scope: never, key: never): any;
932
+ }
933
+
934
+ // Note(LukeAbby): The point of this class is to show up in intellisense.
935
+ // When something fails to be configured it should be replaced with `typeof ConfigurationFailure & typeof Item` or whatever the relevant class is.
936
+ // This helps to minimize the number of errors that appears in a repo with broken configuration as they can be very misleading and confusing.
937
+ declare abstract class ConfigurationFailure extends AnyDocument {}
938
+
939
+ declare namespace Document {
940
+ /** Any Document, except for Settings */
941
+ type Any = AnyDocument;
942
+
943
+ type Type =
944
+ | "ActiveEffect"
945
+ | "ActorDelta"
946
+ | "Actor"
947
+ | "Adventure"
948
+ | "Card"
949
+ | "Cards"
950
+ | "ChatMessage"
951
+ | "Combat"
952
+ | "Combatant"
953
+ | "FogExploration"
954
+ | "Folder"
955
+ | "Item"
956
+ | "JournalEntryPage"
957
+ | "JournalEntry"
958
+ | "Macro"
959
+ | "PlaylistSound"
960
+ | "Playlist"
961
+ | "RollTable"
962
+ | "Scene"
963
+ | "Setting"
964
+ | "TableResult"
965
+ | "User"
966
+ // All placeables also have a corresponding document class.
967
+ | PlaceableType;
968
+
969
+ type PlaceableType =
970
+ | "AmbientLight"
971
+ | "AmbientSound"
972
+ | "Drawing"
973
+ | "MeasuredTemplate"
974
+ | "Note"
975
+ | "Tile"
976
+ | "Token"
977
+ | "Wall";
978
+
979
+ type CoreTypesForName<Name extends Type> = string &
980
+ GetKey<Document.Internal.SimpleMetadata<Name>, "coreTypes", ["base"]>[number];
981
+
982
+ // TODO: Probably a way to auto-determine this
983
+ type SystemType =
984
+ | "ActiveEffect"
985
+ | "Actor"
986
+ | "Card"
987
+ | "Cards"
988
+ | "ChatMessage"
989
+ | "Combat"
990
+ | "Combatant"
991
+ | "Item"
992
+ | "JournalEntryPage";
993
+
994
+ type EmbeddableNamesFor<ConcreteDocument extends Document.Internal.Instance.Any> = {
995
+ [K in keyof ConfiguredDocuments]: IsParentOf<ConcreteDocument, InstanceType<ConfiguredDocuments[K]>> extends true
996
+ ? K
997
+ : never;
998
+ };
999
+
1000
+ type IsParentOf<
1001
+ ParentDocument extends Document.Internal.Instance.Any,
1002
+ ChildDocument extends Document.Internal.Instance.Any,
1003
+ > = ParentDocument extends Internal.ParentFor<ChildDocument> ? true : false;
1004
+
1005
+ // Documented at https://gist.github.com/LukeAbby/c7420b053d881db4a4d4496b95995c98
1006
+ namespace Internal {
1007
+ type SimpleMetadata<Name extends Document.Type> = ConfiguredMetadata<Document.Any>[Name];
1008
+
1009
+ type Constructor = (abstract new (arg0: never, ...args: never[]) => Instance.Any) & {
1010
+ [__DocumentBrand]: never;
1011
+ };
1012
+
1013
+ interface Instance<Schema extends DataSchema, Parent extends Document.Internal.Instance.Any | null> {
1014
+ [__Schema]: Schema;
1015
+ [__Parent]: Parent;
1016
+ }
1017
+
1018
+ type SchemaFor<ConcreteInstance extends Instance.Any> = ConcreteInstance[typeof __Schema];
1019
+
1020
+ type ParentFor<ConcreteInstance extends Instance.Any> = ConcreteInstance[typeof __Parent];
1021
+
1022
+ namespace Instance {
1023
+ type Any = Instance<any, any>;
1024
+
1025
+ type Complete<T extends Any> = T extends Document.Any ? T : never;
1026
+ }
1027
+ }
1028
+
1029
+ /** Any Document, that is a child of the given parent Document. */
1030
+ type AnyChild<Parent extends Any | null> = Document<any, any, Parent>;
1031
+
1032
+ type AnyConstructor = typeof AnyDocument;
1033
+
1034
+ /**
1035
+ * Returns the type of the constructor data for the given {@link foundry.abstract.Document}.
1036
+ */
1037
+ type ConstructorDataFor<T extends Document.Internal.Constructor> = ConstructorDataForSchema<
1038
+ T extends { defineSchema: () => infer R extends DataSchema } ? R : never
1039
+ >;
1040
+
1041
+ // TODO(LukeAbby): Actually make this distinguishable from `Document.ConstructorDataFor` and `Document.ConstructorDataForSchema`.
1042
+ type UpdateDataFor<T extends Document.Internal.Constructor> = ConstructorDataForSchema<
1043
+ T extends { defineSchema: () => infer R extends DataSchema } ? R : never
1044
+ >;
1045
+
1046
+ // These helper types exist to help break a loop
1047
+ type ConstructorDataForName<T extends Document.Type> = ConstructorData[T];
1048
+ type UpdateDataForName<T extends Document.Type> = ConstructorData[T];
1049
+
1050
+ type ConstructorDataForSchema<Schema extends DataSchema> =
1051
+ foundry.data.fields.SchemaField.InnerAssignmentType<Schema>;
1052
+
1053
+ type SystemConstructor = AnyConstructor & {
1054
+ metadata: { name: SystemType };
1055
+ };
1056
+
1057
+ type ConfiguredClass<T extends { metadata: Metadata.Any }> = ConfiguredClassForName<T["metadata"]["name"]>;
1058
+
1059
+ type ConfiguredClassForName<Name extends Type> = MakeConform<
1060
+ ConfiguredDocuments[Name],
1061
+ typeof ConfigurationFailure & DefaultDocuments[Name]
1062
+ >;
1063
+
1064
+ type SubTypesOf<T extends Type> =
1065
+ ConfiguredInstanceForName<T> extends { type: infer Types } ? Types : typeof foundry.CONST.BASE_DOCUMENT_TYPE;
1066
+
1067
+ type ToConfiguredClass<ConcreteDocument extends Document.Internal.Constructor> = MakeConform<
1068
+ ConfiguredDocuments[NameFor<ConcreteDocument>],
1069
+ typeof ConfigurationFailure & DefaultDocuments[NameFor<ConcreteDocument>]
1070
+ >;
1071
+
1072
+ type ToConfiguredInstance<ConcreteDocument extends Document.Internal.Constructor> = MakeConform<
1073
+ // NOTE(LukeAbby): This avoids calling `Document.ToConfiguredClass` because that checks the static side of the class which can be expensive and even lead to loops.
1074
+ InstanceType<ConfiguredDocuments[NameFor<ConcreteDocument>]>,
1075
+ ConfigurationFailure & InstanceType<DefaultDocuments[NameFor<ConcreteDocument>]>
1076
+ >;
1077
+
1078
+ type ToConfiguredStored<D extends Document.Internal.Constructor> = Stored<ToConfiguredInstance<D>>;
1079
+
1080
+ type Stored<D extends Document.Internal.Instance.Any> = D & {
1081
+ id: string;
1082
+ _id: string;
1083
+ _source: GetKey<D, "_source"> & { _id: string };
1084
+ };
1085
+
1086
+ type ToStoredIf<
1087
+ D extends Document.Internal.Constructor,
1088
+ Temporary extends boolean | undefined,
1089
+ > = Temporary extends true ? ToConfiguredStored<D> : ToConfiguredInstance<D>;
1090
+
1091
+ type Temporary<D extends Document.Internal.Instance.Any> = D extends Stored<infer U> ? U : D;
1092
+
1093
+ type NameFor<ConcreteDocument extends Document.Internal.Constructor> = ConcreteDocument extends {
1094
+ readonly metadata: { readonly name: infer Name extends Type };
1095
+ }
1096
+ ? Name
1097
+ : never;
1098
+
1099
+ type ConfiguredInstanceForName<Name extends Type> = MakeConform<
1100
+ InstanceType<ConfiguredDocuments[Name]>,
1101
+ Document.Any
1102
+ >;
1103
+
1104
+ type ConfiguredObjectClassForName<Name extends PlaceableType> = CONFIG[Name]["objectClass"];
1105
+ type ConfiguredObjectInstanceForName<Name extends PlaceableType> = InstanceType<CONFIG[Name]["objectClass"]>;
1106
+
1107
+ type ConfiguredDataForName<Name extends Type> = GetKey<DataConfig, Name, EmptyObject>;
1108
+
1109
+ type ConfiguredSourceForName<Name extends Type> = GetKey<SourceConfig, Name, EmptyObject>;
1110
+
1111
+ type ConfiguredFlagsForName<Name extends Type> = GetKey<FlagConfig, Name, EmptyObject>;
1112
+
1113
+ type ToObjectFalseType<T extends Document.Internal.Instance.Any> = T extends {
1114
+ toObject: (source: false) => infer U;
1115
+ }
1116
+ ? U
1117
+ : T;
1118
+
1119
+ type SchemaFor<ConcreteDocument extends Internal.Instance.Any> =
1120
+ ConcreteDocument extends Internal.Instance<infer Schema, any> ? Schema : never;
1121
+
1122
+ type MetadataFor<ConcreteDocument extends Document.Internal.Instance.Any> =
1123
+ ConfiguredMetadata<ConcreteDocument>[ConcreteDocument extends {
1124
+ readonly documentName: infer Name extends Document.Type;
1125
+ }
1126
+ ? Name
1127
+ : never];
1128
+
1129
+ type CollectionRecord<Schema extends DataSchema> = {
1130
+ [Key in keyof Schema]: Schema[Key] extends fields.EmbeddedCollectionField.Any ? Schema[Key] : never;
1131
+ };
1132
+
1133
+ type Flags<ConcreteDocument extends Internal.Instance.Any> = OptionsForSchema<SchemaFor<ConcreteDocument>>;
1134
+
1135
+ interface OptionsInFlags<Options extends DataFieldOptions.Any> {
1136
+ readonly flags?: DataField<Options, any>;
1137
+ }
1138
+
1139
+ // These types only exists to simplify solving the `Document` type. Using `Document.Flags<this>` means the constraint `this extends Document.Any` has to be proved.
1140
+ // This is much more complex than proving the constraint for `Document.FlagsInternal<Schema>` that `Schema extends DataSchema`.
1141
+
1142
+ // TODO: This needs to use the derived flags not just how they're initialized.
1143
+ type OptionsForSchema<Schema extends DataSchema> =
1144
+ RemoveIndexSignatures<Schema> extends OptionsInFlags<infer Options> ? DataField.InitializedType<Options> : never;
1145
+
1146
+ // Like `keyof` but handles properties desirable for flags:
1147
+ // - `never` returns `never` (instead of `PropertyKey`).
1148
+ // - `unknown` returns `string` (instead of `never`).
1149
+ // - Allows any key in a union of objects (instead of just the common keys).
1150
+ // - Strips out non string keys.
1151
+ type FlagKeyOf<T> = unknown extends T
1152
+ ? string
1153
+ : [T] extends [never]
1154
+ ? never
1155
+ : T extends unknown
1156
+ ? keyof T & string
1157
+ : never;
1158
+
1159
+ type FlagGetKey<T, K extends PropertyKey> = T extends unknown ? (K extends keyof T ? T[K] : never) : never;
1160
+
1161
+ // Note(LukeAbby): It's at times been very important for `GetFlag` to be covariant over `ConcreteSchema`.
1162
+ // If it isn't then issues arise where the `Document` type ends up becoming invaraint.
1163
+ // Currently it is actually contravariant over `ConcreteSchema` and this may cause issues (because of the usage of `keyof`).
1164
+ // Unfortunately it's not easy to avoid because the typical `GetKey` trick has issues between `never`, not defined at all, and `unknown` etc.
1165
+ type GetFlag<Name extends Document.Type, S extends string, K extends string> = FlagGetKey<
1166
+ FlagGetKey<Document.ConfiguredFlagsForName<Name>, S>,
1167
+ K
1168
+ >;
1169
+
1170
+ interface ConstructionContext<Parent extends Document.Any | null> {
1171
+ /**
1172
+ * The parent Document of this one, if this one is embedded
1173
+ * @defaultValue `null`
1174
+ */
1175
+ parent?: Parent | undefined;
1176
+
1177
+ /**
1178
+ * The compendium collection ID which contains this Document, if any
1179
+ * @defaultValue `null`
1180
+ */
1181
+ pack?: string | null | undefined;
1182
+
1183
+ /**
1184
+ * Whether to validate initial data strictly?
1185
+ * @defaultValue `true`
1186
+ */
1187
+ strict?: boolean | null | undefined;
1188
+
1189
+ /**
1190
+ * An immutable reverse-reference to the name of the collection that thi8s Document exists in on its parent, if any.
1191
+ */
1192
+ parentCollection?: string | null | undefined;
1193
+ }
1194
+
1195
+ interface ModificationContext<Parent extends Document.Any | null> {
1196
+ /**
1197
+ * A parent Document within which these Documents should be embedded
1198
+ */
1199
+ parent?: Parent | undefined;
1200
+
1201
+ /**
1202
+ * A Compendium pack identifier within which the Documents should be modified
1203
+ */
1204
+ pack?: string | undefined;
1205
+
1206
+ /**
1207
+ * Block the dispatch of preCreate hooks for this operation
1208
+ * @defaultValue `false`
1209
+ */
1210
+ noHook?: boolean | undefined;
1211
+
1212
+ /**
1213
+ * Return an index of the Document collection, used only during a get operation.
1214
+ * @defaultValue `false`
1215
+ */
1216
+ index?: boolean | undefined;
1217
+
1218
+ /**
1219
+ * An array of fields to retrieve when indexing the collection
1220
+ */
1221
+ indexFields?: string[] | undefined;
1222
+
1223
+ /**
1224
+ * When performing a creation operation, keep the provided _id instead of clearing it.
1225
+ * @defaultValue `false`
1226
+ */
1227
+ keepId?: boolean | undefined;
1228
+
1229
+ /**
1230
+ * When performing a creation operation, keep existing _id values of documents embedded within the one being
1231
+ * created instead of generating new ones.
1232
+ * @defaultValue `true`
1233
+ */
1234
+ keepEmbeddedIds?: boolean | undefined;
1235
+
1236
+ /**
1237
+ * Create a temporary document which is not saved to the database. Only used during creation.
1238
+ * @defaultValue `false`
1239
+ */
1240
+ temporary?: boolean | undefined;
1241
+
1242
+ /**
1243
+ * Automatically re-render existing applications associated with the document.
1244
+ * @defaultValue `true`
1245
+ */
1246
+ render?: boolean | undefined;
1247
+
1248
+ /**
1249
+ * Automatically create and render the Document sheet when the Document is first created.
1250
+ * @defaultValue `false`
1251
+ */
1252
+ renderSheet?: boolean | undefined;
1253
+
1254
+ /**
1255
+ * Difference each update object against current Document data to reduce the size of the transferred data. Only
1256
+ * used during update.
1257
+ * @defaultValue `true`
1258
+ */
1259
+ diff?: boolean | undefined;
1260
+
1261
+ /**
1262
+ * Merge objects recursively. If false, inner objects will be replaced explicitly. Use with caution!
1263
+ * @defaultValue `true`
1264
+ */
1265
+ recursive?: boolean | undefined;
1266
+
1267
+ /**
1268
+ * Is the operation undoing a previous operation, only used by embedded Documents within a Scene
1269
+ */
1270
+ isUndo?: boolean | undefined;
1271
+
1272
+ /**
1273
+ * Whether to delete all documents of a given type, regardless of the array of ids provided. Only used during a
1274
+ * delete operation.
1275
+ */
1276
+ deleteAll?: boolean | undefined;
1277
+ }
1278
+
1279
+ type ModificationOptions = Omit<Document.ModificationContext<Document.Any | null>, "parent" | "pack">;
1280
+
1281
+ type PreCreateOptions<Name extends Type> = Omit<
1282
+ DatabaseOperationsFor<Name, "create">,
1283
+ "data" | "noHook" | "pack" | "parent"
1284
+ >;
1285
+ type OnCreateOptions<Name extends Type> = Omit<
1286
+ DatabaseOperationsFor<Name, "create">,
1287
+ "pack" | "parentUuid" | "syntheticActorUpdate"
1288
+ >;
1289
+
1290
+ type PreUpdateOptions<Name extends Type> = Omit<
1291
+ DatabaseOperationsFor<Name, "update">,
1292
+ "updates" | "restoreDelta" | "noHook" | "parent" | "pack"
1293
+ >;
1294
+ type OnUpdateOptions<Name extends Type> = Omit<
1295
+ DatabaseOperationsFor<Name, "update">,
1296
+ "pack" | "parentUuid" | "syntheticActorUpdate"
1297
+ >;
1298
+
1299
+ type PreDeleteOptions<Name extends Type> = Omit<
1300
+ DatabaseOperationsFor<Name, "delete">,
1301
+ "ids" | "deleteAll" | "noHook" | "pack" | "parent"
1302
+ >;
1303
+ type OnDeleteOptions<Name extends Type> = Omit<
1304
+ DatabaseOperationsFor<Name, "delete">,
1305
+ "deleteAll" | "pack" | "parentUuid" | "syntheticActorUpdate"
1306
+ >;
1307
+
1308
+ type PreUpsertOptions<Name extends Type> = PreCreateOptions<Name> | PreUpdateOptions<Name>;
1309
+ type OnUpsertOptions<Name extends Type> = OnCreateOptions<Name> | OnUpdateOptions<Name>;
1310
+
1311
+ interface Metadata<out ThisType extends Document.Any> {
1312
+ readonly name: ThisType["documentName"];
1313
+ readonly collection: string;
1314
+ readonly indexed?: boolean | undefined;
1315
+ readonly compendiumIndexFields?: readonly string[] | undefined;
1316
+ readonly label: string;
1317
+ readonly coreTypes: readonly string[];
1318
+ readonly embedded: Record<string, string>;
1319
+ readonly permissions: {
1320
+ create:
1321
+ | string
1322
+ | ToMethod<
1323
+ (user: foundry.documents.BaseUser, doc: ThisType, data: Document.ConstructorDataForName<Type>) => boolean
1324
+ >;
1325
+ update:
1326
+ | string
1327
+ | ToMethod<
1328
+ (user: foundry.documents.BaseUser, doc: ThisType, data: Document.UpdateDataForName<Type>) => boolean
1329
+ >;
1330
+ delete: string | ToMethod<(user: foundry.documents.BaseUser, doc: ThisType, data: EmptyObject) => boolean>;
1331
+ };
1332
+ readonly preserveOnImport?: readonly string[] | undefined;
1333
+ readonly schemaVersion: string | undefined;
1334
+ readonly labelPlural: string; // This is not set for the Document class but every class that implements Document actually provides it.
1335
+ readonly types: readonly string[];
1336
+ readonly hasSystemData: boolean;
1337
+ }
1338
+
1339
+ namespace Metadata {
1340
+ type Any = Metadata<any>;
1341
+
1342
+ export interface Default {
1343
+ name: "Document";
1344
+ collection: "documents";
1345
+ label: "DOCUMENT.Document";
1346
+ coreTypes: [typeof foundry.CONST.BASE_DOCUMENT_TYPE];
1347
+ types: [];
1348
+ embedded: EmptyObject;
1349
+ hasSystemData: false;
1350
+ permissions: {
1351
+ create: "ASSISTANT";
1352
+ update: "ASSISTANT";
1353
+ delete: "ASSISTANT";
1354
+ };
1355
+ pack: null;
1356
+ }
1357
+ }
1358
+ }
1359
+
1360
+ export type Operation = "create" | "update" | "delete";
1361
+
1362
+ /* eslint-disable @typescript-eslint/no-empty-object-type */
1363
+ export interface DocumentDatabaseOperations<
1364
+ T extends Document.Internal.Instance.Any = Document.Internal.Instance.Any,
1365
+ ExtraCreateOptions extends AnyObject = {},
1366
+ ExtraUpdateOptions extends AnyObject = {},
1367
+ ExtraDeleteOptions extends AnyObject = {},
1368
+ > {
1369
+ create: DatabaseCreateOperation<T> & InexactPartial<ExtraCreateOptions>;
1370
+ update: DatabaseUpdateOperation<T> & InexactPartial<ExtraUpdateOptions>;
1371
+ delete: DatabaseDeleteOperation & InexactPartial<ExtraDeleteOptions>;
1372
+ }
1373
+ /* eslint-enable @typescript-eslint/no-empty-object-type */
1374
+
1375
+ export interface DatabaseOperationMap {
1376
+ ActiveEffect: ActiveEffect.DatabaseOperations;
1377
+ Actor: Actor.DatabaseOperations;
1378
+ ActorDelta: ActorDelta.DatabaseOperations;
1379
+ Adventure: Adventure.DatabaseOperations;
1380
+ AmbientLight: AmbientLightDocument.DatabaseOperations;
1381
+ AmbientSound: AmbientSoundDocument.DatabaseOperations;
1382
+ Card: Card.DatabaseOperations;
1383
+ Cards: Cards.DatabaseOperations;
1384
+ ChatMessage: ChatMessage.DatabaseOperations;
1385
+ Combat: Combat.DatabaseOperations;
1386
+ Combatant: Combatant.DatabaseOperations;
1387
+ Drawing: DrawingDocument.DatabaseOperations;
1388
+ FogExploration: FogExploration.DatabaseOperations;
1389
+ Folder: Folder.DatabaseOperations;
1390
+ Item: Item.DatabaseOperations;
1391
+ JournalEntry: JournalEntry.DatabaseOperations;
1392
+ JournalEntryPage: JournalEntryPage.DatabaseOperations;
1393
+ Macro: Macro.DatabaseOperations;
1394
+ MeasuredTemplate: MeasuredTemplateDocument.DatabaseOperations;
1395
+ Note: NoteDocument.DatabaseOperations;
1396
+ Playlist: Playlist.DatabaseOperations;
1397
+ PlaylistSound: PlaylistSound.DatabaseOperations;
1398
+ // TODO: Add these once documents are done
1399
+ // Region: ActiveEffect.DatabaseOperations;
1400
+ // RegionBehavior: ActiveEffect.DatabaseOperations;
1401
+ RollTable: RollTable.DatabaseOperations;
1402
+ Scene: Scene.DatabaseOperations;
1403
+ Setting: Setting.DatabaseOperations;
1404
+ TableResult: TableResult.DatabaseOperations;
1405
+ Tile: TileDocument.DatabaseOperations;
1406
+ Token: TokenDocument.DatabaseOperations;
1407
+ User: User.DatabaseOperations;
1408
+ Wall: WallDocument.DatabaseOperations;
1409
+ }