@league-of-foundry-developers/foundry-vtt-types 9.255.0 → 9.255.3

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 (64) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/foundry/common/types.mjs.d.ts +122 -10
  4. package/src/foundry/common/utils/http.mjs.d.ts +52 -0
  5. package/src/foundry/common/utils/module.mjs.d.ts +1 -0
  6. package/src/foundry/common/utils/semaphore.mjs.d.ts +6 -3
  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/dialog.d.ts +14 -29
  10. package/src/foundry/foundry.js/applications/formApplication.d.ts +5 -0
  11. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +18 -57
  12. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +8 -6
  13. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
  14. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
  15. package/src/foundry/foundry.js/applications/hotbar.d.ts +7 -3
  16. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
  17. package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
  18. package/src/foundry/foundry.js/avClient.d.ts +15 -1
  19. package/src/foundry/foundry.js/avClients/index.d.ts +0 -1
  20. package/src/foundry/foundry.js/avClients/simplePeerAVClient.d.ts +31 -4
  21. package/src/foundry/foundry.js/avMaster.d.ts +21 -48
  22. package/src/foundry/foundry.js/avSettings.d.ts +19 -46
  23. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +4 -4
  24. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +28 -6
  25. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +13 -70
  26. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +42 -9
  27. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +2 -2
  28. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +23 -21
  29. package/src/foundry/foundry.js/clientDocuments/item.d.ts +5 -23
  30. package/src/foundry/foundry.js/clientDocuments/macro.d.ts +10 -0
  31. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
  32. package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +1 -1
  33. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +24 -14
  34. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +16 -14
  35. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +12 -7
  36. package/src/foundry/foundry.js/clientDocuments/user.d.ts +2 -12
  37. package/src/foundry/foundry.js/clientSettings.d.ts +38 -86
  38. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
  39. package/src/foundry/foundry.js/gamepadManager.d.ts +12 -0
  40. package/src/foundry/foundry.js/globalVariables.d.ts +0 -31
  41. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
  42. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
  43. package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
  44. package/src/foundry/foundry.js/pixi/containers/baseGrid.d.ts +21 -6
  45. package/src/foundry/foundry.js/pixi/containers/baseGrids/hexagonalGrid.d.ts +13 -8
  46. package/src/foundry/foundry.js/pixi/containers/baseGrids/squareGrid.d.ts +5 -3
  47. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +14 -5
  48. package/src/foundry/foundry.js/pixi/containers/index.d.ts +1 -0
  49. package/src/foundry/foundry.js/pixi/containers/objectHUD.d.ts +82 -0
  50. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +9 -55
  51. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
  52. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +29 -4
  53. package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +37 -20
  54. package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +55 -15
  55. package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +12 -2
  56. package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +42 -12
  57. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +219 -62
  58. package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +107 -16
  59. package/src/foundry/foundry.js/textEditor.d.ts +266 -231
  60. package/src/foundry/index.d.ts +0 -4
  61. package/src/types/utils.d.ts +5 -0
  62. package/src/foundry/foundry.js/avClients/easyRTCClient.d.ts +0 -392
  63. package/src/foundry/foundry.js/features.d.ts +0 -0
  64. package/src/foundry/foundry.js/fonts.d.ts +0 -24
@@ -1,6 +1,10 @@
1
- import type { ConfiguredDocumentClass } from '../../../../../types/helperTypes';
1
+ import type {
2
+ ConfiguredDocumentClass,
3
+ ConfiguredDocumentClassForName,
4
+ ConfiguredObjectClassForName
5
+ } from '../../../../../types/helperTypes';
2
6
  import type { DocumentModificationOptions } from '../../../../common/abstract/document.mjs';
3
- import type { WallData } from '../../../../common/data/data.mjs';
7
+ import type { LineIntersection } from '../../../../common/utils/geometry.mjs';
4
8
  import type { HoverInOptions } from '../placeableObject';
5
9
 
