@league-of-foundry-developers/foundry-vtt-types 9.249.4 → 9.255.2
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.
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/foundry/common/constants.mjs.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -3
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +8 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +7 -1
- package/src/foundry/common/types.mjs.d.ts +125 -10
- package/src/foundry/common/utils/helpers.mjs.d.ts +0 -1
- package/src/foundry/common/utils/http.mjs.d.ts +52 -0
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +2 -2
- package/src/foundry/common/utils/semaphore.mjs.d.ts +6 -3
- package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +18 -57
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +8 -6
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
- package/src/foundry/foundry.js/applications/notifications.d.ts +2 -5
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
- package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
- package/src/foundry/foundry.js/avClient.d.ts +15 -1
- package/src/foundry/foundry.js/avClients/index.d.ts +0 -1
- package/src/foundry/foundry.js/avClients/simplePeerAVClient.d.ts +31 -4
- package/src/foundry/foundry.js/avMaster.d.ts +21 -48
- package/src/foundry/foundry.js/avSettings.d.ts +19 -46
- package/src/foundry/foundry.js/canvas.d.ts +0 -8
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +6 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +4 -4
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +28 -6
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +13 -70
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +42 -9
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +23 -21
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +5 -23
- package/src/foundry/foundry.js/clientDocuments/macro.d.ts +10 -0
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +24 -14
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +16 -14
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +12 -7
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +2 -12
- package/src/foundry/foundry.js/clientSettings.d.ts +203 -230
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +4 -2
- package/src/foundry/foundry.js/config.d.ts +3 -0
- package/src/foundry/foundry.js/game.d.ts +1 -1
- package/src/foundry/foundry.js/gamepadManager.d.ts +12 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +0 -31
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
- package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/baseGrid.d.ts +21 -6
- package/src/foundry/foundry.js/pixi/containers/baseGrids/hexagonalGrid.d.ts +13 -8
- package/src/foundry/foundry.js/pixi/containers/baseGrids/squareGrid.d.ts +5 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +14 -5
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +9 -55
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +29 -4
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +37 -20
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +12 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +42 -12
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +4 -2
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +31 -17
- package/src/foundry/foundry.js/rollTerms/diceTerms/die.d.ts +0 -5
- package/src/foundry/foundry.js/rollTerms/diceTerms/fateDie.d.ts +21 -1
- package/src/foundry/foundry.js/videoHelper.d.ts +0 -7
- package/src/foundry/index.d.ts +0 -4
- package/src/types/helperTypes.d.ts +6 -0
- package/src/foundry/foundry.js/avClients/easyRTCClient.d.ts +0 -392
- package/src/foundry/foundry.js/features.d.ts +0 -0
- package/src/foundry/foundry.js/fonts.d.ts +0 -24
@@ -4,11 +4,14 @@ import { HoverInOptions } from '../placeableObject';
|
|
4
4
|
declare global {
|
5
5
|
/**
|
6
6
|
* A Note is an implementation of PlaceableObject which represents an annotated location within the Scene.
|
7
|
-
* Each Note links to a JournalEntry
|
7
|
+
* Each Note links to a JournalEntry document and represents its location on the map.
|
8
8
|
*/
|
9
9
|
class Note extends PlaceableObject<InstanceType<ConfiguredDocumentClass<typeof NoteDocument>>> {
|
10
10
|
/** @override */
|
11
|
-
static
|
11
|
+
static embeddedName: 'Note';
|
12
|
+
|
13
|
+
/** @override */
|
14
|
+
get bounds(): Rectangle;
|
12
15
|
|
13
16
|
/**
|
14
17
|
* The associated JournalEntry which is described by this note
|
@@ -25,6 +28,13 @@ declare global {
|
|
25
28
|
*/
|
26
29
|
get size(): number;
|
27
30
|
|
31
|
+
/**
|
32
|
+
* Determine whether the Note is visible to the current user based on their perspective of the Scene.
|
33
|
+
* Visibility depends on permission to the underlying journal entry, as well as the perspective of controlled Tokens.
|
34
|
+
* If Token Vision is required, the user must have a token with vision over the note to see it.
|
35
|
+
*/
|
36
|
+
get isVisible(): boolean;
|
37
|
+
|
28
38
|
/** @override */
|
29
39
|
draw(): Promise<this>;
|
30
40
|
|
@@ -36,6 +36,12 @@ declare global {
|
|
36
36
|
*/
|
37
37
|
tile: PIXI.Sprite | undefined;
|
38
38
|
|
39
|
+
/**
|
40
|
+
* The occlusion image sprite
|
41
|
+
* @defaultValue `undefined`
|
42
|
+
*/
|
43
|
+
occlusionTile: PIXI.Sprite | undefined;
|
44
|
+
|
39
45
|
/**
|
40
46
|
* A Tile background which is displayed if no valid image texture is present
|
41
47
|
* @defaultValue `undefined`
|
@@ -72,6 +78,9 @@ declare global {
|
|
72
78
|
*/
|
73
79
|
get aspectRatio(): number;
|
74
80
|
|
81
|
+
/** @override */
|
82
|
+
get bounds(): Rectangle;
|
83
|
+
|
75
84
|
/**
|
76
85
|
* The HTML source element for the primary Tile texture
|
77
86
|
*/
|
@@ -91,7 +100,12 @@ declare global {
|
|
91
100
|
draw(): Promise<this>;
|
92
101
|
|
93
102
|
/** @override */
|
94
|
-
|
103
|
+
destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
|
104
|
+
|
105
|
+
/**
|
106
|
+
* @param options - (default: `{}`)
|
107
|
+
* @override */
|
108
|
+
refresh(options?: Tile.RefreshOptions | undefined): this;
|
95
109
|
|
96
110
|
/**
|
97
111
|
* Refresh the display of the Tile border
|
@@ -111,7 +125,14 @@ declare global {
|
|
111
125
|
* @param options - Additional options for modifying video playback
|
112
126
|
* (default: `{}`)
|
113
127
|
*/
|
114
|
-
play(playing: boolean, options?:
|
128
|
+
play(playing: boolean, options?: Tile.PlayOptions | undefined): void;
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Unlink the playback of this video tile from the playback of other tokens which are using the same base texture.
|
132
|
+
* @param source - The video element source
|
133
|
+
* @internal
|
134
|
+
*/
|
135
|
+
protected _unlinkVideoPlayback(source: HTMLVideoElement): Promise<void>;
|
115
136
|
|
116
137
|
/**
|
117
138
|
* Update the occlusion rendering for this overhead Tile for a given controlled Token.
|
@@ -128,7 +149,7 @@ declare global {
|
|
128
149
|
*/
|
129
150
|
testOcclusion(
|
130
151
|
token: InstanceType<ConfiguredObjectClassForName<'Token'>>,
|
131
|
-
options?:
|
152
|
+
options?: Tile.OcclusionOptions | undefined
|
132
153
|
): boolean;
|
133
154
|
|
134
155
|
/**
|
@@ -154,7 +175,7 @@ declare global {
|
|
154
175
|
* @param options - Options which customize the return value
|
155
176
|
* @internal
|
156
177
|
*/
|
157
|
-
protected _createAlphaMap(options:
|
178
|
+
protected _createAlphaMap(options: Tile.AlphaMapOptions): Exclude<Tile['_alphaMap'], undefined>;
|
158
179
|
|
159
180
|
/**
|
160
181
|
* Compute the alpha-based bounding box for the tile, including an angle of rotation.
|
@@ -239,7 +260,7 @@ declare global {
|
|
239
260
|
* Get resized Tile dimensions
|
240
261
|
* @internal
|
241
262
|
*/
|
242
|
-
protected _getResizedDimensions(event: MouseEvent, origin: Point, destination: Point):
|
263
|
+
protected _getResizedDimensions(event: MouseEvent, origin: Point, destination: Point): Rectangle;
|
243
264
|
|
244
265
|
/**
|
245
266
|
* Handle cancellation of a drag event for one of the resizing handles
|
@@ -248,18 +269,27 @@ declare global {
|
|
248
269
|
|
249
270
|
/**
|
250
271
|
* Create a preview tile with a background texture instead of an image
|
272
|
+
* @param data - Initial data with which to create the preview Tile
|
251
273
|
*/
|
252
|
-
static createPreview(data: TileDataConstructorData): Tile
|
274
|
+
static createPreview(data: TileDataConstructorData): InstanceType<ConfiguredObjectClassForName<'Tile'>>;
|
253
275
|
}
|
254
276
|
|
255
277
|
namespace Tile {
|
278
|
+
interface RefreshOptions {
|
279
|
+
/**
|
280
|
+
* Also refresh the perception layer.
|
281
|
+
* @defaultValue `false`
|
282
|
+
*/
|
283
|
+
refreshPerception?: boolean | undefined;
|
284
|
+
}
|
285
|
+
|
256
286
|
interface PlayOptions {
|
257
287
|
/** Should the video loop? */
|
258
|
-
loop
|
288
|
+
loop?: boolean | undefined;
|
259
289
|
/** A specific timestamp between 0 and the video duration to begin playback */
|
260
|
-
offset
|
290
|
+
offset?: number | undefined;
|
261
291
|
/** Desired volume level of the video's audio channel (if any) */
|
262
|
-
volume
|
292
|
+
volume?: number | undefined;
|
263
293
|
}
|
264
294
|
|
265
295
|
interface OcclusionOptions {
|
@@ -267,7 +297,7 @@ declare global {
|
|
267
297
|
* Test corners of the hit-box in addition to the token center?
|
268
298
|
* @defaultValue `true`
|
269
299
|
*/
|
270
|
-
corners
|
300
|
+
corners?: boolean | undefined;
|
271
301
|
}
|
272
302
|
|
273
303
|
interface AlphaMapOptions {
|
@@ -275,13 +305,13 @@ declare global {
|
|
275
305
|
* Keep the Uint8Array of pixel alphas?
|
276
306
|
* @defaultValue `false`
|
277
307
|
*/
|
278
|
-
keepPixels
|
308
|
+
keepPixels?: boolean | undefined;
|
279
309
|
|
280
310
|
/**
|
281
311
|
* Keep the pure white RenderTexture?
|
282
312
|
* @defaultValue `false`
|
283
313
|
*/
|
284
|
-
keepTexture
|
314
|
+
keepTexture?: boolean | undefined;
|
285
315
|
}
|
286
316
|
}
|
287
317
|
}
|
@@ -42,8 +42,9 @@ declare abstract class PointSourcePolygon extends PIXI.Polygon {
|
|
42
42
|
/**
|
43
43
|
* A cached array of SightRay objects used to compute the polygon.
|
44
44
|
* @defaultValue `[]`
|
45
|
+
* @remarks This is documented as `SightRay[]` but that's only correct for the {@link RadialSweepPolygon}
|
45
46
|
*/
|
46
|
-
rays:
|
47
|
+
rays: Ray[];
|
47
48
|
|
48
49
|
/**
|
49
50
|
* Compute the rectangular bounds for the Polygon.
|
@@ -66,11 +67,12 @@ declare abstract class PointSourcePolygon extends PIXI.Polygon {
|
|
66
67
|
* Compute the polygon given a point origin and radius
|
67
68
|
* @param origin - The origin source point
|
68
69
|
* @param config - Configuration options which customize the polygon computation
|
70
|
+
* (default: `{}`)
|
69
71
|
* @returns The computed polygon instance
|
70
72
|
*/
|
71
73
|
static create(
|
72
74
|
origin: Point,
|
73
|
-
config
|
75
|
+
config?: Parameters<PointSourcePolygon['initialize']>[1] | undefined
|
74
76
|
): ReturnType<PointSourcePolygon['compute']>;
|
75
77
|
|
76
78
|
/**
|
@@ -37,13 +37,13 @@ declare global {
|
|
37
37
|
* The minimum ray of emission
|
38
38
|
* @defaultValue `Ray.fromAngle(origin.x, origin.y, config.aMin, config.radius)`
|
39
39
|
*/
|
40
|
-
rMin?:
|
40
|
+
rMin?: PolygonRay;
|
41
41
|
|
42
42
|
/**
|
43
43
|
* The maximum ray of emission
|
44
44
|
* @defaultValue `config.hasLimitedAngle && Ray.fromAngle(origin.x, origin.y, config.aMax, config.radius)`
|
45
45
|
*/
|
46
|
-
rMax?:
|
46
|
+
rMax?: PolygonRay;
|
47
47
|
|
48
48
|
/**
|
49
49
|
* Does this polygon have a limited radius?
|
@@ -70,6 +70,10 @@ declare global {
|
|
70
70
|
radiusE?: number;
|
71
71
|
}
|
72
72
|
|
73
|
+
interface PolygonRay extends Ray {
|
74
|
+
result: CollisionResult;
|
75
|
+
}
|
76
|
+
|
73
77
|
/**
|
74
78
|
* A PointSourcePolygon implementation that uses CCW (counter-clockwise) geometry orientation.
|
75
79
|
* Sweep around the origin, accumulating collision points based on the set of active walls.
|
@@ -97,7 +101,7 @@ declare global {
|
|
97
101
|
/**
|
98
102
|
* A collection of rays which are fired at vertices
|
99
103
|
*/
|
100
|
-
rays:
|
104
|
+
rays: PolygonRay[];
|
101
105
|
|
102
106
|
static benchmark(
|
103
107
|
iterations: number,
|
@@ -125,7 +129,7 @@ declare global {
|
|
125
129
|
* @returns The ray with rounded vertices
|
126
130
|
* @internal
|
127
131
|
*/
|
128
|
-
protected _roundRayVertices(ray:
|
132
|
+
protected _roundRayVertices(ray: PolygonRay): PolygonRay;
|
129
133
|
|
130
134
|
/**
|
131
135
|
* Translate walls and other obstacles into edges which limit visibility
|
@@ -194,7 +198,7 @@ declare global {
|
|
194
198
|
* @internal
|
195
199
|
*/
|
196
200
|
protected _isVertexBehindActiveEdges(
|
197
|
-
ray:
|
201
|
+
ray: PolygonRay,
|
198
202
|
vertex: PolygonVertex,
|
199
203
|
activeEdges: EdgeSet
|
200
204
|
): { isBehind: boolean; wasLimited: boolean };
|
@@ -207,7 +211,12 @@ declare global {
|
|
207
211
|
* @param activeEdges - The set of active edges
|
208
212
|
* @internal
|
209
213
|
*/
|
210
|
-
protected _determineRayResult(
|
214
|
+
protected _determineRayResult(
|
215
|
+
ray: PolygonRay,
|
216
|
+
vertex: PolygonVertex,
|
217
|
+
result: CollisionResult,
|
218
|
+
activeEdges: EdgeSet
|
219
|
+
): void;
|
211
220
|
|
212
221
|
/**
|
213
222
|
* Jump to a new closest active edge.
|
@@ -223,7 +232,7 @@ declare global {
|
|
223
232
|
* (default: `true`)
|
224
233
|
*/
|
225
234
|
protected _beginNewEdge(
|
226
|
-
ray:
|
235
|
+
ray: PolygonRay,
|
227
236
|
result: CollisionResult,
|
228
237
|
activeEdges: EdgeSet,
|
229
238
|
isBinding: boolean,
|
@@ -241,7 +250,12 @@ declare global {
|
|
241
250
|
* @param activeEdges - The set of currently active edges
|
242
251
|
* @param isBinding - Is the target vertex a binding collision point?
|
243
252
|
*/
|
244
|
-
protected _completeCurrentEdge(
|
253
|
+
protected _completeCurrentEdge(
|
254
|
+
ray: PolygonRay,
|
255
|
+
result: CollisionResult,
|
256
|
+
activeEdges: EdgeSet,
|
257
|
+
isBinding: boolean
|
258
|
+
): void;
|
245
259
|
|
246
260
|
/**
|
247
261
|
* Augment a CollisionResult with an additional secondary collision.
|
@@ -251,7 +265,7 @@ declare global {
|
|
251
265
|
* @param edges - The subset of active edges which are candidates for collision
|
252
266
|
* @internal
|
253
267
|
*/
|
254
|
-
protected _getSecondaryCollisions(ray:
|
268
|
+
protected _getSecondaryCollisions(ray: PolygonRay, result: CollisionResult, edges: EdgeSet): PolygonVertex[];
|
255
269
|
|
256
270
|
/**
|
257
271
|
* Identify collision points for a required terminal ray.
|
@@ -261,7 +275,7 @@ declare global {
|
|
261
275
|
* @param result - The pending collision result
|
262
276
|
* @param activeEdges - The set of currently active edges
|
263
277
|
*/
|
264
|
-
protected _findRequiredCollision(ray:
|
278
|
+
protected _findRequiredCollision(ray: PolygonRay, result: CollisionResult, activeEdges: EdgeSet): void;
|
265
279
|
|
266
280
|
/**
|
267
281
|
* Identify the collision points between an emitted Ray and a set of active edges.
|
@@ -271,7 +285,7 @@ declare global {
|
|
271
285
|
* @internal
|
272
286
|
*/
|
273
287
|
protected _getRayCollisions(
|
274
|
-
ray:
|
288
|
+
ray: PolygonRay,
|
275
289
|
activeEdges: EdgeSet,
|
276
290
|
{
|
277
291
|
minimumDistance
|
@@ -304,7 +318,7 @@ declare global {
|
|
304
318
|
* @param r1 - The next ray that collides with some vertex
|
305
319
|
* @internal
|
306
320
|
*/
|
307
|
-
protected _getPaddingPoints(r0:
|
321
|
+
protected _getPaddingPoints(r0: PolygonRay, r1: PolygonRay): Point[];
|
308
322
|
|
309
323
|
/**
|
310
324
|
* Test whether a wall should be included in the computed polygon for a given origin and type
|
@@ -328,7 +342,7 @@ declare global {
|
|
328
342
|
* @param angle - The angle being tested, in degrees
|
329
343
|
* @returns Is the vertex between the two rays?
|
330
344
|
*/
|
331
|
-
static pointBetweenRays(vertex: PolygonVertex, rMin:
|
345
|
+
static pointBetweenRays(vertex: PolygonVertex, rMin: PolygonRay, rMax: PolygonRay, angle: number): boolean;
|
332
346
|
|
333
347
|
/** @override */
|
334
348
|
visualize(): void;
|
@@ -342,7 +356,7 @@ declare global {
|
|
342
356
|
* The closest collision, if mode is "closest"
|
343
357
|
*/
|
344
358
|
static getRayCollisions<Mode extends 'any' | 'closest' | 'all'>(
|
345
|
-
ray:
|
359
|
+
ray: PolygonRay,
|
346
360
|
options?: {
|
347
361
|
/**
|
348
362
|
* Which collision type to check, a value in CONST.WALL_RESTRICTION_TYPES
|
@@ -368,7 +382,7 @@ declare global {
|
|
368
382
|
* Visualize the polygon, displaying its computed area, rays, and collision points
|
369
383
|
* @internal
|
370
384
|
*/
|
371
|
-
protected static _visualizeCollision(ray:
|
385
|
+
protected static _visualizeCollision(ray: PolygonRay, edges: EdgeSet, collisions: PolygonVertex[]): void;
|
372
386
|
}
|
373
387
|
|
374
388
|
namespace ClockwiseSweepPolygon {
|
@@ -385,12 +399,12 @@ declare global {
|
|
385
399
|
rotation: number;
|
386
400
|
hasLimitedAngle: boolean;
|
387
401
|
density: number;
|
388
|
-
rMin:
|
402
|
+
rMin: PolygonRay;
|
389
403
|
}
|
390
404
|
|
391
405
|
interface LimitedAngleConfig extends InitializedConfig {
|
392
406
|
hasLimitedAngle: true;
|
393
|
-
rMax:
|
407
|
+
rMax: PolygonRay;
|
394
408
|
}
|
395
409
|
}
|
396
410
|
}
|
@@ -207,11 +207,6 @@ declare class Die extends DiceTerm {
|
|
207
207
|
}
|
208
208
|
|
209
209
|
declare namespace Die {
|
210
|
-
interface Data extends Partial<TermData> {
|
211
|
-
class: 'Die';
|
212
|
-
results: DiceTerm.Result[];
|
213
|
-
}
|
214
|
-
|
215
210
|
interface TermData extends DiceTerm.TermData {
|
216
211
|
modifiers: Array<keyof typeof Die['MODIFIERS']>;
|
217
212
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Mathematically behaves like 1d3-2
|
4
4
|
*/
|
5
5
|
declare class FateDie extends DiceTerm {
|
6
|
-
constructor(termData?: Partial<
|
6
|
+
constructor(termData?: Partial<FateDie.TermData>);
|
7
7
|
|
8
8
|
faces: 3;
|
9
9
|
|
@@ -12,6 +12,9 @@ declare class FateDie extends DiceTerm {
|
|
12
12
|
*/
|
13
13
|
static DENOMINATION: string;
|
14
14
|
|
15
|
+
/** @override */
|
16
|
+
static MODIFIERS: FateDie.Modifiers;
|
17
|
+
|
15
18
|
/**
|
16
19
|
* @override
|
17
20
|
*/
|
@@ -22,3 +25,20 @@ declare class FateDie extends DiceTerm {
|
|
22
25
|
*/
|
23
26
|
getResultLabel(result: DiceTerm.Result): string;
|
24
27
|
}
|
28
|
+
|
29
|
+
declare namespace FateDie {
|
30
|
+
interface TermData extends DiceTerm.TermData {
|
31
|
+
modifiers: Array<keyof typeof FateDie['MODIFIERS']>;
|
32
|
+
}
|
33
|
+
|
34
|
+
interface Modifiers {
|
35
|
+
r: Die['reroll'];
|
36
|
+
rr: Die['rerollRecursive'];
|
37
|
+
k: Die['keep'];
|
38
|
+
kh: Die['keep'];
|
39
|
+
kl: Die['keep'];
|
40
|
+
d: Die['drop'];
|
41
|
+
dh: Die['drop'];
|
42
|
+
dl: Die['drop'];
|
43
|
+
}
|
44
|
+
}
|
@@ -5,13 +5,6 @@
|
|
5
5
|
declare class VideoHelper {
|
6
6
|
constructor();
|
7
7
|
|
8
|
-
/**
|
9
|
-
* A collection of HTML5 video objects which are currently active within the FVTT page
|
10
|
-
* @defaultValue `[]`
|
11
|
-
* @remarks This seems to be unused.
|
12
|
-
*/
|
13
|
-
videos: HTMLVideoElement[];
|
14
|
-
|
15
8
|
/**
|
16
9
|
* A user gesture must be registered before video playback can begin.
|
17
10
|
* This Set records the video elements which await such a gesture.
|
package/src/foundry/index.d.ts
CHANGED
@@ -20,12 +20,9 @@ import './foundry.js/clientSettings';
|
|
20
20
|
import './foundry.js/collections';
|
21
21
|
import './foundry.js/collisionResult';
|
22
22
|
import './foundry.js/config';
|
23
|
-
import './foundry.js/constants';
|
24
23
|
import './foundry.js/contextMenu';
|
25
24
|
import './foundry.js/dragDrop';
|
26
25
|
import './foundry.js/draggable';
|
27
|
-
import './foundry.js/features';
|
28
|
-
import './foundry.js/fonts';
|
29
26
|
import './foundry.js/formDataExtended';
|
30
27
|
import './foundry.js/game';
|
31
28
|
import './foundry.js/gameTime';
|
@@ -74,7 +71,6 @@ import './foundry.js/templateUtils';
|
|
74
71
|
import './foundry.js/textEditor';
|
75
72
|
import './foundry.js/textureLoader';
|
76
73
|
import './foundry.js/textureUtils';
|
77
|
-
import './foundry.js/types';
|
78
74
|
import './foundry.js/userTargets';
|
79
75
|
import './foundry.js/utils';
|
80
76
|
import './foundry.js/videoHelper';
|
@@ -103,6 +103,12 @@ export type PlaceableDocumentType =
|
|
103
103
|
| 'Token'
|
104
104
|
| 'Wall';
|
105
105
|
|
106
|
+
export type DocumentSubTypes<T extends DocumentType> = 'type' extends keyof InstanceType<
|
107
|
+
ConfiguredDocumentClassForName<T>
|
108
|
+
>['data']
|
109
|
+
? InstanceType<ConfiguredDocumentClassForName<T>>['data']['type']
|
110
|
+
: typeof foundry.CONST.BASE_DOCUMENT_TYPE;
|
111
|
+
|
106
112
|
export type ConfiguredDocumentClassForName<Name extends DocumentType> = CONFIG[Name]['documentClass'];
|
107
113
|
|
108
114
|
export type ConfiguredObjectClassForName<Name extends PlaceableDocumentType> = CONFIG[Name]['objectClass'];
|