@league-of-foundry-developers/foundry-vtt-types 0.8.9-7 → 9.238.1

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 (207) hide show
  1. package/README.md +44 -27
  2. package/index-lenient.d.ts +10 -0
  3. package/index.d.ts +2 -2
  4. package/package.json +43 -15
  5. package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
  6. package/src/foundry/common/abstract/document.mjs.d.ts +30 -12
  7. package/src/foundry/common/config.mjs/index.d.ts +1 -0
  8. package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
  9. package/src/foundry/common/constants.mjs.d.ts +402 -213
  10. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
  11. package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
  12. package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
  13. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
  14. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
  15. package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
  16. package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
  17. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
  18. package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
  19. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
  20. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
  21. package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
  22. package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
  23. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
  24. package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
  25. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
  26. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
  27. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
  28. package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
  29. package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
  30. package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
  31. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
  32. package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
  33. package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
  34. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
  35. package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
  36. package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
  37. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
  38. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
  39. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
  40. package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
  41. package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
  42. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
  43. package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
  44. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
  45. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
  46. package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
  47. package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
  48. package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
  49. package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
  50. package/src/foundry/common/data/fields.mjs.d.ts +180 -83
  51. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
  52. package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
  53. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
  54. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
  55. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
  56. package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
  57. package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
  58. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
  59. package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
  60. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
  61. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
  62. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
  63. package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
  64. package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
  65. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
  66. package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
  67. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
  68. package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
  69. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
  70. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
  71. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
  72. package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
  73. package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
  74. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
  75. package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
  76. package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
  77. package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
  78. package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
  79. package/src/foundry/common/documents.mjs/index.d.ts +3 -0
  80. package/src/foundry/common/module.mjs.d.ts +3 -0
  81. package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
  82. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
  83. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
  84. package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
  85. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
  86. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
  87. package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
  88. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
  89. package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
  90. package/src/foundry/common/types.mjs.d.ts +100 -0
  91. package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
  92. package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
  93. package/src/foundry/foundry.js/application.d.ts +4 -7
  94. package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
  95. package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
  96. package/src/foundry/foundry.js/applications/filePicker.d.ts +116 -116
  97. package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
  98. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
  99. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
  100. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
  101. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
  102. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +6 -3
  103. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
  104. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
  105. package/src/foundry/foundry.js/applications/formApplications/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +3 -3
  106. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +4 -0
  107. package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
  108. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +60 -0
  109. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
  110. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
  111. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
  112. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +187 -148
  113. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
  114. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
  115. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
  116. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
  117. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
  118. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
  119. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -3
  120. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
  121. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
  122. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
  123. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +142 -155
  124. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
  125. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
  126. package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
  127. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
  128. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
  129. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
  130. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  131. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
  132. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  133. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  134. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
  135. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
  136. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
  137. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  138. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
  139. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
  140. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  141. package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
  142. package/src/foundry/foundry.js/canvas.d.ts +150 -47
  143. package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
  144. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  145. package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
  146. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
  147. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  148. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
  149. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  150. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
  151. package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
  152. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
  153. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  154. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
  155. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
  156. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
  157. package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
  158. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  159. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  160. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
  161. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
  162. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  163. package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
  164. package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
  165. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
  166. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  167. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  168. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  169. package/src/foundry/foundry.js/config.d.ts +467 -881
  170. package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
  171. package/src/foundry/foundry.js/game.d.ts +171 -50
  172. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  173. package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
  174. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  175. package/src/foundry/foundry.js/hooks.d.ts +57 -0
  176. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  177. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
  178. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  179. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  180. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  181. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  182. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  183. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  184. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  185. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +5 -17
  186. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
  187. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  188. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  189. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  190. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  191. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
  192. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
  193. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
  194. package/src/foundry/foundry.js/pointSource.d.ts +174 -86
  195. package/src/foundry/foundry.js/roll.d.ts +25 -36
  196. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  197. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  198. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  199. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  200. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  201. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  202. package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
  203. package/src/foundry/foundry.js/textEditor.d.ts +40 -9
  204. package/src/foundry/index.d.ts +5 -0
  205. package/src/types/utils.d.ts +11 -3
  206. package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
  207. package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -1,89 +1,108 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
