@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,41 +1,23 @@
1
1
  import { ConfiguredFlags, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
2
2
  import { DocumentData } from '../../abstract/module.mjs';
3
- import * as CONST from '../../constants.mjs';
4
3
  import { BaseAmbientLight } from '../../documents.mjs';
5
4
  import * as fields from '../fields.mjs';
6
- import { AnimationData, AnimationDataConstructorData } from './animationData';
7
- import { DarknessActivation, DarknessActivationConstructorData } from './darknessActivation';
5
+ import type { LightData, LightDataConstructorData } from './lightData.js';
8
6
 
9
7
  interface AmbientLightDataSchema extends DocumentSchema {
10
- _id: typeof fields.DOCUMENT_ID;
11
- t: DocumentField<CONST.SourceType> & {
12
- type: String;
8
+ _id: fields.DocumentId;
9
+ x: fields.RequiredNumber;
10
+ y: fields.RequiredNumber;
11
+ rotation: FieldReturnType<fields.AngleField, { default: 0 }>;
12
+ walls: FieldReturnType<fields.BooleanField, { default: true }>;
13
+ vision: fields.BooleanField;
14
+ config: DocumentField<LightData> & {
15
+ type: typeof LightData;
13
16
  required: true;
14
- default: 'l';
15
- validate: (t: unknown) => boolean;
16
- validationError: 'Invalid {name} {field} which must be a value in CONST.SOURCE_TYPES';
17
+ default: Record<string, never>;
17
18
  };
18
- x: typeof fields.REQUIRED_NUMBER;
19
- y: typeof fields.REQUIRED_NUMBER;
20
- rotation: FieldReturnType<typeof fields.ANGLE_FIELD, { default: 0 }>;
21
- dim: typeof fields.REQUIRED_NUMBER;
22
- bright: typeof fields.REQUIRED_NUMBER;
23
- angle: typeof fields.ANGLE_FIELD;
24
- tintColor: typeof fields.COLOR_FIELD;
25
- tintAlpha: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0.25 }>;
26
- lightAnimation: DocumentField<AnimationData> & {
27
- type: typeof AnimationData;
28
- required: true;
29
- default: {};
30
- };
31
- darknessThreshold: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0 }>;
32
- darkness: DocumentField<DarknessActivation> & {
33
- type: typeof DarknessActivation;
34
- required: true;
35
- default: {};
36
- };
37
- hidden: typeof fields.BOOLEAN_FIELD;
38
- flags: typeof fields.OBJECT_FIELD;
19
+ hidden: fields.BooleanField;
20
+ flags: fields.ObjectField;
39
21
  }
40
22
 
