@league-of-foundry-developers/foundry-vtt-types 0.8.9-6 → 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-lenient.d.ts +10 -0
- package/index.d.ts +2 -2
- package/package.json +43 -15
- package/src/foundry/common/abstract/backend.mjs.d.ts +14 -15
- package/src/foundry/common/abstract/document.mjs.d.ts +30 -12
- 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 +72 -66
- 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 +100 -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 +4 -7
- package/src/foundry/foundry.js/applications/cameraViews.d.ts +36 -31
- package/src/foundry/foundry.js/applications/compendium.d.ts +5 -2
- package/src/foundry/foundry.js/applications/filePicker.d.ts +116 -116
- package/src/foundry/foundry.js/applications/formApplication.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +20 -27
- package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +66 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +6 -3
- 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/{folderConfig.d.ts → documentSheets/folderConfig.d.ts} +3 -3
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +4 -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 +60 -0
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +72 -0
- 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 +187 -148
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +133 -110
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +93 -95
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +163 -147
- 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 +2 -3
- package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
- package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +41 -23
- package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +95 -86
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +142 -155
- package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +60 -70
- package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +25 -17
- package/src/foundry/foundry.js/applications/hotbar.d.ts +5 -4
- package/src/foundry/foundry.js/applications/sceneControls.d.ts +13 -3
- package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +90 -71
- 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/actorDirectory.d.ts +13 -56
- 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/itemDirectory.d.ts +7 -30
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/journalDirectory.d.ts +14 -34
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/macroDirectory.d.ts +6 -52
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/sceneDirectory.d.ts +6 -23
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +4 -6
- package/src/foundry/foundry.js/avSettings.d.ts +7 -7
- package/src/foundry/foundry.js/cameraPopoutAppWrapper.d.ts +12 -7
- package/src/foundry/foundry.js/canvas.d.ts +150 -47
- 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/clientDatabaseBackend.d.ts +210 -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/canvasDocuments/tokenDocument.d.ts +1 -1
- 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 +3 -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/prototypeToken.d.ts +15 -0
- 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 +21 -6
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +45 -12
- 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 +494 -902
- package/src/foundry/foundry.js/dragDrop.d.ts +17 -14
- 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/globalVariables.d.ts +7 -4
- 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/mouseInteractionManager.d.ts +78 -34
- 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/canvasLayer.d.ts +2 -1
- 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/placeablesLayer.d.ts +10 -19
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/backgroundLayer.d.ts +6 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/mapLayers/foregroundLayer.d.ts +2 -2
- package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +4 -4
- 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/placeableObject.d.ts +4 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/containers/placeableObjects/wall.d.ts +1 -1
- package/src/foundry/foundry.js/pointSource.d.ts +174 -86
- 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 +40 -9
- package/src/foundry/index.d.ts +5 -0
- package/src/types/utils.d.ts +11 -3
- package/src/foundry/foundry.js/applications/formApplications/measuredTemplateConfig.d.ts +0 -61
- package/src/foundry/foundry.js/applications/formApplications/noteConfig.d.ts +0 -77
@@ -4,26 +4,27 @@ import * as documents from '../../documents.mjs';
|
|
4
4
|
import * as fields from '../fields.mjs';
|
5
5
|
|
6
6
|
interface SettingDataSchema extends DocumentSchema {
|
7
|
-
_id:
|
7
|
+
_id: fields.DocumentId;
|
8
8
|
key: DocumentField<string> & {
|
9
9
|
type: typeof String;
|
10
10
|
required: true;
|
11
11
|
validate: typeof _validateKeyFormat;
|
12
12
|
validationError: 'Invalid setting key format which should be {scope}.{field}';
|
13
13
|
};
|
14
|
-
value: FieldReturnType<
|
14
|
+
value: FieldReturnType<fields.JsonField, { required: true }>;
|
15
15
|
}
|
16
16
|
|
17
17
|
interface SettingDataProperties {
|
18
18
|
/**
|
19
19
|
* The _id which uniquely identifies this Setting document
|
20
|
+
* @defaultValue `null`
|
20
21
|
*/
|
21
22
|
_id: string | null;
|
22
23
|
|
23
24
|
/**
|
24
25
|
* The setting key, a composite of \{scope\}.\{name\}
|
25
26
|
*/
|
26
|
-
key: string
|
27
|
+
key: `${string}.${string}`;
|
27
28
|
|
28
29
|
/**
|
29
30
|
* The setting value, which may be any type of data
|
@@ -35,26 +36,27 @@ interface SettingDataProperties {
|
|
35
36
|
interface SettingDataConstructorData {
|
36
37
|
/**
|
37
38
|
* The _id which uniquely identifies this Setting document
|
39
|
+
* @defaultValue `null`
|
38
40
|
*/
|
39
|
-
_id?: string | null;
|
41
|
+
_id?: string | null | undefined;
|
40
42
|
|
41
43
|
/**
|
42
44
|
* The setting key, a composite of \{scope\}.\{name\}
|
43
45
|
*/
|
44
|
-
key: string
|
46
|
+
key: `${string}.${string}`;
|
45
47
|
|
46
48
|
/**
|
47
49
|
* The setting value, which may be any type of data
|
48
50
|
* @remarks This is the stringified data
|
49
51
|
*/
|
50
|
-
value: string;
|
52
|
+
value: string | object;
|
51
53
|
}
|
52
54
|
|
53
55
|
/**
|
54
56
|
* The data schema for a Setting document.
|
55
57
|
* @see BaseSetting
|
56
58
|
*/
|
57
|
-
export
|
59
|
+
export class SettingData extends DocumentData<
|
58
60
|
SettingDataSchema,
|
59
61
|
SettingDataProperties,
|
60
62
|
PropertiesToSource<SettingDataProperties>,
|
@@ -68,11 +70,12 @@ export declare class SettingData extends DocumentData<
|
|
68
70
|
*/
|
69
71
|
constructor(data: SettingDataConstructorData, document?: documents.BaseSetting | null);
|
70
72
|
|
73
|
+
/** @override */
|
71
74
|
static defineSchema(): SettingDataSchema;
|
72
75
|
}
|
73
76
|
|
74
77
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
75
|
-
export
|
78
|
+
export interface SettingData extends SettingDataProperties {}
|
76
79
|
|
77
80
|
/**
|
78
81
|
* Validate that each setting key matches the expected format
|
@@ -4,27 +4,27 @@ import { BaseTableResult } from '../../documents.mjs';
|
|
4
4
|
import { fields } from '../module.mjs';
|
5
5
|
|
6
6
|
interface TableResultDataSchema extends DocumentSchema {
|
7
|
-
_id:
|
8
|
-
type: DocumentField<foundry.CONST.
|
7
|
+
_id: fields.DocumentId;
|
8
|
+
type: DocumentField<foundry.CONST.TABLE_RESULT_TYPES> & {
|
9
9
|
type: typeof Number;
|
10
|
-
default: typeof CONST.TABLE_RESULT_TYPES.TEXT;
|
11
|
-
validate: (t: unknown) => t is foundry.CONST.
|
10
|
+
default: typeof foundry.CONST.TABLE_RESULT_TYPES.TEXT;
|
11
|
+
validate: (t: unknown) => t is foundry.CONST.TABLE_RESULT_TYPES;
|
12
12
|
validationError: 'Invalid TableResult type provided';
|
13
13
|
};
|
14
|
-
text:
|
15
|
-
img:
|
16
|
-
collection:
|
17
|
-
resultId:
|
18
|
-
weight:
|
19
|
-
range: {
|
14
|
+
text: fields.BlankString;
|
15
|
+
img: fields.ImageField;
|
16
|
+
collection: fields.StringField;
|
17
|
+
resultId: fields.StringField;
|
18
|
+
weight: fields.PositiveIntegerField;
|
19
|
+
range: DocumentField<[number, number]> & {
|
20
20
|
type: [typeof Number];
|
21
21
|
required: true;
|
22
22
|
default: [];
|
23
23
|
validate: typeof _isValidResultRange;
|
24
24
|
validationError: 'Invalid TableResult range which must be a length-2 array of ascending integers';
|
25
25
|
};
|
26
|
-
drawn:
|
27
|
-
flags:
|
26
|
+
drawn: fields.BooleanField;
|
27
|
+
flags: fields.ObjectField;
|
28
28
|
}
|
29
29
|
|
30
30
|
/**
|
@@ -46,17 +46,18 @@ interface TableResultDataProperties {
|
|
46
46
|
* A result sub-type from CONST.TABLE_RESULT_TYPES
|
47
47
|
* @defaultValue `CONST.TABLE_RESULT_TYPES.TEXT`
|
48
48
|
*/
|
49
|
-
type: foundry.CONST.
|
49
|
+
type: foundry.CONST.TABLE_RESULT_TYPES;
|
50
50
|
|
51
51
|
/**
|
52
52
|
* The text which describes the table result
|
53
|
+
* @defaultValue `""`
|
53
54
|
*/
|
54
55
|
text: string;
|
55
56
|
|
56
57
|
/**
|
57
58
|
* An image file url that represents the table result
|
58
59
|
*/
|
59
|
-
img: string | undefined;
|
60
|
+
img: string | null | undefined;
|
60
61
|
|
61
62
|
/**
|
62
63
|
* A named collection from which this result is drawn
|
@@ -70,7 +71,6 @@ interface TableResultDataProperties {
|
|
70
71
|
|
71
72
|
/**
|
72
73
|
* The probabilistic weight of this result relative to other results
|
73
|
-
* @defaultValue `1`
|
74
74
|
*/
|
75
75
|
weight: number | undefined;
|
76
76
|
|
@@ -98,39 +98,39 @@ interface TableResultDataConstructorData {
|
|
98
98
|
* The _id which uniquely identifies this TableResult embedded document
|
99
99
|
* @defaultValue `null`
|
100
100
|
*/
|
101
|
-
_id?: string | null;
|
101
|
+
_id?: string | null | undefined;
|
102
102
|
|
103
103
|
/**
|
104
104
|
* A result sub-type from CONST.TABLE_RESULT_TYPES
|
105
105
|
* @defaultValue `CONST.TABLE_RESULT_TYPES.TEXT`
|
106
106
|
*/
|
107
|
-
type?: foundry.CONST.
|
107
|
+
type?: foundry.CONST.TABLE_RESULT_TYPES | null | undefined;
|
108
108
|
|
109
109
|
/**
|
110
110
|
* The text which describes the table result
|
111
|
+
* @defaultValue `""`
|
111
112
|
*/
|
112
|
-
text?: string | null;
|
113
|
+
text?: string | null | undefined;
|
113
114
|
|
114
115
|
/**
|
115
116
|
* An image file url that represents the table result
|
116
117
|
*/
|
117
|
-
img?: string |
|
118
|
+
img?: string | null | undefined;
|
118
119
|
|
119
120
|
/**
|
120
121
|
* A named collection from which this result is drawn
|
121
122
|
*/
|
122
|
-
collection?: string |
|
123
|
+
collection?: string | null | undefined;
|
123
124
|
|
124
125
|
/**
|
125
126
|
* The _id of a Document within the collection this result references
|
126
127
|
*/
|
127
|
-
resultId?: string |
|
128
|
+
resultId?: string | null | undefined;
|
128
129
|
|
129
130
|
/**
|
130
131
|
* The probabilistic weight of this result relative to other results
|
131
|
-
* @defaultValue `1`
|
132
132
|
*/
|
133
|
-
weight?: number |
|
133
|
+
weight?: number | null | undefined;
|
134
134
|
|
135
135
|
/**
|
136
136
|
* A length 2 array of ascending integers which defines the range of dice roll
|
@@ -142,21 +142,25 @@ interface TableResultDataConstructorData {
|
|
142
142
|
* Has this result already been drawn (without replacement)
|
143
143
|
* @defaultValue `false`
|
144
144
|
*/
|
145
|
-
drawn?: boolean |
|
145
|
+
drawn?: boolean | null | undefined;
|
146
146
|
|
147
147
|
/**
|
148
148
|
* An object of optional key/value flags
|
149
149
|
* @defaultValue `{}`
|
150
150
|
*/
|
151
|
-
flags?: ConfiguredFlags<'TableResult'> |
|
151
|
+
flags?: ConfiguredFlags<'TableResult'> | null | undefined;
|
152
152
|
}
|
153
153
|
|
154
|
-
export
|
154
|
+
export class TableResultData extends DocumentData<
|
155
155
|
TableResultDataSchema,
|
156
156
|
TableResultDataProperties,
|
157
157
|
PropertiesToSource<TableResultDataProperties>,
|
158
158
|
TableResultDataConstructorData,
|
159
159
|
BaseTableResult
|
160
160
|
> {
|
161
|
+
/** @override */
|
161
162
|
static defineSchema(): TableResultDataSchema;
|
162
163
|
}
|
164
|
+
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
166
|
+
export declare interface TableResultData extends TableResultDataProperties {}
|
@@ -1,40 +1,41 @@
|
|
1
|
-
import { TileOcclusion, TileOcclusionConstructorData } from './tileOcclusion';
|
2
|
-
import { VideoData, VideoDataConstructorData } from './videoData';
|
3
1
|
import { ConfiguredFlags, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
|
4
2
|
import DocumentData from '../../abstract/data.mjs';
|
5
3
|
import * as documents from '../../documents.mjs';
|
6
4
|
import * as fields from '../fields.mjs';
|
5
|
+
import { TileOcclusion, TileOcclusionConstructorData } from './tileOcclusion';
|
6
|
+
import { VideoData, VideoDataConstructorData } from './videoData';
|
7
7
|
|
8
8
|
interface TileDataSchema extends DocumentSchema {
|
9
|
-
_id:
|
10
|
-
img:
|
11
|
-
width:
|
12
|
-
height:
|
13
|
-
x:
|
14
|
-
y:
|
15
|
-
z: FieldReturnType<
|
16
|
-
rotation: FieldReturnType<
|
17
|
-
alpha:
|
18
|
-
tint:
|
19
|
-
hidden:
|
20
|
-
locked:
|
21
|
-
overhead: FieldReturnType<
|
9
|
+
_id: fields.DocumentId;
|
10
|
+
img: fields.VideoField;
|
11
|
+
width: fields.RequiredNumber;
|
12
|
+
height: fields.RequiredNumber;
|
13
|
+
x: fields.RequiredNumber;
|
14
|
+
y: fields.RequiredNumber;
|
15
|
+
z: FieldReturnType<fields.IntegerField, { required: true; default: 100 }>;
|
16
|
+
rotation: FieldReturnType<fields.AngleField, { default: 0 }>;
|
17
|
+
alpha: fields.AlphaField;
|
18
|
+
tint: fields.ColorField;
|
19
|
+
hidden: fields.BooleanField;
|
20
|
+
locked: fields.BooleanField;
|
21
|
+
overhead: FieldReturnType<fields.BooleanField, { default: false }>;
|
22
22
|
occlusion: DocumentField<TileOcclusion> & {
|
23
23
|
type: typeof TileOcclusion;
|
24
24
|
required: false;
|
25
|
-
default:
|
25
|
+
default: Record<string, never>;
|
26
26
|
};
|
27
27
|
video: DocumentField<VideoData> & {
|
28
28
|
type: typeof VideoData;
|
29
29
|
required: false;
|
30
|
-
default:
|
30
|
+
default: Record<string, never>;
|
31
31
|
};
|
32
|
-
flags:
|
32
|
+
flags: fields.ObjectField;
|
33
33
|
}
|
34
34
|
|
35
35
|
interface TileDataProperties {
|
36
36
|
/**
|
37
37
|
* The _id which uniquely identifies this Tile embedded document
|
38
|
+
* @defaultValue `null`
|
38
39
|
*/
|
39
40
|
_id: string | null;
|
40
41
|
|
@@ -110,11 +111,13 @@ interface TileDataProperties {
|
|
110
111
|
|
111
112
|
/**
|
112
113
|
* The tile's occlusion settings
|
114
|
+
* @defaultValue `new TileOcclusion({})`
|
113
115
|
*/
|
114
116
|
occlusion: TileOcclusion;
|
115
117
|
|
116
118
|
/**
|
117
119
|
* The tile's video settings
|
120
|
+
* @defaultValue `new VideoData({})`
|
118
121
|
*/
|
119
122
|
video: VideoData;
|
120
123
|
|
@@ -128,107 +131,111 @@ interface TileDataProperties {
|
|
128
131
|
interface TileDataConstructorData {
|
129
132
|
/**
|
130
133
|
* The _id which uniquely identifies this Tile embedded document
|
134
|
+
* @defaultValue `null`
|
131
135
|
*/
|
132
|
-
_id?: string | null;
|
136
|
+
_id?: string | null | undefined;
|
133
137
|
|
134
138
|
/**
|
135
139
|
* An image or video file path which this tile displays
|
136
140
|
*/
|
137
|
-
img?: string | null;
|
141
|
+
img?: string | null | undefined;
|
138
142
|
|
139
143
|
/**
|
140
144
|
* The pixel width of the tile
|
141
145
|
* @defaultValue `0`
|
142
146
|
*/
|
143
|
-
width?: number | null;
|
147
|
+
width?: number | null | undefined;
|
144
148
|
|
145
149
|
/**
|
146
150
|
* The pixel height of the tile
|
147
151
|
* @defaultValue `0`
|
148
152
|
*/
|
149
|
-
height?: number | null;
|
153
|
+
height?: number | null | undefined;
|
150
154
|
|
151
155
|
/**
|
152
156
|
* The x-coordinate position of the top-left corner of the tile
|
153
157
|
* @defaultValue `0`
|
154
158
|
*/
|
155
|
-
x?: number | null;
|
159
|
+
x?: number | null | undefined;
|
156
160
|
|
157
161
|
/**
|
158
162
|
* The y-coordinate position of the top-left corner of the tile
|
159
163
|
* @defaultValue `0`
|
160
164
|
*/
|
161
|
-
y?: number | null;
|
165
|
+
y?: number | null | undefined;
|
162
166
|
|
163
167
|
/**
|
164
168
|
* The z-index ordering of this tile relative to its siblings
|
165
169
|
* @defaultValue `100`
|
166
170
|
*/
|
167
|
-
z?: number | null;
|
171
|
+
z?: number | null | undefined;
|
168
172
|
|
169
173
|
/**
|
170
174
|
* The angle of rotation for the tile between 0 and 360
|
171
175
|
* @defaultValue `0`
|
172
176
|
*/
|
173
|
-
rotation?: number | null;
|
177
|
+
rotation?: number | null | undefined;
|
174
178
|
|
175
179
|
/**
|
176
180
|
* The tile opacity
|
177
181
|
* @defaultValue `1`
|
178
182
|
*/
|
179
|
-
alpha?: number | null;
|
183
|
+
alpha?: number | null | undefined;
|
180
184
|
|
181
185
|
/**
|
182
186
|
* A color to tint the tile
|
183
187
|
*/
|
184
|
-
tint?: string | null;
|
188
|
+
tint?: string | null | undefined;
|
185
189
|
|
186
190
|
/**
|
187
191
|
* Is the tile currently hidden?
|
188
192
|
* @defaultValue `false`
|
189
193
|
*/
|
190
|
-
hidden?: boolean | null;
|
194
|
+
hidden?: boolean | null | undefined;
|
191
195
|
|
192
196
|
/**
|
193
197
|
* Is the tile currently locked?
|
194
198
|
* @defaultValue `false`
|
195
199
|
*/
|
196
|
-
locked?: boolean | null;
|
200
|
+
locked?: boolean | null | undefined;
|
197
201
|
|
198
202
|
/**
|
199
203
|
* Is the tile an overhead tile?
|
200
204
|
* @defaultValue `false`
|
201
205
|
*/
|
202
|
-
overhead?: boolean | null;
|
206
|
+
overhead?: boolean | null | undefined;
|
203
207
|
|
204
208
|
/**
|
205
209
|
* The tile's occlusion settings
|
210
|
+
* @defaultValue `new TileOcclusion({})`
|
206
211
|
*/
|
207
|
-
occlusion?: TileOcclusionConstructorData | null;
|
212
|
+
occlusion?: TileOcclusionConstructorData | null | undefined;
|
208
213
|
|
209
214
|
/**
|
210
215
|
* The tile's video settings
|
216
|
+
* @defaultValue `new VideoData({})`
|
211
217
|
*/
|
212
|
-
video?: VideoDataConstructorData | null;
|
218
|
+
video?: VideoDataConstructorData | null | undefined;
|
213
219
|
|
214
220
|
/**
|
215
221
|
* An object of optional key/value flags
|
216
222
|
* @defaultValue `{}`
|
217
223
|
*/
|
218
|
-
flags?: ConfiguredFlags<'Tile'> | null;
|
224
|
+
flags?: ConfiguredFlags<'Tile'> | null | undefined;
|
219
225
|
}
|
220
226
|
|
221
227
|
/**
|
222
228
|
* The data schema for a Tile embedded document.
|
223
229
|
* @see BaseTile
|
224
230
|
*/
|
225
|
-
export
|
231
|
+
export class TileData extends DocumentData<
|
226
232
|
TileDataSchema,
|
227
233
|
TileDataProperties,
|
228
234
|
PropertiesToSource<TileDataProperties>,
|
229
235
|
TileDataConstructorData,
|
230
236
|
documents.BaseTile
|
231
237
|
> {
|
238
|
+
/** @override */
|
232
239
|
static defineSchema(): TileDataSchema;
|
233
240
|
|
234
241
|
/** @override */
|
@@ -236,4 +243,4 @@ export declare class TileData extends DocumentData<
|
|
236
243
|
}
|
237
244
|
|
238
245
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
239
|
-
export
|
246
|
+
export interface TileData extends TileDataProperties {}
|
@@ -5,14 +5,14 @@ import * as fields from '../fields.mjs';
|
|
5
5
|
|
6
6
|
interface TileOcclusionSchema extends DocumentSchema {
|
7
7
|
mode: FieldReturnType<
|
8
|
-
|
8
|
+
fields.RequiredNumber,
|
9
9
|
{
|
10
|
-
default: typeof CONST.TILE_OCCLUSION_MODES.FADE;
|
11
|
-
validate: (m: unknown) => m is foundry.CONST.
|
10
|
+
default: typeof foundry.CONST.TILE_OCCLUSION_MODES.FADE;
|
11
|
+
validate: (m: unknown) => m is foundry.CONST.TILE_OCCLUSION_MODES;
|
12
12
|
validationError: 'Invalid {name} {field} which must be a value in CONST.TILE_OCCLUSION_MODES';
|
13
13
|
}
|
14
14
|
>;
|
15
|
-
alpha: FieldReturnType<
|
15
|
+
alpha: FieldReturnType<fields.AlphaField, { default: 0 }>;
|
16
16
|
}
|
17
17
|
|
18
18
|
interface TileOcclusionProperties {
|
@@ -20,7 +20,7 @@ interface TileOcclusionProperties {
|
|
20
20
|
* The occlusion mode from CONST.TILE_OCCLUSION_MODES
|
21
21
|
* @defaultValue `CONST.TILE_OCCLUSION_MODES.FADE`
|
22
22
|
*/
|
23
|
-
mode: foundry.CONST.
|
23
|
+
mode: foundry.CONST.TILE_OCCLUSION_MODES;
|
24
24
|
|
25
25
|
/**
|
26
26
|
* The occlusion alpha between 0 and 1
|
@@ -29,30 +29,31 @@ interface TileOcclusionProperties {
|
|
29
29
|
alpha: number;
|
30
30
|
}
|
31
31
|
|
32
|
-
|
32
|
+
interface TileOcclusionConstructorData {
|
33
33
|
/**
|
34
34
|
* The occlusion mode from CONST.TILE_OCCLUSION_MODES
|
35
35
|
* @defaultValue `CONST.TILE_OCCLUSION_MODES.FADE`
|
36
36
|
*/
|
37
|
-
mode?: foundry.CONST.
|
37
|
+
mode?: foundry.CONST.TILE_OCCLUSION_MODES | null | undefined;
|
38
38
|
|
39
39
|
/**
|
40
40
|
* The occlusion alpha between 0 and 1
|
41
41
|
* @defaultValue `0`
|
42
42
|
*/
|
43
|
-
alpha?: number | null;
|
43
|
+
alpha?: number | null | undefined;
|
44
44
|
}
|
45
45
|
|
46
46
|
/**
|
47
47
|
* An inner-object which defines the schema for how Tile occlusion settings are defined
|
48
48
|
*/
|
49
|
-
export
|
49
|
+
export class TileOcclusion extends DocumentData<
|
50
50
|
TileOcclusionSchema,
|
51
51
|
TileOcclusionProperties,
|
52
52
|
PropertiesToSource<TileOcclusionProperties>,
|
53
53
|
TileOcclusionConstructorData,
|
54
54
|
documents.BaseTile
|
55
55
|
> {
|
56
|
+
/** @override */
|
56
57
|
static defineSchema(): TileOcclusionSchema;
|
57
58
|
}
|
58
59
|
|
@@ -14,28 +14,31 @@ interface TokenBarDataSchema extends DocumentSchema {
|
|
14
14
|
interface TokenBarDataProperties {
|
15
15
|
/**
|
16
16
|
* The attribute path within the Token's Actor data which should be displayed
|
17
|
+
* @defaultValue `null`
|
17
18
|
*/
|
18
19
|
attribute: string | null;
|
19
20
|
}
|
20
21
|
|
21
|
-
|
22
|
+
interface TokenBarDataConstructorData {
|
22
23
|
/**
|
23
24
|
* The attribute path within the Token's Actor data which should be displayed
|
25
|
+
* @defaultValue `null`
|
24
26
|
*/
|
25
|
-
attribute?: string | null;
|
27
|
+
attribute?: string | null | undefined;
|
26
28
|
}
|
27
29
|
|
28
30
|
/**
|
29
31
|
* An embedded data structure for the contents of a Token attribute bar.
|
30
32
|
* @see TokenData
|
31
33
|
*/
|
32
|
-
export
|
34
|
+
export class TokenBarData extends DocumentData<
|
33
35
|
TokenBarDataSchema,
|
34
36
|
TokenBarDataProperties,
|
35
37
|
PropertiesToSource<TokenBarDataProperties>,
|
36
38
|
TokenBarDataConstructorData,
|
37
39
|
documents.BaseToken
|
38
40
|
> {
|
41
|
+
/** @override */
|
39
42
|
static defineSchema(): TokenBarDataSchema;
|
40
43
|
}
|
41
44
|
|