@league-of-foundry-developers/foundry-vtt-types 9.242.0 → 9.249.2

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 (191) hide show
  1. package/package.json +1 -1
  2. package/src/foundry/common/abstract/document.mjs.d.ts +13 -6
  3. package/src/foundry/common/config.mjs/releaseData.d.ts +3 -1
  4. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +3 -1
  5. package/src/foundry/common/data/data.mjs/actorData.d.ts +1 -1
  6. package/src/foundry/common/data/data.mjs/adventureData.d.ts +14 -12
  7. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +5 -3
  8. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +62 -16
  9. package/src/foundry/common/data/data.mjs/animationData.d.ts +13 -5
  10. package/src/foundry/common/data/data.mjs/cardData.d.ts +4 -4
  11. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +5 -3
  12. package/src/foundry/common/data/data.mjs/cardsData.d.ts +3 -3
  13. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +3 -1
  14. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +3 -1
  15. package/src/foundry/common/data/data.mjs/combatData.d.ts +3 -1
  16. package/src/foundry/common/data/data.mjs/combatantData.d.ts +3 -1
  17. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +3 -1
  18. package/src/foundry/common/data/data.mjs/drawingData.d.ts +3 -1
  19. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +3 -1
  20. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +3 -1
  21. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +3 -1
  22. package/src/foundry/common/data/data.mjs/folderData.d.ts +3 -1
  23. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -1
  24. package/src/foundry/common/data/data.mjs/lightData.d.ts +7 -5
  25. package/src/foundry/common/data/data.mjs/macroData.d.ts +3 -1
  26. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +3 -1
  27. package/src/foundry/common/data/data.mjs/noteData.d.ts +3 -1
  28. package/src/foundry/common/data/data.mjs/playlistData.d.ts +3 -1
  29. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +3 -1
  30. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +6 -4
  31. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +3 -1
  32. package/src/foundry/common/data/data.mjs/sceneData.d.ts +3 -1
  33. package/src/foundry/common/data/data.mjs/settingData.d.ts +3 -1
  34. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +3 -1
  35. package/src/foundry/common/data/data.mjs/tileData.d.ts +4 -2
  36. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +4 -2
  37. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +4 -2
  38. package/src/foundry/common/data/data.mjs/tokenData.d.ts +5 -3
  39. package/src/foundry/common/data/data.mjs/userData.d.ts +3 -1
  40. package/src/foundry/common/data/data.mjs/videoData.d.ts +4 -2
  41. package/src/foundry/common/data/data.mjs/wallData.d.ts +4 -2
  42. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +15 -12
  43. package/src/foundry/common/documents.mjs/baseActor.d.ts +24 -21
  44. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +14 -12
  45. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +14 -11
  46. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +14 -11
  47. package/src/foundry/common/documents.mjs/baseCard.d.ts +27 -28
  48. package/src/foundry/common/documents.mjs/baseCards.d.ts +18 -16
  49. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +24 -17
  50. package/src/foundry/common/documents.mjs/baseCombat.d.ts +21 -20
  51. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +25 -18
  52. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +26 -23
  53. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +19 -17
  54. package/src/foundry/common/documents.mjs/baseFolder.d.ts +14 -12
  55. package/src/foundry/common/documents.mjs/baseItem.d.ts +25 -19
  56. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +16 -14
  57. package/src/foundry/common/documents.mjs/baseMacro.d.ts +21 -18
  58. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +34 -18
  59. package/src/foundry/common/documents.mjs/baseNote.d.ts +20 -14
  60. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +16 -14
  61. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +14 -11
  62. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +16 -14
  63. package/src/foundry/common/documents.mjs/baseScene.d.ts +23 -21
  64. package/src/foundry/common/documents.mjs/baseSetting.d.ts +18 -16
  65. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +27 -19
  66. package/src/foundry/common/documents.mjs/baseTile.d.ts +17 -11
  67. package/src/foundry/common/documents.mjs/baseToken.d.ts +20 -16
  68. package/src/foundry/common/documents.mjs/baseUser.d.ts +45 -11
  69. package/src/foundry/common/documents.mjs/baseWall.d.ts +17 -15
  70. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +3 -1
  71. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +4 -2
  72. package/src/foundry/common/packages.mjs/packageData.d.ts +3 -4
  73. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +3 -1
  74. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +3 -1
  75. package/src/foundry/common/utils/primitives.mjs.d.ts +8 -1
  76. package/src/foundry/foundry.js/application.d.ts +139 -111
  77. package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
  78. package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
  79. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
  80. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
  81. package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
  82. package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
  83. package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
  84. package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
  85. package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
  86. package/src/foundry/foundry.js/applications/formApplication.d.ts +45 -14
  87. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
  88. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
  89. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
  90. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
  91. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
  92. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
  93. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +5 -5
  94. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +4 -4
  95. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
  96. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +2 -2
  97. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
  98. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
  99. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
  100. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +3 -3
  101. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +3 -3
  102. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +2 -2
  103. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +3 -3
  104. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
  105. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +3 -3
  106. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +4 -4
  107. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +2 -2
  108. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
  109. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
  110. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +5 -5
  111. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
  112. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
  113. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +2 -2
  114. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
  115. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
  116. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
  117. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +4 -4
  118. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +3 -3
  119. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
  120. package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
  121. package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
  122. package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
  123. package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
  124. package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
  125. package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
  126. package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
  127. package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
  128. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
  129. package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
  130. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +4 -7
  131. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +2 -2
  132. package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
  133. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  134. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
  135. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -2
  136. package/src/foundry/foundry.js/avSettings.d.ts +11 -0
  137. package/src/foundry/foundry.js/canvas.d.ts +5 -0
  138. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +38 -35
  139. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +1 -1
  140. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +1 -1
  141. package/src/foundry/foundry.js/clientDocuments/card.d.ts +2 -1
  142. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +1 -6
  143. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +1 -1
  144. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +5 -5
  145. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
  146. package/src/foundry/foundry.js/clientDocuments/item.d.ts +2 -2
  147. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +1 -1
  148. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +39 -38
  149. package/src/foundry/foundry.js/clientDocuments/user.d.ts +27 -35
  150. package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
  151. package/src/foundry/foundry.js/collections/documentCollection.d.ts +66 -12
  152. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +78 -67
  153. package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +73 -32
  154. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/actors.d.ts +3 -37
  155. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/combatEncounters.d.ts +5 -2
  156. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts +0 -2
  157. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +2 -2
  158. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/items.d.ts +1 -22
  159. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts +1 -1
  160. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/macros.d.ts +3 -8
  161. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts +7 -2
  162. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +5 -5
  163. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts +1 -1
  164. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/scenes.d.ts +3 -2
  165. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/users.d.ts +7 -4
  166. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts +2 -2
  167. package/src/foundry/foundry.js/config.d.ts +5 -2
  168. package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
  169. package/src/foundry/foundry.js/hooks.d.ts +3 -3
  170. package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +18 -7
  171. package/src/foundry/foundry.js/pixi/index.d.ts +2 -0
  172. package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
  173. package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
  174. package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +1 -1
  175. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +9 -1
  176. package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
  177. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +1 -1
  178. package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
  179. package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
  180. package/src/foundry/foundry.js/pointSources/lightSource.d.ts +1 -1
  181. package/src/foundry/foundry.js/pointSources/soundSource.d.ts +1 -1
  182. package/src/foundry/foundry.js/pointSources/visionSource.d.ts +1 -1
  183. package/src/foundry/foundry.js/polygonEdge.d.ts +1 -1
  184. package/src/foundry/foundry.js/quadtree.d.ts +2 -2
  185. package/src/foundry/foundry.js/ray.d.ts +1 -1
  186. package/src/foundry/foundry.js/roll.d.ts +13 -11
  187. package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
  188. package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
  189. package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
  190. package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
  191. package/src/types/helperTypes.d.ts +31 -13
