@league-of-foundry-developers/foundry-vtt-types 9.255.1 → 9.268.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +5 -4
  2. package/package.json +3 -2
  3. package/src/foundry/common/data/data.mjs/index.d.ts +0 -1
  4. package/src/foundry/common/types.mjs.d.ts +4 -4
  5. package/src/foundry/common/utils/helpers.mjs.d.ts +1 -0
  6. package/src/foundry/foundry.js/application.d.ts +0 -1
  7. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +7 -3
  8. package/src/foundry/foundry.js/applications/cameraViews.d.ts +3 -3
  9. package/src/foundry/foundry.js/applications/chatPopout.d.ts +1 -1
  10. package/src/foundry/foundry.js/applications/compendium.d.ts +20 -11
  11. package/src/foundry/foundry.js/applications/controlsReference.d.ts +17 -2
  12. package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
  13. package/src/foundry/foundry.js/applications/filePicker.d.ts +67 -75
  14. package/src/foundry/foundry.js/applications/formApplication.d.ts +7 -2
  15. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +19 -58
  16. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -4
  17. package/src/foundry/foundry.js/applications/formApplications/{entitySheetConfig.d.ts → documentSheetConfig.d.ts} +36 -19
  18. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +1 -4
  19. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +2 -4
  20. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardConfig.d.ts +51 -0
  21. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfig.d.ts +88 -0
  22. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsHand.d.ts +20 -0
  23. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsPile.d.ts +20 -0
  24. package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/index.d.ts +2 -0
  25. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +2 -4
  26. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +17 -11
  27. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -0
  28. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +3 -9
  29. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +10 -12
  30. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +4 -5
  31. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +2 -6
  32. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +1 -4
  33. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +8 -12
  34. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +2 -1
  35. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +1 -4
  36. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +10 -11
  37. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +28 -15
  38. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -6
  39. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +1 -4
  40. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +17 -21
  41. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +3 -3
  42. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +40 -7
  43. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -2
  44. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +10 -24
  45. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +1 -1
  46. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +15 -3
  47. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +23 -16
  48. package/src/foundry/foundry.js/applications/formApplications/{defaultTokenConfig.d.ts → tokenConfigs/defaultTokenConfig.d.ts} +29 -16
  49. package/src/foundry/foundry.js/applications/formApplications/tokenConfigs/index.d.ts +1 -0
  50. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +22 -15
  51. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
  52. package/src/foundry/foundry.js/applications/hotbar.d.ts +7 -3
  53. package/src/foundry/foundry.js/applications/index.d.ts +1 -0
  54. package/src/foundry/foundry.js/applications/invitationLinks.d.ts +25 -10
  55. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
  56. package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
  57. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +65 -38
  58. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +17 -3
  59. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +19 -16
  60. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +0 -3
  61. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +4 -18
  62. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +2 -8
  63. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +38 -5
  64. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -0
  65. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -1
  66. package/src/foundry/foundry.js/applications/supportDetails.d.ts +78 -0
  67. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +2 -2
  68. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +10 -2
  69. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +87 -49
  70. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +3 -7
  71. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
  72. package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +6 -0
  73. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
  74. package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +2 -2
  75. package/src/foundry/foundry.js/config.d.ts +21 -21
  76. package/src/foundry/foundry.js/contextMenu.d.ts +37 -28
  77. package/src/foundry/foundry.js/game.d.ts +2 -2
  78. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
  79. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
  80. package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
  81. package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
  82. package/src/foundry/foundry.js/pixi/containers/canvasLayers/controlsLayer.d.ts +49 -48
  83. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +51 -40
  84. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/lightingLayer.d.ts +63 -20
  85. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayer.d.ts +0 -3
  86. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +4 -4
  87. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +21 -0
  88. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/notesLayer.d.ts +1 -1
  89. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/soundsLayer.d.ts +10 -2
  90. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/tokenLayer.d.ts +41 -20
  91. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +50 -121
  92. package/src/foundry/foundry.js/pixi/containers/canvasLayers/sightLayer.d.ts +125 -107
  93. package/src/foundry/foundry.js/pixi/containers/controlIcon.d.ts +3 -0
  94. package/src/foundry/foundry.js/pixi/containers/index.d.ts +1 -0
  95. package/src/foundry/foundry.js/pixi/containers/objectHUD.d.ts +82 -0
  96. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
  97. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +26 -4
  98. package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +34 -20
  99. package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +52 -15
  100. package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +9 -2
  101. package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +50 -12
  102. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +248 -87
  103. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +107 -16
  104. package/src/foundry/foundry.js/pixi/filters/abstractFilter.d.ts +42 -0
  105. package/src/foundry/foundry.js/pixi/filters/abstractFilters/fogColorFilter.d.ts +16 -0
  106. package/src/foundry/foundry.js/pixi/filters/abstractFilters/forceColorFilter.d.ts +17 -0
  107. package/src/foundry/foundry.js/pixi/filters/abstractFilters/glowFilter.d.ts +31 -0
  108. package/src/foundry/foundry.js/pixi/filters/abstractFilters/index.d.ts +4 -0
  109. package/src/foundry/foundry.js/pixi/filters/abstractFilters/roofMaskFilter.d.ts +20 -0
  110. package/src/foundry/foundry.js/pixi/filters/index.d.ts +2 -0
  111. package/src/foundry/foundry.js/roll.d.ts +2 -2
  112. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +5 -0
  113. package/src/foundry/foundry.js/textEditor.d.ts +266 -231
  114. package/src/types/augments/index.d.ts +2 -0
  115. package/src/types/augments/pixiGraphicsSmooth.d.ts +7 -0
  116. package/src/types/augments/pixiLegacyGraphics.d.ts +7 -0
  117. package/src/types/utils.d.ts +5 -0
