@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
@@ -4,26 +4,27 @@ import * as documents from '../../documents.mjs';
4
4
  import * as fields from '../fields.mjs';
5
5
 
6
6
  interface SettingDataSchema extends DocumentSchema {
7
- _id: typeof fields.DOCUMENT_ID;
7
+ _id: fields.DocumentId;
8
8
  key: DocumentField<string> & {
9
9
  type: typeof String;
10
10
  required: true;
11
11
  validate: typeof _validateKeyFormat;
12
12
  validationError: 'Invalid setting key format which should be {scope}.{field}';
13
13
  };
14
- value: FieldReturnType<typeof fields.JSON_FIELD, { required: true }>;
14
+ value: FieldReturnType<fields.JsonField, { required: true }>;
15
15
  }
16
16
 
17
17
  interface SettingDataProperties {
18
18
  /**
19
19
  * The _id which uniquely identifies this Setting document
20
+ * @defaultValue `null`
20
21
  */
21
22
  _id: string | null;
22
23
 
23
24
  /**
24
25
  * The setting key, a composite of \{scope\}.\{name\}
25
26
  */
26
- key: string;
27
+ key: `${string}.${string}`;
27
28
 
28
29
  /**
29
30
  * The setting value, which may be any type of data
@@ -35,26 +36,27 @@ interface SettingDataProperties {
35
36
  interface SettingDataConstructorData {
36
37
  /**
37
38
  * The _id which uniquely identifies this Setting document
39
+ * @defaultValue `null`
38
40
  */
39
- _id?: string | null;
41
+ _id?: string | null | undefined;
40
42
 
41
43
  /**
42
44
  * The setting key, a composite of \{scope\}.\{name\}
43
45
  */
44
- key: string;
46
+ key: `${string}.${string}`;
45
47
 
46
48
  /**
47
49
  * The setting value, which may be any type of data
48
50
  * @remarks This is the stringified data
49
51
  */
50
- value: string;
52
+ value: string | object;
51
53
  }
52
54
 
53
55
  /**
54
56
  * The data schema for a Setting document.
55
57
  * @see BaseSetting
56
58
  */
57
- export declare class SettingData extends DocumentData<
59
+ export class SettingData extends DocumentData<
58
60
  SettingDataSchema,
59
61
  SettingDataProperties,
60
62
  PropertiesToSource<SettingDataProperties>,
@@ -68,11 +70,12 @@ export declare class SettingData extends DocumentData<
68
70
  */
69
71
  constructor(data: SettingDataConstructorData, document?: documents.BaseSetting | null);
70
72
 
73
+ /** @override */
71
74
  static defineSchema(): SettingDataSchema;
72
75
  }
73
76
 
74
77
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
75
- export declare interface SettingData extends SettingDataProperties {}
78
+ export interface SettingData extends SettingDataProperties {}
76
79
 
77
80
  /**
78
81
  * Validate that each setting key matches the expected format
@@ -4,27 +4,27 @@ import { BaseTableResult } from '../../documents.mjs';
4
4
  import { fields } from '../module.mjs';
5
5
 
6
6
  interface TableResultDataSchema extends DocumentSchema {
7
- _id: typeof fields.DOCUMENT_ID;
8
- type: DocumentField<foundry.CONST.TableResultType> & {
7
+ _id: fields.DocumentId;
8
+ type: DocumentField<foundry.CONST.TABLE_RESULT_TYPES> & {
9
9
  type: typeof Number;
10
- default: typeof CONST.TABLE_RESULT_TYPES.TEXT;
11
- validate: (t: unknown) => t is foundry.CONST.TableResultType;
10
+ default: typeof foundry.CONST.TABLE_RESULT_TYPES.TEXT;
11
+ validate: (t: unknown) => t is foundry.CONST.TABLE_RESULT_TYPES;
12
12
  validationError: 'Invalid TableResult type provided';
13
13
  };
14
- text: typeof fields.BLANK_STRING;
15
- img: typeof fields.IMAGE_FIELD;
16
- collection: typeof fields.STRING_FIELD;
17
- resultId: typeof fields.STRING_FIELD;
18
- weight: typeof fields.POSITIVE_INTEGER_FIELD;
19
- range: {
14
+ text: fields.BlankString;
15
+ img: fields.ImageField;
16
+ collection: fields.StringField;
17
+ resultId: fields.StringField;
18
+ weight: fields.PositiveIntegerField;
19
+ range: DocumentField<[number, number]> & {
20
20
  type: [typeof Number];
21
21
  required: true;
22
22
  default: [];
23
23
  validate: typeof _isValidResultRange;
24
24
  validationError: 'Invalid TableResult range which must be a length-2 array of ascending integers';
25
25
  };
26
- drawn: typeof fields.BOOLEAN_FIELD;
27
- flags: typeof fields.OBJECT_FIELD;
26
+ drawn: fields.BooleanField;
27
+ flags: fields.ObjectField;
28
28
  }
29
29
 
30
30
  /**
@@ -46,17 +46,18 @@ interface TableResultDataProperties {
46
46
  * A result sub-type from CONST.TABLE_RESULT_TYPES
47
47
  * @defaultValue `CONST.TABLE_RESULT_TYPES.TEXT`
48
48
  */
