@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
@@ -1,26 +1,31 @@
|
|
1
|
+
import {
|
2
|
+
ConfiguredDocumentClass,
|
3
|
+
ConfiguredFlags,
|
4
|
+
FieldReturnType,
|
5
|
+
PropertiesToSource
|
6
|
+
} from '../../../../types/helperTypes';
|
1
7
|
import DocumentData from '../../abstract/data.mjs';
|
8
|
+
import * as documents from '../../documents.mjs';
|
2
9
|
import { BaseUser } from '../../documents.mjs';
|
3
|
-
import { ForeignDocumentField } from '../fields.mjs';
|
4
10
|
import * as fields from '../fields.mjs';
|
5
|
-
import
|
6
|
-
import { ConfiguredDocumentClass, FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
|
11
|
+
import { ForeignDocumentField } from '../fields.mjs';
|
7
12
|
|
8
13
|
interface DrawingDataSchema extends DocumentSchema {
|
9
|
-
_id:
|
14
|
+
_id: fields.DocumentId;
|
10
15
|
author: ForeignDocumentField<{ type: typeof documents.BaseUser; required: true }>;
|
11
|
-
type: DocumentField<foundry.CONST.
|
16
|
+
type: DocumentField<foundry.CONST.DRAWING_TYPES> & {
|
12
17
|
type: typeof String;
|
13
18
|
required: true;
|
14
|
-
default: typeof CONST.DRAWING_TYPES.POLYGON;
|
15
|
-
validate: (t: unknown) => t is foundry.CONST.
|
19
|
+
default: typeof foundry.CONST.DRAWING_TYPES.POLYGON;
|
20
|
+
validate: (t: unknown) => t is foundry.CONST.DRAWING_TYPES;
|
16
21
|
validationError: 'Invalid {name} {field} which must be a value in CONST.DRAWING_TYPES';
|
17
22
|
};
|
18
|
-
x:
|
19
|
-
y:
|
20
|
-
width:
|
21
|
-
height:
|
22
|
-
rotation: FieldReturnType<
|
23
|
-
z:
|
23
|
+
x: fields.RequiredNumber;
|
24
|
+
y: fields.RequiredNumber;
|
25
|
+
width: fields.RequiredNumber;
|
26
|
+
height: fields.RequiredNumber;
|
27
|
+
rotation: FieldReturnType<fields.AngleField, { default: 0 }>;
|
28
|
+
z: fields.RequiredNumber;
|
24
29
|
points: DocumentField<Array<[x: number, y: number]>> & {
|
25
30
|
type: [typeof Array];
|
26
31
|
required: true;
|
@@ -28,36 +33,36 @@ interface DrawingDataSchema extends DocumentSchema {
|
|
28
33
|
validate: typeof _validateDrawingPoints;
|
29
34
|
validationError: 'Invalid {name} {field} which must be an array of points [x,y]';
|
30
35
|
};
|
31
|
-
bezierFactor: FieldReturnType<
|
36
|
+
bezierFactor: FieldReturnType<fields.AlphaField, { default: 0 }>;
|
32
37
|
fillType: FieldReturnType<
|
33
|
-
|
38
|
+
fields.RequiredNumber,
|
34
39
|
{
|
35
|
-
default: typeof CONST.DRAWING_FILL_TYPES.NONE;
|
36
|
-
validate: (v: unknown) => v is foundry.CONST.
|
40
|
+
default: typeof foundry.CONST.DRAWING_FILL_TYPES.NONE;
|
41
|
+
validate: (v: unknown) => v is foundry.CONST.DRAWING_FILL_TYPES;
|
37
42
|
validationError: 'Invalid {name} {field} which must be a value in CONST.DRAWING_FILL_TYPES';
|
38
43
|
}
|
39
44
|
>;
|
40
|
-
fillColor:
|
41
|
-
fillAlpha: FieldReturnType<
|
42
|
-
strokeWidth: FieldReturnType<
|
43
|
-
strokeColor:
|
44
|
-
strokeAlpha:
|
45
|
-
texture:
|
46
|
-
text:
|
47
|
-
fontFamily: FieldReturnType<
|
45
|
+
fillColor: fields.ColorField;
|
46
|
+
fillAlpha: FieldReturnType<fields.AlphaField, { default: 0.5 }>;
|
47
|
+
strokeWidth: FieldReturnType<fields.NonnegativeIntegerField, { default: 8 }>;
|
48
|
+
strokeColor: fields.ColorField;
|
49
|
+
strokeAlpha: fields.AlphaField;
|
50
|
+
texture: fields.ImageField;
|
51
|
+
text: fields.StringField;
|
52
|
+
fontFamily: FieldReturnType<fields.RequiredString, { default: 'Signika' }>;
|
48
53
|
fontSize: FieldReturnType<
|
49
|
-
|
54
|
+
fields.PositiveIntegerField,
|
50
55
|
{
|
51
56
|
default: 48;
|
52
57
|
validate: (n: unknown) => boolean;
|
53
58
|
validationError: 'Invalid {name} {field} which must be an integer between 8 and 256';
|
54
59
|
}
|
55
60
|
>;
|
56
|
-
textColor: FieldReturnType<
|
57
|
-
textAlpha:
|
58
|
-
hidden:
|
59
|
-
locked:
|
60
|
-
flags:
|
61
|
+
textColor: FieldReturnType<fields.ColorField, { default: '#FFFFFF' }>;
|
62
|
+
textAlpha: fields.AlphaField;
|
63
|
+
hidden: fields.BooleanField;
|
64
|
+
locked: fields.BooleanField;
|
65
|
+
flags: fields.ObjectField;
|
61
66
|
}
|
62
67
|
|
63
68
|
interface DrawingDataProperties {
|
@@ -77,7 +82,7 @@ interface DrawingDataProperties {
|
|
77
82
|
* The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing
|
78
83
|
* @defaultValue `CONST.DRAWING_TYPES.POLYGON`
|
79
84
|
*/
|
80
|
-
type: foundry.CONST.
|
85
|
+
type: foundry.CONST.DRAWING_TYPES;
|
81
86
|
|
82
87
|
/**
|
83
88
|
* The x-coordinate position of the top-left corner of the drawn shape
|
@@ -131,12 +136,12 @@ interface DrawingDataProperties {
|
|
131
136
|
* The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES
|
132
137
|
* @defaultValue `CONST.DRAWING_FILL_TYPES.NONE`
|
133
138
|
*/
|
134
|
-
fillType: foundry.CONST.
|
139
|
+
fillType: foundry.CONST.DRAWING_FILL_TYPES;
|
135
140
|
|
136
141
|
/**
|
137
142
|
* An optional color string with which to fill the drawing geometry
|
138
143
|
*/
|
139
|
-
fillColor
|
144
|
+
fillColor: string | null | undefined;
|
140
145
|
|
141
146
|
/**
|
142
147
|
* The opacity of the fill applied to the drawing geometry
|
@@ -153,7 +158,7 @@ interface DrawingDataProperties {
|
|
153
158
|
/**
|
154
159
|
* The color of the boundary lines of the drawing geometry
|
155
160
|
*/
|
156
|
-
strokeColor
|
161
|
+
strokeColor: string | null | undefined;
|
157
162
|
|
158
163
|
/**
|
159
164
|
* The opacity of the boundary lines of the drawing geometry
|
@@ -164,12 +169,12 @@ interface DrawingDataProperties {
|
|
164
169
|
/**
|
165
170
|
* The path to a tiling image texture used to fill the drawing geometry
|
166
171
|
*/
|
167
|
-
texture
|
172
|
+
texture: string | null | undefined;
|
168
173
|
|
169
174
|
/**
|
170
175
|
* Optional text which is displayed overtop of the drawing
|
171
176
|
*/
|
172
|
-
text
|
177
|
+
text: string | undefined;
|
173
178
|
|
174
179
|
/**
|
175
180
|
* The font family used to display text within this drawing
|
@@ -211,7 +216,7 @@ interface DrawingDataProperties {
|
|
211
216
|
* An object of optional key/value flags
|
212
217
|
* @defaultValue `{}`
|
213
218
|
*/
|
214
|
-
flags:
|
219
|
+
flags: ConfiguredFlags<'Drawing'>;
|
215
220
|
}
|
216
221
|
|
217
222
|
interface DrawingDataConstructorData {
|
@@ -219,153 +224,153 @@ interface DrawingDataConstructorData {
|
|
219
224
|
* The _id which uniquely identifies this BaseDrawing embedded document
|
220
225
|
* @defaultValue `null`
|
221
226
|
*/
|
222
|
-
_id?: string | null;
|
227
|
+
_id?: string | null | undefined;
|
223
228
|
|
224
229
|
/**
|
225
230
|
* The _id of the user who created the drawing
|
226
231
|
* @defaultValue `null`
|
227
232
|
*/
|
228
|
-
author?: InstanceType<ConfiguredDocumentClass<typeof BaseUser>> | string | null;
|
233
|
+
author?: InstanceType<ConfiguredDocumentClass<typeof BaseUser>> | string | null | undefined;
|
229
234
|
|
230
235
|
/**
|
231
236
|
* The value in CONST.DRAWING_TYPES which defines the geometry type of this drawing
|
232
237
|
* @defaultValue `CONST.DRAWING_TYPES.POLYGON`
|
233
238
|
*/
|
234
|
-
type?: foundry.CONST.
|
239
|
+
type?: foundry.CONST.DRAWING_TYPES | null | undefined;
|
235
240
|
|
236
241
|
/**
|
237
242
|
* The x-coordinate position of the top-left corner of the drawn shape
|
238
243
|
* @defaultValue `0`
|
239
244
|
*/
|
240
|
-
x?: number | null;
|
245
|
+
x?: number | null | undefined;
|
241
246
|
|
242
247
|
/**
|
243
248
|
* The y-coordinate position of the top-left corner of the drawn shape
|
244
249
|
* @defaultValue `0`
|
245
250
|
*/
|
246
|
-
y?: number | null;
|
251
|
+
y?: number | null | undefined;
|
247
252
|
|
248
253
|
/**
|
249
254
|
* The pixel width of the drawing figure
|
250
255
|
* @defaultValue `0`
|
251
256
|
*/
|
252
|
-
width?: number | null;
|
257
|
+
width?: number | null | undefined;
|
253
258
|
|
254
259
|
/**
|
255
260
|
* The pixel height of the drawing figure
|
256
261
|
* @defaultValue `0`
|
257
262
|
*/
|
258
|
-
height?: number | null;
|
263
|
+
height?: number | null | undefined;
|
259
264
|
|
260
265
|
/**
|
261
266
|
* The angle of rotation for the drawing figure
|
262
267
|
* @defaultValue `0`
|
263
268
|
*/
|
264
|
-
rotation?: number | null;
|
269
|
+
rotation?: number | null | undefined;
|
265
270
|
|
266
271
|
/**
|
267
272
|
* The z-index of this drawing relative to other siblings
|
268
273
|
* @defaultValue `0`
|
269
274
|
*/
|
270
|
-
z?: number | null;
|
275
|
+
z?: number | null | undefined;
|
271
276
|
|
272
277
|
/**
|
273
278
|
* An array of points [x,y] which define polygon vertices
|
274
279
|
* @defaultValue `[]`
|
275
280
|
*/
|
276
|
-
points?: Array<[x: number, y: number]> | null;
|
281
|
+
points?: Array<[x: number, y: number]> | null | undefined;
|
277
282
|
|
278
283
|
/**
|
279
284
|
* An amount of bezier smoothing applied, between 0 and 1
|
280
285
|
* @defaultValue `0`
|
281
286
|
*/
|
282
|
-
bezierFactor?: number | null;
|
287
|
+
bezierFactor?: number | null | undefined;
|
283
288
|
|
284
289
|
/**
|
285
290
|
* The fill type of the drawing shape, a value from CONST.DRAWING_FILL_TYPES
|
286
291
|
* @defaultValue `CONST.DRAWING_FILL_TYPES.NONE`
|
287
292
|
*/
|
288
|
-
fillType?: foundry.CONST.
|
293
|
+
fillType?: foundry.CONST.DRAWING_FILL_TYPES | null | undefined;
|
289
294
|
|
290
295
|
/**
|
291
296
|
* An optional color string with which to fill the drawing geometry
|
292
297
|
*/
|
293
|
-
fillColor?: string | null;
|
298
|
+
fillColor?: string | null | undefined;
|
294
299
|
|
295
300
|
/**
|
296
301
|
* The opacity of the fill applied to the drawing geometry
|
297
302
|
* @defaultValue `0.5`
|
298
303
|
*/
|
299
|
-
fillAlpha?: number | null;
|
304
|
+
fillAlpha?: number | null | undefined;
|
300
305
|
|
301
306
|
/**
|
302
307
|
* The width in pixels of the boundary lines of the drawing geometry
|
303
308
|
* @defaultValue `8`
|
304
309
|
*/
|
305
|
-
strokeWidth?: number | null;
|
310
|
+
strokeWidth?: number | null | undefined;
|
306
311
|
|
307
312
|
/**
|
308
313
|
* The color of the boundary lines of the drawing geometry
|
309
314
|
*/
|
310
|
-
strokeColor?: string | null;
|
315
|
+
strokeColor?: string | null | undefined;
|
311
316
|
|
312
317
|
/**
|
313
318
|
* The opacity of the boundary lines of the drawing geometry
|
314
319
|
* @defaultValue `1`
|
315
320
|
*/
|
316
|
-
strokeAlpha?: number | null;
|
321
|
+
strokeAlpha?: number | null | undefined;
|
317
322
|
|
318
323
|
/**
|
319
324
|
* The path to a tiling image texture used to fill the drawing geometry
|
320
325
|
*/
|
321
|
-
texture?: string | null;
|
326
|
+
texture?: string | null | undefined;
|
322
327
|
|
323
328
|
/**
|
324
329
|
* Optional text which is displayed overtop of the drawing
|
325
330
|
*/
|
326
|
-
text?: string | null;
|
331
|
+
text?: string | null | undefined;
|
327
332
|
|
328
333
|
/**
|
329
334
|
* The font family used to display text within this drawing
|
330
335
|
* @defaultValue `'Signika'`
|
331
336
|
*/
|
332
|
-
fontFamily?: string | null;
|
337
|
+
fontFamily?: string | null | undefined;
|
333
338
|
|
334
339
|
/**
|
335
340
|
* The font size used to display text within this drawing
|
336
341
|
* @defaultValue `48`
|
337
342
|
*/
|
338
|
-
fontSize?: number | null;
|
343
|
+
fontSize?: number | null | undefined;
|
339
344
|
|
340
345
|
/**
|
341
346
|
* The color of text displayed within this drawing
|
342
347
|
* @defaultValue `'#FFFFFF'`
|
343
348
|
*/
|
344
|
-
textColor?: string | null;
|
349
|
+
textColor?: string | null | undefined;
|
345
350
|
|
346
351
|
/**
|
347
352
|
* The opacity of text displayed within this drawing
|
348
353
|
* @defaultValue `1`
|
349
354
|
*/
|
350
|
-
textAlpha?: number | null;
|
355
|
+
textAlpha?: number | null | undefined;
|
351
356
|
|
352
357
|
/**
|
353
358
|
* Is the drawing currently hidden?
|
354
359
|
* @defaultValue `false`
|
355
360
|
*/
|
356
|
-
hidden?: boolean | null;
|
361
|
+
hidden?: boolean | null | undefined;
|
357
362
|
|
358
363
|
/**
|
359
364
|
* Is the drawing currently locked?
|
360
365
|
* @defaultValue `false`
|
361
366
|
*/
|
362
|
-
locked?: boolean | null;
|
367
|
+
locked?: boolean | null | undefined;
|
363
368
|
|
364
369
|
/**
|
365
370
|
* An object of optional key/value flags
|
366
371
|
* @defaultValue `{}`
|
367
372
|
*/
|
368
|
-
flags?:
|
373
|
+
flags?: ConfiguredFlags<'Drawing'> | null | undefined;
|
369
374
|
}
|
370
375
|
|
371
376
|
/**
|
@@ -375,13 +380,14 @@ interface DrawingDataConstructorData {
|
|
375
380
|
* @param data - Initial data used to construct the data object
|
376
381
|
* @param document - The embedded document to which this data object belongs
|
377
382
|
*/
|
378
|
-
export
|
383
|
+
export class DrawingData extends DocumentData<
|
379
384
|
DrawingDataSchema,
|
380
385
|
DrawingDataProperties,
|
381
386
|
PropertiesToSource<DrawingDataProperties>,
|
382
387
|
DrawingDataConstructorData,
|
383
388
|
documents.BaseFolder
|
384
389
|
> {
|
390
|
+
/** @override */
|
385
391
|
static defineSchema(): DrawingDataSchema;
|
386
392
|
|
387
393
|
/** @override */
|
@@ -392,7 +398,7 @@ export declare class DrawingData extends DocumentData<
|
|
392
398
|
}
|
393
399
|
|
394
400
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
395
|
-
export
|
401
|
+
export interface DrawingData extends DrawingDataProperties {}
|
396
402
|
|
397
403
|
/**
|
398
404
|
* Validate the array of points which comprises a polygon drawing
|
@@ -1,83 +1,79 @@
|
|
1
|
+
import { FieldReturnType, PropertiesToSource } from '../../../../types/helperTypes';
|
1
2
|
import { DocumentData } from '../../abstract/module.mjs';
|
2
3
|
import { BaseActiveEffect } from '../../documents.mjs';
|
3
4
|
import * as fields from '../fields.mjs';
|
4
|
-
import * as CONST from '../../constants.mjs';
|
5
|
-
import { PropertiesToSource } from '../../../../types/helperTypes';
|
6
5
|
|
7
6
|
interface EffectChangeDataSchema extends DocumentSchema {
|
8
|
-
key:
|
9
|
-
value:
|
10
|
-
mode:
|
11
|
-
|
12
|
-
required: true;
|
13
|
-
default: typeof CONST.ACTIVE_EFFECT_MODES.ADD;
|
14
|
-
validate: (m: unknown) => boolean;
|
15
|
-
validationError: 'Invalid mode specified for change in ActiveEffectData';
|
16
|
-
};
|
17
|
-
priority: typeof fields.NUMERIC_FIELD;
|
7
|
+
key: fields.BlankString;
|
8
|
+
value: fields.BlankString;
|
9
|
+
mode: FieldReturnType<fields.NonnegativeNumberField, { default: typeof foundry.CONST.ACTIVE_EFFECT_MODES.ADD }>;
|
10
|
+
priority: fields.NumericField;
|
18
11
|
}
|
19
12
|
|
20
13
|
interface EffectChangeDataProperties {
|
21
14
|
/**
|
22
15
|
* The attribute path in the Actor or Item data which the change modifies
|
23
|
-
* @defaultValue `
|
16
|
+
* @defaultValue `""`
|
24
17
|
*/
|
25
18
|
key: string;
|
26
19
|
|
27
20
|
/**
|
28
21
|
* The value of the change effect
|
29
|
-
* @defaultValue `
|
22
|
+
* @defaultValue `""`
|
30
23
|
*/
|
31
24
|
value: string;
|
32
25
|
|
33
26
|
/**
|
34
27
|
* The modification mode with which the change is applied
|
28
|
+
* @defaultValue `CONST.ACTIVE_EFFECT_MODES.ADD`
|
35
29
|
*/
|
36
|
-
mode: CONST.
|
30
|
+
mode: foundry.CONST.ACTIVE_EFFECT_MODES;
|
37
31
|
|
38
32
|
/**
|
39
33
|
* The priority level with which this change is applied
|
40
34
|
*/
|
41
|
-
priority
|
35
|
+
priority: number | null | undefined;
|
42
36
|
}
|
43
37
|
|
44
|
-
|
38
|
+
interface EffectChangeDataConstructorData {
|
45
39
|
/**
|
46
40
|
* The attribute path in the Actor or Item data which the change modifies
|
47
|
-
* @defaultValue `
|
41
|
+
* @defaultValue `""`
|
48
42
|
*/
|
49
|
-
key?: string | null;
|
43
|
+
key?: string | null | undefined;
|
50
44
|
|
51
45
|
/**
|
52
46
|
* The value of the change effect
|
53
|
-
* @defaultValue `
|
47
|
+
* @defaultValue `""`
|
54
48
|
*/
|
55
|
-
value?: string | null;
|
49
|
+
value?: string | null | undefined;
|
56
50
|
|
57
51
|
/**
|
58
52
|
* The modification mode with which the change is applied
|
53
|
+
* @defaultValue `CONST.ACTIVE_EFFECT_MODES.ADD`
|
59
54
|
*/
|
60
|
-
mode?: CONST.
|
55
|
+
mode?: foundry.CONST.ACTIVE_EFFECT_MODES | null | undefined;
|
61
56
|
|
62
57
|
/**
|
63
58
|
* The priority level with which this change is applied
|
64
59
|
*/
|
65
|
-
priority?: number | null;
|
60
|
+
priority?: number | null | undefined;
|
66
61
|
}
|
67
62
|
|
68
63
|
/**
|
69
64
|
* An embedded data structure which defines the structure of a change applied by an ActiveEffect.
|
70
65
|
* @see ActiveEffectData
|
71
66
|
*/
|
72
|
-
export
|
67
|
+
export class EffectChangeData extends DocumentData<
|
73
68
|
EffectChangeDataSchema,
|
74
69
|
EffectChangeDataProperties,
|
75
70
|
PropertiesToSource<EffectChangeDataProperties>,
|
76
71
|
EffectChangeDataConstructorData,
|
77
72
|
BaseActiveEffect
|
78
73
|
> {
|
74
|
+
/** @override */
|
79
75
|
static defineSchema(): EffectChangeDataSchema;
|
80
76
|
}
|
81
77
|
|
82
78
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
83
|
-
export
|
79
|
+
export interface EffectChangeData extends EffectChangeDataProperties {}
|
@@ -4,13 +4,13 @@ import { BaseActiveEffect } from '../../documents.mjs';
|
|
4
4
|
import * as fields from '../fields.mjs';
|
5
5
|
|
6
6
|
interface EffectDurationDataSchema extends DocumentSchema {
|
7
|
-
startTime: FieldReturnType<
|
8
|
-
seconds:
|
9
|
-
combat:
|
10
|
-
rounds:
|
11
|
-
turns:
|
12
|
-
startRound:
|
13
|
-
startTurn:
|
7
|
+
startTime: FieldReturnType<fields.NumericField, { default: null }>;
|
8
|
+
seconds: fields.NonnegativeIntegerField;
|
9
|
+
combat: fields.StringField;
|
10
|
+
rounds: fields.NonnegativeIntegerField;
|
11
|
+
turns: fields.NonnegativeIntegerField;
|
12
|
+
startRound: fields.NonnegativeIntegerField;
|
13
|
+
startTurn: fields.NonnegativeIntegerField;
|
14
14
|
}
|
15
15
|
|
16
16
|
interface EffectDurationDataProperties {
|
@@ -23,85 +23,86 @@ interface EffectDurationDataProperties {
|
|
23
23
|
/**
|
24
24
|
* The maximum duration of the effect, in seconds
|
25
25
|
*/
|
26
|
-
seconds
|
26
|
+
seconds: number | undefined;
|
27
27
|
|
28
28
|
/**
|
29
29
|
* The _id of the CombatEncounter in which the effect first started
|
30
30
|
*/
|
31
|
-
combat
|
31
|
+
combat: string | undefined;
|
32
32
|
|
33
33
|
/**
|
34
34
|
* The maximum duration of the effect, in combat rounds
|
35
35
|
*/
|
36
|
-
rounds
|
36
|
+
rounds: number | undefined;
|
37
37
|
|
38
38
|
/**
|
39
39
|
* The maximum duration of the effect, in combat turns
|
40
40
|
*/
|
41
|
-
turns
|
41
|
+
turns: number | undefined;
|
42
42
|
|
43
43
|
/**
|
44
44
|
* The round of the CombatEncounter in which the effect first started
|
45
45
|
*/
|
46
|
-
startRound
|
46
|
+
startRound: number | undefined;
|
47
47
|
|
48
48
|
/**
|
49
49
|
* The turn of the CombatEncounter in which the effect first started
|
50
50
|
*/
|
51
|
-
startTurn
|
51
|
+
startTurn: number | undefined;
|
52
52
|
}
|
53
53
|
|
54
|
-
|
54
|
+
interface EffectDurationDataConstructorData {
|
55
55
|
/**
|
56
56
|
* The world time when the active effect first started
|
57
57
|
* @defaultValue `null`
|
58
58
|
*/
|
59
|
-
startTime?: number | null;
|
59
|
+
startTime?: number | null | undefined;
|
60
60
|
|
61
61
|
/**
|
62
62
|
* The maximum duration of the effect, in seconds
|
63
63
|
*/
|
64
|
-
seconds?: number | null;
|
64
|
+
seconds?: number | null | undefined;
|
65
65
|
|
66
66
|
/**
|
67
67
|
* The _id of the CombatEncounter in which the effect first started
|
68
68
|
*/
|
69
|
-
combat?: string | null;
|
69
|
+
combat?: string | null | undefined;
|
70
70
|
|
71
71
|
/**
|
72
72
|
* The maximum duration of the effect, in combat rounds
|
73
73
|
*/
|
74
|
-
rounds?: number | null;
|
74
|
+
rounds?: number | null | undefined;
|
75
75
|
|
76
76
|
/**
|
77
77
|
* The maximum duration of the effect, in combat turns
|
78
78
|
*/
|
79
|
-
turns?: number | null;
|
79
|
+
turns?: number | null | undefined;
|
80
80
|
|
81
81
|
/**
|
82
82
|
* The round of the CombatEncounter in which the effect first started
|
83
83
|
*/
|
84
|
-
startRound?: number | null;
|
84
|
+
startRound?: number | null | undefined;
|
85
85
|
|
86
86
|
/**
|
87
87
|
* The turn of the CombatEncounter in which the effect first started
|
88
88
|
*/
|
89
|
-
startTurn?: number | null;
|
89
|
+
startTurn?: number | null | undefined;
|
90
90
|
}
|
91
91
|
|
92
92
|
/**
|
93
93
|
* An embedded data structure which tracks the duration of an ActiveEffect.
|
94
94
|
* @see ActiveEffectData
|
95
95
|
*/
|
96
|
-
export
|
96
|
+
export class EffectDurationData extends DocumentData<
|
97
97
|
EffectDurationDataSchema,
|
98
98
|
EffectDurationDataProperties,
|
99
99
|
PropertiesToSource<EffectDurationDataProperties>,
|
100
100
|
EffectDurationDataConstructorData,
|
101
101
|
BaseActiveEffect
|
102
102
|
> {
|
103
|
+
/** @override */
|
103
104
|
static defineSchema(): EffectDurationDataSchema;
|
104
105
|
}
|
105
106
|
|
106
107
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
107
|
-
export
|
108
|
+
export interface EffectDurationData extends EffectDurationDataProperties {}
|