@league-of-foundry-developers/foundry-vtt-types 0.8.9-6 → 9.238.0

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 (211) 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 +72 -66
  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/sceneControls.d.ts +13 -3
  128. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
  129. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
  130. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
  131. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
  132. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +13 -56
  133. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  134. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  135. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/itemDirectory.d.ts +7 -30
  136. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
  137. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
  138. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  139. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
  140. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
  141. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  142. package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
  143. package/src/foundry/foundry.js/canvas.d.ts +150 -47
  144. package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
  145. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  146. package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +210 -0
  147. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
  148. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  149. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
  150. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  151. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +1 -1
  152. package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
  153. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
  154. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  155. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
  156. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
  157. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
  158. package/src/foundry/foundry.js/clientDocuments/index.d.ts +3 -0
  159. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  160. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  161. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +15 -0
  162. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
  163. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  164. package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
  165. package/src/foundry/foundry.js/clientSettings.d.ts +21 -6
  166. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
  167. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  168. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  169. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  170. package/src/foundry/foundry.js/config.d.ts +494 -902
  171. package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
  172. package/src/foundry/foundry.js/game.d.ts +86 -11
  173. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  174. package/src/foundry/foundry.js/globalVariables.d.ts +7 -4
  175. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  176. package/src/foundry/foundry.js/hooks.d.ts +57 -0
  177. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  178. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +78 -34
  179. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  180. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  181. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  182. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  183. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  184. package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
  185. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  186. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  187. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +10 -19
  188. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
  189. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
  190. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
  191. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  192. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  193. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  194. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  195. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +4 -1
  196. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
  197. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
  198. package/src/foundry/foundry.js/pointSource.d.ts +174 -86
  199. package/src/foundry/foundry.js/roll.d.ts +25 -36
  200. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  201. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  202. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  203. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  204. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  205. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  206. package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
  207. package/src/foundry/foundry.js/textEditor.d.ts +40 -9
  208. package/src/foundry/index.d.ts +5 -0
  209. package/src/types/utils.d.ts +11 -3
  210. package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
  211. package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -1,26 +1,31 @@
1
+ import {
2
+ ConfiguredDocumentClass,
3
+ ConfiguredFlags,
4
+ FieldReturnType,
5
+ PropertiesToSource
6
+ } from '../../../../types/helperTypes';
1
7
  import DocumentData from '../../abstract/data.mjs';
8
+ import * as documents from '../../documents.mjs';
2
9
  import { BaseUser } from '../../documents.mjs';
3
- import { ForeignDocumentField } from '../fields.mjs';
4
10
  import * as fields from '../fields.mjs';