49
- type: foundry.CONST.TableResultType;
49
+ type: foundry.CONST.TABLE_RESULT_TYPES;
50
50
 
51
51
  /**
52
52
  * The text which describes the table result
53
+ * @defaultValue `""`
53
54
  */
54
55
  text: string;
55
56
 
56
57
  /**
57
58
  * An image file url that represents the table result
58
59
  */
59
- img: string | undefined;
60
+ img: string | null | undefined;
60
61
 
61
62
  /**
62
63
  * A named collection from which this result is drawn
@@ -70,7 +71,6 @@ interface TableResultDataProperties {
70
71
 
71
72
  /**
72
73
  * The probabilistic weight of this result relative to other results
73
- * @defaultValue `1`
74
74
  */
75
75
  weight: number | undefined;
76
76
 
@@ -98,39 +98,39 @@ interface TableResultDataConstructorData {
98
98
  * The _id which uniquely identifies this TableResult embedded document
99
99
  * @defaultValue `null`
100
100
  */
101
- _id?: string | null;
101
+ _id?: string | null | undefined;
102
102
 
103
103
  /**
104
104
  * A result sub-type from CONST.TABLE_RESULT_TYPES
105
105
  * @defaultValue `CONST.TABLE_RESULT_TYPES.TEXT`
106
106
  */
107
- type?: foundry.CONST.TableResultType | null | undefined;
107
+ type?: foundry.CONST.TABLE_RESULT_TYPES | null | undefined;
108
108
 
109
109
  /**
110
110
  * The text which describes the table result
111
+ * @defaultValue `""`
111
112
  */
112
- text?: string | null;
113
+ text?: string | null | undefined;
113
114
 
114
115
  /**
115
116
  * An image file url that represents the table result
116
117
  */
117
- img?: string | undefined | null;
118
+ img?: string | null | undefined;
118
119
 
119
120
  /**
120
121
  * A named collection from which this result is drawn
121
122
  */
122
- collection?: string | undefined | null;
123
+ collection?: string | null | undefined;
123
124
 
124
125
  /**
125
126
  * The _id of a Document within the collection this result references
126
127
  */
127
- resultId?: string | undefined | null;
128
+ resultId?: string | null | undefined;
128
129
 
129
130
  /**
130
131
  * The probabilistic weight of this result relative to other results
131
- * @defaultValue `1`
132
132
  */
133
- weight?: number | undefined | null;
133
+ weight?: number | null | undefined;
134
134
 
135
135
  /**
136
136
  * A length 2 array of ascending integers which defines the range of dice roll
@@ -142,21 +142,25 @@ interface TableResultDataConstructorData {
142
142
  * Has this result already been drawn (without replacement)
143
143
  * @defaultValue `false`
144
144
  */
145
- drawn?: boolean | undefined | null;
145
+ drawn?: boolean | null | undefined;
146
146
 
147
147
  /**
148
148
  * An object of optional key/value flags
149
149
  * @defaultValue `{}`
150
150
  */
151
- flags?: ConfiguredFlags<'TableResult'> | undefined | null;
151
+ flags?: ConfiguredFlags<'TableResult'> | null | undefined;
152
152
  }
153
153
 
154
- export declare class TableResultData extends DocumentData<
154
+ export class TableResultData extends DocumentData<
155
155
  TableResultDataSchema,