@@ -25,22 +25,37 @@ declare global {
25
25
  protected _validPosition: { x: number; y: number };
26
26
 
27
27
  /**
28
- * Track the set of User entities which are currently targeting this Token
28
+ * Track the set of User documents which are currently targeting this Token
29
29
  */
30
30
  targeted: Set<User>;
31
31
 
32
32
  /**
33
- * A reference to the PointSource object which defines this vision source area of effect
33
+ * A reference to the VisionSource object which defines this vision source area of effect
34
34
  */
35
35
  vision: VisionSource;
36
36
 
37
37
  /**
38
- * A reference to the PointSource object which defines this light source area of effect
38
+ * A reference to the LightSource object which defines this light source area of effect
39
39
  */
40
40
  light: LightSource;
41
41
 
42
+ /**
43
+ * A linked ObjectHUD element which is synchronized with the location and visibility of this Token
44
+ * @defaultValue `new ObjectHUD(this);`
45
+ */
46
+ hud: Token.ObjectHUD;
47
+
48
+ /** @defaultValue `undefined` */
49
+ texture?: PIXI.Texture | null;
50
+
51
+ /** @defaultValue `undefined` */
52
+ border?: PIXI.Graphics;
53
+
54
+ /** @defaultValue `undefined` */
55
+ icon?: PIXI.Sprite;
56
+
42
57
  /** @override */
43
- static get embeddedName(): 'Token';
58
+ static embeddedName: 'Token';
44
59
 
45
60
  /**
46
61
  * Establish an initial velocity of the token based on it's direction of facing.
@@ -95,6 +110,16 @@ declare global {
95
110
  */
96
111
  get center(): ReturnType<this['getCenter']>;
97
112
 
113
+ /**
114
+ * The HTML source element for the primary Tile texture
115
+ */
116
+ get sourceElement(): HTMLImageElement | HTMLVideoElement | undefined;
117
+
118
+ /**
119
+ * Does this Tile depict an animated video texture?
120
+ */
121
+ get isVideo(): boolean;
122
+
98
123
  /**
99
124
  * An indicator for whether or not this token is currently involved in the active combat encounter.
100
125
  */
@@ -121,6 +146,11 @@ declare global {
121
146
  */
122
147
  get isVisible(): boolean;
123
148
 
149
+ /**
150
+ * The animation name used for Token movement
151
+ */
152
+ get movementAnimationName(): string;
153
+
124
154
  /**
125
155
  * Test whether the Token has sight (or blindness) at any radius
126
156
  */
@@ -155,23 +185,43 @@ declare global {
155
185
 
156
186
  /**
157
187
  * Update the light and vision source objects associated with this Token
158
- * @param defer - Defer refreshing the SightLayer to manually call that refresh later.
159
- * (default: `false`)
160
- * @param deleted - Indicate that this light source has been deleted.
161
- * (default: `false`)
162
- * @param noUpdateFog - Never update the Fog exploration progress for this update.
163
- * (default: `false`)
188
+ * @param options - (default: `{}}`)
164
189
  */
165
- updateSource({ defer, deleted, noUpdateFog }?: { defer?: boolean; deleted?: boolean; noUpdateFog?: boolean }): void;
190
+ updateSource(options?: Token.UpdateSourceOptions | undefined): void;
191
+
192
+ /**
193
+ * Update an emitted light source associated with this Token.
194
+ * @param options - (default `{}`)
195
+ */
196
+ updateLightSource(options?: Token.UpdateLightSourceOptions | undefined): void;
197
+
198
+ /**
199
+ * Update an Token vision source associated for this token.
200
+ * @param options - (default `{}`)
201
+ */
202
+ updateVisionSource(options?: Token.UpdateVisionSourceOptions | undefined): void;
166
203
 
167
204
  /**
168
205
  * Test whether this Token is a viable vision source for the current User
206
+ * @internal
169
207
  */
170
208
  protected _isVisionSource(): boolean;
171
209
 
210
+ /** @override */
211
+ clear(): this;
212
+
172
213
  /** @override */
173
214
  draw(): Promise<this>;
174
215
 
216
+ /**
217
+ * Draw the HUD container which provides an interface for managing this Token
218
+ * @internal
219
+ */
220
+ protected _drawHUD(): Token.InitializedObjectHUD;
221
+
222
+ /** @override */
223
+ destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
224
+
175
225
  /**
176
226
  * Apply initial sanitizations to the provided input data to ensure that a Token has valid required attributes.
177
227
  */
@@ -187,31 +237,62 @@ declare global {
187
237
  */
188
238
  protected _drawIcon(): Promise<PIXI.Sprite>;
189
239
 
240
+ /**
241
+ * Play video for this Token (if applicable).
242
+ * @param playing - Should the Token video be playing?
243
+ * (default: `true`)
244
+ * @param options - Additional options for modifying video playback
245
+ * (default: `{}`)
246
+ */
247
+ play(playing?: boolean | undefined, options?: Token.PlayOptions | undefined): void;
248
+
249
+ /**
250
+ * Unlink the playback of this video token from the playback of other tokens which are using the same base texture.
251
+ * @param source - The video element source
252
+ * @internal
253
+ */
254
+ protected _unlinkVideoPlayback(source: HTMLVideoElement): Promise<void>;
255
+
190
256
  /**
191
257
  * Update display of the Token, pulling latest data and re-rendering the display of Token components
192
258
  */
193
259
  refresh(): this;
194
260
 
261
+ /**
262
+ * Size and display the Token Icon
263
+ * @internal
264
+ */
265
+ protected _refreshIcon(): void;
266
+
195
267
  /**
196
268
  * Draw the Token border, taking into consideration the grid type and border color
269
+ * @internal
197
270
  */
198
271
  protected _refreshBorder(): void;
199
272
 
200
273
  /**
201
274
  * Get the hex color that should be used to render the Token border
202
275
  * @returns The hex color used to depict the border color
276
+ * @internal
203
277
  */
204
278
  protected _getBorderColor(): number | null;
205
279
 
280
+ /**
281
+ * Refresh the display of the Token HUD interface.
282
+ */
283
+ refreshHUD(): void;
284
+
206
285
  /**
207
286
  * Refresh the target indicators for the Token.
208
287
  * Draw both target arrows for the primary User as well as indicator pips for other Users targeting the same Token.
288
+ * @internal
209
289
  */
210
290
  protected _refreshTarget(): void;
211
291
 
212
292
  /**
213
293
  * Refresh the display of Token attribute bars, rendering latest resource data
214
294
  * If the bar attribute is valid (has a value and max), draw the bar. Otherwise hide it.
295
+ * @internal
215
296
  */
216
297
  drawBars(): void;
217
298
 
@@ -221,7 +302,7 @@ declare global {
221
302
  * @param bar - The Bar container
222
303
  * @param data - Resource data for this bar
223
304
  */
224
- protected _drawBar(number: number, bar: PIXI.Graphics, data: ReturnType<Token['getBarAttribute']>): void;
305
+ protected _drawBar(number: number, bar: PIXI.Graphics, data: ReturnType<TokenDocument['getBarAttribute']>): void;
225
306
 
226
307
  /**
227
308
  * Draw the token's nameplate as a text object
@@ -231,14 +312,18 @@ declare global {
231
312
 
232
313
  /**
233
314
  * Draw a text tooltip for the token which can be used to display Elevation or a resource value
315
+ * @returns The text object used to render the tooltip
316
+ * @internal
234
317
  */
235
- drawTooltip(): void;
318
+ protected _drawTooltip(): PreciseText;
236
319
 
237
320
  /**
238
321
  * Return the text which should be displayed in a token's tooltip field
322
+ * @internal
239
323
  */
240
324
  protected _getTooltipText(): string;
241
325
 
326
+ /** @internal */
242
327
  protected _getTextStyle(): PIXI.TextStyle;
243
328
 
244
329
  /**
@@ -248,11 +333,14 @@ declare global {
248
333
 
249
334
  /**
250
335
  * Draw the overlay effect icon
336
+ * @param options - (default: `{}`)
337
+ * @internal
251
338
  */
252
- protected _drawOverlay({ src, tint }?: { src?: string; tint?: number }): Promise<void>;
339
+ protected _drawOverlay(options?: Token.DrawOverlayOptions | undefined): Promise<void>;
253
340
 
254
341
  /**
255
342
  * Draw a status effect icon
343
+ * @internal
256
344
  */
257
345
  protected _drawEffect(src: string, i: number, bg: PIXI.Graphics, w: number, tint: number): Promise<void>;
258
346
 
@@ -260,6 +348,7 @@ declare global {
260
348
  * Helper method to determine whether a token attribute is viewable under a certain mode
261
349
  * @param mode - The mode from CONST.TOKEN_DISPLAY_MODES
262
350
  * @returns Is the attribute viewable?
351
+ * @internal
263
352
  */
264
353
  protected _canViewMode(mode: foundry.CONST.TOKEN_DISPLAY_MODES): boolean;
265
354
 
@@ -271,6 +360,7 @@ declare global {
271
360
 
272
361
  /**
273
362
  * Animate the continual revealing of Token vision during a movement animation
363
+ * @internal
274
364
  */
275
365
  protected _onMovementFrame(
276
366
  dt: number,
@@ -288,6 +378,7 @@ declare global {
288
378
  * @param source - (default: `false`)
289
379
  * @param sound - (default: `false`)
290
380
  * @param fog - (default: `false`)
381
+ * @internal
291
382
  */
292
383
  protected _animatePerceptionFrame({
293
384
  source,
@@ -314,6 +405,7 @@ declare global {
314
405
  /**
315
406
  * @param releaseOthers - (default: `true`)
316
407
  * @param pan - (default: `false`)
408
+ * @override
317
409
  */
318
410
  protected _onControl({ releaseOthers, pan }?: { releaseOthers?: boolean; pan?: boolean }): void;
319
411
 
@@ -345,39 +437,25 @@ declare global {
345
437
  * (defaultValue: `{}`)
346
438
  * @returns The Token after animation has completed
347
439
  */
348
- setPosition(x: number, y: number, options?: PositionOptions): Promise<this>;
440
+ setPosition(x: number, y: number, options?: Token.PositionOptions): Promise<this>;
349
441
 
350
442
  /**
351
443
  * Update the Token velocity auto-regressively, shifting increasing weight towards more recent movement
352
444
  * Employ a magic constant chosen to minimize (effectively zero) the likelihood of trigonometric edge cases
353
445
  * @param ray - The proposed movement ray
354
446
  * @returns An updated velocity with directional memory
447
+ * @internal
355
448
  */
356
449
  protected _updateVelocity(ray: Ray): Token.Velocity;
357
450
 
358
451
  /**
359
452
  * Set this Token as an active target for the current game User
360
- * @param targeted - Is the Token now targeted?
361
- * (default: `true`)
362
- * @param user - Assign the token as a target for a specific User
363
- * (default: `null` which will use the current user)
364
- * @param releaseOthers - Release other active targets for the same player?
365
- * (default: `true`)
366
- * @param groupSelection - Is this target being set as part of a group selection workflow?
367
- * (default: `false`)
368
- */
369
- setTarget(
370
- targeted?: boolean,
371
- {
372
- user,
373
- releaseOthers,
374
- groupSelection
375
- }?: {
376
- user?: InstanceType<ConfiguredDocumentClass<typeof User>> | null;
377
- releaseOthers?: boolean;
378
- groupSelection?: boolean;
379
- }
380
- ): void;
453
+ * @param targeted - Is the Token now targeted?
454
+ * (default: `true`)
455
+ * @param context - Additional context options
456
+ * (default `{}`)
457
+ */
458
+ setTarget(targeted?: boolean, context?: Token.SetTargetContext | undefined): void;
381
459
 
382
460
  /**
383
461
  * Add or remove the currently controlled Tokens from the active combat encounter
@@ -387,7 +465,7 @@ declare global {
387
465
  toggleCombat(combat?: InstanceType<ConfiguredDocumentClass<typeof Combat>>): Promise<this>;
388
466
 
389
467
  /**
390
- * Toggle an active effect by it's texture path.
468
+ * Toggle an active effect by its texture path.
391
469
  * Copy the existing Array in order to ensure the update method detects the data as changed.
392
470
  *
393
471
  * @param effect - The texture file-path of the effect icon to toggle on the Token.
@@ -397,19 +475,12 @@ declare global {
397
475
  */
398
476
  toggleEffect(
399
477
  effect: string | ConstructorParameters<ConfiguredDocumentClassForName<'ActiveEffect'>>[0],
400
- options?: EffectToggleOptions
401
- ): Promise<boolean>;
402
-
403
- /**
404
- * A helper function to toggle a status effect which includes an Active Effect template
405
- */
406
- protected _toggleActiveEffect(
407
- effectData: ConstructorParameters<ConfiguredDocumentClassForName<'ActiveEffect'>>[0],
408
- { overlay }?: { overlay?: boolean }
478
+ options?: Token.EffectToggleOptions | undefined
409
479
  ): Promise<boolean>;
410
480
 
411
481
  /**
412
482
  * A helper function to toggle the overlay status icon on the Token
483
+ * @internal
413
484
  */
414
485
  protected _toggleOverlayEffect(texture: string, { active }?: { active: boolean }): Promise<this>;
415
486
 
@@ -439,11 +510,8 @@ declare global {
439
510
  /** @override */
440
511
  protected _getShiftedPosition(dx: number, dy: number): { x: number; y: number };
441
512
 
442
- /**
443
- * Extend the PlaceableObject.rotate method to prevent rotation if the Token is in the midst of a movement animation
444
- * @returns Actually a Promise<void>
445
- */
446
- rotate(angle: number, snap: number): Promise<this>;
513
+ /** @override */
514
+ rotate(...args: Parameters<PlaceableObject['rotate']>): Promise<this>;
447
515
 
448
516
  /** @override */
449
517
  protected _onCreate(
@@ -509,22 +577,8 @@ declare global {
509
577
  /** @override */
510
578
  protected _onDragLeftMove(event: PIXI.InteractionEvent): void;
511
579
 
512
- /**
513
- * @deprecated since 0.8.0
514
- */
515
- static fromActor(
516
- actor: InstanceType<ConfiguredDocumentClass<typeof Actor>>,
517
- tokenData?: InstanceType<ConfiguredDocumentClass<typeof TokenDocument>>['data']['_source']
518
- ): never;
519
-
520
- /**
521
- * @deprecated since 0.8.0
522
- */
523
- getBarAttribute(
524
- barName: string,
525
- { alternative }?: { alternative?: string }
526
- ): ReturnType<this['document']['getBarAttribute']>;
527
-
580
+ /** @override */
581
+ protected _onDragLeftCancel(event: MouseEvent): void;
528
582
  /**
529
583
  * @remarks This does not exist in foundry. It marks the controlIcon as not used because `Token` does never store a value here.
530
584
  */
@@ -542,27 +596,134 @@ declare global {
542
596
  dy: number;
543
597
  sy: number;
544
598
  }
545
- }
546
- }
547
599
 
548
- interface PositionOptions {
549
- /**
550
- * Animate the movement path
551
- * @defaultValue `true`
552
- */
553
- animate?: boolean;
554
- }
600
+ /** The UI frame container which depicts Token metadata and status, displayed in the ControlsLayer. */
601
+ interface ObjectHUD extends globalThis.ObjectHUD {
602
+ /** Token health bars */
603
+ bars?: PIXI.Container;
555
604
 
556
- interface EffectToggleOptions {
557
- /**
558
- * Force a certain active state for the effect
559
- * @defaultValue `false`
560
- */
561
- active?: boolean;
605
+ /** Token nameplate */
606
+ nameplate?: PreciseText;
562
607
 
563
- /**
564
- * Whether to set the effect as the overlay effect?
565
- * @defaultValue `false`
566
- */
567
- overlay?: boolean;
608
+ /** Token elevation tooltip */
609
+ tooltip?: PreciseText;
610
+
611
+ /** Token status effects */
612
+ effects?: PIXI.Container;
613
+
614
+ /** Token target marker */
615
+ target?: PIXI.Graphics;
616
+ }
617
+
618
+ type InitializedObjectHUD = RequiredProps<ObjectHUD, 'bars' | 'nameplate' | 'tooltip' | 'effects' | 'target'>;
619
+
620
+ interface UpdateLightSourceOptions {
621
+ /**
622
+ * Defer refreshing the LightingLayer to manually call that refresh later.
623
+ * @defaultValue `false`
624
+ */
625
+ defer?: boolean | undefined;
626
+
627
+ /**
628
+ * Indicate that this light source has been deleted.
629
+ * @defaultValue `false`
630
+ */
631
+ deleted?: boolean | undefined;
632
+ }
633
+
634
+ interface UpdateVisionSourceOptions {
635
+ /**
636
+ * Defer refreshing the SightLayer to manually call that refresh later.
637
+ * @defaultValue `false`
638
+ */
639
+ defer?: boolean | undefined;
640
+
641
+ /**
642
+ * Indicate that this vision source has been deleted.
643
+ * @defaultValue `false`
644
+ */
645
+ deleted?: boolean | undefined;
646
+
647
+ /**
648
+ * Never update the Fog exploration progress for this update.
649
+ * @defaultValue `false`
650
+ */
651
+ skipUpdateFog?: boolean | undefined;
652
+ }
653
+
654
+ type UpdateSourceOptions = UpdateLightSourceOptions & UpdateVisionSourceOptions;
655
+
656
+ interface PlayOptions {
657
+ /**
658
+ * Should the video loop?
659
+ * @defaultValue `true`
660
+ */
661
+ loop?: boolean | undefined;
662
+
663
+ /**
664
+ * A specific timestamp between 0 and the video duration to begin playback
665
+ * @defaultValue `0`
666
+ */
667
+ offset?: number | undefined;
668
+
669
+ /**
670
+ * Desired volume level of the video's audio channel (if any)
671
+ * @defaultValue `0`
672
+ */
673
+ volume?: number | undefined;
674
+ }
675
+
676
+ interface DrawOverlayOptions {
677
+ src?: string | undefined;
678
+ tint?: number | undefined;
679
+ }
680
+
681
+ interface PositionOptions {
682
+ /**
683
+ * Animate the movement path
684
+ * @defaultValue `true`
685
+ */
686
+ animate?: boolean;
687
+
688
+ /**
689
+ * Automatically re-center the view if token movement goes off-screen
690
+ * @defaultValue `true`
691
+ */
692
+ recenter?: boolean | undefined;
693
+ }
694
+
695
+ interface EffectToggleOptions {
696
+ /**
697
+ * Force a certain active state for the effect
698
+ * @defaultValue `false`
699
+ */
700
+ active?: boolean | undefined;
701
+
702
+ /**
703
+ * Whether to set the effect as the overlay effect?
704
+ * @defaultValue `false`
705
+ */
706
+ overlay?: boolean | undefined;
707
+ }
708
+
709
+ interface SetTargetContext {
710
+ /**
711
+ * Assign the token as a target for a specific User
712
+ * @defaultValue `null`
713
+ */
714
+ user?: InstanceType<ConfiguredDocumentClass<typeof User>> | null | undefined;
715
+
716
+ /**
717
+ * Release other active targets for the same player?
718
+ * @defaultValue `true`
719
+ */
720
+ releaseOthers?: boolean | undefined;
721
+
722
+ /**
723
+ * Is this target being set as part of a group selection workflow?
724
+ * @defaultValue `Is this target being set as part of a group selection workflow?`
725
+ */
726
+ groupSelection?: boolean | undefined;
727
+ }
728
+ }
568
729
  }