@@ -8,7 +8,7 @@ declare global {
8
8
  * @typeParam Options - The type of the options object
9
9
  */
10
10
  abstract class SidebarDirectory<
11
- Name extends foundry.CONST.DOCUMENT_TYPES | 'FogExploration',
11
+ Name extends foundry.CONST.DOCUMENT_TYPES,
12
12
  Options extends SidebarDirectory.Options = SidebarDirectory.Options
13
13
  > extends SidebarTab<Options> {
14
14
  constructor(options?: Partial<SidebarDirectory.Options>);
@@ -224,7 +224,7 @@ declare global {
224
224
  sidebarIcon: string;
225
225
  }
226
226
 
227
- interface Options extends Application.Options {
227
+ interface Options extends ApplicationOptions {
228
228
  renderUpdateKeys: string[];
229
229
  contextMenuSelector: string;
230
230
  }
@@ -1,3 +1,14 @@
1
+ interface AVSettingsData {
2
+ /** Whether this user has muted themselves. */
3
+ muted?: boolean | undefined;
4
+
5
+ /** Whether this user has hidden their video. */
6
+ hidden?: boolean | undefined;
7
+
8
+ /** Whether the user is broadcasting audio. */
9
+ speaking?: boolean | undefined;
10
+ }
11
+
1
12
  declare class AVSettings {
2
13
  constructor();
3
14
 
@@ -72,6 +72,11 @@ declare global {
72
72
  */
73
73
  initialized: boolean;
74
74
 
75
+ /**
76
+ * A promise that resolves when the canvas is first initialized and ready.
77
+ */
78
+ initializing: Promise<void> | null;
79
+
75
80
  /**
76
81
  * Track the timestamp of the last stage zoom operation
77
82
  * @defaultValue `0`
@@ -11,6 +11,40 @@ declare global {
11
11
  const ClientDocumentMixin: <T extends ConstructorOf<foundry.abstract.Document<any, any>>>(
12
12
  Base: T
13
13
  ) => ClientDocumentConstructor<T>;
14
+
15
+ namespace ClientDocumentMixin {
16
+ interface CompendiumExportOptions {
17
+ /**
18
+ * Clear the flags object
19
+ * @defaultValue `false`
20
+ */
21
+ clearFlags?: boolean | undefined;
22
+
23
+ /**
24
+ * Clear the currently assigned folder and sort order
25
+ * @defaultValue `true`
26
+ */
27
+ clearSort?: boolean | undefined;
28
+
29
+ /**
30
+ * Clear document permissions
31
+ * @defaultValue `true`
32
+ */
33
+ clearPermissions?: boolean | undefined;
34
+
35
+ /**
36
+ * Clear fields which store document state
37
+ * @defaultValue `true`
38
+ */
39
+ clearState?: boolean | undefined;
40
+
41
+ /**
42
+ * Retain the current Document id
43
+ * @defaultValue `false`
44
+ */
45
+ keepId?: boolean | undefined;
46
+ }
47
+ }
14
48
  }
15
49
 
16
50
  type ClientDocumentConstructor<T extends ConstructorOf<foundry.abstract.Document<any, any>>> = Pick<T, keyof T> &
@@ -275,7 +309,8 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
275
309
  * (default: `{}`)
276
310
  * @param context - Additional context options or dialog positioning options
277
311
  * (default: `{}`)
278
- * @returns A Promise which resolves to the created Document
312
+ * @returns A Promise which resolves to the created Document, or null if the dialog was
313
+ * closed.
279
314
  */
280
315
  static createDialog<T extends DocumentConstructor>(
281
316
  this: T,
@@ -300,7 +335,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
300
335
  * Export document data to a JSON file which can be saved by the client and later imported into a different session.
301
336
  * @param options - Additional options passed to the {@link ClientDocumentMixin#toCompendium} method
302
337
  */
303
- exportToJSON(options?: CompendiumExportOptions): void;
338
+ exportToJSON(options?: ClientDocumentMixin.CompendiumExportOptions): void;
304
339
 
305
340
  /**
306
341
  * A helper function to handle obtaining the relevant Document from dropped data provided via a DataTransfer event.
@@ -343,7 +378,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
343
378
  */
344
379
  toCompendium(
345
380
  pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
346
- options?: CompendiumExportOptions
381
+ options?: ClientDocumentMixin.CompendiumExportOptions
347
382
  ): Omit<T['data']['_source'], '_id' | 'folder' | 'permission'> & {
348
383
  permission?: T['data']['_source']['permission'];
349
384
  };
@@ -354,38 +389,6 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
354
389
  prepareEmbeddedEntities(): void;
355
390
  }
356
391
 
357
- interface CompendiumExportOptions {
358
- /**
359
- * Clear the flags object
360
- * @defaultValue `false`
361
- */
362
- clearFlags: boolean;
363
-
364
- /**
365
- * Clear the currently assigned folder and sort order
366
- * @defaultValue `true`
367
- */
368
- clearSort: boolean;
369
-
370
- /**
371
- * Clear document permissions
372
- * @defaultValue `true`
373
- */
374
- clearPermissions: boolean;
375
-
376
- /**
377
- * Clear fields which store document state
378
- * @defaultValue `true`
379
- */
380
- clearState: boolean;
381
-
382
- /**
383
- * Retain the current Document id
384
- * @defaultValue `false`
385
- */
386
- keepId: boolean;
387
- }
388
-
389
392
  interface SortOptions<T> {
390
393
  /**
391
394
  * @defaultValue `[]`
@@ -1,6 +1,6 @@
1
1
  import { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
2
  import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData.js';
3
+ import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData';
4
4
  import { EffectChangeData } from '../../common/data/data.mjs/effectChangeData';
5
5
 
6
6
  declare global {
@@ -120,7 +120,7 @@ declare global {
120
120
  /**
121
121
  * Prepare a data object which defines the data schema used by dice roll commands against this Actor
122
122
  */
123
- getRollData(): this['data']['data'];
123
+ getRollData(): object;
124
124
 
125
125
  /** @override */
126
126
  protected _getSheetClass(): ConstructorOf<FormApplication> | null;
@@ -47,7 +47,8 @@ declare global {
47
47
  get source(): InstanceType<ConfiguredDocumentClassForName<'Cards'>> | undefined | null;
48
48
 
49
49
  /**
50
- * A convenience property for whether or not the Card is within its source Cards stack.
50
+ * A convenience property for whether or not the Card is within its source Cards stack. Cards in decks are always
51
+ * considered home.
51
52
  */
52
53
  get isHome(): boolean;
53
54
 
@@ -211,15 +211,10 @@ declare global {
211
211
  * Display a dialog which prompts the user to play a specific Card to some other Cards document
212
212
  * @see {@link Cards#pass}
213
213
  * @param card - The specific card being played as part of this dialog
214
- * @remarks returns documentation is incorrect (see https://gitlab.com/foundrynet/foundryvtt/-/issues/6367)
215
214
  */
216
215
  playDialog(
217
216
  card: InstanceType<ConfiguredDocumentClassForName<'Card'>>
218
- ): Promise<
219
- | InstanceType<ConfiguredDocumentClassForName<'Card'>>[]
220
- | InstanceType<ConfiguredDocumentClassForName<'Cards'>>
221
- | null
222
- >;
217
+ ): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>>[] | void | null>;
223
218
 
224
219
  /**
225
220
  * Display a confirmation dialog for whether or not the user wishes to reset a Cards stack
@@ -1,6 +1,6 @@
1
1
  import { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
2
  import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData.js';
3
+ import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData';
4
4
 
5
5
  declare global {
6
6
  /**
@@ -1,7 +1,7 @@
1
- import type { ConfiguredDocumentClass, PropertiesToSource } from '../../../types/helperTypes';
1
+ import type { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
2
  import type { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData.js';
4
- import type { CombatantDataProperties } from '../../common/data/data.mjs/combatantData';
3
+ import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData';
4
+ import type { CombatantDataSource } from '../../common/data/data.mjs/combatantData';
5
5
 
6
6
  declare global {
7
7
  /**
@@ -177,7 +177,7 @@ declare global {
177
177
  protected _onCreateEmbeddedDocuments(
178
178
  type: string,
179
179
  documents: InstanceType<ConfiguredDocumentClass<typeof Combatant>>[],
180
- result: PropertiesToSource<CombatantDataProperties>[],
180
+ result: CombatantDataSource[],
181
181
  options: DocumentModificationOptions,
182
182
  userId: string
183
183
  ): void;
@@ -186,7 +186,7 @@ declare global {
186
186
  protected _onUpdateEmbeddedDocuments(
187
187
  embeddedName: string,
188
188
  documents: InstanceType<ConfiguredDocumentClass<typeof Combatant>>[],
189
- result: PropertiesToSource<CombatantDataProperties>[],
189
+ result: CombatantDataSource[],
190
190
  options: DocumentModificationOptions,
191
191
  userId: string
192
192
  ): void;
@@ -1,6 +1,5 @@
1
- import { ConfiguredDocumentClass } from '../../../types/helperTypes';
1
+ import { ConfiguredDocumentClass, ConstructorDataType, DocumentConstructor } from '../../../types/helperTypes';
2
2
  import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import type { FolderDataConstructorData } from '../../common/data/data.mjs/folderData.js';
4
3
 
5
4
  declare global {
6
5
  /**
@@ -65,14 +64,21 @@ declare global {
65
64
  * @returns An active FolderConfig instance for creating the new Folder entity
66
65
  *
67
66
  * @remarks
68
- * This actually returns a FolderConfig but that is incorrectly overriding
69
- * ClientDocumentMixin.createDialog, for which a Promise of the created
70
- * Document is returned.
67
+ * The documented return type is incorrect. It now returns a promise that resolves to the
68
+ * created folder as intended. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6619
69
+ *
70
+ * For weird reasons, we need to make this generic.
71
71
  */
72
- static createDialog(
73
- data?: DeepPartial<FolderDataConstructorData | (FolderDataConstructorData & Record<string, unknown>)> | undefined,
74
- options?: Dialog.Options | undefined
75
- ): any;
72
+ static createDialog<T extends DocumentConstructor>(
73
+ this: T,
74
+ data?:
75
+ | DeepPartial<
76
+ | ConstructorDataType<InstanceType<T>['data']>
77
+ | (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
78
+ >
79
+ | undefined,
80
+ options?: Partial<DocumentSheetOptions> | undefined
81
+ ): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
76
82
 
77
83
  /**
78
84
  * Export all Documents contained in this Folder to a given Compendium pack.
@@ -1,5 +1,5 @@
1
1
  import { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
- import type { ItemDataConstructorData } from '../../common/data/data.mjs/itemData.js';
2
+ import type { ItemDataConstructorData } from '../../common/data/data.mjs/itemData';
3
3
 
4
4
  declare global {
5
5
  /**
@@ -43,7 +43,7 @@ declare global {
43
43
  /**
44
44
  * Prepare a data object which defines the data schema used by dice roll commands against this Item
45
45
  */
46
- getRollData(): this['data']['data'];
46
+ getRollData(): object;
47
47
 
48
48
  /** @override */
49
49
  protected _getSheetClass(): typeof ItemSheet | null;
@@ -1,6 +1,6 @@
1
1
  import type { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
2
  import type { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import type { PlaylistDataConstructorData } from '../../common/data/data.mjs/playlistData.js';
3
+ import type { PlaylistDataConstructorData } from '../../common/data/data.mjs/playlistData';
4
4
 
5
5
  declare global {
6
6
  /**
@@ -1,23 +1,24 @@
1
- import { ConfiguredDocumentClass, PropertiesToSource } from '../../../types/helperTypes';
2
- import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
- import {
1
+ import type { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
+ import type { DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
+ import type {
4
4
  AmbientLightDataConstructorData,
5
- AmbientLightDataProperties
5
+ AmbientLightDataSource
6
6
  } from '../../common/data/data.mjs/ambientLightData';
7
- import {
7
+ import type {
8
8
  AmbientSoundDataConstructorData,
9
- AmbientSoundDataProperties
9
+ AmbientSoundDataSource
10
10
  } from '../../common/data/data.mjs/ambientSoundData';
11
- import { DrawingDataConstructorData, DrawingDataProperties } from '../../common/data/data.mjs/drawingData';
12
- import {
11
+ import type { DrawingDataConstructorData, DrawingDataSource } from '../../common/data/data.mjs/drawingData';
12
+ import type {
13
13
  MeasuredTemplateDataConstructorData,
14
- MeasuredTemplateDataProperties
14
+ MeasuredTemplateDataSource
15
15
  } from '../../common/data/data.mjs/measuredTemplateData';
16
- import { NoteDataConstructorData, NoteDataProperties } from '../../common/data/data.mjs/noteData';
17
- import type { SceneDataConstructorData } from '../../common/data/data.mjs/sceneData.js';
18
- import { TileDataConstructorData, TileDataProperties } from '../../common/data/data.mjs/tileData';
19
- import { TokenDataConstructorData, TokenDataProperties } from '../../common/data/data.mjs/tokenData';
20
- import { WallDataConstructorData, WallDataProperties } from '../../common/data/data.mjs/wallData';
16
+ import type { NoteDataConstructorData, NoteDataSource } from '../../common/data/data.mjs/noteData';
17
+ import type { TileDataConstructorData, TileDataSource } from '../../common/data/data.mjs/tileData';
18
+ import type { TokenDataConstructorData, TokenDataSource } from '../../common/data/data.mjs/tokenData';
19
+ import type { WallDataConstructorData, WallDataSource } from '../../common/data/data.mjs/wallData';
20
+
21
+ import type { SceneDataConstructorData } from '../../common/data/data.mjs/sceneData';
21
22
 
22
23
  declare global {
23
24
  /**
@@ -205,56 +206,56 @@ declare global {
205
206
  _onCreateEmbeddedDocuments(
206
207
  embeddedName: string,
207
208
  documents: InstanceType<ConfiguredDocumentClass<typeof DrawingDocument>>[],
208
- result: DeepPartial<PropertiesToSource<DrawingDataProperties>>[],
209
+ result: DeepPartial<DrawingDataSource>[],
209
210
  options: DocumentModificationContext,
210
211
  userId: string
211
212
  ): void;
212
213
  _onCreateEmbeddedDocuments(
213
214
  embeddedName: string,
214
215
  documents: InstanceType<ConfiguredDocumentClass<typeof TokenDocument>>[],
215
- result: DeepPartial<PropertiesToSource<TokenDataProperties>>[],
216
+ result: DeepPartial<TokenDataSource>[],
216
217
  options: DocumentModificationContext,
217
218
  userId: string
218
219
  ): void;
219
220
  _onCreateEmbeddedDocuments(
220
221
  embeddedName: string,
221
222
  documents: InstanceType<ConfiguredDocumentClass<typeof AmbientLightDocument>>[],
222
- result: DeepPartial<PropertiesToSource<AmbientLightDataProperties>>[],
223
+ result: DeepPartial<AmbientLightDataSource>[],
223
224
  options: DocumentModificationContext,
224
225
  userId: string
225
226
  ): void;
226
227
  _onCreateEmbeddedDocuments(
227
228
  embeddedName: string,
228
229
  documents: InstanceType<ConfiguredDocumentClass<typeof NoteDocument>>[],
229
- result: DeepPartial<PropertiesToSource<NoteDataProperties>>[],
230
+ result: DeepPartial<NoteDataSource>[],
230
231
  options: DocumentModificationContext,
231
232
  userId: string
232
233
  ): void;
233
234
  _onCreateEmbeddedDocuments(
234
235
  embeddedName: string,
235
236
  documents: InstanceType<ConfiguredDocumentClass<typeof AmbientSoundDocument>>[],
236
- result: DeepPartial<PropertiesToSource<AmbientSoundDataProperties>>[],
237
+ result: DeepPartial<AmbientSoundDataSource>[],
237
238
  options: DocumentModificationContext,
238
239
  userId: string
239
240
  ): void;
240
241
  _onCreateEmbeddedDocuments(
241
242
  embeddedName: string,
242
243
  documents: InstanceType<ConfiguredDocumentClass<typeof MeasuredTemplateDocument>>[],
243
- result: DeepPartial<PropertiesToSource<MeasuredTemplateDataProperties>>[],
244
+ result: DeepPartial<MeasuredTemplateDataSource>[],
244
245
  options: DocumentModificationContext,
245
246
  userId: string
246
247
  ): void;
247
248
  _onCreateEmbeddedDocuments(
248
249
  embeddedName: string,
249
250
  documents: InstanceType<ConfiguredDocumentClass<typeof TileDocument>>[],
250
- result: DeepPartial<PropertiesToSource<TileDataProperties>>[],
251
+ result: DeepPartial<TileDataSource>[],
251
252
  options: DocumentModificationContext,
252
253
  userId: string
253
254
  ): void;
254
255
  _onCreateEmbeddedDocuments(
255
256
  embeddedName: string,
256
257
  documents: InstanceType<ConfiguredDocumentClass<typeof WallDocument>>[],
257
- result: DeepPartial<PropertiesToSource<WallDataProperties>>[],
258
+ result: DeepPartial<WallDataSource>[],
258
259
  options: DocumentModificationContext,
259
260
  userId: string
260
261
  ): void;
@@ -262,49 +263,49 @@ declare global {
262
263
  /** @override */
263
264
  _preUpdateEmbeddedDocuments(
264
265
  embeddedName: string,
265
- result: DeepPartial<PropertiesToSource<DrawingDataProperties>>[],
266
+ result: DeepPartial<DrawingDataSource>[],
266
267
  options: DocumentModificationContext,
267
268
  userId: string
268
269
  ): void;
269
270
  _preUpdateEmbeddedDocuments(
270
271
  embeddedName: string,
271
- result: DeepPartial<PropertiesToSource<TokenDataProperties>>[],
272
+ result: DeepPartial<TokenDataSource>[],
272
273
  options: DocumentModificationContext,
273
274
  userId: string
274
275
  ): void;
275
276
  _preUpdateEmbeddedDocuments(
276
277
  embeddedName: string,
277
- result: DeepPartial<PropertiesToSource<AmbientLightDataProperties>>[],
278
+ result: DeepPartial<AmbientLightDataSource>[],
278
279
  options: DocumentModificationContext,
279
280
  userId: string
280
281
  ): void;
281
282
  _preUpdateEmbeddedDocuments(
282
283
  embeddedName: string,
283
- result: DeepPartial<PropertiesToSource<NoteDataProperties>>[],
284
+ result: DeepPartial<NoteDataSource>[],
284
285
  options: DocumentModificationContext,
285
286
  userId: string
286
287
  ): void;
287
288
  _preUpdateEmbeddedDocuments(
288
289
  embeddedName: string,
289
- result: DeepPartial<PropertiesToSource<AmbientSoundDataProperties>>[],
290
+ result: DeepPartial<AmbientSoundDataSource>[],
290
291
  options: DocumentModificationContext,
291
292
  userId: string
292
293
  ): void;
293
294
  _preUpdateEmbeddedDocuments(
294
295
  embeddedName: string,
295
- result: DeepPartial<PropertiesToSource<MeasuredTemplateDataProperties>>[],
296
+ result: DeepPartial<MeasuredTemplateDataSource>[],
296
297
  options: DocumentModificationContext,
297
298
  userId: string
298
299
  ): void;
299
300
  _preUpdateEmbeddedDocuments(
300
301
  embeddedName: string,
301
- result: DeepPartial<PropertiesToSource<TileDataProperties>>[],
302
+ result: DeepPartial<TileDataSource>[],
302
303
  options: DocumentModificationContext,
303
304
  userId: string
304
305
  ): void;
305
306
  _preUpdateEmbeddedDocuments(
306
307
  embeddedName: string,
307
- result: DeepPartial<PropertiesToSource<WallDataProperties>>[],
308
+ result: DeepPartial<WallDataSource>[],
308
309
  options: DocumentModificationContext,
309
310
  userId: string
310
311
  ): void;
@@ -313,56 +314,56 @@ declare global {
313
314
  _onUpdateEmbeddedDocuments(
314
315
  embeddedName: string,
315
316
  documents: InstanceType<ConfiguredDocumentClass<typeof DrawingDocument>>[],
316
- result: DeepPartial<PropertiesToSource<DrawingDataProperties>>[],
317
+ result: DeepPartial<DrawingDataSource>[],
317
318
  options: DocumentModificationContext,
318
319
  userId: string
319
320
  ): void;
320
321
  _onUpdateEmbeddedDocuments(
321
322
  embeddedName: string,
322
323
  documents: InstanceType<ConfiguredDocumentClass<typeof TokenDocument>>[],
323
- result: DeepPartial<PropertiesToSource<TokenDataProperties>>[],
324
+ result: DeepPartial<TokenDataSource>[],
324
325
  options: DocumentModificationContext,
325
326
  userId: string
326
327
  ): void;
327
328
  _onUpdateEmbeddedDocuments(
328
329
  embeddedName: string,
329
330
  documents: InstanceType<ConfiguredDocumentClass<typeof AmbientLightDocument>>[],
330
- result: DeepPartial<PropertiesToSource<AmbientLightDataProperties>>[],
331
+ result: DeepPartial<AmbientLightDataSource>[],
331
332
  options: DocumentModificationContext,
332
333
  userId: string
333
334
  ): void;
334
335
  _onUpdateEmbeddedDocuments(
335
336
  embeddedName: string,
336
337
  documents: InstanceType<ConfiguredDocumentClass<typeof NoteDocument>>[],
337
- result: DeepPartial<PropertiesToSource<NoteDataProperties>>[],
338
+ result: DeepPartial<NoteDataSource>[],
338
339
  options: DocumentModificationContext,
339
340
  userId: string
340
341
  ): void;
341
342
  _onUpdateEmbeddedDocuments(
342
343
  embeddedName: string,
343
344
  documents: InstanceType<ConfiguredDocumentClass<typeof AmbientSoundDocument>>[],
344
- result: DeepPartial<PropertiesToSource<AmbientSoundDataProperties>>[],
345
+ result: DeepPartial<AmbientSoundDataSource>[],
345
346
  options: DocumentModificationContext,
346
347
  userId: string
347
348
  ): void;
348
349
  _onUpdateEmbeddedDocuments(
349
350
  embeddedName: string,
350
351
  documents: InstanceType<ConfiguredDocumentClass<typeof MeasuredTemplateDocument>>[],
351
- result: DeepPartial<PropertiesToSource<MeasuredTemplateDataProperties>>[],
352
+ result: DeepPartial<MeasuredTemplateDataSource>[],
352
353
  options: DocumentModificationContext,
353
354
  userId: string
354
355
  ): void;
355
356
  _onUpdateEmbeddedDocuments(
356
357
  embeddedName: string,
357
358
  documents: InstanceType<ConfiguredDocumentClass<typeof TileDocument>>[],
358
- result: DeepPartial<PropertiesToSource<TileDataProperties>>[],
359
+ result: DeepPartial<TileDataSource>[],
359
360
  options: DocumentModificationContext,
360
361
  userId: string
361
362
  ): void;
362
363
  _onUpdateEmbeddedDocuments(
363
364
  embeddedName: string,
364
365
  documents: InstanceType<ConfiguredDocumentClass<typeof WallDocument>>[],
365
- result: DeepPartial<PropertiesToSource<WallDataProperties>>[],
366
+ result: DeepPartial<WallDataSource>[],
366
367
  options: DocumentModificationContext,
367
368
  userId: string
368
369
  ): void;
@@ -2,6 +2,32 @@ import { ConfiguredDocumentClass } from '../../../types/helperTypes';
2
2
  import { DocumentDataType, DocumentModificationOptions } from '../../common/abstract/document.mjs';
3
3
 
4
4
  declare global {
5
+ interface ActivityData {
6
+ /** The ID of the scene that the user is viewing. */
7
+ sceneId?: string | null | undefined;
8
+
9
+ /** The position of the user's cursor. */
10
+ cursor?: { x: number; y: number } | null | undefined;
11
+
12
+ /** The state of the user's ruler, if they are currently using one. */
13
+ ruler?: RulerData | null | undefined;
14
+
15
+ /** The IDs of the tokens the user has targeted in the currently viewed */
16
+ targets?: string[] | undefined;
17
+
18
+ /** Whether the user has an open WS connection to the server or not. */
19
+ active?: boolean | undefined;
20
+
21
+ /** Is the user pulling focus to the cursor coordinates? */
22
+ focus?: boolean | undefined;
23
+
24
+ /** Is the user emitting a ping at the cursor coordinates? */
25
+ ping?: boolean | undefined;
26
+
27
+ /** The state of the user's AV settings. */
28
+ av?: AVSettingsData | undefined;
29
+ }
30
+
5
31
  /**
6
32
  * The client-side User document which extends the common BaseUser model.
7
33
  * Each User document contains UserData which defines its data schema.
@@ -91,7 +117,7 @@ declare global {
91
117
  * @param activityData - An object of User activity data to submit to the server for broadcast.
92
118
  * (default: `{}`)
93
119
  */
94
- broadcastActivity(activityData?: User.ActivityData): void;
120
+ broadcastActivity(activityData?: ActivityData): void;
95
121
 
96
122
  /**
97
123
  * Get an Array of Macro Entities on this User's Hotbar by page
@@ -138,38 +164,4 @@ declare global {
138
164
  /** @remarks This property is set by PlayerList.getData() */
139
165
  border?: string;
140
166
  }
141
-
142
- namespace User {
143
- interface ActivityData {
144
- /**
145
- * The coordinates of the user's cursor
146
- */
147
- cursor?: boolean;
148
-
149
- /**
150
- * Is the user pulling focus to the cursor coordinates?
151
- */
152
- focus?: boolean;
153
-
154
- /**
155
- * Is the user emitting a ping at the cursor coordinates?
156
- */
157
- ping?: boolean;
158
-
159
- /**
160
- * Serialized Ruler coordinate data in JSON format
161
- */
162
- ruler?: string;
163
-
164
- /**
165
- * The id of the Scene currently being viewed by the User
166
- */
167
- sceneId?: string;
168
-
169
- /**
170
- * An array of Token ids which are targeted by the User
171
- */
172
- targets?: string[];
173
- }
174
- }
175
167
  }
@@ -211,7 +211,7 @@ declare namespace ClientSettings {
211
211
  label?: string;
212
212
  name?: string;
213
213
  restricted: boolean;
214
- type: ConstructorOf<FormApplication<FormApplication.Options, object>>;
214
+ type: ConstructorOf<FormApplication<FormApplicationOptions, object>>;
215
215
  }
216
216
 
217
217
  interface RegisteredMenuSettings {