@league-of-foundry-developers/foundry-vtt-types 0.8.9-9 → 9.238.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 +44 -27
- package/index.d.ts +2 -2
- package/package.json +34 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
- package/src/foundry/common/config.mjs/index.d.ts +1 -0
- package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
- package/src/foundry/common/constants.mjs.d.ts +402 -213
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
- package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
- package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
- package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
- package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
- package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
- package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
- package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +21 -20
- package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
- package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
- package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
- package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
- package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
- package/src/foundry/common/data/data.mjs/userData.d.ts +111 -33
- package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
- package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
- package/src/foundry/common/data/fields.mjs.d.ts +180 -83
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
- package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
- package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
- package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
- package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
- package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
- package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
- package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
- package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
- package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
- package/src/foundry/common/documents.mjs/index.d.ts +3 -0
- package/src/foundry/common/module.mjs.d.ts +3 -0
- package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
- package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
- package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
- package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
- package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
- package/src/foundry/common/types.mjs.d.ts +95 -0
- package/src/foundry/common/utils/helpers.mjs.d.ts +27 -2
- package/src/foundry/common/utils/primitives.mjs.d.ts +99 -16
- package/src/foundry/foundry.js/application.d.ts +2 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +5 -8
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +8 -9
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +6 -6
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +7 -6
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/canvas.d.ts +148 -46
- package/src/foundry/foundry.js/canvasAnimation.d.ts +1 -1
- package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +45 -91
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +3 -7
- package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +133 -0
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +384 -0
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +4 -8
- package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +4 -6
- package/src/foundry/foundry.js/clientDocuments/index.d.ts +2 -0
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
- package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
- package/src/foundry/foundry.js/clientKeybindings.d.ts +299 -0
- package/src/foundry/foundry.js/clientSettings.d.ts +11 -9
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
- package/src/foundry/foundry.js/config.d.ts +465 -887
- package/src/foundry/foundry.js/game.d.ts +86 -11
- package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
- package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
- package/src/foundry/foundry.js/hooks.d.ts +57 -0
- package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
- package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
- package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
- package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
- package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
- package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
- package/src/foundry/foundry.js/pointSource.d.ts +2 -2
- package/src/foundry/foundry.js/roll.d.ts +25 -36
- package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
- package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
- package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
- package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
- package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
- package/src/foundry/foundry.js/searchFilter.d.ts +1 -1
- package/src/foundry/foundry.js/textEditor.d.ts +1 -1
- package/src/foundry/index.d.ts +4 -0
- package/src/types/utils.d.ts +11 -3
package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts
CHANGED
@@ -114,13 +114,13 @@ declare global {
|
|
114
114
|
* Given a constant playback mode, provide the FontAwesome icon used to display it
|
115
115
|
* @internal
|
116
116
|
*/
|
117
|
-
protected _getModeIcon(mode: foundry.CONST.
|
117
|
+
protected _getModeIcon(mode: foundry.CONST.PLAYLIST_MODES): string;
|
118
118
|
|
119
119
|
/**
|
120
120
|
* Given a constant playback mode, provide the string tooltip used to describe it
|
121
121
|
* @internal
|
122
122
|
*/
|
123
|
-
protected _getModeTooltip(mode: foundry.CONST.
|
123
|
+
protected _getModeTooltip(mode: foundry.CONST.PLAYLIST_MODES): string;
|
124
124
|
|
125
125
|
/** @override */
|
126
126
|
activateListeners(html: JQuery): void;
|
@@ -8,7 +8,7 @@ declare global {
|
|
8
8
|
* @typeParam Options - The type of the options object
|
9
9
|
*/
|
10
10
|
abstract class SidebarDirectory<
|
11
|
-
Name extends foundry.CONST.
|
11
|
+
Name extends foundry.CONST.DOCUMENT_TYPES | 'FogExploration',
|
12
12
|
Options extends SidebarDirectory.Options = SidebarDirectory.Options
|
13
13
|
> extends SidebarTab<Options> {
|
14
14
|
constructor(options?: Partial<SidebarDirectory.Options>);
|
@@ -54,7 +54,7 @@ declare global {
|
|
54
54
|
* The WorldCollection instance which this Sidebar Directory displays.
|
55
55
|
*/
|
56
56
|
static get collection(): WorldCollection<
|
57
|
-
ConfiguredDocumentClassForName<foundry.CONST.
|
57
|
+
ConfiguredDocumentClassForName<foundry.CONST.DOCUMENT_TYPES | 'FogExploration'>,
|
58
58
|
string
|
59
59
|
>;
|
60
60
|
|
@@ -116,22 +116,22 @@ declare class AVSettings {
|
|
116
116
|
type: string;
|
117
117
|
|
118
118
|
/**
|
119
|
-
* @defaultValue `
|
119
|
+
* @defaultValue `""`
|
120
120
|
*/
|
121
121
|
url: string;
|
122
122
|
|
123
123
|
/**
|
124
|
-
* @defaultValue `
|
124
|
+
* @defaultValue `""`
|
125
125
|
*/
|
126
126
|
room: string;
|
127
127
|
|
128
128
|
/**
|
129
|
-
* @defaultValue `
|
129
|
+
* @defaultValue `""`
|
130
130
|
*/
|
131
131
|
username: string;
|
132
132
|
|
133
133
|
/**
|
134
|
-
* @defaultValue `
|
134
|
+
* @defaultValue `""`
|
135
135
|
*/
|
136
136
|
password: string;
|
137
137
|
};
|
@@ -143,17 +143,17 @@ declare class AVSettings {
|
|
143
143
|
type: string;
|
144
144
|
|
145
145
|
/**
|
146
|
-
* @defaultValue `
|
146
|
+
* @defaultValue `""`
|
147
147
|
*/
|
148
148
|
url: string;
|
149
149
|
|
150
150
|
/**
|
151
|
-
* @defaultValue `
|
151
|
+
* @defaultValue `""`
|
152
152
|
*/
|
153
153
|
username: string;
|
154
154
|
|
155
155
|
/**
|
156
|
-
* @defaultValue `
|
156
|
+
* @defaultValue `""`
|
157
157
|
*/
|
158
158
|
password: string;
|
159
159
|
};
|
@@ -13,7 +13,7 @@ import { BaseScene } from '../common/documents.mjs';
|
|
13
13
|
* @example <caption>Example Canvas commands</caption>
|
14
14
|
* ```typescript
|
15
15
|
* canvas.ready; // Is the canvas ready for use?
|
16
|
-
* canvas.scene; // The currently viewed Scene
|
16
|
+
* canvas.scene; // The currently viewed Scene document.
|
17
17
|
* canvas.dimensions; // The dimensions of the current Scene.
|
18
18
|
* canvas.draw(); // Completely re-draw the game canvas (this is usually unnecessary).
|
19
19
|
* canvas.pan(x, y, zoom); // Pan the canvas to new coordinates and scale.
|
@@ -107,16 +107,44 @@ declare global {
|
|
107
107
|
*/
|
108
108
|
blurFilters: PIXI.filters.BlurFilter[];
|
109
109
|
|
110
|
+
/**
|
111
|
+
* A reference to the MouseInteractionManager that is currently controlling pointer-based interaction, or null.
|
112
|
+
*/
|
113
|
+
currentMouseManager: MouseInteractionManager<PIXI.Container> | null;
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Record framerate performance data
|
117
|
+
*/
|
118
|
+
fps: {
|
119
|
+
/** @defaultValue `[]` */
|
120
|
+
values: number[];
|
121
|
+
|
122
|
+
/** @defaultValue `0` */
|
123
|
+
last: number;
|
124
|
+
|
125
|
+
/** @defaultValue `0` */
|
126
|
+
average: number;
|
127
|
+
|
128
|
+
/** @defaultValue `0` */
|
129
|
+
render: number;
|
130
|
+
|
131
|
+
/** @defaultValue `document.getElementById("fps")` */
|
132
|
+
element: HTMLElement;
|
133
|
+
|
134
|
+
/** @defaultValue `undefined` */
|
135
|
+
fn: TickerCallback<void> | undefined;
|
136
|
+
};
|
137
|
+
|
110
138
|
/**
|
111
139
|
* The singleton interaction manager instance which handles mouse interaction on the Canvas.
|
112
140
|
*/
|
113
141
|
mouseInteractionManager: MouseInteractionManager<PIXI.Container> | undefined;
|
114
142
|
|
115
143
|
/**
|
116
|
-
*
|
117
|
-
* @defaultValue `
|
144
|
+
* The renderer screen dimensions.
|
145
|
+
* @defaultValue `[0, 0]`
|
118
146
|
*/
|
119
|
-
|
147
|
+
screenDimensions: [x: number, y: number];
|
120
148
|
|
121
149
|
/**
|
122
150
|
* Initialize the Canvas by creating the HTML element and PIXI application.
|
@@ -125,39 +153,53 @@ declare global {
|
|
125
153
|
*/
|
126
154
|
initialize(): void;
|
127
155
|
|
128
|
-
app
|
156
|
+
app?: PIXI.Application;
|
157
|
+
|
158
|
+
stage?: PIXI.Container;
|
159
|
+
|
160
|
+
protected _dragDrop?: DragDrop;
|
161
|
+
|
162
|
+
outline?: PIXI.Graphics;
|
129
163
|
|
130
|
-
|
164
|
+
msk?: PIXI.Graphics;
|
131
165
|
|
132
|
-
|
166
|
+
readonly primary?: PrimaryCanvasGroup;
|
133
167
|
|
134
|
-
|
168
|
+
readonly effects?: EffectsCanvasGroup;
|
135
169
|
|
136
|
-
|
170
|
+
readonly interface?: InterfaceCanvasGroup;
|
137
171
|
|
138
|
-
|
172
|
+
readonly background?: BackgroundLayer;
|
139
173
|
|
140
|
-
|
174
|
+
readonly drawings?: DrawingsLayer;
|
141
175
|
|
142
|
-
|
176
|
+
readonly grid?: GridLayer;
|
143
177
|
|
144
|
-
|
178
|
+
readonly walls?: WallsLayer;
|
145
179
|
|
146
|
-
|
180
|
+
readonly templates?: TemplateLayer;
|
147
181
|
|
148
|
-
|
182
|
+
readonly notes?: NotesLayer;
|
149
183
|
|
150
|
-
|
184
|
+
readonly tokens?: TokenLayer;
|
151
185
|
|
152
|
-
|
186
|
+
readonly foreground?: ForegroundLayer;
|
153
187
|
|
154
|
-
|
188
|
+
readonly sounds?: SoundsLayer;
|
155
189
|
|
156
|
-
|
190
|
+
readonly lighting?: LightingLayer;
|
157
191
|
|
158
|
-
|
192
|
+
readonly sight?: SightLayer;
|
159
193
|
|
160
|
-
|
194
|
+
readonly weather?: WeatherLayer;
|
195
|
+
|
196
|
+
readonly controls?: ControlsLayer;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* Display warnings for known performance issues which may occur due to the user's hardware or browser configuration
|
200
|
+
* @internal
|
201
|
+
*/
|
202
|
+
protected _displayPerformanceWarnings(): void;
|
161
203
|
|
162
204
|
/**
|
163
205
|
* The id of the currently displayed Scene.
|
@@ -180,10 +222,10 @@ declare global {
|
|
180
222
|
get activeLayer(): CanvasLayer | null;
|
181
223
|
|
182
224
|
/**
|
183
|
-
*
|
184
|
-
* @
|
225
|
+
* Initialize the group containers of the game Canvas.
|
226
|
+
* @internal
|
185
227
|
*/
|
186
|
-
protected
|
228
|
+
protected _createGroups(): void;
|
187
229
|
|
188
230
|
/**
|
189
231
|
* When re-drawing the canvas, first tear down or discontinue some existing processes
|
@@ -197,6 +239,15 @@ declare global {
|
|
197
239
|
*/
|
198
240
|
draw(scene?: InstanceType<ConfiguredDocumentClass<typeof Scene>>): Promise<this>;
|
199
241
|
|
242
|
+
performance?: PerformanceSettings;
|
243
|
+
|
244
|
+
/**
|
245
|
+
* Get the value of a GL parameter
|
246
|
+
* @param parameter - The GL parameter to retrieve
|
247
|
+
* @returns The returned value type depends of the parameter to retrieve
|
248
|
+
*/
|
249
|
+
getGLParameter(parameter: string): unknown;
|
250
|
+
|
200
251
|
/**
|
201
252
|
* Get the canvas active dimensions based on the size of the scene's map.
|
202
253
|
* We expand the image size by a factor of 1.5 and round to the nearest 2x grid size.
|
@@ -206,6 +257,12 @@ declare global {
|
|
206
257
|
*/
|
207
258
|
static getDimensions(data: Canvas.DimensionsData): Canvas.Dimensions;
|
208
259
|
|
260
|
+
/**
|
261
|
+
* Configure performance settings for hte canvas application based on the selected performance mode
|
262
|
+
* @internal
|
263
|
+
*/
|
264
|
+
protected _configurePerformanceMode(): PerformanceSettings;
|
265
|
+
|
209
266
|
/**
|
210
267
|
* Once the canvas is drawn, initialize control, visibility, and audio states
|
211
268
|
*/
|
@@ -229,25 +286,6 @@ declare global {
|
|
229
286
|
*/
|
230
287
|
protected _initializeTokenControl(): void;
|
231
288
|
|
232
|
-
/**
|
233
|
-
* Get a reference to the a specific CanvasLayer by it's name
|
234
|
-
* @param layerName - The name of the canvas layer to get
|
235
|
-
*/
|
236
|
-
getLayer(layerName: 'BackgroundLayer'): BackgroundLayer | null;
|
237
|
-
getLayer(layerName: 'DrawingsLayer'): DrawingsLayer | null;
|
238
|
-
getLayer(layerName: 'GridLayer'): GridLayer | null;
|
239
|
-
getLayer(layerName: 'WallsLayer'): WallsLayer | null;
|
240
|
-
getLayer(layerName: 'TemplateLayer'): TemplateLayer | null;
|
241
|
-
getLayer(layerName: 'NotesLayer'): NotesLayer | null;
|
242
|
-
getLayer(layerName: 'TokenLayer'): TokenLayer | null;
|
243
|
-
getLayer(layerName: 'ForegroundLayer'): ForegroundLayer | null;
|
244
|
-
getLayer(layerName: 'SoundsLayer'): SoundsLayer | null;
|
245
|
-
getLayer(layerName: 'LightingLayer'): LightingLayer | null;
|
246
|
-
getLayer(layerName: 'SightLayer'): SightLayer | null;
|
247
|
-
getLayer(layerName: 'EffectsLayer'): EffectsLayer | null;
|
248
|
-
getLayer(layerName: 'ControlsLayer'): ControlsLayer | null;
|
249
|
-
getLayer(layerName: string): CanvasLayer | null;
|
250
|
-
|
251
289
|
/**
|
252
290
|
* Given an embedded object name, get the canvas layer for that object
|
253
291
|
*/
|
@@ -261,6 +299,22 @@ declare global {
|
|
261
299
|
*/
|
262
300
|
activateLayer(layerName: LayerName): void;
|
263
301
|
|
302
|
+
/**
|
303
|
+
* Activate framerate tracking by adding an HTML element to the display and refreshing it every frame.
|
304
|
+
*/
|
305
|
+
activateFPSMeter(): void;
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Deactivate framerate tracking by canceling ticker updates and removing the HTML element.
|
309
|
+
*/
|
310
|
+
deactivateFPSMeter(): void;
|
311
|
+
|
312
|
+
/**
|
313
|
+
* Measure average framerate per second over the past 30 frames
|
314
|
+
* @internal
|
315
|
+
*/
|
316
|
+
protected _measureFPS(): void;
|
317
|
+
|
264
318
|
/**
|
265
319
|
* Pan the canvas to a certain \{x,y\} coordinate and a certain zoom level
|
266
320
|
* @param options - (default: `{}`)
|
@@ -285,6 +339,11 @@ declare global {
|
|
285
339
|
*/
|
286
340
|
recenter(coordinates?: PanView): ReturnType<this['animatePan']>;
|
287
341
|
|
342
|
+
/**
|
343
|
+
* Highlight objects on any layers which are visible
|
344
|
+
*/
|
345
|
+
highlightObjects(active: boolean): void;
|
346
|
+
|
288
347
|
/**
|
289
348
|
* Get the constrained zoom scale parameter which is allowed by the maxZoom parameter
|
290
349
|
* @param x - The requested x-coordinate
|
@@ -305,6 +364,12 @@ declare global {
|
|
305
364
|
*/
|
306
365
|
protected updateBlur(scale?: number): void;
|
307
366
|
|
367
|
+
/**
|
368
|
+
* Sets the background color.
|
369
|
+
* @param color - The color to set the canvas background to.
|
370
|
+
*/
|
371
|
+
setBackgroundColor(color: string): void;
|
372
|
+
|
308
373
|
/**
|
309
374
|
* Attach event listeners to the game canvas to handle click and interaction events
|
310
375
|
*/
|
@@ -420,9 +485,25 @@ declare global {
|
|
420
485
|
triggerPendingOperations(): void;
|
421
486
|
|
422
487
|
/**
|
423
|
-
*
|
424
|
-
|
425
|
-
|
488
|
+
* Get a reference to the a specific CanvasLayer by it's name
|
489
|
+
* @param layerName - The name of the canvas layer to get
|
490
|
+
* (unused)
|
491
|
+
* @deprecated since v9, will be deleted in v10
|
492
|
+
*/
|
493
|
+
getLayer(layerName: any): {
|
494
|
+
BackgroundLayer: Canvas['background'];
|
495
|
+
DrawingsLayer: Canvas['drawings'];
|
496
|
+
GridLayer: Canvas['grid'];
|
497
|
+
TemplateLayer: Canvas['templates'];
|
498
|
+
TokenLayer: Canvas['tokens'];
|
499
|
+
WallsLayer: Canvas['walls'];
|
500
|
+
LightingLayer: Canvas['lighting'];
|
501
|
+
WeatherLayer: Canvas['weather'];
|
502
|
+
SightLayer: Canvas['sight'];
|
503
|
+
SoundsLayer: Canvas['sounds'];
|
504
|
+
NotesLayer: Canvas['notes'];
|
505
|
+
ControlsLayer: Canvas['controls'];
|
506
|
+
};
|
426
507
|
}
|
427
508
|
|
428
509
|
namespace Canvas {
|
@@ -455,6 +536,27 @@ declare global {
|
|
455
536
|
}
|
456
537
|
}
|
457
538
|
|
539
|
+
type TickerCallback<T> = (this: T, dt: number) => any;
|
540
|
+
|
541
|
+
interface PerformanceSettings {
|
542
|
+
mode: foundry.CONST.CANVAS_PERFORMANCE_MODES;
|
543
|
+
blur: {
|
544
|
+
enabled: boolean;
|
545
|
+
illumination: boolean;
|
546
|
+
};
|
547
|
+
mipmap: 'ON' | 'OFF';
|
548
|
+
msaa: boolean;
|
549
|
+
fps: number;
|
550
|
+
tokenAnimation: boolean;
|
551
|
+
lightAnimation: boolean;
|
552
|
+
textures: {
|
553
|
+
enabled: boolean;
|
554
|
+
maxSize: number;
|
555
|
+
p2Steps: number;
|
556
|
+
p2StepsMax: number;
|
557
|
+
};
|
558
|
+
}
|
559
|
+
|
458
560
|
interface PanView {
|
459
561
|
/**
|
460
562
|
* The x-coordinate of the pan destination
|
@@ -27,6 +27,13 @@ declare class CanvasDocumentMixin<T extends foundry.abstract.Document<any, any>>
|
|
27
27
|
*/
|
28
28
|
protected _object: PlaceableObject | null; // TODO: Replace with InstanceType<ObjectClass<T>> | null once the circular reference problem has been solved
|
29
29
|
|
30
|
+
/**
|
31
|
+
* Has this object been deliberately destroyed as part of the deletion workflow?
|
32
|
+
* @internal
|
33
|
+
* @defaultValue `false`
|
34
|
+
*/
|
35
|
+
protected _destroyed: boolean;
|
36
|
+
|
30
37
|
/**
|
31
38
|
* A lazily constructed PlaceableObject instance which can represent this Document on the game canvas.
|
32
39
|
*/
|
@@ -55,7 +55,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
55
55
|
*
|
56
56
|
* @example <caption>A Document may belong to a Folder</caption>
|
57
57
|
* ```typescript
|
58
|
-
* let folder = game.folders.
|
58
|
+
* let folder = game.folders.contents[0];
|
59
59
|
* let actor = await Actor.create({name: "New Actor", folder: folder.id});
|
60
60
|
* console.log(actor.data.folder); // folder.id;
|
61
61
|
* console.log(actor.folder); // folder;
|
@@ -86,7 +86,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
86
86
|
|
87
87
|
/**
|
88
88
|
* Return the permission level that the current game User has over this Document.
|
89
|
-
* See the CONST.
|
89
|
+
* See the CONST.DOCUMENT_PERMISSION_LEVELS object for an enumeration of these levels.
|
90
90
|
*
|
91
91
|
* @example
|
92
92
|
* ```typescript
|
@@ -95,7 +95,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
95
95
|
* actor.permission; // 2
|
96
96
|
* ```
|
97
97
|
*/
|
98
|
-
get permission(): ValueOf<typeof CONST.
|
98
|
+
get permission(): ValueOf<typeof CONST.DOCUMENT_PERMISSION_LEVELS>;
|
99
99
|
|
100
100
|
/**
|
101
101
|
* Lazily obtain a FormApplication instance used to configure this Document, or null if no sheet is available.
|
@@ -133,7 +133,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
133
133
|
/**
|
134
134
|
* Prepare all embedded Document instances which exist within this primary Document.
|
135
135
|
*/
|
136
|
-
|
136
|
+
prepareEmbeddedDocuments(): void;
|
137
137
|
|
138
138
|
/**
|
139
139
|
* Apply transformations or derivations to the values of the source data object.
|
@@ -273,18 +273,20 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
273
273
|
* Choose a name and a type from a select menu of types.
|
274
274
|
* @param data - Initial data with which to populate the creation form
|
275
275
|
* (default: `{}`)
|
276
|
-
* @param
|
276
|
+
* @param context - Additional context options or dialog positioning options
|
277
277
|
* (default: `{}`)
|
278
278
|
* @returns A Promise which resolves to the created Document
|
279
279
|
*/
|
280
280
|
static createDialog<T extends DocumentConstructor>(
|
281
281
|
this: T,
|
282
|
-
data?:
|
283
|
-
|
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
282
|
+
data?:
|
283
|
+
| DeepPartial<
|
284
|
+
| ConstructorDataType<InstanceType<T>['data']>
|
285
|
+
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
286
|
+
>
|
287
|
+
| undefined,
|
288
|
+
context?: (Pick<DocumentModificationContext, 'parent' | 'pack'> & Partial<Dialog.Options>) | undefined
|
289
|
+
): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
|
288
290
|
|
289
291
|
/**
|
290
292
|
* Present a Dialog form to confirm deletion of this Document.
|
@@ -292,18 +294,19 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
292
294
|
* (default: `{}`)
|
293
295
|
* @returns A Promise which resolves to the deleted Document
|
294
296
|
*/
|
295
|
-
deleteDialog(options?: Dialog.Options): Promise<this | undefined>;
|
297
|
+
deleteDialog(options?: Partial<Dialog.Options> | undefined): Promise<this | false | null | undefined>;
|
296
298
|
|
297
299
|
/**
|
298
|
-
* Export
|
300
|
+
* Export document data to a JSON file which can be saved by the client and later imported into a different session.
|
301
|
+
* @param options - Additional options passed to the {@link ClientDocumentMixin#toCompendium} method
|
299
302
|
*/
|
300
|
-
exportToJSON(): void;
|
303
|
+
exportToJSON(options?: CompendiumExportOptions): void;
|
301
304
|
|
302
305
|
/**
|
303
306
|
* A helper function to handle obtaining the relevant Document from dropped data provided via a DataTransfer event.
|
304
307
|
* The dropped data could have:
|
305
308
|
* 1. A compendium pack and entry id
|
306
|
-
* 2. A World
|
309
|
+
* 2. A World Document _id
|
307
310
|
* 3. A data object explicitly provided
|
308
311
|
*
|
309
312
|
* @param data - The data object extracted from a DataTransfer event
|
@@ -332,104 +335,55 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
332
335
|
* Transform the Document data to be stored in a Compendium pack.
|
333
336
|
* Remove any features of the data which are world-specific.
|
334
337
|
* This function is asynchronous in case any complex operations are required prior to exporting.
|
335
|
-
* @param pack
|
338
|
+
* @param pack - A specific pack being exported to
|
339
|
+
* (unused)
|
340
|
+
* @param options - Additional options which modify how the document is converted
|
341
|
+
* (default: `{}`)
|
336
342
|
* @returns A data object of cleaned data suitable for compendium import
|
337
343
|
*/
|
338
|
-
toCompendium(
|
339
|
-
|
340
|
-
|
341
|
-
> & {
|
344
|
+
toCompendium(
|
345
|
+
pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
|
346
|
+
options?: CompendiumExportOptions
|
347
|
+
): Omit<T['data']['_source'], '_id' | 'folder' | 'permission'> & {
|
342
348
|
permission?: T['data']['_source']['permission'];
|
343
349
|
};
|
344
350
|
|
345
351
|
/**
|
346
|
-
* @deprecated since
|
347
|
-
*/
|
348
|
-
get _id(): T['id'];
|
349
|
-
|
350
|
-
/**
|
351
|
-
* @deprecated since 0.8.0
|
352
|
-
*/
|
353
|
-
static get config(): any;
|
354
|
-
|
355
|
-
/**
|
356
|
-
* @deprecated since 0.8.0
|
357
|
-
*/
|
358
|
-
get entity(): T['documentName'];
|
359
|
-
|
360
|
-
/**
|
361
|
-
* @deprecated since 0.8.0
|
362
|
-
*/
|
363
|
-
get owner(): this['isOwner'];
|
364
|
-
|
365
|
-
/**
|
366
|
-
* @deprecated since 0.8.0
|
367
|
-
*/
|
368
|
-
hasPerm(
|
369
|
-
user: foundry.documents.BaseUser,
|
370
|
-
permission: keyof typeof foundry.CONST.ENTITY_PERMISSIONS | foundry.CONST.EntityPermission,
|
371
|
-
exact?: boolean
|
372
|
-
): ReturnType<T['testUserPermission']>;
|
373
|
-
|
374
|
-
/**
|
375
|
-
* @deprecated since 0.8.0
|
352
|
+
* @deprecated since v9 - Use prepareEmbeddedDocuments instead.
|
376
353
|
*/
|
377
|
-
|
378
|
-
|
379
|
-
updates?:
|
380
|
-
| Array<
|
381
|
-
DeepPartial<
|
382
|
-
| ConstructorDataType<InstanceType<T>['data']>
|
383
|
-
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
384
|
-
> & { _id: string }
|
385
|
-
>
|
386
|
-
| (DeepPartial<
|
387
|
-
| ConstructorDataType<InstanceType<T>['data']>
|
388
|
-
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
389
|
-
> & { _id: string }),
|
390
|
-
options?: DocumentModificationContext & foundry.utils.MergeObjectOptions
|
391
|
-
): Promise<InstanceType<ConfiguredDocumentClass<T>>[]>;
|
354
|
+
prepareEmbeddedEntities(): void;
|
355
|
+
}
|
392
356
|
|
357
|
+
interface CompendiumExportOptions {
|
393
358
|
/**
|
394
|
-
*
|
359
|
+
* Clear the flags object
|
360
|
+
* @defaultValue `false`
|
395
361
|
*/
|
396
|
-
|
397
|
-
this: T,
|
398
|
-
ids?: string[],
|
399
|
-
options?: DocumentModificationContext
|
400
|
-
): Promise<InstanceType<ConfiguredDocumentClass<T>>[]>;
|
362
|
+
clearFlags: boolean;
|
401
363
|
|
402
364
|
/**
|
403
|
-
*
|
365
|
+
* Clear the currently assigned folder and sort order
|
366
|
+
* @defaultValue `true`
|
404
367
|
*/
|
405
|
-
|
368
|
+
clearSort: boolean;
|
406
369
|
|
407
370
|
/**
|
408
|
-
*
|
371
|
+
* Clear document permissions
|
372
|
+
* @defaultValue `true`
|
409
373
|
*/
|
410
|
-
|
411
|
-
documentName: string,
|
412
|
-
data?: Record<string, unknown> | Array<Record<string, unknown>>,
|
413
|
-
options?: DocumentModificationContext
|
414
|
-
): ReturnType<T['createEmbeddedDocuments']>;
|
374
|
+
clearPermissions: boolean;
|
415
375
|
|
416
376
|
/**
|
417
|
-
*
|
377
|
+
* Clear fields which store document state
|
378
|
+
* @defaultValue `true`
|
418
379
|
*/
|
419
|
-
|
420
|
-
documentName: string,
|
421
|
-
data?: Array<Record<string, unknown>> | Record<string, unknown>,
|
422
|
-
options?: DocumentModificationContext
|
423
|
-
): ReturnType<T['updateEmbeddedDocuments']>;
|
380
|
+
clearState: boolean;
|
424
381
|
|
425
382
|
/**
|
426
|
-
*
|
383
|
+
* Retain the current Document id
|
384
|
+
* @defaultValue `false`
|
427
385
|
*/
|
428
|
-
|
429
|
-
documentName: string,
|
430
|
-
ids: string[] | string,
|
431
|
-
options: DocumentModificationContext
|
432
|
-
): ReturnType<T['deleteEmbeddedDocuments']>;
|
386
|
+
keepId: boolean;
|
433
387
|
}
|
434
388
|
|
435
389
|
interface SortOptions<T> {
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
2
|
-
import {
|
3
|
+
import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData.js';
|
3
4
|
import { EffectChangeData } from '../../common/data/data.mjs/effectChangeData';
|
4
5
|
|
5
6
|
declare global {
|
@@ -133,7 +134,7 @@ declare global {
|
|
133
134
|
protected _getSourceName(): Promise<string>;
|
134
135
|
|
135
136
|
protected _preCreate(
|
136
|
-
data:
|
137
|
+
data: ActiveEffectDataConstructorData,
|
137
138
|
options: DocumentModificationOptions,
|
138
139
|
user: foundry.documents.BaseUser
|
139
140
|
): Promise<void>;
|
@@ -1,11 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
ConfiguredDocumentClass,
|
3
|
-
ConfiguredObjectClassForName,
|
4
|
-
ConstructorDataType,
|
5
|
-
DocumentConstructor
|
6
|
-
} from '../../../types/helperTypes';
|
1
|
+
import { ConfiguredDocumentClass, ConfiguredObjectClassForName, DocumentConstructor } from '../../../types/helperTypes';
|
7
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
8
3
|
import EmbeddedCollection from '../../common/abstract/embedded-collection.mjs';
|
4
|
+
import type { ActorDataConstructorData } from '../../common/data/data.mjs/actorData.js';
|
9
5
|
|
10
6
|
declare global {
|
11
7
|
/**
|
@@ -170,7 +166,7 @@ declare global {
|
|
170
166
|
|
171
167
|
/** @override */
|
172
168
|
protected _preCreate(
|
173
|
-
data:
|
169
|
+
data: ActorDataConstructorData,
|
174
170
|
options: DocumentModificationOptions,
|
175
171
|
user: foundry.documents.BaseUser
|
176
172
|
): Promise<void>;
|