@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/formApplications/documentSheets/lightConfig.d.ts
CHANGED
@@ -1,84 +1,10 @@
|
|
1
|
-
import type { ConfiguredDocumentClassForName } from '../../../../../types/helperTypes';
|
2
|
-
import type { AmbientLightDataConstructorData } from '../../../../common/data/data.mjs/ambientLightData';
|
3
|
-
import type { AnimationDataConstructorData } from '../../../../common/data/data.mjs/animationData';
|
4
|
-
|
5
1
|
declare global {
|
6
2
|
/**
|
7
|
-
*
|
8
|
-
* @typeParam Options - the type of the options object
|
9
|
-
* @typeParam Data - The data structure used to render the handlebars template.
|
3
|
+
* @deprecated since v9
|
10
4
|
*/
|
11
|
-
class LightConfig
|
12
|
-
|
13
|
-
Data extends object = LightConfig.Data<Options>
|
14
|
-
> extends DocumentSheet<Options, Data, InstanceType<ConfiguredDocumentClassForName<'AmbientLight'>>> {
|
15
|
-
/**
|
16
|
-
* @override
|
17
|
-
* @defaultValue
|
18
|
-
* ```typescript
|
19
|
-
* foundry.utils.mergeObject(super.defaultOptions, {
|
20
|
-
* title: "LIGHT.ConfigTitle",
|
21
|
-
* template: "templates/scene/light-config.html",
|
22
|
-
* width: 480
|
23
|
-
* });
|
24
|
-
* ```
|
25
|
-
*/
|
26
|
-
static get defaultOptions(): DocumentSheet.Options;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* @param options - (unused)
|
30
|
-
* @override
|
31
|
-
*/
|
32
|
-
getData(options?: Partial<Options>): Data | Promise<Data>;
|
33
|
-
|
34
|
-
/** @override */
|
35
|
-
close(options?: Application.CloseOptions): Promise<void>;
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Preview the change caused by a change on the form by refreshing the display of the light source
|
39
|
-
*/
|
40
|
-
protected _onChangeInput(event: JQuery.ChangeEvent): Promise<void>;
|
41
|
-
|
42
|
-
/** @override */
|
43
|
-
protected _getSubmitData(
|
44
|
-
updateData?: LightConfig.FormData
|
45
|
-
): ReturnType<DocumentSheet['_getSubmitData']> & { tintAlpha: number };
|
46
|
-
|
47
|
-
/**
|
48
|
-
* @param event - (unused)
|
49
|
-
* @override
|
50
|
-
*/
|
51
|
-
protected _updateObject(
|
52
|
-
event: Event,
|
53
|
-
formData: LightConfig.FormData
|
54
|
-
): Promise<InstanceType<ConfiguredDocumentClassForName<'AmbientLight'>> | undefined>;
|
55
|
-
|
56
|
-
/**
|
57
|
-
* Refresh the display of the AmbientLight object
|
58
|
-
* @internal
|
59
|
-
*/
|
60
|
-
protected _refresh(): void;
|
61
|
-
}
|
62
|
-
|
63
|
-
namespace LightConfig {
|
64
|
-
interface Data<Options extends DocumentSheet.Options>
|
65
|
-
extends DocumentSheet.Data<InstanceType<ConfiguredDocumentClassForName<'AmbientLight'>>, Options> {
|
66
|
-
submitText: string;
|
67
|
-
lightTypes: Record<foundry.CONST.SourceType, string>;
|
68
|
-
lightAnimations: Record<string, string> & {
|
69
|
-
'': 'None';
|
70
|
-
};
|
71
|
-
colorIntensity: number;
|
72
|
-
}
|
73
|
-
|
74
|
-
interface FormData
|
75
|
-
extends Pick<
|
76
|
-
AmbientLightDataConstructorData,
|
77
|
-
'angle' | 'bright' | 'darknessThreshold' | 'dim' | 'rotation' | 't' | 'tintAlpha' | 'tintColor' | 'x' | 'y'
|
78
|
-
> {
|
79
|
-
'lightAnimation.intensity': AnimationDataConstructorData['intensity'];
|
80
|
-
'lightAnimation.speed': AnimationDataConstructorData['speed'];
|
81
|
-
'lightAnimation.type': AnimationDataConstructorData['type'];
|
82
|
-
}
|
5
|
+
class LightConfig extends AmbientLightConfig {
|
6
|
+
constructor(...args: ConstructorParameters<typeof AmbientLightConfig>);
|
83
7
|
}
|
84
8
|
}
|
9
|
+
|
10
|
+
export {};
|
@@ -50,7 +50,7 @@ declare global {
|
|
50
50
|
direction: number | null;
|
51
51
|
distance: number | null;
|
52
52
|
fillColor: string;
|
53
|
-
t: ValueOf<foundry.CONST.
|
53
|
+
t: ValueOf<foundry.CONST.MEASURED_TEMPLATE_TYPES>;
|
54
54
|
texture: string;
|
55
55
|
width: number | null;
|
56
56
|
x: number | null;
|
@@ -51,7 +51,7 @@ declare global {
|
|
51
51
|
entries: Journal['contents'];
|
52
52
|
icons: CONFIG['JournalEntry']['noteIcons'];
|
53
53
|
fontFamilies: Record<string, string>;
|
54
|
-
textAnchors: Record<foundry.CONST.
|
54
|
+
textAnchors: Record<foundry.CONST.TEXT_ANCHOR_POINTS, string>;
|
55
55
|
submitText: string;
|
56
56
|
}
|
57
57
|
|
@@ -63,7 +63,7 @@ declare global {
|
|
63
63
|
iconSize: number | null;
|
64
64
|
iconTint: string;
|
65
65
|
text: string;
|
66
|
-
textAnchor: foundry.CONST.
|
66
|
+
textAnchor: foundry.CONST.TEXT_ANCHOR_POINTS;
|
67
67
|
textColor: string;
|
68
68
|
x: number | null;
|
69
69
|
y: number | null;
|
package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts
CHANGED
@@ -43,14 +43,14 @@ declare global {
|
|
43
43
|
namespace PermissionControl {
|
44
44
|
interface Data<ConcreteDocument extends foundry.abstract.Document<any, any>> extends DocumentSheet.Data {
|
45
45
|
entity: ConcreteDocument;
|
46
|
-
currentDefault: foundry.CONST.
|
46
|
+
currentDefault: foundry.CONST.DOCUMENT_PERMISSION_LEVELS | '-1';
|
47
47
|
instructions: string;
|
48
|
-
defaultLevels: Record<foundry.CONST.
|
49
|
-
playerLevels: Record<foundry.CONST.
|
48
|
+
defaultLevels: Record<foundry.CONST.DOCUMENT_PERMISSION_LEVELS, string> & { '-1'?: string };
|
49
|
+
playerLevels: Record<foundry.CONST.DOCUMENT_PERMISSION_LEVELS | '-1', string> & { '-2'?: string };
|
50
50
|
isFolder: boolean;
|
51
51
|
users: {
|
52
52
|
user: InstanceType<ConfiguredDocumentClassForName<'User'>>;
|
53
|
-
level: foundry.CONST.
|
53
|
+
level: foundry.CONST.DOCUMENT_PERMISSION_LEVELS | '-1';
|
54
54
|
}[];
|
55
55
|
}
|
56
56
|
|
@@ -60,7 +60,7 @@ declare global {
|
|
60
60
|
}
|
61
61
|
|
62
62
|
namespace FormData {
|
63
|
-
type InputPermissionLevel = foundry.CONST.
|
63
|
+
type InputPermissionLevel = foundry.CONST.DOCUMENT_PERMISSION_LEVELS | -1 | -2;
|
64
64
|
}
|
65
65
|
}
|
66
66
|
}
|
package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts
CHANGED
@@ -43,7 +43,7 @@ declare global {
|
|
43
43
|
namespace PlaylistConfig {
|
44
44
|
interface Data<Options extends DocumentSheet.Options = DocumentSheet.Options>
|
45
45
|
extends DocumentSheet.Data<InstanceType<ConfiguredDocumentClass<typeof Playlist>>, Options> {
|
46
|
-
modes: Record<foundry.CONST.
|
46
|
+
modes: Record<foundry.CONST.PLAYLIST_MODES, string>;
|
47
47
|
}
|
48
48
|
}
|
49
49
|
}
|
package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts
CHANGED
@@ -1,8 +1,5 @@
|
|
1
|
-
import type {
|
2
|
-
|
3
|
-
ConstructorDataType,
|
4
|
-
ToObjectFalseType
|
5
|
-
} from '../../../../../types/helperTypes';
|
1
|
+
import type { ConfiguredDocumentClassForName, ToObjectFalseType } from '../../../../../types/helperTypes';
|
2
|
+
import type { TableResultDataConstructorData } from '../../../../common/data/data.mjs/tableResultData.js';
|
6
3
|
|
7
4
|
declare global {
|
8
5
|
/**
|
@@ -12,7 +9,7 @@ declare global {
|
|
12
9
|
*/
|
13
10
|
class RollTableConfig<
|
14
11
|
Options extends DocumentSheet.Options = DocumentSheet.Options,
|
15
|
-
Data extends object =
|
12
|
+
Data extends object = RollTableConfig.Data
|
16
13
|
> extends DocumentSheet<Options, Data, InstanceType<ConfiguredDocumentClassForName<'RollTable'>>> {
|
17
14
|
/**
|
18
15
|
* @defaultValue
|
@@ -55,7 +52,7 @@ declare global {
|
|
55
52
|
*/
|
56
53
|
protected _onCreateResult(
|
57
54
|
event: JQuery.ClickEvent | DragEvent,
|
58
|
-
resultData?:
|
55
|
+
resultData?: TableResultDataConstructorData
|
59
56
|
): Promise<ConfiguredDocumentClassForName<'TableResult'>[]>;
|
60
57
|
|
61
58
|
/**
|
@@ -186,7 +183,7 @@ declare global {
|
|
186
183
|
} & {
|
187
184
|
[Key in number as `results.${number}.text`]: string;
|
188
185
|
} & {
|
189
|
-
[Key in number as `results.${number}.type`]: foundry.CONST.
|
186
|
+
[Key in number as `results.${number}.type`]: foundry.CONST.TABLE_RESULT_TYPES;
|
190
187
|
} & {
|
191
188
|
[Key in number as `results.${number}.weight`]: string;
|
192
189
|
};
|
package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts
CHANGED
@@ -50,7 +50,7 @@ declare global {
|
|
50
50
|
* Get an enumeration of the available grid types which can be applied to this Scene
|
51
51
|
* @internal
|
52
52
|
*/
|
53
|
-
protected static _getGridTypes(): Record<foundry.CONST.
|
53
|
+
protected static _getGridTypes(): Record<foundry.CONST.GRID_TYPES, string>;
|
54
54
|
|
55
55
|
/**
|
56
56
|
* Get the available weather effect types which can be applied to this Scene
|
@@ -127,7 +127,7 @@ declare global {
|
|
127
127
|
gridAlpha: number;
|
128
128
|
gridColor: string;
|
129
129
|
gridDistance: number | null;
|
130
|
-
gridType: foundry.CONST.
|
130
|
+
gridType: foundry.CONST.GRID_TYPES;
|
131
131
|
gridUnits: string;
|
132
132
|
hasGlobalThreshold: boolean;
|
133
133
|
height: number | null;
|
@@ -140,7 +140,7 @@ declare global {
|
|
140
140
|
navName: string;
|
141
141
|
navigation: boolean;
|
142
142
|
padding: number;
|
143
|
-
'permission.default': foundry.CONST.
|
143
|
+
'permission.default': foundry.CONST.DOCUMENT_PERMISSION_LEVELS;
|
144
144
|
playlist: string;
|
145
145
|
shiftX: number | null;
|
146
146
|
shiftY: number | null;
|
@@ -51,7 +51,7 @@ declare global {
|
|
51
51
|
interface Data<Options extends DocumentSheet.Options>
|
52
52
|
extends DocumentSheet.Data<InstanceType<ConfiguredDocumentClassForName<'Tile'>>, Options> {
|
53
53
|
submitText: string;
|
54
|
-
occlusionModes: Record<foundry.CONST.
|
54
|
+
occlusionModes: Record<foundry.CONST.TILE_OCCLUSION_MODES, string>;
|
55
55
|
}
|
56
56
|
|
57
57
|
type FormData = Pick<TileDataConstructorData, 'height' | 'img' | 'rotation' | 'width' | 'x' | 'y'>;
|
@@ -20,7 +20,7 @@
|
|
20
20
|
* ```
|
21
21
|
*/
|
22
22
|
declare class ImagePopout extends FormApplication<ImagePopout.Options, ImagePopout.Data, string> {
|
23
|
-
constructor(src: string, options?: ImagePopout.Options);
|
23
|
+
constructor(src: string, options?: Partial<ImagePopout.Options>);
|
24
24
|
|
25
25
|
/**
|
26
26
|
* @defaultValue `null`
|
@@ -0,0 +1,257 @@
|
|
1
|
+
/**
|
2
|
+
* Allows for viewing and editing of Keybinding Actions
|
3
|
+
*/
|
4
|
+
declare class KeybindingsConfig<
|
5
|
+
Options extends FormApplication.Options = FormApplication.Options,
|
6
|
+
Data extends KeybindingsConfig.Data = KeybindingsConfig.Data
|
7
|
+
> extends FormApplication<Options, Data> {
|
8
|
+
/**
|
9
|
+
* A cached copy of the Categories
|
10
|
+
*/
|
11
|
+
protected _cachedData: KeybindingsConfig.CategoryData | null;
|
12
|
+
|
13
|
+
/**
|
14
|
+
* The category being filtered for
|
15
|
+
*/
|
16
|
+
protected _category: string;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* A Map of pending Edits. The Keys are bindingIds
|
20
|
+
* @internal
|
21
|
+
*/
|
22
|
+
protected _pendingEdits: Map<string, KeybindingsConfig.PendingBinding[]>;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* @override
|
26
|
+
* @defaultValue
|
27
|
+
* ```typescript
|
28
|
+
* foundry.utils.mergeObject(super.defaultOptions, {
|
29
|
+
* title: game.i18n.localize("SETTINGS.Keybindings"),
|
30
|
+
* id: "keybindings",
|
31
|
+
* template: "templates/sidebar/apps/keybindings-config.html",
|
32
|
+
* width: 750,
|
33
|
+
* height: 600,
|
34
|
+
* resizable: true,
|
35
|
+
* scrollY: [".filters", ".category-list"],
|
36
|
+
* filters: [{inputSelector: 'input[name="filter"]', contentSelector: ".category-list"}]
|
37
|
+
* })
|
38
|
+
* ```
|
39
|
+
*/
|
40
|
+
static get defaultOptions(): FormApplication.Options;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* @param options - (unused)
|
44
|
+
* @override
|
45
|
+
*/
|
46
|
+
getData(options?: Partial<Options>): Data;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Builds the set of Bindings into a form usable for display and configuration
|
50
|
+
* @internal
|
51
|
+
*/
|
52
|
+
protected _getCategoryData(): KeybindingsConfig.CategoryData;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Add faux-keybind actions that represent the possible Mouse Controls
|
56
|
+
* @param categories - The current Map of Categories to add to
|
57
|
+
* @returns The number of Actions added
|
58
|
+
* @internal
|
59
|
+
*/
|
60
|
+
protected _addMouseControlsReference(categories: Map<string, KeybindingsConfig.Category>): number;
|
61
|
+
|
62
|
+
/**
|
63
|
+
* Given an Binding and its parent Action, detects other Actions that might conflict with that binding
|
64
|
+
* @param actionId - The namespaced Action ID the Binding belongs to
|
65
|
+
* @param action - The Action config
|
66
|
+
* @param binding - The Binding
|
67
|
+
* @internal
|
68
|
+
*/
|
69
|
+
protected _detectConflictingActions(
|
70
|
+
actionId: string,
|
71
|
+
action: KeybindingActionConfig,
|
72
|
+
binding: KeybindingActionBinding
|
73
|
+
): KeybindingAction[];
|
74
|
+
|
75
|
+
/**
|
76
|
+
* Transforms a Binding into a human readable string representation
|
77
|
+
* @param binding - The Binding
|
78
|
+
* @returns A human readable string
|
79
|
+
* @internal
|
80
|
+
*/
|
81
|
+
protected static _humanizeBinding(binding: KeybindingActionBinding): string;
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Compares two Category Filters for rendering
|
85
|
+
* This method ignores cases of equality because we know our categories are unique
|
86
|
+
* @param a - The first Category
|
87
|
+
* @param b - The second Category
|
88
|
+
* @returns A number for usage in the Sort method
|
89
|
+
* @internal
|
90
|
+
*/
|
91
|
+
protected static _sortCategories(a: KeybindingsConfig.Category, b: KeybindingsConfig.Category): number;
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Classify what Category an Action belongs to
|
95
|
+
* @param action - The Action to classify
|
96
|
+
* @returns The category the Action belongs to
|
97
|
+
* @internal
|
98
|
+
*/
|
99
|
+
protected _categorizeAction(action: KeybindingsConfig): KeybindingsConfig.BaseCategory;
|
100
|
+
|
101
|
+
/** @override */
|
102
|
+
activateListeners(html: JQuery): void;
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Handle left-click events to filter to a certain category
|
106
|
+
* @internal
|
107
|
+
*/
|
108
|
+
protected _onClickCategoryFilter(event: MouseEvent): void;
|
109
|
+
|
110
|
+
/**
|
111
|
+
* Handle left-click events to show / hide a certain category
|
112
|
+
* @internal
|
113
|
+
*/
|
114
|
+
protected _onClickCategoryCollapse(event: MouseEvent): void;
|
115
|
+
|
116
|
+
/**
|
117
|
+
* Handle left-click events to reset all Actions to Default
|
118
|
+
* @internal
|
119
|
+
*/
|
120
|
+
protected _onClickResetActions(event: MouseEvent): Promise<void>;
|
121
|
+
|
122
|
+
/**
|
123
|
+
* Handle Control clicks
|
124
|
+
* @internal
|
125
|
+
*/
|
126
|
+
protected _onClickBindingControl(event: MouseEvent): void;
|
127
|
+
|
128
|
+
/**
|
129
|
+
* Handle left-click events to show / hide a certain category
|
130
|
+
* @internal
|
131
|
+
*/
|
132
|
+
protected _onClickAdd(event: MouseEvent): Promise<void>;
|
133
|
+
|
134
|
+
/**
|
135
|
+
* Handle left-click events to show / hide a certain category
|
136
|
+
* @internal
|
137
|
+
*/
|
138
|
+
protected _onClickDelete(event: MouseEvent): Promise<void>;
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Inserts a Binding into the Pending Edits object, creating a new Map entry as needed
|
142
|
+
* @internal
|
143
|
+
*/
|
144
|
+
protected _addPendingEdit(
|
145
|
+
namespace: string,
|
146
|
+
action: string,
|
147
|
+
bindingIndex: number,
|
148
|
+
binding: KeybindingsConfig.PendingBinding
|
149
|
+
): void;
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Toggle visibility of the Edit / Save UI
|
153
|
+
* @internal
|
154
|
+
*/
|
155
|
+
protected _onClickEditableBinding(event: MouseEvent): void;
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Toggle visibility of the Edit UI
|
159
|
+
* @internal
|
160
|
+
*/
|
161
|
+
protected _onDoubleClickKey(event: MouseEvent): void;
|
162
|
+
|
163
|
+
/**
|
164
|
+
* Save the new Binding value and update the display of the UI
|
165
|
+
* @internal
|
166
|
+
*/
|
167
|
+
protected _onClickSaveBinding(event: MouseEvent): Promise<void>;
|
168
|
+
|
169
|
+
/**
|
170
|
+
* Given a clicked Action element, finds the parent Action
|
171
|
+
* @internal
|
172
|
+
*/
|
173
|
+
protected _getParentAction(event: KeyboardEvent | MouseEvent): {
|
174
|
+
namespace: string;
|
175
|
+
action: string;
|
176
|
+
actionHtml: HTMLElement;
|
177
|
+
};
|
178
|
+
|
179
|
+
/**
|
180
|
+
* Given a Clicked binding control element, finds the parent Binding
|
181
|
+
* @internal
|
182
|
+
*/
|
183
|
+
protected _getParentBinding(event: KeyboardEvent | MouseEvent): { bindingHtml: HTMLElement; bindingId: string };
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Iterates over all Pending edits, merging them in with unedited Bindings and then saving and resetting the UI
|
187
|
+
* @internal
|
188
|
+
*/
|
189
|
+
protected _savePendingEdits(): Promise<void>;
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Processes input from the keyboard to form a list of pending Binding edits
|
193
|
+
* @param event - The keyboard event
|
194
|
+
* @internal
|
195
|
+
*/
|
196
|
+
protected _onKeydownBindingInput(event: KeyboardEvent): void;
|
197
|
+
|
198
|
+
/**
|
199
|
+
* @param event - (unused)
|
200
|
+
* @override
|
201
|
+
*/
|
202
|
+
protected _onSearchFilter(event: KeyboardEvent, query: string, rgx: RegExp, html: HTMLElement): void;
|
203
|
+
|
204
|
+
/** @remarks KeybindingsConfig does not implement this method. */
|
205
|
+
protected _updateObject(event?: unknown, formData?: unknown): Promise<never>;
|
206
|
+
}
|
207
|
+
|
208
|
+
declare namespace KeybindingsConfig {
|
209
|
+
interface Data extends CategoryData {
|
210
|
+
categories: DataCategory[];
|
211
|
+
allActive: boolean;
|
212
|
+
}
|
213
|
+
|
214
|
+
interface DataCategory extends Category {
|
215
|
+
active: boolean;
|
216
|
+
hidden: boolean;
|
217
|
+
}
|
218
|
+
|
219
|
+
interface CategoryData {
|
220
|
+
categories: Category[];
|
221
|
+
totalActions: number;
|
222
|
+
}
|
223
|
+
|
224
|
+
interface BaseCategory {
|
225
|
+
id: string;
|
226
|
+
title: string;
|
227
|
+
}
|
228
|
+
|
229
|
+
interface Category extends BaseCategory {
|
230
|
+
actions: ActionData[];
|
231
|
+
count: number;
|
232
|
+
}
|
233
|
+
|
234
|
+
interface ActionData extends KeybindingActionConfig {
|
235
|
+
category: string;
|
236
|
+
bindings: DisplayBinding[];
|
237
|
+
id: string;
|
238
|
+
name: string;
|
239
|
+
hint?: string;
|
240
|
+
cssClass?: string;
|
241
|
+
notes: string;
|
242
|
+
}
|
243
|
+
|
244
|
+
interface DisplayBinding extends Partial<KeybindingActionBinding> {
|
245
|
+
id: string;
|
246
|
+
display: string;
|
247
|
+
cssClasses: string;
|
248
|
+
isEditable: boolean;
|
249
|
+
isFirst: boolean;
|
250
|
+
conflicts: string;
|
251
|
+
hasConflicts: boolean;
|
252
|
+
}
|
253
|
+
|
254
|
+
interface PendingBinding extends KeybindingActionBinding {
|
255
|
+
index: number;
|
256
|
+
}
|
257
|
+
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import type { ConfiguredDocumentClassForName
|
1
|
+
import type { ConfiguredDocumentClassForName } from '../../../../types/helperTypes';
|
2
|
+
import type { TokenDataConstructorData } from '../../../common/data/data.mjs/tokenData.js';
|
2
3
|
|
3
4
|
declare global {
|
4
5
|
/**
|
@@ -70,9 +71,7 @@ declare global {
|
|
70
71
|
activateListeners(html: JQuery): void;
|
71
72
|
|
72
73
|
/** @override */
|
73
|
-
protected _getSubmitData(
|
74
|
-
updateData?: ConstructorDataType<foundry.data.TokenData>
|
75
|
-
): Record<string, unknown> & { lightAlpha: number };
|
74
|
+
protected _getSubmitData(updateData?: TokenDataConstructorData): Record<string, unknown> & { lightAlpha: number };
|
76
75
|
|
77
76
|
/** @override */
|
78
77
|
protected _updateObject(
|
@@ -115,9 +114,9 @@ declare global {
|
|
115
114
|
barAttributes: Record<string, string[]>;
|
116
115
|
bar1: ReturnType<TokenDocument['getBarAttribute']>;
|
117
116
|
bar2: ReturnType<TokenDocument['getBarAttribute']>;
|
118
|
-
displayModes: Record<foundry.CONST.
|
117
|
+
displayModes: Record<foundry.CONST.TOKEN_DISPLAY_MODES, string>;
|
119
118
|
actors: { _id: string; name: string }[];
|
120
|
-
dispositions: Record<foundry.CONST.
|
119
|
+
dispositions: Record<foundry.CONST.TOKEN_DISPOSITIONS, string>;
|
121
120
|
lightAnimations: { [Key in keyof typeof CONFIG.Canvas.lightAnimations]: string } & { '': string };
|
122
121
|
lightAlpha: number;
|
123
122
|
isGM: boolean;
|
@@ -134,9 +133,9 @@ declare global {
|
|
134
133
|
brightSight: number | null;
|
135
134
|
dimLight: number | null;
|
136
135
|
dimSight: number | null;
|
137
|
-
displayBars: foundry.CONST.
|
138
|
-
displayName: foundry.CONST.
|
139
|
-
disposition: foundry.CONST.
|
136
|
+
displayBars: foundry.CONST.TOKEN_DISPLAY_MODES;
|
137
|
+
displayName: foundry.CONST.TOKEN_DISPLAY_MODES;
|
138
|
+
disposition: foundry.CONST.TOKEN_DISPOSITIONS;
|
140
139
|
elevation: number | null;
|
141
140
|
height: number | null;
|
142
141
|
img: string;
|
@@ -61,12 +61,12 @@ declare global {
|
|
61
61
|
}
|
62
62
|
|
63
63
|
interface FormData {
|
64
|
-
dir: foundry.CONST.
|
65
|
-
door: foundry.CONST.
|
66
|
-
ds?: foundry.CONST.
|
67
|
-
move: foundry.CONST.
|
68
|
-
sense: foundry.CONST.
|
69
|
-
sound: foundry.CONST.
|
64
|
+
dir: foundry.CONST.WALL_DIRECTIONS;
|
65
|
+
door: foundry.CONST.WALL_DOOR_TYPES;
|
66
|
+
ds?: foundry.CONST.WALL_DOOR_STATES;
|
67
|
+
move: foundry.CONST.WALL_MOVEMENT_TYPES;
|
68
|
+
sense: foundry.CONST.WALL_SENSE_TYPES;
|
69
|
+
sound: foundry.CONST.WALL_SENSE_TYPES;
|
70
70
|
}
|
71
71
|
}
|
72
72
|
}
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import { ConfiguredDocumentClass
|
1
|
+
import { ConfiguredDocumentClass } from '../../../../types/helperTypes';
|
2
|
+
import type { ChatMessageDataConstructorData } from '../../../common/data/data.mjs/chatMessageData.js';
|
2
3
|
|
3
4
|
declare global {
|
4
5
|
/**
|
@@ -162,7 +163,7 @@ declare global {
|
|
162
163
|
protected _processDiceCommand(
|
163
164
|
command: string,
|
164
165
|
match: RegExpMatchArray,
|
165
|
-
chatData:
|
166
|
+
chatData: ChatMessageDataConstructorData,
|
166
167
|
createOptions: DocumentModificationContext
|
167
168
|
): void;
|
168
169
|
|
@@ -178,7 +179,7 @@ declare global {
|
|
178
179
|
protected _processWhisperCommand(
|
179
180
|
command: string,
|
180
181
|
match: RegExpMatchArray,
|
181
|
-
chatData:
|
182
|
+
chatData: ChatMessageDataConstructorData,
|
182
183
|
createOptions: DocumentModificationContext
|
183
184
|
): void;
|
184
185
|
|
@@ -193,7 +194,7 @@ declare global {
|
|
193
194
|
protected _processChatCommand(
|
194
195
|
command: string,
|
195
196
|
match: RegExpMatchArray,
|
196
|
-
chatData:
|
197
|
+
chatData: ChatMessageDataConstructorData,
|
197
198
|
createOptions: DocumentModificationContext
|
198
199
|
): void;
|
199
200
|
|
@@ -275,7 +276,7 @@ declare global {
|
|
275
276
|
* @param mode - The new roll mode setting
|
276
277
|
* @internal
|
277
278
|
*/
|
278
|
-
protected static _setRollMode(mode: foundry.CONST.
|
279
|
+
protected static _setRollMode(mode: foundry.CONST.DICE_ROLL_MODES): void;
|
279
280
|
}
|
280
281
|
|
281
282
|
namespace ChatLog {
|
@@ -296,7 +297,7 @@ declare global {
|
|
296
297
|
|
297
298
|
interface Data {
|
298
299
|
user: InstanceType<ConfiguredDocumentClass<typeof User>>;
|
299
|
-
rollMode: foundry.CONST.
|
300
|
+
rollMode: foundry.CONST.DICE_ROLL_MODES;
|
300
301
|
rollModes: typeof CONFIG['Dice']['rollModes'];
|
301
302
|
isStream: boolean;
|
302
303
|
}
|
@@ -60,10 +60,10 @@ declare global {
|
|
60
60
|
namespace CompendiumDirectory {
|
61
61
|
interface Data {
|
62
62
|
user: InstanceType<ConfiguredDocumentClass<typeof User>>;
|
63
|
-
packs: { [DocumentName in foundry.CONST.
|
63
|
+
packs: { [DocumentName in foundry.CONST.COMPENDIUM_DOCUMENT_TYPES]?: PackData<DocumentName> };
|
64
64
|
}
|
65
65
|
|
66
|
-
interface PackData<DocumentName extends foundry.CONST.
|
66
|
+
interface PackData<DocumentName extends foundry.CONST.COMPENDIUM_DOCUMENT_TYPES> {
|
67
67
|
label: DocumentName;
|
68
68
|
packs: CompendiumCollection<CompendiumCollection.Metadata & { entity: DocumentName }>[];
|
69
69
|
}
|