@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.
Files changed (72) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/src/foundry/common/constants.mjs.d.ts +1 -0
  4. package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -3
  5. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +8 -1
  6. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +7 -1
  7. package/src/foundry/common/types.mjs.d.ts +125 -10
  8. package/src/foundry/common/utils/helpers.mjs.d.ts +0 -1
  9. package/src/foundry/common/utils/http.mjs.d.ts +52 -0
  10. package/src/foundry/common/utils/module.mjs.d.ts +1 -0
  11. package/src/foundry/common/utils/primitives.mjs.d.ts +2 -2
  12. package/src/foundry/common/utils/semaphore.mjs.d.ts +6 -3
  13. package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
  14. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +18 -57
  15. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +8 -6
  16. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
  17. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
  18. package/src/foundry/foundry.js/applications/notifications.d.ts +2 -5
  19. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
  20. package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
  21. package/src/foundry/foundry.js/avClient.d.ts +15 -1
  22. package/src/foundry/foundry.js/avClients/index.d.ts +0 -1
  23. package/src/foundry/foundry.js/avClients/simplePeerAVClient.d.ts +31 -4
  24. package/src/foundry/foundry.js/avMaster.d.ts +21 -48
  25. package/src/foundry/foundry.js/avSettings.d.ts +19 -46
  26. package/src/foundry/foundry.js/canvas.d.ts +0 -8
  27. package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +6 -0
  28. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +4 -4
  29. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +28 -6
  30. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +13 -70
  31. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +42 -9
  32. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -3
  33. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +23 -21
  34. package/src/foundry/foundry.js/clientDocuments/item.d.ts +5 -23
  35. package/src/foundry/foundry.js/clientDocuments/macro.d.ts +10 -0
  36. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
  37. package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +1 -1
  38. package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +24 -14
  39. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +16 -14
  40. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +12 -7
  41. package/src/foundry/foundry.js/clientDocuments/user.d.ts +2 -12
  42. package/src/foundry/foundry.js/clientSettings.d.ts +203 -230
  43. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +4 -2
  44. package/src/foundry/foundry.js/config.d.ts +3 -0
  45. package/src/foundry/foundry.js/game.d.ts +1 -1
  46. package/src/foundry/foundry.js/gamepadManager.d.ts +12 -0
  47. package/src/foundry/foundry.js/globalVariables.d.ts +0 -31
  48. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
  49. package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
  50. package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
  51. package/src/foundry/foundry.js/pixi/containers/baseGrid.d.ts +21 -6
  52. package/src/foundry/foundry.js/pixi/containers/baseGrids/hexagonalGrid.d.ts +13 -8
  53. package/src/foundry/foundry.js/pixi/containers/baseGrids/squareGrid.d.ts +5 -3
  54. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +14 -5
  55. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +9 -55
  56. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
  57. package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +29 -4
  58. package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +37 -20
  59. package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +3 -0
  60. package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +12 -2
  61. package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +42 -12
  62. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -0
  63. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +4 -2
  64. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +31 -17
  65. package/src/foundry/foundry.js/rollTerms/diceTerms/die.d.ts +0 -5
  66. package/src/foundry/foundry.js/rollTerms/diceTerms/fateDie.d.ts +21 -1
  67. package/src/foundry/foundry.js/videoHelper.d.ts +0 -7
  68. package/src/foundry/index.d.ts +0 -4
  69. package/src/types/helperTypes.d.ts +6 -0
  70. package/src/foundry/foundry.js/avClients/easyRTCClient.d.ts +0 -392
  71. package/src/foundry/foundry.js/features.d.ts +0 -0
  72. package/src/foundry/foundry.js/fonts.d.ts +0 -24
@@ -1,13 +1,24 @@
1
+ interface WorldConfigOptions extends FormApplicationOptions {
2
+ /**
3
+ * Whether the world is being created or updated.
4
+ * @defaultValue `false`
5
+ */
6
+ create: boolean;
7
+
8
+ inWorld?: boolean | undefined;
9
+ }
10
+
1
11
  /**
2
12
  * The World Management setup application
3
13
  * @typeParam Options - The type of the options object
4
14
  * @typeParam Data - The data structure used to render the handlebars template.
5
15
  */
6
16
  declare class WorldConfig<
7
- Options extends WorldConfig.Options = WorldConfig.Options,
17
+ Options extends WorldConfigOptions = WorldConfigOptions,
8
18
  Data extends object = WorldConfig.Data
