@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,31 +1,31 @@
1
- import DocumentData from '../../abstract/data.mjs';
2
- import { BaseUser } from '../../documents.mjs';
3
- import { ForeignDocumentField } from '../fields.mjs';
4
- import * as fields from '../fields.mjs';
5
- import * as documents from '../../documents.mjs';
6
1
  import {
7
2
  ConfiguredDocumentClass,
8
3
  ConfiguredFlags,
9
4
  FieldReturnType,
10
5
  PropertiesToSource
11
6
  } from '../../../../types/helperTypes';
7
+ import DocumentData from '../../abstract/data.mjs';
8
+ import * as documents from '../../documents.mjs';
9
+ import { BaseUser } from '../../documents.mjs';
10
+ import * as fields from '../fields.mjs';
11
+ import { ForeignDocumentField } from '../fields.mjs';
12
12
 
13
13
  interface DrawingDataSchema extends DocumentSchema {
14
- _id: typeof fields.DOCUMENT_ID;
14
+ _id: fields.DocumentId;
15
15
  author: ForeignDocumentField<{ type: typeof documents.BaseUser; required: true }>;
16
- type: DocumentField<foundry.CONST.DrawingType> & {
16
+ type: DocumentField<foundry.CONST.DRAWING_TYPES> & {
17
17
  type: typeof String;
18
18
  required: true;
19
- default: typeof CONST.DRAWING_TYPES.POLYGON;
20
- 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;
21
21
  validationError: 'Invalid {name} {field} which must be a value in CONST.DRAWING_TYPES';
22
22
  };
23
- x: typeof fields.REQUIRED_NUMBER;
24
- y: typeof fields.REQUIRED_NUMBER;
25
- width: typeof fields.REQUIRED_NUMBER;
26
- height: typeof fields.REQUIRED_NUMBER;
27
- rotation: FieldReturnType<typeof fields.ANGLE_FIELD, { default: 0 }>;
28
- 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;
29
29
  points: DocumentField<Array<[x: number, y: number]>> & {
30
30
  type: [typeof Array];
31
31
  required: true;
@@ -33,36 +33,36 @@ interface DrawingDataSchema extends DocumentSchema {
33
33
  validate: typeof _validateDrawingPoints;
34
34
  validationError: 'Invalid {name} {field} which must be an array of points [x,y]';
35
35
  };
36
- bezierFactor: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0 }>;
36
+ bezierFactor: FieldReturnType<fields.AlphaField, { default: 0 }>;
37
37
  fillType: FieldReturnType<
38
- typeof fields.REQUIRED_NUMBER,
38
+ fields.RequiredNumber,
39
39
  {
40
- default: typeof CONST.DRAWING_FILL_TYPES.NONE;
41
- 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;
42
42
  validationError: 'Invalid {name} {field} which must be a value in CONST.DRAWING_FILL_TYPES';
43
43
  }
44
44
  >;
45
- fillColor: typeof fields.COLOR_FIELD;
46
- fillAlpha: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0.5 }>;
47
- strokeWidth: FieldReturnType<typeof fields.NONNEGATIVE_INTEGER_FIELD, { default: 8 }>;
48
- strokeColor: typeof fields.COLOR_FIELD;
49
- strokeAlpha: typeof fields.ALPHA_FIELD;
50
- texture: typeof fields.IMAGE_FIELD;
51
- text: typeof fields.STRING_FIELD;
52
- 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' }>;
53
53
  fontSize: FieldReturnType<
54
- typeof fields.POSITIVE_INTEGER_FIELD,
54
+ fields.PositiveIntegerField,
55
55
  {
56
56
  default: 48;
57
57
  validate: (n: unknown) => boolean;
58
58
  validationError: 'Invalid {name} {field} which must be an integer between 8 and 256';
59
59
  }
60
60
  >;
61
- textColor: FieldReturnType<typeof fields.COLOR_FIELD, { default: '#FFFFFF' }>;
62
- textAlpha: typeof fields.ALPHA_FIELD;
63
- hidden: typeof fields.BOOLEAN_FIELD;
64
- locked: typeof fields.BOOLEAN_FIELD;
65
- 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;
66
66
  }
67
67
 
