@league-of-foundry-developers/foundry-vtt-types 9.242.0 → 9.249.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/package.json +1 -1
- package/src/foundry/common/abstract/document.mjs.d.ts +13 -6
- package/src/foundry/common/config.mjs/releaseData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/actorData.d.ts +1 -1
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +14 -12
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +62 -16
- package/src/foundry/common/data/data.mjs/animationData.d.ts +13 -5
- package/src/foundry/common/data/data.mjs/cardData.d.ts +4 -4
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +3 -3
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/folderData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/lightData.d.ts +7 -5
- package/src/foundry/common/data/data.mjs/macroData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/noteData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +6 -4
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/settingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tileData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/userData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/videoData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/wallData.d.ts +4 -2
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +15 -12
- package/src/foundry/common/documents.mjs/baseActor.d.ts +24 -21
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseCard.d.ts +27 -28
- package/src/foundry/common/documents.mjs/baseCards.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +24 -17
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +21 -20
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +25 -18
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +26 -23
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +19 -17
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseItem.d.ts +25 -19
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +21 -18
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +34 -18
- package/src/foundry/common/documents.mjs/baseNote.d.ts +20 -14
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +16 -14
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseScene.d.ts +23 -21
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +27 -19
- package/src/foundry/common/documents.mjs/baseTile.d.ts +17 -11
- package/src/foundry/common/documents.mjs/baseToken.d.ts +20 -16
- package/src/foundry/common/documents.mjs/baseUser.d.ts +45 -11
- package/src/foundry/common/documents.mjs/baseWall.d.ts +17 -15
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +4 -2
- package/src/foundry/common/packages.mjs/packageData.d.ts +3 -4
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +3 -1
- package/src/foundry/common/utils/primitives.mjs.d.ts +8 -1
- package/src/foundry/foundry.js/application.d.ts +139 -111
- package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
- package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
- package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
- package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
- package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/filePicker.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplication.d.ts +45 -14
- package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +5 -5
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +5 -5
- 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/keybindingsConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +4 -4
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +3 -3
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
- package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
- package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
- package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
- package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
- package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
- package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTab.d.ts +4 -7
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
- package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/avSettings.d.ts +11 -0
- package/src/foundry/foundry.js/canvas.d.ts +5 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +38 -35
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/card.d.ts +2 -1
- package/src/foundry/foundry.js/clientDocuments/cards.d.ts +1 -6
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +5 -5
- package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -9
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +39 -38
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +27 -35
- package/src/foundry/foundry.js/clientSettings.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +66 -12
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +78 -67
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +73 -32
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/actors.d.ts +3 -37
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/combatEncounters.d.ts +5 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts +0 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +2 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/items.d.ts +1 -22
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/macros.d.ts +3 -8
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts +7 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +5 -5
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/scenes.d.ts +3 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/users.d.ts +7 -4
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts +2 -2
- package/src/foundry/foundry.js/config.d.ts +5 -2
- package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
- package/src/foundry/foundry.js/hooks.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +18 -7
- package/src/foundry/foundry.js/pixi/index.d.ts +2 -0
- package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
- package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +9 -1
- package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
- package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
- package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
- package/src/foundry/foundry.js/pointSources/lightSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +1 -1
- package/src/foundry/foundry.js/polygonEdge.d.ts +1 -1
- package/src/foundry/foundry.js/quadtree.d.ts +2 -2
- package/src/foundry/foundry.js/ray.d.ts +1 -1
- package/src/foundry/foundry.js/roll.d.ts +13 -11
- package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
- package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
- package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
- package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
- package/src/types/helperTypes.d.ts +31 -13
@@ -62,20 +62,22 @@ interface PackageCompendiumDataConstructorData {
|
|
62
62
|
system?: string | null | undefined;
|
63
63
|
}
|
64
64
|
|
65
|
+
type PackageCompendiumDataSource = PropertiesToSource<PackageCompendiumDataProperties>;
|
66
|
+
|
65
67
|
/**
|
66
68
|
* An inner data object which represents a single compendium pack definition provided by a package in the packs array.
|
67
69
|
*/
|
68
70
|
export class PackageCompendiumData extends DocumentData<
|
69
71
|
PackageCompendiumDataSchema,
|
70
72
|
PackageCompendiumDataProperties,
|
71
|
-
|
73
|
+
PackageCompendiumDataSource,
|
72
74
|
PackageCompendiumDataConstructorData
|
73
75
|
> {
|
74
76
|
/** @override */
|
75
77
|
static defineSchema(): PackageCompendiumDataSchema;
|
76
78
|
|
77
79
|
/** @override */
|
78
|
-
_initializeSource(data: PackageCompendiumDataConstructorData):
|
80
|
+
_initializeSource(data: PackageCompendiumDataConstructorData): PackageCompendiumDataSource;
|
79
81
|
}
|
80
82
|
|
81
83
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { FieldReturnType, PropertiesToSource } from '../../../types/helperTypes';
|
2
2
|
import { DocumentData } from '../abstract/module.mjs';
|
3
|
-
import type { PACKAGE_AVAILABILITY_CODES } from '../constants.mjs
|
3
|
+
import type { PACKAGE_AVAILABILITY_CODES } from '../constants.mjs';
|
4
4
|
import * as fields from '../data/fields.mjs';
|
5
5
|
import { PackageAuthorData, PackageAuthorDataConstructorData } from './packageAuthorData';
|
6
6
|
import { PackageCompendiumData, PackageCompendiumDataConstructorData } from './packageCompendiumData';
|
@@ -296,7 +296,6 @@ interface PackageDataConstructorData {
|
|
296
296
|
*/
|
297
297
|
protected?: boolean | null | undefined;
|
298
298
|
}
|
299
|
-
|
300
299
|
/**
|
301
300
|
* The data schema used to define a Package manifest.
|
302
301
|
* Specific types of packages extend this schema with additional fields.
|
@@ -305,12 +304,12 @@ export class PackageData<
|
|
305
304
|
Schema extends Omit<PackageDataSchema, 'system'>,
|
306
305
|
Properties extends Omit<PackageDataProperties, 'system'>,
|
307
306
|
ConstructorData extends Omit<PackageDataConstructorData, 'system'>
|
308
|
-
> extends DocumentData<Schema, Properties, PropertiesToSource<
|
307
|
+
> extends DocumentData<Schema, Properties, PropertiesToSource<Properties>, ConstructorData> {
|
309
308
|
/** @override */
|
310
309
|
static defineSchema(): Omit<PackageDataSchema, 'system'>;
|
311
310
|
|
312
311
|
/** @override */
|
313
|
-
_initializeSource(data: ConstructorData): PropertiesToSource<
|
312
|
+
_initializeSource(data: ConstructorData): PropertiesToSource<Properties>;
|
314
313
|
|
315
314
|
/**
|
316
315
|
* Determine the availability a package based on the version numbers of its dependencies.
|
@@ -43,13 +43,15 @@ interface PackageDependencyDataConstructorData {
|
|
43
43
|
manifest?: string | null | undefined;
|
44
44
|
}
|
45
45
|
|
46
|
+
type PackageDependencyDataSource = PropertiesToSource<PackageDependencyDataProperties>;
|
47
|
+
|
46
48
|
/**
|
47
49
|
* An inner data object which represents a single package dependency in the dependencies array.
|
48
50
|
*/
|
49
51
|
export class PackageDependencyData extends DocumentData<
|
50
52
|
PackageDependencyDataSchema,
|
51
53
|
PackageDependencyDataProperties,
|
52
|
-
|
54
|
+
PackageDependencyDataSource,
|
53
55
|
PackageDependencyDataConstructorData
|
54
56
|
> {
|
55
57
|
/** @override */
|
@@ -48,13 +48,15 @@ interface PackageLanguageDataConstructorData {
|
|
48
48
|
module?: string | null | undefined;
|
49
49
|
}
|
50
50
|
|
51
|
+
type PackageLanguageDataSource = PropertiesToSource<PackageLanguageDataProperties>;
|
52
|
+
|
51
53
|
/**
|
52
54
|
* An inner data object which represents a single language specification provided by a package in the languages array.
|
53
55
|
*/
|
54
56
|
export class PackageLanguageData extends DocumentData<
|
55
57
|
PackageLanguageDataSchema,
|
56
58
|
PackageLanguageDataProperties,
|
57
|
-
|
59
|
+
PackageLanguageDataSource,
|
58
60
|
PackageLanguageDataConstructorData
|
59
61
|
> {
|
60
62
|
/** @override */
|
@@ -197,7 +197,14 @@ interface NumberConstructor {
|
|
197
197
|
* @param n - A value to test
|
198
198
|
* @returns Is it a number?
|
199
199
|
*/
|
200
|
-
isNumeric(n: unknown):
|
200
|
+
isNumeric(n: unknown): boolean;
|
201
|
+
|
202
|
+
/**
|
203
|
+
* Attempt to create a number from a user-provided string.
|
204
|
+
* @param str - The string.
|
205
|
+
* @returns The number that the string represents, or NaN if no number could be determined.
|
206
|
+
*/
|
207
|
+
fromString(str: string): number;
|
201
208
|
}
|
202
209
|
|
203
210
|
interface ArrayConstructor {
|
@@ -11,11 +11,115 @@ declare let _maxZ: number;
|
|
11
11
|
declare const MIN_WINDOW_WIDTH: 200;
|
12
12
|
declare const MIN_WINDOW_HEIGHT: 50;
|
13
13
|
|
14
|
+
interface ApplicationOptions {
|
15
|
+
/**
|
16
|
+
* A named "base application" which generates an additional hook
|
17
|
+
* @defaultValue `null`
|
18
|
+
*/
|
19
|
+
baseApplication: string | null;
|
20
|
+
|
21
|
+
/**
|
22
|
+
* The default pixel width for the rendered HTML
|
23
|
+
* @defaultValue `null`
|
24
|
+
*/
|
25
|
+
width: number | null;
|
26
|
+
|
27
|
+
/**
|
28
|
+
* The default pixel height for the rendered HTML
|
29
|
+
* @defaultValue `null`
|
30
|
+
*/
|
31
|
+
height: number | 'auto' | null;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* The default offset-top position for the rendered HTML
|
35
|
+
* @defaultValue `null`
|
36
|
+
*/
|
37
|
+
top: number | null;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The default offset-left position for the rendered HTML
|
41
|
+
* @defaultValue `null`
|
42
|
+
*/
|
43
|
+
left: number | null;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* A transformation scale for the rendered HTML
|
47
|
+
* @defaultValue `null`
|
48
|
+
*/
|
49
|
+
scale: number | null;
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Whether to display the application as a pop-out container
|
53
|
+
* @defaultValue `true`
|
54
|
+
*/
|
55
|
+
popOut: boolean;
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Whether the rendered application can be minimized (popOut only)
|
59
|
+
* @defaultValue `true`
|
60
|
+
*/
|
61
|
+
minimizable: boolean;
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Whether the rendered application can be drag-resized (popOut only)
|
65
|
+
* @defaultValue `false`
|
66
|
+
*/
|
67
|
+
resizable: boolean;
|
68
|
+
|
69
|
+
/**
|
70
|
+
* The default CSS id to assign to the rendered HTML
|
71
|
+
* @defaultValue `""`
|
72
|
+
*/
|
73
|
+
id: string;
|
74
|
+
|
75
|
+
/**
|
76
|
+
* An array of CSS string classes to apply to the rendered HTML
|
77
|
+
* @defaultValue `[]`
|
78
|
+
*/
|
79
|
+
classes: string[];
|
80
|
+
|
81
|
+
/**
|
82
|
+
* A default window title string (popOut only)
|
83
|
+
* @defaultValue `""`
|
84
|
+
*/
|
85
|
+
title: string;
|
86
|
+
|
87
|
+
/**
|
88
|
+
* The default HTML template path to render for this Application
|
89
|
+
* @defaultValue `null`
|
90
|
+
*/
|
91
|
+
template: string | null;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* A list of unique CSS selectors which target containers that should
|
95
|
+
* have their vertical scroll positions preserved during a re-render.
|
96
|
+
* @defaultValue `[]`
|
97
|
+
*/
|
98
|
+
scrollY: string[];
|
99
|
+
|
100
|
+
/**
|
101
|
+
* An array of tabbed container configurations which should be enabled
|
102
|
+
* for the application.
|
103
|
+
* @defaultValue `[]`
|
104
|
+
*/
|
105
|
+
tabs: Omit<TabsConfiguration, 'callback'>[];
|
106
|
+
|
107
|
+
/**
|
108
|
+
* @defaultValue `[]`
|
109
|
+
*/
|
110
|
+
dragDrop: Omit<DragDropConfiguration, 'permissions' | 'callbacks'>[];
|
111
|
+
|
112
|
+
/**
|
113
|
+
* @defaultValue `[]`
|
114
|
+
*/
|
115
|
+
filters: Omit<SearchFilterConfiguration, 'callback'>[];
|
116
|
+
}
|
117
|
+
|
14
118
|
/**
|
15
119
|
* The standard application window that is rendered for a large variety of UI elements in Foundry VTT.
|
16
120
|
* @typeParam Options - the type of the options object
|
17
121
|
*/
|
18
|
-
declare abstract class Application<Options extends
|
122
|
+
declare abstract class Application<Options extends ApplicationOptions = ApplicationOptions> {
|
19
123
|
/**
|
20
124
|
* @param options - Configuration options which control how the application is rendered.
|
21
125
|
* Application subclasses may add additional supported options, but the
|
@@ -87,7 +191,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
87
191
|
* Track the most recent scroll positions for any vertically scrolling containers
|
88
192
|
* @defaultValue `null`
|
89
193
|
*/
|
90
|
-
protected _scrollPositions:
|
194
|
+
protected _scrollPositions: Record<string, number> | null;
|
91
195
|
|
92
196
|
/**
|
93
197
|
* The sequence of rendering states that track the Application life-cycle.
|
@@ -105,18 +209,21 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
105
209
|
/**
|
106
210
|
* Create drag-and-drop workflow handlers for this Application
|
107
211
|
* @returns An array of DragDrop handlers
|
212
|
+
* @internal
|
108
213
|
*/
|
109
214
|
protected _createDragDropHandlers(): DragDrop[];
|
110
215
|
|
111
216
|
/**
|
112
217
|
* Create tabbed navigation handlers for this Application
|
113
218
|
* @returns An array of Tabs handlers
|
219
|
+
* @internal
|
114
220
|
*/
|
115
221
|
protected _createTabHandlers(): Tabs[];
|
116
222
|
|
117
223
|
/**
|
118
224
|
* Create search filter handlers for this Application
|
119
225
|
* @returns An array of SearchFilter handlers
|
226
|
+
* @internal
|
120
227
|
*/
|
121
228
|
protected _createSearchFilters(): SearchFilter[];
|
122
229
|
|
@@ -125,7 +232,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
125
232
|
* in this object are merged with any provided option values which are passed to the constructor upon initialization.
|
126
233
|
* Application subclasses may include additional options which are specific to their usage.
|
127
234
|
*/
|
128
|
-
static get defaultOptions():
|
235
|
+
static get defaultOptions(): ApplicationOptions;
|
129
236
|
|
130
237
|
/**
|
131
238
|
* Return the CSS application ID which uniquely references this UI element
|
@@ -193,45 +300,52 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
193
300
|
|
194
301
|
/**
|
195
302
|
* Return the inheritance chain for this Application class up to (and including) it's base Application class.
|
303
|
+
* @internal
|
196
304
|
*/
|
197
305
|
protected static _getInheritanceChain(): typeof Application[];
|
198
306
|
|
199
307
|
/**
|
200
308
|
* Persist the scroll positions of containers within the app before re-rendering the content
|
201
309
|
* @param html - The HTML object being traversed
|
310
|
+
* @internal
|
202
311
|
*/
|
203
312
|
protected _saveScrollPositions(html: JQuery): void;
|
204
313
|
|
205
314
|
/**
|
206
315
|
* Restore the scroll positions of containers within the app after re-rendering the content
|
207
316
|
* @param html - The HTML object being traversed
|
317
|
+
* @internal
|
208
318
|
*/
|
209
319
|
protected _restoreScrollPositions(html: JQuery): void;
|
210
320
|
|
211
321
|
/**
|
212
322
|
* Render the outer application wrapper
|
213
323
|
* @returns A promise resolving to the constructed jQuery object
|
324
|
+
* @internal
|
214
325
|
*/
|
215
|
-
protected _renderOuter(): Promise<
|
326
|
+
protected _renderOuter(): Promise<JQuery>;
|
216
327
|
|
217
328
|
/**
|
218
329
|
* Render the inner application content
|
219
330
|
* @param data - The data used to render the inner template
|
220
331
|
* @returns A promise resolving to the constructed jQuery object
|
221
332
|
* @remarks Some subclasses do not return a promise but the jQuery object directly.
|
333
|
+
* @internal
|
222
334
|
*/
|
223
|
-
protected _renderInner(data: object): Promise<JQuery
|
335
|
+
protected _renderInner(data: object): Promise<JQuery>;
|
224
336
|
|
225
337
|
/**
|
226
338
|
* Customize how inner HTML is replaced when the application is refreshed
|
227
339
|
* @param element - The original HTML processed as a jQuery object
|
228
340
|
* @param html - New updated HTML as a jQuery object
|
341
|
+
* @internal
|
229
342
|
*/
|
230
343
|
protected _replaceHTML(element: JQuery, html: JQuery): void;
|
231
344
|
|
232
345
|
/**
|
233
346
|
* Customize how a new HTML Application is added and first appears in the DOC
|
234
347
|
* @param html - The HTML element which is ready to be added to the DOM
|
348
|
+
* @internal
|
235
349
|
*/
|
236
350
|
protected _injectHTML(html: JQuery): void;
|
237
351
|
|
@@ -239,9 +353,17 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
239
353
|
* Specify the set of config buttons which should appear in the Application header.
|
240
354
|
* Buttons should be returned as an Array of objects.
|
241
355
|
* The header buttons which are added to the application can be modified by the getApplicationHeaderButtons hook.
|
356
|
+
* @internal
|
242
357
|
*/
|
243
358
|
protected _getHeaderButtons(): Application.HeaderButton[];
|
244
359
|
|
360
|
+
/**
|
361
|
+
* Create a {@link ContextMenu} for this Application.
|
362
|
+
* @param html - The Application's HTML.
|
363
|
+
* @internal
|
364
|
+
*/
|
365
|
+
protected _contextMenu(html: JQuery): void;
|
366
|
+
|
245
367
|
/**
|
246
368
|
* Activate required listeners which must be enabled on every Application.
|
247
369
|
* These are internal interactions which should not be overridden by downstream subclasses.
|
@@ -262,6 +384,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
262
384
|
* (unused)
|
263
385
|
* @param active - The new active tab name
|
264
386
|
* (unused)
|
387
|
+
* @internal
|
265
388
|
*/
|
266
389
|
protected _onChangeTab(event: MouseEvent | null, tabs: Tabs, active: string): void;
|
267
390
|
|
@@ -275,6 +398,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
275
398
|
* (unused)
|
276
399
|
* @param html - The HTML element which should be filtered
|
277
400
|
* (unused)
|
401
|
+
* @internal
|
278
402
|
*/
|
279
403
|
protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement): void;
|
280
404
|
|
@@ -283,6 +407,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
283
407
|
* @param selector - The candidate HTML selector for dragging
|
284
408
|
* (unused)
|
285
409
|
* @returns Can the current user drag this selector?
|
410
|
+
* @internal
|
286
411
|
*/
|
287
412
|
protected _canDragStart(selector: string): boolean;
|
288
413
|
|
@@ -291,6 +416,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
291
416
|
* @param selector - The candidate HTML selector for the drop target
|
292
417
|
* (unused)
|
293
418
|
* @returns Can the current user drop on this selector?
|
419
|
+
* @internal
|
294
420
|
*/
|
295
421
|
protected _canDragDrop(selector: string): boolean;
|
296
422
|
|
@@ -298,6 +424,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
298
424
|
* Callback actions which occur at the beginning of a drag start workflow.
|
299
425
|
* @param event - The originating DragEvent
|
300
426
|
* (unused)
|
427
|
+
* @internal
|
301
428
|
*/
|
302
429
|
protected _onDragStart(event: DragEvent): void;
|
303
430
|
|
@@ -305,6 +432,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
305
432
|
* Callback actions which occur when a dragged element is over a drop target.
|
306
433
|
* @param event - originating DragEvent
|
307
434
|
* (unused)
|
435
|
+
* @internal
|
308
436
|
*/
|
309
437
|
protected _onDragOver(event: DragEvent): void;
|
310
438
|
|
@@ -313,6 +441,7 @@ declare abstract class Application<Options extends Application.Options = Applica
|
|
313
441
|
* @param event - The originating DragEvent
|
314
442
|
* (unused)
|
315
443
|
* @internal
|
444
|
+
* @internal
|
316
445
|
*/
|
317
446
|
protected _onDrop(event: DragEvent): void;
|
318
447
|
|
@@ -384,118 +513,17 @@ declare namespace Application {
|
|
384
513
|
onclick: ((ev: JQuery.ClickEvent) => void) | null;
|
385
514
|
}
|
386
515
|
|
387
|
-
interface Options {
|
388
|
-
/**
|
389
|
-
* A named "base application" which generates an additional hook
|
390
|
-
* @defaultValue `null`
|
391
|
-
*/
|
392
|
-
baseApplication: string | null;
|
393
|
-
|
394
|
-
/**
|
395
|
-
* The default pixel width for the rendered HTML
|
396
|
-
* @defaultValue `null`
|
397
|
-
*/
|
398
|
-
width: number | null;
|
399
|
-
|
400
|
-
/**
|
401
|
-
* The default pixel height for the rendered HTML
|
402
|
-
* @defaultValue `null`
|
403
|
-
*/
|
404
|
-
height: number | 'auto' | null;
|
405
|
-
|
406
|
-
/**
|
407
|
-
* The default offset-top position for the rendered HTML
|
408
|
-
* @defaultValue `null`
|
409
|
-
*/
|
410
|
-
top: number | null;
|
411
|
-
|
412
|
-
/**
|
413
|
-
* The default offset-left position for the rendered HTML
|
414
|
-
* @defaultValue `null`
|
415
|
-
*/
|
416
|
-
left: number | null;
|
417
|
-
|
418
|
-
/**
|
419
|
-
* A transformation scale for the rendered HTML
|
420
|
-
*/
|
421
|
-
scale?: number | null | undefined;
|
422
|
-
|
423
|
-
/**
|
424
|
-
* Whether to display the application as a pop-out container
|
425
|
-
* @defaultValue `true`
|
426
|
-
*/
|
427
|
-
popOut: boolean;
|
428
|
-
|
429
|
-
/**
|
430
|
-
* Whether the rendered application can be minimized (popOut only)
|
431
|
-
* @defaultValue `true`
|
432
|
-
*/
|
433
|
-
minimizable: boolean;
|
434
|
-
|
435
|
-
/**
|
436
|
-
* Whether the rendered application can be drag-resized (popOut only)
|
437
|
-
* @defaultValue `false`
|
438
|
-
*/
|
439
|
-
resizable: boolean;
|
440
|
-
|
441
|
-
/**
|
442
|
-
* The default CSS id to assign to the rendered HTML
|
443
|
-
* @defaultValue `""`
|
444
|
-
*/
|
445
|
-
id: string;
|
446
|
-
|
447
|
-
/**
|
448
|
-
* An array of CSS string classes to apply to the rendered HTML
|
449
|
-
* @defaultValue `[]`
|
450
|
-
*/
|
451
|
-
classes: string[];
|
452
|
-
|
453
|
-
/**
|
454
|
-
* A default window title string (popOut only)
|
455
|
-
* @defaultValue `""`
|
456
|
-
*/
|
457
|
-
title: string;
|
458
|
-
|
459
|
-
/**
|
460
|
-
* The default HTML template path to render for this Application
|
461
|
-
* @defaultValue `null`
|
462
|
-
*/
|
463
|
-
template: string | null;
|
464
|
-
|
465
|
-
/**
|
466
|
-
* A list of unique CSS selectors which target containers that should
|
467
|
-
* have their vertical scroll positions preserved during a re-render.
|
468
|
-
* @defaultValue `[]`
|
469
|
-
*/
|
470
|
-
scrollY: string[];
|
471
|
-
|
472
|
-
/**
|
473
|
-
* An array of tabbed container configurations which should be enabled
|
474
|
-
* for the application.
|
475
|
-
* @defaultValue `[]`
|
476
|
-
*/
|
477
|
-
tabs: Omit<TabsConfiguration, 'callback'>[];
|
478
|
-
|
479
|
-
/**
|
480
|
-
* @defaultValue `[]`
|
481
|
-
*/
|
482
|
-
dragDrop: Omit<DragDrop.Options, 'permissions' | 'callbacks'>[];
|
483
|
-
|
484
|
-
/**
|
485
|
-
* @defaultValue `[]`
|
486
|
-
*/
|
487
|
-
filters: Omit<SearchFilter.Options, 'callback'>[];
|
488
|
-
}
|
489
|
-
|
490
516
|
interface Position {
|
491
517
|
width: number | null;
|
492
518
|
height: number | null | 'auto';
|
493
519
|
left: number | null;
|
494
520
|
top: number | null;
|
495
|
-
scale: number | null
|
521
|
+
scale: number | null;
|
522
|
+
/** @defaultValue `0` */
|
523
|
+
zIndex: number;
|
496
524
|
}
|
497
525
|
|
498
|
-
type RenderOptions<Options extends
|
526
|
+
type RenderOptions<Options extends ApplicationOptions = ApplicationOptions> = Partial<Options> & {
|
499
527
|
/**
|
500
528
|
* The left positioning attribute
|
501
529
|
*/
|
@@ -514,7 +542,7 @@ declare namespace Application {
|
|
514
542
|
/**
|
515
543
|
* The rendered height
|
516
544
|
*/
|
517
|
-
height?: number | null | undefined;
|
545
|
+
height?: number | 'auto' | null | undefined;
|
518
546
|
|
519
547
|
/**
|
520
548
|
* The rendered transformation scale
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
declare abstract class BasePlaceableHUD<
|
7
7
|
Object extends PlaceableObject<any> = PlaceableObject,
|
8
|
-
Options extends
|
8
|
+
Options extends ApplicationOptions = ApplicationOptions
|
9
9
|
> extends Application<Options> {
|
10
10
|
/**
|
11
11
|
* Reference a PlaceableObject this HUD is currently bound to
|
@@ -23,7 +23,7 @@ declare abstract class BasePlaceableHUD<
|
|
23
23
|
* })
|
24
24
|
* ```
|
25
25
|
*/
|
26
|
-
static get defaultOptions():
|
26
|
+
static get defaultOptions(): ApplicationOptions;
|
27
27
|
|
28
28
|
/**
|
29
29
|
* Convenience access for the canvas layer which this HUD modifies
|
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* An implementation of the PlaceableHUD base class which renders a heads-up-display interface for Drawing objects.
|
6
6
|
* @typeParam Options - the type of the options object
|
7
7
|
*/
|
8
|
-
class DrawingHUD<Options extends
|
8
|
+
class DrawingHUD<Options extends ApplicationOptions = ApplicationOptions> extends BasePlaceableHUD<
|
9
9
|
ConcreteDrawing,
|
10
10
|
Options
|
11
11
|
> {
|
@@ -19,7 +19,7 @@ declare global {
|
|
19
19
|
* })
|
20
20
|
* ```
|
21
21
|
*/
|
22
|
-
static get defaultOptions():
|
22
|
+
static get defaultOptions(): ApplicationOptions;
|
23
23
|
|
24
24
|
/** @override */
|
25
25
|
getData(options?: Partial<Options>): ReturnType<BasePlaceableHUD<ConcreteDrawing>['getData']> & {
|
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* An implementation of the PlaceableHUD base class which renders a heads-up-display interface for Tile objects.
|
6
6
|
* @typeParam Options - the type of the options object
|
7
7
|
*/
|
8
|
-
class TileHUD<Options extends
|
8
|
+
class TileHUD<Options extends ApplicationOptions = ApplicationOptions> extends BasePlaceableHUD<
|
9
9
|
ConcreteTile,
|
10
10
|
Options
|
11
11
|
> {
|
@@ -19,7 +19,7 @@ declare global {
|
|
19
19
|
* })
|
20
20
|
* ```
|
21
21
|
*/
|
22
|
-
static get defaultOptions():
|
22
|
+
static get defaultOptions(): ApplicationOptions;
|
23
23
|
|
24
24
|
/** @override */
|
25
25
|
getData(options?: Partial<Options>): ReturnType<BasePlaceableHUD<ConcreteTile>['getData']> & {
|
@@ -6,7 +6,7 @@ declare global {
|
|
6
6
|
* This interface provides controls for visibility, attribute bars, elevation, status effects, and more.
|
7
7
|
* @typeParam Options - the type of the options object
|
8
8
|
*/
|
9
|
-
class TokenHUD<Options extends
|
9
|
+
class TokenHUD<Options extends ApplicationOptions = ApplicationOptions> extends BasePlaceableHUD<
|
10
10
|
ConcreteToken,
|
11
11
|
Options
|
12
12
|
> {
|
@@ -27,7 +27,7 @@ declare global {
|
|
27
27
|
* })
|
28
28
|
* ```
|
29
29
|
*/
|
30
|
-
static get defaultOptions():
|
30
|
+
static get defaultOptions(): ApplicationOptions;
|
31
31
|
|
32
32
|
/** @override */
|
33
33
|
bind(object: ConcreteToken): void;
|
@@ -44,7 +44,7 @@ declare global {
|
|
44
44
|
setPosition(_position?: Partial<Application.Position>): void;
|
45
45
|
|
46
46
|
/** @override */
|
47
|
-
getData(options?: Partial<
|
47
|
+
getData(options?: Partial<ApplicationOptions>): ReturnType<BasePlaceableHUD<ConcreteToken>['getData']> & {
|
48
48
|
canConfigure: boolean;
|
49
49
|
canToggleCombat: boolean;
|
50
50
|
displayBar1: boolean;
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* @typeParam Data - The data structure used to render the handlebars template.
|
5
5
|
*/
|
6
6
|
declare class CameraViews<
|
7
|
-
Options extends
|
7
|
+
Options extends ApplicationOptions = ApplicationOptions,
|
8
8
|
Data extends object = CameraViews.Data
|
9
9
|
> extends Application<Options> {
|
10
10
|
/**
|
@@ -18,7 +18,7 @@ declare class CameraViews<
|
|
18
18
|
* })
|
19
19
|
* ```
|
20
20
|
*/
|
21
|
-
static get defaultOptions():
|
21
|
+
static get defaultOptions(): ApplicationOptions;
|
22
22
|
|
23
23
|
/**
|
24
24
|
* A reference to the master AV orchestrator instance
|
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* A simple application which supports popping a ChatMessage out to a separate UI window.
|
6
6
|
* @typeParam Options - the type of the options object
|
7
7
|
*/
|
8
|
-
class ChatPopout<Options extends
|
8
|
+
class ChatPopout<Options extends ApplicationOptions = ApplicationOptions> extends Application<Options> {
|
9
9
|
constructor(message: InstanceType<ConfiguredDocumentClass<typeof ChatMessage>>, options?: Partial<Options>);
|
10
10
|
|
11
11
|
/**
|
@@ -24,7 +24,7 @@ declare global {
|
|
24
24
|
* })
|
25
25
|
* ```
|
26
26
|
*/
|
27
|
-
static get defaultOptions():
|
27
|
+
static get defaultOptions(): ApplicationOptions;
|
28
28
|
|
29
29
|
/** @override */
|
30
30
|
get id(): string;
|
@@ -37,6 +37,6 @@ declare global {
|
|
37
37
|
* @param options - (unused)
|
38
38
|
* @override
|
39
39
|
*/
|
40
|
-
protected _renderInner(data: object, options?: unknown): Promise<JQuery
|
40
|
+
protected _renderInner(data: object, options?: unknown): Promise<JQuery>;
|
41
41
|
}
|
42
42
|
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
*/
|
6
6
|
declare class Compendium<
|
7
7
|
Metadata extends CompendiumCollection.Metadata,
|
8
|
-
Options extends
|
8
|
+
Options extends ApplicationOptions = ApplicationOptions
|
9
9
|
> extends Application<Options> {
|
10
10
|
constructor(collection: CompendiumCollection<Metadata>, options?: Partial<Options>);
|
11
11
|
|
@@ -27,7 +27,7 @@ declare class Compendium<
|
|
27
27
|
* });
|
28
28
|
* ```
|
29
29
|
*/
|
30
|
-
static get defaultOptions():
|
30
|
+
static get defaultOptions(): ApplicationOptions;
|
31
31
|
|
32
32
|
/** @override */
|
33
33
|
get title(): string;
|
@@ -470,7 +470,7 @@ declare namespace FilePicker {
|
|
470
470
|
/**
|
471
471
|
* Options for configuring FilePicker
|
472
472
|
*/
|
473
|
-
interface Options extends
|
473
|
+
interface Options extends ApplicationOptions {
|
474
474
|
/**
|
475
475
|
* A type of file to target, in "audio", "image", "video", "imagevideo" or "folder"
|
476
476
|
*/
|