@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
@@ -55,7 +55,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
55
55
|
*
|
56
56
|
* @example <caption>A Document may belong to a Folder</caption>
|
57
57
|
* ```typescript
|
58
|
-
* let folder = game.folders.
|
58
|
+
* let folder = game.folders.contents[0];
|
59
59
|
* let actor = await Actor.create({name: "New Actor", folder: folder.id});
|
60
60
|
* console.log(actor.data.folder); // folder.id;
|
61
61
|
* console.log(actor.folder); // folder;
|
@@ -86,7 +86,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
86
86
|
|
87
87
|
/**
|
88
88
|
* Return the permission level that the current game User has over this Document.
|
89
|
-
* See the CONST.
|
89
|
+
* See the CONST.DOCUMENT_PERMISSION_LEVELS object for an enumeration of these levels.
|
90
90
|
*
|
91
91
|
* @example
|
92
92
|
* ```typescript
|
@@ -95,7 +95,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
95
95
|
* actor.permission; // 2
|
96
96
|
* ```
|
97
97
|
*/
|
98
|
-
get permission(): ValueOf<typeof CONST.
|
98
|
+
get permission(): ValueOf<typeof CONST.DOCUMENT_PERMISSION_LEVELS>;
|
99
99
|
|
100
100
|
/**
|
101
101
|
* Lazily obtain a FormApplication instance used to configure this Document, or null if no sheet is available.
|
@@ -133,7 +133,7 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
133
133
|
/**
|
134
134
|
* Prepare all embedded Document instances which exist within this primary Document.
|
135
135
|
*/
|
136
|
-
|
136
|
+
prepareEmbeddedDocuments(): void;
|
137
137
|
|
138
138
|
/**
|
139
139
|
* Apply transformations or derivations to the values of the source data object.
|
@@ -273,18 +273,20 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
273
273
|
* Choose a name and a type from a select menu of types.
|
274
274
|
* @param data - Initial data with which to populate the creation form
|
275
275
|
* (default: `{}`)
|
276
|
-
* @param
|
276
|
+
* @param context - Additional context options or dialog positioning options
|
277
277
|
* (default: `{}`)
|
278
278
|
* @returns A Promise which resolves to the created Document
|
279
279
|
*/
|
280
280
|
static createDialog<T extends DocumentConstructor>(
|
281
281
|
this: T,
|
282
|
-
data?:
|
283
|
-
|
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
282
|
+
data?:
|
283
|
+
| DeepPartial<
|
284
|
+
| ConstructorDataType<InstanceType<T>['data']>
|
285
|
+
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
286
|
+
>
|
287
|
+
| undefined,
|
288
|
+
context?: (Pick<DocumentModificationContext, 'parent' | 'pack'> & Partial<Dialog.Options>) | undefined
|
289
|
+
): Promise<InstanceType<ConfiguredDocumentClass<T>> | null | undefined>;
|
288
290
|
|
289
291
|
/**
|
290
292
|
* Present a Dialog form to confirm deletion of this Document.
|
@@ -292,18 +294,19 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
292
294
|
* (default: `{}`)
|
293
295
|
* @returns A Promise which resolves to the deleted Document
|
294
296
|
*/
|
295
|
-
deleteDialog(options?: Dialog.Options): Promise<this | undefined>;
|
297
|
+
deleteDialog(options?: Partial<Dialog.Options> | undefined): Promise<this | false | null | undefined>;
|
296
298
|
|
297
299
|
/**
|
298
|
-
* Export
|
300
|
+
* Export document data to a JSON file which can be saved by the client and later imported into a different session.
|
301
|
+
* @param options - Additional options passed to the {@link ClientDocumentMixin#toCompendium} method
|
299
302
|
*/
|
300
|
-
exportToJSON(): void;
|
303
|
+
exportToJSON(options?: CompendiumExportOptions): void;
|
301
304
|
|
302
305
|
/**
|
303
306
|
* A helper function to handle obtaining the relevant Document from dropped data provided via a DataTransfer event.
|
304
307
|
* The dropped data could have:
|
305
308
|
* 1. A compendium pack and entry id
|
306
|
-
* 2. A World
|
309
|
+
* 2. A World Document _id
|
307
310
|
* 3. A data object explicitly provided
|
308
311
|
*
|
309
312
|
* @param data - The data object extracted from a DataTransfer event
|
@@ -332,104 +335,55 @@ export declare class ClientDocumentMixin<T extends foundry.abstract.Document<any
|
|
332
335
|
* Transform the Document data to be stored in a Compendium pack.
|
333
336
|
* Remove any features of the data which are world-specific.
|
334
337
|
* This function is asynchronous in case any complex operations are required prior to exporting.
|
335
|
-
* @param pack
|
338
|
+
* @param pack - A specific pack being exported to
|
339
|
+
* (unused)
|
340
|
+
* @param options - Additional options which modify how the document is converted
|
341
|
+
* (default: `{}`)
|
336
342
|
* @returns A data object of cleaned data suitable for compendium import
|
337
343
|
*/
|
338
|
-
toCompendium(
|
339
|
-
|
340
|
-
|
341
|
-
> & {
|
344
|
+
toCompendium(
|
345
|
+
pack?: CompendiumCollection<CompendiumCollection.Metadata> | null,
|
346
|
+
options?: CompendiumExportOptions
|
347
|
+
): Omit<T['data']['_source'], '_id' | 'folder' | 'permission'> & {
|
342
348
|
permission?: T['data']['_source']['permission'];
|
343
349
|
};
|
344
350
|
|
345
351
|
/**
|
346
|
-
* @deprecated since
|
347
|
-
*/
|
348
|
-
get _id(): T['id'];
|
349
|
-
|
350
|
-
/**
|
351
|
-
* @deprecated since 0.8.0
|
352
|
-
*/
|
353
|
-
static get config(): any;
|
354
|
-
|
355
|
-
/**
|
356
|
-
* @deprecated since 0.8.0
|
357
|
-
*/
|
358
|
-
get entity(): T['documentName'];
|
359
|
-
|
360
|
-
/**
|
361
|
-
* @deprecated since 0.8.0
|
362
|
-
*/
|
363
|
-
get owner(): this['isOwner'];
|
364
|
-
|
365
|
-
/**
|
366
|
-
* @deprecated since 0.8.0
|
367
|
-
*/
|
368
|
-
hasPerm(
|
369
|
-
user: foundry.documents.BaseUser,
|
370
|
-
permission: keyof typeof foundry.CONST.ENTITY_PERMISSIONS | foundry.CONST.EntityPermission,
|
371
|
-
exact?: boolean
|
372
|
-
): ReturnType<T['testUserPermission']>;
|
373
|
-
|
374
|
-
/**
|
375
|
-
* @deprecated since 0.8.0
|
352
|
+
* @deprecated since v9 - Use prepareEmbeddedDocuments instead.
|
376
353
|
*/
|
377
|
-
|
378
|
-
|
379
|
-
updates?:
|
380
|
-
| Array<
|
381
|
-
DeepPartial<
|
382
|
-
| ConstructorDataType<InstanceType<T>['data']>
|
383
|
-
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
384
|
-
> & { _id: string }
|
385
|
-
>
|
386
|
-
| (DeepPartial<
|
387
|
-
| ConstructorDataType<InstanceType<T>['data']>
|
388
|
-
| (ConstructorDataType<InstanceType<T>['data']> & Record<string, unknown>)
|
389
|
-
> & { _id: string }),
|
390
|
-
options?: DocumentModificationContext & foundry.utils.MergeObjectOptions
|
391
|
-
): Promise<InstanceType<ConfiguredDocumentClass<T>>[]>;
|
354
|
+
prepareEmbeddedEntities(): void;
|
355
|
+
}
|
392
356
|
|
357
|
+
interface CompendiumExportOptions {
|
393
358
|
/**
|
394
|
-
*
|
359
|
+
* Clear the flags object
|
360
|
+
* @defaultValue `false`
|
395
361
|
*/
|
396
|
-
|
397
|
-
this: T,
|
398
|
-
ids?: string[],
|
399
|
-
options?: DocumentModificationContext
|
400
|
-
): Promise<InstanceType<ConfiguredDocumentClass<T>>[]>;
|
362
|
+
clearFlags: boolean;
|
401
363
|
|
402
364
|
/**
|
403
|
-
*
|
365
|
+
* Clear the currently assigned folder and sort order
|
366
|
+
* @defaultValue `true`
|
404
367
|
*/
|
405
|
-
|
368
|
+
clearSort: boolean;
|
406
369
|
|
407
370
|
/**
|
408
|
-
*
|
371
|
+
* Clear document permissions
|
372
|
+
* @defaultValue `true`
|
409
373
|
*/
|
410
|
-
|
411
|
-
documentName: string,
|
412
|
-
data?: Record<string, unknown> | Array<Record<string, unknown>>,
|
413
|
-
options?: DocumentModificationContext
|
414
|
-
): ReturnType<T['createEmbeddedDocuments']>;
|
374
|
+
clearPermissions: boolean;
|
415
375
|
|
416
376
|
/**
|
417
|
-
*
|
377
|
+
* Clear fields which store document state
|
378
|
+
* @defaultValue `true`
|
418
379
|
*/
|
419
|
-
|
420
|
-
documentName: string,
|
421
|
-
data?: Array<Record<string, unknown>> | Record<string, unknown>,
|
422
|
-
options?: DocumentModificationContext
|
423
|
-
): ReturnType<T['updateEmbeddedDocuments']>;
|
380
|
+
clearState: boolean;
|
424
381
|
|
425
382
|
/**
|
426
|
-
*
|
383
|
+
* Retain the current Document id
|
384
|
+
* @defaultValue `false`
|
427
385
|
*/
|
428
|
-
|
429
|
-
documentName: string,
|
430
|
-
ids: string[] | string,
|
431
|
-
options: DocumentModificationContext
|
432
|
-
): ReturnType<T['deleteEmbeddedDocuments']>;
|
386
|
+
keepId: boolean;
|
433
387
|
}
|
434
388
|
|
435
389
|
interface SortOptions<T> {
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { ConfiguredDocumentClass } from '../../../types/helperTypes';
|
1
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
2
|
-
import {
|
3
|
+
import type { ActiveEffectDataConstructorData } from '../../common/data/data.mjs/activeEffectData.js';
|
3
4
|
import { EffectChangeData } from '../../common/data/data.mjs/effectChangeData';
|
4
5
|
|
5
6
|
declare global {
|
@@ -133,7 +134,7 @@ declare global {
|
|
133
134
|
protected _getSourceName(): Promise<string>;
|
134
135
|
|
135
136
|
protected _preCreate(
|
136
|
-
data:
|
137
|
+
data: ActiveEffectDataConstructorData,
|
137
138
|
options: DocumentModificationOptions,
|
138
139
|
user: foundry.documents.BaseUser
|
139
140
|
): Promise<void>;
|
@@ -1,11 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
ConfiguredDocumentClass,
|
3
|
-
ConfiguredObjectClassForName,
|
4
|
-
ConstructorDataType,
|
5
|
-
DocumentConstructor
|
6
|
-
} from '../../../types/helperTypes';
|
1
|
+
import { ConfiguredDocumentClass, ConfiguredObjectClassForName, DocumentConstructor } from '../../../types/helperTypes';
|
7
2
|
import { DocumentModificationOptions } from '../../common/abstract/document.mjs';
|
8
3
|
import EmbeddedCollection from '../../common/abstract/embedded-collection.mjs';
|
4
|
+
import type { ActorDataConstructorData } from '../../common/data/data.mjs/actorData.js';
|
9
5
|
|
10
6
|
declare global {
|
11
7
|
/**
|
@@ -170,7 +166,7 @@ declare global {
|
|
170
166
|
|
171
167
|
/** @override */
|
172
168
|
protected _preCreate(
|
173
|
-
data:
|
169
|
+
data: ActorDataConstructorData,
|
174
170
|
options: DocumentModificationOptions,
|
175
171
|
user: foundry.documents.BaseUser
|
176
172
|
): Promise<void>;
|
@@ -6,9 +6,4 @@
|
|
6
6
|
* @see {@link documents.Scene} The Scene document type which contains AmbientSound embedded documents
|
7
7
|
* @see {@link applications.AmbientSoundConfig} The AmbientSound configuration application
|
8
8
|
*/
|
9
|
-
declare class AmbientSoundDocument extends CanvasDocumentMixin(foundry.documents.BaseAmbientSound) {
|
10
|
-
/**
|
11
|
-
* A convenience accessor for the sound type
|
12
|
-
*/
|
13
|
-
get type(): foundry.data.AmbientSoundData['type'];
|
14
|
-
}
|
9
|
+
declare class AmbientSoundDocument extends CanvasDocumentMixin(foundry.documents.BaseAmbientSound) {}
|
@@ -204,7 +204,7 @@ declare global {
|
|
204
204
|
/**
|
205
205
|
* Inspect the Actor data model and identify the set of attributes which could be used for a Token Bar
|
206
206
|
*/
|
207
|
-
static getTrackedAttributeChoices(attributes?: TrackedAttributes):
|
207
|
+
static getTrackedAttributeChoices(attributes?: TrackedAttributes): Record<string, string[]>;
|
208
208
|
}
|
209
209
|
}
|
210
210
|
|
@@ -0,0 +1,133 @@
|
|
1
|
+
import type { ConfiguredDocumentClassForName, ConstructorDataType } from '../../../types/helperTypes';
|
2
|
+
|
3
|
+
declare global {
|
4
|
+
/**
|
5
|
+
* The client-side Card document which extends the common BaseCard model.
|
6
|
+
* Each Card document contains CardData which defines its data schema.
|
7
|
+
*
|
8
|
+
* @see {@link data.CardData} The Card data schema
|
9
|
+
* @see {@link documents.Cards} The Cards document type which contains Card embedded documents
|
10
|
+
*/
|
11
|
+
class Card extends ClientDocumentMixin(foundry.documents.BaseCard) {
|
12
|
+
/**
|
13
|
+
* The card back.
|
14
|
+
* This reference is cached and lazily evaluated to retrieve an image and name from the source deck.
|
15
|
+
*/
|
16
|
+
get back(): foundry.data.CardFaceData;
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @defaultValue `undefined`
|
20
|
+
* @internal
|
21
|
+
*/
|
22
|
+
protected _back?: foundry.data.CardFaceData | undefined;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* The current card face
|
26
|
+
*/
|
27
|
+
get face(): foundry.data.CardFaceData | null;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The image used to depict the back of this card
|
31
|
+
*/
|
32
|
+
get backImg(): string;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The image of the currently displayed card face or back
|
36
|
+
*/
|
37
|
+
get img(): string;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* The name of the current card face, or the name of the card itself
|
41
|
+
*/
|
42
|
+
get name(): string;
|
43
|
+
|
44
|
+
/**
|
45
|
+
* A reference to the source Cards document which defines this Card.
|
46
|
+
*/
|
47
|
+
get source(): InstanceType<ConfiguredDocumentClassForName<'Cards'>> | undefined | null;
|
48
|
+
|
49
|
+
/**
|
50
|
+
* A convenience property for whether or not the Card is within its source Cards stack.
|
51
|
+
*/
|
52
|
+
get isHome(): boolean;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* Whether or not to display the face of this card?
|
56
|
+
*/
|
57
|
+
get showFace(): boolean;
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Does this Card have a next face available to flip to?
|
61
|
+
*/
|
62
|
+
get hasNextFace(): boolean;
|
63
|
+
|
64
|
+
/**
|
65
|
+
* Does this Card have a previous face available to flip to?
|
66
|
+
*/
|
67
|
+
get hasPreviousFace(): boolean;
|
68
|
+
|
69
|
+
/** @override */
|
70
|
+
prepareDerivedData(): void;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Flip this card to some other face. A specific face may be requested, otherwise:
|
74
|
+
* If the card currently displays a face the card is flipped to the back.
|
75
|
+
* If the card currently displays the back it is flipped to the first face.
|
76
|
+
* @param face - A specific face to flip the card to
|
77
|
+
* @returns A reference to this card after the flip operation is complete
|
78
|
+
*/
|
79
|
+
flip(face?: number | null | undefined): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>> | undefined>;
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Pass this Card to some other Cards document.
|
83
|
+
* @param to - A new Cards document this card should be passed to
|
84
|
+
* @param options - (default: `{}`)
|
85
|
+
* @returns A reference to this card after the it has been passed to another parent document
|
86
|
+
*/
|
87
|
+
pass(
|
88
|
+
to: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
89
|
+
options?: Cards.PassOptions | undefined
|
90
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>> | undefined>;
|
91
|
+
|
92
|
+
/**
|
93
|
+
* Play a specific card to some other Cards document.
|
94
|
+
* This method is currently a more semantic alias for Card#pass.
|
95
|
+
* @see Card#pass
|
96
|
+
*/
|
97
|
+
play(
|
98
|
+
to: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
99
|
+
options?: Cards.PassOptions | undefined
|
100
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>> | undefined>;
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Discard a specific card to some other Cards document.
|
104
|
+
* This method is currently a more semantic alias for Card#pass.
|
105
|
+
* @see Card#pass
|
106
|
+
*/
|
107
|
+
discard(
|
108
|
+
to: InstanceType<ConfiguredDocumentClassForName<'Cards'>>,
|
109
|
+
options?: Cards.PassOptions | undefined
|
110
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>> | undefined>;
|
111
|
+
|
112
|
+
/**
|
113
|
+
* Reset this Card to its original Cards parent.
|
114
|
+
* @param options - Options which modify the reset operation
|
115
|
+
* (default: `{}`)
|
116
|
+
* @returns A reference to the reset card belonging to its original parent
|
117
|
+
*/
|
118
|
+
reset(options?: Cards.ResetOptions | undefined): Promise<InstanceType<ConfiguredDocumentClassForName<'Card'>>>;
|
119
|
+
|
120
|
+
/**
|
121
|
+
* Create a chat message which displays this Card.
|
122
|
+
* @param messageData - Additional data which becomes part of the created ChatMessageData
|
123
|
+
* (default: `{}`)
|
124
|
+
* @param options - Options which modify the message creation operation
|
125
|
+
* (default: `{}`)
|
126
|
+
* @returns The created chat message
|
127
|
+
*/
|
128
|
+
toMessage(
|
129
|
+
messageData?: ConstructorDataType<foundry.data.ChatMessageData> | undefined,
|
130
|
+
options?: DocumentModificationContext | undefined
|
131
|
+
): Promise<InstanceType<ConfiguredDocumentClassForName<'ChatMessage'>> | undefined>;
|
132
|
+
}
|
133
|
+
}
|