9
19
  > extends FormApplication<Options, Data, Game.WorldData<foundry.packages.WorldData>> {
10
20
  /**
21
+ * @override
11
22
  * @defaultValue
12
23
  * ```typescript
13
24
  * foundry.utils.mergeObject(super.defaultOptions, {
@@ -19,13 +30,16 @@ declare class WorldConfig<
19
30
  * })
20
31
  * ```
21
32
  */
22
- static get defaultOptions(): WorldConfig.Options;
33
+ static get defaultOptions(): WorldConfigOptions;
23
34
 
24
35
  static WORLD_KB_URL: 'https://foundryvtt.com/article/game-worlds/';
25
36
 
26
37
  /** @override */
27
38
  get title(): string;
28
39
 
40
+ /** @override */
41
+ activateListeners(html: JQuery): void;
42
+
29
43
  /** @override */
30
44
  getData(options?: Partial<Options>): Data | Promise<Data>;
31
45
 
@@ -40,8 +54,14 @@ declare class WorldConfig<
40
54
  */
41
55
  protected _updateObject(...args: unknown[]): Promise<unknown>;
42
56
 
57
+ /**
58
+ * Update the world name placeholder when the title is changed.
59
+ * @internal
60
+ */
61
+ protected _onTitleChange(event: JQuery.TriggeredEvent): void;
62
+
43
63
  /** @override **/
44
- activateEditor(name: string, options?: TextEditor.Options, initialContent?: string): void;
64
+ activateEditor(name: string, options?: TextEditor.Options | undefined, initialContent?: string | undefined): void;
45
65
  }
46
66
 
47
67
  declare namespace WorldConfig {
@@ -56,13 +76,4 @@ declare namespace WorldConfig {
56
76
  showEditFields: boolean;
57
77
  systems?: Game.SystemData<foundry.packages.SystemData>[];
58
78
  }
59
-
60
- interface Options extends FormApplicationOptions {
61
- /**
62
- * @defaultValue `false`
63
- */
64
- create: boolean;
65
-
66
- inWorld?: boolean;
67
- }
68
79
  }
@@ -46,11 +46,8 @@ declare class Notifications<Options extends ApplicationOptions = ApplicationOpti
46
46
  */
47
47
  initialize(): void;
48
48
 
49
- /**
50
- * @override
51
- * @remarks This return a `JQuery`, which is incompatible with the expected `Promise<JQuery>` (see https://gitlab.com/foundrynet/foundryvtt/-/issues/6554).
52
- */
53
- protected _renderInner(data: object): any;
49
+ /** @override */
50
+ protected _renderInner(data: object): Promise<JQuery>;
54
51
 
55
52
  /** @override */
56
53
  protected _render(force?: boolean, options?: Application.RenderOptions<Options>): Promise<void>;
@@ -91,7 +91,10 @@ declare global {
91
91
  */
92
92
  protected _onToggleNav(event: JQuery.ClickEvent): void;
93
93
 
94
- static _onLoadProgress(context: string, pct: number): void;
94
+ /**
95
+ * Display progress of some major operation like loading Scene textures.
96
+ */
97
+ static displayProgressBar(options: SceneNavigation.DisplayProgressBarOptions): void;
95
98
  }
96
99
 
97
100
  namespace SceneNavigation {
@@ -104,5 +107,17 @@ declare global {
104
107
  css: string;
105
108
  })[];
106
109
  }
110
+
111
+ interface DisplayProgressBarOptions {
112
+ /**
113
+ * A text label to display
114
+ */
115
+ label?: string | undefined;
116
+
117
+ /**
118
+ * A percentage of progress between 0 and 100
119
+ */
120
+ pct: number;
121
+ }
107
122
  }
108
123
  }
@@ -84,6 +84,13 @@ declare class Sidebar<Options extends ApplicationOptions = ApplicationOptions> e
84
84
  */
85
85
  protected _onChangeTab(event: MouseEvent | null, tabs: Tabs, active: string): void;
86
86
 
87
+ /**
88
+ * Handle the special case of left-clicking a tab when the sidebar is collapsed.
89
+ * @param event - The originating click event
90
+ * @internal
91
+ */
92
+ protected _onLeftClickTab(event: MouseEvent): void;
93
+
87
94
  /**
88
95
  * Handle right-click events on tab controls to trigger pop-out containers for each tab
89
96
  * @param event - The originating contextmenu event
@@ -82,7 +82,7 @@ declare abstract class AVClient {
82
82
  * @param kind - The type of device source being requested
83
83
  * @internal
84
84
  */