41
23
  interface AmbientLightDataProperties {
@@ -44,12 +26,6 @@ interface AmbientLightDataProperties {
44
26
  */
45
27
  _id: string | null;
46
28
 
47
- /**
48
- * The source type in CONST.SOURCE_TYPES which defines the behavior of this light
49
- * @defaultValue `'l'`
50
- */
51
- t: CONST.SourceType;
52
-
53
29
  /**
54
30
  * The x-coordinate position of the origin of the light
55
31
  * @defaultValue `0`
@@ -69,50 +45,22 @@ interface AmbientLightDataProperties {
69
45
  rotation: number;
70
46
 
71
47
  /**
72
- * The radius of dim light emitted in distance units, negative values produce darkness
73
- * @defaultValue `0`
48
+ * Whether or not this light source is constrained by Walls
49
+ * @defaultValue `true`
74
50
  */
75
- dim: number;
51
+ walls: boolean;
76
52
 
77
53
  /**
78
- * The radius of bright light emitted in distance units, negative values produce blackness
79
- * @defaultValue `0`
80
- */
81
- bright: number;
82
-
83
- /**
84
- * The angle of emission of the light source in degrees
85
- * @defaultValue `360`
86
- */
87
- angle: number;
88
-
89
- /**
90
- * An optional color string which applies coloration to the resulting light source
91
- */
92
- tintColor?: string | null;
93
-
94
- /**
95
- * The intensity of coloration applied to this light source, a number between 0 and 1
96
- * @defaultValue `0.25`
97
- */
98
- tintAlpha: number;
99
-
100
- /**
101
- * A data object which configures token light animation settings, if one is applied
102
- * @defaultValue `{}`
103
- */
104
- lightAnimation: AnimationData;
105
-
106
- /**
107
- * A value of the Scene darkness level, above which this light source will be active
108
- * @defaultValue `0`
54
+ * Whether or not this light source provides a source of vision
55
+ * @defaultValue `false`
109
56
  */
110
- darknessThreshold: number;
57
+ vision: boolean;
111
58
 
112
59
  /**
113
- * @defaultValue `{}`
60
+ * Light configuration data
61
+ * @defaultValue `new LightData({})`
114
62
  */
115
- darkness: DarknessActivation;
63
+ config: LightData;
116
64
 
117
65
  /**
118
66
  * Is the light source currently hidden?
@@ -131,104 +79,77 @@ interface AmbientLightDataConstructorData {
131
79
  /**
132
80
  * The _id which uniquely identifies this BaseAmbientLight embedded document
133
81
  */
134
- _id?: string | null;
135
-
136
- /**
137
- * The source type in CONST.SOURCE_TYPES which defines the behavior of this light
138
- * @defaultValue `'l'`
139
- */
140
- t?: CONST.SourceType | null;
82
+ _id?: string | null | undefined;
141
83
 
142
84
  /**
143
85
  * The x-coordinate position of the origin of the light
144
86
  * @defaultValue `0`
145
87
  */
146
- x?: number | null;
88
+ x?: number | null | undefined;
147
89
 
148
90
  /**
149
91
  * The y-coordinate position of the origin of the light
150
92
  * @defaultValue `0`
151
93
  */
152
- y?: number | null;
94
+ y?: number | null | undefined;
153
95
 
154
96
  /**
155
97
  * The angle of rotation for the tile between 0 and 360
156
98
  * @defaultValue `0`
157
99
  */
158
- rotation?: number | null;
159
-
160
- /**
161
- * The radius of dim light emitted in distance units, negative values produce darkness
162
- * @defaultValue `0`
163
- */
164
- dim?: number | null;
100
+ rotation?: number | null | undefined;
165
101
 
166
102
  /**
167
- * The radius of bright light emitted in distance units, negative values produce blackness
168
- * @defaultValue `0`
103
+ * Whether or not this light source is constrained by Walls
104
+ * @defaultValue `true`
169
105
  */
170
- bright?: number | null;
106
+ walls?: boolean | null | undefined;
171
107
 
172
108
  /**
173
- * The angle of emission of the light source in degrees
174
- * @defaultValue `360`
175
- */
176
- angle?: number | null;
177
-
178
- /**
179
- * An optional color string which applies coloration to the resulting light source
180
- */
181
- tintColor?: string | null;
182
-
183
- /**
184
- * The intensity of coloration applied to this light source, a number between 0 and 1
185
- * @defaultValue `0.25`
186
- */
187
- tintAlpha?: number | null;
188
-
189
- /**
190
- * A data object which configures token light animation settings, if one is applied
191
- * @defaultValue `{}`
192
- */
193
- lightAnimation?: AnimationDataConstructorData | null;
194
-
195
- /**
196
- * A value of the Scene darkness level, above which this light source will be active
197
- * @defaultValue `0`
109
+ * Whether or not this light source provides a source of vision
110
+ * @defaultValue `false`
198
111
  */
199
- darknessThreshold?: number | null;
112
+ vision?: boolean | null | undefined;
200
113
 
201
114
  /**
202
- * @defaultValue `{}`
115
+ * Light configuration data
116
+ * @defaultValue `new LightData({})`
203
117
  */
204
- darkness?: DarknessActivationConstructorData | null;
118
+ config?: LightDataConstructorData | null | undefined;
205
119
 
206
120
  /**
207
121
  * Is the light source currently hidden?
208
122
  * @defaultValue `false`
209
123
  */
210
- hidden?: boolean | null;
124
+ hidden?: boolean | null | undefined;
211
125
 
212
126
  /**
213
127
  * An object of optional key/value flags
214
128
  * @defaultValue `{}`
215
129
  */
216
- flags?: ConfiguredFlags<'AmbientLight'> | null;
130
+ flags?: ConfiguredFlags<'AmbientLight'> | null | undefined;
217
131
  }
218
132
 
219
133
  /**
220
134
  * The data schema for a AmbientLight embedded document.
221
135
  * @see BaseAmbientLight
222
136
  */
223
- export declare class AmbientLightData extends DocumentData<
137
+ export class AmbientLightData extends DocumentData<
224
138
  AmbientLightDataSchema,
225
139
  AmbientLightDataProperties,
226
140
  PropertiesToSource<AmbientLightDataProperties>,
227
141
  AmbientLightDataConstructorData,
228
142
  BaseAmbientLight
229
143
  > {
144
+ /** @override */
230
145
  static defineSchema(): AmbientLightDataSchema;
146
+
147
+ /** @override */
148
+ _initializeSource(data: AmbientLightDataConstructorData): PropertiesToSource<AmbientLightDataProperties>;
149
+
150
+ /** @override */
151
+ protected _initialize(): void;
231
152
  }
232
153
 
233
154
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
234
- export declare interface AmbientLightData extends AmbientLightDataProperties {}
155
+ export interface AmbientLightData extends AmbientLightDataProperties {}
@@ -5,54 +5,38 @@ import * as fields from '../fields.mjs';
5
5
  import { DarknessActivation, DarknessActivationConstructorData } from './darknessActivation';
6
6
 
7
7
  interface AmbientSoundDataSchema extends DocumentSchema {
8
- _id: typeof fields.DOCUMENT_ID;
9
- type: DocumentField<string> & {
10
- type: typeof String;
11
- required: true;
12
- default: typeof documents.BaseAmbientSound['metadata']['types'][0];
13
- validate: (t: unknown) => t is ValueOf<typeof documents.BaseAmbientSound['metadata']['types']>;
14
- validationError: 'Invalid {name} {field} which must be a value in BaseAmbientSound.metadata.types';
15
- };
16
- x: typeof fields.REQUIRED_NUMBER;
17
- y: typeof fields.REQUIRED_NUMBER;
18
- radius: typeof fields.REQUIRED_NUMBER;
19
- path: typeof fields.AUDIO_FIELD;
20
- repeat: typeof fields.BOOLEAN_FIELD;
21
- volume: FieldReturnType<typeof fields.ALPHA_FIELD, { default: 0.5 }>;
22
- easing: FieldReturnType<typeof fields.BOOLEAN_FIELD, { default: true }>;
23
- hidden: typeof fields.BOOLEAN_FIELD;
8
+ _id: fields.DocumentId;
9
+ x: fields.RequiredNumber;
10
+ y: fields.RequiredNumber;
11
+ radius: fields.NonnegativeNumberField;
12
+ path: fields.AudioField;
13
+ repeat: fields.BooleanField;
14
+ volume: FieldReturnType<fields.AlphaField, { default: 0.5 }>;
15
+ walls: FieldReturnType<fields.BooleanField, { default: true }>;
16
+ easing: FieldReturnType<fields.BooleanField, { default: true }>;
17
+ hidden: fields.BooleanField;
24
18
  darkness: DocumentField<DarknessActivation> & {
25
19
  type: typeof DarknessActivation;
26
20
  required: true;
27
- default: {};
21
+ default: Record<string, never>;
28
22
  };
29
- flags: typeof fields.OBJECT_FIELD;
23
+ flags: fields.ObjectField;
30
24
  }
31
25
 
32
26
  interface AmbientSoundDataProperties {
33
27
  /**
34
28
  * The _id which uniquely identifies this AmbientSound document
29
+ * @defaultValue `null`
35
30
  */
36
31
  _id: string | null;
37
32
 
38
- /**
39
- * @defaultValue `documents.BaseAmbientSound.metadata.types[0]`
40
- */
41
- type: ValueOf<typeof documents.BaseAmbientSound['metadata']['types']>;
42
-
43
- /**
44
- * @defaultValue `0`
45
- */
33
+ /** @defaultValue `0` */
46
34
  x: number;
47
35
 
48
- /**
49
- * @defaultValue `0`
50
- */
36
+ /** @defaultValue `0` */
51
37
  y: number;
52
38
 
53
- /**
54
- * @defaultValue `0`
55
- */
39
+ /** @defaultValue `0` */
56
40
  radius: number;
57
41
 
58
42
  /**
@@ -72,19 +56,16 @@ interface AmbientSoundDataProperties {
72
56
  */
73
57
  volume: number;
74
58
 
75
- /**
76
- * @defaultValue `true`
77
- */
59
+ /** @defaultValue `true` */
60
+ walls: boolean;
61
+
62
+ /** @defaultValue `true` */
78
63
  easing: boolean;
79
64
 
80
- /**
81
- * @defaultValue `false`
82
- */
65
+ /** @defaultValue `false` */
83
66
  hidden: boolean;
84
67
 
85
- /**
86
- * @defaultValue `{}`
87
- */
68
+ /** @defaultValue `new DarknessActivation({})` */
88
69
  darkness: DarknessActivation;
89
70
 
90
71
  /**
@@ -97,84 +78,75 @@ interface AmbientSoundDataProperties {
97
78
  interface AmbientSoundDataConstructorData {
98
79
  /**
99
80
  * The _id which uniquely identifies this AmbientSound document
81
+ * @defaultValue `null`
100
82
  */
101
- _id?: string | null;
83
+ _id?: string | null | undefined;
102
84
 
103
- /**
104
- * @defaultValue `documents.BaseAmbientSound.metadata.types[0]`
105
- */
106
- type?: ValueOf<typeof documents.BaseAmbientSound['metadata']['types']> | null;
85
+ /** @defaultValue `0` */
86
+ x?: number | null | undefined;
107
87
 
108
- /**
109
- * @defaultValue `0`
110
- */
111
- x?: number | null;
112
-
113
- /**
114
- * @defaultValue `0`
115
- */
116
- y?: number | null;
88
+ /** @defaultValue `0` */
89
+ y?: number | null | undefined;
117
90
 
118
- /**
119
- * @defaultValue `0`
120
- */
121
- radius?: number | null;
91
+ /** @defaultValue `0` */
92
+ radius?: number | null | undefined;
122
93
 
123
94
  /**
124
95
  * The audio file path that is played by this sound
125
96
  */
126
- path?: string | null;
97
+ path?: string | null | undefined;
127
98
 
128
99
  /**
129
100
  * Does this sound loop?
130
101
  * @defaultValue `false`
131
102
  */
132
- repeat?: boolean | null;
103
+ repeat?: boolean | null | undefined;
133
104
 
134
105
  /**
135
106
  * The audio volume of the sound, from 0 to 1
136
107
  * @defaultValue `0.5`
137
108
  */
138
- volume?: number | null;
109
+ volume?: number | null | undefined;
139
110
 
140
- /**
141
- * @defaultValue `true`
142
- */
143
- easing?: boolean | null;
111
+ /** @defaultValue `true` */
112
+ walls?: boolean | null | undefined;
144
113
 
145
- /**
146
- * @defaultValue `false`
147
- */
148
- hidden?: boolean | null;
114
+ /** @defaultValue `true` */
115
+ easing?: boolean | null | undefined;
149
116
 
150
- /**
151
- * @defaultValue `{}`
152
- */
153
- darkness?: DarknessActivationConstructorData | null;
117
+ /** @defaultValue `false` */
118
+ hidden?: boolean | null | undefined;
119
+
120
+ /** @defaultValue `new DarknessActivation({})` */
121
+ darkness?: DarknessActivationConstructorData | null | undefined;
154
122
 
155
123
  /**
156
124
  * An object of optional key/value flags
157
125
  * @defaultValue `{}`
158
126
  */
159
- flags?: ConfiguredFlags<'AmbientSound'> | null;
127
+ flags?: ConfiguredFlags<'AmbientSound'> | null | undefined;
160
128
  }
161
129
 
162
130
  /**
163
131
  * The data schema for a AmbientSound embedded document.
164
132
  * @see BaseAmbientSound
165
133
  */
166
- export declare class AmbientSoundData extends DocumentData<
134
+ export class AmbientSoundData extends DocumentData<
167
135
  AmbientSoundDataSchema,
168
136
  AmbientSoundDataProperties,
169
137
  PropertiesToSource<AmbientSoundDataProperties>,
170
138
  AmbientSoundDataConstructorData,
171
139
  documents.BaseAmbientSound
172
140
  > {
141
+ /** @override */
173
142
  static defineSchema(): AmbientSoundDataSchema;
174
143
 
144
+ /** @override */
145
+ _initializeSource(data: AmbientSoundDataConstructorData): PropertiesToSource<AmbientSoundDataProperties>;
146
+
175
147
  /** @override */
176
148
  protected _initialize(): void;
177
149
  }
178
150
 
179
151
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
180
- export declare interface AmbientSoundData extends AmbientSoundDataProperties {}
152
+ export interface AmbientSoundData extends AmbientSoundDataProperties {}
@@ -4,13 +4,13 @@ import { BaseAmbientLight } from '../../documents.mjs';
4
4
  import * as fields from '../fields.mjs';
5
5
 
6
6
  interface AnimationDataSchema extends DocumentSchema {
7
- type: typeof fields.STRING_FIELD;
7
+ type: fields.StringField;
8
8
  speed: DocumentField<number> & {
9
9
  type: typeof Number;
10
10
  required: false;
11
11
  default: 5;
12
12
  validate: (a: number) => boolean;
13
- validationError: 'Light animation speed must be an integer between 1 and 10';
13
+ validationError: 'Light animation speed must be an integer between 0 and 10';
14
14
  };
15
15
  intensity: DocumentField<number> & {
16
16
  type: typeof Number;
@@ -19,13 +19,14 @@ interface AnimationDataSchema extends DocumentSchema {
19
19
  validate: (a: number) => boolean;
20
20
  validationError: 'Light animation intensity must be an integer between 1 and 10';
21
21
  };
22
+ reverse: fields.BooleanField;
22
23
  }
23
24
 
24
25
  interface AnimationDataProperties {
25
26
  /**
26
27
  * The animation type which is applied
27
28
  */
28
- type?: string;
29
+ type: string | undefined;
29
30
 
30
31
  /**
31
32
  * The speed of the animation, a number between 1 and 10
@@ -38,39 +39,46 @@ interface AnimationDataProperties {
38
39
  * @defaultValue `5`
39
40
  */
40
41
  intensity: number;
42
+
43
+ /** @defaultValue `false` */
44
+ reverse: boolean;
41
45
  }
42
46
 
43
- export interface AnimationDataConstructorData {
47
+ interface AnimationDataConstructorData {
44
48
  /**
45
49
  * The animation type which is applied
46
50
  */
47
- type?: string | null;
51
+ type?: string | null | undefined;
48
52
 
49
53
  /**
50
54
  * The speed of the animation, a number between 1 and 10
51
55
  * @defaultValue `5`
52
56
  */
53
- speed?: number | null;
57
+ speed?: number | null | undefined;
54
58
 
55
59
  /**
56
60
  * The intensity of the animation, a number between 1 and 10
57
61
  * @defaultValue `5`
58
62
  */
59
- intensity?: number | null;
63
+ intensity?: number | null | undefined;
64
+
65
+ /** @defaultValue `false` */
66
+ reverse?: boolean | null | undefined;
60
67
  }
61
68
 
62
69
  /**
63
70
  * An embedded data object which defines the properties of a light source animation
64
71
  */
65
- export declare class AnimationData extends DocumentData<
72
+ export class AnimationData extends DocumentData<
66
73
  AnimationDataSchema,
67
74
  AnimationDataProperties,
68
75
  PropertiesToSource<AnimationDataProperties>,
69
76
  AnimationDataConstructorData,
70
77
  BaseAmbientLight
71
78
  > {
79
+ /** @override */
72
80
  static defineSchema(): AnimationDataSchema;
73
81
  }
74
82
 
75
83
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
76
- export declare interface AnimationData extends AnimationDataProperties {}
84
+ export interface AnimationData extends AnimationDataProperties {}