@league-of-foundry-developers/foundry-vtt-types 9.255.3 → 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.
- package/README.md +5 -4
- package/package.json +3 -2
- package/src/foundry/common/data/data.mjs/index.d.ts +0 -1
- package/src/foundry/common/utils/helpers.mjs.d.ts +1 -0
- package/src/foundry/foundry.js/application.d.ts +0 -1
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/compendium.d.ts +20 -11
- package/src/foundry/foundry.js/applications/controlsReference.d.ts +17 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +67 -75
- package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -4
- package/src/foundry/foundry.js/applications/formApplications/{entitySheetConfig.d.ts → documentSheetConfig.d.ts} +36 -19
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +2 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardConfig.d.ts +51 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfig.d.ts +88 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsHand.d.ts +20 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/cardsPile.d.ts +20 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/cardsConfigs/index.d.ts +2 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +2 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +17 -11
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +3 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +3 -9
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +10 -12
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +4 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +2 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +8 -12
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +2 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +10 -11
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +28 -15
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +1 -4
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +17 -21
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +40 -7
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +10 -24
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +15 -3
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +23 -16
- package/src/foundry/foundry.js/applications/formApplications/{defaultTokenConfig.d.ts → tokenConfigs/defaultTokenConfig.d.ts} +29 -16
- package/src/foundry/foundry.js/applications/formApplications/tokenConfigs/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +22 -15
- package/src/foundry/foundry.js/applications/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/invitationLinks.d.ts +25 -10
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +65 -38
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +17 -3
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +19 -16
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/actorDirectory.d.ts +0 -3
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +4 -18
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +2 -8
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +38 -5
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -1
- package/src/foundry/foundry.js/applications/supportDetails.d.ts +78 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +8 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +87 -49
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +2 -6
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +6 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +2 -2
- package/src/foundry/foundry.js/config.d.ts +21 -21
- package/src/foundry/foundry.js/contextMenu.d.ts +37 -28
- package/src/foundry/foundry.js/game.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayer.d.ts +2 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/controlsLayer.d.ts +49 -48
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayer.d.ts +51 -40
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/lightingLayer.d.ts +63 -20
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayer.d.ts +0 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +4 -4
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +21 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/notesLayer.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/soundsLayer.d.ts +10 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/tokenLayer.d.ts +41 -20
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +50 -121
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/sightLayer.d.ts +125 -107
- package/src/foundry/foundry.js/pixi/containers/controlIcon.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +11 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +34 -27
- package/src/foundry/foundry.js/pixi/filters/abstractFilter.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/fogColorFilter.d.ts +16 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/forceColorFilter.d.ts +17 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/glowFilter.d.ts +31 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/index.d.ts +4 -0
- package/src/foundry/foundry.js/pixi/filters/abstractFilters/roofMaskFilter.d.ts +20 -0
- package/src/foundry/foundry.js/pixi/filters/index.d.ts +2 -0
- package/src/foundry/foundry.js/roll.d.ts +2 -2
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +5 -0
- package/src/types/augments/index.d.ts +2 -0
- package/src/types/augments/pixiGraphicsSmooth.d.ts +7 -0
- package/src/types/augments/pixiLegacyGraphics.d.ts +7 -0
@@ -0,0 +1,78 @@
|
|
1
|
+
/**
|
2
|
+
* Support Info and Report
|
3
|
+
* @typeParam Options - the type of the options object
|
4
|
+
* @typeParam Data - The data structure used to render the handlebars template.
|
5
|
+
*/
|
6
|
+
declare class SupportDetails<
|
7
|
+
Options extends ApplicationOptions = ApplicationOptions,
|
8
|
+
Data extends object = SupportDetails.Data
|
9
|
+
> extends Application<Options> {
|
10
|
+
/**
|
11
|
+
* @override
|
12
|
+
* @defaultValue
|
13
|
+
* ```typescript
|
14
|
+
* const options = super.defaultOptions;
|
15
|
+
* options.title = "SUPPORT.Title";
|
16
|
+
* options.id = "support-details";
|
17
|
+
* options.template = "templates/sidebar/apps/support-details.html";
|
18
|
+
* options.width = 620;
|
19
|
+
* options.height = "auto";
|
20
|
+
* return options;
|
21
|
+
* ```
|
22
|
+
*/
|
23
|
+
static get defaultOptions(): ApplicationOptions;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* Returns the support report data
|
27
|
+
*/
|
28
|
+
getData(options?: Partial<Options> | undefined): Data | Promise<Data>;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* @override
|
32
|
+
* Binds the Support Report copy button
|
33
|
+
*/
|
34
|
+
activateListeners(html: JQuery): void;
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Collects a number of metrics that is useful for Support
|
38
|
+
*/
|
39
|
+
static generateSupportReport(): SupportReportData;
|
40
|
+
|
41
|
+
/**
|
42
|
+
* Get a WebGL renderer information string
|
43
|
+
* @param gl - The rendering context
|
44
|
+
* @returns The unmasked renderer string
|
45
|
+
*/
|
46
|
+
static getWebGLRendererInfo(gl: WebGLRenderingContext): string;
|
47
|
+
}
|
48
|
+
|
49
|
+
interface SupportReportData {
|
50
|
+
coreVersion: number;
|
51
|
+
systemVersion: string;
|
52
|
+
activeModuleCount: number;
|
53
|
+
os: string;
|
54
|
+
client: string;
|
55
|
+
gpu: string;
|
56
|
+
maxTextureSize: number | string;
|
57
|
+
sceneDimensions: string;
|
58
|
+
grid: number;
|
59
|
+
padding: number;
|
60
|
+
walls: number;
|
61
|
+
lights: number;
|
62
|
+
sounds: number;
|
63
|
+
tiles: number;
|
64
|
+
tokens: number;
|
65
|
+
actors: number;
|
66
|
+
items: number;
|
67
|
+
journals: number;
|
68
|
+
tables: number;
|
69
|
+
playlists: number;
|
70
|
+
packs: number;
|
71
|
+
messages: number;
|
72
|
+
}
|
73
|
+
|
74
|
+
declare namespace SupportDetails {
|
75
|
+
interface Data {
|
76
|
+
report: SupportReportData;
|
77
|
+
}
|
78
|
+
}
|
@@ -30,6 +30,11 @@ declare global {
|
|
30
30
|
*/
|
31
31
|
get drawnCards(): InstanceType<ConfiguredDocumentClassForName<'Card'>>[];
|
32
32
|
|
33
|
+
/**
|
34
|
+
* Returns the localized Label for the type of Card Stack this is
|
35
|
+
*/
|
36
|
+
get typeLabel(): string;
|
37
|
+
|
33
38
|
/** @override */
|
34
39
|
static createDocuments(
|
35
40
|
data: Array<
|
@@ -182,6 +187,9 @@ declare global {
|
|
182
187
|
userId: string
|
183
188
|
): void;
|
184
189
|
|
190
|
+
/** @override */
|
191
|
+
protected _preDelete(options: DocumentModificationOptions, user: foundry.documents.BaseUser): Promise<void>;
|
192
|
+
|
185
193
|
// TODO: It's a bit weird that we have to do it in this generic way but otherwise there is an error overriding this. Investigate later.
|
186
194
|
/** @override */
|
187
195
|
static deleteDocuments<T extends DocumentConstructor>(
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
|
+
import { ConfiguredDocumentClass, ConfiguredObjectClassForName, ToObjectFalseType } from '../../../types/helperTypes';
|
2
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
3
3
|
import type { ChatMessageDataConstructorData } from '../../common/data/data.mjs/chatMessageData';
|
4
4
|
|
@@ -13,17 +13,26 @@ declare global {
|
|
13
13
|
* @param data - Initial data provided to construct the ChatMessage document
|
14
14
|
*/
|
15
15
|
class ChatMessage extends ClientDocumentMixin(foundry.documents.BaseChatMessage) {
|
16
|
-
constructor(
|
17
|
-
data?: ConstructorParameters<ConstructorOf<foundry.documents.BaseChatMessage>>[0],
|
18
|
-
context?: ConstructorParameters<ConstructorOf<foundry.documents.BaseChatMessage>>[1]
|
19
|
-
);
|
20
|
-
|
21
16
|
/**
|
22
|
-
*
|
17
|
+
* The cached Roll instance that this message contains, if any
|
23
18
|
* @defaultValue `null`
|
19
|
+
* @internal
|
24
20
|
*/
|
25
21
|
protected _roll: Roll | null;
|
26
22
|
|
23
|
+
/**
|
24
|
+
* Is the display of the roll in this message collapsed (false) or expanded (true)
|
25
|
+
* @defaultValue `false`
|
26
|
+
* @internal
|
27
|
+
*/
|
28
|
+
protected _rollExpanded: boolean;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Is this ChatMessage currently displayed in the sidebar ChatLog?
|
32
|
+
* @defaultValue `false`
|
33
|
+
*/
|
34
|
+
logged: boolean;
|
35
|
+
|
27
36
|
/**
|
28
37
|
* Return the recommended String alias for this message.
|
29
38
|
* The alias could be a Token name in the case of in-character messages or dice rolls.
|
@@ -61,7 +70,7 @@ declare global {
|
|
61
70
|
/**
|
62
71
|
* The User who created the chat message.
|
63
72
|
*/
|
64
|
-
get user(): User | undefined;
|
73
|
+
get user(): InstanceType<ConfiguredDocumentClass<typeof User>> | undefined;
|
65
74
|
|
66
75
|
/** @override */
|
67
76
|
prepareData(): void;
|
@@ -87,44 +96,32 @@ declare global {
|
|
87
96
|
* Attempt to determine who is the speaking character (and token) for a certain Chat Message
|
88
97
|
* First assume that the currently controlled Token is the speaker
|
89
98
|
*
|
90
|
-
* @param
|
91
|
-
* @param actor - The Actor whom is speaking
|
92
|
-
* @param token - The Token whom is speaking
|
93
|
-
* @param alias - The name of the speaker to display
|
99
|
+
* @param options - (default: `{}`)
|
94
100
|
*
|
95
101
|
* @returns The identified speaker data
|
96
102
|
*/
|
97
|
-
static getSpeaker(
|
98
|
-
|
99
|
-
|
100
|
-
token,
|
101
|
-
alias
|
102
|
-
}?: {
|
103
|
-
scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>> | undefined;
|
104
|
-
actor?: InstanceType<ConfiguredDocumentClass<typeof Actor>> | undefined;
|
105
|
-
token?: InstanceType<ConfiguredDocumentClass<typeof TokenDocument>> | undefined;
|
106
|
-
alias?: string | undefined;
|
107
|
-
}): foundry.data.ChatMessageData['speaker']['_source'];
|
103
|
+
static getSpeaker(
|
104
|
+
options?: ChatMessage.GetSpeakerOptions | undefined
|
105
|
+
): foundry.data.ChatMessageData['speaker']['_source'];
|
108
106
|
|
109
107
|
/**
|
110
108
|
* A helper to prepare the speaker object based on a target TokenDocument
|
111
109
|
*
|
112
|
-
* @param token - The TokenDocument of the speaker
|
113
|
-
* @param alias - The name of the speaker to display
|
114
110
|
* @returns The identified speaker data
|
115
111
|
*/
|
116
112
|
protected static _getSpeakerFromToken({
|
117
113
|
token,
|
118
114
|
alias
|
119
115
|
}: {
|
120
|
-
|
121
|
-
|
116
|
+
/** The TokenDocument of the speaker */
|
117
|
+
token: InstanceType<ConfiguredDocumentClass<typeof TokenDocument>>;
|
118
|
+
|
119
|
+
/** The name of the speaker to display */
|
120
|
+
alias?: string | undefined;
|
122
121
|
}): foundry.data.ChatMessageData['speaker']['_source'];
|
123
122
|
/**
|
124
123
|
* A helper to prepare the speaker object based on a target TokenDocument
|
125
124
|
*
|
126
|
-
* @param token - The TokenDocument of the speaker
|
127
|
-
* @param alias - The name of the speaker to display
|
128
125
|
* @returns The identified speaker data
|
129
126
|
* @deprecated Passing a Token is deprecated, a TokenDocument should be passed instead
|
130
127
|
*/
|
@@ -132,16 +129,16 @@ declare global {
|
|
132
129
|
token,
|
133
130
|
alias
|
134
131
|
}: {
|
135
|
-
|
136
|
-
|
132
|
+
/** The TokenDocument of the speaker */
|
133
|
+
token: InstanceType<ConfiguredObjectClassForName<'Token'>>;
|
134
|
+
|
135
|
+
/** The name of the speaker to display */
|
136
|
+
alias?: string | undefined;
|
137
137
|
}): foundry.data.ChatMessageData['speaker']['_source'];
|
138
138
|
|
139
139
|
/**
|
140
140
|
* A helper to prepare the speaker object based on a target Actor
|
141
141
|
*
|
142
|
-
* @param scene - The Scene is which the speaker resides
|
143
|
-
* @param actor - The Actor that is speaking
|
144
|
-
* @param alias - The name of the speaker to display
|
145
142
|
* @returns The identified speaker data
|
146
143
|
*/
|
147
144
|
protected static _getSpeakerFromActor({
|
@@ -149,17 +146,19 @@ declare global {
|
|
149
146
|
actor,
|
150
147
|
alias
|
151
148
|
}: {
|
152
|
-
|
149
|
+
/** The Scene is which the speaker resides */
|
150
|
+
scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>> | undefined;
|
151
|
+
|
152
|
+
/** The Actor that is speaking */
|
153
153
|
actor: InstanceType<ConfiguredDocumentClass<typeof Actor>>;
|
154
|
-
|
154
|
+
|
155
|
+
/** The name of the speaker to display */
|
156
|
+
alias?: string | undefined;
|
155
157
|
}): foundry.data.ChatMessageData['speaker']['_source'];
|
156
158
|
|
157
159
|
/**
|
158
160
|
* A helper to prepare the speaker object based on a target User
|
159
161
|
*
|
160
|
-
* @param scene - The Scene in which the speaker resides
|
161
|
-
* @param user - The User who is speaking
|
162
|
-
* @param alias - The name of the speaker to display
|
163
162
|
* @returns The identified speaker data
|
164
163
|
*/
|
165
164
|
protected static _getSpeakerFromUser({
|
@@ -167,21 +166,28 @@ declare global {
|
|
167
166
|
user,
|
168
167
|
alias
|
169
168
|
}: {
|
170
|
-
|
169
|
+
/** The Scene in which the speaker resides */
|
170
|
+
scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>> | undefined;
|
171
|
+
|
172
|
+
/** The User who is speaking */
|
171
173
|
user: InstanceType<ConfiguredDocumentClass<typeof User>>;
|
172
|
-
|
174
|
+
|
175
|
+
/** The name of the speaker to display */
|
176
|
+
alias?: string | undefined;
|
173
177
|
}): foundry.data.ChatMessageData['speaker']['_source'];
|
174
178
|
|
175
179
|
/**
|
176
180
|
* Obtain an Actor instance which represents the speaker of this message (if any)
|
177
181
|
* @param speaker - The speaker data object
|
178
182
|
*/
|
179
|
-
static getSpeakerActor(
|
183
|
+
static getSpeakerActor(
|
184
|
+
speaker: foundry.data.ChatMessageData['speaker']['_source']
|
185
|
+
): InstanceType<ConfiguredDocumentClass<typeof Actor>> | null;
|
180
186
|
|
181
187
|
/**
|
182
188
|
* Obtain a data object used to evaluate any dice rolls associated with this particular chat message
|
183
189
|
*/
|
184
|
-
getRollData():
|
190
|
+
getRollData(): object;
|
185
191
|
|
186
192
|
/**
|
187
193
|
* Given a string whisper target, return an Array of the user IDs which should be targeted for the whisper
|
@@ -196,35 +202,67 @@ declare global {
|
|
196
202
|
*/
|
197
203
|
getHTML(): Promise<JQuery>;
|
198
204
|
|
205
|
+
/**
|
206
|
+
* Render the inner HTML content for ROLL type messages.
|
207
|
+
* @param messageData - The chat message data used to render the message HTML
|
208
|
+
* @internal
|
209
|
+
*/
|
210
|
+
protected _renderRollContent(messageData: ChatMessage.MessageData): Promise<void>;
|
211
|
+
|
199
212
|
/** @override */
|
200
|
-
_preCreate(
|
213
|
+
protected _preCreate(
|
201
214
|
data: ChatMessageDataConstructorData,
|
202
215
|
options: DocumentModificationOptions,
|
203
216
|
user: foundry.documents.BaseUser
|
204
217
|
): Promise<void>;
|
205
218
|
|
206
219
|
/** @override */
|
207
|
-
_onCreate(
|
220
|
+
protected _onCreate(
|
208
221
|
data: foundry.data.ChatMessageData['_source'],
|
209
222
|
options: DocumentModificationOptions,
|
210
223
|
userId: string
|
211
224
|
): void;
|
212
225
|
|
213
226
|
/** @override */
|
214
|
-
_onUpdate(
|
227
|
+
protected _onUpdate(
|
215
228
|
data: DeepPartial<foundry.data.ChatMessageData['_source']>,
|
216
229
|
options: DocumentModificationOptions,
|
217
230
|
userId: string
|
218
231
|
): void;
|
219
232
|
|
220
233
|
/** @override */
|
221
|
-
_onDelete(options: DocumentModificationOptions, userId: string): void;
|
234
|
+
protected _onDelete(options: DocumentModificationOptions, userId: string): void;
|
222
235
|
|
223
236
|
/**
|
224
237
|
* Export the content of the chat message into a standardized log format
|
225
238
|
*/
|
226
239
|
export(): string;
|
227
240
|
}
|
228
|
-
}
|
229
241
|
|
230
|
-
|
242
|
+
namespace ChatMessage {
|
243
|
+
interface GetSpeakerOptions {
|
244
|
+
/** The Scene in which the speaker resides */
|
245
|
+
scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>> | undefined;
|
246
|
+
|
247
|
+
/** The Actor whom is speaking */
|
248
|
+
actor?: InstanceType<ConfiguredDocumentClass<typeof Actor>> | undefined;
|
249
|
+
|
250
|
+
/** The Token whom is speaking */
|
251
|
+
token?: InstanceType<ConfiguredDocumentClass<typeof TokenDocument>> | undefined;
|
252
|
+
|
253
|
+
/** The name of the speaker to display */
|
254
|
+
alias?: string | undefined;
|
255
|
+
}
|
256
|
+
|
257
|
+
interface MessageData {
|
258
|
+
message: ToObjectFalseType<ChatMessage>;
|
259
|
+
user: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof User>>>;
|
260
|
+
author: InstanceType<ConfiguredDocumentClass<typeof User>> | undefined;
|
261
|
+
alias: string;
|
262
|
+
cssClass: string;
|
263
|
+
isWhisper: boolean;
|
264
|
+
canDelete: boolean;
|
265
|
+
whisperTo: string;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
}
|
@@ -60,11 +60,7 @@ declare global {
|
|
60
60
|
* (default: `{}`)
|
61
61
|
* @returns A Promise which resolves to the created Folder, or null if the dialog was closed.
|
62
62
|
*
|
63
|
-
* @remarks
|
64
|
-
* For weird reasons, we need to make this generic.
|
65
|
-
*
|
66
|
-
* The type of `context` is actually `{options?: DocumentSheetOptions} | undefined` but that's incompatible with the
|
67
|
-
* base implementation. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6863.
|
63
|
+
* @remarks For weird reasons, we need to make this generic.
|
68
64
|
*/
|
69
65
|
static createDialog<T extends DocumentConstructor>(
|
70
66
|
this: T,
|
@@ -74,7 +70,7 @@ declare global {
|
|
74
70
|
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
75
71
|
>
|
76
72
|
| undefined,
|
77
|
-
context?:
|
73
|
+
context?: Partial<Omit<FolderConfig.Options, 'resolve'>>
|
78
74
|
): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
|
79
75
|
|
80
76
|
/**
|
@@ -70,6 +70,12 @@ declare global {
|
|
70
70
|
*/
|
71
71
|
sync(): void | Promise<void> | Promise<Sound>;
|
72
72
|
|
73
|
+
override _onCreate(
|
74
|
+
data: foundry.data.PlaylistSoundData['_source'],
|
75
|
+
options: DocumentModificationOptions,
|
76
|
+
userId: string
|
77
|
+
): void;
|
78
|
+
|
73
79
|
/** @override */
|
74
80
|
protected _onUpdate(
|
75
81
|
changed: DeepPartial<foundry.data.PlaylistSoundData['_source']>,
|
@@ -115,7 +115,7 @@ declare global {
|
|
115
115
|
* Actors.registerSheet("dnd5e", ActorSheet5eCharacter, { types: ["character], makeDefault: true });
|
116
116
|
* ```
|
117
117
|
*/
|
118
|
-
static registerSheet(...args: DropFirst<Parameters<typeof
|
118
|
+
static registerSheet(...args: DropFirst<Parameters<typeof DocumentSheetConfig.registerSheet>>): void;
|
119
119
|
|
120
120
|
/**
|
121
121
|
* Unregister a Document sheet class, removing it from the list of available sheet Applications to use.
|
@@ -125,7 +125,7 @@ declare global {
|
|
125
125
|
* @example <caption>Deregister the default ActorSheet subclass to replace it with others.</caption>
|
126
126
|
* Actors.unregisterSheet("core", ActorSheet);
|
127
127
|
*/
|
128
|
-
static unregisterSheet(...args: DropFirst<Parameters<typeof
|
128
|
+
static unregisterSheet(...args: DropFirst<Parameters<typeof DocumentSheetConfig.unregisterSheet>>): void;
|
129
129
|
|
130
130
|
/**
|
131
131
|
* Return an array of currently registered sheet classes for this Document type.
|
@@ -1238,7 +1238,7 @@ declare global {
|
|
1238
1238
|
objectClass: ConfiguredObjectClassOrDefault<typeof AmbientLight>;
|
1239
1239
|
|
1240
1240
|
/** @defaultValue `AmbientLightDocument` */
|
1241
|
-
layerClass:
|
1241
|
+
layerClass: typeof LightingLayer;
|
1242
1242
|
};
|
1243
1243
|
|
1244
1244
|
/**
|
@@ -1252,7 +1252,7 @@ declare global {
|
|
1252
1252
|
objectClass: ConfiguredObjectClassOrDefault<typeof AmbientSound>;
|
1253
1253
|
|
1254
1254
|
/** @defaultValue `SoundsLayer` */
|
1255
|
-
layerClass:
|
1255
|
+
layerClass: typeof SoundsLayer;
|
1256
1256
|
};
|
1257
1257
|
|
1258
1258
|
/**
|
@@ -1274,7 +1274,7 @@ declare global {
|
|
1274
1274
|
objectClass: ConfiguredObjectClassOrDefault<typeof Drawing>;
|
1275
1275
|
|
1276
1276
|
/** @defaultValue `DrawingsLayer` */
|
1277
|
-
layerClass:
|
1277
|
+
layerClass: typeof DrawingsLayer;
|
1278
1278
|
};
|
1279
1279
|
|
1280
1280
|
/**
|
@@ -1310,7 +1310,7 @@ declare global {
|
|
1310
1310
|
objectClass: ConfiguredObjectClassOrDefault<typeof MeasuredTemplate>;
|
1311
1311
|
|
1312
1312
|
/** @defaultValue `TemplateLayer` */
|
1313
|
-
layerClass:
|
1313
|
+
layerClass: typeof TemplateLayer;
|
1314
1314
|
};
|
1315
1315
|
|
1316
1316
|
/**
|
@@ -1324,7 +1324,7 @@ declare global {
|
|
1324
1324
|
objectClass: ConfiguredObjectClassOrDefault<typeof Note>;
|
1325
1325
|
|
1326
1326
|
/** @defaultValue `NotesLayer` */
|
1327
|
-
layerClass:
|
1327
|
+
layerClass: typeof NotesLayer;
|
1328
1328
|
};
|
1329
1329
|
|
1330
1330
|
/**
|
@@ -1338,7 +1338,7 @@ declare global {
|
|
1338
1338
|
objectClass: ConfiguredObjectClassOrDefault<typeof Tile>;
|
1339
1339
|
|
1340
1340
|
/** @defaultValue `BackgroundLayer` */
|
1341
|
-
layerClass:
|
1341
|
+
layerClass: typeof BackgroundLayer;
|
1342
1342
|
};
|
1343
1343
|
|
1344
1344
|
/**
|
@@ -1352,7 +1352,7 @@ declare global {
|
|
1352
1352
|
objectClass: ConfiguredObjectClassOrDefault<typeof Token>;
|
1353
1353
|
|
1354
1354
|
/** @defaultValue `TokenLayer` */
|
1355
|
-
layerClass:
|
1355
|
+
layerClass: typeof TokenLayer;
|
1356
1356
|
|
1357
1357
|
/** @defaultValue `TokenConfig` */
|
1358
1358
|
prototypeSheetClass: ConstructorOf<TokenConfig>;
|
@@ -1369,7 +1369,7 @@ declare global {
|
|
1369
1369
|
objectClass: ConfiguredObjectClassOrDefault<typeof Wall>;
|
1370
1370
|
|
1371
1371
|
/** @defaultValue `WallsLayer` */
|
1372
|
-
layerClass:
|
1372
|
+
layerClass: typeof WallsLayer;
|
1373
1373
|
};
|
1374
1374
|
|
1375
1375
|
/**
|
@@ -1491,43 +1491,43 @@ declare global {
|
|
1491
1491
|
|
1492
1492
|
interface Layers {
|
1493
1493
|
/** @defaultValue `{ layerClass: BackgroundLayer, group: "primary" }` */
|
1494
|
-
background: LayerDefinition<
|
1494
|
+
background: LayerDefinition<typeof BackgroundLayer>;
|
1495
1495
|
|
1496
1496
|
/** @defaultValue `{ layerClass: DrawingsLayer, group: "primary" }` */
|
1497
|
-
drawings: LayerDefinition<
|
1497
|
+
drawings: LayerDefinition<typeof DrawingsLayer>;
|
1498
1498
|
|
1499
1499
|
/** @defaultValue `{ layerClass: GridLayer, group: "primary" }` */
|
1500
|
-
grid: LayerDefinition<
|
1500
|
+
grid: LayerDefinition<typeof GridLayer>;
|
1501
1501
|
|
1502
1502
|
/** @defaultValue `{ layerClass: TemplateLayer, group: "primary" }` */
|
1503
|
-
templates: LayerDefinition<
|
1503
|
+
templates: LayerDefinition<typeof TemplateLayer>;
|
1504
1504
|
|
1505
1505
|
/** @defaultValue `{ layerClass: TokenLayer, group: "primary" }` */
|
1506
|
-
tokens: LayerDefinition<
|
1506
|
+
tokens: LayerDefinition<typeof TokenLayer>;
|
1507
1507
|
|
1508
1508
|
/** @defaultValue `{ layerClass: ForegroundLayer, group: "primary" }` */
|
1509
|
-
foreground: LayerDefinition<
|
1509
|
+
foreground: LayerDefinition<typeof ForegroundLayer>;
|
1510
1510
|
|
1511
1511
|
/** @defaultValue `{ layerClass: WallsLayer, group: "effects" }` */
|
1512
|
-
walls: LayerDefinition<
|
1512
|
+
walls: LayerDefinition<typeof WallsLayer>;
|
1513
1513
|
|
1514
1514
|
/** @defaultValue `{ layerClass: LightingLayer, group: "effects" }` */
|
1515
|
-
lighting: LayerDefinition<
|
1515
|
+
lighting: LayerDefinition<typeof LightingLayer>;
|
1516
1516
|
|
1517
1517
|
/** @defaultValue `{ layerClass: WeatherLayer, group: "effects" }` */
|
1518
|
-
weather: LayerDefinition<
|
1518
|
+
weather: LayerDefinition<typeof WeatherLayer>;
|
1519
1519
|
|
1520
1520
|
/** @defaultValue `{ layerClass: SightLayer, group: "effects" }` */
|
1521
|
-
sight: LayerDefinition<
|
1521
|
+
sight: LayerDefinition<typeof SightLayer>;
|
1522
1522
|
|
1523
1523
|
/** @defaultValue `{ layerClass: SoundsLayer, group: "interface" }` */
|
1524
|
-
sounds: LayerDefinition<
|
1524
|
+
sounds: LayerDefinition<typeof SoundsLayer>;
|
1525
1525
|
|
1526
1526
|
/** @defaultValue `{ layerClass: NotesLayer, group: "interface" }` */
|
1527
|
-
notes: LayerDefinition<
|
1527
|
+
notes: LayerDefinition<typeof NotesLayer>;
|
1528
1528
|
|
1529
1529
|
/** @defaultValue `{ layerClass: ControlsLayer, group: "interface" }` */
|
1530
|
-
controls: LayerDefinition<
|
1530
|
+
controls: LayerDefinition<typeof ControlsLayer>;
|
1531
1531
|
|
1532
1532
|
[key: string]: LayerDefinition;
|
1533
1533
|
}
|
@@ -14,7 +14,7 @@ declare class ContextMenu {
|
|
14
14
|
constructor(
|
15
15
|
element: JQuery,
|
16
16
|
selector: string | null | undefined,
|
17
|
-
menuItems:
|
17
|
+
menuItems: ContextMenuEntry[],
|
18
18
|
{ eventName }?: { eventName?: string }
|
19
19
|
);
|
20
20
|
|
@@ -37,7 +37,7 @@ declare class ContextMenu {
|
|
37
37
|
/**
|
38
38
|
* The array of menu items being rendered
|
39
39
|
*/
|
40
|
-
menuItems:
|
40
|
+
menuItems: ContextMenuEntry[];
|
41
41
|
|
42
42
|
/**
|
43
43
|
* Track which direction the menu is expanded in
|
@@ -50,18 +50,41 @@ declare class ContextMenu {
|
|
50
50
|
*/
|
51
51
|
get menu(): JQuery;
|
52
52
|
|
53
|
+
/**
|
54
|
+
* Create a ContextMenu for this Application and dispatch hooks.
|
55
|
+
* @param app - The Application this ContextMenu belongs to.
|
56
|
+
* @param html - The Application's rendered HTML.
|
57
|
+
* @param selector - The target CSS selector which activates the menu.
|
58
|
+
* @param menuItems - The array of menu items being rendered.
|
59
|
+
* @param hookName - The name of the hook to call.
|
60
|
+
* (default: `'EntryContext'`)
|
61
|
+
*/
|
62
|
+
static create(
|
63
|
+
app: Application,
|
64
|
+
html: JQuery,
|
65
|
+
selector: string,
|
66
|
+
menuItems: ContextMenuEntry[],
|
67
|
+
hookName?: string
|
68
|
+
): ContextMenu;
|
69
|
+
|
53
70
|
/**
|
54
71
|
* Attach a ContextMenu instance to an HTML selector
|
55
72
|
*/
|
56
73
|
bind(): void;
|
57
74
|
|
58
75
|
/**
|
59
|
-
*
|
76
|
+
* Closes the menu and removes it from the DOM.
|
77
|
+
* @param options - Options to configure the closing behavior.
|
60
78
|
*/
|
61
|
-
close(): Promise<void>;
|
79
|
+
close(options?: ContextMenu.CloseOptions | undefined): Promise<void>;
|
80
|
+
|
81
|
+
/** @internal */
|
82
|
+
protected _close(): void;
|
62
83
|
|
84
|
+
/** @internal */
|
63
85
|
protected _animateOpen(menu: JQuery): Promise<void>;
|
64
86
|
|
87
|
+
/** @internal */
|
65
88
|
protected _animateClose(menu: JQuery): Promise<void>;
|
66
89
|
|
67
90
|
/**
|
@@ -80,6 +103,16 @@ declare class ContextMenu {
|
|
80
103
|
static eventListeners(): void;
|
81
104
|
}
|
82
105
|
|
106
|
+
declare namespace ContextMenu {
|
107
|
+
interface CloseOptions {
|
108
|
+
/**
|
109
|
+
* Animate the context menu closing.
|
110
|
+
* @defaultValue `true`
|
111
|
+
*/
|
112
|
+
animate?: boolean;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
83
116
|
interface ContextMenuEntry {
|
84
117
|
/**
|
85
118
|
* The context menu label. Can be localized.
|
@@ -101,27 +134,3 @@ interface ContextMenuEntry {
|
|
101
134
|
*/
|
102
135
|
condition?: boolean | ((target: JQuery) => boolean);
|
103
136
|
}
|
104
|
-
|
105
|
-
declare namespace ContextMenu {
|
106
|
-
interface Item {
|
107
|
-
/**
|
108
|
-
* The displayed item name
|
109
|
-
*/
|
110
|
-
name: string;
|
111
|
-
|
112
|
-
/**
|
113
|
-
* An icon glyph HTML string
|
114
|
-
*/
|
115
|
-
icon: string;
|
116
|
-
|
117
|
-
/**
|
118
|
-
* A function which returns a Boolean for whether or not to display the item
|
119
|
-
*/
|
120
|
-
condition?: boolean | ((target: JQuery) => boolean);
|
121
|
-
|
122
|
-
/**
|
123
|
-
* A callback function to trigger when the entry of the menu is clicked
|
124
|
-
*/
|
125
|
-
callback: (target: JQuery) => void;
|
126
|
-
}
|
127
|
-
}
|
@@ -587,8 +587,8 @@ declare global {
|
|
587
587
|
activeUsers: string[];
|
588
588
|
addresses: {
|
589
589
|
local: string;
|
590
|
-
remote
|
591
|
-
remoteIsAccessible: boolean;
|
590
|
+
remote?: string | undefined;
|
591
|
+
remoteIsAccessible: boolean | null;
|
592
592
|
};
|
593
593
|
coreUpdate: {
|
594
594
|
channel: unknown | null;
|
@@ -53,8 +53,9 @@ declare abstract class CanvasLayer<Options extends CanvasLayerOptions = CanvasLa
|
|
53
53
|
|
54
54
|
/**
|
55
55
|
* Deconstruct data used in the current layer in preparation to re-draw the canvas
|
56
|
+
* @remarks ControlsLayer returns void. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6939
|
56
57
|
*/
|
57
|
-
tearDown(): Promise<this>;
|
58
|
+
tearDown(): Promise<this | void>;
|
58
59
|
|
59
60
|
/**
|
60
61
|
* Activate the CanvasLayer, deactivating other layers and marking this layer's children as interactive.
|