@league-of-foundry-developers/foundry-vtt-types 13.346.0-beta.20250719181625 → 13.346.0-beta.20250720141111
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 +3 -3
- package/src/foundry/client/applications/ui/game-pause.d.mts +17 -2
- package/src/foundry/client/applications/ui/hotbar.d.mts +96 -2
- package/src/foundry/client/applications/ui/main-menu.d.mts +29 -2
- package/src/foundry/client/applications/ui/players.d.mts +77 -2
- package/src/foundry/client/applications/ui/region-legend.d.mts +1 -0
- package/src/foundry/client/applications/ui/scene-navigation.d.mts +1 -1
- package/src/foundry/client/documents/active-effect.d.mts +1 -1
- package/src/foundry/client/documents/actor-delta.d.mts +1 -1
- package/src/foundry/client/documents/actor.d.mts +1 -1
- package/src/foundry/client/documents/card.d.mts +1 -1
- package/src/foundry/client/documents/cards.d.mts +1 -1
- package/src/foundry/client/documents/chat-message.d.mts +1 -1
- package/src/foundry/client/documents/combat.d.mts +1 -1
- package/src/foundry/client/documents/combatant-group.d.mts +1 -1
- package/src/foundry/client/documents/combatant.d.mts +1 -1
- package/src/foundry/client/documents/folder.d.mts +1 -1
- package/src/foundry/client/documents/item.d.mts +1 -1
- package/src/foundry/client/documents/journal-entry-page.d.mts +1 -1
- package/src/foundry/client/documents/macro.d.mts +1 -1
- package/src/foundry/client/documents/region-behavior.d.mts +1 -1
- package/src/foundry/client/documents/table-result.d.mts +1 -1
- package/src/foundry/client/documents/token.d.mts +16 -16
- package/src/foundry/client/hooks.d.mts +14 -4
- package/src/foundry/client/packages/system.d.mts +1 -1
- package/tsconfig.json +1 -1
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
3
3
|
"name": "@league-of-foundry-developers/foundry-vtt-types",
|
4
|
-
"version": "13.346.0-beta.
|
4
|
+
"version": "13.346.0-beta.20250720141111",
|
5
5
|
"description": "TypeScript type definitions for Foundry VTT",
|
6
6
|
"type": "module",
|
7
7
|
"types": "./src/index.d.mts",
|
@@ -18,10 +18,10 @@
|
|
18
18
|
"./configuration": {
|
19
19
|
"types": "./src/configuration/index.d.mts"
|
20
20
|
},
|
21
|
-
"./
|
21
|
+
"./workers": {
|
22
22
|
"types": "./src/foundry/public/scripts/workers/index.d.mts"
|
23
23
|
},
|
24
|
-
"./
|
24
|
+
"./workers/image-compressor": {
|
25
25
|
"types": "./src/foundry/public/scripts/workers/image-compressor.d.mts"
|
26
26
|
}
|
27
27
|
},
|
@@ -11,15 +11,28 @@ declare module "#configuration" {
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* The Game Paused banner.
|
14
|
-
* @remarks TODO: Stub
|
15
14
|
*/
|
16
15
|
declare class GamePause<
|
17
16
|
RenderContext extends GamePause.RenderContext = GamePause.RenderContext,
|
18
17
|
Configuration extends GamePause.Configuration = GamePause.Configuration,
|
19
18
|
RenderOptions extends GamePause.RenderOptions = GamePause.RenderOptions,
|
20
19
|
> extends ApplicationV2<RenderContext, Configuration, RenderOptions> {
|
21
|
-
// Fake override.
|
22
20
|
static override DEFAULT_OPTIONS: GamePause.DefaultOptions;
|
21
|
+
|
22
|
+
protected override _prepareContext(
|
23
|
+
options: DeepPartial<RenderOptions> & { isFirstRender: boolean },
|
24
|
+
): Promise<RenderContext>;
|
25
|
+
|
26
|
+
protected override _renderHTML(
|
27
|
+
_context: RenderContext,
|
28
|
+
_options: DeepPartial<RenderOptions>,
|
29
|
+
): Promise<GamePause.RenderHTMLReturn>;
|
30
|
+
|
31
|
+
protected override _replaceHTML(
|
32
|
+
result: GamePause.RenderHTMLReturn,
|
33
|
+
content: HTMLElement,
|
34
|
+
_options: DeepPartial<RenderOptions>,
|
35
|
+
): void;
|
23
36
|
}
|
24
37
|
|
25
38
|
declare namespace GamePause {
|
@@ -37,6 +50,8 @@ declare namespace GamePause {
|
|
37
50
|
spin: boolean;
|
38
51
|
}
|
39
52
|
|
53
|
+
type RenderHTMLReturn = [HTMLImageElement, HTMLElement];
|
54
|
+
|
40
55
|
interface Configuration<GamePause extends GamePause.Any = GamePause.Any>
|
41
56
|
extends ApplicationV2.Configuration<GamePause> {}
|
42
57
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { DeepPartial, Identity } from "#utils";
|
2
2
|
import type ApplicationV2 from "../api/application.d.mts";
|
3
3
|
import type HandlebarsApplicationMixin from "../api/handlebars-application.d.mts";
|
4
|
+
import type Document from "#common/abstract/document.d.mts";
|
4
5
|
|
5
6
|
declare module "#configuration" {
|
6
7
|
namespace Hooks {
|
@@ -16,15 +17,102 @@ declare module "#configuration" {
|
|
16
17
|
* Left-clicking a Macro button triggers its effect.
|
17
18
|
* Right-clicking the button displays a context menu of Macro options.
|
18
19
|
* The number keys 1 through 0 activate numbered hotbar slots.
|
19
|
-
* @remarks TODO: Stub
|
20
20
|
*/
|
21
21
|
declare class Hotbar<
|
22
22
|
RenderContext extends object = Hotbar.RenderContext,
|
23
23
|
Configuration extends Hotbar.Configuration = Hotbar.Configuration,
|
24
24
|
RenderOptions extends Hotbar.RenderOptions = Hotbar.RenderOptions,
|
25
25
|
> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
|
26
|
-
// Fake override.
|
27
26
|
static override DEFAULT_OPTIONS: Hotbar.DefaultOptions;
|
27
|
+
static override PARTS: Record<string, HandlebarsApplicationMixin.HandlebarsTemplatePart>;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* The current hotbar page number.
|
31
|
+
*/
|
32
|
+
get page(): number;
|
33
|
+
|
34
|
+
/**
|
35
|
+
* The currently rendered macro data.
|
36
|
+
*/
|
37
|
+
get slots(): Hotbar.SlotData[];
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Whether the hotbar is locked.
|
41
|
+
*/
|
42
|
+
get locked(): boolean;
|
43
|
+
|
44
|
+
protected override _prepareContext(
|
45
|
+
options: DeepPartial<RenderOptions> & { isFirstRender: boolean },
|
46
|
+
): Promise<RenderContext>;
|
47
|
+
|
48
|
+
protected override _onFirstRender(
|
49
|
+
context: DeepPartial<RenderContext>,
|
50
|
+
options: DeepPartial<RenderOptions>,
|
51
|
+
): Promise<void>;
|
52
|
+
|
53
|
+
protected override _onRender(context: DeepPartial<RenderContext>, options: DeepPartial<RenderOptions>): Promise<void>;
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Get the set of ContextMenu options which should be applied for Macros in the hotbar.
|
57
|
+
*/
|
58
|
+
protected _getContextMenuOptions(): foundry.applications.ux.ContextMenu.Entry<HTMLElement>[];
|
59
|
+
|
60
|
+
/**
|
61
|
+
* Change to a specific numbered page from 1 to 5
|
62
|
+
* @param page - The page number to change to
|
63
|
+
*/
|
64
|
+
changePage(page: number): Promise<void>;
|
65
|
+
|
66
|
+
/**
|
67
|
+
* Change the page of the hotbar by cycling up (positive) or down (negative).
|
68
|
+
* @param direction - The direction to cycle
|
69
|
+
*/
|
70
|
+
cyclePage(direction: number): Promise<void>;
|
71
|
+
|
72
|
+
/**
|
73
|
+
* A reusable helper that can be used for toggling display of a document sheet.
|
74
|
+
* @param uuid - The Document UUID to display
|
75
|
+
*/
|
76
|
+
static toggleDocumentSheet(uuid: string): Promise<void>;
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Update hotbar display based on viewport size.
|
80
|
+
* @internal
|
81
|
+
*/
|
82
|
+
protected _onResize(): void;
|
83
|
+
|
84
|
+
/**
|
85
|
+
* Create a Macro which rolls a RollTable when executed
|
86
|
+
* @param table - The RollTable document
|
87
|
+
*/
|
88
|
+
protected _createRollTableRollMacro(table: Document.Any): Promise<Macro.Implementation>;
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Create a Macro document which can be used to toggle display of a Journal Entry.
|
92
|
+
* @param doc - A Document which should be toggled
|
93
|
+
*/
|
94
|
+
protected _createDocumentSheetToggle(doc: Document.Any): Promise<Macro.Implementation>;
|
95
|
+
|
96
|
+
/**
|
97
|
+
* @deprecated "{@linkcode Hotbar#macros} is deprecated in favor of {@linkcode Hotbar#slots}." (since v13, until v15)
|
98
|
+
* @ignore
|
99
|
+
*/
|
100
|
+
get macros(): Hotbar.SlotData[];
|
101
|
+
|
102
|
+
/**
|
103
|
+
* @deprecated "{@linkcode Hotbar#collapse} is no longer a supported feature." (since v13, until v15)
|
104
|
+
* @ignore
|
105
|
+
*/
|
106
|
+
collapse(): void;
|
107
|
+
|
108
|
+
/**
|
109
|
+
* @deprecated "{@linkcode Hotbar#expand} is no longer a supported feature." (since v13, until v15)
|
110
|
+
* @ignore
|
111
|
+
*/
|
112
|
+
expand(): void;
|
113
|
+
|
114
|
+
static #HotbarStatic: true;
|
115
|
+
#Hotbar: true;
|
28
116
|
}
|
29
117
|
|
30
118
|
declare namespace Hotbar {
|
@@ -33,6 +121,12 @@ declare namespace Hotbar {
|
|
33
121
|
|
34
122
|
interface SlotData {
|
35
123
|
slot: number;
|
124
|
+
macro: Macro.Implementation | null;
|
125
|
+
key: number;
|
126
|
+
img: Macro.Implementation["img"] | null;
|
127
|
+
cssClass: "full" | "open";
|
128
|
+
tooltip: string | null;
|
129
|
+
ariaLabel: string;
|
36
130
|
}
|
37
131
|
|
38
132
|
/**
|
@@ -12,15 +12,42 @@ declare module "#configuration" {
|
|
12
12
|
|
13
13
|
/**
|
14
14
|
* The main menu application which is toggled via the ESC key.
|
15
|
-
* @remarks TODO: Stub
|
16
15
|
*/
|
17
16
|
declare class MainMenu<
|
18
17
|
RenderContext extends object = MainMenu.RenderContext,
|
19
18
|
Configuration extends MainMenu.Configuration = MainMenu.Configuration,
|
20
19
|
RenderOptions extends MainMenu.RenderOptions = MainMenu.RenderOptions,
|
21
20
|
> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
|
22
|
-
// Fake override.
|
23
21
|
static override DEFAULT_OPTIONS: MainMenu.DefaultOptions;
|
22
|
+
static override PARTS: Record<string, HandlebarsApplicationMixin.HandlebarsTemplatePart>;
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Configuration of Main Menu items.
|
26
|
+
*/
|
27
|
+
static ITEMS: Record<string, MainMenu.MainMenuItem>;
|
28
|
+
|
29
|
+
/**
|
30
|
+
* A record of menu items which are currently enabled.
|
31
|
+
*/
|
32
|
+
get items(): Record<string, MainMenu.MainMenuItem>;
|
33
|
+
|
34
|
+
protected override _insertElement(element: HTMLElement): void;
|
35
|
+
|
36
|
+
protected override _onFirstRender(
|
37
|
+
context: DeepPartial<RenderContext>,
|
38
|
+
options: DeepPartial<RenderOptions>,
|
39
|
+
): Promise<void>;
|
40
|
+
|
41
|
+
protected override _prepareContext(
|
42
|
+
options: DeepPartial<RenderOptions> & { isFirstRender: boolean },
|
43
|
+
): Promise<RenderContext>;
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Toggle display of the menu, or render it in the first place.
|
47
|
+
*/
|
48
|
+
toggle(): Promise<void>;
|
49
|
+
|
50
|
+
static #MainMenuStatic: true;
|
24
51
|
}
|
25
52
|
|
26
53
|
declare namespace MainMenu {
|
@@ -13,15 +13,82 @@ declare module "#configuration" {
|
|
13
13
|
/**
|
14
14
|
* A UI element which displays the Users defined for this world.
|
15
15
|
* Currently active users are always displayed, while inactive users can be displayed on toggle.
|
16
|
-
* @remarks TODO: Stub
|
17
16
|
*/
|
18
17
|
declare class Players<
|
19
18
|
RenderContext extends Players.RenderContext = Players.RenderContext,
|
20
19
|
Configuration extends Players.Configuration = Players.Configuration,
|
21
20
|
RenderOptions extends Players.RenderOptions = Players.RenderOptions,
|
22
21
|
> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
|
23
|
-
// Fake override.
|
24
22
|
static override DEFAULT_OPTIONS: Players.DefaultOptions;
|
23
|
+
static override PARTS: Record<string, HandlebarsApplicationMixin.HandlebarsTemplatePart>;
|
24
|
+
|
25
|
+
/**
|
26
|
+
* How often latency is refreshed.
|
27
|
+
* @defaultValue `60 * 1000`
|
28
|
+
*/
|
29
|
+
static REFRESH_LATENCY_FREQUENCY_MS: number;
|
30
|
+
|
31
|
+
/**
|
32
|
+
* A threshold of time in milliseconds after which a player is considered idle if they have no observed activity.
|
33
|
+
* @defaultValue `5 * 60 * 1000`
|
34
|
+
*/
|
35
|
+
static IDLE_THRESHOLD_MS: number;
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Is the application currently expanded?
|
39
|
+
*/
|
40
|
+
get expanded(): boolean;
|
41
|
+
|
42
|
+
protected override _prepareContext(
|
43
|
+
options: DeepPartial<RenderOptions> & { isFirstRender: boolean },
|
44
|
+
): Promise<RenderContext>;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* Format the display of a user's name using their name, pronouns (if defined), and character name (if defined).
|
48
|
+
*/
|
49
|
+
protected _formatName(user: User.Implementation): string;
|
50
|
+
|
51
|
+
protected override _onFirstRender(
|
52
|
+
context: DeepPartial<RenderContext>,
|
53
|
+
options: DeepPartial<RenderOptions>,
|
54
|
+
): Promise<void>;
|
55
|
+
|
56
|
+
protected override _onRender(context: DeepPartial<RenderContext>, options: DeepPartial<RenderOptions>): Promise<void>;
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Collapse the players list.
|
60
|
+
*/
|
61
|
+
collapse(): void;
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Expand the players list.
|
65
|
+
*/
|
66
|
+
expand(): void;
|
67
|
+
|
68
|
+
/**
|
69
|
+
* Update the display which reports average latency.
|
70
|
+
*/
|
71
|
+
refreshLatency(): void;
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Update the display which reports average framerate.
|
75
|
+
* @param options - Options which customize FPS reporting (default: `{}`)
|
76
|
+
*/
|
77
|
+
refreshFPS({ deactivate }?: Players.RefreshFPSOptions): void;
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Toggle the expanded state of scene navigation.
|
81
|
+
* @param expanded - Force the expanded state to the provided value, otherwise toggle the state.
|
82
|
+
*/
|
83
|
+
toggleExpanded(expanded?: boolean): void;
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Get the set of ContextMenu options which should be applied to each User in the Players UI.
|
87
|
+
*/
|
88
|
+
protected _getContextMenuOptions(): foundry.applications.ux.ContextMenu.Entry<HTMLElement>[];
|
89
|
+
|
90
|
+
static #PlayersStatic: true;
|
91
|
+
#Players: true;
|
25
92
|
}
|
26
93
|
|
27
94
|
declare namespace Players {
|
@@ -48,6 +115,14 @@ declare namespace Players {
|
|
48
115
|
border: string;
|
49
116
|
}
|
50
117
|
|
118
|
+
interface RefreshFPSOptions {
|
119
|
+
/**
|
120
|
+
* Deactivate tracking
|
121
|
+
* @defaultValue `false`
|
122
|
+
*/
|
123
|
+
deactivate?: boolean | undefined;
|
124
|
+
}
|
125
|
+
|
51
126
|
interface Configuration<Players extends Players.Any = Players.Any>
|
52
127
|
extends HandlebarsApplicationMixin.Configuration,
|
53
128
|
ApplicationV2.Configuration<Players> {}
|
@@ -19,6 +19,7 @@ declare class RegionLegend<
|
|
19
19
|
RenderOptions extends RegionLegend.RenderOptions = RegionLegend.RenderOptions,
|
20
20
|
> extends HandlebarsApplicationMixin(ApplicationV2)<RenderContext, Configuration, RenderOptions> {
|
21
21
|
#RegionLegend: true;
|
22
|
+
static #RegionLegendStatic: true;
|
22
23
|
|
23
24
|
static override DEFAULT_OPTIONS: RegionLegend.DefaultOptions;
|
24
25
|
static override PARTS: Record<string, HandlebarsApplicationMixin.HandlebarsTemplatePart>;
|
@@ -59,7 +59,7 @@ declare class SceneNavigation<
|
|
59
59
|
toggleExpanded(expanded?: boolean): void;
|
60
60
|
|
61
61
|
/**
|
62
|
-
* @deprecated "SceneNavigation.displayProgressBar is deprecated in favor of {@linkcode Notifications#notify} using the
|
62
|
+
* @deprecated "{@linkcode SceneNavigation.displayProgressBar} is deprecated in favor of {@linkcode Notifications#notify} using the `{progress: true}` option" (since v13, until v15)
|
63
63
|
* @ignore
|
64
64
|
*/
|
65
65
|
static displayProgressBar({ label, pct }?: SceneNavigation.DisplayProgressBarOptions): void;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
2
2
|
import type { BaseActorDelta } from "#common/documents/_module.d.mts";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
|
-
import type { ConfiguredActorDelta } from "
|
4
|
+
import type { ConfiguredActorDelta } from "#configuration";
|
5
5
|
import type { Identity, InexactPartial, Merge, NullishProps } from "#utils";
|
6
6
|
import type DataModel from "#common/abstract/data.d.mts";
|
7
7
|
|
@@ -2,7 +2,7 @@ import type { AnyObject, InexactPartial, NullishProps, Merge, Identity } from "#
|
|
2
2
|
import type { documents } from "#client/client.d.mts";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
4
|
import type BaseActor from "#common/documents/actor.d.mts";
|
5
|
-
import type { ConfiguredActor } from "
|
5
|
+
import type { ConfiguredActor } from "#configuration";
|
6
6
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
7
7
|
import type { PrototypeToken } from "#common/data/data.mjs";
|
8
8
|
import type { Token } from "#client/canvas/placeables/_module.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredCard } from "
|
1
|
+
import type { ConfiguredCard } from "#configuration";
|
2
2
|
import type { AnyObject, DeepPartial, Identity, InexactPartial, Merge } from "#utils";
|
3
3
|
import type { documents } from "#client/client.d.mts";
|
4
4
|
import type Document from "#common/abstract/document.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredCards } from "
|
1
|
+
import type { ConfiguredCards } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, Merge, NullishProps } from "#utils";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredChatMessage } from "
|
1
|
+
import type { ConfiguredChatMessage } from "#configuration";
|
2
2
|
import type { AnyObject, Identity, InexactPartial, InterfaceToObject, Merge, NullishProps } from "#utils";
|
3
3
|
import type { documents } from "#client/client.d.mts";
|
4
4
|
import type Document from "#common/abstract/document.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredCombat } from "
|
1
|
+
import type { ConfiguredCombat } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, Merge, NullishProps } from "#utils";
|
3
3
|
import type { documents } from "#client/client.d.mts";
|
4
4
|
import type Document from "#common/abstract/document.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredCombatantGroup } from "
|
1
|
+
import type { ConfiguredCombatantGroup } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, Merge } from "#utils";
|
3
3
|
import type Document from "#common/abstract/document.mjs";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredCombatant } from "
|
1
|
+
import type { ConfiguredCombatant } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, Merge } from "#utils";
|
3
3
|
import type { documents } from "#client/client.d.mts";
|
4
4
|
import type Document from "#common/abstract/document.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredFolder } from "
|
1
|
+
import type { ConfiguredFolder } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, IntentionalPartial, Merge, NullishProps } from "#utils";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredItem } from "
|
1
|
+
import type { ConfiguredItem } from "#configuration";
|
2
2
|
import type { documents } from "#client/client.d.mts";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredJournalEntryPage } from "
|
1
|
+
import type { ConfiguredJournalEntryPage } from "#configuration";
|
2
2
|
import type { AnyObject, Identity, InexactPartial, Merge, NullishProps } from "#utils";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredMacro } from "
|
1
|
+
import type { ConfiguredMacro } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, Merge, NullishProps } from "#utils";
|
3
3
|
import type { documents } from "#client/client.d.mts";
|
4
4
|
import type Document from "#common/abstract/document.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredRegionBehavior } from "
|
1
|
+
import type { ConfiguredRegionBehavior } from "#configuration";
|
2
2
|
import type Document from "#common/abstract/document.d.mts";
|
3
3
|
import type BaseRegionBehavior from "#common/documents/region-behavior.d.mts";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ConfiguredTableResult } from "
|
1
|
+
import type { ConfiguredTableResult } from "#configuration";
|
2
2
|
import type { Identity, InexactPartial, Merge } from "#utils";
|
3
3
|
import type Document from "#common/abstract/document.d.mts";
|
4
4
|
import type { DataSchema } from "#common/data/fields.d.mts";
|
@@ -1044,6 +1044,21 @@ declare namespace TokenDocument {
|
|
1044
1044
|
|
1045
1045
|
interface GetBarAttributeOptions extends _GetBarAttributeOptions {}
|
1046
1046
|
|
1047
|
+
interface SingleAttributeBar {
|
1048
|
+
type: "value";
|
1049
|
+
attribute: string;
|
1050
|
+
value: number;
|
1051
|
+
editable: boolean;
|
1052
|
+
}
|
1053
|
+
|
1054
|
+
interface ObjectAttributeBar {
|
1055
|
+
type: "bar";
|
1056
|
+
attribute: string;
|
1057
|
+
value: number;
|
1058
|
+
max: number;
|
1059
|
+
editable: boolean;
|
1060
|
+
}
|
1061
|
+
|
1047
1062
|
type GetBarAttributeReturn = SingleAttributeBar | ObjectAttributeBar | null;
|
1048
1063
|
|
1049
1064
|
/** @internal */
|
@@ -2132,19 +2147,4 @@ declare class TokenDocument extends BaseToken.Internal.CanvasDocument {
|
|
2132
2147
|
#TokenDocument: true;
|
2133
2148
|
}
|
2134
2149
|
|
2135
|
-
|
2136
|
-
type: "value";
|
2137
|
-
attribute: string;
|
2138
|
-
value: number;
|
2139
|
-
editable: boolean;
|
2140
|
-
}
|
2141
|
-
|
2142
|
-
interface ObjectAttributeBar {
|
2143
|
-
type: "bar";
|
2144
|
-
attribute: string;
|
2145
|
-
value: number;
|
2146
|
-
max: number;
|
2147
|
-
editable: boolean;
|
2148
|
-
}
|
2149
|
-
|
2150
|
-
export { TokenDocument as default, SingleAttributeBar, ObjectAttributeBar };
|
2150
|
+
export default TokenDocument;
|
@@ -970,16 +970,15 @@ export interface AllHooks extends DynamicHooks {
|
|
970
970
|
initializeDynamicTokenRingConfig: (ringConfig: TokenRingConfig) => void;
|
971
971
|
|
972
972
|
/**
|
973
|
-
* A hook event that fires when the context menu for a
|
973
|
+
* A hook event that fires when the context menu for a Players entry is constructed.
|
974
974
|
* @param app - The Application instance that the context menu is constructed in
|
975
975
|
* @param contextOptions - The context menu entries
|
976
|
-
* @remarks This is called by {@linkcode Hooks.
|
977
|
-
* @see {@link PlayerList.activateListeners | `PlayerList#activateListeners`}
|
976
|
+
* @remarks This is called by {@linkcode Hooks.callAll}.
|
978
977
|
*/
|
979
978
|
getUserContextOptions: (
|
980
979
|
app: foundry.applications.ui.Players,
|
981
980
|
contextOptions: ContextMenu.Entry<HTMLElement>[],
|
982
|
-
) =>
|
981
|
+
) => void;
|
983
982
|
|
984
983
|
/**
|
985
984
|
* A hook event that fires when the context menu for a SceneNavigation entry is constructed.
|
@@ -991,6 +990,17 @@ export interface AllHooks extends DynamicHooks {
|
|
991
990
|
app: foundry.applications.ui.SceneNavigation,
|
992
991
|
contextOptions: ContextMenu.Entry<HTMLElement>[],
|
993
992
|
) => void;
|
993
|
+
|
994
|
+
/**
|
995
|
+
* A hook event that fires when the context menu for a Macro Hotbar entry is constructed.
|
996
|
+
* @param app - The Application instance that the context menu is constructed in
|
997
|
+
* @param contextOptions - The context menu entries
|
998
|
+
* @remarks This is called by {@linkcode Hooks.callAll}.
|
999
|
+
*/
|
1000
|
+
getMacroContextOptions: (
|
1001
|
+
app: foundry.applications.ui.Hotbar,
|
1002
|
+
contextOptions: ContextMenu.Entry<HTMLElement>[],
|
1003
|
+
) => void;
|
994
1004
|
}
|
995
1005
|
|
996
1006
|
declare global {
|
@@ -3,7 +3,7 @@ import type AdditionalTypesField from "#common/packages/sub-types.d.mts";
|
|
3
3
|
import type DataModel from "#common/abstract/data.mjs";
|
4
4
|
import type ClientPackageMixin from "./client-package.d.mts";
|
5
5
|
import type { SystemNameConfig } from "#configuration";
|
6
|
-
import type { GetKey } from "
|
6
|
+
import type { GetKey } from "#utils";
|
7
7
|
|
8
8
|
import fields = foundry.data.fields;
|
9
9
|
import Game = foundry.Game;
|
package/tsconfig.json
CHANGED
@@ -5,5 +5,5 @@
|
|
5
5
|
"include": ["**/*", ".*", ".**/**/*"],
|
6
6
|
// `src/index-lenient.d.mts` is skipped because it sets `AssumeHookRan` which has some pretty global effects that would make it easy to write broken code.
|
7
7
|
// `tests` are excluded to speed up typechecking.
|
8
|
-
"exclude": ["src/index-lenient.d.mts", "tests"]
|
8
|
+
"exclude": ["src/index-lenient.d.mts", "tests", "cvise"]
|
9
9
|
}
|