68
68
  interface DrawingDataProperties {
@@ -82,7 +82,7 @@ interface DrawingDataProperties {
82
82
  * The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing
83
83
  * @defaultValue `CONST.DRAWING_TYPES.POLYGON`
84
84
  */
85
- type: foundry.CONST.DrawingType;
85
+ type: foundry.CONST.DRAWING_TYPES;
86
86
 
87
87
  /**
88
88
  * The x-coordinate position of the top-left corner of the drawn shape
@@ -136,12 +136,12 @@ interface DrawingDataProperties {
136
136
  * The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES
137
137
  * @defaultValue `CONST.DRAWING_FILL_TYPES.NONE`
138
138
  */
139
- fillType: foundry.CONST.DrawingFillType;
139
+ fillType: foundry.CONST.DRAWING_FILL_TYPES;
140
140
 
141
141
  /**
142
142
  * An optional color string with which to fill the drawing geometry
143
143
  */
144
- fillColor?: string | null;
144
+ fillColor: string | null | undefined;
145
145
 
146
146
  /**
147
147
  * The opacity of the fill applied to the drawing geometry
@@ -158,7 +158,7 @@ interface DrawingDataProperties {
158
158
  /**
159
159
  * The color of the boundary lines of the drawing geometry
160
160
  */
161
- strokeColor?: string | null;
161
+ strokeColor: string | null | undefined;
162
162
 
163
163
  /**
164
164
  * The opacity of the boundary lines of the drawing geometry
@@ -169,12 +169,12 @@ interface DrawingDataProperties {
169
169
  /**
170
170
  * The path to a tiling image texture used to fill the drawing geometry
171
171
  */
172
- texture?: string | null;
172
+ texture: string | null | undefined;
173
173
 
174
174
  /**
175
175
  * Optional text which is displayed overtop of the drawing
176
176
  */
177
- text?: string;
177
+ text: string | undefined;
178
178
 
179
179
  /**
180
180
  * The font family used to display text within this drawing
@@ -224,153 +224,153 @@ interface DrawingDataConstructorData {
224
224
  * The _id which uniquely identifies this BaseDrawing embedded document
225
225
  * @defaultValue `null`
226
226
  */
227
- _id?: string | null;
227
+ _id?: string | null | undefined;
228
228
 
229
229
  /**
230
230
  * The _id of the user who created the drawing
231
231
  * @defaultValue `null`
232
232
  */
233
- author?: InstanceType<ConfiguredDocumentClass<typeof BaseUser>> | string | null;
233
+ author?: InstanceType<ConfiguredDocumentClass<typeof BaseUser>> | string | null | undefined;
234
234
 
235
235
  /**
236
236
  * The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing
237
237
  * @defaultValue `CONST.DRAWING_TYPES.POLYGON`
238
238
  */
239
- type?: foundry.CONST.DrawingType | null;
239
+ type?: foundry.CONST.DRAWING_TYPES | null | undefined;
240
240
 
241
241
  /**
242
242
  * The x-coordinate position of the top-left corner of the drawn shape
243
243
  * @defaultValue `0`
244
244
  */
245
- x?: number | null;
245
+ x?: number | null | undefined;
246
246
 
247
247
  /**
248
248
  * The y-coordinate position of the top-left corner of the drawn shape
249
249
  * @defaultValue `0`
250
250
  */
251
- y?: number | null;
251
+ y?: number | null | undefined;
252
252
 
253
253
  /**
254
254
  * The pixel width of the drawing figure
255
255
  * @defaultValue `0`
256
256
  */
257
- width?: number | null;
257
+ width?: number | null | undefined;
258
258
 
259
259
  /**
260
260
  * The pixel height of the drawing figure
261
261
  * @defaultValue `0`
262
262
  */
263
- height?: number | null;
263
+ height?: number | null | undefined;
264
264
 
265
265
  /**
266
266
  * The angle of rotation for the drawing figure
267
267
  * @defaultValue `0`
268
268
  */
269
- rotation?: number | null;
269
+ rotation?: number | null | undefined;
270
270
 
271
271
  /**
272
272
  * The z-index of this drawing relative to other siblings
273
273
  * @defaultValue `0`
274
274
  */
275
- z?: number | null;
275
+ z?: number | null | undefined;
276
276
 
277
277
  /**
278
278
  * An array of points [x,y] which define polygon vertices
279
279
  * @defaultValue `[]`
280
280
  */
281
- points?: Array<[x: number, y: number]> | null;
281
+ points?: Array<[x: number, y: number]> | null | undefined;
282
282
 
283
283
  /**
284
284
  * An amount of bezier smoothing applied, between 0 and 1
285
285
  * @defaultValue `0`
286
286
  */
287
- bezierFactor?: number | null;
287
+ bezierFactor?: number | null | undefined;
288
288
 
289
289
  /**
290
290
  * The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES
291
291
  * @defaultValue `CONST.DRAWING_FILL_TYPES.NONE`
292
292
  */
293
- fillType?: foundry.CONST.DrawingFillType | null;
293
+ fillType?: foundry.CONST.DRAWING_FILL_TYPES | null | undefined;
294
294
 
295
295
  /**
296
296
  * An optional color string with which to fill the drawing geometry
297
297
  */
298
- fillColor?: string | null;
298
+ fillColor?: string | null | undefined;
299
299
 
300
300
  /**
301
301
  * The opacity of the fill applied to the drawing geometry
302
302
  * @defaultValue `0.5`
303
303
  */
304
- fillAlpha?: number | null;
304
+ fillAlpha?: number | null | undefined;
305
305
 
306
306
  /**
307
307
  * The width in pixels of the boundary lines of the drawing geometry
308
308
  * @defaultValue `8`
309
309
  */
310
- strokeWidth?: number | null;
310
+ strokeWidth?: number | null | undefined;
311
311
 
312
312
  /**
313
313
  * The color of the boundary lines of the drawing geometry
314
314
  */
315
- strokeColor?: string | null;
315
+ strokeColor?: string | null | undefined;
316
316
 
317
317
  /**
318
318
  * The opacity of the boundary lines of the drawing geometry
319
319
  * @defaultValue `1`
320
320
  */
321
- strokeAlpha?: number | null;
321
+ strokeAlpha?: number | null | undefined;
322
322
 
323
323
  /**
324
324
  * The path to a tiling image texture used to fill the drawing geometry
325
325
  */
326
- texture?: string | null;
326
+ texture?: string | null | undefined;
327
327
 
328
328
  /**
329
329
  * Optional text which is displayed overtop of the drawing
330
330
  */
331
- text?: string | null;
331
+ text?: string | null | undefined;
332
332
 
333
333
  /**
334
334
  * The font family used to display text within this drawing
335
335
  * @defaultValue `'Signika'`
336
336
  */
337
- fontFamily?: string | null;
337
+ fontFamily?: string | null | undefined;
338
338
 
339
339
  /**
340
340
  * The font size used to display text within this drawing
341
341
  * @defaultValue `48`
342
342
  */
343
- fontSize?: number | null;
343
+ fontSize?: number | null | undefined;
344
344
 
345
345
  /**
346
346
  * The color of text displayed within this drawing
347
347
  * @defaultValue `'#FFFFFF'`
348
348
  */
349
- textColor?: string | null;
349
+ textColor?: string | null | undefined;
350
350
 
351
351
  /**
352
352
  * The opacity of text displayed within this drawing
353
353
  * @defaultValue `1`
354
354
  */
355
- textAlpha?: number | null;
355
+ textAlpha?: number | null | undefined;
356
356
 
357
357
  /**
358
358
  * Is the drawing currently hidden?
359
359
  * @defaultValue `false`
360
360
  */
361
- hidden?: boolean | null;
361
+ hidden?: boolean | null | undefined;
362
362
 
363
363
  /**
364
364
  * Is the drawing currently locked?
365
365
  * @defaultValue `false`
366
366
  */
367
- locked?: boolean | null;
367
+ locked?: boolean | null | undefined;
368
368
 
369
369
  /**
370
370
  * An object of optional key/value flags
371
371
  * @defaultValue `{}`
372
372
  */
373
- flags?: ConfiguredFlags<'Drawing'> | null;
373
+ flags?: ConfiguredFlags<'Drawing'> | null | undefined;
374
374
  }
375
375
 
376
376
  /**
@@ -380,13 +380,14 @@ interface DrawingDataConstructorData {
380
380
  * @param data - Initial data used to construct the data object
381
381
  * @param document - The embedded document to which this data object belongs
382
382
  */
383
- export declare class DrawingData extends DocumentData<
383
+ export class DrawingData extends DocumentData<
384
384
  DrawingDataSchema,
385
385
  DrawingDataProperties,
386
386
  PropertiesToSource<DrawingDataProperties>,
387
387
  DrawingDataConstructorData,
388
388
  documents.BaseFolder
389
389
  > {
390
+ /** @override */
390
391
  static defineSchema(): DrawingDataSchema;
391
392
 
392
393
  /** @override */
@@ -397,7 +398,7 @@ export declare class DrawingData extends DocumentData<
397
398
  }
398
399
 
399
400
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
400
- export declare interface DrawingData extends DrawingDataProperties {}
401
+ export interface DrawingData extends DrawingDataProperties {}
401
402
 
402
403
  /**
403
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 {}
@@ -1,12 +1,12 @@
1
+ import { ConfiguredDocumentClass, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
1
2
  import DocumentData from '../../abstract/data.mjs';
2
- import { ForeignDocumentField } from '../fields.mjs';
3
- import * as fields from '../fields.mjs';
4
3
  import * as documents from '../../documents.mjs';
5
- import { ConfiguredDocumentClass, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
4
+ import * as fields from '../fields.mjs';
5
+ import { ForeignDocumentField } from '../fields.mjs';
6
6
  import { isBase64Image } from '../validators.mjs';
7
7
 
8
8
  interface FogExplorationDataSchema extends DocumentSchema {
9
- _id: typeof fields.DOCUMENT_ID;
9
+ _id: fields.DocumentId;
10
10
  scene: ForeignDocumentField<{ type: typeof documents.BaseScene }>;
11
11
  user: ForeignDocumentField<{ type: typeof documents.BaseUser }>;
12
12
  explored: DocumentField<string> & {
@@ -17,8 +17,8 @@ interface FogExplorationDataSchema extends DocumentSchema {
17
17
  validate: typeof isBase64Image;
18
18
  validationError: 'The provided FogExploration explored image is not a valid base64 image string';
19
19
  };
20
- positions: typeof fields.OBJECT_FIELD;
21
- timestamp: FieldReturnType<typeof fields.TIMESTAMP_FIELD, { required: true }>;
20
+ positions: fields.ObjectField;
21
+ timestamp: FieldReturnType<fields.TimestampField, { required: true }>;
22
22
  }
23
23
 
24
24
  interface FogExplorationDataProperties {
@@ -52,7 +52,10 @@ interface FogExplorationDataProperties {
52
52
  */
53
53
  positions: Record<string, { radius: number; limit: boolean }>;
54
54
 
55
- /** The timestamp at which this fog exploration was last updated */
55
+ /**
56
+ * The timestamp at which this fog exploration was last updated
57
+ * @defaultValue `Date.now()`
58
+ */
56
59
  timestamp: number;
57
60
  }