- /**
6
- * Top menu scene navigation
7
- */
8
- declare class SceneNavigation extends Application {
9
- /**
10
- * Assign the default options which are supported by the SceneNavigation UI
11
- * @defaultValue
12
- * ```typescript
13
- * {
14
- * ...super.defaultOptions,
15
- * id: 'navigation',
16
- * template: 'templates/hud/navigation.html',
17
- * popOut: false,
18
- * dragDrop: [{dragSelector: ".scene"}]
19
- * }
20
- * ```
21
- */
22
- static get defaultOptions(): typeof Application['defaultOptions'];
1
+ import type { ConfiguredDocumentClassForName, ToObjectFalseType } from '../../../types/helperTypes';
23
2
 
3
+ declare global {
24
4
  /**
25
- * Return an Array of Scenes which are displayed in the Navigation bar
5
+ * The UI element which displays the Scene documents which are currently enabled for quick navigation.
6
+ *
7
+ * @typeParam Options - the type of the options object
8
+ * @typeParam Data - The data structure used to render the handlebars template.
26
9
  */
27
- get scenes(): Scene[];
10
+ class SceneNavigation<
11
+ Options extends Application.Options = Application.Options,
12
+ Data extends object = SceneNavigation.Data
13
+ > extends Application<Options> {
14
+ constructor(options?: Partial<Options>);
28
15
 
29
- /** @override */
30
- render(force?: boolean, options?: Application.RenderOptions): this | undefined;
16
+ /**
17
+ * Navigation collapsed state
18
+ * @internal
19
+ */
20
+ protected _collapsed: boolean;
31
21
 
32
- /** @override */
33
- protected _render(force?: boolean, options?: Application.RenderOptions): Promise<void>;
22
+ /**
23
+ * @override
24
+ * @defaultValue
25
+ * ```typescript
26
+ * foundry.utils.mergeObject(super.defaultOptions, {
27
+ * id: "navigation",
28
+ * template: "templates/hud/navigation.html",
29
+ * popOut: false,
30
+ * dragDrop: [{ dragSelector: ".scene" }],
31
+ * })
32
+ * ```
33
+ */
34
+ static get defaultOptions(): Application.Options;
34
35
 
35
- /** @override */
36
- getData(options?: Partial<Application.Options>): SceneNavigation.Data | Promise<SceneNavigation.Data>;
36
+ /**
37
+ * Return an Array of Scenes which are displayed in the Navigation bar
38
+ */
39
+ get scenes(): InstanceType<ConfiguredDocumentClassForName<'Scene'>>[];
37
40
 
38
- /**
39
- * Expand the SceneNavigation menu, sliding it down if it is currently collapsed
40
- */
41
- expand(): Promise<boolean>;
41
+ /** @override */
42
+ render(force?: boolean, context?: Application.RenderOptions<Options>): this | void;
42
43
 
43
- /**
44
- * Collapse the SceneNavigation menu, sliding it up if it is currently expanded
45
- */
46
- collapse(): Promise<boolean>;
44
+ /** @override */
45
+ protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
47
46
 
48
- /**
49
- * Activate Scene Navigation event listeners
50
- */
51
- activateListeners(html: JQuery): void;
47
+ /** @override */
48
+ getData(options?: Partial<Application.Options>): Data | Promise<Data>;
52
49
 
53
- /**
54
- * Get the set of ContextMenu options which should be applied for Scenes in the menu
55
- */
56
- private _getContextMenuOptions(): ContextMenuEntry[];
50
+ /**
51
+ * Expand the SceneNavigation menu, sliding it down if it is currently collapsed
52
+ */
53
+ expand(): Promise<boolean>;
57
54
 
58
- /**
59
- * Handle left-click events on the scenes in the navigation menu
60
- */
61
- private _onClickScene(event: JQuery.ClickEvent): void;
55
+ /**
56
+ * Collapse the SceneNavigation menu, sliding it up if it is currently expanded
57
+ */
58
+ collapse(): Promise<boolean>;
62
59
 
63
- /** @override */
64
- protected _onDragStart(event: DragEvent): void;
60
+ /** @override */
61
+ activateListeners(html: JQuery): void;
65
62
 
66
- /** @override */
67
- protected _onDrop(event: DragEvent): Promise<boolean | undefined | void>;
63
+ /**
64
+ * Get the set of ContextMenu options which should be applied for Scenes in the menu
65
+ * @returns The Array of context options passed to the ContextMenu instance
66
+ * @internal
67
+ */
68
+ protected _getContextMenuOptions(): ContextMenuEntry[];
68
69
 
69
- /** @override */
70
- private _onToggleNav(event: JQuery.ClickEvent): void;
70
+ /**
71
+ * Handle left-click events on the scenes in the navigation menu
72
+ * @internal
73
+ */
74
+ protected _onClickScene(event: JQuery.ClickEvent): void;
71
75
 
72
- /**
73
- * Updated the loading progress bar
74
- * @param context - The message to display in the progress back
75
- * @param pct - The percentage the progress bar has completed
76
- */
77
- static _onLoadProgress(context: string, pct: number): void;
78
- }
76
+ /**
77
+ * @override
78
+ * @internal
79
+ */
80
+ protected _onDragStart(event: DragEvent): void;
81
+
82
+ /**
83
+ * @override
84
+ * @internal
85
+ */
86
+ protected _onDrop(event: DragEvent): void;
87
+
88
+ /**
89
+ * Handle navigation menu toggle click events
90
+ * @internal
91
+ */
92
+ protected _onToggleNav(event: JQuery.ClickEvent): void;
93
+
94
+ static _onLoadProgress(context: string, pct: number): void;
95
+ }
79
96
 
80
- declare namespace SceneNavigation {
81
- interface Data {
82
- collapsed: boolean;
83
- scenes: (foundry.utils.Duplicated<Scene['data']> & {
84
- users: { letter: string; color: User['data']['color'] };
85
- visible: boolean;
86
- css: [string | null];
87
- })[];
97
+ namespace SceneNavigation {
98
+ interface Data {
99
+ collapsed: boolean;
100
+ scenes: (ToObjectFalseType<foundry.data.SceneData> & {
101
+ name: string;
102
+ users: { letter: string; color: string };
103
+ visible: boolean;
104
+ css: string;
105
+ })[];
106
+ }
88
107
  }
89
108
  }
@@ -8,7 +8,7 @@ declare abstract class SidebarTab<
8
8
  constructor(...args: ConstructorParameters<typeof Application>);
9
9
  /**
10
10
  * The base name of this sidebar tab
11
- * @defaultValue `''`
11
+ * @defaultValue `""`
12
12
  */
13
13
  tabName: string;
14
14
 
@@ -1,4 +1,5 @@
1
- import { ConfiguredDocumentClass, ConstructorDataType } from '../../../../types/helperTypes';
1
+ import { ConfiguredDocumentClass } from '../../../../types/helperTypes';
2
+ import type { ChatMessageDataConstructorData } from '../../../common/data/data.mjs/chatMessageData.js';
2
3
 
3
4
  declare global {
4
5
  /**
@@ -162,7 +163,7 @@ declare global {
162
163
  protected _processDiceCommand(
163
164
  command: string,
164
165
  match: RegExpMatchArray,
165
- chatData: ConstructorDataType<foundry.data.ChatMessageData>,
166
+ chatData: ChatMessageDataConstructorData,
166
167
  createOptions: DocumentModificationContext
167
168
  ): void;
168
169
 
@@ -178,7 +179,7 @@ declare global {
178
179
  protected _processWhisperCommand(
179
180
  command: string,
180
181
  match: RegExpMatchArray,
181
- chatData: ConstructorDataType<foundry.data.ChatMessageData>,
182
+ chatData: ChatMessageDataConstructorData,
182
183
  createOptions: DocumentModificationContext
183
184
  ): void;
184
185
 
@@ -193,7 +194,7 @@ declare global {
193
194
  protected _processChatCommand(
194
195
  command: string,
195
196
  match: RegExpMatchArray,
196
- chatData: ConstructorDataType<foundry.data.ChatMessageData>,
197
+ chatData: ChatMessageDataConstructorData,
197
198
  createOptions: DocumentModificationContext
198
199
  ): void;
199
200
 
@@ -275,7 +276,7 @@ declare global {
275
276
  * @param mode - The new roll mode setting
276
277
  * @internal
277
278
  */
278
- protected static _setRollMode(mode: foundry.CONST.DiceRollMode): void;
279
+ protected static _setRollMode(mode: foundry.CONST.DICE_ROLL_MODES): void;
279
280
  }
280
281
 
281
282
  namespace ChatLog {
@@ -296,7 +297,7 @@ declare global {
296
297
 
297
298
  interface Data {
298
299
  user: InstanceType<ConfiguredDocumentClass<typeof User>>;
299
- rollMode: foundry.CONST.DiceRollMode;
300
+ rollMode: foundry.CONST.DICE_ROLL_MODES;
300
301
  rollModes: typeof CONFIG['Dice']['rollModes'];
301
302
  isStream: boolean;
302
303
  }
@@ -60,10 +60,10 @@ declare global {
60
60
  namespace CompendiumDirectory {
61
61
  interface Data {
62
62
  user: InstanceType<ConfiguredDocumentClass<typeof User>>;
63
- packs: { [DocumentName in foundry.CONST.CompendiumEntityType]?: PackData<DocumentName> };
63
+ packs: { [DocumentName in foundry.CONST.COMPENDIUM_DOCUMENT_TYPES]?: PackData<DocumentName> };
64
64
  }
65
65
 
66
- interface PackData<DocumentName extends foundry.CONST.CompendiumEntityType> {
66
+ interface PackData<DocumentName extends foundry.CONST.COMPENDIUM_DOCUMENT_TYPES> {
67
67
  label: DocumentName;
68
68
  packs: CompendiumCollection<CompendiumCollection.Metadata & { entity: DocumentName }>[];
69
69
  }
@@ -1,67 +1,24 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
1
  /**
6
- * A directory list of Actor entities in the Sidebar
7
- * @see {@link Actor}
2
+ * The sidebar directory which organizes and displays world-level Actor documents.
8
3
  */
9
- declare class ActorDirectory extends SidebarDirectory {
10
- /**
11
- * @override
12
- */
13
- static get entity(): 'Actor';
14
-
15
- /**
16
- * @override
17
- * @see {@link Game.actors}
18
- */
19
- static get collection(): Game['actors'];
4
+ declare class ActorDirectory extends SidebarDirectory<'Actor'> {
5
+ constructor(...args: ConstructorParameters<typeof SidebarDirectory>);
20
6
 
21
- /**
22
- * @param options - (unused)
23
- * @override
24
- */
25
- getData(options?: Partial<SidebarDirectory.Options>): ActorDirectory.Data;
7
+ /** @override */
8
+ static documentName: 'Actor';
26
9
 
27
- /**
28
- * @param selector - (unused)
29
- * @override
30
- */
31
- protected _canDragStart(selector: string | null): boolean;
10
+ /** @override */
11
+ protected _canDragStart(selector: string): boolean;
32
12
 
33
- /**
34
- * @override
35
- */
36
- protected _onDragStart(event: DragEvent): false | void;
13
+ /** @override */
14
+ protected _onDragStart(event: DragEvent): void;
37
15
 
38
- /**
39
- * @param selector - (unused)
40
- * @override
41
- */
42
- protected _canDragDrop(selector: string | null): boolean;
16
+ /** @override */
17
+ protected _canDragDrop(selector: string): boolean;
43
18
 
44
- /**
45
- * @override
46
- */
19
+ /** @override */
47
20
  protected _onClickEntityName(event: JQuery.ClickEvent): Promise<void>;
48
21
 
49
- /**
50
- * @override
51
- */
22
+ /** @override */
52
23
  protected _getEntryContextOptions(): ContextMenuEntry[];
53
24
  }
54
-
55
- declare namespace ActorDirectory {
56
- interface Data extends SidebarDirectory.Data {
57
- /**
58
- * @defaultValue `'templates/sidebar/folder-partial.html'`
59
- */
60
- folderPartial: string;
61
-
62
- /**
63
- * @defaultValue `'templates/sidebar/actor-partial.html'`
64
- */
65
- entityPartial: string;
66
- }
67
- }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The sidebar directory which organizes and displays world-level Cards documents.
3
+ */
4
+ declare class CardsDirectory extends SidebarDirectory<'Cards'> {
5
+ /** @override */
6
+ static documentName: 'Cards';
7
+ }
@@ -1,4 +1,5 @@
1
1
  import './actorDirectory';
2
+ import './cardsDirectory';
2
3
  import './itemDirectory';
3
4
  import './journalDirectory';
4
5
  import './macroDirectory';
@@ -1,36 +1,13 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
1
  /**
6
- * A directory of Item entities in the Sidebar
2
+ * The sidebar directory which organizes and displays world-level Item documents.
7
3
  */
8
- declare class ItemDirectory extends SidebarDirectory {
9
- /**
10
- * @override
11
- */
12
- static get entity(): 'Item';
13
-
14
- /**
15
- * @override
16
- * @see {@link Game.items}
17
- */
18
- static get collection(): Game['items'];
19
-
20
- /**
21
- * @param selector - (unused)
22
- * @override
23
- */
24
- protected _canDragStart(selector: string | null): boolean;
4
+ declare class ItemDirectory extends SidebarDirectory<'Item'> {
5
+ /** @override */
6
+ static documentName: 'Item';
25
7
 
26
- /**
27
- * @param selector - (unused)
28
- * @override
29
- */
30
- protected _canDragDrop(selector: string | null): boolean;
8
+ /** @override */
9
+ protected _canDragDrop(selector: string): boolean;
31
10
 
32
- /**
33
- * @override
34
- */
11
+ /** @override */
35
12
  protected _getEntryContextOptions(): ContextMenuEntry[];
36
13
  }
@@ -1,47 +1,27 @@
1
1
  /**
2
- * A directory list of JournalEntry entities in the Sidebar
2
+ * The sidebar directory which organizes and displays world-level JournalEntry documents.
3
3
  */
4
- // TODO: Remove when this class is updated!!!
5
- // eslint-disable-next-line
6
- // @ts-ignore
7
- declare class JournalDirectory extends SidebarDirectory<JournalDirectory.Options> {
8
- /**
9
- * @override
10
- */
11
- static get defaultOptions(): JournalDirectory.Options;
12
-
13
- /**
14
- * @override
15
- */
16
- get title(): string;
4
+ declare class JournalDirectory extends SidebarDirectory<'JournalEntry'> {
5
+ /** @override */
6
+ static documentName: 'JournalEntry';
17
7
 
18
8
  /**
19
9
  * @override
10
+ * @defaultValue
11
+ * ```typescript
12
+ * const options = super.defaultOptions;
13
+ * options.id = "journal";
14
+ * options.template = "templates/sidebar/journal-directory.html";
15
+ * return options;
16
+ * ```
20
17
  */
21
- static get entity(): 'JournalEntry';
18
+ static get defaultOptions(): SidebarDirectory.Options;
22
19
 
23
20
  /**
24
21
  * @override
25
- * @see {@link Game.journal}
26
22
  */
27
- static get collection(): Game['journal'];
23
+ get title(): string;
28
24
 
29
- /**
30
- * @override
31
- */
25
+ /** @override */
32
26
  protected _getEntryContextOptions(): ContextMenuEntry[];
33
27
  }
34
-
35
- declare namespace JournalDirectory {
36
- interface Options extends SidebarDirectory.Options {
37
- /**
38
- * @defaultValue `'journal'`
39
- */
40
- id: string;
41
-
42
- /**
43
- * @defaultValue `'templates/sidebar/journal-directory.html'`
44
- */
45
- template: string;
46
- }
47
- }
@@ -1,65 +1,19 @@
1
1
  /**
2
- * A directory list of Macro entities. Unlike other directories, this app is only rendered in pop-out mode.
2
+ * The directory, not displayed in the sidebar, which organizes and displays world-level Macro documents.
3
3
  *
4
- * @see {@link Macros} The EntityCollection of Macro Entities
4
+ * @see {@link Macros} The WorldCollection of Macro Entities
5
5
  * @see {@link Macro} The Macro Entity
6
6
  * @see {@link MacroConfig} The Macro Configuration Sheet
7
7
  */
8
- // TODO: Remove when this class is updated!!!
9
- // eslint-disable-next-line
10
- // @ts-ignore
11
- declare class MacroDirectory extends SidebarDirectory<MacroDirectory.Options> {
12
- static get defaultOptions(): MacroDirectory.Options;
8
+ declare class MacroDirectory extends SidebarDirectory<'Macro'> {
9
+ constructor(options?: Partial<SidebarDirectory.Options>);
13
10
 
14
- /**
15
- * @override
16
- */
17
- static get entity(): 'Macro';
18
-
19
- /**
20
- * @override
21
- * @see {@link Game.macros}
22
- */
23
- static get collection(): Game['macros'];
24
-
25
- /**
26
- * @override
27
- */
28
- protected _render(force?: boolean, options?: SidebarDirectory.RenderContext<MacroDirectory.Options>): Promise<void>;
11
+ /** @override */
12
+ static documentName: 'Macro';
29
13
 
30
14
  /**
31
15
  * @override
32
16
  * @remarks This is never called.
33
17
  */
34
18
  protected _onCreate(event: Event): Promise<void>;
35
-
36
- /**
37
- * @param selector - (unused)
38
- * @override
39
- */
40
- protected _canDragStart(selector: string | null): true;
41
- }
42
-
43
- declare namespace MacroDirectory {
44
- interface Options extends SidebarDirectory.Options {
45
- /**
46
- * @defaultValue `'macros'`
47
- */
48
- id: string;
49
-
50
- /**
51
- * @defaultValue `'templates/sidebar/macro-directory.html'`
52
- */
53
- template: string;
54
-
55
- /**
56
- * @defaultValue `true`
57
- */
58
- canDrag: boolean;
59
-
60
- /**
61
- * @defaultValue `680`
62
- */
63
- height: number;
64
- }
65
19
  }
@@ -114,13 +114,13 @@ declare global {
114
114
  * Given a constant playback mode, provide the FontAwesome icon used to display it
115
115
  * @internal
116
116
  */
117
- protected _getModeIcon(mode: foundry.CONST.PlaylistMode): string;
117
+ protected _getModeIcon(mode: foundry.CONST.PLAYLIST_MODES): string;
118
118
 
119
119
  /**
120
120
  * Given a constant playback mode, provide the string tooltip used to describe it
121
121
  * @internal
122
122
  */
123
- protected _getModeTooltip(mode: foundry.CONST.PlaylistMode): string;
123
+ protected _getModeTooltip(mode: foundry.CONST.PLAYLIST_MODES): string;
124
124
 
125
125
  /** @override */
126
126
  activateListeners(html: JQuery): void;
@@ -1,30 +1,13 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
1
  /**
6
2
  * A directory listing of active game scenes
7
3
  */
8
- declare class SceneDirectory extends SidebarDirectory {
9
- /**
10
- * @override
11
- */
12
- static get entity(): 'Scene';
13
-
14
- /**
15
- * @override
16
- * @see {@link Game.scenes}
17
- */
18
- static get collection(): Game['scenes'];
4
+ declare class SceneDirectory extends SidebarDirectory<'Scene'> {
5
+ /** @override */
6
+ static documentName: 'Scene';
19
7
 
20
- /**
21
- * @override
22
- * @remarks This is never called.
23
- */
24
- protected _onCreate(event: Event): Promise<Scene>;
8
+ /** @override */
9
+ protected _render(force?: boolean, options?: Application.RenderOptions<SidebarDirectory.Options>): Promise<void>;
25
10
 
26
- /**
27
- * @override
28
- */
11
+ /** @override */
29
12
  protected _getEntryContextOptions(): ContextMenuEntry[];
30
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.EntityType | 'FogExploration',
11
+ Name extends foundry.CONST.DOCUMENT_TYPES | 'FogExploration',
12
12
  Options extends SidebarDirectory.Options = SidebarDirectory.Options
13
13
  > extends SidebarTab<Options> {
14
14
  constructor(options?: Partial<SidebarDirectory.Options>);
@@ -54,7 +54,7 @@ declare global {
54
54
  * The WorldCollection instance which this Sidebar Directory displays.
55
55
  */
56
56
  static get collection(): WorldCollection<
57
- ConfiguredDocumentClassForName<foundry.CONST.EntityType | 'FogExploration'>,
57
+ ConfiguredDocumentClassForName<foundry.CONST.DOCUMENT_TYPES | 'FogExploration'>,
58
58
  string
59
59
  >;
60
60
 
@@ -168,11 +168,9 @@ declare global {
168
168
 
169
169
  /**
170
170
  * @override
171
- * @remarks
172
- * The return type could be specified in more detail but it is not supposed to be used and this allows more
173
- * flexibility for deriving classes.
171
+ * @internal
174
172
  */
175
- protected _onDrop(event: DragEvent): unknown;
173
+ protected _onDrop(event: DragEvent): void;
176
174
 
177
175
  /**
178
176
  * Handle Document data being dropped into the directory.
@@ -116,22 +116,22 @@ declare class AVSettings {
116
116
  type: string;
117
117
 
118
118
  /**
119
- * @defaultValue `''`
119
+ * @defaultValue `""`
120
120
  */
121
121
  url: string;
122
122
 
123
123
  /**
124
- * @defaultValue `''`
124
+ * @defaultValue `""`
125
125
  */
126
126
  room: string;
127
127
 
128
128
  /**
129
- * @defaultValue `''`
129
+ * @defaultValue `""`
130
130
  */
131
131
  username: string;
132
132
 
133
133
  /**
134
- * @defaultValue `''`
134
+ * @defaultValue `""`
135
135
  */
136
136
  password: string;
137
137
  };
@@ -143,17 +143,17 @@ declare class AVSettings {
143
143
  type: string;
144
144
 
145
145
  /**
146
- * @defaultValue `''`
146
+ * @defaultValue `""`
147
147
  */
148
148
  url: string;
149
149
 
150
150
  /**
151
- * @defaultValue `''`
151
+ * @defaultValue `""`
152
152
  */
153
153
  username: string;
154
154
 
155
155
  /**
156
- * @defaultValue `''`
156
+ * @defaultValue `""`
157
157
  */
158
158
  password: string;
159
159
  };