@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,44 +1,42 @@
1
1
  import {
2
2
  ConfiguredDocumentClass,
3
3
  ConfiguredFlags,
4
- ConstructorDataType,
5
4
  FieldReturnType,
6
5
  PropertiesToSource
7
6
  } from '../../../../types/helperTypes';
8
7
  import EmbeddedCollection from '../../abstract/embedded-collection.mjs';
9
8
  import { DocumentData } from '../../abstract/module.mjs';
10
- import * as fields from '../fields.mjs';
11
9
  import * as documents from '../../documents.mjs';
12
- import * as CONST from '../../constants.mjs';
13
- import { AmbientLightData } from './ambientLightData';
14
- import { AmbientSoundData } from './ambientSoundData';
15
- import { DrawingData } from './drawingData';
16
- import { MeasuredTemplateData } from './measuredTemplateData';
17
- import { NoteData } from './noteData';
18
- import { TileData } from './tileData';
19
- import { TokenData } from './tokenData';
20
- import { WallData } from './wallData';
10
+ import * as fields from '../fields.mjs';
11
+ import { AmbientLightDataConstructorData } from './ambientLightData';
12
+ import { AmbientSoundDataConstructorData } from './ambientSoundData';
13
+ import { DrawingDataConstructorData } from './drawingData';
14
+ import { MeasuredTemplateDataConstructorData } from './measuredTemplateData';
15
+ import { NoteDataConstructorData } from './noteData';
16
+ import { TileDataConstructorData } from './tileData';
17
+ import { TokenDataConstructorData } from './tokenData';
18
+ import { WallDataConstructorData } from './wallData';
21
19
 