6
10
  declare global {
@@ -20,36 +24,83 @@ declare global {
20
24
  controlIcon: null;
21
25
 
22
26
  /**
23
- * @remarks Type is `MouseInteractionManager<this, this['endpoints']>`
27
+ * An reference the Door Control icon associated with this Wall, if any
28
+ * @internal
29
+ * @defaultValue `undefined`
24
30
  */
25
- mouseInteractionManager: MouseInteractionManager<this> | null;
31
+ doorControl: DoorControl | undefined | null;
26
32
 
27
- constructor(document: ConcreteWallDocument);
33
+ /**
34
+ * A reference to an overhead Tile that is a roof, interior to which this wall is contained
35
+ * @defaultValue `undefined`
36
+ */
37
+ roof: InstanceType<ConfiguredObjectClassForName<'Tile'>> | undefined;
28
38
 
29
39
  /**
30
- * An reference the Door Control icon associated with this Wall, if any
31
- * @internal
40
+ * A set which tracks other Wall instances that this Wall intersects with (excluding shared endpoints)
41
+ */
42
+ intersectsWith: Map<InstanceType<ConfiguredObjectClassForName<'Wall'>>, LineIntersection>;
43
+
44
+ /**
45
+ * Cached representation of this wall's endpoints as {@link PolygonVertex}es.
32
46
  * @defaultValue `null`
47
+ * @internal
33
48
  */
34
- doorControl: DoorControl | null;
49
+ protected _vertices: { a: PolygonVertex; b: PolygonVertex } | null;
35
50
 
36
51
  /**
37
- * A reference to an overhead Tile that is a roof, interior to which this wall is contained
38
- * @defaultValue `undefined`
52
+ * Cached representation of the set of this wall's vertices.
53
+ * @defaultValue `null`
54
+ * @internal
39
55
  */
40
- roof: Tile | undefined;
56
+ protected _wallKeys: Set<string> | null;
41
57
 
42
58
  /** @override */
43
- static get embeddedName(): 'Wall';
59
+ static embeddedName: 'Wall';
44
60
 
45
61
  /**
46
62
  * A convenience reference to the coordinates Array for the Wall endpoints, [x0,y0,x1,y1].
47
63
  */
48
64
  get coords(): Wall['data']['c'];
49
65
 
66
+ /**
67
+ * The initial endpoint of the Wall
68
+ */
69
+ get A(): Point;
70
+
71
+ /**
72
+ * The second endpoint of the Wall
73
+ */
74
+ get B(): Point;
75
+
76
+ /**
77
+ * The endpoints of the wall as {@link PolygonVertex}es.
78
+ */
79
+ get vertices(): { a: PolygonVertex; b: PolygonVertex };
80
+
81
+ /**
82
+ * The set of keys for this wall's endpoints.
83
+ */
84
+ get wallKeys(): Set<string>;
85
+
50
86
  /** @override */
51
87
  get bounds(): NormalizedRectangle;
52
88
 
89
+ /**
90
+ * A boolean for whether this wall contains a door
91
+ */
92
+ get isDoor(): boolean;
93
+
94
+ /**
95
+ * A boolean for whether the wall contains an open door
96
+ */
97
+ get isOpen(): boolean;
98
+
99
+ /**
100
+ * Is this Wall interior to a non-occluded roof Tile?
101
+ */
102
+ get hasActiveRoof(): boolean;
103
+
53
104
  /**
54
105
  * Return the coordinates [x,y] at the midpoint of the wall segment
55
106
  */
@@ -73,6 +124,19 @@ declare global {
73
124
  /** @override */
74
125
  draw(): Promise<this>;
75
126
 
127
+ /**
128
+ * Draw a control icon that is used to manipulate the door's open/closed state
129
+ */
130
+ createDoorControl(): DoorControl;
131
+
132
+ /**
133
+ * Determine the orientation of this wall with respect to a reference point
134
+ * @param point - Some reference point, relative to which orientation is determined
135
+ * @returns An orientation in CONST.WALL_DIRECTIONS which indicates whether the Point is left,
136
+ * right, or collinear (both) with the Wall
137
+ */
138
+ orientPoint(point: Point): number;
139
+
76
140
  /** @override */
77
141
  protected _createInteractionManager(): NonNullable<this['mouseInteractionManager']>;
78
142
 
@@ -82,6 +146,7 @@ declare global {
82
146
  /**
83
147
  * Draw a directional prompt icon for one-way walls to illustrate their direction of effect.
84
148
  * @returns The drawn icon
149
+ * @internal
85
150
  */
86
151
  protected _drawDirection(): PIXI.Sprite | null;
87
152
 
@@ -113,7 +178,7 @@ declare global {
113
178
  protected _onRelease(options?: PlaceableObject.ReleaseOptions): void;
114
179
 
115
180
  /** @override */
116
- destroy(options?: Parameters<PIXI.Container['destroy']>[0]): void;
181
+ destroy(options?: Parameters<PlaceableObject['destroy']>[0]): void;
117
182
 
118
183
  /**
119
184
  * Test whether the Wall direction lies between two provided angles
@@ -137,15 +202,41 @@ declare global {
137
202
  getLinkedSegments(): {
138
203
  ids: string[];
139
204
  walls: WallsLayer['placeables'];
140
- endpoints: Array<[number, number]>;
205
+ endpoints: Array<[x: number, y: number]>;
141
206
  };
142
207
 
208
+ /**
209
+ * Determine whether this wall is beneath a roof tile, and is considered "interior", or not.
210
+ */
211
+ identifyInteriorState(): void;
212
+
213
+ /**
214
+ * Update any intersections with this wall.
215
+ */
216
+ updateIntersections(): void;
217
+
218
+ /**
219
+ * Record the intersection points between this wall and another, if any.
220
+ * @param other - The other wall.
221
+ */
222
+ protected _identifyIntersectionsWith(other: InstanceType<ConfiguredDocumentClassForName<'Wall'>>): void;
223
+
224
+ /**
225
+ * Remove this wall's intersections.
226
+ * @internal
227
+ */
228
+ protected _removeIntersections(): void;
229
+
143
230
  /** @override */
144
- protected _onCreate(data: WallData['_source'], options: DocumentModificationOptions, userId: string): void;
231
+ protected _onCreate(
232
+ data: foundry.data.WallData['_source'],
233
+ options: DocumentModificationOptions,
234
+ userId: string
235
+ ): void;
145
236
 
146
237
  /** @override */
147
238
  protected _onUpdate(
148
- changed: DeepPartial<WallData['_source']>,
239
+ changed: DeepPartial<foundry.data.WallData['_source']>,
149
240
  options?: DocumentModificationOptions,
150
241
  userId?: string
151
242
  ): void;