156
156
  TableResultDataProperties,
157
157
  PropertiesToSource<TableResultDataProperties>,
158
158
  TableResultDataConstructorData,
159
159
  BaseTableResult
160
160
  > {
161
+ /** @override */
161
162
  static defineSchema(): TableResultDataSchema;
162
163
  }
164
+
165
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
166
+ export declare interface TableResultData extends TableResultDataProperties {}
@@ -1,40 +1,41 @@
1
- import { TileOcclusion, TileOcclusionConstructorData } from './tileOcclusion';
2
- import { VideoData, VideoDataConstructorData } from './videoData';
3
1
  import { ConfiguredFlags, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
4
2
  import DocumentData from '../../abstract/data.mjs';
5
3
  import * as documents from '../../documents.mjs';
6
4
  import * as fields from '../fields.mjs';
5
+ import { TileOcclusion, TileOcclusionConstructorData } from './tileOcclusion';
6
+ import { VideoData, VideoDataConstructorData } from './videoData';
7
7
 
8
8
  interface TileDataSchema extends DocumentSchema {
9
- _id: typeof fields.DOCUMENT_ID;
10
- img: typeof fields.VIDEO_FIELD;
11
- width: typeof fields.REQUIRED_NUMBER;
12
- height: typeof fields.REQUIRED_NUMBER;
13
- x: typeof fields.REQUIRED_NUMBER;
14
- y: typeof fields.REQUIRED_NUMBER;
15
- z: FieldReturnType<typeof fields.INTEGER_FIELD, { required: true; default: 100 }>;
16
- rotation: FieldReturnType<typeof fields.ANGLE_FIELD, { default: 0 }>;
17
- alpha: typeof fields.ALPHA_FIELD;
18
- tint: typeof fields.COLOR_FIELD;
19
- hidden: typeof fields.BOOLEAN_FIELD;
20
- locked: typeof fields.BOOLEAN_FIELD;
21
- overhead: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: false }>;
9
+ _id: fields.DocumentId;
10
+ img: fields.VideoField;
11
+ width: fields.RequiredNumber;
12
+ height: fields.RequiredNumber;
13
+ x: fields.RequiredNumber;
14
+ y: fields.RequiredNumber;
15
+ z: FieldReturnType<fields.IntegerField, { required: true; default: 100 }>;
16
+ rotation: FieldReturnType<fields.AngleField, { default: 0 }>;
17
+ alpha: fields.AlphaField;
18
+ tint: fields.ColorField;
19
+ hidden: fields.BooleanField;
20
+ locked: fields.BooleanField;
21
+ overhead: FieldReturnType<fields.BooleanField, { default: false }>;
22
22
  occlusion: DocumentField<TileOcclusion> & {
23
23
  type: typeof TileOcclusion;
24
24
  required: false;
25
- default: {};
25
+ default: Record<string, never>;
26
26
  };
27
27
  video: DocumentField<VideoData> & {
28
28
  type: typeof VideoData;
29
29
  required: false;
30
- default: {};
30
+ default: Record<string, never>;
31
31
  };
32
- flags: typeof fields.OBJECT_FIELD;
32
+ flags: fields.ObjectField;
33
33
  }
34
34
 
