@league-of-foundry-developers/foundry-vtt-types 9.249.4 → 9.255.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/foundry/common/constants.mjs.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +0 -3
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +8 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +7 -1
- package/src/foundry/common/types.mjs.d.ts +125 -10
- package/src/foundry/common/utils/helpers.mjs.d.ts +0 -1
- package/src/foundry/common/utils/http.mjs.d.ts +52 -0
- package/src/foundry/common/utils/module.mjs.d.ts +1 -0
- package/src/foundry/common/utils/primitives.mjs.d.ts +2 -2
- package/src/foundry/common/utils/semaphore.mjs.d.ts +6 -3
- package/src/foundry/foundry.js/applications/dialog.d.ts +14 -29
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +18 -57
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +8 -6
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +23 -12
- package/src/foundry/foundry.js/applications/notifications.d.ts +2 -5
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +16 -1
- package/src/foundry/foundry.js/applications/sidebar.d.ts +7 -0
- package/src/foundry/foundry.js/avClient.d.ts +15 -1
- package/src/foundry/foundry.js/avClients/index.d.ts +0 -1
- package/src/foundry/foundry.js/avClients/simplePeerAVClient.d.ts +31 -4
- package/src/foundry/foundry.js/avMaster.d.ts +21 -48
- package/src/foundry/foundry.js/avSettings.d.ts +19 -46
- package/src/foundry/foundry.js/canvas.d.ts +0 -8
- package/src/foundry/foundry.js/clientDatabaseBackend.d.ts +6 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +4 -4
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +28 -6
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +13 -70
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/tokenDocument.d.ts +42 -9
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +23 -21
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +5 -23
- package/src/foundry/foundry.js/clientDocuments/macro.d.ts +10 -0
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +6 -13
- package/src/foundry/foundry.js/clientDocuments/playlistSound.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/prototypeToken.d.ts +24 -14
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +16 -14
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +12 -7
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +2 -12
- package/src/foundry/foundry.js/clientSettings.d.ts +203 -230
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +4 -2
- package/src/foundry/foundry.js/config.d.ts +3 -0
- package/src/foundry/foundry.js/game.d.ts +1 -1
- package/src/foundry/foundry.js/gamepadManager.d.ts +12 -0
- package/src/foundry/foundry.js/globalVariables.d.ts +0 -31
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +26 -4
- package/src/foundry/foundry.js/mouseInteractionManager.d.ts +1 -1
- package/src/foundry/foundry.js/perceptionManager.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/baseGrid.d.ts +21 -6
- package/src/foundry/foundry.js/pixi/containers/baseGrids/hexagonalGrid.d.ts +13 -8
- package/src/foundry/foundry.js/pixi/containers/baseGrids/squareGrid.d.ts +5 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +14 -5
- package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +9 -55
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientLight.d.ts +27 -6
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/ambientSound.d.ts +29 -4
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/drawing.d.ts +37 -20
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/measuredTemplate.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/note.d.ts +12 -2
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/tile.d.ts +42 -12
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +4 -2
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +31 -17
- package/src/foundry/foundry.js/rollTerms/diceTerms/die.d.ts +0 -5
- package/src/foundry/foundry.js/rollTerms/diceTerms/fateDie.d.ts +21 -1
- package/src/foundry/foundry.js/videoHelper.d.ts +0 -7
- package/src/foundry/index.d.ts +0 -4
- package/src/types/helperTypes.d.ts +6 -0
- package/src/foundry/foundry.js/avClients/easyRTCClient.d.ts +0 -392
- package/src/foundry/foundry.js/features.d.ts +0 -0
- package/src/foundry/foundry.js/fonts.d.ts +0 -24
@@ -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
|
|
@@ -1,249 +1,222 @@
|
|
1
|
-
|
2
|
-
* A class responsible for managing defined game settings or settings menus.
|
3
|
-
* Each setting is a string key/value pair belonging to a certain package and a certain store scope.
|
4
|
-
*
|
5
|
-
* When Foundry Virtual Tabletop is initialized, a singleton instance of this class is constructed within the global
|
6
|
-
* Game object as as game.settings.
|
7
|
-
*
|
8
|
-
* @see {@link Game#settings}
|
9
|
-
* @see {@link Settings}
|
10
|
-
* @see {@link SettingsConfig}
|
11
|
-
*/
|
12
|
-
declare class ClientSettings {
|
13
|
-
constructor(worldSettings?: Setting['data']['_source'][]);
|
1
|
+
import type { DocumentSubTypes, DocumentType } from '../../types/helperTypes';
|
14
2
|
|
15
|
-
|
16
|
-
* A object of registered game settings for this scope
|
17
|
-
*/
|
18
|
-
settings: Map<string, ClientSettings.CompleteSetting>;
|
3
|
+
import type { TokenDataSource } from '../common/data/data.mjs/tokenData';
|
19
4
|
|
5
|
+
declare global {
|
20
6
|
/**
|
21
|
-
*
|
7
|
+
* A class responsible for managing defined game settings or settings menus.
|
8
|
+
* Each setting is a string key/value pair belonging to a certain package and a certain store scope.
|
9
|
+
*
|
10
|
+
* When Foundry Virtual Tabletop is initialized, a singleton instance of this class is constructed within the global
|
11
|
+
* Game object as as game.settings.
|
12
|
+
*
|
13
|
+
* @see {@link Game#settings}
|
14
|
+
* @see {@link Settings}
|
15
|
+
* @see {@link SettingsConfig}
|
22
16
|
*/
|
23
|
-
|
17
|
+
class ClientSettings {
|
18
|
+
constructor(worldSettings?: Setting['data']['_source'][]);
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
*/
|
30
|
-
storage: Map<string, Storage | WorldSettings>;
|
20
|
+
/**
|
21
|
+
* A object of registered game settings for this scope
|
22
|
+
*/
|
23
|
+
settings: Map<string, SettingConfig>;
|
31
24
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
25
|
+
/**
|
26
|
+
* Registered settings menus which trigger secondary applications
|
27
|
+
*/
|
28
|
+
menus: Map<string, SettingSubmenuConfig>;
|
36
29
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
30
|
+
/**
|
31
|
+
* The storage interfaces used for persisting settings
|
32
|
+
* Each storage interface shares the same API as window.localStorage
|
33
|
+
* @remarks This is a lie, it doesn't actually have the same interface...
|
34
|
+
*/
|
35
|
+
storage: Map<string, Storage | WorldSettings>;
|
41
36
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
* @param key - The key name for the setting under the namespace module
|
47
|
-
* @param data - Configuration for setting data
|
48
|
-
* @typeParam M - The module name to register the setting for
|
49
|
-
* @typeParam K - The key to register the setting for
|
50
|
-
* @typeParam T - The type of the setting value
|
51
|
-
*
|
52
|
-
* @example
|
53
|
-
* ```typescript
|
54
|
-
* // Register a client setting
|
55
|
-
* game.settings.register("myModule", "myClientSetting", {
|
56
|
-
* name: "Register a Module Setting with Choices",
|
57
|
-
* hint: "A description of the registered setting and its behavior.",
|
58
|
-
* scope: "client", // This specifies a client-stored setting
|
59
|
-
* config: true, // This specifies that the setting appears in the configuration view
|
60
|
-
* type: String,
|
61
|
-
* choices: { // If choices are defined, the resulting setting will be a select menu
|
62
|
-
* "a": "Option A",
|
63
|
-
* "b": "Option B"
|
64
|
-
* },
|
65
|
-
* default: "a", // The default value for the setting
|
66
|
-
* onChange: value => { // A callback function which triggers when the setting is changed
|
67
|
-
* console.log(value)
|
68
|
-
* }
|
69
|
-
* });
|
70
|
-
* ```
|
71
|
-
*
|
72
|
-
* @example
|
73
|
-
* ```typescript
|
74
|
-
* // Register a world setting
|
75
|
-
* game.settings.register("myModule", "myWorldSetting", {
|
76
|
-
* name: "Register a Module Setting with a Range slider",
|
77
|
-
* hint: "A description of the registered setting and its behavior.",
|
78
|
-
* scope: "world", // This specifies a world-level setting
|
79
|
-
* config: true, // This specifies that the setting appears in the configuration view
|
80
|
-
* type: Number,
|
81
|
-
* range: { // If range is specified, the resulting setting will be a range slider
|
82
|
-
* min: 0,
|
83
|
-
* max: 100,
|
84
|
-
* step: 10
|
85
|
-
* }
|
86
|
-
* default: 50, // The default value for the setting
|
87
|
-
* onChange: value => { // A callback function which triggers when the setting is changed
|
88
|
-
* console.log(value)
|
89
|
-
* }
|
90
|
-
* });
|
91
|
-
* ```
|
92
|
-
*/
|
93
|
-
register<M extends string, K extends string, T>(
|
94
|
-
module: M,
|
95
|
-
key: K,
|
96
|
-
data: ClientSettings.Values[`${M}.${K}`] extends boolean | number | bigint | string | symbol | object
|
97
|
-
? ClientSettings.PartialSetting<ClientSettings.Values[`${M}.${K}`]>
|
98
|
-
: ClientSettings.PartialSetting<T>
|
99
|
-
): void;
|
37
|
+
/**
|
38
|
+
* The types of settings which should be constructed as a primitive type
|
39
|
+
*/
|
40
|
+
protected static PRIMITIVE_TYPES: [typeof String, typeof Number, typeof Boolean, typeof Array];
|
100
41
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
* @param key - The key name for the setting under the namespace module
|
106
|
-
* @param data - Configuration for setting data
|
107
|
-
* @typeParam M - The module name to register the menu setting for
|
108
|
-
* @typeParam K - The key to register the menu setting for
|
109
|
-
*
|
110
|
-
* @example
|
111
|
-
* ```typescript
|
112
|
-
* // Define a settings submenu which handles advanced configuration needs
|
113
|
-
* game.settings.registerMenu("myModule", "mySettingsMenu", {
|
114
|
-
* name: "My Settings Submenu",
|
115
|
-
* label: "Settings Menu Label", // The text label used in the button
|
116
|
-
* hint: "A description of what will occur in the submenu dialog.",
|
117
|
-
* icon: "fas fa-bars", // A Font Awesome icon used in the submenu button
|
118
|
-
* type: MySubmenuApplicationClass, // A FormApplication subclass which should be created
|
119
|
-
* restricted: true // Restrict this submenu to gamemaster only?
|
120
|
-
* });
|
121
|
-
* ```
|
122
|
-
*/
|
123
|
-
registerMenu<M extends string, K extends string>(
|
124
|
-
module: M,
|
125
|
-
key: K,
|
126
|
-
data: ClientSettings.RegisteredMenuSettings[`${M}.${K}`]
|
127
|
-
): void;
|
128
|
-
|
129
|
-
/**
|
130
|
-
* Get the value of a game setting for a certain module and setting key
|
131
|
-
*
|
132
|
-
* @param module - The module namespace under which the setting is registered
|
133
|
-
* @param key - The setting key to retrieve
|
134
|
-
* @typeParam M - The module name to register the get for
|
135
|
-
* @typeParam K - The key to get the setting for
|
136
|
-
*
|
137
|
-
* @example
|
138
|
-
* ```typescript
|
139
|
-
* // Retrieve the current setting value
|
140
|
-
* game.settings.get("myModule", "myClientSetting");
|
141
|
-
* ```
|
142
|
-
*/
|
143
|
-
get<M extends string, K extends string>(module: M, key: K): ClientSettings.Values[`${M}.${K}`];
|
42
|
+
/**
|
43
|
+
* Return a singleton instance of the Game Settings Configuration app
|
44
|
+
*/
|
45
|
+
get sheet(): SettingsConfig;
|
144
46
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
47
|
+
/**
|
48
|
+
* Register a new game setting under this setting scope
|
49
|
+
*
|
50
|
+
* @param namespace - The namespace under which the setting is registered
|
51
|
+
* @param key - The key name for the setting under the namespace module
|
52
|
+
* @param data - Configuration for setting data
|
53
|
+
* @typeParam N - The namespace under which the setting is registered, as a type
|
54
|
+
* @typeParam K - The key name for the setting under the namespace module, as a type
|
55
|
+
* @typeParam T - The type of the setting value
|
56
|
+
*
|
57
|
+
* @example
|
58
|
+
* ```typescript
|
59
|
+
* // Register a client setting
|
60
|
+
* game.settings.register("myModule", "myClientSetting", {
|
61
|
+
* name: "Register a Module Setting with Choices",
|
62
|
+
* hint: "A description of the registered setting and its behavior.",
|
63
|
+
* scope: "client", // This specifies a client-stored setting
|
64
|
+
* config: true, // This specifies that the setting appears in the configuration view
|
65
|
+
* type: String,
|
66
|
+
* choices: { // If choices are defined, the resulting setting will be a select menu
|
67
|
+
* "a": "Option A",
|
68
|
+
* "b": "Option B"
|
69
|
+
* },
|
70
|
+
* default: "a", // The default value for the setting
|
71
|
+
* onChange: value => { // A callback function which triggers when the setting is changed
|
72
|
+
* console.log(value)
|
73
|
+
* }
|
74
|
+
* });
|
75
|
+
* ```
|
76
|
+
*
|
77
|
+
* @example
|
78
|
+
* ```typescript
|
79
|
+
* // Register a world setting
|
80
|
+
* game.settings.register("myModule", "myWorldSetting", {
|
81
|
+
* name: "Register a Module Setting with a Range slider",
|
82
|
+
* hint: "A description of the registered setting and its behavior.",
|
83
|
+
* scope: "world", // This specifies a world-level setting
|
84
|
+
* config: true, // This specifies that the setting appears in the configuration view
|
85
|
+
* type: Number,
|
86
|
+
* range: { // If range is specified, the resulting setting will be a range slider
|
87
|
+
* min: 0,
|
88
|
+
* max: 100,
|
89
|
+
* step: 10
|
90
|
+
* }
|
91
|
+
* default: 50, // The default value for the setting
|
92
|
+
* onChange: value => { // A callback function which triggers when the setting is changed
|
93
|
+
* console.log(value)
|
94
|
+
* }
|
95
|
+
* });
|
96
|
+
* ```
|
97
|
+
*/
|
98
|
+
register<N extends string, K extends string, T>(
|
99
|
+
namespace: N,
|
100
|
+
key: K,
|
101
|
+
data: ClientSettings.Values[`${N}.${K}`] extends string | number | boolean | Array<any> | object
|
102
|
+
? ClientSettings.PartialSettingConfig<ClientSettings.Values[`${N}.${K}`]>
|
103
|
+
: ClientSettings.PartialSettingConfig<T>
|
104
|
+
): void;
|
167
105
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
106
|
+
/**
|
107
|
+
* Register a new sub-settings menu
|
108
|
+
*
|
109
|
+
* @param namespace - The namespace under which the menu is registered
|
110
|
+
* @param key - The key name for the setting under the namespace module
|
111
|
+
* @param data - Configuration for setting data
|
112
|
+
* @typeParam N - The namespace under which the menu is registered, as a type
|
113
|
+
* @typeParam K - The key name for the setting under the namespace module, as a type
|
114
|
+
*
|
115
|
+
* @example
|
116
|
+
* ```typescript
|
117
|
+
* // Define a settings submenu which handles advanced configuration needs
|
118
|
+
* game.settings.registerMenu("myModule", "mySettingsMenu", {
|
119
|
+
* name: "My Settings Submenu",
|
120
|
+
* label: "Settings Menu Label", // The text label used in the button
|
121
|
+
* hint: "A description of what will occur in the submenu dialog.",
|
122
|
+
* icon: "fas fa-bars", // A Font Awesome icon used in the submenu button
|
123
|
+
* type: MySubmenuApplicationClass, // A FormApplication subclass which should be created
|
124
|
+
* restricted: true // Restrict this submenu to gamemaster only?
|
125
|
+
* });
|
126
|
+
* ```
|
127
|
+
*/
|
128
|
+
registerMenu<N extends string, K extends string>(
|
129
|
+
namespace: N,
|
130
|
+
key: K,
|
131
|
+
data: ClientSettings.PartialSettingSubmenuConfig
|
132
|
+
): void;
|
173
133
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
134
|
+
/**
|
135
|
+
* Get the value of a game setting for a certain namespace and setting key
|
136
|
+
*
|
137
|
+
* @param namespace - The namespace under which the setting is registered
|
138
|
+
* @param key - The setting key to retrieve
|
139
|
+
* @typeParam N - The namespace under which the setting is registered, as a type
|
140
|
+
* @typeParam K - The setting key to retrieve, as a type
|
141
|
+
*
|
142
|
+
* @example
|
143
|
+
* ```typescript
|
144
|
+
* // Retrieve the current setting value
|
145
|
+
* game.settings.get("myModule", "myClientSetting");
|
146
|
+
* ```
|
147
|
+
*/
|
148
|
+
get<N extends string, K extends string>(namespace: N, key: K): ClientSettings.Values[`${N}.${K}`];
|
178
149
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
:
|
198
|
-
|
199
|
-
|
200
|
-
? typeof BigInt
|
201
|
-
: T extends string
|
202
|
-
? typeof String
|
203
|
-
: T extends symbol
|
204
|
-
? typeof Symbol
|
205
|
-
: ConstructorOf<T>;
|
150
|
+
/**
|
151
|
+
* Set the value of a game setting for a certain namespace and setting key
|
152
|
+
*
|
153
|
+
* @param namespace - The namespace under which the setting is registered
|
154
|
+
* @param key - The setting key to retrieve
|
155
|
+
* @param value - The data to assign to the setting key
|
156
|
+
* @typeParam N - The namespace under which the setting is registered, as a type
|
157
|
+
* @typeParam K - The setting key to retrieve, as a type
|
158
|
+
* @typeParam V - The type of the value being set
|
159
|
+
*
|
160
|
+
* @example
|
161
|
+
* ```typescript
|
162
|
+
* // Update the current value of a setting
|
163
|
+
* game.settings.set("myModule", "myClientSetting", "b");
|
164
|
+
* ```
|
165
|
+
*/
|
166
|
+
set<N extends string, K extends string, V extends ClientSettings.Values[`${N}.${K}`]>(
|
167
|
+
namespace: N,
|
168
|
+
key: K,
|
169
|
+
value: V
|
170
|
+
): Promise<V>;
|
206
171
|
}
|
207
172
|
|
208
|
-
|
209
|
-
|
210
|
-
icon?: string;
|
211
|
-
label?: string;
|
212
|
-
name?: string;
|
213
|
-
restricted: boolean;
|
214
|
-
type: ConstructorOf<FormApplication<FormApplicationOptions, object, undefined>>;
|
215
|
-
}
|
173
|
+
namespace ClientSettings {
|
174
|
+
type PartialSettingConfig<T = unknown> = InexactPartial<Omit<SettingConfig<T>, 'key' | 'namespace'>>;
|
216
175
|
|
217
|
-
|
218
|
-
[key: string]: PartialMenuSetting;
|
219
|
-
}
|
176
|
+
type PartialSettingSubmenuConfig = Omit<SettingSubmenuConfig, 'key' | 'namespace'>;
|
220
177
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
178
|
+
interface Values {
|
179
|
+
'core.animateRollTable': boolean;
|
180
|
+
'core.chatBubbles': boolean;
|
181
|
+
'core.chatBubblesPan': boolean;
|
182
|
+
'core.combatTrackerConfig': { resource: string; skipDefeated: boolean } | {};
|
183
|
+
'core.compendiumConfiguration': Partial<Record<string, CompendiumCollection.Configuration>>;
|
184
|
+
'core.coneTemplateType': 'round' | 'flat';
|
185
|
+
'core.defaultDrawingConfig': foundry.data.DrawingData['_source'] | {};
|
186
|
+
'core.defaultToken': DeepPartial<TokenDataSource>;
|
187
|
+
'core.disableResolutionScaling': boolean;
|
188
|
+
'core.fontSize': number;
|
189
|
+
'core.fpsMeter': boolean;
|
190
|
+
'core.globalAmbientVolume': number;
|
191
|
+
'core.globalInterfaceVolume': number;
|
192
|
+
'core.globalPlaylistVolume': number;
|
193
|
+
'core.keybindings': Record<string, KeybindingActionBinding[]>;
|
194
|
+
'core.language': string;
|
195
|
+
'core.leftClickRelease': boolean;
|
196
|
+
'core.lightAnimation': boolean;
|
197
|
+
'core.maxFPS': number;
|
198
|
+
'core.mipmap': boolean;
|
199
|
+
'core.moduleConfiguration': Record<string, boolean>;
|
200
|
+
'core.noCanvas': boolean;
|
201
|
+
'core.notesDisplayToggle': boolean;
|
202
|
+
'core.nue.shownTips': boolean;
|
203
|
+
'core.performanceMode': boolean;
|
204
|
+
'core.permissions': Game.Permissions;
|
205
|
+
'core.playlist.playingLocation': 'top' | 'bottom';
|
206
|
+
'core.rollMode': keyof CONFIG.Dice.RollModes;
|
207
|
+
'core.rtcClientSettings': typeof AVSettings.DEFAULT_CLIENT_SETTINGS;
|
208
|
+
'core.rtcWorldSettings': typeof AVSettings.DEFAULT_WORLD_SETTINGS;
|
209
|
+
'core.scrollingStatusText': boolean;
|
210
|
+
'core.sheetClasses': {
|
211
|
+
[Key in DocumentType as DocumentSubTypes<Key> extends string ? Key : never]?: Record<
|
212
|
+
DocumentSubTypes<Key> & string,
|
213
|
+
string
|
214
|
+
>;
|
215
|
+
};
|
216
|
+
'core.time': number;
|
217
|
+
'core.tokenDragPreview': boolean;
|
218
|
+
'core.visionAnimation': boolean;
|
219
|
+
[key: string]: unknown;
|
220
|
+
}
|
248
221
|
}
|
249
222
|
}
|
@@ -164,10 +164,12 @@ declare global {
|
|
164
164
|
* Provide a dialog form that prompts the user to import the full contents of a Compendium pack into the World.
|
165
165
|
* @param options - Additional options passed to the Dialog.confirm method
|
166
166
|
* (default: `{}`)
|
167
|
-
* @returns A
|
167
|
+
* @returns A promise which resolves in the following ways: an array of imported
|
168
|
+
* Documents if the "yes" button was pressed, false if the "no" button was pressed, or
|
169
|
+
* null if the dialog was closed without making a choice.
|
168
170
|
*/
|
169
171
|
importDialog(
|
170
|
-
options?:
|
172
|
+
options?: DialogOptions | undefined
|
171
173
|
): Promise<StoredDocument<DocumentInstanceForCompendiumMetadata<T>>[] | null | false>;
|
172
174
|
|
173
175
|
/**
|
@@ -2,6 +2,18 @@
|
|
2
2
|
declare class GamepadManager {
|
3
3
|
constructor();
|
4
4
|
|
5
|
+
/**
|
6
|
+
* @defaultValue `null`
|
7
|
+
* @internal
|
8
|
+
*/
|
9
|
+
protected _gamepadPoller: number | null;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* The connected Gamepads
|
13
|
+
* @internal
|
14
|
+
*/
|
15
|
+
protected _connectedGamepads: Map<string, ConnectedGamepad>;
|
16
|
+
|
5
17
|
/**
|
6
18
|
* How often Gamepad polling should check for button presses
|
7
19
|
* @defaultValue `100`
|
@@ -70,37 +70,6 @@ declare global {
|
|
70
70
|
/** The client-side console is the default logger */
|
71
71
|
let logger: typeof console;
|
72
72
|
|
73
|
-
/**
|
74
|
-
* @deprecated since 0.8.0
|
75
|
-
* You are referencing the FEATURES object which has been deprecated as it is no longer an agreed-upon method for how to track evolution of the Foundry Virtual Tabletop API. Discussion about alternate approaches is actively ongoing within the League of Developers community. For the time being the recommendation is to test against game.data.version to understand the current Foundry VTT version which is active. The FEATURES object will be removed in 0.9.0.
|
76
|
-
*/
|
77
|
-
let FEATURES: {
|
78
|
-
readonly ACTIVE_EFFECTS: 2;
|
79
|
-
readonly ACTORS: 3;
|
80
|
-
readonly AUDIO_VIDEO: 2;
|
81
|
-
readonly CHAT: 3;
|
82
|
-
readonly COMBAT: 3;
|
83
|
-
readonly COMPENDIUM: 3;
|
84
|
-
readonly DICE: 2;
|
85
|
-
readonly DRAWINGS: 3;
|
86
|
-
readonly ENTITIES: 5;
|
87
|
-
readonly GRID: 2;
|
88
|
-
readonly ITEMS: 3;
|
89
|
-
readonly JOURNAL: 2;
|
90
|
-
readonly LIGHTING: 3;
|
91
|
-
readonly LOCALIZATION: 2;
|
92
|
-
readonly MACROS: 2;
|
93
|
-
readonly NOTES: 2;
|
94
|
-
readonly PLAYLISTS: 2;
|
95
|
-
readonly ROLL_TABLES: 2;
|
96
|
-
readonly SETTINGS: 3;
|
97
|
-
readonly SOUND: 2;
|
98
|
-
readonly TEMPLATES: 2;
|
99
|
-
readonly TILES: 3;
|
100
|
-
readonly TOKENS: 4;
|
101
|
-
readonly WALLS: 3;
|
102
|
-
};
|
103
|
-
|
104
73
|
/**
|
105
74
|
* @defaultValue `undefined`
|
106
75
|
* Initialized between the `'DOMContentLoaded'` event and the `'init'` hook event.
|
@@ -7,6 +7,23 @@ declare class HandlebarsHelpers {
|
|
7
7
|
*/
|
8
8
|
static checked(value: unknown): string;
|
9
9
|
|
10
|
+
/**
|
11
|
+
* For use in form inputs. If the supplied value is truthy, add the "disabled" property, otherwise add nothing.
|
12
|
+
*/
|
13
|
+
static disabled(value: unknown): string;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Concatenate a number of string terms into a single string.
|
17
|
+
* This is useful for passing arguments with variable names.
|
18
|
+
* @param values - The values to concatenate
|
19
|
+
*
|
20
|
+
* @example <caption>Concatenate several string parts to create a dynamic variable</caption>
|
21
|
+
* ```handlebars
|
22
|
+
* {{filePicker target=(concat "faces." i ".img") type="image"}}
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
static concat(...values: string[]): Handlebars.SafeString;
|
26
|
+
|
10
27
|
/**
|
11
28
|
* Render a pair of inputs for selecting a color.
|
12
29
|
* @param options - Helper options
|
@@ -31,12 +48,15 @@ declare class HandlebarsHelpers {
|
|
31
48
|
* @example <caption>Translate a provided localization string, optionally including formatting parameters</caption>
|
32
49
|
* ```handlebars
|
33
50
|
* <label>{{localize "ACTOR.Create"}}</label> <!-- "Create Actor" -->
|
34
|
-
* <label>{{localize "CHAT.InvalidCommand"
|
51
|
+
* <label>{{localize "CHAT.InvalidCommand" command=foo}}</label> <!-- "foo is not a valid chat message command." -->
|
35
52
|
* ```
|
36
53
|
*/
|
37
54
|
static localize(value: string, options: HandlebarsHelpers.LocalizeOptions): string;
|
38
55
|
|
39
56
|
/**
|
57
|
+
* @param value - A numeric value to format
|
58
|
+
* @param options - Additional options which customize the resulting format
|
59
|
+
* @returns The formatted string to be included in a template
|
40
60
|
* A string formatting helper to display a number with a certain fixed number of decimals and an explicit sign.
|
41
61
|
*/
|
42
62
|
static numberFormat(value: string, options: HandlebarsHelpers.NumberFormatOptions): string;
|
@@ -78,7 +98,7 @@ declare class HandlebarsHelpers {
|
|
78
98
|
): Handlebars.SafeString;
|
79
99
|
|
80
100
|
/**
|
81
|
-
* Render a pair of inputs for selecting a
|
101
|
+
* Render a pair of inputs for selecting a value in a range.
|
82
102
|
* @param options - Helper options
|
83
103
|
*/
|
84
104
|
static rangePicker(options: HandlebarsHelpers.RangePickerOptions): Handlebars.SafeString;
|
@@ -206,10 +226,10 @@ declare namespace HandlebarsHelpers {
|
|
206
226
|
editable?: boolean;
|
207
227
|
|
208
228
|
/**
|
209
|
-
* Replace dynamic
|
229
|
+
* Replace dynamic document links?
|
210
230
|
* @defaultValue `true`
|
211
231
|
*/
|
212
|
-
|
232
|
+
documents?: boolean;
|
213
233
|
|
214
234
|
/**
|
215
235
|
* The data object providing context for inline rolls
|
@@ -245,11 +265,13 @@ declare namespace HandlebarsHelpers {
|
|
245
265
|
interface NumberFormatOptions extends Handlebars.HelperOptions {
|
246
266
|
hash: {
|
247
267
|
/**
|
268
|
+
* The number of decimal places to include in the resulting string
|
248
269
|
* @defaultValue `0`
|
249
270
|
*/
|
250
271
|
decimals?: number;
|
251
272
|
|
252
273
|
/**
|
274
|
+
* Whether to include an explicit "+" sign for positive numbers
|
253
275
|
* @defaultValue `false`
|
254
276
|
*/
|
255
277
|
sign?: boolean;
|