@league-of-foundry-developers/foundry-vtt-types 9.249.0 → 9.249.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/foundry/common/abstract/document.mjs.d.ts +13 -6
- package/src/foundry/common/config.mjs/releaseData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/actorData.d.ts +1 -1
- package/src/foundry/common/data/data.mjs/adventureData.d.ts +14 -12
- package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +62 -16
- package/src/foundry/common/data/data.mjs/animationData.d.ts +13 -5
- package/src/foundry/common/data/data.mjs/cardData.d.ts +4 -4
- package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/cardsData.d.ts +3 -3
- package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/combatantData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/drawingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/folderData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/lightData.d.ts +7 -5
- package/src/foundry/common/data/data.mjs/macroData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/noteData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +6 -4
- package/src/foundry/common/data/data.mjs/rollTableData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/sceneData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/settingData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tableResultData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/tileData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/tokenData.d.ts +5 -3
- package/src/foundry/common/data/data.mjs/userData.d.ts +3 -1
- package/src/foundry/common/data/data.mjs/videoData.d.ts +4 -2
- package/src/foundry/common/data/data.mjs/wallData.d.ts +4 -2
- package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +15 -12
- package/src/foundry/common/documents.mjs/baseActor.d.ts +24 -21
- package/src/foundry/common/documents.mjs/baseAdventure.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseCard.d.ts +27 -28
- package/src/foundry/common/documents.mjs/baseCards.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +24 -17
- package/src/foundry/common/documents.mjs/baseCombat.d.ts +21 -20
- package/src/foundry/common/documents.mjs/baseCombatant.d.ts +25 -18
- package/src/foundry/common/documents.mjs/baseDrawing.d.ts +26 -23
- package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +19 -17
- package/src/foundry/common/documents.mjs/baseFolder.d.ts +14 -12
- package/src/foundry/common/documents.mjs/baseItem.d.ts +25 -19
- package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseMacro.d.ts +21 -18
- package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +34 -18
- package/src/foundry/common/documents.mjs/baseNote.d.ts +20 -14
- package/src/foundry/common/documents.mjs/basePlaylist.d.ts +16 -14
- package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +14 -11
- package/src/foundry/common/documents.mjs/baseRollTable.d.ts +16 -14
- package/src/foundry/common/documents.mjs/baseScene.d.ts +23 -21
- package/src/foundry/common/documents.mjs/baseSetting.d.ts +18 -16
- package/src/foundry/common/documents.mjs/baseTableResult.d.ts +27 -19
- package/src/foundry/common/documents.mjs/baseTile.d.ts +17 -11
- package/src/foundry/common/documents.mjs/baseToken.d.ts +20 -16
- package/src/foundry/common/documents.mjs/baseUser.d.ts +45 -11
- package/src/foundry/common/documents.mjs/baseWall.d.ts +17 -15
- package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +4 -2
- package/src/foundry/common/packages.mjs/packageData.d.ts +3 -4
- package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +3 -1
- package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +3 -1
- package/src/foundry/foundry.js/application.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +2 -2
- package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +1 -1
- package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +1 -1
- package/src/foundry/foundry.js/avSettings.d.ts +11 -0
- package/src/foundry/foundry.js/clientDocumentMixin.d.ts +36 -34
- package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/actor.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/combat.d.ts +5 -5
- package/src/foundry/foundry.js/clientDocuments/item.d.ts +2 -2
- package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +1 -1
- package/src/foundry/foundry.js/clientDocuments/scene.d.ts +39 -38
- package/src/foundry/foundry.js/clientDocuments/user.d.ts +27 -35
- package/src/foundry/foundry.js/collections/documentCollection.d.ts +65 -11
- package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +78 -67
- package/src/foundry/foundry.js/collections/documentCollections/worldCollection.d.ts +73 -32
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/actors.d.ts +3 -37
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/combatEncounters.d.ts +5 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts +0 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/items.d.ts +1 -22
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/macros.d.ts +3 -8
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts +7 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +5 -5
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts +1 -1
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/scenes.d.ts +3 -2
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/users.d.ts +7 -4
- package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts +2 -2
- package/src/foundry/foundry.js/hooks.d.ts +3 -3
- package/src/foundry/foundry.js/pixi/containers/ruler.d.ts +18 -7
- package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +1 -1
- package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/lightSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/soundSource.d.ts +1 -1
- package/src/foundry/foundry.js/pointSources/visionSource.d.ts +1 -1
- package/src/foundry/foundry.js/polygonEdge.d.ts +1 -1
- package/src/foundry/foundry.js/ray.d.ts +1 -1
- package/src/types/helperTypes.d.ts +31 -13
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* The singleton collection of Actor documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.actors.
|
7
7
|
*
|
8
|
-
* @see {@link Actor} The Actor
|
8
|
+
* @see {@link Actor} The Actor document
|
9
9
|
* @see {@link ActorDirectory} The ActorDirectory sidebar directory
|
10
10
|
*
|
11
11
|
* @example <caption>Retrieve an existing Actor by its id</caption>
|
@@ -27,45 +27,11 @@ declare global {
|
|
27
27
|
fromCompendium(
|
28
28
|
document:
|
29
29
|
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseActor>>
|
30
|
-
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseActor>>['data']['_source']
|
30
|
+
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseActor>>['data']['_source'],
|
31
|
+
options?: WorldCollection.FromCompendiumOptions | undefined
|
31
32
|
): Omit<
|
32
33
|
InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseActor>>['data']['_source'],
|
33
34
|
'_id' | 'folder'
|
34
35
|
>;
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Register an Actor sheet class as a candidate which can be used to display Actors of a given type
|
38
|
-
* See EntitySheetConfig.registerSheet for details
|
39
|
-
*
|
40
|
-
* @example <caption>Register a new ActorSheet subclass for use with certain Actor types.</caption>
|
41
|
-
* ```typescript
|
42
|
-
* Actors.registerSheet("dnd5e", ActorSheet5eCharacter, { types: ["character"], makeDefault: true });
|
43
|
-
* ```
|
44
|
-
*/
|
45
|
-
static registerSheet(
|
46
|
-
scope: string,
|
47
|
-
sheetClass: ConstructorOf<ActorSheet>,
|
48
|
-
{ label, types, makeDefault }?: { label?: string; types?: string[]; makeDefault?: boolean }
|
49
|
-
): void;
|
50
|
-
|
51
|
-
/**
|
52
|
-
* Unregister an Actor sheet class, removing it from the list of avaliable sheet Applications to use
|
53
|
-
* See EntitySheetConfig.unregisterSheet for details
|
54
|
-
*
|
55
|
-
* @example <caption>Deregister the default ActorSheet subclass to replace it with others.</caption>
|
56
|
-
* ```typescript
|
57
|
-
* Actors.unregisterSheet("core", ActorSheet);
|
58
|
-
* ```
|
59
|
-
*/
|
60
|
-
static unregisterSheet(
|
61
|
-
scope: string,
|
62
|
-
sheetClass: ConstructorOf<ActorSheet>,
|
63
|
-
{ types }?: { types?: string[] }
|
64
|
-
): void;
|
65
|
-
|
66
|
-
/**
|
67
|
-
* Return an Array of currently registered sheet classes for this Entity type
|
68
|
-
*/
|
69
|
-
static get registeredSheets(): typeof ActorSheet[];
|
70
36
|
}
|
71
37
|
}
|
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* The singleton collection of Combat documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.combats.
|
7
7
|
*
|
8
|
-
* @see {@link Combat} The Combat
|
8
|
+
* @see {@link Combat} The Combat document
|
9
9
|
* @see {@link CombatTracker} The CombatTracker sidebar directory
|
10
10
|
*/
|
11
11
|
class CombatEncounters extends WorldCollection<typeof foundry.documents.BaseCombat, 'CombatEncounters'> {
|
@@ -13,10 +13,13 @@ declare global {
|
|
13
13
|
static documentName: 'Combat';
|
14
14
|
|
15
15
|
/**
|
16
|
-
* Provide the settings object which configures the Combat
|
16
|
+
* Provide the settings object which configures the Combat document
|
17
17
|
*/
|
18
18
|
static get settings(): ClientSettings.Values[`core.${typeof Combat['CONFIG_SETTING']}`];
|
19
19
|
|
20
|
+
/** @override */
|
21
|
+
get directory(): typeof ui['combat'];
|
22
|
+
|
20
23
|
/**
|
21
24
|
* Get an Array of Combat instances which apply to the current canvas scene
|
22
25
|
*/
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/fogExplorations.d.ts
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
/**
|
2
2
|
* The singleton collection of FogExploration documents which exist within the active World.
|
3
|
-
* This Collection is accessible within the Game object as game.fog.
|
4
|
-
*
|
5
3
|
* @see {@link FogExploration} The FogExploration document
|
6
4
|
*/
|
7
5
|
declare class FogExplorations extends WorldCollection<typeof foundry.documents.BaseFogExploration, 'FogExplorations'> {
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts
CHANGED
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* The singleton collection of Folder documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.fog.
|
7
7
|
*
|
8
|
-
* @see {@link
|
8
|
+
* @see {@link Folder} The Folder document
|
9
9
|
*/
|
10
10
|
class Folders extends WorldCollection<typeof foundry.documents.BaseFolder, 'Folders'> {
|
11
11
|
constructor(data?: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof Folder>>>['data']['_source'][]);
|
@@ -2,31 +2,10 @@
|
|
2
2
|
* The singleton collection of Item documents which exist within the active World.
|
3
3
|
* This Collection is accessible within the Game object as game.items.
|
4
4
|
*
|
5
|
-
* @see {@link Item} The Item
|
5
|
+
* @see {@link Item} The Item document
|
6
6
|
* @see {@link ItemDirectory} The ItemDirectory sidebar directory
|
7
7
|
*/
|
8
8
|
declare class Items extends WorldCollection<typeof foundry.documents.BaseItem, 'Items'> {
|
9
9
|
/** @override */
|
10
10
|
static documentName: 'Item';
|
11
|
-
|
12
|
-
/**
|
13
|
-
* Register an Item sheet class as a candidate which can be used to display Items of a given type
|
14
|
-
* See EntitySheetConfig.registerSheet for details
|
15
|
-
*/
|
16
|
-
static registerSheet(
|
17
|
-
scope: string,
|
18
|
-
sheetClass: ConstructorOf<ItemSheet>,
|
19
|
-
{ label, types, makeDefault }?: { label?: string; types?: string[]; makeDefault?: boolean }
|
20
|
-
): void;
|
21
|
-
|
22
|
-
/**
|
23
|
-
* Unregister an Item sheet class, removing it from the list of available sheet Applications to use
|
24
|
-
* See EntitySheetConfig.unregisterSheet for details
|
25
|
-
*/
|
26
|
-
static unregisterSheet(scope: string, sheetClass: ConstructorOf<ItemSheet>, { types }?: { types?: string[] }): void;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* Return an Array of currently registered sheet classes for this Entity type
|
30
|
-
*/
|
31
|
-
static get registeredSheets(): typeof ItemSheet[];
|
32
11
|
}
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/journal.d.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* The singleton collection of JournalEntry documents which exist within the active World.
|
3
3
|
* This Collection is accessible within the Game object as game.journal.
|
4
4
|
*
|
5
|
-
* @see {@link JournalEntry} The JournalEntry
|
5
|
+
* @see {@link JournalEntry} The JournalEntry document
|
6
6
|
* @see {@link JournalDirectory} The JournalDirectory sidebar directory
|
7
7
|
*/
|
8
8
|
declare class Journal extends WorldCollection<typeof foundry.documents.BaseJournalEntry, 'Journal'> {
|
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* The singleton collection of Macro documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.macros.
|
7
7
|
*
|
8
|
-
* @see {@link Macro} The Macro
|
8
|
+
* @see {@link Macro} The Macro document
|
9
9
|
* @see {@link MacroDirectory} The MacroDirectory sidebar directory
|
10
10
|
*/
|
11
11
|
class Macros extends WorldCollection<typeof foundry.documents.BaseMacro, 'Macros'> {
|
@@ -19,16 +19,11 @@ declare global {
|
|
19
19
|
fromCompendium(
|
20
20
|
document:
|
21
21
|
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseMacro>>
|
22
|
-
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseMacro>>['data']['_source']
|
22
|
+
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseMacro>>['data']['_source'],
|
23
|
+
options?: WorldCollection.FromCompendiumOptions | undefined
|
23
24
|
): Omit<
|
24
25
|
InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseMacro>>['data']['_source'],
|
25
26
|
'_id' | 'folder'
|
26
27
|
>;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* You are calling Macros.canUseScripts which has been deprecated in favor of User#can('MACRO_SCRIPT')
|
30
|
-
* @deprecated since 0.8.1
|
31
|
-
*/
|
32
|
-
static canUseScripts(user: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseUser>>): boolean;
|
33
28
|
}
|
34
29
|
}
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/messages.d.ts
CHANGED
@@ -5,19 +5,24 @@ declare global {
|
|
5
5
|
* The singleton collection of ChatMessage documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.messages.
|
7
7
|
*
|
8
|
-
* @see {@link ChatMessage} The ChatMessage
|
8
|
+
* @see {@link ChatMessage} The ChatMessage document
|
9
9
|
* @see {@link ChatLog} The ChatLog sidebar directory
|
10
10
|
*/
|
11
11
|
class Messages extends WorldCollection<typeof foundry.documents.BaseChatMessage, 'Messages'> {
|
12
12
|
/** @override */
|
13
13
|
static documentName: 'ChatMessage';
|
14
14
|
|
15
|
+
/**
|
16
|
+
* @override
|
17
|
+
* */
|
18
|
+
get directory(): typeof ui.chat;
|
19
|
+
|
15
20
|
/** @override */
|
16
21
|
render(force?: boolean): void;
|
17
22
|
|
18
23
|
/**
|
19
24
|
* If requested, dispatch a Chat Bubble UI for the newly created message
|
20
|
-
* @param message - The ChatMessage
|
25
|
+
* @param message - The ChatMessage document to say
|
21
26
|
*/
|
22
27
|
sayBubble(message: InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseChatMessage>>): void;
|
23
28
|
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { ConfiguredDocumentClass } from '../../../../../types/helperTypes';
|
2
|
-
import type { SceneDataConstructorData } from '../../../../common/data/data.mjs/sceneData
|
2
|
+
import type { SceneDataConstructorData } from '../../../../common/data/data.mjs/sceneData';
|
3
3
|
|
4
4
|
declare global {
|
5
5
|
/**
|
6
6
|
* The singleton collection of Playlist documents which exist within the active World.
|
7
7
|
* This Collection is accessible within the Game object as game.playlists.
|
8
8
|
*
|
9
|
-
* @see {@link Playlist} The Playlist
|
9
|
+
* @see {@link Playlist} The Playlist document
|
10
10
|
* @see {@link PlaylistDirectory} The PlaylistDirectory sidebar directory
|
11
11
|
*/
|
12
12
|
class Playlists extends WorldCollection<typeof foundry.documents.BasePlaylist, 'Playlists'> {
|
@@ -20,7 +20,7 @@ declare global {
|
|
20
20
|
static documentName: 'Playlist';
|
21
21
|
|
22
22
|
/**
|
23
|
-
* Return the subset of Playlist
|
23
|
+
* Return the subset of Playlist documents which are currently playing
|
24
24
|
*/
|
25
25
|
get playing(): ReturnType<this['filter']>;
|
26
26
|
|
@@ -30,8 +30,8 @@ declare global {
|
|
30
30
|
initialize(): void;
|
31
31
|
|
32
32
|
/**
|
33
|
-
* Handle changes to a Scene to determine whether to trigger changes to Playlist
|
34
|
-
* @param scene - The Scene
|
33
|
+
* Handle changes to a Scene to determine whether to trigger changes to Playlist documents.
|
34
|
+
* @param scene - The Scene document being updated
|
35
35
|
* @param data - The incremental update data
|
36
36
|
*/
|
37
37
|
protected _onChangeScene(
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/rollTables.d.ts
CHANGED
@@ -13,7 +13,7 @@ declare class RollTables extends WorldCollection<typeof foundry.documents.BaseRo
|
|
13
13
|
get directory(): typeof ui['tables'];
|
14
14
|
|
15
15
|
/**
|
16
|
-
* Register world settings related to RollTable
|
16
|
+
* Register world settings related to RollTable documents
|
17
17
|
*/
|
18
18
|
static registerSettings(): void;
|
19
19
|
}
|
@@ -5,7 +5,7 @@ declare global {
|
|
5
5
|
* The singleton collection of Scene documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.scenes.
|
7
7
|
*
|
8
|
-
* @see {@link Scene} The Scene
|
8
|
+
* @see {@link Scene} The Scene document
|
9
9
|
* @see {@link SceneDirectory} The SceneDirectory sidebar directory
|
10
10
|
*/
|
11
11
|
class Scenes extends WorldCollection<typeof foundry.documents.BaseScene, 'Scenes'> {
|
@@ -54,7 +54,8 @@ declare global {
|
|
54
54
|
fromCompendium(
|
55
55
|
document:
|
56
56
|
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>
|
57
|
-
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>['data']['_source']
|
57
|
+
| InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>['data']['_source'],
|
58
|
+
options?: WorldCollection.FromCompendiumOptions | undefined
|
58
59
|
): Omit<
|
59
60
|
InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseScene>>['data']['_source'],
|
60
61
|
'_id' | 'folder'
|
@@ -5,19 +5,21 @@ declare global {
|
|
5
5
|
* The singleton collection of User documents which exist within the active World.
|
6
6
|
* This Collection is accessible within the Game object as game.users.
|
7
7
|
*
|
8
|
-
* @see {@link User} The User
|
8
|
+
* @see {@link User} The User document
|
9
9
|
*/
|
10
10
|
class Users extends WorldCollection<typeof foundry.documents.BaseUser, 'Users'> {
|
11
11
|
constructor(data?: foundry.data.UserData['_source'][]);
|
12
12
|
|
13
13
|
/**
|
14
|
-
* The User
|
14
|
+
* The User document of the currently connected user
|
15
15
|
* @defaultValue `null`
|
16
16
|
*/
|
17
17
|
current: StoredDocument<InstanceType<ConfiguredDocumentClass<typeof foundry.documents.BaseUser>>> | null;
|
18
18
|
|
19
19
|
/**
|
20
|
-
* Initialize the Map object and all its contained
|
20
|
+
* Initialize the Map object and all its contained documents
|
21
|
+
* @override
|
22
|
+
* @internal
|
21
23
|
*/
|
22
24
|
protected _initialize(): void;
|
23
25
|
|
@@ -36,7 +38,8 @@ declare global {
|
|
36
38
|
* Handle receipt of activity data from another User connected to the Game session
|
37
39
|
* @param userId - The User id who generated the activity data
|
38
40
|
* @param activityData - The object of activity data
|
41
|
+
* (default: `{}`)
|
39
42
|
*/
|
40
|
-
protected static _handleUserActivity(userId: string, activityData?:
|
43
|
+
protected static _handleUserActivity(userId: string, activityData?: ActivityData | undefined): void;
|
41
44
|
}
|
42
45
|
}
|
package/src/foundry/foundry.js/collections/documentCollections/worldCollections/worldSettings.d.ts
CHANGED
@@ -9,10 +9,10 @@ declare class WorldSettings extends WorldCollection<typeof foundry.documents.Bas
|
|
9
9
|
static documentName: 'Setting';
|
10
10
|
|
11
11
|
/** @override */
|
12
|
-
get directory():
|
12
|
+
get directory(): undefined;
|
13
13
|
|
14
14
|
/**
|
15
|
-
* Return the Setting document with the given key.
|
15
|
+
* Return the Setting or Keybind document with the given key.
|
16
16
|
* @param key - The setting key
|
17
17
|
* @returns The Setting.
|
18
18
|
*/
|
@@ -4,9 +4,9 @@ import {
|
|
4
4
|
ConfiguredObjectClassForName,
|
5
5
|
DocumentConstructor,
|
6
6
|
ToObjectFalseType
|
7
|
-
} from '../../types/helperTypes
|
8
|
-
import { DocumentModificationOptions } from '../common/abstract/document.mjs
|
9
|
-
import { EffectChangeData } from '../common/data/data.mjs/effectChangeData
|
7
|
+
} from '../../types/helperTypes';
|
8
|
+
import { DocumentModificationOptions } from '../common/abstract/document.mjs';
|
9
|
+
import { EffectChangeData } from '../common/data/data.mjs/effectChangeData';
|
10
10
|
import { DropData } from './clientDocumentMixin';
|
11
11
|
|
12
12
|
declare global {
|
@@ -1,6 +1,23 @@
|
|
1
1
|
import { ConfiguredDocumentClass, ConfiguredObjectClassForName } from '../../../../types/helperTypes';
|
2
2
|
|
3
3
|
declare global {
|
4
|
+
interface RulerData {
|
5
|
+
/** The ruler measurement state. */
|
6
|
+
_state: Ruler['_state'];
|
7
|
+
|
8
|
+
/** A unique name for the ruler containing the owning user's ID. */
|
9
|
+
name: string;
|
10
|
+
|
11
|
+
/** The current point the ruler has been extended to. */
|
12
|
+
destination: PIXI.Point;
|
13
|
+
|
14
|
+
/** The class name of this ruler instance. */
|
15
|
+
class: string;
|
16
|
+
|
17
|
+
/** Additional waypoints along the ruler's length, including the starting point. */
|
18
|
+
waypoints: PIXI.Point[];
|
19
|
+
}
|
20
|
+
|
4
21
|
/**
|
5
22
|
* The Ruler - used to measure distances and trigger movements
|
6
23
|
*/
|
@@ -169,13 +186,7 @@ declare global {
|
|
169
186
|
*/
|
170
187
|
protected _endMeasurement(): void;
|
171
188
|
|
172
|
-
toJSON():
|
173
|
-
class: 'Ruler';
|
174
|
-
name: string;
|
175
|
-
waypoints: Ruler['waypoints'];
|
176
|
-
destination: Ruler['destination'];
|
177
|
-
_state: Ruler['_state'];
|
178
|
-
};
|
189
|
+
toJSON(): RulerData;
|
179
190
|
|
180
191
|
/**
|
181
192
|
* Update a Ruler instance using data provided through the cursor activity socket
|
@@ -63,9 +63,35 @@ export type ConfiguredDocumentClass<T extends DocumentConstructor> = ConfiguredD
|
|
63
63
|
T['metadata']['name']
|
64
64
|
>;
|
65
65
|
|
66
|
-
export type DocumentType =
|
67
|
-
|
68
|
-
|
66
|
+
export type DocumentType =
|
67
|
+
| 'Actor'
|
68
|
+
| 'Adventure'
|
69
|
+
| 'Cards'
|
70
|
+
| 'ChatMessage'
|
71
|
+
| 'Combat'
|
72
|
+
| 'FogExploration'
|
73
|
+
| 'Folder'
|
74
|
+
| 'Item'
|
75
|
+
| 'JournalEntry'
|
76
|
+
| 'Macro'
|
77
|
+
| 'Playlist'
|
78
|
+
| 'RollTable'
|
79
|
+
| 'Scene'
|
80
|
+
| 'Setting'
|
81
|
+
| 'User'
|
82
|
+
| 'ActiveEffect'
|
83
|
+
| 'Card'
|
84
|
+
| 'TableResult'
|
85
|
+
| 'PlaylistSound'
|
86
|
+
| 'AmbientLight'
|
87
|
+
| 'AmbientSound'
|
88
|
+
| 'Combatant'
|
89
|
+
| 'Drawing'
|
90
|
+
| 'MeasuredTemplate'
|
91
|
+
| 'Note'
|
92
|
+
| 'Tile'
|
93
|
+
| 'Token'
|
94
|
+
| 'Wall';
|
69
95
|
|
70
96
|
export type PlaceableDocumentType =
|
71
97
|
| 'AmbientLight'
|
@@ -77,17 +103,9 @@ export type PlaceableDocumentType =
|
|
77
103
|
| 'Token'
|
78
104
|
| 'Wall';
|
79
105
|
|
80
|
-
export type ConfiguredDocumentClassForName<Name extends DocumentType> =
|
81
|
-
? CONFIG[Name]['documentClass']
|
82
|
-
: never;
|
83
|
-
|
84
|
-
export type ObjectType = keyof {
|
85
|
-
[Key in keyof CONFIG as 'objectClass' extends keyof CONFIG[Key] ? Key : never]: unknown;
|
86
|
-
};
|
106
|
+
export type ConfiguredDocumentClassForName<Name extends DocumentType> = CONFIG[Name]['documentClass'];
|
87
107
|
|
88
|
-
export type ConfiguredObjectClassForName<Name extends
|
89
|
-
? CONFIG[Name]['objectClass']
|
90
|
-
: never;
|
108
|
+
export type ConfiguredObjectClassForName<Name extends PlaceableDocumentType> = CONFIG[Name]['objectClass'];
|
91
109
|
|
92
110
|
export type ConfiguredData<Name extends string> = Name extends keyof DataConfig ? DataConfig[Name] : {};
|
93
111
|
|