22
20
  interface SceneDataSchema extends DocumentSchema {
23
- _id: typeof fields.DOCUMENT_ID;
24
- name: typeof fields.REQUIRED_STRING;
25
- active: typeof fields.BOOLEAN_FIELD;
26
- navigation: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: true }>;
27
- navOrder: typeof fields.INTEGER_SORT_FIELD;
28
- navName: typeof fields.BLANK_STRING;
29
- img: typeof fields.VIDEO_FIELD;
30
- foreground: typeof fields.VIDEO_FIELD;
31
- thumb: typeof fields.IMAGE_FIELD;
32
- width: FieldReturnType<typeof fields.POSITIVE_INTEGER_FIELD, { required: true; default: 4000 }>;
33
- height: FieldReturnType<typeof fields.POSITIVE_INTEGER_FIELD, { required: true; default: 3000 }>;
34
- padding: {
21
+ _id: fields.DocumentId;
22
+ name: fields.RequiredString;
23
+ active: fields.BooleanField;
24
+ navigation: FieldReturnType<fields.BooleanField, { default: true }>;
25
+ navOrder: fields.IntegerSortField;
26
+ navName: fields.BlankString;
27
+ img: fields.VideoField;
28
+ foreground: fields.VideoField;
29
+ thumb: fields.ImageField;
30
+ width: FieldReturnType<fields.PositiveIntegerField, { required: true; default: 4000 }>;
31
+ height: FieldReturnType<fields.PositiveIntegerField, { required: true; default: 3000 }>;
32
+ padding: DocumentField<Number> & {
35
33
  type: typeof Number;
36
34
  required: true;
37
35
  default: 0.25;
38
36
  validate: (p: unknown) => boolean;
39
37
  validation: 'Invalid {name} {field} which must be a number between 0 and 0.5';
40
38
  };
41
- initial: {
39
+ initial: DocumentField<Object> & {
42
40
  type: typeof Object;
43
41
  required: false;
44
42
  nullable: true;
@@ -46,33 +44,33 @@ interface SceneDataSchema extends DocumentSchema {
46
44
  validate: typeof _validateInitialViewPosition;
47
45
  validationError: 'Invalid initial view position object provided for Scene';
48
46
  };
49
- backgroundColor: FieldReturnType<typeof fields.COLOR_FIELD, { required: true; default: '#999999' }>;
47
+ backgroundColor: FieldReturnType<fields.ColorField, { required: true; default: '#999999' }>;
50
48
  gridType: FieldReturnType<
51
- typeof fields.REQUIRED_NUMBER,
49
+ fields.RequiredNumber,
52
50
  {
53
- default: typeof CONST.GRID_TYPES.SQUARE;
54
- validate: (t: unknown) => t is CONST.GridType;
51
+ default: typeof foundry.CONST.GRID_TYPES.SQUARE;
52
+ validate: (t: unknown) => t is foundry.CONST.GRID_TYPES;
55
53
  validationError: 'Invalid {name } {field} which must be a value in CONST.GRID_TYPES';
56
54
  }
57
55
  >;
58
- grid: {
56
+ grid: DocumentField<Number> & {
59
57
  type: typeof Number;
60
58
  required: true;
61
59
  default: 100;
62
60
  validate: (n: unknown) => boolean;
63
- validationError: `Invalid {name} {field} which must be an integer number of pixels, ${typeof CONST.GRID_MIN_SIZE} or greater`;
61
+ validationError: `Invalid {name} {field} which must be an integer number of pixels, ${typeof foundry.CONST.GRID_MIN_SIZE} or greater`;
64
62
  };
65
- shiftX: FieldReturnType<typeof fields.INTEGER_FIELD, { required: true; default: 0 }>;
66
- shiftY: FieldReturnType<typeof fields.INTEGER_FIELD, { required: true; default: 0 }>;
67
- gridColor: FieldReturnType<typeof fields.COLOR_FIELD, { required: true; default: '#000000' }>;
68
- gridAlpha: FieldReturnType<typeof fields.ALPHA_FIELD, { required: true; default: 0.2 }>;
69
- gridDistance: FieldReturnType<typeof fields.REQUIRED_POSITIVE_NUMBER, { default: () => number }>;
70
- gridUnits: FieldReturnType<typeof fields.BLANK_STRING, { default: () => string }>;
71
- tokenVision: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: true }>;
72
- fogExploration: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: true }>;
73
- fogReset: typeof fields.TIMESTAMP_FIELD;
74
- globalLight: typeof fields.BOOLEAN_FIELD;
75
- globalLightThreshold: {
63
+ shiftX: FieldReturnType<fields.IntegerField, { required: true; default: 0 }>;
64
+ shiftY: FieldReturnType<fields.IntegerField, { required: true; default: 0 }>;
65
+ gridColor: FieldReturnType<fields.ColorField, { required: true; default: '#000000' }>;
66
+ gridAlpha: FieldReturnType<fields.AlphaField, { required: true; default: 0.2 }>;
67
+ gridDistance: FieldReturnType<fields.RequiredPositiveNumber, { default: () => number }>;
68
+ gridUnits: FieldReturnType<fields.BlankString, { default: () => string }>;
69
+ tokenVision: FieldReturnType<fields.BooleanField, { default: true }>;
70
+ fogExploration: FieldReturnType<fields.BooleanField, { default: true }>;
71
+ fogReset: fields.TimestampField;
72
+ globalLight: fields.BooleanField;
73
+ globalLightThreshold: DocumentField<Number> & {
76
74
  type: typeof Number;
77
75
  required: true;
78
76
  nullable: true;
@@ -80,28 +78,29 @@ interface SceneDataSchema extends DocumentSchema {
80
78
  validate: (n: unknown) => boolean;
81
79
  validationError: 'Invalid {name} {field} which must be null, or a number between 0 and 1';
82
80
  };
83
- darkness: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0 }>;
81
+ darkness: FieldReturnType<fields.AlphaField, { default: 0 }>;
84
82
  drawings: fields.EmbeddedCollectionField<typeof documents.BaseDrawing>;
85
83
  tokens: fields.EmbeddedCollectionField<typeof documents.BaseToken>;
86
84
  lights: fields.EmbeddedCollectionField<typeof documents.BaseAmbientLight>;
87
85
  notes: fields.EmbeddedCollectionField<typeof documents.BaseNote>;
88
86
  sounds: fields.EmbeddedCollectionField<typeof documents.BaseAmbientSound>;
89
87
  templates: fields.EmbeddedCollectionField<typeof documents.BaseMeasuredTemplate>;
90
- tiles: fields.EmbeddedCollectionField<typeof documents.BaseToken>;
88
+ tiles: fields.EmbeddedCollectionField<typeof documents.BaseTile>;
91
89
  walls: fields.EmbeddedCollectionField<typeof documents.BaseWall>;
92
90
  playlist: fields.ForeignDocumentField<{ type: typeof documents.BasePlaylist; required: false }>;
93
91
  playlistSound: fields.ForeignDocumentField<{ type: typeof documents.BasePlaylistSound; required: false }>;
94
92
  journal: fields.ForeignDocumentField<{ type: typeof documents.BaseJournalEntry; required: false }>;
95
- weather: typeof fields.BLANK_STRING;
93
+ weather: fields.BlankString;
96
94
  folder: fields.ForeignDocumentField<{ type: typeof documents.BaseFolder }>;
97
- sort: typeof fields.INTEGER_SORT_FIELD;
98
- permission: typeof fields.DOCUMENT_PERMISSIONS;
99
- flags: typeof fields.BLANK_STRING;
95
+ sort: fields.IntegerSortField;
96
+ permission: fields.DocumentPermissions;
97
+ flags: fields.ObjectField;
100
98
  }
101
99
 
102
100
  interface SceneDataProperties {
103
101
  /**
104
102
  * The _id which uniquely identifies this Scene document
103
+ * @defaultValue `null`
105
104
  */
106
105
  _id: string | null;
107
106
 
@@ -124,32 +123,30 @@ interface SceneDataProperties {
124
123
 
125
124
  /**
126
125
  * The integer sorting order of this Scene in the navigation bar relative to others
126
+ * @defaultValue `0`
127
127
  */
128
128
  navOrder: number;
129
129
 
130
130
  /**
131
131
  * A string which overrides the canonical Scene name which is displayed in the navigation bar
132
- * @defaultValue `''`
132
+ * @defaultValue `""`
133
133
  */
134
134
  navName: string;
135
135
 
136
136
  /**
137
137
  * An image or video file path which provides the background media for the scene
138
- * @defaultValue `undefined`
139
138
  */
140
- img: string | undefined | null;
139
+ img: string | null | undefined;
141
140
 
142
141
  /**
143
142
  * An image or video file path which is drawn on top of all other elements in the scene
144
- * @defaultValue `undefined`
145
143
  */
146
- foreground: string | undefined | null;
144
+ foreground: string | null | undefined;
147
145
 
148
146
  /**
149
147
  * A thumbnail image (base64) or file path which visually summarizes the scene
150
- * @defaultValue `undefined`
151
148
  */
152
- thumb: string | undefined | null;
149
+ thumb: string | null | undefined;
153
150
 
154
151
  /**
155
152
  * The width of the scene canvas, this should normally be the width of the background media
@@ -186,7 +183,7 @@ interface SceneDataProperties {
186
183
  * The type of grid used in this scene, a number from CONST.GRID_TYPES
187
184
  * @defaultValue `CONST.GRID_TYPES.SQUARE`
188
185
  */
189
- gridType: CONST.GridType;
186
+ gridType: foundry.CONST.GRID_TYPES;
190
187
 
191
188
  /**
192
189
  * The grid size which represents the width (or height) of a single grid space
@@ -220,11 +217,13 @@ interface SceneDataProperties {
220
217
 
221
218
  /**
222
219
  * The number of distance units which are represented by a single grid space.
220
+ * @defaultValue `game.system.data.gridDistance || 1`
223
221
  */
224
222
  gridDistance: number;
225
223
 
226
224
  /**
227
225
  * A label for the units of measure which are used for grid distance.
226
+ * @defaultValue `game.system.data.gridUnits ?? ""`
228
227
  */
229
228
  gridUnits: string;
230
229
 
@@ -242,6 +241,7 @@ interface SceneDataProperties {
242
241
 
243
242
  /**
244
243
  * The timestamp at which fog of war was last reset for this Scene.
244
+ * @defaultValue `Date.now()`
245
245
  */
246
246
  fogReset: number;
247
247
 
@@ -267,42 +267,49 @@ interface SceneDataProperties {
267
267
 
268
268
  /**
269
269
  * A collection of embedded Drawing objects.
270
+ * @defaultValue `new EmbeddedCollection(DrawingData, [], BaseDrawing.implementation)`
270
271
  */
271
272
  drawings: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseDrawing>, SceneData>;
272
273
 
273
274
  /**
274
275
  * A collection of embedded Token objects.
276
+ * @defaultValue `new EmbeddedCollection(TokenData, [], BaseToken.implementation)`
275
277
  */
276
278
  tokens: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseToken>, SceneData>;
277
279
 
278
280
  /**
279
- *
280
281
  * A collection of embedded AmbientLight objects.
282
+ * @defaultValue `new EmbeddedCollection(AmbientLightData, [], BaseAmbientLight.implementation)`
281
283
  */
282
284
  lights: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseAmbientLight>, SceneData>;
283
285
 
284
286
  /**
285
287
  * A collection of embedded Note objects.
288
+ * @defaultValue `new EmbeddedCollection(NoteData, [], BaseNote.implementation)`
286
289
  */
287
290
  notes: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseNote>, SceneData>;
288
291
 
289
292
  /**
290
293
  * A collection of embedded AmbientSound objects.
294
+ * @defaultValue `new EmbeddedCollection(AmbientSoundData, [], BaseAmbientSound.implementation)`
291
295
  */
292
296
  sounds: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseAmbientSound>, SceneData>;
293
297
 
294
298
  /**
295
299
  * A collection of embedded MeasuredTemplate objects.
300
+ * @defaultValue `new EmbeddedCollection(MeasuredTemplateData, [], BaseMeasuredTemplate.implementation)`
296
301
  */
297
302
  templates: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseMeasuredTemplate>, SceneData>;
298
303
 
299
304
  /**
300
305
  * A collection of embedded Tile objects.
306
+ * @defaultValue `new EmbeddedCollection(TileData, [], BaseTile.implementation)`
301
307
  */
302
308
  tiles: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseTile>, SceneData>;
303
309
 
304
310
  /**
305
311
  * A collection of embedded Wall objects
312
+ * @defaultValue `new EmbeddedCollection(WallData, [], BaseWall.implementation)`
306
313
  */
307
314
  walls: EmbeddedCollection<ConfiguredDocumentClass<typeof documents.BaseWall>, SceneData>;
308
315
 
@@ -314,6 +321,8 @@ interface SceneDataProperties {
314
321
  playlist: string | null;
315
322
 
316
323
  /**
324
+ * A linked PlaylistSound document from the selected playlist that will
325
+ * begin automatically playing when this Scene becomes active.
317
326
  * @defaultValue `null`
318
327
  */
319
328
  playlistSound: string | null;
@@ -326,7 +335,7 @@ interface SceneDataProperties {
326
335
 
327
336
  /**
328
337
  * A named weather effect which should be rendered in this Scene.
329
- * @defaultValue `''`
338
+ * @defaultValue `""`
330
339
  */
331
340
  weather: string;
332
341
 
@@ -343,10 +352,10 @@ interface SceneDataProperties {
343
352
  sort: number;
344
353
 
345
354
  /**
346
- * An object which configures user permissions to this Actor
355
+ * An object which configures user permissions to this Scene
347
356
  * @defaultValue `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
348
357
  */
349
- permission: Partial<Record<string, foundry.CONST.EntityPermission>>;
358
+ permission: Partial<Record<string, foundry.CONST.DOCUMENT_PERMISSION_LEVELS>>;
350
359
 
351
360
  /**
352
361
  * An object of optional key/value flags
@@ -357,8 +366,9 @@ interface SceneDataProperties {
357
366
  interface SceneDataConstructorData {
358
367
  /**
359
368
  * The _id which uniquely identifies this Scene document
369
+ * @defaultValue `null`
360
370
  */
361
- _id?: string | null;
371
+ _id?: string | null | undefined;
362
372
 
363
373
  /**
364
374
  * The name of this scene
@@ -369,251 +379,261 @@ interface SceneDataConstructorData {
369
379
  * Is this scene currently active? Only one scene may be active at a given time.
370
380
  * @defaultValue `false`
371
381
  */
372
- active?: boolean | null;
382
+ active?: boolean | null | undefined;
373
383
 
374
384
  /**
375
385
  * Is this scene displayed in the top navigation bar?
376
386
  * @defaultValue `true`
377
387
  */
378
- navigation?: boolean | null;
388
+ navigation?: boolean | null | undefined;
379
389
 
380
390
  /**
381
391
  * The integer sorting order of this Scene in the navigation bar relative to others
392
+ * @defaultValue `0`
382
393
  */
383
- navOrder?: number | null;
394
+ navOrder?: number | null | undefined;
384
395
 
385
396
  /**
386
397
  * A string which overrides the canonical Scene name which is displayed in the navigation bar
387
- * @defaultValue `''`
398
+ * @defaultValue `""`
388
399
  */
389
- navName?: string | null;
400
+ navName?: string | null | undefined;
390
401
 
391
402
  /**
392
403
  * An image or video file path which provides the background media for the scene
393
- * @defaultValue `undefined`
394
404
  */
395
- img?: string | undefined | null;
405
+ img?: string | null | undefined;
396
406
 
397
407
  /**
398
408
  * An image or video file path which is drawn on top of all other elements in the scene
399
- * @defaultValue `undefined`
400
409
  */
401
- foreground?: string | undefined | null;
410
+ foreground?: string | null | undefined;
402
411
 
403
412
  /**
404
413
  * A thumbnail image (base64) or file path which visually summarizes the scene
405
- * @defaultValue `undefined`
406
414
  */
407
- thumb?: string | undefined | null;
415
+ thumb?: string | null | undefined;
408
416
 
409
417
  /**
410
418
  * The width of the scene canvas, this should normally be the width of the background media
411
419
  * @defaultValue `4000`
412
420
  */
413
- width?: number | null;
421
+ width?: number | null | undefined;
414
422
 
415
423
  /**
416
424
  * The height of the scene canvas, this should normally be the height of the background media
417
425
  * @defaultValue `3000`
418
426
  */
419
- height?: number | null;
427
+ height?: number | null | undefined;
420
428
 
421
429
  /**
422
430
  * The proportion of canvas padding applied around the outside of the scene
423
431
  * dimensions to provide additional buffer space
424
432
  * @defaultValue `0.25`
425
433
  */
426
- padding?: number | null;
434
+ padding?: number | null | undefined;
427
435
 
428
436
  /**
429
437
  * The initial view coordinates for the scene, or null
430
438
  * @defaultValue `null`
431
439
  */
432
- initial?: { x: number; y: number; scale: number } | null;
440
+ initial?: { x: number; y: number; scale: number } | null | undefined;
433
441
 
434
442
  /**
435
443
  * The color of the canvas which is displayed behind the scene background
436
444
  * @defaultValue `#999999`
437
445
  */
438
- backgroundColor?: string | null;
446
+ backgroundColor?: string | null | undefined;
439
447
 
440
448
  /**
441
449
  * The type of grid used in this scene, a number from CONST.GRID_TYPES
442
450
  * @defaultValue `CONST.GRID_TYPES.SQUARE`
443
451
  */
444
- gridType?: CONST.GridType | null;
452
+ gridType?: foundry.CONST.GRID_TYPES | null | undefined;
445
453
 
446
454
  /**
447
455
  * The grid size which represents the width (or height) of a single grid space
448
456
  * @defaultValue `100`
449
457
  */
450
- grid?: number | null;
458
+ grid?: number | null | undefined;
451
459
 
452
460
  /**
453
461
  * A number of offset pixels that the background image is shifted horizontally relative to the grid
454
462
  * @defaultValue `0`
455
463
  */
456
- shiftX?: number | null;
464
+ shiftX?: number | null | undefined;
457
465
 
458
466
  /**
459
467
  * A number of offset pixels that the background image is shifted vertically relative to the grid
460
468
  * @defaultValue `0`
461
469
  */
462
- shiftY?: number | null;
470
+ shiftY?: number | null | undefined;
463
471
 
464
472
  /**
465
473
  * A string representing the color used to render the grid lines
466
474
  * @defaultValue `#000000`
467
475
  */
468
- gridColor?: string | null;
476
+ gridColor?: string | null | undefined;
469
477
 
470
478
  /**
471
479
  * A number between 0 and 1 for the opacity of the grid lines
472
480
  * @defaultValue `0.2`
473
481
  */
474
- gridAlpha?: number | null;
482
+ gridAlpha?: number | null | undefined;
475
483
 
476
484
  /**
477
485
  * The number of distance units which are represented by a single grid space.
486
+ * @defaultValue `game.system.data.gridDistance || 1`
478
487
  */
479
- gridDistance?: number | null;
488
+ gridDistance?: number | null | undefined;
480
489
 
481
490
  /**
482
491
  * A label for the units of measure which are used for grid distance.
492
+ * @defaultValue `game.system.data.gridUnits ?? ""`
483
493
  */
484
- gridUnits?: string | null;
494
+ gridUnits?: string | null | undefined;
485
495
 
486
496
  /**
487
497
  * Do Tokens require vision in order to see the Scene environment?
488
498
  * @defaultValue `true`
489
499
  */
490
- tokenVision?: boolean | null;
500
+ tokenVision?: boolean | null | undefined;
491
501
 
492
502
  /**
493
503
  * Should fog exploration progress be tracked for this Scene?
494
504
  * @defaultValue `true`
495
505
  */
496
- fogExploration?: boolean | null;
506
+ fogExploration?: boolean | null | undefined;
497
507
 
498
508
  /**
499
509
  * The timestamp at which fog of war was last reset for this Scene.
510
+ * @defaultValue `Date.now()`
500
511
  */
501
- fogReset?: number | null;
512
+ fogReset?: number | null | undefined;
502
513
 
503
514
  /**
504
515
  * Does this Scene benefit from global illumination which provides bright light everywhere?
505
516
  * @defaultValue `false`
506
517
  */
507
- globalLight?: boolean | null;
518
+ globalLight?: boolean | null | undefined;
508
519
 
509
520
  /**
510
521
  * A darkness level between 0 and 1, beyond which point global illumination is
511
522
  * temporarily disabled if globalLight is true.
512
523
  * @defaultValue `null`
513
524
  */
514
- globalLightThreshold?: number | null;
525
+ globalLightThreshold?: number | null | undefined;
515
526
 
516
527
  /**
517
528
  * The ambient darkness level in this Scene, where 0 represents mid-day
518
529
  * (maximum illumination) and 1 represents mid-night (maximum darkness)
519
530
  * @defaultValue `0`
520
531
  */
521
- darkness?: number | null;
532
+ darkness?: number | null | undefined;
522
533
 
523
534
  /**
524
535
  * A collection of embedded Drawing objects.
536
+ * @defaultValue `new EmbeddedCollection(DrawingData, [], BaseDrawing.implementation)`
525
537
  */
526
- drawings?: ConstructorDataType<DrawingData>[] | null;
538
+ drawings?: DrawingDataConstructorData[] | null | undefined;
527
539
 
528
540
  /**
529
541
  * A collection of embedded Token objects.
542
+ * @defaultValue `new EmbeddedCollection(TokenData, [], BaseToken.implementation)`
530
543
  */
531
- tokens?: ConstructorDataType<TokenData>[] | null;
544
+ tokens?: TokenDataConstructorData[] | null | undefined;
532
545
 
533
546
  /**
534
- *
535
547
  * A collection of embedded AmbientLight objects.
548
+ * @defaultValue `new EmbeddedCollection(AmbientLightData, [], BaseAmbientLight.implementation)`
536
549
  */
537
- lights?: ConstructorDataType<AmbientLightData>[] | null;
550
+ lights?: AmbientLightDataConstructorData[] | null | undefined;
538
551
 
539
552
  /**
540
553
  * A collection of embedded Note objects.
554
+ * @defaultValue `new EmbeddedCollection(NoteData, [], BaseNote.implementation)`
541
555
  */
542
- notes?: ConstructorDataType<NoteData>[] | null;
556
+ notes?: NoteDataConstructorData[] | null | undefined;
543
557
 
544
558
  /**
545
559
  * A collection of embedded AmbientSound objects.
560
+ * @defaultValue `new EmbeddedCollection(AmbientSoundData, [], BaseAmbientSound.implementation)`
546
561
  */
547
- sounds?: ConstructorDataType<AmbientSoundData>[] | null;
562
+ sounds?: AmbientSoundDataConstructorData[] | null | undefined;
548
563
 
549
564
  /**
550
565
  * A collection of embedded MeasuredTemplate objects.
566
+ * @defaultValue `new EmbeddedCollection(MeasuredTemplateData, [], BaseMeasuredTemplate.implementation)`
551
567
  */
552
- templates?: ConstructorDataType<MeasuredTemplateData>[] | null;
568
+ templates?: MeasuredTemplateDataConstructorData[] | null | undefined;
553
569
 
554
570
  /**
555
571
  * A collection of embedded Tile objects.
572
+ * @defaultValue `new EmbeddedCollection(TileData, [], BaseTile.implementation)`
556
573
  */
557
- tiles?: ConstructorDataType<TileData>[] | null;
574
+ tiles?: TileDataConstructorData[] | null | undefined;
558
575
 
559
576
  /**
560
577
  * A collection of embedded Wall objects
578
+ * @defaultValue `new EmbeddedCollection(WallData, [], BaseWall.implementation)`
561
579
  */
562
- walls?: ConstructorDataType<WallData>[] | null;
580
+ walls?: WallDataConstructorData[] | null | undefined;
563
581
 
564
582
  /**
565
583
  * A linked Playlist document which should begin automatically playing when this
566
584
  * Scene becomes active.
567
585
  * @defaultValue `null`
568
586
  */
569
- playlist?: string | null;
587
+ playlist?: InstanceType<ConfiguredDocumentClass<typeof documents.BasePlaylist>> | string | null | undefined;
570
588
 
571
589
  /**
590
+ * A linked PlaylistSound document from the selected playlist that will
591
+ * begin automatically playing when this Scene becomes active.
572
592
  * @defaultValue `null`
573
593
  */
574
- playlistSound?: string | null;
594
+ playlistSound?: InstanceType<ConfiguredDocumentClass<typeof documents.BasePlaylistSound>> | string | null | undefined;
575
595
 
576
596
  /**
577
597
  * A linked JournalEntry document which provides narrative details about this Scene.
578
598
  * @defaultValue `null`
579
599
  */
580
- journal?: string | null;
600
+ journal?: InstanceType<ConfiguredDocumentClass<typeof documents.BaseJournalEntry>> | string | null | undefined;
581
601
 
582
602
  /**
583
603
  * A named weather effect which should be rendered in this Scene.
584
- * @defaultValue `''`
604
+ * @defaultValue `""`
585
605
  */
586
- weather?: string | null;
606
+ weather?: string | null | undefined;
587
607
 
588
608
  /**
589
609
  * The _id of a Folder which contains this Actor
590
610
  * @defaultValue `null`
591
611
  */
592
- folder?: string | null;
612
+ folder?: InstanceType<ConfiguredDocumentClass<typeof documents.BaseFolder>> | string | null | undefined;
593
613
 
594
614
  /**
595
615
  * The numeric sort value which orders this Actor relative to its siblings
596
616
  * @defaultValue `0`
597
617
  */
598
- sort?: number | null;
618
+ sort?: number | null | undefined;
599
619
 
600
620
  /**
601
- * An object which configures user permissions to this Actor
621
+ * An object which configures user permissions to this Scene
602
622
  * @defaultValue `{ default: CONST.ENTITY_PERMISSIONS.NONE }`
603
623
  */
604
- permission?: Partial<Record<string, foundry.CONST.EntityPermission>> | null;
624
+ permission?: Partial<Record<string, foundry.CONST.DOCUMENT_PERMISSION_LEVELS>> | null | undefined;
605
625
 
606
626
  /**
607
627
  * An object of optional key/value flags
608
628
  */
609
- flags?: ConfiguredFlags<'Scene'> | null;
629
+ flags?: ConfiguredFlags<'Scene'> | null | undefined;
610
630
  }
611
631
 
612
632
  /**
613
633
  * The data schema for a Scene document.
614
634
  * @see BaseScene
615
635
  */
616
- export declare class SceneData extends DocumentData<
636
+ export class SceneData extends DocumentData<
617
637
  SceneDataSchema,
618
638
  SceneDataProperties,
619
639
  PropertiesToSource<SceneDataProperties>,
@@ -625,6 +645,7 @@ export declare class SceneData extends DocumentData<
625
645
  */
626
646
  constructor(data: SceneDataConstructorData, document?: documents.BaseScene | null);
627
647
 
648
+ /** @override */
628
649
  static defineSchema(): SceneDataSchema;
629
650
 
630
651
  /** @override */
@@ -634,7 +655,7 @@ export declare class SceneData extends DocumentData<
634
655
  }
635
656
 
636
657
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
637
- export declare interface SceneData extends SceneDataProperties {}
658
+ export interface SceneData extends SceneDataProperties {}
638
659
 
639
660
  /**
640
661
  * Verify that the initial view position for a Scene is valid