@league-of-foundry-developers/foundry-vtt-types 9.249.3 → 9.255.1
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 +120 -8
- 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/formApplications/documentSheets/actorSheet.d.ts +8 -6
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/notifications.d.ts +2 -5
- 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 +2 -2
- 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 +2 -1
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +22 -20
- 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/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 +3 -1
- 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/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/ambientSound.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +3 -0
- 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
@@ -52,22 +52,19 @@ declare global {
|
|
52
52
|
get parentFolder(): Folder | null;
|
53
53
|
|
54
54
|
/**
|
55
|
-
*
|
56
|
-
|
57
|
-
get type(): this['data']['type'];
|
58
|
-
|
59
|
-
/**
|
60
|
-
* Create a new Folder by rendering a dialog window to provide basic creation details
|
55
|
+
* Present a Dialog form to create a new Folder.
|
56
|
+
* @see {@link ClientDocumentMixin.createDialog}
|
61
57
|
* @param data - Initial data with which to populate the creation form
|
62
|
-
* @param options - Initial positioning and sizing options for the dialog form
|
63
58
|
* (default: `{}`)
|
64
|
-
* @
|
59
|
+
* @param context - Additional context options or dialog positioning options
|
60
|
+
* (default: `{}`)
|
61
|
+
* @returns A Promise which resolves to the created Folder, or null if the dialog was closed.
|
65
62
|
*
|
66
63
|
* @remarks
|
67
|
-
* The documented return type is incorrect. It now returns a promise that resolves to the
|
68
|
-
* created folder as intended. See https://gitlab.com/foundrynet/foundryvtt/-/issues/6619
|
69
|
-
*
|
70
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.
|
71
68
|
*/
|
72
69
|
static createDialog<T extends DocumentConstructor>(
|
73
70
|
this: T,
|
@@ -77,18 +74,21 @@ declare global {
|
|
77
74
|
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
78
75
|
>
|
79
76
|
| undefined,
|
80
|
-
|
77
|
+
context?: any
|
81
78
|
): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
|
82
79
|
|
83
80
|
/**
|
84
81
|
* Export all Documents contained in this Folder to a given Compendium pack.
|
85
82
|
* Optionally update existing Documents within the Pack by name, otherwise append all new entries.
|
86
|
-
* @param
|
87
|
-
* @param
|
88
|
-
*
|
83
|
+
* @param pack - A Compendium pack to which the documents will be exported
|
84
|
+
* @param options - Additional options which customize how content is exported. See {@link ClientDocumentMixin#toCompendium}
|
85
|
+
* (default: `{}`)
|
89
86
|
* @returns The updated Compendium Collection instance
|
90
87
|
*/
|
91
|
-
exportToCompendium
|
88
|
+
exportToCompendium<Metadata extends CompendiumCollection.Metadata>(
|
89
|
+
pack: CompendiumCollection<Metadata>,
|
90
|
+
options?: Folder.ExportToCompendiumOptions | undefined
|
91
|
+
): Promise<CompendiumCollection<Metadata>>;
|
92
92
|
|
93
93
|
/**
|
94
94
|
* Provide a dialog form that allows for exporting the contents of a Folder into an eligible Compendium pack.
|
@@ -108,10 +108,12 @@ declare global {
|
|
108
108
|
getSubfolders(recursive?: boolean): InstanceType<ConfiguredDocumentClass<typeof Folder>>[];
|
109
109
|
|
110
110
|
protected _onDelete(options: DocumentModificationOptions, userId: string): void;
|
111
|
+
}
|
111
112
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
namespace Folder {
|
114
|
+
interface ExportToCompendiumOptions {
|
115
|
+
/** Update existing entries in the Compendium pack, matching by name */
|
116
|
+
updateByName?: boolean | undefined;
|
117
|
+
}
|
116
118
|
}
|
117
119
|
}
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
2
|
-
import type { ItemDataConstructorData } from '../../common/data/data.mjs/itemData';
|
3
2
|
|
4
3
|
declare global {
|
5
4
|
/**
|
@@ -24,6 +23,11 @@ declare global {
|
|
24
23
|
*/
|
25
24
|
get img(): this['data']['img'];
|
26
25
|
|
26
|
+
/**
|
27
|
+
* Provide a thumbnail image path used to represent this document.
|
28
|
+
*/
|
29
|
+
get thumbnail(): this['data']['img'];
|
30
|
+
|
27
31
|
/**
|
28
32
|
* A convenience alias of Item#isEmbedded which is preserves legacy support
|
29
33
|
*/
|
@@ -35,19 +39,11 @@ declare global {
|
|
35
39
|
*/
|
36
40
|
get transferredEffects(): ReturnType<this['effects']['filter']>;
|
37
41
|
|
38
|
-
/**
|
39
|
-
* A convenience reference to the item type (data.type) of this Item
|
40
|
-
*/
|
41
|
-
get type(): this['data']['type'];
|
42
|
-
|
43
42
|
/**
|
44
43
|
* Prepare a data object which defines the data schema used by dice roll commands against this Item
|
45
44
|
*/
|
46
45
|
getRollData(): object;
|
47
46
|
|
48
|
-
/** @override */
|
49
|
-
protected _getSheetClass(): typeof ItemSheet | null;
|
50
|
-
|
51
47
|
/** @override */
|
52
48
|
protected static _onCreateDocuments(
|
53
49
|
items: Array<InstanceType<ConfiguredDocumentClass<typeof Item>>>,
|
@@ -59,19 +55,5 @@ declare global {
|
|
59
55
|
items: Array<InstanceType<ConfiguredDocumentClass<typeof Item>>>,
|
60
56
|
context: DocumentModificationContext
|
61
57
|
): Promise<unknown>;
|
62
|
-
|
63
|
-
/**
|
64
|
-
* You are referencing Item#_data which has been deprecated in favor of Item#data#_source. Support for this reference will be removed in 0.9.0
|
65
|
-
* @deprecated since 0.8.0
|
66
|
-
*/
|
67
|
-
get _data(): this['data']['_source'];
|
68
|
-
|
69
|
-
/**
|
70
|
-
* @deprecated since 0.8.1
|
71
|
-
*/
|
72
|
-
static createOwned(
|
73
|
-
itemData: ItemDataConstructorData | (ItemDataConstructorData & Record<string, unknown>),
|
74
|
-
actor: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseActor>>
|
75
|
-
): InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseItem>>;
|
76
58
|
}
|
77
59
|
}
|
@@ -15,6 +15,16 @@ declare global {
|
|
15
15
|
*/
|
16
16
|
get isAuthor(): boolean;
|
17
17
|
|
18
|
+
/**
|
19
|
+
* Test whether the current user is capable of executing a Macro script
|
20
|
+
*/
|
21
|
+
get canExecute(): boolean;
|
22
|
+
|
23
|
+
/**
|
24
|
+
* Provide a thumbnail image path used to represent this document.
|
25
|
+
*/
|
26
|
+
get thumbnail(): string | null;
|
27
|
+
|
18
28
|
/**
|
19
29
|
* Execute the Macro command.
|
20
30
|
* @param scope - Provide some additional scope configuration for the Macro
|
@@ -4,7 +4,7 @@ import type { DocumentModificationOptions } from '../../common/abstract/document
|
|
4
4
|
declare global {
|
5
5
|
/**
|
6
6
|
* The client-side PlaylistSound document which extends the common BasePlaylistSound model.
|
7
|
-
* Each PlaylistSound belongs to the sounds collection of a Playlist
|
7
|
+
* Each PlaylistSound belongs to the sounds collection of a Playlist document.
|
8
8
|
* Each PlaylistSound contains a PlaylistSoundData object which provides its source data.
|
9
9
|
*
|
10
10
|
* @see {@link foundry.data.PlaylistSoundData} The PlaylistSound data schema
|
@@ -1,15 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import type { PrototypeTokenDataConstructorData } from '../../common/data/data.mjs/prototypeTokenData';
|
2
|
+
|
3
|
+
declare global {
|
4
|
+
/**
|
5
|
+
* An extended Document definition used specifically
|
6
|
+
* This ensures that the PrototypeTokenData schema is used instead of the standard TokenData.
|
7
|
+
* This exists specifically for prototype Token configuration in the TokenConfig app and should not be used otherwise.
|
8
|
+
* @internal
|
9
|
+
* @remarks The types for this are incorrect, in particular everything related to the data should use
|
10
|
+
* {@link foundry.data.PrototypeTokenData} instead of {@link foundry.data.TokenData}. However, with the current approach
|
11
|
+
* to type documents, we don't see a way to do this. This class is just added for reference. As the documentation above
|
12
|
+
* says, don't use it (there really shouldn't be a need to do so).
|
13
|
+
*/
|
14
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
15
|
+
// @ts-ignore
|
16
|
+
class PrototypeTokenDocument extends TokenDocument {
|
17
|
+
static get schema(): typeof foundry.data.PrototypeTokenData;
|
18
|
+
|
19
|
+
/** @override */
|
20
|
+
update(
|
21
|
+
data?: DeepPartial<PrototypeTokenDataConstructorData> | undefined,
|
22
|
+
context?: (DocumentModificationContext & foundry.utils.MergeObjectOptions) | undefined
|
23
|
+
): Promise<this | undefined>;
|
24
|
+
}
|
15
25
|
}
|
@@ -20,6 +20,11 @@ declare global {
|
|
20
20
|
context?: ConstructorParameters<typeof foundry.documents.BaseRollTable>[1]
|
21
21
|
);
|
22
22
|
|
23
|
+
/**
|
24
|
+
* Provide a thumbnail image path used to represent this document.
|
25
|
+
*/
|
26
|
+
get thumbnail(): this['data']['img'];
|
27
|
+
|
23
28
|
/**
|
24
29
|
* Display a result drawn from a RollTable in the Chat Log along.
|
25
30
|
* Optionally also display the Roll which produced the result and configure aspects of the displayed messages.
|
@@ -65,6 +70,9 @@ declare global {
|
|
65
70
|
* Note that this function only performs the roll and identifies the result, the RollTable#draw function should be
|
66
71
|
* called to formalize the draw from the table.
|
67
72
|
*
|
73
|
+
* @param options - (default: `{}`)
|
74
|
+
* @returns The Roll and results drawn by that Roll
|
75
|
+
*
|
68
76
|
* @example
|
69
77
|
* ```typescript
|
70
78
|
* // Draw results using the default table formula
|
@@ -75,7 +83,7 @@ declare global {
|
|
75
83
|
* const customResults = await table.roll({roll});
|
76
84
|
* ```
|
77
85
|
*/
|
78
|
-
roll(options?: RollTable.RollOptions): Promise<RollTableDraw>;
|
86
|
+
roll(options?: RollTable.RollOptions | undefined): Promise<RollTableDraw>;
|
79
87
|
|
80
88
|
/**
|
81
89
|
* Get an Array of valid results for a given rolled total
|
@@ -103,28 +111,22 @@ declare global {
|
|
103
111
|
): void;
|
104
112
|
|
105
113
|
/** @override */
|
106
|
-
toCompendium(
|
107
|
-
|
108
|
-
|
109
|
-
> & {
|
114
|
+
toCompendium(
|
115
|
+
pack?: CompendiumCollection<CompendiumCollection.Metadata> | null | undefined,
|
116
|
+
options?: ClientDocumentMixin.CompendiumExportOptions | undefined
|
117
|
+
): Omit<foundry.data.RollTableData['_source'], '_id' | 'folder' | 'permission'> & {
|
110
118
|
permission?: foundry.data.RollTableData extends { toObject(): infer U } ? U : never;
|
111
119
|
};
|
112
120
|
|
113
121
|
/**
|
114
|
-
* Create a new RollTable
|
115
|
-
* @param folder - The Folder
|
122
|
+
* Create a new RollTable document using all of the Documents from a specific Folder as new results.
|
123
|
+
* @param folder - The Folder document from which to create a roll table
|
116
124
|
* @param options - Additional options passed to the RollTable.create method
|
117
125
|
*/
|
118
126
|
static fromFolder(
|
119
127
|
folder: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseFolder>>,
|
120
128
|
options?: DocumentModificationOptions
|
121
129
|
): Promise<InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseRollTable>> | undefined>;
|
122
|
-
|
123
|
-
/**
|
124
|
-
* The RollTable#getTableResult method is deprecated in favor of RollTable#results#get and will be removed in 0.9.0
|
125
|
-
* @deprecated since 0.8.0
|
126
|
-
*/
|
127
|
-
getTableResult(id: string): ReturnType<this['results']['get']>;
|
128
130
|
}
|
129
131
|
|
130
132
|
namespace RollTable {
|
@@ -190,7 +192,7 @@ declare global {
|
|
190
192
|
roll?: Roll;
|
191
193
|
|
192
194
|
/**
|
193
|
-
* If a RollTable
|
195
|
+
* If a RollTable document is drawn as a result, recursively roll it
|
194
196
|
* @defaultValue `true`
|
195
197
|
*/
|
196
198
|
recursive?: boolean;
|
@@ -68,18 +68,23 @@ declare global {
|
|
68
68
|
*/
|
69
69
|
get img(): this['data']['img'];
|
70
70
|
|
71
|
+
/**
|
72
|
+
* Provide a thumbnail image path used to represent this document.
|
73
|
+
*/
|
74
|
+
get thumbnail(): this['data']['thumb'];
|
75
|
+
|
71
76
|
/**
|
72
77
|
* A convenience accessor for whether the Scene is currently viewed
|
73
78
|
*/
|
74
79
|
get isView(): boolean;
|
75
80
|
|
76
81
|
/**
|
77
|
-
* A reference to the JournalEntry
|
82
|
+
* A reference to the JournalEntry document associated with this Scene, or null
|
78
83
|
*/
|
79
84
|
get journal(): InstanceType<ConfiguredDocumentClass<typeof JournalEntry>> | null;
|
80
85
|
|
81
86
|
/**
|
82
|
-
* A reference to the Playlist
|
87
|
+
* A reference to the Playlist document for this Scene, or null
|
83
88
|
*/
|
84
89
|
get playlist(): InstanceType<ConfiguredDocumentClass<typeof Playlist>> | null;
|
85
90
|
|
@@ -435,10 +440,10 @@ declare global {
|
|
435
440
|
): void;
|
436
441
|
|
437
442
|
/** @override */
|
438
|
-
toCompendium(
|
439
|
-
|
440
|
-
|
441
|
-
> & {
|
443
|
+
toCompendium(
|
444
|
+
pack?: CompendiumCollection<CompendiumCollection.Metadata> | null | undefined,
|
445
|
+
options?: ClientDocumentMixin.CompendiumExportOptions | undefined
|
446
|
+
): Omit<foundry.data.SceneData['_source'], '_id' | 'folder' | 'permission'> & {
|
442
447
|
permission?: foundry.data.SceneData extends { toObject(): infer U } ? U : never;
|
443
448
|
};
|
444
449
|
|
@@ -451,7 +456,7 @@ declare global {
|
|
451
456
|
}
|
452
457
|
}
|
453
458
|
|
454
|
-
interface ThumbnailCreationData {
|
459
|
+
interface ThumbnailCreationData extends ImageHelper.TextureToImageOptions {
|
455
460
|
/**
|
456
461
|
* A background image to use for thumbnail creation, otherwise the current scene
|
457
462
|
* background is used.
|
@@ -90,7 +90,7 @@ declare global {
|
|
90
90
|
|
91
91
|
/**
|
92
92
|
* Assign a Macro to a numbered hotbar slot between 1 and 50
|
93
|
-
* @param macro - The Macro
|
93
|
+
* @param macro - The Macro document to assign
|
94
94
|
* @param slot - A specific numbered hotbar slot to fill
|
95
95
|
* @param fromSlot - An optional origin slot from which the Macro is being shifted
|
96
96
|
* @returns A Promise which resolves once the User update is complete
|
@@ -120,7 +120,7 @@ declare global {
|
|
120
120
|
broadcastActivity(activityData?: ActivityData): void;
|
121
121
|
|
122
122
|
/**
|
123
|
-
* Get an Array of Macro
|
123
|
+
* Get an Array of Macro Documents on this User's Hotbar by page
|
124
124
|
* @param page - The hotbar page number
|
125
125
|
* (default: `1`)
|
126
126
|
*/
|
@@ -145,16 +145,6 @@ declare global {
|
|
145
145
|
/** @override */
|
146
146
|
_onDelete(options: DocumentModificationOptions, userId: string): void;
|
147
147
|
|
148
|
-
/**
|
149
|
-
* @deprecated since 0.8.0
|
150
|
-
*/
|
151
|
-
isRole(role: Parameters<User['hasRole']>[0]): boolean;
|
152
|
-
|
153
|
-
/**
|
154
|
-
* @deprecated since 0.8.0
|
155
|
-
*/
|
156
|
-
setPermission(permission: keyof typeof CONST.USER_PERMISSIONS, allowed: boolean): Promise<this>;
|
157
|
-
|
158
148
|
/** @remarks This property is set by PlayerList.getData() */
|
159
149
|
charname?: string;
|
160
150
|
|