35
35
  interface TileDataProperties {
36
36
  /**
37
37
  * The _id which uniquely identifies this Tile embedded document
38
+ * @defaultValue `null`
38
39
  */
39
40
  _id: string | null;
40
41
 
@@ -110,11 +111,13 @@ interface TileDataProperties {
110
111
 
111
112
  /**
112
113
  * The tile's occlusion settings
114
+ * @defaultValue `new TileOcclusion({})`
113
115
  */
114
116
  occlusion: TileOcclusion;
115
117
 
116
118
  /**
117
119
  * The tile's video settings
120
+ * @defaultValue `new VideoData({})`
118
121
  */
119
122
  video: VideoData;
120
123
 
@@ -128,107 +131,111 @@ interface TileDataProperties {
128
131
  interface TileDataConstructorData {
129
132
  /**
130
133
  * The _id which uniquely identifies this Tile embedded document
134
+ * @defaultValue `null`
131
135
  */
132
- _id?: string | null;
136
+ _id?: string | null | undefined;
133
137
 
134
138
  /**
135
139
  * An image or video file path which this tile displays
136
140
  */
137
- img?: string | null;
141
+ img?: string | null | undefined;
138
142
 
139
143
  /**
140
144
  * The pixel width of the tile
141
145
  * @defaultValue `0`
142
146
  */
143
- width?: number | null;
147
+ width?: number | null | undefined;
144
148
 
145
149
  /**
146
150
  * The pixel height of the tile
147
151
  * @defaultValue `0`
148
152
  */
149
- height?: number | null;
153
+ height?: number | null | undefined;
150
154
 
151
155
  /**
152
156
  * The x-coordinate position of the top-left corner of the tile
153
157
  * @defaultValue `0`
154
158
  */
155
- x?: number | null;
159
+ x?: number | null | undefined;
156
160
 
157
161
  /**
158
162
  * The y-coordinate position of the top-left corner of the tile
159
163
  * @defaultValue `0`
160
164
  */
161
- y?: number | null;
165
+ y?: number | null | undefined;
162
166
 
163
167
  /**
164
168
  * The z-index ordering of this tile relative to its siblings
165
169
  * @defaultValue `100`
166
170
  */
167
- z?: number | null;
171
+ z?: number | null | undefined;
168
172
 
169
173
  /**
170
174
  * The angle of rotation for the tile between 0 and 360
171
175
  * @defaultValue `0`
172
176
  */
173
- rotation?: number | null;
177
+ rotation?: number | null | undefined;
174
178
 
175
179
  /**
176
180
  * The tile opacity
177
181
  * @defaultValue `1`
178
182
  */
179
- alpha?: number | null;
183
+ alpha?: number | null | undefined;
180
184
 
181
185
  /**
182
186
  * A color to tint the tile
183
187
  */
184
- tint?: string | null;
188
+ tint?: string | null | undefined;
185
189
 
186
190
  /**
187
191
  * Is the tile currently hidden?
188
192
  * @defaultValue `false`
189
193
  */
190
- hidden?: boolean | null;
194
+ hidden?: boolean | null | undefined;
191
195
 
192
196
  /**
193
197
  * Is the tile currently locked?
194
198
  * @defaultValue `false`
195
199
  */
196
- locked?: boolean | null;
200
+ locked?: boolean | null | undefined;
197
201
 
198
202
  /**
199
203
  * Is the tile an overhead tile?
200
204
  * @defaultValue `false`
201
205
  */
202
- overhead?: boolean | null;
206
+ overhead?: boolean | null | undefined;
203
207
 
204
208
  /**
205
209
  * The tile's occlusion settings
210
+ * @defaultValue `new TileOcclusion({})`
206
211
  */
207
- occlusion?: TileOcclusionConstructorData | null;
212
+ occlusion?: TileOcclusionConstructorData | null | undefined;
208
213
 
209
214
  /**
210
215
  * The tile's video settings
216
+ * @defaultValue `new VideoData({})`
211
217
  */
212
- video?: VideoDataConstructorData | null;
218
+ video?: VideoDataConstructorData | null | undefined;
213
219
 
214
220
  /**
215
221
  * An object of optional key/value flags
216
222
  * @defaultValue `{}`
217
223
  */
218
- flags?: ConfiguredFlags<'Tile'> | null;
224
+ flags?: ConfiguredFlags<'Tile'> | null | undefined;
219
225
  }
220
226
 
221
227
  /**
222
228
  * The data schema for a Tile embedded document.
223
229
  * @see BaseTile
224
230
  */
225
- export declare class TileData extends DocumentData<
231
+ export class TileData extends DocumentData<
226
232
  TileDataSchema,
227
233
  TileDataProperties,
228
234
  PropertiesToSource<TileDataProperties>,
229
235
  TileDataConstructorData,
230
236
  documents.BaseTile
231
237
  > {
238
+ /** @override */
232
239
  static defineSchema(): TileDataSchema;
233
240
 
234
241
  /** @override */
@@ -236,4 +243,4 @@ export declare class TileData extends DocumentData<
236
243
  }
237
244
 
238
245
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
239
- export declare interface TileData extends TileDataProperties {}
246
+ export interface TileData extends TileDataProperties {}
@@ -5,14 +5,14 @@ import * as fields from '../fields.mjs';
5
5
 
6
6
  interface TileOcclusionSchema extends DocumentSchema {
7
7
  mode: FieldReturnType<
8
- typeof fields.REQUIRED_NUMBER,
8
+ fields.RequiredNumber,
9
9
  {
10
- default: typeof CONST.TILE_OCCLUSION_MODES.FADE;
11
- validate: (m: unknown) => m is foundry.CONST.TileOcclusionModes;
10
+ default: typeof foundry.CONST.TILE_OCCLUSION_MODES.FADE;
11
+ validate: (m: unknown) => m is foundry.CONST.TILE_OCCLUSION_MODES;
12
12
  validationError: 'Invalid {name} {field} which must be a value in CONST.TILE_OCCLUSION_MODES';
13
13
  }
14
14
  >;
15
- alpha: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0 }>;
15
+ alpha: FieldReturnType<fields.AlphaField, { default: 0 }>;
16
16
  }
17
17
 
18
18
  interface TileOcclusionProperties {
@@ -20,7 +20,7 @@ interface TileOcclusionProperties {
20
20
  * The occlusion mode from CONST.TILE_OCCLUSION_MODES
21
21
  * @defaultValue `CONST.TILE_OCCLUSION_MODES.FADE`
22
22
  */
23
- mode: foundry.CONST.TileOcclusionModes;
23
+ mode: foundry.CONST.TILE_OCCLUSION_MODES;
24
24
 
25
25
  /**
26
26
  * The occlusion alpha between 0 and 1
@@ -29,30 +29,31 @@ interface TileOcclusionProperties {
29
29
  alpha: number;
30
30
  }
31
31
 
32
- export interface TileOcclusionConstructorData {
32
+ interface TileOcclusionConstructorData {
33
33
  /**
34
34
  * The occlusion mode from CONST.TILE_OCCLUSION_MODES
35
35
  * @defaultValue `CONST.TILE_OCCLUSION_MODES.FADE`
36
36
  */
37
- mode?: foundry.CONST.TileOcclusionModes | null;
37
+ mode?: foundry.CONST.TILE_OCCLUSION_MODES | null | undefined;
38
38
 
39
39
  /**
40
40
  * The occlusion alpha between 0 and 1
41
41
  * @defaultValue `0`
42
42
  */
43
- alpha?: number | null;
43
+ alpha?: number | null | undefined;
44
44
  }
45
45
 
46
46
  /**
47
47
  * An inner-object which defines the schema for how Tile occlusion settings are defined
48
48
  */
49
- export declare class TileOcclusion extends DocumentData<
49
+ export class TileOcclusion extends DocumentData<
50
50
  TileOcclusionSchema,
51
51
  TileOcclusionProperties,
52
52
  PropertiesToSource<TileOcclusionProperties>,
53
53
  TileOcclusionConstructorData,
54
54
  documents.BaseTile
55
55
  > {
56
+ /** @override */
56
57
  static defineSchema(): TileOcclusionSchema;
57
58
  }
58
59
 
@@ -14,28 +14,31 @@ interface TokenBarDataSchema extends DocumentSchema {
14
14
  interface TokenBarDataProperties {
15
15
  /**
16
16
  * The attribute path within the Token's Actor data which should be displayed
17
+ * @defaultValue `null`
17
18
  */
18
19
  attribute: string | null;
19
20
  }
20
21
 
21
- export interface TokenBarDataConstructorData {
22
+ interface TokenBarDataConstructorData {
22
23
  /**
23
24
  * The attribute path within the Token's Actor data which should be displayed
25
+ * @defaultValue `null`
24
26
  */
25
- attribute?: string | null;
27
+ attribute?: string | null | undefined;
26
28
  }
27
29
 
28
30
  /**
29
31
  * An embedded data structure for the contents of a Token attribute bar.
30
32
  * @see TokenData
31
33
  */
32
- export declare class TokenBarData extends DocumentData<
34
+ export class TokenBarData extends DocumentData<
33
35
  TokenBarDataSchema,
34
36
  TokenBarDataProperties,
35
37
  PropertiesToSource<TokenBarDataProperties>,
36
38
  TokenBarDataConstructorData,
37
39
  documents.BaseToken
38
40
  > {
41
+ /** @override */
39
42
  static defineSchema(): TokenBarDataSchema;
40
43
  }
41
44