85
- _getSourcesOfType(kind: MediaDeviceKind): Promise<Record<string, string>>;
85
+ protected _getSourcesOfType(kind: MediaDeviceKind): Promise<Record<string, string>>;
86
86
 
87
87
  /**
88
88
  * Return an array of Foundry User IDs which are currently connected to A/V.
@@ -98,6 +98,14 @@ declare abstract class AVClient {
98
98
  */
99
99
  abstract getMediaStreamForUser(userId: string): MediaStream | null | undefined;
100
100
 
101
+ /**
102
+ * Provide a MediaStream for monitoring a given user's voice volume levels.
103
+ * @param userId - The User ID.
104
+ * @returns The MediaStream for the user, or null if the user does not have one.
105
+ * @remarks The getLevelsStreamForUser() method must be defined by an AVClient subclass and will be strictly required starting in v10
106
+ */
107
+ getLevelsStreamForUser(userId: string): MediaStream | null | undefined;
108
+
101
109
  /**
102
110
  * Is outbound audio enabled for the current user?
103
111
  */
@@ -141,4 +149,10 @@ declare abstract class AVClient {
141
149
  * @param changed - The settings which have changed
142
150
  */
143
151
  onSettingsChanged(changed: DeepPartial<AVSettings.Settings>): void;
152
+
153
+ /**
154
+ * Replace the local stream for each connected peer with a re-generated MediaStream.
155
+ * @remarks The updateLocalStream() method must be defined by an AVClient subclass.
156
+ */
157
+ abstract updateLocalStream(): Promise<void>;
144
158
  }
@@ -1,2 +1 @@
1
- import './easyRTCClient';
2
1
  import './simplePeerAVClient';