5
- import * as documents from '../../documents.mjs';
6
- import { ConfiguredDocumentClass, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
11
+ import { ForeignDocumentField } from '../fields.mjs';
7
12
 
8
13
  interface DrawingDataSchema extends DocumentSchema {
9
- _id: typeof fields.DOCUMENT_ID;
14
+ _id: fields.DocumentId;
10
15
  author: ForeignDocumentField<{ type: typeof documents.BaseUser; required: true }>;
11
- type: DocumentField<foundry.CONST.DrawingType> & {
16
+ type: DocumentField<foundry.CONST.DRAWING_TYPES> & {
12
17
  type: typeof String;
13
18
  required: true;
14
- default: typeof CONST.DRAWING_TYPES.POLYGON;
15
- validate: (t: unknown) => t is foundry.CONST.DrawingType;
19
+ default: typeof foundry.CONST.DRAWING_TYPES.POLYGON;
20
+ validate: (t: unknown) => t is foundry.CONST.DRAWING_TYPES;
16
21
  validationError: 'Invalid {name} {field} which must be a value in CONST.DRAWING_TYPES';
17
22
  };
18
- x: typeof fields.REQUIRED_NUMBER;
19
- y: typeof fields.REQUIRED_NUMBER;
20
- width: typeof fields.REQUIRED_NUMBER;
21
- height: typeof fields.REQUIRED_NUMBER;
22
- rotation: FieldReturnType<typeof fields.ANGLE_FIELD, { default: 0 }>;
23
- z: typeof fields.REQUIRED_NUMBER;
23
+ x: fields.RequiredNumber;
24
+ y: fields.RequiredNumber;
25
+ width: fields.RequiredNumber;
26
+ height: fields.RequiredNumber;
27
+ rotation: FieldReturnType<fields.AngleField, { default: 0 }>;
28
+ z: fields.RequiredNumber;
24
29
  points: DocumentField<Array<[x: number, y: number]>> & {
25
30
  type: [typeof Array];
26
31
  required: true;
@@ -28,36 +33,36 @@ interface DrawingDataSchema extends DocumentSchema {
28
33
  validate: typeof _validateDrawingPoints;
29
34
  validationError: 'Invalid {name} {field} which must be an array of points [x,y]';
30
35
  };
31
- bezierFactor: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0 }>;
36
+ bezierFactor: FieldReturnType<fields.AlphaField, { default: 0 }>;
32
37
  fillType: FieldReturnType<
33
- typeof fields.REQUIRED_NUMBER,
38
+ fields.RequiredNumber,
34
39
  {
35
- default: typeof CONST.DRAWING_FILL_TYPES.NONE;
36
- validate: (v: unknown) => v is foundry.CONST.DrawingFillType;
40
+ default: typeof foundry.CONST.DRAWING_FILL_TYPES.NONE;
41
+ validate: (v: unknown) => v is foundry.CONST.DRAWING_FILL_TYPES;
37
42
  validationError: 'Invalid {name} {field} which must be a value in CONST.DRAWING_FILL_TYPES';
38
43
  }
39
44
  >;
40
- fillColor: typeof fields.COLOR_FIELD;
41
- fillAlpha: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0.5 }>;
42
- strokeWidth: FieldReturnType<typeof fields.NONNEGATIVE_INTEGER_FIELD, { default: 8 }>;
43
- strokeColor: typeof fields.COLOR_FIELD;
44
- strokeAlpha: typeof fields.ALPHA_FIELD;
45
- texture: typeof fields.IMAGE_FIELD;
46
- text: typeof fields.STRING_FIELD;
47
- fontFamily: FieldReturnType<typeof fields.REQUIRED_STRING, { default: 'Signika' }>;
45
+ fillColor: fields.ColorField;
46
+ fillAlpha: FieldReturnType<fields.AlphaField, { default: 0.5 }>;
47
+ strokeWidth: FieldReturnType<fields.NonnegativeIntegerField, { default: 8 }>;
48
+ strokeColor: fields.ColorField;
49
+ strokeAlpha: fields.AlphaField;
50
+ texture: fields.ImageField;
51
+ text: fields.StringField;
52
+ fontFamily: FieldReturnType<fields.RequiredString, { default: 'Signika' }>;
48
53
  fontSize: FieldReturnType<
49
- typeof fields.POSITIVE_INTEGER_FIELD,
54
+ fields.PositiveIntegerField,
50
55
  {
51
56
  default: 48;
52
57
  validate: (n: unknown) => boolean;
53
58
  validationError: 'Invalid {name} {field} which must be an integer between 8 and 256';
54
59
  }
55
60
  >;
56
- textColor: FieldReturnType<typeof fields.COLOR_FIELD, { default: '#FFFFFF' }>;
57
- textAlpha: typeof fields.ALPHA_FIELD;
58
- hidden: typeof fields.BOOLEAN_FIELD;
59
- locked: typeof fields.BOOLEAN_FIELD;
60
- flags: typeof fields.OBJECT_FIELD;
61
+ textColor: FieldReturnType<fields.ColorField, { default: '#FFFFFF' }>;
62
+ textAlpha: fields.AlphaField;
63
+ hidden: fields.BooleanField;
64
+ locked: fields.BooleanField;
65
+ flags: fields.ObjectField;
61
66
  }
62
67
 
63
68
  interface DrawingDataProperties {
@@ -77,7 +82,7 @@ interface DrawingDataProperties {
77
82
  * The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing
78
83
  * @defaultValue `CONST.DRAWING_TYPES.POLYGON`
79
84
  */
80
- type: foundry.CONST.DrawingType;
85
+ type: foundry.CONST.DRAWING_TYPES;
81
86
 
82
87
  /**
83
88
  * The x-coordinate position of the top-left corner of the drawn shape
@@ -131,12 +136,12 @@ interface DrawingDataProperties {
131
136
  * The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES
132
137
  * @defaultValue `CONST.DRAWING_FILL_TYPES.NONE`
133
138
  */
134
- fillType: foundry.CONST.DrawingFillType;
139
+ fillType: foundry.CONST.DRAWING_FILL_TYPES;
135
140
 
136
141
  /**
137
142
  * An optional color string with which to fill the drawing geometry
138
143
  */
139
- fillColor?: string | null;
144
+ fillColor: string | null | undefined;
140
145
 
141
146
  /**
142
147
  * The opacity of the fill applied to the drawing geometry
@@ -153,7 +158,7 @@ interface DrawingDataProperties {
153
158
  /**
154
159
  * The color of the boundary lines of the drawing geometry
155
160
  */
156
- strokeColor?: string | null;
161
+ strokeColor: string | null | undefined;
157
162
 
158
163
  /**
159
164
  * The opacity of the boundary lines of the drawing geometry
@@ -164,12 +169,12 @@ interface DrawingDataProperties {
164
169
  /**
165
170
  * The path to a tiling image texture used to fill the drawing geometry
166
171
  */
167
- texture?: string | null;
172
+ texture: string | null | undefined;
168
173
 
169
174
  /**
170
175
  * Optional text which is displayed overtop of the drawing
171
176
  */
172
- text?: string;
177
+ text: string | undefined;
173
178
 
174
179
  /**
175
180
  * The font family used to display text within this drawing
@@ -211,7 +216,7 @@ interface DrawingDataProperties {
211
216
  * An object of optional key/value flags
212
217
  * @defaultValue `{}`
213
218
  */
214
- flags: Record<string, unknown>;
219
+ flags: ConfiguredFlags<'Drawing'>;
215
220
  }
216
221
 
217
222
  interface DrawingDataConstructorData {
@@ -219,153 +224,153 @@ interface DrawingDataConstructorData {
219
224
  * The _id which uniquely identifies this BaseDrawing embedded document
220
225
  * @defaultValue `null`
221
226
  */
222
- _id?: string | null;
227
+ _id?: string | null | undefined;
223
228
 
224
229
  /**
225
230
  * The _id of the user who created the drawing
226
231
  * @defaultValue `null`
227
232
  */
228
- author?: InstanceType<ConfiguredDocumentClass<typeof BaseUser>> | string | null;
233
+ author?: InstanceType<ConfiguredDocumentClass<typeof BaseUser>> | string | null | undefined;
229
234
 
230
235
  /**
231
236
  * The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing
232
237
  * @defaultValue `CONST.DRAWING_TYPES.POLYGON`
233
238
  */
234
- type?: foundry.CONST.DrawingType | null;
239
+ type?: foundry.CONST.DRAWING_TYPES | null | undefined;
235
240
 
236
241
  /**
237
242
  * The x-coordinate position of the top-left corner of the drawn shape
238
243
  * @defaultValue `0`
239
244
  */
240
- x?: number | null;
245
+ x?: number | null | undefined;
241
246
 
242
247
  /**
243
248
  * The y-coordinate position of the top-left corner of the drawn shape
244
249
  * @defaultValue `0`
245
250
  */
246
- y?: number | null;
251
+ y?: number | null | undefined;
247
252
 
248
253
  /**
249
254
  * The pixel width of the drawing figure
250
255
  * @defaultValue `0`
251
256
  */
252
- width?: number | null;
257
+ width?: number | null | undefined;
253
258
 
254
259
  /**
255
260
  * The pixel height of the drawing figure
256
261
  * @defaultValue `0`
257
262
  */
258
- height?: number | null;
263
+ height?: number | null | undefined;
259
264
 
260
265
  /**
261
266
  * The angle of rotation for the drawing figure
262
267
  * @defaultValue `0`
263
268
  */
264
- rotation?: number | null;
269
+ rotation?: number | null | undefined;
265
270
 
266
271
  /**
267
272
  * The z-index of this drawing relative to other siblings
268
273
  * @defaultValue `0`
269
274
  */
270
- z?: number | null;
275
+ z?: number | null | undefined;
271
276
 
272
277
  /**
273
278
  * An array of points [x,y] which define polygon vertices
274
279
  * @defaultValue `[]`
275
280
  */
276
- points?: Array<[x: number, y: number]> | null;
281
+ points?: Array<[x: number, y: number]> | null | undefined;
277
282
 
278
283
  /**
279
284
  * An amount of bezier smoothing applied, between 0 and 1
280
285
  * @defaultValue `0`
281
286
  */
282
- bezierFactor?: number | null;
287
+ bezierFactor?: number | null | undefined;
283
288
 
284
289
  /**
285
290
  * The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES
286
291
  * @defaultValue `CONST.DRAWING_FILL_TYPES.NONE`
287
292
  */
288
- fillType?: foundry.CONST.DrawingFillType | null;
293
+ fillType?: foundry.CONST.DRAWING_FILL_TYPES | null | undefined;
289
294
 
290
295
  /**
291
296
  * An optional color string with which to fill the drawing geometry
292
297
  */
293
- fillColor?: string | null;
298
+ fillColor?: string | null | undefined;
294
299
 
295
300
  /**
296
301
  * The opacity of the fill applied to the drawing geometry
297
302
  * @defaultValue `0.5`
298
303
  */
299
- fillAlpha?: number | null;
304
+ fillAlpha?: number | null | undefined;
300
305
 
301
306
  /**
302
307
  * The width in pixels of the boundary lines of the drawing geometry
303
308
  * @defaultValue `8`
304
309
  */
305
- strokeWidth?: number | null;
310
+ strokeWidth?: number | null | undefined;
306
311
 
307
312
  /**
308
313
  * The color of the boundary lines of the drawing geometry
309
314
  */
310
- strokeColor?: string | null;
315
+ strokeColor?: string | null | undefined;
311
316
 
312
317
  /**
313
318
  * The opacity of the boundary lines of the drawing geometry
314
319
  * @defaultValue `1`
315
320
  */
316
- strokeAlpha?: number | null;
321
+ strokeAlpha?: number | null | undefined;
317
322
 
318
323
  /**
319
324
  * The path to a tiling image texture used to fill the drawing geometry
320
325
  */
321
- texture?: string | null;
326
+ texture?: string | null | undefined;
322
327
 
323
328
  /**
324
329
  * Optional text which is displayed overtop of the drawing
325
330
  */
326
- text?: string | null;
331
+ text?: string | null | undefined;
327
332
 
328
333
  /**
329
334
  * The font family used to display text within this drawing
330
335
  * @defaultValue `'Signika'`
331
336
  */
332
- fontFamily?: string | null;
337
+ fontFamily?: string | null | undefined;
333
338
 
334
339
  /**
335
340
  * The font size used to display text within this drawing
336
341
  * @defaultValue `48`
337
342
  */
338
- fontSize?: number | null;
343
+ fontSize?: number | null | undefined;
339
344
 
340
345
  /**
341
346
  * The color of text displayed within this drawing
342
347
  * @defaultValue `'#FFFFFF'`
343
348
  */
344
- textColor?: string | null;
349
+ textColor?: string | null | undefined;
345
350
 
346
351
  /**
347
352
  * The opacity of text displayed within this drawing
348
353
  * @defaultValue `1`
349
354
  */
350
- textAlpha?: number | null;
355
+ textAlpha?: number | null | undefined;
351
356
 
352
357
  /**
353
358
  * Is the drawing currently hidden?
354
359
  * @defaultValue `false`
355
360
  */
356
- hidden?: boolean | null;
361
+ hidden?: boolean | null | undefined;
357
362
 
358
363
  /**
359
364
  * Is the drawing currently locked?
360
365
  * @defaultValue `false`
361
366
  */
362
- locked?: boolean | null;
367
+ locked?: boolean | null | undefined;
363
368
 
364
369
  /**
365
370
  * An object of optional key/value flags
366
371
  * @defaultValue `{}`
367
372
  */
368
- flags?: Record<string, unknown> | null;
373
+ flags?: ConfiguredFlags<'Drawing'> | null | undefined;
369
374
  }
370
375
 
371
376
  /**
@@ -375,13 +380,14 @@ interface DrawingDataConstructorData {
375
380
  * @param data - Initial data used to construct the data object
376
381
  * @param document - The embedded document to which this data object belongs
377
382
  */
378
- export declare class DrawingData extends DocumentData<
383
+ export class DrawingData extends DocumentData<
379
384
  DrawingDataSchema,
380
385
  DrawingDataProperties,
381
386
  PropertiesToSource<DrawingDataProperties>,
382
387
  DrawingDataConstructorData,
383
388
  documents.BaseFolder
384
389
  > {
390
+ /** @override */
385
391
  static defineSchema(): DrawingDataSchema;
386
392
 
387
393
  /** @override */
@@ -392,7 +398,7 @@ export declare class DrawingData extends DocumentData<
392
398
  }
393
399
 
394
400
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
395
- export declare interface DrawingData extends DrawingDataProperties {}
401
+ export interface DrawingData extends DrawingDataProperties {}
396
402
 
397
403
  /**
398
404
  * Validate the array of points which comprises a polygon drawing
@@ -1,83 +1,79 @@
1
+ import { FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
1
2
  import { DocumentData } from '../../abstract/module.mjs';
2
3
  import { BaseActiveEffect } from '../../documents.mjs';
3
4
  import * as fields from '../fields.mjs';
4
- import * as CONST from '../../constants.mjs';
5
- import { PropertiesToSource } from '../../../../types/helperTypes';
6
5
 
7
6
  interface EffectChangeDataSchema extends DocumentSchema {
8
- key: typeof fields.BLANK_STRING;
9
- value: typeof fields.BLANK_STRING;
10
- mode: DocumentField<number> & {
11
- type: typeof Number;
12
- required: true;
13
- default: typeof CONST.ACTIVE_EFFECT_MODES.ADD;
14
- validate: (m: unknown) => boolean;
15
- validationError: 'Invalid mode specified for change in ActiveEffectData';
16
- };
17
- priority: typeof fields.NUMERIC_FIELD;
7
+ key: fields.BlankString;
8
+ value: fields.BlankString;
9
+ mode: FieldReturnType<fields.NonnegativeNumberField, { default: typeof foundry.CONST.ACTIVE_EFFECT_MODES.ADD }>;
10
+ priority: fields.NumericField;
18
11
  }
19
12
 
20
13
  interface EffectChangeDataProperties {
21
14
  /**
22
15
  * The attribute path in the Actor or Item data which the change modifies
23
- * @defaultValue `''`
16
+ * @defaultValue `""`
24
17
  */
25
18
  key: string;
26
19
 
27
20
  /**
28
21
  * The value of the change effect
29
- * @defaultValue `''`
22
+ * @defaultValue `""`
30
23
  */
31
24
  value: string;
32
25
 
33
26
  /**
34
27
  * The modification mode with which the change is applied
28
+ * @defaultValue `CONST.ACTIVE_EFFECT_MODES.ADD`
35
29
  */
36
- mode: CONST.ActiveEffectMode;
30
+ mode: foundry.CONST.ACTIVE_EFFECT_MODES;
37
31
 
38
32
  /**
39
33
  * The priority level with which this change is applied
40
34
  */
41
- priority?: number | null;
35
+ priority: number | null | undefined;
42
36
  }
43
37
 
44
- export interface EffectChangeDataConstructorData {
38
+ interface EffectChangeDataConstructorData {
45
39
  /**
46
40
  * The attribute path in the Actor or Item data which the change modifies
47
- * @defaultValue `''`
41
+ * @defaultValue `""`
48
42
  */
49
- key?: string | null;
43
+ key?: string | null | undefined;
50
44
 
51
45
  /**
52
46
  * The value of the change effect
53
- * @defaultValue `''`
47
+ * @defaultValue `""`
54
48
  */
55
- value?: string | null;
49
+ value?: string | null | undefined;
56
50
 
57
51
  /**
58
52
  * The modification mode with which the change is applied
53
+ * @defaultValue `CONST.ACTIVE_EFFECT_MODES.ADD`
59
54
  */
60
- mode?: CONST.ActiveEffectMode | null;
55
+ mode?: foundry.CONST.ACTIVE_EFFECT_MODES | null | undefined;
61
56
 
62
57
  /**
63
58
  * The priority level with which this change is applied
64
59
  */
65
- priority?: number | null;
60
+ priority?: number | null | undefined;
66
61
  }
67
62
 
68
63
  /**
69
64
  * An embedded data structure which defines the structure of a change applied by an ActiveEffect.
70
65
  * @see ActiveEffectData
71
66
  */
72
- export declare class EffectChangeData extends DocumentData<
67
+ export class EffectChangeData extends DocumentData<
73
68
  EffectChangeDataSchema,
74
69
  EffectChangeDataProperties,
75
70
  PropertiesToSource<EffectChangeDataProperties>,
76
71
  EffectChangeDataConstructorData,
77
72
  BaseActiveEffect
78
73
  > {
74
+ /** @override */
79
75
  static defineSchema(): EffectChangeDataSchema;
80
76
  }
81
77
 
82
78
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
83
- export declare interface EffectChangeData extends EffectChangeDataProperties {}
79
+ export interface EffectChangeData extends EffectChangeDataProperties {}
@@ -4,13 +4,13 @@ import { BaseActiveEffect } from '../../documents.mjs';
4
4
  import * as fields from '../fields.mjs';
5
5
 
6
6
  interface EffectDurationDataSchema extends DocumentSchema {
7
- startTime: FieldReturnType<typeof fields.NUMERIC_FIELD, { default: null }>;
8
- seconds: typeof fields.NONNEGATIVE_INTEGER_FIELD;
9
- combat: typeof fields.STRING_FIELD;
10
- rounds: typeof fields.NONNEGATIVE_INTEGER_FIELD;
11
- turns: typeof fields.NONNEGATIVE_INTEGER_FIELD;
12
- startRound: typeof fields.NONNEGATIVE_INTEGER_FIELD;
13
- startTurn: typeof fields.NONNEGATIVE_INTEGER_FIELD;
7
+ startTime: FieldReturnType<fields.NumericField, { default: null }>;
8
+ seconds: fields.NonnegativeIntegerField;
9
+ combat: fields.StringField;
10
+ rounds: fields.NonnegativeIntegerField;
11
+ turns: fields.NonnegativeIntegerField;
12
+ startRound: fields.NonnegativeIntegerField;
13
+ startTurn: fields.NonnegativeIntegerField;
14
14
  }
15
15
 
16
16
  interface EffectDurationDataProperties {
@@ -23,85 +23,86 @@ interface EffectDurationDataProperties {
23
23
  /**
24
24
  * The maximum duration of the effect, in seconds
25
25
  */
26
- seconds?: number;
26
+ seconds: number | undefined;
27
27
 
28
28
  /**
29
29
  * The _id of the CombatEncounter in which the effect first started
30
30
  */
31
- combat?: string;
31
+ combat: string | undefined;
32
32
 
33
33
  /**
34
34
  * The maximum duration of the effect, in combat rounds
35
35
  */
36
- rounds?: number;
36
+ rounds: number | undefined;
37
37
 
38
38
  /**
39
39
  * The maximum duration of the effect, in combat turns
40
40
  */
41
- turns?: number;
41
+ turns: number | undefined;
42
42
 
43
43
  /**
44
44
  * The round of the CombatEncounter in which the effect first started
45
45
  */
46
- startRound?: number;
46
+ startRound: number | undefined;
47
47
 
48
48
  /**
49
49
  * The turn of the CombatEncounter in which the effect first started
50
50
  */
51
- startTurn?: number;
51
+ startTurn: number | undefined;
52
52
  }
53
53
 
54
- export interface EffectDurationDataConstructorData {
54
+ interface EffectDurationDataConstructorData {
55
55
  /**
56
56
  * The world time when the active effect first started
57
57
  * @defaultValue `null`
58
58
  */
59
- startTime?: number | null;
59
+ startTime?: number | null | undefined;
60
60
 
61
61
  /**
62
62
  * The maximum duration of the effect, in seconds
63
63
  */
64
- seconds?: number | null;
64
+ seconds?: number | null | undefined;
65
65
 
66
66
  /**
67
67
  * The _id of the CombatEncounter in which the effect first started
68
68
  */
69
- combat?: string | null;
69
+ combat?: string | null | undefined;
70
70
 
71
71
  /**
72
72
  * The maximum duration of the effect, in combat rounds
73
73
  */
74
- rounds?: number | null;
74
+ rounds?: number | null | undefined;
75
75
 
76
76
  /**
77
77
  * The maximum duration of the effect, in combat turns
78
78
  */
79
- turns?: number | null;
79
+ turns?: number | null | undefined;
80
80
 
81
81
  /**
82
82
  * The round of the CombatEncounter in which the effect first started
83
83
  */
84
- startRound?: number | null;
84
+ startRound?: number | null | undefined;
85
85
 
86
86
  /**
87
87
  * The turn of the CombatEncounter in which the effect first started
88
88
  */
89
- startTurn?: number | null;
89
+ startTurn?: number | null | undefined;
90
90
  }
91
91
 
92
92
  /**
93
93
  * An embedded data structure which tracks the duration of an ActiveEffect.
94
94
  * @see ActiveEffectData
95
95
  */
96
- export declare class EffectDurationData extends DocumentData<
96
+ export class EffectDurationData extends DocumentData<
97
97
  EffectDurationDataSchema,
98
98
  EffectDurationDataProperties,
99
99
  PropertiesToSource<EffectDurationDataProperties>,
100
100
  EffectDurationDataConstructorData,
101
101
  BaseActiveEffect
102
102
  > {
103
+ /** @override */
103
104
  static defineSchema(): EffectDurationDataSchema;
104
105
  }
105
106
 
106
107
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
107
- export declare interface EffectDurationData extends EffectDurationDataProperties {}
108
+ export interface EffectDurationData extends EffectDurationDataProperties {}