@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
@@ -16,7 +16,10 @@ declare global {
16
16
 
17
17
  get total(): string;
18
18
 
19
- evaluate(options?: Partial<RollTerm.EvaluationOptions>): never;
19
+ /** @override */
20
+ get isDeterministic(): boolean;
21
+
22
+ evaluate(options?: InexactPartial<RollTerm.EvaluationOptions>): never;
20
23
  }
21
24
  }
22
25
 
@@ -84,7 +84,7 @@ declare namespace SearchFilter {
84
84
 
85
85
  /**
86
86
  * The initial value of the search query.
87
- * @defaultValue `''`
87
+ * @defaultValue `""`
88
88
  */
89
89
  initial?: SearchFilter['query'];
90
90
 
@@ -6,7 +6,7 @@ declare class TextEditor {
6
6
  * Create a Rich Text Editor. The current implementation uses TinyMCE
7
7
  * @param options - Configuration options provided to the Editor init
8
8
  * @param content - Initial HTML or text content to populate the editor with
9
- * (default: `''`)
9
+ * (default: `""`)
10
10
  * @returns The editor instance.
11
11
  */
12
12
  static create(options: TextEditor.Options, content: string): Promise<tinyMCE.Editor>;
@@ -34,7 +34,22 @@ declare class TextEditor {
34
34
  * (default: `250`)
35
35
  * @returns The previewed HTML
36
36
  */
37
- static previewHTML(content: string, length: number): string;
37
+ static previewHTML(content: string, length?: number): string;
38
+
39
+ /**
40
+ * Truncate an HTML fragment to a maximum number of text content characters, removing any unused elements.
41
+ * @param html - The root HTML element.
42
+ * @param maxLength - The maximum allowed length of the text content.
43
+ * (default: `50`)
44
+ * @param splitWords - Whether to truncate by splitting on white space (if true) or breaking words.
45
+ * (default: `true`)
46
+ * @param suffix - A suffix string to append to denote that the text was truncated.
47
+ * (default: `'…'`)
48
+ */
49
+ static truncateHTML(
50
+ html: HTMLElement,
51
+ { maxLength, splitWords, suffix }: { maxLength?: number; splitWords?: boolean; suffix?: string }
52
+ ): HTMLElement;
38
53
 
39
54
  /**
40
55
  * Truncate a fragment of text to a maximum number of characters.
@@ -55,11 +70,13 @@ declare class TextEditor {
55
70
  * Recursively identify the text nodes within a parent HTML node for potential content replacement.
56
71
  * @param parent - The parent HTML Element
57
72
  * @returns An array of contained Text nodes
73
+ * @internal
58
74
  */
59
75
  protected static _getTextNodes(parent: HTMLElement): Text[];
60
76
 
61
77
  /**
62
78
  * Facilitate the replacement of text node content using a matching regex rule and a provided replacement function.
79
+ * @internal
63
80
  */
64
81
  protected static _replaceTextContent(
65
82
  text: Text[],
@@ -69,6 +86,7 @@ declare class TextEditor {
69
86
 
70
87
  /**
71
88
  * Replace a matched portion of a Text node with a replacement Node
89
+ * @internal
72
90
  */
73
91
  protected static _replaceTextNode(text: Text, match: RegExpMatchArray, replacement: Node): void;
74
92
 
@@ -79,13 +97,15 @@ declare class TextEditor {
79
97
  * @param target - The requested match target (_id or name)
80
98
  * @param name - A customized or over-ridden display name for the link
81
99
  * @returns An HTML element for the entity link
100
+ * @internal
82
101
  */
83
- protected static _createEntityLink(match: string, type: string, target: string, name: string): HTMLAnchorElement;
102
+ protected static _createContentLink(match: string, type: string, target: string, name: string): HTMLAnchorElement;
84
103
 
85
104
  /**
86
105
  * Replace a hyperlink-like string with an actual HTML <a> tag
87
106
  * @param match - The full matched string
88
107
  * @returns An HTML element for the entity link
108
+ * @internal
89
109
  */
90
110
  protected static _createHyperlink(match: string): HTMLAnchorElement;
91
111
 
@@ -95,47 +115,58 @@ declare class TextEditor {
95
115
  * @param command - An optional command
96
116
  * @param formula - The matched formula
97
117
  * @param closing - The closing brackets for the inline roll
118
+ * @param label - An optional label which configures the button text
98
119
  * @returns The replaced match
120
+ * @internal
99
121
  */
100
122
  protected static _createInlineRoll(
101
123
  match: string,
102
124
  command: string,
103
125
  formula: string,
104
126
  closing: string,
127
+ label?: string,
105
128
  ...args: object[]
106
- ): string;
129
+ ): HTMLAnchorElement | null;
107
130
 
108
131
  static activateListeners(): void;
109
132
 
110
133
  /**
111
134
  * Handle click events on Entity Links
135
+ * @internal
112
136
  */
113
- protected static _onClickEntityLink(event: Event): Promise<void>;
137
+ protected static _onClickContentLink(event: JQuery.ClickEvent): void;
114
138
 
115
139
  /**
116
140
  * Handle left-mouse clicks on an inline roll, dispatching the formula or displaying the tooltip
117
141
  * @param event - The initiating click event
142
+ * @internal
118
143
  */
119
- protected static _onClickInlineRoll(event: MouseEvent): Promise<void | Promise<void> | Promise<ChatMessage> | object>;
144
+ protected static _onClickInlineRoll(event: JQuery.ClickEvent): void;
120
145
 
121
146
  /**
122
147
  * Begin a Drag+Drop workflow for a dynamic content link
123
148
  * @param event - The originating drag event
149
+ * @internal
124
150
  */
125
- protected static _onDragEntityLink(event: Event): void;
151
+ protected static _onDragEntityLink(event: JQuery.DragStartEvent): void;
126
152
 
127
153
  /**
128
154
  * Begin a a data transfer drag event with default handling
155
+ * @internal
129
156
  */
130
- protected _onDragStart(event: Event): void;
157
+ protected _onDragStart(event: DragEvent): void;
131
158
 
132
159
  /**
133
160
  * Handle dropping of transferred data onto the active rich text editor
134
161
  * @param event - The originating drop event which triggered the data transfer
135
162
  * @param editor - The TinyMCE editor instance being dropped on
136
163
  */
137
- protected static _onDropEditorData(event: Event, editor: tinyMCE.Editor): Promise<void>;
164
+ protected static _onDropEditorData(event: DragEvent, editor: tinyMCE.Editor): void;
138
165
 
166
+ /**
167
+ * Singleton decoder area
168
+ * @internal
169
+ */
139
170
  protected static _decoder: HTMLTextAreaElement;
140
171
  }
141
172
 
@@ -11,8 +11,10 @@ import './foundry.js/canvas';
11
11
  import './foundry.js/canvasAnimation';
12
12
  import './foundry.js/canvasDocumentMixin';
13
13
  import './foundry.js/chatBubbles';
14
+ import './foundry.js/clientDatabaseBackend';
14
15
  import './foundry.js/clientDocuments';
15
16
  import './foundry.js/clientDocumentMixin';
17
+ import './foundry.js/clientKeybindings';
16
18
  import './foundry.js/clientSettings';
17
19
  import './foundry.js/config';
18
20
  import './foundry.js/constants';
@@ -23,6 +25,7 @@ import './foundry.js/features';
23
25
  import './foundry.js/fonts';
24
26
  import './foundry.js/formDataExtended';
25
27
  import './foundry.js/game';
28
+ import './foundry.js/gamepadManager';
26
29
  import './foundry.js/gameTime';
27
30
  import './foundry.js/globalVariables';
28
31
  import './foundry.js/handlebarsHelpers';
@@ -32,6 +35,8 @@ import './foundry.js/keyboardManager';
32
35
  import './foundry.js/localization';
33
36
  import './foundry.js/mersenneTwister';
34
37
  import './foundry.js/mouseInteractionManager';
38
+ import './foundry.js/mouseManager';
39
+ import './foundry.js/newUserExperience';
35
40
  import './foundry.js/perceptionManager';
36
41
  import './foundry.js/pointSource';
37
42
  import './foundry.js/quadtree';
@@ -2,10 +2,18 @@
2
2
  * Recursively sets keys of an object to optional. Used primarily for update methods
3
3
  * @internal
4
4
  */
5
- declare type DeepPartial<T> = {
5
+ type DeepPartial<T> = {
6
6
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
7
7
  };
8
8
 
9
+ /**
10
+ * Make all properties in T optional and explicitly allow `undefined`
11
+ * @internal
12
+ */
13
+ type InexactPartial<T> = {
14
+ [P in keyof T]?: T[P] | undefined;
15
+ };
16
+
9
17
  /**
10
18
  * References the constructor of type `T`
11
19
  * @internal
@@ -75,7 +83,7 @@ type Expanded<O> = O extends Record<string, unknown>
75
83
  * Union type of the types of the values in `T`
76
84
  * @internal
77
85
  */
78
- type ValueOf<T> = T extends Array<unknown> ? T[number] : T[keyof T];
86
+ type ValueOf<T> = T extends Array<unknown> | ReadonlyArray<unknown> ? T[number] : T[keyof T];
79
87
 
80
88
  /**
81
89
  * Transforms a string to lowercase and the first character to uppercase.
@@ -96,7 +104,7 @@ type Titlecase<S extends string> = S extends `${infer A} ${infer B}`
96
104
  * @typeParam U - The type that will be merged into `T`.
97
105
  */
98
106
  type Merge<T, U> = T extends object
99
- ? U extends Array<any>
107
+ ? U extends Array<any> | ReadonlyArray<any>
100
108
  ? U
101
109
  : U extends object
102
110
  ? {
@@ -1,61 +0,0 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
- /**
6
- * A configuration Form Application for modifying the properties of a MeasuredTemplate object.
7
- * @see {@link MeasuredTemplate}
8
- */
9
- declare class MeasuredTemplateConfig extends FormApplication<
10
- FormApplication.Options,
11
- MeasuredTemplateConfig.Data,
12
- MeasuredTemplate
13
- > {
14
- /**
15
- * @override
16
- * @defaultValue
17
- * ```typescript
18
- * mergeObject(super.defaultOptions, {
19
- * id: "template-config",
20
- * classes: ["sheet", "template-sheet"],
21
- * title: "Measurement Template Configuration",
22
- * template: "templates/scene/template-config.html",
23
- * width: 400
24
- * });
25
- * ```
26
- */
27
- static get defaultOptions(): typeof FormApplication['defaultOptions'];
28
-
29
- /**
30
- * @override
31
- */
32
- getData(): MeasuredTemplateConfig.Data;
33
-
34
- /**
35
- * @override
36
- */
37
- protected _updateObject(event: Event, formData: MeasuredTemplateConfig.FormData): Promise<MeasuredTemplate | null>;
38
- }
39
-
40
- declare namespace MeasuredTemplateConfig {
41
- interface Data {
42
- object: foundry.utils.Duplicated<MeasuredTemplateConfig['object']['data']>;
43
- options: MeasuredTemplateConfig['options'];
44
- templateTypes: typeof CONFIG['MeasuredTemplate']['types'];
45
- gridUnits: Scene['data']['gridUnits'];
46
- submitText: string;
47
- }
48
-
49
- type FormData = {
50
- angle: MeasuredTemplate.Data['angle'];
51
- borderColor: MeasuredTemplate.Data['borderColor'];
52
- direction: MeasuredTemplate.Data['direction'] | null;
53
- distance: MeasuredTemplate.Data['distance'] | null;
54
- fillColor: MeasuredTemplate.Data['fillColor'];
55
- t: MeasuredTemplate.Data['t'];
56
- texture: MeasuredTemplate.Data['texture'];
57
- width: MeasuredTemplate.Data['width'];
58
- x: MeasuredTemplate.Data['x'] | null;
59
- y: MeasuredTemplate.Data['y'] | null;
60
- };
61
- }
@@ -1,77 +0,0 @@
1
- // TODO: Remove when updating this class!!!
2
- // eslint-disable-next-line
3
- // @ts-nocheck
4
-
5
- /**
6
- * Placeable Note configuration sheet
7
- * @typeParam P - the type of the options object
8
- */
9
- declare class NoteConfig<P extends FormApplication.Options = FormApplication.Options> extends FormApplication<
10
- P,
11
- NoteConfig.Data,
12
- Note
13
- > {
14
- /**
15
- * @param note - The Note object for which settings are being configured
16
- * @param options - Additional Application options
17
- */
18
- constructor(note: Note, options?: Partial<P>);
19
-
20
- /**
21
- * @override
22
- * @defaultValue
23
- * ```typescript
24
- * mergeObject(super.defaultOptions, {
25
- * id: "note-config",
26
- * title: game.i18n.localize("NOTE.ConfigTitle"),
27
- * template: "templates/scene/note-config.html",
28
- * width: 400
29
- * });
30
- * ```
31
- */
32
- static get defaultOptions(): typeof FormApplication['defaultOptions'];
33
-
34
- /**
35
- * @param options - (unused)
36
- * @override
37
- */
38
- getData(options?: Partial<P>): NoteConfig.Data;
39
-
40
- /**
41
- * @param event - (unused)
42
- * @override
43
- */
44
- protected _updateObject(event: Event, formData: NoteConfig.FormData): Promise<Note>;
45
-
46
- /**
47
- * @override
48
- */
49
- close(options?: Application.CloseOptions): Promise<void>;
50
- }
51
-
52
- declare namespace NoteConfig {
53
- interface Data {
54
- entryIcons: typeof CONFIG.JournalEntry['noteIcons'];
55
- entryId: JournalEntry['_id'] | undefined;
56
- entryName: JournalEntry['name'] | undefined;
57
- entries: Journal['entities'];
58
- fontFamilies: Partial<Record<string, string>>;
59
- object: foundry.utils.Duplicated<NoteConfig['object']['data']>;
60
- options: NoteConfig['options'];
61
- textAnchors: Record<foundry.CONST.TextAnchorPoint, string>;
62
- }
63
-
64
- interface FormData {
65
- entryId: Note.Data['entryId'];
66
- fontFamily: Note.Data['fontFamily'];
67
- fontSize: Note.Data['fontSize'] | null;
68
- icon: Note.Data['icon'];
69
- iconSize: Note.Data['iconSize'] | null;
70
- iconTint: Note.Data['iconTint'];
71
- text: Note.Data['text'];
72
- textAnchor: Note.Data['textAnchor'];
73
- textColor: Note.Data['textColor'];
74
- x: Note.Data['x'] | null;
75
- y: Note.Data['y'] | null;
76
- }
77
- }