@@ -9,6 +9,12 @@ declare class SimplePeerAVClient extends AVClient {
9
9
  */
10
10
  localStream: MediaStream | null;
11
11
 
12
+ /**
13
+ * The dedicated audio stream used to measure volume levels for voice activity detection.
14
+ * @defaultValue `null`
15
+ */
16
+ levelsStream: MediaStream | null;
17
+
12
18
  /**
13
19
  * A mapping of connected peers
14
20
  */
@@ -24,7 +30,7 @@ declare class SimplePeerAVClient extends AVClient {
24
30
  * @defaultValue `false`
25
31
  * @internal
26
32
  */
27
- _initialized: boolean;
33
+ protected _initialized: boolean;
28
34
 
29
35
  /**
30
36
  * Is outbound broadcast of local audio enabled?
@@ -32,9 +38,21 @@ declare class SimplePeerAVClient extends AVClient {
32
38
  */
33
39
  audioBroadcastEnabled: boolean;
34
40
 
41
+ /**
42
+ * The polling interval ID for connected users that might have unexpectedly dropped out of our peer network.
43
+ * @internal
44
+ */
45
+ protected _connectionPoll: number | null;
46
+
35
47
  /** @override */
36
48
  connect(): Promise<boolean>;
37
49
 
50
+ /**
51
+ * Try to establish a peer connection with each user connected to the server.
52
+ * @internal
53
+ */
54
+ protected _connect(): Promise<SimplePeer.Instance[]>;
55
+
38
56
  /** @override */
39
57
  disconnect(): Promise<boolean>;
40
58
 
@@ -47,6 +65,9 @@ declare class SimplePeerAVClient extends AVClient {
47
65
  /** @override */
48
66
  getMediaStreamForUser(userId: string): MediaStream | null | undefined;
49
67
 
68
+ /** @override */
69
+ getLevelsStreamForUser(userId: string): MediaStream | null | undefined;
70
+
50
71
  /** @override */
51
72
  isAudioEnabled(): boolean;
52
73
 
@@ -70,6 +91,14 @@ declare class SimplePeerAVClient extends AVClient {
70
91
  */
71
92
  initializeLocalStream(): Promise<MediaStream | null>;
72
93
 
94
+ /**
95
+ * Attempt to create local media streams.
96
+ * @param params - Parameters for the getUserMedia request.
97
+ * @returns The created MediaStream or an error.
98
+ * @internal
99
+ */
100
+ protected _createMediaStream(params: MediaStreamConstraints): Promise<MediaStream | Error>;
101
+
73
102
  /**
74
103
  * Listen for Audio/Video updates on the av socket to broker connections between peers
75
104
  */
@@ -131,8 +160,6 @@ declare class SimplePeerAVClient extends AVClient {
131
160
  /** @override */
132
161
  onSettingsChanged(changed: DeepPartial<AVSettings.Settings>): Promise<void>;
133
162
 
134
- /**
135
- * Replace the local stream for each connected peer with a re-generated MediaStream
136
- */
163
+ /** @override */
137
164
  updateLocalStream(): Promise<void>;
138
165
  }
@@ -29,24 +29,26 @@ declare class AVMaster {
29
29
  protected _connected: boolean;
30
30
 
31
31
  /**
32
- * A flag to track whether the A/V system is currently in the process of reconnecting.
33
- * This occurs if the connection is lost or interrupted.
34
- * @defaultValue `false`
32
+ * The cached connection promise.
33
+ * This is required to prevent re-triggering a connection while one is already in progress.
34
+ * @defaultValue `null`
35
35
  * @internal
36
36
  */
37
- protected _reconnecting: boolean;
37
+ protected _connecting: Promise<boolean> | null;
38
38
 
39
39
  /**
40
- * @defaultValue `{}`
40
+ * A flag to track whether the A/V system is currently in the process of reconnecting.
41
+ * This occurs if the connection is lost or interrupted.
42
+ * @defaultValue `false`
41
43
  * @internal
42
44
  */
43
- protected _speakingData: AVMaster.SpeakingData;
45
+ protected _reconnecting: boolean;
44
46
 
45
47
  /**
46
48
  * @defaultValue `{}`
47
49
  * @internal
48
50
  */
49
- protected _pttHandlers: AVMaster.PTTHandlers;
51
+ protected _speakingData: { speaking: boolean; volumeHistories: number[] };
50
52
 
51
53
  /**
52
54
  * @defaultValue `0`
@@ -54,7 +56,7 @@ declare class AVMaster {
54
56
  */
55
57
  protected _pttMuteTimeout: number;
56
58
 
57
- get mode(): AVSettings.VoiceMode;
59
+ get mode(): AVSettings.AV_MODES;
58
60
 
59
61
  /**
60
62
  * Connect to the Audio/Video client.
@@ -111,29 +113,27 @@ declare class AVMaster {
111
113
  * @param mode - The currently selected voice broadcasting mode
112
114
  * @internal
113
115
  */
114
- protected _initializeUserVoiceDetection(mode: AVSettings.VoiceMode): void;
116
+ protected _initializeUserVoiceDetection(mode: AVSettings.VOICE_MODES): void;
115
117
 
116
118
  /**
117
119
  * Activate voice detection tracking for a userId on a provided MediaStream.
118
120
  * Currently only a MediaStream is supported because MediaStreamTrack processing is not yet supported cross-browser.
119
- * @param userId - The Foundry User ID whose voice is being processed
120
121
  * @param stream - The MediaStream which corresponds to that User
121
122
  * @param ms - A number of milliseconds which represents the voice activation volume interval
122
123
  * (default: `CONFIG.WebRTC.detectPeerVolumeInterval`)
123
124
  */
124
- activateVoiceDetection(userId: string, stream: MediaStream, ms?: number): void;
125
+ activateVoiceDetection(stream: MediaStream, ms?: number): void;
125
126
 
126
127
  /**
127
128
  * Actions which the orchestration layer should take when a peer user disconnects from the audio/video service.
128
- * @param userId - The id of the disconnecting User
129
129
  */
130
- deactivateVoiceDetection(userId: string): void;
130
+ deactivateVoiceDetection(): void;
131
131
 
132
132
  /**
133
133
  * Periodic notification of user audio level
134
134
  *
135
- * This function uses the audio level (in dB) of each stream it's listening to to determine if a user
136
- * is speaking or not and notifies the UI of such changes.
135
+ * This function uses the audio level (in dB) of the audio stream to determine if the user is speaking or not and
136
+ * notifies the UI of such changes.
137
137
  *
138
138
  * The User is considered speaking if they are above the decibel threshold in any of the history values.
139
139
  * This marks them as speaking as soon as they have a high enough volume, and marks them as not speaking only after
@@ -142,46 +142,31 @@ declare class AVMaster {
142
142
  * There can be more optimal ways to do this and which uses whether the user was already considered speaking before
143
143
  * or not, in order to eliminate short bursts of audio (coughing for example).
144
144
  *
145
- * @param userId - The user ID of the user whose audio levels are being reported
146
145
  * @param dbLevel - The audio level in decibels of the user within the last 50ms
147
146
  * @internal
148
147
  */
149
- protected _onAudioLevel(userId: string, dbLevel: number): void;
150
-
151
- /**
152
- * Set up interactivity and handling of push-to-talk broadcasting workflow.
153
- * @internal
154
- */
155
- protected _initializePushToTalk(): void;
148
+ protected _onAudioLevel(dbLevel: number): void;
156
149
 
157
150
  /**
158
151
  * Resets the speaking history of a user
159
152
  * If the user was considered speaking, then mark them as not speaking
160
- * @param userId - The ID of the user
161
153
  * @internal
162
154
  */
163
- protected _resetSpeakingHistory(userId: string): void;
155
+ protected _resetSpeakingHistory(): void;
164
156
 
165
157
  /**
166
158
  * Handle activation of a push-to-talk key or button.
167
- * @param event - The original keydown event
159
+ * @param context - The context data of the event
168
160
  * @internal
169
161
  */
170
- _onPTTStart(event: KeyboardEvent | MouseEvent): void;
162
+ _onPTTStart(context: KeyboardEventContext): void;
171
163
 
172
164
  /**
173
165
  * Handle deactivation of a push-to-talk key or button.
174
- * @param event - The original keyup event
166
+ * @param context - The context data of the event
175
167
  * @internal
176
168
  */
177
- _onPTTEnd(event: KeyboardEvent | MouseEvent): void;
178
-
179
- /**
180
- * Handle matching old and new PTT configurations against the mouse or keyboard event.
181
- * @param event - The original event
182
- * @internal
183
- */
184
- _isPTTKey(event: KeyboardEvent | MouseEvent): boolean;
169
+ _onPTTEnd(context: KeyboardEventContext): void;
185
170
 
186
171
  render(): void;
187
172
 
@@ -200,15 +185,3 @@ declare class AVMaster {
200
185
 
201
186
  debug(message: string): void;
202
187
  }
203
-
204
- declare namespace AVMaster {
205
- type SpeakingData = Partial<Record<string, { speaking: boolean; volumeHistories: number[] }>>;
206
- type PTTHandler = (event: KeyboardEvent | MouseEvent) => void;
207
- type PTTHandlers =
208
- | {}
209
- | { mousedown: PTTHandler; mouseup: PTTHandler }
210
- | {
211
- keydown: PTTHandler;
212
- keyup: PTTHandler;
213
- };
214
- }
@@ -12,9 +12,11 @@ interface AVSettingsData {
12
12
  declare class AVSettings {
13
13
  constructor();
14
14
 
15
- protected _set<T>(key: string, value: T): void;
15
+ /** @internal */
16
+ protected _set: <T>(key: string, value: T) => void;
16
17
 
17
- protected _change(): void;
18
+ /** @internal */
19
+ protected _change: () => void;
18
20
 
19
21
  client: AVSettings.ClientSettings;
20
22
 
@@ -74,15 +76,7 @@ declare class AVSettings {
74
76
  /**
75
77
  * @defaultValue `'AVSettings.VOICE_MODES.PTT'`
76
78
  */
77
- mode: AVSettings.VoiceMode;
78
-
79
- /**
80
- * @defaultValue
81
- * ```
82
- * "`"
83
- * ```
84
- */
85
- pttKey: string;
79
+ mode: AVSettings.VOICE_MODES;
86
80
 
87
81
  /**
88
82
  * @defaultValue
@@ -92,11 +86,6 @@ declare class AVSettings {
92
86
  */
93
87
  pttName: string;
94
88
 
95
- /**
96
- * @defaultValue `false`
97
- */
98
- pttMouse: boolean;
99
-
100
89
  /**
101
90
  * @defaultValue `100`
102
91
  */
@@ -111,41 +100,14 @@ declare class AVSettings {
111
100
  /**
112
101
  * @defaultValue `{}`
113
102
  */
114
- users: Partial<Record<string, AVSettings.StoredUserSettings>>;
103
+ users: Record<string, AVSettings.StoredUserSettings>;
115
104
  };
116
105
 
117
106
  static DEFAULT_WORLD_SETTINGS: {
118
107
  /**
119
108
  * @defaultValue `AVSettings.AV_MODES.DISABLED`
120
109
  */
121
- mode: AVSettings.VoiceMode;
122
-
123
- server: {
124
- /**
125
- * @defaultValue `'FVTT'`
126
- */
127
- type: string;
128
-
129
- /**
130
- * @defaultValue `""`
131
- */
132
- url: string;
133
-
134
- /**
135
- * @defaultValue `""`
136
- */
137
- room: string;
138
-
139
- /**
140
- * @defaultValue `""`
141
- */
142
- username: string;
143
-
144
- /**
145
- * @defaultValue `""`
146
- */
147
- password: string;
148
- };
110
+ mode: AVSettings.AV_MODES;
149
111
 
150
112
  turn: {
151
113
  /**
@@ -217,6 +179,11 @@ declare class AVSettings {
217
179
  blocked: boolean;
218
180
  };
219
181
 
182
+ /**
183
+ * Stores the transient AV activity data received from other users.
184
+ */
185
+ activity: Record<string, AVSettingsData>;
186
+
220
187
  initialize(): void;
221
188
 
222
189
  changed(): void;
@@ -243,6 +210,11 @@ declare class AVSettings {
243
210
  * @internal
244
211
  */
245
212
  protected _onSettingsChanged(): void;
213
+
214
+ /**
215
+ * Handle another connected user changing their AV settings.
216
+ */
217
+ handleUserActivity(userId: string, settings: AVSettingsData): void;
246
218
  }
247
219
 
248
220
  declare namespace AVSettings {
@@ -259,5 +231,6 @@ declare namespace AVSettings {
259
231
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
260
232
  interface Overrides {}
261
233
  type VoiceModes = PropertyTypeOrFallback<AVSettings.Overrides, 'VoiceModes', DefaultVoiceModes>;
262
- type VoiceMode = ValueOf<VoiceModes>;
234
+ type VOICE_MODES = ValueOf<VoiceModes>;
235
+ type AV_MODES = ValueOf<typeof AVSettings.AV_MODES>;
263
236
  }
@@ -124,9 +124,6 @@ declare global {
124
124
  /** @defaultValue `[]` */
125
125
  values: number[];
126
126
 
127
- /** @defaultValue `0` */
128
- last: number;
129
-
130
127
  /** @defaultValue `0` */
131
128
  average: number;
132
129
 
@@ -135,9 +132,6 @@ declare global {
135
132
 
136
133
  /** @defaultValue `document.getElementById("fps")` */
137
134
  element: HTMLElement;
138
-
139
- /** @defaultValue `undefined` */
140
- fn: TickerCallback<void> | undefined;
141
135
  };
142
136
 
143
137
  /**
@@ -541,8 +535,6 @@ declare global {
541
535
  }
542
536
  }
543
537
 
544
- type TickerCallback<T> = (this: T, dt: number) => any;
545
-
546
538
  interface PerformanceSettings {
547
539
  mode: foundry.CONST.CANVAS_PERFORMANCE_MODES;
548
540
  blur: {
@@ -69,6 +69,7 @@ declare global {
69
69
  * Handle a SocketResponse from the server when one or multiple documents were created
70
70
  * @param response - The provided Socket response
71
71
  * @returns An Array of created Document instances
72
+ * @internal
72
73
  */
73
74
  protected _handleCreateDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
74
75
 
@@ -76,6 +77,7 @@ declare global {
76
77
  * Handle a SocketResponse from the server when one or multiple documents were created
77
78
  * @param response - The provided Socket response
78
79
  * @returns An Array of created Document instances
80
+ * @internal
79
81
  */
80
82
  protected _handleCreateEmbeddedDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
81
83
 
@@ -125,6 +127,7 @@ declare global {
125
127
  * Handle a SocketResponse from the server when one or multiple documents were updated
126
128
  * @param response - The provided Socket response
127
129
  * @returns An Array of updated Document instances
130
+ * @internal
128
131
  */
129
132
  protected _handleUpdateDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
130
133
 
@@ -132,6 +135,7 @@ declare global {
132
135
  * Handle a SocketResponse from the server when embedded Documents are updated in a parent Document.
133
136
  * @param response - The provided Socket response
134
137
  * @returns An Array of updated Document instances
138
+ * @internal
135
139
  */
136
140
  protected _handleUpdateEmbeddedDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
137
141
 
@@ -178,6 +182,7 @@ declare global {
178
182
  * Handle a SocketResponse from the server where Documents are deleted.
179
183
  * @param response - The provided Socket response
180
184
  * @returns An Array of deleted Document instances
185
+ * @internal
181
186
  */
182
187
  protected _handleDeleteDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
183
188
 
@@ -185,6 +190,7 @@ declare global {
185
190
  * Handle a SocketResponse from the server when embedded Documents are deleted from a parent Document.
186
191
  * @param response - The provided Socket response
187
192
  * @returns An Array of deleted Document instances
193
+ * @internal
188
194
  */
189
195
  protected _handleDeleteEmbeddedDocuments(response: SocketResponse): foundry.abstract.Document<any, any>[];
190
196
 
@@ -320,7 +320,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
320
320
  | (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
321
321
  >
322
322
  | undefined,
323
- context?: (Pick<DocumentModificationContext, 'parent' | 'pack'> & Partial<Dialog.Options>) | undefined
323
+ context?: (Pick<DocumentModificationContext, 'parent' | 'pack'> & Partial<DialogOptions>) | undefined
324
324
  ): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
325
325
 
326
326
  /**
@@ -329,7 +329,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
329
329
  * (default: `{}`)
330
330
  * @returns A Promise which resolves to the deleted Document
331
331
  */
332
- deleteDialog(options?: Partial<Dialog.Options> | undefined): Promise<this | false | null | undefined>;
332
+ deleteDialog(options?: Partial<DialogOptions> | undefined): Promise<this | false | null | undefined>;
333
333
 
334
334
  /**
335
335
  * Export document data to a JSON file which can be saved by the client and later imported into a different session.
@@ -377,8 +377,8 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
377
377
  * @returns A data object of cleaned data suitable for compendium import
378
378
  */
379
379
  toCompendium(
380
- pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
381
- options?: ClientDocumentMixin.CompendiumExportOptions
380
+ pack?: CompendiumCollection<CompendiumCollection.Metadata> | null | undefined,
381
+ options?: ClientDocumentMixin.CompendiumExportOptions | undefined
382
382
  ): Omit<T['data']['_source'], '_id' | 'folder' | 'permission'> & {
383
383
  permission?: T['data']['_source']['permission'];
384
384
  };
@@ -31,6 +31,11 @@ declare global {
31
31
  */
32
32
  protected _sheet: FormApplication | null; // TODO: Actually an ActiveEffectConfig according to foundry but this is a problem with ClientDocumentMixins _sheet, this should actually be inferred from the CONFIG
33
33
 
34
+ /**
35
+ * Is there some system logic that makes this active effect ineligible for application?
36
+ */
37
+ get isSuppressed(): boolean;
38
+
34
39
  /**
35
40
  * Summarize the active effect duration
36
41
  */
@@ -63,12 +68,6 @@ declare global {
63
68
  */
64
69
  get sourceName(): string;
65
70
 
66
- /**
67
- * An instance of the ActiveEffectConfig sheet to use for this ActiveEffect instance.
68
- * The reference to the sheet is cached so the same sheet instance is reused.
69
- */
70
- get sheet(): FormApplication; // TODO: Actually an ActiveEffectConfig according to foundry but this is a problem with ClientDocumentMixin's sheet, this should actually be inferred from the CONFIG
71
-
72
71
  /**
73
72
  * Apply this ActiveEffect to a provided Actor.
74
73
  * @param actor - The Actor to whom this effect should be applied
@@ -138,6 +137,29 @@ declare global {
138
137
  options: DocumentModificationOptions,
139
138
  user: foundry.documents.BaseUser
140
139
  ): Promise<void>;
140
+
141
+ /** @override */
142
+ protected _onCreate(
143
+ data: foundry.data.ActiveEffectData['_source'],
144
+ options: DocumentModificationOptions,
145
+ userId: string
146
+ ): void;
147
+
148
+ /** @override */
149
+ protected _onUpdate(
150
+ data: DeepPartial<foundry.data.ActiveEffectData['_source']>,
151
+ options: DocumentModificationOptions,
152
+ userId: string
153
+ ): void;
154
+
155
+ /** @override */
156
+ protected _onDelete(options: DocumentModificationOptions, userId: string): void;
157
+
158
+ /**
159
+ * Display changes to active effects as scrolling Token status text.
160
+ * @internal
161
+ */
162
+ protected _displayScrollingStatus(enabled: boolean): void;
141
163
  }
142
164
  }
143
165