58
61
 
@@ -61,47 +64,51 @@ interface FogExplorationDataConstructorData {
61
64
  * The _id which uniquely identifies this FogExploration document
62
65
  * @defaultValue `null`
63
66
  */
64
- _id?: string | null;
67
+ _id?: string | null | undefined;
65
68
 
66
69
  /**
67
70
  * The _id of the Scene document to which this fog applies
68
71
  * @defaultValue `null`
69
72
  */
70
- scene?: string | null | InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>;
73
+ scene?: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>> | string | null | undefined;
71
74
 
72
75
  /**
73
76
  * The _id of the User document to which this fog applies
74
77
  * @defaultValue `null`
75
78
  */
76
- user?: string | null;
79
+ user?: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseUser>> | string | null | undefined;
77
80
 
78
81
  /**
79
82
  * The base64 png image of the explored fog polygon
80
83
  * @defaultValue `null`
81
84
  */
82
- explored?: string | null;
85
+ explored?: string | null | undefined;
83
86
 
84
87
  /**
85
88
  * The object of scene positions which have been explored at a certain vision radius
86
89
  * @defaultValue `{}`
87
90
  */
88
- positions?: Record<string, { radius: number; limit: boolean }> | null;
91
+ positions?: Record<string, { radius: number; limit: boolean }> | null | undefined;
89
92
 
90
- /** The timestamp at which this fog exploration was last updated */
91
- timestamp?: number | null;
93
+ /**
94
+ * The timestamp at which this fog exploration was last updated
95
+ * @defaultValue `Date.now()`
96
+ */
97
+ timestamp?: number | null | undefined;
92
98
  }
93
99
 
94
100
  /**
95
101
  * The data schema for a FogExploration document.
96
102
  */
97
- export declare class FogExplorationData extends DocumentData<
103
+ export class FogExplorationData extends DocumentData<
98
104
  FogExplorationDataSchema,
99
105
  FogExplorationDataProperties,
100
106
  PropertiesToSource<FogExplorationDataProperties>,
101
107
  FogExplorationDataConstructorData
102
108
  > {
109
+ /** @override */
103
110
  static defineSchema(): FogExplorationDataSchema;
104
111
  }
105
112
 
106
113
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
107
- export declare interface FogExplorationData extends FogExplorationDataProperties {}
114
+ export interface FogExplorationData extends FogExplorationDataProperties {}